chain_pairs
main query for custom requests of assetlists (an expression to get the change value for the difference of open and close price is still missing)
What it returns
- sum of trade amount in USD
- count
- owner address
- protocol name
- price in USD
- side currency symbol
- side smart contract
- currency symbol
- smart contract
- decimals
- currency name
Filters
- DEX owner address is 0x6Cb4…Be3E or 0x3312…FDfD
- block time since 2024-08-26
- block time till 2024-08-27
- trade price is above 0
The query
query ($network: evm_network, $limit: Int, $from: DateTime, $till: DateTime, $quoteCurrencies: [String!], $exchangeAddresses: [String!]) {
EVM(dataset: combined, network: $network) {
DEXTradeByTokens(
orderBy: {descendingByField: "volume"}
limit: {count: $limit}
limitBy: {by: [Trade_Currency_SmartContract], count: 1}
where: {Trade: {Side: {Currency: {SmartContract: {in: $quoteCurrencies}, Symbol: {}}}, Price: {gt: 0}, Dex: {OwnerAddress: {in: $exchangeAddresses}}, Currency: {Symbol: {notLike: ""}}}, Block: {Time: {since: $from, till: $till}}}
) {
volume: sum(of: Trade_AmountInUSD)
count
Trade {
Dex {
OwnerAddress
ProtocolName
}
open: PriceInUSD(minimum: Block_Number)
close: PriceInUSD(maximum: Block_Number)
Side {
Currency {
Symbol
SmartContract
}
}
Currency {
Symbol
SmartContract
Decimals
Name
}
}
}
}
}
Variables
{
"network": "base",
"limit": 10,
"from": "2024-08-26T20:41:18Z",
"till": "2024-08-27T20:41:18Z",
"quoteCurrency": "0x4200000000000000000000000000000000000006",
"exchangeAddresses": ["0x6Cb442acF35158D5eDa88fe602221b67B400Be3E", "0x33128a8fC17869897dcE68Ed026d694621f6FDfD"]
}
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