Пример #1
0
 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
Пример #2
0
 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
Пример #3
0
 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
Пример #4
0
 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
Пример #5
0
 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('|')
Пример #6
0
 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('|')
Пример #7
0
 def get_info(self, code):
     a = np.zeros(1000, dtype=np.int8)
     l = self.GetInfo(code, a)
     return agl.ArrayToStr(a[:l])