sellsidebuyside

Returns the latest 10 DEX trades on Ethereum, where buy currency smart contract is 0xc02a…6cc2, buy seller is 0x9dda…2c42 and sell currency smart contract is 0xc02a…6cc2: block number, block time, from, to, transaction hash, buy amount, buy buyer and 12 more fields.

By Oluwatomisin · saved 20 December 2023 · Bitquery API v2

What it returns

Filters

The query

{
  EVM(dataset: combined, network: eth) {
    buyside: DEXTrades(
      orderBy: {descending: Block_Time}
      where: {Trade: {Buy: {Currency: {SmartContract: {is: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}}, Seller: {is: "0x9dda370f43567b9c757a3f946705567bce482c42"}}}, Block: {Time: {since: "2023-01-03T01:00:00Z"}}}
      limit: {count: 10}
    ) {
      Block {
        Number
        Time
      }
      Transaction {
        From
        To
        Hash
      }
      Trade {
        Buy {
          Amount
          Buyer
          Currency {
            Name
            Symbol
            SmartContract
          }
          Seller
          Price
        }
        Sell {
          Amount
          Buyer
          Currency {
            Name
            SmartContract
            Symbol
          }
          Seller
          Price
        }
      }
    }
    sellside: DEXTrades(
      orderBy: {descending: Block_Time}
      where: {Trade: {Sell: {Currency: {SmartContract: {is: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}}, Buyer: {is: "0x9dda370f43567b9c757a3f946705567bce482c42"}}}, Block: {Time: {since: "2023-01-01T01:00:00Z"}}}
    ) {
      Block {
        Number
        Time
      }
      Transaction {
        From
        To
        Hash
      }
      Trade {
        Buy {
          Amount
          Buyer
          Currency {
            Name
            Symbol
            SmartContract
          }
          Seller
          Price
        }
        Sell {
          Amount
          Buyer
          Currency {
            Name
            SmartContract
            Symbol
          }
          Seller
          Price
        }
      }
    }
  }
}

Similar queries