> For the complete documentation index, see [llms.txt](https://developer.aiodds.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.aiodds.com/trading-odds/ai-trading/in-play.md).

# In-Play

## Get In-Play Trading Odds Markets

> Returns AiOdds trading odds for a specific in-play match, including calculated outcomes, current prices, and the bookmaker odds used in the calculation.

```json
{"openapi":"3.0.1","info":{"title":"AiOdds Document","version":"1.0.0"},"tags":[{"name":"Trading Odds / Inplay Match","description":"Trading odds endpoints for in-play matches."}],"servers":[{"url":"https://api.aiodds.com"}],"paths":{"/v1/aiodds/inplay/markets":{"get":{"summary":"Get In-Play Trading Odds Markets","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetV1AioddsInplayMarketsResponse"}}}}},"tags":["Trading Odds / Inplay Match"],"description":"Returns AiOdds trading odds for a specific in-play match, including calculated outcomes, current prices, and the bookmaker odds used in the calculation.","parameters":[{"$ref":"#/components/parameters/User"},{"$ref":"#/components/parameters/Secret"},{"name":"match_id","in":"query","required":true,"schema":{"type":"integer"},"description":"match id"}]}}},"components":{"schemas":{"GetV1AioddsInplayMarketsResponse":{"type":"object","properties":{"code":{"type":"integer","description":"Status code"},"msg":{"type":"string","description":"Message description"},"data":{"type":"object","description":"Response payload","properties":{"list":{"type":"array","description":"List of returned items","items":{"type":"object","properties":{"market_id":{"type":"integer","description":"Market id"},"name":{"type":"string","description":"Market name"},"sport_id":{"type":"integer","description":"Sport id"},"match_id":{"type":"integer","description":"Match id"},"outcomes":{"type":"object","description":"Outcomes","additionalProperties":{"$ref":"#/components/schemas/AiOutcomeDetails"}},"uptime":{"type":"integer","description":"Unix timestamp of the update, in seconds"},"uptime_ms":{"type":"integer","description":"Unix timestamp of the update, in milliseconds"},"category":{"type":"integer","description":"Category, 1-In-play 2-Pre-match"},"score":{"type":"string","description":"Score when the handicap odds were recorded, only available for markets 4 and 499"},"line_score":{"type":"integer","description":"Whether score is available, 0-No, 1-Yes"},"bookmaker_id":{"type":"integer","description":"Bookmaker id"},"main_line":{"type":"string","description":"Main line"},"bookmakers":{"type":"array","description":"Original odds from bookmakers used to calculate the AiOdds trading odds","items":{"type":"object","properties":{"bookmaker_id":{"type":"integer","description":"Bookmaker id"},"outcomes":{"type":"object","description":"Outcomes","additionalProperties":{"$ref":"#/components/schemas/OutcomeDetails"}}}}}}}}}}}},"AiOutcomeDetails":{"type":"object","properties":{"id":{"type":"integer","description":"Outcome id"},"name":{"type":"string","description":"Outcome name"},"line":{"type":"string","description":"Betting line value"},"status":{"type":"integer","description":"Outcome status, 0-Open, 1-Suspended"},"value":{"type":"string","description":"Odds price"},"uptime":{"type":"integer","description":"Unix timestamp of the update, in seconds"},"change":{"type":"integer","description":"Price movement, 0-Unchanged, 1-Increased, 2-Decreased"},"lost":{"type":"integer","description":"Removal flag for the outcome, 0-Not removed, 1-Removed from the odds feed"},"uptime_ms":{"type":"integer","description":"Unix timestamp of the update, in milliseconds"}}},"OutcomeDetails":{"type":"object","properties":{"id":{"type":"integer","description":"Outcome id"},"name":{"type":"string","description":"Outcome name"},"line":{"type":"string","description":"Betting line value"},"status":{"type":"integer","description":"Outcome status, 0-Open, 1-Suspended"},"value":{"type":"string","description":"Odds price"},"uptime":{"type":"integer","description":"Unix timestamp of the update, in seconds"},"uptime_ms":{"type":"integer","description":"Unix timestamp of the update, in milliseconds"},"change":{"type":"integer","description":"Price movement, 0-Unchanged, 1-Increased, 2-Decreased"},"lost":{"type":"integer","description":"Removal flag for the outcome, 0-Not removed, 1-Removed from the odds feed"},"trans":{"type":"array","description":"Translation data for the outcome name\n- Index 0: Translation id\n- Index 1: Replacement value for the first variable in 'var', may not exist\n- Index 2: Replacement value for the second variable in 'var', may not exist\n- Additional indexes: Replacement values for any remaining variables, in the same order as 'var', may not exist\n","items":{"type":"string"},"minItems":1}}}},"parameters":{"User":{"name":"user","in":"query","required":true,"schema":{"type":"string"},"description":"Username, please contact business."},"Secret":{"name":"secret","in":"query","required":true,"schema":{"type":"string"},"description":"User secret, please contact business."}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.aiodds.com/trading-odds/ai-trading/in-play.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
