Metrics

Metrics are quantitative measurements used to evaluate the performance and activity of cryptocurrency exchanges. These metrics include:

  1. Trading Volume: The total amount of cryptocurrency traded on an exchange within a specific time period, indicating liquidity and activity.
  2. Market Depth: The level of buy and sell orders at different price levels, providing insights into liquidity and potential price impact.
  3. Order Book: A record of outstanding buy and sell orders for a cryptocurrency, reflecting supply and demand dynamics.
  4. Spread: The difference between the highest bid and lowest ask prices, indicating liquidity and trading costs.
  5. Price Charts: Visual representations of cryptocurrency price movements over time, helping identify trends and inform trading decisions.
  6. Market Cap: The total value of a cryptocurrency calculated by its price multiplied by circulating supply, reflecting relative size and value.
  7. Trading Pairs: Combinations of cryptocurrencies available for trading, including volume, price, and spread for each pair.
  8. User Metrics: Data on active users, new registrations, user retention, and engagement, indicating platform popularity and growth.
  9. Trading Fees: Fees charged for executing trades, including fee structure, discounts, and revenue generated by the exchange.
  10. 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

VariableDescription
metric_idMetric identifier
descriptionMetric 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

ParameterTypeDescription
metric_idstringMetric identifier
exchange_idstringExchange identifier (required)

Output variables

VariableDescription
exchange_idThe identifier for the exchange.
metric_idThe 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

ParameterTypeDescription
exchange_idstringOur identifier of the exchange (required)
metric_idstringThe 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

VariableDescription
entry_timeThe entry time for the data point.
recv_timeThe received time for the data point.
exchange_idThe identifier for the exchange.
metric_idThe identifier for the metric.
value_decimalThe decimal value for the metric.
value_textThe textual representation of the value for the metric.
value_timeThe 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

ParameterTypeDescription
metric_idstringMetric identifier (required)
exchange_idstringExchange identifier (required)
time_starttimestringStarting time in ISO 8601
time_endtimestringEnding time in ISO 8601
time_formatstringIf set, returned values will be in unix timestamp format (valid values: unix_sec, unix_millisec, unix_microsec, unix_nanosec)
period_idstringIdentifier of requested timeseries period (e.g. 5SEC or 2MTH, full list here), default value is 1SEC
limitintAmount 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

VariableDescription
time_period_startThe start time of the time period.
time_period_endThe end time of the time period.
time_openThe first data time of the time period.
time_closeThe last data time of the time period.
firstThe opening value.
lastThe closing value.
minThe lowest value during the time period.
maxThe highest value during the time period.
countThe number of items during the time period.
sumThe 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

ParameterTypeDescription
metric_idstringMetric identifier
exchange_idstringExchange identifier (required if no symbol_id provided)
symbol_idstringSymbol identifier (required if no exchange_id provided)

Output variables

VariableDescription
exchange_idThe identifier for the exchange.
metric_idThe identifier for the metric.
symbol_idThe 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

ParameterTypeDescription
metric_idstringMetric identifier
exchange_idstringExchange identifier (required if no symbol_id provided)
symbol_idstringSymbol 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

VariableDescription
entry_timeThe entry time for the data point.
recv_timeThe received time for the data point.
exchange_idThe identifier for the exchange.
asset_idThe identifier for the asset.
symbol_idThe identifier for the symbol.
metric_idThe identifier for the metric.
value_decimalThe decimal value for the metric.
value_textThe textual representation of the value for the metric.
value_timeThe 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

ParameterTypeDescription
metric_idstringMetric identifier (required)
symbol_idstringSymbol identifier (required)
time_starttimestringStarting time in ISO 8601
time_endtimestringEnding time in ISO 8601
time_formatstringIf set, returned values will be in unix timestamp format (valid values: unix_sec, unix_millisec, unix_microsec, unix_nanosec)
period_idstringIdentifier of requested timeseries period (e.g. 5SEC or 2MTH, full list here), default value is 1SEC
limitintAmount 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

VariableDescription
time_period_startThe start time of the time period.
time_period_endThe end time of the time period.
time_openThe first data time of the time period.
time_closeThe last data time of the time period.
firstThe opening value.
lastThe closing value.
minThe lowest value during the time period.
maxThe highest value during the time period.
countThe number of items during the time period.
sumThe sum of the values during the time period.
Last updated on October 4, 2023

Copyright 2022 COINAPI LTD or its affiliates. All rights reserved.
StatusPage: