Top Traders by PnL of a specific token
Returns 10 trades, where token address is 0x1f60…4444, 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
- token address is 0x1f60…4444
The query
{
Trading {
Trades(
limit:{count:10}
orderBy:{descendingByField:"PnL"}
where: {Block: {Time: {since_relative: {minutes_ago: 30}}}, Pair: {Token: {Address: {is: "0x1f60df4bf4f08498ee4a111058c99774b81e4444"}}}}
) {
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