def cache_get(self, key): """从内存中获取一个值 return: str""" a= np.zeros(200, dtype=np.int8) l = self.Cache_Get(key, a) s = agl.ArrayToStr(a[:l]) return s
def get_bankuaisort(self): a = np.zeros(500 * 200, dtype=np.int8) l = self.GetBankuaiSort(a) s = agl.ArrayToStr(a[:l]) a = np.array(s.split("|"))[:-1] a = a.reshape((len(a) / 2, 2)) df = pd.DataFrame(a) df[1] = df[1].astype('float') return df
def handleRotuer(self, input_params): """使用一个入口来与底层通信, 其它原有account接口暂时废弃 input_params : str 文本协议 action|params...| 通过对action字段的判断来确定调用的函数, 一般为发送函数 return: str 返回发送函数获取的结果 """ a = np.zeros(20000, dtype=np.int8) l = self.HandleRotuer(self.account, input_params, a) s = agl.ArrayToStr(a[:l]) return s
def get_codes(self): """return: list""" a = np.zeros(6*5000, dtype=np.int8) l = self.GetAllCodes(a) s = agl.ArrayToStr(a[:l]) r = s.split('|') if r[-1] == '': return r[:-1] return r
def get_stocklist(self, code): a = np.zeros(200, dtype=np.int8) l = self.GetStockList(self.account, code, a) s = agl.ArrayToStr(a[:l]) return s.split('|')
def getLastWeituo(self, code): a = np.zeros(200, dtype=np.int8) l = self.GetLastWeituo(self.account, code, a) s = agl.ArrayToStr(a[:l]) return s.split('|')
def get_info(self, code): a = np.zeros(1000, dtype=np.int8) l = self.GetInfo(code, a) return agl.ArrayToStr(a[:l])