From 4ed000609dfef0f901cb83eabd537dd0699c0145 Mon Sep 17 00:00:00 2001 From: Frederic Fortier Date: Tue, 12 Dec 2017 19:44:43 -0500 Subject: [PATCH] BLD: trying to better handle invalid order status --- catalyst/exchange/ccxt/ccxt_exchange.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/catalyst/exchange/ccxt/ccxt_exchange.py b/catalyst/exchange/ccxt/ccxt_exchange.py index 97b29cb1..6af426e1 100644 --- a/catalyst/exchange/ccxt/ccxt_exchange.py +++ b/catalyst/exchange/ccxt/ccxt_exchange.py @@ -410,7 +410,12 @@ class CCXT(Exchange): status = ORDER_STATUS.OPEN else: - raise ValueError('invalid state for order') + log.warn( + 'invalid state {} for order {}'.format( + order_status['status'], order_status['id'] + ) + ) + status = ORDER_STATUS.OPEN amount = order_status['amount'] filled = order_status['filled']