harwee / IQOption-Api

** Unmaintained ** I have rewritten some of the functionality using async if you are want to use the updated code you can use the code from `async` branch
Apache License 2.0
53 stars 54 forks source link

add expirations_5M #52

Closed glira closed 5 years ago

glira commented 5 years ago

Hello bro, how we can add expirations_5M ? I try this but no work: I add in binary_option.py

    expirations_1M = [closest_minute_expiration+i*60 for i in range(5)]
    expirations_5M = [closest_minute_expiration+i*60 for i in range(25)]
    expirations_15M = [int(key) for key, value in self._option["bet_close_time"].items() if self._parent._server_time/1000 < int(key)-self._deadtime and value["enabled"] and self._option["exp_time"] == 900]
    expiration_EOD = 0
    expiration_EOW = 0
    expiration_EOM = 0
    if len(self._option["special"])>0:
        for key, value in self._option["special"].items():
            if value["title"].endswith("End of day"):
                expiration_EOD = int(key)
            elif value["title"].endswith("End of week"):
                expiration_EOW = int(key)
            elif value["title"].endswith("End of month"):
                expiration_EOM = int(key)
    return {"1M":expirations_1M,"5M":expirations_5M,"15M":expirations_15M,"EOD":expiration_EOD,"EOW":expiration_EOW,"EOM":expiration_EOM}

but she showme that the time to buy as expired. thank for any help!

glira commented 5 years ago

sorry for the silly question, i saw how to solve using 5min time is available in 1min time