A lightweight Python library that can be used to connect to the IG Markets REST and STREAM API with a LIVE or DEMO account.
IG Markets provide Retail Spread Betting and CFD accounts for trading Equities, Forex, Commodities, Indices and much more.
You can use the IG Markets HTTP / REST API to submit trade orders, open positions, close positions and view market sentiment.
You can use the IG Markets STREAM API to get realtime price, balance...
Full details about the API along with information about how to open an account with IG can be found at the link below:
$ pip install trading_ig
Get latest version using Git
$ git clone https://github.com/ig-python/ig-markets-api-python-library $ cd ig-markets-api-python-library $ python setup.py install https://github.com/ig-python/ig-markets-api-python-library
or
$ pip install git+https://github.com/ig-python/ig-markets-api-python-library
In Case You encounter urllib and “SSL: CERTIFICATE_VERIFY_FAILED” Error. It propbaly because Python3 doesn't have ssl certificate. Solution is to run /Applications/Python3.6/InstallCertificates.command See: https://stackoverflow.com/questions/27835619/urllib-and-ssl-certificate-verify-failed-error
This project is not a IG Markets project. Use it at your own risk.
There is still some room for improvement, fix issue
see :
- http://labs.ig.com/node/98
- https://labs.ig.com/node/28
- http://www.andlil.com/forum/script-api-ig-stream-rest-t10091-10.html
- https://github.com/ig-python/ig-markets-api-python-library/issues
- Lewis Barber
- ixta
- Chris
- colombao
- gianluca.finocchiaro
- Weswit
- Dimitri John Ledkov
- RRMXkun
- redbullpeter
- David Sabater Dinter
- Oscar Neira
- Wez Pyke
- and all other contributors...