def get(self): ib_client = IBClient() ret = ib_client.get_account() self.write(ret[0])
# grab the account data. #account_data = ib_client.portfolio_accounts() # print the data. #print(account_data) # Grab historical prices. #aapl_prices = ib_client.market_data_history(conid=['265598'], period='1d', bar='5min') from functions.func import IBClient #callAccount() ib_client = IBClient() #ib_client.set_server() ret = ib_client.is_authenticated() ib_client.get_account() ib_client.server_accounts() #print(ret) quote_fields = [55, 7296, 7295, 86, 70, 71, 84, 31] aapl_current_prices = ib_client.get_market(conids = ['265598'], since = '0', fields = quote_fields) #print(aapl_current_prices) #ret2 = ib_client.get_scanners() from datetime import date import tornado.escape import tornado.ioloop import tornado.web class VersionHandler(tornado.web.RequestHandler): def get(self):