Skip to main content
POST
/
api
/
v1
/
ika
/
agent
/
rebalance-plan
Compute rebalance plan
curl --request POST \
  --url https://backend.inkwell.finance/api/v1/ika/agent/rebalance-plan \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "positions": [
    {
      "stakedIkaId": "<string>",
      "validatorId": "<string>",
      "principal": "<string>"
    }
  ],
  "maxTargets": 10
}
'
{
  "currentPositions": [
    {
      "validator": "<string>",
      "stakedAmount": "<string>",
      "currentApy": 123
    }
  ],
  "steps": [
    {
      "action": "unstake",
      "validator": "<string>",
      "amount": "<string>",
      "requiresEpochWait": true,
      "order": 123
    }
  ],
  "summary": {
    "currentWeightedApy": 123,
    "projectedWeightedApy": 123,
    "estimatedEpochsToComplete": 123
  },
  "dataAgeSeconds": 123
}

Documentation Index

Fetch the complete documentation index at: https://docs.inkwell.finance/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

X-API-Key
string
header
required

Agent API key obtained via self-registration or admin registration

Body

application/json
positions
object[]
required
Required array length: 1 - 50 elements
maxTargets
integer
default:10
Required range: 1 <= x <= 10

Response

Rebalance plan with steps

currentPositions
object[]
steps
object[]
summary
object
dataAgeSeconds
number