> For the complete documentation index, see [llms.txt](https://docs.thesports.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thesports.com/basketball/basic-data/real-time-match-trends.md).

# Real-time match trends

## Real-time match trends

> Returns home and away team trend details for real-time matches\<br/>\<br/>The home team is a positive number and the away team is a negative number, and it changes by the number of minutes\<br/>Recommended request frequency: 1 minute/time

```json
{"openapi":"3.0.1","info":{"title":"Basketball API","version":"1.0.251028"},"tags":[{"name":"BASIC DATA","description":"BASIC DATA"}],"servers":[{"url":"https://api.thesports.com"}],"paths":{"/v1/basketball/match/trend/live":{"get":{"tags":["BASIC DATA"],"description":"Returns home and away team trend details for real-time matches<br/><br/>The home team is a positive number and the away team is a negative number, and it changes by the number of minutes<br/>Recommended request frequency: 1 minute/time","summary":"Real-time match trends","operationId":"getMatchTrendLive","parameters":[{"$ref":"#/components/parameters/User"},{"$ref":"#/components/parameters/Secret"}],"responses":{"200":{"description":"Successful","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer"},"results":{"type":"array","items":{"$ref":"#/components/schemas/TrendLive"}}}}}}},"404":{"$ref":"#/components/responses/404NotFound"}}}}},"components":{"parameters":{"User":{"name":"user","in":"query","description":"Username, please contact business","required":true,"schema":{"type":"string"}},"Secret":{"name":"secret","in":"query","description":"Key, please contact business","required":true,"schema":{"type":"string"}}},"schemas":{"TrendLive":{"type":"object","properties":{"match_id":{"type":"string","description":"Match id"},"trend":{"$ref":"#/components/schemas/TrendDetail"}}},"TrendDetail":{"type":"object","properties":{"count":{"type":"integer","description":"Number of bars"},"per":{"type":"integer","description":"Bar duration"},"data":{"$ref":"#/deps/schemas/TrendDetail"}}}},"responses":{"404NotFound":{"description":"Resource does not exist","content":{"application/json":{"schema":{"$ref":"#/common/schemas/ErrorMsg"}}}}}},"deps":{"schemas":{"TrendDetail":{"type":"array","description":"Trend change (number of bars), change according to the number of minutes of the match<br/>example: [[4, 0, -2], [-2, 3, 1]]\n\n**Field definitions**\n\n| Index | Field | Type |\n| --- | --- | --- |\n| `0` | Nested array; see details below | Array |\n| `1` | Nested array; see details below | Array |\n| `2` | Nested array; see details below | Array |\n| `3` | Nested array; see details below | Array |\n\n**Index `0` details**\n\n| Index | Field | Type |\n| --- | --- | --- |\n| `0[0]` | Section 1 Score, trend change data | Integer |\n\n**Index `1` details**\n\n| Index | Field | Type |\n| --- | --- | --- |\n| `1[0]` | Section 2 Score, trend change data | Integer |\n\n**Index `2` details**\n\n| Index | Field | Type |\n| --- | --- | --- |\n| `2[0]` | Section 3 Score, trend change data | Integer |\n\n**Index `3` details**\n\n| Index | Field | Type |\n| --- | --- | --- |\n| `3[0]` | Section 4 Score, trend change data | Integer |\n","items":""}}},"common":{"schemas":{"ErrorMsg":{"type":"object","description":"abnormal","properties":{"code":{"type":"integer","description":"status code"},"msg":{"type":"string","description":"Error message"}}}}}}
```


---

# 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://docs.thesports.com/basketball/basic-data/real-time-match-trends.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.
