Get on-ramp quote
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.
0x-prefixed 65-byte hex EIP-191 signature over the Partner Auth message. See the Signature and verify guide.
Unix seconds. UR rejects the request when the current time is past the deadline. Keep the validity window at or under 5 minutes.
0x-prefixed partner signer address registered with UR.
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.
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.
onramp for the main flow; swap_retry for retrying a failed swap leg.
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.
Destination chain ID in CAIP-2 format. Must match a token with aggregator support in the chain config.
Source fiat currency symbol. Required when scene is onramp.
USDC token address. Required when scene is swap_retry.
Destination token address.
Input amount as a human-readable decimal string; UR converts it to smallest units by the input currency decimals.
Slippage tolerance in basis points. Defaults to 50.
Standard envelope. Business errors return HTTP 200 with a non-zero code.
Standard UR OpenAPI response envelope. code 0 means success; a non-zero code is a business error described by message.
0 on success; non-zero business error code.
Human-readable explanation. May be empty on success.
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
}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