Any-Keyword-Example

Returns 10 DEX trades, where buy currency smart contract is 0xC02a…6Cc2 and sell currency smart contract is 0xdac1…1ec7: buy currency symbol, buy smart contract, buy currency name, sell smart contract, sell currency symbol and sell currency name.

By Kshitij Mahajan · saved 8 July 2024 · Bitquery API v2

What it returns

Filters

The query

query MyQuery {
  EVM {
    DEXTrades(
      where: {
        any: {
          Trade: {
            Buy: {
              Currency: {
                SmartContract: {
                  is: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
                }
              }
            },
            Sell: {
              Currency: {
                SmartContract: {
                  is: "0xdac17f958d2ee523a2206206994597c13d831ec7"
                }
              }
            }
          }
        }
      }
      limit: {count: 10}
    ) {
      Trade {
        Buy {
          Currency {
            Symbol
            SmartContract
            Name
          }
        }
        Sell {
          Currency {
            SmartContract
            Symbol
            Name
          }
        }
      }
    }
  }
}

Similar queries