# withdrawVault

Withdraw from specific vault

### Signature

`withdrawVaultV2(options: WithdrawVaultArguments): Promise<Transaction>`

### Params

```typescript
interface WithdrawVaultArguments {
  strategyId: string;
  vaultId: string;
  poolId: string;
  address: string;
  // Acceptable wasted amount percentage. Range: [0, 100), value is enlarged 10000 times
  percentage: number;
  // only withraw A token
  onlyTokenA?: boolean;
  //  only withraw B token
  onlyTokenB?: boolean;
  slippage?: string | number;
  deadline?: number;
  txb?: Transaction;
}
```

### Examples

withdraw 50% a token and b token

```typescript
const txb = await sdk.vault.withdrawVaultV2({
    "onlyTokenA": false,
    "onlyTokenB": false,
    "address": "0x4f1ea95397d7136f1892cfe95d0ae8af6cf37175925c4a2e08be82c1b6940e44",
    "strategyId": "0x4880c0a3ea02c10382321828894f1c15d75348a965840d358f7127bc62d7e55c",
    "poolId": "0x5eb2dfcdd1b15d2021328258f6d5ec081e9a0cdcfa9e13a0eaeb9b5f7505ca78",
    "vaultId": "0xe3348159f00d59ff0c4f312112fe661ad737d5b802201532e74d4ad8d45c818a",
    "percentage": 500000,
});
```

only withdraw 50% B token, if onlyTokenA is true, only withdraw 50% B token&#x20;

```typescript
const txb = await sdk.vault.withdrawVaultV2({
    "onlyTokenA": false,
    "onlyTokenB": true,
    "address": "0x4f1ea95397d7136f1892cfe95d0ae8af6cf37175925c4a2e08be82c1b6940e44",
    "strategyId": "0x4880c0a3ea02c10382321828894f1c15d75348a965840d358f7127bc62d7e55c",
    "poolId": "0x5eb2dfcdd1b15d2021328258f6d5ec081e9a0cdcfa9e13a0eaeb9b5f7505ca78",
    "vaultId": "0xe3348159f00d59ff0c4f312112fe661ad737d5b802201532e74d4ad8d45c818a",
    "percentage": 500000,
});
```


---

# 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://turbos.gitbook.io/turbos/developer-docs/via-sdk/vault/withdrawvault.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.
