Get estimated quote
Code
Request Body
| Field | Type | Mandatory | Remarks |
|---|---|---|---|
| fiatCurrency | string | Yes | fiat currency |
| cryptoCurrency | string | Yes | crypto currency |
| 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 the payMethodCode is SELL_P2P, you must provide a value for payMethodSubCode. Otherwise, there is no need to provide a value for payMethodSubCode. |
| network | string | No | crypto network |
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 |
| 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 sell crypto with Card (VISA/Mastercard), and prefers "specify fiat currency amount" (amountType: 1) to sell USDT for 100 EUR (requestedAmount).
The estimated quote (quotePrice) is 0.9336477 EUR/USDT. After adding the estimated total fees (feeAmount) of 2 EUR, the estimated final amount of crypto to be deducted (totalAmount) is 109.24891691 USDT. Here, totalAmount is calculated as "(requestedAmount + feeAmount) / quotePrice", that is, (100 + 2) / 0.9336477 = 109.24891691.
Example 2
Request Parameters:
Code
Response:
Code
User selects to sell crypto with Card (VISA/Mastercard), and prefers "specify crypto amount" (amountType: 2) to sell 100 USDT (requestedAmount) with EUR.
The estimated quote (quotePrice) is 0.93368279 EUR/USDT. After deducting the estimated total fees (feeAmount) of 1.8 EUR, the estimated final amount of fiat currency received (totalAmount) is 91.56 EUR. Here, totalAmount is calculated as "requestedAmount _ quotePrice - feeAmount", that is, 100 _ 0.93368279 - 1.8 = 91.56.
Example 3
Request Parameters:
Code
Response:
Code
User selects to sell crypto with P2P bank transfer, and prefers "specify fiat currency amount" (amountType: 1) to sell USDT for 100 EUR (requestedAmount).
The estimated quote (quotePrice) is 0.97 EUR/USDT. After adding the estimated total fees (feeAmount) of 1.82 USDT, the estimated final amount of crypto to be deducted (totalAmount) is 104.91278351 USDT. Here, totalAmount is calculated as "requestedAmount / quotePrice + feeAmount”, that is, 100 / 0.97 + 1.82 = 104.91278351.
Example 4
Request Parameters:
Code
Response:
Code
User selects to sell crypto with P2P bank transfer, and prefers "specify crypto amount" (amountType: 2) to sell 100 USDT (requestedAmount) with EUR.
The estimated quote (quotePrice) is 0.97 EUR/USDT. After deducting the estimated total fees (feeAmount) of 1.82 USDT, the estimated final amount of fiat currency received (totalAmount) is 95.2346 EUR. Here, totalAmount is calculated as “(requestedAmount - feeAmount) _ quotePrice”, that is, (100 - 1.82) _ 0.97 = 95.2346.
Example 5
Request Parameters:
Code
Response:
Code
User selects to sell crypto and prefers "specify fiat currency amount" (amountType: 1) to sell USDT for 100 EUR (requestedAmount), but does not specify any payment method.
The estimated quote (quotePrice) is 0.9336477 EUR/USDT, and the corresponding payment method is Card (VISA/Mastercard). After adding the estimated total fees (feeAmount) of 2 EUR, the estimated final amount of crypto to be deducted (totalAmount) is 109.24891691 USDT. Here, totalAmount is calculated as "(requestedAmount + feeAmount) / quotePrice", that is, (100 + 2) / 0.9336477 = 109.24891691.
Example 6
Request Parameters:
Code
Response:
Code
User selects to sell crypto and prefers "specify crypto amount" (amountType: 2) to sell 100 USDT (requestedAmount) with EUR, but does not specify any payment method.
The estimated quote (quotePrice) is 0.97 EUR/USDT, and the corresponding payment method is P2P bank transfer. After deducting the estimated total fees (feeAmount) of 1.82 USDT, the estimated final amount of fiat currency received (totalAmount) is 95.2346 EUR. Here, totalAmount is calculated as “(requestedAmount - feeAmount) _ quotePrice”, that is, (100 - 1.82) _ 0.97 = 95.2346.