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

# Read-only

> Use createReadOnly when your app only needs market or account data and does not need to build or submit transactions.

`createReadOnly()` is the no-signing, no-submission mode.

* no private key
* no signer
* no transaction building
* all read methods available

## When to use it

* price widgets
* charts and dashboards
* analytics tools
* account views that display positions, orders, fills, or candles

## Example

```ts theme={null}
const client = await OstiumClient.createReadOnly();

const { pairs } = await client.getPairs();
const { prices } = await client.getAllPrices();
const positions = await client.getOpenPositions({ user: '0xTraderAddress' });
```

For low-latency account snapshots, pass `user` and an Alchemy key:

```ts theme={null}
const stream = client.streamAccountUpdates({
  user: ['0xTraderAddress'],
  alchemyApiKey: process.env.ALCHEMY_API_KEY!,
});
```

Write methods throw `INVALID_CONFIG` in this mode.

## Parameters

All fields are optional.

| Field           | Type      | Default                                  | Notes                                                                                           |
| --------------- | --------- | ---------------------------------------- | ----------------------------------------------------------------------------------------------- |
| `rpcUrl`        | `string`  | public RPC                               | Arbitrum RPC URL for reads/simulation.                                                          |
| `testnet`       | `boolean` | `false`                                  | Use Arbitrum Sepolia.                                                                           |
| `subgraphUrl`   | `string`  | mainnet/testnet subgraph                 | Override the subgraph endpoint.                                                                 |
| `builderApiUrl` | `string`  | `https://builder.prod.bedrock.ostium.io` | Override the builder API base URL.                                                              |
| `alchemyApiKey` | `string`  | —                                        | Required only to start [`streamAccountUpdates()`](/developer/reference/stream-account-updates). |

Read-only clients do not accept `slippageBps` or `builder`. See [Client Configuration](/developer/client-modes/configuration) for the full reference.
