Skip to main content

IG REST trading API client

Project description

IG REST trading API client

Small Python library to connect to IG REST trading API (more information and API reference is available on IG Labs website).

Installation

To use most recent release:

pip install ig-rest-client

To use current master branch:

pip install git+https://github.com/wjszlachta/ig-rest-client.git

Usage

For demo account:

from ig_rest_client import IgRestSession

api_key = '...'
account_id = '...'
rest_api_username = '...'
rest_api_password = '...'

session = IgRestSession(api_key, account_id, rest_api_username, rest_api_password)

print(session.session_details())

session.log_out()

For live account:

from ig_rest_client import IgRestSession, IG_REST_TRADING_API_LIVE_URL

api_key = '...'
account_id = '...'
rest_api_username = '...'
rest_api_password = '...'

session = IgRestSession(api_key, account_id, rest_api_username, rest_api_password, rest_api_url=IG_REST_TRADING_API_LIVE_URL)

print(session.session_details())

session.log_out()

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for ig-rest-client, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size ig_rest_client-0.1-py3-none-any.whl (4.6 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size ig-rest-client-0.1.tar.gz (4.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page