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

# GetMarketSummary

> Returns a live trading summary for one market: open interest, 24h
 price change and volume, executable order-book depth at the
 current price, rebate indicators, and whether the market is
 currently open for trading.
 
 If computing executable depth fails internally, the
 request still succeeds with `executableDepth` left at zero rather
 than failing outright.



## OpenAPI

````yaml /developers/api-reference/openapi.yaml post /market_service.v1.MarketService/GetMarketSummary
openapi: 3.1.0
info:
  title: Fairground.Fi API
  description: |
    API for the Fairground Perpetuals trading platform.

    This API uses ConnectRPC which accepts JSON over HTTP POST requests.
    All service endpoints follow the pattern: `/package.ServiceName/MethodName`
  version: 1.0.0
  contact:
    name: Forte Service Company
    url: https://github.com/Forte-Service-Company-Ltd/perpetuals-api-server
  license:
    name: Proprietary
    identifier: UNLICENSED
servers:
  - url: https://api.fairground.fi
    description: Production API server
security:
  - bearerAuth: []
tags:
  - name: Trades
    description: Wallet trade/fill history
  - name: Markets
    description: Market configuration and summary endpoints
  - name: Orderbook
    description: Orderbook data retrieval
  - name: Orders
    description: Order management operations
  - name: Portfolio
    description: Aggregated per-wallet portfolio data
  - name: Positions
    description: Position management operations
  - name: Prices
    description: Oracle price and historical price data
paths:
  /market_service.v1.MarketService/GetMarketSummary:
    post:
      tags:
        - Markets
      summary: GetMarketSummary
      description: |-
        Returns a live trading summary for one market: open interest, 24h
         price change and volume, executable order-book depth at the
         current price, rebate indicators, and whether the market is
         currently open for trading.
         
         If computing executable depth fails internally, the
         request still succeeds with `executableDepth` left at zero rather
         than failing outright.
      operationId: market_service.v1.MarketService.GetMarketSummary
      parameters:
        - name: Connect-Protocol-Version
          in: header
          required: true
          schema:
            $ref: '#/components/schemas/connect-protocol-version'
        - name: Connect-Timeout-Ms
          in: header
          schema:
            $ref: '#/components/schemas/connect-timeout-header'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/market_service.v1.GetMarketSummaryRequest'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/market_service.v1.GetMarketSummaryResponse
              example:
                marketSummary:
                  marketId: '1'
                  marketName: BTC-PERP
                  openInterest: 42.75
                  priceChange24h: 2.35
                  volume24h: 8500000
                  executableDepth:
                    short: 120000
                    long: 95000
                    shortDouble: 120000.5
                    longDouble: 95250.25
                  marketType: crypto
                  price: 65420
                  rebateIndicatorLong: 310.5
                  rebateIndicatorShort: 275.2
                  isOpen: true
components:
  schemas:
    connect-protocol-version:
      type: number
      title: Connect-Protocol-Version
      enum:
        - 1
      description: Define the version of the Connect protocol. If omitted, use 1.
      const: 1
      default: 1
    connect-timeout-header:
      type: number
      title: Connect-Timeout-Ms
      description: Define the timeout, in ms
    market_service.v1.GetMarketSummaryRequest:
      type: object
      properties:
        market:
          description: Market to summarize, by `market_id` or `market_symbol`.
          oneOf:
            - type: object
              title: market_id
              properties:
                marketId:
                  type: string
                  format: int64
                  title: market_id
              required:
                - marketId
              additionalProperties: false
            - type: object
              title: market_symbol
              properties:
                marketSymbol:
                  $ref: '#/components/schemas/base_objects.v1.MarketSymbol'
                  title: market_symbol
              required:
                - marketSymbol
              additionalProperties: false
      title: GetMarketSummaryRequest
      required:
        - market
      additionalProperties: false
    market_service.v1.GetMarketSummaryResponse:
      type: object
      properties:
        marketSummary:
          $ref: '#/components/schemas/base_objects.v1.MarketSummary'
          title: market_summary
          description: Live trading summary for the requested market.
      title: GetMarketSummaryResponse
      additionalProperties: false
    base_objects.v1.MarketSymbol:
      type: object
      properties:
        assetSymbol:
          type: string
          title: asset_symbol
          description: |-
            Underlying asset symbol, e.g. `"BTC"`. Matched case-insensitively
            and trimmed.
        quoteSymbol:
          type: string
          title: quote_symbol
          description: |-
            Quote symbol, e.g. `"PERP"`. Technically optional, but omitting
            it looks up a market named exactly by `assetSymbol` alone (e.g.
            `"BTC"`) rather than `"BTC-PERP"`, which will not resolve to any
            real market. In practice, always set this.
      title: MarketSymbol
      additionalProperties: false
    base_objects.v1.MarketSummary:
      type: object
      properties:
        marketId:
          type: string
          title: market_id
          format: int64
          description: On-chain market identifier.
        marketName:
          type: string
          title: market_name
          description: Human-readable market name, such as `BTC-PERP`.
        openInterest:
          type: number
          title: open_interest
          format: float
          description: >-
            Total open position size in this market, in the underlying asset's
            units.
        priceChange24h:
          type: number
          title: price_change_24h
          format: float
          description: Price change over the last 24 hours, as a percentage.
        volume24h:
          type: number
          title: volume_24h
          format: float
          description: Total traded notional in the last 24 hours, in quote asset terms.
        executableDepth:
          $ref: '#/components/schemas/base_objects.v1.ExecutableDepth'
          title: executable_depth
          description: Executable long/short liquidity at the current price.
        marketType:
          type: string
          title: market_type
          description: Market category/classification tag used for grouping markets.
        price:
          type: number
          title: price
          format: double
          description: Current oracle price for this market, in quote asset terms.
        rebateIndicatorLong:
          type: number
          title: rebate_indicator_long
          format: double
          description: >-
            Total rebate amount paid to long-side takers in the last 24 hours,
            in quote asset terms.
        rebateIndicatorShort:
          type: number
          title: rebate_indicator_short
          format: double
          description: >-
            Total rebate amount paid to short-side takers in the last 24 hours,
            in quote asset terms.
        isOpen:
          type: boolean
          title: is_open
          description: |-
            Whether the market is currently open for trading, from the
            pricing service's market-hours schedule
      title: MarketSummary
      additionalProperties: false
    base_objects.v1.ExecutableDepth:
      type: object
      properties:
        short:
          type: number
          title: short
          format: double
          description: |-
            Deprecated. Truncated to a whole number; use `shortDouble`
            instead.
          deprecated: true
        long:
          type: number
          title: long
          format: double
          description: |-
            Deprecated. Truncated to a whole number; use `longDouble`
            instead.
          deprecated: true
        shortDouble:
          type: number
          title: short_double
          format: double
          description: >-
            Executable short-side depth at the current price, in quote asset
            units.
        longDouble:
          type: number
          title: long_double
          format: double
          description: >-
            Executable long-side depth at the current price, in quote asset
            units.
      title: ExecutableDepth
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````