> ## 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 Deployment Options

> Read the choices and limits that apply before deploying a market

Returns what a deployment on this instance can choose and what the factory fixes, before any calldata is built. Read it before [Deploy Market](/endpoints/lending/deploy-market). It carries the factory's live rate ceiling and the fixed fee shares. It also carries the ranges the term offering accepts and the identity register this instance resolves to.

Most of the answer is fixed by the contracts and the backend, and is returned so a deployment form does not hard-code it. Three values are read live from the factory: `creatorRateCeilingBps` and the two share `bps` figures. A factory that cannot be read answers `null` in those fields rather than failing the request.

## Response Fields

<ResponseField name="data" type="object">
  <Expandable>
    <ResponseField name="factory" type="object">
      The lending factory this instance deploys to.

      <Expandable>
        <ResponseField name="address" type="string">Factory address, lowercased. `null` when no factory is configured for this network.</ResponseField>
        <ResponseField name="openToAnyCurator" type="boolean">Whether the factory accepts markets offered beyond their named candidates. `null` when no factory is configured.</ResponseField>
        <ResponseField name="creatorRateCeilingBps" type="integer">The highest floor, cap or fixed rate a deployment may carry, in basis points. `null` when the factory could not be read.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="priceSources" type="object">
      <Expandable>
        <ResponseField name="options" type="array">`NAV`, `MARKET` and `ORACLE`.</ResponseField>
        <ResponseField name="default" type="string">`NAV`.</ResponseField>
        <ResponseField name="marketRequiresIdentityRegistry" type="boolean">`true`. A `MARKET` deployment must name a borrower register.</ResponseField>
        <ResponseField name="identityRegistryAlwaysOptional" type="boolean">`false`, for the same reason.</ResponseField>
        <ResponseField name="oracleRequiresFeedAddress" type="boolean">`true`. An `ORACLE` deployment must name its feed in `oracleAddress`.</ResponseField>
        <ResponseField name="oracleInitialPriceFromFeed" type="boolean">`true`. An `ORACLE` market takes its first price from the feed, so it takes no `initialPrice`.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="identityGates" type="object">
      How the market's two registers behave. See [Get Identity Gates](/endpoints/lending/get-identity-gates).

      <Expandable>
        <ResponseField name="borrowerGateRequiredFor" type="array">Price sources that require a borrower register: `["MARKET"]`.</ResponseField>
        <ResponseField name="providerGateOpensPool" type="boolean">`false`. A provider register admits nobody to deposit directly into the market.</ResponseField>
        <ResponseField name="providerGateReadByVaults" type="boolean">`true`. Every vault registered on the market examines its depositors against the provider register before it routes their money in.</ResponseField>
        <ResponseField name="poolClosedWithoutProviderGate" type="boolean">`true`.</ResponseField>
        <ResponseField name="adjustableByAdmin" type="boolean">`true`. The market admin can change both registers after adoption.</ResponseField>
        <ResponseField name="acceptedShapes" type="array">The answers to `isVerified(address)` a register may give: `bool` or `tuple`.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="rateOffering" type="object">
      <Expandable>
        <ResponseField name="modes" type="array">`CURVE`, `CLAMPED` and `FIXED`.</ResponseField>
        <ResponseField name="default" type="string">`CURVE`.</ResponseField>
        <ResponseField name="creatorRateCeilingBps" type="integer">The same ceiling as under `factory`.</ResponseField>
        <ResponseField name="fixedRequiresTerms" type="boolean">`true`. A `FIXED` deployment needs `maxLoanDurationDays`.</ResponseField>
        <ResponseField name="capSuspendsBorrows" type="boolean">`false`. A binding `CLAMPED` cap holds the rate at the cap and blocks nothing.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="operatorShare" type="object">
      The share of repaid interest paid to the wallet that takes the lender-of-record role.

      <Expandable>
        <ResponseField name="fixed" type="boolean">`true`. The factory holds it as a constant.</ResponseField>
        <ResponseField name="bps" type="integer">The share in basis points, read from the factory. `null` when it could not be read.</ResponseField>
        <ResponseField name="afterInfrastructureFee" type="boolean">`true`. The share is taken from the interest left after the Trusset infrastructure fee.</ResponseField>
        <ResponseField name="acceptedAtDeployment" type="boolean">`false`. A deployment that sends `operatorShareBps` is refused.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="distributorShare" type="object">
      The share of repaid interest paid to distributors.

      <Expandable>
        <ResponseField name="fixed" type="boolean">`true`.</ResponseField>
        <ResponseField name="bps" type="integer">The share in basis points, read from the factory. `null` when it could not be read.</ResponseField>
        <ResponseField name="afterInfrastructureFee" type="boolean">`true`.</ResponseField>
        <ResponseField name="paidTo" type="string">Who receives it: the distributors behind each vault depositor, and the operator for liquidity no distributor brought.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="liquidity" type="object">
      <Expandable>
        <ResponseField name="directDepositors" type="array">`OPERATOR_WALLET` and `REGISTERED_VAULTS`. A current market accepts direct deposits from these two alone.</ResponseField>
        <ResponseField name="thirdPartiesThroughVaults" type="boolean">`true`. Everyone else provides liquidity through a vault.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="termOffering" type="object">
      <Expandable>
        <ResponseField name="maxLoanDurationDaysRange" type="array">`[1, 3650]`.</ResponseField>
        <ResponseField name="termGracePeriodDaysRange" type="array">`[1, 30]`.</ResponseField>
        <ResponseField name="graceDefaultDays" type="integer">`3`, applied when terms are on and no grace period is named.</ResponseField>
        <ResponseField name="newLoansOnly" type="boolean">`true`. A term change reaches loans opened afterwards only.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="identityRegistry" type="object">
      The identity register this instance resolves to. Nothing installs it on a market by default. A deployment or an adoption uses it only when it names it.

      <Expandable>
        <ResponseField name="mode" type="string">`TRUSSET` when the instance uses the Trusset register, `OWN` when it configured its own.</ResponseField>
        <ResponseField name="instanceRegister" type="string">That register's address, lowercased. `null` when it could not be resolved.</ResponseField>
        <ResponseField name="unavailableReason" type="string">Why the register could not be resolved, for example an `OWN` mode with no address configured. `null` otherwise.</ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.trusset.org/lending-external-securities-v2/api/markets/deployment-options" \
    -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/deployment-options',
    { headers: { 'X-API-Key': 'trusset_your_key_here' } }
  );
  const { data } = await res.json();
  const ceiling = data.rateOffering.creatorRateCeilingBps;
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "data": {
      "factory": {
        "address": "0xf1ad12f5698f58badd8a662acffccb067a2ddb8a",
        "openToAnyCurator": true,
        "creatorRateCeilingBps": 50000
      },
      "priceSources": {
        "options": ["NAV", "MARKET", "ORACLE"],
        "default": "NAV",
        "marketRequiresIdentityRegistry": true,
        "identityRegistryAlwaysOptional": false,
        "oracleRequiresFeedAddress": true,
        "oracleInitialPriceFromFeed": true
      },
      "identityGates": {
        "borrowerGateRequiredFor": ["MARKET"],
        "providerGateOpensPool": false,
        "providerGateReadByVaults": true,
        "poolClosedWithoutProviderGate": true,
        "adjustableByAdmin": true,
        "acceptedShapes": ["bool", "tuple"]
      },
      "rateOffering": {
        "modes": ["CURVE", "CLAMPED", "FIXED"],
        "default": "CURVE",
        "creatorRateCeilingBps": 50000,
        "fixedRequiresTerms": true,
        "capSuspendsBorrows": false
      },
      "operatorShare": {
        "fixed": true,
        "bps": 800,
        "afterInfrastructureFee": true,
        "acceptedAtDeployment": false
      },
      "distributorShare": {
        "fixed": true,
        "bps": 500,
        "afterInfrastructureFee": true,
        "paidTo": "the distributors behind each vault depositor, the operator for liquidity no distributor brought"
      },
      "liquidity": {
        "directDepositors": ["OPERATOR_WALLET", "REGISTERED_VAULTS"],
        "thirdPartiesThroughVaults": true
      },
      "termOffering": {
        "maxLoanDurationDaysRange": [1, 3650],
        "termGracePeriodDaysRange": [1, 30],
        "graceDefaultDays": 3,
        "newLoansOnly": true
      },
      "identityRegistry": {
        "mode": "TRUSSET",
        "instanceRegister": "0x9e3c8a15f4d70b2681c5a3f9027d4be8115c7d21",
        "unavailableReason": null
      }
    }
  }
  ```
</ResponseExample>

## Error Codes

This endpoint has no refusals of its own beyond authentication, rate limiting and credits. Unreadable factory values come back as `null` instead of an error.
