> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trusset.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Agreement Policy

> Read whether loan agreements are off, optional or required on a market

Returns the market's effective loan agreement policy and where it comes from. A market without a policy reads `OFF` with `source: DEFAULT`. When the bank's standing policy carries agreement settings and the market was adopted after they were saved, the first read creates the market's policy from it (`source: STANDING_POLICY`). See [Loan Agreements](https://docs.trusset.org/endpoints/lending/loan-agreements.md#standing-policies).

## Who can read

An API key of any instance that holds the market. `viewer` says whether your instance is the market's bank and, for the bank, whether its plan includes loan agreements.

## Path Parameters

**marketId** `string` *required*

The market's record ID on your instance.

## Response Fields

**data** `object`

**policy.mode** `string`

`OFF`, `OPTIONAL` or `REQUIRED`.

**policy.validityDays** `number`

How long an issued `LOAN` agreement's offer stays open, in days.

**policy.autoIssue** `boolean`

Whether a request inside the market rules is issued at once.

**policy.autoIssueMaxAmount** `string | null`

With `autoIssue`, the largest borrow amount issued at once, in the borrow asset. `null` means no ceiling.

**policy.frameworkValidityDays** `number | null`

How long a `FRAMEWORK` agreement runs when the bank creates one without `validUntil`. `null` means no default.

**policy.requestAccess** `string`

`ANY` when every instance with access may request agreements, `BANK_ONLY` when only the bank creates them.

**policy.source** `string`

`DEFAULT`, `MANUAL` (set on this market) or `STANDING_POLICY`.

**policy.standingPolicyId** `string | null`

The standing policy the settings came from.

**policy.setByWallet** `string | null`

The bank's admin wallet that set the policy, or the adopting wallet.

**policy.setByThisInstance** `boolean`

Whether your instance set it.

**policy.enforcement** `string`

Always `BACKEND_CHECK`: `REQUIRED` is checked by Trusset before it builds a transaction, not by the contract.

**policy.notice** `string | null`

The enforcement note, in `REQUIRED` mode.

**policy.viewer** `object`

`{ isBank, canConfigure, planAllows }`. `planAllows` is answered for the bank only.

**policy.standingPolicyPending** `object`

For the bank: a matching standing policy carries agreement settings but did not apply, with `reason` (`ADOPTED_BEFORE_POLICY`, `PLAN`, `POLICY_OFF`).

```json 200 Required theme={null}
{
  "success": true,
  "data": {
    "policy": {
      "mode": "REQUIRED",
      "validityDays": 30,
      "autoIssue": false,
      "autoIssueMaxAmount": null,
      "frameworkValidityDays": null,
      "requestAccess": "ANY",
      "source": "MANUAL",
      "standingPolicyId": null,
      "setByWallet": "0x5ad87a0621175206b72d10e4b8577b192e7f40ab",
      "setByThisInstance": true,
      "updatedAt": "2026-11-21T15:40:02.114Z",
      "enforcement": "BACKEND_CHECK",
      "notice": "REQUIRED is checked by the Trusset backend before it builds an open or borrow-more transaction. A borrower who calls the market contract directly can still open a loan without an agreement.",
      "viewer": {
        "isBank": true,
        "canConfigure": true,
        "planAllows": true
      }
    },
    "marketId": "cmwfk2h7x0003jw9w4q8b2n1c"
  },
  "error": null
}
```

## Error Codes

| Code | HTTP | Cause |
| - | - | - |
| `MARKET_NOT_FOUND` | `404` | No market with this ID on your instance |
| `AGREEMENT_POLICY_UNREADABLE` | `503` | The policy could not be read just now. Nothing was decided. Retry shortly |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.