opsin realtime ohlc

Streams DEX trades by token on Ethereum as they happen, where side currency smart contract is 0x8ea7…fc74 and trade price asymmetry is below 0.1: block time, block number, transaction hash, from, trade index, buyer, seller and 19 more fields.

By Divyasshree · saved 4 June 2025 · Bitquery API v2

What it returns

Filters

The subscription

subscription getTokensTrades($network: evm_network!, $sideCurrencies: [String!]) {
  EVM(network: $network) {
    DEXTradeByTokens(
      where: {Trade: {Success: true, Side: {Currency: {SmartContract: {in: $sideCurrencies}}}, PriceAsymmetry: {lt: 0.1}}}
    ) {
      Block {
        Time
        Number
      }
      Transaction {
        Hash
        From
      }
      Trade {
        Index
        Buyer
        Seller
        Amount
        AmountInUSD
        PriceInUSD
        Currency {
          Symbol
          SmartContract
          Name
          Decimals
        }
        Side {
          Type
          Currency {
            Symbol
            SmartContract
            Name
            Decimals
          }
          AmountInUSD
          Amount
        }
        Dex {
          ProtocolFamily
          ProtocolName
          Delegated
          DelegatedTo
        }
        high: Price(maximum: Trade_Price)
        low: Price(minimum: Trade_Price)
        open: Price(minimum: Block_Number)
        close: Price(maximum: Block_Number)
      }
    }
  }
}

Variables

{
  "network": "eth",
  "sideCurrencies": [
    "0x8ea7c91d8af99cfb92327c333a5edd2cc26cfc74"
  ]
}

Similar queries