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

# Subaccounts

> Subaccounts let you organize your trading activity into separate containers.: 

Each subaccount

* Has its own set of exchange credentials
* Maintains separate positions and order history
* Can represent different strategies, clients, or portfolios

## Use Cases

<CardGroup cols={3}>
  <Card title="Fund Managers" icon="building-columns">
    Segregate client portfolios
  </Card>

  <Card title="Traders" icon="chart-line">
    Separate strategies (e.g., momentum vs. mean reversion)
  </Card>

  <Card title="Teams" icon="users">
    Give team members isolated trading environments
  </Card>
</CardGroup>

## Creating Subaccounts

### Via the Dashboard

Go to **Settings → Subaccounts** in the [dashboard](https://app.rivermarkets.com).

### Via the API

```python theme={null}
response = requests.post(
    f"{BASE_URL}/subaccounts",
    headers=headers,
    json={"name": "My Trading Account"}
)
subaccount = response.json()
subaccount_id = subaccount["subaccount_id"]
```

## Exchange Credentials

Each subaccount needs exchange credentials to trade. Add them via **Settings → Subaccounts** in the dashboard, or programmatically through the [Credentials API](/api-reference/credentials/add).

<Note>
  Credentials are encrypted using asymmetric encryption and are never stored in plain text. They are deleted when you delete the subaccount.
</Note>

### Credential Setup

Each exchange requires specific credentials:

<Tabs>
  <Tab title="Polymarket">
    1. Create an account using **email** (not a wallet)
    2. Go to [Settings → Export Private Key](https://polymarket.com/settings)
    3. Copy your wallet address and private key
    4. Add them via the dashboard or API

    <Tip>
      Watch this walkthrough to see how to create a subaccount, add a Polymarket account, and place your first trade.

      <div style={{ position: "relative", paddingBottom: "56.25%", height: 0, marginTop: "12px" }}>
        <iframe src="https://www.loom.com/embed/9b49e269c09e436d98b72f3cb55d7691" title="Subaccounts video walkthrough" frameBorder="0" allowFullScreen style={{ position: "absolute", top: 0, left: 0, width: "100%", height: "100%" }} />
      </div>
    </Tip>
  </Tab>

  <Tab title="Kalshi">
    1. Go to [Settings → Account & Security → API keys](https://kalshi.com/account/profile)
    2. Create a key pair with **Read/Write** access
    3. Copy the API key and secret
    4. Add them via the dashboard or API
  </Tab>
</Tabs>
