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

# SDK installation

> Install 0xArchive SDK packages or use OpenAPI when a language package is unavailable for your runtime.

Install the 0xArchive SDK for TypeScript, Python, or Rust, set your API key, and confirm the setup with your first call. The commands below pin the version these docs describe; the unpinned Python forms are `pip install oxarchive` and `pip install 'oxarchive[websocket]'`.

<Tabs>
  <Tab title="TypeScript">
    ```bash theme={"theme":"github-dark"}
    npm install --save-exact @0xarchive/sdk@1.12.0
    ```

    The package includes the REST client, the `OxArchiveWs` WebSocket client, and the reconstruction helpers.
  </Tab>

  <Tab title="Rust">
    ```bash theme={"theme":"github-dark"}
    cargo add oxarchive@=1.12.0
    ```

    Enable the `websocket` feature when the app needs live subscriptions or replay.

    ```bash theme={"theme":"github-dark"}
    cargo add oxarchive@=1.12.0 --features websocket
    ```
  </Tab>

  <Tab title="Python">
    ```bash theme={"theme":"github-dark"}
    pip install oxarchive==1.12.0
    ```

    Add the WebSocket extra when the app needs live subscriptions, replay, or gap callbacks.

    ```bash theme={"theme":"github-dark"}
    pip install 'oxarchive[websocket]==1.12.0'
    ```
  </Tab>
</Tabs>

## Set your key

```bash theme={"theme":"github-dark"}
export OXARCHIVE_API_KEY="0xa_your_api_key"
```

Every SDK reads the key you pass to its client, so load it from the environment or your secret store, never from source code.

## Packages

| Runtime | Package |
| - | - |
| TypeScript / JavaScript | `@0xarchive/sdk`: typed REST helpers, the WebSocket client, replay helpers, and reconstruction utilities |
| Rust | `oxarchive`: async market-data clients; the `websocket` feature adds the streaming helpers |
| Python | `oxarchive`: sync and async REST helpers, Pydantic models, pagination, optional WebSocket support, and reconstruction utilities |

Source repositories: [sdk-typescript](https://github.com/0xArchiveIO/sdk-typescript) · [sdk-python](https://github.com/0xArchiveIO/sdk-python) · [sdk-rust](https://github.com/0xArchiveIO/sdk-rust).

Each venue family has its own client namespace. TypeScript and Python Spot helpers use `client.spot`; Rust Spot helpers use `client.hyperliquid.spot`. HIP-3 and HIP-4 helpers sit under `client.hyperliquid.*`. In Python, import `Client` for REST and `OxArchiveWs` for WebSocket work once the `websocket` extra is installed. When the installed version has no helper for a route family you need, call that route over REST or generate a client from [OpenAPI](/openapi).

## Pin the version

Keep the SDK version explicit in your dependency file and read the release notes before upgrading a client that runs production jobs. A market-data client can fail quietly when a response envelope, pagination helper, or decimal parsing changes. Record the package name, the version, any enabled `websocket` feature or extra, and its registry page (npm, PyPI, or crates.io) with the project.

Then make one narrow authenticated call, such as the Hyperliquid `BTC` order book in [SDK REST usage](/sdks/rest-usage). It confirms the key, base URL, response parsing, and request ID before you add history, replay, or reconstruction.

## Languages without a package

Call [REST](/rest-api) or the [WebSocket](/websocket/connection) directly, run the [CLI](/cli) from a shell, or generate a typed client from [OpenAPI](/openapi).

## Next step

Make your first SDK calls with [SDK REST usage](/sdks/rest-usage).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.