Skip to main content
Latest Version Supported Python versions Wheel format License Development Status Downloads monthly Documentation Status Test Coverage https://img.shields.io/badge/code%20style-black-000000.svg

trading-ig

A lightweight Python wrapper for the IG Markets API. Simplifies access to the IG REST and Streaming APIs.

What is it?

IG Markets provides financial spread betting and CFD platforms for trading equities, forex, commodities, indices, cryptocurrencies, bonds, rates, options and more.

IG provide APIs so that developers can access their platforms programmatically. Using the APIs you can get live and historical data, automate your trades, or create apps. For details about the IG APIs please see their site:

https://labs.ig.com/

NOTE: this is not an IG project. Use it at your own risk

Dependencies

A number of dependencies in this project are marked as ‘optional’, this is by design. There is a brief explanation in this FAQ item.

For full details, see pyproject.toml

Installation

Installing with pip:

$ pip install trading-ig

Installing with all optional dependencies:

$ pip install "trading-ig[pandas, munch, tenacity]"

What if I need help?

This library is maintained by one busy developer in his spare time, with very little time for support.

If you have a problem using this library, the first thing to do is to try to isolate where the problem is. The IG platform is a complex application, and there are many ways to make mistakes using it. Just because you see an error, it does not necessarily mean there is a problem with this library. If you encounter an issue, you should follow these steps, in order:

1 - Check if there a problem with the IG platform. From time to time the IG platform itself has issues, especially the DEMO environment. If you see a message like ConnectionRefusedError, or a 500 Server error, then it could be an issue with the IG platform. IG provide a status page, though its accuracy is questionable. You can also check the IG Community forums. If there are platform issues, its likely someone will have already posted a message there.

2 - Check if there is a problem with your code. Most of the API endpoints have multiple options, multiple versions, multiple ways of accessing them, and multiple interdependent parameters. Incoming data is validated on the server, and problems will be reported back in the response. You should

  • check the documentation (REST, Streaming) to make sure you are calling the APIs correctly

  • look at the sample code and unit and integration tests. There are example snippets for most API endpoints.

  • repeat the API call using the IG companion tools (REST, Streaming). If you get the same result, then it is likely that you are using the API incorrectly.

In this case you should:

3 - If you’re sure that the problem is with this library, please:

  • provide everything necessary to reproduce the problem

  • include the full script that produces the error, including import statements

  • ideally this should be a minimal example - the shortest possible script that reproduces the problem

  • dependencies and their versions

  • the full output trace including the error messages

An issue without all this information may be ignored and/or closed without response

Docs

https://trading-ig.readthedocs.io/

License

BSD (See LICENSE)

Download files

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

Source Distribution

trading_ig-0.0.25.tar.gz (21.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

trading_ig-0.0.25-py3-none-any.whl (24.4 kB view details)

Uploaded Python 3

File details

Details for the file trading_ig-0.0.25.tar.gz.

File metadata

  • Download URL: trading_ig-0.0.25.tar.gz
  • Upload date:
  • Size: 21.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for trading_ig-0.0.25.tar.gz
Algorithm Hash digest
SHA256 772993d307c28d42e5e4397d31f69493c6a0b5c7854064762c5047410a8ca16b
MD5 bf3c04772ebdb3fe1392e44c960e34a3
BLAKE2b-256 4e679e26f84bcedc283f3fd78060b1b54a621a34a6e4a74f5aefb16bb6a6996c

See more details on using hashes here.

File details

Details for the file trading_ig-0.0.25-py3-none-any.whl.

File metadata

  • Download URL: trading_ig-0.0.25-py3-none-any.whl
  • Upload date:
  • Size: 24.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for trading_ig-0.0.25-py3-none-any.whl
Algorithm Hash digest
SHA256 1757835824739bad970b6360dbaeb1d227880610fc0f2387eb0014d3fd521f75
MD5 8981c3017c2c4f96c055aa5276cf5d06
BLAKE2b-256 44e33a56f30df86a6c2490795c0b96e2dd9dd710e1aaea4c1e0add5a4104e57a

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.25 This release

2 files

0.0.24

2 files

0.0.23

2 files

0.0.22

2 files

0.0.21

2 files

0.0.20

2 files

0.0.19

2 files

0.0.18

2 files

0.0.17

2 files

0.0.16

2 files

0.0.15

2 files

0.0.14

2 files

0.0.13

2 files

0.0.12

2 files

0.0.11

2 files

0.0.10

2 files

0.0.9

2 files

0.0.8

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.3

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page