Send Quote Request(USER_DATA)
#
API DescriptionRequest a quote for the requested token pairs
#
HTTP RequestPOST /sapi/v1/convert/getQuote
#
Request Weight200(UID)
#
Request ParametersName | Type | Mandatory | Description |
---|---|---|---|
fromAsset | STRING | YES | |
toAsset | STRING | YES | |
fromAmount | DECIMAL | EITHER | When specified, it is the amount you will be debited after the conversion |
toAmount | DECIMAL | EITHER | When specified, it is the amount you will be credited after the conversion |
walletType | ENUM | NO | SPOT or FUNDING. Default is SPOT |
validTime | ENUM | NO | 10s, 30s, 1m, 2m, default 10s |
recvWindow | LONG | NO | The value cannot be greater than 60000 |
timestamp | LONG | YES |
- Either fromAmount or toAmount should be sent
quoteId
will be returned only if you have enough funds to convert