Open s77rt opened 6 years ago
@dzmodest this sample is check binary option("trubo") EURUSD assets is open or not
from iqoptionapi.stable_api import IQ_Option
money=IQ_Option("email","password")
init_info=money.get_all_init()
OP_code = money.get_all_ACTIVES_OPCODE()
if init_info["result"]["turbo"]["actives"][str(OP_code["EURUSD"])]["enabled"]==True:
print("open")
else:
print("close")
you can print ""init_info=money.get_all_init()"" look the json and you can do waht you want
@Lu-Yi-Hsun thanks, this works but not all the time for some assets it does not if they are not listed in iqoption i think example if you try now: NZDUSD 8 you will get an error message something like 'error key code 8' ( don't have time to write for now, sorry, hope it's clear for now )
@dzmodest because NZDUSD not in iqoption binary option so it get error (i can not find NZDUSD in iqoption binary option)
is there an alternative method that works for OTC assets?
I think I will implement function for easy use~
Is there a way to do that for forex and stocks?
check asset open time?
@Lu-Yi-Hsun
Would you do that by using
I_want_money.get_overnight_fee("cfd","GOOGLE")
and then compair it to
I_want_money.get_server_timestamp()
????
because time zones can be a pain.
Hi, is it possible to get a list of active/open assets?