For the complete documentation index, see llms.txt. This page is also available as Markdown.

Get on-ramp quote

Quote an On-ramp (scene onramp) or a retry swap (scene swap_retry). When the response has needLiveness true, complete the liveness check before submitting; after liveness passes, request a new quote and submit with the new quoteId. On-ramp is not yet available for integration; this reference is a preview.

post
/api/fma/v1/quote/onramp
Authorizations
X-Api-SignaturestringRequired

Partner Auth: EIP-191 signature by the partner's registered backend key, with X-Api-Deadline and optional X-Api-PublicKey headers. See the Signature and verify guide.

Header parameters
X-Api-SignaturestringRequired

0x-prefixed 65-byte hex EIP-191 signature over the Partner Auth message. See the Signature and verify guide.

X-Api-DeadlinestringRequired

Unix seconds. UR rejects the request when the current time is past the deadline. Keep the validity window at or under 5 minutes.

X-Api-PublicKeystringRequired

0x-prefixed partner signer address registered with UR.

X-Ur-IdstringOptional

Send at least one of X-Ur-Id or X-External-User-Id. When both are present, UR resolves the user by X-Ur-Id first.

X-External-User-IdstringOptional

Send at least one of X-Ur-Id or X-External-User-Id. When both are present, UR resolves the user by X-Ur-Id first.

Body
scenestring · enumRequired

onramp for the main flow; swap_retry for retrying a failed swap leg.

Possible values:
srcChainIdstringOptional

Source chain ID in CAIP-2 format; the chain where the user's tokenized fiat is held. For swap_retry, use the pending retry's chainId.

dstChainIdstringRequired

Destination chain ID in CAIP-2 format. Must match a token with aggregator support in the chain config.

fromCurrencystringOptional

Source fiat currency symbol. Required when scene is onramp.

fromTokenstringOptional

USDC token address. Required when scene is swap_retry.

toTokenstringRequired

Destination token address.

amountstringRequired

Input amount as a human-readable decimal string; UR converts it to smallest units by the input currency decimals.

slippageBpsintegerOptional

Slippage tolerance in basis points. Defaults to 50.

Responses
200

Standard envelope. Business errors return HTTP 200 with a non-zero code.

application/json

Standard UR OpenAPI response envelope. code 0 means success; a non-zero code is a business error described by message.

codeintegerRequired

0 on success; non-zero business error code.

messagestringRequired

Human-readable explanation. May be empty on success.

post/api/fma/v1/quote/onramp
POST /api/fma/v1/quote/onramp HTTP/1.1
Host: openapi.ur.app
X-Api-Signature: text
X-Api-Deadline: text
X-Api-PublicKey: text
Content-Type: application/json
Accept: */*
Content-Length: 181

{
  "scene": "onramp",
  "srcChainId": "<src-chain-CAIP2>",
  "dstChainId": "<dst-chain-CAIP2>",
  "fromCurrency": "EUR",
  "toToken": "0x_DESTINATION_TOKEN_ADDRESS",
  "amount": "100.50",
  "slippageBps": 50
}
200

Standard envelope. Business errors return HTTP 200 with a non-zero code.

{
  "code": 1,
  "message": "text",
  "data": {
    "quoteId": "text",
    "srcChainId": "text",
    "dstChainId": "text",
    "needLiveness": true,
    "best": {
      "aggregator": "text",
      "to": "text",
      "swapCalldata": "text",
      "minUsdcAmount": "text",
      "expectedUsdcAmount": "text",
      "minAmountOut": "text",
      "expectedAmountOut": "text",
      "slippageBps": 1,
      "deadline": 1,
      "priceImpact": "text"
    },
    "inputAmount": "text",
    "outputAmount": "text",
    "exchangeRate": "text",
    "crossChainFee": "text",
    "networkFee": "text",
    "processingFee": "text",
    "totalFee": "text",
    "warningMessage": "text"
  }
}

Last updated