Latest Trades of Token

Returns the latest 10 DEX trades by token on Arbitrum, where currency smart contract is 0x82af…bab1, currency smart contract is not 0x and side currency smart contract is not 0x: chain ID, block number, block time, seller, buyer, trade amount, smart contract and 6 more fields.

By Nadia · saved 21 August 2023 · run 1 time · Bitquery API v2

What it returns

Filters

The query

query ($network: evm_network, $from: String, $till: String, $limit: Int!, $token: String!) {
  EVM(network: $network, dataset: combined) {
    DEXTradeByTokens(
      orderBy: {descending: Block_Number}
      limit: {count: $limit}
      where: {Trade: {Currency: {SmartContract: {is: $token, not: "0x"}}, Side: {Currency: {SmartContract: {not: "0x"}}}, Seller: {not: "0x"}, Buyer: {not: "0x"}}, Block: {Date: {till: $till, since: $from}}}
    ) {
      ChainId
      Block {
        Number
        Time
      }
      Trade {
        Seller
        Buyer
        Amount
        Currency {
          SmartContract
          Symbol
        }
        Price
        Side {
          Amount
          Currency {
            SmartContract
            Symbol
          }
        }
      }
      Transaction {
        Hash
      }
    }
  }
}

Variables

{
  "network": "arbitrum",
  "limit": 10,
  "offset": 0,
  "token": "0x82af49447d8a07e3bd95bd0d56f35241523fbab1",
  "from": "2023-08-19",
  "till": "2023-08-21"
}

Similar queries