# Market cap ranking

## What is this endpoint for?

This endpoint aggregates from the [Supply](/rest-api/monitoring-solutions/kaiko-market-explorer/supply-and-market-cap/supply.md) endpoint to provide an aggregated view of supply and market capitalization of the top assets at a specified time.

Data can be aggregated between 5-minute and 30-day intervals; the aggregation considers each 5-minute interval from the [raw supply data](/rest-api/monitoring-solutions/kaiko-market-explorer/supply-and-market-cap/supply.md).

Read our supply and market cap methodology [here](https://resources.kaiko.com/hubfs/Factsheets%2c%20Rulebooks%2c%20Methodologies%20\(Resources\)/Data%20Feeds/Supply%20&%20Market%20Cap%20Methodology.pdf).&#x20;

### Endpoint

{% code overflow="wrap" %}

```http
https://us.market-api.kaiko.io/v2/data/supply.v2/top
```

{% endcode %}

### Parameters

<table><thead><tr><th>Parameter</th><th width="108.0078125">Required</th><th width="318">Description</th><th>Example</th></tr></thead><tbody><tr><td><code>datetime</code></td><td>No</td><td>Time in ISO 8601.<br><br>Default: Current time.</td><td><a data-footnote-ref href="#user-content-fn-1"><code>2023-01-25T00:00:00.00</code></a></td></tr><tr><td><code>interval</code></td><td>No</td><td>The interval parameter is suffixed with <code>m</code>, <code>h</code> or <code>d</code> to specify minutes, hours, or days, respectively.<br><br>Any arbitrary value between five minutes and 30 days can be used.<br><br>Default: <code>1d</code>.</td><td><code>4h</code></td></tr><tr><td><code>count</code></td><td>No</td><td>Number of assets in the result.<br>Ex: <code>10</code> to retrieve the top 10 assets.<br><br>Default: <code>100</code>.</td><td><code>10</code></td></tr></tbody></table>

### Fields

<table><thead><tr><th width="220.19140625">Field</th><th width="228">Description</th><th>Example</th></tr></thead><tbody><tr><td><code>datetime</code></td><td>Timestamp in seconds.</td><td><code>1760918400</code></td></tr><tr><td><code>asset</code></td><td>Asset.</td><td><code>btc</code></td></tr><tr><td><code>rank</code></td><td>The ranking of the asset in terms of market cap.</td><td><code>1</code></td></tr><tr><td><code>total_supply</code></td><td>Total supply.</td><td><code>1.99373e+07</code></td></tr><tr><td><code>circulating_supply</code></td><td>Circulating supply.</td><td><code>1.99373e+07</code></td></tr><tr><td><code>market_cap</code></td><td>Market capitalisation.</td><td><code>2.2094e+12</code></td></tr></tbody></table>

### Request examples

{% tabs %}
{% tab title="cURL" %}
{% code overflow="wrap" %}

```url
curl --compressed -H 'Accept: application/json' -H 'X-Api-Key: <client-api-key>' \
'https://us.market-api.kaiko.io/v2/data/supply.v2/top?datetime=2026-01-01T00:00:00.000Z&count=10&interval=1d'
```

{% endcode %}
{% endtab %}

{% tab title="Python" %}
{% code overflow="wrap" %}

```python
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/supply.v2/top"
# Start of mandatory parameter configuration
mandatory_params = {
    'datetime':'2026-01-01T00:00:00.000Z',
    'count':10,
    'interval':'1d'
}
# End of mandatory parameter configuration
# Start of optional parameter configuration
optional_params = {
    
}
# 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)}")
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Response example

{% code overflow="wrap" %}

```json
{
    "query":
    {
        "datetime": "2026-01-01T00:00:00.000Z",
        "count": 10,
        "interval": "1d"
    },
    "time": "2026-02-10T13:10:35.136Z",
    "timestamp": 1770729035136,
    "data":
    [
        {
            "datetime": 1767225600,
            "asset": "btc",
            "rank": 1,
            "total_supply": 19969814.0625,
            "circulating_supply": 19969814.0625,
            "market_cap": 1754840038141.7961
        },
        {
            "datetime": 1767225600,
            "asset": "eth",
            "rank": 2,
            "total_supply": 120694917.35776222,
            "circulating_supply": 120694917.35776222,
            "market_cap": 359309601750.3176
        },
        {
            "datetime": 1767225600,
            "asset": "usdt",
            "rank": 3,
            "total_supply": 191200669545.90054,
            "circulating_supply": 186408947507.7797,
            "market_cap": 186164285382.73282
        },
        /** Results **/

    ],
    "result": "success"
}
```

{% endcode %}

[^1]:


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kaiko.com/rest-api/monitoring-solutions/kaiko-market-explorer/supply-and-market-cap/market-cap-ranking.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
