# Backend Endpoint Refactor

From the 27th of October 2025, in an effort to reduce the size of payloads returned, the `/trading-variables` endpoint will omit `allTrades`. Please use the new, already available, endpoints to fetch open trades and a leaner version of trading variables.\
\
**TLDR**:

* `GET /trading-variables` <sup><mark style="color:$warning;">partially deprecated<mark style="color:$warning;"></sup>
  * Currently returns the `allTrades` property.
  * <mark style="color:$danger;">`allTrades`</mark> <mark style="color:$danger;"></mark><mark style="color:$danger;">property will be deprecated on 10/27/2025.</mark>
* `GET /trading-variables/all` <sup><mark style="color:$success;">new<mark style="color:$success;"></sup>
  * Returns trading variables with an empty `allTrades` property.
  * Significantly reduces payload size and speeds up request time.
* `GET /open-trades/<?address>` <sup><mark style="color:$success;">new<mark style="color:$success;"></sup>&#x20;
  * Returns an array of open trades. Trade container types remain the same.&#x20;
  * Replaces `allTrades` payload from deprecated `/trading-variables` endpoint.&#x20;
  * *Optional:* provide an address to filter returned trades. Significantly reduces payload size.
    * <mark style="color:$warning;">Important</mark>: If provided, `address` **MUST** be checksummed.


---

# Agent Instructions: 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:

```
GET https://docs.gains.trade/developer/integrators/guides/backend-endpoint-refactor.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
