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

# Accounts

> Understand where your funds sit and what each account is for.

export const LearnStyles = () => {
  useEffect(() => {
    const revealReference = () => {
      let id;
      try {
        id = decodeURIComponent(window.location.hash.slice(1));
      } catch {
        return;
      }
      if (!id) return;
      const target = document.getElementById(id);
      if (!target) return;
      let opened = false;
      for (let parent = target.parentElement; parent; parent = parent.parentElement) {
        if (parent.tagName === "DETAILS" && !parent.open) {
          parent.open = true;
          opened = true;
        }
      }
      if (opened) target.scrollIntoView({
        block: "start"
      });
    };
    const frame = requestAnimationFrame(revealReference);
    window.addEventListener("hashchange", revealReference);
    return () => {
      cancelAnimationFrame(frame);
      window.removeEventListener("hashchange", revealReference);
    };
  }, []);
  return <style>{`
.monaco-learn {
  --bg:#fff;
  --fg:#18261e;
  --body:#465149;
  --muted:#69756d;
  --line:#dce3dd;
  --accent:#233329;
  --callout:#f0f5ef;
  --amber:#9a6418;
}
.dark .monaco-learn {
  --bg:#0e1410;
  --fg:#edf3ed;
  --body:#c3cdc5;
  --muted:#9daa9f;
  --line:#344239;
  --accent:#c4dfc8;
  --callout:#1c2b20;
  --amber:#edc680;
}
.monaco-learn [data-as=p] {
  display: block;
  margin: 1.25em 0;
}
.monaco-learn .small-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.monaco-learn .example,
.monaco-learn .formula {
  margin: 24px 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--callout);
}
.monaco-learn .example strong {
  display: block;
  font-size: 19px;
  color: var(--fg);
}
.monaco-learn .example p {
  margin: 10px 0 0;
}
.monaco-learn .formula {
  font-family: monospace;
  overflow-x: auto;
}
.monaco-learn .callout {
  margin: 24px 0;
  padding: 18px 20px;
  border-left: 3px solid var(--accent);
  background: var(--callout);
  border-radius: 0 8px 8px 0;
}
.monaco-learn .callout.warning {
  border-color: var(--amber);
}
.monaco-learn .primary-link {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 8px;
  background: #233329;
  color: white;
  text-decoration: none;
}
.monaco-learn .account-cards,
.monaco-learn .referral-levels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}
.monaco-learn .account-cards > div,
.monaco-learn .referral-levels > div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.monaco-learn .account-cards h3 {
  margin: 0 0 8px;
  font-size: 16px;
}
.monaco-learn .account-cards p {
  margin: 0;
  font-size: 14px;
}
.monaco-learn .referral-levels {
  text-align: center;
}
.monaco-learn .referral-levels strong {
  display: block;
  font-size: 32px;
  color: var(--accent);
}
.monaco-learn .referral-levels span {
  display: block;
  font-size: 12px;
}
.monaco-learn .flow {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 24px 0;
}
.monaco-learn .flow > div {
  flex: 1;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.monaco-learn .flow b {
  display: block;
  color: var(--muted);
}
.monaco-learn .flow p {
  font-size: 13px;
  margin: 8px 0 0;
}
.monaco-learn .learn-reference {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  margin-top: 36px;
}
.monaco-learn .learn-reference > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent);
}
.monaco-learn .fee-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.monaco-learn .fee-tabs {
  display: flex;
  gap: 8px;
}
.monaco-learn .fee-controls button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--fg);
}
.monaco-learn .fee-tabs button[aria-selected=true] {
  background: var(--callout);
  font-weight: 600;
}
.monaco-learn .fee-panel {
  overflow-x: auto;
}
.monaco-learn .fees-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.monaco-learn .fees-table th,
.monaco-learn .fees-table td {
  padding: 12px;
  text-align: right;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.monaco-learn .fees-table th:first-child,
.monaco-learn .fees-table th:nth-child(2),
.monaco-learn .fees-table td:first-child,
.monaco-learn .fees-table td:nth-child(2) {
  text-align: left;
}
.monaco-learn .fees-table caption {
  text-align: left;
  font-weight: 600;
  margin-bottom: 10px;
}
.monaco-learn button:focus-visible,
.monaco-learn input:focus-visible,
.monaco-learn summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
@media (max-width: 600px) {
  .monaco-learn .account-cards {
    grid-template-columns: 1fr;
  }
  .monaco-learn .flow {
    flex-direction: column;
    align-items: stretch;
  }
  .monaco-learn .flow > span {
    display: none;
  }
  .monaco-learn .referral-levels > div {
    padding: 14px 6px;
  }
  .monaco-learn .referral-levels span {
    font-size: 10px;
  }
}
@media print {
  .monaco-learn .fee-controls {
    display: none;
  }
  .monaco-learn .fee-panel[hidden] {
    display: block;
    margin-top: 20px;
  }
}
.monaco-learn .referral-calculator {
  margin: 30px 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 25px;
  background: var(--bg);
}
.monaco-learn .calculator-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.monaco-learn .calculator-heading h3 {
  font-size: 19px;
  margin: 0;
  letter-spacing: -.025em;
}
.monaco-learn .calculator-heading .small-label {
  margin-bottom: 5px;
}
.monaco-learn .unlimited-flag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--callout);
  padding: 4px 9px;
  font-size: 10px;
  color: var(--accent);
  white-space: nowrap;
}
.monaco-learn .calculator-intro {
  font-size: 13px;
  line-height: 1.7;
  margin: 13px 0 25px;
}
.monaco-learn .calculator-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}
.monaco-learn .referral-control {
  margin: 0 0 20px;
}
.monaco-learn .slider-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.monaco-learn .slider-label label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--fg);
}
.monaco-learn .slider-label label span {
  display: block;
  font-weight: 400;
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}
.monaco-learn .slider-label output {
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  flex: none;
}
.monaco-learn .referral-calculator input[type=range] {
  display: block;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 24px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  --range-fill:0%;
}
.monaco-learn .referral-calculator input[type=range]::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 5px;
  background:
    linear-gradient(
      to right,
      var(--accent) var(--range-fill),
      var(--line) var(--range-fill));
}
.monaco-learn .referral-calculator input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--accent);
  margin-top: -6px;
}
.monaco-learn .referral-calculator input[type=range]::-moz-range-track {
  height: 5px;
  border-radius: 5px;
  background: var(--line);
}
.monaco-learn .referral-calculator input[type=range]::-moz-range-progress {
  height: 5px;
  border-radius: 5px;
  background: var(--accent);
}
.monaco-learn .referral-calculator input[type=range]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--accent);
}
.monaco-learn .slider-scale {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  line-height: 1.5;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.monaco-learn .referral-calculator .calculator-help {
  font-size: 10px;
  line-height: 1.7;
  color: var(--muted);
  margin: 6px 0 0;
}
.monaco-learn .calculator-inputs > .calculator-help {
  margin: -7px 0 20px;
}
.monaco-learn .volume-control {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-bottom: 0;
}
.monaco-learn .volume-control .slider-label {
  flex-wrap: wrap;
  gap: 4px;
}
.monaco-learn .volume-control label {
  font-size: 12px;
}
.monaco-learn .volume-control output {
  font-size: 17px;
}
.monaco-learn .earn-estimate {
  background: var(--callout);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 23px 20px;
  color: var(--accent);
  min-width: 0;
}
.monaco-learn .estimate-kicker {
  font-size: 10px;
  letter-spacing: .07em;
  text-transform: uppercase;
  font-weight: 600;
}
.monaco-learn .estimate-total,
.monaco-learn .estimate-annual {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  line-height: 1.25;
}
.monaco-learn .estimate-total {
  margin: 14px 0 15px;
}
.monaco-learn .estimate-total output {
  font-size: clamp(24px, 2.3vw, 34px);
  font-weight: 600;
  letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.monaco-learn .estimate-total span,
.monaco-learn .estimate-annual span {
  font-size: 11px;
  color: var(--muted);
}
.monaco-learn .estimate-annual output {
  font-size: 23px;
  font-weight: 500;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.monaco-learn .estimate-breakdown {
  border-top: 1px solid var(--line);
  padding-top: 17px;
  margin-top: 23px;
}
.monaco-learn .breakdown-title {
  display: block;
  font-size: 10px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--accent);
}
.monaco-learn .estimate-breakdown > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  margin: 9px 0;
  line-height: 1.5;
}
.monaco-learn .estimate-breakdown > div > span {
  color: var(--body);
}
.monaco-learn .estimate-breakdown output {
  font-variant-numeric: tabular-nums;
  text-align: right;
  overflow-wrap: anywhere;
  min-width: 0;
}
.monaco-learn .earn-estimate p {
  font-size: 10px;
  line-height: 1.7;
  color: var(--muted);
  margin: 20px 0 0;
}
.monaco-learn .calculator-assumptions {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 16px;
  font-size: 12px;
}
.monaco-learn .calculator-assumptions summary {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  list-style: none;
  cursor: pointer;
  color: var(--fg);
  font-weight: 500;
}
.monaco-learn .calculator-assumptions summary > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}
.monaco-learn .calculator-assumptions summary::-webkit-details-marker {
  display: none;
}
.monaco-learn .calculator-assumptions p {
  font-size: 11px;
  line-height: 1.8;
  margin: 12px 0 0;
}
.monaco-learn .referral-calculator .calculator-footnote {
  font-size: 10px;
  line-height: 1.8;
  color: var(--muted);
  margin: 13px 0 0;
}
@media (max-width: 600px) {
  .monaco-learn .referral-calculator {
    padding: 20px;
  }
  .monaco-learn .calculator-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .monaco-learn .calculator-heading {
    gap: 10px;
  }
  .monaco-learn .calculator-heading h3 {
    font-size: 18px;
  }
  .monaco-learn .calculator-intro {
    font-size: 12px;
  }
  .monaco-learn .calculator-heading .small-label {
    font-size: 9px;
  }
  .monaco-learn .slider-label label {
    font-size: 13px;
  }
  .monaco-learn .slider-label output {
    font-size: 18px;
  }
  .monaco-learn .volume-control .slider-label {
    display: block;
  }
  .monaco-learn .volume-control output {
    display: block;
    font-size: 21px;
    margin: 6px 0;
  }
  .monaco-learn .earn-estimate {
    padding: 22px;
  }
  .monaco-learn .estimate-total output {
    font-size: 36px;
  }
  .monaco-learn .estimate-annual output {
    font-size: 27px;
  }
  .monaco-learn .estimate-breakdown > div {
    font-size: 12px;
  }
  .monaco-learn .calculator-assumptions summary {
    flex-wrap: wrap;
    gap: 4px;
  }
}
@media print {
  .monaco-learn .calculator-grid {
    grid-template-columns: 1.2fr 1fr;
  }
  .monaco-learn .referral-calculator {
    break-inside: avoid;
  }
  .monaco-learn .calculator-assumptions > * {
    display: block !important;
  }
  .monaco-learn .calculator-assumptions summary {
    display: flex !important;
  }
}
`}</style>;
};

