Commit b7b9c6e8 by rongjun

bug

parent 84aac5f1
......@@ -598,16 +598,14 @@ class PyCTP_Market(PyCTP_Market_API):
, asize1=DepthMarketData['AskVolume1']
, bsize1=DepthMarketData['BidVolume1'])
self.data.append(tick)
print(tick, '\n')
dt = datetime.datetime.strptime(str(DepthMarketData['ActionDay'] + DepthMarketData['UpdateTime'], 'gb2312'),
'%Y%m%d%H:%M:%S').replace(microsecond=DepthMarketData['UpdateMillisec'] * 1000)
un_time = str(time.mktime(dt.timetuple()))
i = str(DepthMarketData['InstrumentID'], 'gb2312')
p = str(DepthMarketData['LastPrice'])
url = 'http://127.0.0.1:8250/market/push/?data={},{},{}'.format(un_time, i, p)
print(url)
url = 'http://127.0.0.1:8243/market/push/?data={},{},{}'.format(un_time, i, p)
ret = requests.get(url)
print(ret.text)
print(ret.content)
def __main__():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment