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

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
Header parameters
tokenIdstringRequired

The user's URID (NFT token id).

networkstringRequired

Network identifier: 5000 for mainnet, 5003 for testnet.

Body
inputAmountstringRequired

Input amount in smallest units.

inputTokenstringRequired

Input fiat token contract address.

outputTokenstringRequired

Output fiat token contract address.

Responses
200

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.

application/json

Standard response envelope for the user API (api.ur.app).

retCodeinteger · int64Required

0 on success; non-zero indicates failure.

retMsgstringRequired

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

resultanyOptional

Business payload. Shape depends on the endpoint; some endpoints return it as a JSON-encoded string.

timeNowinteger · int64Optional

Server timestamp in milliseconds.

post/api/v1/quote/fx
POST /api/v1/quote/fx HTTP/1.1
Host: api.ur.app
tokenId: text
network: text
Content-Type: application/json
Accept: */*
Content-Length: 140

{
  "inputAmount": "50000",
  "inputToken": "0xdf79470986629ae4893BfCE0c6C0F4d085E99741",
  "outputToken": "0x5E52c8993283023B83e87eF577f7f51Fa1c5B007"
}
200

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.

{
  "retCode": 0,
  "retMsg": "",
  "result": {
    "inputAmount": "50000",
    "outputAmount": "41869",
    "exchangeRate": "0.83"
  },
  "timeNow": 1772077859153
}

Last updated