The Solana blockchain continues to power one of the most dynamic decentralized exchange (DEX) ecosystems in the crypto space. With lightning-fast transactions and low fees, traders flock to platforms like Raydium, Orca, and Pumpfun to capitalize on emerging opportunities. To stay ahead, accessing real-time, granular trading data is essential—and that’s where the Solana Trader API comes in.
This powerful tool enables developers, analysts, and traders to extract deep insights from Solana’s DEX activity. Whether you're tracking top traders, monitoring wallet movements in real time, or analyzing buy/sell patterns, the API delivers actionable intelligence with precision.
Unlock Top Traders for Any Solana Token
Identifying influential market participants can reveal sentiment shifts and potential price movements. Using the Solana DEX Trades API, you can retrieve the top traders by volume for any given token.
For example, this query fetches the top 100 traders of a specific token (59VxMU35CaHHBTndQQWDkChprM5FMw7YQi5aPE5rfSHN
) based on USD trading volume:
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)
}
}
}
With variables:
{
"token": "59VxMU35CaHHBTndQQWDkChprM5FMw7YQi5aPE5rfSHN",
"base": "So11111111111111111111111111111111111111112"
}
👉 Discover real-time trader behavior and spot early movers before the crowd.
This data helps identify accumulation or distribution trends—critical for informed trading decisions.
Monitor Wallet Activity in Real Time
Stay ahead of fast-moving markets by subscribing to live trades from specific wallets. The real-time subscription query captures every DEX trade involving addresses in your watchlist.
Here’s how to set up a live feed:
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 } } } } } }
]
}
) {
Instruction {
Program {
Method
}
}
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
}
}
}
}
Use case variables:
{
"addressList": ["7eWHXZefGY98o9grrrt1Z3j7DcPDEhA4UviQ1pVNhTXX", "6LNdbvyb11JH8qxAsJoPSfkwK4zJDQKQ6LNp4mxt8VpR"]
}
This functionality is ideal for tracking whale movements, sniper bots, or project team wallets.
Track Balance Changes Across Trades
Understanding not just what was traded but how balances changed adds another analytical layer. This query retrieves the latest 10 trades involving specified wallets and includes pre- and post-trade token balances.
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 insight reveals whether a trader is fully exiting a position or averaging in—valuable context for predictive modeling.
Count Buys vs. Sells for a Specific Trader
To assess a trader’s market stance over time, count their buy and sell actions 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 } } } })
}
}
}
Example input:
{
"timestamp": "2024-06-25T06:19:00Z",
"trader": "FeWbDQ9SpgWS8grNrpFesVquJfxVkRu1WNZerKsrkcbY"
}
👉 Turn raw trade data into strategic advantage—start analyzing now.
Subscribe to Real-Time Trades of a Single Wallet
Build real-time dashboards or alert systems using WebSocket subscriptions. This query streams all buy and sell activities from a specific wallet:
subscription {
Solana {
buy: DEXTrades(
where: { Trade: { Buy: { Account: { Address: { is: "CP1d7VVnCMy321G6Q1924Bibp528rqibTX8x9UL6wUCe" } } } } }
) {
Trade {
Dex {
ProtocolName
}
Buy {
Amount
Currency {
Symbol
Name
}
}
Price
}
}
sell: DEXTrades(
where: { Trade: { Sell: { Account: { Address: { is: "CP1d7VVnCMy321G6Q1924Bibp528rqibTX8x9UL6wUCe" } } } } }
) {
Trade {
Dex {
ProtocolName
}
Sell {
Currency {
Symbol
Name
}
}
Price
}
}
}
}
Convert this subscription into a query
to analyze historical behavior.
Retrieve the First 100 Buyers of a New Token
Early buyers often signal strong conviction. Capture them with this ascending-time query:
query MyQuery {
Solana {
DEXTrades(
where: {
Trade: {
Buy: {
Currency: {
MintAddress: {
is:"2Z4FzKBcw48KBD2PaR4wtxo4sYGbS7QqTQCLoQnUpump"
}
}
}
}
}
limit:{count: 100}
orderBy:{ascending: Block_Time}
) {
Trade {
Buy {
Amount
Account {
Token {
Owner
}
}
}
}
}
}
}
Ideal for tracking Pumpfun or meme coin launches, identifying early adopters can guide investment timing.
Frequently Asked Questions (FAQ)
Q: Can I use this API to track new token launches on Pumpfun?
A: Yes. By querying early trades and first buyers using the token’s mint address, you can monitor launch dynamics in real time.
Q: Is real-time data available for all Solana DEXs?
A: The API aggregates data across major Solana DEX protocols including Raydium, Orca, Serum, and emerging platforms like Pumpfun.
Q: How do I distinguish between native SOL and wrapped tokens?
A: Use the Native
field in the Currency object—true
indicates native SOL; false
indicates SPL tokens.
Q: Can I filter trades by specific DEX protocols?
A: Yes. Filter using ProtocolName
or ProgramAddress
within the Dex object to isolate trades on Raydium, Orca, etc.
Q: What’s the difference between DEXTrades
and DEXTradeByTokens
?
A: DEXTrades
gives individual trade records; DEXTradeByTokens
provides aggregated metrics like total volume per trader.
Q: Are balance updates available for all transactions?
A: Balance updates are joined via transaction signature and reflect SPL token changes, but may not include every intermediate state.
👉 Maximize your edge in Solana trading with real-time analytics and deep insights.
By leveraging these queries, you gain unparalleled visibility into market behavior—empowering smarter strategies, faster reactions, and deeper understanding of decentralized finance on Solana.