Get all token prices in one call
Fetch the full token list to get prices for every token on the chain:
The spread between
buyPriceUsd and sellPriceUsd reflects real market liquidity — tighter spreads indicate deeper liquidity.
Get a single token price
If you only need the price for one token:Price polling pattern
Prices are refreshed every ~5 seconds on the backend. For most use cases, polling every 15–30 seconds is sufficient and stays well within the rate limit.priceService.ts
React hook for prices
The browser-facing example assumes your own/api/akka backend proxy attaches the API key. Never expose the partner key through NEXT_PUBLIC_*.
hooks/useTokenPrice.ts
USD value helper
Convert a token amount in wei to its USD value:Use cases
Swap UI
Show USD values next to token amounts so users know the dollar value of
their swap.
Portfolio tracker
Display wallet holdings in USD by multiplying token balances by their
current prices.
Price alerts
Poll prices and trigger notifications when a token crosses a threshold.
Analytics
Track token price movements over time for dashboards and reporting.
Prices are derived from real DEX pool reserves across all indexed markets on
HyperEVM. They reflect actual on-chain liquidity, not centralized exchange
prices.
