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

# SDKs

> Typed client libraries for TypeScript, Python, Go and Rust — idiomatic wrappers over REST, GraphQL and WebSocket.

The ChainStream SDKs give you a single, ergonomic way to call every data product from your language of choice. The same [data products](/en/docs/data-products/overview) and [access methods](/en/docs/access-methods/overview) — just typed, batteries-included.

## Languages

<CardGroup cols={2}>
  <Card title="TypeScript" icon="js" href="/en/sdks/typescript">
    `@chainstream-io/sdk` — first-class support for browser and Node.
  </Card>

  <Card title="Python" icon="python" href="/en/sdks/python">
    `chainstream` — async-first client, friendly for notebooks and bots.
  </Card>

  <Card title="Go" icon="golang" href="/en/sdks/go">
    `github.com/chainstream-io/chainstream-go` — idiomatic Go.
  </Card>

  <Card title="Rust" icon="rust" href="/en/sdks/rust">
    `chainstream` crate — for latency-critical consumers.
  </Card>
</CardGroup>

## Install

```bash theme={null}
npm install @chainstream-io/sdk          # TypeScript
pip install chainstream                  # Python
go get github.com/chainstream-io/chainstream-go
cargo add chainstream                    # Rust
```

## First call — TypeScript

```ts theme={null}
import { ChainStream } from "@chainstream-io/sdk";

const cs = new ChainStream({ apiKey: process.env.CHAINSTREAM_API_KEY! });

const results = await cs.token.search({
  chain: "solana",
  keyword: "USDC",
  limit: 5,
});

for (const t of results) {
  console.log(t.symbol, t.priceUsd);
}
```

## Common patterns

* **REST** — `cs.token.*`, `cs.wallet.*`, `cs.trade.*`, `cs.ranking.*`, `cs.dex.*` ...
* **WebSocket** — `cs.stream.subscribeTokenTrade({ chain, tokenAddress, callback })` (and parallel methods for candles, stats, holders, wallets, rankings, pools)
* **GraphQL** — `cs.gql(query, variables)` returns a fully typed result via codegen
* **CLI bridge** — `cs.cli("market", "trending", { chain: "sol", duration: "24h" })` runs the same logic as `chainstream market trending --chain sol --duration 24h`

## When to use

* Integrating into an application — almost always the right default
* When you want types, retries, error mapping and pagination handled for you
* When you want to swap REST ↔ WebSocket for the same resource without rewriting

When **not** to: quick one-offs where `curl` + REST is faster (or CLI).

## Next

<CardGroup cols={2}>
  <Card title="SDK catalog" icon="box" href="/en/sdks/overview">
    Per-language guides and release notes.
  </Card>

  <Card title="Reference" icon="code" href="/en/api-reference/overview">
    Underlying REST / GraphQL / WebSocket surfaces.
  </Card>
</CardGroup>
