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"
}

Changes

Changed in 3 of the 26 revisions of this API.62

  • 558ab69ec55541See the full diff
    • removed the enum value 10s from the query request parameter validTime

      request-parameter-enum-value-removed

    • removed the enum value 1m from the query request parameter validTime

      request-parameter-enum-value-removed

    • removed the enum value 2m from the query request parameter validTime

      request-parameter-enum-value-removed

    • removed the enum value 30s from the query request parameter validTime

      request-parameter-enum-value-removed

    • added the new optional query request parameter walletType

      new-optional-request-parameter

    • for the query request parameter fromAmount, the type/format was changed from number/decimal to number/float

      request-parameter-type-changed

    • for the query request parameter toAmount, the type/format was changed from number/decimal to number/float

      request-parameter-type-changed

    • endpoint added

      endpoint-added