> ## Documentation Index
> Fetch the complete documentation index at: https://docs.upsidemax.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# configs: Fetch Market and Contract Configuration Data

> Fetch all coin and contract configuration, including tick sizes, step sizes, leverage tiers, and price/quantity decimal scales for every listed contract.

The `configs` query returns all coin definitions and contract configurations available on the exchange. Use this response to look up contract IDs for the `a` field in orders, determine tick and step sizes for price/quantity validation, read decimal scales to convert raw values to display values, and inspect leverage tiers for margin calculations. Because this data only changes when new contracts are listed, you should cache it locally and refresh infrequently.

## Request

```json theme={"system"}
{"type": "configs", "marketDeployerId": 0}
```

<ParamField body="type" type="string" required>
  Must be `"configs"`.
</ParamField>

<ParamField body="marketDeployerId" type="integer">
  Filter results by market deployer. Use `0` or omit to return configuration for all deployers. Pass a positive integer to restrict results to a specific deployer.
</ParamField>

## Response

```json theme={"system"}
{
  "type": "configs",
  "marketDeployerIdFilter": 0,
  "coins": [
    {
      "coinId": 1,
      "name": "USDT1",
      "szDecimals": 6,
      "isMargin": true,
      "status": "Active"
    }
  ],
  "contracts": [
    {
      "contractId": 1,
      "marketId": 1,
      "marketDeployerId": 1,
      "name": "SOL1",
      "baseCoinId": 1,
      "quoteCoinId": 1,
      "tickSize": "1",
      "stepSize": "1",
      "priceScale": 1,
      "qtyScale": 1,
      "defaultLeverage": "10",
      "fundingInterval": 3600,
      "minTradeNtl": "1",
      "status": "Active",
      "tiers": [
        {
          "upperBound": "9223372036854775807",
          "maxLeverage": "100",
          "imBps": 100,
          "mmBps": 100
        }
      ]
    }
  ]
}
```

### Contract Fields

<ResponseField name="contractId" type="integer">
  The unique contract identifier. Use this as the `a` field when placing, modifying, or canceling orders.
</ResponseField>

<ResponseField name="name" type="string">
  Human-readable contract name (e.g. `"SOL1"`).
</ResponseField>

<ResponseField name="tickSize" type="string">
  Minimum price movement expressed as a raw integer string. All order prices must be multiples of this value.
</ResponseField>

<ResponseField name="stepSize" type="string">
  Minimum quantity movement expressed as a raw integer string. All order quantities must be multiples of this value.
</ResponseField>

<ResponseField name="priceScale" type="integer">
  Decimal exponent for prices. Divide any raw price by `10^priceScale` to get the human-readable display value.
</ResponseField>

<ResponseField name="qtyScale" type="integer">
  Decimal exponent for quantities. Divide any raw quantity by `10^qtyScale` to get the human-readable display value.
</ResponseField>

<ResponseField name="defaultLeverage" type="string">
  The initial leverage applied to new positions on this contract.
</ResponseField>

<ResponseField name="fundingInterval" type="integer">
  Funding settlement interval in seconds (e.g. `3600` = hourly).
</ResponseField>

<ResponseField name="minTradeNtl" type="string">
  Minimum notional value per trade, expressed as a raw integer string.
</ResponseField>

<ResponseField name="tiers" type="Tier[]">
  Leverage tier schedule for this contract. Each tier applies up to `upperBound` position size.

  <Expandable title="Tier fields">
    <ResponseField name="upperBound" type="string">
      Maximum position size (raw) to which this tier applies. The highest tier uses `"9223372036854775807"` (max int64) as a sentinel for "no upper limit."
    </ResponseField>

    <ResponseField name="maxLeverage" type="string">
      Maximum leverage allowed for positions up to `upperBound`.
    </ResponseField>

    <ResponseField name="imBps" type="integer">
      Initial margin rate in basis points (e.g. `100` = 1%).
    </ResponseField>

    <ResponseField name="mmBps" type="integer">
      Maintenance margin rate in basis points. Positions are liquidated when equity falls below this threshold.
    </ResponseField>
  </Expandable>
</ResponseField>
