Skip to main content
POST
Swap collateral

Headers

Idempotent-Key
string | null

Optional idempotency key; a retried write with the same key replays the original response

Body

application/json
depositCollateral
object[]
required
loan
string
required
withdrawCollateral
object[]
required
cpiIxs
object[]

Caller-supplied CPI instructions spliced into the built transaction.

cpiLuts
string[]
cpiSigners
string[]

Response

Single versioned transaction message and signatures

expectedLoanInfo
object
required

Projected loan state after the transactions land.

transactions
object[]
required

Built, ready-to-sign versioned transactions.