Skip to main content
Create a rebalance to move funds between jupiter_lend and kamino (or refresh the same protocol). The response contains an unsigned transaction to sign and broadcast.
PATCH /yield/rebalance
1

Request body

ParameterTypeRequiredDescription
chain_namestringNetwork (e.g. solana)
amountstringDecimal amount to move (> 0)
walletstringUser’s wallet public key
assetstringToken symbol (e.g. USDC)
provider_outstringWithdraw leg: jupiter_lend or kamino
provider_instringDeposit leg: jupiter_lend or kamino
providerstringWhen both legs use the same protocol, send only this field
Provide provider_in + provider_out, or a single provider when both legs are the same protocol.
2

Request example

curl --request PATCH \
  --url https://api.starkfi.io/yield/rebalance \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api_key>' \
  --data '{
    "chain_name": "solana",
    "wallet": "FmTGYpzX27fDqaiytXUdFVaphC5o68G61Q3uhVM2d8bm",
    "asset": "USDC",
    "amount": "0.01",
    "provider_out": "kamino",
    "provider_in": "jupiter_lend"
  }'
3

Expected response

{
  "statusCode": 200,
  "success": true,
  "status": "rebalance_yield_strategy_ok",
  "message": "Yield strategy rebalanced successfully",
  "data": {
    "mode": "single_transaction",
    "transaction": "<base64_unsigned_versioned_tx>"
  }
}
When instructions fit in one packet, mode is single_transaction and transaction holds the unsigned wire. Larger rebalances may return separate transactions — sign each and pass an array to yield broadcast if using StarkFi relay.
4

Sign and broadcast

Sign the returned wire(s), then broadcast on your RPC or optionally via POST /yield/broadcast.