The Solana blockchain continues to power one of the most dynamic decentralized exchange (DEX) ecosystems in the crypto space. With high-speed transactions and low fees, traders are flocking to platforms like Raydium, Orca, and Pumpfun to capitalize on emerging token opportunities. To navigate this fast-moving environment, access to real-time, structured trading data is essential. The Solana Trader API delivers precisely that — enabling developers, analysts, and trading bots to monitor wallet activity, track top traders, analyze trade volume, and even identify early movers in new token launches.
Whether you're building a market intelligence dashboard or automating trade signals, the Solana DEX Trades API provides granular, queryable data across multiple dimensions: wallets, tokens, protocols, and timeframes.
Retrieve Top Traders for a Token
One of the most powerful use cases of the Solana Trader API is identifying the largest participants in a token’s trading volume. By querying the DEXTradeByTokens endpoint with a specific token mint address, you can retrieve the top 100 traders ranked by USD volume.
For example, to analyze trading activity for a token with mint address 59VxMU35CaHHBTndQQWDkChprM5FMw7YQi5aPE5rfSHN, you can run the following GraphQL query:
query TopTraders($token: String, $base: String) {
Solana {
DEXTradeByTokens(
orderBy: { descendingByField: "volumeUsd" }
limit: { count: 100 }
where: {
Trade: {
Currency: { MintAddress: { is: $token } }
Side: { Amount: { gt: "0" }, Currency: { MintAddress: { is: $base } } }
}
Transaction: { Result: { Success: true } }
}
) {
Trade {
Account {
Owner
}
Dex {
ProgramAddress
ProtocolFamily
ProtocolName
}
}
bought: sum(of: Trade_Amount, if: { Trade: { Side: { Type: { is: buy } } } })
sold: sum(of: Trade_Amount, if: { Trade: { Side: { Type: { is: sell } } } })
volume: sum(of: Trade_Amount)
volumeUsd: sum(of: Trade_Side_AmountInUSD)
}
}
}This query returns key metrics per trader:
- Total buy and sell amounts
- Net trading volume in tokens and USD
- Associated DEX protocol (e.g., Raydium, Orca)
👉 Unlock real-time trading insights and build powerful analytics tools today.
Monitor Wallet Activity in Real Time
Tracking specific wallets is crucial for detecting whale movements or monitoring known alpha groups. Using a GraphQL subscription, you can receive live updates whenever a tracked wallet executes a trade on any Solana DEX.
The DEXTrades subscription supports filtering by a list of wallet addresses. For each trade event, it returns:
- Block timestamp
- Buy/sell amounts and USD values
- Token metadata (symbol, decimals, mint address)
- Transaction signature and signer
subscription MyQuery($addressList: [String!]) {
Solana {
DEXTrades(
where: {
Transaction: { Result: { Success: true } }
any: [
{ Trade: { Buy: { Account: { Address: { in: $addressList } } } } }
{ Trade: { Buy: { Account: { Token: { Owner: { in: $addressList } } } } } }
{ Trade: { Sell: { Account: { Address: { in: $addressList } } } } }
{ Trade: { Sell: { Account: { Token: { Owner: { in: $addressList } } } } } }
]
}
) {
Block { Time }
Trade {
Buy {
Amount
Account { Address }
Currency { Name Symbol MintAddress Decimals }
AmountInUSD
}
Sell {
Amount
Account { Address }
Currency { Name Symbol MintAddress Decimals }
AmountInUSD
}
}
Transaction { Signature Signer }
}
}
}This real-time feed can power alert systems, copy-trading bots, or social trading platforms.
Analyze Wallet Balances Before and After Trades
Beyond just trade execution data, understanding how a wallet’s balance changes is vital for detecting accumulation or distribution patterns. The Solana API allows you to join trade data with balance updates from the same transaction.
Using the joinBalanceUpdates directive, you can retrieve pre- and post-trade token balances for any account involved in a swap:
query MyQuery($addressList: [String!]) {
Solana {
DEXTrades(
limit: { count: 10 }
orderBy: { descending: Block_Time }
where: {
Transaction: { Result: { Success: true } }
any: [
{ Trade: { Buy: { Account: { Address: { in: $addressList } } } } }
{ Trade: { Buy: { Account: { Token: { Owner: { in: $addressList } } } } } }
{ Trade: { Sell: { Account: { Address: { in: $addressList } } } } }
{ Trade: { Sell: { Account: { Token: { Owner: { in: $addressList } } } } } }
]
}
) {
Block { Time }
Trade {
Buy {
Amount
Currency { Symbol MintAddress }
AmountInUSD
}
Sell {
Amount
Currency { Symbol MintAddress }
AmountInUSD
}
}
joinBalanceUpdates(join: left, Transaction_Signature: Transaction_Signature) {
BalanceUpdate {
PreBalance
PostBalance
Account {
Address
Token { Owner }
}
}
}
}
}
}This enables deeper analysis such as:
- Profit-taking detection
- Wallet clustering
- Token inflow/outflow trends
👉 Stay ahead of market moves with real-time DEX data and advanced analytics.
Count Buy vs Sell Transactions for a Trader
To assess a trader’s strategy or sentiment toward a particular asset, you can count their buy and sell interactions over time. This query uses conditional aggregation to return separate counts for buys and sells after a given timestamp.
query MyQuery($timestamp: DateTime, $trader: String) {
Solana(dataset: combined) {
DEXTradeByTokens(
where: {
Block: { Time: { since: $timestamp } }
Trade: {
Side: {
Currency: {
MintAddress: {
in: ["So11111111111111111111111111111111111111112", "11111111111111111111111111111111"]
}
}
}
}
any: [
{ Trade: { Account: { Address: { is: $trader } } } }
{ Trade: { Account: { Token: { Owner: { is: $trader } } } } }
]
}
) {
buys: count(if: { Trade: { Side: { Type: { is: buy } } } })
sells: count(if: { Trade: { Side: { Type: { is: sell } } } })
}
}
}This is particularly useful for scoring trader behavior or training machine learning models on historical patterns.
Subscribe to Real-Time Trades from a Single Wallet
For focused monitoring, you can set up a dedicated subscription to capture all incoming and outgoing trades from a specific wallet. This allows you to split buy and sell events into separate streams for easier processing.
Using WebSockets, this data can feed into live dashboards or trigger automated responses in trading systems.
Identify Early Buyers of New Tokens
Timing is everything in meme coin trading. The ability to detect the first 100 buyers of a newly launched token — especially on platforms like Pumpfun — can provide critical alpha.
The following query retrieves the earliest purchasers of a token by sorting trades in ascending order of block time:
query MyQuery {
Solana {
DEXTrades(
where: {
Trade: {
Buy: {
Currency: {
MintAddress: {
is:"2Z4FzKBcw48KBD2PaR4wtxo4sYGbS7QqTQCLoQnUpump"
}
}
}
}
}
limit:{count: 100}
orderBy:{ascending: Block_Time}
) {
Trade {
Buy {
Amount
Account {
Token {
Owner
}
}
}
}
}
}
}This insight helps map out initial distribution and identify potential insider wallets.
Core Keywords
- Solana Trader API
- Real-time DEX data
- Solana wallet tracking
- Pumpfun token analytics
- Top traders on Solana
- DEX trade monitoring
- Blockchain trade API
- Early buyer detection
Frequently Asked Questions
Q: Can I track trades on Pumpfun using this API?
A: Yes. Since Pumpfun operates on Solana’s DEX infrastructure, all trades are captured in the DEXTrades dataset and can be filtered by token mint address.
Q: Is real-time data available for all Solana DEXs?
A: Yes. The subscription endpoints provide live updates across major platforms including Raydium, Orca, Serum, and more.
Q: How far back does historical data go?
A: Depending on the dataset tier (Archive or Combined), you can access several years of historical trading data.
Q: Can I detect whale transactions with this API?
A: Absolutely. By filtering trades above a certain USD threshold or volume, you can isolate large transactions from major holders.
Q: Is there rate limiting on queries?
A: Yes. Usage limits apply based on your API plan, but batching and pagination help optimize large data pulls.
Q: Can I integrate this with my trading bot?
A: Definitely. The structured JSON responses and WebSocket support make it ideal for algorithmic trading strategies.
👉 Maximize your edge in the Solana ecosystem with powerful, real-time market data.