Skip to content

Latest commit

 

History

History
46 lines (34 loc) · 906 Bytes

README.md

File metadata and controls

46 lines (34 loc) · 906 Bytes

pyiqoapi

pyiqoapi is a python wrapper for IQOption's API.

Install

Using pip:

    $ pip install git+https://github.com/angelocarbone/pyiqoapi.git

pyiqoapi depends to some packages, which will be installed automatically.

Usage

Include the pyiqoapi module and create an pyiqoapi instance with your account credentials.

import pyiqoapi

api = pyiqoapi.PyiqoAPI(username="yourusername", password="yoursecret")
api.connect()

Examples

Open position and get result

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)