Get initial 1m OHLC of solana coins

Returns DEX trades by token on Solana, where currency mint address is 4RzsP7…bonk or 7cckzm…nevc, side currency mint address is So1111…1112 and trade price asymmetry is below 0.5, sorted by block time: block time, price in USD, currency mint address, currency name and currency symbol.

By Michael Luis · saved 16 July 2025 · Bitquery API v2

What it returns

Filters

The query

query getOHLC($tokens: [String!], $interval: Int, $limit: Int) {
        Solana (dataset: combined) {
            DEXTradeByTokens(
                orderBy: {ascendingByField: "Block_Time"}
                where: {
                    Trade: {
                        Currency: {MintAddress: {in: $tokens}},
                        Side: {Currency: {MintAddress: {is: "So11111111111111111111111111111111111111112"}}},
                        PriceAsymmetry: {lt: 0.5}
                    }
                }
                limitBy: {count: $limit, by: Trade_Currency_MintAddress}
            ) {
                Block {
                   Time(interval: { count: $interval, in: minutes })
                }
                Trade {
                    open: PriceInUSD(minimum: Block_Slot)
                    close: PriceInUSD(maximum: Block_Slot)
                    Currency {
                        MintAddress
                        Name
                        Symbol
                    }
                }
            }
        }
    }

Variables

{
  "tokens": ["4RzsP7jYP77qkwXKXorJi3hK87suGqcWxM3Mc8eUbonk", "7cckzmrxbpfhwyzgpqpukl6beywaetsnhwnwe3jenevc"],
  "interval": 1,
  "limit": 1
}

Similar queries