harwee/IQOption-Api

Positions not being opened

Closed this issue · 3 comments

Hi,

Could I kindly ask for your assistance with the following;

I am using the following script:

import time
from iqoption_api import IQOption
api = IQOption("mail","pass")
api.login() # Returns True if successful else False

print(api.active_account) # prints real or practice
print(api.practice_balance) # prints practice account balance
api.change_account("practice")
print(api.positions)
print(api.tick) ## range 0, 59
api.subscribe_market("EURUSD")
print ('UPDATE')
api.update_expiration_list("EURUSD")
print(api.binary_expiration_list)
api.open_position(direction="put",
expiration_time=int(api.binary_expiration_list["EURUSD"][-1]["time"]),
market_name="EURUSD",
price=5,
type="turbo"
)
time.sleep(1)
print(api.positions)

After running the above code the position is not being opened and api.positions is not coming back with any results, when I create a position in the web interface api.positions displays the results as expected. I understand the calls made to the api are asynchronous and checked that the api.tick is below 49 but I find the orders are not being placed at all.

Thank you in advance,

Kind regards,

Kazi

Hmm it should work, let me get back to you after verifying it.

Hi Harwee,
Just wondering if you had a chance to verify the issue?

Thanks in advance!

Figured it out, it was an issue with the time on my computer... Thanks