latestOpenAPI 3.1.02026-08-108094177.6 KB

087dcf516ce2

External Wallet Access Mode

Get FX quote

Returns the quoted FX output amount (smallest units) and exchange rate for a fiat token pair. Quote mode is exact_in. Read per-token FX limits from the chain config; do not hardcode them.

post/api/v1/quote/fx

Headers

tokenIdstring required

The user's URID (NFT token id).

networkstring required

Network identifier: 5000 for mainnet, 5003 for testnet.

Request body

inputAmountstring required

Input amount in smallest units.

inputTokenstring required

Input fiat token contract address.

outputTokenstring required

Output fiat token contract address.

Response

Response envelope. For the user API, retCode 0 means success; for the partner API, code 0 means success. Business rejections return HTTP 200 with a non-zero code.

retCodeinteger required

0 on success; non-zero indicates failure.

retMsgstring required

Human-readable message; error details when retCode is non-zero.

{"stackTrail":"components:schemas:EwaEnvelope:properties:result","oasType":"schema","type":"unknown","description":"Business payload. Shape depends on the endpoint; some endpoints return it as a JSON-encoded string."}
timeNowinteger

Server timestamp in milliseconds.