historical-ohlc-for-solana

Returns the latest 10 DEX trades by token on Solana, where currency mint address is Es9vMF…wNYB, side currency mint address is So1111…1112 and block time after 2024-08-14: block time, sum of trade amount, price in USD and count.

By Joao Pansani · saved 25 April 2025 · run 2 times · Bitquery API v2

What it returns

Filters

The query

{
  Solana(dataset: archive) {
    DEXTradeByTokens(
      orderBy: { descendingByField: "Block_Timefield" }
      where: {
        Block: {
          Time: {
            after: "2024-08-14T00:00:00Z",
            before: "2024-08-14T23:59:59Z",
            since: "2024-08-14T00:00:00Z"
          }
        },
        Trade: {
          Currency: { MintAddress: { is: "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB" } },
          Side: { Currency: { MintAddress: { is: "So11111111111111111111111111111111111111112" } } },
          Amount: { gt: "0" }
        },
      },
      limit: { count: 10 }
    ) {
      Block {
        Timefield: Time(interval: { in: days, count: 1 })
      }
      volume: sum(of: Trade_Amount)
       Trade {
        maxPrice: PriceInUSD(maximum: Trade_PriceInUSD)
         minPrice: PriceInUSD(minimum: Trade_PriceInUSD)
      }
      count
    }
  }
}

Similar queries