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

# Trade

> Trade the vault subaccount like any other subaccount.

There is no vault-specific trading & market data API. The vault **is** a subaccount owned by your
wallet, so you run your strategy on it with the normal trading methods — orders, RFQs,
transfers — passing the vault's subaccount id. The `managerId` you chose at
[creation](/vaults/create-a-vault) is the margin manager that governs what it can
trade.

<Note>All of the steps in this guide can be done through the UX or SDKs.</Note>

<CodeGroup>
  ```typescript TypeScript (SDK) theme={null}
  await client.orders.place({
    subaccountId: vaultId, // the vault subaccount — that's the whole trick
    instrumentName: 'ETH-PERP',
    direction: 'buy',
    amount: '2',
    limitPrice: '2500',
  });
  ```

  ```python Python (SDK) theme={null}
  # Coming soon.
  ```

  ```rust Rust (SDK) theme={null}
  // Coming soon.
  ```

  ```bash cURL theme={null}
  # Body nonce/signature: EIP-712 trade signing (see /action-signing).
  curl -X POST https://api.derive.xyz/v3/private/order \
    -H "Content-Type: application/json" \
    -H "X-DeriveWallet: $WALLET_ADDRESS" \
    -H "X-DeriveTimestamp: $TS" \
    -H "X-DeriveSignature: $SIG" \
    -d '{
      "subaccount_id": 42,
      "instrument_name": "ETH-PERP",
      "direction": "buy",
      "order_type": "limit",
      "time_in_force": "gtc",
      "amount": "2",
      "limit_price": "2500",
      "max_fee": "10",
      "mmp": false,
      "nonce": "1751558400000123000",
      "signature_expiry_sec": 1751558700,
      "signer": "0xCURATOR…",
      "signature": "0x…"
    }'
  ```
</CodeGroup>

## How trading moves the share price

NAV is the vault subaccount's live mark-to-market value from the risk engine, and
`share price ≈ NAV / total_shares`. As you trade on behalf of the vault, the vault
subaccount's position values change.

On each withdrawal, a management fee is charged, as well as a performance fee on any
profits since the last withdrawal. The share price is computed after these fees are applied.
The protocol ensures that deposits and withdrawals are never settled with a slippage to the
mtm beyond `maxSlippageBps` set at vault creation.

<CodeGroup>
  ```typescript TypeScript (SDK) theme={null}
  const { nav_usd, simulated_share_price_usd } = await client.vaults.getVault(
    vaultId
  );
  console.log(
    `NAV $${nav_usd ?? '?'}, share price $${simulated_share_price_usd ?? '?'}`
  );
  ```

  ```python Python (SDK) theme={null}
  # Coming soon.
  ```

  ```rust Rust (SDK) theme={null}
  // Coming soon.
  ```

  ```bash cURL theme={null}
  curl -X POST https://api.derive.xyz/v3/public/get_vault \
    -H "Content-Type: application/json" \
    -d '{ "subaccount_id": 42 }'
  ```
</CodeGroup>

Nothing is stored or settled per-trade — pricing is computed live, and hourly
snapshots accumulate in `getPerformanceHistory` for the track record shareholders see.

## Trading while requests are queued

Your positions and the [settle loop](/vaults/deposits-withdrawals) interact in three
ways worth engineering around:

**Redemption liquidity.** Withdrawals pay out in the vault's deposit asset. A vault that is fully deployed into
positions cannot settle a large burn — unwind first, then settle.

**Curator stake floor.** The protocol requires you to keep minimum skin-in-the-game. A withdrawal that would drop your
own stake below the deployment-set floor is rejected (`vault_curator_stake_below_min`, 18013) — you cannot drain your
seed while shareholders remain. See [Winddowns](/vaults/winddowns) for the exit order this implies.

<CardGroup cols={2}>
  <Card title="Order types" icon="list" href="/trading/order-types">
    Everything the normal trading API supports, the vault subaccount supports.
  </Card>

  <Card title="Process Deposits & Withdrawals" icon="rotate" href="/vaults/deposits-withdrawals">
    The settle loop your trading has to leave room for.
  </Card>
</CardGroup>


## Related topics

- [Subaccount trades](/api-reference/channels/subaccounttrades.md)
- [Trades by instrument](/api-reference/channels/tradesbyinstrument.md)
- [Get historical trades for a subaccount](/api-reference/history/get-historical-trades-for-a-subaccount.md)
