DEXScreener API for Solana: Pairs, Trades, OHLC and Live Streams
DEX Screener publishes a public REST API. Its reference lists pair, token and search endpoints at 300 requests a minute and profile, boost and ad endpoints at 60 a minute, all returning the current state of a pair or token. It has no candle, OHLC or historical endpoint. Its WebSocket API streams token profiles, boosts, community takeovers and ads, not pair prices or trades. If that is enough, use it.
This page is for the rest: every number on the DEX Screener Solana dashboard, plus the history behind it, over Bitquery GraphQL, WebSocket subscriptions and Kafka streams. Live trades per pair, token prices, OHLC candles at any interval, buy and sell volume with makers, buyers and sellers, top pairs by activity, and trader profit and loss, across Raydium, Orca, Jupiter, PumpSwap and the other Solana DEXs. Every query below runs as written in the Bitquery IDE with a free trial key.
ProductUsing this in production? See the Solana DEX API page for plans, free trial and enterprise delivery options.
What the official DEX Screener API covers
| Endpoint group in the DEX Screener reference | Rate limit | Returns |
|---|---|---|
| Pairs by chain and pair address, token pairs, tokens by address, search | 300 requests a minute | Current price, liquidity, volume and transaction counts for a pair or token |
| Token profiles, boosts, community takeovers and ads (REST, plus WebSocket feeds), orders and metas (REST) | 60 requests a minute | Listing and promotion metadata |
Two things are missing from that reference: candles (there is no OHLC or historical endpoint, so a chart has to be built by polling and storing snapshots yourself) and a push channel for market data (the WebSocket page lists only profile, boost, takeover and ad feeds, so live pair prices mean polling within the limit). The queries on this page fill both gaps, and add the aggregates a screener needs, such as distinct makers, buyers and sellers per window.
For EVM chains (Ethereum, BNB Chain, Arbitrum, Base, Polygon, Optimism) see the DEXScreener EVM API page.
How the data is delivered
- GraphQL API for historical and current data with filtering and aggregation. Start at Solana DEX Trades.
- WebSocket subscriptions for live trades, new pools and price updates. See Solana subscriptions.
- Kafka streams for high-throughput pipelines. See Kafka streaming concepts.
- Cloud datasets as Parquet exports to S3, GCS, Snowflake or BigQuery for bulk history. See cloud datasets.
Get trade transactions of a pair in real time
This subscription streams every trade on one Solana pair as it is confirmed. Open it in the IDE here.
subscription MyQuery {
Solana {
DEXTradeByTokens(
where: {Trade: {Currency: {MintAddress: {is: "So11111111111111111111111111111111111111112"}}, Side: {Currency: {MintAddress: {is: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}}, Market: {MarketAddress: {is: "Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE"}}}, Transaction: {Result: {Success: true}}}
) {
Block {
Time
}
Trade {
Currency {
Name
Symbol
}
Amount
PriceAgainstSideCurrency: Price
PriceInUSD
Side {
Currency {
Name
Symbol
}
Amount
Type
}
}
Transaction {
Maker: Signer
Signature
}
}
}
}
Get the price of a token
This query returns the latest price of a token from the Trading API, with mean, estimate and moving-average prices alongside the OHLC of the latest one-second interval. Saved query here.
query MyQuery {
Trading {
Pairs(
where: {Token: {Id: {is: "bid:solana:So11111111111111111111111111111111111111112"}}, Interval: {Time: {Duration: {eq: 1}}}, Price: {IsQuotedInUsd: true}}
limit: {count: 10}
orderBy: {descending: Interval_Time_Start}
) {
Token {
Name
Address
Id
NetworkBid
}
Price {
Average {
Mean
Estimate
ExponentialMoving
SimpleMoving
WeightedSimpleMoving
}
Ohlc {
Open
High
Low
Close
}
}
}
}
}
Get OHLC candles for a token pair
This is the candle endpoint DEX Screener does not have. It fetches Open, High, Low and Close prices in USD for a token pair across DEXs, at the interval you set in seconds. Put the base and quote token addresses in the Token.Id and QuoteToken.Id filters and set Interval.Time.Duration to the candle size (3600 for one hour, 60 for one minute). The query returns the most recent candles sorted by interval start. Saved query here.
For long histories and other aggregate windows, see Historical Solana data.
query MyQuery {
Trading {
Pairs(
where: {Token: {Id: {is: "bid:solana:So11111111111111111111111111111111111111112"}}, QuoteToken: {Id: {is: "bid:solana:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}, Interval: {Time: {Duration: {eq: 3600}}}, Price: {IsQuotedInUsd: true}}
limit: {count: 10}
orderBy: {descending: Interval_Time_Start}
) {
Token {
Name
Address
Id
NetworkBid
}
QuoteToken{
Name
Address
Id
NetworkBid
}
Price {
Average {
Mean
Estimate
ExponentialMoving
SimpleMoving
WeightedSimpleMoving
}
Ohlc {
Open
High
Low
Close
}
}
}
}
}
Buy volume, sell volume, buys, sells, makers, buyers and sellers for a pair
This is the query behind a DEX Screener pair row: total and 5-minute buy and sell volume, trade counts, unique makers, buyers and sellers, and the price at the start of the window, five minutes ago, and now.
Two things make it reliable:
since_relative/after_relativeinstead of absolute timestamps. The window is always "the last hour" and "the last 5 minutes" no matter when the query runs. A hardcoded date silently widens every day it sits in your code.Transaction: { Result: { Success: true } }drops failed transactions, which otherwise inflate trade counts and volume.
query PairStats($token: String!, $side_token: String!, $pair_address: String!) {
Solana(dataset: realtime) {
DEXTradeByTokens(
where: {
Transaction: { Result: { Success: true } }
Trade: {
Currency: { MintAddress: { is: $token } }
Side: { Currency: { MintAddress: { is: $side_token } } }
Market: { MarketAddress: { is: $pair_address } }
}
Block: { Time: { since_relative: { hours_ago: 1 } } }
}
) {
Trade {
Currency {
Name
MintAddress
Symbol
}
price_start: PriceInUSD(minimum: Block_Time)
price_5min_ago: PriceInUSD(
minimum: Block_Time
if: { Block: { Time: { after_relative: { minutes_ago: 5 } } } }
)
price_now: PriceInUSD(maximum: Block_Time)
Dex {
ProtocolName
ProtocolFamily
ProgramAddress
}
Market {
MarketAddress
}
Side {
Currency {
Symbol
Name
MintAddress
}
}
}
makers: count(distinct: Transaction_Signer)
makers_5min: count(
distinct: Transaction_Signer
if: { Block: { Time: { after_relative: { minutes_ago: 5 } } } }
)
buyers: count(distinct: Transaction_Signer, if: { Trade: { Side: { Type: { is: buy } } } })
sellers: count(distinct: Transaction_Signer, if: { Trade: { Side: { Type: { is: sell } } } })
trades: count
trades_5min: count(if: { Block: { Time: { after_relative: { minutes_ago: 5 } } } })
traded_volume: sum(of: Trade_Side_AmountInUSD)
traded_volume_5min: sum(
of: Trade_Side_AmountInUSD
if: { Block: { Time: { after_relative: { minutes_ago: 5 } } } }
)
buy_volume: sum(of: Trade_Side_AmountInUSD, if: { Trade: { Side: { Type: { is: buy } } } })
sell_volume: sum(of: Trade_Side_AmountInUSD, if: { Trade: { Side: { Type: { is: sell } } } })
buys: count(if: { Trade: { Side: { Type: { is: buy } } } })
sells: count(if: { Trade: { Side: { Type: { is: sell } } } })
}
}
}
Variables. This example uses the WSOL/USDC Orca Whirlpool, a long-lived pool that will still be there when you run it:
{
"token": "So11111111111111111111111111111111111111112",
"side_token": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"pair_address": "Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE"
}
pair_addressTwo traps here.
Aggregators return an empty MarketAddress. Routers such as Jupiter, dflow and Aquifer carry large volume but expose no single pool, so filtering by Market.MarketAddress on them yields nothing. Filter on an AMM pool (Whirlpool, Raydium, PumpSwap) instead.
Memecoin pools are short-lived. A pump.fun graduate can do eight figures of volume in one hour and almost nothing an hour later, so a mint that looks ideal today may be dead by the time you copy the query. Use Get top pairs on Solana to find a currently active pool, then substitute its address here.
Get top pairs on Solana
This returns the top 10 Solana pairs by trade count over the last hour, with total trades, buys, sells, traded volume and buy volume, the data behind a screener leaderboard or a "trending" list. Use it to find a currently active pool to plug into the pair stats query above.
since_relative keeps the window rolling, so there is no date to update.
Note you cannot run this as a WebSocket subscription: aggregate functions like sum do not work in subscription.
You can find the query here
query MyQuery {
Solana {
DEXTradeByTokens(
where: {Transaction: {Result: {Success: true}}, Trade: {Side: {Currency: {MintAddress: {is: "So11111111111111111111111111111111111111112"}}}}, Block: {Time: {since_relative: {hours_ago: 1}}}}
orderBy: {descendingByField: "total_trades"}
limit: {count: 10}
) {
Trade {
Currency {
Name
MintAddress
Symbol
}
start: PriceInUSD(minimum: Block_Time)
min5: PriceInUSD(
minimum: Block_Time
if: {Block: {Time: {after_relative: {minutes_ago: 5}}}}
)
end: PriceInUSD(maximum: Block_Time)
Dex {
ProtocolName
ProtocolFamily
ProgramAddress
}
Market {
MarketAddress
}
Side {
Currency {
Symbol
Name
MintAddress
}
}
}
makers: count(distinct:Transaction_Signer)
total_trades: count
total_traded_volume: sum(of: Trade_Side_AmountInUSD)
total_buy_volume: sum(
of: Trade_Side_AmountInUSD
if: {Trade: {Side: {Type: {is: buy}}}}
)
total_sell_volume: sum(
of: Trade_Side_AmountInUSD
if: {Trade: {Side: {Type: {is: sell}}}}
)
total_buys: count(if: {Trade: {Side: {Type: {is: buy}}}})
total_sells: count(if: {Trade: {Side: {Type: {is: sell}}}})
}
}
}
New pairs and new pools
DEX Screener's "new pairs" tab is a stream of pool creations. On Bitquery that is the DEXPools cube, which reports every new liquidity pool with its tokens and initial liquidity, and can be subscribed to over WebSocket. The queries live on the Solana DEX Pools API page. Launchpad tokens that have not reached a pool yet are covered by the Pump.fun API.
Trader-focused trade APIs (with USD price, market cap and supply)
The queries below use the Trades cube (Trading { Trades }) which is trader-focused and provides reliable USD prices including for all tokens. See DEXTrades vs DEXTradeByTokens vs Trades cube for when to use which.
Get all DEX trades on Solana with price, market cap and supply
Stream all Solana DEX trades in real time with USD price, market cap, FDV, circulating supply, and transaction fee data. Filter by Pair.Market.Network: Solana to capture every swap across Raydium, Orca, Jupiter, PumpSwap, and other Solana DEXs in a single subscription.
You can run this subscription in the Bitquery IDE.
Click to expand GraphQL query
subscription {
Trading {
Trades(where: { Pair: { Market: { Network: { is: "Solana" } } } }) {
Side
Supply {
MaxSupply
TotalSupply
FullyDilutedValuationUsd
CirculatingSupply
MarketCap
}
Trader {
Address
}
TransactionHeader {
Fee
FeePayer
Sender
To
Hash
Index
}
Amounts {
Base
Quote
}
AmountsInUsd {
Base
Quote
}
Block {
Date
Time
Timestamp
}
Pair {
Currency {
Id
Name
Symbol
}
Market {
Address
Program
Network
}
QuoteCurrency {
Id
Name
Symbol
}
Token {
Address
Id
IsNative
Symbol
TokenId
Network
}
QuoteToken {
Address
Id
IsNative
Symbol
TokenId
Network
}
}
Price
PriceInUsd
}
}
}
Top traders by PnL for a specific pool (last 30 minutes)
Rank traders by PnL on one pool: filter Pair.Market.Address, last 30 minutes, limit: 10, and orderBy PnL descending. Useful for leaderboards, smart-money screens, and pool-specific trader analytics. The example pool is the WSOL/USDC Orca Whirlpool; swap in any active pool address from the top pairs query.
You can run this query in the Bitquery IDE.
Click to expand GraphQL query
{
Trading {
Trades(
limit: { count: 10 }
orderBy: [{ descendingByField: "PnL" }]
where: {
Block: { Time: { since_relative: { minutes_ago: 30 } } }
Pair: {
Market: {
Address: { is: "Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE" }
}
}
}
) {
Trader {
Address
}
Amount_Bought: sum(of: AmountsInUsd_Base, if: { Side: { is: "Buy" } })
Amount_Sold: sum(of: AmountsInUsd_Base, if: { Side: { is: "Sell" } })
Amount_Bought_native: sum(of: Amounts_Base, if: { Side: { is: "Buy" } })
Amount_Sold_native: sum(of: Amounts_Base, if: { Side: { is: "Sell" } })
PnL: calculate(expression: "$Amount_Sold - $Amount_Bought")
buys: count(if: { Side: { is: "Buy" } })
sells: count(if: { Side: { is: "Sell" } })
}
}
}
API key, trial and pricing
You need a Bitquery access token to run these outside the IDE. Create one at account.bitquery.io and follow how to generate a token; there is no approval step. The free trial runs for seven days and includes 1,000 API points, 100 MCP credits and two simultaneous streams. Request rate limits by plan are 30 a minute on Personal, 90 on Pro and 240 on Scale, with custom limits on Enterprise; see rate limits. How points and streams are billed is on how billing works, and plan prices are on the pricing page.
DEX Screener API compared with Bitquery
| DEX Screener public API | Bitquery | |
|---|---|---|
| Access | Public REST, no key listed in the reference | Access token from account.bitquery.io, free trial |
| Rate limit | 300 requests a minute (pairs, tokens, search), 60 (profiles, boosts, ads) | 30, 90 or 240 requests a minute by plan, custom on Enterprise |
| Data shape | Current snapshot of a pair or token | Trades, pools, balances, transfers and aggregates, current and historical |
| Candles and history | Not in the reference | OHLC at any interval, full trade history |
| Real-time delivery | WebSocket for profiles, boosts and ads; polling for pair data | WebSocket subscriptions for trades, pools and prices, Kafka, gRPC |
| Screener aggregates | Volume and transaction counts per pair | Volume, trades, distinct makers, buyers and sellers per window, top pairs, trader PnL |
| Chains | Multi-chain | Solana plus the EVM chains on the EVM page |
Video tutorial on how to get Solana DEXTrades data just like DEXScreener from Bitquery API
Video tutorial | How to get buys, sells, buy volume, sell volume, makers and trades for a specific Solana token pair
Frequently Asked Questions
Does DEX Screener have an official API?
Yes. DEX Screener publishes a public REST API with endpoints for pairs, tokens, search, token profiles and boosts. Its reference lists rate limits of 300 requests a minute for pair, token and search endpoints and 60 a minute for profile, boost and ad endpoints.
Is the DEX Screener API free, and do I need an API key?
The reference lists no API key or paid tier for its endpoints; access is rate-limited per minute. It does not document a paid plan for higher limits.
Does the DEX Screener API provide historical data or OHLC candles?
No. The reference has no candle, OHLC or historical endpoint; it returns the current state of a pair or token. To get candles and history for the same pairs, use the OHLC query on this page or the Historical Solana data page.
Does the DEX Screener API have a WebSocket?
Yes, for token profiles, boosts, community takeovers and ads. Pair prices and trades are REST only, so live market data means polling within the rate limit. The subscription queries on this page push every trade, new pool and price change over WebSocket.
How do I get a DEX Screener-style API key from Bitquery?
Sign up at account.bitquery.io and generate an access token. It works immediately for GraphQL, WebSocket and gRPC, and the seven-day trial includes 1,000 API points, 100 MCP credits and two simultaneous streams.
Can I stream new Solana pairs as they are created?
Yes. The DEXPools cube reports every new liquidity pool with its tokens and initial liquidity and can be subscribed to over WebSocket. Launchpad tokens that have not reached a pool yet are covered by the Pump.fun API.
Which Solana DEXs are covered?
Raydium, Orca, Jupiter, PumpSwap and the other Solana DEXs in one schema, so a pair query works across venues without per-DEX integrations.
What does Bitquery cost after the trial?
Plans are priced by API points and streams; request limits are 30 a minute on Personal, 90 on Pro and 240 on Scale, with custom limits on Enterprise. Current prices are on bitquery.io/pricing.
Related pages
Ready to run this in production?
Get an API key and run these queries in minutes, or talk to us about plans and enterprise delivery.