Skip to content

Instantly share code, notes, and snippets.

View mac133k's full-sized avatar

mac133k

  • London, United Kingdom
View GitHub Profile
@mac133k
mac133k / ig_client.py
Last active May 16, 2024 11:31
Basic IG API client with instrument tree traversal methods
import requests
import time
class IG:
def __init__(self, username, password, api_key, base_url='https://api.ig.com/gateway/deal'):
self.session_init(username, password, api_key, base_url, currency)
def session_init(self, username, password, api_key, base_url):
self.base_url = base_url
self.headers = {