table screen with filters

Returns the latest 20 DEX trades by token on Polygon, where currency smart contract is 0x53e0…ad39, block date after 2024-05-04 and trade amount in USD is at least 2000.0: transaction hash, transaction time, buyer, seller, trade amount, amount in USD, currency symbol and 6 more fields.

By Nadia · saved 18 June 2024 · run 1 time · Bitquery API v2

What it returns

Filters

The query

query ($network: evm_network, $mempool: Boolean, $currency_filter: EVM_DEXTradeByToken_Input_Trade_Currency_InputType, $amount_usd_filter: EVM_Amount_With_Decimals, $price_usd_filter: OLAP_Float, $price_assymetry_filter: OLAP_Float) {
  EVM(network: $network, mempool: $mempool, dataset: combined) {
    DEXTradeByTokens(
      orderBy: {descending: Block_Number}
      limit: {count: 20}
      where: {Trade: {Currency: $currency_filter, AmountInUSD: $amount_usd_filter, PriceInUSD: $price_usd_filter, PriceAsymmetry: $price_assymetry_filter}, Block: {Date: {after: "2024-05-04"}}}
    ) {
      Transaction {
        Hash
        Time
      }
      Trade {
        Buyer
        Seller
        Amount
        AmountInUSD
        Currency {
          Symbol
          SmartContract
        }
        Price
        PriceInUSD
        PriceAsymmetry
        Side {
          Currency {
            SmartContract
            Symbol
          }
        }
      }
    }
  }
}

Variables

{
  "network": "matic",
  "mempool": false,
  "currency_filter": {
    "SmartContract": {
      "is": "0x53e0bca35ec356bd5dddfebbd1fc0fd03fabad39"
    }
  },
  "amount_usd_filter": {
    "ge": "2000.0"
  },
  "price_usd_filter": {
    "ge": 13.59
  },
  "price_assymetry_filter": {
    "ge": 0.001
  }
}

Similar queries