ws-Library

Returns the latest DEX trades by token on Base, where block time since 2025-03-02 and block time till 2025-03-03: block time, transaction hash, buyer, seller, trade amount, amount in USD, price in USD and 13 more fields.

By Maximiliano Malvido · saved 3 March 2025 · run 10 times · Bitquery API v2

What it returns

Filters

The query

query getLibraryTokenTradesByDates($dataset: dataset_arg_enum!, $network: evm_network!, $wallets: [String!], $since: DateTime!, $till: DateTime!) {
  EVM(dataset: $dataset, network: $network) {
    DEXTradeByTokens(
      orderBy: {descending: Block_Time}
      where: {Trade: {Success: true}, Block: {Time: {since: $since, till: $till}}, any: [{Trade: {Seller: {in: $wallets}}}, {Trade: {Buyer: {in: $wallets}}}]}
    ) {
      Block {
        Time
      }
      Transaction {
        Hash
      }
      Trade {
        Buyer
        Seller
        Amount
        AmountInUSD
        PriceInUSD
        Currency {
          Symbol
          SmartContract
          Name
          Decimals
        }
        Side {
          Type
          Currency {
            Symbol
            SmartContract
            Name
            Decimals
          }
          AmountInUSD
          Amount
        }
        Dex {
          ProtocolFamily
          ProtocolName
        }
      }
    }
  }
}

Variables

{
  "dataset": "combined",
  "network": "base",
  "wallets": ["0x5DD0eb7b28dA436eD9439D9286472988C4c0eE83"],
  "since": "2025-03-02T14:12:52.937Z",
  "till": "2025-03-03T14:12:52.937Z"
}

Similar queries