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

# Build withdraw operation

> Build an unsigned Solana withdraw transaction for Jupiter Lend or Kamino.

Build a withdraw returns an unsigned transaction for the requested amount. Sign and broadcast on your RPC, or optionally use StarkFi yield broadcast.

```shellscript theme={null}
POST /yield/withdraw
```

<Steps>
  <Step title="Request body">
    | Parameter    | Type   | Required | Description                |
    | ------------ | ------ | -------- | -------------------------- |
    | `provider`   | string | ✅        | `jupiter_lend` or `kamino` |
    | `asset`      | string | ✅        | Token symbol               |
    | `wallet`     | string | ✅        | User's Solana public key   |
    | `amount`     | string | ✅        | Amount to withdraw         |
    | `chain_name` | string | ✅        | Network (e.g. `solana`)    |
  </Step>

  <Step title="Request example">
    ```shellscript theme={null}
    curl --request POST \
      --url https://api.starkfi.io/yield/withdraw \
      --header 'Content-Type: application/json' \
      --header 'x-api-key: <api_key>' \
      --data '{
        "provider": "jupiter_lend",
        "asset": "USDC",
        "wallet": "FmTGYpzX27fDqaiytXUdFVaphC5o68G61Q3uhVM2d8bm",
        "amount": "0.01",
        "chain_name": "solana"
      }'
    ```
  </Step>

  <Step title="Expected response">
    ```json theme={null}
    {
      "statusCode": 200,
      "success": true,
      "status": "withdraw_yield_strategy_ok",
      "message": "Yield strategy withdrawn successfully",
      "data": {
        "transaction": "AQAAAAA..."
      }
    }
    ```

    `data.transaction` is the base64 unsigned wire. Additional provider-specific fields may appear in `data` depending on the protocol build.
  </Step>

  <Step title="Sign and broadcast">
    Sign the wire, then broadcast on your RPC or submit optionally to [`POST /yield/broadcast`](/broadcast-your-operations).
  </Step>
</Steps>
