Welcome to iqoptionapi’s documentation!

Contents:

iqoptionapi

iqoptionapi package

Subpackages

iqoptionapi.http package
Submodules
iqoptionapi.http.appinit module

Module for IQ option appinit http resource.

class iqoptionapi.http.appinit.Appinit(api)[source]

Bases: iqoptionapi.http.resource.Resource

Class for IQ option login resource.

Parameters:api – The instance of IQOptionAPI.
url = 'appinit'
iqoptionapi.http.auth module

Module for IQ Option http auth resource.

class iqoptionapi.http.auth.Auth(api)[source]

Bases: iqoptionapi.http.resource.Resource

Class for IQ Option http auth resource.

Parameters:api – The instance of IQOptionAPI.
url = 'auth'
iqoptionapi.http.billing module

Module for IQ option billing resource.

class iqoptionapi.http.billing.Billing(api)[source]

Bases: iqoptionapi.http.resource.Resource

Class for IQ option billing resource.

Parameters:api – The instance of IQOptionAPI.
url = 'billing'
iqoptionapi.http.buyback module

Module for IQ option buyback resource.

class iqoptionapi.http.buyback.Buyback(api)[source]

Bases: iqoptionapi.http.resource.Resource

Class for IQ option buyback resource.

Parameters:api – The instance of IQOptionAPI.
url = 'billing/buyback'
iqoptionapi.http.changebalance module

Module for IQ option changebalance resource.

class iqoptionapi.http.changebalance.Changebalance(api)[source]

Bases: iqoptionapi.http.resource.Resource

Class for IQ option changebalance resource.

Parameters:api – The instance of IQOptionAPI.
url = 'profile/changebalance'
iqoptionapi.http.getprofile module

Module for IQ Option http getprofile resource.

class iqoptionapi.http.getprofile.Getprofile(api)[source]

Bases: iqoptionapi.http.resource.Resource

Class for IQ option getprofile resource.

Parameters:api – The instance of IQOptionAPI.
url = 'getprofile'
iqoptionapi.http.getregdata module

Module for IQ Option http getregdata resource.

class iqoptionapi.http.getregdata.Getprofile(api)[source]

Bases: iqoptionapi.http.resource.Resource

Class for IQ option getregdata resource.

Parameters:api – The instance of IQOptionAPI.
url = 'register/getregdata'
iqoptionapi.http.login module

Module for IQ Option http login resource.

class iqoptionapi.http.login.Login(api)[source]

Bases: iqoptionapi.http.resource.Resource

Class for IQ option login resource.

Parameters:api – The instance of IQOptionAPI.
url = 'login'
iqoptionapi.http.loginv2 module

Module for IQ Option http loginv2 resource.

class iqoptionapi.http.loginv2.Loginv2(api)[source]

Bases: iqoptionapi.http.login.Login

Class for IQ option loginv2 resource.

url = 'login/v2'
iqoptionapi.http.profile module

Module for IQ option profile resource.

class iqoptionapi.http.profile.Profile(api)[source]

Bases: iqoptionapi.http.resource.Resource

Class for IQ option profile resource.

Parameters:api – The instance of IQOptionAPI.
url = 'profile'
iqoptionapi.http.register module

Module for IQ option register resource.

class iqoptionapi.http.register.Register(api)[source]

Bases: iqoptionapi.http.resource.Resource

Class for IQ option register resource.

Parameters:api – The instance of IQOptionAPI.
url = 'register'
iqoptionapi.http.resource module

Module for base IQ Option http base resource.

class iqoptionapi.http.resource.Resource(api)[source]

Bases: object

Class for base IQ Option API http resource.

Parameters:api – The instance of IQOptionAPI.
send_http_request(method, data=None, params=None, headers=None)[source]

Send http request to IQ Option API.

Parameters:
  • method (str) – The http request method.
  • data (dict) – (optional) The http request data.
  • params (dict) – (optional) The http request params.
  • headers (dict) – (optional) The http request headers.
Returns:

The instance of requests.Response.

iqoptionapi.http.token module

Module for IQ Option http token resource.

class iqoptionapi.http.token.Token(api)[source]

Bases: iqoptionapi.http.resource.Resource

Class for IQ Option http token resource.

url = 'auth/token'
Module contents

Module for IQ Option API http resources.

iqoptionapi.ws package
Subpackages
iqoptionapi.ws.chanels package
Submodules
iqoptionapi.ws.chanels.base module

Module for base IQ Option base websocket chanel.

class iqoptionapi.ws.chanels.base.Base(api)[source]

