LogoLogo
  • Kaiko Knowledge Hub
  • General
    • 👋Introduction
    • 🏎️Getting Started
      • API input
      • API output
        • "taker_side_sell" Explained
        • Market open and close
        • Timestamp
      • Authentication
      • Data versioning
      • Envelope
      • Error codes
      • Pagination
      • Rate limiting
  • Data Feeds
    • Introduction
    • Level 1 & Level 2 Data
      • Level 1 Aggregations
        • Trade Count, OHLCV, & VWAP
          • OHLCV only
          • VWAP only
      • Level 1 Tick-Level
        • All trades
        • Derivative liquidation events
        • Borrows, repayments, liquidations, and withdrawals
      • Level 2 Aggregations
        • Market depth (snapshot)
        • Market depth (aggregation)
        • Price slippage (snapshot)
        • Price slippage (aggregation)
        • Bid-ask spread (aggregation)
        • Tokens in a liquidity pool
          • Tokens in a liquidity pool (Uniswap v3)
        • Interest rates, borrowed and deposited amounts
        • Raw order book snapshot
          • Raw order book snapshot + market depth, bid/ask spread & price slippage
      • Level 2 Tick-Level
        • Mints and burns
    • Reference Data
      • Free tier
        • Asset codes
        • Exchange codes
        • Exchange trading pair codes (instruments)
        • Lending protocol codes
        • Blockchain codes
      • Advanced tier
        • Derivatives contract details
        • Derivatives price details
      • Premium tier
        • Market capitalization and circulating supply (BETA)
  • ANALYTICS Solutions
    • Introduction
    • Kaiko Fair Market Value
      • Kaiko Fair Market Value (Direct prices for high liquidity pairs)
      • Kaiko Fair Market Value (Synthetic prices for low liquidity pairs)
        • Convert with Oanda FX Rates
    • Kaiko Derivatives Risk Indicators
      • Exchange-provided metrics
      • Token-level liquidation volumes
      • Implied volatility calculation - smile
      • Implied volatility calculation - surface
    • Kaiko Portfolio Risk & Performance
      • Value at risk calculation
      • Custom valuation
  • Monitoring Solutions
    • Kaiko Market Explorer
      • Assets
      • Exchanges
    • Kaiko Blockchain Monitoring
      • Ethereum Wallets
        • Balances and transactions
      • Bitcoin Wallets
        • Balances
        • Transaction
      • Solana Wallets
        • Balances and transactions
      • Provenance Wallets
        • Balances and transactions
  • Misc & Legacy endpoints
    • CME
Powered by GitBook
On this page
  • What is this endpoint for?
  • Endpoint
  • Parameters
  • Fields
  • Request examples
  • Response example

Was this helpful?

Export as PDF
  1. Monitoring Solutions
  2. Kaiko Market Explorer

Assets

What is this endpoint for?

This endpoint receives information on the trades involving a particular asset. Information includes volumes, trade counts, liquidity, and supply. All information is broken down by exchange. Trade data is aggregated across all instruments that include the specified token as a base or quote asset, whereas liquidity data is aggregated for the base asset only.

Endpoint

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

Parameters

Parameter
Required
Description
Example

asset

Yes

agix

start_time

Yes

Starting time in ISO 8601 (inclusive).

2023-01-25T00:00:00.000Z

end_time

Yes

Ending time in ISO 8601 (exclusive).

2023-01-26T00:00:00.000Z

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

boolean. If true, returns trading information and market depths detailed by exchanges as well as main holders. Default: false

page_size

No

Default: 10

100

Fields

For any field in the "token information" category, we only cover ERC-20 tokens. Only 50 tokens have been backfilled, but we can add more on demand.

Field
Category
Description
Example

timestamp

Trading activity

Timestamp at which the interval begins.

2023-01-25T00:00:00.000Z

price

Trading activity

Average price in usd. null when no trades are reported.

0.1699233217119519

total_volume_usd

Trading activity

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

30508181.43789653

total_volume_asset

Trading activity

Total volume in number of assets traded in the interval. 0 when no trades are reported.

179540872.49784896

total_trade_count

Trading activity

The total amount of trades reported during the interval. 0 when no trades are reported.

159684

total_off_chain_volume_usd

Trading activity

Total off-chain volume in usd traded in the interval. 0 when no trades are reported.

30038710.382665947

total_off_chain_volume_asset

Trading activity

Total off-chain volume in number of assets traded in the interval. 0 when no trades are reported.

176778031.87949985

total_off_chain_trade_count

Trading activity

The total amount of trades reported off-chain during the interval. 0 when no trades are reported.

159115

trades_data

Trading activity

List of volume in usd, volume in number of assets and total amount of trades by centralized exchange.

[{"exchange": "binc", "volume_usd": 27539301.29722444, "volume_asset": 162068991, "trade_count": 125188}, ...]

total_on_chain_volume_usd

Trading activity

Total on-chain volume in usd traded in the interval. 0 when no trades are reported.

1036710779.1918713

total_on_chain_volume_asset

Trading activity

Total on-chain volume in number of assets traded in the interval. 0 when no trades are reported.

1036710779.1918713

total_on_chain_trade_count

Trading activity

The total amount of trades reported on-chain during the interval. 0 when no trades are reported.

20513

trades_data

Trading activity

List of volume in usd, volume in number of assets and total amount of trades by decentralized exchange.

