Exchanges

What is this endpoint for?

This endpoint helps inform exchange analysis with data such as total volume in USD, trades, the number of listed assets, and volume proportions by asset. The data aggregates all instruments available on the requested exchange. Only base assets are taken into consideration.

Endpoint

https://us.market-api.kaiko.io/v2/data/analytics.v2/exchange_metrics

Parameters

ParameterRequiredDescriptionExample

exchange

Yes

cbse

start_time

Yes

Starting time in ISO 8601 (inclusive). First time at which we want to have metrics.

2023-11-29T14:00:00.0000000Z

end_time

Yes

Ending time in ISO 8601 (exclusive). Last time at which we want to have exchange metrics.

2023-11-29T15:00:00.0000000Z

interval

Yes

The interval parameter is suffixed with h or d to specify hours or days, respectively. Any arbitrary value between one second and one day can be used, as long as it sums up to a maximum of 1 day. The suffixes are h (hour) and d (day). Default: 1h.

1h

sources

No

If true, returns trading information detailed by pair. Default: false

page_size

No

See Pagination Minimum: 1 Maximum: 100

Default: 10

100

sort

No

If asc, sort time-series in ascending. If desc, sort time-series in descending. Default: desc

100

Fields

FieldCategoryDescriptionExample

timestamp

Trading activity

Timestamp at which the interval begins.

2023-11-29T14:00:00.000Z

total_volume_usd

Trading activity

Total volume in USD traded in the interval. 0 when no trades are reported.

139803179.89191553

total_trade_count

Trading activity

Total trade count in the interval. 0 when no trades are reported.

121748

nb_listed_assets

Trading activity

Number of listed assets in the interval. 0 when no trades are reported.

235

nb_listed_pairs

Trading activity

Number of listed pairs in the interval. 0 when no trades are reported.

379

asset_volumes

Trading activity

Trading information details by asset.

[{"asset_code": "btc", "asset_trade_count": 22772, "asset_total_volume_usd": 61612344.01769975, "asset_price_usd": 37994.62623807689, "asset_contribution": 0.4407077440250888, "pairs_volumes": []]}, ...]

asset_code

Trading activity

Asset code.

btc

asset_trade_count

Trading activity

Trade count in the interval by asset. 0 when no trades are reported.

159115

asset_total_volume_usd

Trading activity

Volume in USD traded in the interval by asset. 0 when no trades are reported.

61612344.01769975

asset_price_usd

Trading activity

Asset cross-price in USD used to compute volume in USD.

37994.62623807689

asset_contribution

Trading activity

Asset volume percentage over total volume.

0.4407077440250888

pairs_volumes

Trading activity

Trading information details by pair.

[{"pair_code": "btc-usd", "pair_trade_count": 19193, "pair_volume_usd": 57484171.99063697, "pair_contribution": 0.9329976469345679}, ...]

pair_code

Trading activity

Pair code.

btc-usd

pair_trade_count

Trading activity

Trade count in the interval by pair. 0 when no trades are reported.

1686

pair_volume_usd

Trading activity

Volume in USD traded in the interval by pair. 0 when no trades are reported.

57484171.99063697

pair_contribution

Trading activity

Pair volume percentage over asset volume.

0.9329976469345679

Request examples

curl --compressed -H 'Accept: application/json' -H 'X-Api-Key: <client-api-key>' \
'https://us.market-api.kaiko.io/v2/data/analytics.v2/exchange_metrics?exchange=cbse&sort=desc&sources=true&start_time=2023-11-29T14:00:00.0000000Z&end_time=2023-11-29T15:00:00.0000000Z&interval=1h&page_size=100'

Response example

{
    "data": [
        {
            "timestamp": "2023-11-29T14:00:00.000Z",
            "total_volume_usd": 139803179.89191553,
            "total_trade_count": 121748,
            "nb_listed_assets": 235,
            "nb_listed_pairs": 379,
            "assets_volumes": [
                {
                  "asset_code": "btc",
                  "asset_trade_count": 22772,
                  "asset_total_volume_usd": 61612344.01769975,
                  "asset_price_usd": 37994.62623807689,
                  "asset_contribution": 0.4407077440250888,
                  "pairs_volumes": [
                        {
                          "pair_code": "btc-usd",
                          "pair_trade_count": 19193,
                          "pair_volume_usd": 57484171.99063697,
                          "pair_contribution": 0.9329976469345679
                        },
                        {
                          "pair_code": "btc-eur",
                          "pair_trade_count": 1686,
                          "pair_volume_usd": 1722929.4947314486,
                          "pair_contribution": 0.027964030945430225
                        },
                        {
                          "pair_code": "btc-usdt",
                          "pair_trade_count": 807,
                          "pair_volume_usd": 1590807.5262940996,
                          "pair_contribution": 0.02581962351305931
                        },
                        {
                          "pair_code": "btc-gbp",
                          "pair_trade_count": 1086,
                          "pair_volume_usd": 814435.0060372388,
                          "pair_contribution": 0.013218698606942646
                        }
                    ]
                },
              /* ... */
            ]
        },
        /* ... */
    ]  
}

Last updated