Bases: object

Class for base IQ Option websocket chanel.

Parameters:api – The instance of IQOptionAPI.
send_websocket_request(name, msg)[source]

Send request to IQ Option server websocket.

Parameters:
  • name (str) – The websocket chanel name.
  • msg (dict) – The websocket chanel msg.
Returns:

The instance of requests.Response.

iqoptionapi.ws.chanels.buyback module

Module for IQ Option buyback websocket chanel.

class iqoptionapi.ws.chanels.buyback.Buyback(api)[source]

Bases: iqoptionapi.ws.chanels.base.Base

Class for IQ option subscribe to buyback websocket chanel.

Parameters:api – The instance of IQOptionAPI.
name = 'buyback'
iqoptionapi.ws.chanels.buyv2 module

Module for IQ Option buyV2 websocket chanel.

class iqoptionapi.ws.chanels.buyv2.Buyv2(api)[source]

Bases: iqoptionapi.ws.chanels.base.Base

Class for IQ option buy websocket chanel.

Parameters:api – The instance of IQOptionAPI.
name = 'buyV2'
iqoptionapi.ws.chanels.candles module

Module for IQ option candles websocket chanel.

class iqoptionapi.ws.chanels.candles.GetCandles(api)[source]

Bases: iqoptionapi.ws.chanels.base.Base

Class for IQ option candles websocket chanel.

Parameters:api – The instance of IQOptionAPI.
name = 'candles'
iqoptionapi.ws.chanels.setactives module

Module for IQ option setactives websocket chanel.

class iqoptionapi.ws.chanels.setactives.SetActives(api)[source]

Bases: iqoptionapi.ws.chanels.base.Base

Class for IQ option setactives websocket chanel.

Parameters:api – The instance of IQOptionAPI.
name = 'setActives'
iqoptionapi.ws.chanels.ssid module

Module for IQ option API ssid websocket chanel.

class iqoptionapi.ws.chanels.ssid.Ssid(api)[source]

Bases: iqoptionapi.ws.chanels.base.Base

Class for IQ option API ssid websocket chanel.

Parameters:api – The instance of IQOptionAPI.
name = 'ssid'
iqoptionapi.ws.chanels.subscribe module

Module for IQ option subscribe websocket chanel.

class iqoptionapi.ws.chanels.subscribe.Subscribe(api)[source]

Bases: iqoptionapi.ws.chanels.base.Base

Class for IQ option subscribe websocket chanel.

Parameters:api – The instance of IQOptionAPI.
name = 'subscribe'
iqoptionapi.ws.chanels.unsubscribe module

Module for IQ option unsubscribe websocket chanel.

class iqoptionapi.ws.chanels.unsubscribe.Unsubscribe(api)[source]

Bases: iqoptionapi.ws.chanels.base.Base

Class for IQ option unsubscribe websocket chanel.

Parameters:api – The instance of IQOptionAPI.
name = 'unSubscribe'
Module contents

Module for IQ Option API websocket chanels.

iqoptionapi.ws.objects package
Submodules
iqoptionapi.ws.objects.base module

Module for IQ Option Base websocket object.

class iqoptionapi.ws.objects.base.Base[source]

Bases: object

Class for IQ Option Base websocket object.

name

Property to get websocket object name.

Returns:The name of websocket object.
iqoptionapi.ws.objects.candles module

Module for IQ Option Candles websocket object.

class iqoptionapi.ws.objects.candles.Candle(candle_data)[source]

Bases: object

Class for IQ Option candle.

Parameters:candle_data – The list of candles data.
candle_close

Property to get candle close value.

Returns:The candle close value.
candle_high

Property to get candle high value.

Returns:The candle high value.
candle_low

Property to get candle low value.

Returns:The candle low value.
candle_open

Property to get candle open value.

Returns:The candle open value.
candle_time

Property to get candle time.

Returns:The candle time.
candle_type

Property to get candle type value.

Returns:The candle type value.
class iqoptionapi.ws.objects.candles.Candles[source]

Bases: iqoptionapi.ws.objects.base.Base

Class for IQ Option Candles websocket object.

candles_data

Property to get candles data.

Returns:The list of candles data.
current_candle

Method to get current candle.

Returns:The instance of Candle.
first_candle

Method to get first candle.

Returns:The instance of Candle.
second_candle

Method to get second candle.

Returns:The instance of Candle.
iqoptionapi.ws.objects.profile module

Module for IQ Option Profile websocket object.

class iqoptionapi.ws.objects.profile.Profile[source]

Bases: iqoptionapi.ws.objects.base.Base

