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)

By prisma · saved 7 January 2025 · run 8 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(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