3

I need to access the data available for MT4 Investor account or, in general, talk to MT4 server in order to read some data. Is it possible? It should, but i can't figure out how to do it ( is there a specific protocol? Is it allowed? Is there a library out there? Etc. )

mark
  • 939
  • 2
  • 13
  • 36

2 Answers2

3

You can try MetaApi https://metaapi.cloud cloud service which provides REST API and WebSocket API access to both MetaTrader 4 and MetaTrader 5 accounts.

Official REST API documentation: https://metaapi.cloud/docs/client

SDKs: https://metaapi.cloud/sdks (javascript, python and Java SDKs are provided as per April 2021)

It supports reading account information, positions, orders, trade history, receiving quotes, and accessing market data.

The service also provides copy trading API https://metaapi.cloud/docs/copyfactory and API to calculate forex trading metrics on a MetaTrader account https://metaapi.cloud/docs/metastats.

roman
  • 892
  • 9
  • 26
  • this will change the ip brooker will raise security issues hence disable the account... – user964829 Mar 21 '21 at 15:15
  • I think you are overcomplicating things. It is like running the terminal on a VPS with a difference that someone have already provided a software which provides API access to it for you, so you are no longer need to worry about maintaining your own infrastructure. There are plenty of forex apps which use APIs like this under the hood, like myfxbook or copy trading platforms. I'm using MetaApi service myself for about a year by now without any problems. – roman Mar 22 '21 at 16:55
1

There is an API, but is for Brokers and other similar organizations only. MetaQuotes doesn't provide us direct access to it, but checkout the other link as well.

Here check this out MetaTrader 4 API and also check this out MT4 Server API

This is directly from MT4 Server API website

API can be provided in Web Socket & Rest API. API is hosted on MT4 Server, further wrapped and consumed as web service and DLL .net and C++ API. This API is much faster than using MT4 Terminal for Quote and Trade; provides the real time open, close position and many more.

Please note, I haven't used MT4 Server API, so don't know much information about it.

Community
  • 1
  • 1
TheLastStark
  • 770
  • 5
  • 18