def get(self): ib_client = IBClient() ret = ib_client.portfolio_accounts() self.write(ret[0])
def get(self): ib_client = IBClient() ret = ib_client.get_scanners() self.write(ret)
def get(self): ib_client = IBClient() ret = ib_client.get_account() self.write(ret[0])
def get(self): ib_client = IBClient() ret = ib_client.get_market(conids = ['265598'], since = '0', fields = quote_fields) self.write(ret[0])
def get(self): ib_client = IBClient() ret = ib_client.customer_info() self.write(ret)
def get(self): ib_client = IBClient() ret = ib_client.is_authenticated() self.write(ret)
def get(self): ib_client = IBClient() ret = ib_client.delete_order(account_id = '265598',customer_order_id = ['265598']) self.write(ret)
def get(self): ib_client = IBClient() ret = ib_client.place_orders(account_id = '265598',orders = ['265598']) self.write(ret)
def get(self): ib_client = IBClient() ret = ib_client.contract_details(conid = '265598') self.write(ret)
def get(self): ib_client = IBClient() ret = ib_client.data_ratings(conid = '265598') self.write(ret)
# create a new session. #ib_client.create_session() # 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