Trades / USDC

Returns the latest 50 DEX trades by token on Arbitrum, where side currency smart contract is 0xaf88…5831, currency smart contract is 0x18c1…a122 and side amount is above 0: block time, owner address, protocol family, protocol name, currency symbol, smart contract, currency name and 11 more fields.

By Aleksey · saved 1 October 2024 · run 2 times · Bitquery API v2

What it returns

Filters

The query

query LatestTrades($network: evm_network, $token: String, $base: String) {
  EVM(network: $network) {
    DEXTradeByTokens(
      orderBy: {descending: Block_Time}
      limit: {count: 50}
      where: {Trade: {Side: {Amount: {gt: "0"}, Currency: {SmartContract: {is: $base}}}, Currency: {SmartContract: {is: $token}}, Price: {gt: 0}}}
    ) {
      Block {
        allTime: Time
      }
      Trade {
        Dex {
          OwnerAddress
          ProtocolFamily
          ProtocolName
        }
        Currency {
          Symbol
          SmartContract
          Name
        }
        Price
        AmountInUSD
        Amount
        Side {
          Type
          Currency {
            Symbol
            SmartContract
            Name
            Fungible
            Decimals
          }
          AmountInUSD
          Amount
        }
      }
    }
  }
}

Variables

{
  "network": "arbitrum",
  "token": "0x18c11fd286c5ec11c3b683caa813b77f5163a122",
  "base": "0xaf88d065e77c8cc2239327c5edb3a432268e5831"
}

Similar queries