historiacal_trades_v2

Returns the latest DEX trades on Ethereum, where buy currency smart contract is 0xd0b3…1a3d, sell currency smart contract is 0xd0b3…1a3d and block time since 2023-07-09: block number, block time, from, to, transaction hash, buy amount, buy buyer and 14 more fields.

By lukas · saved 6 September 2023 · run 7 times · Bitquery API v2

What it returns

Filters

The query

{
  EVM(network: eth, dataset: combined) {
    buyside: DEXTrades(
      orderBy: {descending: Block_Time}
      where: {Trade: {Buy: {Currency: {SmartContract: {is: "0xd0b3a986fff305854a7238a8e099cce1ced01a3d"}}}}, Block: {Time: {since: "2023-07-09T17:02:11Z", till: "2023-07-09T18:02:11Z"}}, TransactionStatus: {Success: true}}
    ) {
      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
        }
        Dex {
          SmartContract
          ProtocolVersion
        }
      }
    }
    sellside: DEXTrades(
      orderBy: {descending: Block_Time}
      where: {Trade: {Sell: {Currency: {SmartContract: {is: "0xd0b3a986fff305854a7238a8e099cce1ced01a3d"}}}}, Block: {Time: {since: "2023-07-09T17:02:11Z", till: "2023-07-09T18:02:11Z"}}, TransactionStatus: {Success: true}}
    ) {
      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
        }
        Dex {
          SmartContract
          ProtocolVersion
        }
      }
    }
  }
}

Similar queries