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

> Read the on-chain risk parameters for a market

Returns the market's live `config` struct: risk parameters, fee rates, supply caps, and auction settings. These are the values the contract enforces, not the values cached on the market record.

## Path Parameters

<ParamField path="marketId" type="string" required>Market ID.</ParamField>

## Response Fields

<ResponseField name="data" type="object">
  <Expandable>
    <ResponseField name="collateralFactor" type="string">Maximum loan to value in basis points. `7500` allows borrowing up to 75 percent of collateral value.</ResponseField>
    <ResponseField name="liquidationThreshold" type="string">Loan to value at which the health factor reaches `1.0`, in basis points.</ResponseField>
    <ResponseField name="liquidationPenalty" type="string">Penalty applied to liquidated debt in basis points.</ResponseField>
    <ResponseField name="protocolFeeRate" type="string">Issuer share of accrued interest in basis points.</ResponseField>
    <ResponseField name="minBorrowAmount" type="string">Minimum borrow per loan, in borrow asset units.</ResponseField>
    <ResponseField name="maxPriceAge" type="string">Seconds before the oracle price is treated as stale.</ResponseField>
    <ResponseField name="closeFactor" type="string">Maximum fraction of a loan's debt repayable in one liquidation, in basis points.</ResponseField>
    <ResponseField name="maxTotalCollateral" type="string">Global collateral cap in collateral token units. `0.0` means uncapped.</ResponseField>
    <ResponseField name="maxUserCollateral" type="string">Per-borrower collateral cap in collateral token units. `0.0` means uncapped.</ResponseField>
    <ResponseField name="useDutchAuction" type="boolean">Whether liquidations open a Dutch auction instead of routing collateral straight to the liquidation router.</ResponseField>
    <ResponseField name="auctionDuration" type="string">Auction length in seconds.</ResponseField>
    <ResponseField name="auctionStartPremium" type="string">Opening price multiplier in basis points. `13000` starts the auction at 1.3 times oracle price.</ResponseField>
    <ResponseField name="auctionMinPremium" type="string">Floor price multiplier in basis points. `9500` ends the auction at 0.95 times oracle price.</ResponseField>
  </Expandable>
</ResponseField>

<Note>
  The endpoint returns `data: null` when the contract read fails. It does not return an error status in that case, so check for null before destructuring.
</Note>

## Reading the Parameters Together

A loan opens at up to `collateralFactor` and becomes liquidatable when its loan to value crosses `liquidationThreshold`. The gap between the two is the borrower's buffer. On liquidation, at most `closeFactor` of the debt is repaid in a single call, and `liquidationPenalty` is charged on the repaid portion.

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.trusset.org/lending-external-securities/api/markets/{marketId}/config" \
    -H "X-API-Key: trusset_your_key_here"
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "data": {
      "collateralFactor": "7500",
      "liquidationThreshold": "8500",
      "liquidationPenalty": "500",
      "protocolFeeRate": "2500",
      "minBorrowAmount": "1000.000000",
      "maxPriceAge": "86400",
      "closeFactor": "5000",
      "maxTotalCollateral": "0.0",
      "maxUserCollateral": "0.0",
      "useDutchAuction": false,
      "auctionDuration": "3600",
      "auctionStartPremium": "13000",
      "auctionMinPremium": "9500"
    }
  }
  ```
</ResponseExample>
