> ## 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 (yield)

> Build an unsigned Solana withdraw transaction.

<ParamField header="x-api-key" type="string" required placeholder="your-api-key">
  Your StarkFi API key.
</ParamField>

<ParamField body="provider" type="enum<string>" required>
  `jupiter_lend` or `kamino`.
</ParamField>

<ParamField body="chain_name" type="string" required>
  Enabled chain, e.g. `solana`.
</ParamField>

<ParamField body="asset" type="string" required>
  Token symbol.
</ParamField>

<ParamField body="wallet" type="string" required>
  User wallet public key.
</ParamField>

<ParamField body="amount" type="string" required>
  Amount to withdraw.
</ParamField>

<RequestExample>
  ```bash cURL 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",
      "chain_name": "solana",
      "asset": "USDC",
      "wallet": "FmTGYpzX27fDqaiytXUdFVaphC5o68G61Q3uhVM2d8bm",
      "amount": "5.0"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "statusCode": 200,
    "success": true,
    "status": "withdraw_yield_strategy_ok",
    "message": "Yield strategy withdrawn successfully",
    "data": {
      "transaction": "AQAAAAA..."
    }
  }
  ```

  ```json 400 - Bad Request theme={null}
  {
    "statusCode": 400,
    "success": false,
    "status": "invalid_parameters",
    "message": "..."
  }
  ```
</ResponseExample>

### Response

<ResponseField name="data.transaction" type="string">
  Base64 unsigned Solana wire. Sign and broadcast on your RPC, or optionally via [Broadcast yield](/broadcast).
</ResponseField>
