> For the complete documentation index, see [llms.txt](https://th-trader.gitbook.io/th-trader-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://th-trader.gitbook.io/th-trader-docs/rest-api-specification/getting-started/api-versioning.md). Agents can also search and read this documentation through its [MCP server](https://th-trader.gitbook.io/th-trader-docs/~gitbook/mcp).

# API Versioning

The TH Trader REST API attempts to maintain backward compatibility with the clients provided the following:

* Clients ignore the data they do not understand
* Clients only use the data they need

For example, in case of XML representation, clients must make sure they do not couple their logic with current XML representation in such a way that adding new fields causes their application to malfunction. This allows adding new data to resources without breaking clients.

If any data is removed or data meaning is changed, a new notification API version is introduced. Switch between different versions is based on the URI of the API (e.g. <http://host/api/v1> for version 1 and <http://host/api/v2> for version 2).

*API versioning* supports only *major* integer versions such as 1,2,3 etc. With the API, there is no notion of minor releases.

| Change                                                       | New Version Released?                                                                                            |
| ------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------- |
| Addition of a new data field to data representation          |                                                                                                                  |
| Changing the logical meaning of a field                      | ![heavy\_check\_mark](https://content.gitbook.com/content/9vsGzlamqEtISsPFjyxN/blobs/4DxGWXYkc7l7hO4WFgEh/image) |
| Removing a field                                             | ![heavy\_check\_mark](https://content.gitbook.com/content/9vsGzlamqEtISsPFjyxN/blobs/4DxGWXYkc7l7hO4WFgEh/image) |
| Changing the default representation, currency units etc.     | ![heavy\_check\_mark](https://content.gitbook.com/content/9vsGzlamqEtISsPFjyxN/blobs/4DxGWXYkc7l7hO4WFgEh/image) |
| Addition of new independent requests                         |                                                                                                                  |
| New business rules and/or application flow                   | ![heavy\_check\_mark](https://content.gitbook.com/content/9vsGzlamqEtISsPFjyxN/blobs/4DxGWXYkc7l7hO4WFgEh/image) |
| New default values for optional request parameters or fields | ![heavy\_check\_mark](https://content.gitbook.com/content/9vsGzlamqEtISsPFjyxN/blobs/4DxGWXYkc7l7hO4WFgEh/image) |
