STRX_ohlcv

Returns the latest 8000 DEX trades by token on BNB Chain, where side currency smart contract is 0xd6fd…44ec, currency smart contract is 0xbb4c…095c and DEX owner address is 0xcA14…0c73: chain ID, block time, sum of trade amount, trade price, side currency symbol, currency symbol and count.

By strikex admin acct · saved 5 April 2024 · run 8 times · Bitquery API v2

What it returns

Filters

The query

query ($network: evm_network, $interval: Int, $limit: Int, $from: String, $baseCurrency: String, $quoteCurrency: String, $timeframe: OLAP_DateTimeIntervalUnits) {
  EVM(network: $network, dataset: combined) {
    DEXTradeByTokens(
      orderBy: {descendingByField: "Block_Time"}
      limit: {count: $limit}
      where: {Trade: {Side: {Currency: {SmartContract: {is: $baseCurrency}, Symbol: {}}}, Currency: {SmartContract: {is: $quoteCurrency}, Symbol: {}}, Price: {gt: 0}, Dex: {OwnerAddress: {is: "0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73"}}, Amount: {gt: "0.000000000000000001"}}, Block: {Date: {since: $from}}}
    ) {
      ChainId
      Block {
        Time(interval: {in: $timeframe, count: $interval})
      }
      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)
        Side {
          Currency {
            Symbol
          }
        }
        Currency {
          Symbol
        }
      }
      count
    }
  }
}

Variables

{
  "network": "bsc",
  "baseCurrency": "0xd6fdde76b8c1c45b33790cc8751d5b88984c44ec",
  "quoteCurrency": "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c",
  "interval": 1,
  "timeframe": "minutes",
  "limit": 8000,
  "from": "2024-03-06"
}

Similar queries