Skip to main content
POST
Create a loan (borrow)

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request to originate a new borrow position.

idempotencyKey
string<uuid>
required

Idempotency key (UUID v4) for this request. Reusing it with a different body returns 409 Conflict.

protocol
enum<string>
required

Lending protocol.

Available options:
morpho
marketId
string
required

Identifier of an active market from GET /v1/borrow/markets.

borrowAmount
string
required

Borrow amount, as a raw onchain uint256 base-unit amount (decimal-integer string). Must be positive.

collateralAmount
string

Collateral to post, as a raw onchain uint256 base-unit amount (decimal-integer string, no fractional part). Optional. Omit or send 0 to draw additional debt against an existing position without adding collateral. When supplied, must be zero or positive.

Response

Loan request (borrow) accepted. Poll the returned job to track its status.

data
object

An async onchain operation. Each job represents one of: borrow, repay, add collateral, wallet setup, owner change, or residual withdraw. Poll this resource until the job reaches a terminal status (completed, failed, or approval_rejected). Fields that do not apply to the current status or job type are omitted rather than returned as null.

Example: