def getCodePosition(self,code): """获取持仓股票信息 """ POSITION_COlS = 14 position_dict = getDictViewInfo(self.__buy_sell_hwnds[-4][0], POSITION_COlS) #print('position_dict=',position_dict) hold_num = 0 available_to_sell =0 if code in list(position_dict.keys()): hold_num = position_dict[code]['当前持仓'] available_to_sell = position_dict[code]['可用余额 '] return hold_num,available_to_sell
def getCodePosition(self, code): """获取持仓股票信息 """ POSITION_COlS = 14 position_dict = getDictViewInfo(self.__buy_sell_hwnds[-4][0], POSITION_COlS) #print('position_dict=',position_dict) hold_num = 0 available_to_sell = 0 if code in list(position_dict.keys()): hold_num = position_dict[code]['当前持仓'] available_to_sell = position_dict[code]['可用余额 '] return hold_num, available_to_sell
def get_my_position(self): POSITION_COlS = 14 return getDictViewInfo(self.__buy_sell_hwnds[-4][0], POSITION_COlS)
def getPositionDict(self): POSITION_COlS = 14 return getDictViewInfo(self.__buy_sell_hwnds[-4][0], POSITION_COlS)