<LearnStyles />

<div className="monaco-learn">
  Monaco separates your spot trading balance from the collateral in your parent margin account. Your EVM wallet connects you to both.

  <div className="account-cards"><div><span className="small-label">01</span><h3>EVM Wallet</h3><p>Connect your existing wallet or use one created through Privy.</p></div><div><span className="small-label">02</span><h3>Spot Account</h3><p>Your trading balance for individual spot markets.</p></div><div><span className="small-label">03</span><h3>Parent Margin Account</h3><p>Your collateral account for futures and other derivatives.</p></div></div>

  ## Trading And Moving Funds

  Trading inside Monaco is **gasless**. Deposits and withdrawals are on-chain Sei transactions and require a small amount of SEI for gas.

  Your parent margin account holds USDC collateral. Cross or isolated margin determines how that collateral is locked when you trade. See [Margin](/trading-mechanics/perps) for the concepts used to assess your account and positions.

  The account panel in the terminal provides deposit, withdrawal, and spot-to-margin transfer controls. See the [Testnet Guide](/testnet-guide) for their location in the testnet interface.

  ## Understanding Balance Changes

  Every balance change is recorded in an append-only ledger, which provides the history used for reconciliation.

  | Movement | What happened |
  | - | - |
  | Deposit / withdrawal | Funds entered or left Monaco on-chain. |
  | Trade / fee | An order filled and fees were applied. |
  | Funding / liquidation | Perpetual funding accrued or a position was liquidated. |
  | Lock / unlock / reward | Funds were reserved, released, or credited as incentives. |

  ## Working With Your Accounts

  Use [Wallets & Auth](/developers/accounts/wallets) for wallet setup, authentication, and supported assets. [Vault Deposits & Withdrawals](/developers/vault) covers deposits, withdrawals, balances, and locked funds.

  For programmatic margin requirements, transfers, funding, and risk previews, see the [Margin Accounts SDK](/sdk/typescript/margin-accounts). For exposure and position risk, see [Positions](/developers/positions). To split your margin trading across separate accounts, see [Sub-Accounts](/sub-accounts).

  <Accordion title="Full Accounts Reference" id="full-reference" className="learn-reference">
    <h2 id="monaco-accounts">Monaco Accounts</h2>

    When trading on Monaco, your funds can sit either in your spot account, or your own parent margin account.

    <CardGroup cols={3}>
      <Card title="EVM Wallet" icon="wallet">
        Connect through Privy or your preferred wallet provider.
      </Card>

      <Card title="Spot Account" icon="building-columns">
        Trading balance for individual spot markets.
      </Card>

      <Card title="Parent Margin Account" icon="chart-line">
        Collateral account for futures and other derivatives.
      </Card>
    </CardGroup>

    <Info>
      Trading inside Monaco is **gasless**. Only deposits and withdrawals are on-chain Sei transactions, so you just need a little SEI to cover gas for moving funds in and out.
    </Info>

    * **EVM Wallet** — for those using Privy, this can be auto-created, else you can connect using your preferred wallet provider.
    * **Spot Account** — this is for trading individual spot markets.
    * **Parent Margin Account** — a margin account for futures and other derivatives trading; when you trade, you can use isolated or cross margin, and this dictates locked balances on your deposited `USDC` collateral. A market marked `isolatedOnly` accepts cross margin only to reduce a position: open new positions there with isolated margin, or the order is rejected with `CROSS_MARGIN_NOT_ALLOWED`. Each market is held in one margin mode at a time per margin account: while the cross bucket or the market's isolated bucket holds a position or a resting (non-reduce-only) order, an order that is not reduce-only in the other mode is rejected with `MARGIN_MODE_CONFLICT` — see [One margin mode per market](/trading-mechanics/perps#one-margin-mode-per-market).
    * **Margin Sub-Accounts** — optional extra margin accounts with their own collateral and positions, funded from your parent margin account. See [Sub-Accounts](/sub-accounts).

    <h2 id="ledger-movements">Ledger Movements</h2>

    Every balance change across your accounts is written to an append-only ledger — the source of truth for history and reconciliation.

    | Type | When it's recorded |
    | - | - |
    | `DEPOSIT` · `WITHDRAWAL` | Funds enter or leave Monaco on-chain |
    | `TRADE` · `FEE` | An order fills and fees are applied |
    | `FUNDING` · `LIQUIDATION` | Perps funding accrues or a position is liquidated |
    | `LOCK` · `UNLOCK` · `REWARD` | Balance is reserved/released, or incentives credited |

    <h2 id="working-with-accounts">Working with Accounts</h2>

    Use the focused builder pages for implementation details:

    * [Wallet Assets](/developers/accounts/wallets) covers wallet setup, authentication, asset IDs, token contracts, and supported balances.
    * [Account Vault](/developers/vault) describes deposits, withdrawals, live balances, locked funds, and parent margin collateral.
    * [Margin Accounts SDK](/sdk/typescript/margin-accounts) allows full visibility and control over parent margin accounts, including but not limited to: margin requirements, account transfers, funding, and pre-trade risk simulation.
    * [Sub-Accounts](/sub-accounts) covers isolated margin sub-accounts: funding, limits, closing, and the API surface.
    * [Positions](/developers/positions) covers all details associated with position management, including exposure, parent account state, liquidations, live positions at risk, and more.
  </Accordion>
</div>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.