Top Traders by PnL of a specific bsc pool
Returns 10 trades, where market address is 0x0bfb…1865, sorted by pn l, highest first: trader address, sum of amounts in USD base, sum of amounts base, calculate and count.
What it returns
- trader address
- sum of amounts in USD base
- sum of amounts base
- calculate
- count
Filters
- market address is 0x0bfb…1865
The query
{
Trading {
Trades(
limit:{count:10}
orderBy:{descendingByField:"PnL"}
where: {Block: {Time: {since_relative: {minutes_ago: 30}}}, Pair: {Market: {Address: {is: "0x0bfbcf9fa4f9c56b0f40a671ad40e0805a091865"}}}}
) {
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"}})
}
}
}
Similar queries
- Trading API: Solana Trades with Transaction Hash · Trading (all chains) · Trades
- Elysium latest trades of one token (WHYPE) · Trading (all chains) · Trades
- FOMO App: Trades per Day (Trading API) · Trading (all chains) · Trades
- save with commit · Trading (all chains) · Tokens