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

# List Markets

> List the Seller Financing markets your instance deployed or holds a role on, with live 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](/endpoints/seller-financing/introduction.md).

Returns the Seller Financing markets your instance reaches on its network, at most 100: first the markets it deployed and recorded, newest first, then the markets another instance recorded on which one of your verified wallets holds a role, newest first. `access` says which. See [Which markets your instance reaches](/endpoints/seller-financing/introduction.md#which-markets-your-instance-reaches).

Each record carries the deployment facts stored when [Record Deployment](/endpoints/seller-financing/confirm-deployment.md) verified the deployment, plus blocks read live from the chain: the token metadata, the token-side setup, the state of the market identity register and the market counters.

Use `id` as the `marketId` of every other endpoint. A market nobody recorded does not appear.

> [!NOTE]
>
> A market of another instance is listed only when one of your verified wallets is the admin or the operator named at its deployment and the chain confirms, on this request, that it still holds that role. A role that is revoked, or that could not be read, leaves the market out, and so does a failed read of your instance's wallets: the answer then holds your own markets only, rather than failing. A wallet the admin granted a role later reaches the market by its ID, on [Get Market](/endpoints/seller-financing/get-market.md) and every other market route, but the market is not listed here.

> [!WARNING]
>
> The counters of every market are read in one batch. A market whose counters could not be read carries `state.readable: false` and `null` figures. When the whole batch fails, `state` holds only `readable: false`, `totalEscrowedFormatted: null`, `checked: false` and the three scan counters at `null`. A `null` figure is unread, not zero. Retry before acting on it.

## Response Fields

**data** `object`

**markets** `array`

Your instance's markets, newest first.

**id** `string`

The market's record ID, created by the deploying instance. Pass it as `marketId`.

**access** `object`

Why your instance reaches the market.

**kind** `string`

`DEPLOYER` when your instance recorded the market. `ROLE_HOLDER` when another instance did and one of your verified wallets holds a role on it.

**wallets** `array`

`ROLE_HOLDER` only. Each `{ wallet, roles, verified }`: your wallet, checksummed, the roles named at deployment that it still holds (`DEFAULT_ADMIN_ROLE`, `OPERATOR_ROLE` or both), and `verified`, always `true` here because only roles `hasRole` confirmed on chain are listed.

**chainId** `integer`

`11155111` on Sepolia.

**address** `string`

The market contract.

**adapter** `string`

The market's collateral adapter: the freeze adapter or the custody adapter.

**assetToken** `string`

The token being sold.

**paymentToken** `string`

The token the buyer pays in, a stablecoin such as USDC.

**mode** `string`

`FREEZE` or `CUSTODY`. See [Collateral modes](/endpoints/seller-financing/introduction.md#collateral-modes).

**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. For a deployment sent through a smart account, the smart account.

**factory** `string`

The factory that deployed the market.

**createdAt** `string`

ISO 8601 time the market was recorded.

**asset** `object`

`{ address, symbol, name, decimals }` of the asset token, read from the token, with `address` lowercased. A field the token does not answer is `null`, and the whole block is `null` when the read failed.

**payment** `object`

The same for the payment token.

**tokenSetup** `object`

Where the adapter stands on the asset token: `{ ready, mode, requirement, authorizedVia, identityRegistry, reason }`. `ready` is `true` once the token accepts the adapter, and `null` when that could not be read. See [Setup status](/endpoints/seller-financing/token-setup.md#setup-status).

**identityGate** `object`

Whether the market identity register in force can admit anyone. `null` when the register could not be read from the market.

**registry** `string`

The register the market reads now, or `null` when it names none.

**usable** `boolean`

`true` when the market names no register or its register answers `isVerified(address)`. `false` when the register is the retired Trusset ID Register or does not answer `isVerified(address)`: the market then refuses every listing and purchase. `null` when the register could not be read just now.

**code** `string`

With `usable: false` only: `IDENTITY_REGISTRY_RETIRED` or `IDENTITY_REGISTRY_INCOMPATIBLE`.

**reason** `string`

What is wrong and the remedy, [Set Identity Register](/endpoints/seller-financing/set-identity-registry.md). `null` when usable.

**state** `object`

Live counters of the market contract.

**readable** `boolean`

`false` when the counters could not be read. The figures beside it are then `null`.

**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 the payment token's smallest unit.

**paused** `boolean`

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

**paymentDecimals** `integer`

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

**trussetFeesPayable** `string`

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

**identityRegistry** `string`

The market identity register, read live. `null` when the market names none. Absent when unread.

**totalEscrowedFormatted** `string`

`totalEscrowed` in whole units.

**checked** `boolean`

`true` when the scan behind the next three counters read every listing. The scan reads up to 500 listings, so a market with more reads `false`, and so does one whose listings could not be read, with `null` counters. A market without listings reads `true` with counters at `0`. A scan is kept for up to 60 seconds while the market's counters stay the same.

**expiredListings** `integer`

`OPEN` listings past their `expiresAt`. They can no longer be bought, but the seller or the operator still has to cancel them. `openListings` keeps counting 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: in freeze mode the seller holds less than the listing sold, in custody mode the adapter holds less. Their payoff and asset claim are refused with `ASSET_NOT_DELIVERABLE`. `null` when the scan failed. See [Asset leg](/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.

> [!NOTE]
>
> `admin` and `operator` are the parties named at deployment. Roles the admin grants or revokes later do not change them. [Get Role Audit](/endpoints/seller-financing/get-role-audit.md) checks on-chain who holds each role now.

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

```typescript TypeScript theme={null}
const res = await fetch('https://api.trusset.org/seller-financing/api/markets', {
  headers: { 'X-API-Key': 'trusset_your_key_here' }
});
const { data } = await res.json();
for (const market of data.markets) {
  if (market.tokenSetup.ready !== true) console.log(`${market.id}: token-side setup outstanding`);
  if (market.identityGate?.usable === false) console.log(`${market.id}: ${market.identityGate.reason}`);
  if (market.state.brokenAssetLegs) console.log(`${market.id}: ${market.state.brokenAssetLegs} loans cannot deliver their asset`);
}
```

```json Response theme={null}
{
  "success": true,
  "data": {
    "markets": [
      {
        "id": "cmsg4z1p80005sf9qk3m2w7ra",
        "chainId": 11155111,
        "address": "0x2ee5F705c8932D49DF9659205D9Ae69B3612Af58",
        "adapter": "0xA6cd408e91c3997E2460860F5d1AE8755E001D4C",
        "assetToken": "0x305382e98F8e6ee24c32dF3567342E1F1DECb9b6",
        "paymentToken": "0x98aD0ca091552e23C564B41C74282e5343D03E8a",
        "mode": "CUSTODY",
        "admin": "0xCD421aBbA2b9b047eC069215Df5C49c97C96f895",
        "operator": "0xCD421aBbA2b9b047eC069215Df5C49c97C96f895",
        "collateralAgent": "0xCD421aBbA2b9b047eC069215Df5C49c97C96f895",
        "deployTxHash": "0xce4e8812a71f46be7d9dd5a8946422c6afd1b16601bcc128a7821787834d9d2d",
        "deployBlock": 11943831,
        "signer": "0xCD421aBbA2b9b047eC069215Df5C49c97C96f895",
        "factory": "0x2805394e8fCC41bB11613c95967be0104AB88b1c",
        "createdAt": "2026-10-18T21:46:51.630Z",
        "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
        },
        "tokenSetup": {
          "ready": true,
          "mode": "CUSTODY",
          "requirement": "adapter_must_be_verified_holder",
          "authorizedVia": "identity_registry",
          "identityRegistry": "0x18dC3306C6488413aBE3706352CE2f3362F4E342",
          "reason": null
        },
        "identityGate": { "registry": null, "usable": true, "reason": null },
        "state": {
          "readable": true,
          "listings": "2",
          "openListings": "0",
          "activeLoans": "0",
          "totalEscrowed": "0",
          "paused": false,
          "paymentDecimals": 6,
          "trussetFeesPayable": "1552225",
          "identityRegistry": null,
          "totalEscrowedFormatted": "0.0",
          "checked": true,
          "expiredListings": 0,
          "brokenAssetLegs": 0,
          "atRiskAssetLegs": 0
        }
      },
      {
        "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
        },
        "tokenSetup": {
          "ready": true,
          "mode": "FREEZE",
          "requirement": "adapter_must_hold_agent_role",
          "authorizedVia": null,
          "identityRegistry": null,
          "reason": null
        },
        "identityGate": { "registry": null, "usable": true, "reason": null },
        "state": {
          "readable": true,
          "listings": "3",
          "openListings": "0",
          "activeLoans": "0",
          "totalEscrowed": "0",
          "paused": false,
          "paymentDecimals": 6,
          "trussetFeesPayable": "1548106",
          "identityRegistry": null,
          "totalEscrowedFormatted": "0.0",
          "checked": true,
          "expiredListings": 0,
          "brokenAssetLegs": 0,
          "atRiskAssetLegs": 0
        }
      }
    ]
  },
  "error": null,
  "metadata": {
    "timestamp": "2026-10-19T09:12:04.318Z",
    "requestId": "3f7c2a91-6d84-4b0e-9a15-c2e8f4d7b603",
    "instanceId": "inst_abc123"
  }
}
```

```json Error - Production Instance theme={null}
{
  "success": false,
  "data": null,
  "error": {
    "code": "SELLER_FINANCING_UNAVAILABLE",
    "message": "Seller Financing is in beta and runs on Ethereum Sepolia instances only for now"
  },
  "metadata": {
    "timestamp": "2026-10-19T09:12:04.318Z",
    "requestId": "3f7c2a91-6d84-4b0e-9a15-c2e8f4d7b603",
    "instanceId": "inst_abc123"
  }
}
```

## Error Codes

| Code | HTTP | Cause |
| - | - | - |
| `SELLER_FINANCING_UNAVAILABLE` | `503` | The instance is a `PRODUCTION` instance or not on Ethereum. Seller Financing runs on Ethereum Sepolia instances only for now |
| `MARKETS_READ_FAILED` | `500` | Unexpected failure. Nothing was changed. Retry, or contact support with the request ID |

Authentication, credit and rate-limit codes are listed under [Errors](/endpoints/seller-financing/introduction.md#errors).


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