token-trades both buy sell

token-trades-bw-a-time both buy and sell on uniswap

Returns the latest 10 DEX trades on Ethereum, where buy currency smart contract is 0x6982…1933, sell currency smart contract is 0x5283…8b44 and sell buyer is 0x1111…0582: block number, block time, from, to, transaction hash, buy amount, buy buyer and 12 more fields.

By Emmanuel Ajala · saved 30 April 2024 · run 2 times · Bitquery API v2

What it returns

Filters

The query

{
  EVM(dataset: combined, network: eth) {
    buyside: DEXTrades(
      limit: {count: 10}
      orderBy: {ascending: Block_Time}
      where: {Trade: {Buy: {Currency: {SmartContract: {is: "0x6982508145454ce325ddbe47a25d4ec3d2311933"}}}}, Block: {Time: {after: "2023-04-21T20:33:47Z"}}}
    ) {
      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(
      limit: {count: 10}
      orderBy: {descending: Block_Time}
      where: {Trade: {Sell: {Currency: {SmartContract: {is: "0x5283d291dbcf85356a21ba090e6db59121208b44"}}, Buyer: {is: "0x1111111254eeb25477b68fb85ed929f73a960582"}}}, Block: {Time: {since: "2023-03-03T01:00:00Z", till: "2023-03-05T05:15:23Z"}}}
    ) {
      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