Find answers to commonly asked questions about Codex
I'm not sure how to get started with the API. Where can I get help?
Do you have an explorer for building and testing queries?
How can I find practical examples of Codex queries currently in use?
How do websocket requests work for billing purposes?
Are there any limits on the number of tokens I can generate using the Mutations `createApiTokens` endpoint?
How can I hide my API key from my browser's network tab? Can I use a temporary API key?
How are overages handled for billing? If I have a 1m growth plan, what happens if I go over 1m requests?
What networks does Codex support?
getNetworks
from our API using a free or paid API key at explorer.codex.io.How are token prices computed by Codex?
getTokenPrices
uses an aggregate value across all pairs based on liquidity and volume. We give each pair a weight and then use that to build a confidence score.We're getting a lot of unusable data returned. How can we improve our query results to be more meaningful?
How far back do your historical prices go on Solana?
How can we determine which exchange a token's trading data is coming from for our charts?
filterTokens
query and selecting the first result.How does Codex handle transactions that end up being dropped and never confirmed? Are chart candles corrected afterwards?
Does the API offer a way to get the ATH (all-time high) price of a token?
getBars
for a token and finding the highest value, though it’s not a very efficient method.Are native tokens, such as ETH and SOL, supported?
I’m seeing a discrepancy between how Codex returns prices vs other platforms. Is Codex more accurate?
Do you have aggregated token data for launchpad tokens? We'd like to show a complete chart from creation->graduation->migration.
Why does Codex report liquidity values much lower than other platforms? How can I see the "total" liquidity?
How and when is metadata for tokens obtained?
How is market cap calculated when circulating supply is higher than total supply?
Is historical token supply info available?
How can I view more than 200 results when using a query?
cursor
parameter in order to retrieve additional events when necessary.What is the proper format for the "from" and "to" timestamps?
I'm missing transaction data for a specific block, how can I find this data?
getTokenEvents
, this looks at the top pair when filtering for events, not all pairs. To find additional data, you can use listPairsWithMetadataForToken
to find the coorect pool and filter by volume.Is it possible to fetch pair metadata for multiple pool addresses?
filterPairs
could be used for this.We are calculating market cap with circulating supply * price in the chart, but what if the circulating supply changes? How can we handle this in our charts?
circulatingSupply
through onPairMetadataUpdated
(within enhancedToken
) or just check on each page load. For the most part supplies don’t really change that often though.Is it possible to get sparklines for a past time period?
getBars
and extract the closing values for similar results.How do I obtain historical liquidity data, token prices, and volumes for a pool?
getDetailedPairStats
for the most accurate historical data (getBars
can also be useful here). getTokenPrices
provides a weighted price across all pools, while individual pool prices can vary.What is the purpose of using statsType/TokenPairStatisticsType?
Is it possible to get the creator/dev address for a token?
enhancedToken
which is available for most queries.How can I find the pool with the highest liquidity for a token and get its USD liquidity and price change metrics?
filterPairs
endpoint to find the pool with the highest liquidity for a given token. Example:filterPairs
and filterTokens
, covering multiple timeframes.How does `phrase` search work? I’m searching a token name and getting incorrect results. I’m also using a query that is ranking by `createdAt`.
createdAt
if you’re using phrase
search. Instead, use trendingScore24
or volume
which should return more meaningful results. We index well over 36m tokens so finding exactly what you want from one word phrase search is a difficult task without meaningful ranking/sorting.Why am I not getting expected results when querying swap events for Tron tokens?
TXYZabc123...
0x41abc123...
(use this for Codex API)What's the limit of subscriptions per websocket connection?
Launchpad `Created` events have a 3-4s delay. Is there a faster way to see newly launched tokens?
LaunchpadTokenEventType.Deployed
event instead for faster updates. The difference:Is there a way to update token volume and holders via WebSockets?
onPairMetadataUpdated
for volume updates.onHoldersUpdated
is available for enterprise users, but you can also poll the holders
endpoint.Is there a subscription that sends all token prices rather than just a set?
onPricesUpdated
, and you can make multiple subscriptions. You can also subscribe and unsubscribe from individual tokens without closing the connections.If I'm subscribed to multiple trading pairs and I want to cancel a certain trading pair, what's the method to do so?
I'm getting a 4401 error when connecting to websockets. How can I fix this?
What's the latency for real-time data? For example, retrieveing user token balances after a swap?
Is there a way to prevent our subscription from pausing price updates?
How can I use temporary tokens for websockets?
createApiTokens
then get the token from the response and send it into the Authorization header of subsequent requests:Where can I find info about pushing real-time buys via webhooks?
How many tokens can I add to a webhook?
How is webhook usage measured against my plan's monthly request limit?
What is the purpose of `securityToken` for webhooks?