on-internet
← Community

IB API loop contract details for multiple tickers

Stack Overflow ·

objective of my script is to get sector for each stock from my portfolio. I have already script that pulls out all my positions from IB API GW. I have a script that can get contract details for one stock. The problem is (I never used class crap that IB forces in their API) I do not know how to use below program as module in main program, and pass contract variables. #!/usr/bin/env python3 from ibapi.client import * from ibapi.wrapper import * from ibapi.contract import * import time import threading import sys class ContDetails(EClient, EWrapper): def __init__(self): EClient.__init__(self, sel

Comments

Sign in or sign up to comment and upvote.

No comments yet.