Rob - Realised Pnl, avg buy price, Buy volume, Sell Volume Solana
Returns DEX trades by token on Solana, where currency mint address is 4iLKj7…pump, account owner is 2vqBfR…XUAK and DEX protocol name is not jupiter or dex_solana_v3: currency name, currency symbol, currency mint address, account owner, count, sum of trade side amount in USD, sum of trade amount and calculate.
What it returns
- currency name
- currency symbol
- currency mint address
- account owner
- count
- sum of trade side amount in USD
- sum of trade amount
- calculate
Filters
- currency mint address is 4iLKj7…pump
- account owner is 2vqBfR…XUAK
- DEX protocol name is not jupiter or dex_solana_v3
The query
{
Solana(dataset: combined) {
DEXTradeByTokens(
where: {Trade: {Currency: {MintAddress: {is: "4iLKj7fkZF2rSpgSD8W6UFq4fkKXkkbJMGXMz3B8pump"}}, Account: {Owner: {is: "2vqBfRdhX8sHmVFo1TY1yBdFXkHMe4LgifrxvHBpXUAK"}} Dex:{ProtocolName:{notIn:["jupiter","dex_solana_v3"]}}}, Transaction: {Result: {Success: true}}}
) {
Trade {
Currency {
Name
Symbol
MintAddress
}
Account {
Owner
}
}
buys:count(if: { Trade:{Side: { Type: { is: buy } } } })
sells: count(if: { Trade:{Side: { Type: { is: sell } } } })
buy_volume_usd: sum(
of: Trade_Side_AmountInUSD
if: { Trade:{Side: { Type: { is: buy } } } }
)
buy_volume_usd: sum(
of: Trade_Side_AmountInUSD
if: {Trade: {Side: {Type: {is: buy}}}}
)
sell_volume_usd: sum(
of: Trade_Side_AmountInUSD
if: {Trade: {Side: {Type: {is: sell}}}}
)
buy_volume: sum(of: Trade_Amount, if: {Trade: {Side: {Type: {is: buy}}}})
sell_volume: sum(of: Trade_Amount, if: {Trade: {Side: {Type: {is: sell}}}})
RealizedPnL: calculate(expression: "$sell_volume_usd - $buy_volume_usd")
trades: count
avg_buy_price: calculate(expression:"$buy_volume_usd / $buy_volume")
}
}
}
Similar queries
- ANSEM daily traders, June 16 to 26, 2026 · Solana · DEXTradeByTokens
- Solana SOL/USDC 1-Minute OHLC with DEXTradeByTokens · Solana · DEXTradeByTokens
- FOMO App: Top Tokens Bought, Last Hour (Solana) · Solana · DEXTradeByTokens
- FOMO App: Most Active Wallets, Last Hour (Solana) · Solana · DEXTradeByTokens
- Buys, Sells, BuyVolume, SellVolume, Makers, TotalTradedVolume, PriceinUSD for solana token pair · Solana · DEXTradeByTokens