New Customers Are Asking…
I'm not sure how to get started with the API. Where can I get help?
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?
Do you have an explorer for building and testing queries?
How can I find practical examples of Codex queries currently in use?
How can I find practical examples of Codex queries currently in use?
How do websocket requests work for billing purposes?
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?
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 can I hide my API key from my browser's network tab? Can I use a temporary API key?
Docs reference: Short-lived API Keys
SDK Example: https://github.com/Codex-Data/sdk/blob/main/examples/simple/apiKeys.ts
How are overages handled for billing? If I have a 1m growth plan, what happens if I go over 1m requests?
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?
What networks does Codex support?
getNetworks
from our API using a free or paid API key at explorer.codex.io.Understanding Our Data & Coverage…
How are token prices computed by Codex?
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?
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 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?
How can we determine which exchange a token's trading data is coming from for our charts?
filterTokens
query and selecting the first result.Keep in mind that exchanges are added manually. While we strive to keep our listings up to date, we index over 20,000 exhanges, so not all may be included. If you need specific exchange metadata added, feel free to reach out to our team.
How does Codex handle transactions that end up being dropped and never confirmed? Are chart candles corrected afterwards?
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?
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?
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?
I’m seeing a discrepancy between how Codex returns prices vs other platforms. Is Codex more accurate?
You’ll notice that our events are not the same price as the chart; the events are the executed price of that transaction and the chart is the current pool price.
Do you have aggregated token data for launchpad tokens? We'd like to show a complete chart from creation->graduation->migration.
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?
Why does Codex report liquidity values much lower than other platforms? How can I see the "total" liquidity?
The Codex API includes both pooled amounts in its responses if you would like to add both amounts together for your project when displaying liquidity.
How and when is metadata for tokens obtained?
How and when is metadata for tokens obtained?
How is market cap calculated when circulating supply is higher than total supply?
How is market cap calculated when circulating supply is higher than total supply?
Is historical token supply info available?
Is historical token supply info available?
Why do some launchpad tokens appear to be missing data?
Why do some launchpad tokens appear to be missing data?
migrated
/completed
, migratedAt
/completedAt
, migratedSlot
, and graduationPercent
will be absent.Endpoint Queries & Best Practices…
How can I view more than 200 results when using a query?
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?
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?
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?
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?
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?
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?
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?
What is the purpose of using statsType/TokenPairStatisticsType?
- FILTERED – MEV-related events are excluded from the data.
- UNFILTERED – Includes all events, including those related to MEV activity.
Is it possible to get the creator/dev address for a token?
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?
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:Price change metrics are available in both
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`.
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?
Why am I not getting expected results when querying swap events for Tron tokens?
- Base58: T… addresses (what you see on explorers)
- Hex/ERC20: 0x… addresses (what Codex API requires)
- Base58:
TXYZabc123...
- Hex:
0x41abc123...
(use this for Codex API)
WebSockets & Real-Time Data…
What's the limit of subscriptions per websocket connection?
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?
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:Deployed: Sent immediately when token is discovered (minimal latency), includes fundamentals but may lack metadata like images.
Created: Sent after metadata is fetched (3-4s latency), includes complete token information.
For fastest results, you can set up two subscriptions and resolve the models on the frontend - use Deployed for immediate notification and Created for full metadata when available.We have plans to increase speeds (specifically for Solana) but will maintain the same Deployed vs Created flow. The naming will be improved in future versions to make this distinction clearer.
Is there a way to update token volume and holders via WebSockets?
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 theholders
endpoint.
Is there a subscription that sends all token prices rather than just a set?
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?
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?
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?
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?
Is there a way to prevent our subscription from pausing price updates?
How can I use temporary tokens for websockets?
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:Webhooks & Event Monitoring…
Where can I find info about pushing real-time buys via webhooks?
Where can I find info about pushing real-time buys via webhooks?
How many tokens can I add to a webhook?
How many tokens can I add to a webhook?
How is webhook usage measured against my plan's monthly request limit?
How is webhook usage measured against my plan's monthly request limit?
What is the purpose of `securityToken` for webhooks?
What is the purpose of `securityToken` for webhooks?