---
title: "GetMarkets"
method: POST
path: "/market_service.v1.MarketService/GetMarkets"
tags: ["Markets"]
---

# GetMarkets

`POST /market_service.v1.MarketService/GetMarkets`

Returns the full configuration for every active market, ordered by
 `market_id` ascending.

## Headers

- `Connect-Protocol-Version` 1, required — Define the version of the Connect protocol. If omitted, use 1.
- `Connect-Timeout-Ms` number — Define the timeout, in ms

## Request body

- GoogleProtobufEmpty — A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }

## Response `200`

Success

- MarketServiceV1GetMarketsResponse
  - `markets` BaseObjectsV1MarketConfig[] — Every active market's configuration, ordered by `market_id` ascending.
    - `marketId` string, int64 — On-chain market identifier.
    - `marketName` string — Human-readable market name, such as `BTC-PERP`.
    - `minLeverage` number, float — Minimum leverage multiplier allowed when opening a position in this market.
    - `maxLeverage` number, float — Maximum leverage multiplier allowed when opening a position in this market.
    - `minTradeSize` number, float — Minimum position notional allowed when opening a position in this market, in quote asset units.
    - `maxTradeSize` number, float — Maximum position notional allowed when opening a position in this market, in quote asset units.
    - `tickDecimals` integer — Number of decimal places used to convert this market's raw on-chain prices to quote asset values.
    - `lotSize` number, float — Minimum position-size increment for this market, in the underlying asset's units.
    - `sizeDecimals` integer — Number of decimal places used to convert this market's raw on-chain size values to asset units.
    - `creator` string — Address that created this market.
    - `feeConfig` BaseObjectsV1FeeConfig
      - `marketId` string, int64 — On-chain Market ID
      - `tradeFeePct` number, float — Market Fee in basis points.
      - `maxEntitlement` number, float — Max Entitlement percentage with 2 decimals (5 = 0.05%, 500 = 5%)
      - `insuranceFundEntitlementPct` number, float — Insurance Fund Entitlement percentage with 2 decimals (5 = 0.05%, 500 = 5%)
      - `maxImbalance` number, float — Max Imbalance allowed in quote asset terms
    - `adlConfig` BaseObjectsV1ADLConfig
      - `maintenanceMarginRatio` number, float — Maintenance margin ratio as a whole-number percentage (e.g. `50` = 50%)
      - `seizureThreshold` number, float — Margin-ratio threshold below which a position becomes eligible for seizure, as a whole-number percentage (e.g. `66` ≈ 2/3 = 66%)
      - `adlThreshold` number, float — Margin-ratio threshold below which a position is scanned for ADL, as a whole-number percentage (e.g. `10` = 10%)
      - `shockFactor` number, float — Shock factor used in ADL shock-test simulations, as a whole-number percentage
      - `maxIfFractionAllowed` number, float — Maximum fraction of the insurance fund allowed to be spent on this market's close-outs, as a whole-number percentage
    - `maintenanceMarginRate` string — Raw configured maintenance margin rate as a whole-number percentage string (e.g. `"50"` = 50%).
    - `tradeFeePct` integer, nullable — Same value as `feeConfig.tradeFeePct`, kept for backwards compatibility.
    - `longRevenue` number, float, nullable — Cumulative per-unit revenue accrued to long positions in this market
    - `shortRevenue` number, float, nullable — Cumulative per-unit revenue accrued to short positions in this market

---

[API](https://skmtc.net/fairground/apis/fairground-fi-api.md) · [All operations](https://skmtc.net/fairground/apis/fairground-fi-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/fairground/fairground-fi-api/versions/be66e6dc0ac0/schema)
