Slow query

Returns 25000 DEX trades on Ethereum, where buy currency smart contract is 0x7a76…e05c, sell currency smart contract is 0xc02a…6cc2 and sell currency smart contract is 0x7a76…e05c: buy amount, buy currency symbol, buy decimals, sell amount, sell smart contract, sell currency symbol, sell decimals and 4 more fields.

By Alpha Spotter · saved 23 December 2024 · run 8 times · Bitquery API v2

What it returns

Filters

The query

query MyQuery {
  EVM(dataset: combined, mempool: false, network: eth) {
    BuyTrades: DEXTrades(
      where: {
        Trade: {
          Buy: { Currency: { SmartContract: { is: "0x7a76db883446022ecbc86b9280e34055ec1be05c" }}},
          Sell: { Currency: { SmartContract: { is: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2" }}}
        }
      }
      limit: {count: 25000}
    ) {
      Trade {
        Buy {
          Amount
          Currency {
            Symbol
            Decimals
          }
        }
        Sell {
          Amount
          Currency {
            SmartContract
            Symbol
            Decimals
          }
        }
      }
      Transaction {
        Hash
        From
      }
      Block {
        Time
      }
      Fee {
        SenderFee
      }
    }
    SellTrades: DEXTrades(
      where: {
        Trade: {
          Sell: { Currency: { SmartContract: { is: "0x7a76db883446022ecbc86b9280e34055ec1be05c" }}},
          Buy: { Currency: { SmartContract: { is: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2" }}}
        }
      }
      limit: {count: 25000}
    ) {
      Trade {
        Buy {
          Amount
          Currency {
            Symbol
            Decimals
          }
        }
        Sell {
          Amount
          Currency {
            SmartContract
            Symbol
            Decimals
          }
        }
      }
      Transaction {
        Hash
        From
      }
      Block {
        Time
      }
      Fee {
        SenderFee
      }
    }
  }
}

Similar queries