Data Feeds

Connecting to Helius Geyser (Websockets)

To provide an "Onyx-grade" experience, we cannot rely on standard RPC polling. We use Helius Geyser plugins to stream account updates directly from the Solana validator.

Implementation:

  • Subscription: The frontend establishes a WebSocket connection to wss://atlas-mainnet.helius-rpc.com.

  • Filters: We subscribe specifically to the BondingCurve account addresses of tracked tokens.

  • Packet Handling: The Geyser stream sends raw binary data. The frontend decodes this using the Borsh schema defined in the SDK to update the UI instantly (sub-400ms latency).

Bitquery GraphQL Integration

For historical data and complex aggregations (e.g., "Top 10 Holders over 30 days"), we utilize Bitquery's GraphQL API.

Usage:

  • OHLCV Data: Fetching candlestick data for the TradingView charts.

  • Volume Analytics: Aggregating buy/sell volume to determine "Whale" activity.

  • Example Query:

query ($mint: String!) {
  Solana {
    DEXTrades(
      where: {Token: {Mint: {is: $mint}}}
      limit: 100
      orderBy: {descending: Block_Time}
    ) {
      Block {
        Time
      }
      Trade {
        Amount
        Price
        Side
      }
    }
  }
}

This dual-feed architecture ensures that the terminal is both fast (via Helius) and deep (via Bitquery).

Last updated