Prices

Current and historical USD prices for indexed tokens

Three endpoints: current price, price at a past moment, and OHLC time series.

Info

We don't price every token. TokenKit's price feed covers the majors (USDC, USDT, ETH, STRK, and friends). Long-tail tokens often come back as null. Always handle null gracefully - show "untracked" or hide the row instead of displaying $0.

GET /api/price/ - current price

ParameterRequiredNotes
token_addressyes
force_refreshnotrue re-fetches from the upstream price feed even if a fresh cached price exists
Code
bash
1curl 'https://api.tokenkithq.io/api/price/?token_address=0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8' \
2 -H 'api-key: YOUR_API_KEY'
Code
json
1{
2 "success": true,
3 "data": {
4 "token_address": "0x053c91253...",
5 "price_usd": 1.000123,
6 "force_refresh": false
7 }
8}

price_usd is returned as a JSON number (not a string). For untracked tokens, the upstream service returns 0 - distinguish "untracked" from "zero price" by checking whether the token is in the price feed (see Callout above).

How the current price is picked

The feed is Dexscreener's list of every pool the token is in, on either side.

  • The price comes from the most liquid pool where the token is the base token (that pool's priceUsd).
  • If the token only ever appears as a pool's quote token (USDT on Starknet today), its price is derived from the most liquid such pool as priceUsd ÷ priceNative. That's the base token's USD price divided by its price in this token.
  • Pools with less than $10,000 of liquidity are ignored, both for direct and for derived prices. A thin pool is cheap to push to any price.
  • If Dexscreener lists the token but no pool qualifies, the price falls back to Pragma's on-chain median for the major tokens Pragma covers (ETH, STRK, WBTC, USDC, USDC.e, USDT, DAI, LORDS), if it's at most 2 hours old. DAI is priced this way today, because its Starknet pools are thin.
  • If neither works, the token has no price (0). A price stored earlier is cleared, not kept as "last known".
  • When the feed itself is unreachable, the last stored price is kept.

Before November 2026, the first pool in the list was used as-is. A token that only appeared as a quote token was given the other token's price, and priceNative (a price in the quote token, not USD) was used as a USD fallback. Prices for those tokens correct themselves on their next refresh. Historical snapshots taken before the fix aren't rewritten.

GET /api/price-at/ - price at a specific time

Gives you the most recent price entry at or before at_time.

ParameterRequired
token_addressyes
at_timeyes (ISO-8601)
Code
bash
1curl 'https://api.tokenkithq.io/api/price-at/?token_address=0x053c91253...&at_time=2026-01-25T00:00:00Z' \
2 -H 'api-key: YOUR_API_KEY'
Code
json
1{
2 "success": true,
3 "data": {
4 "token_address": "0x053c91253...",
5 "price_usd": 1.000123,
6 "at_time": "2026-01-25T00:00:00+00:00"
7 }
8}

GET /api/price-history/ - OHLC time series

Open / high / low / close per bucket. Drop straight into a candlestick chart.

ParameterRequiredNotes
token_addressyes
start_timeyesISO-8601
end_timenoDefault now
intervalnoOne of 1 hour (default), 1 day, 1 week, 1 month. Sub-hour intervals are not supported.
Code
bash
1curl 'https://api.tokenkithq.io/api/price-history/?token_address=0x053c91253...&start_time=2026-01-20T00:00:00Z&interval=1+day' \
2 -H 'api-key: YOUR_API_KEY'
Code
json
1{
2 "success": true,
3 "count": 5,
4 "token_address": "0x053c91253...",
5 "interval": "1 day",
6 "start_time": "2026-01-20T00:00:00+00:00",
7 "end_time": "2026-01-25T00:00:00+00:00",
8 "data": [
9 {
10 "timestamp": "2026-01-20T00:00:00Z",
11 "avg_price": "1.000123",
12 "min_price": "0.999800",
13 "max_price": "1.000451",
14 "open_price": "1.000200",
15 "close_price": "1.000087"
16 }
17 ]
18}
Tip
For a candlestick chart, use `open_price` and `close_price` for the body and `min_price` / `max_price` for the wicks. `avg_price` is handy for trendlines but not standard OHLC.

See also

  • Tokens - the current_price_usd field on token objects comes from the same feed
  • Portfolio - applies prices to balances for total USD value