Prices v1 (ticket)

Prices comparison from v1

Returns the latest DEX trades on Ethereum and BNB Chain, where sell currency is 0x59f4…539a, tx sender is 0xb3d7…edf7 and buy currency is 0x59f4…539a: trade amount, gas value, address address, transaction hash, tx from address, block height and trade index.

By Euss · saved 29 May 2024 · run 4 times · Bitquery API v1

What it returns

Filters

The query

query MyQuery($token_address: String!, $tx_sender: [String!]) {
  ethereum(network: bsc) {
    buy_pnl: dexTrades(
      sellCurrency: {is: $token_address}
      txSender: {in: $tx_sender}
      options: {asc: "tradeIndex", desc: "block.height", limitBy: {each: "transaction.hash", limit: 1}}
    ) {
      tradeAmount(in: USD)
      gasValue(in: USD)
      smartContract {
        address {
          address
        }
      }
      transaction {
        hash
        txFrom {
          address
        }
      }
      block {
        height
      }
      tradeIndex
    }
    sell_pnl: dexTrades(
      buyCurrency: {is: $token_address}
      txSender: {in: $tx_sender}
      options: {asc: "tradeIndex", desc: "block.height", limitBy: {each: "transaction.hash", limit: 1}}
    ) {
      tradeAmount(in: USD)
      gasValue(in: USD)
      smartContract {
        address {
          address
        }
      }
      transaction {
        hash
        txFrom {
          address
        }
      }
      block {
        height
      }
      tradeIndex
    }
  }
}

Variables

{"token_address": "0x59f4f336bf3d0c49dbfba4a74ebd2a6ace40539a", "tx_sender": ["0xb3d78021e71e5483d17d7ac089c68768ff52edf7"]}

Similar queries