v26

latestOpenAPI 3.0.2raw.githubusercontent.com2024-10-0834042975.6 KB
Convert

Send quote request (USER_DATA)

Request a quote for the requested token pairs

Weight(UID): 200

post/sapi/v1/convert/getQuote

Query parameters

fromAssetstring required
Example:BTC
toAssetstring required
Example:USDT
fromAmountnumber float
Example:1

When specified, it is the amount you will be debited after the conversion

toAmountnumber float
Example:1

When specified, it is the amount you will be debited after the conversion

validTimestring
Example:10s

10s, 30s, 1m, 2m, default 10s

walletTypestring
Example:SPOT

SPOT or FUNDING. Default is SPOT

recvWindowinteger
Example:5000

The value cannot be greater than 60000

timestampinteger required

UTC timestamp in ms

signaturestring required

Signature

Response

Quote Request

quoteIdstring required
ratiostring required
inverseRatiostring required
validTimestampinteger required
toAmountstring required
fromAmountstring required

Example response

{
  "quoteId": "12415572564",
  "ratio": "38163.7",
  "inverseRatio": "0.0000262",
  "validTimestamp": 1623319461670,
  "toAmount": "3816.37",
  "fromAmount": "0.1"
}