Get all current rates
GET /v1/exchangerate/:asset_id_base
Get the current exchange rate between requested asset and all other assets.
If you are using an exchange rate for mission-critical operations, then for best reliability, you should measure the difference between current time and the time returned from the response to ensure that value of the difference between those meets your internal requirements.
You can invert the rates by using Y = 1 / X equation, for example BTC/USD = 1 / (USD/BTC);
Path Parameters
- asset_id_base string required
Requested exchange rates base asset identifier (from the Metadata -> Assets)
Query Parameters
- filter_asset_id string
Comma or semicolon delimited asset identifiers used to filter response (optional)
- invert boolean
True will invert all the rates (optional, if true then rates will be calculated as
rate = 1 / actual_rate
eg.USD/BTC
asBTC/USD
) - time string
Time for historical rates (optional)
- 200
successful operation
- text/plain
- application/json
- text/json
- application/x-msgpack
- Schema
- Example (from schema)
- Example response
Schema
- asset_id_base string nullable
Gets or sets the base asset ID.
rates object[] nullable
Gets or sets the list of exchange rates.
Array [time date-timeGets or sets the time of the exchange rate.
asset_id_quote string nullableGets or sets the quote asset ID of the exchange rate.
rate doubleGets or sets the exchange rate value.
]
{
"asset_id_base": "string",
"rates": [
{
"time": "2024-04-24T17:11:55.803Z",
"asset_id_quote": "string",
"rate": 0
}
]
}
{
"asset_id_base": "BTC",
"rates": [
{
"time": "2017-08-09T14:31:37.0520000Z",
"asset_id_quote": "USD",
"rate": 3258.887541779804
},
{
"time": "2017-08-09T14:31:36.7570000Z",
"asset_id_quote": "EUR",
"rate": 2782.5255080599272
},
{
"time": "2017-08-09T14:31:36.7570000Z",
"asset_id_quote": "CNY",
"rate": 21756.295595926054
},
{
"time": "2017-08-09T14:31:36.7570000Z",
"asset_id_quote": "GBP",
"rate": 2509.602420379958
}
]
}
- Schema
- Example (from schema)
- Example response
Schema
- asset_id_base string nullable
Gets or sets the base asset ID.
rates object[] nullable
Gets or sets the list of exchange rates.
Array [time date-timeGets or sets the time of the exchange rate.
asset_id_quote string nullableGets or sets the quote asset ID of the exchange rate.
rate doubleGets or sets the exchange rate value.
]
{
"asset_id_base": "string",
"rates": [
{
"time": "2024-04-24T17:11:55.803Z",
"asset_id_quote": "string",
"rate": 0
}
]
}
{
"asset_id_base": "BTC",
"rates": [
{
"time": "2017-08-09T14:31:37.0520000Z",
"asset_id_quote": "USD",
"rate": 3258.887541779804
},
{
"time": "2017-08-09T14:31:36.7570000Z",
"asset_id_quote": "EUR",
"rate": 2782.5255080599272
},
{
"time": "2017-08-09T14:31:36.7570000Z",
"asset_id_quote": "CNY",
"rate": 21756.295595926054
},
{
"time": "2017-08-09T14:31:36.7570000Z",
"asset_id_quote": "GBP",
"rate": 2509.602420379958
}
]
}
- Schema
- Example (from schema)
- Example response
Schema
- asset_id_base string nullable
Gets or sets the base asset ID.
rates object[] nullable
Gets or sets the list of exchange rates.
Array [time date-timeGets or sets the time of the exchange rate.
asset_id_quote string nullableGets or sets the quote asset ID of the exchange rate.
rate doubleGets or sets the exchange rate value.
]
{
"asset_id_base": "string",
"rates": [
{
"time": "2024-04-24T17:11:55.803Z",
"asset_id_quote": "string",
"rate": 0
}
]
}
{
"asset_id_base": "BTC",
"rates": [
{
"time": "2017-08-09T14:31:37.0520000Z",
"asset_id_quote": "USD",
"rate": 3258.887541779804
},
{
"time": "2017-08-09T14:31:36.7570000Z",
"asset_id_quote": "EUR",
"rate": 2782.5255080599272
},
{
"time": "2017-08-09T14:31:36.7570000Z",
"asset_id_quote": "CNY",
"rate": 21756.295595926054
},
{
"time": "2017-08-09T14:31:36.7570000Z",
"asset_id_quote": "GBP",
"rate": 2509.602420379958
}
]
}
- Schema
- Example (from schema)
- Example response
Schema
- asset_id_base string nullable
Gets or sets the base asset ID.
rates object[] nullable
Gets or sets the list of exchange rates.
Array [time date-timeGets or sets the time of the exchange rate.
asset_id_quote string nullableGets or sets the quote asset ID of the exchange rate.
rate doubleGets or sets the exchange rate value.
]
{
"asset_id_base": "string",
"rates": [
{
"time": "2024-04-24T17:11:55.803Z",
"asset_id_quote": "string",
"rate": 0
}
]
}
{
"asset_id_base": "BTC",
"rates": [
{
"time": "2017-08-09T14:31:37.0520000Z",
"asset_id_quote": "USD",
"rate": 3258.887541779804
},
{
"time": "2017-08-09T14:31:36.7570000Z",
"asset_id_quote": "EUR",
"rate": 2782.5255080599272
},
{
"time": "2017-08-09T14:31:36.7570000Z",
"asset_id_quote": "CNY",
"rate": 21756.295595926054
},
{
"time": "2017-08-09T14:31:36.7570000Z",
"asset_id_quote": "GBP",
"rate": 2509.602420379958
}
]
}