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

> One market with its configuration, repay fee, counters, register state and token-side setup

> [!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).

Returns one market: the record stored at deployment, and its configuration, repay fee, identity register, counters and token-side setup read live from the market contract.

The market answers on the instance that deployed it and on any instance one of whose verified wallets holds `OPERATOR_ROLE` or `DEFAULT_ADMIN_ROLE` on it, read on chain with each request. `access` says which. Any other instance gets `404 MARKET_NOT_FOUND`. See [Which markets your instance reaches](https://docs.trusset.org/endpoints/seller-financing/introduction.md#which-markets-your-instance-reaches).

The configuration is what new listings are checked against and stamped with. A listing already created keeps the terms it was stamped with, whatever the configuration says now.

## 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), not its contract address.

## Response Fields

**data** `object`

**id** `string`

The market's record ID.

**chainId** `integer`

`11155111` on Sepolia.

**address** `string`

The market contract.

**adapter** `string`

The market's collateral adapter.

**assetToken** `string`

The token being sold.

**paymentToken** `string`

The token the buyer pays in.

**mode** `string`

`FREEZE` or `CUSTODY`.

**admin** `string`

The admin named at deployment.

**operator** `string`

The operator named at deployment, or the admin when none was named.

**collateralAgent** `string`

The pledgee named on every lock. Immutable.

**deployTxHash** `string`

The deployment transaction, lowercased.

**deployBlock** `integer`

The block it was mined in.

**signer** `string`

The wallet that signed the deployment.

**factory** `string`

The factory the market contract names, read live. `null` when unread.

**createdAt** `string`

ISO 8601 time the market was recorded.

**access** `object`

`{ kind: "DEPLOYER" }` when your instance recorded the market. `{ kind: "ROLE_HOLDER", wallets }` when another instance did: `wallets` lists each of your verified wallets that holds a role, as `{ wallet, roles }`, with `roles` the roles `hasRole` confirmed just now.

**asset** `object`

`{ address, symbol, name, decimals }` of the asset token, `address` lowercased. `null` when the read failed.

**payment** `object`

The same for the payment token.

**config** `object`

The configuration new listings are checked against. `null` when unread.

**minDownpaymentBps** `integer`

Smallest downpayment, in basis points of the price.

**maxDownpaymentBps** `integer`

Largest downpayment, in basis points of the price.

**minDurationDays** `number`

Shortest runtime, in days.

**maxDurationDays** `number`

Longest runtime, in days.

**minInterestPeriodDays** `number`

Shortest interest period, in days.

**maxInterestPeriodDays** `number`

Longest interest period, in days.

**maxGracePeriodDays** `number`

Longest grace period, in days.

**fixedEnabled** `boolean`

Whether listings can take `FIXED` interest.

**derivedEnabled** `boolean`

Whether listings can take `DERIVED` interest.

**sellerSetsFixedRate** `boolean`

`true` when a `FIXED` listing carries the seller's own rate, up to `maxFixedRateBps`. `false` when the operator's `fixedRateBps` applies.

**fixedRateBps** `integer`

The operator's fixed annual rate, in basis points.

**maxFixedRateBps** `integer`

The ceiling on a seller's fixed rate, in basis points.

**baseRateBps** `integer`

The annual base rate of `DERIVED` interest, in basis points.

**volatilityBps** `integer`

The annual volatility input that prices the walk-away premium of `DERIVED` interest, in basis points.

**raw** `object`

The same values as the contract holds them: durations in seconds, rates and volatility as 18-decimal fixed-point fractions per year.

**paused** `boolean`

Whether the market is paused for new business. `null` when unread.

**repayFee** `string`

The repay fee stamped at deployment, in the payment token's smallest unit. Each repayment carries the smaller of this and 0.5 percent of the amount applied. See [Fees](https://docs.trusset.org/endpoints/seller-financing/introduction.md#fees).

**repayFeeFormatted** `string`

`repayFee` in whole units.

**identityRegistry** `string`

The market identity register that examines sellers and buyers, read live. `null` when the market names none.

**paymentDecimals** `integer`

The payment token's decimals as the market recorded them.

**stats** `object`

**listings** `string`

Listings ever created. Also the highest listing ID.

**openListings** `string`

Listings waiting for a buyer.

**activeLoans** `string`

Loans running.

**totalEscrowed** `string`

Downpayments and principal payments held for active loans, in smallest units.

**totalEscrowedFormatted** `string`

`totalEscrowed` in whole units.

**totalClaimable** `string`

What all wallets together can withdraw now, in smallest units. `null` when unread.

**trussetFeesPayable** `string`

Fees the market owes Trusset and has not paid out yet, in smallest units. `null` when unread.

**checked** `boolean`

`true` when the scan behind the next three counters read every listing. It reads up to 500 listings. A market without listings reads `true` with counters at `0`, and a scan that failed reads `false` with `null` counters. A scan is kept for up to 60 seconds while the market's counters stay the same.

**expiredListings** `integer`

`OPEN` listings past their `expiresAt`, which can no longer be bought. `openListings` still counts them, as the contract does. `null` when the scan failed.

**brokenAssetLegs** `integer`

`ACTIVE` and `REPAID` listings whose asset can no longer be delivered to the buyer. Their payoff and asset claim are refused with `ASSET_NOT_DELIVERABLE`. `null` when the scan failed. See [Asset leg](https://docs.trusset.org/endpoints/seller-financing/introduction.md#asset-leg).

**atRiskAssetLegs** `integer`

Freeze-mode listings that can still be delivered but carry a warning: part of the freeze was released, or the seller's balance covers fewer than all of its sold listings. `null` when the scan failed.

**identityGate** `object`

Whether the register in `identityRegistry` can admit anyone: `{ registry, usable, code, reason }`. `usable` is `true` with no register or a working one, `false` when the register is the retired Trusset ID Register (`code: "IDENTITY_REGISTRY_RETIRED"`) or does not answer `isVerified(address)` (`code: "IDENTITY_REGISTRY_INCOMPATIBLE"`), and `null` when it could not be read just now. With `usable: false` the market refuses every listing and purchase, and `reason` names the remedy, [Set Identity Register](https://docs.trusset.org/endpoints/seller-financing/set-identity-registry.md). The whole block is `null` when the market's register could not be read.

**tokenSetup** `object`

Where the adapter stands on the asset token: `{ ready, mode, requirement, authorizedVia, identityRegistry, reason }`. See [Setup status](https://docs.trusset.org/endpoints/seller-financing/token-setup.md#setup-status).

> [!WARNING]
>
> The counters must be readable for this endpoint to answer. When they are not, it answers `503 CHAIN_UNAVAILABLE` rather than a market without figures. Every other block falls back on its own to `null`.

```bash cURL theme={null}
curl "https://api.trusset.org/seller-financing/api/markets/cmsg4x7k20003sf9q1d8v6b2e" \
  -H "X-API-Key: trusset_your_key_here"
```

```typescript TypeScript theme={null}
const res = await fetch(
  `https://api.trusset.org/seller-financing/api/markets/${marketId}`,
  { headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
console.log(`${data.mode} market, repay fee ${data.repayFeeFormatted} ${data.payment?.symbol}`);
```

```json Response theme={null}
{
  "success": true,
  "data": {
    "id": "cmsg4x7k20003sf9q1d8v6b2e",
    "chainId": 11155111,
    "address": "0xc35e5f74eC4C1dfB8cE2b8798D6161B706F9B5E1",
    "adapter": "0x037B9e26D8B98aa1B1FCC321ba45A87Fc786C7Fc",
    "assetToken": "0x305382e98F8e6ee24c32dF3567342E1F1DECb9b6",
    "paymentToken": "0x98aD0ca091552e23C564B41C74282e5343D03E8a",
    "mode": "FREEZE",
    "admin": "0xCD421aBbA2b9b047eC069215Df5C49c97C96f895",
    "operator": "0xCD421aBbA2b9b047eC069215Df5C49c97C96f895",
    "collateralAgent": "0xCD421aBbA2b9b047eC069215Df5C49c97C96f895",
    "deployTxHash": "0xab2709878f3c6a93fef46c073043a8a7206fa5a164e04bf1f2cd5055da619fde",
    "deployBlock": 11943817,
    "signer": "0xCD421aBbA2b9b047eC069215Df5C49c97C96f895",
    "factory": "0x2805394e8fCC41bB11613c95967be0104AB88b1c",
    "createdAt": "2026-10-18T21:44:05.112Z",
    "access": { "kind": "DEPLOYER" },
    "asset": {
      "address": "0x305382e98f8e6ee24c32df3567342e1f1decb9b6",
      "symbol": "SFSS",
      "name": "Seller Financing Smoke Share",
      "decimals": 0
    },
    "payment": {
      "address": "0x98ad0ca091552e23c564b41c74282e5343d03e8a",
      "symbol": "USDC",
      "name": "USD Coin (Mock)",
      "decimals": 6
    },
    "config": {
      "minDownpaymentBps": 500,
      "maxDownpaymentBps": 9000,
      "minDurationDays": 1,
      "maxDurationDays": 3650,
      "minInterestPeriodDays": 1,
      "maxInterestPeriodDays": 366,
      "maxGracePeriodDays": 90,
      "fixedEnabled": true,
      "derivedEnabled": true,
      "sellerSetsFixedRate": true,
      "fixedRateBps": 800,
      "maxFixedRateBps": 2000,
      "baseRateBps": 400,
      "volatilityBps": 1200,
      "raw": {
        "minDuration": "86400",
        "maxDuration": "315360000",
        "minInterestPeriod": "86400",
        "maxInterestPeriod": "31622400",
        "maxGracePeriod": "7776000",
        "fixedRate": "80000000000000000",
        "maxFixedRate": "200000000000000000",
        "baseRate": "40000000000000000",
        "volatility": "120000000000000000"
      }
    },
    "paused": false,
    "repayFee": "1500000",
    "repayFeeFormatted": "1.5",
    "identityRegistry": null,
    "paymentDecimals": 6,
    "stats": {
      "listings": "3",
      "openListings": "0",
      "activeLoans": "0",
      "totalEscrowed": "0",
      "totalEscrowedFormatted": "0.0",
      "totalClaimable": "0",
      "trussetFeesPayable": "1548106",
      "checked": true,
      "expiredListings": 0,
      "brokenAssetLegs": 0,
      "atRiskAssetLegs": 0
    },
    "identityGate": { "registry": null, "usable": true, "reason": null },
    "tokenSetup": {
      "ready": true,
      "mode": "FREEZE",
      "requirement": "adapter_must_hold_agent_role",
      "authorizedVia": null,
      "identityRegistry": null,
      "reason": null
    }
  },
  "error": null,
  "metadata": {
    "timestamp": "2026-10-19T09:12:04.318Z",
    "requestId": "3f7c2a91-6d84-4b0e-9a15-c2e8f4d7b603",
    "instanceId": "inst_abc123"
  }
}
```

```json Error - Not Found theme={null}
{
  "success": false,
  "data": null,
  "error": {
    "code": "MARKET_NOT_FOUND",
    "message": "Market not found on this instance. A market is reached on the instance that deployed it, or on an instance one of whose verified wallets holds the operator or admin role on it."
  },
  "metadata": {
    "timestamp": "2026-10-19T09:12:04.318Z",
    "requestId": "3f7c2a91-6d84-4b0e-9a15-c2e8f4d7b603",
    "instanceId": "inst_abc123"
  }
}
```

## Error Codes

| Code | HTTP | Cause |
| - | - | - |
| `MISSING_MARKET_ID` | `400` | `marketId` is longer than 100 characters |
| `MARKET_NOT_FOUND` | `404` | No market with this ID that your instance reaches on its network: it neither deployed it nor holds a role on it through a verified wallet. A contract address sent as the ID answers the same |
| `CHAIN_UNAVAILABLE` | `503` | The market's counters could not be read, or, for a market another instance deployed, whether your wallets hold a role on it. Nothing was changed. Retry shortly |
| `SERVICE_UNAVAILABLE` | `503` | Your instance's verified wallets could not be read for the role check. Retry shortly |
| `SELLER_FINANCING_UNAVAILABLE` | `503` | The instance is a `PRODUCTION` instance or not on Ethereum |
| `MARKET_READ_FAILED` | `500` | Unexpected failure. Nothing was changed. Retry, or contact support with the request ID |


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