> ## 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.

# Update Configuration

> Calldata that changes the configuration new listings are checked against

> [!NOTE]
>
> Seller Financing is in beta and runs on Ethereum Sepolia instances only for now (`DEVELOPMENT` instances on Ethereum). A `PRODUCTION` instance, or one on another network, answers `503 SELLER_FINANCING_UNAVAILABLE`. See [Seller Financing](https://docs.trusset.org/endpoints/seller-financing/introduction.md).

Builds `setConfig` on the market for a holder of the operator role to sign. The configuration sets the ranges new listings must fall within and the rates they are stamped with. It replaces the whole configuration, so send every field, including the ones you keep. Read the current values with [Get Market](https://docs.trusset.org/endpoints/seller-financing/get-market.md).

A new configuration reaches new listings only. Every listing already created, open or with a running loan, keeps the terms it was stamped with. The operator can update the configuration while the market is paused.

> [!WARNING]
>
> A configuration mined just before a seller's pending listing applies to that listing. Sellers see the terms they got in the `ListingCreated` event and can cancel an open listing they do not accept.

## Path Parameters

**marketId** `string` *required*

The market's record ID, as `id` on [List Markets](https://docs.trusset.org/endpoints/seller-financing/list-markets.md).

## Body Parameters

**config** `object` *required*

The full configuration. Each minimum must not exceed its maximum, `minInterestPeriodDays` must not exceed `maxDurationDays`, and at least one strategy must be enabled, or the request answers `400 INVALID_CONFIG`. While `minInterestPeriodDays` is below `maxDurationDays`, `maxGracePeriodDays` must be at least `1`, because a listing with periodic due dates needs a grace period of at least one day; only a market where every listing has a single period may keep `0`. A smaller value answers `400 INVALID_CONFIG` with the message "maxGracePeriodDays must be at least 1 while interest periods can be shorter than the runtime: a listing with periodic due dates needs a grace period of at least 1 day".

**minDownpaymentBps** `integer` *required*

Smallest downpayment, 500 to 9000 basis points of the price.

**maxDownpaymentBps** `integer` *required*

Largest downpayment, 500 to 9000.

**minDurationDays** `integer` *required*

Shortest runtime, 1 to 3650 days.

**maxDurationDays** `integer` *required*

Longest runtime, 1 to 3650 days.

**minInterestPeriodDays** `integer` *required*

Shortest interest period, 1 to 366 days.

**maxInterestPeriodDays** `integer` *required*

Longest interest period, 1 to 366 days.

**maxGracePeriodDays** `integer` *required*

Longest grace period, 0 to 90 days. At least `1` unless `minInterestPeriodDays` equals `maxDurationDays`.

**fixedEnabled** `boolean` *required*

Offer `FIXED` interest.

**derivedEnabled** `boolean` *required*

Offer `DERIVED` interest.

**sellerSetsFixedRate** `boolean` *required*

Let the seller name the rate of a `FIXED` listing, up to `maxFixedRateBps`. With `false`, every `FIXED` listing carries `fixedRateBps`.

**fixedRateBps** `integer` *required*

The operator's fixed annual rate, 0 to 5000 basis points.

**maxFixedRateBps** `integer` *required*

The ceiling on a seller's fixed rate, 0 to 5000.

**baseRateBps** `integer` *required*

The annual base rate of `DERIVED` interest, 0 to 5000.

**volatilityBps** `integer` *required*

The annual volatility input that prices the walk-away premium, 100 to 20000. See [Choosing the volatility input](https://docs.trusset.org/endpoints/seller-financing/deploy-market.md#choosing-the-volatility-input).

**from** `string` *required*

The wallet that signs: a holder of `OPERATOR_ROLE` on the market, the operator named at deployment unless the admin moved the role. Without it the answer is `400 FROM_REQUIRED`. Any other wallet answers `409 TX_WOULD_REVERT` with `AccessControlUnauthorizedAccount`, and `details.requiredRole` and `details.roleHolders` name the role and the wallets that hold it now.

## Response Fields

**data** `object`

**action** `string`

`SIGN_TRANSACTIONS`.

**chainId** `integer`

The chain the step is built for.

**steps** `array`

One step, `setConfig` on the market, with `gasLimit`.

**confirmStepIndex** `integer`

`0`.

**preflight** `object`

`{ simulated: true, gasEstimate }`.

**config** `object`

The configuration the step sets, as you sent it.

**signer** `object`

`{ role, holders, holdersComplete }`. `role` is `OPERATOR_ROLE`. `holders` lists the wallets that hold it now, `null` when they could not be read. `holdersComplete` is `false` when the market's role history was read in part, so a holder may be missing.

```bash cURL theme={null}
curl -X POST "https://api.trusset.org/seller-financing/api/markets/cmsg4x7k20003sf9q1d8v6b2e/config" \
  -H "X-API-Key: trusset_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "config": {
      "minDownpaymentBps": 1000,
      "maxDownpaymentBps": 9000,
      "minDurationDays": 30,
      "maxDurationDays": 3650,
      "minInterestPeriodDays": 7,
      "maxInterestPeriodDays": 92,
      "maxGracePeriodDays": 14,
      "fixedEnabled": true,
      "derivedEnabled": true,
      "sellerSetsFixedRate": true,
      "fixedRateBps": 800,
      "maxFixedRateBps": 1500,
      "baseRateBps": 400,
      "volatilityBps": 1500
    },
    "from": "0xCD421aBbA2b9b047eC069215Df5C49c97C96f895"
  }'
```

```typescript TypeScript theme={null}
const { data: market } = await (await fetch(
  `https://api.trusset.org/seller-financing/api/markets/${marketId}`,
  { headers: { 'X-API-Key': 'trusset_your_key_here' } }
)).json();
const { raw, ...current } = market.config;

const res = await fetch(
  `https://api.trusset.org/seller-financing/api/markets/${marketId}/config`,
  {
    method: 'POST',
    headers: { 'X-API-Key': 'trusset_your_key_here', 'Content-Type': 'application/json' },
    body: JSON.stringify({ config: { ...current, volatilityBps: 1500 }, from: await operator.getAddress() })
  }
);
```

```json Response theme={null}
{
  "success": true,
  "data": {
    "action": "SIGN_TRANSACTIONS",
    "chainId": 11155111,
    "steps": [
      {
        "to": "0xc35e5f74eC4C1dfB8cE2b8798D6161B706F9B5E1",
        "data": "0x9cd3912e...",
        "value": "0",
        "functionName": "setConfig",
        "label": "Update the market configuration for new listings",
        "description": "Update the market configuration for new listings",
        "gasLimit": "77873",
        "chainId": 11155111
      }
    ],
    "confirmStepIndex": 0,
    "preflight": {
      "simulated": true,
      "gasEstimate": "59903"
    },
    "config": {
      "minDownpaymentBps": 1000,
      "maxDownpaymentBps": 9000,
      "minDurationDays": 30,
      "maxDurationDays": 3650,
      "minInterestPeriodDays": 7,
      "maxInterestPeriodDays": 92,
      "maxGracePeriodDays": 14,
      "fixedEnabled": true,
      "derivedEnabled": true,
      "sellerSetsFixedRate": true,
      "fixedRateBps": 800,
      "maxFixedRateBps": 1500,
      "baseRateBps": 400,
      "volatilityBps": 1500
    },
    "signer": {
      "role": "OPERATOR_ROLE",
      "holders": ["0xCD421aBbA2b9b047eC069215Df5C49c97C96f895"],
      "holdersComplete": true
    }
  },
  "error": null,
  "metadata": {
    "timestamp": "2026-10-19T09:12:04.318Z",
    "requestId": "3f7c2a91-6d84-4b0e-9a15-c2e8f4d7b603",
    "instanceId": "inst_abc123"
  }
}
```

```json Error - Not the Operator theme={null}
{
  "success": false,
  "data": null,
  "error": {
    "code": "TX_WOULD_REVERT",
    "message": "The signing wallet does not hold the role this action needs on the market.",
    "details": {
      "action": "configuration update",
      "error": "AccessControlUnauthorizedAccount",
      "args": [
        "0x3E22FdfA28e880239541d9c5B66B3b161F9ED77b",
        "0x97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929"
      ],
      "revertData": "0xe2517d3f0000000000000000000000003e22fdfa28e880239541d9c5b66b3b161f9ed77b97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929"
    }
  },
  "metadata": {
    "timestamp": "2026-10-19T09:12:04.318Z",
    "requestId": "3f7c2a91-6d84-4b0e-9a15-c2e8f4d7b603",
    "instanceId": "inst_abc123"
  }
}
```

## Error Codes

| Code | HTTP | Cause |
| - | - | - |
| `VALIDATION_ERROR` | `400` | A `config` field is missing or outside its bounds, `from` is malformed, or the body carries another field. `error.details` names each field, an unknown one by its own name |
| `FROM_REQUIRED` | `400` | `from` is missing. The message names who signs: a wallet that holds `OPERATOR_ROLE` on the market |
| `INVALID_CONFIG` | `400` | The configuration is inconsistent: a minimum above its maximum, `minInterestPeriodDays` above `maxDurationDays`, no strategy enabled, or `maxGracePeriodDays` below `1` while `minInterestPeriodDays` is below `maxDurationDays`. `message` is the first problem and `details.problems` lists all |
| `MARKET_NOT_FOUND` | `404` | No market with this ID that your instance reaches on its network |
| `TX_WOULD_REVERT` | `409` | The update would revert: `AccessControlUnauthorizedAccount` when `from` lacks the operator role, with `details.requiredRole` and `details.roleHolders`, or `InvalidConfig` |
| `CHAIN_UNAVAILABLE` | `503` | The chain could not be read. Nothing was built. Retry shortly |
| `SELLER_FINANCING_UNAVAILABLE` | `503` | The instance is a `PRODUCTION` instance or not on Ethereum |
| `CONFIG_BUILD_FAILED` | `500` | Unexpected failure. Nothing was built. Retry, or contact support with the request ID |


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