Convert

Send quote request (USER_DATA)

Changed on

Request a quote for the requested token pairs

Weight(UID): 200

post/sapi/v1/convert/getQuote

Request

  • Base URL
    https://api.binance.com
  • URL
    https://api.binance.com/sapi/v1/convert/getQuote
  • Auth
    API key in header X-MBX-APIKEY

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

    • breaking

      removed the enum value 10s from the query request parameter validTime

    • breaking

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

    • breaking

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

    • breaking

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

    • info

      added the new optional query request parameter walletType

    • breaking

      for the query request parameter fromAmount, the format changed from decimal to float

    • breaking

      for the query request parameter toAmount, the format changed from decimal to float