> For the complete documentation index, see [llms.txt](https://docs.kaiko.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kaiko.com/rest-api/monitoring-solutions/kaiko-market-explorer/stablecoins.md).

# Stablecoins

## What is this endpoint for?

This endpoint receives information on the trades involving a particular stablecoin. Information includes volumes, trade counts, liquidity, supply and lending rates.\
\
Trade and liquidity data are aggregated across all instruments that include the specified token as a base or quote asset.

### Endpoint

{% code overflow="wrap" %}

```http
https://us.market-api.kaiko.io/v2/data/analytics.v2/stablecoin_metrics
```

{% endcode %}

### Parameters

<table><thead><tr><th>Parameter</th><th width="104">Required</th><th width="318">Description</th><th>Example</th></tr></thead><tbody><tr><td><code>asset</code></td><td>Yes</td><td>The desired stablecoin asset <code>code</code>.<br><br>See <a data-mention href="/pages/5iH1qlIc7aNEOOci4yMw">/pages/5iH1qlIc7aNEOOci4yMw</a></td><td><code>usdc</code></td></tr><tr><td><code>start_time</code></td><td>No</td><td>Starting time in ISO 8601 (inclusive).</td><td><code>2023-01-25T00:00:00.000Z</code></td></tr><tr><td><code>end_time</code></td><td>No</td><td>Ending time in ISO 8601 (exclusive).</td><td><code>2023-01-26T00:00:00.000Z</code></td></tr><tr><td><code>page_size</code></td><td>No</td><td><p>See <a data-mention href="/pages/mP3amLsYqKTsrRBoblxX">/pages/mP3amLsYqKTsrRBoblxX</a><br><br>Minimum: <code>1</code><br>Maximum: <code>30</code></p><p>Default: <code>10</code></p></td><td><code>30</code></td></tr></tbody></table>

### Fields

<table><thead><tr><th width="137">Field</th><th width="115">Category</th><th width="228">Description</th><th>Example</th></tr></thead><tbody><tr><td><code>timestamp</code></td><td>Trading activity</td><td>Timestamp at which the interval begins.</td><td><code>2026-06-18T00:00:00Z</code></td></tr><tr><td><code>interval</code></td><td>Informations</td><td>The aggregation interval.</td><td><code>1d</code></td></tr><tr><td><code>asset</code></td><td>Informations</td><td>The specified asset.</td><td><code>usdc</code></td></tr><tr><td><code>price</code></td><td>Trading activity</td><td>Average price in usd. null when no trades are reported.</td><td><code>0.9997000899730081</code></td></tr><tr><td><code>total_volume_usd</code></td><td>Trading activity</td><td>Total volume in usd traded in the interval. <br><br><code>0</code> when no trades are reported.</td><td><code>796218091.3924453</code></td></tr><tr><td><code>total_trade_count</code></td><td>Trading activity</td><td>The total amount of trades reported during the interval.<br><br><code>0</code> when no trades are reported.</td><td><code>2000097</code></td></tr><tr><td><code>cex_volume_usd</code></td><td>Trading activity</td><td>Total off-chain volume in usd traded in the interval. <br><br><code>0</code> when no trades are reported.</td><td><code>694548754.6376011</code></td></tr><tr><td><code>cex_trade_count</code></td><td>Trading activity</td><td>The total amount of trades reported off-chain during the interval.<br><br><code>0</code> when no trades are reported.</td><td><code>1910473</code></td></tr><tr><td><code>dex_volume_usd</code></td><td>Trading activity</td><td>Total on-chain volume in usd traded in the interval. 0 when no trades are reported.</td><td><code>101669336.75484413</code></td></tr><tr><td><code>dex_trade_count</code></td><td>Trading activity</td><td>The total amount of trades reported on-chain during the interval. <br><br><code>0</code> when no trades are reported.</td><td><code>89624</code></td></tr><tr><td><code>supply_circulating</code></td><td>Supply</td><td>Blockchain total supply.</td><td><code>70051396209.43329</code></td></tr><tr><td><code>market_cap</code></td><td>Supply</td><td>The market cap of the stablecoin across all chains.</td><td><code>70030387093.3053</code></td></tr><tr><td><code>supply_change</code></td><td>Supply</td><td>The change in supply since the last interval.</td><td><code>-317149147.036026</code></td></tr><tr><td><code>avg_weighted_defi_lending_yield</code></td><td>DeFi lending</td><td>Average of all lending yields across DeFi lending protocols, weighted by deposited liquidity.</td><td><code>0.030345222539145098</code></td></tr><tr><td><code>avg_weighted_defi_borrowing_rate</code></td><td>DeFi lending</td><td>Average of all borrowing rate across DeFi lending protocols, weighted by deposited liquidity.</td><td><code>0.03869062376513863</code></td></tr><tr><td><code>total_defi_deposited</code></td><td>DeFi lending</td><td>Total deposited liquidity across DeFi lending protocols.</td><td><code>2321449893.228165</code></td></tr><tr><td><code>total_defi_borrowed</code></td><td>DeFi lending</td><td>Total borrowed liquidity across DeFi lending protocols.</td><td><code>2030740561.2581594</code></td></tr><tr><td><code>aggregated_buy_market_depth_asset</code></td><td>Liquidity information</td><td>Dictionary from 0.1% to 10% market depth.</td><td>See example response below.</td></tr><tr><td><code>aggregated_buy_market_depth_usd</code></td><td>Liquidity information</td><td>Dictionary from 0.1% to 10% market depth.</td><td>See example response below.</td></tr><tr><td><code>aggregated_sell_market_depth_asset</code></td><td>Liquidity information</td><td>Dictionary from 0.1% to 10% market depth.</td><td>See example response below.</td></tr><tr><td><code>aggregated_sell_market_depth_usd</code></td><td>Liquidity information</td><td>Dictionary from 0.1% to 10% market depth.</td><td>See example response below.</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/analytics.v2/stablecoin_metrics?asset=usdc&sort=desc'
```

{% 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/analytics.v2/stablecoin_metrics"
# Start of mandatory parameter configuration
mandatory_params = {
    "asset": "usdc",
}
# End of mandatory parameter configuration
# Start of optional parameter configuration
optional_params = {
    #"start_time": "2024-08-27T13:13:53.441Z",
    #"end_time" : "2024-09-27T13:27:53.441Z",
    #"interval" : "1d",
    "sort":"desc",
}
# 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
{
    "result": "success",
    "time": "2026-06-18T08:06:26Z",
    "timestamp": 1781769986999,
    "query":
    {
        "asset": "usdc",
        "end_time": "0001-01-01T00:00:00Z",
        "interval": "1d",
        "page_size": "10",
        "request_time": "2026-06-18T08:06:26.05808401Z",
        "sort": "desc",
        "start_time": "0001-01-01T00:00:00Z"
    },
    "data":
    [
        {
            "timestamp": "2026-06-18T00:00:00Z",
            "interval": "1d",
            "asset": "usdc",
            "price": 0.9997000899730081,
            "total_volume_usd": 796218091.3924453,
            "total_trade_count": 2000097,
            "cex_volume_usd": 694548754.6376011,
            "cex_trade_count": 1910473,
            "dex_volume_usd": 101669336.75484413,
            "dex_trade_count": 89624,
            "supply_circulating": 70051396209.43329,
            "market_cap": 70030387093.3053,
            "supply_change": -317149147.036026,
            "avg_weighted_defi_lending_yield": 0.030345222539145098,
            "avg_weighted_defi_borrowing_rate": 0.03869062376513863,
            "total_defi_deposited": 2321449893.228165,
            "total_defi_borrowed": 2030740561.2581594,
            "aggregated_buy_market_depth_asset": {
              "bid_volume_0_1": 410009275.917108,
              "bid_volume_0_2": 446428495.09170324,
              "bid_volume_0_5": 470849445.02862155,
              "bid_volume_1": 510576781.129591,
              "bid_volume_2": 549239689.7563232,
              "bid_volume_5": 549239689.7563232,
              "bid_volume_10": 629913837.648892
            },
            "aggregated_buy_market_depth_usd": {
              "bid_volume_0_1": 409964211.9019009,
              "bid_volume_0_2": 446379428.24938184,
              "bid_volume_0_5": 470797694.08590573,
              "bid_volume_1": 510520663.765471,
              "bid_volume_2": 549179322.9617518,
              "bid_volume_5": 599292340.4341673,
              "bid_volume_10": 629844603.9792498
            },
            "aggregated_sell_market_depth_asset": {
              "ask_volume_0_1": 311924899.9123604,
              "ask_volume_0_2": 327273471.225558,
              "ask_volume_0_5": 354299107.9406383,
              "ask_volume_1": 386901697.77497196,
              "ask_volume_2": 407012117.6172724,
              "ask_volume_5": 447660372.5945285,
              "ask_volume_10": 470660113.3308416
            },
            "aggregated_sell_market_depth_usd": {
              "ask_volume_0_1": 311890616.3259667,
              "ask_volume_0_2": 327237500.6815961,
              "ask_volume_0_5": 354260167.01582044,
              "ask_volume_1": 386859173.5077997,
              "ask_volume_2": 406967383.0189715,
              "ask_volume_5": 447611170.35686433,
              "ask_volume_10": 470608383.197524
            }
        },
        /* ALL RESULTS HERE */
    ],
    "continuation_token": "xxx",
    "next_url": "https://us.market-api.kaiko.io/v2/data/analytics.v2/stablecoin_metrics?continuation_token=xxx",
    "links":
    {
        "next": "/v2/data/analytics.v2/stablecoin_metrics?asset=usdc&end_time=2026-06-09T00%3A00%3A00Z&sort=desc"
    },
    "access":
    {
        "access_range":
        {
            "start_timestamp": 1073001600000,
            "end_timestamp": 1861830000000
        },
        "data_range":
        {
            "start_timestamp": "None",
            "end_timestamp": 1861830000000
        }
    }
}
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.kaiko.com/rest-api/monitoring-solutions/kaiko-market-explorer/stablecoins.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
