> For the complete documentation index, see [llms.txt](https://ocx.gitbook.io/ocx-doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ocx.gitbook.io/ocx-doc/withdraw.md).

# withdraw

Withdrawals move USDC-T back from the OCX vault to your wallet on Base. An automated keeper executes the on-chain transfer shortly after you submit the request.

## From the UI

1. Open the **Wallet** page.
2. Click **Withdraw**.
3. Enter the amount.
4. Confirm. You do not sign a transaction for the withdrawal itself — the keeper executes the transfer on your behalf, to the wallet you signed in with.
5. The withdrawal appears under **Pending** immediately. Once the on-chain transfer confirms, its status changes to **Settled** and an explorer link appears.

## From the API

```http
POST /wallet/withdraw
Authorization: Bearer ocx_sk_...

{ "amount": "100" }
```

```json
{ "withdrawalId": "01HW..." }
```

Your `tradableBalance` is debited instantly; the amount moves to `pendingWithdrawalTotal` until the on-chain transfer settles.

## Check status

```http
GET /wallet/settlements?kind=withdraw
```

```json
[
  {
    "id": "01HW...",
    "kind": "withdraw",
    "status": "sent",
    "asset": "USDC",
    "amount": "100.00",
    "txHash": "0x...",
    "withdrawalId": "01HW...",
    "walletAddress": "0xYourAddress",
    "network": "base-sepolia",
    "chainId": 84532,
    "settledAt": "2026-04-24T12:05:00Z",
    "createdAt": "2026-04-24T12:04:00Z",
    "updatedAt": "2026-04-24T12:05:00Z"
  }
]
```

`status` values:

* `pending` — queued for the keeper.
* `processing` — the keeper has picked up the request.
* `sent` — the on-chain transaction has been broadcast.
* `confirmed` — the transaction is finalized.
* `failed` — the transaction reverted or was rejected. The amount is returned to your `tradableBalance`.
* `insufficient_liquidity` — the vault lacks the liquidity for this transfer; the request will retry automatically.

## Constraints

* **Withdrawals go to the wallet you signed in with.** You cannot withdraw to a different address in one step — sign in with the destination wallet first.
* **Your `tradableBalance` must cover the withdrawal.** Open positions and pending orders reduce your tradable balance.
* **Minimum amount.** There is no enforced platform minimum, but very small withdrawals may be uneconomical due to the Base network fee paid by the keeper.
* **Timing.** Typical time from request to confirmed on-chain: under one minute. High-congestion periods may take longer.

## Cancelling a pending withdrawal

Contact support while the withdrawal is still in `pending` state. Once it transitions to `processing` or later, the transfer cannot be cancelled.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ocx.gitbook.io/ocx-doc/withdraw.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
