ton pair trading view pairs

Streams DEX trades by token on TON as they happen, where side smart contract address is EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs, smart contract address is EQCvxJy4eG8hyHBFsZ7eePxrRsUQSFE_jpptRAYBmcG_DOGS and side amount is above 0, sorted by block time: block time, price in USD, quantile of trade price in USD and sum of trade side amount in USD.

By Srdjan Stankovic · saved 21 October 2024 · run 1 time · Bitquery API v2

What it returns

Filters

The subscription

subscription tradingViewPairs($token: String, $base: String) {
  Ton {
    DEXTradeByTokens(
      orderBy: { ascendingByField: "Block_Time" }
      where: {
        Trade: {
          Side: {
            Amount: { gt: "0" }
            Currency: { SmartContract: { Address: { is: $token } } }
          }
          Currency: { SmartContract: { Address: { is: $base } } }
        }
      }
    ) {
      Block {
        Time(interval: { count: 5, in: minutes })
      }
      Trade {
        close: PriceInUSD(maximum: Transaction_Index)
      }
      min: quantile(of: Trade_PriceInUSD, level: 0.1)
      max: quantile(of: Trade_PriceInUSD, level: 0.9)
      volume: sum(of: Trade_Side_AmountInUSD)
    }
  }
}

Variables

{
  "token": "EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs",
  "base": "EQCvxJy4eG8hyHBFsZ7eePxrRsUQSFE_jpptRAYBmcG_DOGS"
}

Similar queries