pyiqoapi is a python wrapper for IQOption's API.
Using pip:
$ pip install git+https://github.com/angelocarbone/pyiqoapi.git
pyiqoapi depends to some packages, which will be installed automatically.
Include the pyiqoapi module and create an pyiqoapi instance with your account credentials.
import pyiqoapi
api = pyiqoapi.PyiqoAPI(username="yourusername", password="yoursecret")
api.connect()
import time
import pyiqoapi
result = None
price = 1.50
active = 1
option = 'turbo'
direction = 'call'
expiry = 60
api = pyiqoapi.PyiqoAPI(username="yourusername", password="yoursecret")
api.connect()
ticket_num = api.open_position(price, active, option, direction, expiry)
while not result:
result = api.get_result(ticket_num)
time.sleep(1)
print(result.win)