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

# Nest Withdraw

Submit a withdrawal request on the Nest AtomicQueue for a specific vault token. Approves the nToken for the AtomicQueue and calls updateAtomicRequest. The withdrawal is fulfilled asynchronously by a solver. Ideal for: vault rebalancing, position unwinding, automated withdrawal workflows.

![Nest Withdraw logo](https://cdn.b3.fun/b3os-icons/plume.svg)
Catalog action EVM Onchain wallet Gas send

Submit a withdrawal request on the Nest AtomicQueue for a specific vault token. Approves the nToken for the AtomicQueue and calls updateAtomicRequest. The withdrawal is fulfilled asynchronously by a solver. Ideal for: vault rebalancing, position unwinding, automated withdrawal workflows.

**Review wallet and value movement**

This action can require a wallet connector, gas, token movement, or an external side effect. Test with simulation or a controlled amount before using it in a live workflow.

## At a Glance

| Field | Value |
| --- | --- |
| Action ID | `nest-withdraw` |
| Category | EVM Onchain |
| Connector | `wallet` |
| Requires gas | Yes |
| Funds movement | `send` |
| Tags | `defi`, `plume`, `nest`, `withdraw`, `vault`, `onchain`, `write`, `rebalancing`, `atomic-queue` |

## Payload Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `vault` | `string` | Yes | Vault symbol \(e.g., 'nTBILL'\). Used for logging and context. |
| `tokenAddress` | `string` | Yes | nToken contract address to withdraw \(offer token\). |
| `amountRaw` | `string` | Yes | Amount of nToken to withdraw in raw units \(wei\). |
| `deadlineDays` | `number` | No | Number of days from now to set as the AtomicRequest deadline \(default: 10\). |
| `slippageBps` | `number` | No | Slippage tolerance in basis points for the atomic price \(default: 100 = 1%\). |

## Result Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `status` | `string` | Yes | Whether the withdrawal request was successfully submitted. |
| `vault` | `string` | Yes | Vault symbol. |
| `tokenAddress` | `string` | No | nToken address. |
| `amountRaw` | `string` | No | Amount submitted for withdrawal. |
| `deadline` | `number` | No | AtomicRequest deadline as Unix timestamp. |
| `atomicPrice` | `string` | No | Atomic price set on the request. |
| `transactions` | `object` | No | Transaction hashes for each step. |
| `reason` | `string` | No | Reason if status is 'error'. |

## Examples

**Workflow node**

```json
{
  "type": "nest-withdraw",
  "payload": {
    "vault": "example-vault",
    "tokenAddress": "0x0000000000000000000000000000000000000000",
    "amountRaw": "1000000"
  },
  "children": [],
  "connector": {
    "type": "wallet",
    "id": "conn_wallet"
  }
}
```
  **Test with API**

```bash
curl -X POST "https://api.b3os.org/v1/actions/nest-withdraw/test" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "inputs": {
    "vault": "example-vault",
    "tokenAddress": "0x0000000000000000000000000000000000000000",
    "amountRaw": "1000000"
  }
}'
```

**Use expressions for dynamic values**

Payload fields can use workflow expressions such as `{{$trigger.body.amount}}`, `{{$nodes.fetch.result.price}}`, and `{{$props.asset}}` when the value should come from a trigger, prior node, or reusable workflow prop.