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"
}
]
}Quotes API
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.
POST
/
api
/
quotes
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"
}
]
}