darwinex / dwx-zeromq-connector

Wrapper library for algorithmic trading in Python 3, providing DMA/STP access to Darwinex liquidity via a ZeroMQ-enabled MetaTrader Bridge EA.
https://blog.darwinex.com/zeromq-interface-python-r-metatrader4/
BSD 3-Clause "New" or "Revised" License
342 stars 227 forks source link

add " ' " around ticket id to make it a more valid JSON object #57

Closed gadieichhorn closed 3 years ago

gadieichhorn commented 4 years ago

The TRADES is not a valid JSON because it is using ' and not ". This fix just add a ' around the ticket ID map so it can be parsed as JSON by replacing all ' with "

elvinex commented 3 years ago

Hi, thank you for your suggestion and sorry for the late reply. You are right that the current solution is not valid JSON. Still, we prefer to keep it this way for now because changing it could break existing strategies. We also aimed for consistency between mql4 and python. Since order IDs are integers in mql4, we thought it more intuitive to also use integer values in python.