---
title: "Get Opening Line"
method: POST
path: "/v1/mcp/get_opening_line"
tags: ["mcp"]
---

# Get Opening Line

`POST /v1/mcp/get_opening_line`

## Request

- Base URL: `https://api.infersports.dev` (the document declares no server; this is the origin it was published from)
- URL: `https://api.infersports.dev/v1/mcp/get_opening_line`
- Auth: none declared

## Request body

- OpeningLineRequest
  - `query` string, required: Natural-language fixture, e.g. 'Real Madrid vs Barcelona' or a single team name.
  - `markets` string[], nullable: Filter to these market types: 1x2 | asian_handicap | totals.
  - `bookmakers` string[], nullable: Filter to these bookmaker keys, e.g. ['pinnacle','crown'].
  - `period` string, nullable: full_time | half_time (default: both).
  - `format` string: Odds format: decimal | hk | malay | american | indonesian | probability.
  - `sport` string, nullable: Optional filter: football | basketball.
  - `date` string, nullable: Optional UTC date 'YYYY-MM-DD' to disambiguate same-name fixtures.

## Response `200`

Successful Response

- OpeningLineResult: One-call NL→opening: resolve a fixture and return each book's opening line + current price. ``status``: ok | ambiguous | not_found (same go/no-go contract as get_sharp_line — never guesses an ambiguous fixture). The opening is the **true market open** for every market, so open→current is real movement: for **1x2** a price move; for **totals/AH** compare `line` (opening) vs `current_line` to read the line move, and the prices alongside. Best-effort upstream: a market with no opening yet on file is omitted.
  - `status` string, required
  - `query` string, required
  - `summary` string, required
  - `match` MatchSummary: A fixture flattened for agent consumption (teams as names, optional live score).
    - `event_id` string, required: Canonical event id (evt_…); pass to get_match_odds / compare_lines.
    - `sport` string, required: football | basketball
    - `league` string, required: League name, e.g. 'English Premier League'.
    - `home_team` string, required
    - `away_team` string, required
    - `scheduled_at` string, nullable: Kickoff, ISO-8601 UTC.
    - `scheduled_at_local` string, nullable: Kickoff in the requested timezone (ISO-8601); null when no timezone was given.
    - `status` string, required: scheduled | live | finished
    - `score` Score
      - `home` integer, required
      - `away` integer, required
    - `red_cards` Score
      - `home` integer, required
      - `away` integer, required
    - `clock` string, nullable: Match clock when live, humanized for display: e.g. '1st half 25'', '2nd half 47'' (the real minute, not estimated) or 'half-time'; null pre-match or when the feed omits it. Basketball clocks (e.g. 'Q2 4:12') pass through as-is.
    - `confidence` number, nullable: Fuzzy-match confidence 0–1 (find_match only; null elsewhere).
    - `summary` string, nullable: One-line human-readable status, e.g. "Man City vs Arsenal — LIVE 1h 23 2-1." or "… — Kicks off 18:00 UTC on Jun 01." — ready to read to a user.
  - `lines` OpeningLine[]
    - `bookmaker` string, required
    - `market_type` string, required: 1x2 | asian_handicap | totals
    - `period` string, required: full_time | half_time
    - `line` number, nullable: The OPENING line (null for 1x2). For totals/AH this is the line the market opened at; it may differ from `current_line` — that difference IS the line movement.
    - `handicap_components` number[], nullable: Quarter-line split of the opening line, when applicable.
    - `opening` object, required: Opening (first-seen, frozen) prices in the requested format.
    - `current` object, nullable: Current prices (null if no current quote). 1x2 is same line; for totals/AH read alongside `current_line`, as the line may have moved since open — diff for movement.
    - `current_line` number, nullable: Line the CURRENT quote sits at (null for 1x2 or when no current quote). Differs from `line` when the market moved since open.
    - `current_handicap_components` number[], nullable: Quarter-line split of the current line, when applicable.
    - `opened_at` string, nullable: When the upstream first recorded this opening (ISO-8601 UTC).
    - `format` string
  - `alternatives` MatchAlternative[]
    - `event_id` string, required
    - `label` string, required: 'Home vs Away' label for disambiguation.
    - `confidence` number, required
  - `ask_user` string, nullable
  - `as_of` string, nullable
  - `stale` boolean, nullable: Freshness of the current quotes (W4); null when no match resolved.
  - `source` string: Provenance of the opening odds.
  - `decision` Decision, required: Pre-computed go/no-go for the caller (W3): we decide whether it's safe to proceed so the agent doesn't have to reason it out (and risk guessing). Branch on ``safe_to_proceed``: true → act on the result without asking; false → put ``ask_user`` to the human, or follow ``next_action`` when there's a clear recovery step (e.g. nothing resolved → list fixtures).
    - `safe_to_proceed` boolean, required: True when the result is unambiguous enough to act on without asking the user.
    - `confidence` number, nullable: Resolution confidence 0–1 (null when not applicable).
    - `ask_user` string, nullable: A disambiguation question to put to the user; null when safe_to_proceed.
    - `next_action` NextAction: The single best next call to make, pre-computed so the agent doesn't have to plan it (W3).
      - `tool` string, required: Tool to call next, e.g. 'get_match_odds' | 'compare_lines' | 'list_today_matches'.
      - `args` object: Ready-to-use arguments for that call, e.g. {'event_id': 'evt_…'}.
      - `reason` string, required: Why this is the suggested next step.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/infersports/apis/infersports-api.md) · [All operations](https://skmtc.dev/infersports/apis/infersports-api/llms.txt) · [OpenAPI document](https://skmtc.dev/infersports/apis/infersports-api/revisions/1a1c3b357ea7?raw)
