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.
To move a user’s invested balance from one protocol to another (or to rebuild the operation on the same protocol), create a rebalance operation with the endpoint below. You must execute it through our yield broadcast endpoint — do not broadcast with sendTransaction or a third-party RPC. The user only signs; your backend submits the signed payload to StarkFi.
Building a rebalance operation
Building rebalance operation
Building a rebalance operation
| Parameter | Type | Required | Description |
|---|---|---|---|
chain_name | string | ✅ | Network where the position lives (e.g. solana). |
amount | string | ✅ | Decimal amount to move (must be > 0, e.g. "100.00"). |
wallet | string | ✅ | User’s wallet public key. |
asset | string | ✅ | Token symbol (e.g. USDC). |
provider_out | string | Protocol to withdraw from: jupiter_lend or kamino. | |
provider_in | string | Protocol to deposit into: jupiter_lend or kamino. | |
provider | string | When both sides are the same protocol, send only this field (withdraw + deposit use the same provider). |
Either provider_in and provider_out, or a single provider (same protocol on both legs).
Expected response
The API returns the standard envelope. On success,
data includes position_out_id, position_in_id, and rebalance (build result: success, message, and details).Single merged transaction
When instructions fit in one Solana packet,details.mode is single_transaction.You can now submit your signed transaction using our broadcast endpoint.
.png?fit=max&auto=format&n=I_v6ul4JDafNKFQP&q=85&s=f0ad25536f8a3ca42331fcff88ab2b26)