Prices
Current and historical USD prices for indexed tokens
Three endpoints: current price, price at a past moment, and OHLC time series.
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
| Parameter | Required | Notes |
|---|---|---|
token_address | yes | |
force_refresh | no | true re-fetches from the upstream price feed even if a fresh cached price exists |
1curl 'https://api.tokenkithq.io/api/price/?token_address=0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8' \2 -H 'api-key: YOUR_API_KEY'1{2 "success": true,3 "data": {4 "token_address": "0x053c91253...",5 "price_usd": 1.000123,6 "force_refresh": false7 }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.
| Parameter | Required |
|---|---|
token_address | yes |
at_time | yes (ISO-8601) |
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'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.
| Parameter | Required | Notes |
|---|---|---|
token_address | yes | |
start_time | yes | ISO-8601 |
end_time | no | Default now |
interval | no | One of 1 hour (default), 1 day, 1 week, 1 month. Sub-hour intervals are not supported. |
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'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}