custom_pairs_v2
Returns 1000 DEX trades by token on BNB Chain, where side currency smart contract is 0xbb4c…095c, 0x55d3…7955 or 1 more, DEX owner address is 0xca14…0c73, 0x0bfb…1865 or 1 more and block time since 2024-06-01, sorted by volume, highest first: sum of trade side amount in USD, count, owner address, protocol name, price in USD, side currency symbol, side smart contract and 4 more fields.
What it returns
- sum of trade side 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
- side currency smart contract is 0xbb4c…095c, 0x55d3…7955 or 1 more
- DEX owner address is 0xca14…0c73, 0x0bfb…1865 or 1 more
- block time since 2024-06-01
- block time till 2024-06-14
- trade price is above 0
The query
query ($network: evm_network, $limit: Int, $from: DateTime, $till: DateTime, $quoteCurrencies: [String!], $exchangeAddresses: [String!]) {
EVM(network: $network, dataset: combined) {
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: {Name: {startsWith: ""}, Symbol: {notLike: ""}}}, Block: {Time: {since: $from, till: $till}}}
) {
volume: sum(of: Trade_Side_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": "bsc",
"limit": 1000,
"from": "2024-06-01T10:20:30Z",
"till": "2024-06-14T10:20:30Z",
"quoteCurrencies": ["0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c", "0x55d398326f99059ff775485246999027b3197955", "0xe9e7cea3dedca5984780bafc599bd69add087d56"],
"exchangeAddresses": ["0xca143ce32fe78f1f7019d7d551a6402fc5350c73", "0x0bfbcf9fa4f9c56b0f40a671ad40e0805a091865", "0xdb1d10011ad0ff90774d0c6bb92e5c5c8b4461f7"]
}
Similar queries
- bStocks 3am: QQQB 30-day DEX volume · BNB Chain · DEXTradeByTokens
- bStocks 3am: tokenized Tesla 30-day volume · BNB Chain · DEXTradeByTokens
- bsc token ohlcv · BNB Chain · DEXTradeByTokens
- optimized query to get pools data · Ethereum · DEXTradeByTokens
- KTI_primeiros_trades · BNB Chain · DEXTradeByTokens