curl --request POST \
--url https://app.sandbox.rio.trade/api/quotes \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"origin": {
"asset": "MXN",
"amount": 1000,
"country": "MX"
},
"destination": {
"asset": "USDC",
"network": "polygon",
"country": "MX"
}
}
'{
"id": "6660bdefd6c964829d63fcb7",
"userId": "66290ac8bd3903485989f82e",
"flow": "fiatToCrypto",
"origin": {
"asset": "MXN",
"amount": 1000,
"country": "MX"
},
"destination": {
"asset": "USDC",
"amount": 54.76,
"country": "MX"
},
"fixedLeg": "origin",
"pricingDetails": {
"fees": [
{
"type": "processing",
"amount": 20,
"asset": "MXN",
"tax": 3.2
}
]
},
"settlement": {
"mode": "deliverable",
"timing": "default",
"valueDateOffset": 1,
"effectiveValueDateOffset": 1,
"valueDate": "2026-10-12T18:00:00.000Z",
"payment": {
"asset": "MXN",
"amount": 1000,
"rail": "bankTransfer",
"network": "polygon",
"dueDate": "2026-10-12T18:00:00.000Z"
},
"payout": {
"asset": "USDC",
"amount": 54.76,
"rail": "blockchain",
"network": "polygon",
"dueDate": "2026-10-12T18:00:00.000Z"
}
},
"marketPrice": 0.056,
"netPrice": 0.05476,
"orderType": "market",
"limitNetPrice": 0.0555,
"timeInForceStartsAt": "2026-10-12T18:00:00.000Z",
"timeInForceEndsAt": "2026-10-12T18:00:00.000Z",
"createdAt": "2026-10-12T18:00:00.000Z",
"expiresAt": "2026-10-12T18:00:10.000Z",
"reissueAfterExpiration": true,
"isAfterHours": false,
"isSurgePricing": false
}{
"errors": [
{
"code": 19,
"message": "Not authorized"
}
]
}Create Quote
Prices a conversion. Set origin to what you pay and destination to what you receive, with amount on exactly one of them. A fiat origin and stablecoin destination is a buy, the reverse is a sell, and two stablecoins is a swap.
curl --request POST \
--url https://app.sandbox.rio.trade/api/quotes \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"origin": {
"asset": "MXN",
"amount": 1000,
"country": "MX"
},
"destination": {
"asset": "USDC",
"network": "polygon",
"country": "MX"
}
}
'{
"id": "6660bdefd6c964829d63fcb7",
"userId": "66290ac8bd3903485989f82e",
"flow": "fiatToCrypto",
"origin": {
"asset": "MXN",
"amount": 1000,
"country": "MX"
},
"destination": {
"asset": "USDC",
"amount": 54.76,
"country": "MX"
},
"fixedLeg": "origin",
"pricingDetails": {
"fees": [
{
"type": "processing",
"amount": 20,
"asset": "MXN",
"tax": 3.2
}
]
},
"settlement": {
"mode": "deliverable",
"timing": "default",
"valueDateOffset": 1,
"effectiveValueDateOffset": 1,
"valueDate": "2026-10-12T18:00:00.000Z",
"payment": {
"asset": "MXN",
"amount": 1000,
"rail": "bankTransfer",
"network": "polygon",
"dueDate": "2026-10-12T18:00:00.000Z"
},
"payout": {
"asset": "USDC",
"amount": 54.76,
"rail": "blockchain",
"network": "polygon",
"dueDate": "2026-10-12T18:00:00.000Z"
}
},
"marketPrice": 0.056,
"netPrice": 0.05476,
"orderType": "market",
"limitNetPrice": 0.0555,
"timeInForceStartsAt": "2026-10-12T18:00:00.000Z",
"timeInForceEndsAt": "2026-10-12T18:00:00.000Z",
"createdAt": "2026-10-12T18:00:00.000Z",
"expiresAt": "2026-10-12T18:00:10.000Z",
"reissueAfterExpiration": true,
"isAfterHours": false,
"isSurgePricing": false
}{
"errors": [
{
"code": 19,
"message": "Not authorized"
}
]
}Requirements to consume the endpoint.
Create and modify role
User approved
Authorizations
Body
The asset you pay. Give network for stablecoins and leave it out for fiat. Set amount on exactly one of the two legs.
Show child attributes
Show child attributes
The asset you receive. Give network for stablecoins and leave it out for fiat. Set amount on exactly one of the two legs.
Show child attributes
Show child attributes
Id of the user the quote is for. Brokers quote on behalf of their users with this field.
"66290ac8bd3903485989f82e"
Relates the quote to an existing order.
"63290ac8bd3903485989062f"
Settlement terms. Omit for an order that settles on receipt of payment.
Show child attributes
Show child attributes
market executes at the current price, limit waits for limitNetPrice.
market, limit "market"
Limit price for limit orders, expressed like netPrice as units of the destination asset per unit of the origin asset. Only applicable when orderType is limit.
0.0555
Earliest execution time of a limit order (optional).
"2026-10-12T18:00:00.000Z"
Latest execution time of a limit order (optional).
"2026-10-12T18:00:00.000Z"
Response
Created
Id of the quote.
"6660bdefd6c964829d63fcb7"
Id of the user the quote belongs to.
"66290ac8bd3903485989f82e"
Direction of the conversion, derived from the two assets. fiatToCrypto buys stablecoins, cryptoToFiat sells them, cryptoToCrypto swaps one stablecoin or network for another.
fiatToCrypto, cryptoToFiat, cryptoToCrypto "fiatToCrypto"
What the customer pays. The amount is in the leg's own asset.
Show child attributes
Show child attributes
What the customer receives. The amount is in the leg's own asset.
Show child attributes
Show child attributes
Which leg's amount you specified. The other leg was derived from the price and fees.
origin, destination "origin"
How the destination amount was derived from the origin amount.
Show child attributes
Show child attributes
How and when the two legs settle.
Show child attributes
Show child attributes
Market price at the time of the quote, in units of the destination asset per unit of the origin asset.
0.056
Final price including fees and taxes, in destination asset per unit of origin asset.
0.05476
market executes at the current price, limit waits for limitNetPrice.
market, limit "market"
Limit price for limit orders, expressed like netPrice as units of the destination asset per unit of the origin asset. Only applicable when orderType is limit.
0.0555
Earliest execution time of a limit order.
"2026-10-12T18:00:00.000Z"
Latest execution time of a limit order.
"2026-10-12T18:00:00.000Z"
Creation time.
"2026-10-12T18:00:00.000Z"
Expiration time. Orders created from an expired quote are re-quoted unless the account uses instant booking.
"2026-10-12T18:00:10.000Z"
Whether orders keep getting a fresh quote after this one expires.
true
Whether after hours pricing applied.
false
Whether surge pricing applied.
false