Skip to main content
Sub-accounts are extra margin accounts that sit beside your parent margin account. Each one holds its own collateral and its own positions, all under the same wallet.

Why Use Sub-Accounts

Sub-accounts are isolated. A loss in one sub-account never draws on another, or on your parent margin account.Use them to keep a hedge apart from your main book, to run one strategy per account, or to give a bot or agent an account of its own.

Funding A Sub-Account

Withdraw from your parent margin account.
To withdraw funds held in a sub-account, transfer them back to your parent margin account first.

Limits

Closing A Sub-Account

A sub-account can be closed once it is flat: no open positions and no resting, conditional, or TWAP orders. Its collateral returns to your parent margin account in the same step.A sub-account still in liquidation or bad debt cannot be closed.

Agents And Copy Trading

A delegated agent can be limited to a single sub-account, so it trades only that account.Following a lead trader opens a copy sub-account for that leader, named copy: followed by the leader’s ID. Names starting with copy:, in any letter case, are reserved for these accounts. See Copy Trading.

Working With Sub-Accounts

Perps Collateral covers creating, funding, reading, and closing sub-accounts through the API and SDK. The Margin Accounts SDK lists every margin account method, and Positions covers position risk.

API Surface

POST /api/v1/margin/collateral/transfer (transferMarginCollateral) also moves collateral between any two of your margin accounts. Rows from listMarginAccounts() carry subaccountKey and marginAccountState.

Transfer Rules

  • Creating, closing, and transferring share the per-user movement budget with withdrawals. Exceeding it returns 429 with retryAfter.
  • The sub-account transfer routes refuse your parent margin account with 400; use the parent margin account routes for it.
  • An unknown margin account, or one you do not own, returns 404.
  • A delegated agent session cannot use the sub-account transfer routes.