top_gainers_v2
Returns 100 DEX trades by token on Base, sorted by USD, highest first: currency symbol, currency name, smart contract, protocol name, side currency symbol, side currency name, side smart contract and 8 more fields.
What it returns
- currency symbol
- currency name
- smart contract
- protocol name
- side currency symbol
- side currency name
- side smart contract
- side protocol name
- price in USD
- unique of trade DEX owner address
- sum of trade side amount
- sum of trade side amount in USD
- unique of trade seller
- unique of trade buyer
- count
The query
query pairs($min_count: String, $network: evm_network, $time_10min_ago: DateTime, $time_1h_ago: DateTime, $time_3h_ago: DateTime, $time_ago: DateTime, $eth: String!, $weth: String!, $usdc: String!, $usdt: String!) {
EVM(network: $network) {
DEXTradeByTokens(
where: {Block: {Time: {since: $time_ago}}, any: [{Trade: {Side: {Currency: {SmartContract: {is: $eth}}}}}, {Trade: {Side: {Currency: {SmartContract: {is: $usdt}}}, Currency: {SmartContract: {notIn: [$eth]}}}}, {Trade: {Side: {Currency: {SmartContract: {is: $usdc}}}, Currency: {SmartContract: {notIn: [$eth, $usdt]}}}}, {Trade: {Side: {Currency: {SmartContract: {is: $weth}}}, Currency: {SmartContract: {notIn: [$eth, $usdc, $usdt]}}}}, {Trade: {Side: {Currency: {SmartContract: {notIn: [$usdc, $usdt, $weth, $eth]}}}, Currency: {SmartContract: {notIn: [$usdc, $usdt, $weth, $eth]}}}}]}
orderBy: {descendingByField: "usd"}
limit: {count: 100}
) {
Trade {
Currency {
Symbol
Name
SmartContract
ProtocolName
}
Side {
Currency {
Symbol
Name
SmartContract
ProtocolName
}
}
price_last: PriceInUSD(maximum: Block_Number)
price_10min_ago: PriceInUSD(
maximum: Block_Number
if: {Block: {Time: {before: $time_10min_ago}}}
)
price_1h_ago: PriceInUSD(
maximum: Block_Number
if: {Block: {Time: {before: $time_1h_ago}}}
)
price_3h_ago: PriceInUSD(
maximum: Block_Number
if: {Block: {Time: {before: $time_3h_ago}}}
)
}
dexes: uniq(of: Trade_Dex_OwnerAddress)
amount: sum(of: Trade_Side_Amount)
usd: sum(of: Trade_Side_AmountInUSD)
sellers: uniq(of: Trade_Seller)
buyers: uniq(of: Trade_Buyer)
count(selectWhere: {ge: $min_count})
}
}
}
Variables
{
"network": "base",
"time_10min_ago": "2025-01-27T13:59:19Z",
"time_1h_ago": "2025-01-27T13:09:19Z",
"time_3h_ago": "2025-01-27T11:09:19Z",
"usdc": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"usdt": "0xfde4c96c8593536e31f229ea8f37b2ada2699bb2",
"weth": "0x4200000000000000000000000000000000000006",
"eth": "0x",
"min_count": "100"
}
Similar queries
- Coinbase stock tokens: DEX trading on Base, Sep 5 to Oct 4 2026 · Base · DEXTradeByTokens
- Coinbase stock tokens: DEX trading on Base in August 2026 · Base · DEXTradeByTokens
- optimized query to get pools data · Ethereum · DEXTradeByTokens
- AfricaCryptoChainx · Ethereum · DEXTradeByTokens
- top pools of a token · Base · DEXTradeByTokens