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 exchange-level metrics for given exchange GET
curl https://rest.coinapi.io/v1/metrics/exchange/listing?exchange_id=BINANCEFTS \
--request GET
--header "X-CoinAPI-Key: 73034021-THIS-IS-SAMPLE-KEY"
The above command returns JSON structured like this:
[
{
"exchange_id": "BINANCEFTS",
"metric_id": "LIQUIDATION_TIME_IN_FORCE",
},
{
"exchange_id": "BINANCEFTS",
"metric_id": "LIQUIDATION_ORDER_TYPE",
},
{
"exchange_id": "BINANCEFTS",
"metric_id": "LIQUIDATION_ORDER_STATUS",
},
]
Get list of all exchange level metrics ids for given exchange.
HTTP Request
GET /v1/metrics/exchange/listing
URL Parameters
Parameter | Type | Description |
---|---|---|
metric_id | string | Metric identifier |
exchange_id | string | Exchange identifier (required) |
Output variables
Variable | Description |
---|---|
exchange_id | The identifier for the exchange. |
metric_id | The identifier for the metric. |
Current exchange-level metrics values GET
curl https://rest.coinapi.io/v1/metrics/exchange/current?exchange_id=DERIBIT \
--request GET
--header "X-CoinAPI-Key: 73034021-THIS-IS-SAMPLE-KEY"
HTTP Request
GET /v1/metrics/exchange/current
URL Parameters
Parameter | Type | Description |
---|---|---|
exchange_id | string | Our identifier of the exchange (required) |
metric_id | string | The identifier for the metric. |
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",
"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",
"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",
"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. |
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 exchange-level metric valuesGET
curl https://rest.coinapi.io/v1/metrics/exchange/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/exchange/history
URL Parameters
Parameter | Type | Description |
---|---|---|
metric_id | string | Metric identifier (required) |
exchange_id | string | Exchange identifier (required) |
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. |
Get list of symbol-level metrics ids for given exchange GET
curl https://rest.coinapi.io/v1/metrics/symbol/listing?exchange_id=BINANCEFTS \
--request GET
--header "X-CoinAPI-Key: 73034021-THIS-IS-SAMPLE-KEY"
The above command returns JSON structured like this:
[
{
"exchange_id": "BINANCEFTS",
"metric_id": "LIQUIDATION_TIME_IN_FORCE",
"symbol_id": "BINANCEFTS_PERP_ETC_USDT"
},
{
"exchange_id": "BINANCEFTS",
"metric_id": "LIQUIDATION_ORDER_TYPE",
"symbol_id": "BINANCEFTS_PERP_EOS_USDT"
},
{
"exchange_id": "BINANCEFTS",
"metric_id": "LIQUIDATION_ORDER_STATUS",
"symbol_id": "BINANCEFTS_PERP_EOS_USDT"
},
]
Get list of all symbol metrics.
HTTP Request
GET /v1/metrics/symbol/listing
URL Parameters
Parameter | Type | Description |
---|---|---|
metric_id | string | Metric identifier |
exchange_id | string | Exchange identifier (required if no symbol_id provided) |
symbol_id | string | Symbol identifier (required if no exchange_id provided) |
Output variables
Variable | Description |
---|---|
exchange_id | The identifier for the exchange. |
metric_id | The identifier for the metric. |
symbol_id | The identifier for the symbol. |
Current symbol-level metrics values GET
curl https://rest.coinapi.io/v1/metrics/symbol/current?symbol_id=DERIBIT_OPT_BTC_USD_240329_80000_P \
--request GET
--header "X-CoinAPI-Key: 73034021-THIS-IS-SAMPLE-KEY"
HTTP Request
GET /v1/metrics/symbol/current
URL Parameters
Parameter | Type | Description |
---|---|---|
metric_id | string | Metric identifier |
exchange_id | string | Exchange identifier (required if no symbol_id provided) |
symbol_id | string | Symbol identifier (required if no exchange_id provided) |
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 symbol-level metrics GET
curl https://rest.coinapi.io/v1/metrics/symbol/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/symbol/history
URL Parameters
Parameter | Type | Description |
---|---|---|
metric_id | string | Metric identifier (required) |
symbol_id | string | Symbol identifier (required) |
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. |