Get estimated quote
Code
Request Body
| Field | Type | Mandatory | Remarks |
|---|---|---|---|
| fiatCurrency | string | Yes | fiat currency |
| cryptoCurrency | string | No | crypto currency. Either cryptoCurrency or contractAddress must be provided. |
| requestedAmount | string | Yes | Requested amount. Fraction is 8 |
| amountType | int | Yes | Specify whether the total amount is in fiat:1 or crypto:2 |
| payMethodCode | string | No | The payment method code is from payment method list API. If no value is provided for payMethodCode, the API will return the best price along with its corresponding payMethodCode, refer to example 5&6. |
| payMethodSubCode | string | No | The payment method sub code is from payment method list API. If no value is provided for both payMethodCode and payMethodSubCode, the API will return the best price along with its corresponding payMethodCode and payMethodSubCode, refer to example 5&6. If only a value of payMethodCode is provided, but no value of payMethodSubCode is provided, the best price and its corresponding payMethodSubCode returned will be the best quote and payment method within the category of the specified payMethodCode. |
| network | string | No | crypto network. required if contractAddress has value |
| address | string | No | the user wallet address, required if contractAddress has value |
| contractAddress | string | No | crypto contract address. required if buying a token that is not listed on Binance spot |
Response Body
| Field | Type | Remarks |
|---|---|---|
| totalAmount | string | total amount in crypto (when amountType is 1) or in fiat (when amountType is 2) |
| quotePrice | string | quote price |
| feeAmount | string | fee amount |
| feeCurrency | string | fee currency, fiat currency or crypto |
| networkFee | string | network fee amount |
| payMethodCode | string | The payment method code supported by this quote |
| payMethodSubCode | string | The payment method sub code supported by this quote |
Example 1
Request Parameters:
Code
Response:
Code
User selects to buy crypto with Card (VISA/Mastercard), and prefers "specify fiat currency amount" (amountType: 1) to buy USDT with 100 EUR (requestedAmount).
The estimated quote (quotePrice) is 1.04654125 EUR/USDT. After deducting the estimated total fees (feeAmount) of 2 EUR, the estimated final amount of USDT received (totalAmount) is 93.64179386 USDT. Here, totalAmount is calculated as "(requestedAmount - feeAmount) / quotePrice", that is, (100 - 2) / 1.04654125 = 93.64179386.
In addition, the blockchain network fee (networkFee) is 0.03 USDT, which will be deducted from the withdrawal amount when processing withdrawal.
Example 2
Request Parameters:
Code
Response:
Code
User selects to buy crypto with Card (VISA/Mastercard), and prefers "specify crypto amount" (amountType: 2) to buy 100 USDT (requestedAmount) with EUR.
The estimated quote (quotePrice) is 1.04654125 EUR/USDT. After adding the estimated total fees (feeAmount) of 2.14 EUR, the estimated final amount of fiat currency to be paid (totalAmount) is 106.79 EUR. Here, totalAmount is calculated as "requestedAmount _ quotePrice + feeAmount", that is, 100 _ 1.04654125 + 2.14 = 106.79.
In addition, the blockchain network fee (networkFee) is 0.03 USDT, which will be deducted from the withdrawal amount when processing withdrawal.
Example 3
Request Parameters:
Code
Response:
Code
User selects to buy crypto with P2P bank transfer, and prefers "specify fiat currency amount" (amountType: 1) to buy USDT with 100 EUR (requestedAmount).
The estimated quote (quotePrice) is 0.91 EUR/USDT. After deducting the estimated total fees (feeAmount) of 2.1978 USDT, the estimated final amount of USDT received (totalAmount) is 107.6923 USDT. Here, totalAmount is calculated as "requestedAmount / quotePrice - feeAmount", that is, 100 / 0.91 - 2.1978 = 107.6923.
In addition, the blockchain network fee (networkFee) is 0.03 USDT, which will be deducted from the withdrawal amount when processing withdrawal.
Example 4
Request Parameters:
Code
Response:
Code
User selects to buy crypto with P2P bank transfer, and prefers "specify crypto amount" (amountType: 2) to buy 100 USDT (requestedAmount) with EUR.
The estimated quote (quotePrice) is 0.91 EUR/USDT. After adding the estimated total fees (feeAmount) of 2.04081 USDT, the estimated final amount of fiat currency to be paid (totalAmount) is 92.857 EUR. Here, totalAmount is calculated as "(requestedAmount + feeAmount) _ quotePrice", that is, (100 + 2.04081) _ 0.91 = 92.857.
In addition, the blockchain network fee (networkFee) is 0.03 USDT, which will be deducted from the withdrawal amount when processing withdrawal.
Example 5
Request Parameters:
Code
Response:
Code
User selects to buy crypto and prefers "specify fiat currency amount" (amountType: 1) to buy USDT with 100 EUR (requestedAmount), but does not specify any payment method.
The estimated quote (quotePrice) is 1.04654125 EUR/USDT, and the corresponding payment method is Card (VISA/Mastercard). After deducting the estimated total fees (feeAmount) of 2 EUR, the estimated final amount of USDT received (totalAmount) is 93.64179386 USDT. Here, totalAmount is calculated as "(requestedAmount - feeAmount) / quotePrice", that is, (100 - 2) / 1.04654125 = 93.64179386.
In addition, the blockchain network fee (networkFee) is 0.03 USDT, which will be deducted from the withdrawal amount when processing withdrawal.
Example 6
Request Parameters:
Code
Response:
Code
User selects to buy crypto and prefers "specify crypto amount" (amountType: 2) to buy 100 USDT (requestedAmount) with EUR, but does not specify any payment method.
The estimated quote (quotePrice) is 0.91 EUR/USDT, and the corresponding payment method is P2P bank transfer. After adding the estimated total fees (feeAmount) of 2.04081 USDT, the estimated final amount of fiat currency to be paid (totalAmount) is 92.857 EUR. Here, totalAmount is calculated as "(requestedAmount + feeAmount) _ quotePrice", that is, (100 + 2.04081) _ 0.91 = 92.857.
In addition, the blockchain network fee (networkFee) is 0.03 USDT, which will be deducted from the withdrawal amount when processing withdrawal.
Example 7
Request Parameters:
Code
Response:
Code
User opts to purchase meme crypto without specifying a payment method and chooses "specify fiat currency amount" (amountType: 1) to buy meme crypto worth 150 EUR (requestedAmount).