Get quote
Interface address: /api/v1/quote
Note: This interface allows you to query the current fiat/crypto exchange rate, which may differ from the actual transaction price.
Request input parameters
Parameter | Type | Mandatory | Description |
---|---|---|---|
fiatCurrency | String | Y | Fiat currency |
cryptoCurrency | String | Y | Cryptocurrency |
fiatAmount | String | N | Fiat amount. Mandatory when "tradeDir" is "BUY". |
cryptoAmount | String | N | Cryptocurrency amount. Mandatory when "tradeDir" is "SELL". |
tradeDir | String | Y | BUY/SELL |
network | String | N | The network associated with the cryptocurrency |
type | String | N | 0: Cached quote used for price display. Default value: 0 1: Real quote, invoked when the user intends to place an order. The order will be executed based on the real quote and is valid for a limited period. |
userId | String | N | Mandatory to provide when making a real quote |
merchantUserId | String | N | Either the merchantUserId or the userId |
batchNo | String | N | Batch Number |
quoteId | String | N | Quote Id |
payWayCode | String | N | Payment type. Default: CARD |
Output parameters
Parameter | Type | Mandatory | Description |
---|---|---|---|
fiatCurrency | String | Y | Fiat currency |
cryptoCurrency | String | Y | Cryptocurrency |
fiatAmount | String | Y | Fiat amount |
cryptoAmount | String | Y | Cryptocurrency amount |
displayPrice | String | Y | Unit price |
displayFeeRate | String | Y | Transaction fee rate |
displayFee | String | Y | Transaction fee |
networkFee | String | Y | Gas fee |
quoteId | String | N | Quote ID |
effectTime | Int | N | Validity period. Unit: millisecond |
createTime | Date | N | Create Time |
zeroRateResponse | Object | N | Zero Fee Rate |
switchMarket | String | N | Switch Info |
discountPaidAmountStr | String | N | Fiat Amount Payable After Deduction |
discountPaidFeeAmountStr | String | N | Deductible Fee Amount Payable After Deduction |
originalFeeRate | String | N | Original Fee Rate |
originalDisplayFee | String | N | Original Display Fee |
feeOff | String | N | Fee Discount |