Skip to main content
POST
Opens an overcollateralized loan. The borrower pledges ERC-3643 security tokens and receives the market’s borrow asset. How the collateral is secured depends on the market’s mode: FREEZE locks the tokens in the borrower’s own wallet, CUSTODY escrows them in the adapter. The maximum borrow is the collateral value multiplied by the market’s collateral factor. Quote it first with Get Max Borrow.

Path Parameters

string
required
Market ID.

Body Parameters

string
required
Security tokens to pledge, as a decimal string. Parsed at the collateral token’s decimals.
string
required
Amount to borrow, as a decimal string. Parsed at the borrow asset’s decimals. Must be at least the market’s minBorrowAmount.
object
EIP-712 signed price from Sign Price, applied atomically with the loan. Omit to price against the stored oracle value, which must not be stale.
string
Hash of the transaction you broadcast for this operation. Send it to confirm the transaction and record the result. Omit it to receive the calldata.

Transaction Shape by Mode

When txHash is omitted the response is always SIGN_TRANSACTIONS with a mode field, and the step count depends on the market. CUSTODY returns two steps: approve on the collateral token for the adapter, then openLoan. Broadcast in order. FREEZE returns one step: openLoan. No approval exists because the tokens never leave the borrower’s wallet.

Response Fields

Confirming returns 201.
object
Loans cannot be opened until the market’s collateral adapter is authorized on the token. The endpoint checks this before doing anything else and rejects with COLLATERAL_ADAPTER_NOT_AUTHORIZED or FREEZE_MODE_UNSUPPORTED_TOKEN. See Get Setup Steps.
Minimum and maximum borrow are checked when the calldata is built, not when you confirm. Broadcasting an out-of-range amount reverts on-chain rather than returning BELOW_MIN_BORROW or EXCEEDS_MAX_BORROW. The maximum borrow check is also skipped whenever a signedPrice is supplied, since the contract will price against the signature rather than the stored value.

Errors