Dexscreener

Dexscreener API Token Lookup and Pool Data

Dexscreener provides a market-data API that resolves a token address and chain identifier into liquidity-pool records. Its token-pool lookup retrieves markets associated with that token on the selected chain. Each record describes a specific pool, including token identities and available market measurements. A successful response does not guarantee that USD price or liquidity values exist. An integration therefore needs to match the returned tokens and preserve unavailable values before presenting a market record that its users can interpret.

Key takeaway: A pool with a usable USD price and missing liquidity can support price display while failing a comparison that requires liquidity.

Token Input and Pool Identity

A token-to-pool lookup starts with the chain identifier and token address that belong to the same blockchain. A token address identifies an asset; a pair address identifies a particular pool.

Request Inputs

The token-pairs v1 resource accepts chainId and tokenAddress for a token’s associated pools. Keep the address intact and retain its chain throughout storage and display. A symbol cannot replace these identifiers. The response concerns the service’s indexed markets, so a lookup does not establish that every possible pool exists in the returned collection. An empty collection supplies no matching market record; it does not establish that the token itself cannot exist.

Matched Pool Records

A completed HTTP request supplies a response; an application needs matching pool records before it can present a market. Match the requested address against the returned baseToken and quoteToken addresses. Retain the chain, exchange identifier, and pairAddress alongside the measurements. Those identifiers let the application update the appropriate pool record from later responses. If essential identity fields are missing, keep that record outside automatic matching. Distinct pool addresses remain separate records, even when their token symbols match.

Can Pool Data Predict a Swap’s Final Output?

Pool data cannot determine a swap’s final output because the requested trade introduces conditions beyond a market snapshot. A trade quote needs the amount being exchanged and the route that will execute it. Exchange fees and market changes can alter the amount received. Reported liquidity also does not establish whether a particular token transfer will succeed. These GET resources retrieve market information; they do not submit a swap or authorize token spending.

Multiplying the priced token’s quantity by its USD unit price gives an indicative valuation. That arithmetic excludes trade-size effects and execution fees.

How Should a Client Handle Null Market Values?

A client should preserve null and missing fields as unavailable data, then decide whether the remaining record serves its task.

Unavailable Measurements

The pair schema permits priceUsd to be null. The liquidity object can also be null, so checking the object comes before reading its USD measurement. An absent key needs an unavailable state too. Substituting zero creates a false measurement. A display may retain an identifiable pool while leaving its price blank. A filter that requires a liquidity measurement cannot classify that pool until the relevant value exists.

Response Containers and Numeric Types

The token-pool and token-batch resources return arrays, while pair-address and search resources place records inside a pairs property. An endpoint-specific parser can convert those containers into a common internal collection. The priceUsd and priceNative fields use strings, so usable values need deliberate conversion before arithmetic. Keep failed requests separate from successfully parsed empty collections. Missing measurements, an unexpected response shape, and an HTTP failure require different handling because they describe different problems.

A Hypothetical Preview Before Any Swap

A hypothetical application requires both USD price and USD liquidity before including a pool in its liquidity-filtered comparison. Assume a reader supplies a valid token address and matching chain identifier. The lookup returns a matching pool with a usable USD price and null liquidity. The reader wants to inspect the market before authorizing a trade, so a read-only token-pool request fits the task.

Dexscreener - A Hypothetical Preview Before Any Swap - diagram

Open full-size image

The returned chain and token addresses associate the record with the requested token. Null liquidity fails the application’s comparison rule, so the pool stays outside its ranked results. The preview retains the available price and pool identity, with liquidity marked as unavailable. No trade authorization forms part of this retrieval. If a later response supplies usable liquidity, the application can reconsider the same pool under its existing rule.

Base and Quote Sides in Market Measurements

Price interpretation starts with the token that a measurement describes, while activity comparisons need matching observation windows. The base and quote token objects distinguish the sides of a pair. Read both token identities before assigning a pool measurement to the queried token. Keep each measurement attached to the side that it describes. Volume, transaction counts, and price changes belong to their respective time windows. Comparing unmatched windows can make unrelated activity look comparable. These distinctions also matter when the data feeds price alerts or a monitor for new pairs.

Search, Pair Refreshes, and Token Batches

The useful lookup resource changes with the identifier available and the scope of the request. Search finds pairs matching a query. A token lookup retrieves associated pools, while a pair-address lookup targets a known market. Saving a pool’s chain and pair address preserves that selection for later requests. Searching again by symbol can return a different collection and should not silently replace the selected pool.

The tokens v1 resource accepts comma-separated token addresses within a single chain. Batches must respect the resource’s address cap. Group the returned pool records by their token identities, without assuming that a result occupies the same position as its input. A token can have several associated pools, so the address count does not define the response’s record count.

Repeated GET requests refresh the application’s observations. A scheduler should respect the applicable request limit and avoid bursts from overlapping refresh jobs. Keep request limits and batch size configurable because service policies can change. Store retrieval time separately from any market timestamp; a local download time records when the application received data.

A cached response can keep a display populated during a refresh. Show its age and retain the refresh failure when a newer request fails. A changed chain, token, or pair requires a corresponding change in the cache key. Older data for one market must not become the displayed observation for another.

Useful questions about Dexscreener

Does Reading Pool Data Require a Wallet Signature?

Reading the public pool-data resources uses an HTTP GET request without authorizing a blockchain transaction. A chain identifier and token or pair address identify the market being requested. These retrievals do not spend tokens or incur blockchain gas, and a recovery phrase has no place in the request.

Why Can Decimal Conversion Change a Returned Price?

Converting a decimal price string into binary floating-point can introduce rounding differences. Keep the original string when exact display matters, and use decimal arithmetic when calculations require decimal precision. Formatting a parsed value back into text does not necessarily recover digits that a previous conversion discarded.

Can I Reconstruct Historical Candles From a Pool Snapshot?

A pool snapshot does not contain enough information to reconstruct historical candlesticks. Current price, aggregate volume, and percentage changes do not reveal the complete price path needed for each candle’s open, high, low, and close. Saving periodic snapshots creates sampled observations, which can miss movements between requests.

How Can a Client Deduplicate Repeated Pool Records?

Use the returned chain identifier and pair address together to identify a pool record. Preserve separate pools that happen to share a symbol or token address. When requests overlap, merging records under that combined identity avoids duplicate rows without combining measurements from different markets or counting the same pool repeatedly.

When a Polling Request Returns HTTP 429, How Should the Client Respond?

HTTP 429 signals that the client has sent too many requests within the server’s rate-limiting window. If the response includes a Retry-After header, respect it before retrying. Otherwise, use a bounded backoff policy and reduce request pressure. Rate-limit responses do not establish that the requested pool has disappeared.

Are Profile Links Returned by the API Safe to Open Automatically?

A link in token metadata does not establish that its destination is trustworthy. Treat descriptions and links as external content, escape text before inserting it into HTML, and validate link schemes before making them clickable. A profile link also does not replace the chain and token address as market identity.

Is Caching API Responses Enough to Permit Reselling a Data Feed?

Caching API responses does not grant permission to resell a data feed. API use remains subject to licensing, redistribution, and competition restrictions. Receiving or storing the data does not transfer ownership rights. Permission for some commercial uses does not authorize every form of resale or third-party API access.

Updated