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

# Self + Self

> Trader-owned, trader-signed, directly submitted transactions with the Ostium SDK.

`createSelfAndSelf()` is the simplest mode.

* the trader EOA owns USDC and positions
* the same trader EOA signs transactions
* transactions are submitted directly on Arbitrum and the trader pays gas

## When to use it

* bots and scripts
* server-side systems trading a house account
* wallet-driven apps where the user is comfortable paying gas
* client-side apps that only need unsigned EOA transaction payloads

## Submit-capable client

```ts theme={null}
const client = await OstiumClient.createSelfAndSelf({
  traderPrivateKey: process.env.TRADER_PRIVATE_KEY as `0x${string}`,
  rpcUrl: process.env.ARB_RPC_URL!,
});
```

## Build-only client

```ts theme={null}
const client = await OstiumClient.createSelfAndSelf({
  traderAddress: '0xTraderAddress',
});

const tx = client.getOpenTradeTx({
  pairId: 0,
  buy: true,
  price: '65000',
  collateral: '100',
  leverage: '5',
  type: OrderType.Market,
});
```

In build-only mode, `get*Tx()` returns an EOA request with `from`, `to`, `data`, and `value` so your app can pass it to a wallet for signing.

## Parameters

| Field              | Type          | Required                                | Notes                                                    |
| ------------------ | ------------- | --------------------------------------- | -------------------------------------------------------- |
| `traderPrivateKey` | `0x${string}` | Submit-capable                          | Trader EOA key. Holds USDC, owns positions, pays gas.    |
| `traderAddress`    | `0x${string}` | Build-only                              | Trader EOA address (no key).                             |
| `rpcUrl`           | `string`      | Submit-capable; optional for build-only | Arbitrum RPC URL. Build-only defaults to the public RPC. |

Plus the shared options (`testnet`, `slippageBps`, `builder`, `subgraphUrl`, `builderApiUrl`, `alchemyApiKey`). See [Client Configuration](/developer/client-modes/configuration).
