2020-09-28 13:00:21 INFO: place order: compute qty=-905 2020-09-28 13:00:21 INFO: place order: save order to db 46aeff0500d04a57adfbea5e10adb99e; response=True 2020-09-28 13:00:21 INFO: post order to exchange resp={'orderID': '6d6391ad-60e0-4622-8d76-0af313e6f43b', 'clOrdID': '46aeff0500d04a57adfbea5e10adb99e', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 905, 'price': 357.25, 'displayQty': None, 'stopPx': 357.3, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 28, 10, 0, 21, 452000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 28, 10, 0, 21, 452000, tzinfo=tzutc())} 2020-09-28 13:00:21 INFO: place new init order {'qty': -905, 'init_price': Decimal('357.30000000000001136868377216160297393798828125'), 'stop_price': Decimal('359.3999999999999772626324556767940521240234375'), 'take_price': Decimal('344.95000000000027284841053187847137451171875'), 'order_uid': '46aeff0500d04a57adfbea5e10adb99e', 'response': {'orderID': '6d6391ad-60e0-4622-8d76-0af313e6f43b', 'clOrdID': '46aeff0500d04a57adfbea5e10adb99e', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 905, 'price': 357.25, 'displayQty': None, 'stopPx': 357.3, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 28, 10, 0, 21, 452000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 28, 10, 0, 21, 452000, tzinfo=tzutc())}} 2020-09-28 13:00:21 INFO: init new order end 2020-09-28 13:00:21 INFO: 2020-09-28 13:00:21 INFO: 2020-09-28 13:00:21 INFO: 2020-09-28 13:00:21 INFO: 2020-09-28 13:00:21 INFO: process event {'orderID': '6d6391ad-60e0-4622-8d76-0af313e6f43b', 'clOrdID': '46aeff0500d04a57adfbea5e10adb99e', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 905, 'price': 357.25, 'displayQty': None, 'stopPx': 357.3, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-09-28T10:00:21.452Z', 'timestamp': '2020-09-28T10:00:21.452Z'} 2020-09-28 13:00:21 INFO: skip event 46aeff0500d04a57adfbea5e10adb99e New 2020-09-28 13:01:27 INFO: process event {'orderID': '6d6391ad-60e0-4622-8d76-0af313e6f43b', 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 905, 'avgPx': 357.25, 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'transactTime': '2020-09-28T10:01:27.966Z', 'timestamp': '2020-09-28T10:01:27.966Z', 'clOrdID': '46aeff0500d04a57adfbea5e10adb99e', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-28 13:01:27 INFO: add new event={'uid': '46aeff0500d04a57adfbea5e10adb99e', 'status': 'Filled'} 2020-09-28 13:01:28 INFO: 2020-09-28 13:01:28 INFO: 2020-09-28 13:01:28 INFO: 2020-09-28 13:01:28 INFO: 2020-09-28 13:01:28 INFO: process event start 2020-09-28 13:01:28 INFO: fetch new order event 46aeff0500d04a57adfbea5e10adb99e 2020-09-28 13:01:28 INFO: fetch orders by event init={'stop': '359.3999999999999772626324556767940521240234375', 'take': '344.95000000000027284841053187847137451171875', 'qty': '905', 'color': 'RED', 'ticker': 'ETHUSD', 'clearing_offset': '3600'} profit_pair=None 2020-09-28 13:01:28 INFO: process init order filled 2020-09-28 13:01:28 INFO: save profit orders to storage stop=7c6af2828dfc4c258b9a5c617f5c8c56 take=e0ae0a7090ce47cfb6c718811952656c 2020-09-28 13:01:28 INFO: place profit orders take_price=344.95000000000027284841053187847137451171875, stop_price=359.3999999999999772626324556767940521240234375, qty=905, color=RED, ticker=ETHUSD 7c6af2828dfc4c258b9a5c617f5c8c56 e0ae0a7090ce47cfb6c718811952656c 2020-09-28 13:01:28 INFO: place stop order ETHUSD: qty=905, stop_price=359.3999999999999772626324556767940521240234375, stop_uid=7c6af2828dfc4c258b9a5c617f5c8c56 2020-09-28 13:01:28 INFO: process event {'orderID': '74a3300a-a8bd-499b-934b-d5329d428724', 'clOrdID': '7c6af2828dfc4c258b9a5c617f5c8c56', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': None, 'displayQty': None, 'stopPx': 359.4, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': '2020-09-28T10:01:28.546Z', 'timestamp': '2020-09-28T10:01:28.546Z'} 2020-09-28 13:01:28 INFO: skip event 7c6af2828dfc4c258b9a5c617f5c8c56 New 2020-09-28 13:01:28 INFO: exchange resp for stop order={'orderID': '74a3300a-a8bd-499b-934b-d5329d428724', 'clOrdID': '7c6af2828dfc4c258b9a5c617f5c8c56', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': None, 'displayQty': None, 'stopPx': 359.4, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 28, 10, 1, 28, 546000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 28, 10, 1, 28, 546000, tzinfo=tzutc())} 2020-09-28 13:01:28 INFO: place limit order ETHUSD: qty=905, price=344.95000000000027284841053187847137451171875, take_uid=e0ae0a7090ce47cfb6c718811952656c 2020-09-28 13:01:28 INFO: process event {'orderID': '0f03aafe-bf61-44b7-b606-3044f3241860', 'clOrdID': 'e0ae0a7090ce47cfb6c718811952656c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': 344.95, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': '2020-09-28T10:01:28.584Z', 'timestamp': '2020-09-28T10:01:28.584Z'} 2020-09-28 13:01:28 INFO: skip event e0ae0a7090ce47cfb6c718811952656c New 2020-09-28 13:01:28 INFO: exchange resp for take profit order={'orderID': '0f03aafe-bf61-44b7-b606-3044f3241860', 'clOrdID': 'e0ae0a7090ce47cfb6c718811952656c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': 344.95, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 28, 10, 1, 28, 584000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 28, 10, 1, 28, 584000, tzinfo=tzutc())} 2020-09-28 13:01:28 INFO: place profit orders={'stop': {'response': {'orderID': '74a3300a-a8bd-499b-934b-d5329d428724', 'clOrdID': '7c6af2828dfc4c258b9a5c617f5c8c56', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': None, 'displayQty': None, 'stopPx': 359.4, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 28, 10, 1, 28, 546000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 28, 10, 1, 28, 546000, tzinfo=tzutc())}, 'qty': Decimal('905'), 'uid': '7c6af2828dfc4c258b9a5c617f5c8c56', 'price': Decimal('359.3999999999999772626324556767940521240234375')}, 'take': {'response': {'orderID': '0f03aafe-bf61-44b7-b606-3044f3241860', 'clOrdID': 'e0ae0a7090ce47cfb6c718811952656c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': 344.95, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 28, 10, 1, 28, 584000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 28, 10, 1, 28, 584000, tzinfo=tzutc())}, 'qty': Decimal('905'), 'uid': 'e0ae0a7090ce47cfb6c718811952656c', 'price': Decimal('344.95000000000027284841053187847137451171875')}} 2020-09-28 13:01:28 INFO: rm init order from db 46aeff0500d04a57adfbea5e10adb99e 2020-09-28 13:01:28 INFO: end process event_processing_result='proceed init order' 2020-09-28 13:01:28 INFO: 2020-09-28 13:01:28 INFO: 2020-09-28 13:01:28 INFO: 2020-09-28 13:01:28 INFO: 2020-09-28 13:02:00 INFO: 2020-09-28 13:02:00 INFO: 2020-09-28 13:02:00 INFO: 2020-09-28 13:02:00 INFO: 2020-09-28 13:02:00 INFO: clearing start 2020-09-28 13:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '74a3300a-a8bd-499b-934b-d5329d428724', 'clOrdID': '7c6af2828dfc4c258b9a5c617f5c8c56', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': None, 'displayQty': None, 'stopPx': 359.4, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 28, 10, 1, 28, 546000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 28, 10, 1, 28, 546000, tzinfo=tzutc())} 2020-09-28 13:02:00 INFO: skip by not found init order into storage 2020-09-28 13:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '0f03aafe-bf61-44b7-b606-3044f3241860', 'clOrdID': 'e0ae0a7090ce47cfb6c718811952656c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': 344.95, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 28, 10, 1, 28, 584000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 28, 10, 1, 28, 584000, tzinfo=tzutc())} 2020-09-28 13:02:00 INFO: skip by not found init order into storage 2020-09-28 13:02:00 INFO: clearing end 2020-09-28 13:02:00 INFO: 2020-09-28 13:02:00 INFO: 2020-09-28 13:02:00 INFO: 2020-09-28 13:02:00 INFO: 2020-09-28 13:53:03 INFO: process event {'orderID': '74a3300a-a8bd-499b-934b-d5329d428724', 'price': 359.4, 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 905, 'avgPx': 359.4, 'text': 'Triggered: Order stop price reached\nStop order by trader.py', 'transactTime': '2020-09-28T10:53:03.483Z', 'timestamp': '2020-09-28T10:53:03.483Z', 'clOrdID': '7c6af2828dfc4c258b9a5c617f5c8c56', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-28 13:53:03 INFO: add new event={'uid': '7c6af2828dfc4c258b9a5c617f5c8c56', 'status': 'Filled'} 2020-09-28 13:53:04 INFO: 2020-09-28 13:53:04 INFO: 2020-09-28 13:53:04 INFO: 2020-09-28 13:53:04 INFO: 2020-09-28 13:53:04 INFO: process event start 2020-09-28 13:53:04 INFO: fetch new order event 7c6af2828dfc4c258b9a5c617f5c8c56 2020-09-28 13:53:04 INFO: fetch orders by event init=None profit_pair=e0ae0a7090ce47cfb6c718811952656c 2020-09-28 13:53:04 INFO: process profit order filled 2020-09-28 13:53:04 INFO: process event {'orderID': '0f03aafe-bf61-44b7-b606-3044f3241860', 'ordStatus': 'Canceled', 'workingIndicator': False, 'leavesQty': 0, 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'timestamp': '2020-09-28T10:53:04.486Z', 'clOrdID': 'e0ae0a7090ce47cfb6c718811952656c', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-28 13:53:04 INFO: skip event e0ae0a7090ce47cfb6c718811952656c Canceled 2020-09-28 13:53:04 INFO: cancel order=e0ae0a7090ce47cfb6c718811952656c [{'orderID': '0f03aafe-bf61-44b7-b606-3044f3241860', 'clOrdID': 'e0ae0a7090ce47cfb6c718811952656c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': 344.95, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'Canceled', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 0, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 28, 10, 1, 28, 584000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 28, 10, 53, 4, 486000, tzinfo=tzutc())}] 2020-09-28 13:53:04 INFO: end process event_processing_result='proceed profit order' 2020-09-28 13:53:04 INFO: 2020-09-28 13:53:04 INFO: 2020-09-28 13:53:04 INFO: 2020-09-28 13:53:04 INFO: 2020-09-28 14:00:20 INFO: 2020-09-28 14:00:20 INFO: 2020-09-28 14:00:20 INFO: 2020-09-28 14:00:20 INFO: 2020-09-28 14:00:20 INFO: init new order start 2020-09-28 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 28, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.8, 'high': 359.75, 'low': 356.85, 'close': 359.6, 'trades': 2609, 'volume': 1957363, 'vwap': 358.71, 'lastSize': 1281, 'turnover': 70211209235, 'homeNotional': 21283.862657562127, 'foreignNotional': 7634606.866985164}, {'timestamp': datetime.datetime(2020, 9, 28, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.85, 'high': 359.4, 'low': 357.35, 'close': 357.8, 'trades': 1964, 'volume': 1800934, 'vwap': 357.99, 'lastSize': 13, 'turnover': 64471135060, 'homeNotional': 19554.706075156406, 'foreignNotional': 7000341.695261121}, {'timestamp': datetime.datetime(2020, 9, 28, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.55, 'high': 360.0, 'low': 356.5, 'close': 357.85, 'trades': 3506, 'volume': 2478501, 'vwap': 358.5, 'lastSize': 500, 'turnover': 88853820330, 'homeNotional': 26950.503952809064, 'foreignNotional': 9661733.340518236}] 2020-09-28 14:00:20 INFO: prepare candles [CandleItem(low=356.85, high=359.75, open=357.8, close=359.6, color='GREEN'), CandleItem(low=357.35, high=359.4, open=357.85, close=357.8, color='RED'), CandleItem(low=356.5, high=360.0, open=357.55, close=357.85, color='GREEN')] 2020-09-28 14:00:20 INFO: skip by colors first_candle=CandleItem(low=356.5, high=360.0, open=357.55, close=357.85, color='GREEN') second_candle=CandleItem(low=357.35, high=359.4, open=357.85, close=357.8, color='RED') last_candle=CandleItem(low=356.85, high=359.75, open=357.8, close=359.6, color='GREEN') 2020-09-28 14:00:20 INFO: check need new order None 2020-09-28 14:00:20 INFO: init new order end 2020-09-28 14:00:20 INFO: 2020-09-28 14:00:20 INFO: 2020-09-28 14:00:20 INFO: 2020-09-28 14:00:20 INFO: 2020-09-28 14:02:00 INFO: 2020-09-28 14:02:00 INFO: 2020-09-28 14:02:00 INFO: 2020-09-28 14:02:00 INFO: 2020-09-28 14:02:00 INFO: clearing start 2020-09-28 14:02:00 INFO: clearing end 2020-09-28 14:02:00 INFO: 2020-09-28 14:02:00 INFO: 2020-09-28 14:02:00 INFO: 2020-09-28 14:02:00 INFO: 2020-09-28 15:00:20 INFO: 2020-09-28 15:00:20 INFO: 2020-09-28 15:00:20 INFO: 2020-09-28 15:00:20 INFO: 2020-09-28 15:00:20 INFO: init new order start 2020-09-28 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 28, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 359.6, 'high': 360.45, 'low': 356.75, 'close': 358.0, 'trades': 3596, 'volume': 2764872, 'vwap': 358.32, 'lastSize': 5, 'turnover': 99068665530, 'homeNotional': 30074.887661050947, 'foreignNotional': 10776228.508600311}, {'timestamp': datetime.datetime(2020, 9, 28, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.8, 'high': 359.75, 'low': 356.85, 'close': 359.6, 'trades': 2609, 'volume': 1957363, 'vwap': 358.71, 'lastSize': 1281, 'turnover': 70211209235, 'homeNotional': 21283.862657562127, 'foreignNotional': 7634606.866985164}, {'timestamp': datetime.datetime(2020, 9, 28, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.85, 'high': 359.4, 'low': 357.35, 'close': 357.8, 'trades': 1964, 'volume': 1800934, 'vwap': 357.99, 'lastSize': 13, 'turnover': 64471135060, 'homeNotional': 19554.706075156406, 'foreignNotional': 7000341.695261121}] 2020-09-28 15:00:20 INFO: prepare candles [CandleItem(low=356.75, high=360.45, open=359.6, close=358.0, color='RED'), CandleItem(low=356.85, high=359.75, open=357.8, close=359.6, color='GREEN'), CandleItem(low=357.35, high=359.4, open=357.85, close=357.8, color='RED')] 2020-09-28 15:00:20 INFO: skip by colors first_candle=CandleItem(low=357.35, high=359.4, open=357.85, close=357.8, color='RED') second_candle=CandleItem(low=356.85, high=359.75, open=357.8, close=359.6, color='GREEN') last_candle=CandleItem(low=356.75, high=360.45, open=359.6, close=358.0, color='RED') 2020-09-28 15:00:20 INFO: check need new order None 2020-09-28 15:00:20 INFO: init new order end 2020-09-28 15:00:20 INFO: 2020-09-28 15:00:20 INFO: 2020-09-28 15:00:20 INFO: 2020-09-28 15:00:20 INFO: 2020-09-28 15:02:00 INFO: 2020-09-28 15:02:00 INFO: 2020-09-28 15:02:00 INFO: 2020-09-28 15:02:00 INFO: 2020-09-28 15:02:00 INFO: clearing start 2020-09-28 15:02:00 INFO: clearing end 2020-09-28 15:02:00 INFO: 2020-09-28 15:02:00 INFO: 2020-09-28 15:02:00 INFO: 2020-09-28 15:02:00 INFO: 2020-09-28 16:00:20 INFO: 2020-09-28 16:00:20 INFO: 2020-09-28 16:00:20 INFO: 2020-09-28 16:00:20 INFO: 2020-09-28 16:00:20 INFO: init new order start 2020-09-28 16:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 28, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 358.0, 'high': 368.0, 'low': 357.2, 'close': 364.7, 'trades': 13490, 'volume': 9876299, 'vwap': 363.81, 'lastSize': 11, 'turnover': 359308239745, 'homeNotional': 107780.8776098663, 'foreignNotional': 39211983.193522885}, {'timestamp': datetime.datetime(2020, 9, 28, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 359.6, 'high': 360.45, 'low': 356.75, 'close': 358.0, 'trades': 3596, 'volume': 2764872, 'vwap': 358.32, 'lastSize': 5, 'turnover': 99068665530, 'homeNotional': 30074.887661050947, 'foreignNotional': 10776228.508600311}, {'timestamp': datetime.datetime(2020, 9, 28, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.8, 'high': 359.75, 'low': 356.85, 'close': 359.6, 'trades': 2609, 'volume': 1957363, 'vwap': 358.71, 'lastSize': 1281, 'turnover': 70211209235, 'homeNotional': 21283.862657562127, 'foreignNotional': 7634606.866985164}] 2020-09-28 16:00:21 INFO: prepare candles [CandleItem(low=357.2, high=368.0, open=358.0, close=364.7, color='GREEN'), CandleItem(low=356.75, high=360.45, open=359.6, close=358.0, color='RED'), CandleItem(low=356.85, high=359.75, open=357.8, close=359.6, color='GREEN')] 2020-09-28 16:00:21 INFO: skip by colors first_candle=CandleItem(low=356.85, high=359.75, open=357.8, close=359.6, color='GREEN') second_candle=CandleItem(low=356.75, high=360.45, open=359.6, close=358.0, color='RED') last_candle=CandleItem(low=357.2, high=368.0, open=358.0, close=364.7, color='GREEN') 2020-09-28 16:00:21 INFO: check need new order None 2020-09-28 16:00:21 INFO: init new order end 2020-09-28 16:00:21 INFO: 2020-09-28 16:00:21 INFO: 2020-09-28 16:00:21 INFO: 2020-09-28 16:00:21 INFO: 2020-09-28 16:02:00 INFO: 2020-09-28 16:02:00 INFO: 2020-09-28 16:02:00 INFO: 2020-09-28 16:02:00 INFO: 2020-09-28 16:02:00 INFO: clearing start 2020-09-28 16:02:00 INFO: clearing end 2020-09-28 16:02:00 INFO: 2020-09-28 16:02:00 INFO: 2020-09-28 16:02:00 INFO: 2020-09-28 16:02:00 INFO: 2020-09-28 17:00:20 INFO: 2020-09-28 17:00:20 INFO: 2020-09-28 17:00:20 INFO: 2020-09-28 17:00:20 INFO: 2020-09-28 17:00:20 INFO: init new order start 2020-09-28 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 28, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.7, 'high': 365.85, 'low': 363.05, 'close': 363.45, 'trades': 4484, 'volume': 3120449, 'vwap': 364.47, 'lastSize': 150, 'turnover': 113727963800, 'homeNotional': 34052.99663409495, 'foreignNotional': 12410993.982671281}, {'timestamp': datetime.datetime(2020, 9, 28, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 358.0, 'high': 368.0, 'low': 357.2, 'close': 364.7, 'trades': 13490, 'volume': 9876299, 'vwap': 363.81, 'lastSize': 11, 'turnover': 359308239745, 'homeNotional': 107780.8776098663, 'foreignNotional': 39211983.193522885}, {'timestamp': datetime.datetime(2020, 9, 28, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 359.6, 'high': 360.45, 'low': 356.75, 'close': 358.0, 'trades': 3596, 'volume': 2764872, 'vwap': 358.32, 'lastSize': 5, 'turnover': 99068665530, 'homeNotional': 30074.887661050947, 'foreignNotional': 10776228.508600311}] 2020-09-28 17:00:20 INFO: prepare candles [CandleItem(low=363.05, high=365.85, open=364.7, close=363.45, color='RED'), CandleItem(low=357.2, high=368.0, open=358.0, close=364.7, color='GREEN'), CandleItem(low=356.75, high=360.45, open=359.6, close=358.0, color='RED')] 2020-09-28 17:00:20 INFO: skip by colors first_candle=CandleItem(low=356.75, high=360.45, open=359.6, close=358.0, color='RED') second_candle=CandleItem(low=357.2, high=368.0, open=358.0, close=364.7, color='GREEN') last_candle=CandleItem(low=363.05, high=365.85, open=364.7, close=363.45, color='RED') 2020-09-28 17:00:20 INFO: check need new order None 2020-09-28 17:00:20 INFO: init new order end 2020-09-28 17:00:20 INFO: 2020-09-28 17:00:20 INFO: 2020-09-28 17:00:20 INFO: 2020-09-28 17:00:20 INFO: 2020-09-28 17:02:00 INFO: 2020-09-28 17:02:00 INFO: 2020-09-28 17:02:00 INFO: 2020-09-28 17:02:00 INFO: 2020-09-28 17:02:00 INFO: clearing start 2020-09-28 17:02:00 INFO: clearing end 2020-09-28 17:02:00 INFO: 2020-09-28 17:02:00 INFO: 2020-09-28 17:02:00 INFO: 2020-09-28 17:02:00 INFO: 2020-09-28 18:00:20 INFO: 2020-09-28 18:00:20 INFO: 2020-09-28 18:00:20 INFO: 2020-09-28 18:00:20 INFO: 2020-09-28 18:00:20 INFO: init new order start 2020-09-28 18:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 28, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.45, 'high': 364.9, 'low': 362.85, 'close': 362.85, 'trades': 2109, 'volume': 1832582, 'vwap': 363.61, 'lastSize': 380, 'turnover': 66633009020, 'homeNotional': 19962.59160393928, 'foreignNotional': 7258448.85008214}, {'timestamp': datetime.datetime(2020, 9, 28, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.7, 'high': 365.85, 'low': 363.05, 'close': 363.45, 'trades': 4484, 'volume': 3120449, 'vwap': 364.47, 'lastSize': 150, 'turnover': 113727963800, 'homeNotional': 34052.99663409495, 'foreignNotional': 12410993.982671281}, {'timestamp': datetime.datetime(2020, 9, 28, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 358.0, 'high': 368.0, 'low': 357.2, 'close': 364.7, 'trades': 13490, 'volume': 9876299, 'vwap': 363.81, 'lastSize': 11, 'turnover': 359308239745, 'homeNotional': 107780.8776098663, 'foreignNotional': 39211983.193522885}] 2020-09-28 18:00:20 INFO: prepare candles [CandleItem(low=362.85, high=364.9, open=363.45, close=362.85, color='RED'), CandleItem(low=363.05, high=365.85, open=364.7, close=363.45, color='RED'), CandleItem(low=357.2, high=368.0, open=358.0, close=364.7, color='GREEN')] 2020-09-28 18:00:20 INFO: skip by colors first_candle=CandleItem(low=357.2, high=368.0, open=358.0, close=364.7, color='GREEN') second_candle=CandleItem(low=363.05, high=365.85, open=364.7, close=363.45, color='RED') last_candle=CandleItem(low=362.85, high=364.9, open=363.45, close=362.85, color='RED') 2020-09-28 18:00:20 INFO: check need new order None 2020-09-28 18:00:20 INFO: init new order end 2020-09-28 18:00:20 INFO: 2020-09-28 18:00:20 INFO: 2020-09-28 18:00:20 INFO: 2020-09-28 18:00:20 INFO: 2020-09-28 18:02:00 INFO: 2020-09-28 18:02:00 INFO: 2020-09-28 18:02:00 INFO: 2020-09-28 18:02:00 INFO: 2020-09-28 18:02:00 INFO: clearing start 2020-09-28 18:02:00 INFO: clearing end 2020-09-28 18:02:00 INFO: 2020-09-28 18:02:00 INFO: 2020-09-28 18:02:00 INFO: 2020-09-28 18:02:00 INFO: 2020-09-28 19:00:20 INFO: 2020-09-28 19:00:20 INFO: 2020-09-28 19:00:20 INFO: 2020-09-28 19:00:20 INFO: 2020-09-28 19:00:20 INFO: init new order start 2020-09-28 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 28, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 362.85, 'high': 365.4, 'low': 362.45, 'close': 365.4, 'trades': 2684, 'volume': 2072655, 'vwap': 364.08, 'lastSize': 23432, 'turnover': 75460493375, 'homeNotional': 22566.623800210255, 'foreignNotional': 8216012.645801651}, {'timestamp': datetime.datetime(2020, 9, 28, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.45, 'high': 364.9, 'low': 362.85, 'close': 362.85, 'trades': 2109, 'volume': 1832582, 'vwap': 363.61, 'lastSize': 380, 'turnover': 66633009020, 'homeNotional': 19962.59160393928, 'foreignNotional': 7258448.85008214}, {'timestamp': datetime.datetime(2020, 9, 28, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.7, 'high': 365.85, 'low': 363.05, 'close': 363.45, 'trades': 4484, 'volume': 3120449, 'vwap': 364.47, 'lastSize': 150, 'turnover': 113727963800, 'homeNotional': 34052.99663409495, 'foreignNotional': 12410993.982671281}] 2020-09-28 19:00:20 INFO: prepare candles [CandleItem(low=362.45, high=365.4, open=362.85, close=365.4, color='GREEN'), CandleItem(low=362.85, high=364.9, open=363.45, close=362.85, color='RED'), CandleItem(low=363.05, high=365.85, open=364.7, close=363.45, color='RED')] 2020-09-28 19:00:20 INFO: last_candle=CandleItem(low=362.45, high=365.4, open=362.85, close=365.4, color='GREEN') 2020-09-28 19:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-09-28 19:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=362.45, high=365.4, open=362.85, close=365.4, color='GREEN') 2020-09-28 19:00:20 INFO: skip by CandleItem(low=362.45, high=365.4, open=362.85, close=365.4, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-28 19:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-09-28 19:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=362.45, high=365.4, open=362.85, close=365.4, color='GREEN') 2020-09-28 19:00:20 INFO: skip by CandleItem(low=362.45, high=365.4, open=362.85, close=365.4, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-28 19:00:20 INFO: not found applicable config for candle 2020-09-28 19:00:20 INFO: check need new order None 2020-09-28 19:00:20 INFO: init new order end 2020-09-28 19:00:20 INFO: 2020-09-28 19:00:20 INFO: 2020-09-28 19:00:20 INFO: 2020-09-28 19:00:20 INFO: 2020-09-28 19:02:00 INFO: 2020-09-28 19:02:00 INFO: 2020-09-28 19:02:00 INFO: 2020-09-28 19:02:00 INFO: 2020-09-28 19:02:00 INFO: clearing start 2020-09-28 19:02:00 INFO: clearing end 2020-09-28 19:02:00 INFO: 2020-09-28 19:02:00 INFO: 2020-09-28 19:02:00 INFO: 2020-09-28 19:02:00 INFO: 2020-09-28 20:00:20 INFO: 2020-09-28 20:00:20 INFO: 2020-09-28 20:00:20 INFO: 2020-09-28 20:00:20 INFO: 2020-09-28 20:00:20 INFO: init new order start 2020-09-28 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 28, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.4, 'high': 366.0, 'low': 363.95, 'close': 365.0, 'trades': 3126, 'volume': 2569461, 'vwap': 364.94, 'lastSize': 50, 'turnover': 93768175370, 'homeNotional': 27983.977046200576, 'foreignNotional': 10212291.856542809}, {'timestamp': datetime.datetime(2020, 9, 28, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 362.85, 'high': 365.4, 'low': 362.45, 'close': 365.4, 'trades': 2684, 'volume': 2072655, 'vwap': 364.08, 'lastSize': 23432, 'turnover': 75460493375, 'homeNotional': 22566.623800210255, 'foreignNotional': 8216012.645801651}, {'timestamp': datetime.datetime(2020, 9, 28, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.45, 'high': 364.9, 'low': 362.85, 'close': 362.85, 'trades': 2109, 'volume': 1832582, 'vwap': 363.61, 'lastSize': 380, 'turnover': 66633009020, 'homeNotional': 19962.59160393928, 'foreignNotional': 7258448.85008214}] 2020-09-28 20:00:20 INFO: prepare candles [CandleItem(low=363.95, high=366.0, open=365.4, close=365.0, color='RED'), CandleItem(low=362.45, high=365.4, open=362.85, close=365.4, color='GREEN'), CandleItem(low=362.85, high=364.9, open=363.45, close=362.85, color='RED')] 2020-09-28 20:00:20 INFO: skip by colors first_candle=CandleItem(low=362.85, high=364.9, open=363.45, close=362.85, color='RED') second_candle=CandleItem(low=362.45, high=365.4, open=362.85, close=365.4, color='GREEN') last_candle=CandleItem(low=363.95, high=366.0, open=365.4, close=365.0, color='RED') 2020-09-28 20:00:20 INFO: check need new order None 2020-09-28 20:00:20 INFO: init new order end 2020-09-28 20:00:20 INFO: 2020-09-28 20:00:20 INFO: 2020-09-28 20:00:20 INFO: 2020-09-28 20:00:20 INFO: 2020-09-28 20:02:00 INFO: 2020-09-28 20:02:00 INFO: 2020-09-28 20:02:00 INFO: 2020-09-28 20:02:00 INFO: 2020-09-28 20:02:00 INFO: clearing start 2020-09-28 20:02:00 INFO: clearing end 2020-09-28 20:02:00 INFO: 2020-09-28 20:02:00 INFO: 2020-09-28 20:02:00 INFO: 2020-09-28 20:02:00 INFO: 2020-09-28 21:00:20 INFO: 2020-09-28 21:00:20 INFO: 2020-09-28 21:00:20 INFO: 2020-09-28 21:00:20 INFO: 2020-09-28 21:00:20 INFO: init new order start 2020-09-28 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 28, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.0, 'high': 368.9, 'low': 363.8, 'close': 365.45, 'trades': 3492, 'volume': 3255414, 'vwap': 365.79, 'lastSize': 332, 'turnover': 119078834830, 'homeNotional': 35482.23188280168, 'foreignNotional': 12978980.297279451}, {'timestamp': datetime.datetime(2020, 9, 28, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.4, 'high': 366.0, 'low': 363.95, 'close': 365.0, 'trades': 3126, 'volume': 2569461, 'vwap': 364.94, 'lastSize': 50, 'turnover': 93768175370, 'homeNotional': 27983.977046200576, 'foreignNotional': 10212291.856542809}, {'timestamp': datetime.datetime(2020, 9, 28, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 362.85, 'high': 365.4, 'low': 362.45, 'close': 365.4, 'trades': 2684, 'volume': 2072655, 'vwap': 364.08, 'lastSize': 23432, 'turnover': 75460493375, 'homeNotional': 22566.623800210255, 'foreignNotional': 8216012.645801651}] 2020-09-28 21:00:20 INFO: prepare candles [CandleItem(low=363.8, high=368.9, open=365.0, close=365.45, color='GREEN'), CandleItem(low=363.95, high=366.0, open=365.4, close=365.0, color='RED'), CandleItem(low=362.45, high=365.4, open=362.85, close=365.4, color='GREEN')] 2020-09-28 21:00:20 INFO: skip by colors first_candle=CandleItem(low=362.45, high=365.4, open=362.85, close=365.4, color='GREEN') second_candle=CandleItem(low=363.95, high=366.0, open=365.4, close=365.0, color='RED') last_candle=CandleItem(low=363.8, high=368.9, open=365.0, close=365.45, color='GREEN') 2020-09-28 21:00:20 INFO: check need new order None 2020-09-28 21:00:20 INFO: init new order end 2020-09-28 21:00:20 INFO: 2020-09-28 21:00:20 INFO: 2020-09-28 21:00:20 INFO: 2020-09-28 21:00:20 INFO: 2020-09-28 21:02:00 INFO: 2020-09-28 21:02:00 INFO: 2020-09-28 21:02:00 INFO: 2020-09-28 21:02:00 INFO: 2020-09-28 21:02:00 INFO: clearing start 2020-09-28 21:02:00 INFO: clearing end 2020-09-28 21:02:00 INFO: 2020-09-28 21:02:00 INFO: 2020-09-28 21:02:00 INFO: 2020-09-28 21:02:00 INFO: 2020-09-28 22:00:20 INFO: 2020-09-28 22:00:20 INFO: 2020-09-28 22:00:20 INFO: 2020-09-28 22:00:20 INFO: 2020-09-28 22:00:20 INFO: init new order start 2020-09-28 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 28, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.45, 'high': 365.5, 'low': 363.05, 'close': 363.3, 'trades': 2725, 'volume': 1963074, 'vwap': 363.75, 'lastSize': 13, 'turnover': 71404890145, 'homeNotional': 21340.282153130724, 'foreignNotional': 7762322.0307238875}, {'timestamp': datetime.datetime(2020, 9, 28, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.0, 'high': 368.9, 'low': 363.8, 'close': 365.45, 'trades': 3492, 'volume': 3255414, 'vwap': 365.79, 'lastSize': 332, 'turnover': 119078834830, 'homeNotional': 35482.23188280168, 'foreignNotional': 12978980.297279451}, {'timestamp': datetime.datetime(2020, 9, 28, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.4, 'high': 366.0, 'low': 363.95, 'close': 365.0, 'trades': 3126, 'volume': 2569461, 'vwap': 364.94, 'lastSize': 50, 'turnover': 93768175370, 'homeNotional': 27983.977046200576, 'foreignNotional': 10212291.856542809}] 2020-09-28 22:00:20 INFO: prepare candles [CandleItem(low=363.05, high=365.5, open=365.45, close=363.3, color='RED'), CandleItem(low=363.8, high=368.9, open=365.0, close=365.45, color='GREEN'), CandleItem(low=363.95, high=366.0, open=365.4, close=365.0, color='RED')] 2020-09-28 22:00:20 INFO: skip by colors first_candle=CandleItem(low=363.95, high=366.0, open=365.4, close=365.0, color='RED') second_candle=CandleItem(low=363.8, high=368.9, open=365.0, close=365.45, color='GREEN') last_candle=CandleItem(low=363.05, high=365.5, open=365.45, close=363.3, color='RED') 2020-09-28 22:00:20 INFO: check need new order None 2020-09-28 22:00:20 INFO: init new order end 2020-09-28 22:00:20 INFO: 2020-09-28 22:00:20 INFO: 2020-09-28 22:00:20 INFO: 2020-09-28 22:00:20 INFO: 2020-09-28 22:02:00 INFO: 2020-09-28 22:02:00 INFO: 2020-09-28 22:02:00 INFO: 2020-09-28 22:02:00 INFO: 2020-09-28 22:02:00 INFO: clearing start 2020-09-28 22:02:00 INFO: clearing end 2020-09-28 22:02:00 INFO: 2020-09-28 22:02:00 INFO: 2020-09-28 22:02:00 INFO: 2020-09-28 22:02:00 INFO: 2020-09-28 23:00:20 INFO: 2020-09-28 23:00:20 INFO: 2020-09-28 23:00:20 INFO: 2020-09-28 23:00:20 INFO: 2020-09-28 23:00:20 INFO: init new order start 2020-09-28 23:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 28, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.3, 'high': 363.7, 'low': 361.1, 'close': 363.2, 'trades': 2807, 'volume': 2302226, 'vwap': 362.48, 'lastSize': 13, 'turnover': 83449565025, 'homeNotional': 24979.11966803107, 'foreignNotional': 9054276.199697249}, {'timestamp': datetime.datetime(2020, 9, 28, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.45, 'high': 365.5, 'low': 363.05, 'close': 363.3, 'trades': 2725, 'volume': 1963074, 'vwap': 363.75, 'lastSize': 13, 'turnover': 71404890145, 'homeNotional': 21340.282153130724, 'foreignNotional': 7762322.0307238875}, {'timestamp': datetime.datetime(2020, 9, 28, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.0, 'high': 368.9, 'low': 363.8, 'close': 365.45, 'trades': 3492, 'volume': 3255414, 'vwap': 365.79, 'lastSize': 332, 'turnover': 119078834830, 'homeNotional': 35482.23188280168, 'foreignNotional': 12978980.297279451}] 2020-09-28 23:00:20 INFO: prepare candles [CandleItem(low=361.1, high=363.7, open=363.3, close=363.2, color='RED'), CandleItem(low=363.05, high=365.5, open=365.45, close=363.3, color='RED'), CandleItem(low=363.8, high=368.9, open=365.0, close=365.45, color='GREEN')] 2020-09-28 23:00:20 INFO: skip by colors first_candle=CandleItem(low=363.8, high=368.9, open=365.0, close=365.45, color='GREEN') second_candle=CandleItem(low=363.05, high=365.5, open=365.45, close=363.3, color='RED') last_candle=CandleItem(low=361.1, high=363.7, open=363.3, close=363.2, color='RED') 2020-09-28 23:00:20 INFO: check need new order None 2020-09-28 23:00:20 INFO: init new order end 2020-09-28 23:00:20 INFO: 2020-09-28 23:00:20 INFO: 2020-09-28 23:00:20 INFO: 2020-09-28 23:00:20 INFO: 2020-09-28 23:02:00 INFO: 2020-09-28 23:02:00 INFO: 2020-09-28 23:02:00 INFO: 2020-09-28 23:02:00 INFO: 2020-09-28 23:02:00 INFO: clearing start 2020-09-28 23:02:00 INFO: clearing end 2020-09-28 23:02:00 INFO: 2020-09-28 23:02:00 INFO: 2020-09-28 23:02:00 INFO: 2020-09-28 23:02:00 INFO: 2020-09-29 00:00:20 INFO: 2020-09-29 00:00:20 INFO: 2020-09-29 00:00:20 INFO: 2020-09-29 00:00:20 INFO: 2020-09-29 00:00:20 INFO: init new order start 2020-09-29 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 28, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.2, 'high': 363.25, 'low': 362.25, 'close': 362.7, 'trades': 1873, 'volume': 1184918, 'vwap': 362.83, 'lastSize': 12, 'turnover': 42991576935, 'homeNotional': 12878.179693176924, 'foreignNotional': 4672502.920167739}, {'timestamp': datetime.datetime(2020, 9, 28, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.3, 'high': 363.7, 'low': 361.1, 'close': 363.2, 'trades': 2807, 'volume': 2302226, 'vwap': 362.48, 'lastSize': 13, 'turnover': 83449565025, 'homeNotional': 24979.11966803107, 'foreignNotional': 9054276.199697249}, {'timestamp': datetime.datetime(2020, 9, 28, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.45, 'high': 365.5, 'low': 363.05, 'close': 363.3, 'trades': 2725, 'volume': 1963074, 'vwap': 363.75, 'lastSize': 13, 'turnover': 71404890145, 'homeNotional': 21340.282153130724, 'foreignNotional': 7762322.0307238875}] 2020-09-29 00:00:20 INFO: prepare candles [CandleItem(low=362.25, high=363.25, open=363.2, close=362.7, color='RED'), CandleItem(low=361.1, high=363.7, open=363.3, close=363.2, color='RED'), CandleItem(low=363.05, high=365.5, open=365.45, close=363.3, color='RED')] 2020-09-29 00:00:20 INFO: skip by colors first_candle=CandleItem(low=363.05, high=365.5, open=365.45, close=363.3, color='RED') second_candle=CandleItem(low=361.1, high=363.7, open=363.3, close=363.2, color='RED') last_candle=CandleItem(low=362.25, high=363.25, open=363.2, close=362.7, color='RED') 2020-09-29 00:00:20 INFO: check need new order None 2020-09-29 00:00:20 INFO: init new order end 2020-09-29 00:00:20 INFO: 2020-09-29 00:00:20 INFO: 2020-09-29 00:00:20 INFO: 2020-09-29 00:00:20 INFO: 2020-09-29 00:02:00 INFO: 2020-09-29 00:02:00 INFO: 2020-09-29 00:02:00 INFO: 2020-09-29 00:02:00 INFO: 2020-09-29 00:02:00 INFO: clearing start 2020-09-29 00:02:01 INFO: clearing end 2020-09-29 00:02:01 INFO: 2020-09-29 00:02:01 INFO: 2020-09-29 00:02:01 INFO: 2020-09-29 00:02:01 INFO: 2020-09-29 01:00:20 INFO: 2020-09-29 01:00:20 INFO: 2020-09-29 01:00:20 INFO: 2020-09-29 01:00:20 INFO: 2020-09-29 01:00:20 INFO: init new order start 2020-09-29 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 28, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 362.7, 'high': 363.8, 'low': 361.5, 'close': 363.55, 'trades': 2123, 'volume': 1975346, 'vwap': 362.79, 'lastSize': 6225, 'turnover': 71663400990, 'homeNotional': 21471.345509120867, 'foreignNotional': 7789582.285097924}, {'timestamp': datetime.datetime(2020, 9, 28, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.2, 'high': 363.25, 'low': 362.25, 'close': 362.7, 'trades': 1873, 'volume': 1184918, 'vwap': 362.83, 'lastSize': 12, 'turnover': 42991576935, 'homeNotional': 12878.179693176924, 'foreignNotional': 4672502.920167739}, {'timestamp': datetime.datetime(2020, 9, 28, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.3, 'high': 363.7, 'low': 361.1, 'close': 363.2, 'trades': 2807, 'volume': 2302226, 'vwap': 362.48, 'lastSize': 13, 'turnover': 83449565025, 'homeNotional': 24979.11966803107, 'foreignNotional': 9054276.199697249}] 2020-09-29 01:00:20 INFO: prepare candles [CandleItem(low=361.5, high=363.8, open=362.7, close=363.55, color='GREEN'), CandleItem(low=362.25, high=363.25, open=363.2, close=362.7, color='RED'), CandleItem(low=361.1, high=363.7, open=363.3, close=363.2, color='RED')] 2020-09-29 01:00:20 INFO: last_candle=CandleItem(low=361.5, high=363.8, open=362.7, close=363.55, color='GREEN') 2020-09-29 01:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-09-29 01:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=361.5, high=363.8, open=362.7, close=363.55, color='GREEN') 2020-09-29 01:00:20 INFO: skip by CandleItem(low=361.5, high=363.8, open=362.7, close=363.55, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-29 01:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-09-29 01:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=361.5, high=363.8, open=362.7, close=363.55, color='GREEN') 2020-09-29 01:00:20 INFO: skip by CandleItem(low=361.5, high=363.8, open=362.7, close=363.55, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-29 01:00:20 INFO: not found applicable config for candle 2020-09-29 01:00:20 INFO: check need new order None 2020-09-29 01:00:20 INFO: init new order end 2020-09-29 01:00:20 INFO: 2020-09-29 01:00:20 INFO: 2020-09-29 01:00:20 INFO: 2020-09-29 01:00:20 INFO: 2020-09-29 01:02:00 INFO: 2020-09-29 01:02:00 INFO: 2020-09-29 01:02:00 INFO: 2020-09-29 01:02:00 INFO: 2020-09-29 01:02:00 INFO: clearing start 2020-09-29 01:02:00 INFO: clearing end 2020-09-29 01:02:00 INFO: 2020-09-29 01:02:00 INFO: 2020-09-29 01:02:00 INFO: 2020-09-29 01:02:00 INFO: 2020-09-29 02:00:20 INFO: 2020-09-29 02:00:20 INFO: 2020-09-29 02:00:20 INFO: 2020-09-29 02:00:20 INFO: 2020-09-29 02:00:20 INFO: init new order start 2020-09-29 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 28, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.55, 'high': 363.75, 'low': 360.65, 'close': 361.25, 'trades': 2401, 'volume': 2242875, 'vwap': 362.11, 'lastSize': 13, 'turnover': 81215008045, 'homeNotional': 24374.934106731747, 'foreignNotional': 8826236.572282411}, {'timestamp': datetime.datetime(2020, 9, 28, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 362.7, 'high': 363.8, 'low': 361.5, 'close': 363.55, 'trades': 2123, 'volume': 1975346, 'vwap': 362.79, 'lastSize': 6225, 'turnover': 71663400990, 'homeNotional': 21471.345509120867, 'foreignNotional': 7789582.285097924}, {'timestamp': datetime.datetime(2020, 9, 28, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.2, 'high': 363.25, 'low': 362.25, 'close': 362.7, 'trades': 1873, 'volume': 1184918, 'vwap': 362.83, 'lastSize': 12, 'turnover': 42991576935, 'homeNotional': 12878.179693176924, 'foreignNotional': 4672502.920167739}] 2020-09-29 02:00:20 INFO: prepare candles [CandleItem(low=360.65, high=363.75, open=363.55, close=361.25, color='RED'), CandleItem(low=361.5, high=363.8, open=362.7, close=363.55, color='GREEN'), CandleItem(low=362.25, high=363.25, open=363.2, close=362.7, color='RED')] 2020-09-29 02:00:20 INFO: skip by colors first_candle=CandleItem(low=362.25, high=363.25, open=363.2, close=362.7, color='RED') second_candle=CandleItem(low=361.5, high=363.8, open=362.7, close=363.55, color='GREEN') last_candle=CandleItem(low=360.65, high=363.75, open=363.55, close=361.25, color='RED') 2020-09-29 02:00:20 INFO: check need new order None 2020-09-29 02:00:20 INFO: init new order end 2020-09-29 02:00:20 INFO: 2020-09-29 02:00:20 INFO: 2020-09-29 02:00:20 INFO: 2020-09-29 02:00:20 INFO: 2020-09-29 02:02:00 INFO: 2020-09-29 02:02:00 INFO: 2020-09-29 02:02:00 INFO: 2020-09-29 02:02:00 INFO: 2020-09-29 02:02:00 INFO: clearing start 2020-09-29 02:02:00 INFO: clearing end 2020-09-29 02:02:00 INFO: 2020-09-29 02:02:00 INFO: 2020-09-29 02:02:00 INFO: 2020-09-29 02:02:00 INFO: 2020-09-29 03:00:20 INFO: 2020-09-29 03:00:20 INFO: 2020-09-29 03:00:20 INFO: 2020-09-29 03:00:20 INFO: 2020-09-29 03:00:20 INFO: init new order start 2020-09-29 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 29, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 361.25, 'high': 362.0, 'low': 351.4, 'close': 353.85, 'trades': 12666, 'volume': 9467248, 'vwap': 356.15, 'lastSize': 243, 'turnover': 337173204510, 'homeNotional': 101769.78098192671, 'foreignNotional': 36245914.5993748}, {'timestamp': datetime.datetime(2020, 9, 28, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.55, 'high': 363.75, 'low': 360.65, 'close': 361.25, 'trades': 2401, 'volume': 2242875, 'vwap': 362.11, 'lastSize': 13, 'turnover': 81215008045, 'homeNotional': 24374.934106731747, 'foreignNotional': 8826236.572282411}, {'timestamp': datetime.datetime(2020, 9, 28, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 362.7, 'high': 363.8, 'low': 361.5, 'close': 363.55, 'trades': 2123, 'volume': 1975346, 'vwap': 362.79, 'lastSize': 6225, 'turnover': 71663400990, 'homeNotional': 21471.345509120867, 'foreignNotional': 7789582.285097924}] 2020-09-29 03:00:20 INFO: prepare candles [CandleItem(low=351.4, high=362.0, open=361.25, close=353.85, color='RED'), CandleItem(low=360.65, high=363.75, open=363.55, close=361.25, color='RED'), CandleItem(low=361.5, high=363.8, open=362.7, close=363.55, color='GREEN')] 2020-09-29 03:00:20 INFO: skip by colors first_candle=CandleItem(low=361.5, high=363.8, open=362.7, close=363.55, color='GREEN') second_candle=CandleItem(low=360.65, high=363.75, open=363.55, close=361.25, color='RED') last_candle=CandleItem(low=351.4, high=362.0, open=361.25, close=353.85, color='RED') 2020-09-29 03:00:20 INFO: check need new order None 2020-09-29 03:00:20 INFO: init new order end 2020-09-29 03:00:20 INFO: 2020-09-29 03:00:20 INFO: 2020-09-29 03:00:20 INFO: 2020-09-29 03:00:20 INFO: 2020-09-29 03:02:00 INFO: 2020-09-29 03:02:00 INFO: 2020-09-29 03:02:00 INFO: 2020-09-29 03:02:00 INFO: 2020-09-29 03:02:00 INFO: clearing start 2020-09-29 03:02:00 INFO: clearing end 2020-09-29 03:02:00 INFO: 2020-09-29 03:02:00 INFO: 2020-09-29 03:02:00 INFO: 2020-09-29 03:02:00 INFO: 2020-09-29 04:00:20 INFO: 2020-09-29 04:00:20 INFO: 2020-09-29 04:00:20 INFO: 2020-09-29 04:00:20 INFO: 2020-09-29 04:00:20 INFO: init new order start 2020-09-29 04:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 29, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.85, 'high': 355.25, 'low': 351.5, 'close': 354.8, 'trades': 3587, 'volume': 2849724, 'vwap': 353.84, 'lastSize': 11, 'turnover': 100831931420, 'homeNotional': 30494.683149748387, 'foreignNotional': 10789994.291201515}, {'timestamp': datetime.datetime(2020, 9, 29, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 361.25, 'high': 362.0, 'low': 351.4, 'close': 353.85, 'trades': 12666, 'volume': 9467248, 'vwap': 356.15, 'lastSize': 243, 'turnover': 337173204510, 'homeNotional': 101769.78098192671, 'foreignNotional': 36245914.5993748}, {'timestamp': datetime.datetime(2020, 9, 28, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.55, 'high': 363.75, 'low': 360.65, 'close': 361.25, 'trades': 2401, 'volume': 2242875, 'vwap': 362.11, 'lastSize': 13, 'turnover': 81215008045, 'homeNotional': 24374.934106731747, 'foreignNotional': 8826236.572282411}] 2020-09-29 04:00:21 INFO: prepare candles [CandleItem(low=351.5, high=355.25, open=353.85, close=354.8, color='GREEN'), CandleItem(low=351.4, high=362.0, open=361.25, close=353.85, color='RED'), CandleItem(low=360.65, high=363.75, open=363.55, close=361.25, color='RED')] 2020-09-29 04:00:21 INFO: last_candle=CandleItem(low=351.5, high=355.25, open=353.85, close=354.8, color='GREEN') 2020-09-29 04:00:21 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-09-29 04:00:21 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=351.5, high=355.25, open=353.85, close=354.8, color='GREEN') 2020-09-29 04:00:21 INFO: skip by CandleItem(low=351.5, high=355.25, open=353.85, close=354.8, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-29 04:00:21 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-09-29 04:00:21 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=351.5, high=355.25, open=353.85, close=354.8, color='GREEN') 2020-09-29 04:00:21 INFO: skip by CandleItem(low=351.5, high=355.25, open=353.85, close=354.8, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-29 04:00:21 INFO: not found applicable config for candle 2020-09-29 04:00:21 INFO: check need new order None 2020-09-29 04:00:21 INFO: init new order end 2020-09-29 04:00:21 INFO: 2020-09-29 04:00:21 INFO: 2020-09-29 04:00:21 INFO: 2020-09-29 04:00:21 INFO: 2020-09-29 04:02:00 INFO: 2020-09-29 04:02:00 INFO: 2020-09-29 04:02:00 INFO: 2020-09-29 04:02:00 INFO: 2020-09-29 04:02:00 INFO: clearing start 2020-09-29 04:02:00 INFO: clearing end 2020-09-29 04:02:00 INFO: 2020-09-29 04:02:00 INFO: 2020-09-29 04:02:00 INFO: 2020-09-29 04:02:00 INFO: 2020-09-29 05:00:20 INFO: 2020-09-29 05:00:20 INFO: 2020-09-29 05:00:20 INFO: 2020-09-29 05:00:20 INFO: 2020-09-29 05:00:20 INFO: init new order start 2020-09-29 05:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 29, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.8, 'high': 355.35, 'low': 353.75, 'close': 353.8, 'trades': 2615, 'volume': 1558134, 'vwap': 354.4, 'lastSize': 320, 'turnover': 55219189295, 'homeNotional': 16659.344500255207, 'foreignNotional': 5903959.068935446}, {'timestamp': datetime.datetime(2020, 9, 29, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.85, 'high': 355.25, 'low': 351.5, 'close': 354.8, 'trades': 3587, 'volume': 2849724, 'vwap': 353.84, 'lastSize': 11, 'turnover': 100831931420, 'homeNotional': 30494.683149748387, 'foreignNotional': 10789994.291201515}, {'timestamp': datetime.datetime(2020, 9, 29, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 361.25, 'high': 362.0, 'low': 351.4, 'close': 353.85, 'trades': 12666, 'volume': 9467248, 'vwap': 356.15, 'lastSize': 243, 'turnover': 337173204510, 'homeNotional': 101769.78098192671, 'foreignNotional': 36245914.5993748}] 2020-09-29 05:00:20 INFO: prepare candles [CandleItem(low=353.75, high=355.35, open=354.8, close=353.8, color='RED'), CandleItem(low=351.5, high=355.25, open=353.85, close=354.8, color='GREEN'), CandleItem(low=351.4, high=362.0, open=361.25, close=353.85, color='RED')] 2020-09-29 05:00:20 INFO: skip by colors first_candle=CandleItem(low=351.4, high=362.0, open=361.25, close=353.85, color='RED') second_candle=CandleItem(low=351.5, high=355.25, open=353.85, close=354.8, color='GREEN') last_candle=CandleItem(low=353.75, high=355.35, open=354.8, close=353.8, color='RED') 2020-09-29 05:00:20 INFO: check need new order None 2020-09-29 05:00:20 INFO: init new order end 2020-09-29 05:00:20 INFO: 2020-09-29 05:00:20 INFO: 2020-09-29 05:00:20 INFO: 2020-09-29 05:00:20 INFO: 2020-09-29 05:02:00 INFO: 2020-09-29 05:02:00 INFO: 2020-09-29 05:02:00 INFO: 2020-09-29 05:02:00 INFO: 2020-09-29 05:02:00 INFO: clearing start 2020-09-29 05:02:00 INFO: clearing end 2020-09-29 05:02:00 INFO: 2020-09-29 05:02:00 INFO: 2020-09-29 05:02:00 INFO: 2020-09-29 05:02:00 INFO: 2020-09-29 06:00:20 INFO: 2020-09-29 06:00:20 INFO: 2020-09-29 06:00:20 INFO: 2020-09-29 06:00:20 INFO: 2020-09-29 06:00:20 INFO: init new order start 2020-09-29 06:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 29, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.8, 'high': 354.95, 'low': 353.2, 'close': 353.8, 'trades': 2132, 'volume': 1033521, 'vwap': 353.96, 'lastSize': 1759, 'turnover': 36582044960, 'homeNotional': 11038.454806557931, 'foreignNotional': 3907125.094383043}, {'timestamp': datetime.datetime(2020, 9, 29, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.8, 'high': 355.35, 'low': 353.75, 'close': 353.8, 'trades': 2615, 'volume': 1558134, 'vwap': 354.4, 'lastSize': 320, 'turnover': 55219189295, 'homeNotional': 16659.344500255207, 'foreignNotional': 5903959.068935446}, {'timestamp': datetime.datetime(2020, 9, 29, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.85, 'high': 355.25, 'low': 351.5, 'close': 354.8, 'trades': 3587, 'volume': 2849724, 'vwap': 353.84, 'lastSize': 11, 'turnover': 100831931420, 'homeNotional': 30494.683149748387, 'foreignNotional': 10789994.291201515}] 2020-09-29 06:00:21 INFO: skip by found empty buckets 2020-09-29 06:00:21 INFO: check need new order None 2020-09-29 06:00:21 INFO: init new order end 2020-09-29 06:00:21 INFO: 2020-09-29 06:00:21 INFO: 2020-09-29 06:00:21 INFO: 2020-09-29 06:00:21 INFO: 2020-09-29 06:02:00 INFO: 2020-09-29 06:02:00 INFO: 2020-09-29 06:02:00 INFO: 2020-09-29 06:02:00 INFO: 2020-09-29 06:02:00 INFO: clearing start 2020-09-29 06:02:00 INFO: clearing end 2020-09-29 06:02:00 INFO: 2020-09-29 06:02:00 INFO: 2020-09-29 06:02:00 INFO: 2020-09-29 06:02:00 INFO: 2020-09-29 07:00:20 INFO: 2020-09-29 07:00:20 INFO: 2020-09-29 07:00:20 INFO: 2020-09-29 07:00:20 INFO: 2020-09-29 07:00:20 INFO: init new order start 2020-09-29 07:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 29, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.8, 'high': 354.45, 'low': 352.7, 'close': 353.1, 'trades': 1865, 'volume': 1431019, 'vwap': 353.46, 'lastSize': 20, 'turnover': 50579794250, 'homeNotional': 15300.17652111974, 'foreignNotional': 5407894.636855071}, {'timestamp': datetime.datetime(2020, 9, 29, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.8, 'high': 354.95, 'low': 353.2, 'close': 353.8, 'trades': 2132, 'volume': 1033521, 'vwap': 353.96, 'lastSize': 1759, 'turnover': 36582044960, 'homeNotional': 11038.454806557931, 'foreignNotional': 3907125.094383043}, {'timestamp': datetime.datetime(2020, 9, 29, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.8, 'high': 355.35, 'low': 353.75, 'close': 353.8, 'trades': 2615, 'volume': 1558134, 'vwap': 354.4, 'lastSize': 320, 'turnover': 55219189295, 'homeNotional': 16659.344500255207, 'foreignNotional': 5903959.068935446}] 2020-09-29 07:00:20 INFO: skip by found empty buckets 2020-09-29 07:00:20 INFO: check need new order None 2020-09-29 07:00:20 INFO: init new order end 2020-09-29 07:00:20 INFO: 2020-09-29 07:00:20 INFO: 2020-09-29 07:00:20 INFO: 2020-09-29 07:00:20 INFO: 2020-09-29 07:02:00 INFO: 2020-09-29 07:02:00 INFO: 2020-09-29 07:02:00 INFO: 2020-09-29 07:02:00 INFO: 2020-09-29 07:02:00 INFO: clearing start 2020-09-29 07:02:00 INFO: clearing end 2020-09-29 07:02:00 INFO: 2020-09-29 07:02:00 INFO: 2020-09-29 07:02:00 INFO: 2020-09-29 07:02:00 INFO: 2020-09-29 08:00:20 INFO: 2020-09-29 08:00:20 INFO: 2020-09-29 08:00:20 INFO: 2020-09-29 08:00:20 INFO: 2020-09-29 08:00:20 INFO: init new order start 2020-09-29 08:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 29, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.1, 'high': 354.2, 'low': 352.7, 'close': 353.25, 'trades': 1706, 'volume': 1435484, 'vwap': 353.57, 'lastSize': 2, 'turnover': 50754017840, 'homeNotional': 15355.01680983296, 'foreignNotional': 5429034.355543354}, {'timestamp': datetime.datetime(2020, 9, 29, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.8, 'high': 354.45, 'low': 352.7, 'close': 353.1, 'trades': 1865, 'volume': 1431019, 'vwap': 353.46, 'lastSize': 20, 'turnover': 50579794250, 'homeNotional': 15300.17652111974, 'foreignNotional': 5407894.636855071}, {'timestamp': datetime.datetime(2020, 9, 29, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.8, 'high': 354.95, 'low': 353.2, 'close': 353.8, 'trades': 2132, 'volume': 1033521, 'vwap': 353.96, 'lastSize': 1759, 'turnover': 36582044960, 'homeNotional': 11038.454806557931, 'foreignNotional': 3907125.094383043}] 2020-09-29 08:00:21 INFO: skip by found empty buckets 2020-09-29 08:00:21 INFO: check need new order None 2020-09-29 08:00:21 INFO: init new order end 2020-09-29 08:00:21 INFO: 2020-09-29 08:00:21 INFO: 2020-09-29 08:00:21 INFO: 2020-09-29 08:00:21 INFO: 2020-09-29 08:02:00 INFO: 2020-09-29 08:02:00 INFO: 2020-09-29 08:02:00 INFO: 2020-09-29 08:02:00 INFO: 2020-09-29 08:02:00 INFO: clearing start 2020-09-29 08:02:00 INFO: clearing end 2020-09-29 08:02:00 INFO: 2020-09-29 08:02:00 INFO: 2020-09-29 08:02:00 INFO: 2020-09-29 08:02:00 INFO: 2020-09-29 09:00:20 INFO: 2020-09-29 09:00:20 INFO: 2020-09-29 09:00:20 INFO: 2020-09-29 09:00:20 INFO: 2020-09-29 09:00:20 INFO: init new order start 2020-09-29 09:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 29, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.25, 'high': 353.3, 'low': 351.3, 'close': 351.7, 'trades': 2997, 'volume': 1994540, 'vwap': 352.5, 'lastSize': 224, 'turnover': 70305826280, 'homeNotional': 21302.55043665459, 'foreignNotional': 7508972.5848126765}, {'timestamp': datetime.datetime(2020, 9, 29, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.1, 'high': 354.2, 'low': 352.7, 'close': 353.25, 'trades': 1706, 'volume': 1435484, 'vwap': 353.57, 'lastSize': 2, 'turnover': 50754017840, 'homeNotional': 15355.01680983296, 'foreignNotional': 5429034.355543354}, {'timestamp': datetime.datetime(2020, 9, 29, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.8, 'high': 354.45, 'low': 352.7, 'close': 353.1, 'trades': 1865, 'volume': 1431019, 'vwap': 353.46, 'lastSize': 20, 'turnover': 50579794250, 'homeNotional': 15300.17652111974, 'foreignNotional': 5407894.636855071}] 2020-09-29 09:00:20 INFO: prepare candles [CandleItem(low=351.3, high=353.3, open=353.25, close=351.7, color='RED'), CandleItem(low=352.7, high=354.2, open=353.1, close=353.25, color='GREEN'), CandleItem(low=352.7, high=354.45, open=353.8, close=353.1, color='RED')] 2020-09-29 09:00:20 INFO: skip by colors first_candle=CandleItem(low=352.7, high=354.45, open=353.8, close=353.1, color='RED') second_candle=CandleItem(low=352.7, high=354.2, open=353.1, close=353.25, color='GREEN') last_candle=CandleItem(low=351.3, high=353.3, open=353.25, close=351.7, color='RED') 2020-09-29 09:00:20 INFO: check need new order None 2020-09-29 09:00:20 INFO: init new order end 2020-09-29 09:00:20 INFO: 2020-09-29 09:00:20 INFO: 2020-09-29 09:00:20 INFO: 2020-09-29 09:00:20 INFO: 2020-09-29 09:02:00 INFO: 2020-09-29 09:02:00 INFO: 2020-09-29 09:02:00 INFO: 2020-09-29 09:02:00 INFO: 2020-09-29 09:02:00 INFO: clearing start 2020-09-29 09:02:00 INFO: clearing end 2020-09-29 09:02:00 INFO: 2020-09-29 09:02:00 INFO: 2020-09-29 09:02:00 INFO: 2020-09-29 09:02:00 INFO: 2020-09-29 10:00:20 INFO: 2020-09-29 10:00:20 INFO: 2020-09-29 10:00:20 INFO: 2020-09-29 10:00:20 INFO: 2020-09-29 10:00:20 INFO: init new order start 2020-09-29 10:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 29, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.7, 'high': 356.0, 'low': 349.8, 'close': 355.65, 'trades': 4344, 'volume': 3170240, 'vwap': 352.92, 'lastSize': 300, 'turnover': 111883235150, 'homeNotional': 33905.50860918107, 'foreignNotional': 11965979.01533528}, {'timestamp': datetime.datetime(2020, 9, 29, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.25, 'high': 353.3, 'low': 351.3, 'close': 351.7, 'trades': 2997, 'volume': 1994540, 'vwap': 352.5, 'lastSize': 224, 'turnover': 70305826280, 'homeNotional': 21302.55043665459, 'foreignNotional': 7508972.5848126765}, {'timestamp': datetime.datetime(2020, 9, 29, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.1, 'high': 354.2, 'low': 352.7, 'close': 353.25, 'trades': 1706, 'volume': 1435484, 'vwap': 353.57, 'lastSize': 2, 'turnover': 50754017840, 'homeNotional': 15355.01680983296, 'foreignNotional': 5429034.355543354}] 2020-09-29 10:00:21 INFO: prepare candles [CandleItem(low=349.8, high=356.0, open=351.7, close=355.65, color='GREEN'), CandleItem(low=351.3, high=353.3, open=353.25, close=351.7, color='RED'), CandleItem(low=352.7, high=354.2, open=353.1, close=353.25, color='GREEN')] 2020-09-29 10:00:21 INFO: skip by colors first_candle=CandleItem(low=352.7, high=354.2, open=353.1, close=353.25, color='GREEN') second_candle=CandleItem(low=351.3, high=353.3, open=353.25, close=351.7, color='RED') last_candle=CandleItem(low=349.8, high=356.0, open=351.7, close=355.65, color='GREEN') 2020-09-29 10:00:21 INFO: check need new order None 2020-09-29 10:00:21 INFO: init new order end 2020-09-29 10:00:21 INFO: 2020-09-29 10:00:21 INFO: 2020-09-29 10:00:21 INFO: 2020-09-29 10:00:21 INFO: 2020-09-29 10:02:00 INFO: 2020-09-29 10:02:00 INFO: 2020-09-29 10:02:00 INFO: 2020-09-29 10:02:00 INFO: 2020-09-29 10:02:00 INFO: clearing start 2020-09-29 10:02:00 INFO: clearing end 2020-09-29 10:02:00 INFO: 2020-09-29 10:02:00 INFO: 2020-09-29 10:02:00 INFO: 2020-09-29 10:02:00 INFO: 2020-09-29 11:00:20 INFO: 2020-09-29 11:00:20 INFO: 2020-09-29 11:00:20 INFO: 2020-09-29 11:00:20 INFO: 2020-09-29 11:00:20 INFO: init new order start 2020-09-29 11:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 29, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 355.65, 'high': 355.85, 'low': 354.5, 'close': 354.85, 'trades': 2150, 'volume': 1606225, 'vwap': 355.02, 'lastSize': 2052, 'turnover': 57023743745, 'homeNotional': 17226.781194893734, 'foreignNotional': 6115806.298852375}, {'timestamp': datetime.datetime(2020, 9, 29, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.7, 'high': 356.0, 'low': 349.8, 'close': 355.65, 'trades': 4344, 'volume': 3170240, 'vwap': 352.92, 'lastSize': 300, 'turnover': 111883235150, 'homeNotional': 33905.50860918107, 'foreignNotional': 11965979.01533528}, {'timestamp': datetime.datetime(2020, 9, 29, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.25, 'high': 353.3, 'low': 351.3, 'close': 351.7, 'trades': 2997, 'volume': 1994540, 'vwap': 352.5, 'lastSize': 224, 'turnover': 70305826280, 'homeNotional': 21302.55043665459, 'foreignNotional': 7508972.5848126765}] 2020-09-29 11:00:20 INFO: prepare candles [CandleItem(low=354.5, high=355.85, open=355.65, close=354.85, color='RED'), CandleItem(low=349.8, high=356.0, open=351.7, close=355.65, color='GREEN'), CandleItem(low=351.3, high=353.3, open=353.25, close=351.7, color='RED')] 2020-09-29 11:00:20 INFO: skip by colors first_candle=CandleItem(low=351.3, high=353.3, open=353.25, close=351.7, color='RED') second_candle=CandleItem(low=349.8, high=356.0, open=351.7, close=355.65, color='GREEN') last_candle=CandleItem(low=354.5, high=355.85, open=355.65, close=354.85, color='RED') 2020-09-29 11:00:20 INFO: check need new order None 2020-09-29 11:00:20 INFO: init new order end 2020-09-29 11:00:20 INFO: 2020-09-29 11:00:20 INFO: 2020-09-29 11:00:20 INFO: 2020-09-29 11:00:20 INFO: 2020-09-29 11:02:00 INFO: 2020-09-29 11:02:00 INFO: 2020-09-29 11:02:00 INFO: 2020-09-29 11:02:00 INFO: 2020-09-29 11:02:00 INFO: clearing start 2020-09-29 11:02:00 INFO: clearing end 2020-09-29 11:02:00 INFO: 2020-09-29 11:02:00 INFO: 2020-09-29 11:02:00 INFO: 2020-09-29 11:02:00 INFO: 2020-09-29 12:00:20 INFO: 2020-09-29 12:00:20 INFO: 2020-09-29 12:00:20 INFO: 2020-09-29 12:00:20 INFO: 2020-09-29 12:00:20 INFO: init new order start 2020-09-29 12:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 29, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.85, 'high': 355.85, 'low': 354.15, 'close': 355.55, 'trades': 2094, 'volume': 1575176, 'vwap': 355.17, 'lastSize': 10, 'turnover': 55944218265, 'homeNotional': 16898.473425136464, 'foreignNotional': 6001694.47199116}, {'timestamp': datetime.datetime(2020, 9, 29, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 355.65, 'high': 355.85, 'low': 354.5, 'close': 354.85, 'trades': 2150, 'volume': 1606225, 'vwap': 355.02, 'lastSize': 2052, 'turnover': 57023743745, 'homeNotional': 17226.781194893734, 'foreignNotional': 6115806.298852375}, {'timestamp': datetime.datetime(2020, 9, 29, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.7, 'high': 356.0, 'low': 349.8, 'close': 355.65, 'trades': 4344, 'volume': 3170240, 'vwap': 352.92, 'lastSize': 300, 'turnover': 111883235150, 'homeNotional': 33905.50860918107, 'foreignNotional': 11965979.01533528}] 2020-09-29 12:00:21 INFO: prepare candles [CandleItem(low=354.15, high=355.85, open=354.85, close=355.55, color='GREEN'), CandleItem(low=354.5, high=355.85, open=355.65, close=354.85, color='RED'), CandleItem(low=349.8, high=356.0, open=351.7, close=355.65, color='GREEN')] 2020-09-29 12:00:21 INFO: skip by colors first_candle=CandleItem(low=349.8, high=356.0, open=351.7, close=355.65, color='GREEN') second_candle=CandleItem(low=354.5, high=355.85, open=355.65, close=354.85, color='RED') last_candle=CandleItem(low=354.15, high=355.85, open=354.85, close=355.55, color='GREEN') 2020-09-29 12:00:21 INFO: check need new order None 2020-09-29 12:00:21 INFO: init new order end 2020-09-29 12:00:21 INFO: 2020-09-29 12:00:21 INFO: 2020-09-29 12:00:21 INFO: 2020-09-29 12:00:21 INFO: 2020-09-29 12:02:00 INFO: 2020-09-29 12:02:00 INFO: 2020-09-29 12:02:00 INFO: 2020-09-29 12:02:00 INFO: 2020-09-29 12:02:00 INFO: clearing start 2020-09-29 12:02:00 INFO: clearing end 2020-09-29 12:02:00 INFO: 2020-09-29 12:02:00 INFO: 2020-09-29 12:02:00 INFO: 2020-09-29 12:02:00 INFO: 2020-09-29 13:00:20 INFO: 2020-09-29 13:00:20 INFO: 2020-09-29 13:00:20 INFO: 2020-09-29 13:00:20 INFO: 2020-09-29 13:00:20 INFO: init new order start 2020-09-29 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 29, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 355.55, 'high': 356.45, 'low': 354.5, 'close': 354.55, 'trades': 2380, 'volume': 1881043, 'vwap': 355.49, 'lastSize': 1, 'turnover': 66867399635, 'homeNotional': 20182.235811453404, 'foreignNotional': 7174398.848268144}, {'timestamp': datetime.datetime(2020, 9, 29, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.85, 'high': 355.85, 'low': 354.15, 'close': 355.55, 'trades': 2094, 'volume': 1575176, 'vwap': 355.17, 'lastSize': 10, 'turnover': 55944218265, 'homeNotional': 16898.473425136464, 'foreignNotional': 6001694.47199116}, {'timestamp': datetime.datetime(2020, 9, 29, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 355.65, 'high': 355.85, 'low': 354.5, 'close': 354.85, 'trades': 2150, 'volume': 1606225, 'vwap': 355.02, 'lastSize': 2052, 'turnover': 57023743745, 'homeNotional': 17226.781194893734, 'foreignNotional': 6115806.298852375}] 2020-09-29 13:00:20 INFO: prepare candles [CandleItem(low=354.5, high=356.45, open=355.55, close=354.55, color='RED'), CandleItem(low=354.15, high=355.85, open=354.85, close=355.55, color='GREEN'), CandleItem(low=354.5, high=355.85, open=355.65, close=354.85, color='RED')] 2020-09-29 13:00:20 INFO: skip by colors first_candle=CandleItem(low=354.5, high=355.85, open=355.65, close=354.85, color='RED') second_candle=CandleItem(low=354.15, high=355.85, open=354.85, close=355.55, color='GREEN') last_candle=CandleItem(low=354.5, high=356.45, open=355.55, close=354.55, color='RED') 2020-09-29 13:00:20 INFO: check need new order None 2020-09-29 13:00:20 INFO: init new order end 2020-09-29 13:00:20 INFO: 2020-09-29 13:00:20 INFO: 2020-09-29 13:00:20 INFO: 2020-09-29 13:00:20 INFO: 2020-09-29 13:02:00 INFO: 2020-09-29 13:02:00 INFO: 2020-09-29 13:02:00 INFO: 2020-09-29 13:02:00 INFO: 2020-09-29 13:02:00 INFO: clearing start 2020-09-29 13:02:00 INFO: clearing end 2020-09-29 13:02:00 INFO: 2020-09-29 13:02:00 INFO: 2020-09-29 13:02:00 INFO: 2020-09-29 13:02:00 INFO: 2020-09-29 14:00:20 INFO: 2020-09-29 14:00:20 INFO: 2020-09-29 14:00:20 INFO: 2020-09-29 14:00:20 INFO: 2020-09-29 14:00:20 INFO: init new order start 2020-09-29 14:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 29, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.55, 'high': 358.2, 'low': 354.5, 'close': 356.9, 'trades': 2953, 'volume': 2154433, 'vwap': 356.69, 'lastSize': 6, 'turnover': 76846207625, 'homeNotional': 23151.896232325686, 'foreignNotional': 8258043.8282538885}, {'timestamp': datetime.datetime(2020, 9, 29, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 355.55, 'high': 356.45, 'low': 354.5, 'close': 354.55, 'trades': 2380, 'volume': 1881043, 'vwap': 355.49, 'lastSize': 1, 'turnover': 66867399635, 'homeNotional': 20182.235811453404, 'foreignNotional': 7174398.848268144}, {'timestamp': datetime.datetime(2020, 9, 29, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.85, 'high': 355.85, 'low': 354.15, 'close': 355.55, 'trades': 2094, 'volume': 1575176, 'vwap': 355.17, 'lastSize': 10, 'turnover': 55944218265, 'homeNotional': 16898.473425136464, 'foreignNotional': 6001694.47199116}] 2020-09-29 14:00:21 INFO: prepare candles [CandleItem(low=354.5, high=358.2, open=354.55, close=356.9, color='GREEN'), CandleItem(low=354.5, high=356.45, open=355.55, close=354.55, color='RED'), CandleItem(low=354.15, high=355.85, open=354.85, close=355.55, color='GREEN')] 2020-09-29 14:00:21 INFO: skip by colors first_candle=CandleItem(low=354.15, high=355.85, open=354.85, close=355.55, color='GREEN') second_candle=CandleItem(low=354.5, high=356.45, open=355.55, close=354.55, color='RED') last_candle=CandleItem(low=354.5, high=358.2, open=354.55, close=356.9, color='GREEN') 2020-09-29 14:00:21 INFO: check need new order None 2020-09-29 14:00:21 INFO: init new order end 2020-09-29 14:00:21 INFO: 2020-09-29 14:00:21 INFO: 2020-09-29 14:00:21 INFO: 2020-09-29 14:00:21 INFO: 2020-09-29 14:02:00 INFO: 2020-09-29 14:02:00 INFO: 2020-09-29 14:02:00 INFO: 2020-09-29 14:02:00 INFO: 2020-09-29 14:02:00 INFO: clearing start 2020-09-29 14:02:00 INFO: clearing end 2020-09-29 14:02:00 INFO: 2020-09-29 14:02:00 INFO: 2020-09-29 14:02:00 INFO: 2020-09-29 14:02:00 INFO: 2020-09-29 15:00:20 INFO: 2020-09-29 15:00:20 INFO: 2020-09-29 15:00:20 INFO: 2020-09-29 15:00:20 INFO: 2020-09-29 15:00:20 INFO: init new order start 2020-09-29 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 29, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.9, 'high': 359.2, 'low': 356.7, 'close': 357.3, 'trades': 3378, 'volume': 2255292, 'vwap': 357.73, 'lastSize': 100, 'turnover': 80676468250, 'homeNotional': 24300.692328450106, 'foreignNotional': 8692867.484075254}, {'timestamp': datetime.datetime(2020, 9, 29, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.55, 'high': 358.2, 'low': 354.5, 'close': 356.9, 'trades': 2953, 'volume': 2154433, 'vwap': 356.69, 'lastSize': 6, 'turnover': 76846207625, 'homeNotional': 23151.896232325686, 'foreignNotional': 8258043.8282538885}, {'timestamp': datetime.datetime(2020, 9, 29, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 355.55, 'high': 356.45, 'low': 354.5, 'close': 354.55, 'trades': 2380, 'volume': 1881043, 'vwap': 355.49, 'lastSize': 1, 'turnover': 66867399635, 'homeNotional': 20182.235811453404, 'foreignNotional': 7174398.848268144}] 2020-09-29 15:00:20 INFO: prepare candles [CandleItem(low=356.7, high=359.2, open=356.9, close=357.3, color='GREEN'), CandleItem(low=354.5, high=358.2, open=354.55, close=356.9, color='GREEN'), CandleItem(low=354.5, high=356.45, open=355.55, close=354.55, color='RED')] 2020-09-29 15:00:20 INFO: skip by colors first_candle=CandleItem(low=354.5, high=356.45, open=355.55, close=354.55, color='RED') second_candle=CandleItem(low=354.5, high=358.2, open=354.55, close=356.9, color='GREEN') last_candle=CandleItem(low=356.7, high=359.2, open=356.9, close=357.3, color='GREEN') 2020-09-29 15:00:20 INFO: check need new order None 2020-09-29 15:00:20 INFO: init new order end 2020-09-29 15:00:20 INFO: 2020-09-29 15:00:20 INFO: 2020-09-29 15:00:20 INFO: 2020-09-29 15:00:20 INFO: 2020-09-29 15:02:00 INFO: 2020-09-29 15:02:00 INFO: 2020-09-29 15:02:00 INFO: 2020-09-29 15:02:00 INFO: 2020-09-29 15:02:00 INFO: clearing start 2020-09-29 15:02:00 INFO: clearing end 2020-09-29 15:02:00 INFO: 2020-09-29 15:02:00 INFO: 2020-09-29 15:02:00 INFO: 2020-09-29 15:02:00 INFO: 2020-09-29 16:00:20 INFO: 2020-09-29 16:00:20 INFO: 2020-09-29 16:00:20 INFO: 2020-09-29 16:00:20 INFO: 2020-09-29 16:00:20 INFO: init new order start 2020-09-29 16:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 29, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.3, 'high': 358.0, 'low': 356.75, 'close': 357.7, 'trades': 2772, 'volume': 1544248, 'vwap': 357.38, 'lastSize': 22, 'turnover': 55187039540, 'homeNotional': 16609.140881197087, 'foreignNotional': 5935637.398866958}, {'timestamp': datetime.datetime(2020, 9, 29, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.9, 'high': 359.2, 'low': 356.7, 'close': 357.3, 'trades': 3378, 'volume': 2255292, 'vwap': 357.73, 'lastSize': 100, 'turnover': 80676468250, 'homeNotional': 24300.692328450106, 'foreignNotional': 8692867.484075254}, {'timestamp': datetime.datetime(2020, 9, 29, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.55, 'high': 358.2, 'low': 354.5, 'close': 356.9, 'trades': 2953, 'volume': 2154433, 'vwap': 356.69, 'lastSize': 6, 'turnover': 76846207625, 'homeNotional': 23151.896232325686, 'foreignNotional': 8258043.8282538885}] 2020-09-29 16:00:20 INFO: prepare candles [CandleItem(low=356.75, high=358.0, open=357.3, close=357.7, color='GREEN'), CandleItem(low=356.7, high=359.2, open=356.9, close=357.3, color='GREEN'), CandleItem(low=354.5, high=358.2, open=354.55, close=356.9, color='GREEN')] 2020-09-29 16:00:20 INFO: skip by colors first_candle=CandleItem(low=354.5, high=358.2, open=354.55, close=356.9, color='GREEN') second_candle=CandleItem(low=356.7, high=359.2, open=356.9, close=357.3, color='GREEN') last_candle=CandleItem(low=356.75, high=358.0, open=357.3, close=357.7, color='GREEN') 2020-09-29 16:00:20 INFO: check need new order None 2020-09-29 16:00:20 INFO: init new order end 2020-09-29 16:00:20 INFO: 2020-09-29 16:00:20 INFO: 2020-09-29 16:00:20 INFO: 2020-09-29 16:00:20 INFO: 2020-09-29 16:02:00 INFO: 2020-09-29 16:02:00 INFO: 2020-09-29 16:02:00 INFO: 2020-09-29 16:02:00 INFO: 2020-09-29 16:02:00 INFO: clearing start 2020-09-29 16:02:00 INFO: clearing end 2020-09-29 16:02:00 INFO: 2020-09-29 16:02:00 INFO: 2020-09-29 16:02:00 INFO: 2020-09-29 16:02:00 INFO: 2020-09-29 17:00:20 INFO: 2020-09-29 17:00:20 INFO: 2020-09-29 17:00:20 INFO: 2020-09-29 17:00:20 INFO: 2020-09-29 17:00:20 INFO: init new order start 2020-09-29 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 29, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.7, 'high': 357.95, 'low': 355.0, 'close': 357.85, 'trades': 3900, 'volume': 2456609, 'vwap': 356.66, 'lastSize': 13, 'turnover': 87616565895, 'homeNotional': 26397.755734135102, 'foreignNotional': 9414953.647049783}, {'timestamp': datetime.datetime(2020, 9, 29, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.3, 'high': 358.0, 'low': 356.75, 'close': 357.7, 'trades': 2772, 'volume': 1544248, 'vwap': 357.38, 'lastSize': 22, 'turnover': 55187039540, 'homeNotional': 16609.140881197087, 'foreignNotional': 5935637.398866958}, {'timestamp': datetime.datetime(2020, 9, 29, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.9, 'high': 359.2, 'low': 356.7, 'close': 357.3, 'trades': 3378, 'volume': 2255292, 'vwap': 357.73, 'lastSize': 100, 'turnover': 80676468250, 'homeNotional': 24300.692328450106, 'foreignNotional': 8692867.484075254}] 2020-09-29 17:00:20 INFO: prepare candles [CandleItem(low=355.0, high=357.95, open=357.7, close=357.85, color='GREEN'), CandleItem(low=356.75, high=358.0, open=357.3, close=357.7, color='GREEN'), CandleItem(low=356.7, high=359.2, open=356.9, close=357.3, color='GREEN')] 2020-09-29 17:00:20 INFO: skip by colors first_candle=CandleItem(low=356.7, high=359.2, open=356.9, close=357.3, color='GREEN') second_candle=CandleItem(low=356.75, high=358.0, open=357.3, close=357.7, color='GREEN') last_candle=CandleItem(low=355.0, high=357.95, open=357.7, close=357.85, color='GREEN') 2020-09-29 17:00:20 INFO: check need new order None 2020-09-29 17:00:20 INFO: init new order end 2020-09-29 17:00:20 INFO: 2020-09-29 17:00:20 INFO: 2020-09-29 17:00:20 INFO: 2020-09-29 17:00:20 INFO: 2020-09-29 17:02:00 INFO: 2020-09-29 17:02:00 INFO: 2020-09-29 17:02:00 INFO: 2020-09-29 17:02:00 INFO: 2020-09-29 17:02:00 INFO: clearing start 2020-09-29 17:02:00 INFO: clearing end 2020-09-29 17:02:00 INFO: 2020-09-29 17:02:00 INFO: 2020-09-29 17:02:00 INFO: 2020-09-29 17:02:00 INFO: 2020-09-29 18:00:20 INFO: 2020-09-29 18:00:20 INFO: 2020-09-29 18:00:20 INFO: 2020-09-29 18:00:20 INFO: 2020-09-29 18:00:20 INFO: init new order start 2020-09-29 18:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 29, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.85, 'high': 359.75, 'low': 356.25, 'close': 357.5, 'trades': 4951, 'volume': 3459880, 'vwap': 357.99, 'lastSize': 39594, 'turnover': 123858522500, 'homeNotional': 37252.800117974875, 'foreignNotional': 13335989.515551481}, {'timestamp': datetime.datetime(2020, 9, 29, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.7, 'high': 357.95, 'low': 355.0, 'close': 357.85, 'trades': 3900, 'volume': 2456609, 'vwap': 356.66, 'lastSize': 13, 'turnover': 87616565895, 'homeNotional': 26397.755734135102, 'foreignNotional': 9414953.647049783}, {'timestamp': datetime.datetime(2020, 9, 29, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.3, 'high': 358.0, 'low': 356.75, 'close': 357.7, 'trades': 2772, 'volume': 1544248, 'vwap': 357.38, 'lastSize': 22, 'turnover': 55187039540, 'homeNotional': 16609.140881197087, 'foreignNotional': 5935637.398866958}] 2020-09-29 18:00:20 INFO: prepare candles [CandleItem(low=356.25, high=359.75, open=357.85, close=357.5, color='RED'), CandleItem(low=355.0, high=357.95, open=357.7, close=357.85, color='GREEN'), CandleItem(low=356.75, high=358.0, open=357.3, close=357.7, color='GREEN')] 2020-09-29 18:00:20 INFO: last_candle=CandleItem(low=356.25, high=359.75, open=357.85, close=357.5, color='RED') 2020-09-29 18:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-09-29 18:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=356.25, high=359.75, open=357.85, close=357.5, color='RED') 2020-09-29 18:00:20 INFO: skip by CandleItem(low=356.25, high=359.75, open=357.85, close=357.5, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-29 18:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-09-29 18:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=356.25, high=359.75, open=357.85, close=357.5, color='RED') 2020-09-29 18:00:20 INFO: skip by CandleItem(low=356.25, high=359.75, open=357.85, close=357.5, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-29 18:00:20 INFO: not found applicable config for candle 2020-09-29 18:00:20 INFO: check need new order None 2020-09-29 18:00:20 INFO: init new order end 2020-09-29 18:00:20 INFO: 2020-09-29 18:00:20 INFO: 2020-09-29 18:00:20 INFO: 2020-09-29 18:00:20 INFO: 2020-09-29 18:02:00 INFO: 2020-09-29 18:02:00 INFO: 2020-09-29 18:02:00 INFO: 2020-09-29 18:02:00 INFO: 2020-09-29 18:02:00 INFO: clearing start 2020-09-29 18:02:00 INFO: clearing end 2020-09-29 18:02:00 INFO: 2020-09-29 18:02:00 INFO: 2020-09-29 18:02:00 INFO: 2020-09-29 18:02:00 INFO: 2020-09-29 19:00:20 INFO: 2020-09-29 19:00:20 INFO: 2020-09-29 19:00:20 INFO: 2020-09-29 19:00:20 INFO: 2020-09-29 19:00:20 INFO: init new order start 2020-09-29 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 29, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.5, 'high': 358.45, 'low': 355.45, 'close': 355.65, 'trades': 3248, 'volume': 2192894, 'vwap': 357.08, 'lastSize': 220, 'turnover': 78303617100, 'homeNotional': 23581.16806450061, 'foreignNotional': 8420362.699683068}, {'timestamp': datetime.datetime(2020, 9, 29, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.85, 'high': 359.75, 'low': 356.25, 'close': 357.5, 'trades': 4951, 'volume': 3459880, 'vwap': 357.99, 'lastSize': 39594, 'turnover': 123858522500, 'homeNotional': 37252.800117974875, 'foreignNotional': 13335989.515551481}, {'timestamp': datetime.datetime(2020, 9, 29, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.7, 'high': 357.95, 'low': 355.0, 'close': 357.85, 'trades': 3900, 'volume': 2456609, 'vwap': 356.66, 'lastSize': 13, 'turnover': 87616565895, 'homeNotional': 26397.755734135102, 'foreignNotional': 9414953.647049783}] 2020-09-29 19:00:20 INFO: prepare candles [CandleItem(low=355.45, high=358.45, open=357.5, close=355.65, color='RED'), CandleItem(low=356.25, high=359.75, open=357.85, close=357.5, color='RED'), CandleItem(low=355.0, high=357.95, open=357.7, close=357.85, color='GREEN')] 2020-09-29 19:00:20 INFO: skip by colors first_candle=CandleItem(low=355.0, high=357.95, open=357.7, close=357.85, color='GREEN') second_candle=CandleItem(low=356.25, high=359.75, open=357.85, close=357.5, color='RED') last_candle=CandleItem(low=355.45, high=358.45, open=357.5, close=355.65, color='RED') 2020-09-29 19:00:20 INFO: check need new order None 2020-09-29 19:00:20 INFO: init new order end 2020-09-29 19:00:20 INFO: 2020-09-29 19:00:20 INFO: 2020-09-29 19:00:20 INFO: 2020-09-29 19:00:20 INFO: 2020-09-29 19:02:00 INFO: 2020-09-29 19:02:00 INFO: 2020-09-29 19:02:00 INFO: 2020-09-29 19:02:00 INFO: 2020-09-29 19:02:00 INFO: clearing start 2020-09-29 19:02:00 INFO: clearing end 2020-09-29 19:02:00 INFO: 2020-09-29 19:02:00 INFO: 2020-09-29 19:02:00 INFO: 2020-09-29 19:02:00 INFO: 2020-09-29 20:00:20 INFO: 2020-09-29 20:00:20 INFO: 2020-09-29 20:00:20 INFO: 2020-09-29 20:00:20 INFO: 2020-09-29 20:00:20 INFO: init new order start 2020-09-29 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 29, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 355.65, 'high': 355.7, 'low': 352.9, 'close': 354.95, 'trades': 4894, 'volume': 3874251, 'vwap': 354.61, 'lastSize': 20, 'turnover': 137383273990, 'homeNotional': 41454.39866789419, 'foreignNotional': 14700008.434124336}, {'timestamp': datetime.datetime(2020, 9, 29, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.5, 'high': 358.45, 'low': 355.45, 'close': 355.65, 'trades': 3248, 'volume': 2192894, 'vwap': 357.08, 'lastSize': 220, 'turnover': 78303617100, 'homeNotional': 23581.16806450061, 'foreignNotional': 8420362.699683068}, {'timestamp': datetime.datetime(2020, 9, 29, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.85, 'high': 359.75, 'low': 356.25, 'close': 357.5, 'trades': 4951, 'volume': 3459880, 'vwap': 357.99, 'lastSize': 39594, 'turnover': 123858522500, 'homeNotional': 37252.800117974875, 'foreignNotional': 13335989.515551481}] 2020-09-29 20:00:20 INFO: prepare candles [CandleItem(low=352.9, high=355.7, open=355.65, close=354.95, color='RED'), CandleItem(low=355.45, high=358.45, open=357.5, close=355.65, color='RED'), CandleItem(low=356.25, high=359.75, open=357.85, close=357.5, color='RED')] 2020-09-29 20:00:20 INFO: skip by colors first_candle=CandleItem(low=356.25, high=359.75, open=357.85, close=357.5, color='RED') second_candle=CandleItem(low=355.45, high=358.45, open=357.5, close=355.65, color='RED') last_candle=CandleItem(low=352.9, high=355.7, open=355.65, close=354.95, color='RED') 2020-09-29 20:00:20 INFO: check need new order None 2020-09-29 20:00:20 INFO: init new order end 2020-09-29 20:00:20 INFO: 2020-09-29 20:00:20 INFO: 2020-09-29 20:00:20 INFO: 2020-09-29 20:00:20 INFO: 2020-09-29 20:02:00 INFO: 2020-09-29 20:02:00 INFO: 2020-09-29 20:02:00 INFO: 2020-09-29 20:02:00 INFO: 2020-09-29 20:02:00 INFO: clearing start 2020-09-29 20:02:01 INFO: clearing end 2020-09-29 20:02:01 INFO: 2020-09-29 20:02:01 INFO: 2020-09-29 20:02:01 INFO: 2020-09-29 20:02:01 INFO: 2020-09-29 21:00:20 INFO: 2020-09-29 21:00:20 INFO: 2020-09-29 21:00:20 INFO: 2020-09-29 21:00:20 INFO: 2020-09-29 21:00:20 INFO: init new order start 2020-09-29 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 29, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.95, 'high': 355.1, 'low': 352.3, 'close': 354.25, 'trades': 4057, 'volume': 2419565, 'vwap': 353.67, 'lastSize': 24, 'turnover': 85570880895, 'homeNotional': 25809.343924018427, 'foreignNotional': 9127807.610862788}, {'timestamp': datetime.datetime(2020, 9, 29, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 355.65, 'high': 355.7, 'low': 352.9, 'close': 354.95, 'trades': 4894, 'volume': 3874251, 'vwap': 354.61, 'lastSize': 20, 'turnover': 137383273990, 'homeNotional': 41454.39866789419, 'foreignNotional': 14700008.434124336}, {'timestamp': datetime.datetime(2020, 9, 29, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.5, 'high': 358.45, 'low': 355.45, 'close': 355.65, 'trades': 3248, 'volume': 2192894, 'vwap': 357.08, 'lastSize': 220, 'turnover': 78303617100, 'homeNotional': 23581.16806450061, 'foreignNotional': 8420362.699683068}] 2020-09-29 21:00:20 INFO: prepare candles [CandleItem(low=352.3, high=355.1, open=354.95, close=354.25, color='RED'), CandleItem(low=352.9, high=355.7, open=355.65, close=354.95, color='RED'), CandleItem(low=355.45, high=358.45, open=357.5, close=355.65, color='RED')] 2020-09-29 21:00:20 INFO: skip by colors first_candle=CandleItem(low=355.45, high=358.45, open=357.5, close=355.65, color='RED') second_candle=CandleItem(low=352.9, high=355.7, open=355.65, close=354.95, color='RED') last_candle=CandleItem(low=352.3, high=355.1, open=354.95, close=354.25, color='RED') 2020-09-29 21:00:20 INFO: check need new order None 2020-09-29 21:00:20 INFO: init new order end 2020-09-29 21:00:20 INFO: 2020-09-29 21:00:20 INFO: 2020-09-29 21:00:20 INFO: 2020-09-29 21:00:20 INFO: 2020-09-29 21:02:00 INFO: 2020-09-29 21:02:00 INFO: 2020-09-29 21:02:00 INFO: 2020-09-29 21:02:00 INFO: 2020-09-29 21:02:00 INFO: clearing start 2020-09-29 21:02:00 INFO: clearing end 2020-09-29 21:02:00 INFO: 2020-09-29 21:02:00 INFO: 2020-09-29 21:02:00 INFO: 2020-09-29 21:02:00 INFO: 2020-09-29 22:00:20 INFO: 2020-09-29 22:00:20 INFO: 2020-09-29 22:00:20 INFO: 2020-09-29 22:00:20 INFO: 2020-09-29 22:00:20 INFO: init new order start 2020-09-29 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 29, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.25, 'high': 356.4, 'low': 354.0, 'close': 355.55, 'trades': 2435, 'volume': 1987073, 'vwap': 355.45, 'lastSize': 2865, 'turnover': 70628800245, 'homeNotional': 21304.31185894145, 'foreignNotional': 7572457.108186834}, {'timestamp': datetime.datetime(2020, 9, 29, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.95, 'high': 355.1, 'low': 352.3, 'close': 354.25, 'trades': 4057, 'volume': 2419565, 'vwap': 353.67, 'lastSize': 24, 'turnover': 85570880895, 'homeNotional': 25809.343924018427, 'foreignNotional': 9127807.610862788}, {'timestamp': datetime.datetime(2020, 9, 29, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 355.65, 'high': 355.7, 'low': 352.9, 'close': 354.95, 'trades': 4894, 'volume': 3874251, 'vwap': 354.61, 'lastSize': 20, 'turnover': 137383273990, 'homeNotional': 41454.39866789419, 'foreignNotional': 14700008.434124336}] 2020-09-29 22:00:20 INFO: prepare candles [CandleItem(low=354.0, high=356.4, open=354.25, close=355.55, color='GREEN'), CandleItem(low=352.3, high=355.1, open=354.95, close=354.25, color='RED'), CandleItem(low=352.9, high=355.7, open=355.65, close=354.95, color='RED')] 2020-09-29 22:00:20 INFO: last_candle=CandleItem(low=354.0, high=356.4, open=354.25, close=355.55, color='GREEN') 2020-09-29 22:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-09-29 22:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=354.0, high=356.4, open=354.25, close=355.55, color='GREEN') 2020-09-29 22:00:20 INFO: skip by CandleItem(low=354.0, high=356.4, open=354.25, close=355.55, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-29 22:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-09-29 22:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=354.0, high=356.4, open=354.25, close=355.55, color='GREEN') 2020-09-29 22:00:20 INFO: skip by CandleItem(low=354.0, high=356.4, open=354.25, close=355.55, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-29 22:00:20 INFO: not found applicable config for candle 2020-09-29 22:00:20 INFO: check need new order None 2020-09-29 22:00:20 INFO: init new order end 2020-09-29 22:00:20 INFO: 2020-09-29 22:00:20 INFO: 2020-09-29 22:00:20 INFO: 2020-09-29 22:00:20 INFO: 2020-09-29 22:02:00 INFO: 2020-09-29 22:02:00 INFO: 2020-09-29 22:02:00 INFO: 2020-09-29 22:02:00 INFO: 2020-09-29 22:02:00 INFO: clearing start 2020-09-29 22:02:00 INFO: clearing end 2020-09-29 22:02:00 INFO: 2020-09-29 22:02:00 INFO: 2020-09-29 22:02:00 INFO: 2020-09-29 22:02:00 INFO: 2020-09-29 23:00:20 INFO: 2020-09-29 23:00:20 INFO: 2020-09-29 23:00:20 INFO: 2020-09-29 23:00:20 INFO: 2020-09-29 23:00:20 INFO: init new order start 2020-09-29 23:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 29, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 355.55, 'high': 357.7, 'low': 355.45, 'close': 356.7, 'trades': 3359, 'volume': 2868400, 'vwap': 356.64, 'lastSize': 13, 'turnover': 102295878905, 'homeNotional': 30803.04690720166, 'foreignNotional': 10985318.741009492}, {'timestamp': datetime.datetime(2020, 9, 29, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.25, 'high': 356.4, 'low': 354.0, 'close': 355.55, 'trades': 2435, 'volume': 1987073, 'vwap': 355.45, 'lastSize': 2865, 'turnover': 70628800245, 'homeNotional': 21304.31185894145, 'foreignNotional': 7572457.108186834}, {'timestamp': datetime.datetime(2020, 9, 29, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.95, 'high': 355.1, 'low': 352.3, 'close': 354.25, 'trades': 4057, 'volume': 2419565, 'vwap': 353.67, 'lastSize': 24, 'turnover': 85570880895, 'homeNotional': 25809.343924018427, 'foreignNotional': 9127807.610862788}] 2020-09-29 23:00:20 INFO: prepare candles [CandleItem(low=355.45, high=357.7, open=355.55, close=356.7, color='GREEN'), CandleItem(low=354.0, high=356.4, open=354.25, close=355.55, color='GREEN'), CandleItem(low=352.3, high=355.1, open=354.95, close=354.25, color='RED')] 2020-09-29 23:00:20 INFO: skip by colors first_candle=CandleItem(low=352.3, high=355.1, open=354.95, close=354.25, color='RED') second_candle=CandleItem(low=354.0, high=356.4, open=354.25, close=355.55, color='GREEN') last_candle=CandleItem(low=355.45, high=357.7, open=355.55, close=356.7, color='GREEN') 2020-09-29 23:00:20 INFO: check need new order None 2020-09-29 23:00:20 INFO: init new order end 2020-09-29 23:00:20 INFO: 2020-09-29 23:00:20 INFO: 2020-09-29 23:00:20 INFO: 2020-09-29 23:00:20 INFO: 2020-09-29 23:02:00 INFO: 2020-09-29 23:02:00 INFO: 2020-09-29 23:02:00 INFO: 2020-09-29 23:02:00 INFO: 2020-09-29 23:02:00 INFO: clearing start 2020-09-29 23:02:00 INFO: clearing end 2020-09-29 23:02:00 INFO: 2020-09-29 23:02:00 INFO: 2020-09-29 23:02:00 INFO: 2020-09-29 23:02:00 INFO: 2020-09-30 00:00:20 INFO: 2020-09-30 00:00:20 INFO: 2020-09-30 00:00:20 INFO: 2020-09-30 00:00:20 INFO: 2020-09-30 00:00:20 INFO: init new order start 2020-09-30 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 29, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.7, 'high': 359.25, 'low': 356.5, 'close': 358.2, 'trades': 3688, 'volume': 1648367, 'vwap': 358.06, 'lastSize': 50, 'turnover': 59021018190, 'homeNotional': 17730.64688285302, 'foreignNotional': 6348597.0656334385}, {'timestamp': datetime.datetime(2020, 9, 29, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 355.55, 'high': 357.7, 'low': 355.45, 'close': 356.7, 'trades': 3359, 'volume': 2868400, 'vwap': 356.64, 'lastSize': 13, 'turnover': 102295878905, 'homeNotional': 30803.04690720166, 'foreignNotional': 10985318.741009492}, {'timestamp': datetime.datetime(2020, 9, 29, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.25, 'high': 356.4, 'low': 354.0, 'close': 355.55, 'trades': 2435, 'volume': 1987073, 'vwap': 355.45, 'lastSize': 2865, 'turnover': 70628800245, 'homeNotional': 21304.31185894145, 'foreignNotional': 7572457.108186834}] 2020-09-30 00:00:20 INFO: prepare candles [CandleItem(low=356.5, high=359.25, open=356.7, close=358.2, color='GREEN'), CandleItem(low=355.45, high=357.7, open=355.55, close=356.7, color='GREEN'), CandleItem(low=354.0, high=356.4, open=354.25, close=355.55, color='GREEN')] 2020-09-30 00:00:20 INFO: skip by colors first_candle=CandleItem(low=354.0, high=356.4, open=354.25, close=355.55, color='GREEN') second_candle=CandleItem(low=355.45, high=357.7, open=355.55, close=356.7, color='GREEN') last_candle=CandleItem(low=356.5, high=359.25, open=356.7, close=358.2, color='GREEN') 2020-09-30 00:00:20 INFO: check need new order None 2020-09-30 00:00:20 INFO: init new order end 2020-09-30 00:00:20 INFO: 2020-09-30 00:00:20 INFO: 2020-09-30 00:00:20 INFO: 2020-09-30 00:00:20 INFO: 2020-09-30 00:02:00 INFO: 2020-09-30 00:02:00 INFO: 2020-09-30 00:02:00 INFO: 2020-09-30 00:02:00 INFO: 2020-09-30 00:02:00 INFO: clearing start 2020-09-30 00:02:00 INFO: clearing end 2020-09-30 00:02:00 INFO: 2020-09-30 00:02:00 INFO: 2020-09-30 00:02:00 INFO: 2020-09-30 00:02:00 INFO: 2020-09-30 01:00:20 INFO: 2020-09-30 01:00:20 INFO: 2020-09-30 01:00:20 INFO: 2020-09-30 01:00:20 INFO: 2020-09-30 01:00:20 INFO: init new order start 2020-09-30 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 29, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 358.2, 'high': 358.45, 'low': 357.35, 'close': 358.0, 'trades': 1488, 'volume': 646079, 'vwap': 357.97, 'lastSize': 70, 'turnover': 23127207295, 'homeNotional': 6957.577887777011, 'foreignNotional': 2490552.833935788}, {'timestamp': datetime.datetime(2020, 9, 29, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.7, 'high': 359.25, 'low': 356.5, 'close': 358.2, 'trades': 3688, 'volume': 1648367, 'vwap': 358.06, 'lastSize': 50, 'turnover': 59021018190, 'homeNotional': 17730.64688285302, 'foreignNotional': 6348597.0656334385}, {'timestamp': datetime.datetime(2020, 9, 29, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 355.55, 'high': 357.7, 'low': 355.45, 'close': 356.7, 'trades': 3359, 'volume': 2868400, 'vwap': 356.64, 'lastSize': 13, 'turnover': 102295878905, 'homeNotional': 30803.04690720166, 'foreignNotional': 10985318.741009492}] 2020-09-30 01:00:20 INFO: prepare candles [CandleItem(low=357.35, high=358.45, open=358.2, close=358.0, color='RED'), CandleItem(low=356.5, high=359.25, open=356.7, close=358.2, color='GREEN'), CandleItem(low=355.45, high=357.7, open=355.55, close=356.7, color='GREEN')] 2020-09-30 01:00:20 INFO: last_candle=CandleItem(low=357.35, high=358.45, open=358.2, close=358.0, color='RED') 2020-09-30 01:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-09-30 01:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=357.35, high=358.45, open=358.2, close=358.0, color='RED') 2020-09-30 01:00:20 INFO: skip by CandleItem(low=357.35, high=358.45, open=358.2, close=358.0, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-30 01:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-09-30 01:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=357.35, high=358.45, open=358.2, close=358.0, color='RED') 2020-09-30 01:00:20 INFO: skip by CandleItem(low=357.35, high=358.45, open=358.2, close=358.0, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-30 01:00:20 INFO: not found applicable config for candle 2020-09-30 01:00:20 INFO: check need new order None 2020-09-30 01:00:20 INFO: init new order end 2020-09-30 01:00:20 INFO: 2020-09-30 01:00:20 INFO: 2020-09-30 01:00:20 INFO: 2020-09-30 01:00:20 INFO: 2020-09-30 01:02:00 INFO: 2020-09-30 01:02:00 INFO: 2020-09-30 01:02:00 INFO: 2020-09-30 01:02:00 INFO: 2020-09-30 01:02:00 INFO: clearing start 2020-09-30 01:02:00 INFO: clearing end 2020-09-30 01:02:00 INFO: 2020-09-30 01:02:00 INFO: 2020-09-30 01:02:00 INFO: 2020-09-30 01:02:00 INFO: 2020-09-30 02:00:20 INFO: 2020-09-30 02:00:20 INFO: 2020-09-30 02:00:20 INFO: 2020-09-30 02:00:20 INFO: 2020-09-30 02:00:20 INFO: init new order start 2020-09-30 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 29, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 358.0, 'high': 358.9, 'low': 357.0, 'close': 358.0, 'trades': 2345, 'volume': 1556767, 'vwap': 358.15, 'lastSize': 70, 'turnover': 55755560100, 'homeNotional': 16762.613554643962, 'foreignNotional': 6003528.652974326}, {'timestamp': datetime.datetime(2020, 9, 29, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 358.2, 'high': 358.45, 'low': 357.35, 'close': 358.0, 'trades': 1488, 'volume': 646079, 'vwap': 357.97, 'lastSize': 70, 'turnover': 23127207295, 'homeNotional': 6957.577887777011, 'foreignNotional': 2490552.833935788}, {'timestamp': datetime.datetime(2020, 9, 29, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.7, 'high': 359.25, 'low': 356.5, 'close': 358.2, 'trades': 3688, 'volume': 1648367, 'vwap': 358.06, 'lastSize': 50, 'turnover': 59021018190, 'homeNotional': 17730.64688285302, 'foreignNotional': 6348597.0656334385}] 2020-09-30 02:00:20 INFO: skip by found empty buckets 2020-09-30 02:00:20 INFO: check need new order None 2020-09-30 02:00:20 INFO: init new order end 2020-09-30 02:00:20 INFO: 2020-09-30 02:00:20 INFO: 2020-09-30 02:00:20 INFO: 2020-09-30 02:00:20 INFO: 2020-09-30 02:02:00 INFO: 2020-09-30 02:02:00 INFO: 2020-09-30 02:02:00 INFO: 2020-09-30 02:02:00 INFO: 2020-09-30 02:02:00 INFO: clearing start 2020-09-30 02:02:00 INFO: clearing end 2020-09-30 02:02:00 INFO: 2020-09-30 02:02:00 INFO: 2020-09-30 02:02:00 INFO: 2020-09-30 02:02:00 INFO: 2020-09-30 02:37:43 ERROR: Error : Connection is already closed. 2020-09-30 02:37:43 ERROR: error from callback >: Connection is already closed. 2020-09-30 02:37:43 INFO: Websocket Closed 2020-09-30 02:37:43 WARNING: reconnect to socket 2020-09-30 02:37:43 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-09-30 02:37:43 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-09-30 02:37:43 INFO: Authenticating with API Key. 2020-09-30 02:37:44 INFO: Connected to WS. 2020-09-30 02:39:47 ERROR: Error : Connection is already closed. 2020-09-30 02:39:47 ERROR: error from callback >: Connection is already closed. 2020-09-30 02:39:47 INFO: Websocket Closed 2020-09-30 02:39:47 WARNING: reconnect to socket 2020-09-30 02:39:47 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-09-30 02:39:47 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-09-30 02:39:47 INFO: Authenticating with API Key. 2020-09-30 02:39:48 INFO: Connected to WS. 2020-09-30 03:00:20 INFO: 2020-09-30 03:00:20 INFO: 2020-09-30 03:00:20 INFO: 2020-09-30 03:00:20 INFO: 2020-09-30 03:00:20 INFO: init new order start 2020-09-30 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 30, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 358.0, 'high': 360.95, 'low': 358.0, 'close': 360.25, 'trades': 3710, 'volume': 2269688, 'vwap': 359.87, 'lastSize': 277, 'turnover': 81678095595, 'homeNotional': 24571.81048647403, 'foreignNotional': 8842567.22213395}, {'timestamp': datetime.datetime(2020, 9, 29, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 358.0, 'high': 358.9, 'low': 357.0, 'close': 358.0, 'trades': 2345, 'volume': 1556767, 'vwap': 358.15, 'lastSize': 70, 'turnover': 55755560100, 'homeNotional': 16762.613554643962, 'foreignNotional': 6003528.652974326}, {'timestamp': datetime.datetime(2020, 9, 29, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 358.2, 'high': 358.45, 'low': 357.35, 'close': 358.0, 'trades': 1488, 'volume': 646079, 'vwap': 357.97, 'lastSize': 70, 'turnover': 23127207295, 'homeNotional': 6957.577887777011, 'foreignNotional': 2490552.833935788}] 2020-09-30 03:00:20 INFO: skip by found empty buckets 2020-09-30 03:00:20 INFO: check need new order None 2020-09-30 03:00:20 INFO: init new order end 2020-09-30 03:00:20 INFO: 2020-09-30 03:00:20 INFO: 2020-09-30 03:00:20 INFO: 2020-09-30 03:00:20 INFO: 2020-09-30 03:02:00 INFO: 2020-09-30 03:02:00 INFO: 2020-09-30 03:02:00 INFO: 2020-09-30 03:02:00 INFO: 2020-09-30 03:02:00 INFO: clearing start 2020-09-30 03:02:00 INFO: clearing end 2020-09-30 03:02:00 INFO: 2020-09-30 03:02:00 INFO: 2020-09-30 03:02:00 INFO: 2020-09-30 03:02:00 INFO: 2020-09-30 04:00:20 INFO: 2020-09-30 04:00:20 INFO: 2020-09-30 04:00:20 INFO: 2020-09-30 04:00:20 INFO: 2020-09-30 04:00:20 INFO: init new order start 2020-09-30 04:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 30, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 360.25, 'high': 360.3, 'low': 358.05, 'close': 358.25, 'trades': 2173, 'volume': 1544201, 'vwap': 359.24, 'lastSize': 50, 'turnover': 55472799230, 'homeNotional': 16727.37570470598, 'foreignNotional': 6009034.8575727185}, {'timestamp': datetime.datetime(2020, 9, 30, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 358.0, 'high': 360.95, 'low': 358.0, 'close': 360.25, 'trades': 3710, 'volume': 2269688, 'vwap': 359.87, 'lastSize': 277, 'turnover': 81678095595, 'homeNotional': 24571.81048647403, 'foreignNotional': 8842567.22213395}, {'timestamp': datetime.datetime(2020, 9, 29, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 358.0, 'high': 358.9, 'low': 357.0, 'close': 358.0, 'trades': 2345, 'volume': 1556767, 'vwap': 358.15, 'lastSize': 70, 'turnover': 55755560100, 'homeNotional': 16762.613554643962, 'foreignNotional': 6003528.652974326}] 2020-09-30 04:00:20 INFO: skip by found empty buckets 2020-09-30 04:00:20 INFO: check need new order None 2020-09-30 04:00:20 INFO: init new order end 2020-09-30 04:00:20 INFO: 2020-09-30 04:00:20 INFO: 2020-09-30 04:00:20 INFO: 2020-09-30 04:00:20 INFO: 2020-09-30 04:02:00 INFO: 2020-09-30 04:02:00 INFO: 2020-09-30 04:02:00 INFO: 2020-09-30 04:02:00 INFO: 2020-09-30 04:02:00 INFO: clearing start 2020-09-30 04:02:00 INFO: clearing end 2020-09-30 04:02:00 INFO: 2020-09-30 04:02:00 INFO: 2020-09-30 04:02:00 INFO: 2020-09-30 04:02:00 INFO: 2020-09-30 05:00:20 INFO: 2020-09-30 05:00:20 INFO: 2020-09-30 05:00:20 INFO: 2020-09-30 05:00:20 INFO: 2020-09-30 05:00:20 INFO: init new order start 2020-09-30 05:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 30, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 358.25, 'high': 358.95, 'low': 355.5, 'close': 356.75, 'trades': 2646, 'volume': 2703178, 'vwap': 357.55, 'lastSize': 25, 'turnover': 96652049115, 'homeNotional': 29189.867983032065, 'foreignNotional': 10436875.204235159}, {'timestamp': datetime.datetime(2020, 9, 30, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 360.25, 'high': 360.3, 'low': 358.05, 'close': 358.25, 'trades': 2173, 'volume': 1544201, 'vwap': 359.24, 'lastSize': 50, 'turnover': 55472799230, 'homeNotional': 16727.37570470598, 'foreignNotional': 6009034.8575727185}, {'timestamp': datetime.datetime(2020, 9, 30, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 358.0, 'high': 360.95, 'low': 358.0, 'close': 360.25, 'trades': 3710, 'volume': 2269688, 'vwap': 359.87, 'lastSize': 277, 'turnover': 81678095595, 'homeNotional': 24571.81048647403, 'foreignNotional': 8842567.22213395}] 2020-09-30 05:00:20 INFO: prepare candles [CandleItem(low=355.5, high=358.95, open=358.25, close=356.75, color='RED'), CandleItem(low=358.05, high=360.3, open=360.25, close=358.25, color='RED'), CandleItem(low=358.0, high=360.95, open=358.0, close=360.25, color='GREEN')] 2020-09-30 05:00:20 INFO: skip by colors first_candle=CandleItem(low=358.0, high=360.95, open=358.0, close=360.25, color='GREEN') second_candle=CandleItem(low=358.05, high=360.3, open=360.25, close=358.25, color='RED') last_candle=CandleItem(low=355.5, high=358.95, open=358.25, close=356.75, color='RED') 2020-09-30 05:00:20 INFO: check need new order None 2020-09-30 05:00:20 INFO: init new order end 2020-09-30 05:00:20 INFO: 2020-09-30 05:00:20 INFO: 2020-09-30 05:00:20 INFO: 2020-09-30 05:00:20 INFO: 2020-09-30 05:02:00 INFO: 2020-09-30 05:02:00 INFO: 2020-09-30 05:02:00 INFO: 2020-09-30 05:02:00 INFO: 2020-09-30 05:02:00 INFO: clearing start 2020-09-30 05:02:00 INFO: clearing end 2020-09-30 05:02:00 INFO: 2020-09-30 05:02:00 INFO: 2020-09-30 05:02:00 INFO: 2020-09-30 05:02:00 INFO: 2020-09-30 06:00:20 INFO: 2020-09-30 06:00:20 INFO: 2020-09-30 06:00:20 INFO: 2020-09-30 06:00:20 INFO: 2020-09-30 06:00:20 INFO: init new order start 2020-09-30 06:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 30, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.75, 'high': 358.0, 'low': 356.55, 'close': 356.6, 'trades': 1941, 'volume': 1731176, 'vwap': 357.23, 'lastSize': 1000, 'turnover': 61842724920, 'homeNotional': 18687.75245670025, 'foreignNotional': 6675825.230328584}, {'timestamp': datetime.datetime(2020, 9, 30, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 358.25, 'high': 358.95, 'low': 355.5, 'close': 356.75, 'trades': 2646, 'volume': 2703178, 'vwap': 357.55, 'lastSize': 25, 'turnover': 96652049115, 'homeNotional': 29189.867983032065, 'foreignNotional': 10436875.204235159}, {'timestamp': datetime.datetime(2020, 9, 30, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 360.25, 'high': 360.3, 'low': 358.05, 'close': 358.25, 'trades': 2173, 'volume': 1544201, 'vwap': 359.24, 'lastSize': 50, 'turnover': 55472799230, 'homeNotional': 16727.37570470598, 'foreignNotional': 6009034.8575727185}] 2020-09-30 06:00:21 INFO: prepare candles [CandleItem(low=356.55, high=358.0, open=356.75, close=356.6, color='RED'), CandleItem(low=355.5, high=358.95, open=358.25, close=356.75, color='RED'), CandleItem(low=358.05, high=360.3, open=360.25, close=358.25, color='RED')] 2020-09-30 06:00:21 INFO: skip by colors first_candle=CandleItem(low=358.05, high=360.3, open=360.25, close=358.25, color='RED') second_candle=CandleItem(low=355.5, high=358.95, open=358.25, close=356.75, color='RED') last_candle=CandleItem(low=356.55, high=358.0, open=356.75, close=356.6, color='RED') 2020-09-30 06:00:21 INFO: check need new order None 2020-09-30 06:00:21 INFO: init new order end 2020-09-30 06:00:21 INFO: 2020-09-30 06:00:21 INFO: 2020-09-30 06:00:21 INFO: 2020-09-30 06:00:21 INFO: 2020-09-30 06:02:00 INFO: 2020-09-30 06:02:00 INFO: 2020-09-30 06:02:00 INFO: 2020-09-30 06:02:00 INFO: 2020-09-30 06:02:00 INFO: clearing start 2020-09-30 06:02:00 INFO: clearing end 2020-09-30 06:02:00 INFO: 2020-09-30 06:02:00 INFO: 2020-09-30 06:02:00 INFO: 2020-09-30 06:02:00 INFO: 2020-09-30 07:00:20 INFO: 2020-09-30 07:00:20 INFO: 2020-09-30 07:00:20 INFO: 2020-09-30 07:00:20 INFO: 2020-09-30 07:00:20 INFO: init new order start 2020-09-30 07:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 30, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.6, 'high': 356.8, 'low': 355.8, 'close': 355.9, 'trades': 1969, 'volume': 1643383, 'vwap': 356.24, 'lastSize': 1426, 'turnover': 58542245435, 'homeNotional': 17692.985175045316, 'foreignNotional': 6302774.963351017}, {'timestamp': datetime.datetime(2020, 9, 30, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.75, 'high': 358.0, 'low': 356.55, 'close': 356.6, 'trades': 1941, 'volume': 1731176, 'vwap': 357.23, 'lastSize': 1000, 'turnover': 61842724920, 'homeNotional': 18687.75245670025, 'foreignNotional': 6675825.230328584}, {'timestamp': datetime.datetime(2020, 9, 30, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 358.25, 'high': 358.95, 'low': 355.5, 'close': 356.75, 'trades': 2646, 'volume': 2703178, 'vwap': 357.55, 'lastSize': 25, 'turnover': 96652049115, 'homeNotional': 29189.867983032065, 'foreignNotional': 10436875.204235159}] 2020-09-30 07:00:21 INFO: prepare candles [CandleItem(low=355.8, high=356.8, open=356.6, close=355.9, color='RED'), CandleItem(low=356.55, high=358.0, open=356.75, close=356.6, color='RED'), CandleItem(low=355.5, high=358.95, open=358.25, close=356.75, color='RED')] 2020-09-30 07:00:21 INFO: skip by colors first_candle=CandleItem(low=355.5, high=358.95, open=358.25, close=356.75, color='RED') second_candle=CandleItem(low=356.55, high=358.0, open=356.75, close=356.6, color='RED') last_candle=CandleItem(low=355.8, high=356.8, open=356.6, close=355.9, color='RED') 2020-09-30 07:00:21 INFO: check need new order None 2020-09-30 07:00:21 INFO: init new order end 2020-09-30 07:00:21 INFO: 2020-09-30 07:00:21 INFO: 2020-09-30 07:00:21 INFO: 2020-09-30 07:00:21 INFO: 2020-09-30 07:02:00 INFO: 2020-09-30 07:02:00 INFO: 2020-09-30 07:02:00 INFO: 2020-09-30 07:02:00 INFO: 2020-09-30 07:02:00 INFO: clearing start 2020-09-30 07:02:00 INFO: clearing end 2020-09-30 07:02:00 INFO: 2020-09-30 07:02:00 INFO: 2020-09-30 07:02:00 INFO: 2020-09-30 07:02:00 INFO: 2020-09-30 08:00:20 INFO: 2020-09-30 08:00:20 INFO: 2020-09-30 08:00:20 INFO: 2020-09-30 08:00:20 INFO: 2020-09-30 08:00:20 INFO: init new order start 2020-09-30 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 30, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 355.9, 'high': 356.3, 'low': 354.15, 'close': 356.0, 'trades': 2389, 'volume': 1897787, 'vwap': 355.37, 'lastSize': 6136, 'turnover': 67440022755, 'homeNotional': 20375.41455805774, 'foreignNotional': 7240652.625206853}, {'timestamp': datetime.datetime(2020, 9, 30, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.6, 'high': 356.8, 'low': 355.8, 'close': 355.9, 'trades': 1969, 'volume': 1643383, 'vwap': 356.24, 'lastSize': 1426, 'turnover': 58542245435, 'homeNotional': 17692.985175045316, 'foreignNotional': 6302774.963351017}, {'timestamp': datetime.datetime(2020, 9, 30, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.75, 'high': 358.0, 'low': 356.55, 'close': 356.6, 'trades': 1941, 'volume': 1731176, 'vwap': 357.23, 'lastSize': 1000, 'turnover': 61842724920, 'homeNotional': 18687.75245670025, 'foreignNotional': 6675825.230328584}] 2020-09-30 08:00:20 INFO: prepare candles [CandleItem(low=354.15, high=356.3, open=355.9, close=356.0, color='GREEN'), CandleItem(low=355.8, high=356.8, open=356.6, close=355.9, color='RED'), CandleItem(low=356.55, high=358.0, open=356.75, close=356.6, color='RED')] 2020-09-30 08:00:20 INFO: last_candle=CandleItem(low=354.15, high=356.3, open=355.9, close=356.0, color='GREEN') 2020-09-30 08:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-09-30 08:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=354.15, high=356.3, open=355.9, close=356.0, color='GREEN') 2020-09-30 08:00:20 INFO: skip by CandleItem(low=354.15, high=356.3, open=355.9, close=356.0, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-30 08:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-09-30 08:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=354.15, high=356.3, open=355.9, close=356.0, color='GREEN') 2020-09-30 08:00:20 INFO: skip by CandleItem(low=354.15, high=356.3, open=355.9, close=356.0, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-30 08:00:20 INFO: not found applicable config for candle 2020-09-30 08:00:20 INFO: check need new order None 2020-09-30 08:00:20 INFO: init new order end 2020-09-30 08:00:20 INFO: 2020-09-30 08:00:20 INFO: 2020-09-30 08:00:20 INFO: 2020-09-30 08:00:20 INFO: 2020-09-30 08:02:00 INFO: 2020-09-30 08:02:00 INFO: 2020-09-30 08:02:00 INFO: 2020-09-30 08:02:00 INFO: 2020-09-30 08:02:00 INFO: clearing start 2020-09-30 08:02:00 INFO: clearing end 2020-09-30 08:02:00 INFO: 2020-09-30 08:02:00 INFO: 2020-09-30 08:02:00 INFO: 2020-09-30 08:02:00 INFO: 2020-09-30 09:00:20 INFO: 2020-09-30 09:00:20 INFO: 2020-09-30 09:00:20 INFO: 2020-09-30 09:00:20 INFO: 2020-09-30 09:00:20 INFO: init new order start 2020-09-30 09:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 30, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.0, 'high': 356.55, 'low': 354.25, 'close': 354.25, 'trades': 2250, 'volume': 1198122, 'vwap': 355.58, 'lastSize': 50, 'turnover': 42602819965, 'homeNotional': 12867.603428850658, 'foreignNotional': 4575472.104642358}, {'timestamp': datetime.datetime(2020, 9, 30, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 355.9, 'high': 356.3, 'low': 354.15, 'close': 356.0, 'trades': 2389, 'volume': 1897787, 'vwap': 355.37, 'lastSize': 6136, 'turnover': 67440022755, 'homeNotional': 20375.41455805774, 'foreignNotional': 7240652.625206853}, {'timestamp': datetime.datetime(2020, 9, 30, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.6, 'high': 356.8, 'low': 355.8, 'close': 355.9, 'trades': 1969, 'volume': 1643383, 'vwap': 356.24, 'lastSize': 1426, 'turnover': 58542245435, 'homeNotional': 17692.985175045316, 'foreignNotional': 6302774.963351017}] 2020-09-30 09:00:21 INFO: prepare candles [CandleItem(low=354.25, high=356.55, open=356.0, close=354.25, color='RED'), CandleItem(low=354.15, high=356.3, open=355.9, close=356.0, color='GREEN'), CandleItem(low=355.8, high=356.8, open=356.6, close=355.9, color='RED')] 2020-09-30 09:00:21 INFO: skip by colors first_candle=CandleItem(low=355.8, high=356.8, open=356.6, close=355.9, color='RED') second_candle=CandleItem(low=354.15, high=356.3, open=355.9, close=356.0, color='GREEN') last_candle=CandleItem(low=354.25, high=356.55, open=356.0, close=354.25, color='RED') 2020-09-30 09:00:21 INFO: check need new order None 2020-09-30 09:00:21 INFO: init new order end 2020-09-30 09:00:21 INFO: 2020-09-30 09:00:21 INFO: 2020-09-30 09:00:21 INFO: 2020-09-30 09:00:21 INFO: 2020-09-30 09:02:00 INFO: 2020-09-30 09:02:00 INFO: 2020-09-30 09:02:00 INFO: 2020-09-30 09:02:00 INFO: 2020-09-30 09:02:00 INFO: clearing start 2020-09-30 09:02:00 INFO: clearing end 2020-09-30 09:02:00 INFO: 2020-09-30 09:02:00 INFO: 2020-09-30 09:02:00 INFO: 2020-09-30 09:02:00 INFO: 2020-09-30 10:00:20 INFO: 2020-09-30 10:00:20 INFO: 2020-09-30 10:00:20 INFO: 2020-09-30 10:00:20 INFO: 2020-09-30 10:00:20 INFO: init new order start 2020-09-30 10:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 30, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.25, 'high': 356.05, 'low': 353.4, 'close': 355.5, 'trades': 3149, 'volume': 2215144, 'vwap': 355.04, 'lastSize': 194, 'turnover': 78644435455, 'homeNotional': 23731.731446915124, 'foreignNotional': 8425511.163547562}, {'timestamp': datetime.datetime(2020, 9, 30, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.0, 'high': 356.55, 'low': 354.25, 'close': 354.25, 'trades': 2250, 'volume': 1198122, 'vwap': 355.58, 'lastSize': 50, 'turnover': 42602819965, 'homeNotional': 12867.603428850658, 'foreignNotional': 4575472.104642358}, {'timestamp': datetime.datetime(2020, 9, 30, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 355.9, 'high': 356.3, 'low': 354.15, 'close': 356.0, 'trades': 2389, 'volume': 1897787, 'vwap': 355.37, 'lastSize': 6136, 'turnover': 67440022755, 'homeNotional': 20375.41455805774, 'foreignNotional': 7240652.625206853}] 2020-09-30 10:00:20 INFO: prepare candles [CandleItem(low=353.4, high=356.05, open=354.25, close=355.5, color='GREEN'), CandleItem(low=354.25, high=356.55, open=356.0, close=354.25, color='RED'), CandleItem(low=354.15, high=356.3, open=355.9, close=356.0, color='GREEN')] 2020-09-30 10:00:20 INFO: skip by colors first_candle=CandleItem(low=354.15, high=356.3, open=355.9, close=356.0, color='GREEN') second_candle=CandleItem(low=354.25, high=356.55, open=356.0, close=354.25, color='RED') last_candle=CandleItem(low=353.4, high=356.05, open=354.25, close=355.5, color='GREEN') 2020-09-30 10:00:20 INFO: check need new order None 2020-09-30 10:00:20 INFO: init new order end 2020-09-30 10:00:20 INFO: 2020-09-30 10:00:20 INFO: 2020-09-30 10:00:20 INFO: 2020-09-30 10:00:20 INFO: 2020-09-30 10:02:00 INFO: 2020-09-30 10:02:00 INFO: 2020-09-30 10:02:00 INFO: 2020-09-30 10:02:00 INFO: 2020-09-30 10:02:00 INFO: clearing start 2020-09-30 10:02:00 INFO: clearing end 2020-09-30 10:02:00 INFO: 2020-09-30 10:02:00 INFO: 2020-09-30 10:02:00 INFO: 2020-09-30 10:02:00 INFO: 2020-09-30 11:00:20 INFO: 2020-09-30 11:00:20 INFO: 2020-09-30 11:00:20 INFO: 2020-09-30 11:00:20 INFO: 2020-09-30 11:00:20 INFO: init new order start 2020-09-30 11:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 30, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 355.5, 'high': 356.55, 'low': 354.55, 'close': 354.95, 'trades': 2319, 'volume': 1583562, 'vwap': 355.59, 'lastSize': 70, 'turnover': 56309461725, 'homeNotional': 16968.58748254349, 'foreignNotional': 6033829.792710295}, {'timestamp': datetime.datetime(2020, 9, 30, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.25, 'high': 356.05, 'low': 353.4, 'close': 355.5, 'trades': 3149, 'volume': 2215144, 'vwap': 355.04, 'lastSize': 194, 'turnover': 78644435455, 'homeNotional': 23731.731446915124, 'foreignNotional': 8425511.163547562}, {'timestamp': datetime.datetime(2020, 9, 30, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.0, 'high': 356.55, 'low': 354.25, 'close': 354.25, 'trades': 2250, 'volume': 1198122, 'vwap': 355.58, 'lastSize': 50, 'turnover': 42602819965, 'homeNotional': 12867.603428850658, 'foreignNotional': 4575472.104642358}] 2020-09-30 11:00:20 INFO: prepare candles [CandleItem(low=354.55, high=356.55, open=355.5, close=354.95, color='RED'), CandleItem(low=353.4, high=356.05, open=354.25, close=355.5, color='GREEN'), CandleItem(low=354.25, high=356.55, open=356.0, close=354.25, color='RED')] 2020-09-30 11:00:20 INFO: skip by colors first_candle=CandleItem(low=354.25, high=356.55, open=356.0, close=354.25, color='RED') second_candle=CandleItem(low=353.4, high=356.05, open=354.25, close=355.5, color='GREEN') last_candle=CandleItem(low=354.55, high=356.55, open=355.5, close=354.95, color='RED') 2020-09-30 11:00:20 INFO: check need new order None 2020-09-30 11:00:20 INFO: init new order end 2020-09-30 11:00:20 INFO: 2020-09-30 11:00:20 INFO: 2020-09-30 11:00:20 INFO: 2020-09-30 11:00:20 INFO: 2020-09-30 11:02:00 INFO: 2020-09-30 11:02:00 INFO: 2020-09-30 11:02:00 INFO: 2020-09-30 11:02:00 INFO: 2020-09-30 11:02:00 INFO: clearing start 2020-09-30 11:02:00 INFO: clearing end 2020-09-30 11:02:00 INFO: 2020-09-30 11:02:00 INFO: 2020-09-30 11:02:00 INFO: 2020-09-30 11:02:00 INFO: 2020-09-30 12:00:20 INFO: 2020-09-30 12:00:20 INFO: 2020-09-30 12:00:20 INFO: 2020-09-30 12:00:20 INFO: 2020-09-30 12:00:20 INFO: init new order start 2020-09-30 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 30, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.95, 'high': 356.2, 'low': 354.0, 'close': 355.3, 'trades': 2203, 'volume': 1656897, 'vwap': 355.24, 'lastSize': 28, 'turnover': 58858195495, 'homeNotional': 17737.72410773113, 'foreignNotional': 6301009.186265475}, {'timestamp': datetime.datetime(2020, 9, 30, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 355.5, 'high': 356.55, 'low': 354.55, 'close': 354.95, 'trades': 2319, 'volume': 1583562, 'vwap': 355.59, 'lastSize': 70, 'turnover': 56309461725, 'homeNotional': 16968.58748254349, 'foreignNotional': 6033829.792710295}, {'timestamp': datetime.datetime(2020, 9, 30, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.25, 'high': 356.05, 'low': 353.4, 'close': 355.5, 'trades': 3149, 'volume': 2215144, 'vwap': 355.04, 'lastSize': 194, 'turnover': 78644435455, 'homeNotional': 23731.731446915124, 'foreignNotional': 8425511.163547562}] 2020-09-30 12:00:20 INFO: prepare candles [CandleItem(low=354.0, high=356.2, open=354.95, close=355.3, color='GREEN'), CandleItem(low=354.55, high=356.55, open=355.5, close=354.95, color='RED'), CandleItem(low=353.4, high=356.05, open=354.25, close=355.5, color='GREEN')] 2020-09-30 12:00:20 INFO: skip by colors first_candle=CandleItem(low=353.4, high=356.05, open=354.25, close=355.5, color='GREEN') second_candle=CandleItem(low=354.55, high=356.55, open=355.5, close=354.95, color='RED') last_candle=CandleItem(low=354.0, high=356.2, open=354.95, close=355.3, color='GREEN') 2020-09-30 12:00:20 INFO: check need new order None 2020-09-30 12:00:20 INFO: init new order end 2020-09-30 12:00:20 INFO: 2020-09-30 12:00:20 INFO: 2020-09-30 12:00:20 INFO: 2020-09-30 12:00:20 INFO: 2020-09-30 12:02:00 INFO: 2020-09-30 12:02:00 INFO: 2020-09-30 12:02:00 INFO: 2020-09-30 12:02:00 INFO: 2020-09-30 12:02:00 INFO: clearing start 2020-09-30 12:02:00 INFO: clearing end 2020-09-30 12:02:00 INFO: 2020-09-30 12:02:00 INFO: 2020-09-30 12:02:00 INFO: 2020-09-30 12:02:00 INFO: 2020-09-30 13:00:20 INFO: 2020-09-30 13:00:20 INFO: 2020-09-30 13:00:20 INFO: 2020-09-30 13:00:20 INFO: 2020-09-30 13:00:20 INFO: init new order start 2020-09-30 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 30, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 355.3, 'high': 355.35, 'low': 353.1, 'close': 354.5, 'trades': 2551, 'volume': 2261222, 'vwap': 353.99, 'lastSize': 1911, 'turnover': 80043287325, 'homeNotional': 24153.765744114913, 'foreignNotional': 8550018.529771116}, {'timestamp': datetime.datetime(2020, 9, 30, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.95, 'high': 356.2, 'low': 354.0, 'close': 355.3, 'trades': 2203, 'volume': 1656897, 'vwap': 355.24, 'lastSize': 28, 'turnover': 58858195495, 'homeNotional': 17737.72410773113, 'foreignNotional': 6301009.186265475}, {'timestamp': datetime.datetime(2020, 9, 30, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 355.5, 'high': 356.55, 'low': 354.55, 'close': 354.95, 'trades': 2319, 'volume': 1583562, 'vwap': 355.59, 'lastSize': 70, 'turnover': 56309461725, 'homeNotional': 16968.58748254349, 'foreignNotional': 6033829.792710295}] 2020-09-30 13:00:20 INFO: prepare candles [CandleItem(low=353.1, high=355.35, open=355.3, close=354.5, color='RED'), CandleItem(low=354.0, high=356.2, open=354.95, close=355.3, color='GREEN'), CandleItem(low=354.55, high=356.55, open=355.5, close=354.95, color='RED')] 2020-09-30 13:00:20 INFO: skip by colors first_candle=CandleItem(low=354.55, high=356.55, open=355.5, close=354.95, color='RED') second_candle=CandleItem(low=354.0, high=356.2, open=354.95, close=355.3, color='GREEN') last_candle=CandleItem(low=353.1, high=355.35, open=355.3, close=354.5, color='RED') 2020-09-30 13:00:20 INFO: check need new order None 2020-09-30 13:00:20 INFO: init new order end 2020-09-30 13:00:20 INFO: 2020-09-30 13:00:20 INFO: 2020-09-30 13:00:20 INFO: 2020-09-30 13:00:20 INFO: 2020-09-30 13:02:00 INFO: 2020-09-30 13:02:00 INFO: 2020-09-30 13:02:00 INFO: 2020-09-30 13:02:00 INFO: 2020-09-30 13:02:00 INFO: clearing start 2020-09-30 13:02:00 INFO: clearing end 2020-09-30 13:02:00 INFO: 2020-09-30 13:02:00 INFO: 2020-09-30 13:02:00 INFO: 2020-09-30 13:02:00 INFO: 2020-09-30 14:00:20 INFO: 2020-09-30 14:00:20 INFO: 2020-09-30 14:00:20 INFO: 2020-09-30 14:00:20 INFO: 2020-09-30 14:00:20 INFO: init new order start 2020-09-30 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 30, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.5, 'high': 355.7, 'low': 354.5, 'close': 355.4, 'trades': 1753, 'volume': 1682965, 'vwap': 355.05, 'lastSize': 30, 'turnover': 59753205850, 'homeNotional': 18022.669573068863, 'foreignNotional': 6398906.2800391745}, {'timestamp': datetime.datetime(2020, 9, 30, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 355.3, 'high': 355.35, 'low': 353.1, 'close': 354.5, 'trades': 2551, 'volume': 2261222, 'vwap': 353.99, 'lastSize': 1911, 'turnover': 80043287325, 'homeNotional': 24153.765744114913, 'foreignNotional': 8550018.529771116}, {'timestamp': datetime.datetime(2020, 9, 30, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.95, 'high': 356.2, 'low': 354.0, 'close': 355.3, 'trades': 2203, 'volume': 1656897, 'vwap': 355.24, 'lastSize': 28, 'turnover': 58858195495, 'homeNotional': 17737.72410773113, 'foreignNotional': 6301009.186265475}] 2020-09-30 14:00:20 INFO: prepare candles [CandleItem(low=354.5, high=355.7, open=354.5, close=355.4, color='GREEN'), CandleItem(low=353.1, high=355.35, open=355.3, close=354.5, color='RED'), CandleItem(low=354.0, high=356.2, open=354.95, close=355.3, color='GREEN')] 2020-09-30 14:00:20 INFO: skip by colors first_candle=CandleItem(low=354.0, high=356.2, open=354.95, close=355.3, color='GREEN') second_candle=CandleItem(low=353.1, high=355.35, open=355.3, close=354.5, color='RED') last_candle=CandleItem(low=354.5, high=355.7, open=354.5, close=355.4, color='GREEN') 2020-09-30 14:00:20 INFO: check need new order None 2020-09-30 14:00:20 INFO: init new order end 2020-09-30 14:00:20 INFO: 2020-09-30 14:00:20 INFO: 2020-09-30 14:00:20 INFO: 2020-09-30 14:00:20 INFO: 2020-09-30 14:02:00 INFO: 2020-09-30 14:02:00 INFO: 2020-09-30 14:02:00 INFO: 2020-09-30 14:02:00 INFO: 2020-09-30 14:02:00 INFO: clearing start 2020-09-30 14:02:01 INFO: clearing end 2020-09-30 14:02:01 INFO: 2020-09-30 14:02:01 INFO: 2020-09-30 14:02:01 INFO: 2020-09-30 14:02:01 INFO: 2020-09-30 15:00:20 INFO: 2020-09-30 15:00:20 INFO: 2020-09-30 15:00:20 INFO: 2020-09-30 15:00:20 INFO: 2020-09-30 15:00:20 INFO: init new order start 2020-09-30 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 30, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 355.4, 'high': 355.35, 'low': 352.55, 'close': 352.75, 'trades': 3312, 'volume': 2363179, 'vwap': 353.71, 'lastSize': 11, 'turnover': 83585904660, 'homeNotional': 25277.921174969048, 'foreignNotional': 8940850.558933076}, {'timestamp': datetime.datetime(2020, 9, 30, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.5, 'high': 355.7, 'low': 354.5, 'close': 355.4, 'trades': 1753, 'volume': 1682965, 'vwap': 355.05, 'lastSize': 30, 'turnover': 59753205850, 'homeNotional': 18022.669573068863, 'foreignNotional': 6398906.2800391745}, {'timestamp': datetime.datetime(2020, 9, 30, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 355.3, 'high': 355.35, 'low': 353.1, 'close': 354.5, 'trades': 2551, 'volume': 2261222, 'vwap': 353.99, 'lastSize': 1911, 'turnover': 80043287325, 'homeNotional': 24153.765744114913, 'foreignNotional': 8550018.529771116}] 2020-09-30 15:00:20 INFO: prepare candles [CandleItem(low=352.55, high=355.35, open=355.4, close=352.75, color='RED'), CandleItem(low=354.5, high=355.7, open=354.5, close=355.4, color='GREEN'), CandleItem(low=353.1, high=355.35, open=355.3, close=354.5, color='RED')] 2020-09-30 15:00:20 INFO: skip by colors first_candle=CandleItem(low=353.1, high=355.35, open=355.3, close=354.5, color='RED') second_candle=CandleItem(low=354.5, high=355.7, open=354.5, close=355.4, color='GREEN') last_candle=CandleItem(low=352.55, high=355.35, open=355.4, close=352.75, color='RED') 2020-09-30 15:00:20 INFO: check need new order None 2020-09-30 15:00:20 INFO: init new order end 2020-09-30 15:00:20 INFO: 2020-09-30 15:00:20 INFO: 2020-09-30 15:00:20 INFO: 2020-09-30 15:00:20 INFO: 2020-09-30 15:02:00 INFO: 2020-09-30 15:02:00 INFO: 2020-09-30 15:02:00 INFO: 2020-09-30 15:02:00 INFO: 2020-09-30 15:02:00 INFO: clearing start 2020-09-30 15:02:00 INFO: clearing end 2020-09-30 15:02:00 INFO: 2020-09-30 15:02:00 INFO: 2020-09-30 15:02:00 INFO: 2020-09-30 15:02:00 INFO: 2020-09-30 16:00:20 INFO: 2020-09-30 16:00:20 INFO: 2020-09-30 16:00:20 INFO: 2020-09-30 16:00:20 INFO: 2020-09-30 16:00:20 INFO: init new order start 2020-09-30 16:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 30, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.75, 'high': 355.7, 'low': 351.5, 'close': 355.3, 'trades': 4001, 'volume': 2830609, 'vwap': 354.26, 'lastSize': 78, 'turnover': 100274554970, 'homeNotional': 30316.43863674511, 'foreignNotional': 10739698.447908962}, {'timestamp': datetime.datetime(2020, 9, 30, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 355.4, 'high': 355.35, 'low': 352.55, 'close': 352.75, 'trades': 3312, 'volume': 2363179, 'vwap': 353.71, 'lastSize': 11, 'turnover': 83585904660, 'homeNotional': 25277.921174969048, 'foreignNotional': 8940850.558933076}, {'timestamp': datetime.datetime(2020, 9, 30, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.5, 'high': 355.7, 'low': 354.5, 'close': 355.4, 'trades': 1753, 'volume': 1682965, 'vwap': 355.05, 'lastSize': 30, 'turnover': 59753205850, 'homeNotional': 18022.669573068863, 'foreignNotional': 6398906.2800391745}] 2020-09-30 16:00:20 INFO: prepare candles [CandleItem(low=351.5, high=355.7, open=352.75, close=355.3, color='GREEN'), CandleItem(low=352.55, high=355.35, open=355.4, close=352.75, color='RED'), CandleItem(low=354.5, high=355.7, open=354.5, close=355.4, color='GREEN')] 2020-09-30 16:00:20 INFO: skip by colors first_candle=CandleItem(low=354.5, high=355.7, open=354.5, close=355.4, color='GREEN') second_candle=CandleItem(low=352.55, high=355.35, open=355.4, close=352.75, color='RED') last_candle=CandleItem(low=351.5, high=355.7, open=352.75, close=355.3, color='GREEN') 2020-09-30 16:00:20 INFO: check need new order None 2020-09-30 16:00:20 INFO: init new order end 2020-09-30 16:00:20 INFO: 2020-09-30 16:00:20 INFO: 2020-09-30 16:00:20 INFO: 2020-09-30 16:00:20 INFO: 2020-09-30 16:02:00 INFO: 2020-09-30 16:02:00 INFO: 2020-09-30 16:02:00 INFO: 2020-09-30 16:02:00 INFO: 2020-09-30 16:02:00 INFO: clearing start 2020-09-30 16:02:00 INFO: clearing end 2020-09-30 16:02:00 INFO: 2020-09-30 16:02:00 INFO: 2020-09-30 16:02:00 INFO: 2020-09-30 16:02:00 INFO: 2020-09-30 17:00:20 INFO: 2020-09-30 17:00:20 INFO: 2020-09-30 17:00:20 INFO: 2020-09-30 17:00:20 INFO: 2020-09-30 17:00:20 INFO: init new order start 2020-09-30 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 30, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 355.3, 'high': 356.2, 'low': 354.95, 'close': 355.7, 'trades': 2198, 'volume': 1619287, 'vwap': 355.54, 'lastSize': 1000, 'turnover': 57571240300, 'homeNotional': 17378.51933327947, 'foreignNotional': 6178665.516432672}, {'timestamp': datetime.datetime(2020, 9, 30, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.75, 'high': 355.7, 'low': 351.5, 'close': 355.3, 'trades': 4001, 'volume': 2830609, 'vwap': 354.26, 'lastSize': 78, 'turnover': 100274554970, 'homeNotional': 30316.43863674511, 'foreignNotional': 10739698.447908962}, {'timestamp': datetime.datetime(2020, 9, 30, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 355.4, 'high': 355.35, 'low': 352.55, 'close': 352.75, 'trades': 3312, 'volume': 2363179, 'vwap': 353.71, 'lastSize': 11, 'turnover': 83585904660, 'homeNotional': 25277.921174969048, 'foreignNotional': 8940850.558933076}] 2020-09-30 17:00:20 INFO: prepare candles [CandleItem(low=354.95, high=356.2, open=355.3, close=355.7, color='GREEN'), CandleItem(low=351.5, high=355.7, open=352.75, close=355.3, color='GREEN'), CandleItem(low=352.55, high=355.35, open=355.4, close=352.75, color='RED')] 2020-09-30 17:00:20 INFO: skip by colors first_candle=CandleItem(low=352.55, high=355.35, open=355.4, close=352.75, color='RED') second_candle=CandleItem(low=351.5, high=355.7, open=352.75, close=355.3, color='GREEN') last_candle=CandleItem(low=354.95, high=356.2, open=355.3, close=355.7, color='GREEN') 2020-09-30 17:00:20 INFO: check need new order None 2020-09-30 17:00:20 INFO: init new order end 2020-09-30 17:00:20 INFO: 2020-09-30 17:00:20 INFO: 2020-09-30 17:00:20 INFO: 2020-09-30 17:00:20 INFO: 2020-09-30 17:02:00 INFO: 2020-09-30 17:02:00 INFO: 2020-09-30 17:02:00 INFO: 2020-09-30 17:02:00 INFO: 2020-09-30 17:02:00 INFO: clearing start 2020-09-30 17:02:00 INFO: clearing end 2020-09-30 17:02:00 INFO: 2020-09-30 17:02:00 INFO: 2020-09-30 17:02:00 INFO: 2020-09-30 17:02:00 INFO: 2020-09-30 18:00:20 INFO: 2020-09-30 18:00:20 INFO: 2020-09-30 18:00:20 INFO: 2020-09-30 18:00:20 INFO: 2020-09-30 18:00:20 INFO: init new order start 2020-09-30 18:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 30, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 355.7, 'high': 356.95, 'low': 355.55, 'close': 355.55, 'trades': 2496, 'volume': 1597660, 'vwap': 356.12, 'lastSize': 388, 'turnover': 56894405120, 'homeNotional': 17171.966341941697, 'foreignNotional': 6115124.055371348}, {'timestamp': datetime.datetime(2020, 9, 30, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 355.3, 'high': 356.2, 'low': 354.95, 'close': 355.7, 'trades': 2198, 'volume': 1619287, 'vwap': 355.54, 'lastSize': 1000, 'turnover': 57571240300, 'homeNotional': 17378.51933327947, 'foreignNotional': 6178665.516432672}, {'timestamp': datetime.datetime(2020, 9, 30, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.75, 'high': 355.7, 'low': 351.5, 'close': 355.3, 'trades': 4001, 'volume': 2830609, 'vwap': 354.26, 'lastSize': 78, 'turnover': 100274554970, 'homeNotional': 30316.43863674511, 'foreignNotional': 10739698.447908962}] 2020-09-30 18:00:20 INFO: prepare candles [CandleItem(low=355.55, high=356.95, open=355.7, close=355.55, color='RED'), CandleItem(low=354.95, high=356.2, open=355.3, close=355.7, color='GREEN'), CandleItem(low=351.5, high=355.7, open=352.75, close=355.3, color='GREEN')] 2020-09-30 18:00:20 INFO: last_candle=CandleItem(low=355.55, high=356.95, open=355.7, close=355.55, color='RED') 2020-09-30 18:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-09-30 18:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=355.55, high=356.95, open=355.7, close=355.55, color='RED') 2020-09-30 18:00:20 INFO: skip by CandleItem(low=355.55, high=356.95, open=355.7, close=355.55, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-30 18:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-09-30 18:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=355.55, high=356.95, open=355.7, close=355.55, color='RED') 2020-09-30 18:00:20 INFO: skip by CandleItem(low=355.55, high=356.95, open=355.7, close=355.55, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-30 18:00:20 INFO: not found applicable config for candle 2020-09-30 18:00:20 INFO: check need new order None 2020-09-30 18:00:20 INFO: init new order end 2020-09-30 18:00:20 INFO: 2020-09-30 18:00:20 INFO: 2020-09-30 18:00:20 INFO: 2020-09-30 18:00:20 INFO: 2020-09-30 18:02:00 INFO: 2020-09-30 18:02:00 INFO: 2020-09-30 18:02:00 INFO: 2020-09-30 18:02:00 INFO: 2020-09-30 18:02:00 INFO: clearing start 2020-09-30 18:02:00 INFO: clearing end 2020-09-30 18:02:00 INFO: 2020-09-30 18:02:00 INFO: 2020-09-30 18:02:00 INFO: 2020-09-30 18:02:00 INFO: 2020-09-30 19:00:20 INFO: 2020-09-30 19:00:20 INFO: 2020-09-30 19:00:20 INFO: 2020-09-30 19:00:20 INFO: 2020-09-30 19:00:20 INFO: init new order start 2020-09-30 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 30, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 355.55, 'high': 357.8, 'low': 355.55, 'close': 357.55, 'trades': 2709, 'volume': 1979529, 'vwap': 357.1, 'lastSize': 219, 'turnover': 70687048055, 'homeNotional': 21328.602929506043, 'foreignNotional': 7616246.779778894}, {'timestamp': datetime.datetime(2020, 9, 30, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 355.7, 'high': 356.95, 'low': 355.55, 'close': 355.55, 'trades': 2496, 'volume': 1597660, 'vwap': 356.12, 'lastSize': 388, 'turnover': 56894405120, 'homeNotional': 17171.966341941697, 'foreignNotional': 6115124.055371348}, {'timestamp': datetime.datetime(2020, 9, 30, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 355.3, 'high': 356.2, 'low': 354.95, 'close': 355.7, 'trades': 2198, 'volume': 1619287, 'vwap': 355.54, 'lastSize': 1000, 'turnover': 57571240300, 'homeNotional': 17378.51933327947, 'foreignNotional': 6178665.516432672}] 2020-09-30 19:00:20 INFO: prepare candles [CandleItem(low=355.55, high=357.8, open=355.55, close=357.55, color='GREEN'), CandleItem(low=355.55, high=356.95, open=355.7, close=355.55, color='RED'), CandleItem(low=354.95, high=356.2, open=355.3, close=355.7, color='GREEN')] 2020-09-30 19:00:20 INFO: skip by colors first_candle=CandleItem(low=354.95, high=356.2, open=355.3, close=355.7, color='GREEN') second_candle=CandleItem(low=355.55, high=356.95, open=355.7, close=355.55, color='RED') last_candle=CandleItem(low=355.55, high=357.8, open=355.55, close=357.55, color='GREEN') 2020-09-30 19:00:20 INFO: check need new order None 2020-09-30 19:00:20 INFO: init new order end 2020-09-30 19:00:20 INFO: 2020-09-30 19:00:20 INFO: 2020-09-30 19:00:20 INFO: 2020-09-30 19:00:20 INFO: 2020-09-30 19:02:00 INFO: 2020-09-30 19:02:00 INFO: 2020-09-30 19:02:00 INFO: 2020-09-30 19:02:00 INFO: 2020-09-30 19:02:00 INFO: clearing start 2020-09-30 19:02:00 INFO: clearing end 2020-09-30 19:02:00 INFO: 2020-09-30 19:02:00 INFO: 2020-09-30 19:02:00 INFO: 2020-09-30 19:02:00 INFO: 2020-09-30 20:00:20 INFO: 2020-09-30 20:00:20 INFO: 2020-09-30 20:00:20 INFO: 2020-09-30 20:00:20 INFO: 2020-09-30 20:00:20 INFO: init new order start 2020-09-30 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 30, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.55, 'high': 358.9, 'low': 356.75, 'close': 357.95, 'trades': 2784, 'volume': 1809325, 'vwap': 357.91, 'lastSize': 5216, 'turnover': 64756653155, 'homeNotional': 19497.59731146779, 'foreignNotional': 6978293.2073327}, {'timestamp': datetime.datetime(2020, 9, 30, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 355.55, 'high': 357.8, 'low': 355.55, 'close': 357.55, 'trades': 2709, 'volume': 1979529, 'vwap': 357.1, 'lastSize': 219, 'turnover': 70687048055, 'homeNotional': 21328.602929506043, 'foreignNotional': 7616246.779778894}, {'timestamp': datetime.datetime(2020, 9, 30, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 355.7, 'high': 356.95, 'low': 355.55, 'close': 355.55, 'trades': 2496, 'volume': 1597660, 'vwap': 356.12, 'lastSize': 388, 'turnover': 56894405120, 'homeNotional': 17171.966341941697, 'foreignNotional': 6115124.055371348}] 2020-09-30 20:00:20 INFO: prepare candles [CandleItem(low=356.75, high=358.9, open=357.55, close=357.95, color='GREEN'), CandleItem(low=355.55, high=357.8, open=355.55, close=357.55, color='GREEN'), CandleItem(low=355.55, high=356.95, open=355.7, close=355.55, color='RED')] 2020-09-30 20:00:20 INFO: skip by colors first_candle=CandleItem(low=355.55, high=356.95, open=355.7, close=355.55, color='RED') second_candle=CandleItem(low=355.55, high=357.8, open=355.55, close=357.55, color='GREEN') last_candle=CandleItem(low=356.75, high=358.9, open=357.55, close=357.95, color='GREEN') 2020-09-30 20:00:20 INFO: check need new order None 2020-09-30 20:00:20 INFO: init new order end 2020-09-30 20:00:20 INFO: 2020-09-30 20:00:20 INFO: 2020-09-30 20:00:20 INFO: 2020-09-30 20:00:20 INFO: 2020-09-30 20:02:00 INFO: 2020-09-30 20:02:00 INFO: 2020-09-30 20:02:00 INFO: 2020-09-30 20:02:00 INFO: 2020-09-30 20:02:00 INFO: clearing start 2020-09-30 20:02:00 INFO: clearing end 2020-09-30 20:02:00 INFO: 2020-09-30 20:02:00 INFO: 2020-09-30 20:02:00 INFO: 2020-09-30 20:02:00 INFO: 2020-09-30 21:00:20 INFO: 2020-09-30 21:00:20 INFO: 2020-09-30 21:00:20 INFO: 2020-09-30 21:00:20 INFO: 2020-09-30 21:00:20 INFO: init new order start 2020-09-30 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 30, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.95, 'high': 358.7, 'low': 356.4, 'close': 357.35, 'trades': 2298, 'volume': 1740729, 'vwap': 357.39, 'lastSize': 20, 'turnover': 62210290910, 'homeNotional': 18755.199902135646, 'foreignNotional': 6702757.5929531455}, {'timestamp': datetime.datetime(2020, 9, 30, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.55, 'high': 358.9, 'low': 356.75, 'close': 357.95, 'trades': 2784, 'volume': 1809325, 'vwap': 357.91, 'lastSize': 5216, 'turnover': 64756653155, 'homeNotional': 19497.59731146779, 'foreignNotional': 6978293.2073327}, {'timestamp': datetime.datetime(2020, 9, 30, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 355.55, 'high': 357.8, 'low': 355.55, 'close': 357.55, 'trades': 2709, 'volume': 1979529, 'vwap': 357.1, 'lastSize': 219, 'turnover': 70687048055, 'homeNotional': 21328.602929506043, 'foreignNotional': 7616246.779778894}] 2020-09-30 21:00:20 INFO: prepare candles [CandleItem(low=356.4, high=358.7, open=357.95, close=357.35, color='RED'), CandleItem(low=356.75, high=358.9, open=357.55, close=357.95, color='GREEN'), CandleItem(low=355.55, high=357.8, open=355.55, close=357.55, color='GREEN')] 2020-09-30 21:00:20 INFO: last_candle=CandleItem(low=356.4, high=358.7, open=357.95, close=357.35, color='RED') 2020-09-30 21:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-09-30 21:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=356.4, high=358.7, open=357.95, close=357.35, color='RED') 2020-09-30 21:00:20 INFO: skip by CandleItem(low=356.4, high=358.7, open=357.95, close=357.35, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-30 21:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-09-30 21:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=356.4, high=358.7, open=357.95, close=357.35, color='RED') 2020-09-30 21:00:20 INFO: skip by CandleItem(low=356.4, high=358.7, open=357.95, close=357.35, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-30 21:00:20 INFO: not found applicable config for candle 2020-09-30 21:00:20 INFO: check need new order None 2020-09-30 21:00:20 INFO: init new order end 2020-09-30 21:00:20 INFO: 2020-09-30 21:00:20 INFO: 2020-09-30 21:00:20 INFO: 2020-09-30 21:00:20 INFO: 2020-09-30 21:02:00 INFO: 2020-09-30 21:02:00 INFO: 2020-09-30 21:02:00 INFO: 2020-09-30 21:02:00 INFO: 2020-09-30 21:02:00 INFO: clearing start 2020-09-30 21:02:00 INFO: clearing end 2020-09-30 21:02:00 INFO: 2020-09-30 21:02:00 INFO: 2020-09-30 21:02:00 INFO: 2020-09-30 21:02:00 INFO: 2020-09-30 22:00:20 INFO: 2020-09-30 22:00:20 INFO: 2020-09-30 22:00:20 INFO: 2020-09-30 22:00:20 INFO: 2020-09-30 22:00:20 INFO: init new order start 2020-09-30 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 30, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.35, 'high': 357.65, 'low': 354.95, 'close': 356.05, 'trades': 3147, 'volume': 2228410, 'vwap': 355.92, 'lastSize': 950, 'turnover': 79311706315, 'homeNotional': 23884.61758992594, 'foreignNotional': 8500854.590414392}, {'timestamp': datetime.datetime(2020, 9, 30, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.95, 'high': 358.7, 'low': 356.4, 'close': 357.35, 'trades': 2298, 'volume': 1740729, 'vwap': 357.39, 'lastSize': 20, 'turnover': 62210290910, 'homeNotional': 18755.199902135646, 'foreignNotional': 6702757.5929531455}, {'timestamp': datetime.datetime(2020, 9, 30, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.55, 'high': 358.9, 'low': 356.75, 'close': 357.95, 'trades': 2784, 'volume': 1809325, 'vwap': 357.91, 'lastSize': 5216, 'turnover': 64756653155, 'homeNotional': 19497.59731146779, 'foreignNotional': 6978293.2073327}] 2020-09-30 22:00:20 INFO: prepare candles [CandleItem(low=354.95, high=357.65, open=357.35, close=356.05, color='RED'), CandleItem(low=356.4, high=358.7, open=357.95, close=357.35, color='RED'), CandleItem(low=356.75, high=358.9, open=357.55, close=357.95, color='GREEN')] 2020-09-30 22:00:20 INFO: skip by colors first_candle=CandleItem(low=356.75, high=358.9, open=357.55, close=357.95, color='GREEN') second_candle=CandleItem(low=356.4, high=358.7, open=357.95, close=357.35, color='RED') last_candle=CandleItem(low=354.95, high=357.65, open=357.35, close=356.05, color='RED') 2020-09-30 22:00:20 INFO: check need new order None 2020-09-30 22:00:20 INFO: init new order end 2020-09-30 22:00:20 INFO: 2020-09-30 22:00:20 INFO: 2020-09-30 22:00:20 INFO: 2020-09-30 22:00:20 INFO: 2020-09-30 22:02:00 INFO: 2020-09-30 22:02:00 INFO: 2020-09-30 22:02:00 INFO: 2020-09-30 22:02:00 INFO: 2020-09-30 22:02:00 INFO: clearing start 2020-09-30 22:02:00 INFO: clearing end 2020-09-30 22:02:00 INFO: 2020-09-30 22:02:00 INFO: 2020-09-30 22:02:00 INFO: 2020-09-30 22:02:00 INFO: 2020-09-30 23:00:20 INFO: 2020-09-30 23:00:20 INFO: 2020-09-30 23:00:20 INFO: 2020-09-30 23:00:20 INFO: 2020-09-30 23:00:20 INFO: init new order start 2020-09-30 23:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 30, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.05, 'high': 356.2, 'low': 354.6, 'close': 355.7, 'trades': 2296, 'volume': 1860862, 'vwap': 355.42, 'lastSize': 10, 'turnover': 66137756020, 'homeNotional': 19935.936731585785, 'foreignNotional': 7085532.532024868}, {'timestamp': datetime.datetime(2020, 9, 30, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.35, 'high': 357.65, 'low': 354.95, 'close': 356.05, 'trades': 3147, 'volume': 2228410, 'vwap': 355.92, 'lastSize': 950, 'turnover': 79311706315, 'homeNotional': 23884.61758992594, 'foreignNotional': 8500854.590414392}, {'timestamp': datetime.datetime(2020, 9, 30, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.95, 'high': 358.7, 'low': 356.4, 'close': 357.35, 'trades': 2298, 'volume': 1740729, 'vwap': 357.39, 'lastSize': 20, 'turnover': 62210290910, 'homeNotional': 18755.199902135646, 'foreignNotional': 6702757.5929531455}] 2020-09-30 23:00:20 INFO: prepare candles [CandleItem(low=354.6, high=356.2, open=356.05, close=355.7, color='RED'), CandleItem(low=354.95, high=357.65, open=357.35, close=356.05, color='RED'), CandleItem(low=356.4, high=358.7, open=357.95, close=357.35, color='RED')] 2020-09-30 23:00:20 INFO: skip by colors first_candle=CandleItem(low=356.4, high=358.7, open=357.95, close=357.35, color='RED') second_candle=CandleItem(low=354.95, high=357.65, open=357.35, close=356.05, color='RED') last_candle=CandleItem(low=354.6, high=356.2, open=356.05, close=355.7, color='RED') 2020-09-30 23:00:20 INFO: check need new order None 2020-09-30 23:00:20 INFO: init new order end 2020-09-30 23:00:20 INFO: 2020-09-30 23:00:20 INFO: 2020-09-30 23:00:20 INFO: 2020-09-30 23:00:20 INFO: 2020-09-30 23:02:00 INFO: 2020-09-30 23:02:00 INFO: 2020-09-30 23:02:00 INFO: 2020-09-30 23:02:00 INFO: 2020-09-30 23:02:00 INFO: clearing start 2020-09-30 23:02:00 INFO: clearing end 2020-09-30 23:02:00 INFO: 2020-09-30 23:02:00 INFO: 2020-09-30 23:02:00 INFO: 2020-09-30 23:02:00 INFO: 2020-09-30 23:45:57 ERROR: Error : Connection is already closed. 2020-09-30 23:45:57 ERROR: error from callback >: Connection is already closed. 2020-09-30 23:45:57 INFO: Websocket Closed 2020-09-30 23:45:58 WARNING: reconnect to socket 2020-09-30 23:45:58 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-09-30 23:45:58 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-09-30 23:45:58 INFO: Authenticating with API Key. 2020-09-30 23:45:59 INFO: Connected to WS. 2020-10-01 00:00:20 INFO: 2020-10-01 00:00:20 INFO: 2020-10-01 00:00:20 INFO: 2020-10-01 00:00:20 INFO: 2020-10-01 00:00:20 INFO: init new order start 2020-10-01 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 30, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 355.7, 'high': 356.8, 'low': 355.15, 'close': 356.8, 'trades': 1687, 'volume': 1139214, 'vwap': 355.8, 'lastSize': 2, 'turnover': 40532589730, 'homeNotional': 12200.440929332884, 'foreignNotional': 4340852.601438701}, {'timestamp': datetime.datetime(2020, 9, 30, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.05, 'high': 356.2, 'low': 354.6, 'close': 355.7, 'trades': 2296, 'volume': 1860862, 'vwap': 355.42, 'lastSize': 10, 'turnover': 66137756020, 'homeNotional': 19935.936731585785, 'foreignNotional': 7085532.532024868}, {'timestamp': datetime.datetime(2020, 9, 30, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.35, 'high': 357.65, 'low': 354.95, 'close': 356.05, 'trades': 3147, 'volume': 2228410, 'vwap': 355.92, 'lastSize': 950, 'turnover': 79311706315, 'homeNotional': 23884.61758992594, 'foreignNotional': 8500854.590414392}] 2020-10-01 00:00:20 INFO: prepare candles [CandleItem(low=355.15, high=356.8, open=355.7, close=356.8, color='GREEN'), CandleItem(low=354.6, high=356.2, open=356.05, close=355.7, color='RED'), CandleItem(low=354.95, high=357.65, open=357.35, close=356.05, color='RED')] 2020-10-01 00:00:20 INFO: last_candle=CandleItem(low=355.15, high=356.8, open=355.7, close=356.8, color='GREEN') 2020-10-01 00:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-01 00:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=355.15, high=356.8, open=355.7, close=356.8, color='GREEN') 2020-10-01 00:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=354.6, high=356.2, open=356.05, close=355.7, color='RED') 2020-10-01 00:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=354.95, high=357.65, open=357.35, close=356.05, color='RED') 2020-10-01 00:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=355.15, high=356.8, open=355.7, close=356.8, color='GREEN'), take_profit_factor=6.0, clearing_interval=3600) 2020-10-01 00:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=355.15, high=356.8, open=355.7, close=356.8, color='GREEN'), take_profit_factor=6.0, clearing_interval=3600) 2020-10-01 00:00:20 INFO: place order: start candle=CandleItem(low=355.15, high=356.8, open=355.7, close=356.8, color='GREEN') ticker='ETHUSD' price_offset=0.1 2020-10-01 00:00:20 INFO: place order: side_factor=-1 init_trigger_price=356.85 init_order_price=356.90000000000003 stop_price_offset=0.0 candle.size=1.650000000000034 stop_price=355.15 take_price=366.80000000000024 2020-10-01 00:00:20 INFO: place order round: side_factor=-1 init_trigger_price=Decimal('356.8500000000000227373675443232059478759765625') init_order_price=Decimal('356.90000000000003410605131648480892181396484375') stop_price_offset=0.0 candle.size=1.650000000000034 stop_price=Decimal('355.1499999999999772626324556767940521240234375') take_price=Decimal('366.80000000000023874235921539366245269775390625') 2020-10-01 00:00:20 INFO: place order: compute qty=1118 2020-10-01 00:00:20 INFO: place order: save order to db 5bd6450a0d9a410a999d8f1f80386a82; response=True 2020-10-01 00:00:20 INFO: post order to exchange resp={'orderID': '375ffcf3-93ca-46b4-8e7d-c967f3209dd7', 'clOrdID': '5bd6450a0d9a410a999d8f1f80386a82', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1118, 'price': 356.9, 'displayQty': None, 'stopPx': 356.85, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1118, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 30, 21, 0, 20, 972000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 30, 21, 0, 20, 972000, tzinfo=tzutc())} 2020-10-01 00:00:20 INFO: place new init order {'qty': 1118, 'init_price': Decimal('356.8500000000000227373675443232059478759765625'), 'stop_price': Decimal('355.1499999999999772626324556767940521240234375'), 'take_price': Decimal('366.80000000000023874235921539366245269775390625'), 'order_uid': '5bd6450a0d9a410a999d8f1f80386a82', 'response': {'orderID': '375ffcf3-93ca-46b4-8e7d-c967f3209dd7', 'clOrdID': '5bd6450a0d9a410a999d8f1f80386a82', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1118, 'price': 356.9, 'displayQty': None, 'stopPx': 356.85, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1118, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 30, 21, 0, 20, 972000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 30, 21, 0, 20, 972000, tzinfo=tzutc())}} 2020-10-01 00:00:20 INFO: init new order end 2020-10-01 00:00:20 INFO: 2020-10-01 00:00:20 INFO: 2020-10-01 00:00:20 INFO: 2020-10-01 00:00:20 INFO: 2020-10-01 00:00:21 INFO: process event {'orderID': '375ffcf3-93ca-46b4-8e7d-c967f3209dd7', 'clOrdID': '5bd6450a0d9a410a999d8f1f80386a82', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1118, 'price': 356.9, 'displayQty': None, 'stopPx': 356.85, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1118, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-09-30T21:00:20.972Z', 'timestamp': '2020-09-30T21:00:20.972Z'} 2020-10-01 00:00:21 INFO: skip event 5bd6450a0d9a410a999d8f1f80386a82 New 2020-10-01 00:00:21 INFO: process event {'orderID': '375ffcf3-93ca-46b4-8e7d-c967f3209dd7', 'triggered': 'StopOrderTriggered', 'workingIndicator': True, 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'transactTime': '2020-09-30T21:00:20.977Z', 'timestamp': '2020-09-30T21:00:20.977Z', 'clOrdID': '5bd6450a0d9a410a999d8f1f80386a82', 'account': 605536, 'symbol': 'ETHUSD'} 2020-10-01 00:00:21 INFO: skip event 5bd6450a0d9a410a999d8f1f80386a82 2020-10-01 00:02:00 INFO: 2020-10-01 00:02:00 INFO: 2020-10-01 00:02:00 INFO: 2020-10-01 00:02:00 INFO: 2020-10-01 00:02:00 INFO: clearing start 2020-10-01 00:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '375ffcf3-93ca-46b4-8e7d-c967f3209dd7', 'clOrdID': '5bd6450a0d9a410a999d8f1f80386a82', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1118, 'price': 356.9, 'displayQty': None, 'stopPx': 356.85, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': 'StopOrderTriggered', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1118, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 30, 21, 0, 20, 977000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 30, 21, 0, 20, 977000, tzinfo=tzutc())} 2020-10-01 00:02:00 INFO: order time=2020-09-30 21:00:20.977000+00:00; delta from now UTC=0:01:39.183084 time_delta.total_seconds()=99.183084; time_diff_offset='3600' 2020-10-01 00:02:00 INFO: skip by time diff 2020-09-30 21:00:20.977000+00:00 2020-10-01 00:02:00 INFO: clearing end 2020-10-01 00:02:00 INFO: 2020-10-01 00:02:00 INFO: 2020-10-01 00:02:00 INFO: 2020-10-01 00:02:00 INFO: 2020-10-01 01:00:20 INFO: 2020-10-01 01:00:20 INFO: 2020-10-01 01:00:20 INFO: 2020-10-01 01:00:20 INFO: 2020-10-01 01:00:20 INFO: init new order start 2020-10-01 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 30, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.8, 'high': 358.5, 'low': 356.75, 'close': 357.35, 'trades': 2410, 'volume': 1758285, 'vwap': 357.86, 'lastSize': 100, 'turnover': 62920566990, 'homeNotional': 18849.16773867234, 'foreignNotional': 6745218.887993427}, {'timestamp': datetime.datetime(2020, 9, 30, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 355.7, 'high': 356.8, 'low': 355.15, 'close': 356.8, 'trades': 1687, 'volume': 1139214, 'vwap': 355.8, 'lastSize': 2, 'turnover': 40532589730, 'homeNotional': 12200.440929332884, 'foreignNotional': 4340852.601438701}, {'timestamp': datetime.datetime(2020, 9, 30, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.05, 'high': 356.2, 'low': 354.6, 'close': 355.7, 'trades': 2296, 'volume': 1860862, 'vwap': 355.42, 'lastSize': 10, 'turnover': 66137756020, 'homeNotional': 19935.936731585785, 'foreignNotional': 7085532.532024868}] 2020-10-01 01:00:20 INFO: prepare candles [CandleItem(low=356.75, high=358.5, open=356.8, close=357.35, color='GREEN'), CandleItem(low=355.15, high=356.8, open=355.7, close=356.8, color='GREEN'), CandleItem(low=354.6, high=356.2, open=356.05, close=355.7, color='RED')] 2020-10-01 01:00:20 INFO: skip by colors first_candle=CandleItem(low=354.6, high=356.2, open=356.05, close=355.7, color='RED') second_candle=CandleItem(low=355.15, high=356.8, open=355.7, close=356.8, color='GREEN') last_candle=CandleItem(low=356.75, high=358.5, open=356.8, close=357.35, color='GREEN') 2020-10-01 01:00:20 INFO: check need new order None 2020-10-01 01:00:20 INFO: init new order end 2020-10-01 01:00:20 INFO: 2020-10-01 01:00:20 INFO: 2020-10-01 01:00:20 INFO: 2020-10-01 01:00:20 INFO: 2020-10-01 01:02:00 INFO: 2020-10-01 01:02:00 INFO: 2020-10-01 01:02:00 INFO: 2020-10-01 01:02:00 INFO: 2020-10-01 01:02:00 INFO: clearing start 2020-10-01 01:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '375ffcf3-93ca-46b4-8e7d-c967f3209dd7', 'clOrdID': '5bd6450a0d9a410a999d8f1f80386a82', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1118, 'price': 356.9, 'displayQty': None, 'stopPx': 356.85, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': 'StopOrderTriggered', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1118, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 30, 21, 0, 20, 977000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 30, 21, 0, 20, 977000, tzinfo=tzutc())} 2020-10-01 01:02:01 INFO: order time=2020-09-30 21:00:20.977000+00:00; delta from now UTC=1:01:40.061804 time_delta.total_seconds()=3700.061804; time_diff_offset='3600' 2020-10-01 01:02:01 INFO: clear order 5bd6450a0d9a410a999d8f1f80386a82 2020-10-01 01:02:01 INFO: cancel order resp=[{'orderID': '375ffcf3-93ca-46b4-8e7d-c967f3209dd7', 'clOrdID': '5bd6450a0d9a410a999d8f1f80386a82', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1118, 'price': 356.9, 'displayQty': None, 'stopPx': 356.85, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'Canceled', 'triggered': 'StopOrderTriggered', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 0, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Canceled: cancelled by clearing\nInit order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 30, 21, 0, 20, 977000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 30, 22, 2, 1, 69000, tzinfo=tzutc())}] 2020-10-01 01:02:01 INFO: process event {'orderID': '375ffcf3-93ca-46b4-8e7d-c967f3209dd7', 'ordStatus': 'Canceled', 'workingIndicator': False, 'leavesQty': 0, 'text': 'Canceled: cancelled by clearing\nInit order by supervisor.py', 'timestamp': '2020-09-30T22:02:01.069Z', 'clOrdID': '5bd6450a0d9a410a999d8f1f80386a82', 'account': 605536, 'symbol': 'ETHUSD'} 2020-10-01 01:02:01 INFO: skip event 5bd6450a0d9a410a999d8f1f80386a82 Canceled 2020-10-01 01:02:01 INFO: clearing end 2020-10-01 01:02:01 INFO: 2020-10-01 01:02:01 INFO: 2020-10-01 01:02:01 INFO: 2020-10-01 01:02:01 INFO: 2020-10-01 02:00:20 INFO: 2020-10-01 02:00:20 INFO: 2020-10-01 02:00:20 INFO: 2020-10-01 02:00:20 INFO: 2020-10-01 02:00:20 INFO: init new order start 2020-10-01 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 30, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.35, 'high': 360.05, 'low': 357.35, 'close': 359.5, 'trades': 3210, 'volume': 2728371, 'vwap': 359.35, 'lastSize': 1000, 'turnover': 98043033970, 'homeNotional': 29299.395436356375, 'foreignNotional': 10528643.665590359}, {'timestamp': datetime.datetime(2020, 9, 30, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.8, 'high': 358.5, 'low': 356.75, 'close': 357.35, 'trades': 2410, 'volume': 1758285, 'vwap': 357.86, 'lastSize': 100, 'turnover': 62920566990, 'homeNotional': 18849.16773867234, 'foreignNotional': 6745218.887993427}, {'timestamp': datetime.datetime(2020, 9, 30, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 355.7, 'high': 356.8, 'low': 355.15, 'close': 356.8, 'trades': 1687, 'volume': 1139214, 'vwap': 355.8, 'lastSize': 2, 'turnover': 40532589730, 'homeNotional': 12200.440929332884, 'foreignNotional': 4340852.601438701}] 2020-10-01 02:00:20 INFO: prepare candles [CandleItem(low=357.35, high=360.05, open=357.35, close=359.5, color='GREEN'), CandleItem(low=356.75, high=358.5, open=356.8, close=357.35, color='GREEN'), CandleItem(low=355.15, high=356.8, open=355.7, close=356.8, color='GREEN')] 2020-10-01 02:00:20 INFO: skip by colors first_candle=CandleItem(low=355.15, high=356.8, open=355.7, close=356.8, color='GREEN') second_candle=CandleItem(low=356.75, high=358.5, open=356.8, close=357.35, color='GREEN') last_candle=CandleItem(low=357.35, high=360.05, open=357.35, close=359.5, color='GREEN') 2020-10-01 02:00:20 INFO: check need new order None 2020-10-01 02:00:20 INFO: init new order end 2020-10-01 02:00:20 INFO: 2020-10-01 02:00:20 INFO: 2020-10-01 02:00:20 INFO: 2020-10-01 02:00:20 INFO: 2020-10-01 02:02:00 INFO: 2020-10-01 02:02:00 INFO: 2020-10-01 02:02:00 INFO: 2020-10-01 02:02:00 INFO: 2020-10-01 02:02:00 INFO: clearing start 2020-10-01 02:02:00 INFO: clearing end 2020-10-01 02:02:00 INFO: 2020-10-01 02:02:00 INFO: 2020-10-01 02:02:00 INFO: 2020-10-01 02:02:00 INFO: 2020-10-01 03:00:20 INFO: 2020-10-01 03:00:20 INFO: 2020-10-01 03:00:20 INFO: 2020-10-01 03:00:20 INFO: 2020-10-01 03:00:20 INFO: init new order start 2020-10-01 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 1, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 359.5, 'high': 362.0, 'low': 359.45, 'close': 360.5, 'trades': 4068, 'volume': 2931641, 'vwap': 360.83, 'lastSize': 4316, 'turnover': 105779964040, 'homeNotional': 31565.510640617907, 'foreignNotional': 11389525.178759167}, {'timestamp': datetime.datetime(2020, 9, 30, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.35, 'high': 360.05, 'low': 357.35, 'close': 359.5, 'trades': 3210, 'volume': 2728371, 'vwap': 359.35, 'lastSize': 1000, 'turnover': 98043033970, 'homeNotional': 29299.395436356375, 'foreignNotional': 10528643.665590359}, {'timestamp': datetime.datetime(2020, 9, 30, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.8, 'high': 358.5, 'low': 356.75, 'close': 357.35, 'trades': 2410, 'volume': 1758285, 'vwap': 357.86, 'lastSize': 100, 'turnover': 62920566990, 'homeNotional': 18849.16773867234, 'foreignNotional': 6745218.887993427}] 2020-10-01 03:00:20 INFO: prepare candles [CandleItem(low=359.45, high=362.0, open=359.5, close=360.5, color='GREEN'), CandleItem(low=357.35, high=360.05, open=357.35, close=359.5, color='GREEN'), CandleItem(low=356.75, high=358.5, open=356.8, close=357.35, color='GREEN')] 2020-10-01 03:00:20 INFO: skip by colors first_candle=CandleItem(low=356.75, high=358.5, open=356.8, close=357.35, color='GREEN') second_candle=CandleItem(low=357.35, high=360.05, open=357.35, close=359.5, color='GREEN') last_candle=CandleItem(low=359.45, high=362.0, open=359.5, close=360.5, color='GREEN') 2020-10-01 03:00:20 INFO: check need new order None 2020-10-01 03:00:20 INFO: init new order end 2020-10-01 03:00:20 INFO: 2020-10-01 03:00:20 INFO: 2020-10-01 03:00:20 INFO: 2020-10-01 03:00:20 INFO: 2020-10-01 03:02:00 INFO: 2020-10-01 03:02:00 INFO: 2020-10-01 03:02:00 INFO: 2020-10-01 03:02:00 INFO: 2020-10-01 03:02:00 INFO: clearing start 2020-10-01 03:02:00 INFO: clearing end 2020-10-01 03:02:00 INFO: 2020-10-01 03:02:00 INFO: 2020-10-01 03:02:00 INFO: 2020-10-01 03:02:00 INFO: 2020-10-01 04:00:20 INFO: 2020-10-01 04:00:20 INFO: 2020-10-01 04:00:20 INFO: 2020-10-01 04:00:20 INFO: 2020-10-01 04:00:20 INFO: init new order start 2020-10-01 04:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 1, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 360.5, 'high': 361.55, 'low': 359.25, 'close': 359.7, 'trades': 3083, 'volume': 2598525, 'vwap': 360.47, 'lastSize': 265, 'turnover': 93668994460, 'homeNotional': 28069.006146324104, 'foreignNotional': 10118033.258215068}, {'timestamp': datetime.datetime(2020, 10, 1, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 359.5, 'high': 362.0, 'low': 359.45, 'close': 360.5, 'trades': 4068, 'volume': 2931641, 'vwap': 360.83, 'lastSize': 4316, 'turnover': 105779964040, 'homeNotional': 31565.510640617907, 'foreignNotional': 11389525.178759167}, {'timestamp': datetime.datetime(2020, 9, 30, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.35, 'high': 360.05, 'low': 357.35, 'close': 359.5, 'trades': 3210, 'volume': 2728371, 'vwap': 359.35, 'lastSize': 1000, 'turnover': 98043033970, 'homeNotional': 29299.395436356375, 'foreignNotional': 10528643.665590359}] 2020-10-01 04:00:21 INFO: prepare candles [CandleItem(low=359.25, high=361.55, open=360.5, close=359.7, color='RED'), CandleItem(low=359.45, high=362.0, open=359.5, close=360.5, color='GREEN'), CandleItem(low=357.35, high=360.05, open=357.35, close=359.5, color='GREEN')] 2020-10-01 04:00:21 INFO: last_candle=CandleItem(low=359.25, high=361.55, open=360.5, close=359.7, color='RED') 2020-10-01 04:00:21 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-01 04:00:21 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=359.25, high=361.55, open=360.5, close=359.7, color='RED') 2020-10-01 04:00:21 INFO: skip by CandleItem(low=359.25, high=361.55, open=360.5, close=359.7, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-01 04:00:21 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-01 04:00:21 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=359.25, high=361.55, open=360.5, close=359.7, color='RED') 2020-10-01 04:00:21 INFO: skip by CandleItem(low=359.25, high=361.55, open=360.5, close=359.7, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-01 04:00:21 INFO: not found applicable config for candle 2020-10-01 04:00:21 INFO: check need new order None 2020-10-01 04:00:21 INFO: init new order end 2020-10-01 04:00:21 INFO: 2020-10-01 04:00:21 INFO: 2020-10-01 04:00:21 INFO: 2020-10-01 04:00:21 INFO: 2020-10-01 04:02:00 INFO: 2020-10-01 04:02:00 INFO: 2020-10-01 04:02:00 INFO: 2020-10-01 04:02:00 INFO: 2020-10-01 04:02:00 INFO: clearing start 2020-10-01 04:02:00 INFO: clearing end 2020-10-01 04:02:00 INFO: 2020-10-01 04:02:00 INFO: 2020-10-01 04:02:00 INFO: 2020-10-01 04:02:00 INFO: 2020-10-01 05:00:20 INFO: 2020-10-01 05:00:20 INFO: 2020-10-01 05:00:20 INFO: 2020-10-01 05:00:20 INFO: 2020-10-01 05:00:20 INFO: init new order start 2020-10-01 05:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 1, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 359.7, 'high': 361.8, 'low': 359.4, 'close': 361.8, 'trades': 1421, 'volume': 1456761, 'vwap': 360.64, 'lastSize': 10000, 'turnover': 52536394480, 'homeNotional': 15759.519121268351, 'foreignNotional': 5683505.110404888}, {'timestamp': datetime.datetime(2020, 10, 1, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 360.5, 'high': 361.55, 'low': 359.25, 'close': 359.7, 'trades': 3083, 'volume': 2598525, 'vwap': 360.47, 'lastSize': 265, 'turnover': 93668994460, 'homeNotional': 28069.006146324104, 'foreignNotional': 10118033.258215068}, {'timestamp': datetime.datetime(2020, 10, 1, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 359.5, 'high': 362.0, 'low': 359.45, 'close': 360.5, 'trades': 4068, 'volume': 2931641, 'vwap': 360.83, 'lastSize': 4316, 'turnover': 105779964040, 'homeNotional': 31565.510640617907, 'foreignNotional': 11389525.178759167}] 2020-10-01 05:00:20 INFO: prepare candles [CandleItem(low=359.4, high=361.8, open=359.7, close=361.8, color='GREEN'), CandleItem(low=359.25, high=361.55, open=360.5, close=359.7, color='RED'), CandleItem(low=359.45, high=362.0, open=359.5, close=360.5, color='GREEN')] 2020-10-01 05:00:20 INFO: skip by colors first_candle=CandleItem(low=359.45, high=362.0, open=359.5, close=360.5, color='GREEN') second_candle=CandleItem(low=359.25, high=361.55, open=360.5, close=359.7, color='RED') last_candle=CandleItem(low=359.4, high=361.8, open=359.7, close=361.8, color='GREEN') 2020-10-01 05:00:20 INFO: check need new order None 2020-10-01 05:00:20 INFO: init new order end 2020-10-01 05:00:20 INFO: 2020-10-01 05:00:20 INFO: 2020-10-01 05:00:20 INFO: 2020-10-01 05:00:20 INFO: 2020-10-01 05:02:00 INFO: 2020-10-01 05:02:00 INFO: 2020-10-01 05:02:00 INFO: 2020-10-01 05:02:00 INFO: 2020-10-01 05:02:00 INFO: clearing start 2020-10-01 05:02:00 INFO: clearing end 2020-10-01 05:02:00 INFO: 2020-10-01 05:02:00 INFO: 2020-10-01 05:02:00 INFO: 2020-10-01 05:02:00 INFO: 2020-10-01 06:00:20 INFO: 2020-10-01 06:00:20 INFO: 2020-10-01 06:00:20 INFO: 2020-10-01 06:00:20 INFO: 2020-10-01 06:00:20 INFO: init new order start 2020-10-01 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 1, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 361.8, 'high': 364.5, 'low': 361.8, 'close': 363.0, 'trades': 4243, 'volume': 4595591, 'vwap': 363.63, 'lastSize': 648, 'turnover': 167107977820, 'homeNotional': 49799.338174300006, 'foreignNotional': 18108376.47872375}, {'timestamp': datetime.datetime(2020, 10, 1, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 359.7, 'high': 361.8, 'low': 359.4, 'close': 361.8, 'trades': 1421, 'volume': 1456761, 'vwap': 360.64, 'lastSize': 10000, 'turnover': 52536394480, 'homeNotional': 15759.519121268351, 'foreignNotional': 5683505.110404888}, {'timestamp': datetime.datetime(2020, 10, 1, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 360.5, 'high': 361.55, 'low': 359.25, 'close': 359.7, 'trades': 3083, 'volume': 2598525, 'vwap': 360.47, 'lastSize': 265, 'turnover': 93668994460, 'homeNotional': 28069.006146324104, 'foreignNotional': 10118033.258215068}] 2020-10-01 06:00:20 INFO: prepare candles [CandleItem(low=361.8, high=364.5, open=361.8, close=363.0, color='GREEN'), CandleItem(low=359.4, high=361.8, open=359.7, close=361.8, color='GREEN'), CandleItem(low=359.25, high=361.55, open=360.5, close=359.7, color='RED')] 2020-10-01 06:00:20 INFO: skip by colors first_candle=CandleItem(low=359.25, high=361.55, open=360.5, close=359.7, color='RED') second_candle=CandleItem(low=359.4, high=361.8, open=359.7, close=361.8, color='GREEN') last_candle=CandleItem(low=361.8, high=364.5, open=361.8, close=363.0, color='GREEN') 2020-10-01 06:00:20 INFO: check need new order None 2020-10-01 06:00:20 INFO: init new order end 2020-10-01 06:00:20 INFO: 2020-10-01 06:00:20 INFO: 2020-10-01 06:00:20 INFO: 2020-10-01 06:00:20 INFO: 2020-10-01 06:02:00 INFO: 2020-10-01 06:02:00 INFO: 2020-10-01 06:02:00 INFO: 2020-10-01 06:02:00 INFO: 2020-10-01 06:02:00 INFO: clearing start 2020-10-01 06:02:00 INFO: clearing end 2020-10-01 06:02:00 INFO: 2020-10-01 06:02:00 INFO: 2020-10-01 06:02:00 INFO: 2020-10-01 06:02:00 INFO: 2020-10-01 07:00:20 INFO: 2020-10-01 07:00:20 INFO: 2020-10-01 07:00:20 INFO: 2020-10-01 07:00:20 INFO: 2020-10-01 07:00:20 INFO: init new order start 2020-10-01 07:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 1, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.0, 'high': 363.45, 'low': 362.6, 'close': 362.65, 'trades': 1252, 'volume': 724462, 'vwap': 362.85, 'lastSize': 530, 'turnover': 26287059075, 'homeNotional': 7832.7392186390025, 'foreignNotional': 2842105.536370899}, {'timestamp': datetime.datetime(2020, 10, 1, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 361.8, 'high': 364.5, 'low': 361.8, 'close': 363.0, 'trades': 4243, 'volume': 4595591, 'vwap': 363.63, 'lastSize': 648, 'turnover': 167107977820, 'homeNotional': 49799.338174300006, 'foreignNotional': 18108376.47872375}, {'timestamp': datetime.datetime(2020, 10, 1, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 359.7, 'high': 361.8, 'low': 359.4, 'close': 361.8, 'trades': 1421, 'volume': 1456761, 'vwap': 360.64, 'lastSize': 10000, 'turnover': 52536394480, 'homeNotional': 15759.519121268351, 'foreignNotional': 5683505.110404888}] 2020-10-01 07:00:20 INFO: prepare candles [CandleItem(low=362.6, high=363.45, open=363.0, close=362.65, color='RED'), CandleItem(low=361.8, high=364.5, open=361.8, close=363.0, color='GREEN'), CandleItem(low=359.4, high=361.8, open=359.7, close=361.8, color='GREEN')] 2020-10-01 07:00:20 INFO: last_candle=CandleItem(low=362.6, high=363.45, open=363.0, close=362.65, color='RED') 2020-10-01 07:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-01 07:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=362.6, high=363.45, open=363.0, close=362.65, color='RED') 2020-10-01 07:00:20 INFO: skip by CandleItem(low=362.6, high=363.45, open=363.0, close=362.65, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-01 07:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-01 07:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=362.6, high=363.45, open=363.0, close=362.65, color='RED') 2020-10-01 07:00:20 INFO: skip by CandleItem(low=362.6, high=363.45, open=363.0, close=362.65, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-01 07:00:20 INFO: not found applicable config for candle 2020-10-01 07:00:20 INFO: check need new order None 2020-10-01 07:00:20 INFO: init new order end 2020-10-01 07:00:20 INFO: 2020-10-01 07:00:20 INFO: 2020-10-01 07:00:20 INFO: 2020-10-01 07:00:20 INFO: 2020-10-01 07:02:00 INFO: 2020-10-01 07:02:00 INFO: 2020-10-01 07:02:00 INFO: 2020-10-01 07:02:00 INFO: 2020-10-01 07:02:00 INFO: clearing start 2020-10-01 07:02:00 INFO: clearing end 2020-10-01 07:02:00 INFO: 2020-10-01 07:02:00 INFO: 2020-10-01 07:02:00 INFO: 2020-10-01 07:02:00 INFO: 2020-10-01 08:00:20 INFO: 2020-10-01 08:00:20 INFO: 2020-10-01 08:00:20 INFO: 2020-10-01 08:00:20 INFO: 2020-10-01 08:00:20 INFO: init new order start 2020-10-01 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 1, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 362.65, 'high': 364.35, 'low': 362.6, 'close': 362.7, 'trades': 2234, 'volume': 1414531, 'vwap': 363.36, 'lastSize': 1, 'turnover': 51398254720, 'homeNotional': 15297.079189534914, 'foreignNotional': 5558337.042595477}, {'timestamp': datetime.datetime(2020, 10, 1, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.0, 'high': 363.45, 'low': 362.6, 'close': 362.65, 'trades': 1252, 'volume': 724462, 'vwap': 362.85, 'lastSize': 530, 'turnover': 26287059075, 'homeNotional': 7832.7392186390025, 'foreignNotional': 2842105.536370899}, {'timestamp': datetime.datetime(2020, 10, 1, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 361.8, 'high': 364.5, 'low': 361.8, 'close': 363.0, 'trades': 4243, 'volume': 4595591, 'vwap': 363.63, 'lastSize': 648, 'turnover': 167107977820, 'homeNotional': 49799.338174300006, 'foreignNotional': 18108376.47872375}] 2020-10-01 08:00:20 INFO: prepare candles [CandleItem(low=362.6, high=364.35, open=362.65, close=362.7, color='GREEN'), CandleItem(low=362.6, high=363.45, open=363.0, close=362.65, color='RED'), CandleItem(low=361.8, high=364.5, open=361.8, close=363.0, color='GREEN')] 2020-10-01 08:00:20 INFO: skip by colors first_candle=CandleItem(low=361.8, high=364.5, open=361.8, close=363.0, color='GREEN') second_candle=CandleItem(low=362.6, high=363.45, open=363.0, close=362.65, color='RED') last_candle=CandleItem(low=362.6, high=364.35, open=362.65, close=362.7, color='GREEN') 2020-10-01 08:00:20 INFO: check need new order None 2020-10-01 08:00:20 INFO: init new order end 2020-10-01 08:00:20 INFO: 2020-10-01 08:00:20 INFO: 2020-10-01 08:00:20 INFO: 2020-10-01 08:00:20 INFO: 2020-10-01 08:02:00 INFO: 2020-10-01 08:02:00 INFO: 2020-10-01 08:02:00 INFO: 2020-10-01 08:02:00 INFO: 2020-10-01 08:02:00 INFO: clearing start 2020-10-01 08:02:00 INFO: clearing end 2020-10-01 08:02:00 INFO: 2020-10-01 08:02:00 INFO: 2020-10-01 08:02:00 INFO: 2020-10-01 08:02:00 INFO: 2020-10-01 09:00:20 INFO: 2020-10-01 09:00:20 INFO: 2020-10-01 09:00:20 INFO: 2020-10-01 09:00:20 INFO: 2020-10-01 09:00:20 INFO: init new order start 2020-10-01 09:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 1, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 362.7, 'high': 363.0, 'low': 360.8, 'close': 362.3, 'trades': 1841, 'volume': 1579771, 'vwap': 362.02, 'lastSize': 1, 'turnover': 57189738415, 'homeNotional': 17087.88329955528, 'foreignNotional': 6186037.950208001}, {'timestamp': datetime.datetime(2020, 10, 1, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 362.65, 'high': 364.35, 'low': 362.6, 'close': 362.7, 'trades': 2234, 'volume': 1414531, 'vwap': 363.36, 'lastSize': 1, 'turnover': 51398254720, 'homeNotional': 15297.079189534914, 'foreignNotional': 5558337.042595477}, {'timestamp': datetime.datetime(2020, 10, 1, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.0, 'high': 363.45, 'low': 362.6, 'close': 362.65, 'trades': 1252, 'volume': 724462, 'vwap': 362.85, 'lastSize': 530, 'turnover': 26287059075, 'homeNotional': 7832.7392186390025, 'foreignNotional': 2842105.536370899}] 2020-10-01 09:00:20 INFO: prepare candles [CandleItem(low=360.8, high=363.0, open=362.7, close=362.3, color='RED'), CandleItem(low=362.6, high=364.35, open=362.65, close=362.7, color='GREEN'), CandleItem(low=362.6, high=363.45, open=363.0, close=362.65, color='RED')] 2020-10-01 09:00:20 INFO: skip by colors first_candle=CandleItem(low=362.6, high=363.45, open=363.0, close=362.65, color='RED') second_candle=CandleItem(low=362.6, high=364.35, open=362.65, close=362.7, color='GREEN') last_candle=CandleItem(low=360.8, high=363.0, open=362.7, close=362.3, color='RED') 2020-10-01 09:00:20 INFO: check need new order None 2020-10-01 09:00:20 INFO: init new order end 2020-10-01 09:00:20 INFO: 2020-10-01 09:00:20 INFO: 2020-10-01 09:00:20 INFO: 2020-10-01 09:00:20 INFO: 2020-10-01 09:02:00 INFO: 2020-10-01 09:02:00 INFO: 2020-10-01 09:02:00 INFO: 2020-10-01 09:02:00 INFO: 2020-10-01 09:02:00 INFO: clearing start 2020-10-01 09:02:00 INFO: clearing end 2020-10-01 09:02:00 INFO: 2020-10-01 09:02:00 INFO: 2020-10-01 09:02:00 INFO: 2020-10-01 09:02:00 INFO: 2020-10-01 10:00:20 INFO: 2020-10-01 10:00:20 INFO: 2020-10-01 10:00:20 INFO: 2020-10-01 10:00:20 INFO: 2020-10-01 10:00:20 INFO: init new order start 2020-10-01 10:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 1, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 362.3, 'high': 364.15, 'low': 362.3, 'close': 363.2, 'trades': 2875, 'volume': 1773642, 'vwap': 363.36, 'lastSize': 1, 'turnover': 64446464565, 'homeNotional': 19219.27792172222, 'foreignNotional': 6983456.544732452}, {'timestamp': datetime.datetime(2020, 10, 1, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 362.7, 'high': 363.0, 'low': 360.8, 'close': 362.3, 'trades': 1841, 'volume': 1579771, 'vwap': 362.02, 'lastSize': 1, 'turnover': 57189738415, 'homeNotional': 17087.88329955528, 'foreignNotional': 6186037.950208001}, {'timestamp': datetime.datetime(2020, 10, 1, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 362.65, 'high': 364.35, 'low': 362.6, 'close': 362.7, 'trades': 2234, 'volume': 1414531, 'vwap': 363.36, 'lastSize': 1, 'turnover': 51398254720, 'homeNotional': 15297.079189534914, 'foreignNotional': 5558337.042595477}] 2020-10-01 10:00:20 INFO: prepare candles [CandleItem(low=362.3, high=364.15, open=362.3, close=363.2, color='GREEN'), CandleItem(low=360.8, high=363.0, open=362.7, close=362.3, color='RED'), CandleItem(low=362.6, high=364.35, open=362.65, close=362.7, color='GREEN')] 2020-10-01 10:00:20 INFO: skip by colors first_candle=CandleItem(low=362.6, high=364.35, open=362.65, close=362.7, color='GREEN') second_candle=CandleItem(low=360.8, high=363.0, open=362.7, close=362.3, color='RED') last_candle=CandleItem(low=362.3, high=364.15, open=362.3, close=363.2, color='GREEN') 2020-10-01 10:00:20 INFO: check need new order None 2020-10-01 10:00:20 INFO: init new order end 2020-10-01 10:00:20 INFO: 2020-10-01 10:00:20 INFO: 2020-10-01 10:00:20 INFO: 2020-10-01 10:00:20 INFO: 2020-10-01 10:02:00 INFO: 2020-10-01 10:02:00 INFO: 2020-10-01 10:02:00 INFO: 2020-10-01 10:02:00 INFO: 2020-10-01 10:02:00 INFO: clearing start 2020-10-01 10:02:00 INFO: clearing end 2020-10-01 10:02:00 INFO: 2020-10-01 10:02:00 INFO: 2020-10-01 10:02:00 INFO: 2020-10-01 10:02:00 INFO: 2020-10-01 11:00:20 INFO: 2020-10-01 11:00:20 INFO: 2020-10-01 11:00:20 INFO: 2020-10-01 11:00:20 INFO: 2020-10-01 11:00:20 INFO: init new order start 2020-10-01 11:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 1, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.2, 'high': 364.35, 'low': 362.65, 'close': 364.35, 'trades': 2153, 'volume': 1358611, 'vwap': 363.46, 'lastSize': 7, 'turnover': 49379002100, 'homeNotional': 14707.761874396883, 'foreignNotional': 5345570.620050668}, {'timestamp': datetime.datetime(2020, 10, 1, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 362.3, 'high': 364.15, 'low': 362.3, 'close': 363.2, 'trades': 2875, 'volume': 1773642, 'vwap': 363.36, 'lastSize': 1, 'turnover': 64446464565, 'homeNotional': 19219.27792172222, 'foreignNotional': 6983456.544732452}, {'timestamp': datetime.datetime(2020, 10, 1, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 362.7, 'high': 363.0, 'low': 360.8, 'close': 362.3, 'trades': 1841, 'volume': 1579771, 'vwap': 362.02, 'lastSize': 1, 'turnover': 57189738415, 'homeNotional': 17087.88329955528, 'foreignNotional': 6186037.950208001}] 2020-10-01 11:00:20 INFO: prepare candles [CandleItem(low=362.65, high=364.35, open=363.2, close=364.35, color='GREEN'), CandleItem(low=362.3, high=364.15, open=362.3, close=363.2, color='GREEN'), CandleItem(low=360.8, high=363.0, open=362.7, close=362.3, color='RED')] 2020-10-01 11:00:20 INFO: skip by colors first_candle=CandleItem(low=360.8, high=363.0, open=362.7, close=362.3, color='RED') second_candle=CandleItem(low=362.3, high=364.15, open=362.3, close=363.2, color='GREEN') last_candle=CandleItem(low=362.65, high=364.35, open=363.2, close=364.35, color='GREEN') 2020-10-01 11:00:20 INFO: check need new order None 2020-10-01 11:00:20 INFO: init new order end 2020-10-01 11:00:20 INFO: 2020-10-01 11:00:20 INFO: 2020-10-01 11:00:20 INFO: 2020-10-01 11:00:20 INFO: 2020-10-01 11:02:00 INFO: 2020-10-01 11:02:00 INFO: 2020-10-01 11:02:00 INFO: 2020-10-01 11:02:00 INFO: 2020-10-01 11:02:00 INFO: clearing start 2020-10-01 11:02:00 INFO: clearing end 2020-10-01 11:02:00 INFO: 2020-10-01 11:02:00 INFO: 2020-10-01 11:02:00 INFO: 2020-10-01 11:02:00 INFO: 2020-10-01 12:00:20 INFO: 2020-10-01 12:00:20 INFO: 2020-10-01 12:00:20 INFO: 2020-10-01 12:00:20 INFO: 2020-10-01 12:00:20 INFO: init new order start 2020-10-01 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 1, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.35, 'high': 371.3, 'low': 363.5, 'close': 367.85, 'trades': 11511, 'volume': 8513853, 'vwap': 367.36, 'lastSize': 400, 'turnover': 312760541220, 'homeNotional': 92573.6880691098, 'foreignNotional': 34007607.90054746}, {'timestamp': datetime.datetime(2020, 10, 1, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.2, 'high': 364.35, 'low': 362.65, 'close': 364.35, 'trades': 2153, 'volume': 1358611, 'vwap': 363.46, 'lastSize': 7, 'turnover': 49379002100, 'homeNotional': 14707.761874396883, 'foreignNotional': 5345570.620050668}, {'timestamp': datetime.datetime(2020, 10, 1, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 362.3, 'high': 364.15, 'low': 362.3, 'close': 363.2, 'trades': 2875, 'volume': 1773642, 'vwap': 363.36, 'lastSize': 1, 'turnover': 64446464565, 'homeNotional': 19219.27792172222, 'foreignNotional': 6983456.544732452}] 2020-10-01 12:00:20 INFO: prepare candles [CandleItem(low=363.5, high=371.3, open=364.35, close=367.85, color='GREEN'), CandleItem(low=362.65, high=364.35, open=363.2, close=364.35, color='GREEN'), CandleItem(low=362.3, high=364.15, open=362.3, close=363.2, color='GREEN')] 2020-10-01 12:00:20 INFO: skip by colors first_candle=CandleItem(low=362.3, high=364.15, open=362.3, close=363.2, color='GREEN') second_candle=CandleItem(low=362.65, high=364.35, open=363.2, close=364.35, color='GREEN') last_candle=CandleItem(low=363.5, high=371.3, open=364.35, close=367.85, color='GREEN') 2020-10-01 12:00:20 INFO: check need new order None 2020-10-01 12:00:20 INFO: init new order end 2020-10-01 12:00:20 INFO: 2020-10-01 12:00:20 INFO: 2020-10-01 12:00:20 INFO: 2020-10-01 12:00:20 INFO: 2020-10-01 12:02:00 INFO: 2020-10-01 12:02:00 INFO: 2020-10-01 12:02:00 INFO: 2020-10-01 12:02:00 INFO: 2020-10-01 12:02:00 INFO: clearing start 2020-10-01 12:02:00 INFO: clearing end 2020-10-01 12:02:00 INFO: 2020-10-01 12:02:00 INFO: 2020-10-01 12:02:00 INFO: 2020-10-01 12:02:00 INFO: 2020-10-01 13:00:20 INFO: 2020-10-01 13:00:20 INFO: 2020-10-01 13:00:20 INFO: 2020-10-01 13:00:20 INFO: 2020-10-01 13:00:20 INFO: init new order start 2020-10-01 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 1, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.85, 'high': 368.65, 'low': 367.8, 'close': 368.1, 'trades': 1945, 'volume': 1195745, 'vwap': 368.16, 'lastSize': 100, 'turnover': 44021430755, 'homeNotional': 13025.740326359422, 'foreignNotional': 4795435.625467371}, {'timestamp': datetime.datetime(2020, 10, 1, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.35, 'high': 371.3, 'low': 363.5, 'close': 367.85, 'trades': 11511, 'volume': 8513853, 'vwap': 367.36, 'lastSize': 400, 'turnover': 312760541220, 'homeNotional': 92573.6880691098, 'foreignNotional': 34007607.90054746}, {'timestamp': datetime.datetime(2020, 10, 1, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.2, 'high': 364.35, 'low': 362.65, 'close': 364.35, 'trades': 2153, 'volume': 1358611, 'vwap': 363.46, 'lastSize': 7, 'turnover': 49379002100, 'homeNotional': 14707.761874396883, 'foreignNotional': 5345570.620050668}] 2020-10-01 13:00:20 INFO: prepare candles [CandleItem(low=367.8, high=368.65, open=367.85, close=368.1, color='GREEN'), CandleItem(low=363.5, high=371.3, open=364.35, close=367.85, color='GREEN'), CandleItem(low=362.65, high=364.35, open=363.2, close=364.35, color='GREEN')] 2020-10-01 13:00:20 INFO: skip by colors first_candle=CandleItem(low=362.65, high=364.35, open=363.2, close=364.35, color='GREEN') second_candle=CandleItem(low=363.5, high=371.3, open=364.35, close=367.85, color='GREEN') last_candle=CandleItem(low=367.8, high=368.65, open=367.85, close=368.1, color='GREEN') 2020-10-01 13:00:20 INFO: check need new order None 2020-10-01 13:00:20 INFO: init new order end 2020-10-01 13:00:20 INFO: 2020-10-01 13:00:20 INFO: 2020-10-01 13:00:20 INFO: 2020-10-01 13:00:20 INFO: 2020-10-01 13:02:00 INFO: 2020-10-01 13:02:00 INFO: 2020-10-01 13:02:00 INFO: 2020-10-01 13:02:00 INFO: 2020-10-01 13:02:00 INFO: clearing start 2020-10-01 13:02:00 INFO: clearing end 2020-10-01 13:02:00 INFO: 2020-10-01 13:02:00 INFO: 2020-10-01 13:02:00 INFO: 2020-10-01 13:02:00 INFO: 2020-10-01 14:00:20 INFO: 2020-10-01 14:00:20 INFO: 2020-10-01 14:00:20 INFO: 2020-10-01 14:00:20 INFO: 2020-10-01 14:00:20 INFO: init new order start 2020-10-01 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 1, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.1, 'high': 368.65, 'low': 366.65, 'close': 367.45, 'trades': 2201, 'volume': 1279580, 'vwap': 367.56, 'lastSize': 5080, 'turnover': 47031255445, 'homeNotional': 13917.101884602702, 'foreignNotional': 5115268.41354039}, {'timestamp': datetime.datetime(2020, 10, 1, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.85, 'high': 368.65, 'low': 367.8, 'close': 368.1, 'trades': 1945, 'volume': 1195745, 'vwap': 368.16, 'lastSize': 100, 'turnover': 44021430755, 'homeNotional': 13025.740326359422, 'foreignNotional': 4795435.625467371}, {'timestamp': datetime.datetime(2020, 10, 1, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.35, 'high': 371.3, 'low': 363.5, 'close': 367.85, 'trades': 11511, 'volume': 8513853, 'vwap': 367.36, 'lastSize': 400, 'turnover': 312760541220, 'homeNotional': 92573.6880691098, 'foreignNotional': 34007607.90054746}] 2020-10-01 14:00:20 INFO: prepare candles [CandleItem(low=366.65, high=368.65, open=368.1, close=367.45, color='RED'), CandleItem(low=367.8, high=368.65, open=367.85, close=368.1, color='GREEN'), CandleItem(low=363.5, high=371.3, open=364.35, close=367.85, color='GREEN')] 2020-10-01 14:00:20 INFO: last_candle=CandleItem(low=366.65, high=368.65, open=368.1, close=367.45, color='RED') 2020-10-01 14:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-01 14:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=366.65, high=368.65, open=368.1, close=367.45, color='RED') 2020-10-01 14:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=367.8, high=368.65, open=367.85, close=368.1, color='GREEN') 2020-10-01 14:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=363.5, high=371.3, open=364.35, close=367.85, color='GREEN') 2020-10-01 14:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=366.65, high=368.65, open=368.1, close=367.45, color='RED'), take_profit_factor=6.0, clearing_interval=3600) 2020-10-01 14:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=366.65, high=368.65, open=368.1, close=367.45, color='RED'), take_profit_factor=6.0, clearing_interval=3600) 2020-10-01 14:00:20 INFO: place order: start candle=CandleItem(low=366.65, high=368.65, open=368.1, close=367.45, color='RED') ticker='ETHUSD' price_offset=0.1 2020-10-01 14:00:20 INFO: place order: side_factor=1 init_trigger_price=366.59999999999997 init_order_price=366.54999999999995 stop_price_offset=0.0 candle.size=2.0 stop_price=368.65 take_price=354.54999999999995 2020-10-01 14:00:20 INFO: place order round: side_factor=1 init_trigger_price=Decimal('366.59999999999996589394868351519107818603515625') init_order_price=Decimal('366.549999999999954525264911353588104248046875') stop_price_offset=0.0 candle.size=2.0 stop_price=Decimal('368.6499999999999772626324556767940521240234375') take_price=Decimal('354.549999999999954525264911353588104248046875') 2020-10-01 14:00:20 INFO: place order: compute qty=-927 2020-10-01 14:00:20 INFO: place order: save order to db 24aa82b76aed4544b19094bc3968df33; response=True 2020-10-01 14:00:20 INFO: post order to exchange resp={'orderID': '4f2e532b-5402-4e52-8062-a909fd0ed263', 'clOrdID': '24aa82b76aed4544b19094bc3968df33', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 927, 'price': 366.55, 'displayQty': None, 'stopPx': 366.6, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 1, 11, 0, 20, 957000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 1, 11, 0, 20, 957000, tzinfo=tzutc())} 2020-10-01 14:00:20 INFO: place new init order {'qty': -927, 'init_price': Decimal('366.59999999999996589394868351519107818603515625'), 'stop_price': Decimal('368.6499999999999772626324556767940521240234375'), 'take_price': Decimal('354.549999999999954525264911353588104248046875'), 'order_uid': '24aa82b76aed4544b19094bc3968df33', 'response': {'orderID': '4f2e532b-5402-4e52-8062-a909fd0ed263', 'clOrdID': '24aa82b76aed4544b19094bc3968df33', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 927, 'price': 366.55, 'displayQty': None, 'stopPx': 366.6, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 1, 11, 0, 20, 957000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 1, 11, 0, 20, 957000, tzinfo=tzutc())}} 2020-10-01 14:00:20 INFO: init new order end 2020-10-01 14:00:20 INFO: 2020-10-01 14:00:20 INFO: 2020-10-01 14:00:20 INFO: 2020-10-01 14:00:20 INFO: 2020-10-01 14:00:21 INFO: process event {'orderID': '4f2e532b-5402-4e52-8062-a909fd0ed263', 'clOrdID': '24aa82b76aed4544b19094bc3968df33', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 927, 'price': 366.55, 'displayQty': None, 'stopPx': 366.6, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-10-01T11:00:20.957Z', 'timestamp': '2020-10-01T11:00:20.957Z'} 2020-10-01 14:00:21 INFO: skip event 24aa82b76aed4544b19094bc3968df33 New 2020-10-01 14:02:00 INFO: 2020-10-01 14:02:00 INFO: 2020-10-01 14:02:00 INFO: 2020-10-01 14:02:00 INFO: 2020-10-01 14:02:00 INFO: clearing start 2020-10-01 14:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '4f2e532b-5402-4e52-8062-a909fd0ed263', 'clOrdID': '24aa82b76aed4544b19094bc3968df33', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 927, 'price': 366.55, 'displayQty': None, 'stopPx': 366.6, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 1, 11, 0, 20, 957000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 1, 11, 0, 20, 957000, tzinfo=tzutc())} 2020-10-01 14:02:00 INFO: order time=2020-10-01 11:00:20.957000+00:00; delta from now UTC=0:01:39.170823 time_delta.total_seconds()=99.170823; time_diff_offset='3600' 2020-10-01 14:02:00 INFO: skip by time diff 2020-10-01 11:00:20.957000+00:00 2020-10-01 14:02:00 INFO: clearing end 2020-10-01 14:02:00 INFO: 2020-10-01 14:02:00 INFO: 2020-10-01 14:02:00 INFO: 2020-10-01 14:02:00 INFO: 2020-10-01 15:00:20 INFO: 2020-10-01 15:00:20 INFO: 2020-10-01 15:00:20 INFO: 2020-10-01 15:00:20 INFO: 2020-10-01 15:00:20 INFO: init new order start 2020-10-01 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 1, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.45, 'high': 368.75, 'low': 367.25, 'close': 368.75, 'trades': 2149, 'volume': 1603814, 'vwap': 367.84, 'lastSize': 48, 'turnover': 58993343635, 'homeNotional': 17452.832938352592, 'foreignNotional': 6419707.038597648}, {'timestamp': datetime.datetime(2020, 10, 1, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.1, 'high': 368.65, 'low': 366.65, 'close': 367.45, 'trades': 2201, 'volume': 1279580, 'vwap': 367.56, 'lastSize': 5080, 'turnover': 47031255445, 'homeNotional': 13917.101884602702, 'foreignNotional': 5115268.41354039}, {'timestamp': datetime.datetime(2020, 10, 1, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.85, 'high': 368.65, 'low': 367.8, 'close': 368.1, 'trades': 1945, 'volume': 1195745, 'vwap': 368.16, 'lastSize': 100, 'turnover': 44021430755, 'homeNotional': 13025.740326359422, 'foreignNotional': 4795435.625467371}] 2020-10-01 15:00:20 INFO: prepare candles [CandleItem(low=367.25, high=368.75, open=367.45, close=368.75, color='GREEN'), CandleItem(low=366.65, high=368.65, open=368.1, close=367.45, color='RED'), CandleItem(low=367.8, high=368.65, open=367.85, close=368.1, color='GREEN')] 2020-10-01 15:00:20 INFO: skip by colors first_candle=CandleItem(low=367.8, high=368.65, open=367.85, close=368.1, color='GREEN') second_candle=CandleItem(low=366.65, high=368.65, open=368.1, close=367.45, color='RED') last_candle=CandleItem(low=367.25, high=368.75, open=367.45, close=368.75, color='GREEN') 2020-10-01 15:00:20 INFO: check need new order None 2020-10-01 15:00:20 INFO: init new order end 2020-10-01 15:00:20 INFO: 2020-10-01 15:00:20 INFO: 2020-10-01 15:00:20 INFO: 2020-10-01 15:00:20 INFO: 2020-10-01 15:02:00 INFO: 2020-10-01 15:02:00 INFO: 2020-10-01 15:02:00 INFO: 2020-10-01 15:02:00 INFO: 2020-10-01 15:02:00 INFO: clearing start 2020-10-01 15:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '4f2e532b-5402-4e52-8062-a909fd0ed263', 'clOrdID': '24aa82b76aed4544b19094bc3968df33', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 927, 'price': 366.55, 'displayQty': None, 'stopPx': 366.6, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 1, 11, 0, 20, 957000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 1, 11, 0, 20, 957000, tzinfo=tzutc())} 2020-10-01 15:02:00 INFO: order time=2020-10-01 11:00:20.957000+00:00; delta from now UTC=1:01:39.495776 time_delta.total_seconds()=3699.495776; time_diff_offset='3600' 2020-10-01 15:02:00 INFO: clear order 24aa82b76aed4544b19094bc3968df33 2020-10-01 15:02:00 INFO: cancel order resp=[{'orderID': '4f2e532b-5402-4e52-8062-a909fd0ed263', 'clOrdID': '24aa82b76aed4544b19094bc3968df33', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 927, 'price': 366.55, 'displayQty': None, 'stopPx': 366.6, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'Canceled', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 0, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Canceled: cancelled by clearing\nInit order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 1, 11, 0, 20, 957000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 1, 12, 2, 0, 687000, tzinfo=tzutc())}] 2020-10-01 15:02:00 INFO: clearing end 2020-10-01 15:02:00 INFO: 2020-10-01 15:02:00 INFO: 2020-10-01 15:02:00 INFO: 2020-10-01 15:02:00 INFO: 2020-10-01 15:02:00 INFO: process event {'orderID': '4f2e532b-5402-4e52-8062-a909fd0ed263', 'ordStatus': 'Canceled', 'leavesQty': 0, 'text': 'Canceled: cancelled by clearing\nInit order by supervisor.py', 'timestamp': '2020-10-01T12:02:00.687Z', 'clOrdID': '24aa82b76aed4544b19094bc3968df33', 'account': 605536, 'symbol': 'ETHUSD'} 2020-10-01 15:02:00 INFO: skip event 24aa82b76aed4544b19094bc3968df33 Canceled 2020-10-01 16:00:20 INFO: 2020-10-01 16:00:20 INFO: 2020-10-01 16:00:20 INFO: 2020-10-01 16:00:20 INFO: 2020-10-01 16:00:20 INFO: init new order start 2020-10-01 16:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 1, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.75, 'high': 370.0, 'low': 367.35, 'close': 368.2, 'trades': 3015, 'volume': 1917328, 'vwap': 368.49, 'lastSize': 4, 'turnover': 70650481390, 'homeNotional': 20882.5757432506, 'foreignNotional': 7694910.612785618}, {'timestamp': datetime.datetime(2020, 10, 1, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.45, 'high': 368.75, 'low': 367.25, 'close': 368.75, 'trades': 2149, 'volume': 1603814, 'vwap': 367.84, 'lastSize': 48, 'turnover': 58993343635, 'homeNotional': 17452.832938352592, 'foreignNotional': 6419707.038597648}, {'timestamp': datetime.datetime(2020, 10, 1, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.1, 'high': 368.65, 'low': 366.65, 'close': 367.45, 'trades': 2201, 'volume': 1279580, 'vwap': 367.56, 'lastSize': 5080, 'turnover': 47031255445, 'homeNotional': 13917.101884602702, 'foreignNotional': 5115268.41354039}] 2020-10-01 16:00:20 INFO: prepare candles [CandleItem(low=367.35, high=370.0, open=368.75, close=368.2, color='RED'), CandleItem(low=367.25, high=368.75, open=367.45, close=368.75, color='GREEN'), CandleItem(low=366.65, high=368.65, open=368.1, close=367.45, color='RED')] 2020-10-01 16:00:20 INFO: skip by colors first_candle=CandleItem(low=366.65, high=368.65, open=368.1, close=367.45, color='RED') second_candle=CandleItem(low=367.25, high=368.75, open=367.45, close=368.75, color='GREEN') last_candle=CandleItem(low=367.35, high=370.0, open=368.75, close=368.2, color='RED') 2020-10-01 16:00:20 INFO: check need new order None 2020-10-01 16:00:20 INFO: init new order end 2020-10-01 16:00:20 INFO: 2020-10-01 16:00:20 INFO: 2020-10-01 16:00:20 INFO: 2020-10-01 16:00:20 INFO: 2020-10-01 16:02:00 INFO: 2020-10-01 16:02:00 INFO: 2020-10-01 16:02:00 INFO: 2020-10-01 16:02:00 INFO: 2020-10-01 16:02:00 INFO: clearing start 2020-10-01 16:02:00 INFO: clearing end 2020-10-01 16:02:00 INFO: 2020-10-01 16:02:00 INFO: 2020-10-01 16:02:00 INFO: 2020-10-01 16:02:00 INFO: 2020-10-01 17:00:20 INFO: 2020-10-01 17:00:20 INFO: 2020-10-01 17:00:20 INFO: 2020-10-01 17:00:20 INFO: 2020-10-01 17:00:20 INFO: init new order start 2020-10-01 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 1, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.2, 'high': 368.25, 'low': 366.25, 'close': 366.5, 'trades': 2319, 'volume': 1748959, 'vwap': 367.34, 'lastSize': 292, 'turnover': 64244949115, 'homeNotional': 19021.09322553278, 'foreignNotional': 6987074.763664738}, {'timestamp': datetime.datetime(2020, 10, 1, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.75, 'high': 370.0, 'low': 367.35, 'close': 368.2, 'trades': 3015, 'volume': 1917328, 'vwap': 368.49, 'lastSize': 4, 'turnover': 70650481390, 'homeNotional': 20882.5757432506, 'foreignNotional': 7694910.612785618}, {'timestamp': datetime.datetime(2020, 10, 1, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.45, 'high': 368.75, 'low': 367.25, 'close': 368.75, 'trades': 2149, 'volume': 1603814, 'vwap': 367.84, 'lastSize': 48, 'turnover': 58993343635, 'homeNotional': 17452.832938352592, 'foreignNotional': 6419707.038597648}] 2020-10-01 17:00:20 INFO: prepare candles [CandleItem(low=366.25, high=368.25, open=368.2, close=366.5, color='RED'), CandleItem(low=367.35, high=370.0, open=368.75, close=368.2, color='RED'), CandleItem(low=367.25, high=368.75, open=367.45, close=368.75, color='GREEN')] 2020-10-01 17:00:20 INFO: skip by colors first_candle=CandleItem(low=367.25, high=368.75, open=367.45, close=368.75, color='GREEN') second_candle=CandleItem(low=367.35, high=370.0, open=368.75, close=368.2, color='RED') last_candle=CandleItem(low=366.25, high=368.25, open=368.2, close=366.5, color='RED') 2020-10-01 17:00:20 INFO: check need new order None 2020-10-01 17:00:20 INFO: init new order end 2020-10-01 17:00:20 INFO: 2020-10-01 17:00:20 INFO: 2020-10-01 17:00:20 INFO: 2020-10-01 17:00:20 INFO: 2020-10-01 17:02:00 INFO: 2020-10-01 17:02:00 INFO: 2020-10-01 17:02:00 INFO: 2020-10-01 17:02:00 INFO: 2020-10-01 17:02:00 INFO: clearing start 2020-10-01 17:02:00 INFO: clearing end 2020-10-01 17:02:00 INFO: 2020-10-01 17:02:00 INFO: 2020-10-01 17:02:00 INFO: 2020-10-01 17:02:00 INFO: 2020-10-01 18:00:20 INFO: 2020-10-01 18:00:20 INFO: 2020-10-01 18:00:20 INFO: 2020-10-01 18:00:20 INFO: 2020-10-01 18:00:20 INFO: init new order start 2020-10-01 18:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 1, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 366.5, 'high': 366.65, 'low': 364.95, 'close': 366.05, 'trades': 2783, 'volume': 1902256, 'vwap': 365.68, 'lastSize': 10, 'turnover': 69559880000, 'homeNotional': 20648.802469471873, 'foreignNotional': 7550661.525062089}, {'timestamp': datetime.datetime(2020, 10, 1, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.2, 'high': 368.25, 'low': 366.25, 'close': 366.5, 'trades': 2319, 'volume': 1748959, 'vwap': 367.34, 'lastSize': 292, 'turnover': 64244949115, 'homeNotional': 19021.09322553278, 'foreignNotional': 6987074.763664738}, {'timestamp': datetime.datetime(2020, 10, 1, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.75, 'high': 370.0, 'low': 367.35, 'close': 368.2, 'trades': 3015, 'volume': 1917328, 'vwap': 368.49, 'lastSize': 4, 'turnover': 70650481390, 'homeNotional': 20882.5757432506, 'foreignNotional': 7694910.612785618}] 2020-10-01 18:00:20 INFO: prepare candles [CandleItem(low=364.95, high=366.65, open=366.5, close=366.05, color='RED'), CandleItem(low=366.25, high=368.25, open=368.2, close=366.5, color='RED'), CandleItem(low=367.35, high=370.0, open=368.75, close=368.2, color='RED')] 2020-10-01 18:00:20 INFO: skip by colors first_candle=CandleItem(low=367.35, high=370.0, open=368.75, close=368.2, color='RED') second_candle=CandleItem(low=366.25, high=368.25, open=368.2, close=366.5, color='RED') last_candle=CandleItem(low=364.95, high=366.65, open=366.5, close=366.05, color='RED') 2020-10-01 18:00:20 INFO: check need new order None 2020-10-01 18:00:20 INFO: init new order end 2020-10-01 18:00:20 INFO: 2020-10-01 18:00:20 INFO: 2020-10-01 18:00:20 INFO: 2020-10-01 18:00:20 INFO: 2020-10-01 18:02:00 INFO: 2020-10-01 18:02:00 INFO: 2020-10-01 18:02:00 INFO: 2020-10-01 18:02:00 INFO: 2020-10-01 18:02:00 INFO: clearing start 2020-10-01 18:02:00 INFO: clearing end 2020-10-01 18:02:00 INFO: 2020-10-01 18:02:00 INFO: 2020-10-01 18:02:00 INFO: 2020-10-01 18:02:00 INFO: 2020-10-01 19:00:20 INFO: 2020-10-01 19:00:20 INFO: 2020-10-01 19:00:20 INFO: 2020-10-01 19:00:20 INFO: 2020-10-01 19:00:20 INFO: init new order start 2020-10-01 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 1, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 366.05, 'high': 366.85, 'low': 361.0, 'close': 361.65, 'trades': 5970, 'volume': 5692852, 'vwap': 363.6, 'lastSize': 88, 'turnover': 206988361040, 'homeNotional': 61473.31999477682, 'foreignNotional': 22351891.4259383}, {'timestamp': datetime.datetime(2020, 10, 1, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 366.5, 'high': 366.65, 'low': 364.95, 'close': 366.05, 'trades': 2783, 'volume': 1902256, 'vwap': 365.68, 'lastSize': 10, 'turnover': 69559880000, 'homeNotional': 20648.802469471873, 'foreignNotional': 7550661.525062089}, {'timestamp': datetime.datetime(2020, 10, 1, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.2, 'high': 368.25, 'low': 366.25, 'close': 366.5, 'trades': 2319, 'volume': 1748959, 'vwap': 367.34, 'lastSize': 292, 'turnover': 64244949115, 'homeNotional': 19021.09322553278, 'foreignNotional': 6987074.763664738}] 2020-10-01 19:00:20 INFO: prepare candles [CandleItem(low=361.0, high=366.85, open=366.05, close=361.65, color='RED'), CandleItem(low=364.95, high=366.65, open=366.5, close=366.05, color='RED'), CandleItem(low=366.25, high=368.25, open=368.2, close=366.5, color='RED')] 2020-10-01 19:00:20 INFO: skip by colors first_candle=CandleItem(low=366.25, high=368.25, open=368.2, close=366.5, color='RED') second_candle=CandleItem(low=364.95, high=366.65, open=366.5, close=366.05, color='RED') last_candle=CandleItem(low=361.0, high=366.85, open=366.05, close=361.65, color='RED') 2020-10-01 19:00:20 INFO: check need new order None 2020-10-01 19:00:20 INFO: init new order end 2020-10-01 19:00:20 INFO: 2020-10-01 19:00:20 INFO: 2020-10-01 19:00:20 INFO: 2020-10-01 19:00:20 INFO: 2020-10-01 19:02:00 INFO: 2020-10-01 19:02:00 INFO: 2020-10-01 19:02:00 INFO: 2020-10-01 19:02:00 INFO: 2020-10-01 19:02:00 INFO: clearing start 2020-10-01 19:02:00 INFO: clearing end 2020-10-01 19:02:00 INFO: 2020-10-01 19:02:00 INFO: 2020-10-01 19:02:00 INFO: 2020-10-01 19:02:00 INFO: 2020-10-01 20:00:20 INFO: 2020-10-01 20:00:20 INFO: 2020-10-01 20:00:20 INFO: 2020-10-01 20:00:20 INFO: 2020-10-01 20:00:20 INFO: init new order start 2020-10-01 20:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 1, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 361.65, 'high': 361.65, 'low': 345.25, 'close': 349.95, 'trades': 22586, 'volume': 19751883, 'vwap': 353.5, 'lastSize': 1544, 'turnover': 698217839255, 'homeNotional': 208944.62774886398, 'foreignNotional': 73866249.7719314}, {'timestamp': datetime.datetime(2020, 10, 1, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 366.05, 'high': 366.85, 'low': 361.0, 'close': 361.65, 'trades': 5970, 'volume': 5692852, 'vwap': 363.6, 'lastSize': 88, 'turnover': 206988361040, 'homeNotional': 61473.31999477682, 'foreignNotional': 22351891.4259383}, {'timestamp': datetime.datetime(2020, 10, 1, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 366.5, 'high': 366.65, 'low': 364.95, 'close': 366.05, 'trades': 2783, 'volume': 1902256, 'vwap': 365.68, 'lastSize': 10, 'turnover': 69559880000, 'homeNotional': 20648.802469471873, 'foreignNotional': 7550661.525062089}] 2020-10-01 20:00:21 INFO: prepare candles [CandleItem(low=345.25, high=361.65, open=361.65, close=349.95, color='RED'), CandleItem(low=361.0, high=366.85, open=366.05, close=361.65, color='RED'), CandleItem(low=364.95, high=366.65, open=366.5, close=366.05, color='RED')] 2020-10-01 20:00:21 INFO: skip by colors first_candle=CandleItem(low=364.95, high=366.65, open=366.5, close=366.05, color='RED') second_candle=CandleItem(low=361.0, high=366.85, open=366.05, close=361.65, color='RED') last_candle=CandleItem(low=345.25, high=361.65, open=361.65, close=349.95, color='RED') 2020-10-01 20:00:21 INFO: check need new order None 2020-10-01 20:00:21 INFO: init new order end 2020-10-01 20:00:21 INFO: 2020-10-01 20:00:21 INFO: 2020-10-01 20:00:21 INFO: 2020-10-01 20:00:21 INFO: 2020-10-01 20:02:00 INFO: 2020-10-01 20:02:00 INFO: 2020-10-01 20:02:00 INFO: 2020-10-01 20:02:00 INFO: 2020-10-01 20:02:00 INFO: clearing start 2020-10-01 20:02:00 INFO: clearing end 2020-10-01 20:02:00 INFO: 2020-10-01 20:02:00 INFO: 2020-10-01 20:02:00 INFO: 2020-10-01 20:02:00 INFO: 2020-10-01 21:00:20 INFO: 2020-10-01 21:00:20 INFO: 2020-10-01 21:00:20 INFO: 2020-10-01 21:00:20 INFO: 2020-10-01 21:00:20 INFO: init new order start 2020-10-01 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 1, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.95, 'high': 350.7, 'low': 346.2, 'close': 346.25, 'trades': 6654, 'volume': 5189360, 'vwap': 348.22, 'lastSize': 12, 'turnover': 180702861800, 'homeNotional': 54475.691082516285, 'foreignNotional': 18969460.767582193}, {'timestamp': datetime.datetime(2020, 10, 1, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 361.65, 'high': 361.65, 'low': 345.25, 'close': 349.95, 'trades': 22586, 'volume': 19751883, 'vwap': 353.5, 'lastSize': 1544, 'turnover': 698217839255, 'homeNotional': 208944.62774886398, 'foreignNotional': 73866249.7719314}, {'timestamp': datetime.datetime(2020, 10, 1, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 366.05, 'high': 366.85, 'low': 361.0, 'close': 361.65, 'trades': 5970, 'volume': 5692852, 'vwap': 363.6, 'lastSize': 88, 'turnover': 206988361040, 'homeNotional': 61473.31999477682, 'foreignNotional': 22351891.4259383}] 2020-10-01 21:00:20 INFO: prepare candles [CandleItem(low=346.2, high=350.7, open=349.95, close=346.25, color='RED'), CandleItem(low=345.25, high=361.65, open=361.65, close=349.95, color='RED'), CandleItem(low=361.0, high=366.85, open=366.05, close=361.65, color='RED')] 2020-10-01 21:00:20 INFO: skip by colors first_candle=CandleItem(low=361.0, high=366.85, open=366.05, close=361.65, color='RED') second_candle=CandleItem(low=345.25, high=361.65, open=361.65, close=349.95, color='RED') last_candle=CandleItem(low=346.2, high=350.7, open=349.95, close=346.25, color='RED') 2020-10-01 21:00:20 INFO: check need new order None 2020-10-01 21:00:20 INFO: init new order end 2020-10-01 21:00:20 INFO: 2020-10-01 21:00:20 INFO: 2020-10-01 21:00:20 INFO: 2020-10-01 21:00:20 INFO: 2020-10-01 21:02:00 INFO: 2020-10-01 21:02:00 INFO: 2020-10-01 21:02:00 INFO: 2020-10-01 21:02:00 INFO: 2020-10-01 21:02:00 INFO: clearing start 2020-10-01 21:02:01 INFO: clearing end 2020-10-01 21:02:01 INFO: 2020-10-01 21:02:01 INFO: 2020-10-01 21:02:01 INFO: 2020-10-01 21:02:01 INFO: 2020-10-01 22:00:20 INFO: 2020-10-01 22:00:20 INFO: 2020-10-01 22:00:20 INFO: 2020-10-01 22:00:20 INFO: 2020-10-01 22:00:20 INFO: init new order start 2020-10-01 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 1, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.25, 'high': 352.6, 'low': 345.15, 'close': 352.2, 'trades': 5783, 'volume': 4821348, 'vwap': 349.32, 'lastSize': 700, 'turnover': 168416921615, 'homeNotional': 50768.93774049097, 'foreignNotional': 17734701.852709264}, {'timestamp': datetime.datetime(2020, 10, 1, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.95, 'high': 350.7, 'low': 346.2, 'close': 346.25, 'trades': 6654, 'volume': 5189360, 'vwap': 348.22, 'lastSize': 12, 'turnover': 180702861800, 'homeNotional': 54475.691082516285, 'foreignNotional': 18969460.767582193}, {'timestamp': datetime.datetime(2020, 10, 1, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 361.65, 'high': 361.65, 'low': 345.25, 'close': 349.95, 'trades': 22586, 'volume': 19751883, 'vwap': 353.5, 'lastSize': 1544, 'turnover': 698217839255, 'homeNotional': 208944.62774886398, 'foreignNotional': 73866249.7719314}] 2020-10-01 22:00:20 INFO: prepare candles [CandleItem(low=345.15, high=352.6, open=346.25, close=352.2, color='GREEN'), CandleItem(low=346.2, high=350.7, open=349.95, close=346.25, color='RED'), CandleItem(low=345.25, high=361.65, open=361.65, close=349.95, color='RED')] 2020-10-01 22:00:20 INFO: last_candle=CandleItem(low=345.15, high=352.6, open=346.25, close=352.2, color='GREEN') 2020-10-01 22:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-01 22:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=345.15, high=352.6, open=346.25, close=352.2, color='GREEN') 2020-10-01 22:00:20 INFO: skip by CandleItem(low=345.15, high=352.6, open=346.25, close=352.2, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-01 22:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-01 22:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=345.15, high=352.6, open=346.25, close=352.2, color='GREEN') 2020-10-01 22:00:20 INFO: skip by CandleItem(low=345.15, high=352.6, open=346.25, close=352.2, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-01 22:00:20 INFO: not found applicable config for candle 2020-10-01 22:00:20 INFO: check need new order None 2020-10-01 22:00:20 INFO: init new order end 2020-10-01 22:00:20 INFO: 2020-10-01 22:00:20 INFO: 2020-10-01 22:00:20 INFO: 2020-10-01 22:00:20 INFO: 2020-10-01 22:02:00 INFO: 2020-10-01 22:02:00 INFO: 2020-10-01 22:02:00 INFO: 2020-10-01 22:02:00 INFO: 2020-10-01 22:02:00 INFO: clearing start 2020-10-01 22:02:00 INFO: clearing end 2020-10-01 22:02:00 INFO: 2020-10-01 22:02:00 INFO: 2020-10-01 22:02:00 INFO: 2020-10-01 22:02:00 INFO: 2020-10-01 23:00:20 INFO: 2020-10-01 23:00:20 INFO: 2020-10-01 23:00:20 INFO: 2020-10-01 23:00:20 INFO: 2020-10-01 23:00:20 INFO: init new order start 2020-10-01 23:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 1, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.2, 'high': 354.3, 'low': 350.9, 'close': 353.0, 'trades': 4475, 'volume': 3670495, 'vwap': 352.53, 'lastSize': 5, 'turnover': 129392560115, 'homeNotional': 38914.9090318262, 'foreignNotional': 13718377.49117164}, {'timestamp': datetime.datetime(2020, 10, 1, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.25, 'high': 352.6, 'low': 345.15, 'close': 352.2, 'trades': 5783, 'volume': 4821348, 'vwap': 349.32, 'lastSize': 700, 'turnover': 168416921615, 'homeNotional': 50768.93774049097, 'foreignNotional': 17734701.852709264}, {'timestamp': datetime.datetime(2020, 10, 1, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.95, 'high': 350.7, 'low': 346.2, 'close': 346.25, 'trades': 6654, 'volume': 5189360, 'vwap': 348.22, 'lastSize': 12, 'turnover': 180702861800, 'homeNotional': 54475.691082516285, 'foreignNotional': 18969460.767582193}] 2020-10-01 23:00:21 INFO: prepare candles [CandleItem(low=350.9, high=354.3, open=352.2, close=353.0, color='GREEN'), CandleItem(low=345.15, high=352.6, open=346.25, close=352.2, color='GREEN'), CandleItem(low=346.2, high=350.7, open=349.95, close=346.25, color='RED')] 2020-10-01 23:00:21 INFO: skip by colors first_candle=CandleItem(low=346.2, high=350.7, open=349.95, close=346.25, color='RED') second_candle=CandleItem(low=345.15, high=352.6, open=346.25, close=352.2, color='GREEN') last_candle=CandleItem(low=350.9, high=354.3, open=352.2, close=353.0, color='GREEN') 2020-10-01 23:00:21 INFO: check need new order None 2020-10-01 23:00:21 INFO: init new order end 2020-10-01 23:00:21 INFO: 2020-10-01 23:00:21 INFO: 2020-10-01 23:00:21 INFO: 2020-10-01 23:00:21 INFO: 2020-10-01 23:02:00 INFO: 2020-10-01 23:02:00 INFO: 2020-10-01 23:02:00 INFO: 2020-10-01 23:02:00 INFO: 2020-10-01 23:02:00 INFO: clearing start 2020-10-01 23:02:00 INFO: clearing end 2020-10-01 23:02:00 INFO: 2020-10-01 23:02:00 INFO: 2020-10-01 23:02:00 INFO: 2020-10-01 23:02:00 INFO: 2020-10-02 00:00:20 INFO: 2020-10-02 00:00:20 INFO: 2020-10-02 00:00:20 INFO: 2020-10-02 00:00:20 INFO: 2020-10-02 00:00:20 INFO: init new order start 2020-10-02 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 1, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.0, 'high': 353.0, 'low': 349.55, 'close': 351.75, 'trades': 3789, 'volume': 3841938, 'vwap': 351.12, 'lastSize': 10, 'turnover': 134898066215, 'homeNotional': 40657.429388116005, 'foreignNotional': 14275665.854642527}, {'timestamp': datetime.datetime(2020, 10, 1, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.2, 'high': 354.3, 'low': 350.9, 'close': 353.0, 'trades': 4475, 'volume': 3670495, 'vwap': 352.53, 'lastSize': 5, 'turnover': 129392560115, 'homeNotional': 38914.9090318262, 'foreignNotional': 13718377.49117164}, {'timestamp': datetime.datetime(2020, 10, 1, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.25, 'high': 352.6, 'low': 345.15, 'close': 352.2, 'trades': 5783, 'volume': 4821348, 'vwap': 349.32, 'lastSize': 700, 'turnover': 168416921615, 'homeNotional': 50768.93774049097, 'foreignNotional': 17734701.852709264}] 2020-10-02 00:00:20 INFO: prepare candles [CandleItem(low=349.55, high=353.0, open=353.0, close=351.75, color='RED'), CandleItem(low=350.9, high=354.3, open=352.2, close=353.0, color='GREEN'), CandleItem(low=345.15, high=352.6, open=346.25, close=352.2, color='GREEN')] 2020-10-02 00:00:20 INFO: last_candle=CandleItem(low=349.55, high=353.0, open=353.0, close=351.75, color='RED') 2020-10-02 00:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-02 00:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=349.55, high=353.0, open=353.0, close=351.75, color='RED') 2020-10-02 00:00:20 INFO: skip by CandleItem(low=349.55, high=353.0, open=353.0, close=351.75, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-02 00:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-02 00:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=349.55, high=353.0, open=353.0, close=351.75, color='RED') 2020-10-02 00:00:20 INFO: skip by CandleItem(low=349.55, high=353.0, open=353.0, close=351.75, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-02 00:00:20 INFO: not found applicable config for candle 2020-10-02 00:00:20 INFO: check need new order None 2020-10-02 00:00:20 INFO: init new order end 2020-10-02 00:00:20 INFO: 2020-10-02 00:00:20 INFO: 2020-10-02 00:00:20 INFO: 2020-10-02 00:00:20 INFO: 2020-10-02 00:02:00 INFO: 2020-10-02 00:02:00 INFO: 2020-10-02 00:02:00 INFO: 2020-10-02 00:02:00 INFO: 2020-10-02 00:02:00 INFO: clearing start 2020-10-02 00:02:00 INFO: clearing end 2020-10-02 00:02:00 INFO: 2020-10-02 00:02:00 INFO: 2020-10-02 00:02:00 INFO: 2020-10-02 00:02:00 INFO: 2020-10-02 01:00:20 INFO: 2020-10-02 01:00:20 INFO: 2020-10-02 01:00:20 INFO: 2020-10-02 01:00:20 INFO: 2020-10-02 01:00:20 INFO: init new order start 2020-10-02 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 1, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.75, 'high': 353.7, 'low': 350.35, 'close': 351.25, 'trades': 2995, 'volume': 2826224, 'vwap': 351.86, 'lastSize': 1, 'turnover': 99442829075, 'homeNotional': 29981.21090076325, 'foreignNotional': 10549135.853948964}, {'timestamp': datetime.datetime(2020, 10, 1, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.0, 'high': 353.0, 'low': 349.55, 'close': 351.75, 'trades': 3789, 'volume': 3841938, 'vwap': 351.12, 'lastSize': 10, 'turnover': 134898066215, 'homeNotional': 40657.429388116005, 'foreignNotional': 14275665.854642527}, {'timestamp': datetime.datetime(2020, 10, 1, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.2, 'high': 354.3, 'low': 350.9, 'close': 353.0, 'trades': 4475, 'volume': 3670495, 'vwap': 352.53, 'lastSize': 5, 'turnover': 129392560115, 'homeNotional': 38914.9090318262, 'foreignNotional': 13718377.49117164}] 2020-10-02 01:00:20 INFO: prepare candles [CandleItem(low=350.35, high=353.7, open=351.75, close=351.25, color='RED'), CandleItem(low=349.55, high=353.0, open=353.0, close=351.75, color='RED'), CandleItem(low=350.9, high=354.3, open=352.2, close=353.0, color='GREEN')] 2020-10-02 01:00:20 INFO: skip by colors first_candle=CandleItem(low=350.9, high=354.3, open=352.2, close=353.0, color='GREEN') second_candle=CandleItem(low=349.55, high=353.0, open=353.0, close=351.75, color='RED') last_candle=CandleItem(low=350.35, high=353.7, open=351.75, close=351.25, color='RED') 2020-10-02 01:00:20 INFO: check need new order None 2020-10-02 01:00:20 INFO: init new order end 2020-10-02 01:00:20 INFO: 2020-10-02 01:00:20 INFO: 2020-10-02 01:00:20 INFO: 2020-10-02 01:00:20 INFO: 2020-10-02 01:02:00 INFO: 2020-10-02 01:02:00 INFO: 2020-10-02 01:02:00 INFO: 2020-10-02 01:02:00 INFO: 2020-10-02 01:02:00 INFO: clearing start 2020-10-02 01:02:00 INFO: clearing end 2020-10-02 01:02:00 INFO: 2020-10-02 01:02:00 INFO: 2020-10-02 01:02:00 INFO: 2020-10-02 01:02:00 INFO: 2020-10-02 02:00:20 INFO: 2020-10-02 02:00:20 INFO: 2020-10-02 02:00:20 INFO: 2020-10-02 02:00:20 INFO: 2020-10-02 02:00:20 INFO: init new order start 2020-10-02 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 1, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.25, 'high': 353.2, 'low': 350.5, 'close': 351.95, 'trades': 2139, 'volume': 1030084, 'vwap': 352.25, 'lastSize': 5, 'turnover': 36283883225, 'homeNotional': 10933.821427476783, 'foreignNotional': 3851358.446289763}, {'timestamp': datetime.datetime(2020, 10, 1, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.75, 'high': 353.7, 'low': 350.35, 'close': 351.25, 'trades': 2995, 'volume': 2826224, 'vwap': 351.86, 'lastSize': 1, 'turnover': 99442829075, 'homeNotional': 29981.21090076325, 'foreignNotional': 10549135.853948964}, {'timestamp': datetime.datetime(2020, 10, 1, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.0, 'high': 353.0, 'low': 349.55, 'close': 351.75, 'trades': 3789, 'volume': 3841938, 'vwap': 351.12, 'lastSize': 10, 'turnover': 134898066215, 'homeNotional': 40657.429388116005, 'foreignNotional': 14275665.854642527}] 2020-10-02 02:00:20 INFO: prepare candles [CandleItem(low=350.5, high=353.2, open=351.25, close=351.95, color='GREEN'), CandleItem(low=350.35, high=353.7, open=351.75, close=351.25, color='RED'), CandleItem(low=349.55, high=353.0, open=353.0, close=351.75, color='RED')] 2020-10-02 02:00:20 INFO: last_candle=CandleItem(low=350.5, high=353.2, open=351.25, close=351.95, color='GREEN') 2020-10-02 02:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-02 02:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=350.5, high=353.2, open=351.25, close=351.95, color='GREEN') 2020-10-02 02:00:20 INFO: skip by CandleItem(low=350.5, high=353.2, open=351.25, close=351.95, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-02 02:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-02 02:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=350.5, high=353.2, open=351.25, close=351.95, color='GREEN') 2020-10-02 02:00:20 INFO: skip by CandleItem(low=350.5, high=353.2, open=351.25, close=351.95, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-02 02:00:20 INFO: not found applicable config for candle 2020-10-02 02:00:20 INFO: check need new order None 2020-10-02 02:00:20 INFO: init new order end 2020-10-02 02:00:20 INFO: 2020-10-02 02:00:20 INFO: 2020-10-02 02:00:20 INFO: 2020-10-02 02:00:20 INFO: 2020-10-02 02:02:00 INFO: 2020-10-02 02:02:00 INFO: 2020-10-02 02:02:00 INFO: 2020-10-02 02:02:00 INFO: 2020-10-02 02:02:00 INFO: clearing start 2020-10-02 02:02:00 INFO: clearing end 2020-10-02 02:02:00 INFO: 2020-10-02 02:02:00 INFO: 2020-10-02 02:02:00 INFO: 2020-10-02 02:02:00 INFO: 2020-10-02 03:00:20 INFO: 2020-10-02 03:00:20 INFO: 2020-10-02 03:00:20 INFO: 2020-10-02 03:00:20 INFO: 2020-10-02 03:00:20 INFO: init new order start 2020-10-02 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 2, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.95, 'high': 352.95, 'low': 351.55, 'close': 352.65, 'trades': 1661, 'volume': 1117262, 'vwap': 352.24, 'lastSize': 1907, 'turnover': 39354140425, 'homeNotional': 11850.043636494376, 'foreignNotional': 4174030.535134649}, {'timestamp': datetime.datetime(2020, 10, 1, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.25, 'high': 353.2, 'low': 350.5, 'close': 351.95, 'trades': 2139, 'volume': 1030084, 'vwap': 352.25, 'lastSize': 5, 'turnover': 36283883225, 'homeNotional': 10933.821427476783, 'foreignNotional': 3851358.446289763}, {'timestamp': datetime.datetime(2020, 10, 1, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.75, 'high': 353.7, 'low': 350.35, 'close': 351.25, 'trades': 2995, 'volume': 2826224, 'vwap': 351.86, 'lastSize': 1, 'turnover': 99442829075, 'homeNotional': 29981.21090076325, 'foreignNotional': 10549135.853948964}] 2020-10-02 03:00:20 INFO: prepare candles [CandleItem(low=351.55, high=352.95, open=351.95, close=352.65, color='GREEN'), CandleItem(low=350.5, high=353.2, open=351.25, close=351.95, color='GREEN'), CandleItem(low=350.35, high=353.7, open=351.75, close=351.25, color='RED')] 2020-10-02 03:00:20 INFO: skip by colors first_candle=CandleItem(low=350.35, high=353.7, open=351.75, close=351.25, color='RED') second_candle=CandleItem(low=350.5, high=353.2, open=351.25, close=351.95, color='GREEN') last_candle=CandleItem(low=351.55, high=352.95, open=351.95, close=352.65, color='GREEN') 2020-10-02 03:00:20 INFO: check need new order None 2020-10-02 03:00:20 INFO: init new order end 2020-10-02 03:00:20 INFO: 2020-10-02 03:00:20 INFO: 2020-10-02 03:00:20 INFO: 2020-10-02 03:00:20 INFO: 2020-10-02 03:02:00 INFO: 2020-10-02 03:02:00 INFO: 2020-10-02 03:02:00 INFO: 2020-10-02 03:02:00 INFO: 2020-10-02 03:02:00 INFO: clearing start 2020-10-02 03:02:00 INFO: clearing end 2020-10-02 03:02:00 INFO: 2020-10-02 03:02:00 INFO: 2020-10-02 03:02:00 INFO: 2020-10-02 03:02:00 INFO: 2020-10-02 04:00:20 INFO: 2020-10-02 04:00:20 INFO: 2020-10-02 04:00:20 INFO: 2020-10-02 04:00:20 INFO: 2020-10-02 04:00:20 INFO: init new order start 2020-10-02 04:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 2, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.65, 'high': 352.7, 'low': 349.95, 'close': 350.9, 'trades': 3439, 'volume': 2101741, 'vwap': 351.03, 'lastSize': 55, 'turnover': 73775848055, 'homeNotional': 22281.485079123817, 'foreignNotional': 7821314.247928629}, {'timestamp': datetime.datetime(2020, 10, 2, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.95, 'high': 352.95, 'low': 351.55, 'close': 352.65, 'trades': 1661, 'volume': 1117262, 'vwap': 352.24, 'lastSize': 1907, 'turnover': 39354140425, 'homeNotional': 11850.043636494376, 'foreignNotional': 4174030.535134649}, {'timestamp': datetime.datetime(2020, 10, 1, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.25, 'high': 353.2, 'low': 350.5, 'close': 351.95, 'trades': 2139, 'volume': 1030084, 'vwap': 352.25, 'lastSize': 5, 'turnover': 36283883225, 'homeNotional': 10933.821427476783, 'foreignNotional': 3851358.446289763}] 2020-10-02 04:00:20 INFO: prepare candles [CandleItem(low=349.95, high=352.7, open=352.65, close=350.9, color='RED'), CandleItem(low=351.55, high=352.95, open=351.95, close=352.65, color='GREEN'), CandleItem(low=350.5, high=353.2, open=351.25, close=351.95, color='GREEN')] 2020-10-02 04:00:20 INFO: last_candle=CandleItem(low=349.95, high=352.7, open=352.65, close=350.9, color='RED') 2020-10-02 04:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-02 04:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=349.95, high=352.7, open=352.65, close=350.9, color='RED') 2020-10-02 04:00:20 INFO: skip by CandleItem(low=349.95, high=352.7, open=352.65, close=350.9, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-02 04:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-02 04:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=349.95, high=352.7, open=352.65, close=350.9, color='RED') 2020-10-02 04:00:20 INFO: skip by CandleItem(low=349.95, high=352.7, open=352.65, close=350.9, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-02 04:00:20 INFO: not found applicable config for candle 2020-10-02 04:00:20 INFO: check need new order None 2020-10-02 04:00:20 INFO: init new order end 2020-10-02 04:00:20 INFO: 2020-10-02 04:00:20 INFO: 2020-10-02 04:00:20 INFO: 2020-10-02 04:00:20 INFO: 2020-10-02 04:02:00 INFO: 2020-10-02 04:02:00 INFO: 2020-10-02 04:02:00 INFO: 2020-10-02 04:02:00 INFO: 2020-10-02 04:02:00 INFO: clearing start 2020-10-02 04:02:00 INFO: clearing end 2020-10-02 04:02:00 INFO: 2020-10-02 04:02:00 INFO: 2020-10-02 04:02:00 INFO: 2020-10-02 04:02:00 INFO: 2020-10-02 05:00:20 INFO: 2020-10-02 05:00:20 INFO: 2020-10-02 05:00:20 INFO: 2020-10-02 05:00:20 INFO: 2020-10-02 05:00:20 INFO: init new order start 2020-10-02 05:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 2, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.9, 'high': 353.9, 'low': 350.85, 'close': 351.65, 'trades': 2323, 'volume': 1669995, 'vwap': 352.53, 'lastSize': 429, 'turnover': 58871262880, 'homeNotional': 17712.34050771786, 'foreignNotional': 6244027.373953832}, {'timestamp': datetime.datetime(2020, 10, 2, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.65, 'high': 352.7, 'low': 349.95, 'close': 350.9, 'trades': 3439, 'volume': 2101741, 'vwap': 351.03, 'lastSize': 55, 'turnover': 73775848055, 'homeNotional': 22281.485079123817, 'foreignNotional': 7821314.247928629}, {'timestamp': datetime.datetime(2020, 10, 2, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.95, 'high': 352.95, 'low': 351.55, 'close': 352.65, 'trades': 1661, 'volume': 1117262, 'vwap': 352.24, 'lastSize': 1907, 'turnover': 39354140425, 'homeNotional': 11850.043636494376, 'foreignNotional': 4174030.535134649}] 2020-10-02 05:00:20 INFO: prepare candles [CandleItem(low=350.85, high=353.9, open=350.9, close=351.65, color='GREEN'), CandleItem(low=349.95, high=352.7, open=352.65, close=350.9, color='RED'), CandleItem(low=351.55, high=352.95, open=351.95, close=352.65, color='GREEN')] 2020-10-02 05:00:20 INFO: skip by colors first_candle=CandleItem(low=351.55, high=352.95, open=351.95, close=352.65, color='GREEN') second_candle=CandleItem(low=349.95, high=352.7, open=352.65, close=350.9, color='RED') last_candle=CandleItem(low=350.85, high=353.9, open=350.9, close=351.65, color='GREEN') 2020-10-02 05:00:20 INFO: check need new order None 2020-10-02 05:00:20 INFO: init new order end 2020-10-02 05:00:20 INFO: 2020-10-02 05:00:20 INFO: 2020-10-02 05:00:20 INFO: 2020-10-02 05:00:20 INFO: 2020-10-02 05:02:00 INFO: 2020-10-02 05:02:00 INFO: 2020-10-02 05:02:00 INFO: 2020-10-02 05:02:00 INFO: 2020-10-02 05:02:00 INFO: clearing start 2020-10-02 05:02:00 INFO: clearing end 2020-10-02 05:02:00 INFO: 2020-10-02 05:02:00 INFO: 2020-10-02 05:02:00 INFO: 2020-10-02 05:02:00 INFO: 2020-10-02 06:00:20 INFO: 2020-10-02 06:00:20 INFO: 2020-10-02 06:00:20 INFO: 2020-10-02 06:00:20 INFO: 2020-10-02 06:00:20 INFO: init new order start 2020-10-02 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 2, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.65, 'high': 352.75, 'low': 351.4, 'close': 351.55, 'trades': 1572, 'volume': 1154950, 'vwap': 352.01, 'lastSize': 10, 'turnover': 40654451525, 'homeNotional': 12243.287668876208, 'foreignNotional': 4309661.849305444}, {'timestamp': datetime.datetime(2020, 10, 2, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.9, 'high': 353.9, 'low': 350.85, 'close': 351.65, 'trades': 2323, 'volume': 1669995, 'vwap': 352.53, 'lastSize': 429, 'turnover': 58871262880, 'homeNotional': 17712.34050771786, 'foreignNotional': 6244027.373953832}, {'timestamp': datetime.datetime(2020, 10, 2, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.65, 'high': 352.7, 'low': 349.95, 'close': 350.9, 'trades': 3439, 'volume': 2101741, 'vwap': 351.03, 'lastSize': 55, 'turnover': 73775848055, 'homeNotional': 22281.485079123817, 'foreignNotional': 7821314.247928629}] 2020-10-02 06:00:20 INFO: prepare candles [CandleItem(low=351.4, high=352.75, open=351.65, close=351.55, color='RED'), CandleItem(low=350.85, high=353.9, open=350.9, close=351.65, color='GREEN'), CandleItem(low=349.95, high=352.7, open=352.65, close=350.9, color='RED')] 2020-10-02 06:00:20 INFO: skip by colors first_candle=CandleItem(low=349.95, high=352.7, open=352.65, close=350.9, color='RED') second_candle=CandleItem(low=350.85, high=353.9, open=350.9, close=351.65, color='GREEN') last_candle=CandleItem(low=351.4, high=352.75, open=351.65, close=351.55, color='RED') 2020-10-02 06:00:20 INFO: check need new order None 2020-10-02 06:00:20 INFO: init new order end 2020-10-02 06:00:20 INFO: 2020-10-02 06:00:20 INFO: 2020-10-02 06:00:20 INFO: 2020-10-02 06:00:20 INFO: 2020-10-02 06:02:00 INFO: 2020-10-02 06:02:00 INFO: 2020-10-02 06:02:00 INFO: 2020-10-02 06:02:00 INFO: 2020-10-02 06:02:00 INFO: clearing start 2020-10-02 06:02:00 INFO: clearing end 2020-10-02 06:02:00 INFO: 2020-10-02 06:02:00 INFO: 2020-10-02 06:02:00 INFO: 2020-10-02 06:02:00 INFO: 2020-10-02 07:00:20 INFO: 2020-10-02 07:00:20 INFO: 2020-10-02 07:00:20 INFO: 2020-10-02 07:00:20 INFO: 2020-10-02 07:00:20 INFO: init new order start 2020-10-02 07:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 2, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.55, 'high': 353.0, 'low': 351.45, 'close': 353.0, 'trades': 1260, 'volume': 982120, 'vwap': 352.06, 'lastSize': 14, 'turnover': 34576279935, 'homeNotional': 10427.428969631126, 'foreignNotional': 3671060.649580309}, {'timestamp': datetime.datetime(2020, 10, 2, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.65, 'high': 352.75, 'low': 351.4, 'close': 351.55, 'trades': 1572, 'volume': 1154950, 'vwap': 352.01, 'lastSize': 10, 'turnover': 40654451525, 'homeNotional': 12243.287668876208, 'foreignNotional': 4309661.849305444}, {'timestamp': datetime.datetime(2020, 10, 2, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.9, 'high': 353.9, 'low': 350.85, 'close': 351.65, 'trades': 2323, 'volume': 1669995, 'vwap': 352.53, 'lastSize': 429, 'turnover': 58871262880, 'homeNotional': 17712.34050771786, 'foreignNotional': 6244027.373953832}] 2020-10-02 07:00:20 INFO: prepare candles [CandleItem(low=351.45, high=353.0, open=351.55, close=353.0, color='GREEN'), CandleItem(low=351.4, high=352.75, open=351.65, close=351.55, color='RED'), CandleItem(low=350.85, high=353.9, open=350.9, close=351.65, color='GREEN')] 2020-10-02 07:00:20 INFO: skip by colors first_candle=CandleItem(low=350.85, high=353.9, open=350.9, close=351.65, color='GREEN') second_candle=CandleItem(low=351.4, high=352.75, open=351.65, close=351.55, color='RED') last_candle=CandleItem(low=351.45, high=353.0, open=351.55, close=353.0, color='GREEN') 2020-10-02 07:00:20 INFO: check need new order None 2020-10-02 07:00:20 INFO: init new order end 2020-10-02 07:00:20 INFO: 2020-10-02 07:00:20 INFO: 2020-10-02 07:00:20 INFO: 2020-10-02 07:00:20 INFO: 2020-10-02 07:02:00 INFO: 2020-10-02 07:02:00 INFO: 2020-10-02 07:02:00 INFO: 2020-10-02 07:02:00 INFO: 2020-10-02 07:02:00 INFO: clearing start 2020-10-02 07:02:00 INFO: clearing end 2020-10-02 07:02:00 INFO: 2020-10-02 07:02:00 INFO: 2020-10-02 07:02:00 INFO: 2020-10-02 07:02:00 INFO: 2020-10-02 08:00:20 INFO: 2020-10-02 08:00:20 INFO: 2020-10-02 08:00:20 INFO: 2020-10-02 08:00:20 INFO: 2020-10-02 08:00:20 INFO: init new order start 2020-10-02 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 2, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.0, 'high': 354.35, 'low': 351.2, 'close': 351.25, 'trades': 2317, 'volume': 1688557, 'vwap': 353.12, 'lastSize': 100, 'turnover': 59625998230, 'homeNotional': 17966.69521442287, 'foreignNotional': 6344381.324274073}, {'timestamp': datetime.datetime(2020, 10, 2, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.55, 'high': 353.0, 'low': 351.45, 'close': 353.0, 'trades': 1260, 'volume': 982120, 'vwap': 352.06, 'lastSize': 14, 'turnover': 34576279935, 'homeNotional': 10427.428969631126, 'foreignNotional': 3671060.649580309}, {'timestamp': datetime.datetime(2020, 10, 2, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.65, 'high': 352.75, 'low': 351.4, 'close': 351.55, 'trades': 1572, 'volume': 1154950, 'vwap': 352.01, 'lastSize': 10, 'turnover': 40654451525, 'homeNotional': 12243.287668876208, 'foreignNotional': 4309661.849305444}] 2020-10-02 08:00:20 INFO: prepare candles [CandleItem(low=351.2, high=354.35, open=353.0, close=351.25, color='RED'), CandleItem(low=351.45, high=353.0, open=351.55, close=353.0, color='GREEN'), CandleItem(low=351.4, high=352.75, open=351.65, close=351.55, color='RED')] 2020-10-02 08:00:20 INFO: skip by colors first_candle=CandleItem(low=351.4, high=352.75, open=351.65, close=351.55, color='RED') second_candle=CandleItem(low=351.45, high=353.0, open=351.55, close=353.0, color='GREEN') last_candle=CandleItem(low=351.2, high=354.35, open=353.0, close=351.25, color='RED') 2020-10-02 08:00:20 INFO: check need new order None 2020-10-02 08:00:20 INFO: init new order end 2020-10-02 08:00:20 INFO: 2020-10-02 08:00:20 INFO: 2020-10-02 08:00:20 INFO: 2020-10-02 08:00:20 INFO: 2020-10-02 08:02:00 INFO: 2020-10-02 08:02:00 INFO: 2020-10-02 08:02:00 INFO: 2020-10-02 08:02:00 INFO: 2020-10-02 08:02:00 INFO: clearing start 2020-10-02 08:02:00 INFO: clearing end 2020-10-02 08:02:00 INFO: 2020-10-02 08:02:00 INFO: 2020-10-02 08:02:00 INFO: 2020-10-02 08:02:00 INFO: 2020-10-02 09:00:20 INFO: 2020-10-02 09:00:20 INFO: 2020-10-02 09:00:20 INFO: 2020-10-02 09:00:20 INFO: 2020-10-02 09:00:20 INFO: init new order start 2020-10-02 09:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 2, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.25, 'high': 351.2, 'low': 342.0, 'close': 342.75, 'trades': 9649, 'volume': 6928760, 'vwap': 345.65, 'lastSize': 12, 'turnover': 239487747100, 'homeNotional': 72601.2123699267, 'foreignNotional': 25094908.253804825}, {'timestamp': datetime.datetime(2020, 10, 2, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.0, 'high': 354.35, 'low': 351.2, 'close': 351.25, 'trades': 2317, 'volume': 1688557, 'vwap': 353.12, 'lastSize': 100, 'turnover': 59625998230, 'homeNotional': 17966.69521442287, 'foreignNotional': 6344381.324274073}, {'timestamp': datetime.datetime(2020, 10, 2, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.55, 'high': 353.0, 'low': 351.45, 'close': 353.0, 'trades': 1260, 'volume': 982120, 'vwap': 352.06, 'lastSize': 14, 'turnover': 34576279935, 'homeNotional': 10427.428969631126, 'foreignNotional': 3671060.649580309}] 2020-10-02 09:00:20 INFO: prepare candles [CandleItem(low=342.0, high=351.2, open=351.25, close=342.75, color='RED'), CandleItem(low=351.2, high=354.35, open=353.0, close=351.25, color='RED'), CandleItem(low=351.45, high=353.0, open=351.55, close=353.0, color='GREEN')] 2020-10-02 09:00:20 INFO: skip by colors first_candle=CandleItem(low=351.45, high=353.0, open=351.55, close=353.0, color='GREEN') second_candle=CandleItem(low=351.2, high=354.35, open=353.0, close=351.25, color='RED') last_candle=CandleItem(low=342.0, high=351.2, open=351.25, close=342.75, color='RED') 2020-10-02 09:00:20 INFO: check need new order None 2020-10-02 09:00:20 INFO: init new order end 2020-10-02 09:00:20 INFO: 2020-10-02 09:00:20 INFO: 2020-10-02 09:00:20 INFO: 2020-10-02 09:00:20 INFO: 2020-10-02 09:02:00 INFO: 2020-10-02 09:02:00 INFO: 2020-10-02 09:02:00 INFO: 2020-10-02 09:02:00 INFO: 2020-10-02 09:02:00 INFO: clearing start 2020-10-02 09:02:00 INFO: clearing end 2020-10-02 09:02:00 INFO: 2020-10-02 09:02:00 INFO: 2020-10-02 09:02:00 INFO: 2020-10-02 09:02:00 INFO: 2020-10-02 10:00:20 INFO: 2020-10-02 10:00:20 INFO: 2020-10-02 10:00:20 INFO: 2020-10-02 10:00:20 INFO: 2020-10-02 10:00:20 INFO: init new order start 2020-10-02 10:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 2, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 342.75, 'high': 344.6, 'low': 340.3, 'close': 344.3, 'trades': 4042, 'volume': 3150724, 'vwap': 342.68, 'lastSize': 11, 'turnover': 107966447700, 'homeNotional': 32957.797073393274, 'foreignNotional': 11293836.493900517}, {'timestamp': datetime.datetime(2020, 10, 2, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.25, 'high': 351.2, 'low': 342.0, 'close': 342.75, 'trades': 9649, 'volume': 6928760, 'vwap': 345.65, 'lastSize': 12, 'turnover': 239487747100, 'homeNotional': 72601.2123699267, 'foreignNotional': 25094908.253804825}, {'timestamp': datetime.datetime(2020, 10, 2, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.0, 'high': 354.35, 'low': 351.2, 'close': 351.25, 'trades': 2317, 'volume': 1688557, 'vwap': 353.12, 'lastSize': 100, 'turnover': 59625998230, 'homeNotional': 17966.69521442287, 'foreignNotional': 6344381.324274073}] 2020-10-02 10:00:20 INFO: prepare candles [CandleItem(low=340.3, high=344.6, open=342.75, close=344.3, color='GREEN'), CandleItem(low=342.0, high=351.2, open=351.25, close=342.75, color='RED'), CandleItem(low=351.2, high=354.35, open=353.0, close=351.25, color='RED')] 2020-10-02 10:00:20 INFO: last_candle=CandleItem(low=340.3, high=344.6, open=342.75, close=344.3, color='GREEN') 2020-10-02 10:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-02 10:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=340.3, high=344.6, open=342.75, close=344.3, color='GREEN') 2020-10-02 10:00:20 INFO: skip by CandleItem(low=340.3, high=344.6, open=342.75, close=344.3, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-02 10:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-02 10:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=340.3, high=344.6, open=342.75, close=344.3, color='GREEN') 2020-10-02 10:00:20 INFO: skip by CandleItem(low=340.3, high=344.6, open=342.75, close=344.3, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-02 10:00:20 INFO: not found applicable config for candle 2020-10-02 10:00:20 INFO: check need new order None 2020-10-02 10:00:20 INFO: init new order end 2020-10-02 10:00:20 INFO: 2020-10-02 10:00:20 INFO: 2020-10-02 10:00:20 INFO: 2020-10-02 10:00:20 INFO: 2020-10-02 10:02:00 INFO: 2020-10-02 10:02:00 INFO: 2020-10-02 10:02:00 INFO: 2020-10-02 10:02:00 INFO: 2020-10-02 10:02:00 INFO: clearing start 2020-10-02 10:02:00 INFO: clearing end 2020-10-02 10:02:00 INFO: 2020-10-02 10:02:00 INFO: 2020-10-02 10:02:00 INFO: 2020-10-02 10:02:00 INFO: 2020-10-02 11:00:20 INFO: 2020-10-02 11:00:20 INFO: 2020-10-02 11:00:20 INFO: 2020-10-02 11:00:20 INFO: 2020-10-02 11:00:20 INFO: init new order start 2020-10-02 11:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 2, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 344.3, 'high': 344.7, 'low': 341.85, 'close': 342.45, 'trades': 3454, 'volume': 2815345, 'vwap': 343.21, 'lastSize': 100, 'turnover': 96625359980, 'homeNotional': 29546.307316738774, 'foreignNotional': 10140592.98155433}, {'timestamp': datetime.datetime(2020, 10, 2, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 342.75, 'high': 344.6, 'low': 340.3, 'close': 344.3, 'trades': 4042, 'volume': 3150724, 'vwap': 342.68, 'lastSize': 11, 'turnover': 107966447700, 'homeNotional': 32957.797073393274, 'foreignNotional': 11293836.493900517}, {'timestamp': datetime.datetime(2020, 10, 2, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.25, 'high': 351.2, 'low': 342.0, 'close': 342.75, 'trades': 9649, 'volume': 6928760, 'vwap': 345.65, 'lastSize': 12, 'turnover': 239487747100, 'homeNotional': 72601.2123699267, 'foreignNotional': 25094908.253804825}] 2020-10-02 11:00:20 INFO: prepare candles [CandleItem(low=341.85, high=344.7, open=344.3, close=342.45, color='RED'), CandleItem(low=340.3, high=344.6, open=342.75, close=344.3, color='GREEN'), CandleItem(low=342.0, high=351.2, open=351.25, close=342.75, color='RED')] 2020-10-02 11:00:20 INFO: skip by colors first_candle=CandleItem(low=342.0, high=351.2, open=351.25, close=342.75, color='RED') second_candle=CandleItem(low=340.3, high=344.6, open=342.75, close=344.3, color='GREEN') last_candle=CandleItem(low=341.85, high=344.7, open=344.3, close=342.45, color='RED') 2020-10-02 11:00:20 INFO: check need new order None 2020-10-02 11:00:20 INFO: init new order end 2020-10-02 11:00:20 INFO: 2020-10-02 11:00:20 INFO: 2020-10-02 11:00:20 INFO: 2020-10-02 11:00:20 INFO: 2020-10-02 11:02:00 INFO: 2020-10-02 11:02:00 INFO: 2020-10-02 11:02:00 INFO: 2020-10-02 11:02:00 INFO: 2020-10-02 11:02:00 INFO: clearing start 2020-10-02 11:02:00 INFO: clearing end 2020-10-02 11:02:00 INFO: 2020-10-02 11:02:00 INFO: 2020-10-02 11:02:00 INFO: 2020-10-02 11:02:00 INFO: 2020-10-02 12:00:20 INFO: 2020-10-02 12:00:20 INFO: 2020-10-02 12:00:20 INFO: 2020-10-02 12:00:20 INFO: 2020-10-02 12:00:20 INFO: init new order start 2020-10-02 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 2, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 342.45, 'high': 343.6, 'low': 336.65, 'close': 338.45, 'trades': 5702, 'volume': 4878253, 'vwap': 340.66, 'lastSize': 1, 'turnover': 166181737480, 'homeNotional': 51075.046123754706, 'foreignNotional': 17399247.78313896}, {'timestamp': datetime.datetime(2020, 10, 2, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 344.3, 'high': 344.7, 'low': 341.85, 'close': 342.45, 'trades': 3454, 'volume': 2815345, 'vwap': 343.21, 'lastSize': 100, 'turnover': 96625359980, 'homeNotional': 29546.307316738774, 'foreignNotional': 10140592.98155433}, {'timestamp': datetime.datetime(2020, 10, 2, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 342.75, 'high': 344.6, 'low': 340.3, 'close': 344.3, 'trades': 4042, 'volume': 3150724, 'vwap': 342.68, 'lastSize': 11, 'turnover': 107966447700, 'homeNotional': 32957.797073393274, 'foreignNotional': 11293836.493900517}] 2020-10-02 12:00:20 INFO: prepare candles [CandleItem(low=336.65, high=343.6, open=342.45, close=338.45, color='RED'), CandleItem(low=341.85, high=344.7, open=344.3, close=342.45, color='RED'), CandleItem(low=340.3, high=344.6, open=342.75, close=344.3, color='GREEN')] 2020-10-02 12:00:20 INFO: skip by colors first_candle=CandleItem(low=340.3, high=344.6, open=342.75, close=344.3, color='GREEN') second_candle=CandleItem(low=341.85, high=344.7, open=344.3, close=342.45, color='RED') last_candle=CandleItem(low=336.65, high=343.6, open=342.45, close=338.45, color='RED') 2020-10-02 12:00:20 INFO: check need new order None 2020-10-02 12:00:20 INFO: init new order end 2020-10-02 12:00:20 INFO: 2020-10-02 12:00:20 INFO: 2020-10-02 12:00:20 INFO: 2020-10-02 12:00:20 INFO: 2020-10-02 12:02:00 INFO: 2020-10-02 12:02:00 INFO: 2020-10-02 12:02:00 INFO: 2020-10-02 12:02:00 INFO: 2020-10-02 12:02:00 INFO: clearing start 2020-10-02 12:02:00 INFO: clearing end 2020-10-02 12:02:00 INFO: 2020-10-02 12:02:00 INFO: 2020-10-02 12:02:00 INFO: 2020-10-02 12:02:00 INFO: 2020-10-02 13:00:20 INFO: 2020-10-02 13:00:20 INFO: 2020-10-02 13:00:20 INFO: 2020-10-02 13:00:20 INFO: 2020-10-02 13:00:20 INFO: init new order start 2020-10-02 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 2, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 338.45, 'high': 341.65, 'low': 336.65, 'close': 338.25, 'trades': 5471, 'volume': 4658698, 'vwap': 338.56, 'lastSize': 5, 'turnover': 157720439585, 'homeNotional': 48693.47912420781, 'foreignNotional': 16485292.2593452}, {'timestamp': datetime.datetime(2020, 10, 2, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 342.45, 'high': 343.6, 'low': 336.65, 'close': 338.45, 'trades': 5702, 'volume': 4878253, 'vwap': 340.66, 'lastSize': 1, 'turnover': 166181737480, 'homeNotional': 51075.046123754706, 'foreignNotional': 17399247.78313896}, {'timestamp': datetime.datetime(2020, 10, 2, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 344.3, 'high': 344.7, 'low': 341.85, 'close': 342.45, 'trades': 3454, 'volume': 2815345, 'vwap': 343.21, 'lastSize': 100, 'turnover': 96625359980, 'homeNotional': 29546.307316738774, 'foreignNotional': 10140592.98155433}] 2020-10-02 13:00:20 INFO: prepare candles [CandleItem(low=336.65, high=341.65, open=338.45, close=338.25, color='RED'), CandleItem(low=336.65, high=343.6, open=342.45, close=338.45, color='RED'), CandleItem(low=341.85, high=344.7, open=344.3, close=342.45, color='RED')] 2020-10-02 13:00:20 INFO: skip by colors first_candle=CandleItem(low=341.85, high=344.7, open=344.3, close=342.45, color='RED') second_candle=CandleItem(low=336.65, high=343.6, open=342.45, close=338.45, color='RED') last_candle=CandleItem(low=336.65, high=341.65, open=338.45, close=338.25, color='RED') 2020-10-02 13:00:20 INFO: check need new order None 2020-10-02 13:00:20 INFO: init new order end 2020-10-02 13:00:20 INFO: 2020-10-02 13:00:20 INFO: 2020-10-02 13:00:20 INFO: 2020-10-02 13:00:20 INFO: 2020-10-02 13:02:00 INFO: 2020-10-02 13:02:00 INFO: 2020-10-02 13:02:00 INFO: 2020-10-02 13:02:00 INFO: 2020-10-02 13:02:00 INFO: clearing start 2020-10-02 13:02:00 INFO: clearing end 2020-10-02 13:02:00 INFO: 2020-10-02 13:02:00 INFO: 2020-10-02 13:02:00 INFO: 2020-10-02 13:02:00 INFO: 2020-10-02 14:00:20 INFO: 2020-10-02 14:00:20 INFO: 2020-10-02 14:00:20 INFO: 2020-10-02 14:00:20 INFO: 2020-10-02 14:00:20 INFO: init new order start 2020-10-02 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 2, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 338.25, 'high': 339.8, 'low': 334.65, 'close': 338.55, 'trades': 4975, 'volume': 4166717, 'vwap': 337.01, 'lastSize': 1, 'turnover': 140420600180, 'homeNotional': 43482.16619230639, 'foreignNotional': 14653792.88521146}, {'timestamp': datetime.datetime(2020, 10, 2, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 338.45, 'high': 341.65, 'low': 336.65, 'close': 338.25, 'trades': 5471, 'volume': 4658698, 'vwap': 338.56, 'lastSize': 5, 'turnover': 157720439585, 'homeNotional': 48693.47912420781, 'foreignNotional': 16485292.2593452}, {'timestamp': datetime.datetime(2020, 10, 2, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 342.45, 'high': 343.6, 'low': 336.65, 'close': 338.45, 'trades': 5702, 'volume': 4878253, 'vwap': 340.66, 'lastSize': 1, 'turnover': 166181737480, 'homeNotional': 51075.046123754706, 'foreignNotional': 17399247.78313896}] 2020-10-02 14:00:20 INFO: prepare candles [CandleItem(low=334.65, high=339.8, open=338.25, close=338.55, color='GREEN'), CandleItem(low=336.65, high=341.65, open=338.45, close=338.25, color='RED'), CandleItem(low=336.65, high=343.6, open=342.45, close=338.45, color='RED')] 2020-10-02 14:00:20 INFO: last_candle=CandleItem(low=334.65, high=339.8, open=338.25, close=338.55, color='GREEN') 2020-10-02 14:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-02 14:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=334.65, high=339.8, open=338.25, close=338.55, color='GREEN') 2020-10-02 14:00:20 INFO: skip by CandleItem(low=334.65, high=339.8, open=338.25, close=338.55, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-02 14:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-02 14:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=334.65, high=339.8, open=338.25, close=338.55, color='GREEN') 2020-10-02 14:00:20 INFO: skip by CandleItem(low=334.65, high=339.8, open=338.25, close=338.55, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-02 14:00:20 INFO: not found applicable config for candle 2020-10-02 14:00:20 INFO: check need new order None 2020-10-02 14:00:20 INFO: init new order end 2020-10-02 14:00:20 INFO: 2020-10-02 14:00:20 INFO: 2020-10-02 14:00:20 INFO: 2020-10-02 14:00:20 INFO: 2020-10-02 14:02:00 INFO: 2020-10-02 14:02:00 INFO: 2020-10-02 14:02:00 INFO: 2020-10-02 14:02:00 INFO: 2020-10-02 14:02:00 INFO: clearing start 2020-10-02 14:02:00 INFO: clearing end 2020-10-02 14:02:00 INFO: 2020-10-02 14:02:00 INFO: 2020-10-02 14:02:00 INFO: 2020-10-02 14:02:00 INFO: 2020-10-02 15:00:20 INFO: 2020-10-02 15:00:20 INFO: 2020-10-02 15:00:20 INFO: 2020-10-02 15:00:20 INFO: 2020-10-02 15:00:20 INFO: init new order start 2020-10-02 15:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 2, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 338.55, 'high': 340.0, 'low': 337.25, 'close': 337.3, 'trades': 3296, 'volume': 2442821, 'vwap': 338.51, 'lastSize': 280, 'turnover': 82690070010, 'homeNotional': 25553.856239670356, 'foreignNotional': 8650050.868981393}, {'timestamp': datetime.datetime(2020, 10, 2, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 338.25, 'high': 339.8, 'low': 334.65, 'close': 338.55, 'trades': 4975, 'volume': 4166717, 'vwap': 337.01, 'lastSize': 1, 'turnover': 140420600180, 'homeNotional': 43482.16619230639, 'foreignNotional': 14653792.88521146}, {'timestamp': datetime.datetime(2020, 10, 2, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 338.45, 'high': 341.65, 'low': 336.65, 'close': 338.25, 'trades': 5471, 'volume': 4658698, 'vwap': 338.56, 'lastSize': 5, 'turnover': 157720439585, 'homeNotional': 48693.47912420781, 'foreignNotional': 16485292.2593452}] 2020-10-02 15:00:21 INFO: prepare candles [CandleItem(low=337.25, high=340.0, open=338.55, close=337.3, color='RED'), CandleItem(low=334.65, high=339.8, open=338.25, close=338.55, color='GREEN'), CandleItem(low=336.65, high=341.65, open=338.45, close=338.25, color='RED')] 2020-10-02 15:00:21 INFO: skip by colors first_candle=CandleItem(low=336.65, high=341.65, open=338.45, close=338.25, color='RED') second_candle=CandleItem(low=334.65, high=339.8, open=338.25, close=338.55, color='GREEN') last_candle=CandleItem(low=337.25, high=340.0, open=338.55, close=337.3, color='RED') 2020-10-02 15:00:21 INFO: check need new order None 2020-10-02 15:00:21 INFO: init new order end 2020-10-02 15:00:21 INFO: 2020-10-02 15:00:21 INFO: 2020-10-02 15:00:21 INFO: 2020-10-02 15:00:21 INFO: 2020-10-02 15:02:00 INFO: 2020-10-02 15:02:00 INFO: 2020-10-02 15:02:00 INFO: 2020-10-02 15:02:00 INFO: 2020-10-02 15:02:00 INFO: clearing start 2020-10-02 15:02:00 INFO: clearing end 2020-10-02 15:02:00 INFO: 2020-10-02 15:02:00 INFO: 2020-10-02 15:02:00 INFO: 2020-10-02 15:02:00 INFO: 2020-10-02 16:00:20 INFO: 2020-10-02 16:00:20 INFO: 2020-10-02 16:00:20 INFO: 2020-10-02 16:00:20 INFO: 2020-10-02 16:00:20 INFO: init new order start 2020-10-02 16:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 2, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 337.3, 'high': 339.35, 'low': 336.6, 'close': 339.2, 'trades': 4210, 'volume': 3137841, 'vwap': 338.33, 'lastSize': 181, 'turnover': 106162515960, 'homeNotional': 32861.17961334984, 'foreignNotional': 11117944.772061454}, {'timestamp': datetime.datetime(2020, 10, 2, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 338.55, 'high': 340.0, 'low': 337.25, 'close': 337.3, 'trades': 3296, 'volume': 2442821, 'vwap': 338.51, 'lastSize': 280, 'turnover': 82690070010, 'homeNotional': 25553.856239670356, 'foreignNotional': 8650050.868981393}, {'timestamp': datetime.datetime(2020, 10, 2, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 338.25, 'high': 339.8, 'low': 334.65, 'close': 338.55, 'trades': 4975, 'volume': 4166717, 'vwap': 337.01, 'lastSize': 1, 'turnover': 140420600180, 'homeNotional': 43482.16619230639, 'foreignNotional': 14653792.88521146}] 2020-10-02 16:00:21 INFO: prepare candles [CandleItem(low=336.6, high=339.35, open=337.3, close=339.2, color='GREEN'), CandleItem(low=337.25, high=340.0, open=338.55, close=337.3, color='RED'), CandleItem(low=334.65, high=339.8, open=338.25, close=338.55, color='GREEN')] 2020-10-02 16:00:21 INFO: skip by colors first_candle=CandleItem(low=334.65, high=339.8, open=338.25, close=338.55, color='GREEN') second_candle=CandleItem(low=337.25, high=340.0, open=338.55, close=337.3, color='RED') last_candle=CandleItem(low=336.6, high=339.35, open=337.3, close=339.2, color='GREEN') 2020-10-02 16:00:21 INFO: check need new order None 2020-10-02 16:00:21 INFO: init new order end 2020-10-02 16:00:21 INFO: 2020-10-02 16:00:21 INFO: 2020-10-02 16:00:21 INFO: 2020-10-02 16:00:21 INFO: 2020-10-02 16:02:00 INFO: 2020-10-02 16:02:00 INFO: 2020-10-02 16:02:00 INFO: 2020-10-02 16:02:00 INFO: 2020-10-02 16:02:00 INFO: clearing start 2020-10-02 16:02:00 INFO: clearing end 2020-10-02 16:02:00 INFO: 2020-10-02 16:02:00 INFO: 2020-10-02 16:02:00 INFO: 2020-10-02 16:02:00 INFO: 2020-10-02 17:00:20 INFO: 2020-10-02 17:00:20 INFO: 2020-10-02 17:00:20 INFO: 2020-10-02 17:00:20 INFO: 2020-10-02 17:00:20 INFO: init new order start 2020-10-02 17:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 2, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.2, 'high': 343.85, 'low': 336.75, 'close': 341.7, 'trades': 6238, 'volume': 5356748, 'vwap': 340.97, 'lastSize': 139, 'turnover': 182647679690, 'homeNotional': 56310.05417807281, 'foreignNotional': 19200306.159551837}, {'timestamp': datetime.datetime(2020, 10, 2, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 337.3, 'high': 339.35, 'low': 336.6, 'close': 339.2, 'trades': 4210, 'volume': 3137841, 'vwap': 338.33, 'lastSize': 181, 'turnover': 106162515960, 'homeNotional': 32861.17961334984, 'foreignNotional': 11117944.772061454}, {'timestamp': datetime.datetime(2020, 10, 2, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 338.55, 'high': 340.0, 'low': 337.25, 'close': 337.3, 'trades': 3296, 'volume': 2442821, 'vwap': 338.51, 'lastSize': 280, 'turnover': 82690070010, 'homeNotional': 25553.856239670356, 'foreignNotional': 8650050.868981393}] 2020-10-02 17:00:21 INFO: prepare candles [CandleItem(low=336.75, high=343.85, open=339.2, close=341.7, color='GREEN'), CandleItem(low=336.6, high=339.35, open=337.3, close=339.2, color='GREEN'), CandleItem(low=337.25, high=340.0, open=338.55, close=337.3, color='RED')] 2020-10-02 17:00:21 INFO: skip by colors first_candle=CandleItem(low=337.25, high=340.0, open=338.55, close=337.3, color='RED') second_candle=CandleItem(low=336.6, high=339.35, open=337.3, close=339.2, color='GREEN') last_candle=CandleItem(low=336.75, high=343.85, open=339.2, close=341.7, color='GREEN') 2020-10-02 17:00:21 INFO: check need new order None 2020-10-02 17:00:21 INFO: init new order end 2020-10-02 17:00:21 INFO: 2020-10-02 17:00:21 INFO: 2020-10-02 17:00:21 INFO: 2020-10-02 17:00:21 INFO: 2020-10-02 17:02:00 INFO: 2020-10-02 17:02:00 INFO: 2020-10-02 17:02:00 INFO: 2020-10-02 17:02:00 INFO: 2020-10-02 17:02:00 INFO: clearing start 2020-10-02 17:02:00 INFO: clearing end 2020-10-02 17:02:00 INFO: 2020-10-02 17:02:00 INFO: 2020-10-02 17:02:00 INFO: 2020-10-02 17:02:00 INFO: 2020-10-02 18:00:20 INFO: 2020-10-02 18:00:20 INFO: 2020-10-02 18:00:20 INFO: 2020-10-02 18:00:20 INFO: 2020-10-02 18:00:20 INFO: init new order start 2020-10-02 18:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 2, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.7, 'high': 346.4, 'low': 341.65, 'close': 344.45, 'trades': 5160, 'volume': 3096348, 'vwap': 343.62, 'lastSize': 500, 'turnover': 106396229340, 'homeNotional': 32616.699368968984, 'foreignNotional': 11207705.048315773}, {'timestamp': datetime.datetime(2020, 10, 2, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.2, 'high': 343.85, 'low': 336.75, 'close': 341.7, 'trades': 6238, 'volume': 5356748, 'vwap': 340.97, 'lastSize': 139, 'turnover': 182647679690, 'homeNotional': 56310.05417807281, 'foreignNotional': 19200306.159551837}, {'timestamp': datetime.datetime(2020, 10, 2, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 337.3, 'high': 339.35, 'low': 336.6, 'close': 339.2, 'trades': 4210, 'volume': 3137841, 'vwap': 338.33, 'lastSize': 181, 'turnover': 106162515960, 'homeNotional': 32861.17961334984, 'foreignNotional': 11117944.772061454}] 2020-10-02 18:00:20 INFO: prepare candles [CandleItem(low=341.65, high=346.4, open=341.7, close=344.45, color='GREEN'), CandleItem(low=336.75, high=343.85, open=339.2, close=341.7, color='GREEN'), CandleItem(low=336.6, high=339.35, open=337.3, close=339.2, color='GREEN')] 2020-10-02 18:00:20 INFO: skip by colors first_candle=CandleItem(low=336.6, high=339.35, open=337.3, close=339.2, color='GREEN') second_candle=CandleItem(low=336.75, high=343.85, open=339.2, close=341.7, color='GREEN') last_candle=CandleItem(low=341.65, high=346.4, open=341.7, close=344.45, color='GREEN') 2020-10-02 18:00:20 INFO: check need new order None 2020-10-02 18:00:20 INFO: init new order end 2020-10-02 18:00:20 INFO: 2020-10-02 18:00:20 INFO: 2020-10-02 18:00:20 INFO: 2020-10-02 18:00:20 INFO: 2020-10-02 18:02:00 INFO: 2020-10-02 18:02:00 INFO: 2020-10-02 18:02:00 INFO: 2020-10-02 18:02:00 INFO: 2020-10-02 18:02:00 INFO: clearing start 2020-10-02 18:02:00 INFO: clearing end 2020-10-02 18:02:00 INFO: 2020-10-02 18:02:00 INFO: 2020-10-02 18:02:00 INFO: 2020-10-02 18:02:00 INFO: 2020-10-02 19:00:20 INFO: 2020-10-02 19:00:20 INFO: 2020-10-02 19:00:20 INFO: 2020-10-02 19:00:20 INFO: 2020-10-02 19:00:20 INFO: init new order start 2020-10-02 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 2, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 344.45, 'high': 345.65, 'low': 342.55, 'close': 343.0, 'trades': 3448, 'volume': 2093590, 'vwap': 344.32, 'lastSize': 30, 'turnover': 72085928465, 'homeNotional': 22054.478547494466, 'foreignNotional': 7593746.533525723}, {'timestamp': datetime.datetime(2020, 10, 2, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.7, 'high': 346.4, 'low': 341.65, 'close': 344.45, 'trades': 5160, 'volume': 3096348, 'vwap': 343.62, 'lastSize': 500, 'turnover': 106396229340, 'homeNotional': 32616.699368968984, 'foreignNotional': 11207705.048315773}, {'timestamp': datetime.datetime(2020, 10, 2, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.2, 'high': 343.85, 'low': 336.75, 'close': 341.7, 'trades': 6238, 'volume': 5356748, 'vwap': 340.97, 'lastSize': 139, 'turnover': 182647679690, 'homeNotional': 56310.05417807281, 'foreignNotional': 19200306.159551837}] 2020-10-02 19:00:20 INFO: prepare candles [CandleItem(low=342.55, high=345.65, open=344.45, close=343.0, color='RED'), CandleItem(low=341.65, high=346.4, open=341.7, close=344.45, color='GREEN'), CandleItem(low=336.75, high=343.85, open=339.2, close=341.7, color='GREEN')] 2020-10-02 19:00:20 INFO: last_candle=CandleItem(low=342.55, high=345.65, open=344.45, close=343.0, color='RED') 2020-10-02 19:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-02 19:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=342.55, high=345.65, open=344.45, close=343.0, color='RED') 2020-10-02 19:00:20 INFO: skip by CandleItem(low=342.55, high=345.65, open=344.45, close=343.0, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-02 19:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-02 19:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=342.55, high=345.65, open=344.45, close=343.0, color='RED') 2020-10-02 19:00:20 INFO: skip by CandleItem(low=342.55, high=345.65, open=344.45, close=343.0, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-02 19:00:20 INFO: not found applicable config for candle 2020-10-02 19:00:20 INFO: check need new order None 2020-10-02 19:00:20 INFO: init new order end 2020-10-02 19:00:20 INFO: 2020-10-02 19:00:20 INFO: 2020-10-02 19:00:20 INFO: 2020-10-02 19:00:20 INFO: 2020-10-02 19:02:00 INFO: 2020-10-02 19:02:00 INFO: 2020-10-02 19:02:00 INFO: 2020-10-02 19:02:00 INFO: 2020-10-02 19:02:00 INFO: clearing start 2020-10-02 19:02:00 INFO: clearing end 2020-10-02 19:02:00 INFO: 2020-10-02 19:02:00 INFO: 2020-10-02 19:02:00 INFO: 2020-10-02 19:02:00 INFO: 2020-10-02 20:00:20 INFO: 2020-10-02 20:00:20 INFO: 2020-10-02 20:00:20 INFO: 2020-10-02 20:00:20 INFO: 2020-10-02 20:00:20 INFO: init new order start 2020-10-02 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 2, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 343.0, 'high': 345.25, 'low': 341.6, 'close': 344.7, 'trades': 3162, 'volume': 1702887, 'vwap': 343.77, 'lastSize': 9, 'turnover': 58538886595, 'homeNotional': 17940.10813790238, 'foreignNotional': 6167175.4253571965}, {'timestamp': datetime.datetime(2020, 10, 2, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 344.45, 'high': 345.65, 'low': 342.55, 'close': 343.0, 'trades': 3448, 'volume': 2093590, 'vwap': 344.32, 'lastSize': 30, 'turnover': 72085928465, 'homeNotional': 22054.478547494466, 'foreignNotional': 7593746.533525723}, {'timestamp': datetime.datetime(2020, 10, 2, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.7, 'high': 346.4, 'low': 341.65, 'close': 344.45, 'trades': 5160, 'volume': 3096348, 'vwap': 343.62, 'lastSize': 500, 'turnover': 106396229340, 'homeNotional': 32616.699368968984, 'foreignNotional': 11207705.048315773}] 2020-10-02 20:00:20 INFO: prepare candles [CandleItem(low=341.6, high=345.25, open=343.0, close=344.7, color='GREEN'), CandleItem(low=342.55, high=345.65, open=344.45, close=343.0, color='RED'), CandleItem(low=341.65, high=346.4, open=341.7, close=344.45, color='GREEN')] 2020-10-02 20:00:20 INFO: skip by colors first_candle=CandleItem(low=341.65, high=346.4, open=341.7, close=344.45, color='GREEN') second_candle=CandleItem(low=342.55, high=345.65, open=344.45, close=343.0, color='RED') last_candle=CandleItem(low=341.6, high=345.25, open=343.0, close=344.7, color='GREEN') 2020-10-02 20:00:20 INFO: check need new order None 2020-10-02 20:00:20 INFO: init new order end 2020-10-02 20:00:20 INFO: 2020-10-02 20:00:20 INFO: 2020-10-02 20:00:20 INFO: 2020-10-02 20:00:20 INFO: 2020-10-02 20:02:00 INFO: 2020-10-02 20:02:00 INFO: 2020-10-02 20:02:00 INFO: 2020-10-02 20:02:00 INFO: 2020-10-02 20:02:00 INFO: clearing start 2020-10-02 20:02:00 INFO: clearing end 2020-10-02 20:02:00 INFO: 2020-10-02 20:02:00 INFO: 2020-10-02 20:02:00 INFO: 2020-10-02 20:02:00 INFO: 2020-10-02 21:00:20 INFO: 2020-10-02 21:00:20 INFO: 2020-10-02 21:00:20 INFO: 2020-10-02 21:00:20 INFO: 2020-10-02 21:00:20 INFO: init new order start 2020-10-02 21:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 2, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 344.7, 'high': 345.0, 'low': 343.15, 'close': 344.0, 'trades': 1971, 'volume': 760893, 'vwap': 344.02, 'lastSize': 1, 'turnover': 26175546645, 'homeNotional': 8023.401109214999, 'foreignNotional': 2760140.1567684556}, {'timestamp': datetime.datetime(2020, 10, 2, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 343.0, 'high': 345.25, 'low': 341.6, 'close': 344.7, 'trades': 3162, 'volume': 1702887, 'vwap': 343.77, 'lastSize': 9, 'turnover': 58538886595, 'homeNotional': 17940.10813790238, 'foreignNotional': 6167175.4253571965}, {'timestamp': datetime.datetime(2020, 10, 2, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 344.45, 'high': 345.65, 'low': 342.55, 'close': 343.0, 'trades': 3448, 'volume': 2093590, 'vwap': 344.32, 'lastSize': 30, 'turnover': 72085928465, 'homeNotional': 22054.478547494466, 'foreignNotional': 7593746.533525723}] 2020-10-02 21:00:21 INFO: prepare candles [CandleItem(low=343.15, high=345.0, open=344.7, close=344.0, color='RED'), CandleItem(low=341.6, high=345.25, open=343.0, close=344.7, color='GREEN'), CandleItem(low=342.55, high=345.65, open=344.45, close=343.0, color='RED')] 2020-10-02 21:00:21 INFO: skip by colors first_candle=CandleItem(low=342.55, high=345.65, open=344.45, close=343.0, color='RED') second_candle=CandleItem(low=341.6, high=345.25, open=343.0, close=344.7, color='GREEN') last_candle=CandleItem(low=343.15, high=345.0, open=344.7, close=344.0, color='RED') 2020-10-02 21:00:21 INFO: check need new order None 2020-10-02 21:00:21 INFO: init new order end 2020-10-02 21:00:21 INFO: 2020-10-02 21:00:21 INFO: 2020-10-02 21:00:21 INFO: 2020-10-02 21:00:21 INFO: 2020-10-02 21:02:00 INFO: 2020-10-02 21:02:00 INFO: 2020-10-02 21:02:00 INFO: 2020-10-02 21:02:00 INFO: 2020-10-02 21:02:00 INFO: clearing start 2020-10-02 21:02:00 INFO: clearing end 2020-10-02 21:02:00 INFO: 2020-10-02 21:02:00 INFO: 2020-10-02 21:02:00 INFO: 2020-10-02 21:02:00 INFO: 2020-10-02 22:00:20 INFO: 2020-10-02 22:00:20 INFO: 2020-10-02 22:00:20 INFO: 2020-10-02 22:00:20 INFO: 2020-10-02 22:00:20 INFO: init new order start 2020-10-02 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 2, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 344.0, 'high': 344.55, 'low': 342.5, 'close': 344.4, 'trades': 2022, 'volume': 953732, 'vwap': 343.77, 'lastSize': 1, 'turnover': 32786104725, 'homeNotional': 10057.967088911488, 'foreignNotional': 3457592.5239041084}, {'timestamp': datetime.datetime(2020, 10, 2, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 344.7, 'high': 345.0, 'low': 343.15, 'close': 344.0, 'trades': 1971, 'volume': 760893, 'vwap': 344.02, 'lastSize': 1, 'turnover': 26175546645, 'homeNotional': 8023.401109214999, 'foreignNotional': 2760140.1567684556}, {'timestamp': datetime.datetime(2020, 10, 2, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 343.0, 'high': 345.25, 'low': 341.6, 'close': 344.7, 'trades': 3162, 'volume': 1702887, 'vwap': 343.77, 'lastSize': 9, 'turnover': 58538886595, 'homeNotional': 17940.10813790238, 'foreignNotional': 6167175.4253571965}] 2020-10-02 22:00:20 INFO: prepare candles [CandleItem(low=342.5, high=344.55, open=344.0, close=344.4, color='GREEN'), CandleItem(low=343.15, high=345.0, open=344.7, close=344.0, color='RED'), CandleItem(low=341.6, high=345.25, open=343.0, close=344.7, color='GREEN')] 2020-10-02 22:00:20 INFO: skip by colors first_candle=CandleItem(low=341.6, high=345.25, open=343.0, close=344.7, color='GREEN') second_candle=CandleItem(low=343.15, high=345.0, open=344.7, close=344.0, color='RED') last_candle=CandleItem(low=342.5, high=344.55, open=344.0, close=344.4, color='GREEN') 2020-10-02 22:00:20 INFO: check need new order None 2020-10-02 22:00:20 INFO: init new order end 2020-10-02 22:00:20 INFO: 2020-10-02 22:00:20 INFO: 2020-10-02 22:00:20 INFO: 2020-10-02 22:00:20 INFO: 2020-10-02 22:02:00 INFO: 2020-10-02 22:02:00 INFO: 2020-10-02 22:02:00 INFO: 2020-10-02 22:02:00 INFO: 2020-10-02 22:02:00 INFO: clearing start 2020-10-02 22:02:01 INFO: clearing end 2020-10-02 22:02:01 INFO: 2020-10-02 22:02:01 INFO: 2020-10-02 22:02:01 INFO: 2020-10-02 22:02:01 INFO: 2020-10-02 23:00:20 INFO: 2020-10-02 23:00:20 INFO: 2020-10-02 23:00:20 INFO: 2020-10-02 23:00:20 INFO: 2020-10-02 23:00:20 INFO: init new order start 2020-10-02 23:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 2, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 344.4, 'high': 344.6, 'low': 342.95, 'close': 342.95, 'trades': 1724, 'volume': 686211, 'vwap': 343.84, 'lastSize': 300, 'turnover': 23594278650, 'homeNotional': 7229.101023814583, 'foreignNotional': 2485613.2541071814}, {'timestamp': datetime.datetime(2020, 10, 2, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 344.0, 'high': 344.55, 'low': 342.5, 'close': 344.4, 'trades': 2022, 'volume': 953732, 'vwap': 343.77, 'lastSize': 1, 'turnover': 32786104725, 'homeNotional': 10057.967088911488, 'foreignNotional': 3457592.5239041084}, {'timestamp': datetime.datetime(2020, 10, 2, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 344.7, 'high': 345.0, 'low': 343.15, 'close': 344.0, 'trades': 1971, 'volume': 760893, 'vwap': 344.02, 'lastSize': 1, 'turnover': 26175546645, 'homeNotional': 8023.401109214999, 'foreignNotional': 2760140.1567684556}] 2020-10-02 23:00:20 INFO: prepare candles [CandleItem(low=342.95, high=344.6, open=344.4, close=342.95, color='RED'), CandleItem(low=342.5, high=344.55, open=344.0, close=344.4, color='GREEN'), CandleItem(low=343.15, high=345.0, open=344.7, close=344.0, color='RED')] 2020-10-02 23:00:20 INFO: skip by colors first_candle=CandleItem(low=343.15, high=345.0, open=344.7, close=344.0, color='RED') second_candle=CandleItem(low=342.5, high=344.55, open=344.0, close=344.4, color='GREEN') last_candle=CandleItem(low=342.95, high=344.6, open=344.4, close=342.95, color='RED') 2020-10-02 23:00:20 INFO: check need new order None 2020-10-02 23:00:20 INFO: init new order end 2020-10-02 23:00:20 INFO: 2020-10-02 23:00:20 INFO: 2020-10-02 23:00:20 INFO: 2020-10-02 23:00:20 INFO: 2020-10-02 23:02:00 INFO: 2020-10-02 23:02:00 INFO: 2020-10-02 23:02:00 INFO: 2020-10-02 23:02:00 INFO: 2020-10-02 23:02:00 INFO: clearing start 2020-10-02 23:02:00 INFO: clearing end 2020-10-02 23:02:00 INFO: 2020-10-02 23:02:00 INFO: 2020-10-02 23:02:00 INFO: 2020-10-02 23:02:00 INFO: 2020-10-03 00:00:20 INFO: 2020-10-03 00:00:20 INFO: 2020-10-03 00:00:20 INFO: 2020-10-03 00:00:20 INFO: 2020-10-03 00:00:20 INFO: init new order start 2020-10-03 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 2, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 342.95, 'high': 347.7, 'low': 342.95, 'close': 346.65, 'trades': 2897, 'volume': 1702657, 'vwap': 345.97, 'lastSize': 500, 'turnover': 58906769390, 'homeNotional': 17945.34520671296, 'foreignNotional': 6208566.242962927}, {'timestamp': datetime.datetime(2020, 10, 2, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 344.4, 'high': 344.6, 'low': 342.95, 'close': 342.95, 'trades': 1724, 'volume': 686211, 'vwap': 343.84, 'lastSize': 300, 'turnover': 23594278650, 'homeNotional': 7229.101023814583, 'foreignNotional': 2485613.2541071814}, {'timestamp': datetime.datetime(2020, 10, 2, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 344.0, 'high': 344.55, 'low': 342.5, 'close': 344.4, 'trades': 2022, 'volume': 953732, 'vwap': 343.77, 'lastSize': 1, 'turnover': 32786104725, 'homeNotional': 10057.967088911488, 'foreignNotional': 3457592.5239041084}] 2020-10-03 00:00:20 INFO: prepare candles [CandleItem(low=342.95, high=347.7, open=342.95, close=346.65, color='GREEN'), CandleItem(low=342.95, high=344.6, open=344.4, close=342.95, color='RED'), CandleItem(low=342.5, high=344.55, open=344.0, close=344.4, color='GREEN')] 2020-10-03 00:00:20 INFO: skip by colors first_candle=CandleItem(low=342.5, high=344.55, open=344.0, close=344.4, color='GREEN') second_candle=CandleItem(low=342.95, high=344.6, open=344.4, close=342.95, color='RED') last_candle=CandleItem(low=342.95, high=347.7, open=342.95, close=346.65, color='GREEN') 2020-10-03 00:00:20 INFO: check need new order None 2020-10-03 00:00:20 INFO: init new order end 2020-10-03 00:00:20 INFO: 2020-10-03 00:00:20 INFO: 2020-10-03 00:00:20 INFO: 2020-10-03 00:00:20 INFO: 2020-10-03 00:02:00 INFO: 2020-10-03 00:02:00 INFO: 2020-10-03 00:02:00 INFO: 2020-10-03 00:02:00 INFO: 2020-10-03 00:02:00 INFO: clearing start 2020-10-03 00:02:00 INFO: clearing end 2020-10-03 00:02:00 INFO: 2020-10-03 00:02:00 INFO: 2020-10-03 00:02:00 INFO: 2020-10-03 00:02:00 INFO: 2020-10-03 01:00:20 INFO: 2020-10-03 01:00:20 INFO: 2020-10-03 01:00:20 INFO: 2020-10-03 01:00:20 INFO: 2020-10-03 01:00:20 INFO: init new order start 2020-10-03 01:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 2, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.65, 'high': 347.25, 'low': 341.25, 'close': 341.8, 'trades': 3573, 'volume': 2250161, 'vwap': 344.34, 'lastSize': 250, 'turnover': 77481412275, 'homeNotional': 23652.35020292279, 'foreignNotional': 8144517.512230709}, {'timestamp': datetime.datetime(2020, 10, 2, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 342.95, 'high': 347.7, 'low': 342.95, 'close': 346.65, 'trades': 2897, 'volume': 1702657, 'vwap': 345.97, 'lastSize': 500, 'turnover': 58906769390, 'homeNotional': 17945.34520671296, 'foreignNotional': 6208566.242962927}, {'timestamp': datetime.datetime(2020, 10, 2, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 344.4, 'high': 344.6, 'low': 342.95, 'close': 342.95, 'trades': 1724, 'volume': 686211, 'vwap': 343.84, 'lastSize': 300, 'turnover': 23594278650, 'homeNotional': 7229.101023814583, 'foreignNotional': 2485613.2541071814}] 2020-10-03 01:00:21 INFO: prepare candles [CandleItem(low=341.25, high=347.25, open=346.65, close=341.8, color='RED'), CandleItem(low=342.95, high=347.7, open=342.95, close=346.65, color='GREEN'), CandleItem(low=342.95, high=344.6, open=344.4, close=342.95, color='RED')] 2020-10-03 01:00:21 INFO: skip by colors first_candle=CandleItem(low=342.95, high=344.6, open=344.4, close=342.95, color='RED') second_candle=CandleItem(low=342.95, high=347.7, open=342.95, close=346.65, color='GREEN') last_candle=CandleItem(low=341.25, high=347.25, open=346.65, close=341.8, color='RED') 2020-10-03 01:00:21 INFO: check need new order None 2020-10-03 01:00:21 INFO: init new order end 2020-10-03 01:00:21 INFO: 2020-10-03 01:00:21 INFO: 2020-10-03 01:00:21 INFO: 2020-10-03 01:00:21 INFO: 2020-10-03 01:02:00 INFO: 2020-10-03 01:02:00 INFO: 2020-10-03 01:02:00 INFO: 2020-10-03 01:02:00 INFO: 2020-10-03 01:02:00 INFO: clearing start 2020-10-03 01:02:00 INFO: clearing end 2020-10-03 01:02:00 INFO: 2020-10-03 01:02:00 INFO: 2020-10-03 01:02:00 INFO: 2020-10-03 01:02:00 INFO: 2020-10-03 02:00:20 INFO: 2020-10-03 02:00:20 INFO: 2020-10-03 02:00:20 INFO: 2020-10-03 02:00:20 INFO: 2020-10-03 02:00:20 INFO: init new order start 2020-10-03 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 2, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.8, 'high': 345.75, 'low': 341.85, 'close': 345.1, 'trades': 3621, 'volume': 2200168, 'vwap': 344.1, 'lastSize': 12, 'turnover': 75706100560, 'homeNotional': 23172.514360307337, 'foreignNotional': 7973567.282236318}, {'timestamp': datetime.datetime(2020, 10, 2, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.65, 'high': 347.25, 'low': 341.25, 'close': 341.8, 'trades': 3573, 'volume': 2250161, 'vwap': 344.34, 'lastSize': 250, 'turnover': 77481412275, 'homeNotional': 23652.35020292279, 'foreignNotional': 8144517.512230709}, {'timestamp': datetime.datetime(2020, 10, 2, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 342.95, 'high': 347.7, 'low': 342.95, 'close': 346.65, 'trades': 2897, 'volume': 1702657, 'vwap': 345.97, 'lastSize': 500, 'turnover': 58906769390, 'homeNotional': 17945.34520671296, 'foreignNotional': 6208566.242962927}] 2020-10-03 02:00:20 INFO: prepare candles [CandleItem(low=341.85, high=345.75, open=341.8, close=345.1, color='GREEN'), CandleItem(low=341.25, high=347.25, open=346.65, close=341.8, color='RED'), CandleItem(low=342.95, high=347.7, open=342.95, close=346.65, color='GREEN')] 2020-10-03 02:00:20 INFO: skip by colors first_candle=CandleItem(low=342.95, high=347.7, open=342.95, close=346.65, color='GREEN') second_candle=CandleItem(low=341.25, high=347.25, open=346.65, close=341.8, color='RED') last_candle=CandleItem(low=341.85, high=345.75, open=341.8, close=345.1, color='GREEN') 2020-10-03 02:00:20 INFO: check need new order None 2020-10-03 02:00:20 INFO: init new order end 2020-10-03 02:00:20 INFO: 2020-10-03 02:00:20 INFO: 2020-10-03 02:00:20 INFO: 2020-10-03 02:00:20 INFO: 2020-10-03 02:02:00 INFO: 2020-10-03 02:02:00 INFO: 2020-10-03 02:02:00 INFO: 2020-10-03 02:02:00 INFO: 2020-10-03 02:02:00 INFO: clearing start 2020-10-03 02:02:00 INFO: clearing end 2020-10-03 02:02:00 INFO: 2020-10-03 02:02:00 INFO: 2020-10-03 02:02:00 INFO: 2020-10-03 02:02:00 INFO: 2020-10-03 03:00:20 INFO: 2020-10-03 03:00:20 INFO: 2020-10-03 03:00:20 INFO: 2020-10-03 03:00:20 INFO: 2020-10-03 03:00:20 INFO: init new order start 2020-10-03 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 3, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 345.1, 'high': 346.5, 'low': 345.1, 'close': 346.05, 'trades': 1942, 'volume': 1078142, 'vwap': 346.01, 'lastSize': 12, 'turnover': 37304125790, 'homeNotional': 11389.80668212728, 'foreignNotional': 3940917.020625723}, {'timestamp': datetime.datetime(2020, 10, 2, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.8, 'high': 345.75, 'low': 341.85, 'close': 345.1, 'trades': 3621, 'volume': 2200168, 'vwap': 344.1, 'lastSize': 12, 'turnover': 75706100560, 'homeNotional': 23172.514360307337, 'foreignNotional': 7973567.282236318}, {'timestamp': datetime.datetime(2020, 10, 2, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.65, 'high': 347.25, 'low': 341.25, 'close': 341.8, 'trades': 3573, 'volume': 2250161, 'vwap': 344.34, 'lastSize': 250, 'turnover': 77481412275, 'homeNotional': 23652.35020292279, 'foreignNotional': 8144517.512230709}] 2020-10-03 03:00:20 INFO: prepare candles [CandleItem(low=345.1, high=346.5, open=345.1, close=346.05, color='GREEN'), CandleItem(low=341.85, high=345.75, open=341.8, close=345.1, color='GREEN'), CandleItem(low=341.25, high=347.25, open=346.65, close=341.8, color='RED')] 2020-10-03 03:00:20 INFO: skip by colors first_candle=CandleItem(low=341.25, high=347.25, open=346.65, close=341.8, color='RED') second_candle=CandleItem(low=341.85, high=345.75, open=341.8, close=345.1, color='GREEN') last_candle=CandleItem(low=345.1, high=346.5, open=345.1, close=346.05, color='GREEN') 2020-10-03 03:00:20 INFO: check need new order None 2020-10-03 03:00:20 INFO: init new order end 2020-10-03 03:00:20 INFO: 2020-10-03 03:00:20 INFO: 2020-10-03 03:00:20 INFO: 2020-10-03 03:00:20 INFO: 2020-10-03 03:02:00 INFO: 2020-10-03 03:02:00 INFO: 2020-10-03 03:02:00 INFO: 2020-10-03 03:02:00 INFO: 2020-10-03 03:02:00 INFO: clearing start 2020-10-03 03:02:00 INFO: clearing end 2020-10-03 03:02:00 INFO: 2020-10-03 03:02:00 INFO: 2020-10-03 03:02:00 INFO: 2020-10-03 03:02:00 INFO: 2020-10-03 04:00:20 INFO: 2020-10-03 04:00:20 INFO: 2020-10-03 04:00:20 INFO: 2020-10-03 04:00:20 INFO: 2020-10-03 04:00:20 INFO: init new order start 2020-10-03 04:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 3, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.05, 'high': 346.25, 'low': 344.15, 'close': 344.25, 'trades': 1808, 'volume': 1031561, 'vwap': 344.99, 'lastSize': 410, 'turnover': 35587691395, 'homeNotional': 10888.62932688312, 'foreignNotional': 3756458.7443551635}, {'timestamp': datetime.datetime(2020, 10, 3, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 345.1, 'high': 346.5, 'low': 345.1, 'close': 346.05, 'trades': 1942, 'volume': 1078142, 'vwap': 346.01, 'lastSize': 12, 'turnover': 37304125790, 'homeNotional': 11389.80668212728, 'foreignNotional': 3940917.020625723}, {'timestamp': datetime.datetime(2020, 10, 2, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.8, 'high': 345.75, 'low': 341.85, 'close': 345.1, 'trades': 3621, 'volume': 2200168, 'vwap': 344.1, 'lastSize': 12, 'turnover': 75706100560, 'homeNotional': 23172.514360307337, 'foreignNotional': 7973567.282236318}] 2020-10-03 04:00:20 INFO: prepare candles [CandleItem(low=344.15, high=346.25, open=346.05, close=344.25, color='RED'), CandleItem(low=345.1, high=346.5, open=345.1, close=346.05, color='GREEN'), CandleItem(low=341.85, high=345.75, open=341.8, close=345.1, color='GREEN')] 2020-10-03 04:00:20 INFO: last_candle=CandleItem(low=344.15, high=346.25, open=346.05, close=344.25, color='RED') 2020-10-03 04:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-03 04:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=344.15, high=346.25, open=346.05, close=344.25, color='RED') 2020-10-03 04:00:20 INFO: skip by CandleItem(low=344.15, high=346.25, open=346.05, close=344.25, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-03 04:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-03 04:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=344.15, high=346.25, open=346.05, close=344.25, color='RED') 2020-10-03 04:00:20 INFO: skip by CandleItem(low=344.15, high=346.25, open=346.05, close=344.25, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-03 04:00:20 INFO: not found applicable config for candle 2020-10-03 04:00:20 INFO: check need new order None 2020-10-03 04:00:20 INFO: init new order end 2020-10-03 04:00:20 INFO: 2020-10-03 04:00:20 INFO: 2020-10-03 04:00:20 INFO: 2020-10-03 04:00:20 INFO: 2020-10-03 04:02:00 INFO: 2020-10-03 04:02:00 INFO: 2020-10-03 04:02:00 INFO: 2020-10-03 04:02:00 INFO: 2020-10-03 04:02:00 INFO: clearing start 2020-10-03 04:02:00 INFO: clearing end 2020-10-03 04:02:00 INFO: 2020-10-03 04:02:00 INFO: 2020-10-03 04:02:00 INFO: 2020-10-03 04:02:00 INFO: 2020-10-03 05:00:20 INFO: 2020-10-03 05:00:20 INFO: 2020-10-03 05:00:20 INFO: 2020-10-03 05:00:20 INFO: 2020-10-03 05:00:20 INFO: init new order start 2020-10-03 05:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 3, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 344.25, 'high': 345.75, 'low': 344.25, 'close': 345.75, 'trades': 1631, 'volume': 1107590, 'vwap': 345.01, 'lastSize': 13, 'turnover': 38212669320, 'homeNotional': 11681.56938017465, 'foreignNotional': 4030227.169491203}, {'timestamp': datetime.datetime(2020, 10, 3, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.05, 'high': 346.25, 'low': 344.15, 'close': 344.25, 'trades': 1808, 'volume': 1031561, 'vwap': 344.99, 'lastSize': 410, 'turnover': 35587691395, 'homeNotional': 10888.62932688312, 'foreignNotional': 3756458.7443551635}, {'timestamp': datetime.datetime(2020, 10, 3, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 345.1, 'high': 346.5, 'low': 345.1, 'close': 346.05, 'trades': 1942, 'volume': 1078142, 'vwap': 346.01, 'lastSize': 12, 'turnover': 37304125790, 'homeNotional': 11389.80668212728, 'foreignNotional': 3940917.020625723}] 2020-10-03 05:00:21 INFO: prepare candles [CandleItem(low=344.25, high=345.75, open=344.25, close=345.75, color='GREEN'), CandleItem(low=344.15, high=346.25, open=346.05, close=344.25, color='RED'), CandleItem(low=345.1, high=346.5, open=345.1, close=346.05, color='GREEN')] 2020-10-03 05:00:21 INFO: skip by colors first_candle=CandleItem(low=345.1, high=346.5, open=345.1, close=346.05, color='GREEN') second_candle=CandleItem(low=344.15, high=346.25, open=346.05, close=344.25, color='RED') last_candle=CandleItem(low=344.25, high=345.75, open=344.25, close=345.75, color='GREEN') 2020-10-03 05:00:21 INFO: check need new order None 2020-10-03 05:00:21 INFO: init new order end 2020-10-03 05:00:21 INFO: 2020-10-03 05:00:21 INFO: 2020-10-03 05:00:21 INFO: 2020-10-03 05:00:21 INFO: 2020-10-03 05:02:00 INFO: 2020-10-03 05:02:00 INFO: 2020-10-03 05:02:00 INFO: 2020-10-03 05:02:00 INFO: 2020-10-03 05:02:00 INFO: clearing start 2020-10-03 05:02:00 INFO: clearing end 2020-10-03 05:02:00 INFO: 2020-10-03 05:02:00 INFO: 2020-10-03 05:02:00 INFO: 2020-10-03 05:02:00 INFO: 2020-10-03 06:00:20 INFO: 2020-10-03 06:00:20 INFO: 2020-10-03 06:00:20 INFO: 2020-10-03 06:00:20 INFO: 2020-10-03 06:00:20 INFO: init new order start 2020-10-03 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 3, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 345.75, 'high': 346.8, 'low': 345.45, 'close': 346.05, 'trades': 2075, 'volume': 1025675, 'vwap': 346.21, 'lastSize': 1, 'turnover': 35509229900, 'homeNotional': 10810.218754648919, 'foreignNotional': 3742537.0126914065}, {'timestamp': datetime.datetime(2020, 10, 3, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 344.25, 'high': 345.75, 'low': 344.25, 'close': 345.75, 'trades': 1631, 'volume': 1107590, 'vwap': 345.01, 'lastSize': 13, 'turnover': 38212669320, 'homeNotional': 11681.56938017465, 'foreignNotional': 4030227.169491203}, {'timestamp': datetime.datetime(2020, 10, 3, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.05, 'high': 346.25, 'low': 344.15, 'close': 344.25, 'trades': 1808, 'volume': 1031561, 'vwap': 344.99, 'lastSize': 410, 'turnover': 35587691395, 'homeNotional': 10888.62932688312, 'foreignNotional': 3756458.7443551635}] 2020-10-03 06:00:20 INFO: prepare candles [CandleItem(low=345.45, high=346.8, open=345.75, close=346.05, color='GREEN'), CandleItem(low=344.25, high=345.75, open=344.25, close=345.75, color='GREEN'), CandleItem(low=344.15, high=346.25, open=346.05, close=344.25, color='RED')] 2020-10-03 06:00:20 INFO: skip by colors first_candle=CandleItem(low=344.15, high=346.25, open=346.05, close=344.25, color='RED') second_candle=CandleItem(low=344.25, high=345.75, open=344.25, close=345.75, color='GREEN') last_candle=CandleItem(low=345.45, high=346.8, open=345.75, close=346.05, color='GREEN') 2020-10-03 06:00:20 INFO: check need new order None 2020-10-03 06:00:20 INFO: init new order end 2020-10-03 06:00:20 INFO: 2020-10-03 06:00:20 INFO: 2020-10-03 06:00:20 INFO: 2020-10-03 06:00:20 INFO: 2020-10-03 06:02:00 INFO: 2020-10-03 06:02:00 INFO: 2020-10-03 06:02:00 INFO: 2020-10-03 06:02:00 INFO: 2020-10-03 06:02:00 INFO: clearing start 2020-10-03 06:02:00 INFO: clearing end 2020-10-03 06:02:00 INFO: 2020-10-03 06:02:00 INFO: 2020-10-03 06:02:00 INFO: 2020-10-03 06:02:00 INFO: 2020-10-03 07:00:20 INFO: 2020-10-03 07:00:20 INFO: 2020-10-03 07:00:20 INFO: 2020-10-03 07:00:20 INFO: 2020-10-03 07:00:20 INFO: init new order start 2020-10-03 07:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 3, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.05, 'high': 349.4, 'low': 345.55, 'close': 348.25, 'trades': 2809, 'volume': 1805752, 'vwap': 347.8, 'lastSize': 1, 'turnover': 62803173925, 'homeNotional': 19052.798630929406, 'foreignNotional': 6626478.7946746135}, {'timestamp': datetime.datetime(2020, 10, 3, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 345.75, 'high': 346.8, 'low': 345.45, 'close': 346.05, 'trades': 2075, 'volume': 1025675, 'vwap': 346.21, 'lastSize': 1, 'turnover': 35509229900, 'homeNotional': 10810.218754648919, 'foreignNotional': 3742537.0126914065}, {'timestamp': datetime.datetime(2020, 10, 3, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 344.25, 'high': 345.75, 'low': 344.25, 'close': 345.75, 'trades': 1631, 'volume': 1107590, 'vwap': 345.01, 'lastSize': 13, 'turnover': 38212669320, 'homeNotional': 11681.56938017465, 'foreignNotional': 4030227.169491203}] 2020-10-03 07:00:20 INFO: prepare candles [CandleItem(low=345.55, high=349.4, open=346.05, close=348.25, color='GREEN'), CandleItem(low=345.45, high=346.8, open=345.75, close=346.05, color='GREEN'), CandleItem(low=344.25, high=345.75, open=344.25, close=345.75, color='GREEN')] 2020-10-03 07:00:20 INFO: skip by colors first_candle=CandleItem(low=344.25, high=345.75, open=344.25, close=345.75, color='GREEN') second_candle=CandleItem(low=345.45, high=346.8, open=345.75, close=346.05, color='GREEN') last_candle=CandleItem(low=345.55, high=349.4, open=346.05, close=348.25, color='GREEN') 2020-10-03 07:00:20 INFO: check need new order None 2020-10-03 07:00:20 INFO: init new order end 2020-10-03 07:00:20 INFO: 2020-10-03 07:00:20 INFO: 2020-10-03 07:00:20 INFO: 2020-10-03 07:00:20 INFO: 2020-10-03 07:02:00 INFO: 2020-10-03 07:02:00 INFO: 2020-10-03 07:02:00 INFO: 2020-10-03 07:02:00 INFO: 2020-10-03 07:02:00 INFO: clearing start 2020-10-03 07:02:00 INFO: clearing end 2020-10-03 07:02:00 INFO: 2020-10-03 07:02:00 INFO: 2020-10-03 07:02:00 INFO: 2020-10-03 07:02:00 INFO: 2020-10-03 08:00:20 INFO: 2020-10-03 08:00:20 INFO: 2020-10-03 08:00:20 INFO: 2020-10-03 08:00:20 INFO: 2020-10-03 08:00:20 INFO: init new order start 2020-10-03 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 3, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.25, 'high': 348.7, 'low': 346.95, 'close': 348.2, 'trades': 1156, 'volume': 971051, 'vwap': 347.92, 'lastSize': 500, 'turnover': 33784776850, 'homeNotional': 10249.66200181693, 'foreignNotional': 3566060.0026938445}, {'timestamp': datetime.datetime(2020, 10, 3, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.05, 'high': 349.4, 'low': 345.55, 'close': 348.25, 'trades': 2809, 'volume': 1805752, 'vwap': 347.8, 'lastSize': 1, 'turnover': 62803173925, 'homeNotional': 19052.798630929406, 'foreignNotional': 6626478.7946746135}, {'timestamp': datetime.datetime(2020, 10, 3, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 345.75, 'high': 346.8, 'low': 345.45, 'close': 346.05, 'trades': 2075, 'volume': 1025675, 'vwap': 346.21, 'lastSize': 1, 'turnover': 35509229900, 'homeNotional': 10810.218754648919, 'foreignNotional': 3742537.0126914065}] 2020-10-03 08:00:20 INFO: prepare candles [CandleItem(low=346.95, high=348.7, open=348.25, close=348.2, color='RED'), CandleItem(low=345.55, high=349.4, open=346.05, close=348.25, color='GREEN'), CandleItem(low=345.45, high=346.8, open=345.75, close=346.05, color='GREEN')] 2020-10-03 08:00:20 INFO: last_candle=CandleItem(low=346.95, high=348.7, open=348.25, close=348.2, color='RED') 2020-10-03 08:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-03 08:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=346.95, high=348.7, open=348.25, close=348.2, color='RED') 2020-10-03 08:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=345.55, high=349.4, open=346.05, close=348.25, color='GREEN') 2020-10-03 08:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=345.45, high=346.8, open=345.75, close=346.05, color='GREEN') 2020-10-03 08:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=346.95, high=348.7, open=348.25, close=348.2, color='RED'), take_profit_factor=6.0, clearing_interval=3600) 2020-10-03 08:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=346.95, high=348.7, open=348.25, close=348.2, color='RED'), take_profit_factor=6.0, clearing_interval=3600) 2020-10-03 08:00:20 INFO: place order: start candle=CandleItem(low=346.95, high=348.7, open=348.25, close=348.2, color='RED') ticker='ETHUSD' price_offset=0.1 2020-10-03 08:00:20 INFO: place order: side_factor=1 init_trigger_price=346.9 init_order_price=346.84999999999997 stop_price_offset=0.0 candle.size=1.75 stop_price=348.7 take_price=336.34999999999997 2020-10-03 08:00:20 INFO: place order round: side_factor=1 init_trigger_price=Decimal('346.8999999999999772626324556767940521240234375') init_order_price=Decimal('346.84999999999996589394868351519107818603515625') stop_price_offset=0.0 candle.size=1.75 stop_price=Decimal('348.69999999999998863131622783839702606201171875') take_price=Decimal('336.34999999999996589394868351519107818603515625') 2020-10-03 08:00:20 INFO: place order: compute qty=-1056 2020-10-03 08:00:20 INFO: place order: save order to db d4d14565dd794130a2379fcf1dc03ac1; response=True 2020-10-03 08:00:20 INFO: post order to exchange resp={'orderID': '0c1486bc-a578-4528-92ab-b9525d8159f4', 'clOrdID': 'd4d14565dd794130a2379fcf1dc03ac1', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1056, 'price': 346.85, 'displayQty': None, 'stopPx': 346.9, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1056, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 3, 5, 0, 20, 551000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 3, 5, 0, 20, 551000, tzinfo=tzutc())} 2020-10-03 08:00:20 INFO: place new init order {'qty': -1056, 'init_price': Decimal('346.8999999999999772626324556767940521240234375'), 'stop_price': Decimal('348.69999999999998863131622783839702606201171875'), 'take_price': Decimal('336.34999999999996589394868351519107818603515625'), 'order_uid': 'd4d14565dd794130a2379fcf1dc03ac1', 'response': {'orderID': '0c1486bc-a578-4528-92ab-b9525d8159f4', 'clOrdID': 'd4d14565dd794130a2379fcf1dc03ac1', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1056, 'price': 346.85, 'displayQty': None, 'stopPx': 346.9, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1056, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 3, 5, 0, 20, 551000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 3, 5, 0, 20, 551000, tzinfo=tzutc())}} 2020-10-03 08:00:20 INFO: init new order end 2020-10-03 08:00:20 INFO: 2020-10-03 08:00:20 INFO: 2020-10-03 08:00:20 INFO: 2020-10-03 08:00:20 INFO: 2020-10-03 08:00:20 INFO: process event {'orderID': '0c1486bc-a578-4528-92ab-b9525d8159f4', 'clOrdID': 'd4d14565dd794130a2379fcf1dc03ac1', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1056, 'price': 346.85, 'displayQty': None, 'stopPx': 346.9, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1056, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-10-03T05:00:20.551Z', 'timestamp': '2020-10-03T05:00:20.551Z'} 2020-10-03 08:00:20 INFO: skip event d4d14565dd794130a2379fcf1dc03ac1 New 2020-10-03 08:02:00 INFO: 2020-10-03 08:02:00 INFO: 2020-10-03 08:02:00 INFO: 2020-10-03 08:02:00 INFO: 2020-10-03 08:02:00 INFO: clearing start 2020-10-03 08:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '0c1486bc-a578-4528-92ab-b9525d8159f4', 'clOrdID': 'd4d14565dd794130a2379fcf1dc03ac1', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1056, 'price': 346.85, 'displayQty': None, 'stopPx': 346.9, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1056, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 3, 5, 0, 20, 551000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 3, 5, 0, 20, 551000, tzinfo=tzutc())} 2020-10-03 08:02:00 INFO: order time=2020-10-03 05:00:20.551000+00:00; delta from now UTC=0:01:40.212911 time_delta.total_seconds()=100.212911; time_diff_offset='3600' 2020-10-03 08:02:00 INFO: skip by time diff 2020-10-03 05:00:20.551000+00:00 2020-10-03 08:02:00 INFO: clearing end 2020-10-03 08:02:00 INFO: 2020-10-03 08:02:00 INFO: 2020-10-03 08:02:00 INFO: 2020-10-03 08:02:00 INFO: 2020-10-03 08:21:39 INFO: process event {'orderID': '0c1486bc-a578-4528-92ab-b9525d8159f4', 'triggered': 'StopOrderTriggered', 'workingIndicator': True, 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'transactTime': '2020-10-03T05:21:39.505Z', 'timestamp': '2020-10-03T05:21:39.505Z', 'clOrdID': 'd4d14565dd794130a2379fcf1dc03ac1', 'account': 605536, 'symbol': 'ETHUSD'} 2020-10-03 08:21:39 INFO: skip event d4d14565dd794130a2379fcf1dc03ac1 2020-10-03 08:24:18 INFO: process event {'orderID': '0c1486bc-a578-4528-92ab-b9525d8159f4', 'ordStatus': 'Filled', 'workingIndicator': False, 'leavesQty': 0, 'cumQty': 1056, 'avgPx': 346.85, 'timestamp': '2020-10-03T05:24:18.713Z', 'clOrdID': 'd4d14565dd794130a2379fcf1dc03ac1', 'account': 605536, 'symbol': 'ETHUSD'} 2020-10-03 08:24:18 INFO: add new event={'uid': 'd4d14565dd794130a2379fcf1dc03ac1', 'status': 'Filled'} 2020-10-03 08:24:19 INFO: 2020-10-03 08:24:19 INFO: 2020-10-03 08:24:19 INFO: 2020-10-03 08:24:19 INFO: 2020-10-03 08:24:19 INFO: process event start 2020-10-03 08:24:19 INFO: fetch new order event d4d14565dd794130a2379fcf1dc03ac1 2020-10-03 08:24:19 INFO: fetch orders by event init={'stop': '348.69999999999998863131622783839702606201171875', 'take': '336.34999999999996589394868351519107818603515625', 'qty': '1056', 'color': 'RED', 'ticker': 'ETHUSD', 'clearing_offset': '3600'} profit_pair=None 2020-10-03 08:24:19 INFO: process init order filled 2020-10-03 08:24:19 INFO: save profit orders to storage stop=19031da6c5b3450185bc4b9c32ead8d7 take=f808e9ff4c0e4a3091c9a8fb8ae27bfd 2020-10-03 08:24:19 INFO: place profit orders take_price=336.34999999999996589394868351519107818603515625, stop_price=348.69999999999998863131622783839702606201171875, qty=1056, color=RED, ticker=ETHUSD 19031da6c5b3450185bc4b9c32ead8d7 f808e9ff4c0e4a3091c9a8fb8ae27bfd 2020-10-03 08:24:19 INFO: place stop order ETHUSD: qty=1056, stop_price=348.69999999999998863131622783839702606201171875, stop_uid=19031da6c5b3450185bc4b9c32ead8d7 2020-10-03 08:24:19 INFO: process event {'orderID': 'd1b754aa-5efe-4196-bfe2-5bb267aa71eb', 'clOrdID': '19031da6c5b3450185bc4b9c32ead8d7', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1056, 'price': None, 'displayQty': None, 'stopPx': 348.7, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1056, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': '2020-10-03T05:24:19.450Z', 'timestamp': '2020-10-03T05:24:19.450Z'} 2020-10-03 08:24:19 INFO: skip event 19031da6c5b3450185bc4b9c32ead8d7 New 2020-10-03 08:24:19 INFO: exchange resp for stop order={'orderID': 'd1b754aa-5efe-4196-bfe2-5bb267aa71eb', 'clOrdID': '19031da6c5b3450185bc4b9c32ead8d7', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1056, 'price': None, 'displayQty': None, 'stopPx': 348.7, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1056, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 3, 5, 24, 19, 450000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 3, 5, 24, 19, 450000, tzinfo=tzutc())} 2020-10-03 08:24:19 INFO: place limit order ETHUSD: qty=1056, price=336.34999999999996589394868351519107818603515625, take_uid=f808e9ff4c0e4a3091c9a8fb8ae27bfd 2020-10-03 08:24:19 INFO: process event {'orderID': 'b9e11bcd-aff2-4758-9747-fea37a52ff10', 'clOrdID': 'f808e9ff4c0e4a3091c9a8fb8ae27bfd', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1056, 'price': 336.35, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1056, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': '2020-10-03T05:24:19.486Z', 'timestamp': '2020-10-03T05:24:19.486Z'} 2020-10-03 08:24:19 INFO: skip event f808e9ff4c0e4a3091c9a8fb8ae27bfd New 2020-10-03 08:24:19 INFO: exchange resp for take profit order={'orderID': 'b9e11bcd-aff2-4758-9747-fea37a52ff10', 'clOrdID': 'f808e9ff4c0e4a3091c9a8fb8ae27bfd', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1056, 'price': 336.35, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1056, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 3, 5, 24, 19, 486000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 3, 5, 24, 19, 486000, tzinfo=tzutc())} 2020-10-03 08:24:19 INFO: place profit orders={'stop': {'response': {'orderID': 'd1b754aa-5efe-4196-bfe2-5bb267aa71eb', 'clOrdID': '19031da6c5b3450185bc4b9c32ead8d7', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1056, 'price': None, 'displayQty': None, 'stopPx': 348.7, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1056, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 3, 5, 24, 19, 450000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 3, 5, 24, 19, 450000, tzinfo=tzutc())}, 'qty': Decimal('1056'), 'uid': '19031da6c5b3450185bc4b9c32ead8d7', 'price': Decimal('348.69999999999998863131622783839702606201171875')}, 'take': {'response': {'orderID': 'b9e11bcd-aff2-4758-9747-fea37a52ff10', 'clOrdID': 'f808e9ff4c0e4a3091c9a8fb8ae27bfd', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1056, 'price': 336.35, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1056, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 3, 5, 24, 19, 486000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 3, 5, 24, 19, 486000, tzinfo=tzutc())}, 'qty': Decimal('1056'), 'uid': 'f808e9ff4c0e4a3091c9a8fb8ae27bfd', 'price': Decimal('336.34999999999996589394868351519107818603515625')}} 2020-10-03 08:24:19 INFO: rm init order from db d4d14565dd794130a2379fcf1dc03ac1 2020-10-03 08:24:19 INFO: end process event_processing_result='proceed init order' 2020-10-03 08:24:19 INFO: 2020-10-03 08:24:19 INFO: 2020-10-03 08:24:19 INFO: 2020-10-03 08:24:19 INFO: 2020-10-03 09:00:20 INFO: 2020-10-03 09:00:20 INFO: 2020-10-03 09:00:20 INFO: 2020-10-03 09:00:20 INFO: 2020-10-03 09:00:20 INFO: init new order start 2020-10-03 09:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 3, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.2, 'high': 348.3, 'low': 346.4, 'close': 346.85, 'trades': 1399, 'volume': 776514, 'vwap': 346.94, 'lastSize': 450, 'turnover': 26940320425, 'homeNotional': 8187.780113458078, 'foreignNotional': 2840664.1126551097}, {'timestamp': datetime.datetime(2020, 10, 3, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.25, 'high': 348.7, 'low': 346.95, 'close': 348.2, 'trades': 1156, 'volume': 971051, 'vwap': 347.92, 'lastSize': 500, 'turnover': 33784776850, 'homeNotional': 10249.66200181693, 'foreignNotional': 3566060.0026938445}, {'timestamp': datetime.datetime(2020, 10, 3, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.05, 'high': 349.4, 'low': 345.55, 'close': 348.25, 'trades': 2809, 'volume': 1805752, 'vwap': 347.8, 'lastSize': 1, 'turnover': 62803173925, 'homeNotional': 19052.798630929406, 'foreignNotional': 6626478.7946746135}] 2020-10-03 09:00:20 INFO: prepare candles [CandleItem(low=346.4, high=348.3, open=348.2, close=346.85, color='RED'), CandleItem(low=346.95, high=348.7, open=348.25, close=348.2, color='RED'), CandleItem(low=345.55, high=349.4, open=346.05, close=348.25, color='GREEN')] 2020-10-03 09:00:20 INFO: skip by colors first_candle=CandleItem(low=345.55, high=349.4, open=346.05, close=348.25, color='GREEN') second_candle=CandleItem(low=346.95, high=348.7, open=348.25, close=348.2, color='RED') last_candle=CandleItem(low=346.4, high=348.3, open=348.2, close=346.85, color='RED') 2020-10-03 09:00:20 INFO: check need new order None 2020-10-03 09:00:20 INFO: init new order end 2020-10-03 09:00:20 INFO: 2020-10-03 09:00:20 INFO: 2020-10-03 09:00:20 INFO: 2020-10-03 09:00:20 INFO: 2020-10-03 09:02:00 INFO: 2020-10-03 09:02:00 INFO: 2020-10-03 09:02:00 INFO: 2020-10-03 09:02:00 INFO: 2020-10-03 09:02:00 INFO: clearing start 2020-10-03 09:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd1b754aa-5efe-4196-bfe2-5bb267aa71eb', 'clOrdID': '19031da6c5b3450185bc4b9c32ead8d7', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1056, 'price': None, 'displayQty': None, 'stopPx': 348.7, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1056, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 3, 5, 24, 19, 450000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 3, 5, 24, 19, 450000, tzinfo=tzutc())} 2020-10-03 09:02:00 INFO: skip by not found init order into storage 2020-10-03 09:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'b9e11bcd-aff2-4758-9747-fea37a52ff10', 'clOrdID': 'f808e9ff4c0e4a3091c9a8fb8ae27bfd', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1056, 'price': 336.35, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1056, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 3, 5, 24, 19, 486000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 3, 5, 24, 19, 486000, tzinfo=tzutc())} 2020-10-03 09:02:00 INFO: skip by not found init order into storage 2020-10-03 09:02:00 INFO: clearing end 2020-10-03 09:02:00 INFO: 2020-10-03 09:02:00 INFO: 2020-10-03 09:02:00 INFO: 2020-10-03 09:02:00 INFO: 2020-10-03 10:00:20 INFO: 2020-10-03 10:00:20 INFO: 2020-10-03 10:00:20 INFO: 2020-10-03 10:00:20 INFO: 2020-10-03 10:00:20 INFO: init new order start 2020-10-03 10:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 3, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.85, 'high': 347.15, 'low': 344.9, 'close': 346.15, 'trades': 1807, 'volume': 975016, 'vwap': 345.81, 'lastSize': 10, 'turnover': 33716403755, 'homeNotional': 10264.922495712777, 'foreignNotional': 3549651.2789646476}, {'timestamp': datetime.datetime(2020, 10, 3, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.2, 'high': 348.3, 'low': 346.4, 'close': 346.85, 'trades': 1399, 'volume': 776514, 'vwap': 346.94, 'lastSize': 450, 'turnover': 26940320425, 'homeNotional': 8187.780113458078, 'foreignNotional': 2840664.1126551097}, {'timestamp': datetime.datetime(2020, 10, 3, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.25, 'high': 348.7, 'low': 346.95, 'close': 348.2, 'trades': 1156, 'volume': 971051, 'vwap': 347.92, 'lastSize': 500, 'turnover': 33784776850, 'homeNotional': 10249.66200181693, 'foreignNotional': 3566060.0026938445}] 2020-10-03 10:00:20 INFO: prepare candles [CandleItem(low=344.9, high=347.15, open=346.85, close=346.15, color='RED'), CandleItem(low=346.4, high=348.3, open=348.2, close=346.85, color='RED'), CandleItem(low=346.95, high=348.7, open=348.25, close=348.2, color='RED')] 2020-10-03 10:00:20 INFO: skip by colors first_candle=CandleItem(low=346.95, high=348.7, open=348.25, close=348.2, color='RED') second_candle=CandleItem(low=346.4, high=348.3, open=348.2, close=346.85, color='RED') last_candle=CandleItem(low=344.9, high=347.15, open=346.85, close=346.15, color='RED') 2020-10-03 10:00:20 INFO: check need new order None 2020-10-03 10:00:20 INFO: init new order end 2020-10-03 10:00:20 INFO: 2020-10-03 10:00:20 INFO: 2020-10-03 10:00:20 INFO: 2020-10-03 10:00:20 INFO: 2020-10-03 10:02:00 INFO: 2020-10-03 10:02:00 INFO: 2020-10-03 10:02:00 INFO: 2020-10-03 10:02:00 INFO: 2020-10-03 10:02:00 INFO: clearing start 2020-10-03 10:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd1b754aa-5efe-4196-bfe2-5bb267aa71eb', 'clOrdID': '19031da6c5b3450185bc4b9c32ead8d7', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1056, 'price': None, 'displayQty': None, 'stopPx': 348.7, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1056, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 3, 5, 24, 19, 450000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 3, 5, 24, 19, 450000, tzinfo=tzutc())} 2020-10-03 10:02:00 INFO: skip by not found init order into storage 2020-10-03 10:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'b9e11bcd-aff2-4758-9747-fea37a52ff10', 'clOrdID': 'f808e9ff4c0e4a3091c9a8fb8ae27bfd', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1056, 'price': 336.35, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1056, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 3, 5, 24, 19, 486000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 3, 5, 24, 19, 486000, tzinfo=tzutc())} 2020-10-03 10:02:00 INFO: skip by not found init order into storage 2020-10-03 10:02:00 INFO: clearing end 2020-10-03 10:02:00 INFO: 2020-10-03 10:02:00 INFO: 2020-10-03 10:02:00 INFO: 2020-10-03 10:02:00 INFO: 2020-10-03 11:00:20 INFO: 2020-10-03 11:00:20 INFO: 2020-10-03 11:00:20 INFO: 2020-10-03 11:00:20 INFO: 2020-10-03 11:00:20 INFO: init new order start 2020-10-03 11:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 3, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.15, 'high': 347.0, 'low': 345.4, 'close': 345.85, 'trades': 1066, 'volume': 855435, 'vwap': 346.06, 'lastSize': 1, 'turnover': 29602568400, 'homeNotional': 9005.724788153975, 'foreignNotional': 3116457.250273228}, {'timestamp': datetime.datetime(2020, 10, 3, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.85, 'high': 347.15, 'low': 344.9, 'close': 346.15, 'trades': 1807, 'volume': 975016, 'vwap': 345.81, 'lastSize': 10, 'turnover': 33716403755, 'homeNotional': 10264.922495712777, 'foreignNotional': 3549651.2789646476}, {'timestamp': datetime.datetime(2020, 10, 3, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.2, 'high': 348.3, 'low': 346.4, 'close': 346.85, 'trades': 1399, 'volume': 776514, 'vwap': 346.94, 'lastSize': 450, 'turnover': 26940320425, 'homeNotional': 8187.780113458078, 'foreignNotional': 2840664.1126551097}] 2020-10-03 11:00:20 INFO: prepare candles [CandleItem(low=345.4, high=347.0, open=346.15, close=345.85, color='RED'), CandleItem(low=344.9, high=347.15, open=346.85, close=346.15, color='RED'), CandleItem(low=346.4, high=348.3, open=348.2, close=346.85, color='RED')] 2020-10-03 11:00:20 INFO: skip by colors first_candle=CandleItem(low=346.4, high=348.3, open=348.2, close=346.85, color='RED') second_candle=CandleItem(low=344.9, high=347.15, open=346.85, close=346.15, color='RED') last_candle=CandleItem(low=345.4, high=347.0, open=346.15, close=345.85, color='RED') 2020-10-03 11:00:20 INFO: check need new order None 2020-10-03 11:00:20 INFO: init new order end 2020-10-03 11:00:20 INFO: 2020-10-03 11:00:20 INFO: 2020-10-03 11:00:20 INFO: 2020-10-03 11:00:20 INFO: 2020-10-03 11:02:00 INFO: 2020-10-03 11:02:00 INFO: 2020-10-03 11:02:00 INFO: 2020-10-03 11:02:00 INFO: 2020-10-03 11:02:00 INFO: clearing start 2020-10-03 11:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd1b754aa-5efe-4196-bfe2-5bb267aa71eb', 'clOrdID': '19031da6c5b3450185bc4b9c32ead8d7', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1056, 'price': None, 'displayQty': None, 'stopPx': 348.7, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1056, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 3, 5, 24, 19, 450000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 3, 5, 24, 19, 450000, tzinfo=tzutc())} 2020-10-03 11:02:00 INFO: skip by not found init order into storage 2020-10-03 11:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'b9e11bcd-aff2-4758-9747-fea37a52ff10', 'clOrdID': 'f808e9ff4c0e4a3091c9a8fb8ae27bfd', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1056, 'price': 336.35, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1056, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 3, 5, 24, 19, 486000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 3, 5, 24, 19, 486000, tzinfo=tzutc())} 2020-10-03 11:02:00 INFO: skip by not found init order into storage 2020-10-03 11:02:00 INFO: clearing end 2020-10-03 11:02:00 INFO: 2020-10-03 11:02:00 INFO: 2020-10-03 11:02:00 INFO: 2020-10-03 11:02:00 INFO: 2020-10-03 12:00:20 INFO: 2020-10-03 12:00:20 INFO: 2020-10-03 12:00:20 INFO: 2020-10-03 12:00:20 INFO: 2020-10-03 12:00:20 INFO: init new order start 2020-10-03 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 3, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 345.85, 'high': 348.45, 'low': 344.4, 'close': 346.05, 'trades': 3611, 'volume': 3321487, 'vwap': 346.92, 'lastSize': 471, 'turnover': 115227095475, 'homeNotional': 34984.4449775346, 'foreignNotional': 12136649.587829757}, {'timestamp': datetime.datetime(2020, 10, 3, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.15, 'high': 347.0, 'low': 345.4, 'close': 345.85, 'trades': 1066, 'volume': 855435, 'vwap': 346.06, 'lastSize': 1, 'turnover': 29602568400, 'homeNotional': 9005.724788153975, 'foreignNotional': 3116457.250273228}, {'timestamp': datetime.datetime(2020, 10, 3, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.85, 'high': 347.15, 'low': 344.9, 'close': 346.15, 'trades': 1807, 'volume': 975016, 'vwap': 345.81, 'lastSize': 10, 'turnover': 33716403755, 'homeNotional': 10264.922495712777, 'foreignNotional': 3549651.2789646476}] 2020-10-03 12:00:20 INFO: prepare candles [CandleItem(low=344.4, high=348.45, open=345.85, close=346.05, color='GREEN'), CandleItem(low=345.4, high=347.0, open=346.15, close=345.85, color='RED'), CandleItem(low=344.9, high=347.15, open=346.85, close=346.15, color='RED')] 2020-10-03 12:00:20 INFO: last_candle=CandleItem(low=344.4, high=348.45, open=345.85, close=346.05, color='GREEN') 2020-10-03 12:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-03 12:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=344.4, high=348.45, open=345.85, close=346.05, color='GREEN') 2020-10-03 12:00:20 INFO: skip by CandleItem(low=344.4, high=348.45, open=345.85, close=346.05, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-03 12:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-03 12:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=344.4, high=348.45, open=345.85, close=346.05, color='GREEN') 2020-10-03 12:00:20 INFO: skip by CandleItem(low=344.4, high=348.45, open=345.85, close=346.05, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-03 12:00:20 INFO: not found applicable config for candle 2020-10-03 12:00:20 INFO: check need new order None 2020-10-03 12:00:20 INFO: init new order end 2020-10-03 12:00:20 INFO: 2020-10-03 12:00:20 INFO: 2020-10-03 12:00:20 INFO: 2020-10-03 12:00:20 INFO: 2020-10-03 12:02:00 INFO: 2020-10-03 12:02:00 INFO: 2020-10-03 12:02:00 INFO: 2020-10-03 12:02:00 INFO: 2020-10-03 12:02:00 INFO: clearing start 2020-10-03 12:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd1b754aa-5efe-4196-bfe2-5bb267aa71eb', 'clOrdID': '19031da6c5b3450185bc4b9c32ead8d7', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1056, 'price': None, 'displayQty': None, 'stopPx': 348.7, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1056, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 3, 5, 24, 19, 450000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 3, 5, 24, 19, 450000, tzinfo=tzutc())} 2020-10-03 12:02:00 INFO: skip by not found init order into storage 2020-10-03 12:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'b9e11bcd-aff2-4758-9747-fea37a52ff10', 'clOrdID': 'f808e9ff4c0e4a3091c9a8fb8ae27bfd', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1056, 'price': 336.35, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1056, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 3, 5, 24, 19, 486000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 3, 5, 24, 19, 486000, tzinfo=tzutc())} 2020-10-03 12:02:00 INFO: skip by not found init order into storage 2020-10-03 12:02:00 INFO: clearing end 2020-10-03 12:02:00 INFO: 2020-10-03 12:02:00 INFO: 2020-10-03 12:02:00 INFO: 2020-10-03 12:02:00 INFO: 2020-10-03 13:00:20 INFO: 2020-10-03 13:00:20 INFO: 2020-10-03 13:00:20 INFO: 2020-10-03 13:00:20 INFO: 2020-10-03 13:00:20 INFO: init new order start 2020-10-03 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 3, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.05, 'high': 347.25, 'low': 345.3, 'close': 345.95, 'trades': 1371, 'volume': 1068454, 'vwap': 346.13, 'lastSize': 500, 'turnover': 36981704355, 'homeNotional': 11246.045982069161, 'foreignNotional': 3892524.617338758}, {'timestamp': datetime.datetime(2020, 10, 3, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 345.85, 'high': 348.45, 'low': 344.4, 'close': 346.05, 'trades': 3611, 'volume': 3321487, 'vwap': 346.92, 'lastSize': 471, 'turnover': 115227095475, 'homeNotional': 34984.4449775346, 'foreignNotional': 12136649.587829757}, {'timestamp': datetime.datetime(2020, 10, 3, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.15, 'high': 347.0, 'low': 345.4, 'close': 345.85, 'trades': 1066, 'volume': 855435, 'vwap': 346.06, 'lastSize': 1, 'turnover': 29602568400, 'homeNotional': 9005.724788153975, 'foreignNotional': 3116457.250273228}] 2020-10-03 13:00:20 INFO: prepare candles [CandleItem(low=345.3, high=347.25, open=346.05, close=345.95, color='RED'), CandleItem(low=344.4, high=348.45, open=345.85, close=346.05, color='GREEN'), CandleItem(low=345.4, high=347.0, open=346.15, close=345.85, color='RED')] 2020-10-03 13:00:20 INFO: skip by colors first_candle=CandleItem(low=345.4, high=347.0, open=346.15, close=345.85, color='RED') second_candle=CandleItem(low=344.4, high=348.45, open=345.85, close=346.05, color='GREEN') last_candle=CandleItem(low=345.3, high=347.25, open=346.05, close=345.95, color='RED') 2020-10-03 13:00:20 INFO: check need new order None 2020-10-03 13:00:20 INFO: init new order end 2020-10-03 13:00:20 INFO: 2020-10-03 13:00:20 INFO: 2020-10-03 13:00:20 INFO: 2020-10-03 13:00:20 INFO: 2020-10-03 13:02:00 INFO: 2020-10-03 13:02:00 INFO: 2020-10-03 13:02:00 INFO: 2020-10-03 13:02:00 INFO: 2020-10-03 13:02:00 INFO: clearing start 2020-10-03 13:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd1b754aa-5efe-4196-bfe2-5bb267aa71eb', 'clOrdID': '19031da6c5b3450185bc4b9c32ead8d7', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1056, 'price': None, 'displayQty': None, 'stopPx': 348.7, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1056, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 3, 5, 24, 19, 450000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 3, 5, 24, 19, 450000, tzinfo=tzutc())} 2020-10-03 13:02:00 INFO: skip by not found init order into storage 2020-10-03 13:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'b9e11bcd-aff2-4758-9747-fea37a52ff10', 'clOrdID': 'f808e9ff4c0e4a3091c9a8fb8ae27bfd', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1056, 'price': 336.35, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1056, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 3, 5, 24, 19, 486000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 3, 5, 24, 19, 486000, tzinfo=tzutc())} 2020-10-03 13:02:00 INFO: skip by not found init order into storage 2020-10-03 13:02:00 INFO: clearing end 2020-10-03 13:02:00 INFO: 2020-10-03 13:02:00 INFO: 2020-10-03 13:02:00 INFO: 2020-10-03 13:02:00 INFO: 2020-10-03 14:00:20 INFO: 2020-10-03 14:00:20 INFO: 2020-10-03 14:00:20 INFO: 2020-10-03 14:00:20 INFO: 2020-10-03 14:00:20 INFO: init new order start 2020-10-03 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 3, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 345.95, 'high': 348.3, 'low': 345.95, 'close': 348.3, 'trades': 1734, 'volume': 1251791, 'vwap': 347.48, 'lastSize': 1, 'turnover': 43496383905, 'homeNotional': 13194.758416069408, 'foreignNotional': 4584827.666018795}, {'timestamp': datetime.datetime(2020, 10, 3, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.05, 'high': 347.25, 'low': 345.3, 'close': 345.95, 'trades': 1371, 'volume': 1068454, 'vwap': 346.13, 'lastSize': 500, 'turnover': 36981704355, 'homeNotional': 11246.045982069161, 'foreignNotional': 3892524.617338758}, {'timestamp': datetime.datetime(2020, 10, 3, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 345.85, 'high': 348.45, 'low': 344.4, 'close': 346.05, 'trades': 3611, 'volume': 3321487, 'vwap': 346.92, 'lastSize': 471, 'turnover': 115227095475, 'homeNotional': 34984.4449775346, 'foreignNotional': 12136649.587829757}] 2020-10-03 14:00:20 INFO: prepare candles [CandleItem(low=345.95, high=348.3, open=345.95, close=348.3, color='GREEN'), CandleItem(low=345.3, high=347.25, open=346.05, close=345.95, color='RED'), CandleItem(low=344.4, high=348.45, open=345.85, close=346.05, color='GREEN')] 2020-10-03 14:00:20 INFO: skip by colors first_candle=CandleItem(low=344.4, high=348.45, open=345.85, close=346.05, color='GREEN') second_candle=CandleItem(low=345.3, high=347.25, open=346.05, close=345.95, color='RED') last_candle=CandleItem(low=345.95, high=348.3, open=345.95, close=348.3, color='GREEN') 2020-10-03 14:00:20 INFO: check need new order None 2020-10-03 14:00:20 INFO: init new order end 2020-10-03 14:00:20 INFO: 2020-10-03 14:00:20 INFO: 2020-10-03 14:00:20 INFO: 2020-10-03 14:00:20 INFO: 2020-10-03 14:02:00 INFO: 2020-10-03 14:02:00 INFO: 2020-10-03 14:02:00 INFO: 2020-10-03 14:02:00 INFO: 2020-10-03 14:02:00 INFO: clearing start 2020-10-03 14:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd1b754aa-5efe-4196-bfe2-5bb267aa71eb', 'clOrdID': '19031da6c5b3450185bc4b9c32ead8d7', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1056, 'price': None, 'displayQty': None, 'stopPx': 348.7, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1056, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 3, 5, 24, 19, 450000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 3, 5, 24, 19, 450000, tzinfo=tzutc())} 2020-10-03 14:02:00 INFO: skip by not found init order into storage 2020-10-03 14:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'b9e11bcd-aff2-4758-9747-fea37a52ff10', 'clOrdID': 'f808e9ff4c0e4a3091c9a8fb8ae27bfd', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1056, 'price': 336.35, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1056, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 3, 5, 24, 19, 486000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 3, 5, 24, 19, 486000, tzinfo=tzutc())} 2020-10-03 14:02:00 INFO: skip by not found init order into storage 2020-10-03 14:02:00 INFO: clearing end 2020-10-03 14:02:00 INFO: 2020-10-03 14:02:00 INFO: 2020-10-03 14:02:00 INFO: 2020-10-03 14:02:00 INFO: 2020-10-03 14:21:07 INFO: process event {'orderID': 'd1b754aa-5efe-4196-bfe2-5bb267aa71eb', 'price': 348.9, 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 1056, 'avgPx': 348.9, 'text': 'Triggered: Order stop price reached\nStop order by trader.py', 'transactTime': '2020-10-03T11:21:07.603Z', 'timestamp': '2020-10-03T11:21:07.603Z', 'clOrdID': '19031da6c5b3450185bc4b9c32ead8d7', 'account': 605536, 'symbol': 'ETHUSD'} 2020-10-03 14:21:07 INFO: add new event={'uid': '19031da6c5b3450185bc4b9c32ead8d7', 'status': 'Filled'} 2020-10-03 14:21:08 INFO: 2020-10-03 14:21:08 INFO: 2020-10-03 14:21:08 INFO: 2020-10-03 14:21:08 INFO: 2020-10-03 14:21:08 INFO: process event start 2020-10-03 14:21:08 INFO: fetch new order event 19031da6c5b3450185bc4b9c32ead8d7 2020-10-03 14:21:08 INFO: fetch orders by event init=None profit_pair=f808e9ff4c0e4a3091c9a8fb8ae27bfd 2020-10-03 14:21:08 INFO: process profit order filled 2020-10-03 14:21:08 INFO: process event {'orderID': 'b9e11bcd-aff2-4758-9747-fea37a52ff10', 'ordStatus': 'Canceled', 'workingIndicator': False, 'leavesQty': 0, 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'timestamp': '2020-10-03T11:21:08.647Z', 'clOrdID': 'f808e9ff4c0e4a3091c9a8fb8ae27bfd', 'account': 605536, 'symbol': 'ETHUSD'} 2020-10-03 14:21:08 INFO: skip event f808e9ff4c0e4a3091c9a8fb8ae27bfd Canceled 2020-10-03 14:21:08 INFO: cancel order=f808e9ff4c0e4a3091c9a8fb8ae27bfd [{'orderID': 'b9e11bcd-aff2-4758-9747-fea37a52ff10', 'clOrdID': 'f808e9ff4c0e4a3091c9a8fb8ae27bfd', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1056, 'price': 336.35, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'Canceled', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 0, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 3, 5, 24, 19, 486000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 3, 11, 21, 8, 647000, tzinfo=tzutc())}] 2020-10-03 14:21:08 INFO: end process event_processing_result='proceed profit order' 2020-10-03 14:21:08 INFO: 2020-10-03 14:21:08 INFO: 2020-10-03 14:21:08 INFO: 2020-10-03 14:21:08 INFO: 2020-10-03 15:00:20 INFO: 2020-10-03 15:00:20 INFO: 2020-10-03 15:00:20 INFO: 2020-10-03 15:00:20 INFO: 2020-10-03 15:00:20 INFO: init new order start 2020-10-03 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 3, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.3, 'high': 350.4, 'low': 347.75, 'close': 348.0, 'trades': 2071, 'volume': 1664817, 'vwap': 348.82, 'lastSize': 1, 'turnover': 58071102360, 'homeNotional': 17559.982672508027, 'foreignNotional': 6125168.370072313}, {'timestamp': datetime.datetime(2020, 10, 3, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 345.95, 'high': 348.3, 'low': 345.95, 'close': 348.3, 'trades': 1734, 'volume': 1251791, 'vwap': 347.48, 'lastSize': 1, 'turnover': 43496383905, 'homeNotional': 13194.758416069408, 'foreignNotional': 4584827.666018795}, {'timestamp': datetime.datetime(2020, 10, 3, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.05, 'high': 347.25, 'low': 345.3, 'close': 345.95, 'trades': 1371, 'volume': 1068454, 'vwap': 346.13, 'lastSize': 500, 'turnover': 36981704355, 'homeNotional': 11246.045982069161, 'foreignNotional': 3892524.617338758}] 2020-10-03 15:00:20 INFO: prepare candles [CandleItem(low=347.75, high=350.4, open=348.3, close=348.0, color='RED'), CandleItem(low=345.95, high=348.3, open=345.95, close=348.3, color='GREEN'), CandleItem(low=345.3, high=347.25, open=346.05, close=345.95, color='RED')] 2020-10-03 15:00:20 INFO: skip by colors first_candle=CandleItem(low=345.3, high=347.25, open=346.05, close=345.95, color='RED') second_candle=CandleItem(low=345.95, high=348.3, open=345.95, close=348.3, color='GREEN') last_candle=CandleItem(low=347.75, high=350.4, open=348.3, close=348.0, color='RED') 2020-10-03 15:00:20 INFO: check need new order None 2020-10-03 15:00:20 INFO: init new order end 2020-10-03 15:00:20 INFO: 2020-10-03 15:00:20 INFO: 2020-10-03 15:00:20 INFO: 2020-10-03 15:00:20 INFO: 2020-10-03 15:02:00 INFO: 2020-10-03 15:02:00 INFO: 2020-10-03 15:02:00 INFO: 2020-10-03 15:02:00 INFO: 2020-10-03 15:02:00 INFO: clearing start 2020-10-03 15:02:00 INFO: clearing end 2020-10-03 15:02:00 INFO: 2020-10-03 15:02:00 INFO: 2020-10-03 15:02:00 INFO: 2020-10-03 15:02:00 INFO: 2020-10-03 16:00:20 INFO: 2020-10-03 16:00:20 INFO: 2020-10-03 16:00:20 INFO: 2020-10-03 16:00:20 INFO: 2020-10-03 16:00:20 INFO: init new order start 2020-10-03 16:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 3, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.0, 'high': 348.0, 'low': 346.15, 'close': 346.6, 'trades': 2502, 'volume': 1115961, 'vwap': 346.89, 'lastSize': 1, 'turnover': 38710508355, 'homeNotional': 11759.683809659024, 'foreignNotional': 4079206.396809956}, {'timestamp': datetime.datetime(2020, 10, 3, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.3, 'high': 350.4, 'low': 347.75, 'close': 348.0, 'trades': 2071, 'volume': 1664817, 'vwap': 348.82, 'lastSize': 1, 'turnover': 58071102360, 'homeNotional': 17559.982672508027, 'foreignNotional': 6125168.370072313}, {'timestamp': datetime.datetime(2020, 10, 3, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 345.95, 'high': 348.3, 'low': 345.95, 'close': 348.3, 'trades': 1734, 'volume': 1251791, 'vwap': 347.48, 'lastSize': 1, 'turnover': 43496383905, 'homeNotional': 13194.758416069408, 'foreignNotional': 4584827.666018795}] 2020-10-03 16:00:20 INFO: prepare candles [CandleItem(low=346.15, high=348.0, open=348.0, close=346.6, color='RED'), CandleItem(low=347.75, high=350.4, open=348.3, close=348.0, color='RED'), CandleItem(low=345.95, high=348.3, open=345.95, close=348.3, color='GREEN')] 2020-10-03 16:00:20 INFO: skip by colors first_candle=CandleItem(low=345.95, high=348.3, open=345.95, close=348.3, color='GREEN') second_candle=CandleItem(low=347.75, high=350.4, open=348.3, close=348.0, color='RED') last_candle=CandleItem(low=346.15, high=348.0, open=348.0, close=346.6, color='RED') 2020-10-03 16:00:20 INFO: check need new order None 2020-10-03 16:00:20 INFO: init new order end 2020-10-03 16:00:20 INFO: 2020-10-03 16:00:20 INFO: 2020-10-03 16:00:20 INFO: 2020-10-03 16:00:20 INFO: 2020-10-03 16:02:00 INFO: 2020-10-03 16:02:00 INFO: 2020-10-03 16:02:00 INFO: 2020-10-03 16:02:00 INFO: 2020-10-03 16:02:00 INFO: clearing start 2020-10-03 16:02:00 INFO: clearing end 2020-10-03 16:02:00 INFO: 2020-10-03 16:02:00 INFO: 2020-10-03 16:02:00 INFO: 2020-10-03 16:02:00 INFO: 2020-10-03 17:00:20 INFO: 2020-10-03 17:00:20 INFO: 2020-10-03 17:00:20 INFO: 2020-10-03 17:00:20 INFO: 2020-10-03 17:00:20 INFO: init new order start 2020-10-03 17:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 3, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.6, 'high': 347.25, 'low': 346.4, 'close': 346.6, 'trades': 1111, 'volume': 598566, 'vwap': 346.86, 'lastSize': 404, 'turnover': 20761293865, 'homeNotional': 6310.00502557643, 'foreignNotional': 2188629.2353142677}, {'timestamp': datetime.datetime(2020, 10, 3, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.0, 'high': 348.0, 'low': 346.15, 'close': 346.6, 'trades': 2502, 'volume': 1115961, 'vwap': 346.89, 'lastSize': 1, 'turnover': 38710508355, 'homeNotional': 11759.683809659024, 'foreignNotional': 4079206.396809956}, {'timestamp': datetime.datetime(2020, 10, 3, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.3, 'high': 350.4, 'low': 347.75, 'close': 348.0, 'trades': 2071, 'volume': 1664817, 'vwap': 348.82, 'lastSize': 1, 'turnover': 58071102360, 'homeNotional': 17559.982672508027, 'foreignNotional': 6125168.370072313}] 2020-10-03 17:00:21 INFO: skip by found empty buckets 2020-10-03 17:00:21 INFO: check need new order None 2020-10-03 17:00:21 INFO: init new order end 2020-10-03 17:00:21 INFO: 2020-10-03 17:00:21 INFO: 2020-10-03 17:00:21 INFO: 2020-10-03 17:00:21 INFO: 2020-10-03 17:02:00 INFO: 2020-10-03 17:02:00 INFO: 2020-10-03 17:02:00 INFO: 2020-10-03 17:02:00 INFO: 2020-10-03 17:02:00 INFO: clearing start 2020-10-03 17:02:00 INFO: clearing end 2020-10-03 17:02:00 INFO: 2020-10-03 17:02:00 INFO: 2020-10-03 17:02:00 INFO: 2020-10-03 17:02:00 INFO: 2020-10-03 18:00:20 INFO: 2020-10-03 18:00:20 INFO: 2020-10-03 18:00:20 INFO: 2020-10-03 18:00:20 INFO: 2020-10-03 18:00:20 INFO: init new order start 2020-10-03 18:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 3, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.6, 'high': 347.65, 'low': 346.45, 'close': 346.9, 'trades': 1092, 'volume': 663509, 'vwap': 347.15, 'lastSize': 1, 'turnover': 23033546630, 'homeNotional': 6994.830967905425, 'foreignNotional': 2428238.228421391}, {'timestamp': datetime.datetime(2020, 10, 3, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.6, 'high': 347.25, 'low': 346.4, 'close': 346.6, 'trades': 1111, 'volume': 598566, 'vwap': 346.86, 'lastSize': 404, 'turnover': 20761293865, 'homeNotional': 6310.00502557643, 'foreignNotional': 2188629.2353142677}, {'timestamp': datetime.datetime(2020, 10, 3, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.0, 'high': 348.0, 'low': 346.15, 'close': 346.6, 'trades': 2502, 'volume': 1115961, 'vwap': 346.89, 'lastSize': 1, 'turnover': 38710508355, 'homeNotional': 11759.683809659024, 'foreignNotional': 4079206.396809956}] 2020-10-03 18:00:20 INFO: skip by found empty buckets 2020-10-03 18:00:20 INFO: check need new order None 2020-10-03 18:00:20 INFO: init new order end 2020-10-03 18:00:20 INFO: 2020-10-03 18:00:20 INFO: 2020-10-03 18:00:20 INFO: 2020-10-03 18:00:20 INFO: 2020-10-03 18:02:00 INFO: 2020-10-03 18:02:00 INFO: 2020-10-03 18:02:00 INFO: 2020-10-03 18:02:00 INFO: 2020-10-03 18:02:00 INFO: clearing start 2020-10-03 18:02:00 INFO: clearing end 2020-10-03 18:02:00 INFO: 2020-10-03 18:02:00 INFO: 2020-10-03 18:02:00 INFO: 2020-10-03 18:02:00 INFO: 2020-10-03 19:00:20 INFO: 2020-10-03 19:00:20 INFO: 2020-10-03 19:00:20 INFO: 2020-10-03 19:00:20 INFO: 2020-10-03 19:00:20 INFO: init new order start 2020-10-03 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 3, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.9, 'high': 348.3, 'low': 346.8, 'close': 347.85, 'trades': 1182, 'volume': 799419, 'vwap': 347.48, 'lastSize': 7025, 'turnover': 27777668080, 'homeNotional': 8434.322730809203, 'foreignNotional': 2930702.88045502}, {'timestamp': datetime.datetime(2020, 10, 3, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.6, 'high': 347.65, 'low': 346.45, 'close': 346.9, 'trades': 1092, 'volume': 663509, 'vwap': 347.15, 'lastSize': 1, 'turnover': 23033546630, 'homeNotional': 6994.830967905425, 'foreignNotional': 2428238.228421391}, {'timestamp': datetime.datetime(2020, 10, 3, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.6, 'high': 347.25, 'low': 346.4, 'close': 346.6, 'trades': 1111, 'volume': 598566, 'vwap': 346.86, 'lastSize': 404, 'turnover': 20761293865, 'homeNotional': 6310.00502557643, 'foreignNotional': 2188629.2353142677}] 2020-10-03 19:00:20 INFO: skip by found empty buckets 2020-10-03 19:00:20 INFO: check need new order None 2020-10-03 19:00:20 INFO: init new order end 2020-10-03 19:00:20 INFO: 2020-10-03 19:00:20 INFO: 2020-10-03 19:00:20 INFO: 2020-10-03 19:00:20 INFO: 2020-10-03 19:02:00 INFO: 2020-10-03 19:02:00 INFO: 2020-10-03 19:02:00 INFO: 2020-10-03 19:02:00 INFO: 2020-10-03 19:02:00 INFO: clearing start 2020-10-03 19:02:00 INFO: clearing end 2020-10-03 19:02:00 INFO: 2020-10-03 19:02:00 INFO: 2020-10-03 19:02:00 INFO: 2020-10-03 19:02:00 INFO: 2020-10-03 20:00:20 INFO: 2020-10-03 20:00:20 INFO: 2020-10-03 20:00:20 INFO: 2020-10-03 20:00:20 INFO: 2020-10-03 20:00:20 INFO: init new order start 2020-10-03 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 3, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.85, 'high': 349.7, 'low': 347.2, 'close': 348.45, 'trades': 2237, 'volume': 1401294, 'vwap': 348.09, 'lastSize': 301, 'turnover': 48776747595, 'homeNotional': 14803.958624702618, 'foreignNotional': 5153021.424385579}, {'timestamp': datetime.datetime(2020, 10, 3, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.9, 'high': 348.3, 'low': 346.8, 'close': 347.85, 'trades': 1182, 'volume': 799419, 'vwap': 347.48, 'lastSize': 7025, 'turnover': 27777668080, 'homeNotional': 8434.322730809203, 'foreignNotional': 2930702.88045502}, {'timestamp': datetime.datetime(2020, 10, 3, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.6, 'high': 347.65, 'low': 346.45, 'close': 346.9, 'trades': 1092, 'volume': 663509, 'vwap': 347.15, 'lastSize': 1, 'turnover': 23033546630, 'homeNotional': 6994.830967905425, 'foreignNotional': 2428238.228421391}] 2020-10-03 20:00:20 INFO: prepare candles [CandleItem(low=347.2, high=349.7, open=347.85, close=348.45, color='GREEN'), CandleItem(low=346.8, high=348.3, open=346.9, close=347.85, color='GREEN'), CandleItem(low=346.45, high=347.65, open=346.6, close=346.9, color='GREEN')] 2020-10-03 20:00:20 INFO: skip by colors first_candle=CandleItem(low=346.45, high=347.65, open=346.6, close=346.9, color='GREEN') second_candle=CandleItem(low=346.8, high=348.3, open=346.9, close=347.85, color='GREEN') last_candle=CandleItem(low=347.2, high=349.7, open=347.85, close=348.45, color='GREEN') 2020-10-03 20:00:20 INFO: check need new order None 2020-10-03 20:00:20 INFO: init new order end 2020-10-03 20:00:20 INFO: 2020-10-03 20:00:20 INFO: 2020-10-03 20:00:20 INFO: 2020-10-03 20:00:20 INFO: 2020-10-03 20:02:00 INFO: 2020-10-03 20:02:00 INFO: 2020-10-03 20:02:00 INFO: 2020-10-03 20:02:00 INFO: 2020-10-03 20:02:00 INFO: clearing start 2020-10-03 20:02:00 INFO: clearing end 2020-10-03 20:02:00 INFO: 2020-10-03 20:02:00 INFO: 2020-10-03 20:02:00 INFO: 2020-10-03 20:02:00 INFO: 2020-10-03 21:00:20 INFO: 2020-10-03 21:00:20 INFO: 2020-10-03 21:00:20 INFO: 2020-10-03 21:00:20 INFO: 2020-10-03 21:00:20 INFO: init new order start 2020-10-03 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 3, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.45, 'high': 348.9, 'low': 347.7, 'close': 348.55, 'trades': 1298, 'volume': 615162, 'vwap': 348.22, 'lastSize': 100, 'turnover': 21420685855, 'homeNotional': 6507.945899749281, 'foreignNotional': 2266146.485904112}, {'timestamp': datetime.datetime(2020, 10, 3, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.85, 'high': 349.7, 'low': 347.2, 'close': 348.45, 'trades': 2237, 'volume': 1401294, 'vwap': 348.09, 'lastSize': 301, 'turnover': 48776747595, 'homeNotional': 14803.958624702618, 'foreignNotional': 5153021.424385579}, {'timestamp': datetime.datetime(2020, 10, 3, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.9, 'high': 348.3, 'low': 346.8, 'close': 347.85, 'trades': 1182, 'volume': 799419, 'vwap': 347.48, 'lastSize': 7025, 'turnover': 27777668080, 'homeNotional': 8434.322730809203, 'foreignNotional': 2930702.88045502}] 2020-10-03 21:00:20 INFO: prepare candles [CandleItem(low=347.7, high=348.9, open=348.45, close=348.55, color='GREEN'), CandleItem(low=347.2, high=349.7, open=347.85, close=348.45, color='GREEN'), CandleItem(low=346.8, high=348.3, open=346.9, close=347.85, color='GREEN')] 2020-10-03 21:00:20 INFO: skip by colors first_candle=CandleItem(low=346.8, high=348.3, open=346.9, close=347.85, color='GREEN') second_candle=CandleItem(low=347.2, high=349.7, open=347.85, close=348.45, color='GREEN') last_candle=CandleItem(low=347.7, high=348.9, open=348.45, close=348.55, color='GREEN') 2020-10-03 21:00:20 INFO: check need new order None 2020-10-03 21:00:20 INFO: init new order end 2020-10-03 21:00:20 INFO: 2020-10-03 21:00:20 INFO: 2020-10-03 21:00:20 INFO: 2020-10-03 21:00:20 INFO: 2020-10-03 21:02:00 INFO: 2020-10-03 21:02:00 INFO: 2020-10-03 21:02:00 INFO: 2020-10-03 21:02:00 INFO: 2020-10-03 21:02:00 INFO: clearing start 2020-10-03 21:02:00 INFO: clearing end 2020-10-03 21:02:00 INFO: 2020-10-03 21:02:00 INFO: 2020-10-03 21:02:00 INFO: 2020-10-03 21:02:00 INFO: 2020-10-03 22:00:20 INFO: 2020-10-03 22:00:20 INFO: 2020-10-03 22:00:20 INFO: 2020-10-03 22:00:20 INFO: 2020-10-03 22:00:20 INFO: init new order start 2020-10-03 22:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 3, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.55, 'high': 351.6, 'low': 348.55, 'close': 350.8, 'trades': 3301, 'volume': 2282989, 'vwap': 350.56, 'lastSize': 1, 'turnover': 80032010295, 'homeNotional': 24165.25813715433, 'foreignNotional': 8471328.495327653}, {'timestamp': datetime.datetime(2020, 10, 3, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.45, 'high': 348.9, 'low': 347.7, 'close': 348.55, 'trades': 1298, 'volume': 615162, 'vwap': 348.22, 'lastSize': 100, 'turnover': 21420685855, 'homeNotional': 6507.945899749281, 'foreignNotional': 2266146.485904112}, {'timestamp': datetime.datetime(2020, 10, 3, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.85, 'high': 349.7, 'low': 347.2, 'close': 348.45, 'trades': 2237, 'volume': 1401294, 'vwap': 348.09, 'lastSize': 301, 'turnover': 48776747595, 'homeNotional': 14803.958624702618, 'foreignNotional': 5153021.424385579}] 2020-10-03 22:00:21 INFO: prepare candles [CandleItem(low=348.55, high=351.6, open=348.55, close=350.8, color='GREEN'), CandleItem(low=347.7, high=348.9, open=348.45, close=348.55, color='GREEN'), CandleItem(low=347.2, high=349.7, open=347.85, close=348.45, color='GREEN')] 2020-10-03 22:00:21 INFO: skip by colors first_candle=CandleItem(low=347.2, high=349.7, open=347.85, close=348.45, color='GREEN') second_candle=CandleItem(low=347.7, high=348.9, open=348.45, close=348.55, color='GREEN') last_candle=CandleItem(low=348.55, high=351.6, open=348.55, close=350.8, color='GREEN') 2020-10-03 22:00:21 INFO: check need new order None 2020-10-03 22:00:21 INFO: init new order end 2020-10-03 22:00:21 INFO: 2020-10-03 22:00:21 INFO: 2020-10-03 22:00:21 INFO: 2020-10-03 22:00:21 INFO: 2020-10-03 22:02:00 INFO: 2020-10-03 22:02:00 INFO: 2020-10-03 22:02:00 INFO: 2020-10-03 22:02:00 INFO: 2020-10-03 22:02:00 INFO: clearing start 2020-10-03 22:02:00 INFO: clearing end 2020-10-03 22:02:00 INFO: 2020-10-03 22:02:00 INFO: 2020-10-03 22:02:00 INFO: 2020-10-03 22:02:00 INFO: 2020-10-03 23:00:20 INFO: 2020-10-03 23:00:20 INFO: 2020-10-03 23:00:20 INFO: 2020-10-03 23:00:20 INFO: 2020-10-03 23:00:20 INFO: init new order start 2020-10-03 23:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 3, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.8, 'high': 351.5, 'low': 350.65, 'close': 350.8, 'trades': 1665, 'volume': 1291338, 'vwap': 351.04, 'lastSize': 541, 'turnover': 45329883090, 'homeNotional': 13671.625344629796, 'foreignNotional': 4799155.376190893}, {'timestamp': datetime.datetime(2020, 10, 3, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.55, 'high': 351.6, 'low': 348.55, 'close': 350.8, 'trades': 3301, 'volume': 2282989, 'vwap': 350.56, 'lastSize': 1, 'turnover': 80032010295, 'homeNotional': 24165.25813715433, 'foreignNotional': 8471328.495327653}, {'timestamp': datetime.datetime(2020, 10, 3, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.45, 'high': 348.9, 'low': 347.7, 'close': 348.55, 'trades': 1298, 'volume': 615162, 'vwap': 348.22, 'lastSize': 100, 'turnover': 21420685855, 'homeNotional': 6507.945899749281, 'foreignNotional': 2266146.485904112}] 2020-10-03 23:00:20 INFO: skip by found empty buckets 2020-10-03 23:00:20 INFO: check need new order None 2020-10-03 23:00:20 INFO: init new order end 2020-10-03 23:00:20 INFO: 2020-10-03 23:00:20 INFO: 2020-10-03 23:00:20 INFO: 2020-10-03 23:00:20 INFO: 2020-10-03 23:02:00 INFO: 2020-10-03 23:02:00 INFO: 2020-10-03 23:02:00 INFO: 2020-10-03 23:02:00 INFO: 2020-10-03 23:02:00 INFO: clearing start 2020-10-03 23:02:00 INFO: clearing end 2020-10-03 23:02:00 INFO: 2020-10-03 23:02:00 INFO: 2020-10-03 23:02:00 INFO: 2020-10-03 23:02:00 INFO: 2020-10-04 00:00:20 INFO: 2020-10-04 00:00:20 INFO: 2020-10-04 00:00:20 INFO: 2020-10-04 00:00:20 INFO: 2020-10-04 00:00:20 INFO: init new order start 2020-10-04 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 3, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.8, 'high': 351.15, 'low': 349.15, 'close': 349.5, 'trades': 1513, 'volume': 1224656, 'vwap': 350.28, 'lastSize': 1, 'turnover': 42897154755, 'homeNotional': 12959.147636713904, 'foreignNotional': 4539326.0094706435}, {'timestamp': datetime.datetime(2020, 10, 3, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.8, 'high': 351.5, 'low': 350.65, 'close': 350.8, 'trades': 1665, 'volume': 1291338, 'vwap': 351.04, 'lastSize': 541, 'turnover': 45329883090, 'homeNotional': 13671.625344629796, 'foreignNotional': 4799155.376190893}, {'timestamp': datetime.datetime(2020, 10, 3, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.55, 'high': 351.6, 'low': 348.55, 'close': 350.8, 'trades': 3301, 'volume': 2282989, 'vwap': 350.56, 'lastSize': 1, 'turnover': 80032010295, 'homeNotional': 24165.25813715433, 'foreignNotional': 8471328.495327653}] 2020-10-04 00:00:20 INFO: skip by found empty buckets 2020-10-04 00:00:20 INFO: check need new order None 2020-10-04 00:00:20 INFO: init new order end 2020-10-04 00:00:20 INFO: 2020-10-04 00:00:20 INFO: 2020-10-04 00:00:20 INFO: 2020-10-04 00:00:20 INFO: 2020-10-04 00:02:00 INFO: 2020-10-04 00:02:00 INFO: 2020-10-04 00:02:00 INFO: 2020-10-04 00:02:00 INFO: 2020-10-04 00:02:00 INFO: clearing start 2020-10-04 00:02:00 INFO: clearing end 2020-10-04 00:02:00 INFO: 2020-10-04 00:02:00 INFO: 2020-10-04 00:02:00 INFO: 2020-10-04 00:02:00 INFO: 2020-10-04 01:00:20 INFO: 2020-10-04 01:00:20 INFO: 2020-10-04 01:00:20 INFO: 2020-10-04 01:00:20 INFO: 2020-10-04 01:00:20 INFO: init new order start 2020-10-04 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 3, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.5, 'high': 349.75, 'low': 349.15, 'close': 349.2, 'trades': 866, 'volume': 512361, 'vwap': 349.44, 'lastSize': 254, 'turnover': 17903741115, 'homeNotional': 5418.390483973422, 'foreignNotional': 1893381.2131823844}, {'timestamp': datetime.datetime(2020, 10, 3, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.8, 'high': 351.15, 'low': 349.15, 'close': 349.5, 'trades': 1513, 'volume': 1224656, 'vwap': 350.28, 'lastSize': 1, 'turnover': 42897154755, 'homeNotional': 12959.147636713904, 'foreignNotional': 4539326.0094706435}, {'timestamp': datetime.datetime(2020, 10, 3, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.8, 'high': 351.5, 'low': 350.65, 'close': 350.8, 'trades': 1665, 'volume': 1291338, 'vwap': 351.04, 'lastSize': 541, 'turnover': 45329883090, 'homeNotional': 13671.625344629796, 'foreignNotional': 4799155.376190893}] 2020-10-04 01:00:20 INFO: skip by found empty buckets 2020-10-04 01:00:20 INFO: check need new order None 2020-10-04 01:00:20 INFO: init new order end 2020-10-04 01:00:20 INFO: 2020-10-04 01:00:20 INFO: 2020-10-04 01:00:20 INFO: 2020-10-04 01:00:20 INFO: 2020-10-04 01:02:00 INFO: 2020-10-04 01:02:00 INFO: 2020-10-04 01:02:00 INFO: 2020-10-04 01:02:00 INFO: 2020-10-04 01:02:00 INFO: clearing start 2020-10-04 01:02:01 INFO: clearing end 2020-10-04 01:02:01 INFO: 2020-10-04 01:02:01 INFO: 2020-10-04 01:02:01 INFO: 2020-10-04 01:02:01 INFO: 2020-10-04 02:00:20 INFO: 2020-10-04 02:00:20 INFO: 2020-10-04 02:00:20 INFO: 2020-10-04 02:00:20 INFO: 2020-10-04 02:00:20 INFO: init new order start 2020-10-04 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 3, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.2, 'high': 349.3, 'low': 346.3, 'close': 347.65, 'trades': 2439, 'volume': 1574713, 'vwap': 347.75, 'lastSize': 282, 'turnover': 54759972365, 'homeNotional': 16618.36587903033, 'foreignNotional': 5778976.001362625}, {'timestamp': datetime.datetime(2020, 10, 3, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.5, 'high': 349.75, 'low': 349.15, 'close': 349.2, 'trades': 866, 'volume': 512361, 'vwap': 349.44, 'lastSize': 254, 'turnover': 17903741115, 'homeNotional': 5418.390483973422, 'foreignNotional': 1893381.2131823844}, {'timestamp': datetime.datetime(2020, 10, 3, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.8, 'high': 351.15, 'low': 349.15, 'close': 349.5, 'trades': 1513, 'volume': 1224656, 'vwap': 350.28, 'lastSize': 1, 'turnover': 42897154755, 'homeNotional': 12959.147636713904, 'foreignNotional': 4539326.0094706435}] 2020-10-04 02:00:20 INFO: prepare candles [CandleItem(low=346.3, high=349.3, open=349.2, close=347.65, color='RED'), CandleItem(low=349.15, high=349.75, open=349.5, close=349.2, color='RED'), CandleItem(low=349.15, high=351.15, open=350.8, close=349.5, color='RED')] 2020-10-04 02:00:20 INFO: skip by colors first_candle=CandleItem(low=349.15, high=351.15, open=350.8, close=349.5, color='RED') second_candle=CandleItem(low=349.15, high=349.75, open=349.5, close=349.2, color='RED') last_candle=CandleItem(low=346.3, high=349.3, open=349.2, close=347.65, color='RED') 2020-10-04 02:00:20 INFO: check need new order None 2020-10-04 02:00:20 INFO: init new order end 2020-10-04 02:00:20 INFO: 2020-10-04 02:00:20 INFO: 2020-10-04 02:00:20 INFO: 2020-10-04 02:00:20 INFO: 2020-10-04 02:02:00 INFO: 2020-10-04 02:02:00 INFO: 2020-10-04 02:02:00 INFO: 2020-10-04 02:02:00 INFO: 2020-10-04 02:02:00 INFO: clearing start 2020-10-04 02:02:00 INFO: clearing end 2020-10-04 02:02:00 INFO: 2020-10-04 02:02:00 INFO: 2020-10-04 02:02:00 INFO: 2020-10-04 02:02:00 INFO: 2020-10-04 03:00:20 INFO: 2020-10-04 03:00:20 INFO: 2020-10-04 03:00:20 INFO: 2020-10-04 03:00:20 INFO: 2020-10-04 03:00:20 INFO: init new order start 2020-10-04 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 4, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.65, 'high': 348.0, 'low': 346.2, 'close': 346.4, 'trades': 1982, 'volume': 952366, 'vwap': 347.18, 'lastSize': 1, 'turnover': 33063558460, 'homeNotional': 10056.521703820335, 'foreignNotional': 3491353.3240595986}, {'timestamp': datetime.datetime(2020, 10, 3, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.2, 'high': 349.3, 'low': 346.3, 'close': 347.65, 'trades': 2439, 'volume': 1574713, 'vwap': 347.75, 'lastSize': 282, 'turnover': 54759972365, 'homeNotional': 16618.36587903033, 'foreignNotional': 5778976.001362625}, {'timestamp': datetime.datetime(2020, 10, 3, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.5, 'high': 349.75, 'low': 349.15, 'close': 349.2, 'trades': 866, 'volume': 512361, 'vwap': 349.44, 'lastSize': 254, 'turnover': 17903741115, 'homeNotional': 5418.390483973422, 'foreignNotional': 1893381.2131823844}] 2020-10-04 03:00:20 INFO: prepare candles [CandleItem(low=346.2, high=348.0, open=347.65, close=346.4, color='RED'), CandleItem(low=346.3, high=349.3, open=349.2, close=347.65, color='RED'), CandleItem(low=349.15, high=349.75, open=349.5, close=349.2, color='RED')] 2020-10-04 03:00:20 INFO: skip by colors first_candle=CandleItem(low=349.15, high=349.75, open=349.5, close=349.2, color='RED') second_candle=CandleItem(low=346.3, high=349.3, open=349.2, close=347.65, color='RED') last_candle=CandleItem(low=346.2, high=348.0, open=347.65, close=346.4, color='RED') 2020-10-04 03:00:20 INFO: check need new order None 2020-10-04 03:00:20 INFO: init new order end 2020-10-04 03:00:20 INFO: 2020-10-04 03:00:20 INFO: 2020-10-04 03:00:20 INFO: 2020-10-04 03:00:20 INFO: 2020-10-04 03:02:00 INFO: 2020-10-04 03:02:00 INFO: 2020-10-04 03:02:00 INFO: 2020-10-04 03:02:00 INFO: 2020-10-04 03:02:00 INFO: clearing start 2020-10-04 03:02:00 INFO: clearing end 2020-10-04 03:02:00 INFO: 2020-10-04 03:02:00 INFO: 2020-10-04 03:02:00 INFO: 2020-10-04 03:02:00 INFO: 2020-10-04 04:00:20 INFO: 2020-10-04 04:00:20 INFO: 2020-10-04 04:00:20 INFO: 2020-10-04 04:00:20 INFO: 2020-10-04 04:00:20 INFO: init new order start 2020-10-04 04:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 4, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.4, 'high': 347.3, 'low': 345.3, 'close': 347.05, 'trades': 1978, 'volume': 1200506, 'vwap': 346.52, 'lastSize': 1, 'turnover': 41599217545, 'homeNotional': 12663.475105968671, 'foreignNotional': 4388076.750712872}, {'timestamp': datetime.datetime(2020, 10, 4, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.65, 'high': 348.0, 'low': 346.2, 'close': 346.4, 'trades': 1982, 'volume': 952366, 'vwap': 347.18, 'lastSize': 1, 'turnover': 33063558460, 'homeNotional': 10056.521703820335, 'foreignNotional': 3491353.3240595986}, {'timestamp': datetime.datetime(2020, 10, 3, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.2, 'high': 349.3, 'low': 346.3, 'close': 347.65, 'trades': 2439, 'volume': 1574713, 'vwap': 347.75, 'lastSize': 282, 'turnover': 54759972365, 'homeNotional': 16618.36587903033, 'foreignNotional': 5778976.001362625}] 2020-10-04 04:00:20 INFO: prepare candles [CandleItem(low=345.3, high=347.3, open=346.4, close=347.05, color='GREEN'), CandleItem(low=346.2, high=348.0, open=347.65, close=346.4, color='RED'), CandleItem(low=346.3, high=349.3, open=349.2, close=347.65, color='RED')] 2020-10-04 04:00:20 INFO: last_candle=CandleItem(low=345.3, high=347.3, open=346.4, close=347.05, color='GREEN') 2020-10-04 04:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-04 04:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=345.3, high=347.3, open=346.4, close=347.05, color='GREEN') 2020-10-04 04:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=346.2, high=348.0, open=347.65, close=346.4, color='RED') 2020-10-04 04:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=346.3, high=349.3, open=349.2, close=347.65, color='RED') 2020-10-04 04:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=345.3, high=347.3, open=346.4, close=347.05, color='GREEN'), take_profit_factor=6.0, clearing_interval=3600) 2020-10-04 04:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=345.3, high=347.3, open=346.4, close=347.05, color='GREEN'), take_profit_factor=6.0, clearing_interval=3600) 2020-10-04 04:00:20 INFO: place order: start candle=CandleItem(low=345.3, high=347.3, open=346.4, close=347.05, color='GREEN') ticker='ETHUSD' price_offset=0.1 2020-10-04 04:00:20 INFO: place order: side_factor=-1 init_trigger_price=347.35 init_order_price=347.40000000000003 stop_price_offset=0.0 candle.size=2.0 stop_price=345.3 take_price=359.40000000000003 2020-10-04 04:00:20 INFO: place order round: side_factor=-1 init_trigger_price=Decimal('347.3500000000000227373675443232059478759765625') init_order_price=Decimal('347.40000000000003410605131648480892181396484375') stop_price_offset=0.0 candle.size=2.0 stop_price=Decimal('345.30000000000001136868377216160297393798828125') take_price=Decimal('359.40000000000003410605131648480892181396484375') 2020-10-04 04:00:20 INFO: place order: compute qty=927 2020-10-04 04:00:20 INFO: place order: save order to db ce6cdb6e2eec403b878873fd01bb1239; response=True 2020-10-04 04:00:20 INFO: post order to exchange resp={'orderID': '90e6c12c-3334-4340-b5d3-2681452b00a9', 'clOrdID': 'ce6cdb6e2eec403b878873fd01bb1239', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 927, 'price': 347.4, 'displayQty': None, 'stopPx': 347.35, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 4, 1, 0, 20, 628000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 1, 0, 20, 628000, tzinfo=tzutc())} 2020-10-04 04:00:20 INFO: place new init order {'qty': 927, 'init_price': Decimal('347.3500000000000227373675443232059478759765625'), 'stop_price': Decimal('345.30000000000001136868377216160297393798828125'), 'take_price': Decimal('359.40000000000003410605131648480892181396484375'), 'order_uid': 'ce6cdb6e2eec403b878873fd01bb1239', 'response': {'orderID': '90e6c12c-3334-4340-b5d3-2681452b00a9', 'clOrdID': 'ce6cdb6e2eec403b878873fd01bb1239', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 927, 'price': 347.4, 'displayQty': None, 'stopPx': 347.35, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 4, 1, 0, 20, 628000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 1, 0, 20, 628000, tzinfo=tzutc())}} 2020-10-04 04:00:20 INFO: init new order end 2020-10-04 04:00:20 INFO: 2020-10-04 04:00:20 INFO: 2020-10-04 04:00:20 INFO: 2020-10-04 04:00:20 INFO: 2020-10-04 04:00:20 INFO: process event {'orderID': '90e6c12c-3334-4340-b5d3-2681452b00a9', 'clOrdID': 'ce6cdb6e2eec403b878873fd01bb1239', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 927, 'price': 347.4, 'displayQty': None, 'stopPx': 347.35, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-10-04T01:00:20.628Z', 'timestamp': '2020-10-04T01:00:20.628Z'} 2020-10-04 04:00:20 INFO: skip event ce6cdb6e2eec403b878873fd01bb1239 New 2020-10-04 04:02:00 INFO: 2020-10-04 04:02:00 INFO: 2020-10-04 04:02:00 INFO: 2020-10-04 04:02:00 INFO: 2020-10-04 04:02:00 INFO: clearing start 2020-10-04 04:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '90e6c12c-3334-4340-b5d3-2681452b00a9', 'clOrdID': 'ce6cdb6e2eec403b878873fd01bb1239', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 927, 'price': 347.4, 'displayQty': None, 'stopPx': 347.35, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 4, 1, 0, 20, 628000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 1, 0, 20, 628000, tzinfo=tzutc())} 2020-10-04 04:02:00 INFO: order time=2020-10-04 01:00:20.628000+00:00; delta from now UTC=0:01:40.168551 time_delta.total_seconds()=100.168551; time_diff_offset='3600' 2020-10-04 04:02:00 INFO: skip by time diff 2020-10-04 01:00:20.628000+00:00 2020-10-04 04:02:00 INFO: clearing end 2020-10-04 04:02:00 INFO: 2020-10-04 04:02:00 INFO: 2020-10-04 04:02:00 INFO: 2020-10-04 04:02:00 INFO: 2020-10-04 05:00:20 INFO: 2020-10-04 05:00:20 INFO: 2020-10-04 05:00:20 INFO: 2020-10-04 05:00:20 INFO: 2020-10-04 05:00:20 INFO: init new order start 2020-10-04 05:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 4, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.05, 'high': 347.0, 'low': 343.75, 'close': 345.3, 'trades': 3595, 'volume': 2278399, 'vwap': 345.08, 'lastSize': 1, 'turnover': 78621789975, 'homeNotional': 24006.021291492103, 'foreignNotional': 8283876.360844133}, {'timestamp': datetime.datetime(2020, 10, 4, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.4, 'high': 347.3, 'low': 345.3, 'close': 347.05, 'trades': 1978, 'volume': 1200506, 'vwap': 346.52, 'lastSize': 1, 'turnover': 41599217545, 'homeNotional': 12663.475105968671, 'foreignNotional': 4388076.750712872}, {'timestamp': datetime.datetime(2020, 10, 4, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.65, 'high': 348.0, 'low': 346.2, 'close': 346.4, 'trades': 1982, 'volume': 952366, 'vwap': 347.18, 'lastSize': 1, 'turnover': 33063558460, 'homeNotional': 10056.521703820335, 'foreignNotional': 3491353.3240595986}] 2020-10-04 05:00:20 INFO: prepare candles [CandleItem(low=343.75, high=347.0, open=347.05, close=345.3, color='RED'), CandleItem(low=345.3, high=347.3, open=346.4, close=347.05, color='GREEN'), CandleItem(low=346.2, high=348.0, open=347.65, close=346.4, color='RED')] 2020-10-04 05:00:20 INFO: skip by colors first_candle=CandleItem(low=346.2, high=348.0, open=347.65, close=346.4, color='RED') second_candle=CandleItem(low=345.3, high=347.3, open=346.4, close=347.05, color='GREEN') last_candle=CandleItem(low=343.75, high=347.0, open=347.05, close=345.3, color='RED') 2020-10-04 05:00:20 INFO: check need new order None 2020-10-04 05:00:20 INFO: init new order end 2020-10-04 05:00:20 INFO: 2020-10-04 05:00:20 INFO: 2020-10-04 05:00:20 INFO: 2020-10-04 05:00:20 INFO: 2020-10-04 05:02:00 INFO: 2020-10-04 05:02:00 INFO: 2020-10-04 05:02:00 INFO: 2020-10-04 05:02:00 INFO: 2020-10-04 05:02:00 INFO: clearing start 2020-10-04 05:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '90e6c12c-3334-4340-b5d3-2681452b00a9', 'clOrdID': 'ce6cdb6e2eec403b878873fd01bb1239', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 927, 'price': 347.4, 'displayQty': None, 'stopPx': 347.35, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 4, 1, 0, 20, 628000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 1, 0, 20, 628000, tzinfo=tzutc())} 2020-10-04 05:02:00 INFO: order time=2020-10-04 01:00:20.628000+00:00; delta from now UTC=1:01:39.947153 time_delta.total_seconds()=3699.947153; time_diff_offset='3600' 2020-10-04 05:02:00 INFO: clear order ce6cdb6e2eec403b878873fd01bb1239 2020-10-04 05:02:00 INFO: cancel order resp=[{'orderID': '90e6c12c-3334-4340-b5d3-2681452b00a9', 'clOrdID': 'ce6cdb6e2eec403b878873fd01bb1239', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 927, 'price': 347.4, 'displayQty': None, 'stopPx': 347.35, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'Canceled', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 0, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Canceled: cancelled by clearing\nInit order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 4, 1, 0, 20, 628000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 2, 2, 0, 638000, tzinfo=tzutc())}] 2020-10-04 05:02:00 INFO: clearing end 2020-10-04 05:02:00 INFO: 2020-10-04 05:02:00 INFO: 2020-10-04 05:02:00 INFO: 2020-10-04 05:02:00 INFO: 2020-10-04 05:02:00 INFO: process event {'orderID': '90e6c12c-3334-4340-b5d3-2681452b00a9', 'ordStatus': 'Canceled', 'leavesQty': 0, 'text': 'Canceled: cancelled by clearing\nInit order by supervisor.py', 'timestamp': '2020-10-04T02:02:00.638Z', 'clOrdID': 'ce6cdb6e2eec403b878873fd01bb1239', 'account': 605536, 'symbol': 'ETHUSD'} 2020-10-04 05:02:00 INFO: skip event ce6cdb6e2eec403b878873fd01bb1239 Canceled 2020-10-04 06:00:20 INFO: 2020-10-04 06:00:20 INFO: 2020-10-04 06:00:20 INFO: 2020-10-04 06:00:20 INFO: 2020-10-04 06:00:20 INFO: init new order start 2020-10-04 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 4, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 345.3, 'high': 346.05, 'low': 344.15, 'close': 346.0, 'trades': 1308, 'volume': 839094, 'vwap': 345.04, 'lastSize': 11, 'turnover': 28951289465, 'homeNotional': 8849.001797492368, 'foreignNotional': 3053176.5517536476}, {'timestamp': datetime.datetime(2020, 10, 4, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.05, 'high': 347.0, 'low': 343.75, 'close': 345.3, 'trades': 3595, 'volume': 2278399, 'vwap': 345.08, 'lastSize': 1, 'turnover': 78621789975, 'homeNotional': 24006.021291492103, 'foreignNotional': 8283876.360844133}, {'timestamp': datetime.datetime(2020, 10, 4, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.4, 'high': 347.3, 'low': 345.3, 'close': 347.05, 'trades': 1978, 'volume': 1200506, 'vwap': 346.52, 'lastSize': 1, 'turnover': 41599217545, 'homeNotional': 12663.475105968671, 'foreignNotional': 4388076.750712872}] 2020-10-04 06:00:20 INFO: prepare candles [CandleItem(low=344.15, high=346.05, open=345.3, close=346.0, color='GREEN'), CandleItem(low=343.75, high=347.0, open=347.05, close=345.3, color='RED'), CandleItem(low=345.3, high=347.3, open=346.4, close=347.05, color='GREEN')] 2020-10-04 06:00:20 INFO: skip by colors first_candle=CandleItem(low=345.3, high=347.3, open=346.4, close=347.05, color='GREEN') second_candle=CandleItem(low=343.75, high=347.0, open=347.05, close=345.3, color='RED') last_candle=CandleItem(low=344.15, high=346.05, open=345.3, close=346.0, color='GREEN') 2020-10-04 06:00:20 INFO: check need new order None 2020-10-04 06:00:20 INFO: init new order end 2020-10-04 06:00:20 INFO: 2020-10-04 06:00:20 INFO: 2020-10-04 06:00:20 INFO: 2020-10-04 06:00:20 INFO: 2020-10-04 06:02:00 INFO: 2020-10-04 06:02:00 INFO: 2020-10-04 06:02:00 INFO: 2020-10-04 06:02:00 INFO: 2020-10-04 06:02:00 INFO: clearing start 2020-10-04 06:02:00 INFO: clearing end 2020-10-04 06:02:00 INFO: 2020-10-04 06:02:00 INFO: 2020-10-04 06:02:00 INFO: 2020-10-04 06:02:00 INFO: 2020-10-04 07:00:20 INFO: 2020-10-04 07:00:20 INFO: 2020-10-04 07:00:20 INFO: 2020-10-04 07:00:20 INFO: 2020-10-04 07:00:20 INFO: init new order start 2020-10-04 07:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 4, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.0, 'high': 346.75, 'low': 346.0, 'close': 346.15, 'trades': 1165, 'volume': 828506, 'vwap': 346.47, 'lastSize': 1, 'turnover': 28704444155, 'homeNotional': 8746.589416261555, 'foreignNotional': 3030346.3747531488}, {'timestamp': datetime.datetime(2020, 10, 4, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 345.3, 'high': 346.05, 'low': 344.15, 'close': 346.0, 'trades': 1308, 'volume': 839094, 'vwap': 345.04, 'lastSize': 11, 'turnover': 28951289465, 'homeNotional': 8849.001797492368, 'foreignNotional': 3053176.5517536476}, {'timestamp': datetime.datetime(2020, 10, 4, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.05, 'high': 347.0, 'low': 343.75, 'close': 345.3, 'trades': 3595, 'volume': 2278399, 'vwap': 345.08, 'lastSize': 1, 'turnover': 78621789975, 'homeNotional': 24006.021291492103, 'foreignNotional': 8283876.360844133}] 2020-10-04 07:00:20 INFO: prepare candles [CandleItem(low=346.0, high=346.75, open=346.0, close=346.15, color='GREEN'), CandleItem(low=344.15, high=346.05, open=345.3, close=346.0, color='GREEN'), CandleItem(low=343.75, high=347.0, open=347.05, close=345.3, color='RED')] 2020-10-04 07:00:20 INFO: skip by colors first_candle=CandleItem(low=343.75, high=347.0, open=347.05, close=345.3, color='RED') second_candle=CandleItem(low=344.15, high=346.05, open=345.3, close=346.0, color='GREEN') last_candle=CandleItem(low=346.0, high=346.75, open=346.0, close=346.15, color='GREEN') 2020-10-04 07:00:20 INFO: check need new order None 2020-10-04 07:00:20 INFO: init new order end 2020-10-04 07:00:20 INFO: 2020-10-04 07:00:20 INFO: 2020-10-04 07:00:20 INFO: 2020-10-04 07:00:20 INFO: 2020-10-04 07:02:00 INFO: 2020-10-04 07:02:00 INFO: 2020-10-04 07:02:00 INFO: 2020-10-04 07:02:00 INFO: 2020-10-04 07:02:00 INFO: clearing start 2020-10-04 07:02:00 INFO: clearing end 2020-10-04 07:02:00 INFO: 2020-10-04 07:02:00 INFO: 2020-10-04 07:02:00 INFO: 2020-10-04 07:02:00 INFO: 2020-10-04 08:00:20 INFO: 2020-10-04 08:00:20 INFO: 2020-10-04 08:00:20 INFO: 2020-10-04 08:00:20 INFO: 2020-10-04 08:00:20 INFO: init new order start 2020-10-04 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 4, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.15, 'high': 347.5, 'low': 346.1, 'close': 347.3, 'trades': 1105, 'volume': 899681, 'vwap': 347.01, 'lastSize': 4739, 'turnover': 31219825570, 'homeNotional': 9509.222185459636, 'foreignNotional': 3299797.8024960174}, {'timestamp': datetime.datetime(2020, 10, 4, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.0, 'high': 346.75, 'low': 346.0, 'close': 346.15, 'trades': 1165, 'volume': 828506, 'vwap': 346.47, 'lastSize': 1, 'turnover': 28704444155, 'homeNotional': 8746.589416261555, 'foreignNotional': 3030346.3747531488}, {'timestamp': datetime.datetime(2020, 10, 4, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 345.3, 'high': 346.05, 'low': 344.15, 'close': 346.0, 'trades': 1308, 'volume': 839094, 'vwap': 345.04, 'lastSize': 11, 'turnover': 28951289465, 'homeNotional': 8849.001797492368, 'foreignNotional': 3053176.5517536476}] 2020-10-04 08:00:20 INFO: prepare candles [CandleItem(low=346.1, high=347.5, open=346.15, close=347.3, color='GREEN'), CandleItem(low=346.0, high=346.75, open=346.0, close=346.15, color='GREEN'), CandleItem(low=344.15, high=346.05, open=345.3, close=346.0, color='GREEN')] 2020-10-04 08:00:20 INFO: skip by colors first_candle=CandleItem(low=344.15, high=346.05, open=345.3, close=346.0, color='GREEN') second_candle=CandleItem(low=346.0, high=346.75, open=346.0, close=346.15, color='GREEN') last_candle=CandleItem(low=346.1, high=347.5, open=346.15, close=347.3, color='GREEN') 2020-10-04 08:00:20 INFO: check need new order None 2020-10-04 08:00:20 INFO: init new order end 2020-10-04 08:00:20 INFO: 2020-10-04 08:00:20 INFO: 2020-10-04 08:00:20 INFO: 2020-10-04 08:00:20 INFO: 2020-10-04 08:02:00 INFO: 2020-10-04 08:02:00 INFO: 2020-10-04 08:02:00 INFO: 2020-10-04 08:02:00 INFO: 2020-10-04 08:02:00 INFO: clearing start 2020-10-04 08:02:00 INFO: clearing end 2020-10-04 08:02:00 INFO: 2020-10-04 08:02:00 INFO: 2020-10-04 08:02:00 INFO: 2020-10-04 08:02:00 INFO: 2020-10-04 09:00:20 INFO: 2020-10-04 09:00:20 INFO: 2020-10-04 09:00:20 INFO: 2020-10-04 09:00:20 INFO: 2020-10-04 09:00:20 INFO: init new order start 2020-10-04 09:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 4, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.3, 'high': 347.65, 'low': 346.8, 'close': 346.8, 'trades': 1290, 'volume': 957135, 'vwap': 347.31, 'lastSize': 12, 'turnover': 33241975490, 'homeNotional': 10123.993025450687, 'foreignNotional': 3516134.7071606675}, {'timestamp': datetime.datetime(2020, 10, 4, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.15, 'high': 347.5, 'low': 346.1, 'close': 347.3, 'trades': 1105, 'volume': 899681, 'vwap': 347.01, 'lastSize': 4739, 'turnover': 31219825570, 'homeNotional': 9509.222185459636, 'foreignNotional': 3299797.8024960174}, {'timestamp': datetime.datetime(2020, 10, 4, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.0, 'high': 346.75, 'low': 346.0, 'close': 346.15, 'trades': 1165, 'volume': 828506, 'vwap': 346.47, 'lastSize': 1, 'turnover': 28704444155, 'homeNotional': 8746.589416261555, 'foreignNotional': 3030346.3747531488}] 2020-10-04 09:00:20 INFO: prepare candles [CandleItem(low=346.8, high=347.65, open=347.3, close=346.8, color='RED'), CandleItem(low=346.1, high=347.5, open=346.15, close=347.3, color='GREEN'), CandleItem(low=346.0, high=346.75, open=346.0, close=346.15, color='GREEN')] 2020-10-04 09:00:20 INFO: last_candle=CandleItem(low=346.8, high=347.65, open=347.3, close=346.8, color='RED') 2020-10-04 09:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-04 09:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=346.8, high=347.65, open=347.3, close=346.8, color='RED') 2020-10-04 09:00:20 INFO: skip by CandleItem(low=346.8, high=347.65, open=347.3, close=346.8, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-04 09:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-04 09:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=346.8, high=347.65, open=347.3, close=346.8, color='RED') 2020-10-04 09:00:20 INFO: skip by CandleItem(low=346.8, high=347.65, open=347.3, close=346.8, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-04 09:00:20 INFO: not found applicable config for candle 2020-10-04 09:00:20 INFO: check need new order None 2020-10-04 09:00:20 INFO: init new order end 2020-10-04 09:00:20 INFO: 2020-10-04 09:00:20 INFO: 2020-10-04 09:00:20 INFO: 2020-10-04 09:00:20 INFO: 2020-10-04 09:02:00 INFO: 2020-10-04 09:02:00 INFO: 2020-10-04 09:02:00 INFO: 2020-10-04 09:02:00 INFO: 2020-10-04 09:02:00 INFO: clearing start 2020-10-04 09:02:00 INFO: clearing end 2020-10-04 09:02:00 INFO: 2020-10-04 09:02:00 INFO: 2020-10-04 09:02:00 INFO: 2020-10-04 09:02:00 INFO: 2020-10-04 10:00:20 INFO: 2020-10-04 10:00:20 INFO: 2020-10-04 10:00:20 INFO: 2020-10-04 10:00:20 INFO: 2020-10-04 10:00:20 INFO: init new order start 2020-10-04 10:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 4, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.8, 'high': 350.7, 'low': 346.8, 'close': 349.7, 'trades': 3648, 'volume': 2369773, 'vwap': 349.15, 'lastSize': 100, 'turnover': 82738712290, 'homeNotional': 25112.21262153862, 'foreignNotional': 8767751.44232187}, {'timestamp': datetime.datetime(2020, 10, 4, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.3, 'high': 347.65, 'low': 346.8, 'close': 346.8, 'trades': 1290, 'volume': 957135, 'vwap': 347.31, 'lastSize': 12, 'turnover': 33241975490, 'homeNotional': 10123.993025450687, 'foreignNotional': 3516134.7071606675}, {'timestamp': datetime.datetime(2020, 10, 4, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.15, 'high': 347.5, 'low': 346.1, 'close': 347.3, 'trades': 1105, 'volume': 899681, 'vwap': 347.01, 'lastSize': 4739, 'turnover': 31219825570, 'homeNotional': 9509.222185459636, 'foreignNotional': 3299797.8024960174}] 2020-10-04 10:00:20 INFO: prepare candles [CandleItem(low=346.8, high=350.7, open=346.8, close=349.7, color='GREEN'), CandleItem(low=346.8, high=347.65, open=347.3, close=346.8, color='RED'), CandleItem(low=346.1, high=347.5, open=346.15, close=347.3, color='GREEN')] 2020-10-04 10:00:20 INFO: skip by colors first_candle=CandleItem(low=346.1, high=347.5, open=346.15, close=347.3, color='GREEN') second_candle=CandleItem(low=346.8, high=347.65, open=347.3, close=346.8, color='RED') last_candle=CandleItem(low=346.8, high=350.7, open=346.8, close=349.7, color='GREEN') 2020-10-04 10:00:20 INFO: check need new order None 2020-10-04 10:00:20 INFO: init new order end 2020-10-04 10:00:20 INFO: 2020-10-04 10:00:20 INFO: 2020-10-04 10:00:20 INFO: 2020-10-04 10:00:20 INFO: 2020-10-04 10:02:00 INFO: 2020-10-04 10:02:00 INFO: 2020-10-04 10:02:00 INFO: 2020-10-04 10:02:00 INFO: 2020-10-04 10:02:00 INFO: clearing start 2020-10-04 10:02:00 INFO: clearing end 2020-10-04 10:02:00 INFO: 2020-10-04 10:02:00 INFO: 2020-10-04 10:02:00 INFO: 2020-10-04 10:02:00 INFO: 2020-10-04 11:00:20 INFO: 2020-10-04 11:00:20 INFO: 2020-10-04 11:00:20 INFO: 2020-10-04 11:00:20 INFO: 2020-10-04 11:00:20 INFO: init new order start 2020-10-04 11:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 4, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.7, 'high': 350.3, 'low': 348.5, 'close': 348.8, 'trades': 1818, 'volume': 1111594, 'vwap': 349.1, 'lastSize': 11, 'turnover': 38804927680, 'homeNotional': 11802.016924891244, 'foreignNotional': 4119998.577690862}, {'timestamp': datetime.datetime(2020, 10, 4, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.8, 'high': 350.7, 'low': 346.8, 'close': 349.7, 'trades': 3648, 'volume': 2369773, 'vwap': 349.15, 'lastSize': 100, 'turnover': 82738712290, 'homeNotional': 25112.21262153862, 'foreignNotional': 8767751.44232187}, {'timestamp': datetime.datetime(2020, 10, 4, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.3, 'high': 347.65, 'low': 346.8, 'close': 346.8, 'trades': 1290, 'volume': 957135, 'vwap': 347.31, 'lastSize': 12, 'turnover': 33241975490, 'homeNotional': 10123.993025450687, 'foreignNotional': 3516134.7071606675}] 2020-10-04 11:00:20 INFO: prepare candles [CandleItem(low=348.5, high=350.3, open=349.7, close=348.8, color='RED'), CandleItem(low=346.8, high=350.7, open=346.8, close=349.7, color='GREEN'), CandleItem(low=346.8, high=347.65, open=347.3, close=346.8, color='RED')] 2020-10-04 11:00:20 INFO: skip by colors first_candle=CandleItem(low=346.8, high=347.65, open=347.3, close=346.8, color='RED') second_candle=CandleItem(low=346.8, high=350.7, open=346.8, close=349.7, color='GREEN') last_candle=CandleItem(low=348.5, high=350.3, open=349.7, close=348.8, color='RED') 2020-10-04 11:00:20 INFO: check need new order None 2020-10-04 11:00:20 INFO: init new order end 2020-10-04 11:00:20 INFO: 2020-10-04 11:00:20 INFO: 2020-10-04 11:00:20 INFO: 2020-10-04 11:00:20 INFO: 2020-10-04 11:02:00 INFO: 2020-10-04 11:02:00 INFO: 2020-10-04 11:02:00 INFO: 2020-10-04 11:02:00 INFO: 2020-10-04 11:02:00 INFO: clearing start 2020-10-04 11:02:00 INFO: clearing end 2020-10-04 11:02:00 INFO: 2020-10-04 11:02:00 INFO: 2020-10-04 11:02:00 INFO: 2020-10-04 11:02:00 INFO: 2020-10-04 12:00:20 INFO: 2020-10-04 12:00:20 INFO: 2020-10-04 12:00:20 INFO: 2020-10-04 12:00:20 INFO: 2020-10-04 12:00:20 INFO: init new order start 2020-10-04 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 4, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.8, 'high': 349.6, 'low': 347.75, 'close': 348.0, 'trades': 1484, 'volume': 933878, 'vwap': 348.69, 'lastSize': 3579, 'turnover': 32562826920, 'homeNotional': 9908.083916281783, 'foreignNotional': 3454793.38464807}, {'timestamp': datetime.datetime(2020, 10, 4, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.7, 'high': 350.3, 'low': 348.5, 'close': 348.8, 'trades': 1818, 'volume': 1111594, 'vwap': 349.1, 'lastSize': 11, 'turnover': 38804927680, 'homeNotional': 11802.016924891244, 'foreignNotional': 4119998.577690862}, {'timestamp': datetime.datetime(2020, 10, 4, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.8, 'high': 350.7, 'low': 346.8, 'close': 349.7, 'trades': 3648, 'volume': 2369773, 'vwap': 349.15, 'lastSize': 100, 'turnover': 82738712290, 'homeNotional': 25112.21262153862, 'foreignNotional': 8767751.44232187}] 2020-10-04 12:00:20 INFO: prepare candles [CandleItem(low=347.75, high=349.6, open=348.8, close=348.0, color='RED'), CandleItem(low=348.5, high=350.3, open=349.7, close=348.8, color='RED'), CandleItem(low=346.8, high=350.7, open=346.8, close=349.7, color='GREEN')] 2020-10-04 12:00:20 INFO: skip by colors first_candle=CandleItem(low=346.8, high=350.7, open=346.8, close=349.7, color='GREEN') second_candle=CandleItem(low=348.5, high=350.3, open=349.7, close=348.8, color='RED') last_candle=CandleItem(low=347.75, high=349.6, open=348.8, close=348.0, color='RED') 2020-10-04 12:00:20 INFO: check need new order None 2020-10-04 12:00:20 INFO: init new order end 2020-10-04 12:00:20 INFO: 2020-10-04 12:00:20 INFO: 2020-10-04 12:00:20 INFO: 2020-10-04 12:00:20 INFO: 2020-10-04 12:02:00 INFO: 2020-10-04 12:02:00 INFO: 2020-10-04 12:02:00 INFO: 2020-10-04 12:02:00 INFO: 2020-10-04 12:02:00 INFO: clearing start 2020-10-04 12:02:00 INFO: clearing end 2020-10-04 12:02:00 INFO: 2020-10-04 12:02:00 INFO: 2020-10-04 12:02:00 INFO: 2020-10-04 12:02:00 INFO: 2020-10-04 13:00:20 INFO: 2020-10-04 13:00:20 INFO: 2020-10-04 13:00:20 INFO: 2020-10-04 13:00:20 INFO: 2020-10-04 13:00:20 INFO: init new order start 2020-10-04 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 4, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.0, 'high': 348.3, 'low': 347.05, 'close': 347.55, 'trades': 1614, 'volume': 858834, 'vwap': 347.63, 'lastSize': 11, 'turnover': 29855328340, 'homeNotional': 9102.216898080904, 'foreignNotional': 3164171.1539050327}, {'timestamp': datetime.datetime(2020, 10, 4, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.8, 'high': 349.6, 'low': 347.75, 'close': 348.0, 'trades': 1484, 'volume': 933878, 'vwap': 348.69, 'lastSize': 3579, 'turnover': 32562826920, 'homeNotional': 9908.083916281783, 'foreignNotional': 3454793.38464807}, {'timestamp': datetime.datetime(2020, 10, 4, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.7, 'high': 350.3, 'low': 348.5, 'close': 348.8, 'trades': 1818, 'volume': 1111594, 'vwap': 349.1, 'lastSize': 11, 'turnover': 38804927680, 'homeNotional': 11802.016924891244, 'foreignNotional': 4119998.577690862}] 2020-10-04 13:00:20 INFO: prepare candles [CandleItem(low=347.05, high=348.3, open=348.0, close=347.55, color='RED'), CandleItem(low=347.75, high=349.6, open=348.8, close=348.0, color='RED'), CandleItem(low=348.5, high=350.3, open=349.7, close=348.8, color='RED')] 2020-10-04 13:00:20 INFO: skip by colors first_candle=CandleItem(low=348.5, high=350.3, open=349.7, close=348.8, color='RED') second_candle=CandleItem(low=347.75, high=349.6, open=348.8, close=348.0, color='RED') last_candle=CandleItem(low=347.05, high=348.3, open=348.0, close=347.55, color='RED') 2020-10-04 13:00:20 INFO: check need new order None 2020-10-04 13:00:20 INFO: init new order end 2020-10-04 13:00:20 INFO: 2020-10-04 13:00:20 INFO: 2020-10-04 13:00:20 INFO: 2020-10-04 13:00:20 INFO: 2020-10-04 13:02:00 INFO: 2020-10-04 13:02:00 INFO: 2020-10-04 13:02:00 INFO: 2020-10-04 13:02:00 INFO: 2020-10-04 13:02:00 INFO: clearing start 2020-10-04 13:02:01 INFO: clearing end 2020-10-04 13:02:01 INFO: 2020-10-04 13:02:01 INFO: 2020-10-04 13:02:01 INFO: 2020-10-04 13:02:01 INFO: 2020-10-04 14:00:20 INFO: 2020-10-04 14:00:20 INFO: 2020-10-04 14:00:20 INFO: 2020-10-04 14:00:20 INFO: 2020-10-04 14:00:20 INFO: init new order start 2020-10-04 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 4, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.55, 'high': 347.55, 'low': 345.8, 'close': 346.45, 'trades': 2784, 'volume': 1393385, 'vwap': 346.32, 'lastSize': 1, 'turnover': 48254690680, 'homeNotional': 14750.151687362588, 'foreignNotional': 5108168.739340999}, {'timestamp': datetime.datetime(2020, 10, 4, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.0, 'high': 348.3, 'low': 347.05, 'close': 347.55, 'trades': 1614, 'volume': 858834, 'vwap': 347.63, 'lastSize': 11, 'turnover': 29855328340, 'homeNotional': 9102.216898080904, 'foreignNotional': 3164171.1539050327}, {'timestamp': datetime.datetime(2020, 10, 4, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.8, 'high': 349.6, 'low': 347.75, 'close': 348.0, 'trades': 1484, 'volume': 933878, 'vwap': 348.69, 'lastSize': 3579, 'turnover': 32562826920, 'homeNotional': 9908.083916281783, 'foreignNotional': 3454793.38464807}] 2020-10-04 14:00:20 INFO: prepare candles [CandleItem(low=345.8, high=347.55, open=347.55, close=346.45, color='RED'), CandleItem(low=347.05, high=348.3, open=348.0, close=347.55, color='RED'), CandleItem(low=347.75, high=349.6, open=348.8, close=348.0, color='RED')] 2020-10-04 14:00:20 INFO: skip by colors first_candle=CandleItem(low=347.75, high=349.6, open=348.8, close=348.0, color='RED') second_candle=CandleItem(low=347.05, high=348.3, open=348.0, close=347.55, color='RED') last_candle=CandleItem(low=345.8, high=347.55, open=347.55, close=346.45, color='RED') 2020-10-04 14:00:20 INFO: check need new order None 2020-10-04 14:00:20 INFO: init new order end 2020-10-04 14:00:20 INFO: 2020-10-04 14:00:20 INFO: 2020-10-04 14:00:20 INFO: 2020-10-04 14:00:20 INFO: 2020-10-04 14:02:00 INFO: 2020-10-04 14:02:00 INFO: 2020-10-04 14:02:00 INFO: 2020-10-04 14:02:00 INFO: 2020-10-04 14:02:00 INFO: clearing start 2020-10-04 14:02:00 INFO: clearing end 2020-10-04 14:02:00 INFO: 2020-10-04 14:02:00 INFO: 2020-10-04 14:02:00 INFO: 2020-10-04 14:02:00 INFO: 2020-10-04 15:00:20 INFO: 2020-10-04 15:00:20 INFO: 2020-10-04 15:00:20 INFO: 2020-10-04 15:00:20 INFO: 2020-10-04 15:00:20 INFO: init new order start 2020-10-04 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 4, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.45, 'high': 347.95, 'low': 346.25, 'close': 347.9, 'trades': 1737, 'volume': 1145450, 'vwap': 347.1, 'lastSize': 4, 'turnover': 39758125565, 'homeNotional': 12133.570286134003, 'foreignNotional': 4211518.376121183}, {'timestamp': datetime.datetime(2020, 10, 4, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.55, 'high': 347.55, 'low': 345.8, 'close': 346.45, 'trades': 2784, 'volume': 1393385, 'vwap': 346.32, 'lastSize': 1, 'turnover': 48254690680, 'homeNotional': 14750.151687362588, 'foreignNotional': 5108168.739340999}, {'timestamp': datetime.datetime(2020, 10, 4, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.0, 'high': 348.3, 'low': 347.05, 'close': 347.55, 'trades': 1614, 'volume': 858834, 'vwap': 347.63, 'lastSize': 11, 'turnover': 29855328340, 'homeNotional': 9102.216898080904, 'foreignNotional': 3164171.1539050327}] 2020-10-04 15:00:20 INFO: prepare candles [CandleItem(low=346.25, high=347.95, open=346.45, close=347.9, color='GREEN'), CandleItem(low=345.8, high=347.55, open=347.55, close=346.45, color='RED'), CandleItem(low=347.05, high=348.3, open=348.0, close=347.55, color='RED')] 2020-10-04 15:00:20 INFO: last_candle=CandleItem(low=346.25, high=347.95, open=346.45, close=347.9, color='GREEN') 2020-10-04 15:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-04 15:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=346.25, high=347.95, open=346.45, close=347.9, color='GREEN') 2020-10-04 15:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=345.8, high=347.55, open=347.55, close=346.45, color='RED') 2020-10-04 15:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=347.05, high=348.3, open=348.0, close=347.55, color='RED') 2020-10-04 15:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=346.25, high=347.95, open=346.45, close=347.9, color='GREEN'), take_profit_factor=6.0, clearing_interval=3600) 2020-10-04 15:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=346.25, high=347.95, open=346.45, close=347.9, color='GREEN'), take_profit_factor=6.0, clearing_interval=3600) 2020-10-04 15:00:20 INFO: place order: start candle=CandleItem(low=346.25, high=347.95, open=346.45, close=347.9, color='GREEN') ticker='ETHUSD' price_offset=0.1 2020-10-04 15:00:20 INFO: place order: side_factor=-1 init_trigger_price=348.0 init_order_price=348.05 stop_price_offset=0.0 candle.size=1.6999999999999886 stop_price=346.25 take_price=358.24999999999994 2020-10-04 15:00:20 INFO: place order round: side_factor=-1 init_trigger_price=Decimal('348') init_order_price=Decimal('348.05000000000001136868377216160297393798828125') stop_price_offset=0.0 candle.size=1.6999999999999886 stop_price=Decimal('346.25') take_price=Decimal('358.24999999999994315658113919198513031005859375') 2020-10-04 15:00:20 INFO: place order: compute qty=1086 2020-10-04 15:00:20 INFO: place order: save order to db af2451ae84fa41cd9e464c5cb434ac04; response=True 2020-10-04 15:00:21 INFO: process event {'orderID': '5107de32-53e7-4f81-a08e-6e5ed9bd2dd8', 'clOrdID': 'af2451ae84fa41cd9e464c5cb434ac04', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 348.05, 'displayQty': None, 'stopPx': 348, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-10-04T12:00:21.005Z', 'timestamp': '2020-10-04T12:00:21.005Z'} 2020-10-04 15:00:21 INFO: skip event af2451ae84fa41cd9e464c5cb434ac04 New 2020-10-04 15:00:21 INFO: post order to exchange resp={'orderID': '5107de32-53e7-4f81-a08e-6e5ed9bd2dd8', 'clOrdID': 'af2451ae84fa41cd9e464c5cb434ac04', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 348.05, 'displayQty': None, 'stopPx': 348.0, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 0, 21, 5000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 0, 21, 5000, tzinfo=tzutc())} 2020-10-04 15:00:21 INFO: place new init order {'qty': 1086, 'init_price': Decimal('348'), 'stop_price': Decimal('346.25'), 'take_price': Decimal('358.24999999999994315658113919198513031005859375'), 'order_uid': 'af2451ae84fa41cd9e464c5cb434ac04', 'response': {'orderID': '5107de32-53e7-4f81-a08e-6e5ed9bd2dd8', 'clOrdID': 'af2451ae84fa41cd9e464c5cb434ac04', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 348.05, 'displayQty': None, 'stopPx': 348.0, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 0, 21, 5000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 0, 21, 5000, tzinfo=tzutc())}} 2020-10-04 15:00:21 INFO: init new order end 2020-10-04 15:00:21 INFO: 2020-10-04 15:00:21 INFO: 2020-10-04 15:00:21 INFO: 2020-10-04 15:00:21 INFO: 2020-10-04 15:02:00 INFO: 2020-10-04 15:02:00 INFO: 2020-10-04 15:02:00 INFO: 2020-10-04 15:02:00 INFO: 2020-10-04 15:02:00 INFO: clearing start 2020-10-04 15:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5107de32-53e7-4f81-a08e-6e5ed9bd2dd8', 'clOrdID': 'af2451ae84fa41cd9e464c5cb434ac04', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 348.05, 'displayQty': None, 'stopPx': 348.0, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 0, 21, 5000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 0, 21, 5000, tzinfo=tzutc())} 2020-10-04 15:02:00 INFO: order time=2020-10-04 12:00:21.005000+00:00; delta from now UTC=0:01:39.632088 time_delta.total_seconds()=99.632088; time_diff_offset='3600' 2020-10-04 15:02:00 INFO: skip by time diff 2020-10-04 12:00:21.005000+00:00 2020-10-04 15:02:00 INFO: clearing end 2020-10-04 15:02:00 INFO: 2020-10-04 15:02:00 INFO: 2020-10-04 15:02:00 INFO: 2020-10-04 15:02:00 INFO: 2020-10-04 15:58:12 INFO: process event {'orderID': '5107de32-53e7-4f81-a08e-6e5ed9bd2dd8', 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 1086, 'avgPx': 348, 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'transactTime': '2020-10-04T12:58:12.269Z', 'timestamp': '2020-10-04T12:58:12.269Z', 'clOrdID': 'af2451ae84fa41cd9e464c5cb434ac04', 'account': 605536, 'symbol': 'ETHUSD'} 2020-10-04 15:58:12 INFO: add new event={'uid': 'af2451ae84fa41cd9e464c5cb434ac04', 'status': 'Filled'} 2020-10-04 15:58:12 INFO: 2020-10-04 15:58:12 INFO: 2020-10-04 15:58:12 INFO: 2020-10-04 15:58:12 INFO: 2020-10-04 15:58:12 INFO: process event start 2020-10-04 15:58:12 INFO: fetch new order event af2451ae84fa41cd9e464c5cb434ac04 2020-10-04 15:58:12 INFO: fetch orders by event init={'stop': '346.25', 'take': '358.24999999999994315658113919198513031005859375', 'qty': '1086', 'color': 'GREEN', 'ticker': 'ETHUSD', 'clearing_offset': '3600'} profit_pair=None 2020-10-04 15:58:12 INFO: process init order filled 2020-10-04 15:58:12 INFO: save profit orders to storage stop=0e3c8fd50fda4d5cbe3957ec2e64e0d3 take=574d2341155840dea12e4bdc51049805 2020-10-04 15:58:12 INFO: place profit orders take_price=358.24999999999994315658113919198513031005859375, stop_price=346.25, qty=1086, color=GREEN, ticker=ETHUSD 0e3c8fd50fda4d5cbe3957ec2e64e0d3 574d2341155840dea12e4bdc51049805 2020-10-04 15:58:12 INFO: place stop order ETHUSD: qty=-1086, stop_price=346.25, stop_uid=0e3c8fd50fda4d5cbe3957ec2e64e0d3 2020-10-04 15:58:13 INFO: process event {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': '2020-10-04T12:58:13.065Z', 'timestamp': '2020-10-04T12:58:13.065Z'} 2020-10-04 15:58:13 INFO: skip event 0e3c8fd50fda4d5cbe3957ec2e64e0d3 New 2020-10-04 15:58:13 INFO: exchange resp for stop order={'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-04 15:58:13 INFO: place limit order ETHUSD: qty=-1086, price=358.24999999999994315658113919198513031005859375, take_uid=574d2341155840dea12e4bdc51049805 2020-10-04 15:58:13 INFO: process event {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': '2020-10-04T12:58:13.100Z', 'timestamp': '2020-10-04T12:58:13.100Z'} 2020-10-04 15:58:13 INFO: skip event 574d2341155840dea12e4bdc51049805 New 2020-10-04 15:58:13 INFO: exchange resp for take profit order={'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-04 15:58:13 INFO: place profit orders={'stop': {'response': {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())}, 'qty': Decimal('-1086'), 'uid': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'price': Decimal('346.25')}, 'take': {'response': {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())}, 'qty': Decimal('-1086'), 'uid': '574d2341155840dea12e4bdc51049805', 'price': Decimal('358.24999999999994315658113919198513031005859375')}} 2020-10-04 15:58:13 INFO: rm init order from db af2451ae84fa41cd9e464c5cb434ac04 2020-10-04 15:58:13 INFO: end process event_processing_result='proceed init order' 2020-10-04 15:58:13 INFO: 2020-10-04 15:58:13 INFO: 2020-10-04 15:58:13 INFO: 2020-10-04 15:58:13 INFO: 2020-10-04 16:00:20 INFO: 2020-10-04 16:00:20 INFO: 2020-10-04 16:00:20 INFO: 2020-10-04 16:00:20 INFO: 2020-10-04 16:00:20 INFO: init new order start 2020-10-04 16:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 4, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.9, 'high': 348.4, 'low': 345.0, 'close': 348.35, 'trades': 3549, 'volume': 2487309, 'vwap': 346.6, 'lastSize': 12, 'turnover': 86210024750, 'homeNotional': 26356.123963937098, 'foreignNotional': 9135041.332524987}, {'timestamp': datetime.datetime(2020, 10, 4, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.45, 'high': 347.95, 'low': 346.25, 'close': 347.9, 'trades': 1737, 'volume': 1145450, 'vwap': 347.1, 'lastSize': 4, 'turnover': 39758125565, 'homeNotional': 12133.570286134003, 'foreignNotional': 4211518.376121183}, {'timestamp': datetime.datetime(2020, 10, 4, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.55, 'high': 347.55, 'low': 345.8, 'close': 346.45, 'trades': 2784, 'volume': 1393385, 'vwap': 346.32, 'lastSize': 1, 'turnover': 48254690680, 'homeNotional': 14750.151687362588, 'foreignNotional': 5108168.739340999}] 2020-10-04 16:00:21 INFO: prepare candles [CandleItem(low=345.0, high=348.4, open=347.9, close=348.35, color='GREEN'), CandleItem(low=346.25, high=347.95, open=346.45, close=347.9, color='GREEN'), CandleItem(low=345.8, high=347.55, open=347.55, close=346.45, color='RED')] 2020-10-04 16:00:21 INFO: skip by colors first_candle=CandleItem(low=345.8, high=347.55, open=347.55, close=346.45, color='RED') second_candle=CandleItem(low=346.25, high=347.95, open=346.45, close=347.9, color='GREEN') last_candle=CandleItem(low=345.0, high=348.4, open=347.9, close=348.35, color='GREEN') 2020-10-04 16:00:21 INFO: check need new order None 2020-10-04 16:00:21 INFO: init new order end 2020-10-04 16:00:21 INFO: 2020-10-04 16:00:21 INFO: 2020-10-04 16:00:21 INFO: 2020-10-04 16:00:21 INFO: 2020-10-04 16:02:00 INFO: 2020-10-04 16:02:00 INFO: 2020-10-04 16:02:00 INFO: 2020-10-04 16:02:00 INFO: 2020-10-04 16:02:00 INFO: clearing start 2020-10-04 16:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-04 16:02:00 INFO: skip by not found init order into storage 2020-10-04 16:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-04 16:02:00 INFO: skip by not found init order into storage 2020-10-04 16:02:00 INFO: clearing end 2020-10-04 16:02:00 INFO: 2020-10-04 16:02:00 INFO: 2020-10-04 16:02:00 INFO: 2020-10-04 16:02:00 INFO: 2020-10-04 17:00:20 INFO: 2020-10-04 17:00:20 INFO: 2020-10-04 17:00:20 INFO: 2020-10-04 17:00:20 INFO: 2020-10-04 17:00:20 INFO: init new order start 2020-10-04 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 4, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.35, 'high': 350.25, 'low': 348.0, 'close': 348.3, 'trades': 3830, 'volume': 2396020, 'vwap': 349.21, 'lastSize': 500, 'turnover': 83671375160, 'homeNotional': 25431.628290060955, 'foreignNotional': 8880979.7220207}, {'timestamp': datetime.datetime(2020, 10, 4, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.9, 'high': 348.4, 'low': 345.0, 'close': 348.35, 'trades': 3549, 'volume': 2487309, 'vwap': 346.6, 'lastSize': 12, 'turnover': 86210024750, 'homeNotional': 26356.123963937098, 'foreignNotional': 9135041.332524987}, {'timestamp': datetime.datetime(2020, 10, 4, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.45, 'high': 347.95, 'low': 346.25, 'close': 347.9, 'trades': 1737, 'volume': 1145450, 'vwap': 347.1, 'lastSize': 4, 'turnover': 39758125565, 'homeNotional': 12133.570286134003, 'foreignNotional': 4211518.376121183}] 2020-10-04 17:00:20 INFO: prepare candles [CandleItem(low=348.0, high=350.25, open=348.35, close=348.3, color='RED'), CandleItem(low=345.0, high=348.4, open=347.9, close=348.35, color='GREEN'), CandleItem(low=346.25, high=347.95, open=346.45, close=347.9, color='GREEN')] 2020-10-04 17:00:20 INFO: last_candle=CandleItem(low=348.0, high=350.25, open=348.35, close=348.3, color='RED') 2020-10-04 17:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-04 17:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=348.0, high=350.25, open=348.35, close=348.3, color='RED') 2020-10-04 17:00:20 INFO: skip by CandleItem(low=348.0, high=350.25, open=348.35, close=348.3, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-04 17:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-04 17:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=348.0, high=350.25, open=348.35, close=348.3, color='RED') 2020-10-04 17:00:20 INFO: skip by CandleItem(low=348.0, high=350.25, open=348.35, close=348.3, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-04 17:00:20 INFO: not found applicable config for candle 2020-10-04 17:00:20 INFO: check need new order None 2020-10-04 17:00:20 INFO: init new order end 2020-10-04 17:00:20 INFO: 2020-10-04 17:00:20 INFO: 2020-10-04 17:00:20 INFO: 2020-10-04 17:00:20 INFO: 2020-10-04 17:02:00 INFO: 2020-10-04 17:02:00 INFO: 2020-10-04 17:02:00 INFO: 2020-10-04 17:02:00 INFO: 2020-10-04 17:02:00 INFO: clearing start 2020-10-04 17:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-04 17:02:00 INFO: skip by not found init order into storage 2020-10-04 17:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-04 17:02:00 INFO: skip by not found init order into storage 2020-10-04 17:02:00 INFO: clearing end 2020-10-04 17:02:00 INFO: 2020-10-04 17:02:00 INFO: 2020-10-04 17:02:00 INFO: 2020-10-04 17:02:00 INFO: 2020-10-04 18:00:20 INFO: 2020-10-04 18:00:20 INFO: 2020-10-04 18:00:20 INFO: 2020-10-04 18:00:20 INFO: 2020-10-04 18:00:20 INFO: init new order start 2020-10-04 18:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 4, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.3, 'high': 348.8, 'low': 347.45, 'close': 347.65, 'trades': 1757, 'volume': 1402067, 'vwap': 348.06, 'lastSize': 1, 'turnover': 48799435545, 'homeNotional': 14870.489118554306, 'foreignNotional': 5175728.2223455515}, {'timestamp': datetime.datetime(2020, 10, 4, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.35, 'high': 350.25, 'low': 348.0, 'close': 348.3, 'trades': 3830, 'volume': 2396020, 'vwap': 349.21, 'lastSize': 500, 'turnover': 83671375160, 'homeNotional': 25431.628290060955, 'foreignNotional': 8880979.7220207}, {'timestamp': datetime.datetime(2020, 10, 4, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.9, 'high': 348.4, 'low': 345.0, 'close': 348.35, 'trades': 3549, 'volume': 2487309, 'vwap': 346.6, 'lastSize': 12, 'turnover': 86210024750, 'homeNotional': 26356.123963937098, 'foreignNotional': 9135041.332524987}] 2020-10-04 18:00:21 INFO: prepare candles [CandleItem(low=347.45, high=348.8, open=348.3, close=347.65, color='RED'), CandleItem(low=348.0, high=350.25, open=348.35, close=348.3, color='RED'), CandleItem(low=345.0, high=348.4, open=347.9, close=348.35, color='GREEN')] 2020-10-04 18:00:21 INFO: skip by colors first_candle=CandleItem(low=345.0, high=348.4, open=347.9, close=348.35, color='GREEN') second_candle=CandleItem(low=348.0, high=350.25, open=348.35, close=348.3, color='RED') last_candle=CandleItem(low=347.45, high=348.8, open=348.3, close=347.65, color='RED') 2020-10-04 18:00:21 INFO: check need new order None 2020-10-04 18:00:21 INFO: init new order end 2020-10-04 18:00:21 INFO: 2020-10-04 18:00:21 INFO: 2020-10-04 18:00:21 INFO: 2020-10-04 18:00:21 INFO: 2020-10-04 18:02:00 INFO: 2020-10-04 18:02:00 INFO: 2020-10-04 18:02:00 INFO: 2020-10-04 18:02:00 INFO: 2020-10-04 18:02:00 INFO: clearing start 2020-10-04 18:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-04 18:02:00 INFO: skip by not found init order into storage 2020-10-04 18:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-04 18:02:00 INFO: skip by not found init order into storage 2020-10-04 18:02:00 INFO: clearing end 2020-10-04 18:02:00 INFO: 2020-10-04 18:02:00 INFO: 2020-10-04 18:02:00 INFO: 2020-10-04 18:02:00 INFO: 2020-10-04 19:00:20 INFO: 2020-10-04 19:00:20 INFO: 2020-10-04 19:00:20 INFO: 2020-10-04 19:00:20 INFO: 2020-10-04 19:00:20 INFO: init new order start 2020-10-04 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 4, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.65, 'high': 348.3, 'low': 346.8, 'close': 347.4, 'trades': 1425, 'volume': 1142697, 'vwap': 347.57, 'lastSize': 546, 'turnover': 39716321095, 'homeNotional': 12119.090111290268, 'foreignNotional': 4212190.754080771}, {'timestamp': datetime.datetime(2020, 10, 4, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.3, 'high': 348.8, 'low': 347.45, 'close': 347.65, 'trades': 1757, 'volume': 1402067, 'vwap': 348.06, 'lastSize': 1, 'turnover': 48799435545, 'homeNotional': 14870.489118554306, 'foreignNotional': 5175728.2223455515}, {'timestamp': datetime.datetime(2020, 10, 4, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.35, 'high': 350.25, 'low': 348.0, 'close': 348.3, 'trades': 3830, 'volume': 2396020, 'vwap': 349.21, 'lastSize': 500, 'turnover': 83671375160, 'homeNotional': 25431.628290060955, 'foreignNotional': 8880979.7220207}] 2020-10-04 19:00:20 INFO: prepare candles [CandleItem(low=346.8, high=348.3, open=347.65, close=347.4, color='RED'), CandleItem(low=347.45, high=348.8, open=348.3, close=347.65, color='RED'), CandleItem(low=348.0, high=350.25, open=348.35, close=348.3, color='RED')] 2020-10-04 19:00:20 INFO: skip by colors first_candle=CandleItem(low=348.0, high=350.25, open=348.35, close=348.3, color='RED') second_candle=CandleItem(low=347.45, high=348.8, open=348.3, close=347.65, color='RED') last_candle=CandleItem(low=346.8, high=348.3, open=347.65, close=347.4, color='RED') 2020-10-04 19:00:20 INFO: check need new order None 2020-10-04 19:00:20 INFO: init new order end 2020-10-04 19:00:20 INFO: 2020-10-04 19:00:20 INFO: 2020-10-04 19:00:20 INFO: 2020-10-04 19:00:20 INFO: 2020-10-04 19:02:00 INFO: 2020-10-04 19:02:00 INFO: 2020-10-04 19:02:00 INFO: 2020-10-04 19:02:00 INFO: 2020-10-04 19:02:00 INFO: clearing start 2020-10-04 19:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-04 19:02:00 INFO: skip by not found init order into storage 2020-10-04 19:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-04 19:02:00 INFO: skip by not found init order into storage 2020-10-04 19:02:00 INFO: clearing end 2020-10-04 19:02:00 INFO: 2020-10-04 19:02:00 INFO: 2020-10-04 19:02:00 INFO: 2020-10-04 19:02:00 INFO: 2020-10-04 20:00:20 INFO: 2020-10-04 20:00:20 INFO: 2020-10-04 20:00:20 INFO: 2020-10-04 20:00:20 INFO: 2020-10-04 20:00:20 INFO: init new order start 2020-10-04 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 4, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.4, 'high': 348.25, 'low': 347.05, 'close': 348.1, 'trades': 1604, 'volume': 1114030, 'vwap': 347.92, 'lastSize': 11, 'turnover': 38758424695, 'homeNotional': 11812.84622927328, 'foreignNotional': 4109830.105999726}, {'timestamp': datetime.datetime(2020, 10, 4, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.65, 'high': 348.3, 'low': 346.8, 'close': 347.4, 'trades': 1425, 'volume': 1142697, 'vwap': 347.57, 'lastSize': 546, 'turnover': 39716321095, 'homeNotional': 12119.090111290268, 'foreignNotional': 4212190.754080771}, {'timestamp': datetime.datetime(2020, 10, 4, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.3, 'high': 348.8, 'low': 347.45, 'close': 347.65, 'trades': 1757, 'volume': 1402067, 'vwap': 348.06, 'lastSize': 1, 'turnover': 48799435545, 'homeNotional': 14870.489118554306, 'foreignNotional': 5175728.2223455515}] 2020-10-04 20:00:20 INFO: prepare candles [CandleItem(low=347.05, high=348.25, open=347.4, close=348.1, color='GREEN'), CandleItem(low=346.8, high=348.3, open=347.65, close=347.4, color='RED'), CandleItem(low=347.45, high=348.8, open=348.3, close=347.65, color='RED')] 2020-10-04 20:00:20 INFO: last_candle=CandleItem(low=347.05, high=348.25, open=347.4, close=348.1, color='GREEN') 2020-10-04 20:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-04 20:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=347.05, high=348.25, open=347.4, close=348.1, color='GREEN') 2020-10-04 20:00:20 INFO: skip by CandleItem(low=347.05, high=348.25, open=347.4, close=348.1, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-04 20:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-04 20:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=347.05, high=348.25, open=347.4, close=348.1, color='GREEN') 2020-10-04 20:00:20 INFO: skip by CandleItem(low=347.05, high=348.25, open=347.4, close=348.1, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-04 20:00:20 INFO: not found applicable config for candle 2020-10-04 20:00:20 INFO: check need new order None 2020-10-04 20:00:20 INFO: init new order end 2020-10-04 20:00:20 INFO: 2020-10-04 20:00:20 INFO: 2020-10-04 20:00:20 INFO: 2020-10-04 20:00:20 INFO: 2020-10-04 20:02:00 INFO: 2020-10-04 20:02:00 INFO: 2020-10-04 20:02:00 INFO: 2020-10-04 20:02:00 INFO: 2020-10-04 20:02:00 INFO: clearing start 2020-10-04 20:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-04 20:02:00 INFO: skip by not found init order into storage 2020-10-04 20:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-04 20:02:00 INFO: skip by not found init order into storage 2020-10-04 20:02:00 INFO: clearing end 2020-10-04 20:02:00 INFO: 2020-10-04 20:02:00 INFO: 2020-10-04 20:02:00 INFO: 2020-10-04 20:02:00 INFO: 2020-10-04 21:00:20 INFO: 2020-10-04 21:00:20 INFO: 2020-10-04 21:00:20 INFO: 2020-10-04 21:00:20 INFO: 2020-10-04 21:00:20 INFO: init new order start 2020-10-04 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 4, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.1, 'high': 348.75, 'low': 347.75, 'close': 348.5, 'trades': 1496, 'volume': 971032, 'vwap': 348.23, 'lastSize': 1646, 'turnover': 33813411410, 'homeNotional': 10298.822496622675, 'foreignNotional': 3586270.7539780135}, {'timestamp': datetime.datetime(2020, 10, 4, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.4, 'high': 348.25, 'low': 347.05, 'close': 348.1, 'trades': 1604, 'volume': 1114030, 'vwap': 347.92, 'lastSize': 11, 'turnover': 38758424695, 'homeNotional': 11812.84622927328, 'foreignNotional': 4109830.105999726}, {'timestamp': datetime.datetime(2020, 10, 4, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.65, 'high': 348.3, 'low': 346.8, 'close': 347.4, 'trades': 1425, 'volume': 1142697, 'vwap': 347.57, 'lastSize': 546, 'turnover': 39716321095, 'homeNotional': 12119.090111290268, 'foreignNotional': 4212190.754080771}] 2020-10-04 21:00:20 INFO: prepare candles [CandleItem(low=347.75, high=348.75, open=348.1, close=348.5, color='GREEN'), CandleItem(low=347.05, high=348.25, open=347.4, close=348.1, color='GREEN'), CandleItem(low=346.8, high=348.3, open=347.65, close=347.4, color='RED')] 2020-10-04 21:00:20 INFO: skip by colors first_candle=CandleItem(low=346.8, high=348.3, open=347.65, close=347.4, color='RED') second_candle=CandleItem(low=347.05, high=348.25, open=347.4, close=348.1, color='GREEN') last_candle=CandleItem(low=347.75, high=348.75, open=348.1, close=348.5, color='GREEN') 2020-10-04 21:00:20 INFO: check need new order None 2020-10-04 21:00:20 INFO: init new order end 2020-10-04 21:00:20 INFO: 2020-10-04 21:00:20 INFO: 2020-10-04 21:00:20 INFO: 2020-10-04 21:00:20 INFO: 2020-10-04 21:02:00 INFO: 2020-10-04 21:02:00 INFO: 2020-10-04 21:02:00 INFO: 2020-10-04 21:02:00 INFO: 2020-10-04 21:02:00 INFO: clearing start 2020-10-04 21:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-04 21:02:00 INFO: skip by not found init order into storage 2020-10-04 21:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-04 21:02:00 INFO: skip by not found init order into storage 2020-10-04 21:02:00 INFO: clearing end 2020-10-04 21:02:00 INFO: 2020-10-04 21:02:00 INFO: 2020-10-04 21:02:00 INFO: 2020-10-04 21:02:00 INFO: 2020-10-04 22:00:20 INFO: 2020-10-04 22:00:20 INFO: 2020-10-04 22:00:20 INFO: 2020-10-04 22:00:20 INFO: 2020-10-04 22:00:20 INFO: init new order start 2020-10-04 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 4, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.5, 'high': 352.8, 'low': 348.55, 'close': 351.75, 'trades': 6169, 'volume': 3432386, 'vwap': 351.59, 'lastSize': 746, 'turnover': 120678470800, 'homeNotional': 36500.47954043867, 'foreignNotional': 12833139.393469112}, {'timestamp': datetime.datetime(2020, 10, 4, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.1, 'high': 348.75, 'low': 347.75, 'close': 348.5, 'trades': 1496, 'volume': 971032, 'vwap': 348.23, 'lastSize': 1646, 'turnover': 33813411410, 'homeNotional': 10298.822496622675, 'foreignNotional': 3586270.7539780135}, {'timestamp': datetime.datetime(2020, 10, 4, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.4, 'high': 348.25, 'low': 347.05, 'close': 348.1, 'trades': 1604, 'volume': 1114030, 'vwap': 347.92, 'lastSize': 11, 'turnover': 38758424695, 'homeNotional': 11812.84622927328, 'foreignNotional': 4109830.105999726}] 2020-10-04 22:00:20 INFO: prepare candles [CandleItem(low=348.55, high=352.8, open=348.5, close=351.75, color='GREEN'), CandleItem(low=347.75, high=348.75, open=348.1, close=348.5, color='GREEN'), CandleItem(low=347.05, high=348.25, open=347.4, close=348.1, color='GREEN')] 2020-10-04 22:00:20 INFO: skip by colors first_candle=CandleItem(low=347.05, high=348.25, open=347.4, close=348.1, color='GREEN') second_candle=CandleItem(low=347.75, high=348.75, open=348.1, close=348.5, color='GREEN') last_candle=CandleItem(low=348.55, high=352.8, open=348.5, close=351.75, color='GREEN') 2020-10-04 22:00:20 INFO: check need new order None 2020-10-04 22:00:20 INFO: init new order end 2020-10-04 22:00:20 INFO: 2020-10-04 22:00:20 INFO: 2020-10-04 22:00:20 INFO: 2020-10-04 22:00:20 INFO: 2020-10-04 22:02:00 INFO: 2020-10-04 22:02:00 INFO: 2020-10-04 22:02:00 INFO: 2020-10-04 22:02:00 INFO: 2020-10-04 22:02:00 INFO: clearing start 2020-10-04 22:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-04 22:02:00 INFO: skip by not found init order into storage 2020-10-04 22:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-04 22:02:00 INFO: skip by not found init order into storage 2020-10-04 22:02:00 INFO: clearing end 2020-10-04 22:02:00 INFO: 2020-10-04 22:02:00 INFO: 2020-10-04 22:02:00 INFO: 2020-10-04 22:02:00 INFO: 2020-10-04 23:00:20 INFO: 2020-10-04 23:00:20 INFO: 2020-10-04 23:00:20 INFO: 2020-10-04 23:00:20 INFO: 2020-10-04 23:00:20 INFO: init new order start 2020-10-04 23:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 4, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.75, 'high': 354.6, 'low': 351.8, 'close': 353.5, 'trades': 4864, 'volume': 2636280, 'vwap': 352.95, 'lastSize': 500, 'turnover': 93046351570, 'homeNotional': 28137.701229251743, 'foreignNotional': 9931096.156695038}, {'timestamp': datetime.datetime(2020, 10, 4, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.5, 'high': 352.8, 'low': 348.55, 'close': 351.75, 'trades': 6169, 'volume': 3432386, 'vwap': 351.59, 'lastSize': 746, 'turnover': 120678470800, 'homeNotional': 36500.47954043867, 'foreignNotional': 12833139.393469112}, {'timestamp': datetime.datetime(2020, 10, 4, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.1, 'high': 348.75, 'low': 347.75, 'close': 348.5, 'trades': 1496, 'volume': 971032, 'vwap': 348.23, 'lastSize': 1646, 'turnover': 33813411410, 'homeNotional': 10298.822496622675, 'foreignNotional': 3586270.7539780135}] 2020-10-04 23:00:20 INFO: prepare candles [CandleItem(low=351.8, high=354.6, open=351.75, close=353.5, color='GREEN'), CandleItem(low=348.55, high=352.8, open=348.5, close=351.75, color='GREEN'), CandleItem(low=347.75, high=348.75, open=348.1, close=348.5, color='GREEN')] 2020-10-04 23:00:20 INFO: skip by colors first_candle=CandleItem(low=347.75, high=348.75, open=348.1, close=348.5, color='GREEN') second_candle=CandleItem(low=348.55, high=352.8, open=348.5, close=351.75, color='GREEN') last_candle=CandleItem(low=351.8, high=354.6, open=351.75, close=353.5, color='GREEN') 2020-10-04 23:00:20 INFO: check need new order None 2020-10-04 23:00:20 INFO: init new order end 2020-10-04 23:00:20 INFO: 2020-10-04 23:00:20 INFO: 2020-10-04 23:00:20 INFO: 2020-10-04 23:00:20 INFO: 2020-10-04 23:02:00 INFO: 2020-10-04 23:02:00 INFO: 2020-10-04 23:02:00 INFO: 2020-10-04 23:02:00 INFO: 2020-10-04 23:02:00 INFO: clearing start 2020-10-04 23:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-04 23:02:00 INFO: skip by not found init order into storage 2020-10-04 23:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-04 23:02:00 INFO: skip by not found init order into storage 2020-10-04 23:02:00 INFO: clearing end 2020-10-04 23:02:00 INFO: 2020-10-04 23:02:00 INFO: 2020-10-04 23:02:00 INFO: 2020-10-04 23:02:00 INFO: 2020-10-05 00:00:20 INFO: 2020-10-05 00:00:20 INFO: 2020-10-05 00:00:20 INFO: 2020-10-05 00:00:20 INFO: 2020-10-05 00:00:20 INFO: init new order start 2020-10-05 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 4, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.5, 'high': 355.25, 'low': 352.0, 'close': 352.05, 'trades': 3603, 'volume': 1791440, 'vwap': 353.72, 'lastSize': 20, 'turnover': 63366032600, 'homeNotional': 19129.110604927257, 'foreignNotional': 6766279.159061653}, {'timestamp': datetime.datetime(2020, 10, 4, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.75, 'high': 354.6, 'low': 351.8, 'close': 353.5, 'trades': 4864, 'volume': 2636280, 'vwap': 352.95, 'lastSize': 500, 'turnover': 93046351570, 'homeNotional': 28137.701229251743, 'foreignNotional': 9931096.156695038}, {'timestamp': datetime.datetime(2020, 10, 4, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.5, 'high': 352.8, 'low': 348.55, 'close': 351.75, 'trades': 6169, 'volume': 3432386, 'vwap': 351.59, 'lastSize': 746, 'turnover': 120678470800, 'homeNotional': 36500.47954043867, 'foreignNotional': 12833139.393469112}] 2020-10-05 00:00:20 INFO: prepare candles [CandleItem(low=352.0, high=355.25, open=353.5, close=352.05, color='RED'), CandleItem(low=351.8, high=354.6, open=351.75, close=353.5, color='GREEN'), CandleItem(low=348.55, high=352.8, open=348.5, close=351.75, color='GREEN')] 2020-10-05 00:00:20 INFO: last_candle=CandleItem(low=352.0, high=355.25, open=353.5, close=352.05, color='RED') 2020-10-05 00:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-05 00:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=352.0, high=355.25, open=353.5, close=352.05, color='RED') 2020-10-05 00:00:20 INFO: skip by CandleItem(low=352.0, high=355.25, open=353.5, close=352.05, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-05 00:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-05 00:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=352.0, high=355.25, open=353.5, close=352.05, color='RED') 2020-10-05 00:00:20 INFO: skip by CandleItem(low=352.0, high=355.25, open=353.5, close=352.05, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-05 00:00:20 INFO: not found applicable config for candle 2020-10-05 00:00:20 INFO: check need new order None 2020-10-05 00:00:20 INFO: init new order end 2020-10-05 00:00:20 INFO: 2020-10-05 00:00:20 INFO: 2020-10-05 00:00:20 INFO: 2020-10-05 00:00:20 INFO: 2020-10-05 00:02:00 INFO: 2020-10-05 00:02:00 INFO: 2020-10-05 00:02:00 INFO: 2020-10-05 00:02:00 INFO: 2020-10-05 00:02:00 INFO: clearing start 2020-10-05 00:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-05 00:02:00 INFO: skip by not found init order into storage 2020-10-05 00:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-05 00:02:00 INFO: skip by not found init order into storage 2020-10-05 00:02:00 INFO: clearing end 2020-10-05 00:02:00 INFO: 2020-10-05 00:02:00 INFO: 2020-10-05 00:02:00 INFO: 2020-10-05 00:02:00 INFO: 2020-10-05 01:00:24 INFO: 2020-10-05 01:00:54 INFO: 2020-10-05 01:00:56 INFO: 2020-10-05 01:00:56 INFO: 2020-10-05 01:00:56 INFO: init new order start 2020-10-05 01:00:57 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 4, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.05, 'high': 352.95, 'low': 352.05, 'close': 352.05, 'trades': 1137, 'volume': 854254, 'vwap': 352.56, 'lastSize': 1000, 'turnover': 30117554185, 'homeNotional': 9106.737423970508, 'foreignNotional': 3210668.651695191}, {'timestamp': datetime.datetime(2020, 10, 4, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.5, 'high': 355.25, 'low': 352.0, 'close': 352.05, 'trades': 3603, 'volume': 1791440, 'vwap': 353.72, 'lastSize': 20, 'turnover': 63366032600, 'homeNotional': 19129.110604927257, 'foreignNotional': 6766279.159061653}, {'timestamp': datetime.datetime(2020, 10, 4, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.75, 'high': 354.6, 'low': 351.8, 'close': 353.5, 'trades': 4864, 'volume': 2636280, 'vwap': 352.95, 'lastSize': 500, 'turnover': 93046351570, 'homeNotional': 28137.701229251743, 'foreignNotional': 9931096.156695038}] 2020-10-05 01:00:57 INFO: skip by found empty buckets 2020-10-05 01:00:57 INFO: check need new order None 2020-10-05 01:00:57 INFO: init new order end 2020-10-05 01:00:57 INFO: 2020-10-05 01:00:57 INFO: 2020-10-05 01:00:57 INFO: 2020-10-05 01:00:57 INFO: 2020-10-05 01:02:00 INFO: 2020-10-05 01:02:00 INFO: 2020-10-05 01:02:00 INFO: 2020-10-05 01:02:00 INFO: 2020-10-05 01:02:00 INFO: clearing start 2020-10-05 01:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-05 01:02:00 INFO: skip by not found init order into storage 2020-10-05 01:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-05 01:02:00 INFO: skip by not found init order into storage 2020-10-05 01:02:00 INFO: clearing end 2020-10-05 01:02:00 INFO: 2020-10-05 01:02:00 INFO: 2020-10-05 01:02:00 INFO: 2020-10-05 01:02:00 INFO: 2020-10-05 02:00:20 INFO: 2020-10-05 02:00:20 INFO: 2020-10-05 02:00:20 INFO: 2020-10-05 02:00:20 INFO: 2020-10-05 02:00:20 INFO: init new order start 2020-10-05 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 4, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.05, 'high': 353.1, 'low': 351.75, 'close': 352.2, 'trades': 2446, 'volume': 1531157, 'vwap': 352.31, 'lastSize': 28, 'turnover': 53942670560, 'homeNotional': 16322.99474968534, 'foreignNotional': 5750598.271003567}, {'timestamp': datetime.datetime(2020, 10, 4, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.05, 'high': 352.95, 'low': 352.05, 'close': 352.05, 'trades': 1137, 'volume': 854254, 'vwap': 352.56, 'lastSize': 1000, 'turnover': 30117554185, 'homeNotional': 9106.737423970508, 'foreignNotional': 3210668.651695191}, {'timestamp': datetime.datetime(2020, 10, 4, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.5, 'high': 355.25, 'low': 352.0, 'close': 352.05, 'trades': 3603, 'volume': 1791440, 'vwap': 353.72, 'lastSize': 20, 'turnover': 63366032600, 'homeNotional': 19129.110604927257, 'foreignNotional': 6766279.159061653}] 2020-10-05 02:00:20 INFO: skip by found empty buckets 2020-10-05 02:00:20 INFO: check need new order None 2020-10-05 02:00:20 INFO: init new order end 2020-10-05 02:00:20 INFO: 2020-10-05 02:00:20 INFO: 2020-10-05 02:00:20 INFO: 2020-10-05 02:00:20 INFO: 2020-10-05 02:02:00 INFO: 2020-10-05 02:02:00 INFO: 2020-10-05 02:02:00 INFO: 2020-10-05 02:02:00 INFO: 2020-10-05 02:02:00 INFO: clearing start 2020-10-05 02:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-05 02:02:00 INFO: skip by not found init order into storage 2020-10-05 02:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-05 02:02:00 INFO: skip by not found init order into storage 2020-10-05 02:02:00 INFO: clearing end 2020-10-05 02:02:00 INFO: 2020-10-05 02:02:00 INFO: 2020-10-05 02:02:00 INFO: 2020-10-05 02:02:00 INFO: 2020-10-05 03:00:20 INFO: 2020-10-05 03:00:20 INFO: 2020-10-05 03:00:20 INFO: 2020-10-05 03:00:20 INFO: 2020-10-05 03:00:20 INFO: init new order start 2020-10-05 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 5, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.2, 'high': 352.9, 'low': 352.2, 'close': 352.7, 'trades': 1876, 'volume': 753872, 'vwap': 352.47, 'lastSize': 200, 'turnover': 26571583295, 'homeNotional': 8039.767131508113, 'foreignNotional': 2833761.590443364}, {'timestamp': datetime.datetime(2020, 10, 4, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.05, 'high': 353.1, 'low': 351.75, 'close': 352.2, 'trades': 2446, 'volume': 1531157, 'vwap': 352.31, 'lastSize': 28, 'turnover': 53942670560, 'homeNotional': 16322.99474968534, 'foreignNotional': 5750598.271003567}, {'timestamp': datetime.datetime(2020, 10, 4, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.05, 'high': 352.95, 'low': 352.05, 'close': 352.05, 'trades': 1137, 'volume': 854254, 'vwap': 352.56, 'lastSize': 1000, 'turnover': 30117554185, 'homeNotional': 9106.737423970508, 'foreignNotional': 3210668.651695191}] 2020-10-05 03:00:20 INFO: skip by found empty buckets 2020-10-05 03:00:20 INFO: check need new order None 2020-10-05 03:00:20 INFO: init new order end 2020-10-05 03:00:20 INFO: 2020-10-05 03:00:20 INFO: 2020-10-05 03:00:20 INFO: 2020-10-05 03:00:20 INFO: 2020-10-05 03:02:00 INFO: 2020-10-05 03:02:00 INFO: 2020-10-05 03:02:00 INFO: 2020-10-05 03:02:00 INFO: 2020-10-05 03:02:00 INFO: clearing start 2020-10-05 03:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-05 03:02:00 INFO: skip by not found init order into storage 2020-10-05 03:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-05 03:02:00 INFO: skip by not found init order into storage 2020-10-05 03:02:00 INFO: clearing end 2020-10-05 03:02:00 INFO: 2020-10-05 03:02:00 INFO: 2020-10-05 03:02:00 INFO: 2020-10-05 03:02:00 INFO: 2020-10-05 04:00:20 INFO: 2020-10-05 04:00:20 INFO: 2020-10-05 04:00:20 INFO: 2020-10-05 04:00:20 INFO: 2020-10-05 04:00:20 INFO: init new order start 2020-10-05 04:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 5, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.7, 'high': 356.0, 'low': 352.6, 'close': 354.55, 'trades': 3803, 'volume': 2878588, 'vwap': 354.76, 'lastSize': 50, 'turnover': 102119463865, 'homeNotional': 30834.52023588762, 'foreignNotional': 10938750.43586956}, {'timestamp': datetime.datetime(2020, 10, 5, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.2, 'high': 352.9, 'low': 352.2, 'close': 352.7, 'trades': 1876, 'volume': 753872, 'vwap': 352.47, 'lastSize': 200, 'turnover': 26571583295, 'homeNotional': 8039.767131508113, 'foreignNotional': 2833761.590443364}, {'timestamp': datetime.datetime(2020, 10, 4, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.05, 'high': 353.1, 'low': 351.75, 'close': 352.2, 'trades': 2446, 'volume': 1531157, 'vwap': 352.31, 'lastSize': 28, 'turnover': 53942670560, 'homeNotional': 16322.99474968534, 'foreignNotional': 5750598.271003567}] 2020-10-05 04:00:21 INFO: prepare candles [CandleItem(low=352.6, high=356.0, open=352.7, close=354.55, color='GREEN'), CandleItem(low=352.2, high=352.9, open=352.2, close=352.7, color='GREEN'), CandleItem(low=351.75, high=353.1, open=352.05, close=352.2, color='GREEN')] 2020-10-05 04:00:21 INFO: skip by colors first_candle=CandleItem(low=351.75, high=353.1, open=352.05, close=352.2, color='GREEN') second_candle=CandleItem(low=352.2, high=352.9, open=352.2, close=352.7, color='GREEN') last_candle=CandleItem(low=352.6, high=356.0, open=352.7, close=354.55, color='GREEN') 2020-10-05 04:00:21 INFO: check need new order None 2020-10-05 04:00:21 INFO: init new order end 2020-10-05 04:00:21 INFO: 2020-10-05 04:00:21 INFO: 2020-10-05 04:00:21 INFO: 2020-10-05 04:00:21 INFO: 2020-10-05 04:02:00 INFO: 2020-10-05 04:02:00 INFO: 2020-10-05 04:02:00 INFO: 2020-10-05 04:02:00 INFO: 2020-10-05 04:02:00 INFO: clearing start 2020-10-05 04:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-05 04:02:00 INFO: skip by not found init order into storage 2020-10-05 04:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-05 04:02:00 INFO: skip by not found init order into storage 2020-10-05 04:02:00 INFO: clearing end 2020-10-05 04:02:00 INFO: 2020-10-05 04:02:00 INFO: 2020-10-05 04:02:00 INFO: 2020-10-05 04:02:00 INFO: 2020-10-05 05:00:22 INFO: 2020-10-05 05:00:24 INFO: 2020-10-05 05:00:27 INFO: 2020-10-05 05:00:29 INFO: 2020-10-05 05:00:30 INFO: init new order start Traceback (most recent call last): File "app/trader.py", line 131, in main() File "app/trader.py", line 88, in main order_props: OrderProperties = check_need_new_order(TICKER) File "/home/crypto/current/app/init_order_operations.py", line 53, in check_need_new_order source_buckets = get_buckets(ticker, 3) File "/home/crypto/current/app/bitmex_rest.py", line 16, in get_buckets return client_rest.Trade.Trade_getBucketed(binSize=bin_size, partial=False, symbol=ticker, count=count, start=start, File "/home/crypto/venv/lib/python3.8/site-packages/bravado/http_future.py", line 271, in result swagger_result = self._get_swagger_result(incoming_response) File "/home/crypto/venv/lib/python3.8/site-packages/bravado/http_future.py", line 124, in wrapper return func(self, *args, **kwargs) File "/home/crypto/venv/lib/python3.8/site-packages/bravado/http_future.py", line 300, in _get_swagger_result unmarshal_response( File "/home/crypto/venv/lib/python3.8/site-packages/bravado/http_future.py", line 353, in unmarshal_response raise_on_expected(incoming_response) File "/home/crypto/venv/lib/python3.8/site-packages/bravado/http_future.py", line 420, in raise_on_expected raise make_http_exception( bravado.exception.HTTPBadRequest: 400 Bad Request: {'error': {'message': 'This request has expired - `expires` is in the past. Current time: 1601863247', 'name': 'HTTPError'}} /home/crypto/venv/lib/python3.8/site-packages/swagger_spec_validator/validator20.py:49: SwaggerValidationWarning: Found "$ref: #/definitions/UserPreferences" with siblings that will be overwritten. See https://stackoverflow.com/a/48114924 for more information. (path #/definitions/User/properties/preferences) warnings.warn( 2020-10-05 05:00:54 INFO: 2020-10-05 05:00:54 INFO: 2020-10-05 05:00:54 INFO: 2020-10-05 05:00:54 INFO: 2020-10-05 05:00:54 INFO: start trader process 2020-10-05 05:00:54 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-10-05 05:00:54 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-10-05 05:00:54 INFO: Authenticating with API Key. 2020-10-05 05:00:55 INFO: Connected to WS. 2020-10-05 06:00:20 INFO: 2020-10-05 06:00:20 INFO: 2020-10-05 06:00:20 INFO: 2020-10-05 06:00:20 INFO: 2020-10-05 06:00:20 INFO: init new order start 2020-10-05 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 5, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.85, 'high': 354.0, 'low': 353.4, 'close': 354.0, 'trades': 2478, 'volume': 1317062, 'vwap': 353.79, 'lastSize': 26, 'turnover': 46595652305, 'homeNotional': 14098.7981805563, 'foreignNotional': 4987941.202942092}, {'timestamp': datetime.datetime(2020, 10, 5, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.55, 'high': 355.2, 'low': 353.85, 'close': 353.85, 'trades': 1414, 'volume': 1388459, 'vwap': 354.42, 'lastSize': 28, 'turnover': 49209387295, 'homeNotional': 14860.343726917132, 'foreignNotional': 5266764.896728506}, {'timestamp': datetime.datetime(2020, 10, 5, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.7, 'high': 356.0, 'low': 352.6, 'close': 354.55, 'trades': 3803, 'volume': 2878588, 'vwap': 354.76, 'lastSize': 50, 'turnover': 102119463865, 'homeNotional': 30834.52023588762, 'foreignNotional': 10938750.43586956}] 2020-10-05 06:00:20 INFO: prepare candles [CandleItem(low=353.4, high=354.0, open=353.85, close=354.0, color='GREEN'), CandleItem(low=353.85, high=355.2, open=354.55, close=353.85, color='RED'), CandleItem(low=352.6, high=356.0, open=352.7, close=354.55, color='GREEN')] 2020-10-05 06:00:20 INFO: skip by colors first_candle=CandleItem(low=352.6, high=356.0, open=352.7, close=354.55, color='GREEN') second_candle=CandleItem(low=353.85, high=355.2, open=354.55, close=353.85, color='RED') last_candle=CandleItem(low=353.4, high=354.0, open=353.85, close=354.0, color='GREEN') 2020-10-05 06:00:20 INFO: check need new order None 2020-10-05 06:00:20 INFO: init new order end 2020-10-05 06:00:20 INFO: 2020-10-05 06:00:20 INFO: 2020-10-05 06:00:20 INFO: 2020-10-05 06:00:20 INFO: 2020-10-05 06:02:00 INFO: 2020-10-05 06:02:00 INFO: 2020-10-05 06:02:00 INFO: 2020-10-05 06:02:00 INFO: 2020-10-05 06:02:00 INFO: clearing start /home/crypto/venv/lib/python3.8/site-packages/bravado_core/spec.py:343: Warning: JSON format is not registered with bravado-core! warnings.warn( /home/crypto/venv/lib/python3.8/site-packages/bravado_core/spec.py:343: Warning: guid format is not registered with bravado-core! warnings.warn( 2020-10-05 06:02:01 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-05 06:02:01 INFO: skip by not found init order into storage 2020-10-05 06:02:01 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-05 06:02:01 INFO: skip by not found init order into storage 2020-10-05 06:02:01 INFO: clearing end 2020-10-05 06:02:01 INFO: 2020-10-05 06:02:01 INFO: 2020-10-05 06:02:01 INFO: 2020-10-05 06:02:01 INFO: 2020-10-05 07:00:20 INFO: 2020-10-05 07:00:20 INFO: 2020-10-05 07:00:20 INFO: 2020-10-05 07:00:20 INFO: 2020-10-05 07:00:20 INFO: init new order start 2020-10-05 07:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 5, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.0, 'high': 354.2, 'low': 351.4, 'close': 351.85, 'trades': 2670, 'volume': 2490385, 'vwap': 352.3, 'lastSize': 244, 'turnover': 87735815790, 'homeNotional': 26623.091395093776, 'foreignNotional': 9379299.832658952}, {'timestamp': datetime.datetime(2020, 10, 5, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.85, 'high': 354.0, 'low': 353.4, 'close': 354.0, 'trades': 2478, 'volume': 1317062, 'vwap': 353.79, 'lastSize': 26, 'turnover': 46595652305, 'homeNotional': 14098.7981805563, 'foreignNotional': 4987941.202942092}, {'timestamp': datetime.datetime(2020, 10, 5, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.55, 'high': 355.2, 'low': 353.85, 'close': 353.85, 'trades': 1414, 'volume': 1388459, 'vwap': 354.42, 'lastSize': 28, 'turnover': 49209387295, 'homeNotional': 14860.343726917132, 'foreignNotional': 5266764.896728506}] 2020-10-05 07:00:20 INFO: prepare candles [CandleItem(low=351.4, high=354.2, open=354.0, close=351.85, color='RED'), CandleItem(low=353.4, high=354.0, open=353.85, close=354.0, color='GREEN'), CandleItem(low=353.85, high=355.2, open=354.55, close=353.85, color='RED')] 2020-10-05 07:00:20 INFO: skip by colors first_candle=CandleItem(low=353.85, high=355.2, open=354.55, close=353.85, color='RED') second_candle=CandleItem(low=353.4, high=354.0, open=353.85, close=354.0, color='GREEN') last_candle=CandleItem(low=351.4, high=354.2, open=354.0, close=351.85, color='RED') 2020-10-05 07:00:20 INFO: check need new order None 2020-10-05 07:00:20 INFO: init new order end 2020-10-05 07:00:20 INFO: 2020-10-05 07:00:20 INFO: 2020-10-05 07:00:20 INFO: 2020-10-05 07:00:20 INFO: 2020-10-05 07:02:00 INFO: 2020-10-05 07:02:00 INFO: 2020-10-05 07:02:00 INFO: 2020-10-05 07:02:00 INFO: 2020-10-05 07:02:00 INFO: clearing start 2020-10-05 07:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-05 07:02:00 INFO: skip by not found init order into storage 2020-10-05 07:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-05 07:02:00 INFO: skip by not found init order into storage 2020-10-05 07:02:00 INFO: clearing end 2020-10-05 07:02:00 INFO: 2020-10-05 07:02:00 INFO: 2020-10-05 07:02:00 INFO: 2020-10-05 07:02:00 INFO: 2020-10-05 08:00:20 INFO: 2020-10-05 08:00:20 INFO: 2020-10-05 08:00:20 INFO: 2020-10-05 08:00:20 INFO: 2020-10-05 08:00:20 INFO: init new order start 2020-10-05 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 5, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.85, 'high': 352.25, 'low': 351.0, 'close': 351.05, 'trades': 3309, 'volume': 2009971, 'vwap': 351.72, 'lastSize': 29, 'turnover': 70693949170, 'homeNotional': 21434.510913213257, 'foreignNotional': 7538867.591354423}, {'timestamp': datetime.datetime(2020, 10, 5, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.0, 'high': 354.2, 'low': 351.4, 'close': 351.85, 'trades': 2670, 'volume': 2490385, 'vwap': 352.3, 'lastSize': 244, 'turnover': 87735815790, 'homeNotional': 26623.091395093776, 'foreignNotional': 9379299.832658952}, {'timestamp': datetime.datetime(2020, 10, 5, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.85, 'high': 354.0, 'low': 353.4, 'close': 354.0, 'trades': 2478, 'volume': 1317062, 'vwap': 353.79, 'lastSize': 26, 'turnover': 46595652305, 'homeNotional': 14098.7981805563, 'foreignNotional': 4987941.202942092}] 2020-10-05 08:00:20 INFO: prepare candles [CandleItem(low=351.0, high=352.25, open=351.85, close=351.05, color='RED'), CandleItem(low=351.4, high=354.2, open=354.0, close=351.85, color='RED'), CandleItem(low=353.4, high=354.0, open=353.85, close=354.0, color='GREEN')] 2020-10-05 08:00:20 INFO: skip by colors first_candle=CandleItem(low=353.4, high=354.0, open=353.85, close=354.0, color='GREEN') second_candle=CandleItem(low=351.4, high=354.2, open=354.0, close=351.85, color='RED') last_candle=CandleItem(low=351.0, high=352.25, open=351.85, close=351.05, color='RED') 2020-10-05 08:00:20 INFO: check need new order None 2020-10-05 08:00:20 INFO: init new order end 2020-10-05 08:00:20 INFO: 2020-10-05 08:00:20 INFO: 2020-10-05 08:00:20 INFO: 2020-10-05 08:00:20 INFO: 2020-10-05 08:02:00 INFO: 2020-10-05 08:02:00 INFO: 2020-10-05 08:02:00 INFO: 2020-10-05 08:02:00 INFO: 2020-10-05 08:02:00 INFO: clearing start 2020-10-05 08:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-05 08:02:00 INFO: skip by not found init order into storage 2020-10-05 08:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-05 08:02:00 INFO: skip by not found init order into storage 2020-10-05 08:02:00 INFO: clearing end 2020-10-05 08:02:00 INFO: 2020-10-05 08:02:00 INFO: 2020-10-05 08:02:00 INFO: 2020-10-05 08:02:00 INFO: 2020-10-05 09:00:20 INFO: 2020-10-05 09:00:20 INFO: 2020-10-05 09:00:20 INFO: 2020-10-05 09:00:20 INFO: 2020-10-05 09:00:20 INFO: init new order start 2020-10-05 09:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 5, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.05, 'high': 352.6, 'low': 351.05, 'close': 352.6, 'trades': 894, 'volume': 884404, 'vwap': 351.98, 'lastSize': 326, 'turnover': 31128392910, 'homeNotional': 9436.405372934727, 'foreignNotional': 3321336.894036596}, {'timestamp': datetime.datetime(2020, 10, 5, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.85, 'high': 352.25, 'low': 351.0, 'close': 351.05, 'trades': 3309, 'volume': 2009971, 'vwap': 351.72, 'lastSize': 29, 'turnover': 70693949170, 'homeNotional': 21434.510913213257, 'foreignNotional': 7538867.591354423}, {'timestamp': datetime.datetime(2020, 10, 5, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.0, 'high': 354.2, 'low': 351.4, 'close': 351.85, 'trades': 2670, 'volume': 2490385, 'vwap': 352.3, 'lastSize': 244, 'turnover': 87735815790, 'homeNotional': 26623.091395093776, 'foreignNotional': 9379299.832658952}] 2020-10-05 09:00:21 INFO: prepare candles [CandleItem(low=351.05, high=352.6, open=351.05, close=352.6, color='GREEN'), CandleItem(low=351.0, high=352.25, open=351.85, close=351.05, color='RED'), CandleItem(low=351.4, high=354.2, open=354.0, close=351.85, color='RED')] 2020-10-05 09:00:21 INFO: last_candle=CandleItem(low=351.05, high=352.6, open=351.05, close=352.6, color='GREEN') 2020-10-05 09:00:21 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-05 09:00:21 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=351.05, high=352.6, open=351.05, close=352.6, color='GREEN') 2020-10-05 09:00:21 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=351.0, high=352.25, open=351.85, close=351.05, color='RED') 2020-10-05 09:00:21 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=351.4, high=354.2, open=354.0, close=351.85, color='RED') 2020-10-05 09:00:21 INFO: hit candle order=OrderProperties(candle=CandleItem(low=351.05, high=352.6, open=351.05, close=352.6, color='GREEN'), take_profit_factor=6.0, clearing_interval=3600) 2020-10-05 09:00:21 INFO: check need new order OrderProperties(candle=CandleItem(low=351.05, high=352.6, open=351.05, close=352.6, color='GREEN'), take_profit_factor=6.0, clearing_interval=3600) 2020-10-05 09:00:21 INFO: place order: start candle=CandleItem(low=351.05, high=352.6, open=351.05, close=352.6, color='GREEN') ticker='ETHUSD' price_offset=0.1 2020-10-05 09:00:21 INFO: place order: side_factor=-1 init_trigger_price=352.65000000000003 init_order_price=352.70000000000005 stop_price_offset=0.0 candle.size=1.5500000000000114 stop_price=351.05 take_price=362.0000000000001 2020-10-05 09:00:21 INFO: place order round: side_factor=-1 init_trigger_price=Decimal('352.65000000000003410605131648480892181396484375') init_order_price=Decimal('352.700000000000045474735088646411895751953125') stop_price_offset=0.0 candle.size=1.5500000000000114 stop_price=Decimal('351.05000000000001136868377216160297393798828125') take_price=Decimal('362.0000000000001136868377216160297393798828125') 2020-10-05 09:00:21 INFO: place order: compute qty=1188 2020-10-05 09:00:21 INFO: place order: save order to db 653f262c81f34d77ac7b53a0270bd9ea; response=True 2020-10-05 09:00:21 INFO: process event {'orderID': 'f1c4b85a-3ba0-48fd-8f51-00d62684e8ee', 'clOrdID': '653f262c81f34d77ac7b53a0270bd9ea', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1188, 'price': 352.7, 'displayQty': None, 'stopPx': 352.65, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1188, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-10-05T06:00:21.329Z', 'timestamp': '2020-10-05T06:00:21.329Z'} 2020-10-05 09:00:21 INFO: post order to exchange resp={'orderID': 'f1c4b85a-3ba0-48fd-8f51-00d62684e8ee', 'clOrdID': '653f262c81f34d77ac7b53a0270bd9ea', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1188, 'price': 352.7, 'displayQty': None, 'stopPx': 352.65, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1188, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 5, 6, 0, 21, 329000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 5, 6, 0, 21, 329000, tzinfo=tzutc())} 2020-10-05 09:00:21 INFO: place new init order {'qty': 1188, 'init_price': Decimal('352.65000000000003410605131648480892181396484375'), 'stop_price': Decimal('351.05000000000001136868377216160297393798828125'), 'take_price': Decimal('362.0000000000001136868377216160297393798828125'), 'order_uid': '653f262c81f34d77ac7b53a0270bd9ea', 'response': {'orderID': 'f1c4b85a-3ba0-48fd-8f51-00d62684e8ee', 'clOrdID': '653f262c81f34d77ac7b53a0270bd9ea', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1188, 'price': 352.7, 'displayQty': None, 'stopPx': 352.65, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1188, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 5, 6, 0, 21, 329000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 5, 6, 0, 21, 329000, tzinfo=tzutc())}} 2020-10-05 09:00:21 INFO: init new order end 2020-10-05 09:00:21 INFO: 2020-10-05 09:00:21 INFO: 2020-10-05 09:00:21 INFO: 2020-10-05 09:00:21 INFO: 2020-10-05 09:00:21 INFO: skip event 653f262c81f34d77ac7b53a0270bd9ea New 2020-10-05 09:02:00 INFO: 2020-10-05 09:02:00 INFO: 2020-10-05 09:02:00 INFO: 2020-10-05 09:02:00 INFO: 2020-10-05 09:02:00 INFO: clearing start 2020-10-05 09:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-05 09:02:00 INFO: skip by not found init order into storage 2020-10-05 09:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-05 09:02:00 INFO: skip by not found init order into storage 2020-10-05 09:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f1c4b85a-3ba0-48fd-8f51-00d62684e8ee', 'clOrdID': '653f262c81f34d77ac7b53a0270bd9ea', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1188, 'price': 352.7, 'displayQty': None, 'stopPx': 352.65, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1188, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 5, 6, 0, 21, 329000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 5, 6, 0, 21, 329000, tzinfo=tzutc())} 2020-10-05 09:02:00 INFO: order time=2020-10-05 06:00:21.329000+00:00; delta from now UTC=0:01:39.196573 time_delta.total_seconds()=99.196573; time_diff_offset='3600' 2020-10-05 09:02:00 INFO: skip by time diff 2020-10-05 06:00:21.329000+00:00 2020-10-05 09:02:00 INFO: clearing end 2020-10-05 09:02:00 INFO: 2020-10-05 09:02:00 INFO: 2020-10-05 09:02:00 INFO: 2020-10-05 09:02:00 INFO: 2020-10-05 10:00:20 INFO: 2020-10-05 10:00:20 INFO: 2020-10-05 10:00:20 INFO: 2020-10-05 10:00:20 INFO: 2020-10-05 10:00:20 INFO: init new order start 2020-10-05 10:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 5, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.6, 'high': 352.6, 'low': 348.65, 'close': 350.95, 'trades': 4474, 'volume': 3023668, 'vwap': 350.24, 'lastSize': 53, 'turnover': 105900107970, 'homeNotional': 32195.10995509862, 'foreignNotional': 11275968.394697128}, {'timestamp': datetime.datetime(2020, 10, 5, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.05, 'high': 352.6, 'low': 351.05, 'close': 352.6, 'trades': 894, 'volume': 884404, 'vwap': 351.98, 'lastSize': 326, 'turnover': 31128392910, 'homeNotional': 9436.405372934727, 'foreignNotional': 3321336.894036596}, {'timestamp': datetime.datetime(2020, 10, 5, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.85, 'high': 352.25, 'low': 351.0, 'close': 351.05, 'trades': 3309, 'volume': 2009971, 'vwap': 351.72, 'lastSize': 29, 'turnover': 70693949170, 'homeNotional': 21434.510913213257, 'foreignNotional': 7538867.591354423}] 2020-10-05 10:00:20 INFO: prepare candles [CandleItem(low=348.65, high=352.6, open=352.6, close=350.95, color='RED'), CandleItem(low=351.05, high=352.6, open=351.05, close=352.6, color='GREEN'), CandleItem(low=351.0, high=352.25, open=351.85, close=351.05, color='RED')] 2020-10-05 10:00:20 INFO: skip by colors first_candle=CandleItem(low=351.0, high=352.25, open=351.85, close=351.05, color='RED') second_candle=CandleItem(low=351.05, high=352.6, open=351.05, close=352.6, color='GREEN') last_candle=CandleItem(low=348.65, high=352.6, open=352.6, close=350.95, color='RED') 2020-10-05 10:00:20 INFO: check need new order None 2020-10-05 10:00:20 INFO: init new order end 2020-10-05 10:00:20 INFO: 2020-10-05 10:00:20 INFO: 2020-10-05 10:00:20 INFO: 2020-10-05 10:00:20 INFO: 2020-10-05 10:02:00 INFO: 2020-10-05 10:02:00 INFO: 2020-10-05 10:02:00 INFO: 2020-10-05 10:02:00 INFO: 2020-10-05 10:02:00 INFO: clearing start 2020-10-05 10:02:01 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-05 10:02:01 INFO: skip by not found init order into storage 2020-10-05 10:02:01 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-05 10:02:01 INFO: skip by not found init order into storage 2020-10-05 10:02:01 INFO: fetch_orders_for_clearing test order {'orderID': 'f1c4b85a-3ba0-48fd-8f51-00d62684e8ee', 'clOrdID': '653f262c81f34d77ac7b53a0270bd9ea', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1188, 'price': 352.7, 'displayQty': None, 'stopPx': 352.65, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1188, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 5, 6, 0, 21, 329000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 5, 6, 0, 21, 329000, tzinfo=tzutc())} 2020-10-05 10:02:01 INFO: order time=2020-10-05 06:00:21.329000+00:00; delta from now UTC=1:01:39.699165 time_delta.total_seconds()=3699.699165; time_diff_offset='3600' 2020-10-05 10:02:01 INFO: clear order 653f262c81f34d77ac7b53a0270bd9ea 2020-10-05 10:02:01 INFO: process event {'orderID': 'f1c4b85a-3ba0-48fd-8f51-00d62684e8ee', 'ordStatus': 'Canceled', 'leavesQty': 0, 'text': 'Canceled: cancelled by clearing\nInit order by supervisor.py', 'timestamp': '2020-10-05T07:02:01.051Z', 'clOrdID': '653f262c81f34d77ac7b53a0270bd9ea', 'account': 605536, 'symbol': 'ETHUSD'} 2020-10-05 10:02:01 INFO: skip event 653f262c81f34d77ac7b53a0270bd9ea Canceled 2020-10-05 10:02:01 INFO: cancel order resp=[{'orderID': 'f1c4b85a-3ba0-48fd-8f51-00d62684e8ee', 'clOrdID': '653f262c81f34d77ac7b53a0270bd9ea', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1188, 'price': 352.7, 'displayQty': None, 'stopPx': 352.65, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'Canceled', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 0, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Canceled: cancelled by clearing\nInit order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 5, 6, 0, 21, 329000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 5, 7, 2, 1, 51000, tzinfo=tzutc())}] 2020-10-05 10:02:01 INFO: clearing end 2020-10-05 10:02:01 INFO: 2020-10-05 10:02:01 INFO: 2020-10-05 10:02:01 INFO: 2020-10-05 10:02:01 INFO: 2020-10-05 11:00:20 INFO: 2020-10-05 11:00:20 INFO: 2020-10-05 11:00:20 INFO: 2020-10-05 11:00:20 INFO: 2020-10-05 11:00:20 INFO: init new order start 2020-10-05 11:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 5, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.95, 'high': 351.75, 'low': 350.05, 'close': 351.05, 'trades': 2106, 'volume': 1518143, 'vwap': 350.9, 'lastSize': 1, 'turnover': 53270696380, 'homeNotional': 16194.025944883835, 'foreignNotional': 5682387.943682478}, {'timestamp': datetime.datetime(2020, 10, 5, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.6, 'high': 352.6, 'low': 348.65, 'close': 350.95, 'trades': 4474, 'volume': 3023668, 'vwap': 350.24, 'lastSize': 53, 'turnover': 105900107970, 'homeNotional': 32195.10995509862, 'foreignNotional': 11275968.394697128}, {'timestamp': datetime.datetime(2020, 10, 5, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.05, 'high': 352.6, 'low': 351.05, 'close': 352.6, 'trades': 894, 'volume': 884404, 'vwap': 351.98, 'lastSize': 326, 'turnover': 31128392910, 'homeNotional': 9436.405372934727, 'foreignNotional': 3321336.894036596}] 2020-10-05 11:00:20 INFO: prepare candles [CandleItem(low=350.05, high=351.75, open=350.95, close=351.05, color='GREEN'), CandleItem(low=348.65, high=352.6, open=352.6, close=350.95, color='RED'), CandleItem(low=351.05, high=352.6, open=351.05, close=352.6, color='GREEN')] 2020-10-05 11:00:20 INFO: skip by colors first_candle=CandleItem(low=351.05, high=352.6, open=351.05, close=352.6, color='GREEN') second_candle=CandleItem(low=348.65, high=352.6, open=352.6, close=350.95, color='RED') last_candle=CandleItem(low=350.05, high=351.75, open=350.95, close=351.05, color='GREEN') 2020-10-05 11:00:20 INFO: check need new order None 2020-10-05 11:00:20 INFO: init new order end 2020-10-05 11:00:20 INFO: 2020-10-05 11:00:20 INFO: 2020-10-05 11:00:20 INFO: 2020-10-05 11:00:20 INFO: 2020-10-05 11:02:00 INFO: 2020-10-05 11:02:00 INFO: 2020-10-05 11:02:00 INFO: 2020-10-05 11:02:00 INFO: 2020-10-05 11:02:00 INFO: clearing start 2020-10-05 11:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-05 11:02:00 INFO: skip by not found init order into storage 2020-10-05 11:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-05 11:02:00 INFO: skip by not found init order into storage 2020-10-05 11:02:00 INFO: clearing end 2020-10-05 11:02:00 INFO: 2020-10-05 11:02:00 INFO: 2020-10-05 11:02:00 INFO: 2020-10-05 11:02:00 INFO: 2020-10-05 12:00:20 INFO: 2020-10-05 12:00:20 INFO: 2020-10-05 12:00:20 INFO: 2020-10-05 12:00:20 INFO: 2020-10-05 12:00:20 INFO: init new order start 2020-10-05 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 5, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.05, 'high': 351.6, 'low': 350.25, 'close': 350.45, 'trades': 1682, 'volume': 1090612, 'vwap': 351.12, 'lastSize': 1, 'turnover': 38293353020, 'homeNotional': 11656.641285817554, 'foreignNotional': 4092858.111597182}, {'timestamp': datetime.datetime(2020, 10, 5, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.95, 'high': 351.75, 'low': 350.05, 'close': 351.05, 'trades': 2106, 'volume': 1518143, 'vwap': 350.9, 'lastSize': 1, 'turnover': 53270696380, 'homeNotional': 16194.025944883835, 'foreignNotional': 5682387.943682478}, {'timestamp': datetime.datetime(2020, 10, 5, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.6, 'high': 352.6, 'low': 348.65, 'close': 350.95, 'trades': 4474, 'volume': 3023668, 'vwap': 350.24, 'lastSize': 53, 'turnover': 105900107970, 'homeNotional': 32195.10995509862, 'foreignNotional': 11275968.394697128}] 2020-10-05 12:00:20 INFO: prepare candles [CandleItem(low=350.25, high=351.6, open=351.05, close=350.45, color='RED'), CandleItem(low=350.05, high=351.75, open=350.95, close=351.05, color='GREEN'), CandleItem(low=348.65, high=352.6, open=352.6, close=350.95, color='RED')] 2020-10-05 12:00:20 INFO: skip by colors first_candle=CandleItem(low=348.65, high=352.6, open=352.6, close=350.95, color='RED') second_candle=CandleItem(low=350.05, high=351.75, open=350.95, close=351.05, color='GREEN') last_candle=CandleItem(low=350.25, high=351.6, open=351.05, close=350.45, color='RED') 2020-10-05 12:00:20 INFO: check need new order None 2020-10-05 12:00:20 INFO: init new order end 2020-10-05 12:00:20 INFO: 2020-10-05 12:00:20 INFO: 2020-10-05 12:00:20 INFO: 2020-10-05 12:00:20 INFO: 2020-10-05 12:02:00 INFO: 2020-10-05 12:02:00 INFO: 2020-10-05 12:02:00 INFO: 2020-10-05 12:02:00 INFO: 2020-10-05 12:02:00 INFO: clearing start 2020-10-05 12:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-05 12:02:00 INFO: skip by not found init order into storage 2020-10-05 12:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-05 12:02:00 INFO: skip by not found init order into storage 2020-10-05 12:02:00 INFO: clearing end 2020-10-05 12:02:00 INFO: 2020-10-05 12:02:00 INFO: 2020-10-05 12:02:00 INFO: 2020-10-05 12:02:00 INFO: 2020-10-05 13:00:20 INFO: 2020-10-05 13:00:20 INFO: 2020-10-05 13:00:20 INFO: 2020-10-05 13:00:20 INFO: 2020-10-05 13:00:20 INFO: init new order start 2020-10-05 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 5, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.45, 'high': 352.35, 'low': 350.0, 'close': 351.65, 'trades': 2372, 'volume': 1429991, 'vwap': 351.42, 'lastSize': 13, 'turnover': 50252004520, 'homeNotional': 15276.323105021678, 'foreignNotional': 5368329.11307434}, {'timestamp': datetime.datetime(2020, 10, 5, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.05, 'high': 351.6, 'low': 350.25, 'close': 350.45, 'trades': 1682, 'volume': 1090612, 'vwap': 351.12, 'lastSize': 1, 'turnover': 38293353020, 'homeNotional': 11656.641285817554, 'foreignNotional': 4092858.111597182}, {'timestamp': datetime.datetime(2020, 10, 5, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.95, 'high': 351.75, 'low': 350.05, 'close': 351.05, 'trades': 2106, 'volume': 1518143, 'vwap': 350.9, 'lastSize': 1, 'turnover': 53270696380, 'homeNotional': 16194.025944883835, 'foreignNotional': 5682387.943682478}] 2020-10-05 13:00:20 INFO: prepare candles [CandleItem(low=350.0, high=352.35, open=350.45, close=351.65, color='GREEN'), CandleItem(low=350.25, high=351.6, open=351.05, close=350.45, color='RED'), CandleItem(low=350.05, high=351.75, open=350.95, close=351.05, color='GREEN')] 2020-10-05 13:00:20 INFO: skip by colors first_candle=CandleItem(low=350.05, high=351.75, open=350.95, close=351.05, color='GREEN') second_candle=CandleItem(low=350.25, high=351.6, open=351.05, close=350.45, color='RED') last_candle=CandleItem(low=350.0, high=352.35, open=350.45, close=351.65, color='GREEN') 2020-10-05 13:00:20 INFO: check need new order None 2020-10-05 13:00:20 INFO: init new order end 2020-10-05 13:00:20 INFO: 2020-10-05 13:00:20 INFO: 2020-10-05 13:00:20 INFO: 2020-10-05 13:00:20 INFO: 2020-10-05 13:02:00 INFO: 2020-10-05 13:02:00 INFO: 2020-10-05 13:02:00 INFO: 2020-10-05 13:02:00 INFO: 2020-10-05 13:02:00 INFO: clearing start 2020-10-05 13:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-05 13:02:00 INFO: skip by not found init order into storage 2020-10-05 13:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-05 13:02:00 INFO: skip by not found init order into storage 2020-10-05 13:02:00 INFO: clearing end 2020-10-05 13:02:00 INFO: 2020-10-05 13:02:00 INFO: 2020-10-05 13:02:00 INFO: 2020-10-05 13:02:00 INFO: 2020-10-05 14:00:20 INFO: 2020-10-05 14:00:20 INFO: 2020-10-05 14:00:20 INFO: 2020-10-05 14:00:20 INFO: 2020-10-05 14:00:20 INFO: init new order start 2020-10-05 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 5, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.65, 'high': 352.2, 'low': 350.85, 'close': 351.55, 'trades': 1817, 'volume': 995782, 'vwap': 351.53, 'lastSize': 403, 'turnover': 35004107365, 'homeNotional': 10627.876939925492, 'foreignNotional': 3735953.4500477407}, {'timestamp': datetime.datetime(2020, 10, 5, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.45, 'high': 352.35, 'low': 350.0, 'close': 351.65, 'trades': 2372, 'volume': 1429991, 'vwap': 351.42, 'lastSize': 13, 'turnover': 50252004520, 'homeNotional': 15276.323105021678, 'foreignNotional': 5368329.11307434}, {'timestamp': datetime.datetime(2020, 10, 5, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.05, 'high': 351.6, 'low': 350.25, 'close': 350.45, 'trades': 1682, 'volume': 1090612, 'vwap': 351.12, 'lastSize': 1, 'turnover': 38293353020, 'homeNotional': 11656.641285817554, 'foreignNotional': 4092858.111597182}] 2020-10-05 14:00:20 INFO: prepare candles [CandleItem(low=350.85, high=352.2, open=351.65, close=351.55, color='RED'), CandleItem(low=350.0, high=352.35, open=350.45, close=351.65, color='GREEN'), CandleItem(low=350.25, high=351.6, open=351.05, close=350.45, color='RED')] 2020-10-05 14:00:20 INFO: skip by colors first_candle=CandleItem(low=350.25, high=351.6, open=351.05, close=350.45, color='RED') second_candle=CandleItem(low=350.0, high=352.35, open=350.45, close=351.65, color='GREEN') last_candle=CandleItem(low=350.85, high=352.2, open=351.65, close=351.55, color='RED') 2020-10-05 14:00:20 INFO: check need new order None 2020-10-05 14:00:20 INFO: init new order end 2020-10-05 14:00:20 INFO: 2020-10-05 14:00:20 INFO: 2020-10-05 14:00:20 INFO: 2020-10-05 14:00:20 INFO: 2020-10-05 14:02:00 INFO: 2020-10-05 14:02:00 INFO: 2020-10-05 14:02:00 INFO: 2020-10-05 14:02:00 INFO: 2020-10-05 14:02:00 INFO: clearing start 2020-10-05 14:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-05 14:02:00 INFO: skip by not found init order into storage 2020-10-05 14:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-05 14:02:00 INFO: skip by not found init order into storage 2020-10-05 14:02:00 INFO: clearing end 2020-10-05 14:02:00 INFO: 2020-10-05 14:02:00 INFO: 2020-10-05 14:02:00 INFO: 2020-10-05 14:02:00 INFO: 2020-10-05 15:00:20 INFO: 2020-10-05 15:00:20 INFO: 2020-10-05 15:00:20 INFO: 2020-10-05 15:00:20 INFO: 2020-10-05 15:00:20 INFO: init new order start 2020-10-05 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 5, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.55, 'high': 352.65, 'low': 350.5, 'close': 350.5, 'trades': 2417, 'volume': 1799261, 'vwap': 351.34, 'lastSize': 1335, 'turnover': 63214367585, 'homeNotional': 19212.232779365448, 'foreignNotional': 6749940.063147648}, {'timestamp': datetime.datetime(2020, 10, 5, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.65, 'high': 352.2, 'low': 350.85, 'close': 351.55, 'trades': 1817, 'volume': 995782, 'vwap': 351.53, 'lastSize': 403, 'turnover': 35004107365, 'homeNotional': 10627.876939925492, 'foreignNotional': 3735953.4500477407}, {'timestamp': datetime.datetime(2020, 10, 5, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.45, 'high': 352.35, 'low': 350.0, 'close': 351.65, 'trades': 2372, 'volume': 1429991, 'vwap': 351.42, 'lastSize': 13, 'turnover': 50252004520, 'homeNotional': 15276.323105021678, 'foreignNotional': 5368329.11307434}] 2020-10-05 15:00:20 INFO: prepare candles [CandleItem(low=350.5, high=352.65, open=351.55, close=350.5, color='RED'), CandleItem(low=350.85, high=352.2, open=351.65, close=351.55, color='RED'), CandleItem(low=350.0, high=352.35, open=350.45, close=351.65, color='GREEN')] 2020-10-05 15:00:20 INFO: skip by colors first_candle=CandleItem(low=350.0, high=352.35, open=350.45, close=351.65, color='GREEN') second_candle=CandleItem(low=350.85, high=352.2, open=351.65, close=351.55, color='RED') last_candle=CandleItem(low=350.5, high=352.65, open=351.55, close=350.5, color='RED') 2020-10-05 15:00:20 INFO: check need new order None 2020-10-05 15:00:20 INFO: init new order end 2020-10-05 15:00:20 INFO: 2020-10-05 15:00:20 INFO: 2020-10-05 15:00:20 INFO: 2020-10-05 15:00:20 INFO: 2020-10-05 15:02:00 INFO: 2020-10-05 15:02:00 INFO: 2020-10-05 15:02:00 INFO: 2020-10-05 15:02:00 INFO: 2020-10-05 15:02:00 INFO: clearing start 2020-10-05 15:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-05 15:02:00 INFO: skip by not found init order into storage 2020-10-05 15:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-05 15:02:00 INFO: skip by not found init order into storage 2020-10-05 15:02:00 INFO: clearing end 2020-10-05 15:02:00 INFO: 2020-10-05 15:02:00 INFO: 2020-10-05 15:02:00 INFO: 2020-10-05 15:02:00 INFO: 2020-10-05 16:00:20 INFO: 2020-10-05 16:00:20 INFO: 2020-10-05 16:00:20 INFO: 2020-10-05 16:00:20 INFO: 2020-10-05 16:00:20 INFO: init new order start 2020-10-05 16:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 5, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.5, 'high': 352.85, 'low': 349.7, 'close': 352.65, 'trades': 2955, 'volume': 2029062, 'vwap': 351.26, 'lastSize': 200, 'turnover': 71271528230, 'homeNotional': 21670.467210552146, 'foreignNotional': 7611847.221976902}, {'timestamp': datetime.datetime(2020, 10, 5, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.55, 'high': 352.65, 'low': 350.5, 'close': 350.5, 'trades': 2417, 'volume': 1799261, 'vwap': 351.34, 'lastSize': 1335, 'turnover': 63214367585, 'homeNotional': 19212.232779365448, 'foreignNotional': 6749940.063147648}, {'timestamp': datetime.datetime(2020, 10, 5, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.65, 'high': 352.2, 'low': 350.85, 'close': 351.55, 'trades': 1817, 'volume': 995782, 'vwap': 351.53, 'lastSize': 403, 'turnover': 35004107365, 'homeNotional': 10627.876939925492, 'foreignNotional': 3735953.4500477407}] 2020-10-05 16:00:20 INFO: prepare candles [CandleItem(low=349.7, high=352.85, open=350.5, close=352.65, color='GREEN'), CandleItem(low=350.5, high=352.65, open=351.55, close=350.5, color='RED'), CandleItem(low=350.85, high=352.2, open=351.65, close=351.55, color='RED')] 2020-10-05 16:00:20 INFO: last_candle=CandleItem(low=349.7, high=352.85, open=350.5, close=352.65, color='GREEN') 2020-10-05 16:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-05 16:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=349.7, high=352.85, open=350.5, close=352.65, color='GREEN') 2020-10-05 16:00:20 INFO: skip by CandleItem(low=349.7, high=352.85, open=350.5, close=352.65, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-05 16:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-05 16:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=349.7, high=352.85, open=350.5, close=352.65, color='GREEN') 2020-10-05 16:00:20 INFO: skip by CandleItem(low=349.7, high=352.85, open=350.5, close=352.65, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-05 16:00:20 INFO: not found applicable config for candle 2020-10-05 16:00:20 INFO: check need new order None 2020-10-05 16:00:20 INFO: init new order end 2020-10-05 16:00:20 INFO: 2020-10-05 16:00:20 INFO: 2020-10-05 16:00:20 INFO: 2020-10-05 16:00:20 INFO: 2020-10-05 16:02:00 INFO: 2020-10-05 16:02:00 INFO: 2020-10-05 16:02:00 INFO: 2020-10-05 16:02:00 INFO: 2020-10-05 16:02:00 INFO: clearing start 2020-10-05 16:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-05 16:02:00 INFO: skip by not found init order into storage 2020-10-05 16:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-05 16:02:00 INFO: skip by not found init order into storage 2020-10-05 16:02:00 INFO: clearing end 2020-10-05 16:02:00 INFO: 2020-10-05 16:02:00 INFO: 2020-10-05 16:02:00 INFO: 2020-10-05 16:02:00 INFO: 2020-10-05 17:00:20 INFO: 2020-10-05 17:00:20 INFO: 2020-10-05 17:00:20 INFO: 2020-10-05 17:00:20 INFO: 2020-10-05 17:00:20 INFO: init new order start 2020-10-05 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 5, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.65, 'high': 354.0, 'low': 352.0, 'close': 353.1, 'trades': 3891, 'volume': 2660989, 'vwap': 352.97, 'lastSize': 10, 'turnover': 93924834255, 'homeNotional': 28512.822304606805, 'foreignNotional': 10064164.839426717}, {'timestamp': datetime.datetime(2020, 10, 5, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.5, 'high': 352.85, 'low': 349.7, 'close': 352.65, 'trades': 2955, 'volume': 2029062, 'vwap': 351.26, 'lastSize': 200, 'turnover': 71271528230, 'homeNotional': 21670.467210552146, 'foreignNotional': 7611847.221976902}, {'timestamp': datetime.datetime(2020, 10, 5, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.55, 'high': 352.65, 'low': 350.5, 'close': 350.5, 'trades': 2417, 'volume': 1799261, 'vwap': 351.34, 'lastSize': 1335, 'turnover': 63214367585, 'homeNotional': 19212.232779365448, 'foreignNotional': 6749940.063147648}] 2020-10-05 17:00:20 INFO: prepare candles [CandleItem(low=352.0, high=354.0, open=352.65, close=353.1, color='GREEN'), CandleItem(low=349.7, high=352.85, open=350.5, close=352.65, color='GREEN'), CandleItem(low=350.5, high=352.65, open=351.55, close=350.5, color='RED')] 2020-10-05 17:00:20 INFO: skip by colors first_candle=CandleItem(low=350.5, high=352.65, open=351.55, close=350.5, color='RED') second_candle=CandleItem(low=349.7, high=352.85, open=350.5, close=352.65, color='GREEN') last_candle=CandleItem(low=352.0, high=354.0, open=352.65, close=353.1, color='GREEN') 2020-10-05 17:00:20 INFO: check need new order None 2020-10-05 17:00:20 INFO: init new order end 2020-10-05 17:00:20 INFO: 2020-10-05 17:00:20 INFO: 2020-10-05 17:00:20 INFO: 2020-10-05 17:00:20 INFO: 2020-10-05 17:02:00 INFO: 2020-10-05 17:02:00 INFO: 2020-10-05 17:02:00 INFO: 2020-10-05 17:02:00 INFO: 2020-10-05 17:02:00 INFO: clearing start 2020-10-05 17:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-05 17:02:00 INFO: skip by not found init order into storage 2020-10-05 17:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-05 17:02:00 INFO: skip by not found init order into storage 2020-10-05 17:02:00 INFO: clearing end 2020-10-05 17:02:00 INFO: 2020-10-05 17:02:00 INFO: 2020-10-05 17:02:00 INFO: 2020-10-05 17:02:00 INFO: 2020-10-05 18:00:20 INFO: 2020-10-05 18:00:20 INFO: 2020-10-05 18:00:20 INFO: 2020-10-05 18:00:20 INFO: 2020-10-05 18:00:20 INFO: init new order start 2020-10-05 18:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 5, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.1, 'high': 355.0, 'low': 351.65, 'close': 352.8, 'trades': 3622, 'volume': 2624867, 'vwap': 353.01, 'lastSize': 30, 'turnover': 92659396900, 'homeNotional': 28178.462400331366, 'foreignNotional': 9947183.09445862}, {'timestamp': datetime.datetime(2020, 10, 5, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.65, 'high': 354.0, 'low': 352.0, 'close': 353.1, 'trades': 3891, 'volume': 2660989, 'vwap': 352.97, 'lastSize': 10, 'turnover': 93924834255, 'homeNotional': 28512.822304606805, 'foreignNotional': 10064164.839426717}, {'timestamp': datetime.datetime(2020, 10, 5, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.5, 'high': 352.85, 'low': 349.7, 'close': 352.65, 'trades': 2955, 'volume': 2029062, 'vwap': 351.26, 'lastSize': 200, 'turnover': 71271528230, 'homeNotional': 21670.467210552146, 'foreignNotional': 7611847.221976902}] 2020-10-05 18:00:21 INFO: prepare candles [CandleItem(low=351.65, high=355.0, open=353.1, close=352.8, color='RED'), CandleItem(low=352.0, high=354.0, open=352.65, close=353.1, color='GREEN'), CandleItem(low=349.7, high=352.85, open=350.5, close=352.65, color='GREEN')] 2020-10-05 18:00:21 INFO: last_candle=CandleItem(low=351.65, high=355.0, open=353.1, close=352.8, color='RED') 2020-10-05 18:00:21 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-05 18:00:21 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=351.65, high=355.0, open=353.1, close=352.8, color='RED') 2020-10-05 18:00:21 INFO: skip by CandleItem(low=351.65, high=355.0, open=353.1, close=352.8, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-05 18:00:21 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-05 18:00:21 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=351.65, high=355.0, open=353.1, close=352.8, color='RED') 2020-10-05 18:00:21 INFO: skip by CandleItem(low=351.65, high=355.0, open=353.1, close=352.8, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-05 18:00:21 INFO: not found applicable config for candle 2020-10-05 18:00:21 INFO: check need new order None 2020-10-05 18:00:21 INFO: init new order end 2020-10-05 18:00:21 INFO: 2020-10-05 18:00:21 INFO: 2020-10-05 18:00:21 INFO: 2020-10-05 18:00:21 INFO: 2020-10-05 18:02:00 INFO: 2020-10-05 18:02:00 INFO: 2020-10-05 18:02:00 INFO: 2020-10-05 18:02:00 INFO: 2020-10-05 18:02:00 INFO: clearing start 2020-10-05 18:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-05 18:02:00 INFO: skip by not found init order into storage 2020-10-05 18:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-05 18:02:00 INFO: skip by not found init order into storage 2020-10-05 18:02:00 INFO: clearing end 2020-10-05 18:02:00 INFO: 2020-10-05 18:02:00 INFO: 2020-10-05 18:02:00 INFO: 2020-10-05 18:02:00 INFO: 2020-10-05 19:00:20 INFO: 2020-10-05 19:00:20 INFO: 2020-10-05 19:00:20 INFO: 2020-10-05 19:00:20 INFO: 2020-10-05 19:00:20 INFO: init new order start 2020-10-05 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 5, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.8, 'high': 353.6, 'low': 352.35, 'close': 352.75, 'trades': 1796, 'volume': 953062, 'vwap': 352.81, 'lastSize': 450, 'turnover': 33624919595, 'homeNotional': 10221.25358329647, 'foreignNotional': 3606155.2215867327}, {'timestamp': datetime.datetime(2020, 10, 5, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.1, 'high': 355.0, 'low': 351.65, 'close': 352.8, 'trades': 3622, 'volume': 2624867, 'vwap': 353.01, 'lastSize': 30, 'turnover': 92659396900, 'homeNotional': 28178.462400331366, 'foreignNotional': 9947183.09445862}, {'timestamp': datetime.datetime(2020, 10, 5, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.65, 'high': 354.0, 'low': 352.0, 'close': 353.1, 'trades': 3891, 'volume': 2660989, 'vwap': 352.97, 'lastSize': 10, 'turnover': 93924834255, 'homeNotional': 28512.822304606805, 'foreignNotional': 10064164.839426717}] 2020-10-05 19:00:20 INFO: prepare candles [CandleItem(low=352.35, high=353.6, open=352.8, close=352.75, color='RED'), CandleItem(low=351.65, high=355.0, open=353.1, close=352.8, color='RED'), CandleItem(low=352.0, high=354.0, open=352.65, close=353.1, color='GREEN')] 2020-10-05 19:00:20 INFO: skip by colors first_candle=CandleItem(low=352.0, high=354.0, open=352.65, close=353.1, color='GREEN') second_candle=CandleItem(low=351.65, high=355.0, open=353.1, close=352.8, color='RED') last_candle=CandleItem(low=352.35, high=353.6, open=352.8, close=352.75, color='RED') 2020-10-05 19:00:20 INFO: check need new order None 2020-10-05 19:00:20 INFO: init new order end 2020-10-05 19:00:20 INFO: 2020-10-05 19:00:20 INFO: 2020-10-05 19:00:20 INFO: 2020-10-05 19:00:20 INFO: 2020-10-05 19:02:00 INFO: 2020-10-05 19:02:00 INFO: 2020-10-05 19:02:00 INFO: 2020-10-05 19:02:00 INFO: 2020-10-05 19:02:00 INFO: clearing start 2020-10-05 19:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-05 19:02:00 INFO: skip by not found init order into storage 2020-10-05 19:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-05 19:02:00 INFO: skip by not found init order into storage 2020-10-05 19:02:00 INFO: clearing end 2020-10-05 19:02:00 INFO: 2020-10-05 19:02:00 INFO: 2020-10-05 19:02:00 INFO: 2020-10-05 19:02:00 INFO: 2020-10-05 20:00:20 INFO: 2020-10-05 20:00:20 INFO: 2020-10-05 20:00:20 INFO: 2020-10-05 20:00:20 INFO: 2020-10-05 20:00:20 INFO: init new order start 2020-10-05 20:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 5, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.75, 'high': 354.15, 'low': 351.95, 'close': 354.15, 'trades': 2107, 'volume': 1651000, 'vwap': 353.02, 'lastSize': 1, 'turnover': 58283289595, 'homeNotional': 17712.204574218027, 'foreignNotional': 6252740.533748265}, {'timestamp': datetime.datetime(2020, 10, 5, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.8, 'high': 353.6, 'low': 352.35, 'close': 352.75, 'trades': 1796, 'volume': 953062, 'vwap': 352.81, 'lastSize': 450, 'turnover': 33624919595, 'homeNotional': 10221.25358329647, 'foreignNotional': 3606155.2215867327}, {'timestamp': datetime.datetime(2020, 10, 5, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.1, 'high': 355.0, 'low': 351.65, 'close': 352.8, 'trades': 3622, 'volume': 2624867, 'vwap': 353.01, 'lastSize': 30, 'turnover': 92659396900, 'homeNotional': 28178.462400331366, 'foreignNotional': 9947183.09445862}] 2020-10-05 20:00:21 INFO: prepare candles [CandleItem(low=351.95, high=354.15, open=352.75, close=354.15, color='GREEN'), CandleItem(low=352.35, high=353.6, open=352.8, close=352.75, color='RED'), CandleItem(low=351.65, high=355.0, open=353.1, close=352.8, color='RED')] 2020-10-05 20:00:21 INFO: last_candle=CandleItem(low=351.95, high=354.15, open=352.75, close=354.15, color='GREEN') 2020-10-05 20:00:21 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-05 20:00:21 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=351.95, high=354.15, open=352.75, close=354.15, color='GREEN') 2020-10-05 20:00:21 INFO: skip by CandleItem(low=351.95, high=354.15, open=352.75, close=354.15, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-05 20:00:21 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-05 20:00:21 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=351.95, high=354.15, open=352.75, close=354.15, color='GREEN') 2020-10-05 20:00:21 INFO: skip by CandleItem(low=351.95, high=354.15, open=352.75, close=354.15, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-05 20:00:21 INFO: not found applicable config for candle 2020-10-05 20:00:21 INFO: check need new order None 2020-10-05 20:00:21 INFO: init new order end 2020-10-05 20:00:21 INFO: 2020-10-05 20:00:21 INFO: 2020-10-05 20:00:21 INFO: 2020-10-05 20:00:21 INFO: 2020-10-05 20:02:00 INFO: 2020-10-05 20:02:00 INFO: 2020-10-05 20:02:00 INFO: 2020-10-05 20:02:00 INFO: 2020-10-05 20:02:00 INFO: clearing start 2020-10-05 20:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-05 20:02:00 INFO: skip by not found init order into storage 2020-10-05 20:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-05 20:02:00 INFO: skip by not found init order into storage 2020-10-05 20:02:00 INFO: clearing end 2020-10-05 20:02:00 INFO: 2020-10-05 20:02:00 INFO: 2020-10-05 20:02:00 INFO: 2020-10-05 20:02:00 INFO: 2020-10-05 21:00:20 INFO: 2020-10-05 21:00:20 INFO: 2020-10-05 21:00:20 INFO: 2020-10-05 21:00:20 INFO: 2020-10-05 21:00:20 INFO: init new order start 2020-10-05 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 5, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.15, 'high': 354.2, 'low': 350.45, 'close': 350.75, 'trades': 2300, 'volume': 1737352, 'vwap': 352.03, 'lastSize': 300, 'turnover': 61158584750, 'homeNotional': 18626.167131420294, 'foreignNotional': 6556832.829842831}, {'timestamp': datetime.datetime(2020, 10, 5, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.75, 'high': 354.15, 'low': 351.95, 'close': 354.15, 'trades': 2107, 'volume': 1651000, 'vwap': 353.02, 'lastSize': 1, 'turnover': 58283289595, 'homeNotional': 17712.204574218027, 'foreignNotional': 6252740.533748265}, {'timestamp': datetime.datetime(2020, 10, 5, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.8, 'high': 353.6, 'low': 352.35, 'close': 352.75, 'trades': 1796, 'volume': 953062, 'vwap': 352.81, 'lastSize': 450, 'turnover': 33624919595, 'homeNotional': 10221.25358329647, 'foreignNotional': 3606155.2215867327}] 2020-10-05 21:00:20 INFO: prepare candles [CandleItem(low=350.45, high=354.2, open=354.15, close=350.75, color='RED'), CandleItem(low=351.95, high=354.15, open=352.75, close=354.15, color='GREEN'), CandleItem(low=352.35, high=353.6, open=352.8, close=352.75, color='RED')] 2020-10-05 21:00:20 INFO: skip by colors first_candle=CandleItem(low=352.35, high=353.6, open=352.8, close=352.75, color='RED') second_candle=CandleItem(low=351.95, high=354.15, open=352.75, close=354.15, color='GREEN') last_candle=CandleItem(low=350.45, high=354.2, open=354.15, close=350.75, color='RED') 2020-10-05 21:00:20 INFO: check need new order None 2020-10-05 21:00:20 INFO: init new order end 2020-10-05 21:00:20 INFO: 2020-10-05 21:00:20 INFO: 2020-10-05 21:00:20 INFO: 2020-10-05 21:00:20 INFO: 2020-10-05 21:02:00 INFO: 2020-10-05 21:02:00 INFO: 2020-10-05 21:02:00 INFO: 2020-10-05 21:02:00 INFO: 2020-10-05 21:02:00 INFO: clearing start 2020-10-05 21:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-05 21:02:00 INFO: skip by not found init order into storage 2020-10-05 21:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-05 21:02:00 INFO: skip by not found init order into storage 2020-10-05 21:02:00 INFO: clearing end 2020-10-05 21:02:00 INFO: 2020-10-05 21:02:00 INFO: 2020-10-05 21:02:00 INFO: 2020-10-05 21:02:00 INFO: 2020-10-05 22:00:20 INFO: 2020-10-05 22:00:20 INFO: 2020-10-05 22:00:20 INFO: 2020-10-05 22:00:20 INFO: 2020-10-05 22:00:20 INFO: init new order start 2020-10-05 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 5, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.75, 'high': 351.65, 'low': 349.45, 'close': 351.65, 'trades': 2503, 'volume': 1428833, 'vwap': 350.53, 'lastSize': 30, 'turnover': 50084432000, 'homeNotional': 15281.466819093615, 'foreignNotional': 5356568.545495282}, {'timestamp': datetime.datetime(2020, 10, 5, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.15, 'high': 354.2, 'low': 350.45, 'close': 350.75, 'trades': 2300, 'volume': 1737352, 'vwap': 352.03, 'lastSize': 300, 'turnover': 61158584750, 'homeNotional': 18626.167131420294, 'foreignNotional': 6556832.829842831}, {'timestamp': datetime.datetime(2020, 10, 5, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.75, 'high': 354.15, 'low': 351.95, 'close': 354.15, 'trades': 2107, 'volume': 1651000, 'vwap': 353.02, 'lastSize': 1, 'turnover': 58283289595, 'homeNotional': 17712.204574218027, 'foreignNotional': 6252740.533748265}] 2020-10-05 22:00:20 INFO: prepare candles [CandleItem(low=349.45, high=351.65, open=350.75, close=351.65, color='GREEN'), CandleItem(low=350.45, high=354.2, open=354.15, close=350.75, color='RED'), CandleItem(low=351.95, high=354.15, open=352.75, close=354.15, color='GREEN')] 2020-10-05 22:00:20 INFO: skip by colors first_candle=CandleItem(low=351.95, high=354.15, open=352.75, close=354.15, color='GREEN') second_candle=CandleItem(low=350.45, high=354.2, open=354.15, close=350.75, color='RED') last_candle=CandleItem(low=349.45, high=351.65, open=350.75, close=351.65, color='GREEN') 2020-10-05 22:00:20 INFO: check need new order None 2020-10-05 22:00:20 INFO: init new order end 2020-10-05 22:00:20 INFO: 2020-10-05 22:00:20 INFO: 2020-10-05 22:00:20 INFO: 2020-10-05 22:00:20 INFO: 2020-10-05 22:02:00 INFO: 2020-10-05 22:02:00 INFO: 2020-10-05 22:02:00 INFO: 2020-10-05 22:02:00 INFO: 2020-10-05 22:02:00 INFO: clearing start 2020-10-05 22:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-05 22:02:00 INFO: skip by not found init order into storage 2020-10-05 22:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-05 22:02:00 INFO: skip by not found init order into storage 2020-10-05 22:02:00 INFO: clearing end 2020-10-05 22:02:00 INFO: 2020-10-05 22:02:00 INFO: 2020-10-05 22:02:00 INFO: 2020-10-05 22:02:00 INFO: 2020-10-05 23:00:20 INFO: 2020-10-05 23:00:20 INFO: 2020-10-05 23:00:20 INFO: 2020-10-05 23:00:20 INFO: 2020-10-05 23:00:20 INFO: init new order start 2020-10-05 23:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 5, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.65, 'high': 352.3, 'low': 351.6, 'close': 351.75, 'trades': 1335, 'volume': 975853, 'vwap': 351.99, 'lastSize': 48, 'turnover': 34348637000, 'homeNotional': 10473.185234840477, 'foreignNotional': 3686412.189254921}, {'timestamp': datetime.datetime(2020, 10, 5, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.75, 'high': 351.65, 'low': 349.45, 'close': 351.65, 'trades': 2503, 'volume': 1428833, 'vwap': 350.53, 'lastSize': 30, 'turnover': 50084432000, 'homeNotional': 15281.466819093615, 'foreignNotional': 5356568.545495282}, {'timestamp': datetime.datetime(2020, 10, 5, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.15, 'high': 354.2, 'low': 350.45, 'close': 350.75, 'trades': 2300, 'volume': 1737352, 'vwap': 352.03, 'lastSize': 300, 'turnover': 61158584750, 'homeNotional': 18626.167131420294, 'foreignNotional': 6556832.829842831}] 2020-10-05 23:00:21 INFO: prepare candles [CandleItem(low=351.6, high=352.3, open=351.65, close=351.75, color='GREEN'), CandleItem(low=349.45, high=351.65, open=350.75, close=351.65, color='GREEN'), CandleItem(low=350.45, high=354.2, open=354.15, close=350.75, color='RED')] 2020-10-05 23:00:21 INFO: skip by colors first_candle=CandleItem(low=350.45, high=354.2, open=354.15, close=350.75, color='RED') second_candle=CandleItem(low=349.45, high=351.65, open=350.75, close=351.65, color='GREEN') last_candle=CandleItem(low=351.6, high=352.3, open=351.65, close=351.75, color='GREEN') 2020-10-05 23:00:21 INFO: check need new order None 2020-10-05 23:00:21 INFO: init new order end 2020-10-05 23:00:21 INFO: 2020-10-05 23:00:21 INFO: 2020-10-05 23:00:21 INFO: 2020-10-05 23:00:21 INFO: 2020-10-05 23:02:00 INFO: 2020-10-05 23:02:00 INFO: 2020-10-05 23:02:00 INFO: 2020-10-05 23:02:00 INFO: 2020-10-05 23:02:00 INFO: clearing start 2020-10-05 23:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-05 23:02:00 INFO: skip by not found init order into storage 2020-10-05 23:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-05 23:02:00 INFO: skip by not found init order into storage 2020-10-05 23:02:00 INFO: clearing end 2020-10-05 23:02:00 INFO: 2020-10-05 23:02:00 INFO: 2020-10-05 23:02:00 INFO: 2020-10-05 23:02:00 INFO: 2020-10-06 00:00:20 INFO: 2020-10-06 00:00:20 INFO: 2020-10-06 00:00:20 INFO: 2020-10-06 00:00:20 INFO: 2020-10-06 00:00:20 INFO: init new order start 2020-10-06 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 5, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.75, 'high': 352.5, 'low': 351.6, 'close': 351.75, 'trades': 1517, 'volume': 1101806, 'vwap': 352.02, 'lastSize': 50, 'turnover': 38785636430, 'homeNotional': 11833.201312518475, 'foreignNotional': 4165508.7790416493}, {'timestamp': datetime.datetime(2020, 10, 5, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.65, 'high': 352.3, 'low': 351.6, 'close': 351.75, 'trades': 1335, 'volume': 975853, 'vwap': 351.99, 'lastSize': 48, 'turnover': 34348637000, 'homeNotional': 10473.185234840477, 'foreignNotional': 3686412.189254921}, {'timestamp': datetime.datetime(2020, 10, 5, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.75, 'high': 351.65, 'low': 349.45, 'close': 351.65, 'trades': 2503, 'volume': 1428833, 'vwap': 350.53, 'lastSize': 30, 'turnover': 50084432000, 'homeNotional': 15281.466819093615, 'foreignNotional': 5356568.545495282}] 2020-10-06 00:00:20 INFO: skip by found empty buckets 2020-10-06 00:00:20 INFO: check need new order None 2020-10-06 00:00:20 INFO: init new order end 2020-10-06 00:00:20 INFO: 2020-10-06 00:00:20 INFO: 2020-10-06 00:00:20 INFO: 2020-10-06 00:00:20 INFO: 2020-10-06 00:02:00 INFO: 2020-10-06 00:02:00 INFO: 2020-10-06 00:02:00 INFO: 2020-10-06 00:02:00 INFO: 2020-10-06 00:02:00 INFO: clearing start 2020-10-06 00:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-06 00:02:00 INFO: skip by not found init order into storage 2020-10-06 00:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-06 00:02:00 INFO: skip by not found init order into storage 2020-10-06 00:02:00 INFO: clearing end 2020-10-06 00:02:00 INFO: 2020-10-06 00:02:00 INFO: 2020-10-06 00:02:00 INFO: 2020-10-06 00:02:00 INFO: 2020-10-06 01:00:20 INFO: 2020-10-06 01:00:20 INFO: 2020-10-06 01:00:20 INFO: 2020-10-06 01:00:20 INFO: 2020-10-06 01:00:20 INFO: init new order start 2020-10-06 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 5, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.75, 'high': 353.2, 'low': 351.7, 'close': 352.6, 'trades': 1280, 'volume': 652826, 'vwap': 352.66, 'lastSize': 100, 'turnover': 23021971255, 'homeNotional': 7017.82723565587, 'foreignNotional': 2474844.8776452006}, {'timestamp': datetime.datetime(2020, 10, 5, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.75, 'high': 352.5, 'low': 351.6, 'close': 351.75, 'trades': 1517, 'volume': 1101806, 'vwap': 352.02, 'lastSize': 50, 'turnover': 38785636430, 'homeNotional': 11833.201312518475, 'foreignNotional': 4165508.7790416493}, {'timestamp': datetime.datetime(2020, 10, 5, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.65, 'high': 352.3, 'low': 351.6, 'close': 351.75, 'trades': 1335, 'volume': 975853, 'vwap': 351.99, 'lastSize': 48, 'turnover': 34348637000, 'homeNotional': 10473.185234840477, 'foreignNotional': 3686412.189254921}] 2020-10-06 01:00:20 INFO: skip by found empty buckets 2020-10-06 01:00:20 INFO: check need new order None 2020-10-06 01:00:20 INFO: init new order end 2020-10-06 01:00:20 INFO: 2020-10-06 01:00:20 INFO: 2020-10-06 01:00:20 INFO: 2020-10-06 01:00:20 INFO: 2020-10-06 01:02:00 INFO: 2020-10-06 01:02:00 INFO: 2020-10-06 01:02:00 INFO: 2020-10-06 01:02:00 INFO: 2020-10-06 01:02:00 INFO: clearing start 2020-10-06 01:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-06 01:02:00 INFO: skip by not found init order into storage 2020-10-06 01:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-06 01:02:00 INFO: skip by not found init order into storage 2020-10-06 01:02:00 INFO: clearing end 2020-10-06 01:02:00 INFO: 2020-10-06 01:02:00 INFO: 2020-10-06 01:02:00 INFO: 2020-10-06 01:02:00 INFO: 2020-10-06 02:00:20 INFO: 2020-10-06 02:00:20 INFO: 2020-10-06 02:00:20 INFO: 2020-10-06 02:00:20 INFO: 2020-10-06 02:00:20 INFO: init new order start 2020-10-06 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 5, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.6, 'high': 353.75, 'low': 352.05, 'close': 352.3, 'trades': 1840, 'volume': 1060565, 'vwap': 353.03, 'lastSize': 10, 'turnover': 37440712240, 'homeNotional': 11407.546718707335, 'foreignNotional': 4027162.1613667924}, {'timestamp': datetime.datetime(2020, 10, 5, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.75, 'high': 353.2, 'low': 351.7, 'close': 352.6, 'trades': 1280, 'volume': 652826, 'vwap': 352.66, 'lastSize': 100, 'turnover': 23021971255, 'homeNotional': 7017.82723565587, 'foreignNotional': 2474844.8776452006}, {'timestamp': datetime.datetime(2020, 10, 5, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.75, 'high': 352.5, 'low': 351.6, 'close': 351.75, 'trades': 1517, 'volume': 1101806, 'vwap': 352.02, 'lastSize': 50, 'turnover': 38785636430, 'homeNotional': 11833.201312518475, 'foreignNotional': 4165508.7790416493}] 2020-10-06 02:00:20 INFO: skip by found empty buckets 2020-10-06 02:00:20 INFO: check need new order None 2020-10-06 02:00:20 INFO: init new order end 2020-10-06 02:00:20 INFO: 2020-10-06 02:00:20 INFO: 2020-10-06 02:00:20 INFO: 2020-10-06 02:00:20 INFO: 2020-10-06 02:02:00 INFO: 2020-10-06 02:02:00 INFO: 2020-10-06 02:02:00 INFO: 2020-10-06 02:02:00 INFO: 2020-10-06 02:02:00 INFO: clearing start 2020-10-06 02:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-06 02:02:00 INFO: skip by not found init order into storage 2020-10-06 02:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-06 02:02:00 INFO: skip by not found init order into storage 2020-10-06 02:02:00 INFO: clearing end 2020-10-06 02:02:00 INFO: 2020-10-06 02:02:00 INFO: 2020-10-06 02:02:00 INFO: 2020-10-06 02:02:00 INFO: 2020-10-06 02:38:23 ERROR: Error : Connection is already closed. 2020-10-06 02:38:23 ERROR: error from callback >: Connection is already closed. 2020-10-06 02:38:23 INFO: Websocket Closed 2020-10-06 02:38:24 WARNING: reconnect to socket 2020-10-06 02:38:24 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-10-06 02:38:24 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-10-06 02:38:24 INFO: Authenticating with API Key. 2020-10-06 02:38:25 INFO: Connected to WS. 2020-10-06 03:00:20 INFO: 2020-10-06 03:00:20 INFO: 2020-10-06 03:00:20 INFO: 2020-10-06 03:00:20 INFO: 2020-10-06 03:00:20 INFO: init new order start 2020-10-06 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 6, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.3, 'high': 354.25, 'low': 352.05, 'close': 353.9, 'trades': 2629, 'volume': 1153986, 'vwap': 353.27, 'lastSize': 524, 'turnover': 40766221145, 'homeNotional': 12428.26371582335, 'foreignNotional': 4390475.972396633}, {'timestamp': datetime.datetime(2020, 10, 5, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.6, 'high': 353.75, 'low': 352.05, 'close': 352.3, 'trades': 1840, 'volume': 1060565, 'vwap': 353.03, 'lastSize': 10, 'turnover': 37440712240, 'homeNotional': 11407.546718707335, 'foreignNotional': 4027162.1613667924}, {'timestamp': datetime.datetime(2020, 10, 5, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.75, 'high': 353.2, 'low': 351.7, 'close': 352.6, 'trades': 1280, 'volume': 652826, 'vwap': 352.66, 'lastSize': 100, 'turnover': 23021971255, 'homeNotional': 7017.82723565587, 'foreignNotional': 2474844.8776452006}] 2020-10-06 03:00:20 INFO: prepare candles [CandleItem(low=352.05, high=354.25, open=352.3, close=353.9, color='GREEN'), CandleItem(low=352.05, high=353.75, open=352.6, close=352.3, color='RED'), CandleItem(low=351.7, high=353.2, open=351.75, close=352.6, color='GREEN')] 2020-10-06 03:00:20 INFO: skip by colors first_candle=CandleItem(low=351.7, high=353.2, open=351.75, close=352.6, color='GREEN') second_candle=CandleItem(low=352.05, high=353.75, open=352.6, close=352.3, color='RED') last_candle=CandleItem(low=352.05, high=354.25, open=352.3, close=353.9, color='GREEN') 2020-10-06 03:00:20 INFO: check need new order None 2020-10-06 03:00:20 INFO: init new order end 2020-10-06 03:00:20 INFO: 2020-10-06 03:00:20 INFO: 2020-10-06 03:00:20 INFO: 2020-10-06 03:00:20 INFO: 2020-10-06 03:02:00 INFO: 2020-10-06 03:02:00 INFO: 2020-10-06 03:02:00 INFO: 2020-10-06 03:02:00 INFO: 2020-10-06 03:02:00 INFO: clearing start 2020-10-06 03:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-06 03:02:00 INFO: skip by not found init order into storage 2020-10-06 03:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-06 03:02:00 INFO: skip by not found init order into storage 2020-10-06 03:02:00 INFO: clearing end 2020-10-06 03:02:00 INFO: 2020-10-06 03:02:00 INFO: 2020-10-06 03:02:00 INFO: 2020-10-06 03:02:00 INFO: 2020-10-06 04:00:20 INFO: 2020-10-06 04:00:20 INFO: 2020-10-06 04:00:20 INFO: 2020-10-06 04:00:20 INFO: 2020-10-06 04:00:20 INFO: init new order start 2020-10-06 04:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 6, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.9, 'high': 355.55, 'low': 352.25, 'close': 352.85, 'trades': 4805, 'volume': 3172462, 'vwap': 354.32, 'lastSize': 11, 'turnover': 112404612330, 'homeNotional': 34209.136587960194, 'foreignNotional': 12120811.54442182}, {'timestamp': datetime.datetime(2020, 10, 6, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.3, 'high': 354.25, 'low': 352.05, 'close': 353.9, 'trades': 2629, 'volume': 1153986, 'vwap': 353.27, 'lastSize': 524, 'turnover': 40766221145, 'homeNotional': 12428.26371582335, 'foreignNotional': 4390475.972396633}, {'timestamp': datetime.datetime(2020, 10, 5, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.6, 'high': 353.75, 'low': 352.05, 'close': 352.3, 'trades': 1840, 'volume': 1060565, 'vwap': 353.03, 'lastSize': 10, 'turnover': 37440712240, 'homeNotional': 11407.546718707335, 'foreignNotional': 4027162.1613667924}] 2020-10-06 04:00:20 INFO: prepare candles [CandleItem(low=352.25, high=355.55, open=353.9, close=352.85, color='RED'), CandleItem(low=352.05, high=354.25, open=352.3, close=353.9, color='GREEN'), CandleItem(low=352.05, high=353.75, open=352.6, close=352.3, color='RED')] 2020-10-06 04:00:20 INFO: skip by colors first_candle=CandleItem(low=352.05, high=353.75, open=352.6, close=352.3, color='RED') second_candle=CandleItem(low=352.05, high=354.25, open=352.3, close=353.9, color='GREEN') last_candle=CandleItem(low=352.25, high=355.55, open=353.9, close=352.85, color='RED') 2020-10-06 04:00:20 INFO: check need new order None 2020-10-06 04:00:20 INFO: init new order end 2020-10-06 04:00:20 INFO: 2020-10-06 04:00:20 INFO: 2020-10-06 04:00:20 INFO: 2020-10-06 04:00:20 INFO: 2020-10-06 04:02:00 INFO: 2020-10-06 04:02:00 INFO: 2020-10-06 04:02:00 INFO: 2020-10-06 04:02:00 INFO: 2020-10-06 04:02:00 INFO: clearing start 2020-10-06 04:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-06 04:02:00 INFO: skip by not found init order into storage 2020-10-06 04:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-06 04:02:00 INFO: skip by not found init order into storage 2020-10-06 04:02:00 INFO: clearing end 2020-10-06 04:02:00 INFO: 2020-10-06 04:02:00 INFO: 2020-10-06 04:02:00 INFO: 2020-10-06 04:02:00 INFO: 2020-10-06 05:00:20 INFO: 2020-10-06 05:00:20 INFO: 2020-10-06 05:00:20 INFO: 2020-10-06 05:00:20 INFO: 2020-10-06 05:00:20 INFO: init new order start 2020-10-06 05:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 6, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.85, 'high': 353.25, 'low': 352.3, 'close': 353.05, 'trades': 1137, 'volume': 1072952, 'vwap': 352.86, 'lastSize': 1, 'turnover': 37859360870, 'homeNotional': 11548.512838800458, 'foreignNotional': 4074921.171388017}, {'timestamp': datetime.datetime(2020, 10, 6, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.9, 'high': 355.55, 'low': 352.25, 'close': 352.85, 'trades': 4805, 'volume': 3172462, 'vwap': 354.32, 'lastSize': 11, 'turnover': 112404612330, 'homeNotional': 34209.136587960194, 'foreignNotional': 12120811.54442182}, {'timestamp': datetime.datetime(2020, 10, 6, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.3, 'high': 354.25, 'low': 352.05, 'close': 353.9, 'trades': 2629, 'volume': 1153986, 'vwap': 353.27, 'lastSize': 524, 'turnover': 40766221145, 'homeNotional': 12428.26371582335, 'foreignNotional': 4390475.972396633}] 2020-10-06 05:00:20 INFO: prepare candles [CandleItem(low=352.3, high=353.25, open=352.85, close=353.05, color='GREEN'), CandleItem(low=352.25, high=355.55, open=353.9, close=352.85, color='RED'), CandleItem(low=352.05, high=354.25, open=352.3, close=353.9, color='GREEN')] 2020-10-06 05:00:20 INFO: skip by colors first_candle=CandleItem(low=352.05, high=354.25, open=352.3, close=353.9, color='GREEN') second_candle=CandleItem(low=352.25, high=355.55, open=353.9, close=352.85, color='RED') last_candle=CandleItem(low=352.3, high=353.25, open=352.85, close=353.05, color='GREEN') 2020-10-06 05:00:20 INFO: check need new order None 2020-10-06 05:00:20 INFO: init new order end 2020-10-06 05:00:20 INFO: 2020-10-06 05:00:20 INFO: 2020-10-06 05:00:20 INFO: 2020-10-06 05:00:20 INFO: 2020-10-06 05:02:00 INFO: 2020-10-06 05:02:00 INFO: 2020-10-06 05:02:00 INFO: 2020-10-06 05:02:00 INFO: 2020-10-06 05:02:00 INFO: clearing start 2020-10-06 05:02:01 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-06 05:02:01 INFO: skip by not found init order into storage 2020-10-06 05:02:01 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-06 05:02:01 INFO: skip by not found init order into storage 2020-10-06 05:02:01 INFO: clearing end 2020-10-06 05:02:01 INFO: 2020-10-06 05:02:01 INFO: 2020-10-06 05:02:01 INFO: 2020-10-06 05:02:01 INFO: 2020-10-06 06:00:20 INFO: 2020-10-06 06:00:20 INFO: 2020-10-06 06:00:20 INFO: 2020-10-06 06:00:20 INFO: 2020-10-06 06:00:20 INFO: init new order start 2020-10-06 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 6, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.05, 'high': 354.75, 'low': 353.1, 'close': 353.85, 'trades': 1942, 'volume': 1271199, 'vwap': 354.24, 'lastSize': 1, 'turnover': 45030868305, 'homeNotional': 13698.004132068234, 'foreignNotional': 4852374.106761877}, {'timestamp': datetime.datetime(2020, 10, 6, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.85, 'high': 353.25, 'low': 352.3, 'close': 353.05, 'trades': 1137, 'volume': 1072952, 'vwap': 352.86, 'lastSize': 1, 'turnover': 37859360870, 'homeNotional': 11548.512838800458, 'foreignNotional': 4074921.171388017}, {'timestamp': datetime.datetime(2020, 10, 6, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.9, 'high': 355.55, 'low': 352.25, 'close': 352.85, 'trades': 4805, 'volume': 3172462, 'vwap': 354.32, 'lastSize': 11, 'turnover': 112404612330, 'homeNotional': 34209.136587960194, 'foreignNotional': 12120811.54442182}] 2020-10-06 06:00:20 INFO: prepare candles [CandleItem(low=353.1, high=354.75, open=353.05, close=353.85, color='GREEN'), CandleItem(low=352.3, high=353.25, open=352.85, close=353.05, color='GREEN'), CandleItem(low=352.25, high=355.55, open=353.9, close=352.85, color='RED')] 2020-10-06 06:00:20 INFO: skip by colors first_candle=CandleItem(low=352.25, high=355.55, open=353.9, close=352.85, color='RED') second_candle=CandleItem(low=352.3, high=353.25, open=352.85, close=353.05, color='GREEN') last_candle=CandleItem(low=353.1, high=354.75, open=353.05, close=353.85, color='GREEN') 2020-10-06 06:00:20 INFO: check need new order None 2020-10-06 06:00:20 INFO: init new order end 2020-10-06 06:00:20 INFO: 2020-10-06 06:00:20 INFO: 2020-10-06 06:00:20 INFO: 2020-10-06 06:00:20 INFO: 2020-10-06 06:02:00 INFO: 2020-10-06 06:02:00 INFO: 2020-10-06 06:02:00 INFO: 2020-10-06 06:02:00 INFO: 2020-10-06 06:02:00 INFO: clearing start 2020-10-06 06:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-06 06:02:00 INFO: skip by not found init order into storage 2020-10-06 06:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-06 06:02:00 INFO: skip by not found init order into storage 2020-10-06 06:02:00 INFO: clearing end 2020-10-06 06:02:00 INFO: 2020-10-06 06:02:00 INFO: 2020-10-06 06:02:00 INFO: 2020-10-06 06:02:00 INFO: 2020-10-06 07:00:20 INFO: 2020-10-06 07:00:20 INFO: 2020-10-06 07:00:20 INFO: 2020-10-06 07:00:20 INFO: 2020-10-06 07:00:20 INFO: init new order start 2020-10-06 07:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 6, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.85, 'high': 354.7, 'low': 353.15, 'close': 354.0, 'trades': 1436, 'volume': 1010858, 'vwap': 354.0, 'lastSize': 1, 'turnover': 35783738515, 'homeNotional': 10892.838367912755, 'foreignNotional': 3855999.8824516092}, {'timestamp': datetime.datetime(2020, 10, 6, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.05, 'high': 354.75, 'low': 353.1, 'close': 353.85, 'trades': 1942, 'volume': 1271199, 'vwap': 354.24, 'lastSize': 1, 'turnover': 45030868305, 'homeNotional': 13698.004132068234, 'foreignNotional': 4852374.106761877}, {'timestamp': datetime.datetime(2020, 10, 6, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.85, 'high': 353.25, 'low': 352.3, 'close': 353.05, 'trades': 1137, 'volume': 1072952, 'vwap': 352.86, 'lastSize': 1, 'turnover': 37859360870, 'homeNotional': 11548.512838800458, 'foreignNotional': 4074921.171388017}] 2020-10-06 07:00:21 INFO: prepare candles [CandleItem(low=353.15, high=354.7, open=353.85, close=354.0, color='GREEN'), CandleItem(low=353.1, high=354.75, open=353.05, close=353.85, color='GREEN'), CandleItem(low=352.3, high=353.25, open=352.85, close=353.05, color='GREEN')] 2020-10-06 07:00:21 INFO: skip by colors first_candle=CandleItem(low=352.3, high=353.25, open=352.85, close=353.05, color='GREEN') second_candle=CandleItem(low=353.1, high=354.75, open=353.05, close=353.85, color='GREEN') last_candle=CandleItem(low=353.15, high=354.7, open=353.85, close=354.0, color='GREEN') 2020-10-06 07:00:21 INFO: check need new order None 2020-10-06 07:00:21 INFO: init new order end 2020-10-06 07:00:21 INFO: 2020-10-06 07:00:21 INFO: 2020-10-06 07:00:21 INFO: 2020-10-06 07:00:21 INFO: 2020-10-06 07:02:00 INFO: 2020-10-06 07:02:00 INFO: 2020-10-06 07:02:00 INFO: 2020-10-06 07:02:00 INFO: 2020-10-06 07:02:00 INFO: clearing start 2020-10-06 07:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-06 07:02:00 INFO: skip by not found init order into storage 2020-10-06 07:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-06 07:02:00 INFO: skip by not found init order into storage 2020-10-06 07:02:00 INFO: clearing end 2020-10-06 07:02:00 INFO: 2020-10-06 07:02:00 INFO: 2020-10-06 07:02:00 INFO: 2020-10-06 07:02:00 INFO: 2020-10-06 08:00:20 INFO: 2020-10-06 08:00:20 INFO: 2020-10-06 08:00:20 INFO: 2020-10-06 08:00:20 INFO: 2020-10-06 08:00:20 INFO: init new order start 2020-10-06 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 6, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.0, 'high': 355.25, 'low': 354.0, 'close': 354.4, 'trades': 1645, 'volume': 1185189, 'vwap': 354.61, 'lastSize': 1, 'turnover': 42027222160, 'homeNotional': 12773.082507684596, 'foreignNotional': 4529381.781482471}, {'timestamp': datetime.datetime(2020, 10, 6, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.85, 'high': 354.7, 'low': 353.15, 'close': 354.0, 'trades': 1436, 'volume': 1010858, 'vwap': 354.0, 'lastSize': 1, 'turnover': 35783738515, 'homeNotional': 10892.838367912755, 'foreignNotional': 3855999.8824516092}, {'timestamp': datetime.datetime(2020, 10, 6, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.05, 'high': 354.75, 'low': 353.1, 'close': 353.85, 'trades': 1942, 'volume': 1271199, 'vwap': 354.24, 'lastSize': 1, 'turnover': 45030868305, 'homeNotional': 13698.004132068234, 'foreignNotional': 4852374.106761877}] 2020-10-06 08:00:20 INFO: prepare candles [CandleItem(low=354.0, high=355.25, open=354.0, close=354.4, color='GREEN'), CandleItem(low=353.15, high=354.7, open=353.85, close=354.0, color='GREEN'), CandleItem(low=353.1, high=354.75, open=353.05, close=353.85, color='GREEN')] 2020-10-06 08:00:20 INFO: skip by colors first_candle=CandleItem(low=353.1, high=354.75, open=353.05, close=353.85, color='GREEN') second_candle=CandleItem(low=353.15, high=354.7, open=353.85, close=354.0, color='GREEN') last_candle=CandleItem(low=354.0, high=355.25, open=354.0, close=354.4, color='GREEN') 2020-10-06 08:00:20 INFO: check need new order None 2020-10-06 08:00:20 INFO: init new order end 2020-10-06 08:00:20 INFO: 2020-10-06 08:00:20 INFO: 2020-10-06 08:00:20 INFO: 2020-10-06 08:00:20 INFO: 2020-10-06 08:02:00 INFO: 2020-10-06 08:02:00 INFO: 2020-10-06 08:02:00 INFO: 2020-10-06 08:02:00 INFO: 2020-10-06 08:02:00 INFO: clearing start 2020-10-06 08:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-06 08:02:00 INFO: skip by not found init order into storage 2020-10-06 08:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-06 08:02:00 INFO: skip by not found init order into storage 2020-10-06 08:02:00 INFO: clearing end 2020-10-06 08:02:00 INFO: 2020-10-06 08:02:00 INFO: 2020-10-06 08:02:00 INFO: 2020-10-06 08:02:00 INFO: 2020-10-06 09:00:20 INFO: 2020-10-06 09:00:20 INFO: 2020-10-06 09:00:20 INFO: 2020-10-06 09:00:20 INFO: 2020-10-06 09:00:20 INFO: init new order start 2020-10-06 09:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 6, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.4, 'high': 354.45, 'low': 353.2, 'close': 354.05, 'trades': 1977, 'volume': 1365168, 'vwap': 353.58, 'lastSize': 11, 'turnover': 48268962230, 'homeNotional': 14682.766058815954, 'foreignNotional': 5191464.05910489}, {'timestamp': datetime.datetime(2020, 10, 6, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.0, 'high': 355.25, 'low': 354.0, 'close': 354.4, 'trades': 1645, 'volume': 1185189, 'vwap': 354.61, 'lastSize': 1, 'turnover': 42027222160, 'homeNotional': 12773.082507684596, 'foreignNotional': 4529381.781482471}, {'timestamp': datetime.datetime(2020, 10, 6, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.85, 'high': 354.7, 'low': 353.15, 'close': 354.0, 'trades': 1436, 'volume': 1010858, 'vwap': 354.0, 'lastSize': 1, 'turnover': 35783738515, 'homeNotional': 10892.838367912755, 'foreignNotional': 3855999.8824516092}] 2020-10-06 09:00:20 INFO: prepare candles [CandleItem(low=353.2, high=354.45, open=354.4, close=354.05, color='RED'), CandleItem(low=354.0, high=355.25, open=354.0, close=354.4, color='GREEN'), CandleItem(low=353.15, high=354.7, open=353.85, close=354.0, color='GREEN')] 2020-10-06 09:00:20 INFO: last_candle=CandleItem(low=353.2, high=354.45, open=354.4, close=354.05, color='RED') 2020-10-06 09:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-06 09:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=353.2, high=354.45, open=354.4, close=354.05, color='RED') 2020-10-06 09:00:20 INFO: skip by CandleItem(low=353.2, high=354.45, open=354.4, close=354.05, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-06 09:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-06 09:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=353.2, high=354.45, open=354.4, close=354.05, color='RED') 2020-10-06 09:00:20 INFO: skip by CandleItem(low=353.2, high=354.45, open=354.4, close=354.05, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-06 09:00:20 INFO: not found applicable config for candle 2020-10-06 09:00:20 INFO: check need new order None 2020-10-06 09:00:20 INFO: init new order end 2020-10-06 09:00:20 INFO: 2020-10-06 09:00:20 INFO: 2020-10-06 09:00:20 INFO: 2020-10-06 09:00:20 INFO: 2020-10-06 09:02:00 INFO: 2020-10-06 09:02:00 INFO: 2020-10-06 09:02:00 INFO: 2020-10-06 09:02:00 INFO: 2020-10-06 09:02:00 INFO: clearing start 2020-10-06 09:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-06 09:02:00 INFO: skip by not found init order into storage 2020-10-06 09:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-06 09:02:00 INFO: skip by not found init order into storage 2020-10-06 09:02:00 INFO: clearing end 2020-10-06 09:02:00 INFO: 2020-10-06 09:02:00 INFO: 2020-10-06 09:02:00 INFO: 2020-10-06 09:02:00 INFO: 2020-10-06 10:00:20 INFO: 2020-10-06 10:00:20 INFO: 2020-10-06 10:00:20 INFO: 2020-10-06 10:00:20 INFO: 2020-10-06 10:00:20 INFO: init new order start 2020-10-06 10:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 6, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.05, 'high': 354.2, 'low': 352.8, 'close': 353.35, 'trades': 1437, 'volume': 839124, 'vwap': 353.39, 'lastSize': 1, 'turnover': 29653005170, 'homeNotional': 9016.59497622407, 'foreignNotional': 3186290.079511674}, {'timestamp': datetime.datetime(2020, 10, 6, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.4, 'high': 354.45, 'low': 353.2, 'close': 354.05, 'trades': 1977, 'volume': 1365168, 'vwap': 353.58, 'lastSize': 11, 'turnover': 48268962230, 'homeNotional': 14682.766058815954, 'foreignNotional': 5191464.05910489}, {'timestamp': datetime.datetime(2020, 10, 6, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.0, 'high': 355.25, 'low': 354.0, 'close': 354.4, 'trades': 1645, 'volume': 1185189, 'vwap': 354.61, 'lastSize': 1, 'turnover': 42027222160, 'homeNotional': 12773.082507684596, 'foreignNotional': 4529381.781482471}] 2020-10-06 10:00:21 INFO: prepare candles [CandleItem(low=352.8, high=354.2, open=354.05, close=353.35, color='RED'), CandleItem(low=353.2, high=354.45, open=354.4, close=354.05, color='RED'), CandleItem(low=354.0, high=355.25, open=354.0, close=354.4, color='GREEN')] 2020-10-06 10:00:21 INFO: skip by colors first_candle=CandleItem(low=354.0, high=355.25, open=354.0, close=354.4, color='GREEN') second_candle=CandleItem(low=353.2, high=354.45, open=354.4, close=354.05, color='RED') last_candle=CandleItem(low=352.8, high=354.2, open=354.05, close=353.35, color='RED') 2020-10-06 10:00:21 INFO: check need new order None 2020-10-06 10:00:21 INFO: init new order end 2020-10-06 10:00:21 INFO: 2020-10-06 10:00:21 INFO: 2020-10-06 10:00:21 INFO: 2020-10-06 10:00:21 INFO: 2020-10-06 10:02:00 INFO: 2020-10-06 10:02:00 INFO: 2020-10-06 10:02:00 INFO: 2020-10-06 10:02:00 INFO: 2020-10-06 10:02:00 INFO: clearing start 2020-10-06 10:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-06 10:02:00 INFO: skip by not found init order into storage 2020-10-06 10:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-06 10:02:00 INFO: skip by not found init order into storage 2020-10-06 10:02:00 INFO: clearing end 2020-10-06 10:02:00 INFO: 2020-10-06 10:02:00 INFO: 2020-10-06 10:02:00 INFO: 2020-10-06 10:02:00 INFO: 2020-10-06 11:00:20 INFO: 2020-10-06 11:00:20 INFO: 2020-10-06 11:00:20 INFO: 2020-10-06 11:00:20 INFO: 2020-10-06 11:00:20 INFO: init new order start 2020-10-06 11:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 6, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.35, 'high': 353.85, 'low': 350.45, 'close': 350.5, 'trades': 3175, 'volume': 2473553, 'vwap': 351.84, 'lastSize': 64, 'turnover': 87027642120, 'homeNotional': 26564.050941680274, 'foreignNotional': 9346133.238251964}, {'timestamp': datetime.datetime(2020, 10, 6, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.05, 'high': 354.2, 'low': 352.8, 'close': 353.35, 'trades': 1437, 'volume': 839124, 'vwap': 353.39, 'lastSize': 1, 'turnover': 29653005170, 'homeNotional': 9016.59497622407, 'foreignNotional': 3186290.079511674}, {'timestamp': datetime.datetime(2020, 10, 6, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.4, 'high': 354.45, 'low': 353.2, 'close': 354.05, 'trades': 1977, 'volume': 1365168, 'vwap': 353.58, 'lastSize': 11, 'turnover': 48268962230, 'homeNotional': 14682.766058815954, 'foreignNotional': 5191464.05910489}] 2020-10-06 11:00:21 INFO: prepare candles [CandleItem(low=350.45, high=353.85, open=353.35, close=350.5, color='RED'), CandleItem(low=352.8, high=354.2, open=354.05, close=353.35, color='RED'), CandleItem(low=353.2, high=354.45, open=354.4, close=354.05, color='RED')] 2020-10-06 11:00:21 INFO: skip by colors first_candle=CandleItem(low=353.2, high=354.45, open=354.4, close=354.05, color='RED') second_candle=CandleItem(low=352.8, high=354.2, open=354.05, close=353.35, color='RED') last_candle=CandleItem(low=350.45, high=353.85, open=353.35, close=350.5, color='RED') 2020-10-06 11:00:21 INFO: check need new order None 2020-10-06 11:00:21 INFO: init new order end 2020-10-06 11:00:21 INFO: 2020-10-06 11:00:21 INFO: 2020-10-06 11:00:21 INFO: 2020-10-06 11:00:21 INFO: 2020-10-06 11:02:00 INFO: 2020-10-06 11:02:00 INFO: 2020-10-06 11:02:00 INFO: 2020-10-06 11:02:00 INFO: 2020-10-06 11:02:00 INFO: clearing start 2020-10-06 11:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-06 11:02:00 INFO: skip by not found init order into storage 2020-10-06 11:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-06 11:02:00 INFO: skip by not found init order into storage 2020-10-06 11:02:00 INFO: clearing end 2020-10-06 11:02:00 INFO: 2020-10-06 11:02:00 INFO: 2020-10-06 11:02:00 INFO: 2020-10-06 11:02:00 INFO: 2020-10-06 12:00:20 INFO: 2020-10-06 12:00:20 INFO: 2020-10-06 12:00:20 INFO: 2020-10-06 12:00:20 INFO: 2020-10-06 12:00:20 INFO: init new order start 2020-10-06 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 6, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.5, 'high': 352.25, 'low': 349.5, 'close': 352.2, 'trades': 4032, 'volume': 2513844, 'vwap': 350.72, 'lastSize': 1320, 'turnover': 88163747625, 'homeNotional': 26944.94568603915, 'foreignNotional': 9449955.881930484}, {'timestamp': datetime.datetime(2020, 10, 6, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.35, 'high': 353.85, 'low': 350.45, 'close': 350.5, 'trades': 3175, 'volume': 2473553, 'vwap': 351.84, 'lastSize': 64, 'turnover': 87027642120, 'homeNotional': 26564.050941680274, 'foreignNotional': 9346133.238251964}, {'timestamp': datetime.datetime(2020, 10, 6, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.05, 'high': 354.2, 'low': 352.8, 'close': 353.35, 'trades': 1437, 'volume': 839124, 'vwap': 353.39, 'lastSize': 1, 'turnover': 29653005170, 'homeNotional': 9016.59497622407, 'foreignNotional': 3186290.079511674}] 2020-10-06 12:00:20 INFO: prepare candles [CandleItem(low=349.5, high=352.25, open=350.5, close=352.2, color='GREEN'), CandleItem(low=350.45, high=353.85, open=353.35, close=350.5, color='RED'), CandleItem(low=352.8, high=354.2, open=354.05, close=353.35, color='RED')] 2020-10-06 12:00:20 INFO: last_candle=CandleItem(low=349.5, high=352.25, open=350.5, close=352.2, color='GREEN') 2020-10-06 12:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-06 12:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=349.5, high=352.25, open=350.5, close=352.2, color='GREEN') 2020-10-06 12:00:20 INFO: skip by CandleItem(low=349.5, high=352.25, open=350.5, close=352.2, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-06 12:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-06 12:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=349.5, high=352.25, open=350.5, close=352.2, color='GREEN') 2020-10-06 12:00:20 INFO: skip by CandleItem(low=349.5, high=352.25, open=350.5, close=352.2, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-06 12:00:20 INFO: not found applicable config for candle 2020-10-06 12:00:20 INFO: check need new order None 2020-10-06 12:00:20 INFO: init new order end 2020-10-06 12:00:20 INFO: 2020-10-06 12:00:20 INFO: 2020-10-06 12:00:20 INFO: 2020-10-06 12:00:20 INFO: 2020-10-06 12:02:00 INFO: 2020-10-06 12:02:00 INFO: 2020-10-06 12:02:00 INFO: 2020-10-06 12:02:00 INFO: 2020-10-06 12:02:00 INFO: clearing start 2020-10-06 12:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-06 12:02:00 INFO: skip by not found init order into storage 2020-10-06 12:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-06 12:02:00 INFO: skip by not found init order into storage 2020-10-06 12:02:00 INFO: clearing end 2020-10-06 12:02:00 INFO: 2020-10-06 12:02:00 INFO: 2020-10-06 12:02:00 INFO: 2020-10-06 12:02:00 INFO: 2020-10-06 13:00:20 INFO: 2020-10-06 13:00:20 INFO: 2020-10-06 13:00:20 INFO: 2020-10-06 13:00:20 INFO: 2020-10-06 13:00:20 INFO: init new order start 2020-10-06 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 6, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.2, 'high': 352.9, 'low': 352.05, 'close': 352.85, 'trades': 1117, 'volume': 1059155, 'vwap': 352.48, 'lastSize': 30, 'turnover': 37332591070, 'homeNotional': 11377.357434225543, 'foreignNotional': 4010237.46048435}, {'timestamp': datetime.datetime(2020, 10, 6, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.5, 'high': 352.25, 'low': 349.5, 'close': 352.2, 'trades': 4032, 'volume': 2513844, 'vwap': 350.72, 'lastSize': 1320, 'turnover': 88163747625, 'homeNotional': 26944.94568603915, 'foreignNotional': 9449955.881930484}, {'timestamp': datetime.datetime(2020, 10, 6, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.35, 'high': 353.85, 'low': 350.45, 'close': 350.5, 'trades': 3175, 'volume': 2473553, 'vwap': 351.84, 'lastSize': 64, 'turnover': 87027642120, 'homeNotional': 26564.050941680274, 'foreignNotional': 9346133.238251964}] 2020-10-06 13:00:20 INFO: prepare candles [CandleItem(low=352.05, high=352.9, open=352.2, close=352.85, color='GREEN'), CandleItem(low=349.5, high=352.25, open=350.5, close=352.2, color='GREEN'), CandleItem(low=350.45, high=353.85, open=353.35, close=350.5, color='RED')] 2020-10-06 13:00:20 INFO: skip by colors first_candle=CandleItem(low=350.45, high=353.85, open=353.35, close=350.5, color='RED') second_candle=CandleItem(low=349.5, high=352.25, open=350.5, close=352.2, color='GREEN') last_candle=CandleItem(low=352.05, high=352.9, open=352.2, close=352.85, color='GREEN') 2020-10-06 13:00:20 INFO: check need new order None 2020-10-06 13:00:20 INFO: init new order end 2020-10-06 13:00:20 INFO: 2020-10-06 13:00:20 INFO: 2020-10-06 13:00:20 INFO: 2020-10-06 13:00:20 INFO: 2020-10-06 13:02:00 INFO: 2020-10-06 13:02:00 INFO: 2020-10-06 13:02:00 INFO: 2020-10-06 13:02:00 INFO: 2020-10-06 13:02:00 INFO: clearing start 2020-10-06 13:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': None, 'displayQty': None, 'stopPx': 346.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 65000, tzinfo=tzutc())} 2020-10-06 13:02:00 INFO: skip by not found init order into storage 2020-10-06 13:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1086, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc())} 2020-10-06 13:02:00 INFO: skip by not found init order into storage 2020-10-06 13:02:00 INFO: clearing end 2020-10-06 13:02:00 INFO: 2020-10-06 13:02:00 INFO: 2020-10-06 13:02:00 INFO: 2020-10-06 13:02:00 INFO: 2020-10-06 14:00:16 INFO: process event {'orderID': 'f35f61e5-4de9-4c41-8fb5-be776cc15fc8', 'price': 346.25, 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 1086, 'avgPx': 346.25, 'text': 'Triggered: Order stop price reached\nStop order by trader.py', 'transactTime': '2020-10-06T11:00:16.208Z', 'timestamp': '2020-10-06T11:00:16.208Z', 'clOrdID': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'account': 605536, 'symbol': 'ETHUSD'} 2020-10-06 14:00:16 INFO: add new event={'uid': '0e3c8fd50fda4d5cbe3957ec2e64e0d3', 'status': 'Filled'} 2020-10-06 14:00:16 INFO: 2020-10-06 14:00:16 INFO: 2020-10-06 14:00:16 INFO: 2020-10-06 14:00:16 INFO: 2020-10-06 14:00:16 INFO: process event start 2020-10-06 14:00:16 INFO: fetch new order event 0e3c8fd50fda4d5cbe3957ec2e64e0d3 2020-10-06 14:00:16 INFO: fetch orders by event init=None profit_pair=574d2341155840dea12e4bdc51049805 2020-10-06 14:00:16 INFO: process profit order filled 2020-10-06 14:00:17 INFO: process event {'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'ordStatus': 'Canceled', 'workingIndicator': False, 'leavesQty': 0, 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'timestamp': '2020-10-06T11:00:17.803Z', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'account': 605536, 'symbol': 'ETHUSD'} 2020-10-06 14:00:17 INFO: skip event 574d2341155840dea12e4bdc51049805 Canceled 2020-10-06 14:00:17 INFO: cancel order=574d2341155840dea12e4bdc51049805 [{'orderID': 'f2feb95d-855f-418d-924d-2e4755d12dc3', 'clOrdID': '574d2341155840dea12e4bdc51049805', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1086, 'price': 358.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'Canceled', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 0, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 4, 12, 58, 13, 100000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 6, 11, 0, 17, 803000, tzinfo=tzutc())}] 2020-10-06 14:00:17 INFO: end process event_processing_result='proceed profit order' 2020-10-06 14:00:17 INFO: 2020-10-06 14:00:17 INFO: 2020-10-06 14:00:17 INFO: 2020-10-06 14:00:17 INFO: 2020-10-06 14:00:20 INFO: 2020-10-06 14:00:20 INFO: 2020-10-06 14:00:20 INFO: 2020-10-06 14:00:20 INFO: 2020-10-06 14:00:20 INFO: init new order start 2020-10-06 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 6, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.85, 'high': 352.9, 'low': 350.0, 'close': 350.0, 'trades': 2822, 'volume': 2197905, 'vwap': 351.4, 'lastSize': 13, 'turnover': 77232928410, 'homeNotional': 23572.086273388068, 'foreignNotional': 8283093.567682731}, {'timestamp': datetime.datetime(2020, 10, 6, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.2, 'high': 352.9, 'low': 352.05, 'close': 352.85, 'trades': 1117, 'volume': 1059155, 'vwap': 352.48, 'lastSize': 30, 'turnover': 37332591070, 'homeNotional': 11377.357434225543, 'foreignNotional': 4010237.46048435}, {'timestamp': datetime.datetime(2020, 10, 6, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.5, 'high': 352.25, 'low': 349.5, 'close': 352.2, 'trades': 4032, 'volume': 2513844, 'vwap': 350.72, 'lastSize': 1320, 'turnover': 88163747625, 'homeNotional': 26944.94568603915, 'foreignNotional': 9449955.881930484}] 2020-10-06 14:00:20 INFO: prepare candles [CandleItem(low=350.0, high=352.9, open=352.85, close=350.0, color='RED'), CandleItem(low=352.05, high=352.9, open=352.2, close=352.85, color='GREEN'), CandleItem(low=349.5, high=352.25, open=350.5, close=352.2, color='GREEN')] 2020-10-06 14:00:20 INFO: last_candle=CandleItem(low=350.0, high=352.9, open=352.85, close=350.0, color='RED') 2020-10-06 14:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-06 14:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=350.0, high=352.9, open=352.85, close=350.0, color='RED') 2020-10-06 14:00:20 INFO: skip by CandleItem(low=350.0, high=352.9, open=352.85, close=350.0, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-06 14:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-06 14:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=350.0, high=352.9, open=352.85, close=350.0, color='RED') 2020-10-06 14:00:20 INFO: skip by CandleItem(low=350.0, high=352.9, open=352.85, close=350.0, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-06 14:00:20 INFO: not found applicable config for candle 2020-10-06 14:00:20 INFO: check need new order None 2020-10-06 14:00:20 INFO: init new order end 2020-10-06 14:00:20 INFO: 2020-10-06 14:00:20 INFO: 2020-10-06 14:00:20 INFO: 2020-10-06 14:00:20 INFO: 2020-10-06 14:02:00 INFO: 2020-10-06 14:02:00 INFO: 2020-10-06 14:02:00 INFO: 2020-10-06 14:02:00 INFO: 2020-10-06 14:02:00 INFO: clearing start 2020-10-06 14:02:01 INFO: clearing end 2020-10-06 14:02:01 INFO: 2020-10-06 14:02:01 INFO: 2020-10-06 14:02:01 INFO: 2020-10-06 14:02:01 INFO: 2020-10-06 15:00:20 INFO: 2020-10-06 15:00:20 INFO: 2020-10-06 15:00:20 INFO: 2020-10-06 15:00:20 INFO: 2020-10-06 15:00:20 INFO: init new order start 2020-10-06 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 6, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.0, 'high': 349.95, 'low': 343.6, 'close': 346.0, 'trades': 10763, 'volume': 7005511, 'vwap': 345.89, 'lastSize': 71, 'turnover': 242307119190, 'homeNotional': 74832.91207878912, 'foreignNotional': 25883311.422279872}, {'timestamp': datetime.datetime(2020, 10, 6, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.85, 'high': 352.9, 'low': 350.0, 'close': 350.0, 'trades': 2822, 'volume': 2197905, 'vwap': 351.4, 'lastSize': 13, 'turnover': 77232928410, 'homeNotional': 23572.086273388068, 'foreignNotional': 8283093.567682731}, {'timestamp': datetime.datetime(2020, 10, 6, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.2, 'high': 352.9, 'low': 352.05, 'close': 352.85, 'trades': 1117, 'volume': 1059155, 'vwap': 352.48, 'lastSize': 30, 'turnover': 37332591070, 'homeNotional': 11377.357434225543, 'foreignNotional': 4010237.46048435}] 2020-10-06 15:00:20 INFO: prepare candles [CandleItem(low=343.6, high=349.95, open=350.0, close=346.0, color='RED'), CandleItem(low=350.0, high=352.9, open=352.85, close=350.0, color='RED'), CandleItem(low=352.05, high=352.9, open=352.2, close=352.85, color='GREEN')] 2020-10-06 15:00:20 INFO: skip by colors first_candle=CandleItem(low=352.05, high=352.9, open=352.2, close=352.85, color='GREEN') second_candle=CandleItem(low=350.0, high=352.9, open=352.85, close=350.0, color='RED') last_candle=CandleItem(low=343.6, high=349.95, open=350.0, close=346.0, color='RED') 2020-10-06 15:00:20 INFO: check need new order None 2020-10-06 15:00:20 INFO: init new order end 2020-10-06 15:00:20 INFO: 2020-10-06 15:00:20 INFO: 2020-10-06 15:00:20 INFO: 2020-10-06 15:00:20 INFO: 2020-10-06 15:02:00 INFO: 2020-10-06 15:02:00 INFO: 2020-10-06 15:02:00 INFO: 2020-10-06 15:02:00 INFO: 2020-10-06 15:02:00 INFO: clearing start 2020-10-06 15:02:00 INFO: clearing end 2020-10-06 15:02:00 INFO: 2020-10-06 15:02:00 INFO: 2020-10-06 15:02:00 INFO: 2020-10-06 15:02:00 INFO: 2020-10-06 16:00:20 INFO: 2020-10-06 16:00:20 INFO: 2020-10-06 16:00:20 INFO: 2020-10-06 16:00:20 INFO: 2020-10-06 16:00:20 INFO: init new order start 2020-10-06 16:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 6, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.0, 'high': 346.9, 'low': 344.25, 'close': 345.75, 'trades': 4032, 'volume': 3053813, 'vwap': 345.87, 'lastSize': 12, 'turnover': 105619500885, 'homeNotional': 32689.47987473263, 'foreignNotional': 11306037.60722142}, {'timestamp': datetime.datetime(2020, 10, 6, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.0, 'high': 349.95, 'low': 343.6, 'close': 346.0, 'trades': 10763, 'volume': 7005511, 'vwap': 345.89, 'lastSize': 71, 'turnover': 242307119190, 'homeNotional': 74832.91207878912, 'foreignNotional': 25883311.422279872}, {'timestamp': datetime.datetime(2020, 10, 6, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.85, 'high': 352.9, 'low': 350.0, 'close': 350.0, 'trades': 2822, 'volume': 2197905, 'vwap': 351.4, 'lastSize': 13, 'turnover': 77232928410, 'homeNotional': 23572.086273388068, 'foreignNotional': 8283093.567682731}] 2020-10-06 16:00:20 INFO: prepare candles [CandleItem(low=344.25, high=346.9, open=346.0, close=345.75, color='RED'), CandleItem(low=343.6, high=349.95, open=350.0, close=346.0, color='RED'), CandleItem(low=350.0, high=352.9, open=352.85, close=350.0, color='RED')] 2020-10-06 16:00:20 INFO: skip by colors first_candle=CandleItem(low=350.0, high=352.9, open=352.85, close=350.0, color='RED') second_candle=CandleItem(low=343.6, high=349.95, open=350.0, close=346.0, color='RED') last_candle=CandleItem(low=344.25, high=346.9, open=346.0, close=345.75, color='RED') 2020-10-06 16:00:20 INFO: check need new order None 2020-10-06 16:00:20 INFO: init new order end 2020-10-06 16:00:20 INFO: 2020-10-06 16:00:20 INFO: 2020-10-06 16:00:20 INFO: 2020-10-06 16:00:20 INFO: 2020-10-06 16:02:00 INFO: 2020-10-06 16:02:00 INFO: 2020-10-06 16:02:00 INFO: 2020-10-06 16:02:00 INFO: 2020-10-06 16:02:00 INFO: clearing start 2020-10-06 16:02:00 INFO: clearing end 2020-10-06 16:02:00 INFO: 2020-10-06 16:02:00 INFO: 2020-10-06 16:02:00 INFO: 2020-10-06 16:02:00 INFO: 2020-10-06 17:00:20 INFO: 2020-10-06 17:00:20 INFO: 2020-10-06 17:00:20 INFO: 2020-10-06 17:00:20 INFO: 2020-10-06 17:00:20 INFO: init new order start 2020-10-06 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 6, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 345.75, 'high': 347.35, 'low': 344.7, 'close': 345.0, 'trades': 3058, 'volume': 2285459, 'vwap': 346.04, 'lastSize': 816, 'turnover': 79085371265, 'homeNotional': 24454.87762290133, 'foreignNotional': 8462317.409669697}, {'timestamp': datetime.datetime(2020, 10, 6, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.0, 'high': 346.9, 'low': 344.25, 'close': 345.75, 'trades': 4032, 'volume': 3053813, 'vwap': 345.87, 'lastSize': 12, 'turnover': 105619500885, 'homeNotional': 32689.47987473263, 'foreignNotional': 11306037.60722142}, {'timestamp': datetime.datetime(2020, 10, 6, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.0, 'high': 349.95, 'low': 343.6, 'close': 346.0, 'trades': 10763, 'volume': 7005511, 'vwap': 345.89, 'lastSize': 71, 'turnover': 242307119190, 'homeNotional': 74832.91207878912, 'foreignNotional': 25883311.422279872}] 2020-10-06 17:00:20 INFO: prepare candles [CandleItem(low=344.7, high=347.35, open=345.75, close=345.0, color='RED'), CandleItem(low=344.25, high=346.9, open=346.0, close=345.75, color='RED'), CandleItem(low=343.6, high=349.95, open=350.0, close=346.0, color='RED')] 2020-10-06 17:00:20 INFO: skip by colors first_candle=CandleItem(low=343.6, high=349.95, open=350.0, close=346.0, color='RED') second_candle=CandleItem(low=344.25, high=346.9, open=346.0, close=345.75, color='RED') last_candle=CandleItem(low=344.7, high=347.35, open=345.75, close=345.0, color='RED') 2020-10-06 17:00:20 INFO: check need new order None 2020-10-06 17:00:20 INFO: init new order end 2020-10-06 17:00:20 INFO: 2020-10-06 17:00:20 INFO: 2020-10-06 17:00:20 INFO: 2020-10-06 17:00:20 INFO: 2020-10-06 17:02:00 INFO: 2020-10-06 17:02:00 INFO: 2020-10-06 17:02:00 INFO: 2020-10-06 17:02:00 INFO: 2020-10-06 17:02:00 INFO: clearing start 2020-10-06 17:02:00 INFO: clearing end 2020-10-06 17:02:00 INFO: 2020-10-06 17:02:00 INFO: 2020-10-06 17:02:00 INFO: 2020-10-06 17:02:00 INFO: 2020-10-06 18:00:20 INFO: 2020-10-06 18:00:20 INFO: 2020-10-06 18:00:20 INFO: 2020-10-06 18:00:20 INFO: 2020-10-06 18:00:20 INFO: init new order start 2020-10-06 18:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 6, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 345.0, 'high': 346.6, 'low': 343.95, 'close': 344.4, 'trades': 3859, 'volume': 2947048, 'vwap': 345.11, 'lastSize': 13, 'turnover': 101705043180, 'homeNotional': 31474.488656960282, 'foreignNotional': 10862126.731761228}, {'timestamp': datetime.datetime(2020, 10, 6, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 345.75, 'high': 347.35, 'low': 344.7, 'close': 345.0, 'trades': 3058, 'volume': 2285459, 'vwap': 346.04, 'lastSize': 816, 'turnover': 79085371265, 'homeNotional': 24454.87762290133, 'foreignNotional': 8462317.409669697}, {'timestamp': datetime.datetime(2020, 10, 6, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.0, 'high': 346.9, 'low': 344.25, 'close': 345.75, 'trades': 4032, 'volume': 3053813, 'vwap': 345.87, 'lastSize': 12, 'turnover': 105619500885, 'homeNotional': 32689.47987473263, 'foreignNotional': 11306037.60722142}] 2020-10-06 18:00:20 INFO: prepare candles [CandleItem(low=343.95, high=346.6, open=345.0, close=344.4, color='RED'), CandleItem(low=344.7, high=347.35, open=345.75, close=345.0, color='RED'), CandleItem(low=344.25, high=346.9, open=346.0, close=345.75, color='RED')] 2020-10-06 18:00:20 INFO: skip by colors first_candle=CandleItem(low=344.25, high=346.9, open=346.0, close=345.75, color='RED') second_candle=CandleItem(low=344.7, high=347.35, open=345.75, close=345.0, color='RED') last_candle=CandleItem(low=343.95, high=346.6, open=345.0, close=344.4, color='RED') 2020-10-06 18:00:20 INFO: check need new order None 2020-10-06 18:00:20 INFO: init new order end 2020-10-06 18:00:20 INFO: 2020-10-06 18:00:20 INFO: 2020-10-06 18:00:20 INFO: 2020-10-06 18:00:20 INFO: 2020-10-06 18:02:00 INFO: 2020-10-06 18:02:00 INFO: 2020-10-06 18:02:00 INFO: 2020-10-06 18:02:00 INFO: 2020-10-06 18:02:00 INFO: clearing start 2020-10-06 18:02:00 INFO: clearing end 2020-10-06 18:02:00 INFO: 2020-10-06 18:02:00 INFO: 2020-10-06 18:02:00 INFO: 2020-10-06 18:02:00 INFO: 2020-10-06 19:00:20 INFO: 2020-10-06 19:00:20 INFO: 2020-10-06 19:00:20 INFO: 2020-10-06 19:00:20 INFO: 2020-10-06 19:00:20 INFO: init new order start 2020-10-06 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 6, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 344.4, 'high': 354.45, 'low': 340.5, 'close': 351.85, 'trades': 15078, 'volume': 10223706, 'vwap': 347.24, 'lastSize': 10, 'turnover': 355005205035, 'homeNotional': 109312.9065333561, 'foreignNotional': 37958981.17621463}, {'timestamp': datetime.datetime(2020, 10, 6, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 345.0, 'high': 346.6, 'low': 343.95, 'close': 344.4, 'trades': 3859, 'volume': 2947048, 'vwap': 345.11, 'lastSize': 13, 'turnover': 101705043180, 'homeNotional': 31474.488656960282, 'foreignNotional': 10862126.731761228}, {'timestamp': datetime.datetime(2020, 10, 6, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 345.75, 'high': 347.35, 'low': 344.7, 'close': 345.0, 'trades': 3058, 'volume': 2285459, 'vwap': 346.04, 'lastSize': 816, 'turnover': 79085371265, 'homeNotional': 24454.87762290133, 'foreignNotional': 8462317.409669697}] 2020-10-06 19:00:20 INFO: prepare candles [CandleItem(low=340.5, high=354.45, open=344.4, close=351.85, color='GREEN'), CandleItem(low=343.95, high=346.6, open=345.0, close=344.4, color='RED'), CandleItem(low=344.7, high=347.35, open=345.75, close=345.0, color='RED')] 2020-10-06 19:00:20 INFO: last_candle=CandleItem(low=340.5, high=354.45, open=344.4, close=351.85, color='GREEN') 2020-10-06 19:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-06 19:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=340.5, high=354.45, open=344.4, close=351.85, color='GREEN') 2020-10-06 19:00:20 INFO: skip by CandleItem(low=340.5, high=354.45, open=344.4, close=351.85, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-06 19:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-06 19:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=340.5, high=354.45, open=344.4, close=351.85, color='GREEN') 2020-10-06 19:00:20 INFO: skip by CandleItem(low=340.5, high=354.45, open=344.4, close=351.85, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-06 19:00:20 INFO: not found applicable config for candle 2020-10-06 19:00:20 INFO: check need new order None 2020-10-06 19:00:20 INFO: init new order end 2020-10-06 19:00:20 INFO: 2020-10-06 19:00:20 INFO: 2020-10-06 19:00:20 INFO: 2020-10-06 19:00:20 INFO: 2020-10-06 19:02:00 INFO: 2020-10-06 19:02:00 INFO: 2020-10-06 19:02:00 INFO: 2020-10-06 19:02:00 INFO: 2020-10-06 19:02:00 INFO: clearing start 2020-10-06 19:02:00 INFO: clearing end 2020-10-06 19:02:00 INFO: 2020-10-06 19:02:00 INFO: 2020-10-06 19:02:00 INFO: 2020-10-06 19:02:00 INFO: 2020-10-06 20:00:20 INFO: 2020-10-06 20:00:20 INFO: 2020-10-06 20:00:20 INFO: 2020-10-06 20:00:20 INFO: 2020-10-06 20:00:20 INFO: init new order start 2020-10-06 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 6, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.85, 'high': 352.85, 'low': 349.9, 'close': 350.2, 'trades': 5920, 'volume': 3753861, 'vwap': 351.04, 'lastSize': 295, 'turnover': 131774910025, 'homeNotional': 40276.209398807914, 'foreignNotional': 14138506.272235407}, {'timestamp': datetime.datetime(2020, 10, 6, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 344.4, 'high': 354.45, 'low': 340.5, 'close': 351.85, 'trades': 15078, 'volume': 10223706, 'vwap': 347.24, 'lastSize': 10, 'turnover': 355005205035, 'homeNotional': 109312.9065333561, 'foreignNotional': 37958981.17621463}, {'timestamp': datetime.datetime(2020, 10, 6, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 345.0, 'high': 346.6, 'low': 343.95, 'close': 344.4, 'trades': 3859, 'volume': 2947048, 'vwap': 345.11, 'lastSize': 13, 'turnover': 101705043180, 'homeNotional': 31474.488656960282, 'foreignNotional': 10862126.731761228}] 2020-10-06 20:00:20 INFO: prepare candles [CandleItem(low=349.9, high=352.85, open=351.85, close=350.2, color='RED'), CandleItem(low=340.5, high=354.45, open=344.4, close=351.85, color='GREEN'), CandleItem(low=343.95, high=346.6, open=345.0, close=344.4, color='RED')] 2020-10-06 20:00:20 INFO: skip by colors first_candle=CandleItem(low=343.95, high=346.6, open=345.0, close=344.4, color='RED') second_candle=CandleItem(low=340.5, high=354.45, open=344.4, close=351.85, color='GREEN') last_candle=CandleItem(low=349.9, high=352.85, open=351.85, close=350.2, color='RED') 2020-10-06 20:00:20 INFO: check need new order None 2020-10-06 20:00:20 INFO: init new order end 2020-10-06 20:00:20 INFO: 2020-10-06 20:00:20 INFO: 2020-10-06 20:00:20 INFO: 2020-10-06 20:00:20 INFO: 2020-10-06 20:02:00 INFO: 2020-10-06 20:02:00 INFO: 2020-10-06 20:02:00 INFO: 2020-10-06 20:02:00 INFO: 2020-10-06 20:02:00 INFO: clearing start 2020-10-06 20:02:01 INFO: clearing end 2020-10-06 20:02:01 INFO: 2020-10-06 20:02:01 INFO: 2020-10-06 20:02:01 INFO: 2020-10-06 20:02:01 INFO: 2020-10-06 21:00:20 INFO: 2020-10-06 21:00:20 INFO: 2020-10-06 21:00:20 INFO: 2020-10-06 21:00:20 INFO: 2020-10-06 21:00:20 INFO: init new order start 2020-10-06 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 6, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.2, 'high': 350.65, 'low': 348.5, 'close': 348.85, 'trades': 3325, 'volume': 2669592, 'vwap': 349.53, 'lastSize': 12, 'turnover': 93308581625, 'homeNotional': 28604.779042028873, 'foreignNotional': 9998056.09844029}, {'timestamp': datetime.datetime(2020, 10, 6, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.85, 'high': 352.85, 'low': 349.9, 'close': 350.2, 'trades': 5920, 'volume': 3753861, 'vwap': 351.04, 'lastSize': 295, 'turnover': 131774910025, 'homeNotional': 40276.209398807914, 'foreignNotional': 14138506.272235407}, {'timestamp': datetime.datetime(2020, 10, 6, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 344.4, 'high': 354.45, 'low': 340.5, 'close': 351.85, 'trades': 15078, 'volume': 10223706, 'vwap': 347.24, 'lastSize': 10, 'turnover': 355005205035, 'homeNotional': 109312.9065333561, 'foreignNotional': 37958981.17621463}] 2020-10-06 21:00:20 INFO: prepare candles [CandleItem(low=348.5, high=350.65, open=350.2, close=348.85, color='RED'), CandleItem(low=349.9, high=352.85, open=351.85, close=350.2, color='RED'), CandleItem(low=340.5, high=354.45, open=344.4, close=351.85, color='GREEN')] 2020-10-06 21:00:20 INFO: skip by colors first_candle=CandleItem(low=340.5, high=354.45, open=344.4, close=351.85, color='GREEN') second_candle=CandleItem(low=349.9, high=352.85, open=351.85, close=350.2, color='RED') last_candle=CandleItem(low=348.5, high=350.65, open=350.2, close=348.85, color='RED') 2020-10-06 21:00:20 INFO: check need new order None 2020-10-06 21:00:20 INFO: init new order end 2020-10-06 21:00:20 INFO: 2020-10-06 21:00:20 INFO: 2020-10-06 21:00:20 INFO: 2020-10-06 21:00:20 INFO: 2020-10-06 21:02:00 INFO: 2020-10-06 21:02:00 INFO: 2020-10-06 21:02:00 INFO: 2020-10-06 21:02:00 INFO: 2020-10-06 21:02:00 INFO: clearing start 2020-10-06 21:02:00 INFO: clearing end 2020-10-06 21:02:00 INFO: 2020-10-06 21:02:00 INFO: 2020-10-06 21:02:00 INFO: 2020-10-06 21:02:00 INFO: 2020-10-06 22:00:20 INFO: 2020-10-06 22:00:20 INFO: 2020-10-06 22:00:20 INFO: 2020-10-06 22:00:20 INFO: 2020-10-06 22:00:20 INFO: init new order start 2020-10-06 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 6, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.85, 'high': 350.15, 'low': 341.55, 'close': 342.8, 'trades': 6057, 'volume': 4779253, 'vwap': 345.73, 'lastSize': 165, 'turnover': 165232661965, 'homeNotional': 50945.19641311905, 'foreignNotional': 17613790.54841906}, {'timestamp': datetime.datetime(2020, 10, 6, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.2, 'high': 350.65, 'low': 348.5, 'close': 348.85, 'trades': 3325, 'volume': 2669592, 'vwap': 349.53, 'lastSize': 12, 'turnover': 93308581625, 'homeNotional': 28604.779042028873, 'foreignNotional': 9998056.09844029}, {'timestamp': datetime.datetime(2020, 10, 6, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.85, 'high': 352.85, 'low': 349.9, 'close': 350.2, 'trades': 5920, 'volume': 3753861, 'vwap': 351.04, 'lastSize': 295, 'turnover': 131774910025, 'homeNotional': 40276.209398807914, 'foreignNotional': 14138506.272235407}] 2020-10-06 22:00:20 INFO: prepare candles [CandleItem(low=341.55, high=350.15, open=348.85, close=342.8, color='RED'), CandleItem(low=348.5, high=350.65, open=350.2, close=348.85, color='RED'), CandleItem(low=349.9, high=352.85, open=351.85, close=350.2, color='RED')] 2020-10-06 22:00:20 INFO: skip by colors first_candle=CandleItem(low=349.9, high=352.85, open=351.85, close=350.2, color='RED') second_candle=CandleItem(low=348.5, high=350.65, open=350.2, close=348.85, color='RED') last_candle=CandleItem(low=341.55, high=350.15, open=348.85, close=342.8, color='RED') 2020-10-06 22:00:20 INFO: check need new order None 2020-10-06 22:00:20 INFO: init new order end 2020-10-06 22:00:20 INFO: 2020-10-06 22:00:20 INFO: 2020-10-06 22:00:20 INFO: 2020-10-06 22:00:20 INFO: 2020-10-06 22:02:00 INFO: 2020-10-06 22:02:00 INFO: 2020-10-06 22:02:00 INFO: 2020-10-06 22:02:00 INFO: 2020-10-06 22:02:00 INFO: clearing start 2020-10-06 22:02:00 INFO: clearing end 2020-10-06 22:02:00 INFO: 2020-10-06 22:02:00 INFO: 2020-10-06 22:02:00 INFO: 2020-10-06 22:02:00 INFO: 2020-10-06 23:00:20 INFO: 2020-10-06 23:00:20 INFO: 2020-10-06 23:00:20 INFO: 2020-10-06 23:00:20 INFO: 2020-10-06 23:00:20 INFO: init new order start 2020-10-06 23:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 6, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 342.8, 'high': 342.85, 'low': 338.85, 'close': 340.05, 'trades': 9421, 'volume': 6586800, 'vwap': 340.85, 'lastSize': 3, 'turnover': 224508195965, 'homeNotional': 69622.28291603788, 'foreignNotional': 23730518.940837357}, {'timestamp': datetime.datetime(2020, 10, 6, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.85, 'high': 350.15, 'low': 341.55, 'close': 342.8, 'trades': 6057, 'volume': 4779253, 'vwap': 345.73, 'lastSize': 165, 'turnover': 165232661965, 'homeNotional': 50945.19641311905, 'foreignNotional': 17613790.54841906}, {'timestamp': datetime.datetime(2020, 10, 6, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.2, 'high': 350.65, 'low': 348.5, 'close': 348.85, 'trades': 3325, 'volume': 2669592, 'vwap': 349.53, 'lastSize': 12, 'turnover': 93308581625, 'homeNotional': 28604.779042028873, 'foreignNotional': 9998056.09844029}] 2020-10-06 23:00:20 INFO: prepare candles [CandleItem(low=338.85, high=342.85, open=342.8, close=340.05, color='RED'), CandleItem(low=341.55, high=350.15, open=348.85, close=342.8, color='RED'), CandleItem(low=348.5, high=350.65, open=350.2, close=348.85, color='RED')] 2020-10-06 23:00:20 INFO: skip by colors first_candle=CandleItem(low=348.5, high=350.65, open=350.2, close=348.85, color='RED') second_candle=CandleItem(low=341.55, high=350.15, open=348.85, close=342.8, color='RED') last_candle=CandleItem(low=338.85, high=342.85, open=342.8, close=340.05, color='RED') 2020-10-06 23:00:20 INFO: check need new order None 2020-10-06 23:00:20 INFO: init new order end 2020-10-06 23:00:20 INFO: 2020-10-06 23:00:20 INFO: 2020-10-06 23:00:20 INFO: 2020-10-06 23:00:20 INFO: 2020-10-06 23:02:00 INFO: 2020-10-06 23:02:00 INFO: 2020-10-06 23:02:00 INFO: 2020-10-06 23:02:00 INFO: 2020-10-06 23:02:00 INFO: clearing start 2020-10-06 23:02:00 INFO: clearing end 2020-10-06 23:02:00 INFO: 2020-10-06 23:02:00 INFO: 2020-10-06 23:02:00 INFO: 2020-10-06 23:02:00 INFO: 2020-10-07 00:00:20 INFO: 2020-10-07 00:00:20 INFO: 2020-10-07 00:00:20 INFO: 2020-10-07 00:00:20 INFO: 2020-10-07 00:00:20 INFO: init new order start 2020-10-07 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 6, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 340.05, 'high': 340.95, 'low': 336.75, 'close': 337.2, 'trades': 4811, 'volume': 3322820, 'vwap': 339.1, 'lastSize': 25, 'turnover': 112675220060, 'homeNotional': 35079.53882977031, 'foreignNotional': 11895349.966315748}, {'timestamp': datetime.datetime(2020, 10, 6, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 342.8, 'high': 342.85, 'low': 338.85, 'close': 340.05, 'trades': 9421, 'volume': 6586800, 'vwap': 340.85, 'lastSize': 3, 'turnover': 224508195965, 'homeNotional': 69622.28291603788, 'foreignNotional': 23730518.940837357}, {'timestamp': datetime.datetime(2020, 10, 6, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.85, 'high': 350.15, 'low': 341.55, 'close': 342.8, 'trades': 6057, 'volume': 4779253, 'vwap': 345.73, 'lastSize': 165, 'turnover': 165232661965, 'homeNotional': 50945.19641311905, 'foreignNotional': 17613790.54841906}] 2020-10-07 00:00:20 INFO: prepare candles [CandleItem(low=336.75, high=340.95, open=340.05, close=337.2, color='RED'), CandleItem(low=338.85, high=342.85, open=342.8, close=340.05, color='RED'), CandleItem(low=341.55, high=350.15, open=348.85, close=342.8, color='RED')] 2020-10-07 00:00:20 INFO: skip by colors first_candle=CandleItem(low=341.55, high=350.15, open=348.85, close=342.8, color='RED') second_candle=CandleItem(low=338.85, high=342.85, open=342.8, close=340.05, color='RED') last_candle=CandleItem(low=336.75, high=340.95, open=340.05, close=337.2, color='RED') 2020-10-07 00:00:20 INFO: check need new order None 2020-10-07 00:00:20 INFO: init new order end 2020-10-07 00:00:20 INFO: 2020-10-07 00:00:20 INFO: 2020-10-07 00:00:20 INFO: 2020-10-07 00:00:20 INFO: 2020-10-07 00:02:00 INFO: 2020-10-07 00:02:00 INFO: 2020-10-07 00:02:00 INFO: 2020-10-07 00:02:00 INFO: 2020-10-07 00:02:00 INFO: clearing start 2020-10-07 00:02:00 INFO: clearing end 2020-10-07 00:02:00 INFO: 2020-10-07 00:02:00 INFO: 2020-10-07 00:02:00 INFO: 2020-10-07 00:02:00 INFO: 2020-10-07 01:00:20 INFO: 2020-10-07 01:00:20 INFO: 2020-10-07 01:00:20 INFO: 2020-10-07 01:00:20 INFO: 2020-10-07 01:00:20 INFO: init new order start 2020-10-07 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 6, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 337.2, 'high': 339.3, 'low': 336.7, 'close': 338.75, 'trades': 2188, 'volume': 1441173, 'vwap': 338.2, 'lastSize': 232, 'turnover': 48740135010, 'homeNotional': 15211.658535807916, 'foreignNotional': 5144561.153879864}, {'timestamp': datetime.datetime(2020, 10, 6, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 340.05, 'high': 340.95, 'low': 336.75, 'close': 337.2, 'trades': 4811, 'volume': 3322820, 'vwap': 339.1, 'lastSize': 25, 'turnover': 112675220060, 'homeNotional': 35079.53882977031, 'foreignNotional': 11895349.966315748}, {'timestamp': datetime.datetime(2020, 10, 6, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 342.8, 'high': 342.85, 'low': 338.85, 'close': 340.05, 'trades': 9421, 'volume': 6586800, 'vwap': 340.85, 'lastSize': 3, 'turnover': 224508195965, 'homeNotional': 69622.28291603788, 'foreignNotional': 23730518.940837357}] 2020-10-07 01:00:20 INFO: prepare candles [CandleItem(low=336.7, high=339.3, open=337.2, close=338.75, color='GREEN'), CandleItem(low=336.75, high=340.95, open=340.05, close=337.2, color='RED'), CandleItem(low=338.85, high=342.85, open=342.8, close=340.05, color='RED')] 2020-10-07 01:00:20 INFO: last_candle=CandleItem(low=336.7, high=339.3, open=337.2, close=338.75, color='GREEN') 2020-10-07 01:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-07 01:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=336.7, high=339.3, open=337.2, close=338.75, color='GREEN') 2020-10-07 01:00:20 INFO: skip by CandleItem(low=336.7, high=339.3, open=337.2, close=338.75, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-07 01:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-07 01:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=336.7, high=339.3, open=337.2, close=338.75, color='GREEN') 2020-10-07 01:00:20 INFO: skip by CandleItem(low=336.7, high=339.3, open=337.2, close=338.75, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-07 01:00:20 INFO: not found applicable config for candle 2020-10-07 01:00:20 INFO: check need new order None 2020-10-07 01:00:20 INFO: init new order end 2020-10-07 01:00:20 INFO: 2020-10-07 01:00:20 INFO: 2020-10-07 01:00:20 INFO: 2020-10-07 01:00:20 INFO: 2020-10-07 01:02:00 INFO: 2020-10-07 01:02:00 INFO: 2020-10-07 01:02:00 INFO: 2020-10-07 01:02:00 INFO: 2020-10-07 01:02:00 INFO: clearing start 2020-10-07 01:02:00 INFO: clearing end 2020-10-07 01:02:00 INFO: 2020-10-07 01:02:00 INFO: 2020-10-07 01:02:00 INFO: 2020-10-07 01:02:00 INFO: 2020-10-07 02:00:20 INFO: 2020-10-07 02:00:20 INFO: 2020-10-07 02:00:20 INFO: 2020-10-07 02:00:20 INFO: 2020-10-07 02:00:20 INFO: init new order start 2020-10-07 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 6, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 338.75, 'high': 340.9, 'low': 338.4, 'close': 339.1, 'trades': 3519, 'volume': 2931528, 'vwap': 339.51, 'lastSize': 7792, 'turnover': 99527952820, 'homeNotional': 31033.573281132783, 'foreignNotional': 10536182.559168052}, {'timestamp': datetime.datetime(2020, 10, 6, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 337.2, 'high': 339.3, 'low': 336.7, 'close': 338.75, 'trades': 2188, 'volume': 1441173, 'vwap': 338.2, 'lastSize': 232, 'turnover': 48740135010, 'homeNotional': 15211.658535807916, 'foreignNotional': 5144561.153879864}, {'timestamp': datetime.datetime(2020, 10, 6, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 340.05, 'high': 340.95, 'low': 336.75, 'close': 337.2, 'trades': 4811, 'volume': 3322820, 'vwap': 339.1, 'lastSize': 25, 'turnover': 112675220060, 'homeNotional': 35079.53882977031, 'foreignNotional': 11895349.966315748}] 2020-10-07 02:00:20 INFO: prepare candles [CandleItem(low=338.4, high=340.9, open=338.75, close=339.1, color='GREEN'), CandleItem(low=336.7, high=339.3, open=337.2, close=338.75, color='GREEN'), CandleItem(low=336.75, high=340.95, open=340.05, close=337.2, color='RED')] 2020-10-07 02:00:20 INFO: skip by colors first_candle=CandleItem(low=336.75, high=340.95, open=340.05, close=337.2, color='RED') second_candle=CandleItem(low=336.7, high=339.3, open=337.2, close=338.75, color='GREEN') last_candle=CandleItem(low=338.4, high=340.9, open=338.75, close=339.1, color='GREEN') 2020-10-07 02:00:20 INFO: check need new order None 2020-10-07 02:00:20 INFO: init new order end 2020-10-07 02:00:20 INFO: 2020-10-07 02:00:20 INFO: 2020-10-07 02:00:20 INFO: 2020-10-07 02:00:20 INFO: 2020-10-07 02:02:00 INFO: 2020-10-07 02:02:00 INFO: 2020-10-07 02:02:00 INFO: 2020-10-07 02:02:00 INFO: 2020-10-07 02:02:00 INFO: clearing start 2020-10-07 02:02:00 INFO: clearing end 2020-10-07 02:02:00 INFO: 2020-10-07 02:02:00 INFO: 2020-10-07 02:02:00 INFO: 2020-10-07 02:02:00 INFO: 2020-10-07 02:59:43 ERROR: Error : Connection is already closed. 2020-10-07 02:59:43 ERROR: error from callback >: Connection is already closed. 2020-10-07 02:59:43 INFO: Websocket Closed 2020-10-07 02:59:44 WARNING: reconnect to socket 2020-10-07 02:59:44 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-10-07 02:59:44 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-10-07 02:59:44 INFO: Authenticating with API Key. 2020-10-07 02:59:45 INFO: Connected to WS. 2020-10-07 03:00:20 INFO: 2020-10-07 03:00:20 INFO: 2020-10-07 03:00:20 INFO: 2020-10-07 03:00:20 INFO: 2020-10-07 03:00:20 INFO: init new order start 2020-10-07 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 7, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.1, 'high': 340.65, 'low': 338.55, 'close': 340.55, 'trades': 3081, 'volume': 1818286, 'vwap': 339.56, 'lastSize': 293, 'turnover': 61740764280, 'homeNotional': 19265.55939665977, 'foreignNotional': 6541718.144479403}, {'timestamp': datetime.datetime(2020, 10, 6, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 338.75, 'high': 340.9, 'low': 338.4, 'close': 339.1, 'trades': 3519, 'volume': 2931528, 'vwap': 339.51, 'lastSize': 7792, 'turnover': 99527952820, 'homeNotional': 31033.573281132783, 'foreignNotional': 10536182.559168052}, {'timestamp': datetime.datetime(2020, 10, 6, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 337.2, 'high': 339.3, 'low': 336.7, 'close': 338.75, 'trades': 2188, 'volume': 1441173, 'vwap': 338.2, 'lastSize': 232, 'turnover': 48740135010, 'homeNotional': 15211.658535807916, 'foreignNotional': 5144561.153879864}] 2020-10-07 03:00:20 INFO: prepare candles [CandleItem(low=338.55, high=340.65, open=339.1, close=340.55, color='GREEN'), CandleItem(low=338.4, high=340.9, open=338.75, close=339.1, color='GREEN'), CandleItem(low=336.7, high=339.3, open=337.2, close=338.75, color='GREEN')] 2020-10-07 03:00:20 INFO: skip by colors first_candle=CandleItem(low=336.7, high=339.3, open=337.2, close=338.75, color='GREEN') second_candle=CandleItem(low=338.4, high=340.9, open=338.75, close=339.1, color='GREEN') last_candle=CandleItem(low=338.55, high=340.65, open=339.1, close=340.55, color='GREEN') 2020-10-07 03:00:20 INFO: check need new order None 2020-10-07 03:00:20 INFO: init new order end 2020-10-07 03:00:20 INFO: 2020-10-07 03:00:20 INFO: 2020-10-07 03:00:20 INFO: 2020-10-07 03:00:20 INFO: 2020-10-07 03:02:00 INFO: 2020-10-07 03:02:00 INFO: 2020-10-07 03:02:00 INFO: 2020-10-07 03:02:00 INFO: 2020-10-07 03:02:00 INFO: clearing start 2020-10-07 03:02:00 INFO: clearing end 2020-10-07 03:02:00 INFO: 2020-10-07 03:02:00 INFO: 2020-10-07 03:02:00 INFO: 2020-10-07 03:02:00 INFO: 2020-10-07 03:02:17 ERROR: Error : Connection is already closed. 2020-10-07 03:02:17 ERROR: error from callback >: Connection is already closed. 2020-10-07 03:02:17 INFO: Websocket Closed 2020-10-07 03:02:17 WARNING: reconnect to socket 2020-10-07 03:02:17 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-10-07 03:02:17 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-10-07 03:02:17 INFO: Authenticating with API Key. 2020-10-07 03:02:18 INFO: Connected to WS. 2020-10-07 04:00:20 INFO: 2020-10-07 04:00:20 INFO: 2020-10-07 04:00:20 INFO: 2020-10-07 04:00:20 INFO: 2020-10-07 04:00:20 INFO: init new order start 2020-10-07 04:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 7, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 340.55, 'high': 340.6, 'low': 338.75, 'close': 339.35, 'trades': 2551, 'volume': 1664431, 'vwap': 339.55, 'lastSize': 12, 'turnover': 56514475685, 'homeNotional': 17629.56276833626, 'foreignNotional': 5985986.371268566}, {'timestamp': datetime.datetime(2020, 10, 7, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.1, 'high': 340.65, 'low': 338.55, 'close': 340.55, 'trades': 3081, 'volume': 1818286, 'vwap': 339.56, 'lastSize': 293, 'turnover': 61740764280, 'homeNotional': 19265.55939665977, 'foreignNotional': 6541718.144479403}, {'timestamp': datetime.datetime(2020, 10, 6, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 338.75, 'high': 340.9, 'low': 338.4, 'close': 339.1, 'trades': 3519, 'volume': 2931528, 'vwap': 339.51, 'lastSize': 7792, 'turnover': 99527952820, 'homeNotional': 31033.573281132783, 'foreignNotional': 10536182.559168052}] 2020-10-07 04:00:20 INFO: prepare candles [CandleItem(low=338.75, high=340.6, open=340.55, close=339.35, color='RED'), CandleItem(low=338.55, high=340.65, open=339.1, close=340.55, color='GREEN'), CandleItem(low=338.4, high=340.9, open=338.75, close=339.1, color='GREEN')] 2020-10-07 04:00:20 INFO: last_candle=CandleItem(low=338.75, high=340.6, open=340.55, close=339.35, color='RED') 2020-10-07 04:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-07 04:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=338.75, high=340.6, open=340.55, close=339.35, color='RED') 2020-10-07 04:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=338.55, high=340.65, open=339.1, close=340.55, color='GREEN') 2020-10-07 04:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=338.4, high=340.9, open=338.75, close=339.1, color='GREEN') 2020-10-07 04:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=338.75, high=340.6, open=340.55, close=339.35, color='RED'), take_profit_factor=6.0, clearing_interval=3600) 2020-10-07 04:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=338.75, high=340.6, open=340.55, close=339.35, color='RED'), take_profit_factor=6.0, clearing_interval=3600) 2020-10-07 04:00:20 INFO: place order: start candle=CandleItem(low=338.75, high=340.6, open=340.55, close=339.35, color='RED') ticker='ETHUSD' price_offset=0.1 2020-10-07 04:00:20 INFO: place order: side_factor=1 init_trigger_price=338.7 init_order_price=338.65 stop_price_offset=0.0 candle.size=1.8500000000000227 stop_price=340.6 take_price=327.54999999999984 2020-10-07 04:00:20 INFO: place order round: side_factor=1 init_trigger_price=Decimal('338.69999999999998863131622783839702606201171875') init_order_price=Decimal('338.6499999999999772626324556767940521240234375') stop_price_offset=0.0 candle.size=1.8500000000000227 stop_price=Decimal('340.6000000000000227373675443232059478759765625') take_price=Decimal('327.5499999999998408384271897375583648681640625') 2020-10-07 04:00:20 INFO: place order: compute qty=-1000 2020-10-07 04:00:20 INFO: place order: save order to db c082cbc9971541789431a731390c8344; response=True 2020-10-07 04:00:20 INFO: process event {'orderID': '1974aac1-0145-4b26-a03e-8ec1296e5789', 'clOrdID': 'c082cbc9971541789431a731390c8344', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1000, 'price': 338.65, 'displayQty': None, 'stopPx': 338.7, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1000, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-10-07T01:00:20.771Z', 'timestamp': '2020-10-07T01:00:20.771Z'} 2020-10-07 04:00:20 INFO: post order to exchange resp={'orderID': '1974aac1-0145-4b26-a03e-8ec1296e5789', 'clOrdID': 'c082cbc9971541789431a731390c8344', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1000, 'price': 338.65, 'displayQty': None, 'stopPx': 338.7, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1000, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 7, 1, 0, 20, 771000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 7, 1, 0, 20, 771000, tzinfo=tzutc())} 2020-10-07 04:00:20 INFO: skip event c082cbc9971541789431a731390c8344 New 2020-10-07 04:00:20 INFO: place new init order {'qty': -1000, 'init_price': Decimal('338.69999999999998863131622783839702606201171875'), 'stop_price': Decimal('340.6000000000000227373675443232059478759765625'), 'take_price': Decimal('327.5499999999998408384271897375583648681640625'), 'order_uid': 'c082cbc9971541789431a731390c8344', 'response': {'orderID': '1974aac1-0145-4b26-a03e-8ec1296e5789', 'clOrdID': 'c082cbc9971541789431a731390c8344', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1000, 'price': 338.65, 'displayQty': None, 'stopPx': 338.7, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1000, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 7, 1, 0, 20, 771000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 7, 1, 0, 20, 771000, tzinfo=tzutc())}} 2020-10-07 04:00:20 INFO: init new order end 2020-10-07 04:00:20 INFO: 2020-10-07 04:00:20 INFO: 2020-10-07 04:00:20 INFO: 2020-10-07 04:00:20 INFO: 2020-10-07 04:02:00 INFO: 2020-10-07 04:02:00 INFO: 2020-10-07 04:02:00 INFO: 2020-10-07 04:02:00 INFO: 2020-10-07 04:02:00 INFO: clearing start 2020-10-07 04:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '1974aac1-0145-4b26-a03e-8ec1296e5789', 'clOrdID': 'c082cbc9971541789431a731390c8344', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1000, 'price': 338.65, 'displayQty': None, 'stopPx': 338.7, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1000, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 7, 1, 0, 20, 771000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 7, 1, 0, 20, 771000, tzinfo=tzutc())} 2020-10-07 04:02:00 INFO: order time=2020-10-07 01:00:20.771000+00:00; delta from now UTC=0:01:40.175188 time_delta.total_seconds()=100.175188; time_diff_offset='3600' 2020-10-07 04:02:00 INFO: skip by time diff 2020-10-07 01:00:20.771000+00:00 2020-10-07 04:02:00 INFO: clearing end 2020-10-07 04:02:00 INFO: 2020-10-07 04:02:00 INFO: 2020-10-07 04:02:00 INFO: 2020-10-07 04:02:00 INFO: 2020-10-07 04:03:34 INFO: process event {'orderID': '1974aac1-0145-4b26-a03e-8ec1296e5789', 'triggered': 'StopOrderTriggered', 'workingIndicator': True, 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'transactTime': '2020-10-07T01:03:34.723Z', 'timestamp': '2020-10-07T01:03:34.723Z', 'clOrdID': 'c082cbc9971541789431a731390c8344', 'account': 605536, 'symbol': 'ETHUSD'} 2020-10-07 04:03:34 INFO: skip event c082cbc9971541789431a731390c8344 2020-10-07 04:03:34 INFO: process event {'orderID': '1974aac1-0145-4b26-a03e-8ec1296e5789', 'ordStatus': 'PartiallyFilled', 'leavesQty': 990, 'cumQty': 10, 'avgPx': 338.65, 'timestamp': '2020-10-07T01:03:34.749Z', 'clOrdID': 'c082cbc9971541789431a731390c8344', 'account': 605536, 'symbol': 'ETHUSD'} 2020-10-07 04:03:34 INFO: skip event c082cbc9971541789431a731390c8344 PartiallyFilled 2020-10-07 04:03:34 INFO: process event {'orderID': '1974aac1-0145-4b26-a03e-8ec1296e5789', 'leavesQty': 977, 'cumQty': 23, 'timestamp': '2020-10-07T01:03:34.759Z', 'clOrdID': 'c082cbc9971541789431a731390c8344', 'account': 605536, 'symbol': 'ETHUSD'} 2020-10-07 04:03:34 INFO: skip event c082cbc9971541789431a731390c8344 2020-10-07 04:03:34 INFO: process event {'orderID': '1974aac1-0145-4b26-a03e-8ec1296e5789', 'leavesQty': 966, 'cumQty': 34, 'timestamp': '2020-10-07T01:03:34.954Z', 'clOrdID': 'c082cbc9971541789431a731390c8344', 'account': 605536, 'symbol': 'ETHUSD'} 2020-10-07 04:03:34 INFO: skip event c082cbc9971541789431a731390c8344 2020-10-07 04:03:55 INFO: process event {'orderID': '1974aac1-0145-4b26-a03e-8ec1296e5789', 'ordStatus': 'Filled', 'workingIndicator': False, 'leavesQty': 0, 'cumQty': 1000, 'timestamp': '2020-10-07T01:03:55.839Z', 'clOrdID': 'c082cbc9971541789431a731390c8344', 'account': 605536, 'symbol': 'ETHUSD'} 2020-10-07 04:03:55 INFO: add new event={'uid': 'c082cbc9971541789431a731390c8344', 'status': 'Filled'} 2020-10-07 04:03:56 INFO: 2020-10-07 04:03:56 INFO: 2020-10-07 04:03:56 INFO: 2020-10-07 04:03:56 INFO: 2020-10-07 04:03:56 INFO: process event start 2020-10-07 04:03:56 INFO: fetch new order event c082cbc9971541789431a731390c8344 2020-10-07 04:03:56 INFO: fetch orders by event init={'stop': '340.6000000000000227373675443232059478759765625', 'take': '327.5499999999998408384271897375583648681640625', 'qty': '1000', 'color': 'RED', 'ticker': 'ETHUSD', 'clearing_offset': '3600'} profit_pair=None 2020-10-07 04:03:56 INFO: process init order filled 2020-10-07 04:03:56 INFO: save profit orders to storage stop=c09f8b9dc3aa43969328c4f0facb75f2 take=cad30304c2f8411ea41a1e9b4200a448 2020-10-07 04:03:56 INFO: place profit orders take_price=327.5499999999998408384271897375583648681640625, stop_price=340.6000000000000227373675443232059478759765625, qty=1000, color=RED, ticker=ETHUSD c09f8b9dc3aa43969328c4f0facb75f2 cad30304c2f8411ea41a1e9b4200a448 2020-10-07 04:03:56 INFO: place stop order ETHUSD: qty=1000, stop_price=340.6000000000000227373675443232059478759765625, stop_uid=c09f8b9dc3aa43969328c4f0facb75f2 2020-10-07 04:03:56 INFO: process event {'orderID': 'b1489875-df22-433d-8f33-ae449765e163', 'clOrdID': 'c09f8b9dc3aa43969328c4f0facb75f2', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1000, 'price': None, 'displayQty': None, 'stopPx': 340.6, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1000, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': '2020-10-07T01:03:56.113Z', 'timestamp': '2020-10-07T01:03:56.113Z'} 2020-10-07 04:03:56 INFO: exchange resp for stop order={'orderID': 'b1489875-df22-433d-8f33-ae449765e163', 'clOrdID': 'c09f8b9dc3aa43969328c4f0facb75f2', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1000, 'price': None, 'displayQty': None, 'stopPx': 340.6, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1000, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 7, 1, 3, 56, 113000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 7, 1, 3, 56, 113000, tzinfo=tzutc())} 2020-10-07 04:03:56 INFO: skip event c09f8b9dc3aa43969328c4f0facb75f2 New 2020-10-07 04:03:56 INFO: place limit order ETHUSD: qty=1000, price=327.5499999999998408384271897375583648681640625, take_uid=cad30304c2f8411ea41a1e9b4200a448 2020-10-07 04:03:56 INFO: exchange resp for take profit order={'orderID': 'aa4ce0c6-35fb-4b82-a926-f2c66d77eed6', 'clOrdID': 'cad30304c2f8411ea41a1e9b4200a448', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1000, 'price': 327.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1000, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 7, 1, 3, 56, 154000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 7, 1, 3, 56, 154000, tzinfo=tzutc())} 2020-10-07 04:03:56 INFO: place profit orders={'stop': {'response': {'orderID': 'b1489875-df22-433d-8f33-ae449765e163', 'clOrdID': 'c09f8b9dc3aa43969328c4f0facb75f2', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1000, 'price': None, 'displayQty': None, 'stopPx': 340.6, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1000, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 7, 1, 3, 56, 113000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 7, 1, 3, 56, 113000, tzinfo=tzutc())}, 'qty': Decimal('1000'), 'uid': 'c09f8b9dc3aa43969328c4f0facb75f2', 'price': Decimal('340.6000000000000227373675443232059478759765625')}, 'take': {'response': {'orderID': 'aa4ce0c6-35fb-4b82-a926-f2c66d77eed6', 'clOrdID': 'cad30304c2f8411ea41a1e9b4200a448', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1000, 'price': 327.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1000, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 7, 1, 3, 56, 154000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 7, 1, 3, 56, 154000, tzinfo=tzutc())}, 'qty': Decimal('1000'), 'uid': 'cad30304c2f8411ea41a1e9b4200a448', 'price': Decimal('327.5499999999998408384271897375583648681640625')}} 2020-10-07 04:03:56 INFO: process event {'orderID': 'aa4ce0c6-35fb-4b82-a926-f2c66d77eed6', 'clOrdID': 'cad30304c2f8411ea41a1e9b4200a448', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1000, 'price': 327.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1000, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': '2020-10-07T01:03:56.154Z', 'timestamp': '2020-10-07T01:03:56.154Z'} 2020-10-07 04:03:56 INFO: skip event cad30304c2f8411ea41a1e9b4200a448 New 2020-10-07 04:03:56 INFO: rm init order from db c082cbc9971541789431a731390c8344 2020-10-07 04:03:56 INFO: end process event_processing_result='proceed init order' 2020-10-07 04:03:56 INFO: 2020-10-07 04:03:56 INFO: 2020-10-07 04:03:56 INFO: 2020-10-07 04:03:56 INFO: 2020-10-07 05:00:21 INFO: 2020-10-07 05:00:21 INFO: 2020-10-07 05:00:21 INFO: 2020-10-07 05:00:21 INFO: 2020-10-07 05:00:21 INFO: init new order start 2020-10-07 05:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 7, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.35, 'high': 339.8, 'low': 332.9, 'close': 336.75, 'trades': 7079, 'volume': 4632384, 'vwap': 335.73, 'lastSize': 1, 'turnover': 155521368015, 'homeNotional': 48968.763231809695, 'foreignNotional': 16440176.256030718}, {'timestamp': datetime.datetime(2020, 10, 7, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 340.55, 'high': 340.6, 'low': 338.75, 'close': 339.35, 'trades': 2551, 'volume': 1664431, 'vwap': 339.55, 'lastSize': 12, 'turnover': 56514475685, 'homeNotional': 17629.56276833626, 'foreignNotional': 5985986.371268566}, {'timestamp': datetime.datetime(2020, 10, 7, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.1, 'high': 340.65, 'low': 338.55, 'close': 340.55, 'trades': 3081, 'volume': 1818286, 'vwap': 339.56, 'lastSize': 293, 'turnover': 61740764280, 'homeNotional': 19265.55939665977, 'foreignNotional': 6541718.144479403}] 2020-10-07 05:00:21 INFO: prepare candles [CandleItem(low=332.9, high=339.8, open=339.35, close=336.75, color='RED'), CandleItem(low=338.75, high=340.6, open=340.55, close=339.35, color='RED'), CandleItem(low=338.55, high=340.65, open=339.1, close=340.55, color='GREEN')] 2020-10-07 05:00:21 INFO: skip by colors first_candle=CandleItem(low=338.55, high=340.65, open=339.1, close=340.55, color='GREEN') second_candle=CandleItem(low=338.75, high=340.6, open=340.55, close=339.35, color='RED') last_candle=CandleItem(low=332.9, high=339.8, open=339.35, close=336.75, color='RED') 2020-10-07 05:00:21 INFO: check need new order None 2020-10-07 05:00:21 INFO: init new order end 2020-10-07 05:00:21 INFO: 2020-10-07 05:00:21 INFO: 2020-10-07 05:00:21 INFO: 2020-10-07 05:00:21 INFO: 2020-10-07 05:02:00 INFO: 2020-10-07 05:02:00 INFO: 2020-10-07 05:02:00 INFO: 2020-10-07 05:02:00 INFO: 2020-10-07 05:02:00 INFO: clearing start 2020-10-07 05:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'b1489875-df22-433d-8f33-ae449765e163', 'clOrdID': 'c09f8b9dc3aa43969328c4f0facb75f2', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1000, 'price': None, 'displayQty': None, 'stopPx': 340.6, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1000, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 7, 1, 3, 56, 113000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 7, 1, 3, 56, 113000, tzinfo=tzutc())} 2020-10-07 05:02:00 INFO: skip by not found init order into storage 2020-10-07 05:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'aa4ce0c6-35fb-4b82-a926-f2c66d77eed6', 'clOrdID': 'cad30304c2f8411ea41a1e9b4200a448', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1000, 'price': 327.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1000, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 7, 1, 3, 56, 154000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 7, 1, 3, 56, 154000, tzinfo=tzutc())} 2020-10-07 05:02:00 INFO: skip by not found init order into storage 2020-10-07 05:02:00 INFO: clearing end 2020-10-07 05:02:00 INFO: 2020-10-07 05:02:00 INFO: 2020-10-07 05:02:00 INFO: 2020-10-07 05:02:00 INFO: 2020-10-07 06:00:20 INFO: 2020-10-07 06:00:20 INFO: 2020-10-07 06:00:20 INFO: 2020-10-07 06:00:20 INFO: 2020-10-07 06:00:20 INFO: init new order start 2020-10-07 06:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 7, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 336.75, 'high': 338.65, 'low': 336.55, 'close': 338.1, 'trades': 2228, 'volume': 1579537, 'vwap': 337.64, 'lastSize': 70, 'turnover': 53330435270, 'homeNotional': 16730.887692747976, 'foreignNotional': 5648908.680925383}, {'timestamp': datetime.datetime(2020, 10, 7, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.35, 'high': 339.8, 'low': 332.9, 'close': 336.75, 'trades': 7079, 'volume': 4632384, 'vwap': 335.73, 'lastSize': 1, 'turnover': 155521368015, 'homeNotional': 48968.763231809695, 'foreignNotional': 16440176.256030718}, {'timestamp': datetime.datetime(2020, 10, 7, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 340.55, 'high': 340.6, 'low': 338.75, 'close': 339.35, 'trades': 2551, 'volume': 1664431, 'vwap': 339.55, 'lastSize': 12, 'turnover': 56514475685, 'homeNotional': 17629.56276833626, 'foreignNotional': 5985986.371268566}] 2020-10-07 06:00:21 INFO: prepare candles [CandleItem(low=336.55, high=338.65, open=336.75, close=338.1, color='GREEN'), CandleItem(low=332.9, high=339.8, open=339.35, close=336.75, color='RED'), CandleItem(low=338.75, high=340.6, open=340.55, close=339.35, color='RED')] 2020-10-07 06:00:21 INFO: last_candle=CandleItem(low=336.55, high=338.65, open=336.75, close=338.1, color='GREEN') 2020-10-07 06:00:21 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-07 06:00:21 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=336.55, high=338.65, open=336.75, close=338.1, color='GREEN') 2020-10-07 06:00:21 INFO: skip by CandleItem(low=336.55, high=338.65, open=336.75, close=338.1, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-07 06:00:21 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-07 06:00:21 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=336.55, high=338.65, open=336.75, close=338.1, color='GREEN') 2020-10-07 06:00:21 INFO: skip by CandleItem(low=336.55, high=338.65, open=336.75, close=338.1, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-07 06:00:21 INFO: not found applicable config for candle 2020-10-07 06:00:21 INFO: check need new order None 2020-10-07 06:00:21 INFO: init new order end 2020-10-07 06:00:21 INFO: 2020-10-07 06:00:21 INFO: 2020-10-07 06:00:21 INFO: 2020-10-07 06:00:21 INFO: 2020-10-07 06:02:00 INFO: 2020-10-07 06:02:00 INFO: 2020-10-07 06:02:00 INFO: 2020-10-07 06:02:00 INFO: 2020-10-07 06:02:00 INFO: clearing start 2020-10-07 06:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'b1489875-df22-433d-8f33-ae449765e163', 'clOrdID': 'c09f8b9dc3aa43969328c4f0facb75f2', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1000, 'price': None, 'displayQty': None, 'stopPx': 340.6, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1000, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 7, 1, 3, 56, 113000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 7, 1, 3, 56, 113000, tzinfo=tzutc())} 2020-10-07 06:02:00 INFO: skip by not found init order into storage 2020-10-07 06:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'aa4ce0c6-35fb-4b82-a926-f2c66d77eed6', 'clOrdID': 'cad30304c2f8411ea41a1e9b4200a448', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1000, 'price': 327.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1000, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 7, 1, 3, 56, 154000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 7, 1, 3, 56, 154000, tzinfo=tzutc())} 2020-10-07 06:02:00 INFO: skip by not found init order into storage 2020-10-07 06:02:00 INFO: clearing end 2020-10-07 06:02:00 INFO: 2020-10-07 06:02:00 INFO: 2020-10-07 06:02:00 INFO: 2020-10-07 06:02:00 INFO: 2020-10-07 07:00:20 INFO: 2020-10-07 07:00:20 INFO: 2020-10-07 07:00:20 INFO: 2020-10-07 07:00:20 INFO: 2020-10-07 07:00:20 INFO: init new order start 2020-10-07 07:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 7, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 338.1, 'high': 338.15, 'low': 335.2, 'close': 336.85, 'trades': 2804, 'volume': 2119940, 'vwap': 336.98, 'lastSize': 5, 'turnover': 71436746355, 'homeNotional': 22444.93441535351, 'foreignNotional': 7563396.873749736}, {'timestamp': datetime.datetime(2020, 10, 7, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 336.75, 'high': 338.65, 'low': 336.55, 'close': 338.1, 'trades': 2228, 'volume': 1579537, 'vwap': 337.64, 'lastSize': 70, 'turnover': 53330435270, 'homeNotional': 16730.887692747976, 'foreignNotional': 5648908.680925383}, {'timestamp': datetime.datetime(2020, 10, 7, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.35, 'high': 339.8, 'low': 332.9, 'close': 336.75, 'trades': 7079, 'volume': 4632384, 'vwap': 335.73, 'lastSize': 1, 'turnover': 155521368015, 'homeNotional': 48968.763231809695, 'foreignNotional': 16440176.256030718}] 2020-10-07 07:00:20 INFO: prepare candles [CandleItem(low=335.2, high=338.15, open=338.1, close=336.85, color='RED'), CandleItem(low=336.55, high=338.65, open=336.75, close=338.1, color='GREEN'), CandleItem(low=332.9, high=339.8, open=339.35, close=336.75, color='RED')] 2020-10-07 07:00:20 INFO: skip by colors first_candle=CandleItem(low=332.9, high=339.8, open=339.35, close=336.75, color='RED') second_candle=CandleItem(low=336.55, high=338.65, open=336.75, close=338.1, color='GREEN') last_candle=CandleItem(low=335.2, high=338.15, open=338.1, close=336.85, color='RED') 2020-10-07 07:00:20 INFO: check need new order None 2020-10-07 07:00:20 INFO: init new order end 2020-10-07 07:00:20 INFO: 2020-10-07 07:00:20 INFO: 2020-10-07 07:00:20 INFO: 2020-10-07 07:00:20 INFO: 2020-10-07 07:02:00 INFO: 2020-10-07 07:02:00 INFO: 2020-10-07 07:02:00 INFO: 2020-10-07 07:02:00 INFO: 2020-10-07 07:02:00 INFO: clearing start 2020-10-07 07:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'b1489875-df22-433d-8f33-ae449765e163', 'clOrdID': 'c09f8b9dc3aa43969328c4f0facb75f2', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1000, 'price': None, 'displayQty': None, 'stopPx': 340.6, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1000, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 7, 1, 3, 56, 113000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 7, 1, 3, 56, 113000, tzinfo=tzutc())} 2020-10-07 07:02:00 INFO: skip by not found init order into storage 2020-10-07 07:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'aa4ce0c6-35fb-4b82-a926-f2c66d77eed6', 'clOrdID': 'cad30304c2f8411ea41a1e9b4200a448', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1000, 'price': 327.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1000, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 7, 1, 3, 56, 154000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 7, 1, 3, 56, 154000, tzinfo=tzutc())} 2020-10-07 07:02:00 INFO: skip by not found init order into storage 2020-10-07 07:02:00 INFO: clearing end 2020-10-07 07:02:00 INFO: 2020-10-07 07:02:00 INFO: 2020-10-07 07:02:00 INFO: 2020-10-07 07:02:00 INFO: 2020-10-07 08:00:20 INFO: 2020-10-07 08:00:20 INFO: 2020-10-07 08:00:20 INFO: 2020-10-07 08:00:20 INFO: 2020-10-07 08:00:20 INFO: init new order start 2020-10-07 08:00:22 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 7, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 336.85, 'high': 338.5, 'low': 335.9, 'close': 338.2, 'trades': 2847, 'volume': 2657114, 'vwap': 336.94, 'lastSize': 12, 'turnover': 89528173700, 'homeNotional': 28123.755767929055, 'foreignNotional': 9475967.133187104}, {'timestamp': datetime.datetime(2020, 10, 7, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 338.1, 'high': 338.15, 'low': 335.2, 'close': 336.85, 'trades': 2804, 'volume': 2119940, 'vwap': 336.98, 'lastSize': 5, 'turnover': 71436746355, 'homeNotional': 22444.93441535351, 'foreignNotional': 7563396.873749736}, {'timestamp': datetime.datetime(2020, 10, 7, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 336.75, 'high': 338.65, 'low': 336.55, 'close': 338.1, 'trades': 2228, 'volume': 1579537, 'vwap': 337.64, 'lastSize': 70, 'turnover': 53330435270, 'homeNotional': 16730.887692747976, 'foreignNotional': 5648908.680925383}] 2020-10-07 08:00:22 INFO: prepare candles [CandleItem(low=335.9, high=338.5, open=336.85, close=338.2, color='GREEN'), CandleItem(low=335.2, high=338.15, open=338.1, close=336.85, color='RED'), CandleItem(low=336.55, high=338.65, open=336.75, close=338.1, color='GREEN')] 2020-10-07 08:00:22 INFO: skip by colors first_candle=CandleItem(low=336.55, high=338.65, open=336.75, close=338.1, color='GREEN') second_candle=CandleItem(low=335.2, high=338.15, open=338.1, close=336.85, color='RED') last_candle=CandleItem(low=335.9, high=338.5, open=336.85, close=338.2, color='GREEN') 2020-10-07 08:00:22 INFO: check need new order None 2020-10-07 08:00:22 INFO: init new order end 2020-10-07 08:00:22 INFO: 2020-10-07 08:00:22 INFO: 2020-10-07 08:00:22 INFO: 2020-10-07 08:00:22 INFO: 2020-10-07 08:02:00 INFO: 2020-10-07 08:02:00 INFO: 2020-10-07 08:02:00 INFO: 2020-10-07 08:02:00 INFO: 2020-10-07 08:02:00 INFO: clearing start 2020-10-07 08:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'b1489875-df22-433d-8f33-ae449765e163', 'clOrdID': 'c09f8b9dc3aa43969328c4f0facb75f2', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1000, 'price': None, 'displayQty': None, 'stopPx': 340.6, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1000, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 7, 1, 3, 56, 113000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 7, 1, 3, 56, 113000, tzinfo=tzutc())} 2020-10-07 08:02:00 INFO: skip by not found init order into storage 2020-10-07 08:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'aa4ce0c6-35fb-4b82-a926-f2c66d77eed6', 'clOrdID': 'cad30304c2f8411ea41a1e9b4200a448', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1000, 'price': 327.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1000, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 7, 1, 3, 56, 154000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 7, 1, 3, 56, 154000, tzinfo=tzutc())} 2020-10-07 08:02:00 INFO: skip by not found init order into storage 2020-10-07 08:02:00 INFO: clearing end 2020-10-07 08:02:00 INFO: 2020-10-07 08:02:00 INFO: 2020-10-07 08:02:00 INFO: 2020-10-07 08:02:00 INFO: 2020-10-07 09:00:20 INFO: 2020-10-07 09:00:20 INFO: 2020-10-07 09:00:20 INFO: 2020-10-07 09:00:20 INFO: 2020-10-07 09:00:20 INFO: init new order start 2020-10-07 09:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 7, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 338.2, 'high': 340.2, 'low': 337.0, 'close': 339.4, 'trades': 3228, 'volume': 2534417, 'vwap': 338.74, 'lastSize': 1, 'turnover': 85849502975, 'homeNotional': 26883.172237903098, 'foreignNotional': 9106283.121566247}, {'timestamp': datetime.datetime(2020, 10, 7, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 336.85, 'high': 338.5, 'low': 335.9, 'close': 338.2, 'trades': 2847, 'volume': 2657114, 'vwap': 336.94, 'lastSize': 12, 'turnover': 89528173700, 'homeNotional': 28123.755767929055, 'foreignNotional': 9475967.133187104}, {'timestamp': datetime.datetime(2020, 10, 7, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 338.1, 'high': 338.15, 'low': 335.2, 'close': 336.85, 'trades': 2804, 'volume': 2119940, 'vwap': 336.98, 'lastSize': 5, 'turnover': 71436746355, 'homeNotional': 22444.93441535351, 'foreignNotional': 7563396.873749736}] 2020-10-07 09:00:20 INFO: prepare candles [CandleItem(low=337.0, high=340.2, open=338.2, close=339.4, color='GREEN'), CandleItem(low=335.9, high=338.5, open=336.85, close=338.2, color='GREEN'), CandleItem(low=335.2, high=338.15, open=338.1, close=336.85, color='RED')] 2020-10-07 09:00:20 INFO: skip by colors first_candle=CandleItem(low=335.2, high=338.15, open=338.1, close=336.85, color='RED') second_candle=CandleItem(low=335.9, high=338.5, open=336.85, close=338.2, color='GREEN') last_candle=CandleItem(low=337.0, high=340.2, open=338.2, close=339.4, color='GREEN') 2020-10-07 09:00:20 INFO: check need new order None 2020-10-07 09:00:20 INFO: init new order end 2020-10-07 09:00:20 INFO: 2020-10-07 09:00:20 INFO: 2020-10-07 09:00:20 INFO: 2020-10-07 09:00:20 INFO: 2020-10-07 09:02:00 INFO: 2020-10-07 09:02:00 INFO: 2020-10-07 09:02:00 INFO: 2020-10-07 09:02:00 INFO: 2020-10-07 09:02:00 INFO: clearing start 2020-10-07 09:02:01 INFO: fetch_orders_for_clearing test order {'orderID': 'b1489875-df22-433d-8f33-ae449765e163', 'clOrdID': 'c09f8b9dc3aa43969328c4f0facb75f2', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1000, 'price': None, 'displayQty': None, 'stopPx': 340.6, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1000, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 7, 1, 3, 56, 113000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 7, 1, 3, 56, 113000, tzinfo=tzutc())} 2020-10-07 09:02:01 INFO: skip by not found init order into storage 2020-10-07 09:02:01 INFO: fetch_orders_for_clearing test order {'orderID': 'aa4ce0c6-35fb-4b82-a926-f2c66d77eed6', 'clOrdID': 'cad30304c2f8411ea41a1e9b4200a448', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1000, 'price': 327.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1000, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 7, 1, 3, 56, 154000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 7, 1, 3, 56, 154000, tzinfo=tzutc())} 2020-10-07 09:02:01 INFO: skip by not found init order into storage 2020-10-07 09:02:01 INFO: clearing end 2020-10-07 09:02:01 INFO: 2020-10-07 09:02:01 INFO: 2020-10-07 09:02:01 INFO: 2020-10-07 09:02:01 INFO: 2020-10-07 09:23:23 INFO: process event {'orderID': 'b1489875-df22-433d-8f33-ae449765e163', 'price': 340.6, 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 1000, 'avgPx': 340.6, 'text': 'Triggered: Order stop price reached\nStop order by trader.py', 'transactTime': '2020-10-07T06:23:23.025Z', 'timestamp': '2020-10-07T06:23:23.025Z', 'clOrdID': 'c09f8b9dc3aa43969328c4f0facb75f2', 'account': 605536, 'symbol': 'ETHUSD'} 2020-10-07 09:23:23 INFO: add new event={'uid': 'c09f8b9dc3aa43969328c4f0facb75f2', 'status': 'Filled'} 2020-10-07 09:23:23 INFO: 2020-10-07 09:23:23 INFO: 2020-10-07 09:23:23 INFO: 2020-10-07 09:23:23 INFO: 2020-10-07 09:23:23 INFO: process event start 2020-10-07 09:23:23 INFO: fetch new order event c09f8b9dc3aa43969328c4f0facb75f2 2020-10-07 09:23:23 INFO: fetch orders by event init=None profit_pair=cad30304c2f8411ea41a1e9b4200a448 2020-10-07 09:23:23 INFO: process profit order filled 2020-10-07 09:23:24 INFO: process event {'orderID': 'aa4ce0c6-35fb-4b82-a926-f2c66d77eed6', 'ordStatus': 'Canceled', 'workingIndicator': False, 'leavesQty': 0, 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'timestamp': '2020-10-07T06:23:24.289Z', 'clOrdID': 'cad30304c2f8411ea41a1e9b4200a448', 'account': 605536, 'symbol': 'ETHUSD'} 2020-10-07 09:23:24 INFO: skip event cad30304c2f8411ea41a1e9b4200a448 Canceled 2020-10-07 09:23:24 INFO: cancel order=cad30304c2f8411ea41a1e9b4200a448 [{'orderID': 'aa4ce0c6-35fb-4b82-a926-f2c66d77eed6', 'clOrdID': 'cad30304c2f8411ea41a1e9b4200a448', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1000, 'price': 327.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'Canceled', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 0, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 7, 1, 3, 56, 154000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 7, 6, 23, 24, 289000, tzinfo=tzutc())}] 2020-10-07 09:23:24 INFO: end process event_processing_result='proceed profit order' 2020-10-07 09:23:24 INFO: 2020-10-07 09:23:24 INFO: 2020-10-07 09:23:24 INFO: 2020-10-07 09:23:24 INFO: 2020-10-07 10:00:20 INFO: 2020-10-07 10:00:20 INFO: 2020-10-07 10:00:20 INFO: 2020-10-07 10:00:20 INFO: 2020-10-07 10:00:20 INFO: init new order start 2020-10-07 10:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 7, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.4, 'high': 341.35, 'low': 338.85, 'close': 340.85, 'trades': 2269, 'volume': 1908160, 'vwap': 340.12, 'lastSize': 50, 'turnover': 64898536570, 'homeNotional': 20265.310208036808, 'foreignNotional': 6892452.132551044}, {'timestamp': datetime.datetime(2020, 10, 7, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 338.2, 'high': 340.2, 'low': 337.0, 'close': 339.4, 'trades': 3228, 'volume': 2534417, 'vwap': 338.74, 'lastSize': 1, 'turnover': 85849502975, 'homeNotional': 26883.172237903098, 'foreignNotional': 9106283.121566247}, {'timestamp': datetime.datetime(2020, 10, 7, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 336.85, 'high': 338.5, 'low': 335.9, 'close': 338.2, 'trades': 2847, 'volume': 2657114, 'vwap': 336.94, 'lastSize': 12, 'turnover': 89528173700, 'homeNotional': 28123.755767929055, 'foreignNotional': 9475967.133187104}] 2020-10-07 10:00:20 INFO: prepare candles [CandleItem(low=338.85, high=341.35, open=339.4, close=340.85, color='GREEN'), CandleItem(low=337.0, high=340.2, open=338.2, close=339.4, color='GREEN'), CandleItem(low=335.9, high=338.5, open=336.85, close=338.2, color='GREEN')] 2020-10-07 10:00:20 INFO: skip by colors first_candle=CandleItem(low=335.9, high=338.5, open=336.85, close=338.2, color='GREEN') second_candle=CandleItem(low=337.0, high=340.2, open=338.2, close=339.4, color='GREEN') last_candle=CandleItem(low=338.85, high=341.35, open=339.4, close=340.85, color='GREEN') 2020-10-07 10:00:20 INFO: check need new order None 2020-10-07 10:00:20 INFO: init new order end 2020-10-07 10:00:20 INFO: 2020-10-07 10:00:20 INFO: 2020-10-07 10:00:20 INFO: 2020-10-07 10:00:20 INFO: 2020-10-07 10:02:00 INFO: 2020-10-07 10:02:00 INFO: 2020-10-07 10:02:00 INFO: 2020-10-07 10:02:00 INFO: 2020-10-07 10:02:00 INFO: clearing start 2020-10-07 10:02:00 INFO: clearing end 2020-10-07 10:02:00 INFO: 2020-10-07 10:02:00 INFO: 2020-10-07 10:02:00 INFO: 2020-10-07 10:02:00 INFO: 2020-10-07 11:00:20 INFO: 2020-10-07 11:00:20 INFO: 2020-10-07 11:00:20 INFO: 2020-10-07 11:00:20 INFO: 2020-10-07 11:00:20 INFO: init new order start 2020-10-07 11:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 7, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 340.85, 'high': 342.45, 'low': 339.7, 'close': 341.05, 'trades': 2470, 'volume': 2245638, 'vwap': 340.8, 'lastSize': 8000, 'turnover': 76529726290, 'homeNotional': 23841.83310295634, 'foreignNotional': 8125131.898240596}, {'timestamp': datetime.datetime(2020, 10, 7, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.4, 'high': 341.35, 'low': 338.85, 'close': 340.85, 'trades': 2269, 'volume': 1908160, 'vwap': 340.12, 'lastSize': 50, 'turnover': 64898536570, 'homeNotional': 20265.310208036808, 'foreignNotional': 6892452.132551044}, {'timestamp': datetime.datetime(2020, 10, 7, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 338.2, 'high': 340.2, 'low': 337.0, 'close': 339.4, 'trades': 3228, 'volume': 2534417, 'vwap': 338.74, 'lastSize': 1, 'turnover': 85849502975, 'homeNotional': 26883.172237903098, 'foreignNotional': 9106283.121566247}] 2020-10-07 11:00:20 INFO: prepare candles [CandleItem(low=339.7, high=342.45, open=340.85, close=341.05, color='GREEN'), CandleItem(low=338.85, high=341.35, open=339.4, close=340.85, color='GREEN'), CandleItem(low=337.0, high=340.2, open=338.2, close=339.4, color='GREEN')] 2020-10-07 11:00:20 INFO: skip by colors first_candle=CandleItem(low=337.0, high=340.2, open=338.2, close=339.4, color='GREEN') second_candle=CandleItem(low=338.85, high=341.35, open=339.4, close=340.85, color='GREEN') last_candle=CandleItem(low=339.7, high=342.45, open=340.85, close=341.05, color='GREEN') 2020-10-07 11:00:20 INFO: check need new order None 2020-10-07 11:00:20 INFO: init new order end 2020-10-07 11:00:20 INFO: 2020-10-07 11:00:20 INFO: 2020-10-07 11:00:20 INFO: 2020-10-07 11:00:20 INFO: 2020-10-07 11:02:00 INFO: 2020-10-07 11:02:00 INFO: 2020-10-07 11:02:00 INFO: 2020-10-07 11:02:00 INFO: 2020-10-07 11:02:00 INFO: clearing start 2020-10-07 11:02:00 INFO: clearing end 2020-10-07 11:02:00 INFO: 2020-10-07 11:02:00 INFO: 2020-10-07 11:02:00 INFO: 2020-10-07 11:02:00 INFO: 2020-10-07 12:00:20 INFO: 2020-10-07 12:00:20 INFO: 2020-10-07 12:00:20 INFO: 2020-10-07 12:00:20 INFO: 2020-10-07 12:00:20 INFO: init new order start 2020-10-07 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 7, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.05, 'high': 342.0, 'low': 339.5, 'close': 340.0, 'trades': 2101, 'volume': 1501318, 'vwap': 340.33, 'lastSize': 12, 'turnover': 51094237215, 'homeNotional': 15932.315535729225, 'foreignNotional': 5422235.906563407}, {'timestamp': datetime.datetime(2020, 10, 7, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 340.85, 'high': 342.45, 'low': 339.7, 'close': 341.05, 'trades': 2470, 'volume': 2245638, 'vwap': 340.8, 'lastSize': 8000, 'turnover': 76529726290, 'homeNotional': 23841.83310295634, 'foreignNotional': 8125131.898240596}, {'timestamp': datetime.datetime(2020, 10, 7, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.4, 'high': 341.35, 'low': 338.85, 'close': 340.85, 'trades': 2269, 'volume': 1908160, 'vwap': 340.12, 'lastSize': 50, 'turnover': 64898536570, 'homeNotional': 20265.310208036808, 'foreignNotional': 6892452.132551044}] 2020-10-07 12:00:20 INFO: prepare candles [CandleItem(low=339.5, high=342.0, open=341.05, close=340.0, color='RED'), CandleItem(low=339.7, high=342.45, open=340.85, close=341.05, color='GREEN'), CandleItem(low=338.85, high=341.35, open=339.4, close=340.85, color='GREEN')] 2020-10-07 12:00:20 INFO: last_candle=CandleItem(low=339.5, high=342.0, open=341.05, close=340.0, color='RED') 2020-10-07 12:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-07 12:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=339.5, high=342.0, open=341.05, close=340.0, color='RED') 2020-10-07 12:00:20 INFO: skip by CandleItem(low=339.5, high=342.0, open=341.05, close=340.0, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-07 12:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-07 12:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=339.5, high=342.0, open=341.05, close=340.0, color='RED') 2020-10-07 12:00:20 INFO: skip by CandleItem(low=339.5, high=342.0, open=341.05, close=340.0, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-07 12:00:20 INFO: not found applicable config for candle 2020-10-07 12:00:20 INFO: check need new order None 2020-10-07 12:00:20 INFO: init new order end 2020-10-07 12:00:20 INFO: 2020-10-07 12:00:20 INFO: 2020-10-07 12:00:20 INFO: 2020-10-07 12:00:20 INFO: 2020-10-07 12:02:00 INFO: 2020-10-07 12:02:00 INFO: 2020-10-07 12:02:00 INFO: 2020-10-07 12:02:00 INFO: 2020-10-07 12:02:00 INFO: clearing start 2020-10-07 12:02:00 INFO: clearing end 2020-10-07 12:02:00 INFO: 2020-10-07 12:02:00 INFO: 2020-10-07 12:02:00 INFO: 2020-10-07 12:02:00 INFO: 2020-10-07 13:00:20 INFO: 2020-10-07 13:00:20 INFO: 2020-10-07 13:00:20 INFO: 2020-10-07 13:00:20 INFO: 2020-10-07 13:00:20 INFO: init new order start 2020-10-07 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 7, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 340.0, 'high': 340.3, 'low': 337.05, 'close': 338.9, 'trades': 3639, 'volume': 2816923, 'vwap': 338.64, 'lastSize': 4722, 'turnover': 95391252410, 'homeNotional': 29870.928066538843, 'foreignNotional': 10115395.989019707}, {'timestamp': datetime.datetime(2020, 10, 7, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.05, 'high': 342.0, 'low': 339.5, 'close': 340.0, 'trades': 2101, 'volume': 1501318, 'vwap': 340.33, 'lastSize': 12, 'turnover': 51094237215, 'homeNotional': 15932.315535729225, 'foreignNotional': 5422235.906563407}, {'timestamp': datetime.datetime(2020, 10, 7, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 340.85, 'high': 342.45, 'low': 339.7, 'close': 341.05, 'trades': 2470, 'volume': 2245638, 'vwap': 340.8, 'lastSize': 8000, 'turnover': 76529726290, 'homeNotional': 23841.83310295634, 'foreignNotional': 8125131.898240596}] 2020-10-07 13:00:20 INFO: prepare candles [CandleItem(low=337.05, high=340.3, open=340.0, close=338.9, color='RED'), CandleItem(low=339.5, high=342.0, open=341.05, close=340.0, color='RED'), CandleItem(low=339.7, high=342.45, open=340.85, close=341.05, color='GREEN')] 2020-10-07 13:00:20 INFO: skip by colors first_candle=CandleItem(low=339.7, high=342.45, open=340.85, close=341.05, color='GREEN') second_candle=CandleItem(low=339.5, high=342.0, open=341.05, close=340.0, color='RED') last_candle=CandleItem(low=337.05, high=340.3, open=340.0, close=338.9, color='RED') 2020-10-07 13:00:20 INFO: check need new order None 2020-10-07 13:00:20 INFO: init new order end 2020-10-07 13:00:20 INFO: 2020-10-07 13:00:20 INFO: 2020-10-07 13:00:20 INFO: 2020-10-07 13:00:20 INFO: 2020-10-07 13:02:00 INFO: 2020-10-07 13:02:00 INFO: 2020-10-07 13:02:00 INFO: 2020-10-07 13:02:00 INFO: 2020-10-07 13:02:00 INFO: clearing start 2020-10-07 13:02:00 INFO: clearing end 2020-10-07 13:02:00 INFO: 2020-10-07 13:02:00 INFO: 2020-10-07 13:02:00 INFO: 2020-10-07 13:02:00 INFO: 2020-10-07 14:00:20 INFO: 2020-10-07 14:00:20 INFO: 2020-10-07 14:00:20 INFO: 2020-10-07 14:00:20 INFO: 2020-10-07 14:00:20 INFO: init new order start 2020-10-07 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 7, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 338.9, 'high': 340.05, 'low': 337.8, 'close': 339.7, 'trades': 3595, 'volume': 1598542, 'vwap': 338.77, 'lastSize': 110, 'turnover': 54152365915, 'homeNotional': 16928.17770892793, 'foreignNotional': 5734610.946739785}, {'timestamp': datetime.datetime(2020, 10, 7, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 340.0, 'high': 340.3, 'low': 337.05, 'close': 338.9, 'trades': 3639, 'volume': 2816923, 'vwap': 338.64, 'lastSize': 4722, 'turnover': 95391252410, 'homeNotional': 29870.928066538843, 'foreignNotional': 10115395.989019707}, {'timestamp': datetime.datetime(2020, 10, 7, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.05, 'high': 342.0, 'low': 339.5, 'close': 340.0, 'trades': 2101, 'volume': 1501318, 'vwap': 340.33, 'lastSize': 12, 'turnover': 51094237215, 'homeNotional': 15932.315535729225, 'foreignNotional': 5422235.906563407}] 2020-10-07 14:00:20 INFO: prepare candles [CandleItem(low=337.8, high=340.05, open=338.9, close=339.7, color='GREEN'), CandleItem(low=337.05, high=340.3, open=340.0, close=338.9, color='RED'), CandleItem(low=339.5, high=342.0, open=341.05, close=340.0, color='RED')] 2020-10-07 14:00:20 INFO: last_candle=CandleItem(low=337.8, high=340.05, open=338.9, close=339.7, color='GREEN') 2020-10-07 14:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-07 14:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=337.8, high=340.05, open=338.9, close=339.7, color='GREEN') 2020-10-07 14:00:20 INFO: skip by CandleItem(low=337.8, high=340.05, open=338.9, close=339.7, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-07 14:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-07 14:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=337.8, high=340.05, open=338.9, close=339.7, color='GREEN') 2020-10-07 14:00:20 INFO: skip by CandleItem(low=337.8, high=340.05, open=338.9, close=339.7, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-07 14:00:20 INFO: not found applicable config for candle 2020-10-07 14:00:20 INFO: check need new order None 2020-10-07 14:00:20 INFO: init new order end 2020-10-07 14:00:20 INFO: 2020-10-07 14:00:20 INFO: 2020-10-07 14:00:20 INFO: 2020-10-07 14:00:20 INFO: 2020-10-07 14:02:00 INFO: 2020-10-07 14:02:00 INFO: 2020-10-07 14:02:00 INFO: 2020-10-07 14:02:00 INFO: 2020-10-07 14:02:00 INFO: clearing start 2020-10-07 14:02:00 INFO: clearing end 2020-10-07 14:02:00 INFO: 2020-10-07 14:02:00 INFO: 2020-10-07 14:02:00 INFO: 2020-10-07 14:02:00 INFO: 2020-10-07 15:00:20 INFO: 2020-10-07 15:00:20 INFO: 2020-10-07 15:00:20 INFO: 2020-10-07 15:00:20 INFO: 2020-10-07 15:00:20 INFO: init new order start 2020-10-07 15:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 7, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.7, 'high': 340.1, 'low': 338.25, 'close': 339.55, 'trades': 2345, 'volume': 1589803, 'vwap': 339.38, 'lastSize': 300, 'turnover': 53954259510, 'homeNotional': 16852.30433188522, 'foreignNotional': 5719290.117833143}, {'timestamp': datetime.datetime(2020, 10, 7, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 338.9, 'high': 340.05, 'low': 337.8, 'close': 339.7, 'trades': 3595, 'volume': 1598542, 'vwap': 338.77, 'lastSize': 110, 'turnover': 54152365915, 'homeNotional': 16928.17770892793, 'foreignNotional': 5734610.946739785}, {'timestamp': datetime.datetime(2020, 10, 7, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 340.0, 'high': 340.3, 'low': 337.05, 'close': 338.9, 'trades': 3639, 'volume': 2816923, 'vwap': 338.64, 'lastSize': 4722, 'turnover': 95391252410, 'homeNotional': 29870.928066538843, 'foreignNotional': 10115395.989019707}] 2020-10-07 15:00:21 INFO: prepare candles [CandleItem(low=338.25, high=340.1, open=339.7, close=339.55, color='RED'), CandleItem(low=337.8, high=340.05, open=338.9, close=339.7, color='GREEN'), CandleItem(low=337.05, high=340.3, open=340.0, close=338.9, color='RED')] 2020-10-07 15:00:21 INFO: skip by colors first_candle=CandleItem(low=337.05, high=340.3, open=340.0, close=338.9, color='RED') second_candle=CandleItem(low=337.8, high=340.05, open=338.9, close=339.7, color='GREEN') last_candle=CandleItem(low=338.25, high=340.1, open=339.7, close=339.55, color='RED') 2020-10-07 15:00:21 INFO: check need new order None 2020-10-07 15:00:21 INFO: init new order end 2020-10-07 15:00:21 INFO: 2020-10-07 15:00:21 INFO: 2020-10-07 15:00:21 INFO: 2020-10-07 15:00:21 INFO: 2020-10-07 15:02:00 INFO: 2020-10-07 15:02:00 INFO: 2020-10-07 15:02:00 INFO: 2020-10-07 15:02:00 INFO: 2020-10-07 15:02:00 INFO: clearing start 2020-10-07 15:02:00 INFO: clearing end 2020-10-07 15:02:00 INFO: 2020-10-07 15:02:00 INFO: 2020-10-07 15:02:00 INFO: 2020-10-07 15:02:00 INFO: 2020-10-07 16:00:20 INFO: 2020-10-07 16:00:20 INFO: 2020-10-07 16:00:20 INFO: 2020-10-07 16:00:20 INFO: 2020-10-07 16:00:20 INFO: init new order start 2020-10-07 16:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 7, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.55, 'high': 342.25, 'low': 339.6, 'close': 341.35, 'trades': 3940, 'volume': 2673385, 'vwap': 341.3, 'lastSize': 3258, 'turnover': 91240080155, 'homeNotional': 28397.505559657144, 'foreignNotional': 9691802.339845056}, {'timestamp': datetime.datetime(2020, 10, 7, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.7, 'high': 340.1, 'low': 338.25, 'close': 339.55, 'trades': 2345, 'volume': 1589803, 'vwap': 339.38, 'lastSize': 300, 'turnover': 53954259510, 'homeNotional': 16852.30433188522, 'foreignNotional': 5719290.117833143}, {'timestamp': datetime.datetime(2020, 10, 7, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 338.9, 'high': 340.05, 'low': 337.8, 'close': 339.7, 'trades': 3595, 'volume': 1598542, 'vwap': 338.77, 'lastSize': 110, 'turnover': 54152365915, 'homeNotional': 16928.17770892793, 'foreignNotional': 5734610.946739785}] 2020-10-07 16:00:21 INFO: prepare candles [CandleItem(low=339.6, high=342.25, open=339.55, close=341.35, color='GREEN'), CandleItem(low=338.25, high=340.1, open=339.7, close=339.55, color='RED'), CandleItem(low=337.8, high=340.05, open=338.9, close=339.7, color='GREEN')] 2020-10-07 16:00:21 INFO: skip by colors first_candle=CandleItem(low=337.8, high=340.05, open=338.9, close=339.7, color='GREEN') second_candle=CandleItem(low=338.25, high=340.1, open=339.7, close=339.55, color='RED') last_candle=CandleItem(low=339.6, high=342.25, open=339.55, close=341.35, color='GREEN') 2020-10-07 16:00:21 INFO: check need new order None 2020-10-07 16:00:21 INFO: init new order end 2020-10-07 16:00:21 INFO: 2020-10-07 16:00:21 INFO: 2020-10-07 16:00:21 INFO: 2020-10-07 16:00:21 INFO: 2020-10-07 16:02:00 INFO: 2020-10-07 16:02:00 INFO: 2020-10-07 16:02:00 INFO: 2020-10-07 16:02:00 INFO: 2020-10-07 16:02:00 INFO: clearing start 2020-10-07 16:02:00 INFO: clearing end 2020-10-07 16:02:00 INFO: 2020-10-07 16:02:00 INFO: 2020-10-07 16:02:00 INFO: 2020-10-07 16:02:00 INFO: 2020-10-07 17:00:20 INFO: 2020-10-07 17:00:20 INFO: 2020-10-07 17:00:20 INFO: 2020-10-07 17:00:20 INFO: 2020-10-07 17:00:20 INFO: init new order start 2020-10-07 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 7, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.35, 'high': 342.75, 'low': 340.8, 'close': 341.5, 'trades': 3128, 'volume': 2449127, 'vwap': 341.64, 'lastSize': 800, 'turnover': 83670261120, 'homeNotional': 26025.548920685123, 'foreignNotional': 8891189.740236532}, {'timestamp': datetime.datetime(2020, 10, 7, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.55, 'high': 342.25, 'low': 339.6, 'close': 341.35, 'trades': 3940, 'volume': 2673385, 'vwap': 341.3, 'lastSize': 3258, 'turnover': 91240080155, 'homeNotional': 28397.505559657144, 'foreignNotional': 9691802.339845056}, {'timestamp': datetime.datetime(2020, 10, 7, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.7, 'high': 340.1, 'low': 338.25, 'close': 339.55, 'trades': 2345, 'volume': 1589803, 'vwap': 339.38, 'lastSize': 300, 'turnover': 53954259510, 'homeNotional': 16852.30433188522, 'foreignNotional': 5719290.117833143}] 2020-10-07 17:00:20 INFO: prepare candles [CandleItem(low=340.8, high=342.75, open=341.35, close=341.5, color='GREEN'), CandleItem(low=339.6, high=342.25, open=339.55, close=341.35, color='GREEN'), CandleItem(low=338.25, high=340.1, open=339.7, close=339.55, color='RED')] 2020-10-07 17:00:20 INFO: skip by colors first_candle=CandleItem(low=338.25, high=340.1, open=339.7, close=339.55, color='RED') second_candle=CandleItem(low=339.6, high=342.25, open=339.55, close=341.35, color='GREEN') last_candle=CandleItem(low=340.8, high=342.75, open=341.35, close=341.5, color='GREEN') 2020-10-07 17:00:20 INFO: check need new order None 2020-10-07 17:00:20 INFO: init new order end 2020-10-07 17:00:20 INFO: 2020-10-07 17:00:20 INFO: 2020-10-07 17:00:20 INFO: 2020-10-07 17:00:20 INFO: 2020-10-07 17:02:00 INFO: 2020-10-07 17:02:00 INFO: 2020-10-07 17:02:00 INFO: 2020-10-07 17:02:00 INFO: 2020-10-07 17:02:00 INFO: clearing start 2020-10-07 17:02:00 INFO: clearing end 2020-10-07 17:02:00 INFO: 2020-10-07 17:02:00 INFO: 2020-10-07 17:02:00 INFO: 2020-10-07 17:02:00 INFO: 2020-10-07 18:00:20 INFO: 2020-10-07 18:00:20 INFO: 2020-10-07 18:00:20 INFO: 2020-10-07 18:00:20 INFO: 2020-10-07 18:00:20 INFO: init new order start 2020-10-07 18:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 7, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.5, 'high': 341.75, 'low': 340.0, 'close': 341.25, 'trades': 2290, 'volume': 1638730, 'vwap': 340.85, 'lastSize': 200, 'turnover': 55855563025, 'homeNotional': 17396.204318970893, 'foreignNotional': 5929441.082340292}, {'timestamp': datetime.datetime(2020, 10, 7, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.35, 'high': 342.75, 'low': 340.8, 'close': 341.5, 'trades': 3128, 'volume': 2449127, 'vwap': 341.64, 'lastSize': 800, 'turnover': 83670261120, 'homeNotional': 26025.548920685123, 'foreignNotional': 8891189.740236532}, {'timestamp': datetime.datetime(2020, 10, 7, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.55, 'high': 342.25, 'low': 339.6, 'close': 341.35, 'trades': 3940, 'volume': 2673385, 'vwap': 341.3, 'lastSize': 3258, 'turnover': 91240080155, 'homeNotional': 28397.505559657144, 'foreignNotional': 9691802.339845056}] 2020-10-07 18:00:21 INFO: prepare candles [CandleItem(low=340.0, high=341.75, open=341.5, close=341.25, color='RED'), CandleItem(low=340.8, high=342.75, open=341.35, close=341.5, color='GREEN'), CandleItem(low=339.6, high=342.25, open=339.55, close=341.35, color='GREEN')] 2020-10-07 18:00:21 INFO: last_candle=CandleItem(low=340.0, high=341.75, open=341.5, close=341.25, color='RED') 2020-10-07 18:00:21 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-07 18:00:21 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=340.0, high=341.75, open=341.5, close=341.25, color='RED') 2020-10-07 18:00:21 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=340.8, high=342.75, open=341.35, close=341.5, color='GREEN') 2020-10-07 18:00:21 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=339.6, high=342.25, open=339.55, close=341.35, color='GREEN') 2020-10-07 18:00:21 INFO: hit candle order=OrderProperties(candle=CandleItem(low=340.0, high=341.75, open=341.5, close=341.25, color='RED'), take_profit_factor=6.0, clearing_interval=3600) 2020-10-07 18:00:21 INFO: check need new order OrderProperties(candle=CandleItem(low=340.0, high=341.75, open=341.5, close=341.25, color='RED'), take_profit_factor=6.0, clearing_interval=3600) 2020-10-07 18:00:21 INFO: place order: start candle=CandleItem(low=340.0, high=341.75, open=341.5, close=341.25, color='RED') ticker='ETHUSD' price_offset=0.1 2020-10-07 18:00:21 INFO: place order: side_factor=1 init_trigger_price=339.95 init_order_price=339.9 stop_price_offset=0.0 candle.size=1.75 stop_price=341.75 take_price=329.4 2020-10-07 18:00:21 INFO: place order round: side_factor=1 init_trigger_price=Decimal('339.94999999999998863131622783839702606201171875') init_order_price=Decimal('339.8999999999999772626324556767940521240234375') stop_price_offset=0.0 candle.size=1.75 stop_price=Decimal('341.75') take_price=Decimal('329.3999999999999772626324556767940521240234375') 2020-10-07 18:00:21 INFO: place order: compute qty=-1056 2020-10-07 18:00:21 INFO: place order: save order to db fa971013e55044db8c9c6928b5626243; response=True 2020-10-07 18:00:21 INFO: process event {'orderID': 'c07b31e2-c15c-4e0d-98b1-20741e941549', 'clOrdID': 'fa971013e55044db8c9c6928b5626243', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1056, 'price': 339.9, 'displayQty': None, 'stopPx': 339.95, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1056, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-10-07T15:00:21.050Z', 'timestamp': '2020-10-07T15:00:21.050Z'} 2020-10-07 18:00:21 INFO: skip event fa971013e55044db8c9c6928b5626243 New 2020-10-07 18:00:21 INFO: post order to exchange resp={'orderID': 'c07b31e2-c15c-4e0d-98b1-20741e941549', 'clOrdID': 'fa971013e55044db8c9c6928b5626243', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1056, 'price': 339.9, 'displayQty': None, 'stopPx': 339.95, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1056, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 7, 15, 0, 21, 50000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 7, 15, 0, 21, 50000, tzinfo=tzutc())} 2020-10-07 18:00:21 INFO: place new init order {'qty': -1056, 'init_price': Decimal('339.94999999999998863131622783839702606201171875'), 'stop_price': Decimal('341.75'), 'take_price': Decimal('329.3999999999999772626324556767940521240234375'), 'order_uid': 'fa971013e55044db8c9c6928b5626243', 'response': {'orderID': 'c07b31e2-c15c-4e0d-98b1-20741e941549', 'clOrdID': 'fa971013e55044db8c9c6928b5626243', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1056, 'price': 339.9, 'displayQty': None, 'stopPx': 339.95, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1056, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 7, 15, 0, 21, 50000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 7, 15, 0, 21, 50000, tzinfo=tzutc())}} 2020-10-07 18:00:21 INFO: init new order end 2020-10-07 18:00:21 INFO: 2020-10-07 18:00:21 INFO: 2020-10-07 18:00:21 INFO: 2020-10-07 18:00:21 INFO: 2020-10-07 18:02:00 INFO: 2020-10-07 18:02:00 INFO: 2020-10-07 18:02:00 INFO: 2020-10-07 18:02:00 INFO: 2020-10-07 18:02:00 INFO: clearing start 2020-10-07 18:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'c07b31e2-c15c-4e0d-98b1-20741e941549', 'clOrdID': 'fa971013e55044db8c9c6928b5626243', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1056, 'price': 339.9, 'displayQty': None, 'stopPx': 339.95, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1056, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 7, 15, 0, 21, 50000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 7, 15, 0, 21, 50000, tzinfo=tzutc())} 2020-10-07 18:02:00 INFO: order time=2020-10-07 15:00:21.050000+00:00; delta from now UTC=0:01:39.215898 time_delta.total_seconds()=99.215898; time_diff_offset='3600' 2020-10-07 18:02:00 INFO: skip by time diff 2020-10-07 15:00:21.050000+00:00 2020-10-07 18:02:00 INFO: clearing end 2020-10-07 18:02:00 INFO: 2020-10-07 18:02:00 INFO: 2020-10-07 18:02:00 INFO: 2020-10-07 18:02:00 INFO: 2020-10-07 19:00:20 INFO: 2020-10-07 19:00:20 INFO: 2020-10-07 19:00:20 INFO: 2020-10-07 19:00:20 INFO: 2020-10-07 19:00:20 INFO: init new order start 2020-10-07 19:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 7, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.25, 'high': 343.25, 'low': 340.65, 'close': 341.05, 'trades': 3532, 'volume': 2744906, 'vwap': 341.8, 'lastSize': 13, 'turnover': 93819984845, 'homeNotional': 29194.229461573712, 'foreignNotional': 9978501.519223267}, {'timestamp': datetime.datetime(2020, 10, 7, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.5, 'high': 341.75, 'low': 340.0, 'close': 341.25, 'trades': 2290, 'volume': 1638730, 'vwap': 340.85, 'lastSize': 200, 'turnover': 55855563025, 'homeNotional': 17396.204318970893, 'foreignNotional': 5929441.082340292}, {'timestamp': datetime.datetime(2020, 10, 7, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.35, 'high': 342.75, 'low': 340.8, 'close': 341.5, 'trades': 3128, 'volume': 2449127, 'vwap': 341.64, 'lastSize': 800, 'turnover': 83670261120, 'homeNotional': 26025.548920685123, 'foreignNotional': 8891189.740236532}] 2020-10-07 19:00:21 INFO: prepare candles [CandleItem(low=340.65, high=343.25, open=341.25, close=341.05, color='RED'), CandleItem(low=340.0, high=341.75, open=341.5, close=341.25, color='RED'), CandleItem(low=340.8, high=342.75, open=341.35, close=341.5, color='GREEN')] 2020-10-07 19:00:21 INFO: skip by colors first_candle=CandleItem(low=340.8, high=342.75, open=341.35, close=341.5, color='GREEN') second_candle=CandleItem(low=340.0, high=341.75, open=341.5, close=341.25, color='RED') last_candle=CandleItem(low=340.65, high=343.25, open=341.25, close=341.05, color='RED') 2020-10-07 19:00:21 INFO: check need new order None 2020-10-07 19:00:21 INFO: init new order end 2020-10-07 19:00:21 INFO: 2020-10-07 19:00:21 INFO: 2020-10-07 19:00:21 INFO: 2020-10-07 19:00:21 INFO: 2020-10-07 19:02:00 INFO: 2020-10-07 19:02:00 INFO: 2020-10-07 19:02:00 INFO: 2020-10-07 19:02:00 INFO: 2020-10-07 19:02:00 INFO: clearing start 2020-10-07 19:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'c07b31e2-c15c-4e0d-98b1-20741e941549', 'clOrdID': 'fa971013e55044db8c9c6928b5626243', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1056, 'price': 339.9, 'displayQty': None, 'stopPx': 339.95, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1056, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 7, 15, 0, 21, 50000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 7, 15, 0, 21, 50000, tzinfo=tzutc())} 2020-10-07 19:02:00 INFO: order time=2020-10-07 15:00:21.050000+00:00; delta from now UTC=1:01:39.263515 time_delta.total_seconds()=3699.263515; time_diff_offset='3600' 2020-10-07 19:02:00 INFO: clear order fa971013e55044db8c9c6928b5626243 2020-10-07 19:02:00 INFO: process event {'orderID': 'c07b31e2-c15c-4e0d-98b1-20741e941549', 'ordStatus': 'Canceled', 'leavesQty': 0, 'text': 'Canceled: cancelled by clearing\nInit order by supervisor.py', 'timestamp': '2020-10-07T16:02:00.335Z', 'clOrdID': 'fa971013e55044db8c9c6928b5626243', 'account': 605536, 'symbol': 'ETHUSD'} 2020-10-07 19:02:00 INFO: skip event fa971013e55044db8c9c6928b5626243 Canceled 2020-10-07 19:02:00 INFO: cancel order resp=[{'orderID': 'c07b31e2-c15c-4e0d-98b1-20741e941549', 'clOrdID': 'fa971013e55044db8c9c6928b5626243', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1056, 'price': 339.9, 'displayQty': None, 'stopPx': 339.95, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'Canceled', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 0, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Canceled: cancelled by clearing\nInit order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 7, 15, 0, 21, 50000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 7, 16, 2, 0, 335000, tzinfo=tzutc())}] 2020-10-07 19:02:00 INFO: clearing end 2020-10-07 19:02:00 INFO: 2020-10-07 19:02:00 INFO: 2020-10-07 19:02:00 INFO: 2020-10-07 19:02:00 INFO: 2020-10-07 20:00:20 INFO: 2020-10-07 20:00:20 INFO: 2020-10-07 20:00:20 INFO: 2020-10-07 20:00:20 INFO: 2020-10-07 20:00:20 INFO: init new order start 2020-10-07 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 7, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.05, 'high': 341.1, 'low': 337.8, 'close': 339.05, 'trades': 4773, 'volume': 4220841, 'vwap': 339.24, 'lastSize': 100, 'turnover': 143185993510, 'homeNotional': 44834.42119298743, 'foreignNotional': 15209448.254850447}, {'timestamp': datetime.datetime(2020, 10, 7, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.25, 'high': 343.25, 'low': 340.65, 'close': 341.05, 'trades': 3532, 'volume': 2744906, 'vwap': 341.8, 'lastSize': 13, 'turnover': 93819984845, 'homeNotional': 29194.229461573712, 'foreignNotional': 9978501.519223267}, {'timestamp': datetime.datetime(2020, 10, 7, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.5, 'high': 341.75, 'low': 340.0, 'close': 341.25, 'trades': 2290, 'volume': 1638730, 'vwap': 340.85, 'lastSize': 200, 'turnover': 55855563025, 'homeNotional': 17396.204318970893, 'foreignNotional': 5929441.082340292}] 2020-10-07 20:00:20 INFO: prepare candles [CandleItem(low=337.8, high=341.1, open=341.05, close=339.05, color='RED'), CandleItem(low=340.65, high=343.25, open=341.25, close=341.05, color='RED'), CandleItem(low=340.0, high=341.75, open=341.5, close=341.25, color='RED')] 2020-10-07 20:00:20 INFO: skip by colors first_candle=CandleItem(low=340.0, high=341.75, open=341.5, close=341.25, color='RED') second_candle=CandleItem(low=340.65, high=343.25, open=341.25, close=341.05, color='RED') last_candle=CandleItem(low=337.8, high=341.1, open=341.05, close=339.05, color='RED') 2020-10-07 20:00:20 INFO: check need new order None 2020-10-07 20:00:20 INFO: init new order end 2020-10-07 20:00:20 INFO: 2020-10-07 20:00:20 INFO: 2020-10-07 20:00:20 INFO: 2020-10-07 20:00:20 INFO: 2020-10-07 20:02:00 INFO: 2020-10-07 20:02:00 INFO: 2020-10-07 20:02:00 INFO: 2020-10-07 20:02:00 INFO: 2020-10-07 20:02:00 INFO: clearing start 2020-10-07 20:02:00 INFO: clearing end 2020-10-07 20:02:00 INFO: 2020-10-07 20:02:00 INFO: 2020-10-07 20:02:00 INFO: 2020-10-07 20:02:00 INFO: 2020-10-07 21:00:20 INFO: 2020-10-07 21:00:20 INFO: 2020-10-07 21:00:20 INFO: 2020-10-07 21:00:20 INFO: 2020-10-07 21:00:20 INFO: init new order start 2020-10-07 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 7, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.05, 'high': 339.55, 'low': 337.55, 'close': 338.65, 'trades': 2357, 'volume': 1710820, 'vwap': 338.68, 'lastSize': 48, 'turnover': 57941864170, 'homeNotional': 18187.666821388324, 'foreignNotional': 6159783.4389161365}, {'timestamp': datetime.datetime(2020, 10, 7, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.05, 'high': 341.1, 'low': 337.8, 'close': 339.05, 'trades': 4773, 'volume': 4220841, 'vwap': 339.24, 'lastSize': 100, 'turnover': 143185993510, 'homeNotional': 44834.42119298743, 'foreignNotional': 15209448.254850447}, {'timestamp': datetime.datetime(2020, 10, 7, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.25, 'high': 343.25, 'low': 340.65, 'close': 341.05, 'trades': 3532, 'volume': 2744906, 'vwap': 341.8, 'lastSize': 13, 'turnover': 93819984845, 'homeNotional': 29194.229461573712, 'foreignNotional': 9978501.519223267}] 2020-10-07 21:00:20 INFO: prepare candles [CandleItem(low=337.55, high=339.55, open=339.05, close=338.65, color='RED'), CandleItem(low=337.8, high=341.1, open=341.05, close=339.05, color='RED'), CandleItem(low=340.65, high=343.25, open=341.25, close=341.05, color='RED')] 2020-10-07 21:00:20 INFO: skip by colors first_candle=CandleItem(low=340.65, high=343.25, open=341.25, close=341.05, color='RED') second_candle=CandleItem(low=337.8, high=341.1, open=341.05, close=339.05, color='RED') last_candle=CandleItem(low=337.55, high=339.55, open=339.05, close=338.65, color='RED') 2020-10-07 21:00:20 INFO: check need new order None 2020-10-07 21:00:20 INFO: init new order end 2020-10-07 21:00:20 INFO: 2020-10-07 21:00:20 INFO: 2020-10-07 21:00:20 INFO: 2020-10-07 21:00:20 INFO: 2020-10-07 21:02:00 INFO: 2020-10-07 21:02:00 INFO: 2020-10-07 21:02:00 INFO: 2020-10-07 21:02:00 INFO: 2020-10-07 21:02:00 INFO: clearing start 2020-10-07 21:02:00 INFO: clearing end 2020-10-07 21:02:00 INFO: 2020-10-07 21:02:00 INFO: 2020-10-07 21:02:00 INFO: 2020-10-07 21:02:00 INFO: 2020-10-07 22:00:20 INFO: 2020-10-07 22:00:20 INFO: 2020-10-07 22:00:20 INFO: 2020-10-07 22:00:20 INFO: 2020-10-07 22:00:20 INFO: init new order start 2020-10-07 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 7, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 338.65, 'high': 342.0, 'low': 338.6, 'close': 341.6, 'trades': 2442, 'volume': 1993743, 'vwap': 340.89, 'lastSize': 62, 'turnover': 67964343330, 'homeNotional': 21232.02176219944, 'foreignNotional': 7237759.469370723}, {'timestamp': datetime.datetime(2020, 10, 7, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.05, 'high': 339.55, 'low': 337.55, 'close': 338.65, 'trades': 2357, 'volume': 1710820, 'vwap': 338.68, 'lastSize': 48, 'turnover': 57941864170, 'homeNotional': 18187.666821388324, 'foreignNotional': 6159783.4389161365}, {'timestamp': datetime.datetime(2020, 10, 7, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.05, 'high': 341.1, 'low': 337.8, 'close': 339.05, 'trades': 4773, 'volume': 4220841, 'vwap': 339.24, 'lastSize': 100, 'turnover': 143185993510, 'homeNotional': 44834.42119298743, 'foreignNotional': 15209448.254850447}] 2020-10-07 22:00:20 INFO: prepare candles [CandleItem(low=338.6, high=342.0, open=338.65, close=341.6, color='GREEN'), CandleItem(low=337.55, high=339.55, open=339.05, close=338.65, color='RED'), CandleItem(low=337.8, high=341.1, open=341.05, close=339.05, color='RED')] 2020-10-07 22:00:20 INFO: last_candle=CandleItem(low=338.6, high=342.0, open=338.65, close=341.6, color='GREEN') 2020-10-07 22:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-07 22:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=338.6, high=342.0, open=338.65, close=341.6, color='GREEN') 2020-10-07 22:00:20 INFO: skip by CandleItem(low=338.6, high=342.0, open=338.65, close=341.6, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-07 22:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-07 22:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=338.6, high=342.0, open=338.65, close=341.6, color='GREEN') 2020-10-07 22:00:20 INFO: skip by CandleItem(low=338.6, high=342.0, open=338.65, close=341.6, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-07 22:00:20 INFO: not found applicable config for candle 2020-10-07 22:00:20 INFO: check need new order None 2020-10-07 22:00:20 INFO: init new order end 2020-10-07 22:00:20 INFO: 2020-10-07 22:00:20 INFO: 2020-10-07 22:00:20 INFO: 2020-10-07 22:00:20 INFO: 2020-10-07 22:02:00 INFO: 2020-10-07 22:02:00 INFO: 2020-10-07 22:02:00 INFO: 2020-10-07 22:02:00 INFO: 2020-10-07 22:02:00 INFO: clearing start 2020-10-07 22:02:00 INFO: clearing end 2020-10-07 22:02:00 INFO: 2020-10-07 22:02:00 INFO: 2020-10-07 22:02:00 INFO: 2020-10-07 22:02:00 INFO: 2020-10-07 23:00:20 INFO: 2020-10-07 23:00:20 INFO: 2020-10-07 23:00:20 INFO: 2020-10-07 23:00:20 INFO: 2020-10-07 23:00:20 INFO: init new order start 2020-10-07 23:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 7, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.6, 'high': 342.85, 'low': 341.0, 'close': 341.2, 'trades': 2073, 'volume': 1575024, 'vwap': 341.82, 'lastSize': 500, 'turnover': 53836141935, 'homeNotional': 16802.050419318184, 'foreignNotional': 5743139.700082849}, {'timestamp': datetime.datetime(2020, 10, 7, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 338.65, 'high': 342.0, 'low': 338.6, 'close': 341.6, 'trades': 2442, 'volume': 1993743, 'vwap': 340.89, 'lastSize': 62, 'turnover': 67964343330, 'homeNotional': 21232.02176219944, 'foreignNotional': 7237759.469370723}, {'timestamp': datetime.datetime(2020, 10, 7, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.05, 'high': 339.55, 'low': 337.55, 'close': 338.65, 'trades': 2357, 'volume': 1710820, 'vwap': 338.68, 'lastSize': 48, 'turnover': 57941864170, 'homeNotional': 18187.666821388324, 'foreignNotional': 6159783.4389161365}] 2020-10-07 23:00:20 INFO: prepare candles [CandleItem(low=341.0, high=342.85, open=341.6, close=341.2, color='RED'), CandleItem(low=338.6, high=342.0, open=338.65, close=341.6, color='GREEN'), CandleItem(low=337.55, high=339.55, open=339.05, close=338.65, color='RED')] 2020-10-07 23:00:20 INFO: skip by colors first_candle=CandleItem(low=337.55, high=339.55, open=339.05, close=338.65, color='RED') second_candle=CandleItem(low=338.6, high=342.0, open=338.65, close=341.6, color='GREEN') last_candle=CandleItem(low=341.0, high=342.85, open=341.6, close=341.2, color='RED') 2020-10-07 23:00:20 INFO: check need new order None 2020-10-07 23:00:20 INFO: init new order end 2020-10-07 23:00:20 INFO: 2020-10-07 23:00:20 INFO: 2020-10-07 23:00:20 INFO: 2020-10-07 23:00:20 INFO: 2020-10-07 23:02:00 INFO: 2020-10-07 23:02:00 INFO: 2020-10-07 23:02:00 INFO: 2020-10-07 23:02:00 INFO: 2020-10-07 23:02:00 INFO: clearing start 2020-10-07 23:02:00 INFO: clearing end 2020-10-07 23:02:00 INFO: 2020-10-07 23:02:00 INFO: 2020-10-07 23:02:00 INFO: 2020-10-07 23:02:00 INFO: 2020-10-08 00:00:20 INFO: 2020-10-08 00:00:20 INFO: 2020-10-08 00:00:20 INFO: 2020-10-08 00:00:20 INFO: 2020-10-08 00:00:20 INFO: init new order start 2020-10-08 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 7, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.2, 'high': 341.95, 'low': 340.6, 'close': 341.15, 'trades': 1314, 'volume': 895561, 'vwap': 341.22, 'lastSize': 4, 'turnover': 30557887735, 'homeNotional': 9543.103730368455, 'foreignNotional': 3256251.330569435}, {'timestamp': datetime.datetime(2020, 10, 7, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.6, 'high': 342.85, 'low': 341.0, 'close': 341.2, 'trades': 2073, 'volume': 1575024, 'vwap': 341.82, 'lastSize': 500, 'turnover': 53836141935, 'homeNotional': 16802.050419318184, 'foreignNotional': 5743139.700082849}, {'timestamp': datetime.datetime(2020, 10, 7, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 338.65, 'high': 342.0, 'low': 338.6, 'close': 341.6, 'trades': 2442, 'volume': 1993743, 'vwap': 340.89, 'lastSize': 62, 'turnover': 67964343330, 'homeNotional': 21232.02176219944, 'foreignNotional': 7237759.469370723}] 2020-10-08 00:00:20 INFO: prepare candles [CandleItem(low=340.6, high=341.95, open=341.2, close=341.15, color='RED'), CandleItem(low=341.0, high=342.85, open=341.6, close=341.2, color='RED'), CandleItem(low=338.6, high=342.0, open=338.65, close=341.6, color='GREEN')] 2020-10-08 00:00:20 INFO: skip by colors first_candle=CandleItem(low=338.6, high=342.0, open=338.65, close=341.6, color='GREEN') second_candle=CandleItem(low=341.0, high=342.85, open=341.6, close=341.2, color='RED') last_candle=CandleItem(low=340.6, high=341.95, open=341.2, close=341.15, color='RED') 2020-10-08 00:00:20 INFO: check need new order None 2020-10-08 00:00:20 INFO: init new order end 2020-10-08 00:00:20 INFO: 2020-10-08 00:00:20 INFO: 2020-10-08 00:00:20 INFO: 2020-10-08 00:00:20 INFO: 2020-10-08 00:02:00 INFO: 2020-10-08 00:02:00 INFO: 2020-10-08 00:02:00 INFO: 2020-10-08 00:02:00 INFO: 2020-10-08 00:02:00 INFO: clearing start 2020-10-08 00:02:00 INFO: clearing end 2020-10-08 00:02:00 INFO: 2020-10-08 00:02:00 INFO: 2020-10-08 00:02:00 INFO: 2020-10-08 00:02:00 INFO: 2020-10-08 01:00:20 INFO: 2020-10-08 01:00:20 INFO: 2020-10-08 01:00:20 INFO: 2020-10-08 01:00:20 INFO: 2020-10-08 01:00:20 INFO: init new order start 2020-10-08 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 7, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.15, 'high': 341.25, 'low': 340.25, 'close': 340.3, 'trades': 780, 'volume': 501386, 'vwap': 340.64, 'lastSize': 4887, 'turnover': 17079124000, 'homeNotional': 5346.289451468113, 'foreignNotional': 1821150.6188593653}, {'timestamp': datetime.datetime(2020, 10, 7, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.2, 'high': 341.95, 'low': 340.6, 'close': 341.15, 'trades': 1314, 'volume': 895561, 'vwap': 341.22, 'lastSize': 4, 'turnover': 30557887735, 'homeNotional': 9543.103730368455, 'foreignNotional': 3256251.330569435}, {'timestamp': datetime.datetime(2020, 10, 7, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.6, 'high': 342.85, 'low': 341.0, 'close': 341.2, 'trades': 2073, 'volume': 1575024, 'vwap': 341.82, 'lastSize': 500, 'turnover': 53836141935, 'homeNotional': 16802.050419318184, 'foreignNotional': 5743139.700082849}] 2020-10-08 01:00:20 INFO: prepare candles [CandleItem(low=340.25, high=341.25, open=341.15, close=340.3, color='RED'), CandleItem(low=340.6, high=341.95, open=341.2, close=341.15, color='RED'), CandleItem(low=341.0, high=342.85, open=341.6, close=341.2, color='RED')] 2020-10-08 01:00:20 INFO: skip by colors first_candle=CandleItem(low=341.0, high=342.85, open=341.6, close=341.2, color='RED') second_candle=CandleItem(low=340.6, high=341.95, open=341.2, close=341.15, color='RED') last_candle=CandleItem(low=340.25, high=341.25, open=341.15, close=340.3, color='RED') 2020-10-08 01:00:20 INFO: check need new order None 2020-10-08 01:00:20 INFO: init new order end 2020-10-08 01:00:20 INFO: 2020-10-08 01:00:20 INFO: 2020-10-08 01:00:20 INFO: 2020-10-08 01:00:20 INFO: 2020-10-08 01:02:00 INFO: 2020-10-08 01:02:00 INFO: 2020-10-08 01:02:00 INFO: 2020-10-08 01:02:00 INFO: 2020-10-08 01:02:00 INFO: clearing start 2020-10-08 01:02:00 INFO: clearing end 2020-10-08 01:02:00 INFO: 2020-10-08 01:02:00 INFO: 2020-10-08 01:02:00 INFO: 2020-10-08 01:02:00 INFO: 2020-10-08 02:00:20 INFO: 2020-10-08 02:00:20 INFO: 2020-10-08 02:00:20 INFO: 2020-10-08 02:00:20 INFO: 2020-10-08 02:00:20 INFO: init new order start 2020-10-08 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 7, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 340.3, 'high': 341.0, 'low': 339.6, 'close': 340.55, 'trades': 1329, 'volume': 1264417, 'vwap': 340.17, 'lastSize': 450, 'turnover': 43010610665, 'homeNotional': 13469.39760845037, 'foreignNotional': 4581773.6638281215}, {'timestamp': datetime.datetime(2020, 10, 7, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.15, 'high': 341.25, 'low': 340.25, 'close': 340.3, 'trades': 780, 'volume': 501386, 'vwap': 340.64, 'lastSize': 4887, 'turnover': 17079124000, 'homeNotional': 5346.289451468113, 'foreignNotional': 1821150.6188593653}, {'timestamp': datetime.datetime(2020, 10, 7, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.2, 'high': 341.95, 'low': 340.6, 'close': 341.15, 'trades': 1314, 'volume': 895561, 'vwap': 341.22, 'lastSize': 4, 'turnover': 30557887735, 'homeNotional': 9543.103730368455, 'foreignNotional': 3256251.330569435}] 2020-10-08 02:00:20 INFO: prepare candles [CandleItem(low=339.6, high=341.0, open=340.3, close=340.55, color='GREEN'), CandleItem(low=340.25, high=341.25, open=341.15, close=340.3, color='RED'), CandleItem(low=340.6, high=341.95, open=341.2, close=341.15, color='RED')] 2020-10-08 02:00:20 INFO: last_candle=CandleItem(low=339.6, high=341.0, open=340.3, close=340.55, color='GREEN') 2020-10-08 02:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-08 02:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=339.6, high=341.0, open=340.3, close=340.55, color='GREEN') 2020-10-08 02:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=340.25, high=341.25, open=341.15, close=340.3, color='RED') 2020-10-08 02:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=340.6, high=341.95, open=341.2, close=341.15, color='RED') 2020-10-08 02:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=339.6, high=341.0, open=340.3, close=340.55, color='GREEN'), take_profit_factor=6.0, clearing_interval=3600) 2020-10-08 02:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=339.6, high=341.0, open=340.3, close=340.55, color='GREEN'), take_profit_factor=6.0, clearing_interval=3600) 2020-10-08 02:00:20 INFO: place order: start candle=CandleItem(low=339.6, high=341.0, open=340.3, close=340.55, color='GREEN') ticker='ETHUSD' price_offset=0.1 2020-10-08 02:00:20 INFO: place order: side_factor=-1 init_trigger_price=341.05 init_order_price=341.1 stop_price_offset=0.0 candle.size=1.3999999999999773 stop_price=339.6 take_price=349.4999999999999 2020-10-08 02:00:20 INFO: place order round: side_factor=-1 init_trigger_price=Decimal('341.05000000000001136868377216160297393798828125') init_order_price=Decimal('341.1000000000000227373675443232059478759765625') stop_price_offset=0.0 candle.size=1.3999999999999773 stop_price=Decimal('339.6000000000000227373675443232059478759765625') take_price=Decimal('349.4999999999998863131622783839702606201171875') 2020-10-08 02:00:20 INFO: place order: compute qty=1310 2020-10-08 02:00:20 INFO: place order: save order to db f7d0f49029644c008539f81b6ef0abb5; response=True 2020-10-08 02:00:20 INFO: post order to exchange resp={'orderID': 'ec50c625-b3e2-4620-9083-517fb4008207', 'clOrdID': 'f7d0f49029644c008539f81b6ef0abb5', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1310, 'price': 341.1, 'displayQty': None, 'stopPx': 341.05, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1310, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 7, 23, 0, 20, 887000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 7, 23, 0, 20, 887000, tzinfo=tzutc())} 2020-10-08 02:00:20 INFO: place new init order {'qty': 1310, 'init_price': Decimal('341.05000000000001136868377216160297393798828125'), 'stop_price': Decimal('339.6000000000000227373675443232059478759765625'), 'take_price': Decimal('349.4999999999998863131622783839702606201171875'), 'order_uid': 'f7d0f49029644c008539f81b6ef0abb5', 'response': {'orderID': 'ec50c625-b3e2-4620-9083-517fb4008207', 'clOrdID': 'f7d0f49029644c008539f81b6ef0abb5', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1310, 'price': 341.1, 'displayQty': None, 'stopPx': 341.05, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1310, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 7, 23, 0, 20, 887000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 7, 23, 0, 20, 887000, tzinfo=tzutc())}} 2020-10-08 02:00:20 INFO: init new order end 2020-10-08 02:00:20 INFO: 2020-10-08 02:00:20 INFO: 2020-10-08 02:00:20 INFO: 2020-10-08 02:00:20 INFO: 2020-10-08 02:00:20 INFO: process event {'orderID': 'ec50c625-b3e2-4620-9083-517fb4008207', 'clOrdID': 'f7d0f49029644c008539f81b6ef0abb5', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1310, 'price': 341.1, 'displayQty': None, 'stopPx': 341.05, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1310, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-10-07T23:00:20.887Z', 'timestamp': '2020-10-07T23:00:20.887Z'} 2020-10-08 02:00:20 INFO: skip event f7d0f49029644c008539f81b6ef0abb5 New 2020-10-08 02:02:00 INFO: 2020-10-08 02:02:00 INFO: 2020-10-08 02:02:00 INFO: 2020-10-08 02:02:00 INFO: 2020-10-08 02:02:00 INFO: clearing start 2020-10-08 02:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'ec50c625-b3e2-4620-9083-517fb4008207', 'clOrdID': 'f7d0f49029644c008539f81b6ef0abb5', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1310, 'price': 341.1, 'displayQty': None, 'stopPx': 341.05, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1310, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 7, 23, 0, 20, 887000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 7, 23, 0, 20, 887000, tzinfo=tzutc())} 2020-10-08 02:02:00 INFO: order time=2020-10-07 23:00:20.887000+00:00; delta from now UTC=0:01:39.186072 time_delta.total_seconds()=99.186072; time_diff_offset='3600' 2020-10-08 02:02:00 INFO: skip by time diff 2020-10-07 23:00:20.887000+00:00 2020-10-08 02:02:00 INFO: clearing end 2020-10-08 02:02:00 INFO: 2020-10-08 02:02:00 INFO: 2020-10-08 02:02:00 INFO: 2020-10-08 02:02:00 INFO: 2020-10-08 02:29:51 INFO: process event {'orderID': 'ec50c625-b3e2-4620-9083-517fb4008207', 'triggered': 'StopOrderTriggered', 'workingIndicator': True, 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'transactTime': '2020-10-07T23:29:51.179Z', 'timestamp': '2020-10-07T23:29:51.179Z', 'clOrdID': 'f7d0f49029644c008539f81b6ef0abb5', 'account': 605536, 'symbol': 'ETHUSD'} 2020-10-08 02:29:51 INFO: skip event f7d0f49029644c008539f81b6ef0abb5 2020-10-08 02:30:15 INFO: process event {'orderID': 'ec50c625-b3e2-4620-9083-517fb4008207', 'ordStatus': 'Filled', 'workingIndicator': False, 'leavesQty': 0, 'cumQty': 1310, 'avgPx': 341.1, 'timestamp': '2020-10-07T23:30:15.191Z', 'clOrdID': 'f7d0f49029644c008539f81b6ef0abb5', 'account': 605536, 'symbol': 'ETHUSD'} 2020-10-08 02:30:15 INFO: add new event={'uid': 'f7d0f49029644c008539f81b6ef0abb5', 'status': 'Filled'} 2020-10-08 02:30:16 INFO: 2020-10-08 02:30:16 INFO: 2020-10-08 02:30:16 INFO: 2020-10-08 02:30:16 INFO: 2020-10-08 02:30:16 INFO: process event start 2020-10-08 02:30:16 INFO: fetch new order event f7d0f49029644c008539f81b6ef0abb5 2020-10-08 02:30:16 INFO: fetch orders by event init={'stop': '339.6000000000000227373675443232059478759765625', 'take': '349.4999999999998863131622783839702606201171875', 'qty': '1310', 'color': 'GREEN', 'ticker': 'ETHUSD', 'clearing_offset': '3600'} profit_pair=None 2020-10-08 02:30:16 INFO: process init order filled 2020-10-08 02:30:16 INFO: save profit orders to storage stop=d2d7b59e507147ffa652b7fb4a348097 take=a93645d540ac4d3085ca28911e7f4507 2020-10-08 02:30:16 INFO: place profit orders take_price=349.4999999999998863131622783839702606201171875, stop_price=339.6000000000000227373675443232059478759765625, qty=1310, color=GREEN, ticker=ETHUSD d2d7b59e507147ffa652b7fb4a348097 a93645d540ac4d3085ca28911e7f4507 2020-10-08 02:30:16 INFO: place stop order ETHUSD: qty=-1310, stop_price=339.6000000000000227373675443232059478759765625, stop_uid=d2d7b59e507147ffa652b7fb4a348097 2020-10-08 02:30:16 INFO: process event {'orderID': '80b90627-cd48-4145-bfb1-30656758d865', 'clOrdID': 'd2d7b59e507147ffa652b7fb4a348097', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1310, 'price': None, 'displayQty': None, 'stopPx': 339.6, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1310, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': '2020-10-07T23:30:16.251Z', 'timestamp': '2020-10-07T23:30:16.251Z'} 2020-10-08 02:30:16 INFO: skip event d2d7b59e507147ffa652b7fb4a348097 New 2020-10-08 02:30:16 INFO: exchange resp for stop order={'orderID': '80b90627-cd48-4145-bfb1-30656758d865', 'clOrdID': 'd2d7b59e507147ffa652b7fb4a348097', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1310, 'price': None, 'displayQty': None, 'stopPx': 339.6, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1310, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 7, 23, 30, 16, 251000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 7, 23, 30, 16, 251000, tzinfo=tzutc())} 2020-10-08 02:30:16 INFO: place limit order ETHUSD: qty=-1310, price=349.4999999999998863131622783839702606201171875, take_uid=a93645d540ac4d3085ca28911e7f4507 2020-10-08 02:30:16 INFO: process event {'orderID': '4f9b780b-2043-4f6c-9e6a-55ba52469352', 'clOrdID': 'a93645d540ac4d3085ca28911e7f4507', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1310, 'price': 349.5, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1310, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': '2020-10-07T23:30:16.292Z', 'timestamp': '2020-10-07T23:30:16.292Z'} 2020-10-08 02:30:16 INFO: skip event a93645d540ac4d3085ca28911e7f4507 New 2020-10-08 02:30:16 INFO: exchange resp for take profit order={'orderID': '4f9b780b-2043-4f6c-9e6a-55ba52469352', 'clOrdID': 'a93645d540ac4d3085ca28911e7f4507', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1310, 'price': 349.5, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1310, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 7, 23, 30, 16, 292000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 7, 23, 30, 16, 292000, tzinfo=tzutc())} 2020-10-08 02:30:16 INFO: place profit orders={'stop': {'response': {'orderID': '80b90627-cd48-4145-bfb1-30656758d865', 'clOrdID': 'd2d7b59e507147ffa652b7fb4a348097', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1310, 'price': None, 'displayQty': None, 'stopPx': 339.6, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1310, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 7, 23, 30, 16, 251000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 7, 23, 30, 16, 251000, tzinfo=tzutc())}, 'qty': Decimal('-1310'), 'uid': 'd2d7b59e507147ffa652b7fb4a348097', 'price': Decimal('339.6000000000000227373675443232059478759765625')}, 'take': {'response': {'orderID': '4f9b780b-2043-4f6c-9e6a-55ba52469352', 'clOrdID': 'a93645d540ac4d3085ca28911e7f4507', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1310, 'price': 349.5, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1310, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 7, 23, 30, 16, 292000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 7, 23, 30, 16, 292000, tzinfo=tzutc())}, 'qty': Decimal('-1310'), 'uid': 'a93645d540ac4d3085ca28911e7f4507', 'price': Decimal('349.4999999999998863131622783839702606201171875')}} 2020-10-08 02:30:16 INFO: rm init order from db f7d0f49029644c008539f81b6ef0abb5 2020-10-08 02:30:16 INFO: end process event_processing_result='proceed init order' 2020-10-08 02:30:16 INFO: 2020-10-08 02:30:16 INFO: 2020-10-08 02:30:16 INFO: 2020-10-08 02:30:16 INFO: 2020-10-08 03:00:20 INFO: 2020-10-08 03:00:20 INFO: 2020-10-08 03:00:20 INFO: 2020-10-08 03:00:20 INFO: 2020-10-08 03:00:20 INFO: init new order start 2020-10-08 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 8, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 340.55, 'high': 342.05, 'low': 340.5, 'close': 341.65, 'trades': 1630, 'volume': 1276477, 'vwap': 341.14, 'lastSize': 278, 'turnover': 43545246140, 'homeNotional': 13613.28551075436, 'foreignNotional': 4643987.5817827685}, {'timestamp': datetime.datetime(2020, 10, 7, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 340.3, 'high': 341.0, 'low': 339.6, 'close': 340.55, 'trades': 1329, 'volume': 1264417, 'vwap': 340.17, 'lastSize': 450, 'turnover': 43010610665, 'homeNotional': 13469.39760845037, 'foreignNotional': 4581773.6638281215}, {'timestamp': datetime.datetime(2020, 10, 7, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.15, 'high': 341.25, 'low': 340.25, 'close': 340.3, 'trades': 780, 'volume': 501386, 'vwap': 340.64, 'lastSize': 4887, 'turnover': 17079124000, 'homeNotional': 5346.289451468113, 'foreignNotional': 1821150.6188593653}] 2020-10-08 03:00:20 INFO: prepare candles [CandleItem(low=340.5, high=342.05, open=340.55, close=341.65, color='GREEN'), CandleItem(low=339.6, high=341.0, open=340.3, close=340.55, color='GREEN'), CandleItem(low=340.25, high=341.25, open=341.15, close=340.3, color='RED')] 2020-10-08 03:00:20 INFO: skip by colors first_candle=CandleItem(low=340.25, high=341.25, open=341.15, close=340.3, color='RED') second_candle=CandleItem(low=339.6, high=341.0, open=340.3, close=340.55, color='GREEN') last_candle=CandleItem(low=340.5, high=342.05, open=340.55, close=341.65, color='GREEN') 2020-10-08 03:00:20 INFO: check need new order None 2020-10-08 03:00:20 INFO: init new order end 2020-10-08 03:00:20 INFO: 2020-10-08 03:00:20 INFO: 2020-10-08 03:00:20 INFO: 2020-10-08 03:00:20 INFO: 2020-10-08 03:02:00 INFO: 2020-10-08 03:02:00 INFO: 2020-10-08 03:02:00 INFO: 2020-10-08 03:02:00 INFO: 2020-10-08 03:02:00 INFO: clearing start 2020-10-08 03:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '80b90627-cd48-4145-bfb1-30656758d865', 'clOrdID': 'd2d7b59e507147ffa652b7fb4a348097', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1310, 'price': None, 'displayQty': None, 'stopPx': 339.6, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1310, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 7, 23, 30, 16, 251000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 7, 23, 30, 16, 251000, tzinfo=tzutc())} 2020-10-08 03:02:00 INFO: skip by not found init order into storage 2020-10-08 03:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '4f9b780b-2043-4f6c-9e6a-55ba52469352', 'clOrdID': 'a93645d540ac4d3085ca28911e7f4507', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1310, 'price': 349.5, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1310, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 7, 23, 30, 16, 292000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 7, 23, 30, 16, 292000, tzinfo=tzutc())} 2020-10-08 03:02:00 INFO: skip by not found init order into storage 2020-10-08 03:02:00 INFO: clearing end 2020-10-08 03:02:00 INFO: 2020-10-08 03:02:00 INFO: 2020-10-08 03:02:00 INFO: 2020-10-08 03:02:00 INFO: 2020-10-08 03:43:26 INFO: process event {'orderID': '80b90627-cd48-4145-bfb1-30656758d865', 'price': 339.55, 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 1310, 'avgPx': 339.55, 'text': 'Triggered: Order stop price reached\nStop order by trader.py', 'transactTime': '2020-10-08T00:43:26.852Z', 'timestamp': '2020-10-08T00:43:26.852Z', 'clOrdID': 'd2d7b59e507147ffa652b7fb4a348097', 'account': 605536, 'symbol': 'ETHUSD'} 2020-10-08 03:43:26 INFO: add new event={'uid': 'd2d7b59e507147ffa652b7fb4a348097', 'status': 'Filled'} 2020-10-08 03:43:27 INFO: 2020-10-08 03:43:27 INFO: 2020-10-08 03:43:27 INFO: 2020-10-08 03:43:27 INFO: 2020-10-08 03:43:27 INFO: process event start 2020-10-08 03:43:27 INFO: fetch new order event d2d7b59e507147ffa652b7fb4a348097 2020-10-08 03:43:27 INFO: fetch orders by event init=None profit_pair=a93645d540ac4d3085ca28911e7f4507 2020-10-08 03:43:27 INFO: process profit order filled 2020-10-08 03:43:27 INFO: process event {'orderID': '4f9b780b-2043-4f6c-9e6a-55ba52469352', 'ordStatus': 'Canceled', 'workingIndicator': False, 'leavesQty': 0, 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'timestamp': '2020-10-08T00:43:27.913Z', 'clOrdID': 'a93645d540ac4d3085ca28911e7f4507', 'account': 605536, 'symbol': 'ETHUSD'} 2020-10-08 03:43:27 INFO: skip event a93645d540ac4d3085ca28911e7f4507 Canceled 2020-10-08 03:43:27 INFO: cancel order=a93645d540ac4d3085ca28911e7f4507 [{'orderID': '4f9b780b-2043-4f6c-9e6a-55ba52469352', 'clOrdID': 'a93645d540ac4d3085ca28911e7f4507', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1310, 'price': 349.5, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'Canceled', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 0, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 7, 23, 30, 16, 292000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 8, 0, 43, 27, 913000, tzinfo=tzutc())}] 2020-10-08 03:43:27 INFO: end process event_processing_result='proceed profit order' 2020-10-08 03:43:27 INFO: 2020-10-08 03:43:27 INFO: 2020-10-08 03:43:27 INFO: 2020-10-08 03:43:27 INFO: 2020-10-08 04:00:20 INFO: 2020-10-08 04:00:20 INFO: 2020-10-08 04:00:20 INFO: 2020-10-08 04:00:20 INFO: 2020-10-08 04:00:20 INFO: init new order start 2020-10-08 04:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 8, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.65, 'high': 342.3, 'low': 339.45, 'close': 339.85, 'trades': 1919, 'volume': 1403875, 'vwap': 340.52, 'lastSize': 844, 'turnover': 47803975850, 'homeNotional': 14958.858716118923, 'foreignNotional': 5093717.728482702}, {'timestamp': datetime.datetime(2020, 10, 8, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 340.55, 'high': 342.05, 'low': 340.5, 'close': 341.65, 'trades': 1630, 'volume': 1276477, 'vwap': 341.14, 'lastSize': 278, 'turnover': 43545246140, 'homeNotional': 13613.28551075436, 'foreignNotional': 4643987.5817827685}, {'timestamp': datetime.datetime(2020, 10, 7, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 340.3, 'high': 341.0, 'low': 339.6, 'close': 340.55, 'trades': 1329, 'volume': 1264417, 'vwap': 340.17, 'lastSize': 450, 'turnover': 43010610665, 'homeNotional': 13469.39760845037, 'foreignNotional': 4581773.6638281215}] 2020-10-08 04:00:20 INFO: prepare candles [CandleItem(low=339.45, high=342.3, open=341.65, close=339.85, color='RED'), CandleItem(low=340.5, high=342.05, open=340.55, close=341.65, color='GREEN'), CandleItem(low=339.6, high=341.0, open=340.3, close=340.55, color='GREEN')] 2020-10-08 04:00:20 INFO: last_candle=CandleItem(low=339.45, high=342.3, open=341.65, close=339.85, color='RED') 2020-10-08 04:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-08 04:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=339.45, high=342.3, open=341.65, close=339.85, color='RED') 2020-10-08 04:00:20 INFO: skip by CandleItem(low=339.45, high=342.3, open=341.65, close=339.85, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-08 04:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-08 04:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=339.45, high=342.3, open=341.65, close=339.85, color='RED') 2020-10-08 04:00:20 INFO: skip by CandleItem(low=339.45, high=342.3, open=341.65, close=339.85, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-08 04:00:20 INFO: not found applicable config for candle 2020-10-08 04:00:20 INFO: check need new order None 2020-10-08 04:00:20 INFO: init new order end 2020-10-08 04:00:20 INFO: 2020-10-08 04:00:20 INFO: 2020-10-08 04:00:20 INFO: 2020-10-08 04:00:20 INFO: 2020-10-08 04:02:00 INFO: 2020-10-08 04:02:00 INFO: 2020-10-08 04:02:00 INFO: 2020-10-08 04:02:00 INFO: 2020-10-08 04:02:00 INFO: clearing start 2020-10-08 04:02:00 INFO: clearing end 2020-10-08 04:02:00 INFO: 2020-10-08 04:02:00 INFO: 2020-10-08 04:02:00 INFO: 2020-10-08 04:02:00 INFO: 2020-10-08 05:00:20 INFO: 2020-10-08 05:00:20 INFO: 2020-10-08 05:00:20 INFO: 2020-10-08 05:00:20 INFO: 2020-10-08 05:00:20 INFO: init new order start 2020-10-08 05:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 8, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.85, 'high': 340.35, 'low': 338.25, 'close': 339.9, 'trades': 2219, 'volume': 1736135, 'vwap': 339.16, 'lastSize': 4164, 'turnover': 58881024805, 'homeNotional': 18460.622342169387, 'foreignNotional': 6260926.611735488}, {'timestamp': datetime.datetime(2020, 10, 8, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.65, 'high': 342.3, 'low': 339.45, 'close': 339.85, 'trades': 1919, 'volume': 1403875, 'vwap': 340.52, 'lastSize': 844, 'turnover': 47803975850, 'homeNotional': 14958.858716118923, 'foreignNotional': 5093717.728482702}, {'timestamp': datetime.datetime(2020, 10, 8, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 340.55, 'high': 342.05, 'low': 340.5, 'close': 341.65, 'trades': 1630, 'volume': 1276477, 'vwap': 341.14, 'lastSize': 278, 'turnover': 43545246140, 'homeNotional': 13613.28551075436, 'foreignNotional': 4643987.5817827685}] 2020-10-08 05:00:20 INFO: prepare candles [CandleItem(low=338.25, high=340.35, open=339.85, close=339.9, color='GREEN'), CandleItem(low=339.45, high=342.3, open=341.65, close=339.85, color='RED'), CandleItem(low=340.5, high=342.05, open=340.55, close=341.65, color='GREEN')] 2020-10-08 05:00:20 INFO: skip by colors first_candle=CandleItem(low=340.5, high=342.05, open=340.55, close=341.65, color='GREEN') second_candle=CandleItem(low=339.45, high=342.3, open=341.65, close=339.85, color='RED') last_candle=CandleItem(low=338.25, high=340.35, open=339.85, close=339.9, color='GREEN') 2020-10-08 05:00:20 INFO: check need new order None 2020-10-08 05:00:20 INFO: init new order end 2020-10-08 05:00:20 INFO: 2020-10-08 05:00:20 INFO: 2020-10-08 05:00:20 INFO: 2020-10-08 05:00:20 INFO: 2020-10-08 05:02:00 INFO: 2020-10-08 05:02:00 INFO: 2020-10-08 05:02:00 INFO: 2020-10-08 05:02:00 INFO: 2020-10-08 05:02:00 INFO: clearing start 2020-10-08 05:02:00 INFO: clearing end 2020-10-08 05:02:00 INFO: 2020-10-08 05:02:00 INFO: 2020-10-08 05:02:00 INFO: 2020-10-08 05:02:00 INFO: 2020-10-08 06:00:20 INFO: 2020-10-08 06:00:20 INFO: 2020-10-08 06:00:20 INFO: 2020-10-08 06:00:20 INFO: 2020-10-08 06:00:20 INFO: init new order start 2020-10-08 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 8, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.9, 'high': 339.95, 'low': 338.45, 'close': 339.5, 'trades': 1222, 'volume': 1052546, 'vwap': 339.23, 'lastSize': 68, 'turnover': 35705423815, 'homeNotional': 11196.110941597559, 'foreignNotional': 3798048.760178287}, {'timestamp': datetime.datetime(2020, 10, 8, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.85, 'high': 340.35, 'low': 338.25, 'close': 339.9, 'trades': 2219, 'volume': 1736135, 'vwap': 339.16, 'lastSize': 4164, 'turnover': 58881024805, 'homeNotional': 18460.622342169387, 'foreignNotional': 6260926.611735488}, {'timestamp': datetime.datetime(2020, 10, 8, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.65, 'high': 342.3, 'low': 339.45, 'close': 339.85, 'trades': 1919, 'volume': 1403875, 'vwap': 340.52, 'lastSize': 844, 'turnover': 47803975850, 'homeNotional': 14958.858716118923, 'foreignNotional': 5093717.728482702}] 2020-10-08 06:00:20 INFO: prepare candles [CandleItem(low=338.45, high=339.95, open=339.9, close=339.5, color='RED'), CandleItem(low=338.25, high=340.35, open=339.85, close=339.9, color='GREEN'), CandleItem(low=339.45, high=342.3, open=341.65, close=339.85, color='RED')] 2020-10-08 06:00:20 INFO: skip by colors first_candle=CandleItem(low=339.45, high=342.3, open=341.65, close=339.85, color='RED') second_candle=CandleItem(low=338.25, high=340.35, open=339.85, close=339.9, color='GREEN') last_candle=CandleItem(low=338.45, high=339.95, open=339.9, close=339.5, color='RED') 2020-10-08 06:00:20 INFO: check need new order None 2020-10-08 06:00:20 INFO: init new order end 2020-10-08 06:00:20 INFO: 2020-10-08 06:00:20 INFO: 2020-10-08 06:00:20 INFO: 2020-10-08 06:00:20 INFO: 2020-10-08 06:02:00 INFO: 2020-10-08 06:02:00 INFO: 2020-10-08 06:02:00 INFO: 2020-10-08 06:02:00 INFO: 2020-10-08 06:02:00 INFO: clearing start 2020-10-08 06:02:01 INFO: clearing end 2020-10-08 06:02:01 INFO: 2020-10-08 06:02:01 INFO: 2020-10-08 06:02:01 INFO: 2020-10-08 06:02:01 INFO: 2020-10-08 07:00:20 INFO: 2020-10-08 07:00:20 INFO: 2020-10-08 07:00:20 INFO: 2020-10-08 07:00:20 INFO: 2020-10-08 07:00:20 INFO: init new order start 2020-10-08 07:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 8, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.5, 'high': 340.6, 'low': 338.7, 'close': 339.0, 'trades': 1762, 'volume': 1497425, 'vwap': 339.49, 'lastSize': 2000, 'turnover': 50835863950, 'homeNotional': 15945.059250965965, 'foreignNotional': 5413168.607472527}, {'timestamp': datetime.datetime(2020, 10, 8, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.9, 'high': 339.95, 'low': 338.45, 'close': 339.5, 'trades': 1222, 'volume': 1052546, 'vwap': 339.23, 'lastSize': 68, 'turnover': 35705423815, 'homeNotional': 11196.110941597559, 'foreignNotional': 3798048.760178287}, {'timestamp': datetime.datetime(2020, 10, 8, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.85, 'high': 340.35, 'low': 338.25, 'close': 339.9, 'trades': 2219, 'volume': 1736135, 'vwap': 339.16, 'lastSize': 4164, 'turnover': 58881024805, 'homeNotional': 18460.622342169387, 'foreignNotional': 6260926.611735488}] 2020-10-08 07:00:20 INFO: prepare candles [CandleItem(low=338.7, high=340.6, open=339.5, close=339.0, color='RED'), CandleItem(low=338.45, high=339.95, open=339.9, close=339.5, color='RED'), CandleItem(low=338.25, high=340.35, open=339.85, close=339.9, color='GREEN')] 2020-10-08 07:00:20 INFO: skip by colors first_candle=CandleItem(low=338.25, high=340.35, open=339.85, close=339.9, color='GREEN') second_candle=CandleItem(low=338.45, high=339.95, open=339.9, close=339.5, color='RED') last_candle=CandleItem(low=338.7, high=340.6, open=339.5, close=339.0, color='RED') 2020-10-08 07:00:20 INFO: check need new order None 2020-10-08 07:00:20 INFO: init new order end 2020-10-08 07:00:20 INFO: 2020-10-08 07:00:20 INFO: 2020-10-08 07:00:20 INFO: 2020-10-08 07:00:20 INFO: 2020-10-08 07:02:00 INFO: 2020-10-08 07:02:00 INFO: 2020-10-08 07:02:00 INFO: 2020-10-08 07:02:00 INFO: 2020-10-08 07:02:00 INFO: clearing start 2020-10-08 07:02:00 INFO: clearing end 2020-10-08 07:02:00 INFO: 2020-10-08 07:02:00 INFO: 2020-10-08 07:02:00 INFO: 2020-10-08 07:02:00 INFO: 2020-10-08 08:00:20 INFO: 2020-10-08 08:00:20 INFO: 2020-10-08 08:00:20 INFO: 2020-10-08 08:00:20 INFO: 2020-10-08 08:00:20 INFO: init new order start 2020-10-08 08:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 8, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.0, 'high': 340.35, 'low': 338.5, 'close': 339.7, 'trades': 1734, 'volume': 987159, 'vwap': 339.28, 'lastSize': 18, 'turnover': 33491812005, 'homeNotional': 10504.842572772424, 'foreignNotional': 3564029.1909108604}, {'timestamp': datetime.datetime(2020, 10, 8, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.5, 'high': 340.6, 'low': 338.7, 'close': 339.0, 'trades': 1762, 'volume': 1497425, 'vwap': 339.49, 'lastSize': 2000, 'turnover': 50835863950, 'homeNotional': 15945.059250965965, 'foreignNotional': 5413168.607472527}, {'timestamp': datetime.datetime(2020, 10, 8, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.9, 'high': 339.95, 'low': 338.45, 'close': 339.5, 'trades': 1222, 'volume': 1052546, 'vwap': 339.23, 'lastSize': 68, 'turnover': 35705423815, 'homeNotional': 11196.110941597559, 'foreignNotional': 3798048.760178287}] 2020-10-08 08:00:21 INFO: prepare candles [CandleItem(low=338.5, high=340.35, open=339.0, close=339.7, color='GREEN'), CandleItem(low=338.7, high=340.6, open=339.5, close=339.0, color='RED'), CandleItem(low=338.45, high=339.95, open=339.9, close=339.5, color='RED')] 2020-10-08 08:00:21 INFO: last_candle=CandleItem(low=338.5, high=340.35, open=339.0, close=339.7, color='GREEN') 2020-10-08 08:00:21 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-08 08:00:21 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=338.5, high=340.35, open=339.0, close=339.7, color='GREEN') 2020-10-08 08:00:21 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=338.7, high=340.6, open=339.5, close=339.0, color='RED') 2020-10-08 08:00:21 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=338.45, high=339.95, open=339.9, close=339.5, color='RED') 2020-10-08 08:00:21 INFO: hit candle order=OrderProperties(candle=CandleItem(low=338.5, high=340.35, open=339.0, close=339.7, color='GREEN'), take_profit_factor=6.0, clearing_interval=3600) 2020-10-08 08:00:21 INFO: check need new order OrderProperties(candle=CandleItem(low=338.5, high=340.35, open=339.0, close=339.7, color='GREEN'), take_profit_factor=6.0, clearing_interval=3600) 2020-10-08 08:00:21 INFO: place order: start candle=CandleItem(low=338.5, high=340.35, open=339.0, close=339.7, color='GREEN') ticker='ETHUSD' price_offset=0.1 2020-10-08 08:00:21 INFO: place order: side_factor=-1 init_trigger_price=340.40000000000003 init_order_price=340.45000000000005 stop_price_offset=0.0 candle.size=1.8500000000000227 stop_price=338.5 take_price=351.5500000000002 2020-10-08 08:00:21 INFO: place order round: side_factor=-1 init_trigger_price=Decimal('340.40000000000003410605131648480892181396484375') init_order_price=Decimal('340.450000000000045474735088646411895751953125') stop_price_offset=0.0 candle.size=1.8500000000000227 stop_price=Decimal('338.5') take_price=Decimal('351.5500000000001818989403545856475830078125') 2020-10-08 08:00:21 INFO: place order: compute qty=1000 2020-10-08 08:00:21 INFO: place order: save order to db a09b37ad4d8444239923afb63a7f55b0; response=True 2020-10-08 08:00:21 INFO: process event {'orderID': '7dd98ae0-2acb-4ca6-8580-fa09ce457052', 'clOrdID': 'a09b37ad4d8444239923afb63a7f55b0', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1000, 'price': 340.45, 'displayQty': None, 'stopPx': 340.4, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1000, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-10-08T05:00:21.214Z', 'timestamp': '2020-10-08T05:00:21.214Z'} 2020-10-08 08:00:21 INFO: skip event a09b37ad4d8444239923afb63a7f55b0 New 2020-10-08 08:00:21 INFO: post order to exchange resp={'orderID': '7dd98ae0-2acb-4ca6-8580-fa09ce457052', 'clOrdID': 'a09b37ad4d8444239923afb63a7f55b0', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1000, 'price': 340.45, 'displayQty': None, 'stopPx': 340.4, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1000, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 8, 5, 0, 21, 214000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 8, 5, 0, 21, 214000, tzinfo=tzutc())} 2020-10-08 08:00:21 INFO: place new init order {'qty': 1000, 'init_price': Decimal('340.40000000000003410605131648480892181396484375'), 'stop_price': Decimal('338.5'), 'take_price': Decimal('351.5500000000001818989403545856475830078125'), 'order_uid': 'a09b37ad4d8444239923afb63a7f55b0', 'response': {'orderID': '7dd98ae0-2acb-4ca6-8580-fa09ce457052', 'clOrdID': 'a09b37ad4d8444239923afb63a7f55b0', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1000, 'price': 340.45, 'displayQty': None, 'stopPx': 340.4, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1000, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 8, 5, 0, 21, 214000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 8, 5, 0, 21, 214000, tzinfo=tzutc())}} 2020-10-08 08:00:21 INFO: init new order end 2020-10-08 08:00:21 INFO: 2020-10-08 08:00:21 INFO: 2020-10-08 08:00:21 INFO: 2020-10-08 08:00:21 INFO: 2020-10-08 08:02:00 INFO: 2020-10-08 08:02:00 INFO: 2020-10-08 08:02:00 INFO: 2020-10-08 08:02:00 INFO: 2020-10-08 08:02:00 INFO: clearing start 2020-10-08 08:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '7dd98ae0-2acb-4ca6-8580-fa09ce457052', 'clOrdID': 'a09b37ad4d8444239923afb63a7f55b0', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1000, 'price': 340.45, 'displayQty': None, 'stopPx': 340.4, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1000, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 8, 5, 0, 21, 214000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 8, 5, 0, 21, 214000, tzinfo=tzutc())} 2020-10-08 08:02:00 INFO: order time=2020-10-08 05:00:21.214000+00:00; delta from now UTC=0:01:39.199466 time_delta.total_seconds()=99.199466; time_diff_offset='3600' 2020-10-08 08:02:00 INFO: skip by time diff 2020-10-08 05:00:21.214000+00:00 2020-10-08 08:02:00 INFO: clearing end 2020-10-08 08:02:00 INFO: 2020-10-08 08:02:00 INFO: 2020-10-08 08:02:00 INFO: 2020-10-08 08:02:00 INFO: 2020-10-08 09:00:20 INFO: 2020-10-08 09:00:20 INFO: 2020-10-08 09:00:20 INFO: 2020-10-08 09:00:20 INFO: 2020-10-08 09:00:20 INFO: init new order start 2020-10-08 09:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 8, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.7, 'high': 339.7, 'low': 338.0, 'close': 338.7, 'trades': 2342, 'volume': 1341232, 'vwap': 338.64, 'lastSize': 1, 'turnover': 45418934770, 'homeNotional': 14248.89637842575, 'foreignNotional': 4825189.326057244}, {'timestamp': datetime.datetime(2020, 10, 8, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.0, 'high': 340.35, 'low': 338.5, 'close': 339.7, 'trades': 1734, 'volume': 987159, 'vwap': 339.28, 'lastSize': 18, 'turnover': 33491812005, 'homeNotional': 10504.842572772424, 'foreignNotional': 3564029.1909108604}, {'timestamp': datetime.datetime(2020, 10, 8, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.5, 'high': 340.6, 'low': 338.7, 'close': 339.0, 'trades': 1762, 'volume': 1497425, 'vwap': 339.49, 'lastSize': 2000, 'turnover': 50835863950, 'homeNotional': 15945.059250965965, 'foreignNotional': 5413168.607472527}] 2020-10-08 09:00:20 INFO: prepare candles [CandleItem(low=338.0, high=339.7, open=339.7, close=338.7, color='RED'), CandleItem(low=338.5, high=340.35, open=339.0, close=339.7, color='GREEN'), CandleItem(low=338.7, high=340.6, open=339.5, close=339.0, color='RED')] 2020-10-08 09:00:20 INFO: skip by colors first_candle=CandleItem(low=338.7, high=340.6, open=339.5, close=339.0, color='RED') second_candle=CandleItem(low=338.5, high=340.35, open=339.0, close=339.7, color='GREEN') last_candle=CandleItem(low=338.0, high=339.7, open=339.7, close=338.7, color='RED') 2020-10-08 09:00:20 INFO: check need new order None 2020-10-08 09:00:20 INFO: init new order end 2020-10-08 09:00:20 INFO: 2020-10-08 09:00:20 INFO: 2020-10-08 09:00:20 INFO: 2020-10-08 09:00:20 INFO: 2020-10-08 09:02:00 INFO: 2020-10-08 09:02:00 INFO: 2020-10-08 09:02:00 INFO: 2020-10-08 09:02:00 INFO: 2020-10-08 09:02:00 INFO: clearing start 2020-10-08 09:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '7dd98ae0-2acb-4ca6-8580-fa09ce457052', 'clOrdID': 'a09b37ad4d8444239923afb63a7f55b0', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1000, 'price': 340.45, 'displayQty': None, 'stopPx': 340.4, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1000, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 8, 5, 0, 21, 214000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 8, 5, 0, 21, 214000, tzinfo=tzutc())} 2020-10-08 09:02:00 INFO: order time=2020-10-08 05:00:21.214000+00:00; delta from now UTC=1:01:39.582774 time_delta.total_seconds()=3699.582774; time_diff_offset='3600' 2020-10-08 09:02:00 INFO: clear order a09b37ad4d8444239923afb63a7f55b0 2020-10-08 09:02:00 INFO: cancel order resp=[{'orderID': '7dd98ae0-2acb-4ca6-8580-fa09ce457052', 'clOrdID': 'a09b37ad4d8444239923afb63a7f55b0', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1000, 'price': 340.45, 'displayQty': None, 'stopPx': 340.4, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'Canceled', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 0, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Canceled: cancelled by clearing\nInit order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 8, 5, 0, 21, 214000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 8, 6, 2, 0, 814000, tzinfo=tzutc())}] 2020-10-08 09:02:00 INFO: clearing end 2020-10-08 09:02:00 INFO: 2020-10-08 09:02:00 INFO: 2020-10-08 09:02:00 INFO: 2020-10-08 09:02:00 INFO: 2020-10-08 09:02:00 INFO: process event {'orderID': '7dd98ae0-2acb-4ca6-8580-fa09ce457052', 'ordStatus': 'Canceled', 'leavesQty': 0, 'text': 'Canceled: cancelled by clearing\nInit order by supervisor.py', 'timestamp': '2020-10-08T06:02:00.814Z', 'clOrdID': 'a09b37ad4d8444239923afb63a7f55b0', 'account': 605536, 'symbol': 'ETHUSD'} 2020-10-08 09:02:00 INFO: skip event a09b37ad4d8444239923afb63a7f55b0 Canceled 2020-10-08 10:00:20 INFO: 2020-10-08 10:00:20 INFO: 2020-10-08 10:00:20 INFO: 2020-10-08 10:00:20 INFO: 2020-10-08 10:00:20 INFO: init new order start 2020-10-08 10:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 8, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 338.7, 'high': 340.15, 'low': 338.3, 'close': 339.0, 'trades': 2080, 'volume': 1632994, 'vwap': 339.29, 'lastSize': 553, 'turnover': 55404335170, 'homeNotional': 17346.027803940964, 'foreignNotional': 5885175.855954075}, {'timestamp': datetime.datetime(2020, 10, 8, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.7, 'high': 339.7, 'low': 338.0, 'close': 338.7, 'trades': 2342, 'volume': 1341232, 'vwap': 338.64, 'lastSize': 1, 'turnover': 45418934770, 'homeNotional': 14248.89637842575, 'foreignNotional': 4825189.326057244}, {'timestamp': datetime.datetime(2020, 10, 8, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.0, 'high': 340.35, 'low': 338.5, 'close': 339.7, 'trades': 1734, 'volume': 987159, 'vwap': 339.28, 'lastSize': 18, 'turnover': 33491812005, 'homeNotional': 10504.842572772424, 'foreignNotional': 3564029.1909108604}] 2020-10-08 10:00:20 INFO: prepare candles [CandleItem(low=338.3, high=340.15, open=338.7, close=339.0, color='GREEN'), CandleItem(low=338.0, high=339.7, open=339.7, close=338.7, color='RED'), CandleItem(low=338.5, high=340.35, open=339.0, close=339.7, color='GREEN')] 2020-10-08 10:00:20 INFO: skip by colors first_candle=CandleItem(low=338.5, high=340.35, open=339.0, close=339.7, color='GREEN') second_candle=CandleItem(low=338.0, high=339.7, open=339.7, close=338.7, color='RED') last_candle=CandleItem(low=338.3, high=340.15, open=338.7, close=339.0, color='GREEN') 2020-10-08 10:00:20 INFO: check need new order None 2020-10-08 10:00:20 INFO: init new order end 2020-10-08 10:00:20 INFO: 2020-10-08 10:00:20 INFO: 2020-10-08 10:00:20 INFO: 2020-10-08 10:00:20 INFO: 2020-10-08 10:02:00 INFO: 2020-10-08 10:02:00 INFO: 2020-10-08 10:02:00 INFO: 2020-10-08 10:02:00 INFO: 2020-10-08 10:02:00 INFO: clearing start 2020-10-08 10:02:00 INFO: clearing end 2020-10-08 10:02:00 INFO: 2020-10-08 10:02:00 INFO: 2020-10-08 10:02:00 INFO: 2020-10-08 10:02:00 INFO: 2020-10-08 11:00:20 INFO: 2020-10-08 11:00:20 INFO: 2020-10-08 11:00:20 INFO: 2020-10-08 11:00:20 INFO: 2020-10-08 11:00:20 INFO: init new order start 2020-10-08 11:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 8, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.0, 'high': 339.05, 'low': 334.6, 'close': 336.0, 'trades': 6398, 'volume': 5072151, 'vwap': 336.48, 'lastSize': 562, 'turnover': 170667239385, 'homeNotional': 53766.15872261124, 'foreignNotional': 18091220.30257277}, {'timestamp': datetime.datetime(2020, 10, 8, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 338.7, 'high': 340.15, 'low': 338.3, 'close': 339.0, 'trades': 2080, 'volume': 1632994, 'vwap': 339.29, 'lastSize': 553, 'turnover': 55404335170, 'homeNotional': 17346.027803940964, 'foreignNotional': 5885175.855954075}, {'timestamp': datetime.datetime(2020, 10, 8, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.7, 'high': 339.7, 'low': 338.0, 'close': 338.7, 'trades': 2342, 'volume': 1341232, 'vwap': 338.64, 'lastSize': 1, 'turnover': 45418934770, 'homeNotional': 14248.89637842575, 'foreignNotional': 4825189.326057244}] 2020-10-08 11:00:20 INFO: prepare candles [CandleItem(low=334.6, high=339.05, open=339.0, close=336.0, color='RED'), CandleItem(low=338.3, high=340.15, open=338.7, close=339.0, color='GREEN'), CandleItem(low=338.0, high=339.7, open=339.7, close=338.7, color='RED')] 2020-10-08 11:00:20 INFO: skip by colors first_candle=CandleItem(low=338.0, high=339.7, open=339.7, close=338.7, color='RED') second_candle=CandleItem(low=338.3, high=340.15, open=338.7, close=339.0, color='GREEN') last_candle=CandleItem(low=334.6, high=339.05, open=339.0, close=336.0, color='RED') 2020-10-08 11:00:20 INFO: check need new order None 2020-10-08 11:00:20 INFO: init new order end 2020-10-08 11:00:20 INFO: 2020-10-08 11:00:20 INFO: 2020-10-08 11:00:20 INFO: 2020-10-08 11:00:20 INFO: 2020-10-08 11:02:00 INFO: 2020-10-08 11:02:00 INFO: 2020-10-08 11:02:00 INFO: 2020-10-08 11:02:00 INFO: 2020-10-08 11:02:00 INFO: clearing start 2020-10-08 11:02:00 INFO: clearing end 2020-10-08 11:02:00 INFO: 2020-10-08 11:02:00 INFO: 2020-10-08 11:02:00 INFO: 2020-10-08 11:02:00 INFO: 2020-10-08 12:00:20 INFO: 2020-10-08 12:00:20 INFO: 2020-10-08 12:00:20 INFO: 2020-10-08 12:00:20 INFO: 2020-10-08 12:00:20 INFO: init new order start 2020-10-08 12:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 8, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 336.0, 'high': 336.55, 'low': 335.05, 'close': 335.5, 'trades': 2623, 'volume': 1399191, 'vwap': 335.95, 'lastSize': 10, 'turnover': 47004967330, 'homeNotional': 14816.780531304368, 'foreignNotional': 4977609.844403933}, {'timestamp': datetime.datetime(2020, 10, 8, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.0, 'high': 339.05, 'low': 334.6, 'close': 336.0, 'trades': 6398, 'volume': 5072151, 'vwap': 336.48, 'lastSize': 562, 'turnover': 170667239385, 'homeNotional': 53766.15872261124, 'foreignNotional': 18091220.30257277}, {'timestamp': datetime.datetime(2020, 10, 8, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 338.7, 'high': 340.15, 'low': 338.3, 'close': 339.0, 'trades': 2080, 'volume': 1632994, 'vwap': 339.29, 'lastSize': 553, 'turnover': 55404335170, 'homeNotional': 17346.027803940964, 'foreignNotional': 5885175.855954075}] 2020-10-08 12:00:21 INFO: prepare candles [CandleItem(low=335.05, high=336.55, open=336.0, close=335.5, color='RED'), CandleItem(low=334.6, high=339.05, open=339.0, close=336.0, color='RED'), CandleItem(low=338.3, high=340.15, open=338.7, close=339.0, color='GREEN')] 2020-10-08 12:00:21 INFO: skip by colors first_candle=CandleItem(low=338.3, high=340.15, open=338.7, close=339.0, color='GREEN') second_candle=CandleItem(low=334.6, high=339.05, open=339.0, close=336.0, color='RED') last_candle=CandleItem(low=335.05, high=336.55, open=336.0, close=335.5, color='RED') 2020-10-08 12:00:21 INFO: check need new order None 2020-10-08 12:00:21 INFO: init new order end 2020-10-08 12:00:21 INFO: 2020-10-08 12:00:21 INFO: 2020-10-08 12:00:21 INFO: 2020-10-08 12:00:21 INFO: 2020-10-08 12:02:00 INFO: 2020-10-08 12:02:00 INFO: 2020-10-08 12:02:00 INFO: 2020-10-08 12:02:00 INFO: 2020-10-08 12:02:00 INFO: clearing start 2020-10-08 12:02:00 INFO: clearing end 2020-10-08 12:02:00 INFO: 2020-10-08 12:02:00 INFO: 2020-10-08 12:02:00 INFO: 2020-10-08 12:02:00 INFO: 2020-10-08 13:00:20 INFO: 2020-10-08 13:00:20 INFO: 2020-10-08 13:00:20 INFO: 2020-10-08 13:00:20 INFO: 2020-10-08 13:00:20 INFO: init new order start 2020-10-08 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 8, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 335.5, 'high': 337.25, 'low': 334.15, 'close': 336.2, 'trades': 2927, 'volume': 2123717, 'vwap': 336.13, 'lastSize': 160, 'turnover': 71383027360, 'homeNotional': 22433.842661778548, 'foreignNotional': 7540541.054034756}, {'timestamp': datetime.datetime(2020, 10, 8, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 336.0, 'high': 336.55, 'low': 335.05, 'close': 335.5, 'trades': 2623, 'volume': 1399191, 'vwap': 335.95, 'lastSize': 10, 'turnover': 47004967330, 'homeNotional': 14816.780531304368, 'foreignNotional': 4977609.844403933}, {'timestamp': datetime.datetime(2020, 10, 8, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.0, 'high': 339.05, 'low': 334.6, 'close': 336.0, 'trades': 6398, 'volume': 5072151, 'vwap': 336.48, 'lastSize': 562, 'turnover': 170667239385, 'homeNotional': 53766.15872261124, 'foreignNotional': 18091220.30257277}] 2020-10-08 13:00:20 INFO: prepare candles [CandleItem(low=334.15, high=337.25, open=335.5, close=336.2, color='GREEN'), CandleItem(low=335.05, high=336.55, open=336.0, close=335.5, color='RED'), CandleItem(low=334.6, high=339.05, open=339.0, close=336.0, color='RED')] 2020-10-08 13:00:20 INFO: last_candle=CandleItem(low=334.15, high=337.25, open=335.5, close=336.2, color='GREEN') 2020-10-08 13:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-08 13:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=334.15, high=337.25, open=335.5, close=336.2, color='GREEN') 2020-10-08 13:00:20 INFO: skip by CandleItem(low=334.15, high=337.25, open=335.5, close=336.2, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-08 13:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-08 13:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=334.15, high=337.25, open=335.5, close=336.2, color='GREEN') 2020-10-08 13:00:20 INFO: skip by CandleItem(low=334.15, high=337.25, open=335.5, close=336.2, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-08 13:00:20 INFO: not found applicable config for candle 2020-10-08 13:00:20 INFO: check need new order None 2020-10-08 13:00:20 INFO: init new order end 2020-10-08 13:00:20 INFO: 2020-10-08 13:00:20 INFO: 2020-10-08 13:00:20 INFO: 2020-10-08 13:00:20 INFO: 2020-10-08 13:02:00 INFO: 2020-10-08 13:02:00 INFO: 2020-10-08 13:02:00 INFO: 2020-10-08 13:02:00 INFO: 2020-10-08 13:02:00 INFO: clearing start 2020-10-08 13:02:00 INFO: clearing end 2020-10-08 13:02:00 INFO: 2020-10-08 13:02:00 INFO: 2020-10-08 13:02:00 INFO: 2020-10-08 13:02:00 INFO: 2020-10-08 14:00:20 INFO: 2020-10-08 14:00:20 INFO: 2020-10-08 14:00:20 INFO: 2020-10-08 14:00:20 INFO: 2020-10-08 14:00:20 INFO: init new order start 2020-10-08 14:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 8, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 336.2, 'high': 339.4, 'low': 335.75, 'close': 338.15, 'trades': 3385, 'volume': 2237155, 'vwap': 337.94, 'lastSize': 1000, 'turnover': 75601182605, 'homeNotional': 23708.796071329733, 'foreignNotional': 8012060.914982519}, {'timestamp': datetime.datetime(2020, 10, 8, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 335.5, 'high': 337.25, 'low': 334.15, 'close': 336.2, 'trades': 2927, 'volume': 2123717, 'vwap': 336.13, 'lastSize': 160, 'turnover': 71383027360, 'homeNotional': 22433.842661778548, 'foreignNotional': 7540541.054034756}, {'timestamp': datetime.datetime(2020, 10, 8, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 336.0, 'high': 336.55, 'low': 335.05, 'close': 335.5, 'trades': 2623, 'volume': 1399191, 'vwap': 335.95, 'lastSize': 10, 'turnover': 47004967330, 'homeNotional': 14816.780531304368, 'foreignNotional': 4977609.844403933}] 2020-10-08 14:00:21 INFO: prepare candles [CandleItem(low=335.75, high=339.4, open=336.2, close=338.15, color='GREEN'), CandleItem(low=334.15, high=337.25, open=335.5, close=336.2, color='GREEN'), CandleItem(low=335.05, high=336.55, open=336.0, close=335.5, color='RED')] 2020-10-08 14:00:21 INFO: skip by colors first_candle=CandleItem(low=335.05, high=336.55, open=336.0, close=335.5, color='RED') second_candle=CandleItem(low=334.15, high=337.25, open=335.5, close=336.2, color='GREEN') last_candle=CandleItem(low=335.75, high=339.4, open=336.2, close=338.15, color='GREEN') 2020-10-08 14:00:21 INFO: check need new order None 2020-10-08 14:00:21 INFO: init new order end 2020-10-08 14:00:21 INFO: 2020-10-08 14:00:21 INFO: 2020-10-08 14:00:21 INFO: 2020-10-08 14:00:21 INFO: 2020-10-08 14:02:00 INFO: 2020-10-08 14:02:00 INFO: 2020-10-08 14:02:00 INFO: 2020-10-08 14:02:00 INFO: 2020-10-08 14:02:00 INFO: clearing start 2020-10-08 14:02:00 INFO: clearing end 2020-10-08 14:02:00 INFO: 2020-10-08 14:02:00 INFO: 2020-10-08 14:02:00 INFO: 2020-10-08 14:02:00 INFO: 2020-10-08 15:00:20 INFO: 2020-10-08 15:00:20 INFO: 2020-10-08 15:00:20 INFO: 2020-10-08 15:00:20 INFO: 2020-10-08 15:00:20 INFO: init new order start 2020-10-08 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 8, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 338.15, 'high': 338.2, 'low': 337.05, 'close': 337.55, 'trades': 1452, 'volume': 1143321, 'vwap': 337.4, 'lastSize': 1, 'turnover': 38575018495, 'homeNotional': 12124.996921584692, 'foreignNotional': 4090907.418717039}, {'timestamp': datetime.datetime(2020, 10, 8, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 336.2, 'high': 339.4, 'low': 335.75, 'close': 338.15, 'trades': 3385, 'volume': 2237155, 'vwap': 337.94, 'lastSize': 1000, 'turnover': 75601182605, 'homeNotional': 23708.796071329733, 'foreignNotional': 8012060.914982519}, {'timestamp': datetime.datetime(2020, 10, 8, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 335.5, 'high': 337.25, 'low': 334.15, 'close': 336.2, 'trades': 2927, 'volume': 2123717, 'vwap': 336.13, 'lastSize': 160, 'turnover': 71383027360, 'homeNotional': 22433.842661778548, 'foreignNotional': 7540541.054034756}] 2020-10-08 15:00:20 INFO: prepare candles [CandleItem(low=337.05, high=338.2, open=338.15, close=337.55, color='RED'), CandleItem(low=335.75, high=339.4, open=336.2, close=338.15, color='GREEN'), CandleItem(low=334.15, high=337.25, open=335.5, close=336.2, color='GREEN')] 2020-10-08 15:00:20 INFO: last_candle=CandleItem(low=337.05, high=338.2, open=338.15, close=337.55, color='RED') 2020-10-08 15:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-08 15:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=337.05, high=338.2, open=338.15, close=337.55, color='RED') 2020-10-08 15:00:20 INFO: skip by CandleItem(low=337.05, high=338.2, open=338.15, close=337.55, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-08 15:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-08 15:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=337.05, high=338.2, open=338.15, close=337.55, color='RED') 2020-10-08 15:00:20 INFO: skip by CandleItem(low=337.05, high=338.2, open=338.15, close=337.55, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-08 15:00:20 INFO: not found applicable config for candle 2020-10-08 15:00:20 INFO: check need new order None 2020-10-08 15:00:20 INFO: init new order end 2020-10-08 15:00:20 INFO: 2020-10-08 15:00:20 INFO: 2020-10-08 15:00:20 INFO: 2020-10-08 15:00:20 INFO: 2020-10-08 15:02:00 INFO: 2020-10-08 15:02:00 INFO: 2020-10-08 15:02:00 INFO: 2020-10-08 15:02:00 INFO: 2020-10-08 15:02:00 INFO: clearing start 2020-10-08 15:02:00 INFO: clearing end 2020-10-08 15:02:00 INFO: 2020-10-08 15:02:00 INFO: 2020-10-08 15:02:00 INFO: 2020-10-08 15:02:00 INFO: 2020-10-08 16:00:20 INFO: 2020-10-08 16:00:20 INFO: 2020-10-08 16:00:20 INFO: 2020-10-08 16:00:20 INFO: 2020-10-08 16:00:20 INFO: init new order start 2020-10-08 16:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 8, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 337.55, 'high': 341.15, 'low': 337.05, 'close': 341.1, 'trades': 4433, 'volume': 3071948, 'vwap': 339.86, 'lastSize': 145, 'turnover': 104402569160, 'homeNotional': 32646.240255716373, 'foreignNotional': 11095111.888700433}, {'timestamp': datetime.datetime(2020, 10, 8, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 338.15, 'high': 338.2, 'low': 337.05, 'close': 337.55, 'trades': 1452, 'volume': 1143321, 'vwap': 337.4, 'lastSize': 1, 'turnover': 38575018495, 'homeNotional': 12124.996921584692, 'foreignNotional': 4090907.418717039}, {'timestamp': datetime.datetime(2020, 10, 8, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 336.2, 'high': 339.4, 'low': 335.75, 'close': 338.15, 'trades': 3385, 'volume': 2237155, 'vwap': 337.94, 'lastSize': 1000, 'turnover': 75601182605, 'homeNotional': 23708.796071329733, 'foreignNotional': 8012060.914982519}] 2020-10-08 16:00:20 INFO: prepare candles [CandleItem(low=337.05, high=341.15, open=337.55, close=341.1, color='GREEN'), CandleItem(low=337.05, high=338.2, open=338.15, close=337.55, color='RED'), CandleItem(low=335.75, high=339.4, open=336.2, close=338.15, color='GREEN')] 2020-10-08 16:00:20 INFO: skip by colors first_candle=CandleItem(low=335.75, high=339.4, open=336.2, close=338.15, color='GREEN') second_candle=CandleItem(low=337.05, high=338.2, open=338.15, close=337.55, color='RED') last_candle=CandleItem(low=337.05, high=341.15, open=337.55, close=341.1, color='GREEN') 2020-10-08 16:00:20 INFO: check need new order None 2020-10-08 16:00:20 INFO: init new order end 2020-10-08 16:00:20 INFO: 2020-10-08 16:00:20 INFO: 2020-10-08 16:00:20 INFO: 2020-10-08 16:00:20 INFO: 2020-10-08 16:02:00 INFO: 2020-10-08 16:02:00 INFO: 2020-10-08 16:02:00 INFO: 2020-10-08 16:02:00 INFO: 2020-10-08 16:02:00 INFO: clearing start 2020-10-08 16:02:00 INFO: clearing end 2020-10-08 16:02:00 INFO: 2020-10-08 16:02:00 INFO: 2020-10-08 16:02:00 INFO: 2020-10-08 16:02:00 INFO: 2020-10-08 17:00:20 INFO: 2020-10-08 17:00:20 INFO: 2020-10-08 17:00:20 INFO: 2020-10-08 17:00:20 INFO: 2020-10-08 17:00:20 INFO: init new order start 2020-10-08 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 8, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.1, 'high': 344.9, 'low': 340.05, 'close': 344.45, 'trades': 10268, 'volume': 7068202, 'vwap': 343.45, 'lastSize': 47, 'turnover': 242751636550, 'homeNotional': 75686.34485831186, 'foreignNotional': 25994088.060605947}, {'timestamp': datetime.datetime(2020, 10, 8, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 337.55, 'high': 341.15, 'low': 337.05, 'close': 341.1, 'trades': 4433, 'volume': 3071948, 'vwap': 339.86, 'lastSize': 145, 'turnover': 104402569160, 'homeNotional': 32646.240255716373, 'foreignNotional': 11095111.888700433}, {'timestamp': datetime.datetime(2020, 10, 8, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 338.15, 'high': 338.2, 'low': 337.05, 'close': 337.55, 'trades': 1452, 'volume': 1143321, 'vwap': 337.4, 'lastSize': 1, 'turnover': 38575018495, 'homeNotional': 12124.996921584692, 'foreignNotional': 4090907.418717039}] 2020-10-08 17:00:20 INFO: prepare candles [CandleItem(low=340.05, high=344.9, open=341.1, close=344.45, color='GREEN'), CandleItem(low=337.05, high=341.15, open=337.55, close=341.1, color='GREEN'), CandleItem(low=337.05, high=338.2, open=338.15, close=337.55, color='RED')] 2020-10-08 17:00:20 INFO: skip by colors first_candle=CandleItem(low=337.05, high=338.2, open=338.15, close=337.55, color='RED') second_candle=CandleItem(low=337.05, high=341.15, open=337.55, close=341.1, color='GREEN') last_candle=CandleItem(low=340.05, high=344.9, open=341.1, close=344.45, color='GREEN') 2020-10-08 17:00:20 INFO: check need new order None 2020-10-08 17:00:20 INFO: init new order end 2020-10-08 17:00:20 INFO: 2020-10-08 17:00:20 INFO: 2020-10-08 17:00:20 INFO: 2020-10-08 17:00:20 INFO: 2020-10-08 17:02:00 INFO: 2020-10-08 17:02:00 INFO: 2020-10-08 17:02:00 INFO: 2020-10-08 17:02:00 INFO: 2020-10-08 17:02:00 INFO: clearing start 2020-10-08 17:02:00 INFO: clearing end 2020-10-08 17:02:00 INFO: 2020-10-08 17:02:00 INFO: 2020-10-08 17:02:00 INFO: 2020-10-08 17:02:00 INFO: 2020-10-08 18:00:20 INFO: 2020-10-08 18:00:20 INFO: 2020-10-08 18:00:20 INFO: 2020-10-08 18:00:20 INFO: 2020-10-08 18:00:20 INFO: init new order start 2020-10-08 18:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 8, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 344.45, 'high': 350.75, 'low': 343.55, 'close': 350.0, 'trades': 9737, 'volume': 7545739, 'vwap': 347.61, 'lastSize': 200, 'turnover': 262296025975, 'homeNotional': 81695.70348357172, 'foreignNotional': 28399137.959594782}, {'timestamp': datetime.datetime(2020, 10, 8, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.1, 'high': 344.9, 'low': 340.05, 'close': 344.45, 'trades': 10268, 'volume': 7068202, 'vwap': 343.45, 'lastSize': 47, 'turnover': 242751636550, 'homeNotional': 75686.34485831186, 'foreignNotional': 25994088.060605947}, {'timestamp': datetime.datetime(2020, 10, 8, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 337.55, 'high': 341.15, 'low': 337.05, 'close': 341.1, 'trades': 4433, 'volume': 3071948, 'vwap': 339.86, 'lastSize': 145, 'turnover': 104402569160, 'homeNotional': 32646.240255716373, 'foreignNotional': 11095111.888700433}] 2020-10-08 18:00:20 INFO: prepare candles [CandleItem(low=343.55, high=350.75, open=344.45, close=350.0, color='GREEN'), CandleItem(low=340.05, high=344.9, open=341.1, close=344.45, color='GREEN'), CandleItem(low=337.05, high=341.15, open=337.55, close=341.1, color='GREEN')] 2020-10-08 18:00:20 INFO: skip by colors first_candle=CandleItem(low=337.05, high=341.15, open=337.55, close=341.1, color='GREEN') second_candle=CandleItem(low=340.05, high=344.9, open=341.1, close=344.45, color='GREEN') last_candle=CandleItem(low=343.55, high=350.75, open=344.45, close=350.0, color='GREEN') 2020-10-08 18:00:20 INFO: check need new order None 2020-10-08 18:00:20 INFO: init new order end 2020-10-08 18:00:20 INFO: 2020-10-08 18:00:20 INFO: 2020-10-08 18:00:20 INFO: 2020-10-08 18:00:20 INFO: 2020-10-08 18:02:00 INFO: 2020-10-08 18:02:00 INFO: 2020-10-08 18:02:00 INFO: 2020-10-08 18:02:00 INFO: 2020-10-08 18:02:00 INFO: clearing start 2020-10-08 18:02:00 INFO: clearing end 2020-10-08 18:02:00 INFO: 2020-10-08 18:02:00 INFO: 2020-10-08 18:02:00 INFO: 2020-10-08 18:02:00 INFO: 2020-10-08 19:00:20 INFO: 2020-10-08 19:00:20 INFO: 2020-10-08 19:00:20 INFO: 2020-10-08 19:00:20 INFO: 2020-10-08 19:00:20 INFO: init new order start 2020-10-08 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 8, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.0, 'high': 351.7, 'low': 348.7, 'close': 349.85, 'trades': 5823, 'volume': 3429301, 'vwap': 349.9, 'lastSize': 1, 'turnover': 119989478325, 'homeNotional': 37392.3240296609, 'foreignNotional': 13083414.506258797}, {'timestamp': datetime.datetime(2020, 10, 8, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 344.45, 'high': 350.75, 'low': 343.55, 'close': 350.0, 'trades': 9737, 'volume': 7545739, 'vwap': 347.61, 'lastSize': 200, 'turnover': 262296025975, 'homeNotional': 81695.70348357172, 'foreignNotional': 28399137.959594782}, {'timestamp': datetime.datetime(2020, 10, 8, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.1, 'high': 344.9, 'low': 340.05, 'close': 344.45, 'trades': 10268, 'volume': 7068202, 'vwap': 343.45, 'lastSize': 47, 'turnover': 242751636550, 'homeNotional': 75686.34485831186, 'foreignNotional': 25994088.060605947}] 2020-10-08 19:00:20 INFO: prepare candles [CandleItem(low=348.7, high=351.7, open=350.0, close=349.85, color='RED'), CandleItem(low=343.55, high=350.75, open=344.45, close=350.0, color='GREEN'), CandleItem(low=340.05, high=344.9, open=341.1, close=344.45, color='GREEN')] 2020-10-08 19:00:20 INFO: last_candle=CandleItem(low=348.7, high=351.7, open=350.0, close=349.85, color='RED') 2020-10-08 19:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-08 19:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=348.7, high=351.7, open=350.0, close=349.85, color='RED') 2020-10-08 19:00:20 INFO: skip by CandleItem(low=348.7, high=351.7, open=350.0, close=349.85, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-08 19:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-08 19:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=348.7, high=351.7, open=350.0, close=349.85, color='RED') 2020-10-08 19:00:20 INFO: skip by CandleItem(low=348.7, high=351.7, open=350.0, close=349.85, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-08 19:00:20 INFO: not found applicable config for candle 2020-10-08 19:00:20 INFO: check need new order None 2020-10-08 19:00:20 INFO: init new order end 2020-10-08 19:00:20 INFO: 2020-10-08 19:00:20 INFO: 2020-10-08 19:00:20 INFO: 2020-10-08 19:00:20 INFO: 2020-10-08 19:02:00 INFO: 2020-10-08 19:02:00 INFO: 2020-10-08 19:02:00 INFO: 2020-10-08 19:02:00 INFO: 2020-10-08 19:02:00 INFO: clearing start 2020-10-08 19:02:00 INFO: clearing end 2020-10-08 19:02:00 INFO: 2020-10-08 19:02:00 INFO: 2020-10-08 19:02:00 INFO: 2020-10-08 19:02:00 INFO: 2020-10-08 20:00:20 INFO: 2020-10-08 20:00:20 INFO: 2020-10-08 20:00:20 INFO: 2020-10-08 20:00:20 INFO: 2020-10-08 20:00:20 INFO: init new order start 2020-10-08 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 8, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.85, 'high': 353.9, 'low': 349.45, 'close': 351.2, 'trades': 6410, 'volume': 5068873, 'vwap': 351.14, 'lastSize': 10, 'turnover': 177984113760, 'homeNotional': 55290.2715039201, 'foreignNotional': 19414195.517026845}, {'timestamp': datetime.datetime(2020, 10, 8, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.0, 'high': 351.7, 'low': 348.7, 'close': 349.85, 'trades': 5823, 'volume': 3429301, 'vwap': 349.9, 'lastSize': 1, 'turnover': 119989478325, 'homeNotional': 37392.3240296609, 'foreignNotional': 13083414.506258797}, {'timestamp': datetime.datetime(2020, 10, 8, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 344.45, 'high': 350.75, 'low': 343.55, 'close': 350.0, 'trades': 9737, 'volume': 7545739, 'vwap': 347.61, 'lastSize': 200, 'turnover': 262296025975, 'homeNotional': 81695.70348357172, 'foreignNotional': 28399137.959594782}] 2020-10-08 20:00:20 INFO: prepare candles [CandleItem(low=349.45, high=353.9, open=349.85, close=351.2, color='GREEN'), CandleItem(low=348.7, high=351.7, open=350.0, close=349.85, color='RED'), CandleItem(low=343.55, high=350.75, open=344.45, close=350.0, color='GREEN')] 2020-10-08 20:00:20 INFO: skip by colors first_candle=CandleItem(low=343.55, high=350.75, open=344.45, close=350.0, color='GREEN') second_candle=CandleItem(low=348.7, high=351.7, open=350.0, close=349.85, color='RED') last_candle=CandleItem(low=349.45, high=353.9, open=349.85, close=351.2, color='GREEN') 2020-10-08 20:00:20 INFO: check need new order None 2020-10-08 20:00:20 INFO: init new order end 2020-10-08 20:00:20 INFO: 2020-10-08 20:00:20 INFO: 2020-10-08 20:00:20 INFO: 2020-10-08 20:00:20 INFO: 2020-10-08 20:02:00 INFO: 2020-10-08 20:02:00 INFO: 2020-10-08 20:02:00 INFO: 2020-10-08 20:02:00 INFO: 2020-10-08 20:02:00 INFO: clearing start 2020-10-08 20:02:00 INFO: clearing end 2020-10-08 20:02:00 INFO: 2020-10-08 20:02:00 INFO: 2020-10-08 20:02:00 INFO: 2020-10-08 20:02:00 INFO: 2020-10-08 21:00:20 INFO: 2020-10-08 21:00:20 INFO: 2020-10-08 21:00:20 INFO: 2020-10-08 21:00:20 INFO: 2020-10-08 21:00:20 INFO: init new order start 2020-10-08 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 8, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.2, 'high': 352.6, 'low': 350.15, 'close': 351.1, 'trades': 2735, 'volume': 1766751, 'vwap': 351.15, 'lastSize': 11, 'turnover': 62039042745, 'homeNotional': 19282.069213872433, 'foreignNotional': 6770866.263345045}, {'timestamp': datetime.datetime(2020, 10, 8, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.85, 'high': 353.9, 'low': 349.45, 'close': 351.2, 'trades': 6410, 'volume': 5068873, 'vwap': 351.14, 'lastSize': 10, 'turnover': 177984113760, 'homeNotional': 55290.2715039201, 'foreignNotional': 19414195.517026845}, {'timestamp': datetime.datetime(2020, 10, 8, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.0, 'high': 351.7, 'low': 348.7, 'close': 349.85, 'trades': 5823, 'volume': 3429301, 'vwap': 349.9, 'lastSize': 1, 'turnover': 119989478325, 'homeNotional': 37392.3240296609, 'foreignNotional': 13083414.506258797}] 2020-10-08 21:00:20 INFO: prepare candles [CandleItem(low=350.15, high=352.6, open=351.2, close=351.1, color='RED'), CandleItem(low=349.45, high=353.9, open=349.85, close=351.2, color='GREEN'), CandleItem(low=348.7, high=351.7, open=350.0, close=349.85, color='RED')] 2020-10-08 21:00:20 INFO: skip by colors first_candle=CandleItem(low=348.7, high=351.7, open=350.0, close=349.85, color='RED') second_candle=CandleItem(low=349.45, high=353.9, open=349.85, close=351.2, color='GREEN') last_candle=CandleItem(low=350.15, high=352.6, open=351.2, close=351.1, color='RED') 2020-10-08 21:00:20 INFO: check need new order None 2020-10-08 21:00:20 INFO: init new order end 2020-10-08 21:00:20 INFO: 2020-10-08 21:00:20 INFO: 2020-10-08 21:00:20 INFO: 2020-10-08 21:00:20 INFO: 2020-10-08 21:02:00 INFO: 2020-10-08 21:02:00 INFO: 2020-10-08 21:02:00 INFO: 2020-10-08 21:02:00 INFO: 2020-10-08 21:02:00 INFO: clearing start 2020-10-08 21:02:01 INFO: clearing end 2020-10-08 21:02:01 INFO: 2020-10-08 21:02:01 INFO: 2020-10-08 21:02:01 INFO: 2020-10-08 21:02:01 INFO: 2020-10-08 22:00:20 INFO: 2020-10-08 22:00:20 INFO: 2020-10-08 22:00:20 INFO: 2020-10-08 22:00:20 INFO: 2020-10-08 22:00:20 INFO: init new order start 2020-10-08 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 8, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.1, 'high': 352.0, 'low': 350.0, 'close': 351.8, 'trades': 2027, 'volume': 1355502, 'vwap': 351.11, 'lastSize': 29, 'turnover': 47592534115, 'homeNotional': 14750.472115514964, 'foreignNotional': 5178988.686645754}, {'timestamp': datetime.datetime(2020, 10, 8, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.2, 'high': 352.6, 'low': 350.15, 'close': 351.1, 'trades': 2735, 'volume': 1766751, 'vwap': 351.15, 'lastSize': 11, 'turnover': 62039042745, 'homeNotional': 19282.069213872433, 'foreignNotional': 6770866.263345045}, {'timestamp': datetime.datetime(2020, 10, 8, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.85, 'high': 353.9, 'low': 349.45, 'close': 351.2, 'trades': 6410, 'volume': 5068873, 'vwap': 351.14, 'lastSize': 10, 'turnover': 177984113760, 'homeNotional': 55290.2715039201, 'foreignNotional': 19414195.517026845}] 2020-10-08 22:00:20 INFO: prepare candles [CandleItem(low=350.0, high=352.0, open=351.1, close=351.8, color='GREEN'), CandleItem(low=350.15, high=352.6, open=351.2, close=351.1, color='RED'), CandleItem(low=349.45, high=353.9, open=349.85, close=351.2, color='GREEN')] 2020-10-08 22:00:20 INFO: skip by colors first_candle=CandleItem(low=349.45, high=353.9, open=349.85, close=351.2, color='GREEN') second_candle=CandleItem(low=350.15, high=352.6, open=351.2, close=351.1, color='RED') last_candle=CandleItem(low=350.0, high=352.0, open=351.1, close=351.8, color='GREEN') 2020-10-08 22:00:20 INFO: check need new order None 2020-10-08 22:00:20 INFO: init new order end 2020-10-08 22:00:20 INFO: 2020-10-08 22:00:20 INFO: 2020-10-08 22:00:20 INFO: 2020-10-08 22:00:20 INFO: 2020-10-08 22:02:00 INFO: 2020-10-08 22:02:00 INFO: 2020-10-08 22:02:00 INFO: 2020-10-08 22:02:00 INFO: 2020-10-08 22:02:00 INFO: clearing start 2020-10-08 22:02:00 INFO: clearing end 2020-10-08 22:02:00 INFO: 2020-10-08 22:02:00 INFO: 2020-10-08 22:02:00 INFO: 2020-10-08 22:02:00 INFO: 2020-10-08 23:00:20 INFO: 2020-10-08 23:00:20 INFO: 2020-10-08 23:00:20 INFO: 2020-10-08 23:00:20 INFO: 2020-10-08 23:00:20 INFO: init new order start 2020-10-08 23:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 8, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.8, 'high': 352.7, 'low': 351.2, 'close': 351.95, 'trades': 1601, 'volume': 1310463, 'vwap': 351.96, 'lastSize': 4, 'turnover': 46122130265, 'homeNotional': 14269.39364132721, 'foreignNotional': 5022158.060720805}, {'timestamp': datetime.datetime(2020, 10, 8, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.1, 'high': 352.0, 'low': 350.0, 'close': 351.8, 'trades': 2027, 'volume': 1355502, 'vwap': 351.11, 'lastSize': 29, 'turnover': 47592534115, 'homeNotional': 14750.472115514964, 'foreignNotional': 5178988.686645754}, {'timestamp': datetime.datetime(2020, 10, 8, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.2, 'high': 352.6, 'low': 350.15, 'close': 351.1, 'trades': 2735, 'volume': 1766751, 'vwap': 351.15, 'lastSize': 11, 'turnover': 62039042745, 'homeNotional': 19282.069213872433, 'foreignNotional': 6770866.263345045}] 2020-10-08 23:00:21 INFO: prepare candles [CandleItem(low=351.2, high=352.7, open=351.8, close=351.95, color='GREEN'), CandleItem(low=350.0, high=352.0, open=351.1, close=351.8, color='GREEN'), CandleItem(low=350.15, high=352.6, open=351.2, close=351.1, color='RED')] 2020-10-08 23:00:21 INFO: skip by colors first_candle=CandleItem(low=350.15, high=352.6, open=351.2, close=351.1, color='RED') second_candle=CandleItem(low=350.0, high=352.0, open=351.1, close=351.8, color='GREEN') last_candle=CandleItem(low=351.2, high=352.7, open=351.8, close=351.95, color='GREEN') 2020-10-08 23:00:21 INFO: check need new order None 2020-10-08 23:00:21 INFO: init new order end 2020-10-08 23:00:21 INFO: 2020-10-08 23:00:21 INFO: 2020-10-08 23:00:21 INFO: 2020-10-08 23:00:21 INFO: 2020-10-08 23:02:00 INFO: 2020-10-08 23:02:00 INFO: 2020-10-08 23:02:00 INFO: 2020-10-08 23:02:00 INFO: 2020-10-08 23:02:00 INFO: clearing start 2020-10-08 23:02:00 INFO: clearing end 2020-10-08 23:02:00 INFO: 2020-10-08 23:02:00 INFO: 2020-10-08 23:02:00 INFO: 2020-10-08 23:02:00 INFO: 2020-10-09 00:00:20 INFO: 2020-10-09 00:00:20 INFO: 2020-10-09 00:00:20 INFO: 2020-10-09 00:00:20 INFO: 2020-10-09 00:00:20 INFO: init new order start 2020-10-09 00:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 8, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.95, 'high': 354.45, 'low': 351.4, 'close': 352.2, 'trades': 2834, 'volume': 1758398, 'vwap': 352.59, 'lastSize': 1813, 'turnover': 61998606020, 'homeNotional': 19145.59870873821, 'foreignNotional': 6750474.903887802}, {'timestamp': datetime.datetime(2020, 10, 8, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.8, 'high': 352.7, 'low': 351.2, 'close': 351.95, 'trades': 1601, 'volume': 1310463, 'vwap': 351.96, 'lastSize': 4, 'turnover': 46122130265, 'homeNotional': 14269.39364132721, 'foreignNotional': 5022158.060720805}, {'timestamp': datetime.datetime(2020, 10, 8, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.1, 'high': 352.0, 'low': 350.0, 'close': 351.8, 'trades': 2027, 'volume': 1355502, 'vwap': 351.11, 'lastSize': 29, 'turnover': 47592534115, 'homeNotional': 14750.472115514964, 'foreignNotional': 5178988.686645754}] 2020-10-09 00:00:21 INFO: prepare candles [CandleItem(low=351.4, high=354.45, open=351.95, close=352.2, color='GREEN'), CandleItem(low=351.2, high=352.7, open=351.8, close=351.95, color='GREEN'), CandleItem(low=350.0, high=352.0, open=351.1, close=351.8, color='GREEN')] 2020-10-09 00:00:21 INFO: skip by colors first_candle=CandleItem(low=350.0, high=352.0, open=351.1, close=351.8, color='GREEN') second_candle=CandleItem(low=351.2, high=352.7, open=351.8, close=351.95, color='GREEN') last_candle=CandleItem(low=351.4, high=354.45, open=351.95, close=352.2, color='GREEN') 2020-10-09 00:00:21 INFO: check need new order None 2020-10-09 00:00:21 INFO: init new order end 2020-10-09 00:00:21 INFO: 2020-10-09 00:00:21 INFO: 2020-10-09 00:00:21 INFO: 2020-10-09 00:00:21 INFO: 2020-10-09 00:02:00 INFO: 2020-10-09 00:02:00 INFO: 2020-10-09 00:02:00 INFO: 2020-10-09 00:02:00 INFO: 2020-10-09 00:02:00 INFO: clearing start 2020-10-09 00:02:00 INFO: clearing end 2020-10-09 00:02:00 INFO: 2020-10-09 00:02:00 INFO: 2020-10-09 00:02:00 INFO: 2020-10-09 00:02:00 INFO: 2020-10-09 01:00:20 INFO: 2020-10-09 01:00:20 INFO: 2020-10-09 01:00:20 INFO: 2020-10-09 01:00:20 INFO: 2020-10-09 01:00:20 INFO: init new order start 2020-10-09 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 8, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.2, 'high': 352.4, 'low': 350.75, 'close': 350.75, 'trades': 1657, 'volume': 1031225, 'vwap': 351.59, 'lastSize': 1969, 'turnover': 36256000610, 'homeNotional': 11230.0687162569, 'foreignNotional': 3948290.559000944}, {'timestamp': datetime.datetime(2020, 10, 8, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.95, 'high': 354.45, 'low': 351.4, 'close': 352.2, 'trades': 2834, 'volume': 1758398, 'vwap': 352.59, 'lastSize': 1813, 'turnover': 61998606020, 'homeNotional': 19145.59870873821, 'foreignNotional': 6750474.903887802}, {'timestamp': datetime.datetime(2020, 10, 8, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.8, 'high': 352.7, 'low': 351.2, 'close': 351.95, 'trades': 1601, 'volume': 1310463, 'vwap': 351.96, 'lastSize': 4, 'turnover': 46122130265, 'homeNotional': 14269.39364132721, 'foreignNotional': 5022158.060720805}] 2020-10-09 01:00:20 INFO: prepare candles [CandleItem(low=350.75, high=352.4, open=352.2, close=350.75, color='RED'), CandleItem(low=351.4, high=354.45, open=351.95, close=352.2, color='GREEN'), CandleItem(low=351.2, high=352.7, open=351.8, close=351.95, color='GREEN')] 2020-10-09 01:00:20 INFO: last_candle=CandleItem(low=350.75, high=352.4, open=352.2, close=350.75, color='RED') 2020-10-09 01:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-09 01:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=350.75, high=352.4, open=352.2, close=350.75, color='RED') 2020-10-09 01:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=351.4, high=354.45, open=351.95, close=352.2, color='GREEN') 2020-10-09 01:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=351.2, high=352.7, open=351.8, close=351.95, color='GREEN') 2020-10-09 01:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=350.75, high=352.4, open=352.2, close=350.75, color='RED'), take_profit_factor=6.0, clearing_interval=3600) 2020-10-09 01:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=350.75, high=352.4, open=352.2, close=350.75, color='RED'), take_profit_factor=6.0, clearing_interval=3600) 2020-10-09 01:00:20 INFO: place order: start candle=CandleItem(low=350.75, high=352.4, open=352.2, close=350.75, color='RED') ticker='ETHUSD' price_offset=0.1 2020-10-09 01:00:20 INFO: place order: side_factor=1 init_trigger_price=350.7 init_order_price=350.65 stop_price_offset=0.0 candle.size=1.6499999999999773 stop_price=352.4 take_price=340.7500000000001 2020-10-09 01:00:20 INFO: place order round: side_factor=1 init_trigger_price=Decimal('350.69999999999998863131622783839702606201171875') init_order_price=Decimal('350.6499999999999772626324556767940521240234375') stop_price_offset=0.0 candle.size=1.6499999999999773 stop_price=Decimal('352.3999999999999772626324556767940521240234375') take_price=Decimal('340.7500000000001136868377216160297393798828125') 2020-10-09 01:00:20 INFO: place order: compute qty=-1118 2020-10-09 01:00:20 INFO: place order: save order to db 5906fc4d33aa4eedbcbb971a301f4c34; response=True 2020-10-09 01:00:20 INFO: post order to exchange resp={'orderID': '1f2bfd5c-b2d6-4c5a-90f9-6498cb339812', 'clOrdID': '5906fc4d33aa4eedbcbb971a301f4c34', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1118, 'price': 350.65, 'displayQty': None, 'stopPx': 350.7, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1118, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 8, 22, 0, 20, 621000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 8, 22, 0, 20, 621000, tzinfo=tzutc())} 2020-10-09 01:00:20 INFO: place new init order {'qty': -1118, 'init_price': Decimal('350.69999999999998863131622783839702606201171875'), 'stop_price': Decimal('352.3999999999999772626324556767940521240234375'), 'take_price': Decimal('340.7500000000001136868377216160297393798828125'), 'order_uid': '5906fc4d33aa4eedbcbb971a301f4c34', 'response': {'orderID': '1f2bfd5c-b2d6-4c5a-90f9-6498cb339812', 'clOrdID': '5906fc4d33aa4eedbcbb971a301f4c34', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1118, 'price': 350.65, 'displayQty': None, 'stopPx': 350.7, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1118, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 8, 22, 0, 20, 621000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 8, 22, 0, 20, 621000, tzinfo=tzutc())}} 2020-10-09 01:00:20 INFO: init new order end 2020-10-09 01:00:20 INFO: 2020-10-09 01:00:20 INFO: 2020-10-09 01:00:20 INFO: 2020-10-09 01:00:20 INFO: 2020-10-09 01:00:20 INFO: process event {'orderID': '1f2bfd5c-b2d6-4c5a-90f9-6498cb339812', 'clOrdID': '5906fc4d33aa4eedbcbb971a301f4c34', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1118, 'price': 350.65, 'displayQty': None, 'stopPx': 350.7, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1118, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-10-08T22:00:20.621Z', 'timestamp': '2020-10-08T22:00:20.621Z'} 2020-10-09 01:00:20 INFO: skip event 5906fc4d33aa4eedbcbb971a301f4c34 New 2020-10-09 01:02:00 INFO: 2020-10-09 01:02:00 INFO: 2020-10-09 01:02:00 INFO: 2020-10-09 01:02:00 INFO: 2020-10-09 01:02:00 INFO: clearing start 2020-10-09 01:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '1f2bfd5c-b2d6-4c5a-90f9-6498cb339812', 'clOrdID': '5906fc4d33aa4eedbcbb971a301f4c34', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1118, 'price': 350.65, 'displayQty': None, 'stopPx': 350.7, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1118, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 8, 22, 0, 20, 621000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 8, 22, 0, 20, 621000, tzinfo=tzutc())} 2020-10-09 01:02:00 INFO: order time=2020-10-08 22:00:20.621000+00:00; delta from now UTC=0:01:40.030768 time_delta.total_seconds()=100.030768; time_diff_offset='3600' 2020-10-09 01:02:00 INFO: skip by time diff 2020-10-08 22:00:20.621000+00:00 2020-10-09 01:02:00 INFO: clearing end 2020-10-09 01:02:00 INFO: 2020-10-09 01:02:00 INFO: 2020-10-09 01:02:00 INFO: 2020-10-09 01:02:00 INFO: 2020-10-09 02:00:20 INFO: 2020-10-09 02:00:20 INFO: 2020-10-09 02:00:20 INFO: 2020-10-09 02:00:20 INFO: 2020-10-09 02:00:20 INFO: init new order start 2020-10-09 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 8, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.75, 'high': 352.5, 'low': 350.75, 'close': 351.85, 'trades': 1975, 'volume': 1123972, 'vwap': 351.88, 'lastSize': 30, 'turnover': 39549308300, 'homeNotional': 12251.00661884473, 'foreignNotional': 4310775.1943384325}, {'timestamp': datetime.datetime(2020, 10, 8, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.2, 'high': 352.4, 'low': 350.75, 'close': 350.75, 'trades': 1657, 'volume': 1031225, 'vwap': 351.59, 'lastSize': 1969, 'turnover': 36256000610, 'homeNotional': 11230.0687162569, 'foreignNotional': 3948290.559000944}, {'timestamp': datetime.datetime(2020, 10, 8, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.95, 'high': 354.45, 'low': 351.4, 'close': 352.2, 'trades': 2834, 'volume': 1758398, 'vwap': 352.59, 'lastSize': 1813, 'turnover': 61998606020, 'homeNotional': 19145.59870873821, 'foreignNotional': 6750474.903887802}] 2020-10-09 02:00:20 INFO: prepare candles [CandleItem(low=350.75, high=352.5, open=350.75, close=351.85, color='GREEN'), CandleItem(low=350.75, high=352.4, open=352.2, close=350.75, color='RED'), CandleItem(low=351.4, high=354.45, open=351.95, close=352.2, color='GREEN')] 2020-10-09 02:00:20 INFO: skip by colors first_candle=CandleItem(low=351.4, high=354.45, open=351.95, close=352.2, color='GREEN') second_candle=CandleItem(low=350.75, high=352.4, open=352.2, close=350.75, color='RED') last_candle=CandleItem(low=350.75, high=352.5, open=350.75, close=351.85, color='GREEN') 2020-10-09 02:00:20 INFO: check need new order None 2020-10-09 02:00:20 INFO: init new order end 2020-10-09 02:00:20 INFO: 2020-10-09 02:00:20 INFO: 2020-10-09 02:00:20 INFO: 2020-10-09 02:00:20 INFO: 2020-10-09 02:02:00 INFO: 2020-10-09 02:02:00 INFO: 2020-10-09 02:02:00 INFO: 2020-10-09 02:02:00 INFO: 2020-10-09 02:02:00 INFO: clearing start 2020-10-09 02:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '1f2bfd5c-b2d6-4c5a-90f9-6498cb339812', 'clOrdID': '5906fc4d33aa4eedbcbb971a301f4c34', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1118, 'price': 350.65, 'displayQty': None, 'stopPx': 350.7, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1118, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 8, 22, 0, 20, 621000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 8, 22, 0, 20, 621000, tzinfo=tzutc())} 2020-10-09 02:02:01 INFO: order time=2020-10-08 22:00:20.621000+00:00; delta from now UTC=1:01:40.435845 time_delta.total_seconds()=3700.435845; time_diff_offset='3600' 2020-10-09 02:02:01 INFO: clear order 5906fc4d33aa4eedbcbb971a301f4c34 2020-10-09 02:02:01 INFO: process event {'orderID': '1f2bfd5c-b2d6-4c5a-90f9-6498cb339812', 'ordStatus': 'Canceled', 'leavesQty': 0, 'text': 'Canceled: cancelled by clearing\nInit order by supervisor.py', 'timestamp': '2020-10-08T23:02:01.080Z', 'clOrdID': '5906fc4d33aa4eedbcbb971a301f4c34', 'account': 605536, 'symbol': 'ETHUSD'} 2020-10-09 02:02:01 INFO: cancel order resp=[{'orderID': '1f2bfd5c-b2d6-4c5a-90f9-6498cb339812', 'clOrdID': '5906fc4d33aa4eedbcbb971a301f4c34', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1118, 'price': 350.65, 'displayQty': None, 'stopPx': 350.7, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'Canceled', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 0, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Canceled: cancelled by clearing\nInit order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 8, 22, 0, 20, 621000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 8, 23, 2, 1, 80000, tzinfo=tzutc())}] 2020-10-09 02:02:01 INFO: skip event 5906fc4d33aa4eedbcbb971a301f4c34 Canceled 2020-10-09 02:02:01 INFO: clearing end 2020-10-09 02:02:01 INFO: 2020-10-09 02:02:01 INFO: 2020-10-09 02:02:01 INFO: 2020-10-09 02:02:01 INFO: 2020-10-09 03:00:20 INFO: 2020-10-09 03:00:20 INFO: 2020-10-09 03:00:20 INFO: 2020-10-09 03:00:20 INFO: 2020-10-09 03:00:20 INFO: init new order start 2020-10-09 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 9, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.85, 'high': 352.0, 'low': 350.5, 'close': 351.6, 'trades': 2094, 'volume': 1355081, 'vwap': 351.13, 'lastSize': 10, 'turnover': 47579949855, 'homeNotional': 14768.8613671493, 'foreignNotional': 5185683.954531265}, {'timestamp': datetime.datetime(2020, 10, 8, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.75, 'high': 352.5, 'low': 350.75, 'close': 351.85, 'trades': 1975, 'volume': 1123972, 'vwap': 351.88, 'lastSize': 30, 'turnover': 39549308300, 'homeNotional': 12251.00661884473, 'foreignNotional': 4310775.1943384325}, {'timestamp': datetime.datetime(2020, 10, 8, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.2, 'high': 352.4, 'low': 350.75, 'close': 350.75, 'trades': 1657, 'volume': 1031225, 'vwap': 351.59, 'lastSize': 1969, 'turnover': 36256000610, 'homeNotional': 11230.0687162569, 'foreignNotional': 3948290.559000944}] 2020-10-09 03:00:20 INFO: prepare candles [CandleItem(low=350.5, high=352.0, open=351.85, close=351.6, color='RED'), CandleItem(low=350.75, high=352.5, open=350.75, close=351.85, color='GREEN'), CandleItem(low=350.75, high=352.4, open=352.2, close=350.75, color='RED')] 2020-10-09 03:00:20 INFO: skip by colors first_candle=CandleItem(low=350.75, high=352.4, open=352.2, close=350.75, color='RED') second_candle=CandleItem(low=350.75, high=352.5, open=350.75, close=351.85, color='GREEN') last_candle=CandleItem(low=350.5, high=352.0, open=351.85, close=351.6, color='RED') 2020-10-09 03:00:20 INFO: check need new order None 2020-10-09 03:00:20 INFO: init new order end 2020-10-09 03:00:20 INFO: 2020-10-09 03:00:20 INFO: 2020-10-09 03:00:20 INFO: 2020-10-09 03:00:20 INFO: 2020-10-09 03:02:00 INFO: 2020-10-09 03:02:00 INFO: 2020-10-09 03:02:00 INFO: 2020-10-09 03:02:00 INFO: 2020-10-09 03:02:00 INFO: clearing start 2020-10-09 03:02:00 INFO: clearing end 2020-10-09 03:02:00 INFO: 2020-10-09 03:02:00 INFO: 2020-10-09 03:02:00 INFO: 2020-10-09 03:02:00 INFO: 2020-10-09 04:00:20 INFO: 2020-10-09 04:00:20 INFO: 2020-10-09 04:00:20 INFO: 2020-10-09 04:00:20 INFO: 2020-10-09 04:00:20 INFO: init new order start 2020-10-09 04:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 9, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.6, 'high': 352.0, 'low': 349.0, 'close': 349.65, 'trades': 2821, 'volume': 1683796, 'vwap': 350.36, 'lastSize': 10, 'turnover': 58992585855, 'homeNotional': 18360.947231454516, 'foreignNotional': 6432879.634489194}, {'timestamp': datetime.datetime(2020, 10, 9, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.85, 'high': 352.0, 'low': 350.5, 'close': 351.6, 'trades': 2094, 'volume': 1355081, 'vwap': 351.13, 'lastSize': 10, 'turnover': 47579949855, 'homeNotional': 14768.8613671493, 'foreignNotional': 5185683.954531265}, {'timestamp': datetime.datetime(2020, 10, 8, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.75, 'high': 352.5, 'low': 350.75, 'close': 351.85, 'trades': 1975, 'volume': 1123972, 'vwap': 351.88, 'lastSize': 30, 'turnover': 39549308300, 'homeNotional': 12251.00661884473, 'foreignNotional': 4310775.1943384325}] 2020-10-09 04:00:21 INFO: prepare candles [CandleItem(low=349.0, high=352.0, open=351.6, close=349.65, color='RED'), CandleItem(low=350.5, high=352.0, open=351.85, close=351.6, color='RED'), CandleItem(low=350.75, high=352.5, open=350.75, close=351.85, color='GREEN')] 2020-10-09 04:00:21 INFO: skip by colors first_candle=CandleItem(low=350.75, high=352.5, open=350.75, close=351.85, color='GREEN') second_candle=CandleItem(low=350.5, high=352.0, open=351.85, close=351.6, color='RED') last_candle=CandleItem(low=349.0, high=352.0, open=351.6, close=349.65, color='RED') 2020-10-09 04:00:21 INFO: check need new order None 2020-10-09 04:00:21 INFO: init new order end 2020-10-09 04:00:21 INFO: 2020-10-09 04:00:21 INFO: 2020-10-09 04:00:21 INFO: 2020-10-09 04:00:21 INFO: 2020-10-09 04:02:00 INFO: 2020-10-09 04:02:00 INFO: 2020-10-09 04:02:00 INFO: 2020-10-09 04:02:00 INFO: 2020-10-09 04:02:00 INFO: clearing start 2020-10-09 04:02:00 INFO: clearing end 2020-10-09 04:02:00 INFO: 2020-10-09 04:02:00 INFO: 2020-10-09 04:02:00 INFO: 2020-10-09 04:02:00 INFO: 2020-10-09 05:00:20 INFO: 2020-10-09 05:00:20 INFO: 2020-10-09 05:00:20 INFO: 2020-10-09 05:00:20 INFO: 2020-10-09 05:00:20 INFO: init new order start 2020-10-09 05:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 9, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.65, 'high': 351.75, 'low': 349.6, 'close': 351.6, 'trades': 1766, 'volume': 1422559, 'vwap': 350.68, 'lastSize': 2586, 'turnover': 49885110535, 'homeNotional': 15492.486204325114, 'foreignNotional': 5432778.080442819}, {'timestamp': datetime.datetime(2020, 10, 9, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.6, 'high': 352.0, 'low': 349.0, 'close': 349.65, 'trades': 2821, 'volume': 1683796, 'vwap': 350.36, 'lastSize': 10, 'turnover': 58992585855, 'homeNotional': 18360.947231454516, 'foreignNotional': 6432879.634489194}, {'timestamp': datetime.datetime(2020, 10, 9, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.85, 'high': 352.0, 'low': 350.5, 'close': 351.6, 'trades': 2094, 'volume': 1355081, 'vwap': 351.13, 'lastSize': 10, 'turnover': 47579949855, 'homeNotional': 14768.8613671493, 'foreignNotional': 5185683.954531265}] 2020-10-09 05:00:20 INFO: prepare candles [CandleItem(low=349.6, high=351.75, open=349.65, close=351.6, color='GREEN'), CandleItem(low=349.0, high=352.0, open=351.6, close=349.65, color='RED'), CandleItem(low=350.5, high=352.0, open=351.85, close=351.6, color='RED')] 2020-10-09 05:00:20 INFO: last_candle=CandleItem(low=349.6, high=351.75, open=349.65, close=351.6, color='GREEN') 2020-10-09 05:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-09 05:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=349.6, high=351.75, open=349.65, close=351.6, color='GREEN') 2020-10-09 05:00:20 INFO: skip by CandleItem(low=349.6, high=351.75, open=349.65, close=351.6, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-09 05:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-09 05:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=349.6, high=351.75, open=349.65, close=351.6, color='GREEN') 2020-10-09 05:00:20 INFO: skip by CandleItem(low=349.6, high=351.75, open=349.65, close=351.6, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-09 05:00:20 INFO: not found applicable config for candle 2020-10-09 05:00:20 INFO: check need new order None 2020-10-09 05:00:20 INFO: init new order end 2020-10-09 05:00:20 INFO: 2020-10-09 05:00:20 INFO: 2020-10-09 05:00:20 INFO: 2020-10-09 05:00:20 INFO: 2020-10-09 05:02:00 INFO: 2020-10-09 05:02:00 INFO: 2020-10-09 05:02:00 INFO: 2020-10-09 05:02:00 INFO: 2020-10-09 05:02:00 INFO: clearing start 2020-10-09 05:02:00 INFO: clearing end 2020-10-09 05:02:00 INFO: 2020-10-09 05:02:00 INFO: 2020-10-09 05:02:00 INFO: 2020-10-09 05:02:00 INFO: 2020-10-09 05:45:30 ERROR: Error : Connection is already closed. 2020-10-09 05:45:30 ERROR: error from callback >: Connection is already closed. 2020-10-09 05:45:30 INFO: Websocket Closed 2020-10-09 05:45:31 WARNING: reconnect to socket 2020-10-09 05:45:31 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-10-09 05:45:31 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-10-09 05:45:31 INFO: Authenticating with API Key. 2020-10-09 05:45:32 INFO: Connected to WS. 2020-10-09 06:00:20 INFO: 2020-10-09 06:00:20 INFO: 2020-10-09 06:00:20 INFO: 2020-10-09 06:00:20 INFO: 2020-10-09 06:00:20 INFO: init new order start 2020-10-09 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 9, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.6, 'high': 352.55, 'low': 351.0, 'close': 351.65, 'trades': 1298, 'volume': 871375, 'vwap': 351.69, 'lastSize': 1460, 'turnover': 30645217750, 'homeNotional': 9506.001878397248, 'foreignNotional': 3343149.9099816633}, {'timestamp': datetime.datetime(2020, 10, 9, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.65, 'high': 351.75, 'low': 349.6, 'close': 351.6, 'trades': 1766, 'volume': 1422559, 'vwap': 350.68, 'lastSize': 2586, 'turnover': 49885110535, 'homeNotional': 15492.486204325114, 'foreignNotional': 5432778.080442819}, {'timestamp': datetime.datetime(2020, 10, 9, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.6, 'high': 352.0, 'low': 349.0, 'close': 349.65, 'trades': 2821, 'volume': 1683796, 'vwap': 350.36, 'lastSize': 10, 'turnover': 58992585855, 'homeNotional': 18360.947231454516, 'foreignNotional': 6432879.634489194}] 2020-10-09 06:00:20 INFO: prepare candles [CandleItem(low=351.0, high=352.55, open=351.6, close=351.65, color='GREEN'), CandleItem(low=349.6, high=351.75, open=349.65, close=351.6, color='GREEN'), CandleItem(low=349.0, high=352.0, open=351.6, close=349.65, color='RED')] 2020-10-09 06:00:20 INFO: skip by colors first_candle=CandleItem(low=349.0, high=352.0, open=351.6, close=349.65, color='RED') second_candle=CandleItem(low=349.6, high=351.75, open=349.65, close=351.6, color='GREEN') last_candle=CandleItem(low=351.0, high=352.55, open=351.6, close=351.65, color='GREEN') 2020-10-09 06:00:20 INFO: check need new order None 2020-10-09 06:00:20 INFO: init new order end 2020-10-09 06:00:20 INFO: 2020-10-09 06:00:20 INFO: 2020-10-09 06:00:20 INFO: 2020-10-09 06:00:20 INFO: 2020-10-09 06:02:00 INFO: 2020-10-09 06:02:00 INFO: 2020-10-09 06:02:00 INFO: 2020-10-09 06:02:00 INFO: 2020-10-09 06:02:00 INFO: clearing start 2020-10-09 06:02:00 INFO: clearing end 2020-10-09 06:02:00 INFO: 2020-10-09 06:02:00 INFO: 2020-10-09 06:02:00 INFO: 2020-10-09 06:02:00 INFO: 2020-10-09 06:38:21 ERROR: Error : Connection is already closed. 2020-10-09 06:38:21 ERROR: error from callback >: Connection is already closed. 2020-10-09 06:38:21 INFO: Websocket Closed 2020-10-09 06:38:22 WARNING: reconnect to socket 2020-10-09 06:38:22 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-10-09 06:38:22 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-10-09 06:38:22 INFO: Authenticating with API Key. 2020-10-09 06:38:23 INFO: Connected to WS. 2020-10-09 07:00:20 INFO: 2020-10-09 07:00:20 INFO: 2020-10-09 07:00:20 INFO: 2020-10-09 07:00:20 INFO: 2020-10-09 07:00:20 INFO: init new order start 2020-10-09 07:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 9, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.65, 'high': 351.8, 'low': 350.5, 'close': 350.5, 'trades': 1130, 'volume': 732440, 'vwap': 351.35, 'lastSize': 1, 'turnover': 25734243985, 'homeNotional': 7981.935190214486, 'foreignNotional': 2804450.044159819}, {'timestamp': datetime.datetime(2020, 10, 9, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.6, 'high': 352.55, 'low': 351.0, 'close': 351.65, 'trades': 1298, 'volume': 871375, 'vwap': 351.69, 'lastSize': 1460, 'turnover': 30645217750, 'homeNotional': 9506.001878397248, 'foreignNotional': 3343149.9099816633}, {'timestamp': datetime.datetime(2020, 10, 9, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.65, 'high': 351.75, 'low': 349.6, 'close': 351.6, 'trades': 1766, 'volume': 1422559, 'vwap': 350.68, 'lastSize': 2586, 'turnover': 49885110535, 'homeNotional': 15492.486204325114, 'foreignNotional': 5432778.080442819}] 2020-10-09 07:00:20 INFO: prepare candles [CandleItem(low=350.5, high=351.8, open=351.65, close=350.5, color='RED'), CandleItem(low=351.0, high=352.55, open=351.6, close=351.65, color='GREEN'), CandleItem(low=349.6, high=351.75, open=349.65, close=351.6, color='GREEN')] 2020-10-09 07:00:20 INFO: last_candle=CandleItem(low=350.5, high=351.8, open=351.65, close=350.5, color='RED') 2020-10-09 07:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-09 07:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=350.5, high=351.8, open=351.65, close=350.5, color='RED') 2020-10-09 07:00:20 INFO: skip by CandleItem(low=350.5, high=351.8, open=351.65, close=350.5, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-09 07:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-09 07:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=350.5, high=351.8, open=351.65, close=350.5, color='RED') 2020-10-09 07:00:20 INFO: skip by CandleItem(low=350.5, high=351.8, open=351.65, close=350.5, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-09 07:00:20 INFO: not found applicable config for candle 2020-10-09 07:00:20 INFO: check need new order None 2020-10-09 07:00:20 INFO: init new order end 2020-10-09 07:00:20 INFO: 2020-10-09 07:00:20 INFO: 2020-10-09 07:00:20 INFO: 2020-10-09 07:00:20 INFO: 2020-10-09 07:02:00 INFO: 2020-10-09 07:02:01 INFO: 2020-10-09 07:02:01 INFO: 2020-10-09 07:02:01 INFO: 2020-10-09 07:02:01 INFO: clearing start 2020-10-09 07:02:01 INFO: clearing end 2020-10-09 07:02:01 INFO: 2020-10-09 07:02:01 INFO: 2020-10-09 07:02:01 INFO: 2020-10-09 07:02:01 INFO: 2020-10-09 08:00:20 INFO: 2020-10-09 08:00:20 INFO: 2020-10-09 08:00:20 INFO: 2020-10-09 08:00:20 INFO: 2020-10-09 08:00:20 INFO: init new order start 2020-10-09 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 9, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.5, 'high': 351.3, 'low': 349.8, 'close': 349.8, 'trades': 1224, 'volume': 946126, 'vwap': 350.43, 'lastSize': 10, 'turnover': 33154630840, 'homeNotional': 10299.803319062079, 'foreignNotional': 3609311.2908149897}, {'timestamp': datetime.datetime(2020, 10, 9, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.65, 'high': 351.8, 'low': 350.5, 'close': 350.5, 'trades': 1130, 'volume': 732440, 'vwap': 351.35, 'lastSize': 1, 'turnover': 25734243985, 'homeNotional': 7981.935190214486, 'foreignNotional': 2804450.044159819}, {'timestamp': datetime.datetime(2020, 10, 9, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.6, 'high': 352.55, 'low': 351.0, 'close': 351.65, 'trades': 1298, 'volume': 871375, 'vwap': 351.69, 'lastSize': 1460, 'turnover': 30645217750, 'homeNotional': 9506.001878397248, 'foreignNotional': 3343149.9099816633}] 2020-10-09 08:00:20 INFO: prepare candles [CandleItem(low=349.8, high=351.3, open=350.5, close=349.8, color='RED'), CandleItem(low=350.5, high=351.8, open=351.65, close=350.5, color='RED'), CandleItem(low=351.0, high=352.55, open=351.6, close=351.65, color='GREEN')] 2020-10-09 08:00:20 INFO: skip by colors first_candle=CandleItem(low=351.0, high=352.55, open=351.6, close=351.65, color='GREEN') second_candle=CandleItem(low=350.5, high=351.8, open=351.65, close=350.5, color='RED') last_candle=CandleItem(low=349.8, high=351.3, open=350.5, close=349.8, color='RED') 2020-10-09 08:00:20 INFO: check need new order None 2020-10-09 08:00:20 INFO: init new order end 2020-10-09 08:00:20 INFO: 2020-10-09 08:00:20 INFO: 2020-10-09 08:00:20 INFO: 2020-10-09 08:00:20 INFO: 2020-10-09 08:02:00 INFO: 2020-10-09 08:02:00 INFO: 2020-10-09 08:02:00 INFO: 2020-10-09 08:02:00 INFO: 2020-10-09 08:02:00 INFO: clearing start 2020-10-09 08:02:00 INFO: clearing end 2020-10-09 08:02:00 INFO: 2020-10-09 08:02:00 INFO: 2020-10-09 08:02:00 INFO: 2020-10-09 08:02:00 INFO: 2020-10-09 09:00:20 INFO: 2020-10-09 09:00:20 INFO: 2020-10-09 09:00:20 INFO: 2020-10-09 09:00:20 INFO: 2020-10-09 09:00:20 INFO: init new order start 2020-10-09 09:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 9, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.8, 'high': 350.35, 'low': 349.2, 'close': 349.2, 'trades': 1670, 'volume': 1319903, 'vwap': 349.73, 'lastSize': 1, 'turnover': 46160090110, 'homeNotional': 14362.552820548914, 'foreignNotional': 5022922.168754675}, {'timestamp': datetime.datetime(2020, 10, 9, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.5, 'high': 351.3, 'low': 349.8, 'close': 349.8, 'trades': 1224, 'volume': 946126, 'vwap': 350.43, 'lastSize': 10, 'turnover': 33154630840, 'homeNotional': 10299.803319062079, 'foreignNotional': 3609311.2908149897}, {'timestamp': datetime.datetime(2020, 10, 9, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.65, 'high': 351.8, 'low': 350.5, 'close': 350.5, 'trades': 1130, 'volume': 732440, 'vwap': 351.35, 'lastSize': 1, 'turnover': 25734243985, 'homeNotional': 7981.935190214486, 'foreignNotional': 2804450.044159819}] 2020-10-09 09:00:21 INFO: prepare candles [CandleItem(low=349.2, high=350.35, open=349.8, close=349.2, color='RED'), CandleItem(low=349.8, high=351.3, open=350.5, close=349.8, color='RED'), CandleItem(low=350.5, high=351.8, open=351.65, close=350.5, color='RED')] 2020-10-09 09:00:21 INFO: skip by colors first_candle=CandleItem(low=350.5, high=351.8, open=351.65, close=350.5, color='RED') second_candle=CandleItem(low=349.8, high=351.3, open=350.5, close=349.8, color='RED') last_candle=CandleItem(low=349.2, high=350.35, open=349.8, close=349.2, color='RED') 2020-10-09 09:00:21 INFO: check need new order None 2020-10-09 09:00:21 INFO: init new order end 2020-10-09 09:00:21 INFO: 2020-10-09 09:00:21 INFO: 2020-10-09 09:00:21 INFO: 2020-10-09 09:00:21 INFO: 2020-10-09 09:02:00 INFO: 2020-10-09 09:02:00 INFO: 2020-10-09 09:02:00 INFO: 2020-10-09 09:02:00 INFO: 2020-10-09 09:02:00 INFO: clearing start 2020-10-09 09:02:00 INFO: clearing end 2020-10-09 09:02:00 INFO: 2020-10-09 09:02:00 INFO: 2020-10-09 09:02:00 INFO: 2020-10-09 09:02:00 INFO: 2020-10-09 10:00:20 INFO: 2020-10-09 10:00:20 INFO: 2020-10-09 10:00:20 INFO: 2020-10-09 10:00:20 INFO: 2020-10-09 10:00:20 INFO: init new order start 2020-10-09 10:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 9, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.2, 'high': 349.5, 'low': 347.75, 'close': 348.8, 'trades': 3497, 'volume': 2404101, 'vwap': 348.56, 'lastSize': 275, 'turnover': 83797151515, 'homeNotional': 26097.6739470244, 'foreignNotional': 9096592.642241254}, {'timestamp': datetime.datetime(2020, 10, 9, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.8, 'high': 350.35, 'low': 349.2, 'close': 349.2, 'trades': 1670, 'volume': 1319903, 'vwap': 349.73, 'lastSize': 1, 'turnover': 46160090110, 'homeNotional': 14362.552820548914, 'foreignNotional': 5022922.168754675}, {'timestamp': datetime.datetime(2020, 10, 9, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.5, 'high': 351.3, 'low': 349.8, 'close': 349.8, 'trades': 1224, 'volume': 946126, 'vwap': 350.43, 'lastSize': 10, 'turnover': 33154630840, 'homeNotional': 10299.803319062079, 'foreignNotional': 3609311.2908149897}] 2020-10-09 10:00:20 INFO: prepare candles [CandleItem(low=347.75, high=349.5, open=349.2, close=348.8, color='RED'), CandleItem(low=349.2, high=350.35, open=349.8, close=349.2, color='RED'), CandleItem(low=349.8, high=351.3, open=350.5, close=349.8, color='RED')] 2020-10-09 10:00:20 INFO: skip by colors first_candle=CandleItem(low=349.8, high=351.3, open=350.5, close=349.8, color='RED') second_candle=CandleItem(low=349.2, high=350.35, open=349.8, close=349.2, color='RED') last_candle=CandleItem(low=347.75, high=349.5, open=349.2, close=348.8, color='RED') 2020-10-09 10:00:20 INFO: check need new order None 2020-10-09 10:00:20 INFO: init new order end 2020-10-09 10:00:20 INFO: 2020-10-09 10:00:20 INFO: 2020-10-09 10:00:20 INFO: 2020-10-09 10:00:20 INFO: 2020-10-09 10:02:00 INFO: 2020-10-09 10:02:00 INFO: 2020-10-09 10:02:00 INFO: 2020-10-09 10:02:00 INFO: 2020-10-09 10:02:00 INFO: clearing start 2020-10-09 10:02:00 INFO: clearing end 2020-10-09 10:02:00 INFO: 2020-10-09 10:02:00 INFO: 2020-10-09 10:02:00 INFO: 2020-10-09 10:02:00 INFO: 2020-10-09 11:00:20 INFO: 2020-10-09 11:00:20 INFO: 2020-10-09 11:00:20 INFO: 2020-10-09 11:00:20 INFO: 2020-10-09 11:00:20 INFO: init new order start 2020-10-09 11:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 9, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.8, 'high': 350.85, 'low': 348.75, 'close': 350.6, 'trades': 2384, 'volume': 1398806, 'vwap': 350.2, 'lastSize': 9, 'turnover': 48985776655, 'homeNotional': 15228.909498379271, 'foreignNotional': 5333128.513426976}, {'timestamp': datetime.datetime(2020, 10, 9, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.2, 'high': 349.5, 'low': 347.75, 'close': 348.8, 'trades': 3497, 'volume': 2404101, 'vwap': 348.56, 'lastSize': 275, 'turnover': 83797151515, 'homeNotional': 26097.6739470244, 'foreignNotional': 9096592.642241254}, {'timestamp': datetime.datetime(2020, 10, 9, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.8, 'high': 350.35, 'low': 349.2, 'close': 349.2, 'trades': 1670, 'volume': 1319903, 'vwap': 349.73, 'lastSize': 1, 'turnover': 46160090110, 'homeNotional': 14362.552820548914, 'foreignNotional': 5022922.168754675}] 2020-10-09 11:00:20 INFO: prepare candles [CandleItem(low=348.75, high=350.85, open=348.8, close=350.6, color='GREEN'), CandleItem(low=347.75, high=349.5, open=349.2, close=348.8, color='RED'), CandleItem(low=349.2, high=350.35, open=349.8, close=349.2, color='RED')] 2020-10-09 11:00:20 INFO: last_candle=CandleItem(low=348.75, high=350.85, open=348.8, close=350.6, color='GREEN') 2020-10-09 11:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-09 11:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=348.75, high=350.85, open=348.8, close=350.6, color='GREEN') 2020-10-09 11:00:20 INFO: skip by CandleItem(low=348.75, high=350.85, open=348.8, close=350.6, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-09 11:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-09 11:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=348.75, high=350.85, open=348.8, close=350.6, color='GREEN') 2020-10-09 11:00:20 INFO: skip by CandleItem(low=348.75, high=350.85, open=348.8, close=350.6, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-09 11:00:20 INFO: not found applicable config for candle 2020-10-09 11:00:20 INFO: check need new order None 2020-10-09 11:00:20 INFO: init new order end 2020-10-09 11:00:20 INFO: 2020-10-09 11:00:20 INFO: 2020-10-09 11:00:20 INFO: 2020-10-09 11:00:20 INFO: 2020-10-09 11:02:00 INFO: 2020-10-09 11:02:00 INFO: 2020-10-09 11:02:00 INFO: 2020-10-09 11:02:00 INFO: 2020-10-09 11:02:00 INFO: clearing start 2020-10-09 11:02:00 INFO: clearing end 2020-10-09 11:02:00 INFO: 2020-10-09 11:02:00 INFO: 2020-10-09 11:02:00 INFO: 2020-10-09 11:02:00 INFO: 2020-10-09 12:00:20 INFO: 2020-10-09 12:00:20 INFO: 2020-10-09 12:00:20 INFO: 2020-10-09 12:00:20 INFO: 2020-10-09 12:00:20 INFO: init new order start 2020-10-09 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 9, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.6, 'high': 351.6, 'low': 350.5, 'close': 351.15, 'trades': 1512, 'volume': 1018614, 'vwap': 351.08, 'lastSize': 1, 'turnover': 35760631440, 'homeNotional': 11095.607926513901, 'foreignNotional': 3895352.331218894}, {'timestamp': datetime.datetime(2020, 10, 9, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.8, 'high': 350.85, 'low': 348.75, 'close': 350.6, 'trades': 2384, 'volume': 1398806, 'vwap': 350.2, 'lastSize': 9, 'turnover': 48985776655, 'homeNotional': 15228.909498379271, 'foreignNotional': 5333128.513426976}, {'timestamp': datetime.datetime(2020, 10, 9, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.2, 'high': 349.5, 'low': 347.75, 'close': 348.8, 'trades': 3497, 'volume': 2404101, 'vwap': 348.56, 'lastSize': 275, 'turnover': 83797151515, 'homeNotional': 26097.6739470244, 'foreignNotional': 9096592.642241254}] 2020-10-09 12:00:20 INFO: prepare candles [CandleItem(low=350.5, high=351.6, open=350.6, close=351.15, color='GREEN'), CandleItem(low=348.75, high=350.85, open=348.8, close=350.6, color='GREEN'), CandleItem(low=347.75, high=349.5, open=349.2, close=348.8, color='RED')] 2020-10-09 12:00:20 INFO: skip by colors first_candle=CandleItem(low=347.75, high=349.5, open=349.2, close=348.8, color='RED') second_candle=CandleItem(low=348.75, high=350.85, open=348.8, close=350.6, color='GREEN') last_candle=CandleItem(low=350.5, high=351.6, open=350.6, close=351.15, color='GREEN') 2020-10-09 12:00:20 INFO: check need new order None 2020-10-09 12:00:20 INFO: init new order end 2020-10-09 12:00:20 INFO: 2020-10-09 12:00:20 INFO: 2020-10-09 12:00:20 INFO: 2020-10-09 12:00:20 INFO: 2020-10-09 12:02:00 INFO: 2020-10-09 12:02:00 INFO: 2020-10-09 12:02:00 INFO: 2020-10-09 12:02:00 INFO: 2020-10-09 12:02:00 INFO: clearing start 2020-10-09 12:02:00 INFO: clearing end 2020-10-09 12:02:00 INFO: 2020-10-09 12:02:00 INFO: 2020-10-09 12:02:00 INFO: 2020-10-09 12:02:00 INFO: 2020-10-09 13:00:20 INFO: 2020-10-09 13:00:20 INFO: 2020-10-09 13:00:20 INFO: 2020-10-09 13:00:20 INFO: 2020-10-09 13:00:20 INFO: init new order start 2020-10-09 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 9, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.15, 'high': 351.15, 'low': 349.2, 'close': 350.05, 'trades': 2144, 'volume': 1678377, 'vwap': 350.08, 'lastSize': 4304, 'turnover': 58756487150, 'homeNotional': 18264.56516217712, 'foreignNotional': 6394051.844745915}, {'timestamp': datetime.datetime(2020, 10, 9, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.6, 'high': 351.6, 'low': 350.5, 'close': 351.15, 'trades': 1512, 'volume': 1018614, 'vwap': 351.08, 'lastSize': 1, 'turnover': 35760631440, 'homeNotional': 11095.607926513901, 'foreignNotional': 3895352.331218894}, {'timestamp': datetime.datetime(2020, 10, 9, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.8, 'high': 350.85, 'low': 348.75, 'close': 350.6, 'trades': 2384, 'volume': 1398806, 'vwap': 350.2, 'lastSize': 9, 'turnover': 48985776655, 'homeNotional': 15228.909498379271, 'foreignNotional': 5333128.513426976}] 2020-10-09 13:00:20 INFO: prepare candles [CandleItem(low=349.2, high=351.15, open=351.15, close=350.05, color='RED'), CandleItem(low=350.5, high=351.6, open=350.6, close=351.15, color='GREEN'), CandleItem(low=348.75, high=350.85, open=348.8, close=350.6, color='GREEN')] 2020-10-09 13:00:20 INFO: last_candle=CandleItem(low=349.2, high=351.15, open=351.15, close=350.05, color='RED') 2020-10-09 13:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-09 13:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=349.2, high=351.15, open=351.15, close=350.05, color='RED') 2020-10-09 13:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=350.5, high=351.6, open=350.6, close=351.15, color='GREEN') 2020-10-09 13:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=348.75, high=350.85, open=348.8, close=350.6, color='GREEN') 2020-10-09 13:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=349.2, high=351.15, open=351.15, close=350.05, color='RED'), take_profit_factor=6.0, clearing_interval=3600) 2020-10-09 13:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=349.2, high=351.15, open=351.15, close=350.05, color='RED'), take_profit_factor=6.0, clearing_interval=3600) 2020-10-09 13:00:20 INFO: place order: start candle=CandleItem(low=349.2, high=351.15, open=351.15, close=350.05, color='RED') ticker='ETHUSD' price_offset=0.1 2020-10-09 13:00:20 INFO: place order: side_factor=1 init_trigger_price=349.15 init_order_price=349.09999999999997 stop_price_offset=0.0 candle.size=1.9499999999999886 stop_price=351.15 take_price=337.40000000000003 2020-10-09 13:00:20 INFO: place order round: side_factor=1 init_trigger_price=Decimal('349.1499999999999772626324556767940521240234375') init_order_price=Decimal('349.09999999999996589394868351519107818603515625') stop_price_offset=0.0 candle.size=1.9499999999999886 stop_price=Decimal('351.1499999999999772626324556767940521240234375') take_price=Decimal('337.40000000000003410605131648480892181396484375') 2020-10-09 13:00:20 INFO: place order: compute qty=-950 2020-10-09 13:00:20 INFO: place order: save order to db 18c5ccc2969b47a980a7a911c76a6374; response=True 2020-10-09 13:00:20 INFO: post order to exchange resp={'orderID': 'a1a9ec3f-980a-4b82-bd9c-b97dc6c43ea0', 'clOrdID': '18c5ccc2969b47a980a7a911c76a6374', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 950, 'price': 349.1, 'displayQty': None, 'stopPx': 349.15, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 950, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 9, 10, 0, 20, 760000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 9, 10, 0, 20, 760000, tzinfo=tzutc())} 2020-10-09 13:00:20 INFO: place new init order {'qty': -950, 'init_price': Decimal('349.1499999999999772626324556767940521240234375'), 'stop_price': Decimal('351.1499999999999772626324556767940521240234375'), 'take_price': Decimal('337.40000000000003410605131648480892181396484375'), 'order_uid': '18c5ccc2969b47a980a7a911c76a6374', 'response': {'orderID': 'a1a9ec3f-980a-4b82-bd9c-b97dc6c43ea0', 'clOrdID': '18c5ccc2969b47a980a7a911c76a6374', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 950, 'price': 349.1, 'displayQty': None, 'stopPx': 349.15, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 950, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 9, 10, 0, 20, 760000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 9, 10, 0, 20, 760000, tzinfo=tzutc())}} 2020-10-09 13:00:20 INFO: init new order end 2020-10-09 13:00:20 INFO: 2020-10-09 13:00:20 INFO: 2020-10-09 13:00:20 INFO: 2020-10-09 13:00:20 INFO: 2020-10-09 13:00:21 INFO: process event {'orderID': 'a1a9ec3f-980a-4b82-bd9c-b97dc6c43ea0', 'clOrdID': '18c5ccc2969b47a980a7a911c76a6374', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 950, 'price': 349.1, 'displayQty': None, 'stopPx': 349.15, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 950, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-10-09T10:00:20.760Z', 'timestamp': '2020-10-09T10:00:20.760Z'} 2020-10-09 13:00:21 INFO: skip event 18c5ccc2969b47a980a7a911c76a6374 New 2020-10-09 13:02:00 INFO: 2020-10-09 13:02:00 INFO: 2020-10-09 13:02:00 INFO: 2020-10-09 13:02:00 INFO: 2020-10-09 13:02:00 INFO: clearing start 2020-10-09 13:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'a1a9ec3f-980a-4b82-bd9c-b97dc6c43ea0', 'clOrdID': '18c5ccc2969b47a980a7a911c76a6374', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 950, 'price': 349.1, 'displayQty': None, 'stopPx': 349.15, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 950, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 9, 10, 0, 20, 760000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 9, 10, 0, 20, 760000, tzinfo=tzutc())} 2020-10-09 13:02:00 INFO: order time=2020-10-09 10:00:20.760000+00:00; delta from now UTC=0:01:40.179262 time_delta.total_seconds()=100.179262; time_diff_offset='3600' 2020-10-09 13:02:00 INFO: skip by time diff 2020-10-09 10:00:20.760000+00:00 2020-10-09 13:02:00 INFO: clearing end 2020-10-09 13:02:00 INFO: 2020-10-09 13:02:00 INFO: 2020-10-09 13:02:00 INFO: 2020-10-09 13:02:00 INFO: 2020-10-09 14:00:20 INFO: 2020-10-09 14:00:20 INFO: 2020-10-09 14:00:20 INFO: 2020-10-09 14:00:20 INFO: 2020-10-09 14:00:20 INFO: init new order start 2020-10-09 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 9, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.05, 'high': 357.25, 'low': 349.5, 'close': 356.3, 'trades': 7418, 'volume': 5650796, 'vwap': 354.14, 'lastSize': 13, 'turnover': 200113185845, 'homeNotional': 61846.14361151051, 'foreignNotional': 21902180.428381678}, {'timestamp': datetime.datetime(2020, 10, 9, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.15, 'high': 351.15, 'low': 349.2, 'close': 350.05, 'trades': 2144, 'volume': 1678377, 'vwap': 350.08, 'lastSize': 4304, 'turnover': 58756487150, 'homeNotional': 18264.56516217712, 'foreignNotional': 6394051.844745915}, {'timestamp': datetime.datetime(2020, 10, 9, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.6, 'high': 351.6, 'low': 350.5, 'close': 351.15, 'trades': 1512, 'volume': 1018614, 'vwap': 351.08, 'lastSize': 1, 'turnover': 35760631440, 'homeNotional': 11095.607926513901, 'foreignNotional': 3895352.331218894}] 2020-10-09 14:00:20 INFO: prepare candles [CandleItem(low=349.5, high=357.25, open=350.05, close=356.3, color='GREEN'), CandleItem(low=349.2, high=351.15, open=351.15, close=350.05, color='RED'), CandleItem(low=350.5, high=351.6, open=350.6, close=351.15, color='GREEN')] 2020-10-09 14:00:20 INFO: skip by colors first_candle=CandleItem(low=350.5, high=351.6, open=350.6, close=351.15, color='GREEN') second_candle=CandleItem(low=349.2, high=351.15, open=351.15, close=350.05, color='RED') last_candle=CandleItem(low=349.5, high=357.25, open=350.05, close=356.3, color='GREEN') 2020-10-09 14:00:20 INFO: check need new order None 2020-10-09 14:00:20 INFO: init new order end 2020-10-09 14:00:20 INFO: 2020-10-09 14:00:20 INFO: 2020-10-09 14:00:20 INFO: 2020-10-09 14:00:20 INFO: 2020-10-09 14:02:00 INFO: 2020-10-09 14:02:00 INFO: 2020-10-09 14:02:00 INFO: 2020-10-09 14:02:00 INFO: 2020-10-09 14:02:00 INFO: clearing start 2020-10-09 14:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'a1a9ec3f-980a-4b82-bd9c-b97dc6c43ea0', 'clOrdID': '18c5ccc2969b47a980a7a911c76a6374', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 950, 'price': 349.1, 'displayQty': None, 'stopPx': 349.15, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 950, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 9, 10, 0, 20, 760000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 9, 10, 0, 20, 760000, tzinfo=tzutc())} 2020-10-09 14:02:00 INFO: order time=2020-10-09 10:00:20.760000+00:00; delta from now UTC=1:01:39.631091 time_delta.total_seconds()=3699.631091; time_diff_offset='3600' 2020-10-09 14:02:00 INFO: clear order 18c5ccc2969b47a980a7a911c76a6374 2020-10-09 14:02:00 INFO: cancel order resp=[{'orderID': 'a1a9ec3f-980a-4b82-bd9c-b97dc6c43ea0', 'clOrdID': '18c5ccc2969b47a980a7a911c76a6374', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 950, 'price': 349.1, 'displayQty': None, 'stopPx': 349.15, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'Canceled', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 0, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Canceled: cancelled by clearing\nInit order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 9, 10, 0, 20, 760000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 9, 11, 2, 0, 624000, tzinfo=tzutc())}] 2020-10-09 14:02:00 INFO: clearing end 2020-10-09 14:02:00 INFO: 2020-10-09 14:02:00 INFO: 2020-10-09 14:02:00 INFO: 2020-10-09 14:02:00 INFO: 2020-10-09 14:02:00 INFO: process event {'orderID': 'a1a9ec3f-980a-4b82-bd9c-b97dc6c43ea0', 'ordStatus': 'Canceled', 'leavesQty': 0, 'text': 'Canceled: cancelled by clearing\nInit order by supervisor.py', 'timestamp': '2020-10-09T11:02:00.624Z', 'clOrdID': '18c5ccc2969b47a980a7a911c76a6374', 'account': 605536, 'symbol': 'ETHUSD'} 2020-10-09 14:02:00 INFO: skip event 18c5ccc2969b47a980a7a911c76a6374 Canceled 2020-10-09 15:00:20 INFO: 2020-10-09 15:00:20 INFO: 2020-10-09 15:00:20 INFO: 2020-10-09 15:00:20 INFO: 2020-10-09 15:00:20 INFO: init new order start 2020-10-09 15:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 9, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.3, 'high': 361.95, 'low': 356.35, 'close': 359.0, 'trades': 7247, 'volume': 6603901, 'vwap': 359.49, 'lastSize': 222, 'turnover': 237402803425, 'homeNotional': 72986.62305825345, 'foreignNotional': 26238030.333621018}, {'timestamp': datetime.datetime(2020, 10, 9, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.05, 'high': 357.25, 'low': 349.5, 'close': 356.3, 'trades': 7418, 'volume': 5650796, 'vwap': 354.14, 'lastSize': 13, 'turnover': 200113185845, 'homeNotional': 61846.14361151051, 'foreignNotional': 21902180.428381678}, {'timestamp': datetime.datetime(2020, 10, 9, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.15, 'high': 351.15, 'low': 349.2, 'close': 350.05, 'trades': 2144, 'volume': 1678377, 'vwap': 350.08, 'lastSize': 4304, 'turnover': 58756487150, 'homeNotional': 18264.56516217712, 'foreignNotional': 6394051.844745915}] 2020-10-09 15:00:21 INFO: prepare candles [CandleItem(low=356.35, high=361.95, open=356.3, close=359.0, color='GREEN'), CandleItem(low=349.5, high=357.25, open=350.05, close=356.3, color='GREEN'), CandleItem(low=349.2, high=351.15, open=351.15, close=350.05, color='RED')] 2020-10-09 15:00:21 INFO: skip by colors first_candle=CandleItem(low=349.2, high=351.15, open=351.15, close=350.05, color='RED') second_candle=CandleItem(low=349.5, high=357.25, open=350.05, close=356.3, color='GREEN') last_candle=CandleItem(low=356.35, high=361.95, open=356.3, close=359.0, color='GREEN') 2020-10-09 15:00:21 INFO: check need new order None 2020-10-09 15:00:21 INFO: init new order end 2020-10-09 15:00:21 INFO: 2020-10-09 15:00:21 INFO: 2020-10-09 15:00:21 INFO: 2020-10-09 15:00:21 INFO: 2020-10-09 15:02:00 INFO: 2020-10-09 15:02:00 INFO: 2020-10-09 15:02:00 INFO: 2020-10-09 15:02:00 INFO: 2020-10-09 15:02:00 INFO: clearing start 2020-10-09 15:02:00 INFO: clearing end 2020-10-09 15:02:00 INFO: 2020-10-09 15:02:00 INFO: 2020-10-09 15:02:00 INFO: 2020-10-09 15:02:00 INFO: 2020-10-09 16:00:20 INFO: 2020-10-09 16:00:20 INFO: 2020-10-09 16:00:20 INFO: 2020-10-09 16:00:20 INFO: 2020-10-09 16:00:20 INFO: init new order start 2020-10-09 16:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 9, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 359.0, 'high': 361.25, 'low': 358.8, 'close': 359.65, 'trades': 3403, 'volume': 2880963, 'vwap': 359.82, 'lastSize': 40, 'turnover': 103660741880, 'homeNotional': 31871.893521354497, 'foreignNotional': 11467925.702689636}, {'timestamp': datetime.datetime(2020, 10, 9, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.3, 'high': 361.95, 'low': 356.35, 'close': 359.0, 'trades': 7247, 'volume': 6603901, 'vwap': 359.49, 'lastSize': 222, 'turnover': 237402803425, 'homeNotional': 72986.62305825345, 'foreignNotional': 26238030.333621018}, {'timestamp': datetime.datetime(2020, 10, 9, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.05, 'high': 357.25, 'low': 349.5, 'close': 356.3, 'trades': 7418, 'volume': 5650796, 'vwap': 354.14, 'lastSize': 13, 'turnover': 200113185845, 'homeNotional': 61846.14361151051, 'foreignNotional': 21902180.428381678}] 2020-10-09 16:00:20 INFO: prepare candles [CandleItem(low=358.8, high=361.25, open=359.0, close=359.65, color='GREEN'), CandleItem(low=356.35, high=361.95, open=356.3, close=359.0, color='GREEN'), CandleItem(low=349.5, high=357.25, open=350.05, close=356.3, color='GREEN')] 2020-10-09 16:00:20 INFO: skip by colors first_candle=CandleItem(low=349.5, high=357.25, open=350.05, close=356.3, color='GREEN') second_candle=CandleItem(low=356.35, high=361.95, open=356.3, close=359.0, color='GREEN') last_candle=CandleItem(low=358.8, high=361.25, open=359.0, close=359.65, color='GREEN') 2020-10-09 16:00:20 INFO: check need new order None 2020-10-09 16:00:20 INFO: init new order end 2020-10-09 16:00:20 INFO: 2020-10-09 16:00:20 INFO: 2020-10-09 16:00:20 INFO: 2020-10-09 16:00:20 INFO: 2020-10-09 16:02:00 INFO: 2020-10-09 16:02:00 INFO: 2020-10-09 16:02:00 INFO: 2020-10-09 16:02:00 INFO: 2020-10-09 16:02:00 INFO: clearing start 2020-10-09 16:02:00 INFO: clearing end 2020-10-09 16:02:00 INFO: 2020-10-09 16:02:00 INFO: 2020-10-09 16:02:00 INFO: 2020-10-09 16:02:00 INFO: 2020-10-09 17:00:20 INFO: 2020-10-09 17:00:20 INFO: 2020-10-09 17:00:20 INFO: 2020-10-09 17:00:20 INFO: 2020-10-09 17:00:20 INFO: init new order start 2020-10-09 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 9, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 359.65, 'high': 360.75, 'low': 359.2, 'close': 360.2, 'trades': 2308, 'volume': 1799194, 'vwap': 360.03, 'lastSize': 1, 'turnover': 64775380000, 'homeNotional': 19928.136526885428, 'foreignNotional': 7174620.360828601}, {'timestamp': datetime.datetime(2020, 10, 9, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 359.0, 'high': 361.25, 'low': 358.8, 'close': 359.65, 'trades': 3403, 'volume': 2880963, 'vwap': 359.82, 'lastSize': 40, 'turnover': 103660741880, 'homeNotional': 31871.893521354497, 'foreignNotional': 11467925.702689636}, {'timestamp': datetime.datetime(2020, 10, 9, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.3, 'high': 361.95, 'low': 356.35, 'close': 359.0, 'trades': 7247, 'volume': 6603901, 'vwap': 359.49, 'lastSize': 222, 'turnover': 237402803425, 'homeNotional': 72986.62305825345, 'foreignNotional': 26238030.333621018}] 2020-10-09 17:00:20 INFO: prepare candles [CandleItem(low=359.2, high=360.75, open=359.65, close=360.2, color='GREEN'), CandleItem(low=358.8, high=361.25, open=359.0, close=359.65, color='GREEN'), CandleItem(low=356.35, high=361.95, open=356.3, close=359.0, color='GREEN')] 2020-10-09 17:00:20 INFO: skip by colors first_candle=CandleItem(low=356.35, high=361.95, open=356.3, close=359.0, color='GREEN') second_candle=CandleItem(low=358.8, high=361.25, open=359.0, close=359.65, color='GREEN') last_candle=CandleItem(low=359.2, high=360.75, open=359.65, close=360.2, color='GREEN') 2020-10-09 17:00:20 INFO: check need new order None 2020-10-09 17:00:20 INFO: init new order end 2020-10-09 17:00:20 INFO: 2020-10-09 17:00:20 INFO: 2020-10-09 17:00:20 INFO: 2020-10-09 17:00:20 INFO: 2020-10-09 17:02:00 INFO: 2020-10-09 17:02:00 INFO: 2020-10-09 17:02:00 INFO: 2020-10-09 17:02:00 INFO: 2020-10-09 17:02:00 INFO: clearing start 2020-10-09 17:02:00 INFO: clearing end 2020-10-09 17:02:00 INFO: 2020-10-09 17:02:00 INFO: 2020-10-09 17:02:00 INFO: 2020-10-09 17:02:00 INFO: 2020-10-09 18:00:20 INFO: 2020-10-09 18:00:20 INFO: 2020-10-09 18:00:20 INFO: 2020-10-09 18:00:20 INFO: 2020-10-09 18:00:20 INFO: init new order start 2020-10-09 18:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 9, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 360.2, 'high': 361.85, 'low': 359.4, 'close': 361.25, 'trades': 2662, 'volume': 1787643, 'vwap': 360.47, 'lastSize': 20, 'turnover': 64438541660, 'homeNotional': 19794.093479968993, 'foreignNotional': 7135113.225406008}, {'timestamp': datetime.datetime(2020, 10, 9, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 359.65, 'high': 360.75, 'low': 359.2, 'close': 360.2, 'trades': 2308, 'volume': 1799194, 'vwap': 360.03, 'lastSize': 1, 'turnover': 64775380000, 'homeNotional': 19928.136526885428, 'foreignNotional': 7174620.360828601}, {'timestamp': datetime.datetime(2020, 10, 9, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 359.0, 'high': 361.25, 'low': 358.8, 'close': 359.65, 'trades': 3403, 'volume': 2880963, 'vwap': 359.82, 'lastSize': 40, 'turnover': 103660741880, 'homeNotional': 31871.893521354497, 'foreignNotional': 11467925.702689636}] 2020-10-09 18:00:20 INFO: prepare candles [CandleItem(low=359.4, high=361.85, open=360.2, close=361.25, color='GREEN'), CandleItem(low=359.2, high=360.75, open=359.65, close=360.2, color='GREEN'), CandleItem(low=358.8, high=361.25, open=359.0, close=359.65, color='GREEN')] 2020-10-09 18:00:20 INFO: skip by colors first_candle=CandleItem(low=358.8, high=361.25, open=359.0, close=359.65, color='GREEN') second_candle=CandleItem(low=359.2, high=360.75, open=359.65, close=360.2, color='GREEN') last_candle=CandleItem(low=359.4, high=361.85, open=360.2, close=361.25, color='GREEN') 2020-10-09 18:00:20 INFO: check need new order None 2020-10-09 18:00:20 INFO: init new order end 2020-10-09 18:00:20 INFO: 2020-10-09 18:00:20 INFO: 2020-10-09 18:00:20 INFO: 2020-10-09 18:00:20 INFO: 2020-10-09 18:02:00 INFO: 2020-10-09 18:02:00 INFO: 2020-10-09 18:02:00 INFO: 2020-10-09 18:02:00 INFO: 2020-10-09 18:02:00 INFO: clearing start 2020-10-09 18:02:01 INFO: clearing end 2020-10-09 18:02:01 INFO: 2020-10-09 18:02:01 INFO: 2020-10-09 18:02:01 INFO: 2020-10-09 18:02:01 INFO: 2020-10-09 19:00:20 INFO: 2020-10-09 19:00:20 INFO: 2020-10-09 19:00:20 INFO: 2020-10-09 19:00:20 INFO: 2020-10-09 19:00:20 INFO: init new order start 2020-10-09 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 9, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 361.25, 'high': 366.5, 'low': 360.3, 'close': 365.95, 'trades': 5226, 'volume': 4261836, 'vwap': 363.85, 'lastSize': 289, 'turnover': 155063654150, 'homeNotional': 47214.81089001504, 'foreignNotional': 17178822.650368746}, {'timestamp': datetime.datetime(2020, 10, 9, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 360.2, 'high': 361.85, 'low': 359.4, 'close': 361.25, 'trades': 2662, 'volume': 1787643, 'vwap': 360.47, 'lastSize': 20, 'turnover': 64438541660, 'homeNotional': 19794.093479968993, 'foreignNotional': 7135113.225406008}, {'timestamp': datetime.datetime(2020, 10, 9, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 359.65, 'high': 360.75, 'low': 359.2, 'close': 360.2, 'trades': 2308, 'volume': 1799194, 'vwap': 360.03, 'lastSize': 1, 'turnover': 64775380000, 'homeNotional': 19928.136526885428, 'foreignNotional': 7174620.360828601}] 2020-10-09 19:00:20 INFO: prepare candles [CandleItem(low=360.3, high=366.5, open=361.25, close=365.95, color='GREEN'), CandleItem(low=359.4, high=361.85, open=360.2, close=361.25, color='GREEN'), CandleItem(low=359.2, high=360.75, open=359.65, close=360.2, color='GREEN')] 2020-10-09 19:00:20 INFO: skip by colors first_candle=CandleItem(low=359.2, high=360.75, open=359.65, close=360.2, color='GREEN') second_candle=CandleItem(low=359.4, high=361.85, open=360.2, close=361.25, color='GREEN') last_candle=CandleItem(low=360.3, high=366.5, open=361.25, close=365.95, color='GREEN') 2020-10-09 19:00:20 INFO: check need new order None 2020-10-09 19:00:20 INFO: init new order end 2020-10-09 19:00:20 INFO: 2020-10-09 19:00:20 INFO: 2020-10-09 19:00:20 INFO: 2020-10-09 19:00:20 INFO: 2020-10-09 19:02:00 INFO: 2020-10-09 19:02:00 INFO: 2020-10-09 19:02:00 INFO: 2020-10-09 19:02:00 INFO: 2020-10-09 19:02:00 INFO: clearing start 2020-10-09 19:02:00 INFO: clearing end 2020-10-09 19:02:00 INFO: 2020-10-09 19:02:00 INFO: 2020-10-09 19:02:00 INFO: 2020-10-09 19:02:00 INFO: 2020-10-09 20:00:20 INFO: 2020-10-09 20:00:20 INFO: 2020-10-09 20:00:20 INFO: 2020-10-09 20:00:20 INFO: 2020-10-09 20:00:20 INFO: init new order start 2020-10-09 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 9, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.95, 'high': 367.0, 'low': 364.0, 'close': 364.45, 'trades': 4256, 'volume': 3609576, 'vwap': 365.36, 'lastSize': 1, 'turnover': 131878123040, 'homeNotional': 39975.827502482076, 'foreignNotional': 14605472.690388132}, {'timestamp': datetime.datetime(2020, 10, 9, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 361.25, 'high': 366.5, 'low': 360.3, 'close': 365.95, 'trades': 5226, 'volume': 4261836, 'vwap': 363.85, 'lastSize': 289, 'turnover': 155063654150, 'homeNotional': 47214.81089001504, 'foreignNotional': 17178822.650368746}, {'timestamp': datetime.datetime(2020, 10, 9, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 360.2, 'high': 361.85, 'low': 359.4, 'close': 361.25, 'trades': 2662, 'volume': 1787643, 'vwap': 360.47, 'lastSize': 20, 'turnover': 64438541660, 'homeNotional': 19794.093479968993, 'foreignNotional': 7135113.225406008}] 2020-10-09 20:00:20 INFO: prepare candles [CandleItem(low=364.0, high=367.0, open=365.95, close=364.45, color='RED'), CandleItem(low=360.3, high=366.5, open=361.25, close=365.95, color='GREEN'), CandleItem(low=359.4, high=361.85, open=360.2, close=361.25, color='GREEN')] 2020-10-09 20:00:20 INFO: last_candle=CandleItem(low=364.0, high=367.0, open=365.95, close=364.45, color='RED') 2020-10-09 20:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-09 20:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=364.0, high=367.0, open=365.95, close=364.45, color='RED') 2020-10-09 20:00:20 INFO: skip by CandleItem(low=364.0, high=367.0, open=365.95, close=364.45, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-09 20:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-09 20:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=364.0, high=367.0, open=365.95, close=364.45, color='RED') 2020-10-09 20:00:20 INFO: skip by CandleItem(low=364.0, high=367.0, open=365.95, close=364.45, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-09 20:00:20 INFO: not found applicable config for candle 2020-10-09 20:00:20 INFO: check need new order None 2020-10-09 20:00:20 INFO: init new order end 2020-10-09 20:00:20 INFO: 2020-10-09 20:00:20 INFO: 2020-10-09 20:00:20 INFO: 2020-10-09 20:00:20 INFO: 2020-10-09 20:02:00 INFO: 2020-10-09 20:02:00 INFO: 2020-10-09 20:02:00 INFO: 2020-10-09 20:02:00 INFO: 2020-10-09 20:02:00 INFO: clearing start 2020-10-09 20:02:00 INFO: clearing end 2020-10-09 20:02:00 INFO: 2020-10-09 20:02:00 INFO: 2020-10-09 20:02:00 INFO: 2020-10-09 20:02:00 INFO: 2020-10-09 21:00:20 INFO: 2020-10-09 21:00:20 INFO: 2020-10-09 21:00:20 INFO: 2020-10-09 21:00:20 INFO: 2020-10-09 21:00:20 INFO: init new order start 2020-10-09 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 9, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.45, 'high': 365.2, 'low': 364.3, 'close': 364.9, 'trades': 1724, 'volume': 1067923, 'vwap': 364.66, 'lastSize': 10, 'turnover': 38942016100, 'homeNotional': 11812.040423904524, 'foreignNotional': 4307284.118302719}, {'timestamp': datetime.datetime(2020, 10, 9, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.95, 'high': 367.0, 'low': 364.0, 'close': 364.45, 'trades': 4256, 'volume': 3609576, 'vwap': 365.36, 'lastSize': 1, 'turnover': 131878123040, 'homeNotional': 39975.827502482076, 'foreignNotional': 14605472.690388132}, {'timestamp': datetime.datetime(2020, 10, 9, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 361.25, 'high': 366.5, 'low': 360.3, 'close': 365.95, 'trades': 5226, 'volume': 4261836, 'vwap': 363.85, 'lastSize': 289, 'turnover': 155063654150, 'homeNotional': 47214.81089001504, 'foreignNotional': 17178822.650368746}] 2020-10-09 21:00:20 INFO: prepare candles [CandleItem(low=364.3, high=365.2, open=364.45, close=364.9, color='GREEN'), CandleItem(low=364.0, high=367.0, open=365.95, close=364.45, color='RED'), CandleItem(low=360.3, high=366.5, open=361.25, close=365.95, color='GREEN')] 2020-10-09 21:00:20 INFO: skip by colors first_candle=CandleItem(low=360.3, high=366.5, open=361.25, close=365.95, color='GREEN') second_candle=CandleItem(low=364.0, high=367.0, open=365.95, close=364.45, color='RED') last_candle=CandleItem(low=364.3, high=365.2, open=364.45, close=364.9, color='GREEN') 2020-10-09 21:00:20 INFO: check need new order None 2020-10-09 21:00:20 INFO: init new order end 2020-10-09 21:00:20 INFO: 2020-10-09 21:00:20 INFO: 2020-10-09 21:00:20 INFO: 2020-10-09 21:00:20 INFO: 2020-10-09 21:02:00 INFO: 2020-10-09 21:02:00 INFO: 2020-10-09 21:02:00 INFO: 2020-10-09 21:02:00 INFO: 2020-10-09 21:02:00 INFO: clearing start 2020-10-09 21:02:01 INFO: clearing end 2020-10-09 21:02:01 INFO: 2020-10-09 21:02:01 INFO: 2020-10-09 21:02:01 INFO: 2020-10-09 21:02:01 INFO: 2020-10-09 22:00:20 INFO: 2020-10-09 22:00:20 INFO: 2020-10-09 22:00:20 INFO: 2020-10-09 22:00:20 INFO: 2020-10-09 22:00:20 INFO: init new order start 2020-10-09 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 9, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.9, 'high': 365.3, 'low': 362.45, 'close': 363.55, 'trades': 2516, 'volume': 1554526, 'vwap': 363.55, 'lastSize': 125, 'turnover': 56514064700, 'homeNotional': 17179.519490505685, 'foreignNotional': 6245538.987285703}, {'timestamp': datetime.datetime(2020, 10, 9, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.45, 'high': 365.2, 'low': 364.3, 'close': 364.9, 'trades': 1724, 'volume': 1067923, 'vwap': 364.66, 'lastSize': 10, 'turnover': 38942016100, 'homeNotional': 11812.040423904524, 'foreignNotional': 4307284.118302719}, {'timestamp': datetime.datetime(2020, 10, 9, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.95, 'high': 367.0, 'low': 364.0, 'close': 364.45, 'trades': 4256, 'volume': 3609576, 'vwap': 365.36, 'lastSize': 1, 'turnover': 131878123040, 'homeNotional': 39975.827502482076, 'foreignNotional': 14605472.690388132}] 2020-10-09 22:00:20 INFO: prepare candles [CandleItem(low=362.45, high=365.3, open=364.9, close=363.55, color='RED'), CandleItem(low=364.3, high=365.2, open=364.45, close=364.9, color='GREEN'), CandleItem(low=364.0, high=367.0, open=365.95, close=364.45, color='RED')] 2020-10-09 22:00:20 INFO: skip by colors first_candle=CandleItem(low=364.0, high=367.0, open=365.95, close=364.45, color='RED') second_candle=CandleItem(low=364.3, high=365.2, open=364.45, close=364.9, color='GREEN') last_candle=CandleItem(low=362.45, high=365.3, open=364.9, close=363.55, color='RED') 2020-10-09 22:00:20 INFO: check need new order None 2020-10-09 22:00:20 INFO: init new order end 2020-10-09 22:00:20 INFO: 2020-10-09 22:00:20 INFO: 2020-10-09 22:00:20 INFO: 2020-10-09 22:00:20 INFO: 2020-10-09 22:02:00 INFO: 2020-10-09 22:02:00 INFO: 2020-10-09 22:02:00 INFO: 2020-10-09 22:02:00 INFO: 2020-10-09 22:02:00 INFO: clearing start 2020-10-09 22:02:00 INFO: clearing end 2020-10-09 22:02:00 INFO: 2020-10-09 22:02:00 INFO: 2020-10-09 22:02:00 INFO: 2020-10-09 22:02:00 INFO: 2020-10-09 23:00:20 INFO: 2020-10-09 23:00:20 INFO: 2020-10-09 23:00:20 INFO: 2020-10-09 23:00:20 INFO: 2020-10-09 23:00:20 INFO: init new order start 2020-10-09 23:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 9, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.55, 'high': 364.65, 'low': 362.55, 'close': 363.5, 'trades': 2317, 'volume': 1419556, 'vwap': 363.54, 'lastSize': 5200, 'turnover': 51605530165, 'homeNotional': 15674.053206504583, 'foreignNotional': 5698038.379112621}, {'timestamp': datetime.datetime(2020, 10, 9, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.9, 'high': 365.3, 'low': 362.45, 'close': 363.55, 'trades': 2516, 'volume': 1554526, 'vwap': 363.55, 'lastSize': 125, 'turnover': 56514064700, 'homeNotional': 17179.519490505685, 'foreignNotional': 6245538.987285703}, {'timestamp': datetime.datetime(2020, 10, 9, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.45, 'high': 365.2, 'low': 364.3, 'close': 364.9, 'trades': 1724, 'volume': 1067923, 'vwap': 364.66, 'lastSize': 10, 'turnover': 38942016100, 'homeNotional': 11812.040423904524, 'foreignNotional': 4307284.118302719}] 2020-10-09 23:00:20 INFO: prepare candles [CandleItem(low=362.55, high=364.65, open=363.55, close=363.5, color='RED'), CandleItem(low=362.45, high=365.3, open=364.9, close=363.55, color='RED'), CandleItem(low=364.3, high=365.2, open=364.45, close=364.9, color='GREEN')] 2020-10-09 23:00:20 INFO: skip by colors first_candle=CandleItem(low=364.3, high=365.2, open=364.45, close=364.9, color='GREEN') second_candle=CandleItem(low=362.45, high=365.3, open=364.9, close=363.55, color='RED') last_candle=CandleItem(low=362.55, high=364.65, open=363.55, close=363.5, color='RED') 2020-10-09 23:00:20 INFO: check need new order None 2020-10-09 23:00:20 INFO: init new order end 2020-10-09 23:00:20 INFO: 2020-10-09 23:00:20 INFO: 2020-10-09 23:00:20 INFO: 2020-10-09 23:00:20 INFO: 2020-10-09 23:02:00 INFO: 2020-10-09 23:02:00 INFO: 2020-10-09 23:02:00 INFO: 2020-10-09 23:02:00 INFO: 2020-10-09 23:02:00 INFO: clearing start 2020-10-09 23:02:00 INFO: clearing end 2020-10-09 23:02:00 INFO: 2020-10-09 23:02:00 INFO: 2020-10-09 23:02:00 INFO: 2020-10-09 23:02:00 INFO: 2020-10-10 00:00:20 INFO: 2020-10-10 00:00:20 INFO: 2020-10-10 00:00:20 INFO: 2020-10-10 00:00:20 INFO: 2020-10-10 00:00:20 INFO: init new order start 2020-10-10 00:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 9, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.5, 'high': 364.85, 'low': 363.5, 'close': 364.25, 'trades': 2451, 'volume': 1029569, 'vwap': 364.21, 'lastSize': 774, 'turnover': 37497345240, 'homeNotional': 11376.702344041643, 'foreignNotional': 4143445.1612326177}, {'timestamp': datetime.datetime(2020, 10, 9, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.55, 'high': 364.65, 'low': 362.55, 'close': 363.5, 'trades': 2317, 'volume': 1419556, 'vwap': 363.54, 'lastSize': 5200, 'turnover': 51605530165, 'homeNotional': 15674.053206504583, 'foreignNotional': 5698038.379112621}, {'timestamp': datetime.datetime(2020, 10, 9, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.9, 'high': 365.3, 'low': 362.45, 'close': 363.55, 'trades': 2516, 'volume': 1554526, 'vwap': 363.55, 'lastSize': 125, 'turnover': 56514064700, 'homeNotional': 17179.519490505685, 'foreignNotional': 6245538.987285703}] 2020-10-10 00:00:21 INFO: prepare candles [CandleItem(low=363.5, high=364.85, open=363.5, close=364.25, color='GREEN'), CandleItem(low=362.55, high=364.65, open=363.55, close=363.5, color='RED'), CandleItem(low=362.45, high=365.3, open=364.9, close=363.55, color='RED')] 2020-10-10 00:00:21 INFO: last_candle=CandleItem(low=363.5, high=364.85, open=363.5, close=364.25, color='GREEN') 2020-10-10 00:00:21 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-10 00:00:21 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=363.5, high=364.85, open=363.5, close=364.25, color='GREEN') 2020-10-10 00:00:21 INFO: skip by CandleItem(low=363.5, high=364.85, open=363.5, close=364.25, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-10 00:00:21 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-10 00:00:21 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=363.5, high=364.85, open=363.5, close=364.25, color='GREEN') 2020-10-10 00:00:21 INFO: skip by CandleItem(low=363.5, high=364.85, open=363.5, close=364.25, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-10 00:00:21 INFO: not found applicable config for candle 2020-10-10 00:00:21 INFO: check need new order None 2020-10-10 00:00:21 INFO: init new order end 2020-10-10 00:00:21 INFO: 2020-10-10 00:00:21 INFO: 2020-10-10 00:00:21 INFO: 2020-10-10 00:00:21 INFO: 2020-10-10 00:02:00 INFO: 2020-10-10 00:02:00 INFO: 2020-10-10 00:02:00 INFO: 2020-10-10 00:02:00 INFO: 2020-10-10 00:02:00 INFO: clearing start 2020-10-10 00:02:00 INFO: clearing end 2020-10-10 00:02:00 INFO: 2020-10-10 00:02:00 INFO: 2020-10-10 00:02:00 INFO: 2020-10-10 00:02:00 INFO: 2020-10-10 01:00:20 INFO: 2020-10-10 01:00:20 INFO: 2020-10-10 01:00:20 INFO: 2020-10-10 01:00:20 INFO: 2020-10-10 01:00:20 INFO: init new order start 2020-10-10 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 9, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.25, 'high': 364.9, 'low': 363.05, 'close': 364.85, 'trades': 1085, 'volume': 665955, 'vwap': 363.99, 'lastSize': 2500, 'turnover': 24239548905, 'homeNotional': 7353.5519238344195, 'foreignNotional': 2676561.038480852}, {'timestamp': datetime.datetime(2020, 10, 9, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.5, 'high': 364.85, 'low': 363.5, 'close': 364.25, 'trades': 2451, 'volume': 1029569, 'vwap': 364.21, 'lastSize': 774, 'turnover': 37497345240, 'homeNotional': 11376.702344041643, 'foreignNotional': 4143445.1612326177}, {'timestamp': datetime.datetime(2020, 10, 9, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.55, 'high': 364.65, 'low': 362.55, 'close': 363.5, 'trades': 2317, 'volume': 1419556, 'vwap': 363.54, 'lastSize': 5200, 'turnover': 51605530165, 'homeNotional': 15674.053206504583, 'foreignNotional': 5698038.379112621}] 2020-10-10 01:00:20 INFO: prepare candles [CandleItem(low=363.05, high=364.9, open=364.25, close=364.85, color='GREEN'), CandleItem(low=363.5, high=364.85, open=363.5, close=364.25, color='GREEN'), CandleItem(low=362.55, high=364.65, open=363.55, close=363.5, color='RED')] 2020-10-10 01:00:20 INFO: skip by colors first_candle=CandleItem(low=362.55, high=364.65, open=363.55, close=363.5, color='RED') second_candle=CandleItem(low=363.5, high=364.85, open=363.5, close=364.25, color='GREEN') last_candle=CandleItem(low=363.05, high=364.9, open=364.25, close=364.85, color='GREEN') 2020-10-10 01:00:20 INFO: check need new order None 2020-10-10 01:00:20 INFO: init new order end 2020-10-10 01:00:20 INFO: 2020-10-10 01:00:20 INFO: 2020-10-10 01:00:20 INFO: 2020-10-10 01:00:20 INFO: 2020-10-10 01:02:00 INFO: 2020-10-10 01:02:00 INFO: 2020-10-10 01:02:00 INFO: 2020-10-10 01:02:00 INFO: 2020-10-10 01:02:00 INFO: clearing start 2020-10-10 01:02:00 INFO: clearing end 2020-10-10 01:02:00 INFO: 2020-10-10 01:02:00 INFO: 2020-10-10 01:02:00 INFO: 2020-10-10 01:02:00 INFO: 2020-10-10 01:37:23 ERROR: Error : Connection is already closed. 2020-10-10 01:37:23 ERROR: error from callback >: Connection is already closed. 2020-10-10 01:37:23 INFO: Websocket Closed 2020-10-10 01:37:24 WARNING: reconnect to socket 2020-10-10 01:37:24 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-10-10 01:37:24 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-10-10 01:37:24 INFO: Authenticating with API Key. 2020-10-10 01:37:25 INFO: Connected to WS. 2020-10-10 02:00:20 INFO: 2020-10-10 02:00:20 INFO: 2020-10-10 02:00:20 INFO: 2020-10-10 02:00:20 INFO: 2020-10-10 02:00:20 INFO: init new order start 2020-10-10 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 9, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.85, 'high': 365.95, 'low': 364.6, 'close': 365.95, 'trades': 1693, 'volume': 1053818, 'vwap': 365.25, 'lastSize': 10, 'turnover': 38490201225, 'homeNotional': 11652.660095990954, 'foreignNotional': 4256079.762889717}, {'timestamp': datetime.datetime(2020, 10, 9, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.25, 'high': 364.9, 'low': 363.05, 'close': 364.85, 'trades': 1085, 'volume': 665955, 'vwap': 363.99, 'lastSize': 2500, 'turnover': 24239548905, 'homeNotional': 7353.5519238344195, 'foreignNotional': 2676561.038480852}, {'timestamp': datetime.datetime(2020, 10, 9, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.5, 'high': 364.85, 'low': 363.5, 'close': 364.25, 'trades': 2451, 'volume': 1029569, 'vwap': 364.21, 'lastSize': 774, 'turnover': 37497345240, 'homeNotional': 11376.702344041643, 'foreignNotional': 4143445.1612326177}] 2020-10-10 02:00:20 INFO: prepare candles [CandleItem(low=364.6, high=365.95, open=364.85, close=365.95, color='GREEN'), CandleItem(low=363.05, high=364.9, open=364.25, close=364.85, color='GREEN'), CandleItem(low=363.5, high=364.85, open=363.5, close=364.25, color='GREEN')] 2020-10-10 02:00:20 INFO: skip by colors first_candle=CandleItem(low=363.5, high=364.85, open=363.5, close=364.25, color='GREEN') second_candle=CandleItem(low=363.05, high=364.9, open=364.25, close=364.85, color='GREEN') last_candle=CandleItem(low=364.6, high=365.95, open=364.85, close=365.95, color='GREEN') 2020-10-10 02:00:20 INFO: check need new order None 2020-10-10 02:00:20 INFO: init new order end 2020-10-10 02:00:20 INFO: 2020-10-10 02:00:20 INFO: 2020-10-10 02:00:20 INFO: 2020-10-10 02:00:20 INFO: 2020-10-10 02:02:00 INFO: 2020-10-10 02:02:00 INFO: 2020-10-10 02:02:00 INFO: 2020-10-10 02:02:00 INFO: 2020-10-10 02:02:00 INFO: clearing start 2020-10-10 02:02:00 INFO: clearing end 2020-10-10 02:02:00 INFO: 2020-10-10 02:02:00 INFO: 2020-10-10 02:02:00 INFO: 2020-10-10 02:02:00 INFO: 2020-10-10 03:00:20 INFO: 2020-10-10 03:00:20 INFO: 2020-10-10 03:00:20 INFO: 2020-10-10 03:00:20 INFO: 2020-10-10 03:00:20 INFO: init new order start 2020-10-10 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 10, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.95, 'high': 369.1, 'low': 365.6, 'close': 365.65, 'trades': 4144, 'volume': 2604938, 'vwap': 367.27, 'lastSize': 600, 'turnover': 95670076080, 'homeNotional': 28866.801299502524, 'foreignNotional': 10601764.149680533}, {'timestamp': datetime.datetime(2020, 10, 9, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.85, 'high': 365.95, 'low': 364.6, 'close': 365.95, 'trades': 1693, 'volume': 1053818, 'vwap': 365.25, 'lastSize': 10, 'turnover': 38490201225, 'homeNotional': 11652.660095990954, 'foreignNotional': 4256079.762889717}, {'timestamp': datetime.datetime(2020, 10, 9, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.25, 'high': 364.9, 'low': 363.05, 'close': 364.85, 'trades': 1085, 'volume': 665955, 'vwap': 363.99, 'lastSize': 2500, 'turnover': 24239548905, 'homeNotional': 7353.5519238344195, 'foreignNotional': 2676561.038480852}] 2020-10-10 03:00:20 INFO: prepare candles [CandleItem(low=365.6, high=369.1, open=365.95, close=365.65, color='RED'), CandleItem(low=364.6, high=365.95, open=364.85, close=365.95, color='GREEN'), CandleItem(low=363.05, high=364.9, open=364.25, close=364.85, color='GREEN')] 2020-10-10 03:00:20 INFO: last_candle=CandleItem(low=365.6, high=369.1, open=365.95, close=365.65, color='RED') 2020-10-10 03:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-10 03:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=365.6, high=369.1, open=365.95, close=365.65, color='RED') 2020-10-10 03:00:20 INFO: skip by CandleItem(low=365.6, high=369.1, open=365.95, close=365.65, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-10 03:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-10 03:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=365.6, high=369.1, open=365.95, close=365.65, color='RED') 2020-10-10 03:00:20 INFO: skip by CandleItem(low=365.6, high=369.1, open=365.95, close=365.65, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-10 03:00:20 INFO: not found applicable config for candle 2020-10-10 03:00:20 INFO: check need new order None 2020-10-10 03:00:20 INFO: init new order end 2020-10-10 03:00:20 INFO: 2020-10-10 03:00:20 INFO: 2020-10-10 03:00:20 INFO: 2020-10-10 03:00:20 INFO: 2020-10-10 03:02:00 INFO: 2020-10-10 03:02:00 INFO: 2020-10-10 03:02:00 INFO: 2020-10-10 03:02:00 INFO: 2020-10-10 03:02:00 INFO: clearing start 2020-10-10 03:02:00 INFO: clearing end 2020-10-10 03:02:00 INFO: 2020-10-10 03:02:00 INFO: 2020-10-10 03:02:00 INFO: 2020-10-10 03:02:00 INFO: 2020-10-10 04:00:20 INFO: 2020-10-10 04:00:20 INFO: 2020-10-10 04:00:20 INFO: 2020-10-10 04:00:20 INFO: 2020-10-10 04:00:20 INFO: init new order start 2020-10-10 04:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 10, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.65, 'high': 368.45, 'low': 365.55, 'close': 367.75, 'trades': 2692, 'volume': 1660491, 'vwap': 367.15, 'lastSize': 1, 'turnover': 60963808400, 'homeNotional': 18401.077350657226, 'foreignNotional': 6755846.081655956}, {'timestamp': datetime.datetime(2020, 10, 10, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.95, 'high': 369.1, 'low': 365.6, 'close': 365.65, 'trades': 4144, 'volume': 2604938, 'vwap': 367.27, 'lastSize': 600, 'turnover': 95670076080, 'homeNotional': 28866.801299502524, 'foreignNotional': 10601764.149680533}, {'timestamp': datetime.datetime(2020, 10, 9, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.85, 'high': 365.95, 'low': 364.6, 'close': 365.95, 'trades': 1693, 'volume': 1053818, 'vwap': 365.25, 'lastSize': 10, 'turnover': 38490201225, 'homeNotional': 11652.660095990954, 'foreignNotional': 4256079.762889717}] 2020-10-10 04:00:20 INFO: prepare candles [CandleItem(low=365.55, high=368.45, open=365.65, close=367.75, color='GREEN'), CandleItem(low=365.6, high=369.1, open=365.95, close=365.65, color='RED'), CandleItem(low=364.6, high=365.95, open=364.85, close=365.95, color='GREEN')] 2020-10-10 04:00:20 INFO: skip by colors first_candle=CandleItem(low=364.6, high=365.95, open=364.85, close=365.95, color='GREEN') second_candle=CandleItem(low=365.6, high=369.1, open=365.95, close=365.65, color='RED') last_candle=CandleItem(low=365.55, high=368.45, open=365.65, close=367.75, color='GREEN') 2020-10-10 04:00:20 INFO: check need new order None 2020-10-10 04:00:20 INFO: init new order end 2020-10-10 04:00:20 INFO: 2020-10-10 04:00:20 INFO: 2020-10-10 04:00:20 INFO: 2020-10-10 04:00:20 INFO: 2020-10-10 04:02:00 INFO: 2020-10-10 04:02:00 INFO: 2020-10-10 04:02:00 INFO: 2020-10-10 04:02:00 INFO: 2020-10-10 04:02:00 INFO: clearing start 2020-10-10 04:02:00 INFO: clearing end 2020-10-10 04:02:00 INFO: 2020-10-10 04:02:00 INFO: 2020-10-10 04:02:00 INFO: 2020-10-10 04:02:00 INFO: 2020-10-10 05:00:20 INFO: 2020-10-10 05:00:20 INFO: 2020-10-10 05:00:20 INFO: 2020-10-10 05:00:20 INFO: 2020-10-10 05:00:20 INFO: init new order start 2020-10-10 05:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 10, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.75, 'high': 369.65, 'low': 366.6, 'close': 369.5, 'trades': 4062, 'volume': 1998031, 'vwap': 368.48, 'lastSize': 491, 'turnover': 73622980460, 'homeNotional': 22156.240273241307, 'foreignNotional': 8164091.703509886}, {'timestamp': datetime.datetime(2020, 10, 10, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.65, 'high': 368.45, 'low': 365.55, 'close': 367.75, 'trades': 2692, 'volume': 1660491, 'vwap': 367.15, 'lastSize': 1, 'turnover': 60963808400, 'homeNotional': 18401.077350657226, 'foreignNotional': 6755846.081655956}, {'timestamp': datetime.datetime(2020, 10, 10, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.95, 'high': 369.1, 'low': 365.6, 'close': 365.65, 'trades': 4144, 'volume': 2604938, 'vwap': 367.27, 'lastSize': 600, 'turnover': 95670076080, 'homeNotional': 28866.801299502524, 'foreignNotional': 10601764.149680533}] 2020-10-10 05:00:20 INFO: prepare candles [CandleItem(low=366.6, high=369.65, open=367.75, close=369.5, color='GREEN'), CandleItem(low=365.55, high=368.45, open=365.65, close=367.75, color='GREEN'), CandleItem(low=365.6, high=369.1, open=365.95, close=365.65, color='RED')] 2020-10-10 05:00:20 INFO: skip by colors first_candle=CandleItem(low=365.6, high=369.1, open=365.95, close=365.65, color='RED') second_candle=CandleItem(low=365.55, high=368.45, open=365.65, close=367.75, color='GREEN') last_candle=CandleItem(low=366.6, high=369.65, open=367.75, close=369.5, color='GREEN') 2020-10-10 05:00:20 INFO: check need new order None 2020-10-10 05:00:20 INFO: init new order end 2020-10-10 05:00:20 INFO: 2020-10-10 05:00:20 INFO: 2020-10-10 05:00:20 INFO: 2020-10-10 05:00:20 INFO: 2020-10-10 05:02:00 INFO: 2020-10-10 05:02:00 INFO: 2020-10-10 05:02:00 INFO: 2020-10-10 05:02:00 INFO: 2020-10-10 05:02:00 INFO: clearing start 2020-10-10 05:02:00 INFO: clearing end 2020-10-10 05:02:00 INFO: 2020-10-10 05:02:00 INFO: 2020-10-10 05:02:00 INFO: 2020-10-10 05:02:00 INFO: 2020-10-10 06:00:20 INFO: 2020-10-10 06:00:20 INFO: 2020-10-10 06:00:20 INFO: 2020-10-10 06:00:20 INFO: 2020-10-10 06:00:20 INFO: init new order start 2020-10-10 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 10, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 369.5, 'high': 377.35, 'low': 369.25, 'close': 376.5, 'trades': 9288, 'volume': 8410159, 'vwap': 375.09, 'lastSize': 12, 'turnover': 315453130975, 'homeNotional': 95316.3213955834, 'foreignNotional': 35753272.11173491}, {'timestamp': datetime.datetime(2020, 10, 10, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.75, 'high': 369.65, 'low': 366.6, 'close': 369.5, 'trades': 4062, 'volume': 1998031, 'vwap': 368.48, 'lastSize': 491, 'turnover': 73622980460, 'homeNotional': 22156.240273241307, 'foreignNotional': 8164091.703509886}, {'timestamp': datetime.datetime(2020, 10, 10, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.65, 'high': 368.45, 'low': 365.55, 'close': 367.75, 'trades': 2692, 'volume': 1660491, 'vwap': 367.15, 'lastSize': 1, 'turnover': 60963808400, 'homeNotional': 18401.077350657226, 'foreignNotional': 6755846.081655956}] 2020-10-10 06:00:20 INFO: prepare candles [CandleItem(low=369.25, high=377.35, open=369.5, close=376.5, color='GREEN'), CandleItem(low=366.6, high=369.65, open=367.75, close=369.5, color='GREEN'), CandleItem(low=365.55, high=368.45, open=365.65, close=367.75, color='GREEN')] 2020-10-10 06:00:20 INFO: skip by colors first_candle=CandleItem(low=365.55, high=368.45, open=365.65, close=367.75, color='GREEN') second_candle=CandleItem(low=366.6, high=369.65, open=367.75, close=369.5, color='GREEN') last_candle=CandleItem(low=369.25, high=377.35, open=369.5, close=376.5, color='GREEN') 2020-10-10 06:00:20 INFO: check need new order None 2020-10-10 06:00:20 INFO: init new order end 2020-10-10 06:00:20 INFO: 2020-10-10 06:00:20 INFO: 2020-10-10 06:00:20 INFO: 2020-10-10 06:00:20 INFO: 2020-10-10 06:02:00 INFO: 2020-10-10 06:02:00 INFO: 2020-10-10 06:02:00 INFO: 2020-10-10 06:02:00 INFO: 2020-10-10 06:02:00 INFO: clearing start 2020-10-10 06:02:00 INFO: clearing end 2020-10-10 06:02:00 INFO: 2020-10-10 06:02:00 INFO: 2020-10-10 06:02:00 INFO: 2020-10-10 06:02:00 INFO: 2020-10-10 07:00:20 INFO: 2020-10-10 07:00:20 INFO: 2020-10-10 07:00:20 INFO: 2020-10-10 07:00:20 INFO: 2020-10-10 07:00:20 INFO: init new order start 2020-10-10 07:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 10, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 376.5, 'high': 378.9, 'low': 375.95, 'close': 376.9, 'trades': 4923, 'volume': 3258337, 'vwap': 377.53, 'lastSize': 500, 'turnover': 123011548665, 'homeNotional': 37212.90325738588, 'foreignNotional': 14048970.288372552}, {'timestamp': datetime.datetime(2020, 10, 10, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 369.5, 'high': 377.35, 'low': 369.25, 'close': 376.5, 'trades': 9288, 'volume': 8410159, 'vwap': 375.09, 'lastSize': 12, 'turnover': 315453130975, 'homeNotional': 95316.3213955834, 'foreignNotional': 35753272.11173491}, {'timestamp': datetime.datetime(2020, 10, 10, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.75, 'high': 369.65, 'low': 366.6, 'close': 369.5, 'trades': 4062, 'volume': 1998031, 'vwap': 368.48, 'lastSize': 491, 'turnover': 73622980460, 'homeNotional': 22156.240273241307, 'foreignNotional': 8164091.703509886}] 2020-10-10 07:00:20 INFO: prepare candles [CandleItem(low=375.95, high=378.9, open=376.5, close=376.9, color='GREEN'), CandleItem(low=369.25, high=377.35, open=369.5, close=376.5, color='GREEN'), CandleItem(low=366.6, high=369.65, open=367.75, close=369.5, color='GREEN')] 2020-10-10 07:00:20 INFO: skip by colors first_candle=CandleItem(low=366.6, high=369.65, open=367.75, close=369.5, color='GREEN') second_candle=CandleItem(low=369.25, high=377.35, open=369.5, close=376.5, color='GREEN') last_candle=CandleItem(low=375.95, high=378.9, open=376.5, close=376.9, color='GREEN') 2020-10-10 07:00:20 INFO: check need new order None 2020-10-10 07:00:20 INFO: init new order end 2020-10-10 07:00:20 INFO: 2020-10-10 07:00:20 INFO: 2020-10-10 07:00:20 INFO: 2020-10-10 07:00:20 INFO: 2020-10-10 07:02:00 INFO: 2020-10-10 07:02:00 INFO: 2020-10-10 07:02:00 INFO: 2020-10-10 07:02:00 INFO: 2020-10-10 07:02:00 INFO: clearing start 2020-10-10 07:02:00 INFO: clearing end 2020-10-10 07:02:00 INFO: 2020-10-10 07:02:00 INFO: 2020-10-10 07:02:00 INFO: 2020-10-10 07:02:00 INFO: 2020-10-10 08:00:20 INFO: 2020-10-10 08:00:20 INFO: 2020-10-10 08:00:20 INFO: 2020-10-10 08:00:20 INFO: 2020-10-10 08:00:20 INFO: init new order start 2020-10-10 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 10, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 376.9, 'high': 377.75, 'low': 375.7, 'close': 376.45, 'trades': 2801, 'volume': 1740277, 'vwap': 376.77, 'lastSize': 1000, 'turnover': 65567371135, 'homeNotional': 19849.059880757333, 'foreignNotional': 7478421.560233127}, {'timestamp': datetime.datetime(2020, 10, 10, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 376.5, 'high': 378.9, 'low': 375.95, 'close': 376.9, 'trades': 4923, 'volume': 3258337, 'vwap': 377.53, 'lastSize': 500, 'turnover': 123011548665, 'homeNotional': 37212.90325738588, 'foreignNotional': 14048970.288372552}, {'timestamp': datetime.datetime(2020, 10, 10, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 369.5, 'high': 377.35, 'low': 369.25, 'close': 376.5, 'trades': 9288, 'volume': 8410159, 'vwap': 375.09, 'lastSize': 12, 'turnover': 315453130975, 'homeNotional': 95316.3213955834, 'foreignNotional': 35753272.11173491}] 2020-10-10 08:00:20 INFO: prepare candles [CandleItem(low=375.7, high=377.75, open=376.9, close=376.45, color='RED'), CandleItem(low=375.95, high=378.9, open=376.5, close=376.9, color='GREEN'), CandleItem(low=369.25, high=377.35, open=369.5, close=376.5, color='GREEN')] 2020-10-10 08:00:20 INFO: last_candle=CandleItem(low=375.7, high=377.75, open=376.9, close=376.45, color='RED') 2020-10-10 08:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-10 08:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=375.7, high=377.75, open=376.9, close=376.45, color='RED') 2020-10-10 08:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=375.95, high=378.9, open=376.5, close=376.9, color='GREEN') 2020-10-10 08:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=369.25, high=377.35, open=369.5, close=376.5, color='GREEN') 2020-10-10 08:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=375.7, high=377.75, open=376.9, close=376.45, color='RED'), take_profit_factor=6.0, clearing_interval=3600) 2020-10-10 08:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=375.7, high=377.75, open=376.9, close=376.45, color='RED'), take_profit_factor=6.0, clearing_interval=3600) 2020-10-10 08:00:20 INFO: place order: start candle=CandleItem(low=375.7, high=377.75, open=376.9, close=376.45, color='RED') ticker='ETHUSD' price_offset=0.1 2020-10-10 08:00:20 INFO: place order: side_factor=1 init_trigger_price=375.65 init_order_price=375.59999999999997 stop_price_offset=0.0 candle.size=2.0500000000000114 stop_price=377.75 take_price=363.2999999999999 2020-10-10 08:00:20 INFO: place order round: side_factor=1 init_trigger_price=Decimal('375.6499999999999772626324556767940521240234375') init_order_price=Decimal('375.59999999999996589394868351519107818603515625') stop_price_offset=0.0 candle.size=2.0500000000000114 stop_price=Decimal('377.75') take_price=Decimal('363.29999999999989768184605054557323455810546875') 2020-10-10 08:00:20 INFO: place order: compute qty=-905 2020-10-10 08:00:20 INFO: place order: save order to db b3960011158743e0890bdd0d06f622f7; response=True 2020-10-10 08:00:20 INFO: process event {'orderID': '215eb67c-040f-4586-bae7-c5f15ee03d3d', 'clOrdID': 'b3960011158743e0890bdd0d06f622f7', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 905, 'price': 375.6, 'displayQty': None, 'stopPx': 375.65, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-10-10T05:00:20.325Z', 'timestamp': '2020-10-10T05:00:20.325Z'} 2020-10-10 08:00:20 INFO: skip event b3960011158743e0890bdd0d06f622f7 New 2020-10-10 08:00:20 INFO: post order to exchange resp={'orderID': '215eb67c-040f-4586-bae7-c5f15ee03d3d', 'clOrdID': 'b3960011158743e0890bdd0d06f622f7', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 905, 'price': 375.6, 'displayQty': None, 'stopPx': 375.65, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 10, 5, 0, 20, 325000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 10, 5, 0, 20, 325000, tzinfo=tzutc())} 2020-10-10 08:00:20 INFO: place new init order {'qty': -905, 'init_price': Decimal('375.6499999999999772626324556767940521240234375'), 'stop_price': Decimal('377.75'), 'take_price': Decimal('363.29999999999989768184605054557323455810546875'), 'order_uid': 'b3960011158743e0890bdd0d06f622f7', 'response': {'orderID': '215eb67c-040f-4586-bae7-c5f15ee03d3d', 'clOrdID': 'b3960011158743e0890bdd0d06f622f7', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 905, 'price': 375.6, 'displayQty': None, 'stopPx': 375.65, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 10, 5, 0, 20, 325000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 10, 5, 0, 20, 325000, tzinfo=tzutc())}} 2020-10-10 08:00:20 INFO: init new order end 2020-10-10 08:00:20 INFO: 2020-10-10 08:00:20 INFO: 2020-10-10 08:00:20 INFO: 2020-10-10 08:00:20 INFO: 2020-10-10 08:02:00 INFO: 2020-10-10 08:02:00 INFO: 2020-10-10 08:02:00 INFO: 2020-10-10 08:02:00 INFO: 2020-10-10 08:02:00 INFO: clearing start 2020-10-10 08:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '215eb67c-040f-4586-bae7-c5f15ee03d3d', 'clOrdID': 'b3960011158743e0890bdd0d06f622f7', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 905, 'price': 375.6, 'displayQty': None, 'stopPx': 375.65, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 10, 5, 0, 20, 325000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 10, 5, 0, 20, 325000, tzinfo=tzutc())} 2020-10-10 08:02:00 INFO: order time=2020-10-10 05:00:20.325000+00:00; delta from now UTC=0:01:40.177309 time_delta.total_seconds()=100.177309; time_diff_offset='3600' 2020-10-10 08:02:00 INFO: skip by time diff 2020-10-10 05:00:20.325000+00:00 2020-10-10 08:02:00 INFO: clearing end 2020-10-10 08:02:00 INFO: 2020-10-10 08:02:00 INFO: 2020-10-10 08:02:00 INFO: 2020-10-10 08:02:00 INFO: 2020-10-10 08:47:33 INFO: process event {'orderID': '215eb67c-040f-4586-bae7-c5f15ee03d3d', 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 905, 'avgPx': 375.65, 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'transactTime': '2020-10-10T05:47:33.670Z', 'timestamp': '2020-10-10T05:47:33.670Z', 'clOrdID': 'b3960011158743e0890bdd0d06f622f7', 'account': 605536, 'symbol': 'ETHUSD'} 2020-10-10 08:47:33 INFO: add new event={'uid': 'b3960011158743e0890bdd0d06f622f7', 'status': 'Filled'} 2020-10-10 08:47:33 INFO: 2020-10-10 08:47:33 INFO: 2020-10-10 08:47:33 INFO: 2020-10-10 08:47:33 INFO: 2020-10-10 08:47:33 INFO: process event start 2020-10-10 08:47:33 INFO: fetch new order event b3960011158743e0890bdd0d06f622f7 2020-10-10 08:47:33 INFO: fetch orders by event init={'stop': '377.75', 'take': '363.29999999999989768184605054557323455810546875', 'qty': '905', 'color': 'RED', 'ticker': 'ETHUSD', 'clearing_offset': '3600'} profit_pair=None 2020-10-10 08:47:33 INFO: process init order filled 2020-10-10 08:47:33 INFO: save profit orders to storage stop=6f9d548ef9a34b9ab381d3e514de3371 take=c14133cfedbb4667b72e2fa887fe300a 2020-10-10 08:47:33 INFO: place profit orders take_price=363.29999999999989768184605054557323455810546875, stop_price=377.75, qty=905, color=RED, ticker=ETHUSD 6f9d548ef9a34b9ab381d3e514de3371 c14133cfedbb4667b72e2fa887fe300a 2020-10-10 08:47:33 INFO: place stop order ETHUSD: qty=905, stop_price=377.75, stop_uid=6f9d548ef9a34b9ab381d3e514de3371 2020-10-10 08:47:33 INFO: process event {'orderID': '6f76c0d7-c14d-4225-8724-fc5af958530d', 'clOrdID': '6f9d548ef9a34b9ab381d3e514de3371', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': None, 'displayQty': None, 'stopPx': 377.75, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': '2020-10-10T05:47:33.864Z', 'timestamp': '2020-10-10T05:47:33.864Z'} 2020-10-10 08:47:33 INFO: skip event 6f9d548ef9a34b9ab381d3e514de3371 New 2020-10-10 08:47:33 INFO: exchange resp for stop order={'orderID': '6f76c0d7-c14d-4225-8724-fc5af958530d', 'clOrdID': '6f9d548ef9a34b9ab381d3e514de3371', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': None, 'displayQty': None, 'stopPx': 377.75, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 10, 5, 47, 33, 864000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 10, 5, 47, 33, 864000, tzinfo=tzutc())} 2020-10-10 08:47:33 INFO: place limit order ETHUSD: qty=905, price=363.29999999999989768184605054557323455810546875, take_uid=c14133cfedbb4667b72e2fa887fe300a 2020-10-10 08:47:33 INFO: process event {'orderID': 'e31d79bb-e85c-421d-8a0c-500f1fe615c6', 'clOrdID': 'c14133cfedbb4667b72e2fa887fe300a', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': 363.3, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': '2020-10-10T05:47:33.902Z', 'timestamp': '2020-10-10T05:47:33.902Z'} 2020-10-10 08:47:33 INFO: skip event c14133cfedbb4667b72e2fa887fe300a New 2020-10-10 08:47:33 INFO: exchange resp for take profit order={'orderID': 'e31d79bb-e85c-421d-8a0c-500f1fe615c6', 'clOrdID': 'c14133cfedbb4667b72e2fa887fe300a', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': 363.3, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 10, 5, 47, 33, 902000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 10, 5, 47, 33, 902000, tzinfo=tzutc())} 2020-10-10 08:47:33 INFO: place profit orders={'stop': {'response': {'orderID': '6f76c0d7-c14d-4225-8724-fc5af958530d', 'clOrdID': '6f9d548ef9a34b9ab381d3e514de3371', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': None, 'displayQty': None, 'stopPx': 377.75, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 10, 5, 47, 33, 864000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 10, 5, 47, 33, 864000, tzinfo=tzutc())}, 'qty': Decimal('905'), 'uid': '6f9d548ef9a34b9ab381d3e514de3371', 'price': Decimal('377.75')}, 'take': {'response': {'orderID': 'e31d79bb-e85c-421d-8a0c-500f1fe615c6', 'clOrdID': 'c14133cfedbb4667b72e2fa887fe300a', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': 363.3, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 10, 5, 47, 33, 902000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 10, 5, 47, 33, 902000, tzinfo=tzutc())}, 'qty': Decimal('905'), 'uid': 'c14133cfedbb4667b72e2fa887fe300a', 'price': Decimal('363.29999999999989768184605054557323455810546875')}} 2020-10-10 08:47:33 INFO: rm init order from db b3960011158743e0890bdd0d06f622f7 2020-10-10 08:47:33 INFO: end process event_processing_result='proceed init order' 2020-10-10 08:47:33 INFO: 2020-10-10 08:47:33 INFO: 2020-10-10 08:47:33 INFO: 2020-10-10 08:47:33 INFO: 2020-10-10 09:00:20 INFO: 2020-10-10 09:00:20 INFO: 2020-10-10 09:00:20 INFO: 2020-10-10 09:00:20 INFO: 2020-10-10 09:00:20 INFO: init new order start 2020-10-10 09:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 10, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 376.45, 'high': 376.85, 'low': 374.55, 'close': 374.8, 'trades': 1660, 'volume': 1068272, 'vwap': 375.67, 'lastSize': 13, 'turnover': 40131515235, 'homeNotional': 12167.391915640581, 'foreignNotional': 4570901.141179613}, {'timestamp': datetime.datetime(2020, 10, 10, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 376.9, 'high': 377.75, 'low': 375.7, 'close': 376.45, 'trades': 2801, 'volume': 1740277, 'vwap': 376.77, 'lastSize': 1000, 'turnover': 65567371135, 'homeNotional': 19849.059880757333, 'foreignNotional': 7478421.560233127}, {'timestamp': datetime.datetime(2020, 10, 10, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 376.5, 'high': 378.9, 'low': 375.95, 'close': 376.9, 'trades': 4923, 'volume': 3258337, 'vwap': 377.53, 'lastSize': 500, 'turnover': 123011548665, 'homeNotional': 37212.90325738588, 'foreignNotional': 14048970.288372552}] 2020-10-10 09:00:20 INFO: prepare candles [CandleItem(low=374.55, high=376.85, open=376.45, close=374.8, color='RED'), CandleItem(low=375.7, high=377.75, open=376.9, close=376.45, color='RED'), CandleItem(low=375.95, high=378.9, open=376.5, close=376.9, color='GREEN')] 2020-10-10 09:00:20 INFO: skip by colors first_candle=CandleItem(low=375.95, high=378.9, open=376.5, close=376.9, color='GREEN') second_candle=CandleItem(low=375.7, high=377.75, open=376.9, close=376.45, color='RED') last_candle=CandleItem(low=374.55, high=376.85, open=376.45, close=374.8, color='RED') 2020-10-10 09:00:20 INFO: check need new order None 2020-10-10 09:00:20 INFO: init new order end 2020-10-10 09:00:20 INFO: 2020-10-10 09:00:20 INFO: 2020-10-10 09:00:20 INFO: 2020-10-10 09:00:20 INFO: 2020-10-10 09:02:00 INFO: 2020-10-10 09:02:00 INFO: 2020-10-10 09:02:00 INFO: 2020-10-10 09:02:00 INFO: 2020-10-10 09:02:00 INFO: clearing start 2020-10-10 09:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '6f76c0d7-c14d-4225-8724-fc5af958530d', 'clOrdID': '6f9d548ef9a34b9ab381d3e514de3371', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': None, 'displayQty': None, 'stopPx': 377.75, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 10, 5, 47, 33, 864000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 10, 5, 47, 33, 864000, tzinfo=tzutc())} 2020-10-10 09:02:00 INFO: skip by not found init order into storage 2020-10-10 09:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'e31d79bb-e85c-421d-8a0c-500f1fe615c6', 'clOrdID': 'c14133cfedbb4667b72e2fa887fe300a', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': 363.3, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 10, 5, 47, 33, 902000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 10, 5, 47, 33, 902000, tzinfo=tzutc())} 2020-10-10 09:02:00 INFO: skip by not found init order into storage 2020-10-10 09:02:00 INFO: clearing end 2020-10-10 09:02:00 INFO: 2020-10-10 09:02:00 INFO: 2020-10-10 09:02:00 INFO: 2020-10-10 09:02:00 INFO: 2020-10-10 10:00:20 INFO: 2020-10-10 10:00:20 INFO: 2020-10-10 10:00:20 INFO: 2020-10-10 10:00:20 INFO: 2020-10-10 10:00:20 INFO: init new order start 2020-10-10 10:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 10, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 374.8, 'high': 375.9, 'low': 374.4, 'close': 375.3, 'trades': 1803, 'volume': 1110487, 'vwap': 375.27, 'lastSize': 13, 'turnover': 41672836155, 'homeNotional': 12641.387505620343, 'foreignNotional': 4743888.105426722}, {'timestamp': datetime.datetime(2020, 10, 10, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 376.45, 'high': 376.85, 'low': 374.55, 'close': 374.8, 'trades': 1660, 'volume': 1068272, 'vwap': 375.67, 'lastSize': 13, 'turnover': 40131515235, 'homeNotional': 12167.391915640581, 'foreignNotional': 4570901.141179613}, {'timestamp': datetime.datetime(2020, 10, 10, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 376.9, 'high': 377.75, 'low': 375.7, 'close': 376.45, 'trades': 2801, 'volume': 1740277, 'vwap': 376.77, 'lastSize': 1000, 'turnover': 65567371135, 'homeNotional': 19849.059880757333, 'foreignNotional': 7478421.560233127}] 2020-10-10 10:00:20 INFO: prepare candles [CandleItem(low=374.4, high=375.9, open=374.8, close=375.3, color='GREEN'), CandleItem(low=374.55, high=376.85, open=376.45, close=374.8, color='RED'), CandleItem(low=375.7, high=377.75, open=376.9, close=376.45, color='RED')] 2020-10-10 10:00:20 INFO: last_candle=CandleItem(low=374.4, high=375.9, open=374.8, close=375.3, color='GREEN') 2020-10-10 10:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-10 10:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=374.4, high=375.9, open=374.8, close=375.3, color='GREEN') 2020-10-10 10:00:20 INFO: skip by CandleItem(low=374.4, high=375.9, open=374.8, close=375.3, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-10 10:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-10 10:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=374.4, high=375.9, open=374.8, close=375.3, color='GREEN') 2020-10-10 10:00:20 INFO: skip by CandleItem(low=374.4, high=375.9, open=374.8, close=375.3, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-10-10 10:00:20 INFO: not found applicable config for candle 2020-10-10 10:00:20 INFO: check need new order None 2020-10-10 10:00:20 INFO: init new order end 2020-10-10 10:00:20 INFO: 2020-10-10 10:00:20 INFO: 2020-10-10 10:00:20 INFO: 2020-10-10 10:00:20 INFO: 2020-10-10 10:02:00 INFO: 2020-10-10 10:02:00 INFO: 2020-10-10 10:02:00 INFO: 2020-10-10 10:02:00 INFO: 2020-10-10 10:02:00 INFO: clearing start 2020-10-10 10:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '6f76c0d7-c14d-4225-8724-fc5af958530d', 'clOrdID': '6f9d548ef9a34b9ab381d3e514de3371', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': None, 'displayQty': None, 'stopPx': 377.75, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 10, 5, 47, 33, 864000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 10, 5, 47, 33, 864000, tzinfo=tzutc())} 2020-10-10 10:02:00 INFO: skip by not found init order into storage 2020-10-10 10:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'e31d79bb-e85c-421d-8a0c-500f1fe615c6', 'clOrdID': 'c14133cfedbb4667b72e2fa887fe300a', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': 363.3, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 10, 5, 47, 33, 902000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 10, 5, 47, 33, 902000, tzinfo=tzutc())} 2020-10-10 10:02:00 INFO: skip by not found init order into storage 2020-10-10 10:02:00 INFO: clearing end 2020-10-10 10:02:00 INFO: 2020-10-10 10:02:00 INFO: 2020-10-10 10:02:00 INFO: 2020-10-10 10:02:00 INFO: 2020-10-10 11:00:20 INFO: 2020-10-10 11:00:20 INFO: 2020-10-10 11:00:20 INFO: 2020-10-10 11:00:20 INFO: 2020-10-10 11:00:20 INFO: init new order start 2020-10-10 11:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 10, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 375.3, 'high': 376.3, 'low': 375.0, 'close': 375.3, 'trades': 1354, 'volume': 979590, 'vwap': 375.51, 'lastSize': 1, 'turnover': 36784268515, 'homeNotional': 11146.101082852994, 'foreignNotional': 4185437.822809287}, {'timestamp': datetime.datetime(2020, 10, 10, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 374.8, 'high': 375.9, 'low': 374.4, 'close': 375.3, 'trades': 1803, 'volume': 1110487, 'vwap': 375.27, 'lastSize': 13, 'turnover': 41672836155, 'homeNotional': 12641.387505620343, 'foreignNotional': 4743888.105426722}, {'timestamp': datetime.datetime(2020, 10, 10, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 376.45, 'high': 376.85, 'low': 374.55, 'close': 374.8, 'trades': 1660, 'volume': 1068272, 'vwap': 375.67, 'lastSize': 13, 'turnover': 40131515235, 'homeNotional': 12167.391915640581, 'foreignNotional': 4570901.141179613}] 2020-10-10 11:00:20 INFO: skip by found empty buckets 2020-10-10 11:00:20 INFO: check need new order None 2020-10-10 11:00:20 INFO: init new order end 2020-10-10 11:00:20 INFO: 2020-10-10 11:00:20 INFO: 2020-10-10 11:00:20 INFO: 2020-10-10 11:00:20 INFO: 2020-10-10 11:02:00 INFO: 2020-10-10 11:02:00 INFO: 2020-10-10 11:02:00 INFO: 2020-10-10 11:02:00 INFO: 2020-10-10 11:02:00 INFO: clearing start 2020-10-10 11:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '6f76c0d7-c14d-4225-8724-fc5af958530d', 'clOrdID': '6f9d548ef9a34b9ab381d3e514de3371', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': None, 'displayQty': None, 'stopPx': 377.75, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 10, 5, 47, 33, 864000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 10, 5, 47, 33, 864000, tzinfo=tzutc())} 2020-10-10 11:02:01 INFO: skip by not found init order into storage 2020-10-10 11:02:01 INFO: fetch_orders_for_clearing test order {'orderID': 'e31d79bb-e85c-421d-8a0c-500f1fe615c6', 'clOrdID': 'c14133cfedbb4667b72e2fa887fe300a', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': 363.3, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 10, 5, 47, 33, 902000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 10, 5, 47, 33, 902000, tzinfo=tzutc())} 2020-10-10 11:02:01 INFO: skip by not found init order into storage 2020-10-10 11:02:01 INFO: clearing end 2020-10-10 11:02:01 INFO: 2020-10-10 11:02:01 INFO: 2020-10-10 11:02:01 INFO: 2020-10-10 11:02:01 INFO: 2020-10-10 12:00:20 INFO: 2020-10-10 12:00:20 INFO: 2020-10-10 12:00:20 INFO: 2020-10-10 12:00:20 INFO: 2020-10-10 12:00:20 INFO: init new order start 2020-10-10 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 10, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 375.3, 'high': 376.25, 'low': 375.1, 'close': 375.7, 'trades': 1708, 'volume': 2114608, 'vwap': 375.63, 'lastSize': 9448, 'turnover': 79429811210, 'homeNotional': 24060.937091835713, 'foreignNotional': 9037877.212551977}, {'timestamp': datetime.datetime(2020, 10, 10, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 375.3, 'high': 376.3, 'low': 375.0, 'close': 375.3, 'trades': 1354, 'volume': 979590, 'vwap': 375.51, 'lastSize': 1, 'turnover': 36784268515, 'homeNotional': 11146.101082852994, 'foreignNotional': 4185437.822809287}, {'timestamp': datetime.datetime(2020, 10, 10, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 374.8, 'high': 375.9, 'low': 374.4, 'close': 375.3, 'trades': 1803, 'volume': 1110487, 'vwap': 375.27, 'lastSize': 13, 'turnover': 41672836155, 'homeNotional': 12641.387505620343, 'foreignNotional': 4743888.105426722}] 2020-10-10 12:00:20 INFO: skip by found empty buckets 2020-10-10 12:00:20 INFO: check need new order None 2020-10-10 12:00:20 INFO: init new order end 2020-10-10 12:00:20 INFO: 2020-10-10 12:00:20 INFO: 2020-10-10 12:00:20 INFO: 2020-10-10 12:00:20 INFO: 2020-10-10 12:02:00 INFO: 2020-10-10 12:02:00 INFO: 2020-10-10 12:02:00 INFO: 2020-10-10 12:02:00 INFO: 2020-10-10 12:02:00 INFO: clearing start 2020-10-10 12:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '6f76c0d7-c14d-4225-8724-fc5af958530d', 'clOrdID': '6f9d548ef9a34b9ab381d3e514de3371', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': None, 'displayQty': None, 'stopPx': 377.75, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 10, 5, 47, 33, 864000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 10, 5, 47, 33, 864000, tzinfo=tzutc())} 2020-10-10 12:02:00 INFO: skip by not found init order into storage 2020-10-10 12:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'e31d79bb-e85c-421d-8a0c-500f1fe615c6', 'clOrdID': 'c14133cfedbb4667b72e2fa887fe300a', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': 363.3, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 10, 5, 47, 33, 902000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 10, 5, 47, 33, 902000, tzinfo=tzutc())} 2020-10-10 12:02:00 INFO: skip by not found init order into storage 2020-10-10 12:02:00 INFO: clearing end 2020-10-10 12:02:00 INFO: 2020-10-10 12:02:00 INFO: 2020-10-10 12:02:00 INFO: 2020-10-10 12:02:00 INFO: 2020-10-10 13:00:20 INFO: 2020-10-10 13:00:20 INFO: 2020-10-10 13:00:20 INFO: 2020-10-10 13:00:20 INFO: 2020-10-10 13:00:20 INFO: init new order start 2020-10-10 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 10, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 375.7, 'high': 376.15, 'low': 370.9, 'close': 372.15, 'trades': 5583, 'volume': 3753176, 'vwap': 373.15, 'lastSize': 52, 'turnover': 140049531325, 'homeNotional': 42611.02483285568, 'foreignNotional': 15900379.22120272}, {'timestamp': datetime.datetime(2020, 10, 10, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 375.3, 'high': 376.25, 'low': 375.1, 'close': 375.7, 'trades': 1708, 'volume': 2114608, 'vwap': 375.63, 'lastSize': 9448, 'turnover': 79429811210, 'homeNotional': 24060.937091835713, 'foreignNotional': 9037877.212551977}, {'timestamp': datetime.datetime(2020, 10, 10, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 375.3, 'high': 376.3, 'low': 375.0, 'close': 375.3, 'trades': 1354, 'volume': 979590, 'vwap': 375.51, 'lastSize': 1, 'turnover': 36784268515, 'homeNotional': 11146.101082852994, 'foreignNotional': 4185437.822809287}] 2020-10-10 13:00:20 INFO: skip by found empty buckets 2020-10-10 13:00:20 INFO: check need new order None 2020-10-10 13:00:20 INFO: init new order end 2020-10-10 13:00:20 INFO: 2020-10-10 13:00:20 INFO: 2020-10-10 13:00:20 INFO: 2020-10-10 13:00:20 INFO: 2020-10-10 13:02:00 INFO: 2020-10-10 13:02:00 INFO: 2020-10-10 13:02:00 INFO: 2020-10-10 13:02:00 INFO: 2020-10-10 13:02:00 INFO: clearing start 2020-10-10 13:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '6f76c0d7-c14d-4225-8724-fc5af958530d', 'clOrdID': '6f9d548ef9a34b9ab381d3e514de3371', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': None, 'displayQty': None, 'stopPx': 377.75, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 10, 5, 47, 33, 864000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 10, 5, 47, 33, 864000, tzinfo=tzutc())} 2020-10-10 13:02:01 INFO: skip by not found init order into storage 2020-10-10 13:02:01 INFO: fetch_orders_for_clearing test order {'orderID': 'e31d79bb-e85c-421d-8a0c-500f1fe615c6', 'clOrdID': 'c14133cfedbb4667b72e2fa887fe300a', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': 363.3, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 10, 5, 47, 33, 902000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 10, 5, 47, 33, 902000, tzinfo=tzutc())} 2020-10-10 13:02:01 INFO: skip by not found init order into storage 2020-10-10 13:02:01 INFO: clearing end 2020-10-10 13:02:01 INFO: 2020-10-10 13:02:01 INFO: 2020-10-10 13:02:01 INFO: 2020-10-10 13:02:01 INFO: 2020-10-10 14:00:20 INFO: 2020-10-10 14:00:20 INFO: 2020-10-10 14:00:20 INFO: 2020-10-10 14:00:20 INFO: 2020-10-10 14:00:20 INFO: init new order start 2020-10-10 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 10, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 372.15, 'high': 372.55, 'low': 368.55, 'close': 372.2, 'trades': 4799, 'volume': 3928063, 'vwap': 370.42, 'lastSize': 12, 'turnover': 145501800520, 'homeNotional': 44365.22181071612, 'foreignNotional': 16433644.934652168}, {'timestamp': datetime.datetime(2020, 10, 10, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 375.7, 'high': 376.15, 'low': 370.9, 'close': 372.15, 'trades': 5583, 'volume': 3753176, 'vwap': 373.15, 'lastSize': 52, 'turnover': 140049531325, 'homeNotional': 42611.02483285568, 'foreignNotional': 15900379.22120272}, {'timestamp': datetime.datetime(2020, 10, 10, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 375.3, 'high': 376.25, 'low': 375.1, 'close': 375.7, 'trades': 1708, 'volume': 2114608, 'vwap': 375.63, 'lastSize': 9448, 'turnover': 79429811210, 'homeNotional': 24060.937091835713, 'foreignNotional': 9037877.212551977}] 2020-10-10 14:00:20 INFO: prepare candles [CandleItem(low=368.55, high=372.55, open=372.15, close=372.2, color='GREEN'), CandleItem(low=370.9, high=376.15, open=375.7, close=372.15, color='RED'), CandleItem(low=375.1, high=376.25, open=375.3, close=375.7, color='GREEN')] 2020-10-10 14:00:20 INFO: skip by colors first_candle=CandleItem(low=375.1, high=376.25, open=375.3, close=375.7, color='GREEN') second_candle=CandleItem(low=370.9, high=376.15, open=375.7, close=372.15, color='RED') last_candle=CandleItem(low=368.55, high=372.55, open=372.15, close=372.2, color='GREEN') 2020-10-10 14:00:20 INFO: check need new order None 2020-10-10 14:00:20 INFO: init new order end 2020-10-10 14:00:20 INFO: 2020-10-10 14:00:20 INFO: 2020-10-10 14:00:20 INFO: 2020-10-10 14:00:20 INFO: 2020-10-10 14:02:00 INFO: 2020-10-10 14:02:00 INFO: 2020-10-10 14:02:00 INFO: 2020-10-10 14:02:00 INFO: 2020-10-10 14:02:00 INFO: clearing start 2020-10-10 14:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '6f76c0d7-c14d-4225-8724-fc5af958530d', 'clOrdID': '6f9d548ef9a34b9ab381d3e514de3371', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': None, 'displayQty': None, 'stopPx': 377.75, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 10, 5, 47, 33, 864000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 10, 5, 47, 33, 864000, tzinfo=tzutc())} 2020-10-10 14:02:00 INFO: skip by not found init order into storage 2020-10-10 14:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'e31d79bb-e85c-421d-8a0c-500f1fe615c6', 'clOrdID': 'c14133cfedbb4667b72e2fa887fe300a', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': 363.3, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 10, 5, 47, 33, 902000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 10, 5, 47, 33, 902000, tzinfo=tzutc())} 2020-10-10 14:02:00 INFO: skip by not found init order into storage 2020-10-10 14:02:00 INFO: clearing end 2020-10-10 14:02:00 INFO: 2020-10-10 14:02:00 INFO: 2020-10-10 14:02:00 INFO: 2020-10-10 14:02:00 INFO: 2020-10-10 15:00:20 INFO: 2020-10-10 15:00:20 INFO: 2020-10-10 15:00:20 INFO: 2020-10-10 15:00:20 INFO: 2020-10-10 15:00:20 INFO: init new order start 2020-10-10 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 10, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 372.2, 'high': 373.5, 'low': 371.55, 'close': 372.85, 'trades': 2329, 'volume': 1495927, 'vwap': 372.4, 'lastSize': 1000, 'turnover': 55708294985, 'homeNotional': 16940.02653630106, 'foreignNotional': 6308466.726503681}, {'timestamp': datetime.datetime(2020, 10, 10, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 372.15, 'high': 372.55, 'low': 368.55, 'close': 372.2, 'trades': 4799, 'volume': 3928063, 'vwap': 370.42, 'lastSize': 12, 'turnover': 145501800520, 'homeNotional': 44365.22181071612, 'foreignNotional': 16433644.934652168}, {'timestamp': datetime.datetime(2020, 10, 10, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 375.7, 'high': 376.15, 'low': 370.9, 'close': 372.15, 'trades': 5583, 'volume': 3753176, 'vwap': 373.15, 'lastSize': 52, 'turnover': 140049531325, 'homeNotional': 42611.02483285568, 'foreignNotional': 15900379.22120272}] 2020-10-10 15:00:20 INFO: prepare candles [CandleItem(low=371.55, high=373.5, open=372.2, close=372.85, color='GREEN'), CandleItem(low=368.55, high=372.55, open=372.15, close=372.2, color='GREEN'), CandleItem(low=370.9, high=376.15, open=375.7, close=372.15, color='RED')] 2020-10-10 15:00:20 INFO: skip by colors first_candle=CandleItem(low=370.9, high=376.15, open=375.7, close=372.15, color='RED') second_candle=CandleItem(low=368.55, high=372.55, open=372.15, close=372.2, color='GREEN') last_candle=CandleItem(low=371.55, high=373.5, open=372.2, close=372.85, color='GREEN') 2020-10-10 15:00:20 INFO: check need new order None 2020-10-10 15:00:20 INFO: init new order end 2020-10-10 15:00:20 INFO: 2020-10-10 15:00:20 INFO: 2020-10-10 15:00:20 INFO: 2020-10-10 15:00:20 INFO: 2020-10-10 15:02:00 INFO: 2020-10-10 15:02:00 INFO: 2020-10-10 15:02:00 INFO: 2020-10-10 15:02:00 INFO: 2020-10-10 15:02:00 INFO: clearing start 2020-10-10 15:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '6f76c0d7-c14d-4225-8724-fc5af958530d', 'clOrdID': '6f9d548ef9a34b9ab381d3e514de3371', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': None, 'displayQty': None, 'stopPx': 377.75, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 10, 5, 47, 33, 864000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 10, 5, 47, 33, 864000, tzinfo=tzutc())} 2020-10-10 15:02:00 INFO: skip by not found init order into storage 2020-10-10 15:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'e31d79bb-e85c-421d-8a0c-500f1fe615c6', 'clOrdID': 'c14133cfedbb4667b72e2fa887fe300a', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': 363.3, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 10, 5, 47, 33, 902000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 10, 5, 47, 33, 902000, tzinfo=tzutc())} 2020-10-10 15:02:00 INFO: skip by not found init order into storage 2020-10-10 15:02:00 INFO: clearing end 2020-10-10 15:02:00 INFO: 2020-10-10 15:02:00 INFO: 2020-10-10 15:02:00 INFO: 2020-10-10 15:02:00 INFO: 2020-10-10 16:00:20 INFO: 2020-10-10 16:00:20 INFO: 2020-10-10 16:00:20 INFO: 2020-10-10 16:00:20 INFO: 2020-10-10 16:00:20 INFO: init new order start 2020-10-10 16:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 10, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 372.85, 'high': 374.0, 'low': 371.4, 'close': 374.0, 'trades': 2539, 'volume': 1806747, 'vwap': 372.87, 'lastSize': 90, 'turnover': 67366592045, 'homeNotional': 20454.46288410883, 'foreignNotional': 7626692.04336371}, {'timestamp': datetime.datetime(2020, 10, 10, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 372.2, 'high': 373.5, 'low': 371.55, 'close': 372.85, 'trades': 2329, 'volume': 1495927, 'vwap': 372.4, 'lastSize': 1000, 'turnover': 55708294985, 'homeNotional': 16940.02653630106, 'foreignNotional': 6308466.726503681}, {'timestamp': datetime.datetime(2020, 10, 10, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 372.15, 'high': 372.55, 'low': 368.55, 'close': 372.2, 'trades': 4799, 'volume': 3928063, 'vwap': 370.42, 'lastSize': 12, 'turnover': 145501800520, 'homeNotional': 44365.22181071612, 'foreignNotional': 16433644.934652168}] 2020-10-10 16:00:20 INFO: prepare candles [CandleItem(low=371.4, high=374.0, open=372.85, close=374.0, color='GREEN'), CandleItem(low=371.55, high=373.5, open=372.2, close=372.85, color='GREEN'), CandleItem(low=368.55, high=372.55, open=372.15, close=372.2, color='GREEN')] 2020-10-10 16:00:20 INFO: skip by colors first_candle=CandleItem(low=368.55, high=372.55, open=372.15, close=372.2, color='GREEN') second_candle=CandleItem(low=371.55, high=373.5, open=372.2, close=372.85, color='GREEN') last_candle=CandleItem(low=371.4, high=374.0, open=372.85, close=374.0, color='GREEN') 2020-10-10 16:00:20 INFO: check need new order None 2020-10-10 16:00:20 INFO: init new order end 2020-10-10 16:00:20 INFO: 2020-10-10 16:00:20 INFO: 2020-10-10 16:00:20 INFO: 2020-10-10 16:00:20 INFO: 2020-10-10 16:02:00 INFO: 2020-10-10 16:02:00 INFO: 2020-10-10 16:02:00 INFO: 2020-10-10 16:02:00 INFO: 2020-10-10 16:02:00 INFO: clearing start 2020-10-10 16:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '6f76c0d7-c14d-4225-8724-fc5af958530d', 'clOrdID': '6f9d548ef9a34b9ab381d3e514de3371', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': None, 'displayQty': None, 'stopPx': 377.75, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 10, 5, 47, 33, 864000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 10, 5, 47, 33, 864000, tzinfo=tzutc())} 2020-10-10 16:02:00 INFO: skip by not found init order into storage 2020-10-10 16:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'e31d79bb-e85c-421d-8a0c-500f1fe615c6', 'clOrdID': 'c14133cfedbb4667b72e2fa887fe300a', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': 363.3, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 10, 5, 47, 33, 902000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 10, 5, 47, 33, 902000, tzinfo=tzutc())} 2020-10-10 16:02:00 INFO: skip by not found init order into storage 2020-10-10 16:02:00 INFO: clearing end 2020-10-10 16:02:00 INFO: 2020-10-10 16:02:00 INFO: 2020-10-10 16:02:00 INFO: 2020-10-10 16:02:00 INFO: 2020-10-10 16:24:17 INFO: Websocket Closed 2020-10-10 16:24:18 WARNING: reconnect to socket 2020-10-10 16:24:18 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-10-10 16:24:18 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-10-10 16:24:18 INFO: Authenticating with API Key. 2020-10-10 16:24:19 INFO: Connected to WS. 2020-10-10 16:24:28 INFO: Websocket Closed 2020-10-10 16:24:29 WARNING: reconnect to socket 2020-10-10 16:24:29 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-10-10 16:24:29 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-10-10 16:24:29 INFO: Authenticating with API Key. 2020-10-10 16:24:30 INFO: Connected to WS. 2020-10-10 16:55:34 INFO: Websocket Closed 2020-10-10 16:55:34 WARNING: reconnect to socket 2020-10-10 16:55:34 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-10-10 16:55:34 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-10-10 16:55:34 INFO: Authenticating with API Key. 2020-10-10 16:55:35 INFO: Connected to WS. 2020-10-10 17:00:20 INFO: 2020-10-10 17:00:20 INFO: 2020-10-10 17:00:20 INFO: 2020-10-10 17:00:20 INFO: 2020-10-10 17:00:20 INFO: init new order start 2020-10-10 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 10, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 374.0, 'high': 376.25, 'low': 373.0, 'close': 374.65, 'trades': 3046, 'volume': 2112347, 'vwap': 374.86, 'lastSize': 2200, 'turnover': 79181447795, 'homeNotional': 23965.10365729251, 'foreignNotional': 8983350.301121755}, {'timestamp': datetime.datetime(2020, 10, 10, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 372.85, 'high': 374.0, 'low': 371.4, 'close': 374.0, 'trades': 2539, 'volume': 1806747, 'vwap': 372.87, 'lastSize': 90, 'turnover': 67366592045, 'homeNotional': 20454.46288410883, 'foreignNotional': 7626692.04336371}, {'timestamp': datetime.datetime(2020, 10, 10, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 372.2, 'high': 373.5, 'low': 371.55, 'close': 372.85, 'trades': 2329, 'volume': 1495927, 'vwap': 372.4, 'lastSize': 1000, 'turnover': 55708294985, 'homeNotional': 16940.02653630106, 'foreignNotional': 6308466.726503681}] 2020-10-10 17:00:20 INFO: prepare candles [CandleItem(low=373.0, high=376.25, open=374.0, close=374.65, color='GREEN'), CandleItem(low=371.4, high=374.0, open=372.85, close=374.0, color='GREEN'), CandleItem(low=371.55, high=373.5, open=372.2, close=372.85, color='GREEN')] 2020-10-10 17:00:20 INFO: skip by colors first_candle=CandleItem(low=371.55, high=373.5, open=372.2, close=372.85, color='GREEN') second_candle=CandleItem(low=371.4, high=374.0, open=372.85, close=374.0, color='GREEN') last_candle=CandleItem(low=373.0, high=376.25, open=374.0, close=374.65, color='GREEN') 2020-10-10 17:00:20 INFO: check need new order None 2020-10-10 17:00:20 INFO: init new order end 2020-10-10 17:00:20 INFO: 2020-10-10 17:00:20 INFO: 2020-10-10 17:00:20 INFO: 2020-10-10 17:00:20 INFO: 2020-10-10 17:02:00 INFO: 2020-10-10 17:02:01 INFO: 2020-10-10 17:02:01 INFO: 2020-10-10 17:02:01 INFO: 2020-10-10 17:02:01 INFO: clearing start 2020-10-10 17:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '6f76c0d7-c14d-4225-8724-fc5af958530d', 'clOrdID': '6f9d548ef9a34b9ab381d3e514de3371', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': None, 'displayQty': None, 'stopPx': 377.75, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 10, 5, 47, 33, 864000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 10, 5, 47, 33, 864000, tzinfo=tzutc())} 2020-10-10 17:02:01 INFO: skip by not found init order into storage 2020-10-10 17:02:01 INFO: fetch_orders_for_clearing test order {'orderID': 'e31d79bb-e85c-421d-8a0c-500f1fe615c6', 'clOrdID': 'c14133cfedbb4667b72e2fa887fe300a', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': 363.3, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 10, 5, 47, 33, 902000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 10, 5, 47, 33, 902000, tzinfo=tzutc())} 2020-10-10 17:02:01 INFO: skip by not found init order into storage 2020-10-10 17:02:01 INFO: clearing end 2020-10-10 17:02:01 INFO: 2020-10-10 17:02:01 INFO: 2020-10-10 17:02:01 INFO: 2020-10-10 17:02:01 INFO: 2020-10-10 18:00:20 INFO: 2020-10-10 18:00:20 INFO: 2020-10-10 18:00:20 INFO: 2020-10-10 18:00:20 INFO: 2020-10-10 18:00:20 INFO: init new order start 2020-10-10 18:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 10, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 374.65, 'high': 374.9, 'low': 372.85, 'close': 374.2, 'trades': 2359, 'volume': 1663846, 'vwap': 374.02, 'lastSize': 7, 'turnover': 62230964275, 'homeNotional': 18885.02854488916, 'foreignNotional': 7063358.922279374}, {'timestamp': datetime.datetime(2020, 10, 10, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 374.0, 'high': 376.25, 'low': 373.0, 'close': 374.65, 'trades': 3046, 'volume': 2112347, 'vwap': 374.86, 'lastSize': 2200, 'turnover': 79181447795, 'homeNotional': 23965.10365729251, 'foreignNotional': 8983350.301121755}, {'timestamp': datetime.datetime(2020, 10, 10, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 372.85, 'high': 374.0, 'low': 371.4, 'close': 374.0, 'trades': 2539, 'volume': 1806747, 'vwap': 372.87, 'lastSize': 90, 'turnover': 67366592045, 'homeNotional': 20454.46288410883, 'foreignNotional': 7626692.04336371}] 2020-10-10 18:00:20 INFO: prepare candles [CandleItem(low=372.85, high=374.9, open=374.65, close=374.2, color='RED'), CandleItem(low=373.0, high=376.25, open=374.0, close=374.65, color='GREEN'), CandleItem(low=371.4, high=374.0, open=372.85, close=374.0, color='GREEN')] 2020-10-10 18:00:20 INFO: last_candle=CandleItem(low=372.85, high=374.9, open=374.65, close=374.2, color='RED') 2020-10-10 18:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-10 18:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=372.85, high=374.9, open=374.65, close=374.2, color='RED') 2020-10-10 18:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=373.0, high=376.25, open=374.0, close=374.65, color='GREEN') 2020-10-10 18:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=371.4, high=374.0, open=372.85, close=374.0, color='GREEN') 2020-10-10 18:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=372.85, high=374.9, open=374.65, close=374.2, color='RED'), take_profit_factor=6.0, clearing_interval=3600) 2020-10-10 18:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=372.85, high=374.9, open=374.65, close=374.2, color='RED'), take_profit_factor=6.0, clearing_interval=3600) 2020-10-10 18:00:20 INFO: place order: start candle=CandleItem(low=372.85, high=374.9, open=374.65, close=374.2, color='RED') ticker='ETHUSD' price_offset=0.1 2020-10-10 18:00:20 INFO: place order: side_factor=1 init_trigger_price=372.8 init_order_price=372.75 stop_price_offset=0.0 candle.size=2.0499999999999545 stop_price=374.9 take_price=360.4500000000003 2020-10-10 18:00:20 INFO: place order round: side_factor=1 init_trigger_price=Decimal('372.80000000000001136868377216160297393798828125') init_order_price=Decimal('372.75') stop_price_offset=0.0 candle.size=2.0499999999999545 stop_price=Decimal('374.8999999999999772626324556767940521240234375') take_price=Decimal('360.45000000000027284841053187847137451171875') 2020-10-10 18:00:20 INFO: place order: compute qty=-905 2020-10-10 18:00:20 INFO: place order: save order to db deb908c1699e4a32a237dda613d71236; response=True 2020-10-10 18:00:20 INFO: post order to exchange resp={'orderID': '69dceb8c-1db8-495a-b2f4-9292fbac8c59', 'clOrdID': 'deb908c1699e4a32a237dda613d71236', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 905, 'price': 372.75, 'displayQty': None, 'stopPx': 372.8, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 10, 15, 0, 20, 601000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 10, 15, 0, 20, 601000, tzinfo=tzutc())} 2020-10-10 18:00:20 INFO: place new init order {'qty': -905, 'init_price': Decimal('372.80000000000001136868377216160297393798828125'), 'stop_price': Decimal('374.8999999999999772626324556767940521240234375'), 'take_price': Decimal('360.45000000000027284841053187847137451171875'), 'order_uid': 'deb908c1699e4a32a237dda613d71236', 'response': {'orderID': '69dceb8c-1db8-495a-b2f4-9292fbac8c59', 'clOrdID': 'deb908c1699e4a32a237dda613d71236', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 905, 'price': 372.75, 'displayQty': None, 'stopPx': 372.8, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 10, 15, 0, 20, 601000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 10, 15, 0, 20, 601000, tzinfo=tzutc())}} 2020-10-10 18:00:20 INFO: init new order end 2020-10-10 18:00:20 INFO: 2020-10-10 18:00:20 INFO: 2020-10-10 18:00:20 INFO: 2020-10-10 18:00:20 INFO: 2020-10-10 18:00:20 INFO: process event {'orderID': '69dceb8c-1db8-495a-b2f4-9292fbac8c59', 'clOrdID': 'deb908c1699e4a32a237dda613d71236', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 905, 'price': 372.75, 'displayQty': None, 'stopPx': 372.8, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-10-10T15:00:20.601Z', 'timestamp': '2020-10-10T15:00:20.601Z'} 2020-10-10 18:00:20 INFO: skip event deb908c1699e4a32a237dda613d71236 New 2020-10-10 18:02:00 INFO: 2020-10-10 18:02:00 INFO: 2020-10-10 18:02:00 INFO: 2020-10-10 18:02:00 INFO: 2020-10-10 18:02:00 INFO: clearing start 2020-10-10 18:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '6f76c0d7-c14d-4225-8724-fc5af958530d', 'clOrdID': '6f9d548ef9a34b9ab381d3e514de3371', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': None, 'displayQty': None, 'stopPx': 377.75, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 10, 5, 47, 33, 864000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 10, 5, 47, 33, 864000, tzinfo=tzutc())} 2020-10-10 18:02:00 INFO: skip by not found init order into storage 2020-10-10 18:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'e31d79bb-e85c-421d-8a0c-500f1fe615c6', 'clOrdID': 'c14133cfedbb4667b72e2fa887fe300a', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': 363.3, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 10, 5, 47, 33, 902000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 10, 5, 47, 33, 902000, tzinfo=tzutc())} 2020-10-10 18:02:00 INFO: skip by not found init order into storage 2020-10-10 18:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '69dceb8c-1db8-495a-b2f4-9292fbac8c59', 'clOrdID': 'deb908c1699e4a32a237dda613d71236', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 905, 'price': 372.75, 'displayQty': None, 'stopPx': 372.8, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 10, 10, 15, 0, 20, 601000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 10, 15, 0, 20, 601000, tzinfo=tzutc())} 2020-10-10 18:02:00 INFO: order time=2020-10-10 15:00:20.601000+00:00; delta from now UTC=0:01:40.193057 time_delta.total_seconds()=100.193057; time_diff_offset='3600' 2020-10-10 18:02:00 INFO: skip by time diff 2020-10-10 15:00:20.601000+00:00 2020-10-10 18:02:00 INFO: clearing end 2020-10-10 18:02:00 INFO: 2020-10-10 18:02:00 INFO: 2020-10-10 18:02:00 INFO: 2020-10-10 18:02:00 INFO: 2020-10-10 18:51:15 INFO: process event {'orderID': '69dceb8c-1db8-495a-b2f4-9292fbac8c59', 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 905, 'avgPx': 372.75, 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'transactTime': '2020-10-10T15:51:15.078Z', 'timestamp': '2020-10-10T15:51:15.078Z', 'clOrdID': 'deb908c1699e4a32a237dda613d71236', 'account': 605536, 'symbol': 'ETHUSD'} 2020-10-10 18:51:15 INFO: add new event={'uid': 'deb908c1699e4a32a237dda613d71236', 'status': 'Filled'} 2020-10-10 18:51:15 INFO: 2020-10-10 18:51:15 INFO: 2020-10-10 18:51:15 INFO: 2020-10-10 18:51:15 INFO: 2020-10-10 18:51:15 INFO: process event start 2020-10-10 18:51:15 INFO: fetch new order event deb908c1699e4a32a237dda613d71236 2020-10-10 18:51:15 INFO: fetch orders by event init={'stop': '374.8999999999999772626324556767940521240234375', 'take': '360.45000000000027284841053187847137451171875', 'qty': '905', 'color': 'RED', 'ticker': 'ETHUSD', 'clearing_offset': '3600'} profit_pair=None 2020-10-10 18:51:15 INFO: process init order filled 2020-10-10 18:51:15 INFO: save profit orders to storage stop=95ecd92e84854df6943f1e0f5beaa14f take=ca440d3248324125b5a38c281c0c8957 2020-10-10 18:51:15 INFO: place profit orders take_price=360.45000000000027284841053187847137451171875, stop_price=374.8999999999999772626324556767940521240234375, qty=905, color=RED, ticker=ETHUSD 95ecd92e84854df6943f1e0f5beaa14f ca440d3248324125b5a38c281c0c8957 2020-10-10 18:51:15 INFO: place stop order ETHUSD: qty=905, stop_price=374.8999999999999772626324556767940521240234375, stop_uid=95ecd92e84854df6943f1e0f5beaa14f 2020-10-10 18:51:16 INFO: exchange resp for stop order={'orderID': '270f42a6-89cf-4ec5-9b73-f309c7fa3fae', 'clOrdID': '95ecd92e84854df6943f1e0f5beaa14f', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': None, 'displayQty': None, 'stopPx': 374.9, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 10, 15, 51, 16, 457000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 10, 15, 51, 16, 457000, tzinfo=tzutc())} 2020-10-10 18:51:16 INFO: place limit order ETHUSD: qty=905, price=360.45000000000027284841053187847137451171875, take_uid=ca440d3248324125b5a38c281c0c8957 2020-10-10 18:51:16 INFO: process event {'orderID': '270f42a6-89cf-4ec5-9b73-f309c7fa3fae', 'clOrdID': '95ecd92e84854df6943f1e0f5beaa14f', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': None, 'displayQty': None, 'stopPx': 374.9, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': '2020-10-10T15:51:16.457Z', 'timestamp': '2020-10-10T15:51:16.457Z'} 2020-10-10 18:51:16 INFO: skip event 95ecd92e84854df6943f1e0f5beaa14f New 2020-10-10 18:51:17 INFO: process event {'orderID': '1131185d-f08a-400f-986b-5daf2eb6d0c9', 'clOrdID': 'ca440d3248324125b5a38c281c0c8957', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': 360.45, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': '2020-10-10T15:51:17.498Z', 'timestamp': '2020-10-10T15:51:17.498Z'} 2020-10-10 18:51:17 INFO: skip event ca440d3248324125b5a38c281c0c8957 New 2020-10-10 18:51:17 INFO: exchange resp for take profit order={'orderID': '1131185d-f08a-400f-986b-5daf2eb6d0c9', 'clOrdID': 'ca440d3248324125b5a38c281c0c8957', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': 360.45, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 10, 15, 51, 17, 498000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 10, 15, 51, 17, 498000, tzinfo=tzutc())} 2020-10-10 18:51:17 INFO: place profit orders={'stop': {'response': {'orderID': '270f42a6-89cf-4ec5-9b73-f309c7fa3fae', 'clOrdID': '95ecd92e84854df6943f1e0f5beaa14f', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': None, 'displayQty': None, 'stopPx': 374.9, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 10, 15, 51, 16, 457000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 10, 15, 51, 16, 457000, tzinfo=tzutc())}, 'qty': Decimal('905'), 'uid': '95ecd92e84854df6943f1e0f5beaa14f', 'price': Decimal('374.8999999999999772626324556767940521240234375')}, 'take': {'response': {'orderID': '1131185d-f08a-400f-986b-5daf2eb6d0c9', 'clOrdID': 'ca440d3248324125b5a38c281c0c8957', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': 360.45, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 10, 15, 51, 17, 498000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 10, 15, 51, 17, 498000, tzinfo=tzutc())}, 'qty': Decimal('905'), 'uid': 'ca440d3248324125b5a38c281c0c8957', 'price': Decimal('360.45000000000027284841053187847137451171875')}} 2020-10-10 18:51:17 INFO: rm init order from db deb908c1699e4a32a237dda613d71236 2020-10-10 18:51:17 INFO: end process event_processing_result='proceed init order' 2020-10-10 18:51:17 INFO: 2020-10-10 18:51:17 INFO: 2020-10-10 18:51:17 INFO: 2020-10-10 18:51:17 INFO: 2020-10-10 19:00:20 INFO: 2020-10-10 19:00:20 INFO: 2020-10-10 19:00:20 INFO: 2020-10-10 19:00:20 INFO: 2020-10-10 19:00:20 INFO: init new order start 2020-10-10 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 10, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 374.2, 'high': 376.3, 'low': 372.4, 'close': 372.95, 'trades': 2897, 'volume': 2226681, 'vwap': 374.34, 'lastSize': 238, 'turnover': 83351680970, 'homeNotional': 25313.063747449323, 'foreignNotional': 9475515.3905931}, {'timestamp': datetime.datetime(2020, 10, 10, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 374.65, 'high': 374.9, 'low': 372.85, 'close': 374.2, 'trades': 2359, 'volume': 1663846, 'vwap': 374.02, 'lastSize': 7, 'turnover': 62230964275, 'homeNotional': 18885.02854488916, 'foreignNotional': 7063358.922279374}, {'timestamp': datetime.datetime(2020, 10, 10, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 374.0, 'high': 376.25, 'low': 373.0, 'close': 374.65, 'trades': 3046, 'volume': 2112347, 'vwap': 374.86, 'lastSize': 2200, 'turnover': 79181447795, 'homeNotional': 23965.10365729251, 'foreignNotional': 8983350.301121755}] 2020-10-10 19:00:20 INFO: prepare candles [CandleItem(low=372.4, high=376.3, open=374.2, close=372.95, color='RED'), CandleItem(low=372.85, high=374.9, open=374.65, close=374.2, color='RED'), CandleItem(low=373.0, high=376.25, open=374.0, close=374.65, color='GREEN')] 2020-10-10 19:00:20 INFO: skip by colors first_candle=CandleItem(low=373.0, high=376.25, open=374.0, close=374.65, color='GREEN') second_candle=CandleItem(low=372.85, high=374.9, open=374.65, close=374.2, color='RED') last_candle=CandleItem(low=372.4, high=376.3, open=374.2, close=372.95, color='RED') 2020-10-10 19:00:20 INFO: check need new order None 2020-10-10 19:00:20 INFO: init new order end 2020-10-10 19:00:20 INFO: 2020-10-10 19:00:20 INFO: 2020-10-10 19:00:20 INFO: 2020-10-10 19:00:20 INFO: 2020-10-10 19:02:00 INFO: 2020-10-10 19:02:00 INFO: 2020-10-10 19:02:00 INFO: 2020-10-10 19:02:00 INFO: 2020-10-10 19:02:00 INFO: clearing start 2020-10-10 19:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '6f76c0d7-c14d-4225-8724-fc5af958530d', 'clOrdID': '6f9d548ef9a34b9ab381d3e514de3371', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': None, 'displayQty': None, 'stopPx': 377.75, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 10, 5, 47, 33, 864000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 10, 5, 47, 33, 864000, tzinfo=tzutc())} 2020-10-10 19:02:00 INFO: skip by not found init order into storage 2020-10-10 19:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'e31d79bb-e85c-421d-8a0c-500f1fe615c6', 'clOrdID': 'c14133cfedbb4667b72e2fa887fe300a', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': 363.3, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 10, 5, 47, 33, 902000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 10, 5, 47, 33, 902000, tzinfo=tzutc())} 2020-10-10 19:02:00 INFO: skip by not found init order into storage 2020-10-10 19:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '270f42a6-89cf-4ec5-9b73-f309c7fa3fae', 'clOrdID': '95ecd92e84854df6943f1e0f5beaa14f', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': None, 'displayQty': None, 'stopPx': 374.9, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 10, 10, 15, 51, 16, 457000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 10, 15, 51, 16, 457000, tzinfo=tzutc())} 2020-10-10 19:02:00 INFO: skip by not found init order into storage 2020-10-10 19:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '1131185d-f08a-400f-986b-5daf2eb6d0c9', 'clOrdID': 'ca440d3248324125b5a38c281c0c8957', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 905, 'price': 360.45, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 905, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 10, 10, 15, 51, 17, 498000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 10, 10, 15, 51, 17, 498000, tzinfo=tzutc())} 2020-10-10 19:02:00 INFO: skip by not found init order into storage 2020-10-10 19:02:00 INFO: clearing end 2020-10-10 19:02:00 INFO: 2020-10-10 19:02:00 INFO: 2020-10-10 19:02:00 INFO: 2020-10-10 19:02:00 INFO: 2020-10-10 20:00:20 INFO: 2020-10-10 20:00:20 INFO: 2020-10-10 20:00:20 INFO: 2020-10-10 20:00:20 INFO: 2020-10-10 20:00:20 INFO: init new order start 2020-10-10 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 10, 10, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 372.95, 'high': 374.2, 'low': 372.1, 'close': 373.5, 'trades': 2165, 'volume': 1316928, 'vwap': 373.35, 'lastSize': 220, 'turnover': 49167332410, 'homeNotional': 14941.25614103204, 'foreignNotional': 5578301.120349232}, {'timestamp': datetime.datetime(2020, 10, 10, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 374.2, 'high': 376.3, 'low': 372.4, 'close': 372.95, 'trades': 2897, 'volume': 2226681, 'vwap': 374.34, 'lastSize': 238, 'turnover': 83351680970, 'homeNotional': 25313.063747449323, 'foreignNotional': 9475515.3905931}, {'timestamp': datetime.datetime(2020, 10, 10, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 374.65, 'high': 374.9, 'low': 372.85, 'close': 374.2, 'trades': 2359, 'volume': 1663846, 'vwap': 374.02, 'lastSize': 7, 'turnover': 62230964275, 'homeNotional': 18885.02854488916, 'foreignNotional': 7063358.922279374}] 2020-10-10 20:00:20 INFO: prepare candles [CandleItem(low=372.1, high=374.2, open=372.95, close=373.5, color='GREEN'), CandleItem(low=372.4, high=376.3, open=374.2, close=372.95, color='RED'), CandleItem(low=372.85, high=374.9, open=374.65, close=374.2, color='RED')] 2020-10-10 20:00:20 INFO: last_candle=CandleItem(low=372.1, high=374.2, open=372.95, close=373.5, color='GREEN') 2020-10-10 20:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-10-10 20:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=372.1, high=374.2, open=372.95, close=373.5, color='GREEN') 2020-10-10 20:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=372.4, high=376.3, open=374.2, close=372.95, color='RED') 2020-10-10 20:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=372.85, high=374.9, open=374.65, close=374.2, color='RED') 2020-10-10 20:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=372.1, high=374.2, open=372.95, close=373.5, color='GREEN'), take_profit_factor=6.0, clearing_interval=3600) 2020-10-10 20:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=372.1, high=374.2, open=372.95, close=373.5, color='GREEN'), take_profit_factor=6.0, clearing_interval=3600) 2020-10-10 20:00:20 INFO: place order: start candle=CandleItem(low=372.1, high=374.2, open=372.95, close=373.5, color='GREEN') ticker='ETHUSD' price_offset=0.1 2020-10-10 20:00:20 INFO: place order: side_factor=-1 init_trigger_price=374.25 init_order_price=374.3 stop_price_offset=0.0 candle.size=2.099999999999966 stop_price=372.1 take_price=386.8999999999998 2020-10-10 20:00:20 INFO: place order round: side_factor=-1 init_trigger_price=Decimal('374.25') init_order_price=Decimal('374.30000000000001136868377216160297393798828125') stop_price_offset=0.0 candle.size=2.099999999999966 stop_price=Decimal('372.1000000000000227373675443232059478759765625') take_price=Decimal('386.89999999999980673237587325274944305419921875') 2020-10-10 20:00:20 INFO: place order: compute qty=884 2020-10-10 20:00:20 INFO: place order: save order to db d8681269022f4592be086bad6426381a; response=True 2020-10-10 20:00:20 INFO: process event {'orderID': '9298b762-d0ae-47a3-b59c-95037133a7dd', 'clOrdID': 'd8681269022f4592be086bad6426381a', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 884, 'price': 374.3, 'displayQty': None, 'stopPx': 374.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '',