/
v3.0.11Get access

getRates

This method retrieves the current exchange rates for the specified list of currencies. The method returns current exchange rates for the requested currencies, where all rates are expressed in USD. For each currency, the amount value represents how much USD is required to purchase 1 unit of that currency.

Request parameters:

NameDescriptionTypeValuesDefault
currencyNameList
List of currency codes for which exchange rates should be returned (e.g. BTC, USD).array["USD", "EUR", "BTC", etc.]-

Call example:

getRates({
  currencyNameList: ['BTC', 'USD']
})

Response examples:

{
  code: 0,
  rid: 395804926,
  data: {
    result: 0,
    details: {
      currencies: [{
        currency: 'USD',
        amount: 1,
        fiat: true
      }, {
        currency: 'BTC',
        amount: 68123.7764613418,
        fiat: true
      }]
    }
  }
}

Response parameters:

NameDescriptionTypeValues
currencies
List of currencies with their current rate data.array-
└─ currency
Currency code (e.g. USD, BTC).string-
└─ amount
Exchange rate relative to 1 unit of the currency. Indicates how much USD is required to buy 1 unit of this currency.number-
└─ fiat
Indicates whether the currency is fiat (true) or crypto (false).booleantrue / false