PerDayTransactionDetailsSubscription

Streams the latest 10 DEX trades by token as they happen, where currency smart contract is 0xc02a…6cc2 and side currency smart contract is 0xdac1…1ec7: block date, sum of trade amount, trade price, currency name, protocol name, smart contract, side currency name and 2 more fields.

By George · saved 18 March 2024 · Bitquery API v2

What it returns

Filters

The subscription

subscription  MyQuery {
  EVM(mempool: false) {
    DEXTradeByTokens(
      orderBy: {descending: Block_Date}
      where: {Trade: {Currency: {SmartContract: {is: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}}, Side: {Currency: {SmartContract: {is: "0xdac17f958d2ee523a2206206994597c13d831ec7"}}}}}
      limit: {count: 10}
    ) {
      Block {
        Date(interval: {in: days, count: 1})
      }
      volume: sum(of: Trade_Amount)
      Trade {
        high: Price(maximum: Trade_Price)
        low: Price(minimum: Trade_Price)
        open: Price(minimum: Block_Number)
        close: Price(maximum: Block_Number)
        Currency {
          Name
        }
        Dex {
          ProtocolName
          SmartContract
        }
        Side {
          Currency {
            Name
            SmartContract
          }
        }
      }
      tx_count:count(if: {TransactionStatus: {Success: false}})
    }
  }
}

Similar queries