Skip to main content
Build a withdraw returns an unsigned transaction for the requested amount. Sign and broadcast on your RPC, or optionally use StarkFi yield broadcast.
POST /yield/withdraw
1

Request body

ParameterTypeRequiredDescription
providerstringjupiter_lend or kamino
assetstringToken symbol
walletstringUser’s Solana public key
amountstringAmount to withdraw
chain_namestringNetwork (e.g. solana)
2

Request example

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"
  }'
3

Expected response

{
  "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.
4

Sign and broadcast

Sign the wire, then broadcast on your RPC or submit optionally to POST /yield/broadcast.