Metrics
Metrics are quantitative measurements used to evaluate the performance and activity of cryptocurrency exchanges. These metrics include:
- Trading Volume: The total amount of cryptocurrency traded on an exchange within a specific time period, indicating liquidity and activity.
- Market Depth: The level of buy and sell orders at different price levels, providing insights into liquidity and potential price impact.
- Order Book: A record of outstanding buy and sell orders for a cryptocurrency, reflecting supply and demand dynamics.
- Spread: The difference between the highest bid and lowest ask prices, indicating liquidity and trading costs.
- Price Charts: Visual representations of cryptocurrency price movements over time, helping identify trends and inform trading decisions.
- Market Cap: The total value of a cryptocurrency calculated by its price multiplied by circulating supply, reflecting relative size and value.
- Trading Pairs: Combinations of cryptocurrencies available for trading, including volume, price, and spread for each pair.
- User Metrics: Data on active users, new registrations, user retention, and engagement, indicating platform popularity and growth.
- Trading Fees: Fees charged for executing trades, including fee structure, discounts, and revenue generated by the exchange.
- Security Metrics: Measures assessing the security of an exchange, such as past incidents, user fund protection, and security audits.
These metrics assist traders and investors in evaluating market activity, liquidity, and the reliability of crypto exchanges for informed decision-making.
Get listing of all supported metrics GET
curl https://rest.coinapi.io/v1/metrics/listing \
--request GET
--header "X-CoinAPI-Key: 73034021-THIS-IS-SAMPLE-KEY"
The above command returns JSON structured like this:
[
{
"metric_id": "LIQUIDATION_QUANTITY",
"description": "The liquidation quantity metric calculates the specific amount of the asset that must be sold to settle the trader's obligations and bring their position back to a manageable level. It helps ensure that the trader's losses are covered and that their account remains in good standing."
},
{
"metric_id": "DERIVATIVES_LAST_PRICE",
"description": "The last price represents the price at which the most recent trade of the derivative contract occurred. It provides traders and investors with the latest information on the market value of the derivative, allowing them to assess the current market sentiment, track price movements, and make informed decisions regarding their derivative positions. The derivatives last price metric is crucial for monitoring real-time market conditions and managing derivative trading strategies effectively."
}
]
Get list of all supported metrics.
HTTP Request
GET /v1/metrics/listing
Output variables
Variable | Description |
---|---|
metric_id | Metric identifier |
description | Metric description |
Get list of all metrics for given exchange including corresponding symbols, assets etc. and also first and last time of occurence GET
curl https://rest.coinapi.io/v1/metrics/by-exchange/BINANCEFTS \
--request GET
--header "X-CoinAPI-Key: 73034021-THIS-IS-SAMPLE-KEY"
The above command returns JSON structured like this:
[
{
"asset_id": "",
"exchange_id": "BINANCEFTS",
"metric_id": "LIQUIDATION_TIME_IN_FORCE",
"symbol_id": "BINANCEFTS_PERP_ETC_USDT",
"chain_id": "",
"network_id": "",
"min_time": "2022-06-02T11:53:02.4568861Z",
"max_time": "2023-08-09T14:14:00.7435795Z"
},
{
"asset_id": "",
"exchange_id": "BINANCEFTS",
"metric_id": "LIQUIDATION_ORDER_TYPE",
"symbol_id": "BINANCEFTS_PERP_EOS_USDT",
"chain_id": "",
"network_id": "",
"min_time": "2022-06-02T11:48:15.5632169Z",
"max_time": "2023-08-09T14:14:47.1498524Z"
},
{
"asset_id": "",
"exchange_id": "BINANCEFTS",
"metric_id": "LIQUIDATION_ORDER_STATUS",
"symbol_id": "BINANCEFTS_PERP_EOS_USDT",
"chain_id": "",
"network_id": "",
"min_time": "2022-06-02T11:48:15.5632169Z",
"max_time": "2023-08-09T14:14:47.1498524Z"
},
]
Get list of all metrics for given exchange.
HTTP Request
GET /v1/metrics/by-exchange/{exchange_id}
Output variables
Variable | Description |
---|---|
asset_id | The identifier for the asset. |
exchange_id | The identifier for the exchange. |
metric_id | The identifier for the metric. |
symbol_id | The identifier for the symbol. |
chain_id | The identifier for blockchain. |
network_id | The identifier for the nerwork. |
min_time | Time of first occurence |
max_time | Time of last occurence |
Exchange current metrics GET
curl https://rest.coinapi.io/v1/metrics/exchange/DERIBIT/current \
--request GET
--header "X-CoinAPI-Key: 73034021-THIS-IS-SAMPLE-KEY"
HTTP Request
GET /v1/metrics/exchange/{exchange_id}/current
URL Parameters
Parameter | Type | Description |
---|---|---|
exchange_id | string | Our identifier of the exchange |
The above command returns JSON structured like this:
[
{
"entry_time": "2023-06-16T07:55:07.2787756Z",
"recv_time": "2023-06-16T07:55:07.0010000Z",
"exchange_id": "DERIBIT",
"symbol_id": "DERIBIT_OPT_BTC_USD_230616_25750_P",
"metric_id": "DERIVATIVES_MARK_PRICE",
"value_decimal": 0.0086
},
{
"entry_time": "2023-06-26T07:05:39.9865633Z",
"recv_time": "2023-06-26T07:05:39.9000000Z",
"exchange_id": "DERIBIT",
"symbol_id": "DERIBIT_OPT_BTC_USD_230728_33000_P",
"metric_id": "IV_UNDERLYING_PRICE",
"value_decimal": 30743.29
},
{
"entry_time": "2023-06-26T07:05:17.0768012Z",
"recv_time": "2023-06-26T07:05:16.8420000Z",
"exchange_id": "DERIBIT",
"symbol_id": "DERIBIT_OPT_ETH_USD_230825_2900_P",
"metric_id": "DERIVATIVES_MARK_PRICE_IV",
"value_decimal": 60.77
}
]
Output variables
Variable | Description |
---|---|
entry_time | The entry time for the data point. |
recv_time | The received time for the data point. |
exchange_id | The identifier for the exchange. |
asset_id | The identifier for the asset. |
symbol_id | The identifier for the symbol. |
metric_id | The identifier for the metric. |
value_decimal | The decimal value for the metric. |
value_text | The textual representation of the value for the metric. |
value_time | The timestamp value for the metric. |
Current metrics for given asset GET
curl https://rest.coinapi.io/v1/metrics/asset/ETH/current \
--request GET
--header "X-CoinAPI-Key: 73034021-THIS-IS-SAMPLE-KEY"
HTTP Request
GET /v1/metrics/asset/{asset_id}/current
URL Parameters
Parameter | Type | Description |
---|---|---|
asset_id | string | Asset identifier |
The above command returns JSON structured like this:
[
{
"entry_time": "2023-06-23T11:16:21.4584557Z",
"recv_time": "2023-06-23T11:16:21.4420000Z",
"exchange_id": "DERIBIT",
"asset_id": "ETH",
"symbol_id": "DERIBIT_OPT_ETH_USD_230929_6000_P",
"metric_id": "IV_INTEREST_RATE",
"value_decimal": 0
},
{
"entry_time": "2023-06-23T11:17:42.8513629Z",
"recv_time": "2023-06-23T11:17:43.0130000Z",
"exchange_id": "DERIBIT",
"asset_id": "ETH",
"symbol_id": "DERIBIT_OPT_ETH_USD_231229_2600_C",
"metric_id": "GREEKS_RHO",
"value_decimal": 2.06609
},
{
"entry_time": "2023-06-23T11:16:22.5038058Z",
"recv_time": "2023-06-23T11:16:22.4520000Z",
"exchange_id": "DERIBIT",
"asset_id": "ETH",
"symbol_id": "DERIBIT_OPT_ETH_USD_231229_1200_P",
"metric_id": "GREEKS_GAMMA",
"value_decimal": 0.00002
}
]
Output variables
Variable | Description |
---|---|
entry_time | The entry time for the data point. |
recv_time | The received time for the data point. |
exchange_id | The identifier for the exchange. |
asset_id | The identifier for the asset. |
symbol_id | The identifier for the symbol. |
metric_id | The identifier for the metric. |
value_decimal | The decimal value for the metric. |
value_text | The textual representation of the value for the metric. |
value_time | The timestamp value for the metric. |
Current metrics for given symbol GET
curl https://rest.coinapi.io/v1/metrics/symbol/DERIBIT_OPT_BTC_USD_240329_80000_P/current \
--request GET
--header "X-CoinAPI-Key: 73034021-THIS-IS-SAMPLE-KEY"
HTTP Request
GET /v1/metrics/symbol/{symbol_id}/current
URL Parameters
Parameter | Type | Description |
---|---|---|
symbol_id | string | Symbol identifier |
The above command returns JSON structured like this:
[
{
"entry_time": "2023-06-23T12:38:48.2782698Z",
"recv_time": "2023-06-23T12:38:48.0140000Z",
"exchange_id": "DERIBITUAT",
"symbol_id": "DERIBIT_OPT_BTC_USD_240329_80000_P",
"metric_id": "GREEKS_RHO",
"value_decimal": -594.10357
},
{
"entry_time": "2023-06-23T12:38:48.2782698Z",
"recv_time": "2023-06-23T12:38:48.0140000Z",
"exchange_id": "DERIBIT",
"symbol_id": "DERIBIT_OPT_BTC_USD_240329_80000_P",
"metric_id": "GREEKS_VEGA",
"value_decimal": 49.31013
},
{
"entry_time": "2023-06-23T12:38:48.2782698Z",
"recv_time": "2023-06-23T12:38:48.0140000Z",
"exchange_id": "DERIBIT",
"symbol_id": "DERIBIT_OPT_BTC_USD_240329_80000_P",
"metric_id": "GREEKS_THETA",
"value_decimal": -6.14104
},
{
"entry_time": "2023-06-23T12:38:48.2782698Z",
"recv_time": "2023-06-23T12:38:48.0140000Z",
"exchange_id": "DERIBIT",
"symbol_id": "DERIBIT_OPT_BTC_USD_240329_80000_P",
"metric_id": "DERIVATIVES_INDEX_PRICE",
"value_decimal": 30027.74
}
]
Output variables
Variable | Description |
---|---|
entry_time | The entry time for the data point. |
recv_time | The received time for the data point. |
exchange_id | The identifier for the exchange. |
asset_id | The identifier for the asset. |
symbol_id | The identifier for the symbol. |
metric_id | The identifier for the metric. |
value_decimal | The decimal value for the metric. |
value_text | The textual representation of the value for the metric. |
value_time | The timestamp value for the metric. |
Historical metrics GET
curl https://rest.coinapi.io/v1/metrics/history?exchange_id=BINANCEFTS&metric_id=DERIVATIVES_MARK_PRICE&time_start=2023-07-01&time_end=2023-07-07 \
--request GET
--header "X-CoinAPI-Key: 73034021-THIS-IS-SAMPLE-KEY"
HTTP Request
GET /v1/metrics/history
URL Parameters
Parameter | Type | Description |
---|---|---|
metric_id | string | Metric identifier (required) |
symbol_id | string | Symbol identifier (required if no asset_id or exchange_id is provided) |
asset_id | string | Asset identifier (required if no symbol_id or exchange_id is provided) |
exchange_id | string | Exchange identifier (required if no symbol_id or asset_id is provided) |
time_start | timestring | Starting time in ISO 8601 |
time_end | timestring | Ending time in ISO 8601 |
time_format | string | If set, returned values will be in unix timestamp format (valid values: unix_sec, unix_millisec, unix_microsec, unix_nanosec) |
period_id | string | Identifier of requested timeseries period (e.g. 5SEC or 2MTH , full list here), default value is 1SEC |
limit | int | Amount of items to return (optional, mininum is 1, maximum is 100000, default value is 100, if the parameter is used then every 100 output items are counted as one request) |
The above command returns JSON structured like this:
[
{
"time_period_start": "2023-07-03T14:29:02.0000000Z",
"time_period_end": "2023-07-03T14:29:03.0000000Z",
"time_open": "2023-07-03T14:29:02.5699837Z",
"time_close": "2023-07-03T14:29:02.5699837Z",
"first": 0,
"last": 0,
"min": 0,
"max": 0,
"count": 0,
"sum": 30668.476938
},
{
"time_period_start": "2023-07-03T14:29:03.0000000Z",
"time_period_end": "2023-07-03T14:29:04.0000000Z",
"time_open": "2023-07-03T14:29:03.1076159Z",
"time_close": "2023-07-03T14:29:03.1076159Z",
"first": 0,
"last": 0,
"min": 0,
"max": 0,
"count": 0,
"sum": 0.05485331
},
{
"time_period_start": "2023-07-03T14:29:04.0000000Z",
"time_period_end": "2023-07-03T14:29:05.0000000Z",
"time_open": "2023-07-03T14:29:04.5792149Z",
"time_close": "2023-07-03T14:29:04.9459786Z",
"first": 0,
"last": 0,
"min": 0,
"max": 0,
"count": 0,
"sum": 7.0257000000000005
}
]
Output variables
Variable | Description |
---|---|
time_period_start | The start time of the time period. |
time_period_end | The end time of the time period. |
time_open | The first data time of the time period. |
time_close | The last data time of the time period. |
first | The opening value. |
last | The closing value. |
min | The lowest value during the time period. |
max | The highest value during the time period. |
count | The number of items during the time period. |
sum | The sum of the values during the time period. |
Historical grouped metrics represented in day intervals GET
curl https://rest.coinapi.io/v1/metrics/group?exchange_id=BINANCEFTS&metric_id=DERIVATIVES_MARK_PRICE&groupby=symbol_id&period_id=1SEC&limit=100&time_format=unix_nanosec \
--request GET
--header "X-CoinAPI-Key: 73034021-THIS-IS-SAMPLE-KEY"
HTTP Request
GET /v1/metrics/group
URL Parameters
Parameter | Type | Description |
---|---|---|
metric_id | string | Metric identifier (required) |
exchange_id | string | Exchange identifier (required if no symbol_id or asset_id is provided) |
symbol_id | string | Symbol identifier (required if no asset_id or exchange_id is provided) |
asset_id | string | Asset identifier (required if no symbol_id or exchange_id is provided) |
groupby | string | Grouping filter value (required, valid values: symbol_id, asset_id, exchange_id, metric_id) |
time_start | timestring | Starting time in ISO 8601 |
time_end | timestring | Ending time in ISO 8601 |
time_format | string | If set, returned values will be in unix timestamp format (valid values: unix_sec, unix_millisec, unix_microsec, unix_nanosec) |
period_id | string | Identifier of requested timeseries period (e.g. 5SEC or 2MTH , full list here), default value is 1SEC |
limit | int | Amount of items to return (optional, mininum is 1, maximum is 100000, default value is 100, if the parameter is used then every 100 output items are counted as one request) |
The above command returns JSON structured like this:
{
"series_label": [
"BINANCEFTS_PERP_IOTA_USDT",
"BINANCEFTS_PERP_AVAX_USDT",
],
"rows": [
[
{
"time_period_start": 1688394546000000000,
"time_period_end": 1688394547000000000,
"time_open": 1688394546786306800,
"time_close": 1688394546786306800,
"first": 0,
"last": 0,
"min": 0,
"max": 0,
"count": 0,
"sum": 0.18568629
},
{
"time_period_start": 1688394621000000000,
"time_period_end": 1688394622000000000,
"time_open": 1688394621787671700,
"time_close": 1688394621787671700,
"first": 0,
"last": 0,
"min": 0,
"max": 0,
"count": 0,
"sum": 0.18568654
}
],
[
{
"time_period_start": 1688394548000000000,
"time_period_end": 1688394549000000000,
"time_open": 1688394548435108000,
"time_close": 1688394548435108000,
"first": 0,
"last": 0,
"min": 0,
"max": 0,
"count": 0,
"sum": 13.16389779
}
]
]
}
Output variables
Variable | Description |
---|---|
sereies_label | Group values labels |
rows | Output values of given metric, by chosen time interval |