Skip to main content

Allocate (multi-op batch)

POST 

/v1/actions/allocate

Bundles multiple lending and token operations into a single composer transaction. Useful for portfolio rebalances, atomic deposit-then-borrow flows, or wrap/unwrap + deposit combos that should not be split across separate user signatures.

Request body: { chainId, operator, actions[] }. Each actions[] entry is { type, params } where type is one of Deposit | Withdraw | Borrow | Repay | Transfer | Wrap | Unwrap | Sweep. The params shape is action-specific (asset, amount, market, etc.) — see the AllocationAction schema.

Response: a single composer-call payload (operations / data / value) ready to send to the composer contract, plus permissionTxns for any required ERC20 approvals or borrow delegations.

Returns 422 with field-level details if validation fails (unknown action type, missing required params, incompatible chain/lender combo).

Request

Responses

Allocation transaction