Get NFT trades by token

Historical data This query uses the realtime dataset (the default), which holds only a recent window - hours to days depending on the cube. For older data add a dataset to the top-level element: EVM(network: eth, dataset: combined) archive full history combined archive + realtime in one result Ar

By gaurav · saved 11 June 2025 · run 8 times · Bitquery API v2

What it returns

Filters

The query

# Historical data
#   This query uses the realtime dataset (the default), which holds only a
#   recent window - hours to days depending on the cube.
#
#   For older data add a dataset to the top-level element:
#
#     EVM(network: eth, dataset: combined)
#
#     archive   full history
#     combined  archive + realtime in one result
#
#   Archive and combined need the historical data add-on:
#   https://bitquery.io/pricing
#
# Datasets:  https://docs.bitquery.io/docs/graphql/dataset/archive/
# Retention: https://docs.bitquery.io/docs/graphql/data-coverage-retention/
#

query MyQuery {
  EVM(dataset: realtime, network: eth) {
    DEXTrades(
      where: {Trade: {Buy: {Currency: {SmartContract: {is: "0x59a498d8cb5f0028591c865c44f55e30b76c9611"}}, Ids: {includes: {eq: "3528"}}}}}
      limit: {count: 10}
      orderBy: {descending: Block_Time}
    ) {
      Trade {
        Buy {
          Currency {
            Name
            ProtocolName
            Symbol
            Fungible
            SmartContract
          }
          Amount
          Buyer
          Ids
          Price
          URIs
        }
        Sell {
          Currency {
            Name
            ProtocolName
            Symbol
            Decimals
            Fungible
            SmartContract
          }
          Amount
          Buyer
          Ids
          URIs
        }
      }
      Block {
        Time
        Number
      }
    }
  }
}

Similar queries