[{'exchange': 'blc2', 'volume_usd': 673716.6525764248, 'volume_asset': 674153.2032810001, 'trade_count': 129}, ...]

market_depth

Liquidity information

Dictionary from 0.1% to 10% market depth. Base asset aggregation only.

blockchain

Token information

Blockchain name.

ethereum

token_address

Token information

Token address.

0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48

number_of_holders

Token information

Total amount of holders.

1622286

main_holders

Token information

List of addesses holding at least 1% of the total supply and the amounts of tokens.

[{'address': '0x0a59649758aa4d66e25f08dd01271e891fe52199', 'amount': 3262712000, 'percentage': 7.91745}, ...]

total_supply

Token information

Blockchain total supply.

0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48

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/asset_metrics?interval=1d&asset=agix&start_time=2023-01-25T00:00:00.000Z&end_time=2023-01-26T00:00:00.000Z&page_size=100&sources=true'
import http.client
import json

# Enter your Kaiko API Key
api_key = "KAIKO_API_KEY"
api_host = "us.market-api.kaiko.io"
api_base_endpoint = "/v2/data/analytics.v2/asset_metrics"
# Start of mandatory parameter configuration
mandatory_params = {
    "asset": "agix",
    "start_time": "2024-08-27T13:13:53.441Z",
    "end_time" : "2024-09-27T13:27:53.441Z",
    "interval" : "1d",
}
# End of mandatory parameter configuration
# Start of optional parameter configuration
optional_params = {
    "sources": "false",
}
# End of optional parameter configuration
conn = http.client.HTTPSConnection(api_host)
headers = {
    "X-Api-Key": api_key,
    "Accept": "application/json"
}

all_params = {**mandatory_params, **optional_params}

url_params = []
for param, value in all_params.items():
    url_params.append(f"{param}={value}")
url_params = '&'.join(url_params)

endpoint_with_params = f"{api_base_endpoint}?{url_params}"

# Pagination for next pages
all_data = []
next_url = endpoint_with_params
while next_url:
    conn.request("GET", next_url, headers=headers)
    response = conn.getresponse()
    data = json.loads(response.read().decode("utf-8"))
    all_data.extend(data.get("data", []))
    print(f"Fetched {len(data.get('data', []))} datapoints. Total: {len(all_data)}")
    next_url = data.get("next_url", "").replace("https://us.market-api.kaiko.io", "")
    if not next_url:
        break
conn.close()
print(f" datapoints fetched: {(all_data)}")

Response example

{
    "data": [
        {
            "timestamp": "2023-01-25T00:00:00.000Z",
            "price": 0.1699233217119519,
            "total_volume_usd": 30508181.43789653,
            "total_volume_asset": 179540872.49784896,
            "total_trade_count": 159684,
            "off_chain_liquidity_data": {
                "total_off_chain_volume_usd": 30038710.382665947,
                "total_off_chain_volume_asset": 176778031.87949985,
                "total_off_chain_trade_count": 159115,
                "trade_data": [
                    {
                        "exchange": "binc",
                        "volume_usd": 27539301.29722444,
                        "volume_asset": 162068991,
                        "trade_count": 125188
                    },
                    /* ... */
                ],
                "buy_market_depths": [
                    {
                        "exchange": "binc",
                        "volume_assets": {
                            /* ... */
                        },
                        "volume_usds": {
                            /* ... */
                        }
                    }, 
                    /* ... */
                ],
                "sell_market_depths": [
                    {
                        "exchange": "binc",
                        "volume_assets": {
                           /* ... */
                        },
                        "volume_usds": {
                           /* ... */
                        }
                    }, 
                    /* ... */
                ],
                "total_buy_market_depth": {
                    "volume_assets": {
                       /* ... */
                    },
                    "volume_usds": {
                       /* ... */
                    }
                },
                "total_sell_market_depth": {
                    "volume_assets": {
                       /* ... */
                    },
                    "volume_usds": {
                       /* ... */
                    }
                }
            },
            "on_chain_liquidity_data": {
                "total_on_chain_volume_usd": 2762840.6183491,
                "total_on_chain_volume_asset": 2762840.6183491,
                "total_on_chain_trade_count": 569,
                "trades_data": [
                    {
                        "exchange": "usp2",
                        "volume_usd": 327680.4492221988,
                        "volume_asset": 1928401.8575017697,
                        "trade_count": 448
                    },
                    /* ... */
                ],
                "token_information": [
                    {
                        "blockchain": "ethereum",
                        "token_address": "0x5B7533812759B45C2B44C19e320ba2cD2681b542",
                        "nb_of_holders": 38231,
                        "main_holders": [
                            {
                                "address": "0xf977814e90da44bfa03b6295a0616a897441acec",
                                "amount": 250774980,
                                "percentage": 22.61839
                            },
                            {
                                "address": "0x13e1367a455c45aa736d7ff2c5656ba2bd05ad46",
                                "amount": 112149660,
                                "percentage": 10.11522
                            }, 
                            /* ... */
                        ],
                        "total_supply": 1108721700
                    }
                ]
            }
        }
    ]
}
PreviousKaiko Market ExplorerNextExchanges

Last updated 2 months ago

Was this helpful?

The desired asset code. See

See Minimum: 1 Maximum: 100

Information from this endpoint can be accessed through Google BigQuery. To get started, read our .

Asset codes
Pagination
guide