Skip to main content
POST
Optimize Allocations

Authorizations

X-Partner-Name
string
header
required
X-Partner-API-Key
string
header
required

Headers

X-Partner-API-Key
string | null
X-Partner-Name
string | null
PAYMENT-SIGNATURE
string | null

Path Parameters

chain_id
integer
required

Body

application/json
total_capital
string
required

Total amount to allocate (bigint as string)

Example:

"1000000000"

token_address
string
required

Token address to optimize for

current_allocations
Current Allocations · object
required

Current holdings mapping protocol names to amounts (bigint as string)

protocols
string[]
required

Protocol names to consider

constraints
ConstraintSchema · object[] | null
wallet_address
string | null

Wallet address that will execute the transactions

Response

Successful Response

optimization_result
OptimizationResult · object
required
action_plan
ActionDetail · object[]
required
calldata
CalldataInfo · object[]
required
market_rules
MarketRule · object[]

How each requested market was rated before the solver ran: closed, capped, or APR discounted.