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.
Your StarkNode API key. You can find it in your dashboard .
Enabled chain, e.g. solana.
Must parse to a finite number greater than zero.
User pubkey (or use signer).
Token symbol (or use symbol, token_mint, mint).
Withdraw leg: jupiter_lend or kamino (use with provider_in).
Deposit leg: jupiter_lend or kamino (use with provider_out).
When both legs use the same protocol, send only this field instead of provider_in / provider_out.
curl --request PATCH \
--url https://api.starknode.io/yield/rebalance \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api_key>' \
--data '{
"chain_name": "solana",
"wallet": "FmTGYpzX27fDqaiytXUdFVaphC5o68G61Q3uhVM2d8bm",
"asset": "USDC",
"amount": "10.0",
"provider_out": "kamino",
"provider_in": "jupiter_lend"
}'
200 - Success
404 - Not Found
400 - Bad Request
{
"statusCode" : 200 ,
"success" : true ,
"status" : "rebalance_yield_strategy_ok" ,
"message" : "Yield strategy rebalanced successfully" ,
"data" : {
"position_out_id" : "clxxxxxxxxxxxxxxxxxxxxxxxx" ,
"position_in_id" : "clyyyyyyyyyyyyyyyyyyyyyyyy" ,
"rebalance" : {
"success" : true ,
"message" : "rebalance_yield_strategy_built" ,
"details" : {
"mode" : "single_transaction" ,
"transaction" : "AQAAAAA..."
}
}
}
}
Response
Source snapshot id for broadcast.
Target snapshot id for broadcast.
Build result: success, message, and details with mode (single_transaction or two_transaction) and either transaction or withdraw_transaction + deposit_transaction (base64 unsigned wires).