Skip to main content
POST
/
yield
/
withdraw
curl --request POST \
  --url https://api.starknode.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"
  }'
{
  "statusCode": 200,
  "success": true,
  "status": "withdraw_yield_strategy_ok",
  "message": "Yield strategy withdrawn successfully",
  "data": {
    "position_id": "clxxxxxxxxxxxxxxxxxxxxxxxx",
    "fee_policy": {
      "is_full_withdraw": false,
      "has_tracked_profit": true,
      "charged_fixed_no_profit_fee": false,
      "charged_starkfi_fee_amount": 0.01,
      "charged_whitelabel_fee_amount": 0
    },
    "transaction": "AQAAAAA..."
  }
}

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.

x-api-key
string
required
Your StarkNode API key. You can find it in your dashboard.
provider
enum<string>
required
jupiter_lend or kamino.
chain_name
string
required
Enabled chain, e.g. solana.
asset
string
required
Token symbol.
wallet
string
required
User wallet public key.
amount
string
required
Amount to withdraw (validated against tracked and protocol balance).
curl --request POST \
  --url https://api.starknode.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"
  }'
{
  "statusCode": 200,
  "success": true,
  "status": "withdraw_yield_strategy_ok",
  "message": "Yield strategy withdrawn successfully",
  "data": {
    "position_id": "clxxxxxxxxxxxxxxxxxxxxxxxx",
    "fee_policy": {
      "is_full_withdraw": false,
      "has_tracked_profit": true,
      "charged_fixed_no_profit_fee": false,
      "charged_starkfi_fee_amount": 0.01,
      "charged_whitelabel_fee_amount": 0
    },
    "transaction": "AQAAAAA..."
  }
}

Response

data.position_id
string
required
Snapshot id for Broadcast with operation: "withdraw".
data.fee_policy
object
required
Fee application summary for this withdraw build.
data.transaction
string
required
Base64 unsigned Solana wire.