Skip to main content

Exchange rate query interface

Request address

  • API Address (requestURI) : /openapi/v1/queryExchangeRate

Request parameters

Parameter nameTypeRequirementDescription
assetTypeIntegerRAsset type, [0: Cryptocurrency, 1: Fiat Currency] Defaults to 1: Fiat Currency
baseCurrencyStringRThe length of the original currency cannot exceed 50
targetCurrencyStringOThe length of the target currency cannot exceed 50

Sample request

{
"assetType": 1,
"baseCurrency": "USD",
"targetCurrency": "CNY"
}

Response parameters

Parameter nameTypeRequirementDescription
exchangeRateBigDecimalRExchange Rates

Sample response

{
"code": 200,
"msg": "success",
"data": {
"exchangeRate": 6.5
}
}