iqoptionapi icon indicating copy to clipboard operation
iqoptionapi copied to clipboard

API improvement requests

Open burny91 opened this issue 8 years ago • 5 comments

Hi @n1nj4z33 ,

During the work with your api if have found some points which could be improved.

I do noticed that in your buy method it is not possible to pass the expiration time (1 min, 2 min, 3 min, ...) as a parameter, instead you set the expiration time as default from the current timestamp. Could you please update this? So it would be possible to work also with other expiration times. See modification proposal in code snap.

def __call__(self, price, active, option, **exp_time,** direction):`
        """Method to send message to buyv2 websocket chanel.
        :param price: The buying price.
        :param active: The buying active.
        :param option: The buying option.
        :param direction: The buying direction.
        """
        data = {"price": price,
                "act": active,
                **"exp": exp_time**
                "type": option,
                "direction": direction,
                "time": self.api.timesync.server_timestamp
               }

        self.send_websocket_request(self.name, data)`

How am I able to check the result of a trade: either win or lose. Which class do I need to use, I didnt find anything appropriate.

Next important thing would be to get a method that give the current percentage of profit from an asset. E.G. getProfit(constants.actives[1]) => output 70 (in percent)

Would be great to get some feedback where I can find these feature in your current api and if not feel free to implement them ;)

BR Burny

burny91 avatar Jan 28 '17 09:01 burny91