darwinex/dwxconnect

Functions returns empty dict

ujyr81 opened this issue · 1 comments

Is it normal to get empty dict while invoking get_historic_data() method? I can read txt file inside mt4 dirs and access desired data, but I'm still getting some errors:

`Exception in thread Thread-5:
Traceback (most recent call last):
File "C:\Python38\lib\threading.py", line 932, in _bootstrap_inner
Exception in thread Thread-1:
Traceback (most recent call last):
File "C:\Python38\lib\threading.py", line 932, in _bootstrap_inner
self.run()
File "C:\Python38\lib\threading.py", line 870, in run
self.run()
File "C:\Python38\lib\threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "D:\Code\Trading\Darwinex\dwx_client.py", line 320, in check_historic_data
self._target(*self._args, **self._kwargs)
File "D:\Code\Trading\Darwinex\dwx_client.py", line 222, in check_messages
self.event_handler.on_historic_data(
AttributeError: 'DWX' object has no attribute 'on_historic_data' self.event_handler.on_message(message)

AttributeError: 'DWX' object has no attribute 'on_message'`

Hi,
Did you use the default file dwx_client_example.py?

The functions on_historic_data and on_message have to be defined for the event handler (in this case class tick_processor) that is passed through self.dwx = dwx_client(self, ...).