INNER CODE UNIT · Python
Client
AlexShakaev/backtesting_and_algotrading_options_with_Interactive_Brokers_API · utils/spy_client.py:38
class Client(EWrapper, EClient):
''' Serves as the client and the wrapper '''
def __init__(self, addr, port, client_id):
EWrapper.__init__(self)
EClient.__init__(self, self)
self.funds = 0.0
self.index = 0
self.entered = False
self.signal = False
self.current_price = 0.0
self.filled = False
self.expiry = None
self.spread = {}
self.data = pd.DataFrame(np.nan, index = range(1), columns = ['date', 'o', 'h', 'l', 'c', 'v', 'diff'])
self.chain = pd.DataFrame() #columns = ['symbol', 'expiry', 'strike', 'con_id'])
self.con_data = {}