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

# Get all markets with odds types

> Returns all available markets and their outcome types. Optionally filter by sportId. Markets are sorted by sportId then marketId.



## OpenAPI

````yaml /zh/abp-api/openapi.json get /markets
openapi: 3.1.0
info:
  title: ABP v2 - Automated Bet Placing API
  description: >

    Place bets across 32 bookmakers through a single API.


    ## Authentication


    All endpoints require the `x-api-key` header (except `/health`, `/ready`,
    `/status`, `/metrics`).


    **Swagger UI**: Click the **Authorize** button (lock icon) at the top right,
    enter your API key, and click **Authorize**.


    ## Quick Start


    1. **List your accounts**: `GET /accounts`

    2. **Get live odds**: `GET /betslip?fixtureId=...&outcomeId=...&playerId=0`

    3. **Place an order**: `POST /place-orders`

    4. **Track results**: `GET /orders` or subscribe to WebSocket updates


    ## WebSocket


    Connect to `/ws` for real-time order, bet, and settlement updates.


    ```json

    {"type": "login", "apiKey": "your-api-key", "channels": []}

    ```


    Send an empty `channels` array to receive all updates. Available channels:
    `orders`, `bets`, `settlements`, `accounts`, `balance`, `betslip`,
    `fixtures`, `currencies`, `status`, `emergency`.


    Send `{"type": "ping"}` every 30 seconds to keep the connection alive.
  version: '2.0'
servers:
  - url: https://v2.55-tech.com
    description: Production
security:
  - apiKey: []
tags:
  - name: Orders
    description: Place, retrieve, and cancel betting orders
  - name: Bets
    description: Query individual bets placed with bookmakers
  - name: Betslip
    description: Get live odds and metadata for fixtures
  - name: Accounts
    description: Manage bookmaker accounts
  - name: Markets
    description: Get available markets and odds types
  - name: Bookmakers
    description: List supported bookmakers
  - name: Analytics
    description: Positions and profit/loss analytics
paths:
  /markets:
    get:
      tags:
        - Markets
      summary: Get all markets with odds types
      description: >-
        Returns all available markets and their outcome types. Optionally filter
        by sportId. Markets are sorted by sportId then marketId.
      operationId: get_markets
      parameters:
        - name: sportId
          in: query
          required: false
          schema:
            type: integer
            nullable: true
          description: Filter markets by sport ID (e.g., 10 for Soccer)
          example: 10
      responses:
        '200':
          description: List of markets with odds types
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MarketResponse'
              example:
                - marketId: 101
                  marketLength: 3
                  sportId: 10
                  playerProp: false
                  handicap: 0
                  marketName: Full Time Result
                  marketNameShort: 1X2
                  marketType: 1x2
                  period: fulltime
                  oddsTypes:
                    - outcomeId: 101
                      outcomeName: '1'
                    - outcomeId: 102
                      outcomeName: X
                    - outcomeId: 103
                      outcomeName: '2'
                - marketId: 201
                  marketLength: 2
                  sportId: 10
                  playerProp: false
                  handicap: -1.5
                  marketName: Asian Handicap -1.5
                  marketNameShort: AH -1.5
                  marketType: asian_handicap
                  period: fulltime
                  oddsTypes:
                    - outcomeId: 201
                      outcomeName: '1'
                    - outcomeId: 202
                      outcomeName: '2'
        '401':
          description: Unauthorized — missing or invalid API key
        '500':
          description: Internal server error or market cache not loaded
components:
  schemas:
    MarketResponse:
      type: object
      properties:
        marketId:
          type: integer
          description: Market identifier
        marketLength:
          type: integer
          description: Number of outcomes
        sportId:
          type: integer
          description: Sport identifier
        playerProp:
          type: boolean
          description: Whether this is a player prop market
        handicap:
          type: number
          description: Handicap value (0 for non-handicap)
        marketName:
          type: string
          description: Full market name (e.g., 'Full Time Result')
        marketNameShort:
          type: string
          description: Short market name (e.g., '1X2')
        marketType:
          type: string
          description: Market type slug (e.g., '1x2', 'asian_handicap')
        period:
          type: string
          description: Period (e.g., 'fulltime', 'firsthalf')
        oddsTypes:
          type: array
          items:
            $ref: '#/components/schemas/OddsTypeResponse'
          description: Outcomes in this market
    OddsTypeResponse:
      type: object
      properties:
        outcomeId:
          type: integer
          description: Outcome identifier
        outcomeName:
          type: string
          description: Outcome display name (e.g., '1', 'X', '2')
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication. Contact contact@55-tech.com to obtain a key.

````