opsin ohlc realtime hardcoded

Streams DEX trades by token on Ethereum as they happen, where side currency smart contract is 0xc02a…6cc2, currency smart contract is 0xa0b8…eb48 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 · run 1 time · Bitquery API v2

What it returns

Filters

The subscription

subscription {
  EVM(network: eth) {
    DEXTradeByTokens(
      where: {
        Trade: {
          Success: true,
          Side: {
            Currency: {
              SmartContract: {
                in: ["0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"]
              }
            }
          },
          PriceAsymmetry: { lt: 0.1 },
          Currency: {
            SmartContract: {
              is: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
            }
          }
        }
      }
    ) {
      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)
      }
    }
  }
}

Similar queries