Skip to content
/ ig Public

IG REST trading API: Python code, primarily used for intraday (non-streaming) trading

License

Notifications You must be signed in to change notification settings

nrivet84/ig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ig

IG REST trading API in Python

IG Labs

Purposes:

  • trading
  • intraday
  • discrete time (non-continuous = no streaming)
  • decision concerning monitoring and execution supposed to be programmed in another software

Running the tests

In tests\config.ini, add your IG credentials for demo account or live account. The API key is mandatory, see how to generate one.

As the ig 'software' is not a package for now, you need to add its path.

import sys
import os
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'ig')))

import ig_service as igs
import ig_tools as igt

To get the 'demo' credentials and set up the proxies if needed.

proxy_user, proxy_password, api_key, username, password, account = \
igt.getconfig('demo')

To create a session.

service = igs.IGservice(username, password, api_key, account, 'demo', proxy_user, proxy_password)
service.login()

License

MIT

About

IG REST trading API: Python code, primarily used for intraday (non-streaming) trading

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages