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.

By strikex admin acct · saved 20 June 2024 · run 11 times · Bitquery API v2

What it returns

Filters

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