> ## 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.

# Solana API Quickstart

> Three quickstarts for Solana on GoldRush: SPL token balances (REST), new DEX pair stream, and DEX swaps to a warehouse.

Pick the path that matches what you're building. All three use the same GoldRush API key.

## Prerequisites

A GoldRush API key. Sign up at [goldrush.dev/platform](https://goldrush.dev/platform/auth/register/).

<CardGroup cols={2}>
  <Card icon="wand-magic-sparkles" title="Vibe Coders" href="https://goldrush.dev/platform/auth/register/?plan=vibe">
    \$10/mo - Built for solo builders and AI-native workflows.
  </Card>

  <Card icon="users" title="Teams" href="https://goldrush.dev/platform/auth/register/?plan=professional">
    \$250/mo - Production-grade with priority support.
  </Card>
</CardGroup>

***

## 1. Look up SPL token balances

Get SPL token balances and native SOL for any base58 wallet address.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api.covalenthq.com/v1/solana-mainnet/address/4ZJhPQAgUseCsWhKvJLTmmRRUV74fdoTpQLNfKoekbPY/balances_v2/" \
    -H "Authorization: Bearer $GOLDRUSH_API_KEY"
  ```

  ```typescript TypeScript theme={null}
  import { GoldRushClient } from "@covalenthq/client-sdk";

  const client = new GoldRushClient(process.env.GOLDRUSH_API_KEY);

  const resp = await client.BalanceService.getTokenBalancesForWalletAddress({
    chainName: "solana-mainnet",
    walletAddress: "4ZJhPQAgUseCsWhKvJLTmmRRUV74fdoTpQLNfKoekbPY",
  });

  for (const token of resp.data.items) {
    console.log(`${token.contract_ticker_symbol}: ${token.balance} (${token.pretty_quote})`);
  }
  ```

  ```python Python theme={null}
  import os
  import requests

  resp = requests.get(
      "https://api.covalenthq.com/v1/solana-mainnet/address/"
      "4ZJhPQAgUseCsWhKvJLTmmRRUV74fdoTpQLNfKoekbPY/balances_v2/",
      headers={"Authorization": f"Bearer {os.environ['GOLDRUSH_API_KEY']}"},
  )

  for item in resp.json()["data"]["items"]:
      print(item["contract_ticker_symbol"], item["balance"], item.get("pretty_quote"))
  ```
</CodeGroup>

Balances are returned with `contract_address` as the base58 mint pubkey, `contract_decimals` from the Mint account, and USD `quote` where pricing is available.

<Card title="Foundational on Solana walkthrough" icon="bolt" href="/goldrush-solana/foundational/wallet">
  SPL token balance details and request shape.
</Card>

***

## 2. Stream new DEX pairs

Subscribe to new DEX pairs on Solana over a WebSocket.

```graphql GraphQL Subscription theme={null}
subscription {
  newPairs(chain_name: SOLANA_MAINNET) {
    block_signed_at
    protocol
    pair_address
    base_token { contract_address contract_ticker_symbol contract_decimals }
    quote_token { contract_address contract_ticker_symbol contract_decimals }
    liquidity
  }
}
```

Connect via WebSocket at `wss://streaming.goldrushdata.com/graphql` with your API key. See [DEX firehose](/goldrush-solana/streaming/dex-firehose) for the full pattern.

***

## 3. Pipe SPL transfers to your warehouse

Stream decoded SPL token transfers into ClickHouse, BigQuery, Postgres, Kafka, or S3.

<Steps>
  <Step title="Create a pipeline">
    In the [GoldRush Platform](https://goldrush.dev/platform/), navigate to **Manage Pipelines** and click **Create Pipeline**.
  </Step>

  <Step title="Pick Solana + Transfers">
    Choose **Solana** as the chain and **Transfers** as the data type. The companion `Swaps` data type for decoded DEX trades is also available.
  </Step>

  <Step title="Choose your destination">
    Connect ClickHouse, BigQuery, Postgres, Kafka, S3/GCS/R2, SQS, or a Webhook.
  </Step>

  <Step title="Deploy">
    Decoded transfers begin flowing within seconds.
  </Step>
</Steps>

Full walkthrough with sample SQL: [SPL Transfers warehouse recipe](/goldrush-solana/warehouse/spl-transfers) and [DEX Swaps warehouse recipe](/goldrush-solana/warehouse/dex-swaps).

***

## What's next

<CardGroup cols={2}>
  <Card title="Foundational endpoints" icon="server" href="/goldrush-solana/foundational/overview">
    SPL token balances on `solana-mainnet`.
  </Card>

  <Card title="DEX firehose" icon="chart-candlestick" href="/goldrush-solana/streaming/dex-firehose">
    `newPairs` subscription on `SOLANA_MAINNET`.
  </Card>

  <Card title="Wallet activity" icon="signal-stream" href="/goldrush-solana/streaming/wallet-activity">
    `walletTxs` subscription on `SOLANA_MAINNET`.
  </Card>

  <Card title="OHLCV markets" icon="chart-line" href="/goldrush-solana/streaming/ohlcv-markets">
    Real-time OHLCV candles by pool or token.
  </Card>

  <Card title="DEX swaps to your warehouse" icon="database" href="/goldrush-solana/warehouse/dex-swaps">
    Decoded swaps via the Pipeline API.
  </Card>

  <Card title="SPL transfers to your warehouse" icon="warehouse" href="/goldrush-solana/warehouse/spl-transfers">
    Decoded SPL transfers via the Pipeline API.
  </Card>

  <Card title="GoldRush vs Solana RPC" icon="circle-info" href="/resources/differentiate-your-solana-app">
    What GoldRush adds on top of plain Solana RPC.
  </Card>
</CardGroup>
