# Withdrawals

#### Handling withdrawals <a href="#key-features" id="key-features"></a>

To initiate a withdrawal, use the following code:

```typescript
const vault = '0x1234';
const pool = 1234;
const amount = 1000000n; // Amount of shares to redeem
const redeemTx = await sdk.actions.redeem(vault, pool, amount);
```

Where:

* `vault` – One of the vaults set up by Yelay. See vault addresses here:\
  🔗 [Yelay Vault Addresses](https://yelay.gitbook.io/yelay-v3-sdk-docs/setting-up-check)
* `pool` – One of the projects (also referred to as "pools") set up by the client within the vault.
* `amount` – The amount to withdraw.

Withdrawals always return the vault’s native asset:

* A USDC vault returns USDC.
* A WETH vault returns WETH, and so on.


---

# Agent Instructions: 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://docs.yelay.io/yelay-sdk/withdrawals.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.
