top and latest trades

Returns the latest DEX trades by token on Ethereum, where currency smart contract is 0xa0b8…eb48 and trade price asymmetry is at most 0.5: trade amount, amount in USD, price in USD, trade price, currency name, side currency name, side currency symbol and 2 more fields.

By Kshitij Mahajan · saved 25 February 2025 · Bitquery API v2

What it returns

Filters

The query

query MyQuery {
  EVM(dataset: combined, network: eth) {
    topTrades:DEXTradeByTokens(
      where: {Trade: {PriceAsymmetry: {le: 0.5}, Currency: {SmartContract: {is: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"}}}}
      orderBy: {descending: Trade_PriceInUSD}
    ) {
      Trade {
        Amount
        AmountInUSD
        PriceInUSD
        Price
        Currency{
          Name
          
        }
        Side{
          Currency{
            Name
            Symbol
            SmartContract
          }
        }
      }
    }
    latestTrades:DEXTradeByTokens(
      where: {Trade: {Currency: {SmartContract: {is: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"}}}}
      orderBy: {descending: Block_Time}
    ) {
      Block{
        Time
      }
      Trade{
        Amount
        AmountInUSD
        PriceInUSD
        Price
        Currency{
          Name
          
        }
        Side{
          Currency{
            Name
            Symbol
            SmartContract
          }
        }
      }
    }
  }
}

Similar queries