Skip to main content
POST
Create loan

Headers

User-Wallet
string | null

Base58 wallet used as the fee payer when payer is omitted

payer
string | null

Base58 wallet that pays transaction fees; defaults to the User-Wallet wallet when omitted

Transaction-Settings
string | null

Optional JSON-encoded transaction settings (priority-fee percentile, compute limits, simulation mode)

Idempotent-Key
string | null

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

Body

application/json
borrower
string
required
depositCollateral
object[]
required
principalRequested
object[]
required
assetIndexGuidance
integer<int32>[]

Per-collateral oracle asset-index guidance (one byte per collateral slot).

Required range: x >= 0
isLoop
boolean | null
loanNonce
string | null
unstakeInstructions
null | object

Optional vault LP unstake leg to compose with this txn as a prefix.

Response

Serialized transaction and derived loan address.

loanAddress
string
required
transaction
object
required

Final user-facing create-loan transaction. Kept for older clients that only understand the pre-batch response shape.

transactions
object[]
required

Ordered transaction batch. Any Switchboard crank transactions come before the user-facing create-loan transaction.