SushiSwapWETH/USDC pair 2021 attempt

Returns 1000 DEX trades on Ethereum, where buy currency smart contract is 0xc02a…6cc2 or 0xa0b8…eb48, sell currency smart contract is 0xc02a…6cc2 or 0xa0b8…eb48 and DEX protocol name is sushiswap_v1, sorted by block time: block time, block number, transaction hash, gas price, protocol name, smart contract, buy currency symbol and 7 more fields.

By Naruto · saved 6 May 2025 · run 2 times · Bitquery API v2

What it returns

Filters

The query

query ETH_USDC_PoolHistoricalData {
  EVM(dataset: archive, network: eth) {
    trades: DEXTrades(
      where: {
        Trade: {
          Dex: {
            ProtocolName: {is: "sushiswap_v1"}
          },
          Buy: {
            Currency: {
              SmartContract: {
                in: [
                  "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", # WETH
                  "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"  # USDC
                ]
              }
            }
          },
          Sell: {
            Currency: {
              SmartContract: {
                in: [
                  "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", # WETH
                  "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"  # USDC
                ]
              }
            }
          }
        },
        Block: {
          Time: {
            since: "2023-06-01T00:00:00Z", 
            till: "2023-06-09T00:00:00Z"
          }
        }
      }
      orderBy: {ascending: Block_Time}
      limit: {count: 1000}
    ) {
      Block {
        Time
        Number
      }
      Transaction {
        Hash
        GasPrice
      }
      Trade {
        Dex {
          ProtocolName
          SmartContract
        }
        Buy {
          Currency {
            Symbol
            SmartContract
          }
          Amount
          Price
        }
        Sell {
          Currency {
            Symbol
            SmartContract
          }
          Amount
          Price
        }
      }
    }
  }
}

Similar queries