# Pool Withdraw

### <mark style="color:orange;">POST</mark> /lender/pools/withdraw

Generate a transaction to withdraw funds from a lending pool.

### Headers

<table><thead><tr><th width="186">Header</th><th width="111">Required</th><th width="110">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>x-api-key</code></td><td>Yes</td><td>string</td><td>API key</td></tr><tr><td><code>Content-Type</code></td><td>Yes</td><td>string</td><td>application/json</td></tr></tbody></table>

### Example Request

```http
POST https://lavarave.wtf/api/sdk/v1.0/lender/pools/withdraw
```

### Request Body Fields

<table><thead><tr><th width="177">Field</th><th width="105">Required</th><th width="110">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>amount</code></td><td>Yes</td><td>number</td><td>Amount to withdraw (in smallest token units).</td></tr><tr><td><code>quoteToken</code></td><td>Yes</td><td>string</td><td>Address of the token being borrowed.</td></tr><tr><td><code>userWallet</code></td><td>Yes</td><td>string</td><td>User wallet address.</td></tr><tr><td><code>authorizedWallet</code></td><td>No</td><td>string</td><td>Assigned authorized wallet address through the <code>/lender/withdrawal-access/add</code> endpoint. Can be revoked and defaulted to the original <code>lenderWallet</code> by using the <code>/lender/withdrawal-access/remove</code> endpoint.</td></tr></tbody></table>

### Response Fields

<table><thead><tr><th width="175">Field</th><th width="110">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>success</code></td><td>boolean</td><td>Boolean indicating whether the transaction generation was successful.</td></tr><tr><td><code>transaction</code></td><td>string</td><td>Base58 encoded serialized transaction ready for signing.</td></tr><tr><td><code>message</code></td><td>string</td><td>Human-readable message describing the operation.</td></tr></tbody></table>

### Request Body Example

```json
{
  "amount": 170000000,
  "quoteToken": "So11111111111111111111111111111111111111112",
  "userWallet": "Ahtpvhub1Z2z3y1RUYPDb7iUkv2J9fYByWWaitPeQXVp"
}
```

### Response Example

```json
{
  "success": true,
  "transaction": "G219h4XBGMwZQmb5akLTinHZ2pZeoauwzRGQp92MjQ9MRSSHe38ir9NbHgAwXZnFLHW9s77CdHGpWEedXMM5ktZNCFduP89AexCUE1rjzs2nvfUwBJ6VtF3WJ6DXmHGLE7vC6U27D7kFGgoU6QBPvLrFAg18CYpGWxwd1XLXeN1a9im2zAZq85uxEdZYGvz5yyMKCeD5rnTNtsuTxmhd9Rt5oB32NoWUb9mMSUe8ngpJCNUTgQELMBEpdVGCUg9T7S36oU1GaxPoGNxTzCBQaB4JpaJaNBZFR9DF5dzs5RhqRvETfmHsNw9FoVRU6vwFuqqPfEGoHzP7MdM5k9c55e4rRgo7p5BYnZAH8susFkxMK8oUJkcyxijWVBvi5ozvHJL4UNMusnsV4Dmt2zaKqNpE7qSBz4k39r5Az5TUX9oj6HNeGs8JUduMACpnP3Y8ckF",
  "message": "Withdrawal transaction generated. Sign and submit to complete withdrawal."
}
```
