# State price

## What is this endpoint for? <a href="#what-is-this-endpoint-for" id="what-is-this-endpoint-for"></a>

This endpoint should be used when there isn’t enough liquidity to produce a direct or synthetic price. Especially useful for DeFi-only assets, state price derives a price by analyzing the real-time state of liquidity pools for the selected asset, inspecting the pools’ reserves, balances, and recent flow to infer a-price consistent with current market conditions.\
\
The data includes the calculated state price and the trading volume from the associated block within each pool, expressed in USD.&#x20;

* Data is only available for the last 24 hours.
* Only the largest eligible pools, (which together account for 95% of the total aggregated volume over the past 7 days) are displayed in this endpoint.
* Pool eligibility depends on the pairing: non-LST tokens must be paired with USDT, USDC, or wETH, while LST tokens must be paired with wETH.&#x20;
* **Supported Protocols:**  Uniswap v2, Uniswap v3, Balancer v2, Curve v1, Curve v2

## Endpoint&#x20;

<https://us.market-api.kaiko.io/v2/data/state_price.v1/aggregation/{asset}><br>

## Parameters

<table><thead><tr><th width="184">Parameter</th><th width="323.71875">Description</th><th width="245.8375244140625">Examples</th><th data-type="checkbox">Mandatory?</th></tr></thead><tbody><tr><td><code>asset</code></td><td>Asset requested</td><td><code>wsteth</code> </td><td>true</td></tr><tr><td><code>start_time</code></td><td>Starting time in ISO 8601 (inclusive).</td><td>2025-01-07T10:48:59.528Z</td><td>false</td></tr><tr><td><code>end_time</code></td><td>Ending time in ISO 8601 (exclusive).</td><td>2025-01-08T10:48:59.528Z</td><td>false</td></tr><tr><td><code>page_size</code></td><td>Number of data points to return data for. (default: 1000, max: 10000). See <a href="https://docs.kaiko.com/kaiko-rest-api/general/getting-started/pagination">Pagination</a></td><td>1000</td><td>false</td></tr><tr><td><code>sort</code></td><td>Return the data in ascending (asc) or descending (desc) order. Default results will return in descending order.</td><td>asc</td><td>false</td></tr></tbody></table>

## Fields

<table><thead><tr><th width="317.637451171875">Field</th><th width="537">Description</th></tr></thead><tbody><tr><td><code>datetime</code></td><td>The timestamp indicates when the data was processed. One data point will be published per second.</td></tr><tr><td><code>base</code></td><td>Base asset requested.</td></tr><tr><td><code>lst_Quote</code></td><td>LST quote token if relevant, otherwise field will return empty.</td></tr><tr><td><code>aggregated_Price_Usd</code></td><td>The state price aggregated over several pools, denominated in USD.</td></tr><tr><td><code>aggregated_Price_lst</code></td><td>The state price aggregated over multiple pools, denominated in ETH.<br><br>This field will return empty for LST tokens.</td></tr><tr><td><code>last_known_blocks</code></td><td>List of last read blocks per blockchain.</td></tr><tr><td><code>last_known_blocks\blockchain</code>  </td><td>Name of the blockchain.</td></tr><tr><td><code>last_known_blocks\block_number</code></td><td>The last block number processed on the associated blockchain.</td></tr><tr><td><code>pool_data</code></td><td>A list of state price data and additional information per pool.</td></tr><tr><td><code>pool_data\pool_address</code> </td><td>The pool address.</td></tr><tr><td><code>pool_data\blockchain</code> </td><td>Name of the blockchain.</td></tr><tr><td><code>pool_data\exchange</code> </td><td>Protocol’s code. See <a href="https://docs.kaiko.com/reference-api/reference-data-api/exchanges">Exchanges</a>.</td></tr><tr><td><code>pool_data\quote</code> </td><td>Quote asset in of the pool.</td></tr><tr><td><code>pool_data\state_price</code> </td><td>Last state price extracted from the pool.</td></tr><tr><td><code>pool_data\rate_usd</code> </td><td>Conversion quote rate in usd.</td></tr><tr><td><code>pool_data\trading_volume_weight</code> </td><td>The weight calculated based on trading volumes that is used for the associated pool to determine the aggregated state price."</td></tr><tr><td><code>pool_data\market_depth_weight</code> </td><td>The weight calculated based on market depth that is used for the associated pool to determine the aggregated state price."</td></tr><tr><td><code>pool_data\market_depth_m1_quote</code> </td><td>-1% market depth (amount of quote token).</td></tr><tr><td><code>pool_data\market_depth_m1_usd</code> </td><td>-1% USD valued market depth.</td></tr><tr><td><code>pool_data\market_depth_m1_base</code> </td><td>+1% market depth (amount of base token).</td></tr><tr><td><code>pool_data\market_depth_m1_usd</code> </td><td>+1% USD valued market depth.</td></tr><tr><td><code>pool_data\last_block_volume</code> </td><td>Trading volume extracted from the last known block.</td></tr><tr><td><code>pool_data\last_aggregated_volume</code> </td><td>Aggregated trading volume on the associated pool from the past 7 days. This volume is updated every 30 seconds.</td></tr></tbody></table>

## Response Example

```json
{
            "datetime": "2025-01-08T10:48:58.002432007Z",
            "base": "wsteth",
            "lst_quote": "weth",
            "aggregated_price_usd": "3985.5509347142515",
            "aggregated_price_lst": "1.1892311869094472",
            "last_known_blocks": [
                {
                    "blockchain": "ethereum",
                    "block_number": 21579259
                }
            ],
            "pool_data": [
                {
                    "pool_address": "0x93d199263632a4ef4bb438f1feb99e57b4b5f0bd",
                    "blockchain": "ethereum",
                    "exchange": "blc2",
                    "quote": "weth",
                    "state_price": "1.1892290818833757",
                    "rate_usd": 3351.367655495001,
                    "trading_volume_weight": "0.642086707107293",
                    "market_depth_weight": "0.07335226235574528",
                    "market_depth_m1_quote": "19.395711139793057",
                    "market_depth_m1_usd": "65002.15896922653",
                    "market_depth_p1_base": "108.00101402959565",
                    "market_depth_p1_usd": "430442.780499229",
                    "last_block_volume": "0",
                    "last_aggregated_volume": "28000.703235419944"
                },
                {
                    "pool_address": "0x109830a1aaad605bbf02a9dfa7b0b92ec2fb7daa",
                    "blockchain": "ethereum",
                    "exchange": "usp3",
                    "quote": "weth",
                    "state_price": "1.1892322697310238",
                    "rate_usd": 3351.367655495001,
                    "trading_volume_weight": "0.7417266504989011",
                    "market_depth_weight": "1.0729150777662464",
                    "market_depth_m1_quote": "2603.753585841387",
                    "market_depth_m1_usd": "8726135.550467951",
                    "market_depth_p1_base": "952.8608347165278",
                    "market_depth_p1_usd": "3797678.8483253857",
                    "last_block_volume": "0",
                    "last_aggregated_volume": "34687.298752135"
                },
            ]
        }
```


---

# 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/analytics-solutions/kaiko-fair-market-value/emerging-assets/state-price.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.
