vdemydiuk / mtapi

MetaTrader API (terminal bridge)
http://mtapi4.net/
MIT License
514 stars 277 forks source link

How to integrate this with python? #207

Closed eabase closed 3 years ago

eabase commented 3 years ago

Hi, This look like a promising solution. I would like to integrate this API using Python (or whatever), however, I don't see any information of how the interface works?

I mean:

  1. What is the output and expected input and where is the API documentation if any?
  2. Is it using windows socket, IP ports, JSON files or something else?

It would be great to have a clear example of:

ackem commented 3 years ago

https://www.mql5.com/en/docs/integration/python_metatrader5

eabase commented 3 years ago

@ackem

Well, yeah, I know about that, but I'm into OSS, which is why I am asking about this. In addition it need to to work with MT4.

eabase commented 3 years ago

I see there was a PR #210, to add a MT5 Python example. This would have been great (and probably the same for MT4), but the PR was closed without any reason.

@KptKuck Why did you close that PR?

KptKuck commented 3 years ago

I see there was a PR #210, to add a MT5 Python example. This would have been great (and probably the same for MT4), but the PR was closed without any reason.

@KptKuck Why did you close that PR?

I'm opening a new one, but I still have problems because in the PR commits are not supposed to be in.

Give me time, I'm not a git expert yet

KptKuck commented 3 years ago

now ive done PR https://github.com/vdemydiuk/mtapi/pull/214

eabase commented 3 years ago

@KptKuck Hi Christian, I see that the demo script is importing MtApi5.

import MtApi5 as mt5

Is that the native MT5 python API package from MQ or something else?

If it is, I can't use it, since I'm using MT4. How can we use MT4 with python here?
(Should be straight forward since we have a port to talk to... ??)

eabase commented 3 years ago

I've now created a working MT4 python script to catch all candle data. I'll post a PR shortly (few days).

eabase commented 3 years ago