> For the complete documentation index, see [llms.txt](https://tradesync.gitbook.io/tradesync/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tradesync.gitbook.io/tradesync/overview.md).

# Overview

The main purpose of the system TradeSync is to get data on transactions and prices of trading instruments from MT in real-time mode. You can see the main diagram of the system:

<figure><img src="/files/p9AVUF4YEHh4DZjbcGi1" alt=""><figcaption></figcaption></figure>

The product is focused on the communication of the trading platform MT4-MT5 for the implementation of trading operations functions such as:

* creating an account;
* changing the trading account conditions;
* making balance operations;
* collecting the information about trading activity on trading accounts.

The product is consists of the following parts:

[Rw Manager MT5](/tradesync/rw-manager-mt5.md)

RWManager is a proxy-module that ensures the interaction of requests with the trade server and provides a change in the account status, the flow of prices from the trade server to the client application.

[FXTR v2](/tradesync/fxtr-v2.md)

FXTR v2 is a proxy-module for authorizing user requests for managing accounts on trading servers, obtaining information on transactions and opening/modifying/closing deals on trading servers.  the module is supplied in version 2 and has the following entrypoints:

1. Manage accounts:
   * Get information about instruments available for account type
   * Create accounts with different types
   * Update account parameters
   * Get a list of open positions for the account
2. Get transactions
   * Get a list of transactions for the account
   * Get detail information about specified transaction
3. Getting balance information
4. Change balance
5. Open stream for the account

[DealsHistory](/tradesync/dealshistory.md)&#x20;

DealsHistory is a service that directly works with RWmanager and NATS to get all deals from MT5 on real-time and send it all via BatchWriter to ClickHouse.

It is important that RW-Manager gets data from Meta-Trader, RWManager is a proxy-module between Meta-Trader and DealsHistory that processes data and vizualise it.

Note: all time used in documentation is on Unix time format.

### Low-level diagram of a possible system infrastructure:

<figure><img src="/files/o2d7eTgNUFPAfrvB8XLz" alt=""><figcaption></figcaption></figure>


---

# 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://tradesync.gitbook.io/tradesync/overview.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.
