State price

What is this endpoint for?

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.

  • 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.

  • Supported Protocols: Uniswap v2, Uniswap v3, Balancer v2, Curve v1, Curve v2

Endpoint

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

Parameters

Parameter
Description
Examples
Mandatory?

asset

Asset requested

wsteth

start_time

Starting time in ISO 8601 (inclusive).

2025-01-07T10:48:59.528Z

end_time

Ending time in ISO 8601 (exclusive).

2025-01-08T10:48:59.528Z

page_size

Number of data points to return data for. (default: 1000, max: 10000). See Pagination

1000

sort

Return the data in ascending (asc) or descending (desc) order. Default results will return in descending order.

asc

Fields

Field
Description

datetime

The timestamp indicates when the data was processed. One data point will be published per second.

base

Base asset requested.

lst_Quote

LST quote token if relevant, otherwise field will return empty.

aggregated_Price_Usd

The state price aggregated over several pools, denominated in USD.

aggregated_Price_lst

The state price aggregated over multiple pools, denominated in ETH. This field will return empty for LST tokens.

last_known_blocks

List of last read blocks per blockchain.

last_known_blocks\blockchain

Name of the blockchain.

last_known_blocks\block_number

The last block number processed on the associated blockchain.

pool_data

A list of state price data and additional information per pool.

pool_data\pool_address

The pool address.

pool_data\blockchain

Name of the blockchain.

pool_data\exchange

Protocol’s code. See Exchanges.

pool_data\quote

Quote asset in of the pool.

pool_data\state_price

Last state price extracted from the pool.

pool_data\rate_usd

Conversion quote rate in usd.

pool_data\trading_volume_weight

The weight calculated based on trading volumes that is used for the associated pool to determine the aggregated state price."

pool_data\market_depth_weight

The weight calculated based on market depth that is used for the associated pool to determine the aggregated state price."

pool_data\market_depth_m1_quote

-1% market depth (amount of quote token).

pool_data\market_depth_m1_usd

-1% USD valued market depth.

pool_data\market_depth_m1_base

+1% market depth (amount of base token).

pool_data\market_depth_m1_usd

+1% USD valued market depth.

pool_data\last_block_volume

Trading volume extracted from the last known block.

pool_data\last_aggregated_volume

Aggregated trading volume on the associated pool from the past 7 days. This volume is updated every 30 seconds.

Response Example

{
            "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"
                },
            ]
        }

Last updated

Was this helpful?