Skip to content

Commit

Permalink
Merge pull request #81 from xingetouzi/fix-okex-order
Browse files Browse the repository at this point in the history
copy orderinfo to avoid modification
  • Loading branch information
BurdenBear authored Apr 12, 2019
2 parents 333668f + 6146e63 commit c5f7fc9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions vnpy/trader/gateway/okexGateway/future.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,7 @@ def processOrderData(self, data):
if int(data['order_type'])>1:
order.priceType = priceTypeMapReverse[data['order_type']]

order= copy(order)
self.gateway.onOrder(order)
self.orderDict[oid] = order

Expand Down
3 changes: 2 additions & 1 deletion vnpy/trader/gateway/okexGateway/spot.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,8 @@ def processOrderData(self, data):
if int(data['order_type'])>1:
order.priceType = priceTypeMapReverse[data['order_type']]

self.gateway.onOrder(copy(order))
order = copy(order)
self.gateway.onOrder(order)
self.orderDict[oid] = order

if order.thisTradedVolume:
Expand Down
1 change: 1 addition & 0 deletions vnpy/trader/gateway/okexGateway/swap.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,7 @@ def processOrderData(self, data):
if int(data['order_type'])>1:
order.priceType = priceTypeMapReverse[data['order_type']]

order= copy(order)
self.gateway.onOrder(order)
self.orderDict[oid] = order

Expand Down
2 changes: 1 addition & 1 deletion vnpy/trader/utils/notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def run(self, qin, qout):
time.sleep(self.interval)

class DingSender(object):
interval = 10
interval = 600

def __init__(self):
self.token = globalSetting['dingding']
Expand Down

0 comments on commit c5f7fc9

Please sign in to comment.