custom_pairs_query

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 2021-06-09, sorted by volume, highest first: sum of trade side amount in USD, count, owner address, price in USD, side currency symbol, side smart contract, currency symbol and 3 more fields.

By strikex admin acct · saved 3 July 2024 · run 1 time · 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}}, PriceInUSD: {gt: 0, lt: 4000}, Currency: {Name: {startsWith: ""}, Symbol: {notLike: ""}}}, Block: {Time: {since: $from, till: $till}}}
    ) {
      volume: sum(of: Trade_Side_AmountInUSD)
      count
      Trade {
        Dex {
          OwnerAddress
        }
        open: PriceInUSD(minimum: Block_Number)
        close: PriceInUSD(maximum: Block_Number)
        close2: PriceInUSD(
          minimum: Block_Time
          if: {Block: {Time: {after: "2024-06-10T05:20:30Z"}}}
        )
        Side {
          Currency {
            Symbol
            SmartContract
          }
        }
        Currency {
          Symbol
          SmartContract
          Decimals
          Name
        }
      }
    }
  }
}

Variables

{
  "exchangeAddresses": [
    "0xca143ce32fe78f1f7019d7d551a6402fc5350c73",
    "0x0bfbcf9fa4f9c56b0f40a671ad40e0805a091865",
    "0xdb1d10011ad0ff90774d0c6bb92e5c5c8b4461f7"
  ],
  "from": "2021-06-09T10:20:30Z",
  "limit": 1000,
  "network": "bsc",
  "quoteCurrencies": [
    "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c",
    "0x55d398326f99059ff775485246999027b3197955",
    "0xe9e7cea3dedca5984780bafc599bd69add087d56"
  ],
  "till": "2024-06-10T10:20:30Z"
}

Similar queries