added tests for IOC and FOK

This commit is contained in:
misagh
2018-12-12 13:05:55 +01:00
parent adcaa8439e
commit 8d8b53f4d1
2 changed files with 49 additions and 5 deletions

View File

@@ -413,16 +413,16 @@ class FreqtradeBot(object):
order_tif, order_type, pair_s, order_status, self.exchange.name,
order['filled'], order['amount'], order['remaining']
)
stake_amount = order['price']
stake_amount = order['cost']
amount = order['amount']
buy_limit_filled_price = order['average']
buy_limit_filled_price = order['price']
order_id = None
# in case of FOK the order may be filled immediately and fully
elif order_status == 'filled':
stake_amount = order['price']
elif order_status == 'closed':
stake_amount = order['cost']
amount = order['amount']
buy_limit_filled_price = order['average']
buy_limit_filled_price = order['price']
order_id = None
self.rpc.send_msg({