> 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/snapshot-v2.md).

# Snapshot (v2)

{% updates format="full" %}
{% update date="2026-07-14" %}

## Snapshot v2

The v2 snapshot API is a **newline-delimited JSON stream** (`application/jsonl`). Each line is a complete success envelope carrying one batch of up to 200 records. Integrate by streaming the HTTP body, parsing line by line, and processing batches incrementally until EOF.
{% endupdate %}
{% endupdates %}

## Get In-Play Trading Odds Snapshot (v2)

<mark style="color:green;">`GET`</mark> `https://api.aiodds.com/v2/aiodds/inplay/snapshot`

Request a full AI Trading snapshot of subscribed in-play matches, including their markets and current prices. Use this endpoint to initialize state before processing WebSocket updates.

**Request Parameters**

<table><thead><tr><th>Name</th><th>Type</th><th>Description</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td><code>user</code></td><td>string</td><td><p>username，</p><p>contact your AiOdds Business Manager</p></td><td>true</td></tr><tr><td><code>secret</code></td><td>string</td><td><p>user secret，</p><p>contact your AiOdds Business Manager</p></td><td>true</td></tr><tr><td><code>sport_id</code></td><td>integer</td><td>sport id</td><td>false</td></tr><tr><td><code>market_ids</code></td><td>string</td><td>market id, separate multiple numbers with commas, such as 1,2,3</td><td>false</td></tr><tr><td><code>lang</code></td><td>string</td><td><p>language, </p><p>please see Status Code -> Language</p></td><td>false</td></tr></tbody></table>

**Return data structure**

| Field       | Type   | Description                                 |
| ----------- | ------ | ------------------------------------------- |
| `code`      | number | `0` indicates a successful batch            |
| `msg`       | string | Always `"stream"` for in-flight batches     |
| `data.list` | array  | One batch of snapshot records (≤ 200 items) |

## Get Pre-Match Trading Odds Snapshot (v2)

<mark style="color:green;">`GET`</mark> `https://api.aiodds.com/v2/aiodds/prematch/snapshot`

Request a full AI Trading snapshot of subscribed pre-match matches, including their markets and current prices. Use this endpoint to initialize state before processing WebSocket updates.

**Request Parameters**

<table><thead><tr><th>Name</th><th>Type</th><th>Description</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td><code>user</code></td><td>string</td><td><p>username，</p><p>contact your AiOdds Business Manager</p></td><td>true</td></tr><tr><td><code>secret</code></td><td>string</td><td><p>user secret，</p><p>contact your AiOdds Business Manager</p></td><td>true</td></tr><tr><td><code>sport_id</code></td><td>integer</td><td>sport id</td><td>false</td></tr><tr><td><code>market_ids</code></td><td>string</td><td>market id, separate multiple numbers with commas, such as 1,2,3</td><td>false</td></tr><tr><td><code>lang</code></td><td>string</td><td><p>language, </p><p>please see Status Code -> Language</p></td><td>false</td></tr></tbody></table>

**Return data structure**

| Field       | Type   | Description                                 |
| ----------- | ------ | ------------------------------------------- |
| `code`      | number | `0` indicates a successful batch            |
| `msg`       | string | Always `"stream"` for in-flight batches     |
| `data.list` | array  | One batch of snapshot records (≤ 200 items) |


---

# 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/snapshot-v2.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.
