.. image:: https://img.shields.io/pypi/v/trading_ig.svg
    :target: https://pypi.python.org/pypi/trading_ig/
    :alt: Latest Version

.. image:: https://img.shields.io/pypi/pyversions/trading_ig.svg
    :target: https://pypi.python.org/pypi/trading_ig/
    :alt: Supported Python versions

.. image:: https://img.shields.io/pypi/wheel/trading_ig.svg
    :target: https://pypi.python.org/pypi/trading_ig/
    :alt: Wheel format

.. image:: https://img.shields.io/pypi/l/trading_ig.svg
    :target: https://pypi.python.org/pypi/trading_ig/
    :alt: License

.. image:: https://img.shields.io/pypi/status/trading_ig.svg
    :target: https://pypi.python.org/pypi/trading_ig/
    :alt: Development Status

.. image:: https://img.shields.io/pypi/dm/trading_ig.svg
    :target: https://pypi.python.org/pypi/trading_ig/
    :alt: Downloads monthly

.. image:: https://requires.io/github/ig-python/ig-markets-api-python-library/requirements.svg?branch=master
    :target: https://requires.io/github/ig-python/ig-markets-api-python-library/requirements/?branch=master
    :alt: Requirements Status
    
.. image:: https://landscape.io/github/ig-python/ig-markets-api-python-library/master/landscape.svg?style=flat
    :target: https://landscape.io/github/ig-python/ig-markets-api-python-library/master
    :alt: Code Health

.. image:: https://travis-ci.org/ig-python/ig-markets-api-python-library.svg?branch=master
    :target: https://travis-ci.org/ig-python/ig-markets-api-python-library

.. image:: https://readthedocs.org/projects/trading-ig/badge/?version=latest
    :target: https://trading-ig.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status
    

IG Markets API - Python Library
===============================

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.

REST API
--------

You can use the IG Markets HTTP / REST API to submit trade orders, open positions, close positions and view market sentiment.

STREAM API
----------

You can use the IG Markets STREAM API to get realtime price, balance...

More
----

Full details about the API along with information about how to open an account with IG can be found at the link below:

http://labs.ig.com/


Install
-------

From Python package index
~~~~~~~~~~~~~~~~~~~~~~~~~

::

    $ pip install trading_ig

From source
~~~~~~~~~~~

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

or

::

    $ pip install git+https://github.com/ig-python/ig-markets-api-python-library


Work in progress
----------------

This project is not a `IG Markets <http://www.ig.com/>`__ 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

Thanks to
---------
-  `Lewis Barber <https://github.com/lewisbarber>`_
-  ixta
-  Chris
-  colombao
-  `gianluca.finocchiaro <https://github.com/gfinocchiaro>`_
-  Weswit
- `Dimitri John Ledkov <https://github.com/xnox>`_
- `RRMXkun <https://github.com/RRMXkun>`_
- `redbullpeter <https://github.com/redbullpeter>`_
- `David Sabater Dinter <https://github.com/dsdinter>`_
- `Oscar Neira <https://github.com/Oneirag>`_
- `Wez Pyke <https://github.com/wezpyke>`_
- `and all other contributors... <https://github.com/ig-python/ig-markets-api-python-library/graphs/contributors>`__

Other related projects
----------------------
* igtrade (and forks)

   * https://github.com/maroxe/igtrade
   * https://github.com/falex69/igtrade
   * https://github.com/yopibou/L3
