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

# Funding your wallet

> Send USDC to your Solana wallet, enable trading, and withdraw. Trading funds the vault by itself; a deposit call exists if you want to pre-fund it.

You fund your account by sending USDC to your Solana wallet address. Once it lands, you are ready to
trade.

## At a glance

* Send native Solana USDC only. Placing a parlay moves the stake into your vault by itself, so there is no separate deposit step.
* Enable trading once, in the app. The API can only report whether it is on.
* Network fees are sponsored, so your wallet only needs USDC. The one exception is a small rent charge, taken in USDC, on a first withdrawal to a new address.
* One withdraw call reaches your wallet and your vault's free balance together.

<img className="block dark:hidden rounded-2xl" src="https://mintcdn.com/ucalledit/YdiR6y3UIknGsFJp/images/pictures/funding-light.png?fit=max&auto=format&n=YdiR6y3UIknGsFJp&q=85&s=c31aecacc4e98ed95c584407bde0491f" alt="Send USDC, enable trading once, trade with the stake moving into the vault by itself, withdraw any time" width="1540" height="952" data-path="images/pictures/funding-light.png" />

<img className="hidden dark:block rounded-2xl" src="https://mintcdn.com/ucalledit/YdiR6y3UIknGsFJp/images/pictures/funding-dark.png?fit=max&auto=format&n=YdiR6y3UIknGsFJp&q=85&s=65a5f40e1af64ff0ec08bec003840820" alt="Send USDC, enable trading once, trade with the stake moving into the vault by itself, withdraw any time" width="1540" height="952" data-path="images/pictures/funding-dark.png" />

## Send USDC to your wallet

| Option | Where | Time | Notes |
| - | - | - | - |
| Card or Apple Pay | In the app | About a minute | Buys USDC straight into your wallet |
| Bridge from another chain | In the app | A few minutes | From the chains the app offers. Delivers native Solana USDC |
| Send USDC directly | Any Solana wallet or exchange | Seconds | Native Solana USDC only |

To send USDC directly:

