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

# Client Modes

> Choose the correct Ostium SDK mode based on who owns funds, who signs, and whether your app submits transactions or only builds them.

The SDK exposes four write-enabled execution modes plus a read-only mode. Each mode answers three questions:

* whose address owns the USDC and positions
* who signs the transaction payload
* whether submission happens as a normal EOA transaction or a gasless Safe user operation

## Mode matrix

| Mode                | Trader funds live in | Signer       | Submitter     | Typical use                                                |
| ------------------- | -------------------- | ------------ | ------------- | ---------------------------------------------------------- |
| `self-self`         | trader EOA           | trader EOA   | trader EOA    | wallet-driven apps, bots, simple scripts                   |
| `self-gasless`      | trader EOA           | trader EOA   | trader Safe   | client apps that want gasless trading after one-time setup |
| `delegated-self`    | trader EOA           | delegate EOA | delegate EOA  | backend execution on behalf of users                       |
| `delegated-gasless` | trader EOA           | delegate EOA | delegate Safe | gasless backend execution on behalf of users               |
| `read-only`         | n/a                  | none         | none          | dashboards, analytics, price and account views             |

## Build-only vs submit-capable clients

Every mode can be created in two ways:

* submit-capable: pass a private key and let the SDK sign and submit
* build-only: pass addresses only and use `get*Tx()` to return unsigned transaction data for your own wallet or Safe flow

## Configuration

All modes share a common set of optional settings — `testnet`, `slippageBps`, `builder`, `subgraphUrl`, `builderApiUrl`, and `alchemyApiKey` (required for [`streamAccountUpdates()`](/developer/reference/stream-account-updates)). See [Client Configuration](/developer/client-modes/configuration) for the complete parameter reference across every mode, including required fields and build-only variants.

## Choose the right mode

* Use [Self + Self](/developer/client-modes/self-and-self) when the trader signs and pays gas directly.
* Use [Self + Gasless](/developer/client-modes/self-and-gasless) when the trader still owns the account but you want a gasless UX after setup.
* Use [Delegated + Self](/developer/client-modes/delegated-and-self) when your backend executes for users and a delegate EOA pays gas.
* Use [Delegated + Gasless](/developer/client-modes/delegated-and-gasless) when your backend executes for users but you want sponsored Safe submission.
* Use [Read-only](/developer/client-modes/read-only) when your app only needs data.

## Related

* [Client Configuration](/developer/client-modes/configuration) — every parameter accepted by the factory methods.
* [Testnet](/developer/client-modes/testnet) explains how `testnet: true` changes the SDK defaults.
