[Mod] add depth volume for OesGateway, close #2112
This commit is contained in:
parent
7e30f9fabc
commit
4e966a4bdb
@ -144,8 +144,10 @@ class OesMdMessageLoop:
|
|||||||
|
|
||||||
for i in range(min(data.BidPriceLevel, 5)):
|
for i in range(min(data.BidPriceLevel, 5)):
|
||||||
tick.__dict__['bid_price_' + str(i + 1)] = data.BidLevels[i].Price / 10000
|
tick.__dict__['bid_price_' + str(i + 1)] = data.BidLevels[i].Price / 10000
|
||||||
|
tick.__dict__['bid_volume_' + str(i + 1)] = data.BidLevels[i].QrderQty / 100
|
||||||
for i in range(min(data.OfferPriceLevel, 5)):
|
for i in range(min(data.OfferPriceLevel, 5)):
|
||||||
tick.__dict__['ask_price_' + str(i + 1)] = data.OfferLevels[i].Price / 10000
|
tick.__dict__['ask_price_' + str(i + 1)] = data.OfferLevels[i].Price / 10000
|
||||||
|
tick.__dict__['ask_volume_' + str(i + 1)] = data.OfferLevels[i].QrderQty / 100
|
||||||
self.gateway.on_tick(copy(tick))
|
self.gateway.on_tick(copy(tick))
|
||||||
|
|
||||||
def on_init_tick(self, d: MdsMktRspMsgBodyT):
|
def on_init_tick(self, d: MdsMktRspMsgBodyT):
|
||||||
@ -160,8 +162,10 @@ class OesMdMessageLoop:
|
|||||||
|
|
||||||
for i in range(5):
|
for i in range(5):
|
||||||
tick.__dict__['bid_price_' + str(i + 1)] = data.BidLevels[i].Price / 10000
|
tick.__dict__['bid_price_' + str(i + 1)] = data.BidLevels[i].Price / 10000
|
||||||
|
tick.__dict__['bid_volume_' + str(i + 1)] = data.BidLevels[i].QrderQty / 100
|
||||||
for i in range(5):
|
for i in range(5):
|
||||||
tick.__dict__['ask_price_' + str(i + 1)] = data.OfferLevels[i].Price / 10000
|
tick.__dict__['ask_price_' + str(i + 1)] = data.OfferLevels[i].Price / 10000
|
||||||
|
tick.__dict__['ask_volume_' + str(i + 1)] = data.OfferLevels[i].QrderQty / 100
|
||||||
self.gateway.on_tick(copy(tick))
|
self.gateway.on_tick(copy(tick))
|
||||||
|
|
||||||
def on_l2_trade(self, d: MdsMktRspMsgBodyT):
|
def on_l2_trade(self, d: MdsMktRspMsgBodyT):
|
||||||
|
Loading…
Reference in New Issue
Block a user