Class for IQ Option Profile websocket object.

balance

Property to get balance value.

Returns:The balance value.
skey

Property to get skey value.

Returns:The skey value.
iqoptionapi.ws.objects.timesync module

Module for IQ Option TimeSync websocket object.

class iqoptionapi.ws.objects.timesync.TimeSync[source]

Bases: iqoptionapi.ws.objects.base.Base

Class for IQ Option TimeSync websocket object.

expiration_datetime

Property to get expiration datetime.

Returns:The expiration datetime.
expiration_time

Property to get expiration time.

Returns:The expiration time.
expiration_timestamp

Property to get expiration timestamp.

Returns:The expiration timestamp.
server_datetime

Property to get server datetime.

Returns:The server datetime.
server_timestamp

Property to get server timestamp.

Returns:The server timestamp.
Module contents

Module for IQ Option API websocket objects.

Submodules
iqoptionapi.ws.client module

Module for IQ option websocket.

class iqoptionapi.ws.client.WebsocketClient(api)[source]

Bases: object

Class for work with IQ option websocket.

Parameters:api – The instance of IQOptionAPI.
static on_close(wss)[source]

Method to process websocket close.

static on_error(wss, error)[source]

Method to process websocket errors.

on_message(wss, message)[source]

Method to process websocket messages.

static on_open(wss)[source]

Method to process websocket open.

Module contents

Module for IQ Option API websocket.

Submodules

iqoptionapi.api module

Module for IQ Option API.

class iqoptionapi.api.IQOptionAPI(host, username, password, proxies=None)[source]

Bases: object

Class for communication with IQ Option API.

Parameters:
  • host (str) – The hostname or ip address of a IQ Option server.
  • username (str) – The username of a IQ Option server.
  • password (str) – The password of a IQ Option server.
  • proxies (dict) – (optional) The http request proxies.
appinit

Property for get IQ Option http appinit resource.

Returns:The instance of Appinit.
auth

Property for get IQ Option http auth resource.

Returns:The instance of Auth.
billing

Property for get IQ Option http billing resource.

Returns:The instance of Billing.
buy

Property for get IQ Option websocket buyv2 request.

Returns:The instance of Buyv2.
buyback

Property for get IQ Option http buyback resource.

Returns:The instance of Buyback.
candles = <iqoptionapi.ws.objects.candles.Candles object>
changebalance

Property for get IQ Option http changebalance resource.

Returns:The instance of Changebalance.
connect()[source]

Method for connection to IQ Option API.

getcandles

Property for get IQ Option websocket candles chanel.

Returns:The instance of GetCandles.
getprofile

Property for get IQ Option http getprofile resource.

Returns:The instance of Login.
listinfodata = <iqoptionapi.ws.objects.listinfodata.ListInfoData object>
login

Property for get IQ Option http login resource.

Returns:The instance of Login.
loginv2

Property for get IQ Option http loginv2 resource.

Returns:The instance of Loginv2.
prepare_http_url(resource)[source]

Construct http url from resource url.

Parameters:resource – The instance of Resource.
Returns:The full url to IQ Option http resource.
profile = <iqoptionapi.ws.objects.profile.Profile object>
send_http_request(resource, method, data=None, params=None, headers=None)[source]

Send http request to IQ Option server.

Parameters:
  • resource – The instance of Resource.
  • method (str) – The http request method.
  • data (dict) – (optional) The http request data.
  • params (dict) – (optional) The http request params.
  • headers (dict) – (optional) The http request headers.
Returns:

The instance of Response.

send_websocket_request(name, msg)[source]

Send websocket request to IQ Option server.

Parameters:
  • name (str) – The websocket request name.
  • msg (dict) – The websocket request msg.
set_session_cookies()[source]

Method to set session cookies.

setactives

Property for get IQ Option websocket setactives chanel.

Returns:The instance of SetActives.
ssid

Property for get IQ Option websocket ssid chanel.

Returns:The instance of Ssid.
subscribe

Property for get IQ Option websocket subscribe chanel.

Returns:The instance of Subscribe.
timesync = <iqoptionapi.ws.objects.timesync.TimeSync object>
token

Property for get IQ Option http token resource.

Returns:The instance of Token.
unsubscribe

Property for get IQ Option websocket unsubscribe chanel.

Returns:The instance of Unsubscribe.
websocket

Property to get websocket.

Returns:The instance of WebSocket.

iqoptionapi.constants module

Module for IQ Option API constants.

Module contents

A python wrapper for IQ Option API.

Indices and tables