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 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

VariableDescription
asset_idThe identifier for the asset.
exchange_idThe identifier for the exchange.
metric_idThe identifier for the metric.
symbol_idThe identifier for the symbol.
chain_idThe identifier for blockchain.
network_idThe identifier for the nerwork.
min_timeTime of first occurence
max_timeTime 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

ParameterTypeDescription
exchange_idstringOur 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

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.

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

ParameterTypeDescription
asset_idstringAsset 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

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.

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

ParameterTypeDescription
symbol_idstringSymbol 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

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 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

ParameterTypeDescription
metric_idstringMetric identifier (required)
symbol_idstringSymbol identifier (required if no asset_id or exchange_id is provided)
asset_idstringAsset identifier (required if no symbol_id or exchange_id is provided)
exchange_idstringExchange identifier (required if no symbol_id or asset_id is provided)
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.

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

ParameterTypeDescription
metric_idstringMetric identifier (required)
exchange_idstringExchange identifier (required if no symbol_id or asset_id is provided)
symbol_idstringSymbol identifier (required if no asset_id or exchange_id is provided)
asset_idstringAsset identifier (required if no symbol_id or exchange_id is provided)
groupbystringGrouping filter value (required, valid values: symbol_id, asset_id, exchange_id, metric_id)
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:

{
  "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

VariableDescription
sereies_labelGroup values labels
rowsOutput values of given metric, by chosen time interval
Last updated on August 21, 2023

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