> ## 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 Pending Markets

> List markets published as seeking a lender of record

Returns the markets the lending factory publishes as seeking a lender of record, one page at a time. See [Lender of record](/endpoints/lending/introduction#lender-of-record).

<Note>
  This view is factory-wide, not instance-scoped. It lists every market on the network your instance resolves to that still seeks a lender of record, including markets deployed by other issuers. It reports what the factory publishes, not what this instance may act on. [List Queued Markets](/endpoints/operators/list-queued-markets) shows an institution the markets it can take. [Get Queued Market](/endpoints/operators/get-queued-market) reviews one, and [Accept Lender Role](/endpoints/operators/accept-lender-role) takes it.
</Note>

## Query Parameters

<ParamField query="limit" type="integer" default="25">
  Markets to read from the factory, at most 100. A larger value reads as 100 and a negative one as 1. A value of 0, or one that is not a number, falls back to 25.
</ParamField>

<ParamField query="offset" type="integer" default="0">
  Markets to skip. A negative value or one that is not a number reads as 0.
</ParamField>

## Response Fields

<ResponseField name="data" type="object">
  <Expandable>
    <ResponseField name="markets" type="array">
      Markets seeking a lender of record. A market whose deployment record cannot be decoded is left out, so a page can hold fewer rows than `limit`.

      <Expandable>
        <ResponseField name="marketAddress" type="string">Market contract address.</ResponseField>
        <ResponseField name="collateralTokenAddress" type="string">Collateral token.</ResponseField>
        <ResponseField name="collateralTokenName" type="string">Collateral token name.</ResponseField>
        <ResponseField name="collateralTokenSymbol" type="string">Collateral token symbol.</ResponseField>
        <ResponseField name="collateralTokenIsin" type="string">ISIN recorded on the collateral token, or null.</ResponseField>
        <ResponseField name="collateralDecimals" type="integer">Collateral token decimals.</ResponseField>
        <ResponseField name="collateralMode" type="string">`FREEZE` or `CUSTODY`.</ResponseField>
        <ResponseField name="priceSource" type="string">`NAV`, `MARKET` or `ORACLE`.</ResponseField>
        <ResponseField name="oracleAddress" type="string">Price oracle deployed for this market.</ResponseField>
        <ResponseField name="interestModelAddress" type="string">Interest rate model.</ResponseField>
        <ResponseField name="insuranceFundAddress" type="string">Insurance fund.</ResponseField>
        <ResponseField name="adapterAddress" type="string">Collateral adapter.</ResponseField>
        <ResponseField name="liquidationRouterAddress" type="string">Liquidation router dedicated to this market.</ResponseField>
        <ResponseField name="identityRegistryAddress" type="string">The borrower register installed on the market, or null when the deployer installed none.</ResponseField>
        <ResponseField name="borrowAssetAddress" type="string">Settlement token (stablecoin).</ResponseField>
        <ResponseField name="borrowAssetSymbol" type="string">Settlement asset symbol.</ResponseField>
        <ResponseField name="borrowAssetDecimals" type="integer">Settlement asset decimals.</ResponseField>
        <ResponseField name="seekingCurator" type="boolean">`true` for every row in this view.</ResponseField>
        <ResponseField name="curator" type="string">Null while the market is seeking a lender of record.</ResponseField>
        <ResponseField name="realizationMode" type="string">`UNDECLARED` until the role is taken.</ResponseField>
        <ResponseField name="liquidityCommitment" type="string">Liquidity the lender of record declares on adoption, in the borrow asset's smallest unit. `0` before adoption.</ResponseField>
        <ResponseField name="openToAnyCurator" type="boolean">Whether the market is offered beyond the named candidates. See [Deploy Market](/endpoints/lending/deploy-market).</ResponseField>
        <ResponseField name="operatorShareBps" type="string">The operator share the factory recorded for this market, in basis points of interest left after the infrastructure fee. Every current market records the fixed `800`.</ResponseField>
        <ResponseField name="marketDeployer" type="string">The wallet that deployed the market, or `null`. Besides the factory owner, it is the only wallet that can nominate candidates on the market.</ResponseField>
        <ResponseField name="identityGate" type="object">What the market's borrower register answers: `shape` (`none`, `tuple`, `bool` or `unknown`), `usable` and `note`. `note` explains a register that answers in an unexpected shape. Absent when the register could not be reached.</ResponseField>
        <ResponseField name="instrumentSummary" type="object">What the importing issuer published about the underlying instrument: `securityClass`, `maturityDate` and `perpetual`. `null` when nothing was published.</ResponseField>
        <ResponseField name="instrumentProvenance" type="string">`ISSUER_ASSERTED` when the summary above came from the issuer's own record, `ABSENT` when there is none. It is never a Trusset verification.</ResponseField>
        <ResponseField name="candidates" type="array">Addresses currently nominated for the role.</ResponseField>
        <ResponseField name="factoryGeneration" type="string">Factory generation that deployed the market. `curator` on every v2 market.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="total" type="integer">Total markets the factory publishes as seeking a lender of record.</ResponseField>
    <ResponseField name="offset" type="integer">Applied offset.</ResponseField>
    <ResponseField name="limit" type="integer">Applied limit.</ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.trusset.org/lending-external-securities-v2/api/markets/queue/pending?limit=10" \
    -H "X-API-Key: trusset_your_key_here"
  ```

  ```typescript TypeScript theme={null}
  const res = await fetch(
    'https://api.trusset.org/lending-external-securities-v2/api/markets/queue/pending?limit=10&offset=0',
    { headers: { 'X-API-Key': 'trusset_your_key_here' } }
  );
  const { data } = await res.json();
  const hasMore = data.offset + data.limit < data.total;
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "data": {
      "markets": [
        {
          "marketAddress": "0x1c74f9a2b0e63d581a47c02f9b8de3517a604c2b",
          "collateralTokenAddress": "0x9f8c1d4b2e7a3056c1b8f4d29e0a7c3518b6d24f",
          "collateralTokenName": "ACME Industrial Bond 2031",
          "collateralTokenSymbol": "ACME",
          "collateralTokenIsin": "DE000A2YN900",
          "collateralDecimals": 18,
          "collateralMode": "FREEZE",
          "priceSource": "NAV",
          "oracleAddress": "0x3b25752c1459c5cf1b0bfcfdf0d56883c8047423",
          "interestModelAddress": "0xd410b8e35297af6d0c1745be82a37f09b6534ce1",
          "insuranceFundAddress": "0x8f1a6b30c7d24e95f0a3b81d6c47e2905fa3b9c2",
          "adapterAddress": "0x4d2b93f70e18c6a5d34b027fe95c81a6730d77ae",
          "liquidationRouterAddress": "0x067a3feea46649adad8e31c33b3a4d8774b8d8cf",
          "identityRegistryAddress": null,
          "borrowAssetAddress": "0x98ad0ca091552e23c564b41c74282e5343d03e8a",
          "borrowAssetSymbol": "USDC",
          "borrowAssetDecimals": 6,
          "seekingCurator": true,
          "curator": null,
          "realizationMode": "UNDECLARED",
          "liquidityCommitment": "0",
          "openToAnyCurator": false,
          "operatorShareBps": "800",
          "marketDeployer": "0x1234f9a07c6b53d81e2a4f70c9b385d6014a7e52",
          "candidates": ["0x4e91a7c05d3b62f18a0c94e7db2358f1c60a4e93"],
          "factoryGeneration": "curator",
          "instrumentSummary": null,
          "instrumentProvenance": "ABSENT",
          "identityGate": {
            "shape": "none",
            "usable": true,
            "note": null
          }
        }
      ],
      "total": 1,
      "offset": 0,
      "limit": 10
    }
  }
  ```
</ResponseExample>

## Error Codes

| Code | HTTP | Cause |
| - | - | - |
| `PENDING_FAILED` | `500` | The page could not be assembled for a reason that carries no code of its own |
| `FACTORY_UNREADABLE` | `503` | The lending factory's paged list of markets seeking a lender of record could not be read |
| `FACTORY_READ_FAILED` | `503` | A market's deployment record could not be read from the factory. Retry shortly |
