Get pair trades data just like dexcsreener

Returns DEX trades by token on Ethereum, where currency smart contract is 0x382e…2C21 and side currency smart contract is 0xC02a…6Cc2, sorted by block time: block time, trade amount, currency symbol, price in USD, protocol name, smart contract, side amount and 9 more fields.

By Tobias ABdon · saved 4 July 2024 · run 5 times · Bitquery API v2

What it returns

Filters

The query

query{
  EVM(network: eth) {
    DEXTradeByTokens(
      orderBy: {ascending: Block_Time}
      where: {Trade: {Currency: {SmartContract: {is: "0x382ea807A61a418479318Efd96F1EFbC5c1F2C21"}}, Side: {Currency: {SmartContract: {is: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"}}}}}
    ) {
      Block{
        Time
      }
      Trade {
        Amount
        Currency {
          Symbol
        }
        PriceInUSD
        Dex {
          ProtocolName
          SmartContract
        }
        Side {
          Amount
          AmountInUSD
          Currency {
            Symbol
          }
          Buyer
          Seller
        }
        Buyer
        Seller
      }
      Transaction {
        Maker: From
        Hash
        Type
      }
    }
  }
}

Similar queries