Skip to main content

Python Package for IG Group's API.

A package allowing easy interaction with IG Group's REST API.

This project is a fully functional package that allows easy interaction with IG Group's REST API. The main function being to retrieve historical data for later use in backtesting. To do this, key functions were defined for:

  • Opening trading sessions.
  • Searching specific financial instruments.
  • Getting historical prices from finanical instruments.
  • Managing watchlists.
  • Closing trading sessions.

Class diagram

How to utilise this package

  1. Use pip install ig_package in the command prompt.
  2. Import the IG object into your script:
    from ig_package import IG
    
  3. Initialise the IG object including your API Key and details in the relevant parameters.

How to contribute to this package

The classes within this package are based on the functionaliy of IG Group's REST API so in order to contribute I would recommend experimenting with their API Companion.

The three main classes: IG, Watchlist and Instrument, are all defined in main.py and functions can be easily added to each of them.

If any new classes have been defined then remember to import the new classes into __init__.py. This allows users to import the classes directly from the package.

Fixing bugs

Please make sure to report any bugs found as issues on Github. If you then want to submit a pull request, make sure to reference the issue.

Future Development

  1. Adding functions to handle active positions, therefore allowing users to execute trades.
  2. Adding working trades so executing trades when the price reaches a certain amount on a specific instrument.
  3. Adding a demo version as IG's API also can manage demo accounts too.

Metadata

Release files for ig-package 1.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ig-package 1.2.1
File Size Uploaded
ig_package-1.2.1.tar.gz 7.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ig-package 1.2.1
File Interpreter ABI Platform
ig_package-1.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 15.3 kB

Release files / ig_package-1.2.1.tar.gz

Download URL ig_package-1.2.1.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
45d3abf3b4815c91754b06ce6e9214973129318c0e05b10b81ded23adbbebd1d
BLAKE2b-256 checksum
How to use checksums
f58f82f8fea21ad2f3a7aeec3dff254f19e9e2c8f47b2666bef544598d778ddc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.11.3 Windows/10

Release files / ig_package-1.2.1-py3-none-any.whl

Download URL ig_package-1.2.1-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9dd44eedc73c3a993d75e895bcd3f0d01315c609f08f9a445ed83994ec181e1b
BLAKE2b-256 checksum
How to use checksums
4f057b405e4a88cc2f46e215d48044762d6c2b16839ae7407af9087c55c9b933
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.11.3 Windows/10

Release history Release notifications | RSS feed

This release

1.2.1 This release

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.4

2 release files

1.0.3

2 release files

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