> ## Documentation Index
> Fetch the complete documentation index at: https://goldrush.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Streaming API Overview

> The GoldRush Streaming API provides real-time updates on blockchain events, including token balances, new DEX pairs, wallet activity, and OHLCV price data. This API is ideal for applications that require immediate notifications or updates on blockchain activities. The API is offered via GraphQL endpoints allowing developers to filter for specific chains, or DEXes and to start real-time subscriptions.

export const StreamingWsUrl = () => {
  const url = "wss://streaming.goldrushdata.com/graphql";
  const [copied, setCopied] = React.useState(false);
  const handleCopy = () => {
    navigator.clipboard.writeText(url);
    setCopied(true);
    setTimeout(() => setCopied(false), 2000);
  };
  return <Card icon="signal-stream" title="WebSocket Endpoint">
      <div style={{
    display: "flex",
    alignItems: "center",
    gap: "8px"
  }}>
        <code>{url}</code>
        <button onClick={handleCopy} title="Copy to clipboard" style={{
    background: "none",
    border: "none",
    cursor: "pointer",
    padding: "2px",
    display: "inline-flex",
    opacity: 0.6
  }}>
          {copied ? <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#22c55e" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
              <polyline points="20 6 9 17 4 12" />
            </svg> : <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
              <rect x="9" y="9" width="13" height="13" rx="2" ry="2" />
              <path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" />
            </svg>}
        </button>
      </div>
    </Card>;
};

Every stream delivers refined, structured data - decoded swaps, transfers, bridge events and more with full token metadata and USD pricing. [Learn how our Medallion Architecture works →](/resources/medallion-architecture)

## Connection Details

<StreamingWsUrl />

