Skip to content

Commit

Permalink
add update procedure for completed order
Browse files Browse the repository at this point in the history
  • Loading branch information
tsuga committed Sep 16, 2019
1 parent 061e283 commit 2870253
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ccxtbt/ccxtbroker.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,9 @@ def next(self):
pos = self.getposition(o_order.data, clone=False)
pos.update(o_order.size, o_order.price)
o_order.completed()
o_order.executed.comm = ccxt_order['fee'] if ccxt_order['fee'] is not None else 0 # TODO: check on main net
o_order.executed.size = ccxt_order['filled']
o_order.executed.price = ccxt_order['average']
self.notify(o_order)
self.open_orders.remove(o_order)

Expand Down

0 comments on commit 2870253

Please sign in to comment.