Skip to main content
POST
Create Loan Agreement
Creates a loan agreement on a market whose policy is OPTIONAL or REQUIRED.
  • As the borrower side, you request a LOAN agreement with the figures you want. It starts REQUESTED and the bank issues it, or it is issued at once when the policy has autoIssue, the figures are inside the market rules and the borrow amount is within autoIssueMaxAmount. On a market whose policy has requestAccess: BANK_ONLY, only the bank creates agreements and a request answers 403 AGREEMENT_REQUESTS_CLOSED. The same request sent again while it waits returns the existing agreement with created: false.
  • As the bank, you create a LOAN agreement for a wallet, or a FRAMEWORK agreement with a credit limit and an end date. It is issued at once: the schedule is frozen and the salt created. This needs the Scale plan.
The figures are checked against the market: the principal or limit at least the market minimum, the collateral within the per-borrower cap, and the principal within what the collateral supports at the current price. A new issued agreement of the same kind for the same wallet supersedes an earlier open one. The schedule names no person. Send no names and no file: the body is checked for both.

Path Parameters

string
required
The market’s record ID on your instance.

Body Parameters

string
required
The wallet that will borrow.
string
LOAN (default) or FRAMEWORK. Only the bank creates a FRAMEWORK agreement.
string
LOAN only, required. Collateral units as a decimal string.
string
LOAN only, required. The principal in the settlement asset, as a decimal string.
string
FRAMEWORK only, required. The credit limit in the settlement asset.
string
FRAMEWORK only. An ISO date or unix seconds, at least one day and at most 1830 days ahead. Left out, the framework runs for the policy’s frameworkValidityDays; without that default it is required.
string
The wallet that receives the proceeds, if not the borrower.
string
Your own case or file number: 1 to 64 letters, digits, dots, underscores or hyphens. No personal data.
number
Bank only. Shortens the offer for this agreement; never longer than the policy.
string
Bank only. The admin wallet named as lender in the schedule. Defaults to your first verified admin wallet.

Response Fields

object

Error Codes