<Note>
  The Streaming API uses the [GraphQL over WebSocket](https://github.com/enisdenjo/graphql-ws/blob/master/PROTOCOL.md) protocol. The recommended approach is to use the official [TypeScript Client SDK](https://www.npmjs.com/package/@covalenthq/client-sdk) which manages all WebSocket connections automatically.
</Note>

## Use Cases

<Columns cols={3}>
  <Card title="Trading Bots" img="https://www.datocms-assets.com/86369/1748642802-streaming-api-products-ohlcv.png">
    Power your bots with new pairs, pair liquidity changes, OHLCV pricing data,
    and wallet activity to copy trade.
  </Card>

  <Card title="Gaming" img="https://www.datocms-assets.com/86369/1748642719-streaming-api-products-gamefi.png">
    Stream inventory balances and onchain game state right into your game engine
    with no lag or polling.
  </Card>

  <Card title="AI Agents" img="https://www.datocms-assets.com/86369/1748642703-streaming-api-products-ai.png">
    Power your AI Agents with streaming wallet information to build novel
    co-pilot apps.
  </Card>

  <Card title="Perps & Derivatives" img="https://www.datocms-assets.com/86369/1748642802-streaming-api-products-ohlcv.png">
    Stream HyperCore fills, liquidations, funding rates, and vault actions in
    real-time. Includes data not available via the public Hyperliquid API.
  </Card>
</Columns>

## Available Streams

The GoldRush Streaming API offers the following streams:

## Subscriptions

* [**OHLCV Tokens Stream**](/api-reference/streaming-api/subscriptions/ohlcv-tokens-stream): The OHLCV Tokens stream provides real-time updates on the Open, High, Low, Close prices and Volume of one or many tokens at configurable intervals.The `token_addresses` input is limited to a maximum of 5 addresses per subscription.

* [**OHLCV Pairs Stream**](/api-reference/streaming-api/subscriptions/ohlcv-pairs-stream): The OHLCV Pairs stream provides real-time updates on the Open, High, Low, Close prices and Volume of one or many token pairs at configurable intervals.The `pair_addresses` input is limited to a maximum of 5 addresses per subscription.

* [**New DEX Pairs Stream**](/api-reference/streaming-api/subscriptions/new-dex-pairs-stream): The New DEX Pairs stream provides real-time updates when **new liquidity pairs** are created on decentralized exchanges (DEXes).

* [**Update Pairs Stream**](/api-reference/streaming-api/subscriptions/update-pairs-stream): The Update Pairs stream provides real-time updates on the prices, volumes, market cap and liquidity of one or many token pairs.The `pair_addresses` input is limited to a maximum of 5 addresses per subscription.

* [**Wallet Activity Stream**](/api-reference/streaming-api/subscriptions/wallet-activity-stream): The Wallet Activity stream provides real-time updates on wallet transactions, token transfers, and interactions with smart contracts.The `wallet_addresses` input is limited to a maximum of 1000 addresses per subscription on HyperCore, and a maximum of 100 addresses per subscription on EVM chains and Solana.

* [**Update Tokens Stream**](/api-reference/streaming-api/subscriptions/update-tokens-stream): The Update Tokens stream provides real-time updates on the prices, volumes, market cap and liquidity of one or many tokens by tracking the highest-volume pool for each token.The `token_addresses` input is limited to a maximum of 5 addresses per subscription.

## Queries

* [**Token Search Query**](/api-reference/streaming-api/queries/token-search-query): This GraphQL query lets you discover actively traded tokens that match a keyword or ticker symbol. Each result includes pricing, volume marketcap, and base/quote metadata. Use it to build comprehensive token search features.

* [**Top Trader Wallets for Token Query**](/api-reference/streaming-api/queries/upnl-for-token-query): This GraphQL query returns the top 20 trader wallets - ranked by trading volume over the last 30 days - for a specific token, along with detailed information about their holdings, transaction activity, and realized and unrealized profit/loss metrics.

* [**Wallet PnL by Token Query**](/api-reference/streaming-api/queries/upnl-for-wallet-query): This GraphQL query provides detailed financial metrics, including unrealized and realized profit and loss (PnL), current balance, and transaction insights for each token held by a specific wallet address.

* [**OHLCV Tokens Query**](/api-reference/streaming-api/queries/ohlcv-tokens-query): The OHLCV Tokens query returns historical Open, High, Low, Close prices and Volume for one or many tokens at configurable intervals as a one-shot response. Use this when you need a historical fetch rather than a live stream - the request and response shapes are identical to the [OHLCV Tokens Stream](/api-reference/streaming-api/subscriptions/ohlcv-tokens-stream) subscription. The `token_addresses` input is limited to a maximum of 5 addresses per query.

* [**OHLCV Pairs Query**](/api-reference/streaming-api/queries/ohlcv-pairs-query): The OHLCV Pairs query returns historical Open, High, Low, Close prices and Volume for one or many token pairs at configurable intervals as a one-shot response. Use this when you need a historical fetch rather than a live stream - the request and response shapes are identical to the [OHLCV Pairs Stream](/api-reference/streaming-api/subscriptions/ohlcv-pairs-stream) subscription. The `pair_addresses` input is limited to a maximum of 5 addresses per query.

## Price Feed Sources

Price feeds used in the GoldRush Streaming API are sourced in the following ways:

1. **DEX swap events** - prices are derived from onchain trades in specific pools across the [supported DEXes](/goldrush-streaming-api/supported-chains). Prices update with each swap event.
2. **Onchain oracle price feeds** - on select chains and for specific tokens, prices are pushed onchain by oracle providers (e.g. [Redstone Bolt](https://redstone.finance/) on MegaETH), delivering CEX-aggregated prices at much higher update frequencies.

See the [OHLCV Tokens Stream](/api-reference/streaming-api/subscriptions/ohlcv-tokens-stream#supported-token-price-feeds) for the full list of supported oracle price feeds.

## Access via GoldRush CLI

You can also access Streaming API data directly from your terminal using [GoldRush CLI](/goldrush-cli/overview) - no code or WebSocket setup required:

| CLI Command                                                           | Streaming API Equivalent                                                                    |
| --------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`goldrush new_pairs`](/goldrush-cli/commands#goldrush-new_pairs)     | [New DEX Pairs Stream](/api-reference/streaming-api/subscriptions/new-dex-pairs-stream)     |
| [`goldrush ohlcv_pairs`](/goldrush-cli/commands#goldrush-ohlcv_pairs) | [OHLCV Pairs Stream](/api-reference/streaming-api/subscriptions/ohlcv-pairs-stream)         |
| [`goldrush watch`](/goldrush-cli/commands#goldrush-watch)             | [Wallet Activity Stream](/api-reference/streaming-api/subscriptions/wallet-activity-stream) |
| [`goldrush traders`](/goldrush-cli/commands#goldrush-traders)         | [uPnL for Token Query](/api-reference/streaming-api/queries/upnl-for-token-query)           |
| [`goldrush search`](/goldrush-cli/commands#goldrush-search)           | [Token Search Query](/api-reference/streaming-api/queries/token-search-query)               |
