A package allowing easy interaction with IG Group's REST API.
Project description
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.
How to utilise this package
- Use
pip install ig_package
in the command prompt. - Import the IG object into your script:
from ig_package import IG
- 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
- Adding functions to handle active positions, therefore allowing users to execute trades.
- Adding working trades so executing trades when the price reaches a certain amount on a specific instrument.
- Adding a demo version as IG's API also can manage demo accounts too.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for ig_package-1.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9dd44eedc73c3a993d75e895bcd3f0d01315c609f08f9a445ed83994ec181e1b |
|
MD5 | 65d882dd779c7428922a9e64f45e4e0e |
|
BLAKE2b-256 | 4f057b405e4a88cc2f46e215d48044762d6c2b16839ae7407af9087c55c9b933 |