Skip to main content

Query Prices

There are multiple ways to query token prices on Kroko DEX, depending on your use case. The most accurate way to get a price is to request a swap quote. This considers all available routes and gives you the actual execution price.
Best for: Real-time swap pricing, showing users what they’ll receive.
The execution price varies with trade size due to price impact. For reference prices, use a small amount.

Method 2: Price API

Get the price directly without specifying an amount:
Best for: Dashboard displays, portfolio valuation.

Method 3: On-Chain (V2)

Read pool reserves directly for V2 pools:
Best for: Trustless on-chain price reads, oracle-like use cases.

Method 4: On-Chain (V3)

Read the current price from a V3 pool:
Best for: V3-specific price feeds, tick-level precision.

Historical Prices

For historical K-line data:

Comparison