I am trying to run the repository of IqoptionAppi
While I am trying to run the command: api.getcandles(1,60,25)
the following error occured:
api.getcandles(1,60,25)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: __call__() takes 3 positional arguments but 4 were given
I have seen the function and is something like this:
from iqoptionapi.ws.chanels.base import Base
class GetCandles(Base):
"""Class for IQ option candles websocket chanel."""
# pylint: disable=too-few-public-methods
name = "candles"
def __call__(self, active_id, duration, amount):
"""Method to send message to candles websocket chanel.
:param active_id: The active/asset identifier.
:param duration: The candle duration (timeframe for the candles).
:param amount: The number of candles you want to have
"""
data = {"active_id": active_id,
"duration": duration,
"chunk_size": 25,
"from": self.api.timesync.server_timestamp - (duration * amount),
"till": self.api.timesync.server_timestamp}
self.send_websocket_request(self.name, data)
The repository says it works in Python 2.7
but I tried installing it on Python 3.5
, it still worked except the above issue. Guide me where exactly I missed.