.base dex trade updated

Returns DEX trades on Base, where buy currency smart contract is 0xba0D…07Ea, transaction from is 0x558e…0e1f and sell currency smart contract is 0xba0D…07Ea: buy amount, buy amount in USD, buy smart contract, buy seller, buy buyer, sell amount, sell amount in USD and 6 more fields.

By gaurav · saved 8 June 2024 · run 4 times · Bitquery API v2

What it returns

Filters

The query

query ($address: String!) {
  EVM(network: base, dataset: combined) {
    buy: DEXTrades(
      where: {Block: {Date: {since: "2024-05-01"}}, TransactionStatus: {Success: true}, Trade: {Buy: {Currency: {SmartContract: {is: $address}}}}, Transaction: {From: {is: "0x558e4884a9e21ee3a17e41c0732e839964070e1f"}}}
      limit: {offset: 0}
    ) {
      Trade {
        Buy {
          Amount
          AmountInUSD
          Currency {
            SmartContract
          }
          Seller
          Buyer
        }
        Sell {
          Amount
          AmountInUSD
          Currency {
            SmartContract
          }
          Buyer
          Seller
        }
      }
      Transaction {
        From
        Hash
      }
      Fee {
        SenderFeeInUSD
      }
    }
    sell: DEXTrades(
      where: {Block: {Date: {since: "2024-05-01"}}, TransactionStatus: {Success: true}, Trade: {Sell: {Currency: {SmartContract: {is: $address}}}}, Transaction: {From: {is: "0x558e4884a9e21ee3a17e41c0732e839964070e1f"}}}
      limit: {offset: 0}
    ) {
      Trade {
        Buy {
          Amount
          AmountInUSD
          Currency {
            SmartContract
          }
          Seller
          Buyer
        }
        Sell {
          Amount
          AmountInUSD
          Currency {
            SmartContract
          }
          Buyer
          Seller
        }
      }
      Transaction {
        From
        Hash
      }
      Fee {
        SenderFeeInUSD
      }
    }
  }
}

Variables

{
  "address": "0xba0Dda8762C24dA9487f5FA026a9B64b695A07Ea"
}

Similar queries