Skip to main content
PUT
Set Agreement Policy
Sets the market’s loan agreement policy. A setting made here always wins: it replaces a policy that came from a standing policy, and no standing policy overwrites it later. Fields you leave out keep their current value. Switching to OPTIONAL or REQUIRED needs the Scale plan on the bank’s instance. Switching to OFF is always allowed. Agreements already issued stay as they are; OFF only stops the gate and the binding.

Who can set it

The bank: an API key of an instance with a verified wallet that holds DEFAULT_ADMIN_ROLE on the market.

Path Parameters

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

Body Parameters

string
OFF, OPTIONAL or REQUIRED.
number
1 to 365. How long an issued LOAN agreement’s offer stays open. Default 30.
boolean
Issue a borrower’s request at once when its figures are inside the market rules. Default false.
string
With autoIssue on, the largest borrow amount issued at once, as a decimal of the borrow asset such as "50000". A larger request stays REQUESTED for the bank. null removes the ceiling. Default null. Left out, the current value stays.
number
7 to 1830. How long a FRAMEWORK agreement runs when the bank creates one without validUntil. null means no default, so validUntil stays required. Default null.
string
Who may request agreements on this market. ANY, the default, lets every instance with access to the market request one for its borrowers. BANK_ONLY closes requests: only the bank creates agreements, and a request from another instance answers 403 AGREEMENT_REQUESTS_CLOSED.
string
The admin wallet to record as the setter. Defaults to your first verified admin wallet.

Response Fields

The policy as Get Agreement Policy returns it.

Error Codes