CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage. 66 % of retail investor accounts lose money when trading CFDs with this provider. You should consider whether you understand how CFDs work and whether you can afford to take the high risk of losing your money.

Install necessary packages for MT4 - Python connector


how are you guys?
referring to :

This project requires the following:

Python: (minimum v3.6)
libzmq: (minimum v4.2.5)
pyzmq: (minimum v17.1.2)
libsodium (
mql4-lib (
mql-zmq (

For your convenience, files from the last three items above have been included in this repository with appropriate copyrights referenced within.

apart from python i am at lost on how to install the other 4. anyone has an insight how to install these packages?

thank you so much…

Hi @leren,

For the Python side of things, you only need ZeroMQ installed.

If you download and install the latest Anaconda distribution for Python 3.*, this should already be installed by default.

The other requirements are all for the MQL side -> the instructions as stated on GitHub should get you there.

p.s. You need the latest codebase (the link you’ve posted is the old repository that is no longer maintained as stated at the top of the there)

Latest codebase: :point_right:

Hope this helps :thumbsup:

1 Like

thank you so much for the reply… i really appreciate it :slight_smile:

this is what i got in spyder after i have done the necessary steps and activate the spyder after activate the server in mt4:

runfile(‘E:/’, wdir=‘E:’)

_zmq = DWX_ZeroMQ_Connector()
[INIT] Ready to send commands to METATRADER (PUSH): 32768
[INIT] Listening for responses from METATRADER (PULL): 32769

_my_trade = _zmq._generate_default_order_dict()

_my_trade = _zmq._generate_default_order_dict()


seems like the connector does not work… do you have any idea why?

how do i get libzmq installed?

thank you so much… i really appreciate it

Hi @leren,

The instructions for this are detailed here, along with several, very detailed usage examples:

To the other moderator:
Kindly leave the “dwx-zeromq-connector” tag there please :slight_smile:

It is a search term from GitHub and will assist associated content here with ranking for it / help people find things easier, etc.

Thank you.

Answer is in this post:

Hi @leren!

In addition to what @integracore2 mentions…

As you mention you are feeling lost about how to install the other 4 files, please notice we provide specific step by step guide to install the files on this link:

In case this is not working for you, please make sure you start a fresh Anaconda install in another location and delete the files to start over downloading the files from Github again. The code has been tested recently and seems it’s working.

Please, be aware we don’t provide specific support for Python usage, unfortunately, our team is not big enough for all the casuistic.

You should be able to at least put a trade in a Demo account following the steps shown in the link above. Ranging from download to configuration to usage.

I hope this clarifies!

1 Like


it works!! all i need to do was just to allow DLL imports on MT4 and activate autotrading button…

thx - cheers!


Hi All,

I am new to zmq, but finally got everything installed. Or at least I hope.
If I type _zmq.DWX_MTX_GET_ALL_OPEN_TRADES() it works. I can also add orders or modify them, but_zmq.DWX_MTX_SUBSCRIBE_MARKETDATA(‘EURUSD’) does not work.

No error messange and_zmq._Market_Data_DB is an empty dict even if markets are moving like crazy.
Any idea why is it not working?

Python 3.7, DWX_ZeroMQ_Connector_v2_0_1_RC8, pyzmq 18.0.2.

Thank you for the help in advance.

1 Like

Hi @Slukk,

Firstly, Welcome to the Darwinex Community :slightly_smiling_face:

Great to hear you’re working with the Bridge :+1:

To ensure you get the most detailed / referenced feedback, we maintain all queries to do with this project through “Issues” via the following link:

To quickly answer your query here:

It’s possible that the Publish_MarketData input parameter in the EA may be set to False (which is its default behaviour). If this is so, please set it to True and reload the EA.

Let’s continue this conversation over at GitHub where answers may already exist, and if not, referenced answers will assist you much better.


p.s. We are preparing a tutorial video for the upcoming v2.0.2 release, wherein market data subscription and historical download features have been improved significantly - so stay tuned :+1:

1 Like

Wow, thanks for the quick answer. I just cannot beliewe that I waised hours and couldn’t find it. :slight_smile: Thanks again. It is great to be here.See you on GitHub.