<Steps>
  <Step title="Get your wallet address">
    [`GET /v1/wallet`](/solana/api-reference/user/get-wallet) returns your Solana wallet `address` and
    current balances.

    ```bash theme={null}
    curl https://api.totalis.trade/v1/wallet \
      -H "X-API-Key: $TOTALIS_API_KEY"
    ```

    The same address is under **Deposit** in the app, as a QR code and a copy button. The dialog
    watches the chain and updates as soon as USDC lands.

    <Frame caption="Deposit in the app: the wallet address, the chain warning, and the card and bridge options">
      <img src="https://mintcdn.com/ucalledit/YdiR6y3UIknGsFJp/images/app/01-deposit-chooser.png?fit=max&auto=format&n=YdiR6y3UIknGsFJp&q=85&s=d1a5e80a8a7f40b6b08019302ab583f4" alt="The Deposit dialog showing a USDC on Solana address with a QR code, a warning to send only USDC on Solana, and options to pay by card or bridge from another chain" width="1587" height="895" data-path="images/app/01-deposit-chooser.png" />
    </Frame>
  </Step>

  <Step title="Send native USDC on Solana">
    Transfer USDC to that address from any wallet or exchange that supports Solana (SPL) tokens. The
    chain, token, and mint are on [Limits and fees](/solana/limits-and-fees#network).

    <Warning>
      Send only native Solana USDC at the documented mint. Bridged USDC, other tokens, and transfers
      on another chain are not credited and may be unrecoverable.
    </Warning>
  </Step>

  <Step title="Confirm it landed">
    Poll [`GET /v1/wallet`](/solana/api-reference/user/get-wallet) until the balance reflects your
    transfer. Then [enable trading](#enable-trading) once, and you are ready to place parlays.
  </Step>
</Steps>

## Enable trading

Enable trading before you place a parlay or withdraw. This delegates signing: you let Totalis sign
transactions on your behalf inside a secure enclave, the protected environment that holds your
wallet's private key. [Vaults and custody](/solana/guides/vault-architecture) covers what that permission
does and does not allow.

<Warning>
  You enable trading by approving a consent dialog in the app, once. The REST API cannot grant it.
  `POST /v1/wallet/enable-trading` checks that delegation is in place and returns its status. It does
  not grant the permission. On
  older accounts it also credits any pending welcome airdrop.
</Warning>

Check the current state with
[`GET /v1/wallet/delegation-status`](/solana/api-reference/funds/delegation-status).

## How your balance is used

Your money sits in two places: your wallet and your vault. You do not have to deposit before you
trade.

| Where the money is | What happens |
| - | - |
| Wallet | USDC you send lands here. |
| Vault | When you place a parlay, your stake moves from the wallet into the vault and locks, in one step. |

Trade eligibility is checked against your combined wallet and vault free balance. If the total
covers your bet amount, the trade goes through.

Two calls move money between the two on purpose:

* [`POST /v1/vault/deposit`](/solana/api-reference/funds/vault-deposit) pre-funds the vault from the
  wallet. Market makers use it to hold collateral ahead of quoting.
* [`POST /v1/vault/withdraw`](/solana/api-reference/funds/vault-withdraw) moves free balance back to the
  wallet.

Field by field definitions of each balance are in the
[Glossary](/solana/glossary#balance-fields).

## Withdrawing

Use [`POST /v1/wallet/withdraw`](/solana/api-reference/funds/wallet-withdraw) with a recipient and amount.

```bash theme={null}
curl -X POST https://api.totalis.trade/v1/wallet/withdraw \
  -H "X-API-Key: $TOTALIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "recipient": "<solana-address>", "amount_usdc": 50 }'
```

### Where the money comes from

One call reaches everything that is not locked in an open position.

| Pool | What it holds | Withdrawable |
| - | - | - |
| Wallet | USDC you sent, minus holds for parlays you committed that have not funded yet | Yes |
| Vault free balance | Settled winnings and unlocked collateral: `gross - locked` | Yes, moved to your wallet first |
| Vault locked | Collateral behind your `executed` positions | No, until they settle or you cash out |

The app shows the withdrawable total as **Available to withdraw** and the locked part as **In open
positions**.

If the amount exceeds your wallet balance, Totalis first moves the shortfall from your vault to
your wallet. It waits for that transaction to confirm, then sends the external transfer. The
response then carries `vault_signature` and `vault_amount` beside the transfer `signature`.

<Accordion title="For integrators: rules and failure modes">
  ### Rules

  * Trading must be enabled. Withdrawing uses the same delegation as placing a parlay. If it has
    lapsed the call returns `409`, and re-enabling trading in the app restores it.
  * The key needs the `funds:withdraw` scope, the highest risk scope on a key. See
    [Authentication](/solana/authentication#scopes).
  * `recipient` must be a regular Solana wallet address. Token accounts, program ids, and derived
    addresses are rejected, because USDC sent to them is unrecoverable. Your own wallet address is
    rejected too.
  * The minimum is one base unit, `0.000001` USDC. The maximum is your wallet plus vault free
    balance. A larger amount returns `400` with the available breakdown in the message.
  * If the recipient has never held USDC, Totalis creates its token account and fronts the rent,
    about 0.002 SOL. That rent is billed back in USDC out of the withdrawal at the live SOL price:
    about 0.29 USDC on 11 September 2026. The response reports it as `chargeback_usdc`, what arrived
    as `delivered_usdc`, and sets `recipient_ata_created`. An amount too small to cover it is
    rejected. So is the call if the SOL price is briefly unavailable. Retry in a moment.
  * `Idempotency-Key` is honored and must be a UUID; anything else returns `400`. A repeat with the
    same key within 24 hours replays the original success without moving funds again. The vault
    deposit and withdraw calls follow the same rule.
  * The call has its own per-account rate limit, listed on
    [Limits and fees](/solana/limits-and-fees#rate-limits).

  ### When it fails

  | Response | Meaning | What to do |
  | - | - | - |
  | `400` | Bad recipient, your own address, or more than the available balance | Fix the request |
  | `409` | Wallet is no longer delegated | Enable trading in the app, then retry |
  | `502` with `error.code: PARTIAL_VAULT_ONLY` | The vault move succeeded, the external transfer did not. `error.details.vault_signature` shows the vault move | Retry with the same amount. The wallet now covers it, so the vault is not tapped again |
  | `502` with any other code | The transfer was broadcast but not confirmed in time | Look up the returned signature before retrying, so you do not send twice |

  The partial case returns `502`, not `200`, on purpose. An idempotent retry against a `502` runs
  again, where a cached `200` would replay a half-finished result.
</Accordion>

### Withdrawing in the app

**Withdraw** sits next to Deposit on the portfolio page and offers two routes. The API endpoint above
covers only the first.

<Frame caption="Send to a Solana wallet is the same operation as the API call. The second route bridges through Unifold.">
  <img src="https://mintcdn.com/ucalledit/YdiR6y3UIknGsFJp/images/app/16-withdraw-chooser.png?fit=max&auto=format&n=YdiR6y3UIknGsFJp&q=85&s=efa5327098a0347f443fd56b21823e61" alt="The Withdraw dialog offering Send to a Solana wallet and Withdraw to another chain" width="926" height="796" data-path="images/app/16-withdraw-chooser.png" />
</Frame>

<Frame caption="Send to a Solana wallet: the free balance, a recipient address, and an amount with a Max shortcut">
  <img src="https://mintcdn.com/ucalledit/YdiR6y3UIknGsFJp/images/app/17-withdraw-solana.png?fit=max&auto=format&n=YdiR6y3UIknGsFJp&q=85&s=8e741f5e62a8a2f25b0d05d062bfe44b" alt="The Withdraw USDC form showing the amount available to withdraw, a recipient Solana address field, and an amount field" width="882" height="766" data-path="images/app/17-withdraw-solana.png" />
</Frame>

<Frame caption="Withdraw to another chain opens Unifold, which sends your funds on to Ethereum, Bitcoin and other chains. It has its own minimum and processing time.">
  <img src="https://mintcdn.com/ucalledit/YdiR6y3UIknGsFJp/images/app/18-withdraw-other-chain.png?fit=max&auto=format&n=YdiR6y3UIknGsFJp&q=85&s=06a17afb70fa9aaa4413002a3d367c90" alt="The Unifold cash out dialog with token, chain, recipient address, amount with a 3 USD minimum, and processing time" width="395" height="512" data-path="images/app/18-withdraw-other-chain.png" />
</Frame>


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