Convert Quote
ConvertQuote
GET /viewer/quote
Description
Calculate the price by passing the quantity rfq_size of from_asset and the target asset to_asset
Request
Request Parameters
Name | Type | Require | Description | Example |
---|---|---|---|---|
from_asset | string | true | asset symbol | "USDT" |
to_asset | string | true | asset symbol | "BTC" |
rfq_size | decimal | true | request for quotation size | "333" |
rfq_size_asset | string | true | request for quotation size asset | "USDT" |
- support two http parameter transmission methods: application/json and query params
- from_asset, to_asset, rfq_size, and rfq_size_asset should all be sent, and from_asset cannot be the same as to_asset
- rfq_size_asset needs to be the same as either from_asset or to_asset to quote the price
- if rfq_size_asset is the same as from_asset, rfq_size needs to be within the [from_asset_min_amount,from_asset_max_amount] range returned by the ConvertRange interface
- if rfq_size_asset is the same as to_asset, rfq_size needs to be within the [to_asset_min_amount, to_asset_max_amount] range returned by the ConvertRange interface
Response
{
"from_asset": "USDT",
"to_asset": "BTC",
"px": "0.00000962",
"from_sz": "333",
"to_sz": "0.00320533",
"quote_id": "dd5091d4-1e90-48b3-83bc-bea1312660ab",
"quote_ts": 1747208733939,
"ttl_ms": 10000,
"rfq_size": "333",
"rfq_size_asset": "USDT"
}
Response Description
Attribute Name | Type | Description | Example |
---|---|---|---|
from_asset | string | asset symbol | "USDT" |
to_asset | string | asset symbol | "BTC" |
px | decimal | price | "0.00000962" |
from_sz | decimal | from size | "333" |
to_sz | decimal | to size | "0.00320533" |
quote_id | string | convert maker quote id | "dd5091d4-1e90-48b3-83bc-bea1312660ab" |
quote_ts | number | convert maker quote timestamp | 1747208733939 |
ttl_ms | number | convert maker quote validity period | 10000 |
rfq_size | decimal | request for quotation size | "333" |
rfq_size_asset | string | request for quotation asset | "USDT" |