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

> Two quickstarts for Solana on GoldRush: SPL token balances (REST) and DEX swaps to a warehouse.

Pick the path that matches what you're building. Both 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="/docs/goldrush-solana/foundational/wallet">
  SPL token balance details and request shape.
</Card>

***

## 2. 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](/docs/goldrush-solana/warehouse/spl-transfers) and [DEX Swaps warehouse recipe](/docs/goldrush-solana/warehouse/dex-swaps).

***

## What's next

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

  <Card title="DEX swaps to your warehouse" icon="database" href="/docs/goldrush-solana/warehouse/dex-swaps">
    Decoded DEX swaps landed in your warehouse.
  </Card>

  <Card title="SPL transfers to your warehouse" icon="warehouse" href="/docs/goldrush-solana/warehouse/spl-transfers">
    Decoded SPL transfers landed in your warehouse.
  </Card>

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