2020-09-07 16:00:20 INFO: prepare candles [CandleItem(low=323.8, high=338.25, open=336.2, close=328.6, color='RED'), CandleItem(low=332.25, high=344.6, open=339.85, close=336.2, color='RED'), CandleItem(low=339.25, high=346.3, open=344.25, close=339.85, color='RED')] 2020-09-07 16:00:20 INFO: skip by colors first_candle=CandleItem(low=339.25, high=346.3, open=344.25, close=339.85, color='RED') second_candle=CandleItem(low=332.25, high=344.6, open=339.85, close=336.2, color='RED') last_candle=CandleItem(low=323.8, high=338.25, open=336.2, close=328.6, color='RED') 2020-09-07 16:00:20 INFO: check need new order None 2020-09-07 16:00:20 INFO: init new order end 2020-09-07 16:00:20 INFO: 2020-09-07 16:00:20 INFO: 2020-09-07 16:00:20 INFO: 2020-09-07 16:00:20 INFO: 2020-09-07 16:02:00 INFO: 2020-09-07 16:02:00 INFO: 2020-09-07 16:02:00 INFO: 2020-09-07 16:02:00 INFO: 2020-09-07 16:02:00 INFO: clearing start 2020-09-07 16:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd96b6dfb-1d4f-dea2-afc4-e23a6a6692a2', 'clOrdID': '8ed86a87fd4047ac952775b7b0f806bc', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 330, 'price': None, 'displayQty': None, 'stopPx': 348.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': 330, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 7, 10, 3, 52, 14000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 7, 10, 3, 52, 14000, tzinfo=tzutc())} 2020-09-07 16:02:00 INFO: skip by not found init order into storage 2020-09-07 16:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '57ec4b44-46d1-1281-c9ca-e8364a8ef74d', 'clOrdID': '1b006538f0a14835aa04ecd92477a585', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 330, 'price': 314.6, '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': 330, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 7, 10, 3, 52, 58000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 7, 10, 3, 52, 58000, tzinfo=tzutc())} 2020-09-07 16:02:00 INFO: skip by not found init order into storage 2020-09-07 16:02:00 INFO: clearing end 2020-09-07 16:02:00 INFO: 2020-09-07 16:02:00 INFO: 2020-09-07 16:02:00 INFO: 2020-09-07 16:02:00 INFO: 2020-09-07 17:00:20 INFO: 2020-09-07 17:00:20 INFO: 2020-09-07 17:00:20 INFO: 2020-09-07 17:00:20 INFO: 2020-09-07 17:00:20 INFO: init new order start 2020-09-07 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 7, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 328.6, 'high': 341.6, 'low': 324.95, 'close': 337.8, 'trades': 15700, 'volume': 14342126, 'vwap': 334.78, 'lastSize': 449, 'turnover': 480140704260, 'homeNotional': 143718.35472575008, 'foreignNotional': 48117071.88926171}, {'timestamp': datetime.datetime(2020, 9, 7, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 336.2, 'high': 338.25, 'low': 323.8, 'close': 328.6, 'trades': 14303, 'volume': 12879029, 'vwap': 330.45, 'lastSize': 2, 'turnover': 425586799195, 'homeNotional': 128343.60561934632, 'foreignNotional': 42413281.485655725}, {'timestamp': datetime.datetime(2020, 9, 7, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.85, 'high': 344.6, 'low': 332.25, 'close': 336.2, 'trades': 11766, 'volume': 11198425, 'vwap': 337.87, 'lastSize': 200, 'turnover': 378352022715, 'homeNotional': 112537.61604077271, 'foreignNotional': 38023474.96841132}] 2020-09-07 17:00:20 INFO: prepare candles [CandleItem(low=324.95, high=341.6, open=328.6, close=337.8, color='GREEN'), CandleItem(low=323.8, high=338.25, open=336.2, close=328.6, color='RED'), CandleItem(low=332.25, high=344.6, open=339.85, close=336.2, color='RED')] 2020-09-07 17:00:20 INFO: last_candle=CandleItem(low=324.95, high=341.6, open=328.6, close=337.8, color='GREEN') 2020-09-07 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-09-07 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=324.95, high=341.6, open=328.6, close=337.8, color='GREEN') 2020-09-07 17:00:20 INFO: skip by CandleItem(low=324.95, high=341.6, open=328.6, close=337.8, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-07 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-09-07 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=324.95, high=341.6, open=328.6, close=337.8, color='GREEN') 2020-09-07 17:00:20 INFO: skip by CandleItem(low=324.95, high=341.6, open=328.6, close=337.8, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-07 17:00:20 INFO: not found applicable config for candle 2020-09-07 17:00:20 INFO: check need new order None 2020-09-07 17:00:20 INFO: init new order end 2020-09-07 17:00:20 INFO: 2020-09-07 17:00:20 INFO: 2020-09-07 17:00:20 INFO: 2020-09-07 17:00:20 INFO: 2020-09-07 17:02:00 INFO: 2020-09-07 17:02:00 INFO: 2020-09-07 17:02:00 INFO: 2020-09-07 17:02:00 INFO: 2020-09-07 17:02:00 INFO: clearing start 2020-09-07 17:02:01 INFO: fetch_orders_for_clearing test order {'orderID': 'd96b6dfb-1d4f-dea2-afc4-e23a6a6692a2', 'clOrdID': '8ed86a87fd4047ac952775b7b0f806bc', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 330, 'price': None, 'displayQty': None, 'stopPx': 348.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': 330, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 7, 10, 3, 52, 14000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 7, 10, 3, 52, 14000, tzinfo=tzutc())} 2020-09-07 17:02:01 INFO: skip by not found init order into storage 2020-09-07 17:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '57ec4b44-46d1-1281-c9ca-e8364a8ef74d', 'clOrdID': '1b006538f0a14835aa04ecd92477a585', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 330, 'price': 314.6, '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': 330, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 7, 10, 3, 52, 58000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 7, 10, 3, 52, 58000, tzinfo=tzutc())} 2020-09-07 17:02:01 INFO: skip by not found init order into storage 2020-09-07 17:02:01 INFO: clearing end 2020-09-07 17:02:01 INFO: 2020-09-07 17:02:01 INFO: 2020-09-07 17:02:01 INFO: 2020-09-07 17:02:01 INFO: 2020-09-07 18:00:20 INFO: 2020-09-07 18:00:20 INFO: 2020-09-07 18:00:20 INFO: 2020-09-07 18:00:20 INFO: 2020-09-07 18:00:20 INFO: init new order start 2020-09-07 18:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 7, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 337.8, 'high': 339.8, 'low': 332.95, 'close': 334.95, 'trades': 6923, 'volume': 5850686, 'vwap': 336.33, 'lastSize': 8, 'turnover': 196775034700, 'homeNotional': 58778.08749626232, 'foreignNotional': 19769006.630327582}, {'timestamp': datetime.datetime(2020, 9, 7, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 328.6, 'high': 341.6, 'low': 324.95, 'close': 337.8, 'trades': 15700, 'volume': 14342126, 'vwap': 334.78, 'lastSize': 449, 'turnover': 480140704260, 'homeNotional': 143718.35472575008, 'foreignNotional': 48117071.88926171}, {'timestamp': datetime.datetime(2020, 9, 7, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 336.2, 'high': 338.25, 'low': 323.8, 'close': 328.6, 'trades': 14303, 'volume': 12879029, 'vwap': 330.45, 'lastSize': 2, 'turnover': 425586799195, 'homeNotional': 128343.60561934632, 'foreignNotional': 42413281.485655725}] 2020-09-07 18:00:20 INFO: prepare candles [CandleItem(low=332.95, high=339.8, open=337.8, close=334.95, color='RED'), CandleItem(low=324.95, high=341.6, open=328.6, close=337.8, color='GREEN'), CandleItem(low=323.8, high=338.25, open=336.2, close=328.6, color='RED')] 2020-09-07 18:00:20 INFO: skip by colors first_candle=CandleItem(low=323.8, high=338.25, open=336.2, close=328.6, color='RED') second_candle=CandleItem(low=324.95, high=341.6, open=328.6, close=337.8, color='GREEN') last_candle=CandleItem(low=332.95, high=339.8, open=337.8, close=334.95, color='RED') 2020-09-07 18:00:20 INFO: check need new order None 2020-09-07 18:00:20 INFO: init new order end 2020-09-07 18:00:20 INFO: 2020-09-07 18:00:20 INFO: 2020-09-07 18:00:20 INFO: 2020-09-07 18:00:20 INFO: 2020-09-07 18:02:00 INFO: 2020-09-07 18:02:00 INFO: 2020-09-07 18:02:00 INFO: 2020-09-07 18:02:00 INFO: 2020-09-07 18:02:00 INFO: clearing start 2020-09-07 18:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd96b6dfb-1d4f-dea2-afc4-e23a6a6692a2', 'clOrdID': '8ed86a87fd4047ac952775b7b0f806bc', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 330, 'price': None, 'displayQty': None, 'stopPx': 348.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': 330, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 7, 10, 3, 52, 14000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 7, 10, 3, 52, 14000, tzinfo=tzutc())} 2020-09-07 18:02:00 INFO: skip by not found init order into storage 2020-09-07 18:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '57ec4b44-46d1-1281-c9ca-e8364a8ef74d', 'clOrdID': '1b006538f0a14835aa04ecd92477a585', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 330, 'price': 314.6, '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': 330, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 7, 10, 3, 52, 58000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 7, 10, 3, 52, 58000, tzinfo=tzutc())} 2020-09-07 18:02:00 INFO: skip by not found init order into storage 2020-09-07 18:02:00 INFO: clearing end 2020-09-07 18:02:00 INFO: 2020-09-07 18:02:00 INFO: 2020-09-07 18:02:00 INFO: 2020-09-07 18:02:00 INFO: 2020-09-07 19:00:20 INFO: 2020-09-07 19:00:20 INFO: 2020-09-07 19:00:20 INFO: 2020-09-07 19:00:20 INFO: 2020-09-07 19:00:20 INFO: init new order start 2020-09-07 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 7, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 334.95, 'high': 347.55, 'low': 332.6, 'close': 346.55, 'trades': 9864, 'volume': 7242374, 'vwap': 342.51, 'lastSize': 200, 'turnover': 248054569820, 'homeNotional': 73144.50269500399, 'foreignNotional': 25053571.542522687}, {'timestamp': datetime.datetime(2020, 9, 7, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 337.8, 'high': 339.8, 'low': 332.95, 'close': 334.95, 'trades': 6923, 'volume': 5850686, 'vwap': 336.33, 'lastSize': 8, 'turnover': 196775034700, 'homeNotional': 58778.08749626232, 'foreignNotional': 19769006.630327582}, {'timestamp': datetime.datetime(2020, 9, 7, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 328.6, 'high': 341.6, 'low': 324.95, 'close': 337.8, 'trades': 15700, 'volume': 14342126, 'vwap': 334.78, 'lastSize': 449, 'turnover': 480140704260, 'homeNotional': 143718.35472575008, 'foreignNotional': 48117071.88926171}] 2020-09-07 19:00:20 INFO: prepare candles [CandleItem(low=332.6, high=347.55, open=334.95, close=346.55, color='GREEN'), CandleItem(low=332.95, high=339.8, open=337.8, close=334.95, color='RED'), CandleItem(low=324.95, high=341.6, open=328.6, close=337.8, color='GREEN')] 2020-09-07 19:00:20 INFO: skip by colors first_candle=CandleItem(low=324.95, high=341.6, open=328.6, close=337.8, color='GREEN') second_candle=CandleItem(low=332.95, high=339.8, open=337.8, close=334.95, color='RED') last_candle=CandleItem(low=332.6, high=347.55, open=334.95, close=346.55, color='GREEN') 2020-09-07 19:00:20 INFO: check need new order None 2020-09-07 19:00:20 INFO: init new order end 2020-09-07 19:00:20 INFO: 2020-09-07 19:00:20 INFO: 2020-09-07 19:00:20 INFO: 2020-09-07 19:00:20 INFO: 2020-09-07 19:02:00 INFO: 2020-09-07 19:02:00 INFO: 2020-09-07 19:02:00 INFO: 2020-09-07 19:02:00 INFO: 2020-09-07 19:02:00 INFO: clearing start 2020-09-07 19:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd96b6dfb-1d4f-dea2-afc4-e23a6a6692a2', 'clOrdID': '8ed86a87fd4047ac952775b7b0f806bc', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 330, 'price': None, 'displayQty': None, 'stopPx': 348.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': 330, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 7, 10, 3, 52, 14000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 7, 10, 3, 52, 14000, tzinfo=tzutc())} 2020-09-07 19:02:00 INFO: skip by not found init order into storage 2020-09-07 19:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '57ec4b44-46d1-1281-c9ca-e8364a8ef74d', 'clOrdID': '1b006538f0a14835aa04ecd92477a585', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 330, 'price': 314.6, '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': 330, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 7, 10, 3, 52, 58000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 7, 10, 3, 52, 58000, tzinfo=tzutc())} 2020-09-07 19:02:00 INFO: skip by not found init order into storage 2020-09-07 19:02:00 INFO: clearing end 2020-09-07 19:02:00 INFO: 2020-09-07 19:02:00 INFO: 2020-09-07 19:02:00 INFO: 2020-09-07 19:02:00 INFO: 2020-09-07 19:06:36 INFO: process event {'orderID': 'd96b6dfb-1d4f-dea2-afc4-e23a6a6692a2', 'price': 348.95, 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 330, 'avgPx': 348.95, 'text': 'Triggered: Order stop price reached\nStop order by trader.py', 'transactTime': '2020-09-07T16:06:35.953Z', 'timestamp': '2020-09-07T16:06:35.953Z', 'clOrdID': '8ed86a87fd4047ac952775b7b0f806bc', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-07 19:06:36 INFO: add new event={'uid': '8ed86a87fd4047ac952775b7b0f806bc', 'status': 'Filled'} 2020-09-07 19:06:36 INFO: 2020-09-07 19:06:36 INFO: 2020-09-07 19:06:36 INFO: 2020-09-07 19:06:36 INFO: 2020-09-07 19:06:36 INFO: process event start 2020-09-07 19:06:36 INFO: fetch new order event 8ed86a87fd4047ac952775b7b0f806bc 2020-09-07 19:06:36 INFO: fetch orders by event init=None profit_pair=1b006538f0a14835aa04ecd92477a585 2020-09-07 19:06:36 INFO: process profit order filled 2020-09-07 19:06:36 INFO: cancel order=1b006538f0a14835aa04ecd92477a585 [{'orderID': '57ec4b44-46d1-1281-c9ca-e8364a8ef74d', 'clOrdID': '1b006538f0a14835aa04ecd92477a585', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 330, 'price': 314.6, '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, 7, 10, 3, 52, 58000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 7, 16, 6, 36, 628000, tzinfo=tzutc())}] 2020-09-07 19:06:36 INFO: process event {'orderID': '57ec4b44-46d1-1281-c9ca-e8364a8ef74d', 'ordStatus': 'Canceled', 'workingIndicator': False, 'leavesQty': 0, 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'timestamp': '2020-09-07T16:06:36.628Z', 'clOrdID': '1b006538f0a14835aa04ecd92477a585', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-07 19:06:36 INFO: skip event 1b006538f0a14835aa04ecd92477a585 Canceled 2020-09-07 19:06:36 INFO: end process event_processing_result='proceed profit order' 2020-09-07 19:06:36 INFO: 2020-09-07 19:06:36 INFO: 2020-09-07 19:06:36 INFO: 2020-09-07 19:06:36 INFO: 2020-09-07 20:00:20 INFO: 2020-09-07 20:00:20 INFO: 2020-09-07 20:00:20 INFO: 2020-09-07 20:00:20 INFO: 2020-09-07 20:00:20 INFO: init new order start 2020-09-07 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 7, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.55, 'high': 353.45, 'low': 344.5, 'close': 349.2, 'trades': 9059, 'volume': 7069665, 'vwap': 349.05, 'lastSize': 483, 'turnover': 246764190020, 'homeNotional': 71962.60962131497, 'foreignNotional': 25118511.25996407}, {'timestamp': datetime.datetime(2020, 9, 7, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 334.95, 'high': 347.55, 'low': 332.6, 'close': 346.55, 'trades': 9864, 'volume': 7242374, 'vwap': 342.51, 'lastSize': 200, 'turnover': 248054569820, 'homeNotional': 73144.50269500399, 'foreignNotional': 25053571.542522687}, {'timestamp': datetime.datetime(2020, 9, 7, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 337.8, 'high': 339.8, 'low': 332.95, 'close': 334.95, 'trades': 6923, 'volume': 5850686, 'vwap': 336.33, 'lastSize': 8, 'turnover': 196775034700, 'homeNotional': 58778.08749626232, 'foreignNotional': 19769006.630327582}] 2020-09-07 20:00:20 INFO: prepare candles [CandleItem(low=344.5, high=353.45, open=346.55, close=349.2, color='GREEN'), CandleItem(low=332.6, high=347.55, open=334.95, close=346.55, color='GREEN'), CandleItem(low=332.95, high=339.8, open=337.8, close=334.95, color='RED')] 2020-09-07 20:00:20 INFO: skip by colors first_candle=CandleItem(low=332.95, high=339.8, open=337.8, close=334.95, color='RED') second_candle=CandleItem(low=332.6, high=347.55, open=334.95, close=346.55, color='GREEN') last_candle=CandleItem(low=344.5, high=353.45, open=346.55, close=349.2, color='GREEN') 2020-09-07 20:00:20 INFO: check need new order None 2020-09-07 20:00:20 INFO: init new order end 2020-09-07 20:00:20 INFO: 2020-09-07 20:00:20 INFO: 2020-09-07 20:00:20 INFO: 2020-09-07 20:00:20 INFO: 2020-09-07 20:02:00 INFO: 2020-09-07 20:02:00 INFO: 2020-09-07 20:02:00 INFO: 2020-09-07 20:02:00 INFO: 2020-09-07 20:02:00 INFO: clearing start 2020-09-07 20:02:00 INFO: clearing end 2020-09-07 20:02:00 INFO: 2020-09-07 20:02:00 INFO: 2020-09-07 20:02:00 INFO: 2020-09-07 20:02:00 INFO: 2020-09-07 21:00:20 INFO: 2020-09-07 21:00:20 INFO: 2020-09-07 21:00:20 INFO: 2020-09-07 21:00:20 INFO: 2020-09-07 21:00:20 INFO: init new order start 2020-09-07 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 7, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.2, 'high': 349.45, 'low': 346.25, 'close': 346.9, 'trades': 2847, 'volume': 1723230, 'vwap': 347.57, 'lastSize': 20, 'turnover': 59893360300, 'homeNotional': 17534.94542195711, 'foreignNotional': 6094534.362889576}, {'timestamp': datetime.datetime(2020, 9, 7, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.55, 'high': 353.45, 'low': 344.5, 'close': 349.2, 'trades': 9059, 'volume': 7069665, 'vwap': 349.05, 'lastSize': 483, 'turnover': 246764190020, 'homeNotional': 71962.60962131497, 'foreignNotional': 25118511.25996407}, {'timestamp': datetime.datetime(2020, 9, 7, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 334.95, 'high': 347.55, 'low': 332.6, 'close': 346.55, 'trades': 9864, 'volume': 7242374, 'vwap': 342.51, 'lastSize': 200, 'turnover': 248054569820, 'homeNotional': 73144.50269500399, 'foreignNotional': 25053571.542522687}] 2020-09-07 21:00:20 INFO: prepare candles [CandleItem(low=346.25, high=349.45, open=349.2, close=346.9, color='RED'), CandleItem(low=344.5, high=353.45, open=346.55, close=349.2, color='GREEN'), CandleItem(low=332.6, high=347.55, open=334.95, close=346.55, color='GREEN')] 2020-09-07 21:00:20 INFO: last_candle=CandleItem(low=346.25, high=349.45, open=349.2, close=346.9, color='RED') 2020-09-07 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-07 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=346.25, high=349.45, open=349.2, close=346.9, color='RED') 2020-09-07 21:00:20 INFO: skip by CandleItem(low=346.25, high=349.45, open=349.2, close=346.9, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-07 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-07 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=346.25, high=349.45, open=349.2, close=346.9, color='RED') 2020-09-07 21:00:20 INFO: skip by CandleItem(low=346.25, high=349.45, open=349.2, close=346.9, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-07 21:00:20 INFO: not found applicable config for candle 2020-09-07 21:00:20 INFO: check need new order None 2020-09-07 21:00:20 INFO: init new order end 2020-09-07 21:00:20 INFO: 2020-09-07 21:00:20 INFO: 2020-09-07 21:00:20 INFO: 2020-09-07 21:00:20 INFO: 2020-09-07 21:02:00 INFO: 2020-09-07 21:02:00 INFO: 2020-09-07 21:02:00 INFO: 2020-09-07 21:02:00 INFO: 2020-09-07 21:02:00 INFO: clearing start 2020-09-07 21:02:00 INFO: clearing end 2020-09-07 21:02:00 INFO: 2020-09-07 21:02:00 INFO: 2020-09-07 21:02:00 INFO: 2020-09-07 21:02:00 INFO: 2020-09-07 22:00:20 INFO: 2020-09-07 22:00:20 INFO: 2020-09-07 22:00:20 INFO: 2020-09-07 22:00:20 INFO: 2020-09-07 22:00:20 INFO: init new order start 2020-09-07 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 7, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.9, 'high': 349.0, 'low': 345.15, 'close': 347.15, 'trades': 2723, 'volume': 2053405, 'vwap': 347.05, 'lastSize': 13, 'turnover': 71262373260, 'homeNotional': 20889.32816273914, 'foreignNotional': 7249543.031418842}, {'timestamp': datetime.datetime(2020, 9, 7, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.2, 'high': 349.45, 'low': 346.25, 'close': 346.9, 'trades': 2847, 'volume': 1723230, 'vwap': 347.57, 'lastSize': 20, 'turnover': 59893360300, 'homeNotional': 17534.94542195711, 'foreignNotional': 6094534.362889576}, {'timestamp': datetime.datetime(2020, 9, 7, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.55, 'high': 353.45, 'low': 344.5, 'close': 349.2, 'trades': 9059, 'volume': 7069665, 'vwap': 349.05, 'lastSize': 483, 'turnover': 246764190020, 'homeNotional': 71962.60962131497, 'foreignNotional': 25118511.25996407}] 2020-09-07 22:00:20 INFO: prepare candles [CandleItem(low=345.15, high=349.0, open=346.9, close=347.15, color='GREEN'), CandleItem(low=346.25, high=349.45, open=349.2, close=346.9, color='RED'), CandleItem(low=344.5, high=353.45, open=346.55, close=349.2, color='GREEN')] 2020-09-07 22:00:20 INFO: skip by colors first_candle=CandleItem(low=344.5, high=353.45, open=346.55, close=349.2, color='GREEN') second_candle=CandleItem(low=346.25, high=349.45, open=349.2, close=346.9, color='RED') last_candle=CandleItem(low=345.15, high=349.0, open=346.9, close=347.15, color='GREEN') 2020-09-07 22:00:20 INFO: check need new order None 2020-09-07 22:00:20 INFO: init new order end 2020-09-07 22:00:20 INFO: 2020-09-07 22:00:20 INFO: 2020-09-07 22:00:20 INFO: 2020-09-07 22:00:20 INFO: 2020-09-07 22:02:00 INFO: 2020-09-07 22:02:00 INFO: 2020-09-07 22:02:00 INFO: 2020-09-07 22:02:00 INFO: 2020-09-07 22:02:00 INFO: clearing start 2020-09-07 22:02:00 INFO: clearing end 2020-09-07 22:02:00 INFO: 2020-09-07 22:02:00 INFO: 2020-09-07 22:02:00 INFO: 2020-09-07 22:02:00 INFO: 2020-09-07 23:00:20 INFO: 2020-09-07 23:00:20 INFO: 2020-09-07 23:00:20 INFO: 2020-09-07 23:00:20 INFO: 2020-09-07 23:00:20 INFO: init new order start 2020-09-07 23:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 7, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.15, 'high': 350.45, 'low': 345.2, 'close': 346.55, 'trades': 3651, 'volume': 4263350, 'vwap': 347.64, 'lastSize': 50, 'turnover': 148207320975, 'homeNotional': 43376.612954844524, 'foreignNotional': 15079180.3500331}, {'timestamp': datetime.datetime(2020, 9, 7, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.9, 'high': 349.0, 'low': 345.15, 'close': 347.15, 'trades': 2723, 'volume': 2053405, 'vwap': 347.05, 'lastSize': 13, 'turnover': 71262373260, 'homeNotional': 20889.32816273914, 'foreignNotional': 7249543.031418842}, {'timestamp': datetime.datetime(2020, 9, 7, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.2, 'high': 349.45, 'low': 346.25, 'close': 346.9, 'trades': 2847, 'volume': 1723230, 'vwap': 347.57, 'lastSize': 20, 'turnover': 59893360300, 'homeNotional': 17534.94542195711, 'foreignNotional': 6094534.362889576}] 2020-09-07 23:00:20 INFO: prepare candles [CandleItem(low=345.2, high=350.45, open=347.15, close=346.55, color='RED'), CandleItem(low=345.15, high=349.0, open=346.9, close=347.15, color='GREEN'), CandleItem(low=346.25, high=349.45, open=349.2, close=346.9, color='RED')] 2020-09-07 23:00:20 INFO: skip by colors first_candle=CandleItem(low=346.25, high=349.45, open=349.2, close=346.9, color='RED') second_candle=CandleItem(low=345.15, high=349.0, open=346.9, close=347.15, color='GREEN') last_candle=CandleItem(low=345.2, high=350.45, open=347.15, close=346.55, color='RED') 2020-09-07 23:00:20 INFO: check need new order None 2020-09-07 23:00:20 INFO: init new order end 2020-09-07 23:00:20 INFO: 2020-09-07 23:00:20 INFO: 2020-09-07 23:00:20 INFO: 2020-09-07 23:00:20 INFO: 2020-09-07 23:02:00 INFO: 2020-09-07 23:02:00 INFO: 2020-09-07 23:02:00 INFO: 2020-09-07 23:02:00 INFO: 2020-09-07 23:02:00 INFO: clearing start 2020-09-07 23:02:00 INFO: clearing end 2020-09-07 23:02:00 INFO: 2020-09-07 23:02:00 INFO: 2020-09-07 23:02:00 INFO: 2020-09-07 23:02:00 INFO: 2020-09-08 00:00:20 INFO: 2020-09-08 00:00:20 INFO: 2020-09-08 00:00:20 INFO: 2020-09-08 00:00:20 INFO: 2020-09-08 00:00:20 INFO: init new order start 2020-09-08 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 7, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.55, 'high': 346.75, 'low': 342.85, 'close': 345.65, 'trades': 3585, 'volume': 3125445, 'vwap': 345.02, 'lastSize': 5671, 'turnover': 107831791125, 'homeNotional': 31648.78628929226, 'foreignNotional': 10919275.69753022}, {'timestamp': datetime.datetime(2020, 9, 7, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.15, 'high': 350.45, 'low': 345.2, 'close': 346.55, 'trades': 3651, 'volume': 4263350, 'vwap': 347.64, 'lastSize': 50, 'turnover': 148207320975, 'homeNotional': 43376.612954844524, 'foreignNotional': 15079180.3500331}, {'timestamp': datetime.datetime(2020, 9, 7, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.9, 'high': 349.0, 'low': 345.15, 'close': 347.15, 'trades': 2723, 'volume': 2053405, 'vwap': 347.05, 'lastSize': 13, 'turnover': 71262373260, 'homeNotional': 20889.32816273914, 'foreignNotional': 7249543.031418842}] 2020-09-08 00:00:20 INFO: prepare candles [CandleItem(low=342.85, high=346.75, open=346.55, close=345.65, color='RED'), CandleItem(low=345.2, high=350.45, open=347.15, close=346.55, color='RED'), CandleItem(low=345.15, high=349.0, open=346.9, close=347.15, color='GREEN')] 2020-09-08 00:00:20 INFO: skip by colors first_candle=CandleItem(low=345.15, high=349.0, open=346.9, close=347.15, color='GREEN') second_candle=CandleItem(low=345.2, high=350.45, open=347.15, close=346.55, color='RED') last_candle=CandleItem(low=342.85, high=346.75, open=346.55, close=345.65, color='RED') 2020-09-08 00:00:20 INFO: check need new order None 2020-09-08 00:00:20 INFO: init new order end 2020-09-08 00:00:20 INFO: 2020-09-08 00:00:20 INFO: 2020-09-08 00:00:20 INFO: 2020-09-08 00:00:20 INFO: 2020-09-08 00:02:00 INFO: 2020-09-08 00:02:00 INFO: 2020-09-08 00:02:00 INFO: 2020-09-08 00:02:00 INFO: 2020-09-08 00:02:00 INFO: clearing start 2020-09-08 00:02:00 INFO: clearing end 2020-09-08 00:02:00 INFO: 2020-09-08 00:02:00 INFO: 2020-09-08 00:02:00 INFO: 2020-09-08 00:02:00 INFO: 2020-09-08 01:00:20 INFO: 2020-09-08 01:00:20 INFO: 2020-09-08 01:00:20 INFO: 2020-09-08 01:00:20 INFO: 2020-09-08 01:00:20 INFO: init new order start 2020-09-08 01:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 7, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 345.65, 'high': 349.1, 'low': 344.25, 'close': 345.2, 'trades': 2761, 'volume': 2228876, 'vwap': 346.98, 'lastSize': 50, 'turnover': 77337152210, 'homeNotional': 22659.453820369257, 'foreignNotional': 7862348.062131296}, {'timestamp': datetime.datetime(2020, 9, 7, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.55, 'high': 346.75, 'low': 342.85, 'close': 345.65, 'trades': 3585, 'volume': 3125445, 'vwap': 345.02, 'lastSize': 5671, 'turnover': 107831791125, 'homeNotional': 31648.78628929226, 'foreignNotional': 10919275.69753022}, {'timestamp': datetime.datetime(2020, 9, 7, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.15, 'high': 350.45, 'low': 345.2, 'close': 346.55, 'trades': 3651, 'volume': 4263350, 'vwap': 347.64, 'lastSize': 50, 'turnover': 148207320975, 'homeNotional': 43376.612954844524, 'foreignNotional': 15079180.3500331}] 2020-09-08 01:00:21 INFO: prepare candles [CandleItem(low=344.25, high=349.1, open=345.65, close=345.2, color='RED'), CandleItem(low=342.85, high=346.75, open=346.55, close=345.65, color='RED'), CandleItem(low=345.2, high=350.45, open=347.15, close=346.55, color='RED')] 2020-09-08 01:00:21 INFO: skip by colors first_candle=CandleItem(low=345.2, high=350.45, open=347.15, close=346.55, color='RED') second_candle=CandleItem(low=342.85, high=346.75, open=346.55, close=345.65, color='RED') last_candle=CandleItem(low=344.25, high=349.1, open=345.65, close=345.2, color='RED') 2020-09-08 01:00:21 INFO: check need new order None 2020-09-08 01:00:21 INFO: init new order end 2020-09-08 01:00:21 INFO: 2020-09-08 01:00:21 INFO: 2020-09-08 01:00:21 INFO: 2020-09-08 01:00:21 INFO: 2020-09-08 01:02:00 INFO: 2020-09-08 01:02:00 INFO: 2020-09-08 01:02:00 INFO: 2020-09-08 01:02:00 INFO: 2020-09-08 01:02:00 INFO: clearing start 2020-09-08 01:02:01 INFO: clearing end 2020-09-08 01:02:01 INFO: 2020-09-08 01:02:01 INFO: 2020-09-08 01:02:01 INFO: 2020-09-08 01:02:01 INFO: 2020-09-08 02:00:20 INFO: 2020-09-08 02:00:20 INFO: 2020-09-08 02:00:20 INFO: 2020-09-08 02:00:20 INFO: 2020-09-08 02:00:20 INFO: init new order start 2020-09-08 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 7, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 345.2, 'high': 355.9, 'low': 345.2, 'close': 352.8, 'trades': 9173, 'volume': 6793211, 'vwap': 352.19, 'lastSize': 10, 'turnover': 239249711935, 'homeNotional': 70094.3275420716, 'foreignNotional': 24687276.11276045}, {'timestamp': datetime.datetime(2020, 9, 7, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 345.65, 'high': 349.1, 'low': 344.25, 'close': 345.2, 'trades': 2761, 'volume': 2228876, 'vwap': 346.98, 'lastSize': 50, 'turnover': 77337152210, 'homeNotional': 22659.453820369257, 'foreignNotional': 7862348.062131296}, {'timestamp': datetime.datetime(2020, 9, 7, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.55, 'high': 346.75, 'low': 342.85, 'close': 345.65, 'trades': 3585, 'volume': 3125445, 'vwap': 345.02, 'lastSize': 5671, 'turnover': 107831791125, 'homeNotional': 31648.78628929226, 'foreignNotional': 10919275.69753022}] 2020-09-08 02:00:20 INFO: prepare candles [CandleItem(low=345.2, high=355.9, open=345.2, close=352.8, color='GREEN'), CandleItem(low=344.25, high=349.1, open=345.65, close=345.2, color='RED'), CandleItem(low=342.85, high=346.75, open=346.55, close=345.65, color='RED')] 2020-09-08 02:00:20 INFO: last_candle=CandleItem(low=345.2, high=355.9, open=345.2, close=352.8, color='GREEN') 2020-09-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-09-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=345.2, high=355.9, open=345.2, close=352.8, color='GREEN') 2020-09-08 02:00:20 INFO: skip by CandleItem(low=345.2, high=355.9, open=345.2, close=352.8, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-08 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-09-08 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=345.2, high=355.9, open=345.2, close=352.8, color='GREEN') 2020-09-08 02:00:20 INFO: skip by CandleItem(low=345.2, high=355.9, open=345.2, close=352.8, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-08 02:00:20 INFO: not found applicable config for candle 2020-09-08 02:00:20 INFO: check need new order None 2020-09-08 02:00:20 INFO: init new order end 2020-09-08 02:00:20 INFO: 2020-09-08 02:00:20 INFO: 2020-09-08 02:00:20 INFO: 2020-09-08 02:00:20 INFO: 2020-09-08 02:02:00 INFO: 2020-09-08 02:02:00 INFO: 2020-09-08 02:02:00 INFO: 2020-09-08 02:02:00 INFO: 2020-09-08 02:02:00 INFO: clearing start 2020-09-08 02:02:00 INFO: clearing end 2020-09-08 02:02:00 INFO: 2020-09-08 02:02:00 INFO: 2020-09-08 02:02:00 INFO: 2020-09-08 02:02:00 INFO: 2020-09-08 03:00:20 INFO: 2020-09-08 03:00:20 INFO: 2020-09-08 03:00:20 INFO: 2020-09-08 03:00:20 INFO: 2020-09-08 03:00:20 INFO: init new order start 2020-09-08 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 8, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.8, 'high': 355.0, 'low': 351.25, 'close': 354.0, 'trades': 4940, 'volume': 3618004, 'vwap': 353.21, 'lastSize': 300, 'turnover': 127787924300, 'homeNotional': 37542.4949080104, 'foreignNotional': 13260032.795366535}, {'timestamp': datetime.datetime(2020, 9, 7, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 345.2, 'high': 355.9, 'low': 345.2, 'close': 352.8, 'trades': 9173, 'volume': 6793211, 'vwap': 352.19, 'lastSize': 10, 'turnover': 239249711935, 'homeNotional': 70094.3275420716, 'foreignNotional': 24687276.11276045}, {'timestamp': datetime.datetime(2020, 9, 7, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 345.65, 'high': 349.1, 'low': 344.25, 'close': 345.2, 'trades': 2761, 'volume': 2228876, 'vwap': 346.98, 'lastSize': 50, 'turnover': 77337152210, 'homeNotional': 22659.453820369257, 'foreignNotional': 7862348.062131296}] 2020-09-08 03:00:20 INFO: prepare candles [CandleItem(low=351.25, high=355.0, open=352.8, close=354.0, color='GREEN'), CandleItem(low=345.2, high=355.9, open=345.2, close=352.8, color='GREEN'), CandleItem(low=344.25, high=349.1, open=345.65, close=345.2, color='RED')] 2020-09-08 03:00:20 INFO: skip by colors first_candle=CandleItem(low=344.25, high=349.1, open=345.65, close=345.2, color='RED') second_candle=CandleItem(low=345.2, high=355.9, open=345.2, close=352.8, color='GREEN') last_candle=CandleItem(low=351.25, high=355.0, open=352.8, close=354.0, color='GREEN') 2020-09-08 03:00:20 INFO: check need new order None 2020-09-08 03:00:20 INFO: init new order end 2020-09-08 03:00:20 INFO: 2020-09-08 03:00:20 INFO: 2020-09-08 03:00:20 INFO: 2020-09-08 03:00:20 INFO: 2020-09-08 03:02:00 INFO: 2020-09-08 03:02:00 INFO: 2020-09-08 03:02:00 INFO: 2020-09-08 03:02:00 INFO: 2020-09-08 03:02:00 INFO: clearing start 2020-09-08 03:02:00 INFO: clearing end 2020-09-08 03:02:00 INFO: 2020-09-08 03:02:00 INFO: 2020-09-08 03:02:00 INFO: 2020-09-08 03:02:00 INFO: 2020-09-08 04:00:20 INFO: 2020-09-08 04:00:20 INFO: 2020-09-08 04:00:20 INFO: 2020-09-08 04:00:20 INFO: 2020-09-08 04:00:20 INFO: init new order start 2020-09-08 04:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 8, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.0, 'high': 356.8, 'low': 348.65, 'close': 348.65, 'trades': 5842, 'volume': 4892658, 'vwap': 352.83, 'lastSize': 71, 'turnover': 172623375065, 'homeNotional': 50712.55133223677, 'foreignNotional': 17892811.98542802}, {'timestamp': datetime.datetime(2020, 9, 8, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.8, 'high': 355.0, 'low': 351.25, 'close': 354.0, 'trades': 4940, 'volume': 3618004, 'vwap': 353.21, 'lastSize': 300, 'turnover': 127787924300, 'homeNotional': 37542.4949080104, 'foreignNotional': 13260032.795366535}, {'timestamp': datetime.datetime(2020, 9, 7, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 345.2, 'high': 355.9, 'low': 345.2, 'close': 352.8, 'trades': 9173, 'volume': 6793211, 'vwap': 352.19, 'lastSize': 10, 'turnover': 239249711935, 'homeNotional': 70094.3275420716, 'foreignNotional': 24687276.11276045}] 2020-09-08 04:00:20 INFO: prepare candles [CandleItem(low=348.65, high=356.8, open=354.0, close=348.65, color='RED'), CandleItem(low=351.25, high=355.0, open=352.8, close=354.0, color='GREEN'), CandleItem(low=345.2, high=355.9, open=345.2, close=352.8, color='GREEN')] 2020-09-08 04:00:20 INFO: last_candle=CandleItem(low=348.65, high=356.8, open=354.0, close=348.65, color='RED') 2020-09-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-09-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=348.65, high=356.8, open=354.0, close=348.65, color='RED') 2020-09-08 04:00:20 INFO: skip by CandleItem(low=348.65, high=356.8, open=354.0, close=348.65, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-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-09-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=348.65, high=356.8, open=354.0, close=348.65, color='RED') 2020-09-08 04:00:20 INFO: skip by CandleItem(low=348.65, high=356.8, open=354.0, close=348.65, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-08 04:00:20 INFO: not found applicable config for candle 2020-09-08 04:00:20 INFO: check need new order None 2020-09-08 04:00:20 INFO: init new order end 2020-09-08 04:00:20 INFO: 2020-09-08 04:00:20 INFO: 2020-09-08 04:00:20 INFO: 2020-09-08 04:00:20 INFO: 2020-09-08 04:02:00 INFO: 2020-09-08 04:02:00 INFO: 2020-09-08 04:02:00 INFO: 2020-09-08 04:02:00 INFO: 2020-09-08 04:02:00 INFO: clearing start 2020-09-08 04:02:00 INFO: clearing end 2020-09-08 04:02:00 INFO: 2020-09-08 04:02:00 INFO: 2020-09-08 04:02:00 INFO: 2020-09-08 04:02:00 INFO: 2020-09-08 05:00:20 INFO: 2020-09-08 05:00:20 INFO: 2020-09-08 05:00:20 INFO: 2020-09-08 05:00:20 INFO: 2020-09-08 05:00:20 INFO: init new order start 2020-09-08 05:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 8, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.65, 'high': 352.25, 'low': 347.65, 'close': 347.65, 'trades': 3049, 'volume': 2679958, 'vwap': 349.92, 'lastSize': 90, 'turnover': 93775296785, 'homeNotional': 27713.898752563335, 'foreignNotional': 9697505.298114572}, {'timestamp': datetime.datetime(2020, 9, 8, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.0, 'high': 356.8, 'low': 348.65, 'close': 348.65, 'trades': 5842, 'volume': 4892658, 'vwap': 352.83, 'lastSize': 71, 'turnover': 172623375065, 'homeNotional': 50712.55133223677, 'foreignNotional': 17892811.98542802}, {'timestamp': datetime.datetime(2020, 9, 8, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.8, 'high': 355.0, 'low': 351.25, 'close': 354.0, 'trades': 4940, 'volume': 3618004, 'vwap': 353.21, 'lastSize': 300, 'turnover': 127787924300, 'homeNotional': 37542.4949080104, 'foreignNotional': 13260032.795366535}] 2020-09-08 05:00:21 INFO: prepare candles [CandleItem(low=347.65, high=352.25, open=348.65, close=347.65, color='RED'), CandleItem(low=348.65, high=356.8, open=354.0, close=348.65, color='RED'), CandleItem(low=351.25, high=355.0, open=352.8, close=354.0, color='GREEN')] 2020-09-08 05:00:21 INFO: skip by colors first_candle=CandleItem(low=351.25, high=355.0, open=352.8, close=354.0, color='GREEN') second_candle=CandleItem(low=348.65, high=356.8, open=354.0, close=348.65, color='RED') last_candle=CandleItem(low=347.65, high=352.25, open=348.65, close=347.65, color='RED') 2020-09-08 05:00:21 INFO: check need new order None 2020-09-08 05:00:21 INFO: init new order end 2020-09-08 05:00:21 INFO: 2020-09-08 05:00:21 INFO: 2020-09-08 05:00:21 INFO: 2020-09-08 05:00:21 INFO: 2020-09-08 05:02:00 INFO: 2020-09-08 05:02:00 INFO: 2020-09-08 05:02:00 INFO: 2020-09-08 05:02:00 INFO: 2020-09-08 05:02:00 INFO: clearing start 2020-09-08 05:02:00 INFO: clearing end 2020-09-08 05:02:00 INFO: 2020-09-08 05:02:00 INFO: 2020-09-08 05:02:00 INFO: 2020-09-08 05:02:00 INFO: 2020-09-08 06:00:20 INFO: 2020-09-08 06:00:20 INFO: 2020-09-08 06:00:20 INFO: 2020-09-08 06:00:20 INFO: 2020-09-08 06:00:20 INFO: init new order start 2020-09-08 06:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 8, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.65, 'high': 352.3, 'low': 347.7, 'close': 351.45, 'trades': 2571, 'volume': 1811434, 'vwap': 350.1, 'lastSize': 10, 'turnover': 63417437795, 'homeNotional': 18723.79029976463, 'foreignNotional': 6555135.325861081}, {'timestamp': datetime.datetime(2020, 9, 8, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.65, 'high': 352.25, 'low': 347.65, 'close': 347.65, 'trades': 3049, 'volume': 2679958, 'vwap': 349.92, 'lastSize': 90, 'turnover': 93775296785, 'homeNotional': 27713.898752563335, 'foreignNotional': 9697505.298114572}, {'timestamp': datetime.datetime(2020, 9, 8, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.0, 'high': 356.8, 'low': 348.65, 'close': 348.65, 'trades': 5842, 'volume': 4892658, 'vwap': 352.83, 'lastSize': 71, 'turnover': 172623375065, 'homeNotional': 50712.55133223677, 'foreignNotional': 17892811.98542802}] 2020-09-08 06:00:21 INFO: prepare candles [CandleItem(low=347.7, high=352.3, open=347.65, close=351.45, color='GREEN'), CandleItem(low=347.65, high=352.25, open=348.65, close=347.65, color='RED'), CandleItem(low=348.65, high=356.8, open=354.0, close=348.65, color='RED')] 2020-09-08 06:00:21 INFO: last_candle=CandleItem(low=347.7, high=352.3, open=347.65, close=351.45, color='GREEN') 2020-09-08 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-09-08 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=347.7, high=352.3, open=347.65, close=351.45, color='GREEN') 2020-09-08 06:00:21 INFO: skip by CandleItem(low=347.7, high=352.3, open=347.65, close=351.45, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-08 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-09-08 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=347.7, high=352.3, open=347.65, close=351.45, color='GREEN') 2020-09-08 06:00:21 INFO: skip by CandleItem(low=347.7, high=352.3, open=347.65, close=351.45, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-08 06:00:21 INFO: not found applicable config for candle 2020-09-08 06:00:21 INFO: check need new order None 2020-09-08 06:00:21 INFO: init new order end 2020-09-08 06:00:21 INFO: 2020-09-08 06:00:21 INFO: 2020-09-08 06:00:21 INFO: 2020-09-08 06:00:21 INFO: 2020-09-08 06:02:00 INFO: 2020-09-08 06:02:00 INFO: 2020-09-08 06:02:00 INFO: 2020-09-08 06:02:00 INFO: 2020-09-08 06:02:00 INFO: clearing start 2020-09-08 06:02:00 INFO: clearing end 2020-09-08 06:02:00 INFO: 2020-09-08 06:02:00 INFO: 2020-09-08 06:02:00 INFO: 2020-09-08 06:02:00 INFO: 2020-09-08 07:00:20 INFO: 2020-09-08 07:00:20 INFO: 2020-09-08 07:00:20 INFO: 2020-09-08 07:00:20 INFO: 2020-09-08 07:00:20 INFO: init new order start 2020-09-08 07:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 8, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.45, 'high': 353.8, 'low': 348.8, 'close': 348.95, 'trades': 2957, 'volume': 2098374, 'vwap': 350.86, 'lastSize': 500, 'turnover': 73622027000, 'homeNotional': 21671.888014904584, 'foreignNotional': 7603699.256980264}, {'timestamp': datetime.datetime(2020, 9, 8, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.65, 'high': 352.3, 'low': 347.7, 'close': 351.45, 'trades': 2571, 'volume': 1811434, 'vwap': 350.1, 'lastSize': 10, 'turnover': 63417437795, 'homeNotional': 18723.79029976463, 'foreignNotional': 6555135.325861081}, {'timestamp': datetime.datetime(2020, 9, 8, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.65, 'high': 352.25, 'low': 347.65, 'close': 347.65, 'trades': 3049, 'volume': 2679958, 'vwap': 349.92, 'lastSize': 90, 'turnover': 93775296785, 'homeNotional': 27713.898752563335, 'foreignNotional': 9697505.298114572}] 2020-09-08 07:00:20 INFO: prepare candles [CandleItem(low=348.8, high=353.8, open=351.45, close=348.95, color='RED'), CandleItem(low=347.7, high=352.3, open=347.65, close=351.45, color='GREEN'), CandleItem(low=347.65, high=352.25, open=348.65, close=347.65, color='RED')] 2020-09-08 07:00:20 INFO: skip by colors first_candle=CandleItem(low=347.65, high=352.25, open=348.65, close=347.65, color='RED') second_candle=CandleItem(low=347.7, high=352.3, open=347.65, close=351.45, color='GREEN') last_candle=CandleItem(low=348.8, high=353.8, open=351.45, close=348.95, color='RED') 2020-09-08 07:00:20 INFO: check need new order None 2020-09-08 07:00:20 INFO: init new order end 2020-09-08 07:00:20 INFO: 2020-09-08 07:00:20 INFO: 2020-09-08 07:00:20 INFO: 2020-09-08 07:00:20 INFO: 2020-09-08 07:02:00 INFO: 2020-09-08 07:02:00 INFO: 2020-09-08 07:02:00 INFO: 2020-09-08 07:02:00 INFO: 2020-09-08 07:02:00 INFO: clearing start 2020-09-08 07:02:00 INFO: clearing end 2020-09-08 07:02:00 INFO: 2020-09-08 07:02:00 INFO: 2020-09-08 07:02:00 INFO: 2020-09-08 07:02:00 INFO: 2020-09-08 08:00:20 INFO: 2020-09-08 08:00:20 INFO: 2020-09-08 08:00:20 INFO: 2020-09-08 08:00:20 INFO: 2020-09-08 08:00:20 INFO: init new order start 2020-09-08 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 8, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.95, 'high': 350.75, 'low': 344.7, 'close': 346.8, 'trades': 3516, 'volume': 3180563, 'vwap': 347.41, 'lastSize': 10, 'turnover': 110493211885, 'homeNotional': 32708.72400462062, 'foreignNotional': 11363170.234039543}, {'timestamp': datetime.datetime(2020, 9, 8, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.45, 'high': 353.8, 'low': 348.8, 'close': 348.95, 'trades': 2957, 'volume': 2098374, 'vwap': 350.86, 'lastSize': 500, 'turnover': 73622027000, 'homeNotional': 21671.888014904584, 'foreignNotional': 7603699.256980264}, {'timestamp': datetime.datetime(2020, 9, 8, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.65, 'high': 352.3, 'low': 347.7, 'close': 351.45, 'trades': 2571, 'volume': 1811434, 'vwap': 350.1, 'lastSize': 10, 'turnover': 63417437795, 'homeNotional': 18723.79029976463, 'foreignNotional': 6555135.325861081}] 2020-09-08 08:00:20 INFO: prepare candles [CandleItem(low=344.7, high=350.75, open=348.95, close=346.8, color='RED'), CandleItem(low=348.8, high=353.8, open=351.45, close=348.95, color='RED'), CandleItem(low=347.7, high=352.3, open=347.65, close=351.45, color='GREEN')] 2020-09-08 08:00:20 INFO: skip by colors first_candle=CandleItem(low=347.7, high=352.3, open=347.65, close=351.45, color='GREEN') second_candle=CandleItem(low=348.8, high=353.8, open=351.45, close=348.95, color='RED') last_candle=CandleItem(low=344.7, high=350.75, open=348.95, close=346.8, color='RED') 2020-09-08 08:00:20 INFO: check need new order None 2020-09-08 08:00:20 INFO: init new order end 2020-09-08 08:00:20 INFO: 2020-09-08 08:00:20 INFO: 2020-09-08 08:00:20 INFO: 2020-09-08 08:00:20 INFO: 2020-09-08 08:02:00 INFO: 2020-09-08 08:02:00 INFO: 2020-09-08 08:02:00 INFO: 2020-09-08 08:02:00 INFO: 2020-09-08 08:02:00 INFO: clearing start 2020-09-08 08:02:00 INFO: clearing end 2020-09-08 08:02:00 INFO: 2020-09-08 08:02:00 INFO: 2020-09-08 08:02:00 INFO: 2020-09-08 08:02:00 INFO: 2020-09-08 09:00:20 INFO: 2020-09-08 09:00:20 INFO: 2020-09-08 09:00:20 INFO: 2020-09-08 09:00:20 INFO: 2020-09-08 09:00:20 INFO: init new order start 2020-09-08 09:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 8, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.8, 'high': 347.5, 'low': 344.45, 'close': 345.1, 'trades': 2589, 'volume': 2111620, 'vwap': 345.78, 'lastSize': 454, 'turnover': 73015025740, 'homeNotional': 21677.41162180072, 'foreignNotional': 7495572.516028639}, {'timestamp': datetime.datetime(2020, 9, 8, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.95, 'high': 350.75, 'low': 344.7, 'close': 346.8, 'trades': 3516, 'volume': 3180563, 'vwap': 347.41, 'lastSize': 10, 'turnover': 110493211885, 'homeNotional': 32708.72400462062, 'foreignNotional': 11363170.234039543}, {'timestamp': datetime.datetime(2020, 9, 8, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.45, 'high': 353.8, 'low': 348.8, 'close': 348.95, 'trades': 2957, 'volume': 2098374, 'vwap': 350.86, 'lastSize': 500, 'turnover': 73622027000, 'homeNotional': 21671.888014904584, 'foreignNotional': 7603699.256980264}] 2020-09-08 09:00:21 INFO: prepare candles [CandleItem(low=344.45, high=347.5, open=346.8, close=345.1, color='RED'), CandleItem(low=344.7, high=350.75, open=348.95, close=346.8, color='RED'), CandleItem(low=348.8, high=353.8, open=351.45, close=348.95, color='RED')] 2020-09-08 09:00:21 INFO: skip by colors first_candle=CandleItem(low=348.8, high=353.8, open=351.45, close=348.95, color='RED') second_candle=CandleItem(low=344.7, high=350.75, open=348.95, close=346.8, color='RED') last_candle=CandleItem(low=344.45, high=347.5, open=346.8, close=345.1, color='RED') 2020-09-08 09:00:21 INFO: check need new order None 2020-09-08 09:00:21 INFO: init new order end 2020-09-08 09:00:21 INFO: 2020-09-08 09:00:21 INFO: 2020-09-08 09:00:21 INFO: 2020-09-08 09:00:21 INFO: 2020-09-08 09:02:00 INFO: 2020-09-08 09:02:00 INFO: 2020-09-08 09:02:00 INFO: 2020-09-08 09:02:00 INFO: 2020-09-08 09:02:00 INFO: clearing start 2020-09-08 09:02:00 INFO: clearing end 2020-09-08 09:02:00 INFO: 2020-09-08 09:02:00 INFO: 2020-09-08 09:02:00 INFO: 2020-09-08 09:02:00 INFO: 2020-09-08 10:00:20 INFO: 2020-09-08 10:00:20 INFO: 2020-09-08 10:00:20 INFO: 2020-09-08 10:00:20 INFO: 2020-09-08 10:00:20 INFO: init new order start 2020-09-08 10:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 8, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 345.1, 'high': 350.7, 'low': 344.8, 'close': 350.1, 'trades': 3623, 'volume': 3961838, 'vwap': 347.17, 'lastSize': 250, 'turnover': 137541219955, 'homeNotional': 40673.34702144161, 'foreignNotional': 14120485.782333596}, {'timestamp': datetime.datetime(2020, 9, 8, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.8, 'high': 347.5, 'low': 344.45, 'close': 345.1, 'trades': 2589, 'volume': 2111620, 'vwap': 345.78, 'lastSize': 454, 'turnover': 73015025740, 'homeNotional': 21677.41162180072, 'foreignNotional': 7495572.516028639}, {'timestamp': datetime.datetime(2020, 9, 8, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.95, 'high': 350.75, 'low': 344.7, 'close': 346.8, 'trades': 3516, 'volume': 3180563, 'vwap': 347.41, 'lastSize': 10, 'turnover': 110493211885, 'homeNotional': 32708.72400462062, 'foreignNotional': 11363170.234039543}] 2020-09-08 10:00:20 INFO: prepare candles [CandleItem(low=344.8, high=350.7, open=345.1, close=350.1, color='GREEN'), CandleItem(low=344.45, high=347.5, open=346.8, close=345.1, color='RED'), CandleItem(low=344.7, high=350.75, open=348.95, close=346.8, color='RED')] 2020-09-08 10:00:20 INFO: last_candle=CandleItem(low=344.8, high=350.7, open=345.1, close=350.1, color='GREEN') 2020-09-08 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-09-08 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=344.8, high=350.7, open=345.1, close=350.1, color='GREEN') 2020-09-08 10:00:20 INFO: skip by CandleItem(low=344.8, high=350.7, open=345.1, close=350.1, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-08 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-09-08 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=344.8, high=350.7, open=345.1, close=350.1, color='GREEN') 2020-09-08 10:00:20 INFO: apply filter None to candle=CandleItem(low=344.45, high=347.5, open=346.8, close=345.1, color='RED') 2020-09-08 10:00:20 INFO: apply filter None to candle=CandleItem(low=344.7, high=350.75, open=348.95, close=346.8, color='RED') 2020-09-08 10:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=344.8, high=350.7, open=345.1, close=350.1, color='GREEN'), take_profit_factor=5.0, clearing_interval=3600) 2020-09-08 10:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=344.8, high=350.7, open=345.1, close=350.1, color='GREEN'), take_profit_factor=5.0, clearing_interval=3600) 2020-09-08 10:00:20 INFO: place order: start candle=CandleItem(low=344.8, high=350.7, open=345.1, close=350.1, color='GREEN') ticker='ETHUSD' price_offset=0.1 2020-09-08 10:00:20 INFO: place order: side_factor=-1 init_trigger_price=350.75 init_order_price=350.8 stop_price_offset=0.0 candle.size=5.899999999999977 stop_price=344.8 take_price=380.2999999999999 2020-09-08 10:00:20 INFO: place order round: side_factor=-1 init_trigger_price=Decimal('350.75') init_order_price=Decimal('350.80000000000001136868377216160297393798828125') stop_price_offset=0.0 candle.size=5.899999999999977 stop_price=Decimal('344.80000000000001136868377216160297393798828125') take_price=Decimal('380.29999999999989768184605054557323455810546875') 2020-09-08 10:00:20 INFO: place order: compute qty=319 2020-09-08 10:00:20 INFO: place order: save order to db 0bd7de2f5ce44a209ab3b16ca66ba3b7; response=True 2020-09-08 10:00:20 INFO: post order to exchange resp={'orderID': '3420ecfd-4d4c-e310-e8ee-582c742d9fb9', 'clOrdID': '0bd7de2f5ce44a209ab3b16ca66ba3b7', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 319, 'price': 350.8, 'displayQty': None, 'stopPx': 350.75, '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': 319, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 8, 7, 0, 20, 689000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 8, 7, 0, 20, 689000, tzinfo=tzutc())} 2020-09-08 10:00:20 INFO: place new init order {'qty': 319, 'init_price': Decimal('350.75'), 'stop_price': Decimal('344.80000000000001136868377216160297393798828125'), 'take_price': Decimal('380.29999999999989768184605054557323455810546875'), 'order_uid': '0bd7de2f5ce44a209ab3b16ca66ba3b7', 'response': {'orderID': '3420ecfd-4d4c-e310-e8ee-582c742d9fb9', 'clOrdID': '0bd7de2f5ce44a209ab3b16ca66ba3b7', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 319, 'price': 350.8, 'displayQty': None, 'stopPx': 350.75, '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': 319, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 8, 7, 0, 20, 689000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 8, 7, 0, 20, 689000, tzinfo=tzutc())}} 2020-09-08 10:00:20 INFO: init new order end 2020-09-08 10:00:20 INFO: 2020-09-08 10:00:20 INFO: 2020-09-08 10:00:20 INFO: 2020-09-08 10:00:20 INFO: 2020-09-08 10:00:20 INFO: process event {'orderID': '3420ecfd-4d4c-e310-e8ee-582c742d9fb9', 'clOrdID': '0bd7de2f5ce44a209ab3b16ca66ba3b7', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 319, 'price': 350.8, 'displayQty': None, 'stopPx': 350.75, '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': 319, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-09-08T07:00:20.689Z', 'timestamp': '2020-09-08T07:00:20.689Z'} 2020-09-08 10:00:20 INFO: skip event 0bd7de2f5ce44a209ab3b16ca66ba3b7 New 2020-09-08 10:02:00 INFO: 2020-09-08 10:02:00 INFO: 2020-09-08 10:02:00 INFO: 2020-09-08 10:02:00 INFO: 2020-09-08 10:02:00 INFO: clearing start 2020-09-08 10:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '3420ecfd-4d4c-e310-e8ee-582c742d9fb9', 'clOrdID': '0bd7de2f5ce44a209ab3b16ca66ba3b7', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 319, 'price': 350.8, 'displayQty': None, 'stopPx': 350.75, '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': 319, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 8, 7, 0, 20, 689000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 8, 7, 0, 20, 689000, tzinfo=tzutc())} 2020-09-08 10:02:00 INFO: order time=2020-09-08 07:00:20.689000+00:00; delta from now UTC=0:01:40.190109 time_delta.total_seconds()=100.190109; time_diff_offset='3600' 2020-09-08 10:02:00 INFO: skip by time diff 2020-09-08 07:00:20.689000+00:00 2020-09-08 10:02:00 INFO: clearing end 2020-09-08 10:02:00 INFO: 2020-09-08 10:02:00 INFO: 2020-09-08 10:02:00 INFO: 2020-09-08 10:02:00 INFO: 2020-09-08 11:00:21 INFO: 2020-09-08 11:00:21 INFO: 2020-09-08 11:00:21 INFO: 2020-09-08 11:00:21 INFO: 2020-09-08 11:00:21 INFO: init new order start 2020-09-08 11:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 8, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.1, 'high': 350.4, 'low': 345.75, 'close': 347.0, 'trades': 2847, 'volume': 2367988, 'vwap': 348.04, 'lastSize': 2, 'turnover': 82414035520, 'homeNotional': 24337.873675058334, 'foreignNotional': 8470454.207309052}, {'timestamp': datetime.datetime(2020, 9, 8, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 345.1, 'high': 350.7, 'low': 344.8, 'close': 350.1, 'trades': 3623, 'volume': 3961838, 'vwap': 347.17, 'lastSize': 250, 'turnover': 137541219955, 'homeNotional': 40673.34702144161, 'foreignNotional': 14120485.782333596}, {'timestamp': datetime.datetime(2020, 9, 8, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.8, 'high': 347.5, 'low': 344.45, 'close': 345.1, 'trades': 2589, 'volume': 2111620, 'vwap': 345.78, 'lastSize': 454, 'turnover': 73015025740, 'homeNotional': 21677.41162180072, 'foreignNotional': 7495572.516028639}] 2020-09-08 11:00:21 INFO: prepare candles [CandleItem(low=345.75, high=350.4, open=350.1, close=347.0, color='RED'), CandleItem(low=344.8, high=350.7, open=345.1, close=350.1, color='GREEN'), CandleItem(low=344.45, high=347.5, open=346.8, close=345.1, color='RED')] 2020-09-08 11:00:21 INFO: skip by colors first_candle=CandleItem(low=344.45, high=347.5, open=346.8, close=345.1, color='RED') second_candle=CandleItem(low=344.8, high=350.7, open=345.1, close=350.1, color='GREEN') last_candle=CandleItem(low=345.75, high=350.4, open=350.1, close=347.0, color='RED') 2020-09-08 11:00:21 INFO: check need new order None 2020-09-08 11:00:21 INFO: init new order end 2020-09-08 11:00:21 INFO: 2020-09-08 11:00:21 INFO: 2020-09-08 11:00:21 INFO: 2020-09-08 11:00:21 INFO: 2020-09-08 11:01:27 INFO: process event {'orderID': '3420ecfd-4d4c-e310-e8ee-582c742d9fb9', 'triggered': 'StopOrderTriggered', 'workingIndicator': True, 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'transactTime': '2020-09-08T08:01:27.111Z', 'timestamp': '2020-09-08T08:01:27.111Z', 'clOrdID': '0bd7de2f5ce44a209ab3b16ca66ba3b7', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-08 11:01:27 INFO: skip event 0bd7de2f5ce44a209ab3b16ca66ba3b7 2020-09-08 11:01:30 INFO: process event {'orderID': '3420ecfd-4d4c-e310-e8ee-582c742d9fb9', 'ordStatus': 'Filled', 'workingIndicator': False, 'leavesQty': 0, 'cumQty': 319, 'avgPx': 350.8, 'timestamp': '2020-09-08T08:01:30.321Z', 'clOrdID': '0bd7de2f5ce44a209ab3b16ca66ba3b7', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-08 11:01:30 INFO: add new event={'uid': '0bd7de2f5ce44a209ab3b16ca66ba3b7', 'status': 'Filled'} 2020-09-08 11:01:31 INFO: 2020-09-08 11:01:31 INFO: 2020-09-08 11:01:31 INFO: 2020-09-08 11:01:31 INFO: 2020-09-08 11:01:31 INFO: process event start 2020-09-08 11:01:31 INFO: fetch new order event 0bd7de2f5ce44a209ab3b16ca66ba3b7 2020-09-08 11:01:31 INFO: fetch orders by event init={'stop': '344.80000000000001136868377216160297393798828125', 'take': '380.29999999999989768184605054557323455810546875', 'qty': '319', 'color': 'GREEN', 'ticker': 'ETHUSD', 'clearing_offset': '3600'} profit_pair=None 2020-09-08 11:01:31 INFO: process init order filled 2020-09-08 11:01:31 INFO: save profit orders to storage stop=fe5c329531f04d39906076a96a98868b take=3e04a4b7c84a4e5b89bab822b082ecef 2020-09-08 11:01:31 INFO: place profit orders take_price=380.29999999999989768184605054557323455810546875, stop_price=344.80000000000001136868377216160297393798828125, qty=319, color=GREEN, ticker=ETHUSD fe5c329531f04d39906076a96a98868b 3e04a4b7c84a4e5b89bab822b082ecef 2020-09-08 11:01:31 INFO: place stop order ETHUSD: qty=-319, stop_price=344.80000000000001136868377216160297393798828125, stop_uid=fe5c329531f04d39906076a96a98868b 2020-09-08 11:01:31 INFO: exchange resp for stop order={'orderID': 'fabb8632-df5f-ca93-5123-5a5aa5494802', 'clOrdID': 'fe5c329531f04d39906076a96a98868b', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 319, 'price': None, 'displayQty': None, 'stopPx': 344.8, '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': 319, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 8, 8, 1, 31, 630000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 8, 8, 1, 31, 630000, tzinfo=tzutc())} 2020-09-08 11:01:31 INFO: place limit order ETHUSD: qty=-319, price=380.29999999999989768184605054557323455810546875, take_uid=3e04a4b7c84a4e5b89bab822b082ecef 2020-09-08 11:01:31 INFO: process event {'orderID': 'fabb8632-df5f-ca93-5123-5a5aa5494802', 'clOrdID': 'fe5c329531f04d39906076a96a98868b', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 319, 'price': None, 'displayQty': None, 'stopPx': 344.8, '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': 319, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': '2020-09-08T08:01:31.630Z', 'timestamp': '2020-09-08T08:01:31.630Z'} 2020-09-08 11:01:31 INFO: skip event fe5c329531f04d39906076a96a98868b New 2020-09-08 11:01:32 INFO: exchange resp for take profit order={'orderID': 'c6c8396a-2628-d805-0527-8421979a7002', 'clOrdID': '3e04a4b7c84a4e5b89bab822b082ecef', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 319, 'price': 380.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': 319, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 8, 8, 1, 32, 165000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 8, 8, 1, 32, 165000, tzinfo=tzutc())} 2020-09-08 11:01:32 INFO: process event {'orderID': 'c6c8396a-2628-d805-0527-8421979a7002', 'clOrdID': '3e04a4b7c84a4e5b89bab822b082ecef', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 319, 'price': 380.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': 319, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': '2020-09-08T08:01:32.165Z', 'timestamp': '2020-09-08T08:01:32.165Z'} 2020-09-08 11:01:32 INFO: skip event 3e04a4b7c84a4e5b89bab822b082ecef New 2020-09-08 11:01:32 INFO: place profit orders={'stop': {'response': {'orderID': 'fabb8632-df5f-ca93-5123-5a5aa5494802', 'clOrdID': 'fe5c329531f04d39906076a96a98868b', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 319, 'price': None, 'displayQty': None, 'stopPx': 344.8, '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': 319, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 8, 8, 1, 31, 630000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 8, 8, 1, 31, 630000, tzinfo=tzutc())}, 'qty': Decimal('-319'), 'uid': 'fe5c329531f04d39906076a96a98868b', 'price': Decimal('344.80000000000001136868377216160297393798828125')}, 'take': {'response': {'orderID': 'c6c8396a-2628-d805-0527-8421979a7002', 'clOrdID': '3e04a4b7c84a4e5b89bab822b082ecef', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 319, 'price': 380.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': 319, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 8, 8, 1, 32, 165000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 8, 8, 1, 32, 165000, tzinfo=tzutc())}, 'qty': Decimal('-319'), 'uid': '3e04a4b7c84a4e5b89bab822b082ecef', 'price': Decimal('380.29999999999989768184605054557323455810546875')}} 2020-09-08 11:01:32 INFO: rm init order from db 0bd7de2f5ce44a209ab3b16ca66ba3b7 2020-09-08 11:01:32 INFO: end process event_processing_result='proceed init order' 2020-09-08 11:01:32 INFO: 2020-09-08 11:01:32 INFO: 2020-09-08 11:01:32 INFO: 2020-09-08 11:01:32 INFO: 2020-09-08 11:02:00 INFO: 2020-09-08 11:02:00 INFO: 2020-09-08 11:02:00 INFO: 2020-09-08 11:02:00 INFO: 2020-09-08 11:02:00 INFO: clearing start 2020-09-08 11:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'fabb8632-df5f-ca93-5123-5a5aa5494802', 'clOrdID': 'fe5c329531f04d39906076a96a98868b', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 319, 'price': None, 'displayQty': None, 'stopPx': 344.8, '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': 319, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 8, 8, 1, 31, 630000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 8, 8, 1, 31, 630000, tzinfo=tzutc())} 2020-09-08 11:02:00 INFO: skip by not found init order into storage 2020-09-08 11:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'c6c8396a-2628-d805-0527-8421979a7002', 'clOrdID': '3e04a4b7c84a4e5b89bab822b082ecef', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 319, 'price': 380.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': 319, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 8, 8, 1, 32, 165000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 8, 8, 1, 32, 165000, tzinfo=tzutc())} 2020-09-08 11:02:00 INFO: skip by not found init order into storage 2020-09-08 11:02:00 INFO: clearing end 2020-09-08 11:02:00 INFO: 2020-09-08 11:02:00 INFO: 2020-09-08 11:02:00 INFO: 2020-09-08 11:02:00 INFO: 2020-09-08 11:31:44 INFO: process event {'orderID': 'fabb8632-df5f-ca93-5123-5a5aa5494802', 'price': 344.75, 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 319, 'avgPx': 344.75, 'text': 'Triggered: Order stop price reached\nStop order by trader.py', 'transactTime': '2020-09-08T08:31:44.043Z', 'timestamp': '2020-09-08T08:31:44.043Z', 'clOrdID': 'fe5c329531f04d39906076a96a98868b', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-08 11:31:44 INFO: add new event={'uid': 'fe5c329531f04d39906076a96a98868b', 'status': 'Filled'} 2020-09-08 11:31:44 INFO: 2020-09-08 11:31:44 INFO: 2020-09-08 11:31:44 INFO: 2020-09-08 11:31:44 INFO: 2020-09-08 11:31:44 INFO: process event start 2020-09-08 11:31:44 INFO: fetch new order event fe5c329531f04d39906076a96a98868b 2020-09-08 11:31:44 INFO: fetch orders by event init=None profit_pair=3e04a4b7c84a4e5b89bab822b082ecef 2020-09-08 11:31:44 INFO: process profit order filled 2020-09-08 11:31:46 INFO: cancel order=3e04a4b7c84a4e5b89bab822b082ecef [{'orderID': 'c6c8396a-2628-d805-0527-8421979a7002', 'clOrdID': '3e04a4b7c84a4e5b89bab822b082ecef', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 319, 'price': 380.3, '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, 8, 8, 1, 32, 165000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 8, 8, 31, 46, 85000, tzinfo=tzutc())}] 2020-09-08 11:31:46 INFO: end process event_processing_result='proceed profit order' 2020-09-08 11:31:46 INFO: 2020-09-08 11:31:46 INFO: 2020-09-08 11:31:46 INFO: 2020-09-08 11:31:46 INFO: 2020-09-08 11:31:46 INFO: process event {'orderID': 'c6c8396a-2628-d805-0527-8421979a7002', 'ordStatus': 'Canceled', 'workingIndicator': False, 'leavesQty': 0, 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'timestamp': '2020-09-08T08:31:46.085Z', 'clOrdID': '3e04a4b7c84a4e5b89bab822b082ecef', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-08 11:31:46 INFO: skip event 3e04a4b7c84a4e5b89bab822b082ecef Canceled 2020-09-08 12:00:20 INFO: 2020-09-08 12:00:20 INFO: 2020-09-08 12:00:20 INFO: 2020-09-08 12:00:20 INFO: 2020-09-08 12:00:20 INFO: init new order start 2020-09-08 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 8, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.0, 'high': 351.45, 'low': 342.35, 'close': 344.25, 'trades': 5940, 'volume': 5671850, 'vwap': 345.84, 'lastSize': 11, 'turnover': 196150028700, 'homeNotional': 58019.862040072665, 'foreignNotional': 20065715.244102005}, {'timestamp': datetime.datetime(2020, 9, 8, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.1, 'high': 350.4, 'low': 345.75, 'close': 347.0, 'trades': 2847, 'volume': 2367988, 'vwap': 348.04, 'lastSize': 2, 'turnover': 82414035520, 'homeNotional': 24337.873675058334, 'foreignNotional': 8470454.207309052}, {'timestamp': datetime.datetime(2020, 9, 8, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 345.1, 'high': 350.7, 'low': 344.8, 'close': 350.1, 'trades': 3623, 'volume': 3961838, 'vwap': 347.17, 'lastSize': 250, 'turnover': 137541219955, 'homeNotional': 40673.34702144161, 'foreignNotional': 14120485.782333596}] 2020-09-08 12:00:20 INFO: prepare candles [CandleItem(low=342.35, high=351.45, open=347.0, close=344.25, color='RED'), CandleItem(low=345.75, high=350.4, open=350.1, close=347.0, color='RED'), CandleItem(low=344.8, high=350.7, open=345.1, close=350.1, color='GREEN')] 2020-09-08 12:00:20 INFO: skip by colors first_candle=CandleItem(low=344.8, high=350.7, open=345.1, close=350.1, color='GREEN') second_candle=CandleItem(low=345.75, high=350.4, open=350.1, close=347.0, color='RED') last_candle=CandleItem(low=342.35, high=351.45, open=347.0, close=344.25, color='RED') 2020-09-08 12:00:20 INFO: check need new order None 2020-09-08 12:00:20 INFO: init new order end 2020-09-08 12:00:20 INFO: 2020-09-08 12:00:20 INFO: 2020-09-08 12:00:20 INFO: 2020-09-08 12:00:20 INFO: 2020-09-08 12:02:00 INFO: 2020-09-08 12:02:00 INFO: 2020-09-08 12:02:00 INFO: 2020-09-08 12:02:00 INFO: 2020-09-08 12:02:00 INFO: clearing start 2020-09-08 12:02:00 INFO: clearing end 2020-09-08 12:02:00 INFO: 2020-09-08 12:02:00 INFO: 2020-09-08 12:02:00 INFO: 2020-09-08 12:02:00 INFO: 2020-09-08 13:00:20 INFO: 2020-09-08 13:00:20 INFO: 2020-09-08 13:00:20 INFO: 2020-09-08 13:00:20 INFO: 2020-09-08 13:00:20 INFO: init new order start 2020-09-08 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 8, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 344.25, 'high': 345.85, 'low': 336.95, 'close': 336.95, 'trades': 6177, 'volume': 6987729, 'vwap': 341.7, 'lastSize': 172, 'turnover': 238764318545, 'homeNotional': 70843.8022693712, 'foreignNotional': 24207394.454436112}, {'timestamp': datetime.datetime(2020, 9, 8, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.0, 'high': 351.45, 'low': 342.35, 'close': 344.25, 'trades': 5940, 'volume': 5671850, 'vwap': 345.84, 'lastSize': 11, 'turnover': 196150028700, 'homeNotional': 58019.862040072665, 'foreignNotional': 20065715.244102005}, {'timestamp': datetime.datetime(2020, 9, 8, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.1, 'high': 350.4, 'low': 345.75, 'close': 347.0, 'trades': 2847, 'volume': 2367988, 'vwap': 348.04, 'lastSize': 2, 'turnover': 82414035520, 'homeNotional': 24337.873675058334, 'foreignNotional': 8470454.207309052}] 2020-09-08 13:00:20 INFO: prepare candles [CandleItem(low=336.95, high=345.85, open=344.25, close=336.95, color='RED'), CandleItem(low=342.35, high=351.45, open=347.0, close=344.25, color='RED'), CandleItem(low=345.75, high=350.4, open=350.1, close=347.0, color='RED')] 2020-09-08 13:00:20 INFO: skip by colors first_candle=CandleItem(low=345.75, high=350.4, open=350.1, close=347.0, color='RED') second_candle=CandleItem(low=342.35, high=351.45, open=347.0, close=344.25, color='RED') last_candle=CandleItem(low=336.95, high=345.85, open=344.25, close=336.95, color='RED') 2020-09-08 13:00:20 INFO: check need new order None 2020-09-08 13:00:20 INFO: init new order end 2020-09-08 13:00:20 INFO: 2020-09-08 13:00:20 INFO: 2020-09-08 13:00:20 INFO: 2020-09-08 13:00:20 INFO: 2020-09-08 13:02:00 INFO: 2020-09-08 13:02:00 INFO: 2020-09-08 13:02:00 INFO: 2020-09-08 13:02:00 INFO: 2020-09-08 13:02:00 INFO: clearing start 2020-09-08 13:02:00 INFO: clearing end 2020-09-08 13:02:00 INFO: 2020-09-08 13:02:00 INFO: 2020-09-08 13:02:00 INFO: 2020-09-08 13:02:00 INFO: 2020-09-08 14:00:20 INFO: 2020-09-08 14:00:20 INFO: 2020-09-08 14:00:20 INFO: 2020-09-08 14:00:20 INFO: 2020-09-08 14:00:20 INFO: init new order start 2020-09-08 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 8, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 336.95, 'high': 339.5, 'low': 333.8, 'close': 338.35, 'trades': 7590, 'volume': 7936444, 'vwap': 337.0, 'lastSize': 400, 'turnover': 267450250025, 'homeNotional': 79585.10104954227, 'foreignNotional': 26819566.367525555}, {'timestamp': datetime.datetime(2020, 9, 8, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 344.25, 'high': 345.85, 'low': 336.95, 'close': 336.95, 'trades': 6177, 'volume': 6987729, 'vwap': 341.7, 'lastSize': 172, 'turnover': 238764318545, 'homeNotional': 70843.8022693712, 'foreignNotional': 24207394.454436112}, {'timestamp': datetime.datetime(2020, 9, 8, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.0, 'high': 351.45, 'low': 342.35, 'close': 344.25, 'trades': 5940, 'volume': 5671850, 'vwap': 345.84, 'lastSize': 11, 'turnover': 196150028700, 'homeNotional': 58019.862040072665, 'foreignNotional': 20065715.244102005}] 2020-09-08 14:00:20 INFO: prepare candles [CandleItem(low=333.8, high=339.5, open=336.95, close=338.35, color='GREEN'), CandleItem(low=336.95, high=345.85, open=344.25, close=336.95, color='RED'), CandleItem(low=342.35, high=351.45, open=347.0, close=344.25, color='RED')] 2020-09-08 14:00:20 INFO: last_candle=CandleItem(low=333.8, high=339.5, open=336.95, close=338.35, color='GREEN') 2020-09-08 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-09-08 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=333.8, high=339.5, open=336.95, close=338.35, color='GREEN') 2020-09-08 14:00:20 INFO: skip by CandleItem(low=333.8, high=339.5, open=336.95, close=338.35, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-08 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-09-08 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=333.8, high=339.5, open=336.95, close=338.35, color='GREEN') 2020-09-08 14:00:20 INFO: apply filter None to candle=CandleItem(low=336.95, high=345.85, open=344.25, close=336.95, color='RED') 2020-09-08 14:00:20 INFO: apply filter None to candle=CandleItem(low=342.35, high=351.45, open=347.0, close=344.25, color='RED') 2020-09-08 14:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=333.8, high=339.5, open=336.95, close=338.35, color='GREEN'), take_profit_factor=5.0, clearing_interval=3600) 2020-09-08 14:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=333.8, high=339.5, open=336.95, close=338.35, color='GREEN'), take_profit_factor=5.0, clearing_interval=3600) 2020-09-08 14:00:20 INFO: place order: start candle=CandleItem(low=333.8, high=339.5, open=336.95, close=338.35, color='GREEN') ticker='ETHUSD' price_offset=0.1 2020-09-08 14:00:20 INFO: place order: side_factor=-1 init_trigger_price=339.55 init_order_price=339.6 stop_price_offset=0.0 candle.size=5.699999999999989 stop_price=333.8 take_price=368.09999999999997 2020-09-08 14:00:20 INFO: place order round: side_factor=-1 init_trigger_price=Decimal('339.55000000000001136868377216160297393798828125') init_order_price=Decimal('339.6000000000000227373675443232059478759765625') stop_price_offset=0.0 candle.size=5.699999999999989 stop_price=Decimal('333.80000000000001136868377216160297393798828125') take_price=Decimal('368.09999999999996589394868351519107818603515625') 2020-09-08 14:00:20 INFO: place order: compute qty=330 2020-09-08 14:00:20 INFO: place order: save order to db ccc4e4387ed2452e95fee9e6bcc680f0; response=True 2020-09-08 14:00:20 INFO: post order to exchange resp={'orderID': '5b1ed497-847c-33b3-9609-90851325262d', 'clOrdID': 'ccc4e4387ed2452e95fee9e6bcc680f0', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 330, 'price': 339.6, 'displayQty': None, 'stopPx': 339.55, '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': 330, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 8, 11, 0, 20, 810000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 8, 11, 0, 20, 810000, tzinfo=tzutc())} 2020-09-08 14:00:20 INFO: place new init order {'qty': 330, 'init_price': Decimal('339.55000000000001136868377216160297393798828125'), 'stop_price': Decimal('333.80000000000001136868377216160297393798828125'), 'take_price': Decimal('368.09999999999996589394868351519107818603515625'), 'order_uid': 'ccc4e4387ed2452e95fee9e6bcc680f0', 'response': {'orderID': '5b1ed497-847c-33b3-9609-90851325262d', 'clOrdID': 'ccc4e4387ed2452e95fee9e6bcc680f0', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 330, 'price': 339.6, 'displayQty': None, 'stopPx': 339.55, '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': 330, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 8, 11, 0, 20, 810000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 8, 11, 0, 20, 810000, tzinfo=tzutc())}} 2020-09-08 14:00:20 INFO: init new order end 2020-09-08 14:00:20 INFO: 2020-09-08 14:00:20 INFO: 2020-09-08 14:00:20 INFO: 2020-09-08 14:00:20 INFO: 2020-09-08 14:00:21 INFO: process event {'orderID': '5b1ed497-847c-33b3-9609-90851325262d', 'clOrdID': 'ccc4e4387ed2452e95fee9e6bcc680f0', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 330, 'price': 339.6, 'displayQty': None, 'stopPx': 339.55, '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': 330, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-09-08T11:00:20.810Z', 'timestamp': '2020-09-08T11:00:20.810Z'} 2020-09-08 14:00:21 INFO: skip event ccc4e4387ed2452e95fee9e6bcc680f0 New 2020-09-08 14:02:00 INFO: 2020-09-08 14:02:00 INFO: 2020-09-08 14:02:00 INFO: 2020-09-08 14:02:00 INFO: 2020-09-08 14:02:00 INFO: clearing start 2020-09-08 14:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '5b1ed497-847c-33b3-9609-90851325262d', 'clOrdID': 'ccc4e4387ed2452e95fee9e6bcc680f0', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 330, 'price': 339.6, 'displayQty': None, 'stopPx': 339.55, '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': 330, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 8, 11, 0, 20, 810000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 8, 11, 0, 20, 810000, tzinfo=tzutc())} 2020-09-08 14:02:01 INFO: order time=2020-09-08 11:00:20.810000+00:00; delta from now UTC=0:01:40.218069 time_delta.total_seconds()=100.218069; time_diff_offset='3600' 2020-09-08 14:02:01 INFO: skip by time diff 2020-09-08 11:00:20.810000+00:00 2020-09-08 14:02:01 INFO: clearing end 2020-09-08 14:02:01 INFO: 2020-09-08 14:02:01 INFO: 2020-09-08 14:02:01 INFO: 2020-09-08 14:02:01 INFO: 2020-09-08 14:02:13 INFO: process event {'orderID': '5b1ed497-847c-33b3-9609-90851325262d', 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 330, 'avgPx': 339.6, 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'transactTime': '2020-09-08T11:02:13.661Z', 'timestamp': '2020-09-08T11:02:13.661Z', 'clOrdID': 'ccc4e4387ed2452e95fee9e6bcc680f0', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-08 14:02:13 INFO: add new event={'uid': 'ccc4e4387ed2452e95fee9e6bcc680f0', 'status': 'Filled'} 2020-09-08 14:02:14 INFO: 2020-09-08 14:02:14 INFO: 2020-09-08 14:02:14 INFO: 2020-09-08 14:02:14 INFO: 2020-09-08 14:02:14 INFO: process event start 2020-09-08 14:02:14 INFO: fetch new order event ccc4e4387ed2452e95fee9e6bcc680f0 2020-09-08 14:02:14 INFO: fetch orders by event init={'stop': '333.80000000000001136868377216160297393798828125', 'take': '368.09999999999996589394868351519107818603515625', 'qty': '330', 'color': 'GREEN', 'ticker': 'ETHUSD', 'clearing_offset': '3600'} profit_pair=None 2020-09-08 14:02:14 INFO: process init order filled 2020-09-08 14:02:14 INFO: save profit orders to storage stop=27111d9dc16046b7b75d7e2702a99dcd take=fdfa23acd1e9427ca875b5de6c1feaf1 2020-09-08 14:02:14 INFO: place profit orders take_price=368.09999999999996589394868351519107818603515625, stop_price=333.80000000000001136868377216160297393798828125, qty=330, color=GREEN, ticker=ETHUSD 27111d9dc16046b7b75d7e2702a99dcd fdfa23acd1e9427ca875b5de6c1feaf1 2020-09-08 14:02:14 INFO: place stop order ETHUSD: qty=-330, stop_price=333.80000000000001136868377216160297393798828125, stop_uid=27111d9dc16046b7b75d7e2702a99dcd 2020-09-08 14:02:14 INFO: exchange resp for stop order={'orderID': '7616c802-ca65-40c6-4b11-d15165058e8e', 'clOrdID': '27111d9dc16046b7b75d7e2702a99dcd', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 330, 'price': None, 'displayQty': None, 'stopPx': 333.8, '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': 330, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 8, 11, 2, 14, 167000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 8, 11, 2, 14, 167000, tzinfo=tzutc())} 2020-09-08 14:02:14 INFO: process event {'orderID': '7616c802-ca65-40c6-4b11-d15165058e8e', 'clOrdID': '27111d9dc16046b7b75d7e2702a99dcd', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 330, 'price': None, 'displayQty': None, 'stopPx': 333.8, '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': 330, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': '2020-09-08T11:02:14.167Z', 'timestamp': '2020-09-08T11:02:14.167Z'} 2020-09-08 14:02:14 INFO: skip event 27111d9dc16046b7b75d7e2702a99dcd New 2020-09-08 14:02:14 INFO: place limit order ETHUSD: qty=-330, price=368.09999999999996589394868351519107818603515625, take_uid=fdfa23acd1e9427ca875b5de6c1feaf1 2020-09-08 14:02:14 INFO: exchange resp for take profit order={'orderID': '96912b41-2fb7-1a3a-ac40-6d9910707b5e', 'clOrdID': 'fdfa23acd1e9427ca875b5de6c1feaf1', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 330, 'price': 368.1, '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': 330, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 8, 11, 2, 14, 220000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 8, 11, 2, 14, 220000, tzinfo=tzutc())} 2020-09-08 14:02:14 INFO: place profit orders={'stop': {'response': {'orderID': '7616c802-ca65-40c6-4b11-d15165058e8e', 'clOrdID': '27111d9dc16046b7b75d7e2702a99dcd', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 330, 'price': None, 'displayQty': None, 'stopPx': 333.8, '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': 330, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 8, 11, 2, 14, 167000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 8, 11, 2, 14, 167000, tzinfo=tzutc())}, 'qty': Decimal('-330'), 'uid': '27111d9dc16046b7b75d7e2702a99dcd', 'price': Decimal('333.80000000000001136868377216160297393798828125')}, 'take': {'response': {'orderID': '96912b41-2fb7-1a3a-ac40-6d9910707b5e', 'clOrdID': 'fdfa23acd1e9427ca875b5de6c1feaf1', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 330, 'price': 368.1, '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': 330, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 8, 11, 2, 14, 220000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 8, 11, 2, 14, 220000, tzinfo=tzutc())}, 'qty': Decimal('-330'), 'uid': 'fdfa23acd1e9427ca875b5de6c1feaf1', 'price': Decimal('368.09999999999996589394868351519107818603515625')}} 2020-09-08 14:02:14 INFO: process event {'orderID': '96912b41-2fb7-1a3a-ac40-6d9910707b5e', 'clOrdID': 'fdfa23acd1e9427ca875b5de6c1feaf1', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 330, 'price': 368.1, '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': 330, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': '2020-09-08T11:02:14.220Z', 'timestamp': '2020-09-08T11:02:14.220Z'} 2020-09-08 14:02:14 INFO: skip event fdfa23acd1e9427ca875b5de6c1feaf1 New 2020-09-08 14:02:14 INFO: rm init order from db ccc4e4387ed2452e95fee9e6bcc680f0 2020-09-08 14:02:14 INFO: end process event_processing_result='proceed init order' 2020-09-08 14:02:14 INFO: 2020-09-08 14:02:14 INFO: 2020-09-08 14:02:14 INFO: 2020-09-08 14:02:14 INFO: 2020-09-08 14:41:53 INFO: process event {'orderID': '7616c802-ca65-40c6-4b11-d15165058e8e', 'price': 333.7, 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 330, 'avgPx': 333.7, 'text': 'Triggered: Order stop price reached\nStop order by trader.py', 'transactTime': '2020-09-08T11:41:53.104Z', 'timestamp': '2020-09-08T11:41:53.104Z', 'clOrdID': '27111d9dc16046b7b75d7e2702a99dcd', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-08 14:41:53 INFO: add new event={'uid': '27111d9dc16046b7b75d7e2702a99dcd', 'status': 'Filled'} 2020-09-08 14:41:54 INFO: 2020-09-08 14:41:54 INFO: 2020-09-08 14:41:54 INFO: 2020-09-08 14:41:54 INFO: 2020-09-08 14:41:54 INFO: process event start 2020-09-08 14:41:54 INFO: fetch new order event 27111d9dc16046b7b75d7e2702a99dcd 2020-09-08 14:41:54 INFO: fetch orders by event init=None profit_pair=fdfa23acd1e9427ca875b5de6c1feaf1 2020-09-08 14:41:54 INFO: process profit order filled 2020-09-08 14:41:54 INFO: process event {'orderID': '96912b41-2fb7-1a3a-ac40-6d9910707b5e', 'ordStatus': 'Canceled', 'workingIndicator': False, 'leavesQty': 0, 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'timestamp': '2020-09-08T11:41:54.886Z', 'clOrdID': 'fdfa23acd1e9427ca875b5de6c1feaf1', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-08 14:41:54 INFO: skip event fdfa23acd1e9427ca875b5de6c1feaf1 Canceled 2020-09-08 14:41:54 INFO: cancel order=fdfa23acd1e9427ca875b5de6c1feaf1 [{'orderID': '96912b41-2fb7-1a3a-ac40-6d9910707b5e', 'clOrdID': 'fdfa23acd1e9427ca875b5de6c1feaf1', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 330, 'price': 368.1, '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, 8, 11, 2, 14, 220000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 8, 11, 41, 54, 886000, tzinfo=tzutc())}] 2020-09-08 14:41:54 INFO: end process event_processing_result='proceed profit order' 2020-09-08 14:41:54 INFO: 2020-09-08 14:41:54 INFO: 2020-09-08 14:41:54 INFO: 2020-09-08 14:41:54 INFO: 2020-09-08 15:00:20 INFO: 2020-09-08 15:00:20 INFO: 2020-09-08 15:00:20 INFO: 2020-09-08 15:00:20 INFO: 2020-09-08 15:00:20 INFO: init new order start 2020-09-08 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 8, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 338.35, 'high': 340.55, 'low': 330.8, 'close': 333.75, 'trades': 6731, 'volume': 7105752, 'vwap': 335.07, 'lastSize': 804, 'turnover': 238086862945, 'homeNotional': 71005.57335918136, 'foreignNotional': 23791886.496858817}, {'timestamp': datetime.datetime(2020, 9, 8, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 336.95, 'high': 339.5, 'low': 333.8, 'close': 338.35, 'trades': 7590, 'volume': 7936444, 'vwap': 337.0, 'lastSize': 400, 'turnover': 267450250025, 'homeNotional': 79585.10104954227, 'foreignNotional': 26819566.367525555}, {'timestamp': datetime.datetime(2020, 9, 8, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 344.25, 'high': 345.85, 'low': 336.95, 'close': 336.95, 'trades': 6177, 'volume': 6987729, 'vwap': 341.7, 'lastSize': 172, 'turnover': 238764318545, 'homeNotional': 70843.8022693712, 'foreignNotional': 24207394.454436112}] 2020-09-08 15:00:20 INFO: prepare candles [CandleItem(low=330.8, high=340.55, open=338.35, close=333.75, color='RED'), CandleItem(low=333.8, high=339.5, open=336.95, close=338.35, color='GREEN'), CandleItem(low=336.95, high=345.85, open=344.25, close=336.95, color='RED')] 2020-09-08 15:00:20 INFO: skip by colors first_candle=CandleItem(low=336.95, high=345.85, open=344.25, close=336.95, color='RED') second_candle=CandleItem(low=333.8, high=339.5, open=336.95, close=338.35, color='GREEN') last_candle=CandleItem(low=330.8, high=340.55, open=338.35, close=333.75, color='RED') 2020-09-08 15:00:20 INFO: check need new order None 2020-09-08 15:00:20 INFO: init new order end 2020-09-08 15:00:20 INFO: 2020-09-08 15:00:20 INFO: 2020-09-08 15:00:20 INFO: 2020-09-08 15:00:20 INFO: 2020-09-08 15:02:00 INFO: 2020-09-08 15:02:00 INFO: 2020-09-08 15:02:00 INFO: 2020-09-08 15:02:00 INFO: 2020-09-08 15:02:00 INFO: clearing start 2020-09-08 15:02:00 INFO: clearing end 2020-09-08 15:02:00 INFO: 2020-09-08 15:02:00 INFO: 2020-09-08 15:02:00 INFO: 2020-09-08 15:02:00 INFO: 2020-09-08 16:00:20 INFO: 2020-09-08 16:00:20 INFO: 2020-09-08 16:00:20 INFO: 2020-09-08 16:00:20 INFO: 2020-09-08 16:00:20 INFO: init new order start 2020-09-08 16:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 8, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 333.75, 'high': 339.2, 'low': 331.9, 'close': 337.15, 'trades': 7856, 'volume': 6237594, 'vwap': 335.58, 'lastSize': 200, 'turnover': 209317169635, 'homeNotional': 62277.59075324776, 'foreignNotional': 20898946.402175106}, {'timestamp': datetime.datetime(2020, 9, 8, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 338.35, 'high': 340.55, 'low': 330.8, 'close': 333.75, 'trades': 6731, 'volume': 7105752, 'vwap': 335.07, 'lastSize': 804, 'turnover': 238086862945, 'homeNotional': 71005.57335918136, 'foreignNotional': 23791886.496858817}, {'timestamp': datetime.datetime(2020, 9, 8, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 336.95, 'high': 339.5, 'low': 333.8, 'close': 338.35, 'trades': 7590, 'volume': 7936444, 'vwap': 337.0, 'lastSize': 400, 'turnover': 267450250025, 'homeNotional': 79585.10104954227, 'foreignNotional': 26819566.367525555}] 2020-09-08 16:00:20 INFO: prepare candles [CandleItem(low=331.9, high=339.2, open=333.75, close=337.15, color='GREEN'), CandleItem(low=330.8, high=340.55, open=338.35, close=333.75, color='RED'), CandleItem(low=333.8, high=339.5, open=336.95, close=338.35, color='GREEN')] 2020-09-08 16:00:20 INFO: skip by colors first_candle=CandleItem(low=333.8, high=339.5, open=336.95, close=338.35, color='GREEN') second_candle=CandleItem(low=330.8, high=340.55, open=338.35, close=333.75, color='RED') last_candle=CandleItem(low=331.9, high=339.2, open=333.75, close=337.15, color='GREEN') 2020-09-08 16:00:20 INFO: check need new order None 2020-09-08 16:00:20 INFO: init new order end 2020-09-08 16:00:20 INFO: 2020-09-08 16:00:20 INFO: 2020-09-08 16:00:20 INFO: 2020-09-08 16:00:20 INFO: 2020-09-08 16:02:00 INFO: 2020-09-08 16:02:00 INFO: 2020-09-08 16:02:00 INFO: 2020-09-08 16:02:00 INFO: 2020-09-08 16:02:00 INFO: clearing start 2020-09-08 16:02:00 INFO: clearing end 2020-09-08 16:02:00 INFO: 2020-09-08 16:02:00 INFO: 2020-09-08 16:02:00 INFO: 2020-09-08 16:02:00 INFO: 2020-09-08 17:00:20 INFO: 2020-09-08 17:00:20 INFO: 2020-09-08 17:00:20 INFO: 2020-09-08 17:00:20 INFO: 2020-09-08 17:00:20 INFO: init new order start 2020-09-08 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 8, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 337.15, 'high': 338.7, 'low': 331.9, 'close': 335.45, 'trades': 8544, 'volume': 6590875, 'vwap': 334.7, 'lastSize': 3649, 'turnover': 220590310485, 'homeNotional': 65736.56099054727, 'foreignNotional': 22001610.660856497}, {'timestamp': datetime.datetime(2020, 9, 8, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 333.75, 'high': 339.2, 'low': 331.9, 'close': 337.15, 'trades': 7856, 'volume': 6237594, 'vwap': 335.58, 'lastSize': 200, 'turnover': 209317169635, 'homeNotional': 62277.59075324776, 'foreignNotional': 20898946.402175106}, {'timestamp': datetime.datetime(2020, 9, 8, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 338.35, 'high': 340.55, 'low': 330.8, 'close': 333.75, 'trades': 6731, 'volume': 7105752, 'vwap': 335.07, 'lastSize': 804, 'turnover': 238086862945, 'homeNotional': 71005.57335918136, 'foreignNotional': 23791886.496858817}] 2020-09-08 17:00:20 INFO: prepare candles [CandleItem(low=331.9, high=338.7, open=337.15, close=335.45, color='RED'), CandleItem(low=331.9, high=339.2, open=333.75, close=337.15, color='GREEN'), CandleItem(low=330.8, high=340.55, open=338.35, close=333.75, color='RED')] 2020-09-08 17:00:20 INFO: skip by colors first_candle=CandleItem(low=330.8, high=340.55, open=338.35, close=333.75, color='RED') second_candle=CandleItem(low=331.9, high=339.2, open=333.75, close=337.15, color='GREEN') last_candle=CandleItem(low=331.9, high=338.7, open=337.15, close=335.45, color='RED') 2020-09-08 17:00:20 INFO: check need new order None 2020-09-08 17:00:20 INFO: init new order end 2020-09-08 17:00:20 INFO: 2020-09-08 17:00:20 INFO: 2020-09-08 17:00:20 INFO: 2020-09-08 17:00:20 INFO: 2020-09-08 17:02:00 INFO: 2020-09-08 17:02:00 INFO: 2020-09-08 17:02:00 INFO: 2020-09-08 17:02:00 INFO: 2020-09-08 17:02:00 INFO: clearing start 2020-09-08 17:02:00 INFO: clearing end 2020-09-08 17:02:00 INFO: 2020-09-08 17:02:00 INFO: 2020-09-08 17:02:00 INFO: 2020-09-08 17:02:00 INFO: 2020-09-08 18:00:20 INFO: 2020-09-08 18:00:20 INFO: 2020-09-08 18:00:20 INFO: 2020-09-08 18:00:20 INFO: 2020-09-08 18:00:20 INFO: init new order start 2020-09-08 18:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 8, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 335.45, 'high': 346.0, 'low': 334.7, 'close': 342.15, 'trades': 9195, 'volume': 8834438, 'vwap': 341.6, 'lastSize': 200, 'turnover': 301778086155, 'homeNotional': 89096.64867334129, 'foreignNotional': 30435530.143876627}, {'timestamp': datetime.datetime(2020, 9, 8, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 337.15, 'high': 338.7, 'low': 331.9, 'close': 335.45, 'trades': 8544, 'volume': 6590875, 'vwap': 334.7, 'lastSize': 3649, 'turnover': 220590310485, 'homeNotional': 65736.56099054727, 'foreignNotional': 22001610.660856497}, {'timestamp': datetime.datetime(2020, 9, 8, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 333.75, 'high': 339.2, 'low': 331.9, 'close': 337.15, 'trades': 7856, 'volume': 6237594, 'vwap': 335.58, 'lastSize': 200, 'turnover': 209317169635, 'homeNotional': 62277.59075324776, 'foreignNotional': 20898946.402175106}] 2020-09-08 18:00:21 INFO: prepare candles [CandleItem(low=334.7, high=346.0, open=335.45, close=342.15, color='GREEN'), CandleItem(low=331.9, high=338.7, open=337.15, close=335.45, color='RED'), CandleItem(low=331.9, high=339.2, open=333.75, close=337.15, color='GREEN')] 2020-09-08 18:00:21 INFO: skip by colors first_candle=CandleItem(low=331.9, high=339.2, open=333.75, close=337.15, color='GREEN') second_candle=CandleItem(low=331.9, high=338.7, open=337.15, close=335.45, color='RED') last_candle=CandleItem(low=334.7, high=346.0, open=335.45, close=342.15, color='GREEN') 2020-09-08 18:00:21 INFO: check need new order None 2020-09-08 18:00:21 INFO: init new order end 2020-09-08 18:00:21 INFO: 2020-09-08 18:00:21 INFO: 2020-09-08 18:00:21 INFO: 2020-09-08 18:00:21 INFO: 2020-09-08 18:02:00 INFO: 2020-09-08 18:02:00 INFO: 2020-09-08 18:02:00 INFO: 2020-09-08 18:02:00 INFO: 2020-09-08 18:02:00 INFO: clearing start 2020-09-08 18:02:00 INFO: clearing end 2020-09-08 18:02:00 INFO: 2020-09-08 18:02:00 INFO: 2020-09-08 18:02:00 INFO: 2020-09-08 18:02:00 INFO: 2020-09-08 19:00:20 INFO: 2020-09-08 19:00:20 INFO: 2020-09-08 19:00:20 INFO: 2020-09-08 19:00:20 INFO: 2020-09-08 19:00:20 INFO: init new order start 2020-09-08 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 8, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 342.15, 'high': 344.6, 'low': 339.7, 'close': 341.9, 'trades': 4125, 'volume': 2838845, 'vwap': 342.28, 'lastSize': 1422, 'turnover': 97166720975, 'homeNotional': 28701.086234259652, 'foreignNotional': 9823756.189082773}, {'timestamp': datetime.datetime(2020, 9, 8, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 335.45, 'high': 346.0, 'low': 334.7, 'close': 342.15, 'trades': 9195, 'volume': 8834438, 'vwap': 341.6, 'lastSize': 200, 'turnover': 301778086155, 'homeNotional': 89096.64867334129, 'foreignNotional': 30435530.143876627}, {'timestamp': datetime.datetime(2020, 9, 8, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 337.15, 'high': 338.7, 'low': 331.9, 'close': 335.45, 'trades': 8544, 'volume': 6590875, 'vwap': 334.7, 'lastSize': 3649, 'turnover': 220590310485, 'homeNotional': 65736.56099054727, 'foreignNotional': 22001610.660856497}] 2020-09-08 19:00:20 INFO: prepare candles [CandleItem(low=339.7, high=344.6, open=342.15, close=341.9, color='RED'), CandleItem(low=334.7, high=346.0, open=335.45, close=342.15, color='GREEN'), CandleItem(low=331.9, high=338.7, open=337.15, close=335.45, color='RED')] 2020-09-08 19:00:20 INFO: skip by colors first_candle=CandleItem(low=331.9, high=338.7, open=337.15, close=335.45, color='RED') second_candle=CandleItem(low=334.7, high=346.0, open=335.45, close=342.15, color='GREEN') last_candle=CandleItem(low=339.7, high=344.6, open=342.15, close=341.9, color='RED') 2020-09-08 19:00:20 INFO: check need new order None 2020-09-08 19:00:20 INFO: init new order end 2020-09-08 19:00:20 INFO: 2020-09-08 19:00:20 INFO: 2020-09-08 19:00:20 INFO: 2020-09-08 19:00:20 INFO: 2020-09-08 19:02:00 INFO: 2020-09-08 19:02:00 INFO: 2020-09-08 19:02:00 INFO: 2020-09-08 19:02:00 INFO: 2020-09-08 19:02:00 INFO: clearing start 2020-09-08 19:02:01 INFO: clearing end 2020-09-08 19:02:01 INFO: 2020-09-08 19:02:01 INFO: 2020-09-08 19:02:01 INFO: 2020-09-08 19:02:01 INFO: 2020-09-08 20:00:20 INFO: 2020-09-08 20:00:20 INFO: 2020-09-08 20:00:20 INFO: 2020-09-08 20:00:20 INFO: 2020-09-08 20:00:20 INFO: init new order start 2020-09-08 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 8, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.9, 'high': 344.8, 'low': 341.5, 'close': 344.15, 'trades': 2985, 'volume': 1897945, 'vwap': 343.58, 'lastSize': 575, 'turnover': 65207988820, 'homeNotional': 19235.48581307612, 'foreignNotional': 6608778.101148549}, {'timestamp': datetime.datetime(2020, 9, 8, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 342.15, 'high': 344.6, 'low': 339.7, 'close': 341.9, 'trades': 4125, 'volume': 2838845, 'vwap': 342.28, 'lastSize': 1422, 'turnover': 97166720975, 'homeNotional': 28701.086234259652, 'foreignNotional': 9823756.189082773}, {'timestamp': datetime.datetime(2020, 9, 8, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 335.45, 'high': 346.0, 'low': 334.7, 'close': 342.15, 'trades': 9195, 'volume': 8834438, 'vwap': 341.6, 'lastSize': 200, 'turnover': 301778086155, 'homeNotional': 89096.64867334129, 'foreignNotional': 30435530.143876627}] 2020-09-08 20:00:20 INFO: prepare candles [CandleItem(low=341.5, high=344.8, open=341.9, close=344.15, color='GREEN'), CandleItem(low=339.7, high=344.6, open=342.15, close=341.9, color='RED'), CandleItem(low=334.7, high=346.0, open=335.45, close=342.15, color='GREEN')] 2020-09-08 20:00:20 INFO: skip by colors first_candle=CandleItem(low=334.7, high=346.0, open=335.45, close=342.15, color='GREEN') second_candle=CandleItem(low=339.7, high=344.6, open=342.15, close=341.9, color='RED') last_candle=CandleItem(low=341.5, high=344.8, open=341.9, close=344.15, color='GREEN') 2020-09-08 20:00:20 INFO: check need new order None 2020-09-08 20:00:20 INFO: init new order end 2020-09-08 20:00:20 INFO: 2020-09-08 20:00:20 INFO: 2020-09-08 20:00:20 INFO: 2020-09-08 20:00:20 INFO: 2020-09-08 20:02:00 INFO: 2020-09-08 20:02:00 INFO: 2020-09-08 20:02:00 INFO: 2020-09-08 20:02:00 INFO: 2020-09-08 20:02:00 INFO: clearing start 2020-09-08 20:02:00 INFO: clearing end 2020-09-08 20:02:00 INFO: 2020-09-08 20:02:00 INFO: 2020-09-08 20:02:00 INFO: 2020-09-08 20:02:00 INFO: 2020-09-08 21:00:20 INFO: 2020-09-08 21:00:20 INFO: 2020-09-08 21:00:20 INFO: 2020-09-08 21:00:20 INFO: 2020-09-08 21:00:20 INFO: init new order start 2020-09-08 21:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 8, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 344.15, 'high': 346.55, 'low': 341.6, 'close': 344.8, 'trades': 3097, 'volume': 1425398, 'vwap': 343.93, 'lastSize': 2, 'turnover': 49022330595, 'homeNotional': 14451.08424819298, 'foreignNotional': 4970046.871386892}, {'timestamp': datetime.datetime(2020, 9, 8, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.9, 'high': 344.8, 'low': 341.5, 'close': 344.15, 'trades': 2985, 'volume': 1897945, 'vwap': 343.58, 'lastSize': 575, 'turnover': 65207988820, 'homeNotional': 19235.48581307612, 'foreignNotional': 6608778.101148549}, {'timestamp': datetime.datetime(2020, 9, 8, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 342.15, 'high': 344.6, 'low': 339.7, 'close': 341.9, 'trades': 4125, 'volume': 2838845, 'vwap': 342.28, 'lastSize': 1422, 'turnover': 97166720975, 'homeNotional': 28701.086234259652, 'foreignNotional': 9823756.189082773}] 2020-09-08 21:00:21 INFO: prepare candles [CandleItem(low=341.6, high=346.55, open=344.15, close=344.8, color='GREEN'), CandleItem(low=341.5, high=344.8, open=341.9, close=344.15, color='GREEN'), CandleItem(low=339.7, high=344.6, open=342.15, close=341.9, color='RED')] 2020-09-08 21:00:21 INFO: skip by colors first_candle=CandleItem(low=339.7, high=344.6, open=342.15, close=341.9, color='RED') second_candle=CandleItem(low=341.5, high=344.8, open=341.9, close=344.15, color='GREEN') last_candle=CandleItem(low=341.6, high=346.55, open=344.15, close=344.8, color='GREEN') 2020-09-08 21:00:21 INFO: check need new order None 2020-09-08 21:00:21 INFO: init new order end 2020-09-08 21:00:21 INFO: 2020-09-08 21:00:21 INFO: 2020-09-08 21:00:21 INFO: 2020-09-08 21:00:21 INFO: 2020-09-08 21:02:00 INFO: 2020-09-08 21:02:00 INFO: 2020-09-08 21:02:00 INFO: 2020-09-08 21:02:00 INFO: 2020-09-08 21:02:00 INFO: clearing start 2020-09-08 21:02:00 INFO: clearing end 2020-09-08 21:02:00 INFO: 2020-09-08 21:02:00 INFO: 2020-09-08 21:02:00 INFO: 2020-09-08 21:02:00 INFO: 2020-09-08 22:00:20 INFO: 2020-09-08 22:00:20 INFO: 2020-09-08 22:00:20 INFO: 2020-09-08 22:00:20 INFO: 2020-09-08 22:00:20 INFO: init new order start 2020-09-08 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 8, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 344.8, 'high': 345.4, 'low': 332.45, 'close': 334.8, 'trades': 6881, 'volume': 5534431, 'vwap': 336.97, 'lastSize': 1, 'turnover': 186493138855, 'homeNotional': 55492.742574155614, 'foreignNotional': 18700598.28303175}, {'timestamp': datetime.datetime(2020, 9, 8, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 344.15, 'high': 346.55, 'low': 341.6, 'close': 344.8, 'trades': 3097, 'volume': 1425398, 'vwap': 343.93, 'lastSize': 2, 'turnover': 49022330595, 'homeNotional': 14451.08424819298, 'foreignNotional': 4970046.871386892}, {'timestamp': datetime.datetime(2020, 9, 8, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.9, 'high': 344.8, 'low': 341.5, 'close': 344.15, 'trades': 2985, 'volume': 1897945, 'vwap': 343.58, 'lastSize': 575, 'turnover': 65207988820, 'homeNotional': 19235.48581307612, 'foreignNotional': 6608778.101148549}] 2020-09-08 22:00:20 INFO: prepare candles [CandleItem(low=332.45, high=345.4, open=344.8, close=334.8, color='RED'), CandleItem(low=341.6, high=346.55, open=344.15, close=344.8, color='GREEN'), CandleItem(low=341.5, high=344.8, open=341.9, close=344.15, color='GREEN')] 2020-09-08 22:00:20 INFO: last_candle=CandleItem(low=332.45, high=345.4, open=344.8, close=334.8, color='RED') 2020-09-08 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-08 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=332.45, high=345.4, open=344.8, close=334.8, color='RED') 2020-09-08 22:00:20 INFO: skip by CandleItem(low=332.45, high=345.4, open=344.8, close=334.8, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-08 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-08 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=332.45, high=345.4, open=344.8, close=334.8, color='RED') 2020-09-08 22:00:20 INFO: skip by CandleItem(low=332.45, high=345.4, open=344.8, close=334.8, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-08 22:00:20 INFO: not found applicable config for candle 2020-09-08 22:00:20 INFO: check need new order None 2020-09-08 22:00:20 INFO: init new order end 2020-09-08 22:00:20 INFO: 2020-09-08 22:00:20 INFO: 2020-09-08 22:00:20 INFO: 2020-09-08 22:00:20 INFO: 2020-09-08 22:02:00 INFO: 2020-09-08 22:02:00 INFO: 2020-09-08 22:02:00 INFO: 2020-09-08 22:02:00 INFO: 2020-09-08 22:02:00 INFO: clearing start 2020-09-08 22:02:00 INFO: clearing end 2020-09-08 22:02:00 INFO: 2020-09-08 22:02:00 INFO: 2020-09-08 22:02:00 INFO: 2020-09-08 22:02:00 INFO: 2020-09-08 23:00:20 INFO: 2020-09-08 23:00:20 INFO: 2020-09-08 23:00:20 INFO: 2020-09-08 23:00:20 INFO: 2020-09-08 23:00:20 INFO: init new order start 2020-09-08 23:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 8, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 334.8, 'high': 338.0, 'low': 332.7, 'close': 334.3, 'trades': 4514, 'volume': 4054468, 'vwap': 335.37, 'lastSize': 1829, 'turnover': 135973131095, 'homeNotional': 40562.72227760235, 'foreignNotional': 13603482.850574097}, {'timestamp': datetime.datetime(2020, 9, 8, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 344.8, 'high': 345.4, 'low': 332.45, 'close': 334.8, 'trades': 6881, 'volume': 5534431, 'vwap': 336.97, 'lastSize': 1, 'turnover': 186493138855, 'homeNotional': 55492.742574155614, 'foreignNotional': 18700598.28303175}, {'timestamp': datetime.datetime(2020, 9, 8, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 344.15, 'high': 346.55, 'low': 341.6, 'close': 344.8, 'trades': 3097, 'volume': 1425398, 'vwap': 343.93, 'lastSize': 2, 'turnover': 49022330595, 'homeNotional': 14451.08424819298, 'foreignNotional': 4970046.871386892}] 2020-09-08 23:00:20 INFO: prepare candles [CandleItem(low=332.7, high=338.0, open=334.8, close=334.3, color='RED'), CandleItem(low=332.45, high=345.4, open=344.8, close=334.8, color='RED'), CandleItem(low=341.6, high=346.55, open=344.15, close=344.8, color='GREEN')] 2020-09-08 23:00:20 INFO: skip by colors first_candle=CandleItem(low=341.6, high=346.55, open=344.15, close=344.8, color='GREEN') second_candle=CandleItem(low=332.45, high=345.4, open=344.8, close=334.8, color='RED') last_candle=CandleItem(low=332.7, high=338.0, open=334.8, close=334.3, color='RED') 2020-09-08 23:00:20 INFO: check need new order None 2020-09-08 23:00:20 INFO: init new order end 2020-09-08 23:00:20 INFO: 2020-09-08 23:00:20 INFO: 2020-09-08 23:00:20 INFO: 2020-09-08 23:00:20 INFO: 2020-09-08 23:02:00 INFO: 2020-09-08 23:02:00 INFO: 2020-09-08 23:02:00 INFO: 2020-09-08 23:02:00 INFO: 2020-09-08 23:02:00 INFO: clearing start 2020-09-08 23:02:00 INFO: clearing end 2020-09-08 23:02:00 INFO: 2020-09-08 23:02:00 INFO: 2020-09-08 23:02:00 INFO: 2020-09-08 23:02:00 INFO: 2020-09-09 00:00:20 INFO: 2020-09-09 00:00:20 INFO: 2020-09-09 00:00:20 INFO: 2020-09-09 00:00:20 INFO: 2020-09-09 00:00:20 INFO: init new order start 2020-09-09 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 8, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 334.3, 'high': 339.4, 'low': 334.25, 'close': 336.15, 'trades': 3481, 'volume': 2401354, 'vwap': 336.89, 'lastSize': 1, 'turnover': 80898103025, 'homeNotional': 24052.398491016935, 'foreignNotional': 8102963.755481761}, {'timestamp': datetime.datetime(2020, 9, 8, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 334.8, 'high': 338.0, 'low': 332.7, 'close': 334.3, 'trades': 4514, 'volume': 4054468, 'vwap': 335.37, 'lastSize': 1829, 'turnover': 135973131095, 'homeNotional': 40562.72227760235, 'foreignNotional': 13603482.850574097}, {'timestamp': datetime.datetime(2020, 9, 8, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 344.8, 'high': 345.4, 'low': 332.45, 'close': 334.8, 'trades': 6881, 'volume': 5534431, 'vwap': 336.97, 'lastSize': 1, 'turnover': 186493138855, 'homeNotional': 55492.742574155614, 'foreignNotional': 18700598.28303175}] 2020-09-09 00:00:20 INFO: prepare candles [CandleItem(low=334.25, high=339.4, open=334.3, close=336.15, color='GREEN'), CandleItem(low=332.7, high=338.0, open=334.8, close=334.3, color='RED'), CandleItem(low=332.45, high=345.4, open=344.8, close=334.8, color='RED')] 2020-09-09 00:00:20 INFO: last_candle=CandleItem(low=334.25, high=339.4, open=334.3, close=336.15, color='GREEN') 2020-09-09 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-09-09 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=334.25, high=339.4, open=334.3, close=336.15, color='GREEN') 2020-09-09 00:00:20 INFO: skip by CandleItem(low=334.25, high=339.4, open=334.3, close=336.15, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-09 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-09-09 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=334.25, high=339.4, open=334.3, close=336.15, color='GREEN') 2020-09-09 00:00:20 INFO: skip by CandleItem(low=334.25, high=339.4, open=334.3, close=336.15, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-09 00:00:20 INFO: not found applicable config for candle 2020-09-09 00:00:20 INFO: check need new order None 2020-09-09 00:00:20 INFO: init new order end 2020-09-09 00:00:20 INFO: 2020-09-09 00:00:20 INFO: 2020-09-09 00:00:20 INFO: 2020-09-09 00:00:20 INFO: 2020-09-09 00:02:00 INFO: 2020-09-09 00:02:00 INFO: 2020-09-09 00:02:00 INFO: 2020-09-09 00:02:00 INFO: 2020-09-09 00:02:00 INFO: clearing start 2020-09-09 00:02:00 INFO: clearing end 2020-09-09 00:02:00 INFO: 2020-09-09 00:02:00 INFO: 2020-09-09 00:02:00 INFO: 2020-09-09 00:02:00 INFO: 2020-09-09 01:00:20 INFO: 2020-09-09 01:00:20 INFO: 2020-09-09 01:00:20 INFO: 2020-09-09 01:00:20 INFO: 2020-09-09 01:00:20 INFO: init new order start 2020-09-09 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 8, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 336.15, 'high': 340.35, 'low': 333.85, 'close': 338.75, 'trades': 4437, 'volume': 3365148, 'vwap': 336.39, 'lastSize': 20, 'turnover': 113197446545, 'homeNotional': 33686.09606088718, 'foreignNotional': 11331532.690169828}, {'timestamp': datetime.datetime(2020, 9, 8, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 334.3, 'high': 339.4, 'low': 334.25, 'close': 336.15, 'trades': 3481, 'volume': 2401354, 'vwap': 336.89, 'lastSize': 1, 'turnover': 80898103025, 'homeNotional': 24052.398491016935, 'foreignNotional': 8102963.755481761}, {'timestamp': datetime.datetime(2020, 9, 8, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 334.8, 'high': 338.0, 'low': 332.7, 'close': 334.3, 'trades': 4514, 'volume': 4054468, 'vwap': 335.37, 'lastSize': 1829, 'turnover': 135973131095, 'homeNotional': 40562.72227760235, 'foreignNotional': 13603482.850574097}] 2020-09-09 01:00:20 INFO: prepare candles [CandleItem(low=333.85, high=340.35, open=336.15, close=338.75, color='GREEN'), CandleItem(low=334.25, high=339.4, open=334.3, close=336.15, color='GREEN'), CandleItem(low=332.7, high=338.0, open=334.8, close=334.3, color='RED')] 2020-09-09 01:00:20 INFO: skip by colors first_candle=CandleItem(low=332.7, high=338.0, open=334.8, close=334.3, color='RED') second_candle=CandleItem(low=334.25, high=339.4, open=334.3, close=336.15, color='GREEN') last_candle=CandleItem(low=333.85, high=340.35, open=336.15, close=338.75, color='GREEN') 2020-09-09 01:00:20 INFO: check need new order None 2020-09-09 01:00:20 INFO: init new order end 2020-09-09 01:00:20 INFO: 2020-09-09 01:00:20 INFO: 2020-09-09 01:00:20 INFO: 2020-09-09 01:00:20 INFO: 2020-09-09 01:02:00 INFO: 2020-09-09 01:02:00 INFO: 2020-09-09 01:02:00 INFO: 2020-09-09 01:02:00 INFO: 2020-09-09 01:02:00 INFO: clearing start 2020-09-09 01:02:00 INFO: clearing end 2020-09-09 01:02:00 INFO: 2020-09-09 01:02:00 INFO: 2020-09-09 01:02:00 INFO: 2020-09-09 01:02:00 INFO: 2020-09-09 02:00:20 INFO: 2020-09-09 02:00:20 INFO: 2020-09-09 02:00:20 INFO: 2020-09-09 02:00:20 INFO: 2020-09-09 02:00:20 INFO: init new order start 2020-09-09 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 8, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 338.75, 'high': 343.35, 'low': 325.15, 'close': 336.35, 'trades': 18301, 'volume': 17520981, 'vwap': 333.29, 'lastSize': 700, 'turnover': 583952022170, 'homeNotional': 175539.77259674284, 'foreignNotional': 58510935.83487832}, {'timestamp': datetime.datetime(2020, 9, 8, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 336.15, 'high': 340.35, 'low': 333.85, 'close': 338.75, 'trades': 4437, 'volume': 3365148, 'vwap': 336.39, 'lastSize': 20, 'turnover': 113197446545, 'homeNotional': 33686.09606088718, 'foreignNotional': 11331532.690169828}, {'timestamp': datetime.datetime(2020, 9, 8, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 334.3, 'high': 339.4, 'low': 334.25, 'close': 336.15, 'trades': 3481, 'volume': 2401354, 'vwap': 336.89, 'lastSize': 1, 'turnover': 80898103025, 'homeNotional': 24052.398491016935, 'foreignNotional': 8102963.755481761}] 2020-09-09 02:00:20 INFO: prepare candles [CandleItem(low=325.15, high=343.35, open=338.75, close=336.35, color='RED'), CandleItem(low=333.85, high=340.35, open=336.15, close=338.75, color='GREEN'), CandleItem(low=334.25, high=339.4, open=334.3, close=336.15, color='GREEN')] 2020-09-09 02:00:20 INFO: last_candle=CandleItem(low=325.15, high=343.35, open=338.75, close=336.35, color='RED') 2020-09-09 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-09-09 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=325.15, high=343.35, open=338.75, close=336.35, color='RED') 2020-09-09 02:00:20 INFO: skip by CandleItem(low=325.15, high=343.35, open=338.75, close=336.35, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-09 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-09-09 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=325.15, high=343.35, open=338.75, close=336.35, color='RED') 2020-09-09 02:00:20 INFO: skip by CandleItem(low=325.15, high=343.35, open=338.75, close=336.35, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-09 02:00:20 INFO: not found applicable config for candle 2020-09-09 02:00:20 INFO: check need new order None 2020-09-09 02:00:20 INFO: init new order end 2020-09-09 02:00:20 INFO: 2020-09-09 02:00:20 INFO: 2020-09-09 02:00:20 INFO: 2020-09-09 02:00:20 INFO: 2020-09-09 02:02:00 INFO: 2020-09-09 02:02:00 INFO: 2020-09-09 02:02:00 INFO: 2020-09-09 02:02:00 INFO: 2020-09-09 02:02:00 INFO: clearing start 2020-09-09 02:02:00 INFO: clearing end 2020-09-09 02:02:00 INFO: 2020-09-09 02:02:00 INFO: 2020-09-09 02:02:00 INFO: 2020-09-09 02:02:00 INFO: 2020-09-09 03:00:20 INFO: 2020-09-09 03:00:20 INFO: 2020-09-09 03:00:20 INFO: 2020-09-09 03:00:20 INFO: 2020-09-09 03:00:20 INFO: init new order start 2020-09-09 03:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 9, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 336.35, 'high': 339.2, 'low': 335.4, 'close': 337.6, 'trades': 4580, 'volume': 3169244, 'vwap': 337.25, 'lastSize': 6000, 'turnover': 106880800655, 'homeNotional': 32056.42431920036, 'foreignNotional': 10810857.718587218}, {'timestamp': datetime.datetime(2020, 9, 8, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 338.75, 'high': 343.35, 'low': 325.15, 'close': 336.35, 'trades': 18301, 'volume': 17520981, 'vwap': 333.29, 'lastSize': 700, 'turnover': 583952022170, 'homeNotional': 175539.77259674284, 'foreignNotional': 58510935.83487832}, {'timestamp': datetime.datetime(2020, 9, 8, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 336.15, 'high': 340.35, 'low': 333.85, 'close': 338.75, 'trades': 4437, 'volume': 3365148, 'vwap': 336.39, 'lastSize': 20, 'turnover': 113197446545, 'homeNotional': 33686.09606088718, 'foreignNotional': 11331532.690169828}] 2020-09-09 03:00:21 INFO: prepare candles [CandleItem(low=335.4, high=339.2, open=336.35, close=337.6, color='GREEN'), CandleItem(low=325.15, high=343.35, open=338.75, close=336.35, color='RED'), CandleItem(low=333.85, high=340.35, open=336.15, close=338.75, color='GREEN')] 2020-09-09 03:00:21 INFO: skip by colors first_candle=CandleItem(low=333.85, high=340.35, open=336.15, close=338.75, color='GREEN') second_candle=CandleItem(low=325.15, high=343.35, open=338.75, close=336.35, color='RED') last_candle=CandleItem(low=335.4, high=339.2, open=336.35, close=337.6, color='GREEN') 2020-09-09 03:00:21 INFO: check need new order None 2020-09-09 03:00:21 INFO: init new order end 2020-09-09 03:00:21 INFO: 2020-09-09 03:00:21 INFO: 2020-09-09 03:00:21 INFO: 2020-09-09 03:00:21 INFO: 2020-09-09 03:02:00 INFO: 2020-09-09 03:02:00 INFO: 2020-09-09 03:02:00 INFO: 2020-09-09 03:02:00 INFO: 2020-09-09 03:02:00 INFO: clearing start 2020-09-09 03:02:00 INFO: clearing end 2020-09-09 03:02:00 INFO: 2020-09-09 03:02:00 INFO: 2020-09-09 03:02:00 INFO: 2020-09-09 03:02:00 INFO: 2020-09-09 04:00:20 INFO: 2020-09-09 04:00:20 INFO: 2020-09-09 04:00:20 INFO: 2020-09-09 04:00:20 INFO: 2020-09-09 04:00:20 INFO: init new order start 2020-09-09 04:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 9, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 337.6, 'high': 342.1, 'low': 335.75, 'close': 339.0, 'trades': 4337, 'volume': 3461933, 'vwap': 339.74, 'lastSize': 746, 'turnover': 117614828350, 'homeNotional': 35063.62868910903, 'foreignNotional': 11912494.33839972}, {'timestamp': datetime.datetime(2020, 9, 9, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 336.35, 'high': 339.2, 'low': 335.4, 'close': 337.6, 'trades': 4580, 'volume': 3169244, 'vwap': 337.25, 'lastSize': 6000, 'turnover': 106880800655, 'homeNotional': 32056.42431920036, 'foreignNotional': 10810857.718587218}, {'timestamp': datetime.datetime(2020, 9, 8, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 338.75, 'high': 343.35, 'low': 325.15, 'close': 336.35, 'trades': 18301, 'volume': 17520981, 'vwap': 333.29, 'lastSize': 700, 'turnover': 583952022170, 'homeNotional': 175539.77259674284, 'foreignNotional': 58510935.83487832}] 2020-09-09 04:00:20 INFO: prepare candles [CandleItem(low=335.75, high=342.1, open=337.6, close=339.0, color='GREEN'), CandleItem(low=335.4, high=339.2, open=336.35, close=337.6, color='GREEN'), CandleItem(low=325.15, high=343.35, open=338.75, close=336.35, color='RED')] 2020-09-09 04:00:20 INFO: skip by colors first_candle=CandleItem(low=325.15, high=343.35, open=338.75, close=336.35, color='RED') second_candle=CandleItem(low=335.4, high=339.2, open=336.35, close=337.6, color='GREEN') last_candle=CandleItem(low=335.75, high=342.1, open=337.6, close=339.0, color='GREEN') 2020-09-09 04:00:20 INFO: check need new order None 2020-09-09 04:00:20 INFO: init new order end 2020-09-09 04:00:20 INFO: 2020-09-09 04:00:20 INFO: 2020-09-09 04:00:20 INFO: 2020-09-09 04:00:20 INFO: 2020-09-09 04:02:00 INFO: 2020-09-09 04:02:00 INFO: 2020-09-09 04:02:00 INFO: 2020-09-09 04:02:00 INFO: 2020-09-09 04:02:00 INFO: clearing start 2020-09-09 04:02:00 INFO: clearing end 2020-09-09 04:02:00 INFO: 2020-09-09 04:02:00 INFO: 2020-09-09 04:02:00 INFO: 2020-09-09 04:02:00 INFO: 2020-09-09 05:00:20 INFO: 2020-09-09 05:00:20 INFO: 2020-09-09 05:00:20 INFO: 2020-09-09 05:00:20 INFO: 2020-09-09 05:00:20 INFO: init new order start 2020-09-09 05:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 9, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.0, 'high': 340.25, 'low': 336.95, 'close': 340.2, 'trades': 2865, 'volume': 2477158, 'vwap': 338.58, 'lastSize': 9552, 'turnover': 83869847635, 'homeNotional': 25033.75254173151, 'foreignNotional': 8475764.806270774}, {'timestamp': datetime.datetime(2020, 9, 9, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 337.6, 'high': 342.1, 'low': 335.75, 'close': 339.0, 'trades': 4337, 'volume': 3461933, 'vwap': 339.74, 'lastSize': 746, 'turnover': 117614828350, 'homeNotional': 35063.62868910903, 'foreignNotional': 11912494.33839972}, {'timestamp': datetime.datetime(2020, 9, 9, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 336.35, 'high': 339.2, 'low': 335.4, 'close': 337.6, 'trades': 4580, 'volume': 3169244, 'vwap': 337.25, 'lastSize': 6000, 'turnover': 106880800655, 'homeNotional': 32056.42431920036, 'foreignNotional': 10810857.718587218}] 2020-09-09 05:00:20 INFO: prepare candles [CandleItem(low=336.95, high=340.25, open=339.0, close=340.2, color='GREEN'), CandleItem(low=335.75, high=342.1, open=337.6, close=339.0, color='GREEN'), CandleItem(low=335.4, high=339.2, open=336.35, close=337.6, color='GREEN')] 2020-09-09 05:00:20 INFO: skip by colors first_candle=CandleItem(low=335.4, high=339.2, open=336.35, close=337.6, color='GREEN') second_candle=CandleItem(low=335.75, high=342.1, open=337.6, close=339.0, color='GREEN') last_candle=CandleItem(low=336.95, high=340.25, open=339.0, close=340.2, color='GREEN') 2020-09-09 05:00:20 INFO: check need new order None 2020-09-09 05:00:20 INFO: init new order end 2020-09-09 05:00:20 INFO: 2020-09-09 05:00:20 INFO: 2020-09-09 05:00:20 INFO: 2020-09-09 05:00:20 INFO: 2020-09-09 05:02:00 INFO: 2020-09-09 05:02:00 INFO: 2020-09-09 05:02:00 INFO: 2020-09-09 05:02:00 INFO: 2020-09-09 05:02:00 INFO: clearing start 2020-09-09 05:02:00 INFO: clearing end 2020-09-09 05:02:00 INFO: 2020-09-09 05:02:00 INFO: 2020-09-09 05:02:00 INFO: 2020-09-09 05:02:00 INFO: 2020-09-09 06:00:20 INFO: 2020-09-09 06:00:20 INFO: 2020-09-09 06:00:20 INFO: 2020-09-09 06:00:20 INFO: 2020-09-09 06:00:20 INFO: init new order start 2020-09-09 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 9, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 340.2, 'high': 340.9, 'low': 332.85, 'close': 333.2, 'trades': 4227, 'volume': 2968839, 'vwap': 336.21, 'lastSize': 1799, 'turnover': 99814876505, 'homeNotional': 29819.150178871536, 'foreignNotional': 10025701.252490925}, {'timestamp': datetime.datetime(2020, 9, 9, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.0, 'high': 340.25, 'low': 336.95, 'close': 340.2, 'trades': 2865, 'volume': 2477158, 'vwap': 338.58, 'lastSize': 9552, 'turnover': 83869847635, 'homeNotional': 25033.75254173151, 'foreignNotional': 8475764.806270774}, {'timestamp': datetime.datetime(2020, 9, 9, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 337.6, 'high': 342.1, 'low': 335.75, 'close': 339.0, 'trades': 4337, 'volume': 3461933, 'vwap': 339.74, 'lastSize': 746, 'turnover': 117614828350, 'homeNotional': 35063.62868910903, 'foreignNotional': 11912494.33839972}] 2020-09-09 06:00:20 INFO: prepare candles [CandleItem(low=332.85, high=340.9, open=340.2, close=333.2, color='RED'), CandleItem(low=336.95, high=340.25, open=339.0, close=340.2, color='GREEN'), CandleItem(low=335.75, high=342.1, open=337.6, close=339.0, color='GREEN')] 2020-09-09 06:00:20 INFO: last_candle=CandleItem(low=332.85, high=340.9, open=340.2, close=333.2, color='RED') 2020-09-09 06: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-09 06: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=332.85, high=340.9, open=340.2, close=333.2, color='RED') 2020-09-09 06:00:20 INFO: skip by CandleItem(low=332.85, high=340.9, open=340.2, close=333.2, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-09 06: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-09 06: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=332.85, high=340.9, open=340.2, close=333.2, color='RED') 2020-09-09 06:00:20 INFO: skip by CandleItem(low=332.85, high=340.9, open=340.2, close=333.2, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-09 06:00:20 INFO: not found applicable config for candle 2020-09-09 06:00:20 INFO: check need new order None 2020-09-09 06:00:20 INFO: init new order end 2020-09-09 06:00:20 INFO: 2020-09-09 06:00:20 INFO: 2020-09-09 06:00:20 INFO: 2020-09-09 06:00:20 INFO: 2020-09-09 06:02:00 INFO: 2020-09-09 06:02:00 INFO: 2020-09-09 06:02:00 INFO: 2020-09-09 06:02:00 INFO: 2020-09-09 06:02:00 INFO: clearing start 2020-09-09 06:02:00 INFO: clearing end 2020-09-09 06:02:00 INFO: 2020-09-09 06:02:00 INFO: 2020-09-09 06:02:00 INFO: 2020-09-09 06:02:00 INFO: 2020-09-09 07:00:20 INFO: 2020-09-09 07:00:20 INFO: 2020-09-09 07:00:20 INFO: 2020-09-09 07:00:20 INFO: 2020-09-09 07:00:20 INFO: init new order start 2020-09-09 07:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 9, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 333.2, 'high': 334.85, 'low': 331.1, 'close': 334.4, 'trades': 3292, 'volume': 2004299, 'vwap': 333.27, 'lastSize': 500, 'turnover': 66795534130, 'homeNotional': 20055.796707937418, 'foreignNotional': 6683838.040804356}, {'timestamp': datetime.datetime(2020, 9, 9, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 340.2, 'high': 340.9, 'low': 332.85, 'close': 333.2, 'trades': 4227, 'volume': 2968839, 'vwap': 336.21, 'lastSize': 1799, 'turnover': 99814876505, 'homeNotional': 29819.150178871536, 'foreignNotional': 10025701.252490925}, {'timestamp': datetime.datetime(2020, 9, 9, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.0, 'high': 340.25, 'low': 336.95, 'close': 340.2, 'trades': 2865, 'volume': 2477158, 'vwap': 338.58, 'lastSize': 9552, 'turnover': 83869847635, 'homeNotional': 25033.75254173151, 'foreignNotional': 8475764.806270774}] 2020-09-09 07:00:21 INFO: prepare candles [CandleItem(low=331.1, high=334.85, open=333.2, close=334.4, color='GREEN'), CandleItem(low=332.85, high=340.9, open=340.2, close=333.2, color='RED'), CandleItem(low=336.95, high=340.25, open=339.0, close=340.2, color='GREEN')] 2020-09-09 07:00:21 INFO: skip by colors first_candle=CandleItem(low=336.95, high=340.25, open=339.0, close=340.2, color='GREEN') second_candle=CandleItem(low=332.85, high=340.9, open=340.2, close=333.2, color='RED') last_candle=CandleItem(low=331.1, high=334.85, open=333.2, close=334.4, color='GREEN') 2020-09-09 07:00:21 INFO: check need new order None 2020-09-09 07:00:21 INFO: init new order end 2020-09-09 07:00:21 INFO: 2020-09-09 07:00:21 INFO: 2020-09-09 07:00:21 INFO: 2020-09-09 07:00:21 INFO: 2020-09-09 07:02:00 INFO: 2020-09-09 07:02:00 INFO: 2020-09-09 07:02:00 INFO: 2020-09-09 07:02:00 INFO: 2020-09-09 07:02:00 INFO: clearing start 2020-09-09 07:02:00 INFO: clearing end 2020-09-09 07:02:00 INFO: 2020-09-09 07:02:00 INFO: 2020-09-09 07:02:00 INFO: 2020-09-09 07:02:00 INFO: 2020-09-09 07:53:01 ERROR: Error : [Errno 110] Connection timed out 2020-09-09 07:53:01 ERROR: error from callback >: [Errno 110] Connection timed out 2020-09-09 07:53:01 INFO: Websocket Closed 2020-09-09 07:53:01 WARNING: reconnect to socket 2020-09-09 07:53:01 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-09-09 07:53:01 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-09-09 07:53:01 INFO: Authenticating with API Key. 2020-09-09 07:53:06 ERROR: Couldn't connect to WS! Exiting. Traceback (most recent call last): File "app/trader.py", line 131, in main() File "app/trader.py", line 107, in main WS_CLIENT = connect() File "/home/crypto/current/app/bitmex_ws.py", line 155, in connect return CustomBitmexWS(endpoint=client_rest.swagger_spec.api_url, api_key=API_KEY, api_secret=API_SECRET) File "/home/crypto/current/app/bitmex_ws.py", line 37, in __init__ self.__connect() File "/home/crypto/current/app/bitmex_ws.py", line 69, in __connect raise websocket.WebSocketTimeoutException('Couldn\'t connect to WS! Exiting.') websocket._exceptions.WebSocketTimeoutException: Couldn't connect to WS! Exiting. /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-09-09 07:53:16 INFO: 2020-09-09 07:53:16 INFO: 2020-09-09 07:53:16 INFO: 2020-09-09 07:53:16 INFO: 2020-09-09 07:53:16 INFO: start trader process 2020-09-09 07:53:16 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-09-09 07:53:16 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-09-09 07:53:16 INFO: Authenticating with API Key. 2020-09-09 07:53:17 INFO: Connected to WS. 2020-09-09 08:00:20 INFO: 2020-09-09 08:00:20 INFO: 2020-09-09 08:00:20 INFO: 2020-09-09 08:00:20 INFO: 2020-09-09 08:00:20 INFO: init new order start 2020-09-09 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 9, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 334.4, 'high': 338.0, 'low': 332.6, 'close': 335.7, 'trades': 3492, 'volume': 2423670, 'vwap': 335.46, 'lastSize': 85, 'turnover': 81304093695, 'homeNotional': 24354.280670913107, 'foreignNotional': 8169944.926116491}, {'timestamp': datetime.datetime(2020, 9, 9, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 333.2, 'high': 334.85, 'low': 331.1, 'close': 334.4, 'trades': 3292, 'volume': 2004299, 'vwap': 333.27, 'lastSize': 500, 'turnover': 66795534130, 'homeNotional': 20055.796707937418, 'foreignNotional': 6683838.040804356}, {'timestamp': datetime.datetime(2020, 9, 9, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 340.2, 'high': 340.9, 'low': 332.85, 'close': 333.2, 'trades': 4227, 'volume': 2968839, 'vwap': 336.21, 'lastSize': 1799, 'turnover': 99814876505, 'homeNotional': 29819.150178871536, 'foreignNotional': 10025701.252490925}] 2020-09-09 08:00:20 INFO: prepare candles [CandleItem(low=332.6, high=338.0, open=334.4, close=335.7, color='GREEN'), CandleItem(low=331.1, high=334.85, open=333.2, close=334.4, color='GREEN'), CandleItem(low=332.85, high=340.9, open=340.2, close=333.2, color='RED')] 2020-09-09 08:00:20 INFO: skip by colors first_candle=CandleItem(low=332.85, high=340.9, open=340.2, close=333.2, color='RED') second_candle=CandleItem(low=331.1, high=334.85, open=333.2, close=334.4, color='GREEN') last_candle=CandleItem(low=332.6, high=338.0, open=334.4, close=335.7, color='GREEN') 2020-09-09 08:00:20 INFO: check need new order None 2020-09-09 08:00:20 INFO: init new order end 2020-09-09 08:00:20 INFO: 2020-09-09 08:00:20 INFO: 2020-09-09 08:00:20 INFO: 2020-09-09 08:00:20 INFO: 2020-09-09 08:02:00 INFO: 2020-09-09 08:02:00 INFO: 2020-09-09 08:02:00 INFO: 2020-09-09 08:02:00 INFO: 2020-09-09 08: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-09-09 08:02:00 INFO: clearing end 2020-09-09 08:02:00 INFO: 2020-09-09 08:02:00 INFO: 2020-09-09 08:02:00 INFO: 2020-09-09 08:02:00 INFO: 2020-09-09 09:00:20 INFO: 2020-09-09 09:00:20 INFO: 2020-09-09 09:00:20 INFO: 2020-09-09 09:00:20 INFO: 2020-09-09 09:00:20 INFO: init new order start 2020-09-09 09:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 9, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 335.7, 'high': 338.9, 'low': 335.4, 'close': 337.0, 'trades': 3546, 'volume': 2084207, 'vwap': 337.32, 'lastSize': 60, 'turnover': 70302398365, 'homeNotional': 21057.861433695747, 'foreignNotional': 7103039.788708145}, {'timestamp': datetime.datetime(2020, 9, 9, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 334.4, 'high': 338.0, 'low': 332.6, 'close': 335.7, 'trades': 3492, 'volume': 2423670, 'vwap': 335.46, 'lastSize': 85, 'turnover': 81304093695, 'homeNotional': 24354.280670913107, 'foreignNotional': 8169944.926116491}, {'timestamp': datetime.datetime(2020, 9, 9, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 333.2, 'high': 334.85, 'low': 331.1, 'close': 334.4, 'trades': 3292, 'volume': 2004299, 'vwap': 333.27, 'lastSize': 500, 'turnover': 66795534130, 'homeNotional': 20055.796707937418, 'foreignNotional': 6683838.040804356}] 2020-09-09 09:00:20 INFO: prepare candles [CandleItem(low=335.4, high=338.9, open=335.7, close=337.0, color='GREEN'), CandleItem(low=332.6, high=338.0, open=334.4, close=335.7, color='GREEN'), CandleItem(low=331.1, high=334.85, open=333.2, close=334.4, color='GREEN')] 2020-09-09 09:00:20 INFO: skip by colors first_candle=CandleItem(low=331.1, high=334.85, open=333.2, close=334.4, color='GREEN') second_candle=CandleItem(low=332.6, high=338.0, open=334.4, close=335.7, color='GREEN') last_candle=CandleItem(low=335.4, high=338.9, open=335.7, close=337.0, color='GREEN') 2020-09-09 09:00:20 INFO: check need new order None 2020-09-09 09:00:20 INFO: init new order end 2020-09-09 09:00:20 INFO: 2020-09-09 09:00:20 INFO: 2020-09-09 09:00:20 INFO: 2020-09-09 09:00:20 INFO: 2020-09-09 09:02:00 INFO: 2020-09-09 09:02:00 INFO: 2020-09-09 09:02:00 INFO: 2020-09-09 09:02:00 INFO: 2020-09-09 09:02:00 INFO: clearing start 2020-09-09 09:02:00 INFO: clearing end 2020-09-09 09:02:00 INFO: 2020-09-09 09:02:00 INFO: 2020-09-09 09:02:00 INFO: 2020-09-09 09:02:00 INFO: 2020-09-09 10:00:20 INFO: 2020-09-09 10:00:20 INFO: 2020-09-09 10:00:20 INFO: 2020-09-09 10:00:20 INFO: 2020-09-09 10:00:20 INFO: init new order start 2020-09-09 10:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 9, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 337.0, 'high': 338.2, 'low': 334.55, 'close': 337.6, 'trades': 2853, 'volume': 2264518, 'vwap': 336.44, 'lastSize': 200, 'turnover': 76187082415, 'homeNotional': 22839.93501936225, 'foreignNotional': 7684250.310481455}, {'timestamp': datetime.datetime(2020, 9, 9, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 335.7, 'high': 338.9, 'low': 335.4, 'close': 337.0, 'trades': 3546, 'volume': 2084207, 'vwap': 337.32, 'lastSize': 60, 'turnover': 70302398365, 'homeNotional': 21057.861433695747, 'foreignNotional': 7103039.788708145}, {'timestamp': datetime.datetime(2020, 9, 9, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 334.4, 'high': 338.0, 'low': 332.6, 'close': 335.7, 'trades': 3492, 'volume': 2423670, 'vwap': 335.46, 'lastSize': 85, 'turnover': 81304093695, 'homeNotional': 24354.280670913107, 'foreignNotional': 8169944.926116491}] 2020-09-09 10:00:20 INFO: prepare candles [CandleItem(low=334.55, high=338.2, open=337.0, close=337.6, color='GREEN'), CandleItem(low=335.4, high=338.9, open=335.7, close=337.0, color='GREEN'), CandleItem(low=332.6, high=338.0, open=334.4, close=335.7, color='GREEN')] 2020-09-09 10:00:20 INFO: skip by colors first_candle=CandleItem(low=332.6, high=338.0, open=334.4, close=335.7, color='GREEN') second_candle=CandleItem(low=335.4, high=338.9, open=335.7, close=337.0, color='GREEN') last_candle=CandleItem(low=334.55, high=338.2, open=337.0, close=337.6, color='GREEN') 2020-09-09 10:00:20 INFO: check need new order None 2020-09-09 10:00:20 INFO: init new order end 2020-09-09 10:00:20 INFO: 2020-09-09 10:00:20 INFO: 2020-09-09 10:00:20 INFO: 2020-09-09 10:00:20 INFO: 2020-09-09 10:02:00 INFO: 2020-09-09 10:02:00 INFO: 2020-09-09 10:02:00 INFO: 2020-09-09 10:02:00 INFO: 2020-09-09 10:02:00 INFO: clearing start 2020-09-09 10:02:00 INFO: clearing end 2020-09-09 10:02:00 INFO: 2020-09-09 10:02:00 INFO: 2020-09-09 10:02:00 INFO: 2020-09-09 10:02:00 INFO: 2020-09-09 11:00:20 INFO: 2020-09-09 11:00:20 INFO: 2020-09-09 11:00:20 INFO: 2020-09-09 11:00:20 INFO: 2020-09-09 11:00:20 INFO: init new order start 2020-09-09 11:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 9, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 337.6, 'high': 343.0, 'low': 337.6, 'close': 342.85, 'trades': 4843, 'volume': 4250763, 'vwap': 339.7, 'lastSize': 100, 'turnover': 144397477355, 'homeNotional': 43177.67220738861, 'foreignNotional': 14667529.354442466}, {'timestamp': datetime.datetime(2020, 9, 9, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 337.0, 'high': 338.2, 'low': 334.55, 'close': 337.6, 'trades': 2853, 'volume': 2264518, 'vwap': 336.44, 'lastSize': 200, 'turnover': 76187082415, 'homeNotional': 22839.93501936225, 'foreignNotional': 7684250.310481455}, {'timestamp': datetime.datetime(2020, 9, 9, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 335.7, 'high': 338.9, 'low': 335.4, 'close': 337.0, 'trades': 3546, 'volume': 2084207, 'vwap': 337.32, 'lastSize': 60, 'turnover': 70302398365, 'homeNotional': 21057.861433695747, 'foreignNotional': 7103039.788708145}] 2020-09-09 11:00:21 INFO: prepare candles [CandleItem(low=337.6, high=343.0, open=337.6, close=342.85, color='GREEN'), CandleItem(low=334.55, high=338.2, open=337.0, close=337.6, color='GREEN'), CandleItem(low=335.4, high=338.9, open=335.7, close=337.0, color='GREEN')] 2020-09-09 11:00:21 INFO: skip by colors first_candle=CandleItem(low=335.4, high=338.9, open=335.7, close=337.0, color='GREEN') second_candle=CandleItem(low=334.55, high=338.2, open=337.0, close=337.6, color='GREEN') last_candle=CandleItem(low=337.6, high=343.0, open=337.6, close=342.85, color='GREEN') 2020-09-09 11:00:21 INFO: check need new order None 2020-09-09 11:00:21 INFO: init new order end 2020-09-09 11:00:21 INFO: 2020-09-09 11:00:21 INFO: 2020-09-09 11:00:21 INFO: 2020-09-09 11:00:21 INFO: 2020-09-09 11:02:00 INFO: 2020-09-09 11:02:00 INFO: 2020-09-09 11:02:00 INFO: 2020-09-09 11:02:00 INFO: 2020-09-09 11:02:00 INFO: clearing start 2020-09-09 11:02:00 INFO: clearing end 2020-09-09 11:02:00 INFO: 2020-09-09 11:02:00 INFO: 2020-09-09 11:02:00 INFO: 2020-09-09 11:02:00 INFO: 2020-09-09 12:00:20 INFO: 2020-09-09 12:00:20 INFO: 2020-09-09 12:00:20 INFO: 2020-09-09 12:00:20 INFO: 2020-09-09 12:00:20 INFO: init new order start 2020-09-09 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 9, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 342.85, 'high': 344.1, 'low': 340.3, 'close': 341.45, 'trades': 3629, 'volume': 2705135, 'vwap': 342.02, 'lastSize': 26, 'turnover': 92519912930, 'homeNotional': 27533.158911743532, 'foreignNotional': 9416800.204773158}, {'timestamp': datetime.datetime(2020, 9, 9, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 337.6, 'high': 343.0, 'low': 337.6, 'close': 342.85, 'trades': 4843, 'volume': 4250763, 'vwap': 339.7, 'lastSize': 100, 'turnover': 144397477355, 'homeNotional': 43177.67220738861, 'foreignNotional': 14667529.354442466}, {'timestamp': datetime.datetime(2020, 9, 9, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 337.0, 'high': 338.2, 'low': 334.55, 'close': 337.6, 'trades': 2853, 'volume': 2264518, 'vwap': 336.44, 'lastSize': 200, 'turnover': 76187082415, 'homeNotional': 22839.93501936225, 'foreignNotional': 7684250.310481455}] 2020-09-09 12:00:20 INFO: prepare candles [CandleItem(low=340.3, high=344.1, open=342.85, close=341.45, color='RED'), CandleItem(low=337.6, high=343.0, open=337.6, close=342.85, color='GREEN'), CandleItem(low=334.55, high=338.2, open=337.0, close=337.6, color='GREEN')] 2020-09-09 12:00:20 INFO: last_candle=CandleItem(low=340.3, high=344.1, open=342.85, close=341.45, color='RED') 2020-09-09 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-09-09 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=340.3, high=344.1, open=342.85, close=341.45, color='RED') 2020-09-09 12:00:20 INFO: skip by CandleItem(low=340.3, high=344.1, open=342.85, close=341.45, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-09 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-09-09 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=340.3, high=344.1, open=342.85, close=341.45, color='RED') 2020-09-09 12:00:20 INFO: skip by CandleItem(low=340.3, high=344.1, open=342.85, close=341.45, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-09 12:00:20 INFO: not found applicable config for candle 2020-09-09 12:00:20 INFO: check need new order None 2020-09-09 12:00:20 INFO: init new order end 2020-09-09 12:00:20 INFO: 2020-09-09 12:00:20 INFO: 2020-09-09 12:00:20 INFO: 2020-09-09 12:00:20 INFO: 2020-09-09 12:02:00 INFO: 2020-09-09 12:02:00 INFO: 2020-09-09 12:02:00 INFO: 2020-09-09 12:02:00 INFO: 2020-09-09 12:02:00 INFO: clearing start 2020-09-09 12:02:00 INFO: clearing end 2020-09-09 12:02:00 INFO: 2020-09-09 12:02:00 INFO: 2020-09-09 12:02:00 INFO: 2020-09-09 12:02:00 INFO: 2020-09-09 13:00:20 INFO: 2020-09-09 13:00:20 INFO: 2020-09-09 13:00:20 INFO: 2020-09-09 13:00:20 INFO: 2020-09-09 13:00:20 INFO: init new order start 2020-09-09 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 9, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.45, 'high': 347.5, 'low': 340.8, 'close': 346.85, 'trades': 4380, 'volume': 3169193, 'vwap': 344.93, 'lastSize': 19, 'turnover': 109313054380, 'homeNotional': 32276.51907187506, 'foreignNotional': 11133004.322632484}, {'timestamp': datetime.datetime(2020, 9, 9, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 342.85, 'high': 344.1, 'low': 340.3, 'close': 341.45, 'trades': 3629, 'volume': 2705135, 'vwap': 342.02, 'lastSize': 26, 'turnover': 92519912930, 'homeNotional': 27533.158911743532, 'foreignNotional': 9416800.204773158}, {'timestamp': datetime.datetime(2020, 9, 9, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 337.6, 'high': 343.0, 'low': 337.6, 'close': 342.85, 'trades': 4843, 'volume': 4250763, 'vwap': 339.7, 'lastSize': 100, 'turnover': 144397477355, 'homeNotional': 43177.67220738861, 'foreignNotional': 14667529.354442466}] 2020-09-09 13:00:20 INFO: prepare candles [CandleItem(low=340.8, high=347.5, open=341.45, close=346.85, color='GREEN'), CandleItem(low=340.3, high=344.1, open=342.85, close=341.45, color='RED'), CandleItem(low=337.6, high=343.0, open=337.6, close=342.85, color='GREEN')] 2020-09-09 13:00:20 INFO: skip by colors first_candle=CandleItem(low=337.6, high=343.0, open=337.6, close=342.85, color='GREEN') second_candle=CandleItem(low=340.3, high=344.1, open=342.85, close=341.45, color='RED') last_candle=CandleItem(low=340.8, high=347.5, open=341.45, close=346.85, color='GREEN') 2020-09-09 13:00:20 INFO: check need new order None 2020-09-09 13:00:20 INFO: init new order end 2020-09-09 13:00:20 INFO: 2020-09-09 13:00:20 INFO: 2020-09-09 13:00:20 INFO: 2020-09-09 13:00:20 INFO: 2020-09-09 13:02:00 INFO: 2020-09-09 13:02:00 INFO: 2020-09-09 13:02:00 INFO: 2020-09-09 13:02:00 INFO: 2020-09-09 13:02:00 INFO: clearing start 2020-09-09 13:02:00 INFO: clearing end 2020-09-09 13:02:00 INFO: 2020-09-09 13:02:00 INFO: 2020-09-09 13:02:00 INFO: 2020-09-09 13:02:00 INFO: 2020-09-09 14:00:20 INFO: 2020-09-09 14:00:20 INFO: 2020-09-09 14:00:20 INFO: 2020-09-09 14:00:20 INFO: 2020-09-09 14:00:20 INFO: init new order start 2020-09-09 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 9, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.85, 'high': 347.65, 'low': 344.25, 'close': 346.1, 'trades': 2555, 'volume': 2206039, 'vwap': 345.69, 'lastSize': 172, 'turnover': 76258400870, 'homeNotional': 22451.15466260346, 'foreignNotional': 7760933.374164441}, {'timestamp': datetime.datetime(2020, 9, 9, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.45, 'high': 347.5, 'low': 340.8, 'close': 346.85, 'trades': 4380, 'volume': 3169193, 'vwap': 344.93, 'lastSize': 19, 'turnover': 109313054380, 'homeNotional': 32276.51907187506, 'foreignNotional': 11133004.322632484}, {'timestamp': datetime.datetime(2020, 9, 9, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 342.85, 'high': 344.1, 'low': 340.3, 'close': 341.45, 'trades': 3629, 'volume': 2705135, 'vwap': 342.02, 'lastSize': 26, 'turnover': 92519912930, 'homeNotional': 27533.158911743532, 'foreignNotional': 9416800.204773158}] 2020-09-09 14:00:20 INFO: prepare candles [CandleItem(low=344.25, high=347.65, open=346.85, close=346.1, color='RED'), CandleItem(low=340.8, high=347.5, open=341.45, close=346.85, color='GREEN'), CandleItem(low=340.3, high=344.1, open=342.85, close=341.45, color='RED')] 2020-09-09 14:00:20 INFO: skip by colors first_candle=CandleItem(low=340.3, high=344.1, open=342.85, close=341.45, color='RED') second_candle=CandleItem(low=340.8, high=347.5, open=341.45, close=346.85, color='GREEN') last_candle=CandleItem(low=344.25, high=347.65, open=346.85, close=346.1, color='RED') 2020-09-09 14:00:20 INFO: check need new order None 2020-09-09 14:00:20 INFO: init new order end 2020-09-09 14:00:20 INFO: 2020-09-09 14:00:20 INFO: 2020-09-09 14:00:20 INFO: 2020-09-09 14:00:20 INFO: 2020-09-09 14:02:00 INFO: 2020-09-09 14:02:00 INFO: 2020-09-09 14:02:00 INFO: 2020-09-09 14:02:00 INFO: 2020-09-09 14:02:00 INFO: clearing start 2020-09-09 14:02:00 INFO: clearing end 2020-09-09 14:02:00 INFO: 2020-09-09 14:02:00 INFO: 2020-09-09 14:02:00 INFO: 2020-09-09 14:02:00 INFO: 2020-09-09 15:00:20 INFO: 2020-09-09 15:00:20 INFO: 2020-09-09 15:00:20 INFO: 2020-09-09 15:00:20 INFO: 2020-09-09 15:00:20 INFO: init new order start 2020-09-09 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 9, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.1, 'high': 351.25, 'low': 346.05, 'close': 347.95, 'trades': 4398, 'volume': 2908788, 'vwap': 348.77, 'lastSize': 1000, 'turnover': 101448424330, 'homeNotional': 29718.718553371946, 'foreignNotional': 10364916.76390261}, {'timestamp': datetime.datetime(2020, 9, 9, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.85, 'high': 347.65, 'low': 344.25, 'close': 346.1, 'trades': 2555, 'volume': 2206039, 'vwap': 345.69, 'lastSize': 172, 'turnover': 76258400870, 'homeNotional': 22451.15466260346, 'foreignNotional': 7760933.374164441}, {'timestamp': datetime.datetime(2020, 9, 9, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 341.45, 'high': 347.5, 'low': 340.8, 'close': 346.85, 'trades': 4380, 'volume': 3169193, 'vwap': 344.93, 'lastSize': 19, 'turnover': 109313054380, 'homeNotional': 32276.51907187506, 'foreignNotional': 11133004.322632484}] 2020-09-09 15:00:20 INFO: prepare candles [CandleItem(low=346.05, high=351.25, open=346.1, close=347.95, color='GREEN'), CandleItem(low=344.25, high=347.65, open=346.85, close=346.1, color='RED'), CandleItem(low=340.8, high=347.5, open=341.45, close=346.85, color='GREEN')] 2020-09-09 15:00:20 INFO: skip by colors first_candle=CandleItem(low=340.8, high=347.5, open=341.45, close=346.85, color='GREEN') second_candle=CandleItem(low=344.25, high=347.65, open=346.85, close=346.1, color='RED') last_candle=CandleItem(low=346.05, high=351.25, open=346.1, close=347.95, color='GREEN') 2020-09-09 15:00:20 INFO: check need new order None 2020-09-09 15:00:20 INFO: init new order end 2020-09-09 15:00:20 INFO: 2020-09-09 15:00:20 INFO: 2020-09-09 15:00:20 INFO: 2020-09-09 15:00:20 INFO: 2020-09-09 15:02:00 INFO: 2020-09-09 15:02:00 INFO: 2020-09-09 15:02:00 INFO: 2020-09-09 15:02:00 INFO: 2020-09-09 15:02:00 INFO: clearing start 2020-09-09 15:02:00 INFO: clearing end 2020-09-09 15:02:00 INFO: 2020-09-09 15:02:00 INFO: 2020-09-09 15:02:00 INFO: 2020-09-09 15:02:00 INFO: 2020-09-09 16:00:20 INFO: 2020-09-09 16:00:20 INFO: 2020-09-09 16:00:20 INFO: 2020-09-09 16:00:20 INFO: 2020-09-09 16:00:20 INFO: init new order start 2020-09-09 16:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 9, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.95, 'high': 349.9, 'low': 345.35, 'close': 347.35, 'trades': 3276, 'volume': 2352705, 'vwap': 347.54, 'lastSize': 200, 'turnover': 81765585690, 'homeNotional': 24035.331680303163, 'foreignNotional': 8353281.2301823655}, {'timestamp': datetime.datetime(2020, 9, 9, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.1, 'high': 351.25, 'low': 346.05, 'close': 347.95, 'trades': 4398, 'volume': 2908788, 'vwap': 348.77, 'lastSize': 1000, 'turnover': 101448424330, 'homeNotional': 29718.718553371946, 'foreignNotional': 10364916.76390261}, {'timestamp': datetime.datetime(2020, 9, 9, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.85, 'high': 347.65, 'low': 344.25, 'close': 346.1, 'trades': 2555, 'volume': 2206039, 'vwap': 345.69, 'lastSize': 172, 'turnover': 76258400870, 'homeNotional': 22451.15466260346, 'foreignNotional': 7760933.374164441}] 2020-09-09 16:00:20 INFO: prepare candles [CandleItem(low=345.35, high=349.9, open=347.95, close=347.35, color='RED'), CandleItem(low=346.05, high=351.25, open=346.1, close=347.95, color='GREEN'), CandleItem(low=344.25, high=347.65, open=346.85, close=346.1, color='RED')] 2020-09-09 16:00:20 INFO: skip by colors first_candle=CandleItem(low=344.25, high=347.65, open=346.85, close=346.1, color='RED') second_candle=CandleItem(low=346.05, high=351.25, open=346.1, close=347.95, color='GREEN') last_candle=CandleItem(low=345.35, high=349.9, open=347.95, close=347.35, color='RED') 2020-09-09 16:00:20 INFO: check need new order None 2020-09-09 16:00:20 INFO: init new order end 2020-09-09 16:00:20 INFO: 2020-09-09 16:00:20 INFO: 2020-09-09 16:00:20 INFO: 2020-09-09 16:00:20 INFO: 2020-09-09 16:02:00 INFO: 2020-09-09 16:02:00 INFO: 2020-09-09 16:02:00 INFO: 2020-09-09 16:02:00 INFO: 2020-09-09 16:02:00 INFO: clearing start 2020-09-09 16:02:00 INFO: clearing end 2020-09-09 16:02:00 INFO: 2020-09-09 16:02:00 INFO: 2020-09-09 16:02:00 INFO: 2020-09-09 16:02:00 INFO: 2020-09-09 17:00:20 INFO: 2020-09-09 17:00:20 INFO: 2020-09-09 17:00:20 INFO: 2020-09-09 17:00:20 INFO: 2020-09-09 17:00:20 INFO: init new order start 2020-09-09 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 9, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.35, 'high': 352.95, 'low': 347.3, 'close': 347.75, 'trades': 5066, 'volume': 4212653, 'vwap': 350.35, 'lastSize': 68, 'turnover': 147589747630, 'homeNotional': 43119.56565951521, 'foreignNotional': 15106985.181444995}, {'timestamp': datetime.datetime(2020, 9, 9, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.95, 'high': 349.9, 'low': 345.35, 'close': 347.35, 'trades': 3276, 'volume': 2352705, 'vwap': 347.54, 'lastSize': 200, 'turnover': 81765585690, 'homeNotional': 24035.331680303163, 'foreignNotional': 8353281.2301823655}, {'timestamp': datetime.datetime(2020, 9, 9, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.1, 'high': 351.25, 'low': 346.05, 'close': 347.95, 'trades': 4398, 'volume': 2908788, 'vwap': 348.77, 'lastSize': 1000, 'turnover': 101448424330, 'homeNotional': 29718.718553371946, 'foreignNotional': 10364916.76390261}] 2020-09-09 17:00:20 INFO: prepare candles [CandleItem(low=347.3, high=352.95, open=347.35, close=347.75, color='GREEN'), CandleItem(low=345.35, high=349.9, open=347.95, close=347.35, color='RED'), CandleItem(low=346.05, high=351.25, open=346.1, close=347.95, color='GREEN')] 2020-09-09 17:00:20 INFO: skip by colors first_candle=CandleItem(low=346.05, high=351.25, open=346.1, close=347.95, color='GREEN') second_candle=CandleItem(low=345.35, high=349.9, open=347.95, close=347.35, color='RED') last_candle=CandleItem(low=347.3, high=352.95, open=347.35, close=347.75, color='GREEN') 2020-09-09 17:00:20 INFO: check need new order None 2020-09-09 17:00:20 INFO: init new order end 2020-09-09 17:00:20 INFO: 2020-09-09 17:00:20 INFO: 2020-09-09 17:00:20 INFO: 2020-09-09 17:00:20 INFO: 2020-09-09 17:02:00 INFO: 2020-09-09 17:02:00 INFO: 2020-09-09 17:02:00 INFO: 2020-09-09 17:02:00 INFO: 2020-09-09 17:02:00 INFO: clearing start 2020-09-09 17:02:00 INFO: clearing end 2020-09-09 17:02:00 INFO: 2020-09-09 17:02:00 INFO: 2020-09-09 17:02:00 INFO: 2020-09-09 17:02:00 INFO: 2020-09-09 18:00:20 INFO: 2020-09-09 18:00:20 INFO: 2020-09-09 18:00:20 INFO: 2020-09-09 18:00:20 INFO: 2020-09-09 18:00:20 INFO: init new order start 2020-09-09 18:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 9, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.75, 'high': 352.35, 'low': 346.35, 'close': 351.65, 'trades': 5013, 'volume': 4156582, 'vwap': 349.46, 'lastSize': 200, 'turnover': 145255744810, 'homeNotional': 42552.75172196303, 'foreignNotional': 14870602.141150853}, {'timestamp': datetime.datetime(2020, 9, 9, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.35, 'high': 352.95, 'low': 347.3, 'close': 347.75, 'trades': 5066, 'volume': 4212653, 'vwap': 350.35, 'lastSize': 68, 'turnover': 147589747630, 'homeNotional': 43119.56565951521, 'foreignNotional': 15106985.181444995}, {'timestamp': datetime.datetime(2020, 9, 9, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.95, 'high': 349.9, 'low': 345.35, 'close': 347.35, 'trades': 3276, 'volume': 2352705, 'vwap': 347.54, 'lastSize': 200, 'turnover': 81765585690, 'homeNotional': 24035.331680303163, 'foreignNotional': 8353281.2301823655}] 2020-09-09 18:00:20 INFO: prepare candles [CandleItem(low=346.35, high=352.35, open=347.75, close=351.65, color='GREEN'), CandleItem(low=347.3, high=352.95, open=347.35, close=347.75, color='GREEN'), CandleItem(low=345.35, high=349.9, open=347.95, close=347.35, color='RED')] 2020-09-09 18:00:20 INFO: skip by colors first_candle=CandleItem(low=345.35, high=349.9, open=347.95, close=347.35, color='RED') second_candle=CandleItem(low=347.3, high=352.95, open=347.35, close=347.75, color='GREEN') last_candle=CandleItem(low=346.35, high=352.35, open=347.75, close=351.65, color='GREEN') 2020-09-09 18:00:20 INFO: check need new order None 2020-09-09 18:00:20 INFO: init new order end 2020-09-09 18:00:20 INFO: 2020-09-09 18:00:20 INFO: 2020-09-09 18:00:20 INFO: 2020-09-09 18:00:20 INFO: 2020-09-09 18:02:00 INFO: 2020-09-09 18:02:00 INFO: 2020-09-09 18:02:00 INFO: 2020-09-09 18:02:00 INFO: 2020-09-09 18:02:00 INFO: clearing start 2020-09-09 18:02:00 INFO: clearing end 2020-09-09 18:02:00 INFO: 2020-09-09 18:02:00 INFO: 2020-09-09 18:02:00 INFO: 2020-09-09 18:02:00 INFO: 2020-09-09 19:00:20 INFO: 2020-09-09 19:00:20 INFO: 2020-09-09 19:00:20 INFO: 2020-09-09 19:00:20 INFO: 2020-09-09 19:00:20 INFO: init new order start 2020-09-09 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 9, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.65, 'high': 355.5, 'low': 351.65, 'close': 352.9, 'trades': 5935, 'volume': 5117379, 'vwap': 353.83, 'lastSize': 2000, 'turnover': 181066760670, 'homeNotional': 52538.9627061146, 'foreignNotional': 18589730.620977383}, {'timestamp': datetime.datetime(2020, 9, 9, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.75, 'high': 352.35, 'low': 346.35, 'close': 351.65, 'trades': 5013, 'volume': 4156582, 'vwap': 349.46, 'lastSize': 200, 'turnover': 145255744810, 'homeNotional': 42552.75172196303, 'foreignNotional': 14870602.141150853}, {'timestamp': datetime.datetime(2020, 9, 9, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.35, 'high': 352.95, 'low': 347.3, 'close': 347.75, 'trades': 5066, 'volume': 4212653, 'vwap': 350.35, 'lastSize': 68, 'turnover': 147589747630, 'homeNotional': 43119.56565951521, 'foreignNotional': 15106985.181444995}] 2020-09-09 19:00:20 INFO: prepare candles [CandleItem(low=351.65, high=355.5, open=351.65, close=352.9, color='GREEN'), CandleItem(low=346.35, high=352.35, open=347.75, close=351.65, color='GREEN'), CandleItem(low=347.3, high=352.95, open=347.35, close=347.75, color='GREEN')] 2020-09-09 19:00:20 INFO: skip by colors first_candle=CandleItem(low=347.3, high=352.95, open=347.35, close=347.75, color='GREEN') second_candle=CandleItem(low=346.35, high=352.35, open=347.75, close=351.65, color='GREEN') last_candle=CandleItem(low=351.65, high=355.5, open=351.65, close=352.9, color='GREEN') 2020-09-09 19:00:20 INFO: check need new order None 2020-09-09 19:00:20 INFO: init new order end 2020-09-09 19:00:20 INFO: 2020-09-09 19:00:20 INFO: 2020-09-09 19:00:20 INFO: 2020-09-09 19:00:20 INFO: 2020-09-09 19:02:00 INFO: 2020-09-09 19:02:00 INFO: 2020-09-09 19:02:00 INFO: 2020-09-09 19:02:00 INFO: 2020-09-09 19:02:00 INFO: clearing start 2020-09-09 19:02:00 INFO: clearing end 2020-09-09 19:02:00 INFO: 2020-09-09 19:02:00 INFO: 2020-09-09 19:02:00 INFO: 2020-09-09 19:02:00 INFO: 2020-09-09 20:00:20 INFO: 2020-09-09 20:00:20 INFO: 2020-09-09 20:00:20 INFO: 2020-09-09 20:00:20 INFO: 2020-09-09 20:00:20 INFO: init new order start 2020-09-09 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 9, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.9, 'high': 354.85, 'low': 349.35, 'close': 352.2, 'trades': 4331, 'volume': 2200011, 'vwap': 351.72, 'lastSize': 5, 'turnover': 77377412240, 'homeNotional': 22524.54195789765, 'foreignNotional': 7922227.38786681}, {'timestamp': datetime.datetime(2020, 9, 9, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.65, 'high': 355.5, 'low': 351.65, 'close': 352.9, 'trades': 5935, 'volume': 5117379, 'vwap': 353.83, 'lastSize': 2000, 'turnover': 181066760670, 'homeNotional': 52538.9627061146, 'foreignNotional': 18589730.620977383}, {'timestamp': datetime.datetime(2020, 9, 9, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.75, 'high': 352.35, 'low': 346.35, 'close': 351.65, 'trades': 5013, 'volume': 4156582, 'vwap': 349.46, 'lastSize': 200, 'turnover': 145255744810, 'homeNotional': 42552.75172196303, 'foreignNotional': 14870602.141150853}] 2020-09-09 20:00:20 INFO: prepare candles [CandleItem(low=349.35, high=354.85, open=352.9, close=352.2, color='RED'), CandleItem(low=351.65, high=355.5, open=351.65, close=352.9, color='GREEN'), CandleItem(low=346.35, high=352.35, open=347.75, close=351.65, color='GREEN')] 2020-09-09 20:00:20 INFO: last_candle=CandleItem(low=349.35, high=354.85, open=352.9, close=352.2, color='RED') 2020-09-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-09-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=349.35, high=354.85, open=352.9, close=352.2, color='RED') 2020-09-09 20:00:20 INFO: skip by CandleItem(low=349.35, high=354.85, open=352.9, close=352.2, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-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-09-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=349.35, high=354.85, open=352.9, close=352.2, color='RED') 2020-09-09 20:00:20 INFO: skip by CandleItem(low=349.35, high=354.85, open=352.9, close=352.2, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-09 20:00:20 INFO: not found applicable config for candle 2020-09-09 20:00:20 INFO: check need new order None 2020-09-09 20:00:20 INFO: init new order end 2020-09-09 20:00:20 INFO: 2020-09-09 20:00:20 INFO: 2020-09-09 20:00:20 INFO: 2020-09-09 20:00:20 INFO: 2020-09-09 20:02:00 INFO: 2020-09-09 20:02:00 INFO: 2020-09-09 20:02:00 INFO: 2020-09-09 20:02:00 INFO: 2020-09-09 20:02:00 INFO: clearing start 2020-09-09 20:02:00 INFO: clearing end 2020-09-09 20:02:00 INFO: 2020-09-09 20:02:00 INFO: 2020-09-09 20:02:00 INFO: 2020-09-09 20:02:00 INFO: 2020-09-09 21:00:20 INFO: 2020-09-09 21:00:20 INFO: 2020-09-09 21:00:20 INFO: 2020-09-09 21:00:20 INFO: 2020-09-09 21:00:20 INFO: init new order start 2020-09-09 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 9, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.2, 'high': 352.75, 'low': 349.9, 'close': 352.1, 'trades': 3063, 'volume': 1643675, 'vwap': 351.55, 'lastSize': 8000, 'turnover': 57782764075, 'homeNotional': 16842.120110916632, 'foreignNotional': 5920790.126131011}, {'timestamp': datetime.datetime(2020, 9, 9, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.9, 'high': 354.85, 'low': 349.35, 'close': 352.2, 'trades': 4331, 'volume': 2200011, 'vwap': 351.72, 'lastSize': 5, 'turnover': 77377412240, 'homeNotional': 22524.54195789765, 'foreignNotional': 7922227.38786681}, {'timestamp': datetime.datetime(2020, 9, 9, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.65, 'high': 355.5, 'low': 351.65, 'close': 352.9, 'trades': 5935, 'volume': 5117379, 'vwap': 353.83, 'lastSize': 2000, 'turnover': 181066760670, 'homeNotional': 52538.9627061146, 'foreignNotional': 18589730.620977383}] 2020-09-09 21:00:20 INFO: prepare candles [CandleItem(low=349.9, high=352.75, open=352.2, close=352.1, color='RED'), CandleItem(low=349.35, high=354.85, open=352.9, close=352.2, color='RED'), CandleItem(low=351.65, high=355.5, open=351.65, close=352.9, color='GREEN')] 2020-09-09 21:00:20 INFO: skip by colors first_candle=CandleItem(low=351.65, high=355.5, open=351.65, close=352.9, color='GREEN') second_candle=CandleItem(low=349.35, high=354.85, open=352.9, close=352.2, color='RED') last_candle=CandleItem(low=349.9, high=352.75, open=352.2, close=352.1, color='RED') 2020-09-09 21:00:20 INFO: check need new order None 2020-09-09 21:00:20 INFO: init new order end 2020-09-09 21:00:20 INFO: 2020-09-09 21:00:20 INFO: 2020-09-09 21:00:20 INFO: 2020-09-09 21:00:20 INFO: 2020-09-09 21:02:00 INFO: 2020-09-09 21:02:00 INFO: 2020-09-09 21:02:00 INFO: 2020-09-09 21:02:00 INFO: 2020-09-09 21:02:00 INFO: clearing start 2020-09-09 21:02:00 INFO: clearing end 2020-09-09 21:02:00 INFO: 2020-09-09 21:02:00 INFO: 2020-09-09 21:02:00 INFO: 2020-09-09 21:02:00 INFO: 2020-09-09 22:00:20 INFO: 2020-09-09 22:00:20 INFO: 2020-09-09 22:00:20 INFO: 2020-09-09 22:00:20 INFO: 2020-09-09 22:00:20 INFO: init new order start 2020-09-09 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 9, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.1, 'high': 359.4, 'low': 351.4, 'close': 358.75, 'trades': 6326, 'volume': 3998914, 'vwap': 356.07, 'lastSize': 17, 'turnover': 142386098085, 'homeNotional': 41219.06819737736, 'foreignNotional': 14676762.927730834}, {'timestamp': datetime.datetime(2020, 9, 9, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.2, 'high': 352.75, 'low': 349.9, 'close': 352.1, 'trades': 3063, 'volume': 1643675, 'vwap': 351.55, 'lastSize': 8000, 'turnover': 57782764075, 'homeNotional': 16842.120110916632, 'foreignNotional': 5920790.126131011}, {'timestamp': datetime.datetime(2020, 9, 9, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.9, 'high': 354.85, 'low': 349.35, 'close': 352.2, 'trades': 4331, 'volume': 2200011, 'vwap': 351.72, 'lastSize': 5, 'turnover': 77377412240, 'homeNotional': 22524.54195789765, 'foreignNotional': 7922227.38786681}] 2020-09-09 22:00:20 INFO: prepare candles [CandleItem(low=351.4, high=359.4, open=352.1, close=358.75, color='GREEN'), CandleItem(low=349.9, high=352.75, open=352.2, close=352.1, color='RED'), CandleItem(low=349.35, high=354.85, open=352.9, close=352.2, color='RED')] 2020-09-09 22:00:20 INFO: last_candle=CandleItem(low=351.4, high=359.4, open=352.1, close=358.75, color='GREEN') 2020-09-09 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-09 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=351.4, high=359.4, open=352.1, close=358.75, color='GREEN') 2020-09-09 22:00:20 INFO: skip by CandleItem(low=351.4, high=359.4, open=352.1, close=358.75, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-09 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-09 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=351.4, high=359.4, open=352.1, close=358.75, color='GREEN') 2020-09-09 22:00:20 INFO: skip by CandleItem(low=351.4, high=359.4, open=352.1, close=358.75, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-09 22:00:20 INFO: not found applicable config for candle 2020-09-09 22:00:20 INFO: check need new order None 2020-09-09 22:00:20 INFO: init new order end 2020-09-09 22:00:20 INFO: 2020-09-09 22:00:20 INFO: 2020-09-09 22:00:20 INFO: 2020-09-09 22:00:20 INFO: 2020-09-09 22:02:00 INFO: 2020-09-09 22:02:00 INFO: 2020-09-09 22:02:00 INFO: 2020-09-09 22:02:00 INFO: 2020-09-09 22:02:00 INFO: clearing start 2020-09-09 22:02:01 INFO: clearing end 2020-09-09 22:02:01 INFO: 2020-09-09 22:02:01 INFO: 2020-09-09 22:02:01 INFO: 2020-09-09 22:02:01 INFO: 2020-09-09 23:00:20 INFO: 2020-09-09 23:00:20 INFO: 2020-09-09 23:00:20 INFO: 2020-09-09 23:00:20 INFO: 2020-09-09 23:00:20 INFO: init new order start 2020-09-09 23:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 9, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 358.75, 'high': 359.8, 'low': 356.15, 'close': 356.6, 'trades': 3467, 'volume': 2448497, 'vwap': 357.85, 'lastSize': 4, 'turnover': 87618565685, 'homeNotional': 25267.99448795377, 'foreignNotional': 9042089.717321517}, {'timestamp': datetime.datetime(2020, 9, 9, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.1, 'high': 359.4, 'low': 351.4, 'close': 358.75, 'trades': 6326, 'volume': 3998914, 'vwap': 356.07, 'lastSize': 17, 'turnover': 142386098085, 'homeNotional': 41219.06819737736, 'foreignNotional': 14676762.927730834}, {'timestamp': datetime.datetime(2020, 9, 9, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.2, 'high': 352.75, 'low': 349.9, 'close': 352.1, 'trades': 3063, 'volume': 1643675, 'vwap': 351.55, 'lastSize': 8000, 'turnover': 57782764075, 'homeNotional': 16842.120110916632, 'foreignNotional': 5920790.126131011}] 2020-09-09 23:00:20 INFO: prepare candles [CandleItem(low=356.15, high=359.8, open=358.75, close=356.6, color='RED'), CandleItem(low=351.4, high=359.4, open=352.1, close=358.75, color='GREEN'), CandleItem(low=349.9, high=352.75, open=352.2, close=352.1, color='RED')] 2020-09-09 23:00:20 INFO: skip by colors first_candle=CandleItem(low=349.9, high=352.75, open=352.2, close=352.1, color='RED') second_candle=CandleItem(low=351.4, high=359.4, open=352.1, close=358.75, color='GREEN') last_candle=CandleItem(low=356.15, high=359.8, open=358.75, close=356.6, color='RED') 2020-09-09 23:00:20 INFO: check need new order None 2020-09-09 23:00:20 INFO: init new order end 2020-09-09 23:00:20 INFO: 2020-09-09 23:00:20 INFO: 2020-09-09 23:00:20 INFO: 2020-09-09 23:00:20 INFO: 2020-09-09 23:02:00 INFO: 2020-09-09 23:02:00 INFO: 2020-09-09 23:02:00 INFO: 2020-09-09 23:02:00 INFO: 2020-09-09 23:02:00 INFO: clearing start 2020-09-09 23:02:00 INFO: clearing end 2020-09-09 23:02:00 INFO: 2020-09-09 23:02:00 INFO: 2020-09-09 23:02:00 INFO: 2020-09-09 23:02:00 INFO: 2020-09-10 00:00:20 INFO: 2020-09-10 00:00:20 INFO: 2020-09-10 00:00:20 INFO: 2020-09-10 00:00:20 INFO: 2020-09-10 00:00:20 INFO: init new order start 2020-09-10 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 9, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.6, 'high': 357.9, 'low': 353.65, 'close': 353.75, 'trades': 2834, 'volume': 2164559, 'vwap': 355.61, 'lastSize': 2000, 'turnover': 76973046740, 'homeNotional': 22250.818623630606, 'foreignNotional': 7912546.682163817}, {'timestamp': datetime.datetime(2020, 9, 9, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 358.75, 'high': 359.8, 'low': 356.15, 'close': 356.6, 'trades': 3467, 'volume': 2448497, 'vwap': 357.85, 'lastSize': 4, 'turnover': 87618565685, 'homeNotional': 25267.99448795377, 'foreignNotional': 9042089.717321517}, {'timestamp': datetime.datetime(2020, 9, 9, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.1, 'high': 359.4, 'low': 351.4, 'close': 358.75, 'trades': 6326, 'volume': 3998914, 'vwap': 356.07, 'lastSize': 17, 'turnover': 142386098085, 'homeNotional': 41219.06819737736, 'foreignNotional': 14676762.927730834}] 2020-09-10 00:00:20 INFO: prepare candles [CandleItem(low=353.65, high=357.9, open=356.6, close=353.75, color='RED'), CandleItem(low=356.15, high=359.8, open=358.75, close=356.6, color='RED'), CandleItem(low=351.4, high=359.4, open=352.1, close=358.75, color='GREEN')] 2020-09-10 00:00:20 INFO: skip by colors first_candle=CandleItem(low=351.4, high=359.4, open=352.1, close=358.75, color='GREEN') second_candle=CandleItem(low=356.15, high=359.8, open=358.75, close=356.6, color='RED') last_candle=CandleItem(low=353.65, high=357.9, open=356.6, close=353.75, color='RED') 2020-09-10 00:00:20 INFO: check need new order None 2020-09-10 00:00:20 INFO: init new order end 2020-09-10 00:00:20 INFO: 2020-09-10 00:00:20 INFO: 2020-09-10 00:00:20 INFO: 2020-09-10 00:00:20 INFO: 2020-09-10 00:02:00 INFO: 2020-09-10 00:02:00 INFO: 2020-09-10 00:02:00 INFO: 2020-09-10 00:02:00 INFO: 2020-09-10 00:02:00 INFO: clearing start 2020-09-10 00:02:00 INFO: clearing end 2020-09-10 00:02:00 INFO: 2020-09-10 00:02:00 INFO: 2020-09-10 00:02:00 INFO: 2020-09-10 00:02:00 INFO: 2020-09-10 01:00:20 INFO: 2020-09-10 01:00:20 INFO: 2020-09-10 01:00:20 INFO: 2020-09-10 01:00:20 INFO: 2020-09-10 01:00:20 INFO: init new order start 2020-09-10 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 9, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.75, 'high': 356.7, 'low': 352.05, 'close': 354.0, 'trades': 3618, 'volume': 3193009, 'vwap': 354.07, 'lastSize': 200, 'turnover': 113053554925, 'homeNotional': 32751.03735799917, 'foreignNotional': 11596060.023774624}, {'timestamp': datetime.datetime(2020, 9, 9, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.6, 'high': 357.9, 'low': 353.65, 'close': 353.75, 'trades': 2834, 'volume': 2164559, 'vwap': 355.61, 'lastSize': 2000, 'turnover': 76973046740, 'homeNotional': 22250.818623630606, 'foreignNotional': 7912546.682163817}, {'timestamp': datetime.datetime(2020, 9, 9, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 358.75, 'high': 359.8, 'low': 356.15, 'close': 356.6, 'trades': 3467, 'volume': 2448497, 'vwap': 357.85, 'lastSize': 4, 'turnover': 87618565685, 'homeNotional': 25267.99448795377, 'foreignNotional': 9042089.717321517}] 2020-09-10 01:00:20 INFO: prepare candles [CandleItem(low=352.05, high=356.7, open=353.75, close=354.0, color='GREEN'), CandleItem(low=353.65, high=357.9, open=356.6, close=353.75, color='RED'), CandleItem(low=356.15, high=359.8, open=358.75, close=356.6, color='RED')] 2020-09-10 01:00:20 INFO: last_candle=CandleItem(low=352.05, high=356.7, open=353.75, close=354.0, color='GREEN') 2020-09-10 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-10 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=352.05, high=356.7, open=353.75, close=354.0, color='GREEN') 2020-09-10 01:00:20 INFO: skip by CandleItem(low=352.05, high=356.7, open=353.75, close=354.0, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-10 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-10 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=352.05, high=356.7, open=353.75, close=354.0, color='GREEN') 2020-09-10 01:00:20 INFO: skip by CandleItem(low=352.05, high=356.7, open=353.75, close=354.0, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-10 01:00:20 INFO: not found applicable config for candle 2020-09-10 01:00:20 INFO: check need new order None 2020-09-10 01:00:20 INFO: init new order end 2020-09-10 01:00:20 INFO: 2020-09-10 01:00:20 INFO: 2020-09-10 01:00:20 INFO: 2020-09-10 01:00:20 INFO: 2020-09-10 01:02:00 INFO: 2020-09-10 01:02:00 INFO: 2020-09-10 01:02:00 INFO: 2020-09-10 01:02:00 INFO: 2020-09-10 01:02:00 INFO: clearing start 2020-09-10 01:02:00 INFO: clearing end 2020-09-10 01:02:00 INFO: 2020-09-10 01:02:00 INFO: 2020-09-10 01:02:00 INFO: 2020-09-10 01:02:00 INFO: 2020-09-10 02:00:20 INFO: 2020-09-10 02:00:20 INFO: 2020-09-10 02:00:20 INFO: 2020-09-10 02:00:20 INFO: 2020-09-10 02:00:20 INFO: init new order start 2020-09-10 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 9, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.0, 'high': 356.9, 'low': 353.25, 'close': 356.7, 'trades': 3004, 'volume': 1623608, 'vwap': 355.24, 'lastSize': 2076, 'turnover': 57676105540, 'homeNotional': 16661.30451330919, 'foreignNotional': 5918678.110508644}, {'timestamp': datetime.datetime(2020, 9, 9, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.75, 'high': 356.7, 'low': 352.05, 'close': 354.0, 'trades': 3618, 'volume': 3193009, 'vwap': 354.07, 'lastSize': 200, 'turnover': 113053554925, 'homeNotional': 32751.03735799917, 'foreignNotional': 11596060.023774624}, {'timestamp': datetime.datetime(2020, 9, 9, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.6, 'high': 357.9, 'low': 353.65, 'close': 353.75, 'trades': 2834, 'volume': 2164559, 'vwap': 355.61, 'lastSize': 2000, 'turnover': 76973046740, 'homeNotional': 22250.818623630606, 'foreignNotional': 7912546.682163817}] 2020-09-10 02:00:20 INFO: prepare candles [CandleItem(low=353.25, high=356.9, open=354.0, close=356.7, color='GREEN'), CandleItem(low=352.05, high=356.7, open=353.75, close=354.0, color='GREEN'), CandleItem(low=353.65, high=357.9, open=356.6, close=353.75, color='RED')] 2020-09-10 02:00:20 INFO: skip by colors first_candle=CandleItem(low=353.65, high=357.9, open=356.6, close=353.75, color='RED') second_candle=CandleItem(low=352.05, high=356.7, open=353.75, close=354.0, color='GREEN') last_candle=CandleItem(low=353.25, high=356.9, open=354.0, close=356.7, color='GREEN') 2020-09-10 02:00:20 INFO: check need new order None 2020-09-10 02:00:20 INFO: init new order end 2020-09-10 02:00:20 INFO: 2020-09-10 02:00:20 INFO: 2020-09-10 02:00:20 INFO: 2020-09-10 02:00:20 INFO: 2020-09-10 02:02:00 INFO: 2020-09-10 02:02:00 INFO: 2020-09-10 02:02:00 INFO: 2020-09-10 02:02:00 INFO: 2020-09-10 02:02:00 INFO: clearing start 2020-09-10 02:02:00 INFO: clearing end 2020-09-10 02:02:00 INFO: 2020-09-10 02:02:00 INFO: 2020-09-10 02:02:00 INFO: 2020-09-10 02:02:00 INFO: 2020-09-10 03:00:20 INFO: 2020-09-10 03:00:20 INFO: 2020-09-10 03:00:20 INFO: 2020-09-10 03:00:20 INFO: 2020-09-10 03:00:20 INFO: init new order start 2020-09-10 03:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 10, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.7, 'high': 357.2, 'low': 350.6, 'close': 351.5, 'trades': 5152, 'volume': 3521954, 'vwap': 353.01, 'lastSize': 11, 'turnover': 124327076705, 'homeNotional': 36019.16858504419, 'foreignNotional': 12715125.462296758}, {'timestamp': datetime.datetime(2020, 9, 9, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.0, 'high': 356.9, 'low': 353.25, 'close': 356.7, 'trades': 3004, 'volume': 1623608, 'vwap': 355.24, 'lastSize': 2076, 'turnover': 57676105540, 'homeNotional': 16661.30451330919, 'foreignNotional': 5918678.110508644}, {'timestamp': datetime.datetime(2020, 9, 9, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.75, 'high': 356.7, 'low': 352.05, 'close': 354.0, 'trades': 3618, 'volume': 3193009, 'vwap': 354.07, 'lastSize': 200, 'turnover': 113053554925, 'homeNotional': 32751.03735799917, 'foreignNotional': 11596060.023774624}] 2020-09-10 03:00:21 INFO: prepare candles [CandleItem(low=350.6, high=357.2, open=356.7, close=351.5, color='RED'), CandleItem(low=353.25, high=356.9, open=354.0, close=356.7, color='GREEN'), CandleItem(low=352.05, high=356.7, open=353.75, close=354.0, color='GREEN')] 2020-09-10 03:00:21 INFO: last_candle=CandleItem(low=350.6, high=357.2, open=356.7, close=351.5, color='RED') 2020-09-10 03: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-10 03: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=350.6, high=357.2, open=356.7, close=351.5, color='RED') 2020-09-10 03:00:21 INFO: skip by CandleItem(low=350.6, high=357.2, open=356.7, close=351.5, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-10 03: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-10 03: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=350.6, high=357.2, open=356.7, close=351.5, color='RED') 2020-09-10 03:00:21 INFO: apply filter None to candle=CandleItem(low=353.25, high=356.9, open=354.0, close=356.7, color='GREEN') 2020-09-10 03:00:21 INFO: apply filter None to candle=CandleItem(low=352.05, high=356.7, open=353.75, close=354.0, color='GREEN') 2020-09-10 03:00:21 INFO: hit candle order=OrderProperties(candle=CandleItem(low=350.6, high=357.2, open=356.7, close=351.5, color='RED'), take_profit_factor=5.0, clearing_interval=3600) 2020-09-10 03:00:21 INFO: check need new order OrderProperties(candle=CandleItem(low=350.6, high=357.2, open=356.7, close=351.5, color='RED'), take_profit_factor=5.0, clearing_interval=3600) 2020-09-10 03:00:21 INFO: place order: start candle=CandleItem(low=350.6, high=357.2, open=356.7, close=351.5, color='RED') ticker='ETHUSD' price_offset=0.1 2020-09-10 03:00:21 INFO: place order: side_factor=1 init_trigger_price=350.55 init_order_price=350.5 stop_price_offset=0.0 candle.size=6.599999999999966 stop_price=357.2 take_price=317.50000000000017 2020-09-10 03:00:21 INFO: place order round: side_factor=1 init_trigger_price=Decimal('350.55000000000001136868377216160297393798828125') init_order_price=Decimal('350.5') stop_price_offset=0.0 candle.size=6.599999999999966 stop_price=Decimal('357.19999999999998863131622783839702606201171875') take_price=Decimal('317.50000000000017053025658242404460906982421875') 2020-09-10 03:00:21 INFO: place order: compute qty=-286 2020-09-10 03:00:21 INFO: place order: save order to db e420916b953a4dcbb29460c75d18bb67; response=True 2020-09-10 03:00:21 INFO: post order to exchange resp={'orderID': '151364f8-4bec-fd4f-ad5e-e3aaf6243af4', 'clOrdID': 'e420916b953a4dcbb29460c75d18bb67', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 286, 'price': 350.5, 'displayQty': None, 'stopPx': 350.55, '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': 286, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 10, 0, 0, 21, 49000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 10, 0, 0, 21, 49000, tzinfo=tzutc())} 2020-09-10 03:00:21 INFO: place new init order {'qty': -286, 'init_price': Decimal('350.55000000000001136868377216160297393798828125'), 'stop_price': Decimal('357.19999999999998863131622783839702606201171875'), 'take_price': Decimal('317.50000000000017053025658242404460906982421875'), 'order_uid': 'e420916b953a4dcbb29460c75d18bb67', 'response': {'orderID': '151364f8-4bec-fd4f-ad5e-e3aaf6243af4', 'clOrdID': 'e420916b953a4dcbb29460c75d18bb67', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 286, 'price': 350.5, 'displayQty': None, 'stopPx': 350.55, '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': 286, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 10, 0, 0, 21, 49000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 10, 0, 0, 21, 49000, tzinfo=tzutc())}} 2020-09-10 03:00:21 INFO: init new order end 2020-09-10 03:00:21 INFO: 2020-09-10 03:00:21 INFO: 2020-09-10 03:00:21 INFO: 2020-09-10 03:00:21 INFO: 2020-09-10 03:00:21 INFO: process event {'orderID': '151364f8-4bec-fd4f-ad5e-e3aaf6243af4', 'clOrdID': 'e420916b953a4dcbb29460c75d18bb67', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 286, 'price': 350.5, 'displayQty': None, 'stopPx': 350.55, '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': 286, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-09-10T00:00:21.049Z', 'timestamp': '2020-09-10T00:00:21.049Z'} 2020-09-10 03:00:21 INFO: skip event e420916b953a4dcbb29460c75d18bb67 New 2020-09-10 03:02:00 INFO: 2020-09-10 03:02:00 INFO: 2020-09-10 03:02:00 INFO: 2020-09-10 03:02:00 INFO: 2020-09-10 03:02:00 INFO: clearing start 2020-09-10 03:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '151364f8-4bec-fd4f-ad5e-e3aaf6243af4', 'clOrdID': 'e420916b953a4dcbb29460c75d18bb67', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 286, 'price': 350.5, 'displayQty': None, 'stopPx': 350.55, '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': 286, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 10, 0, 0, 21, 49000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 10, 0, 0, 21, 49000, tzinfo=tzutc())} 2020-09-10 03:02:00 INFO: order time=2020-09-10 00:00:21.049000+00:00; delta from now UTC=0:01:39.165711 time_delta.total_seconds()=99.165711; time_diff_offset='3600' 2020-09-10 03:02:00 INFO: skip by time diff 2020-09-10 00:00:21.049000+00:00 2020-09-10 03:02:00 INFO: clearing end 2020-09-10 03:02:00 INFO: 2020-09-10 03:02:00 INFO: 2020-09-10 03:02:00 INFO: 2020-09-10 03:02:00 INFO: 2020-09-10 04:00:20 INFO: 2020-09-10 04:00:20 INFO: 2020-09-10 04:00:20 INFO: 2020-09-10 04:00:20 INFO: 2020-09-10 04:00:20 INFO: init new order start 2020-09-10 04:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 10, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.5, 'high': 359.3, 'low': 350.6, 'close': 356.5, 'trades': 5839, 'volume': 4025283, 'vwap': 356.0, 'lastSize': 380, 'turnover': 143300025940, 'homeNotional': 41416.97857912487, 'foreignNotional': 14744698.613326417}, {'timestamp': datetime.datetime(2020, 9, 10, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.7, 'high': 357.2, 'low': 350.6, 'close': 351.5, 'trades': 5152, 'volume': 3521954, 'vwap': 353.01, 'lastSize': 11, 'turnover': 124327076705, 'homeNotional': 36019.16858504419, 'foreignNotional': 12715125.462296758}, {'timestamp': datetime.datetime(2020, 9, 9, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.0, 'high': 356.9, 'low': 353.25, 'close': 356.7, 'trades': 3004, 'volume': 1623608, 'vwap': 355.24, 'lastSize': 2076, 'turnover': 57676105540, 'homeNotional': 16661.30451330919, 'foreignNotional': 5918678.110508644}] 2020-09-10 04:00:20 INFO: prepare candles [CandleItem(low=350.6, high=359.3, open=351.5, close=356.5, color='GREEN'), CandleItem(low=350.6, high=357.2, open=356.7, close=351.5, color='RED'), CandleItem(low=353.25, high=356.9, open=354.0, close=356.7, color='GREEN')] 2020-09-10 04:00:20 INFO: skip by colors first_candle=CandleItem(low=353.25, high=356.9, open=354.0, close=356.7, color='GREEN') second_candle=CandleItem(low=350.6, high=357.2, open=356.7, close=351.5, color='RED') last_candle=CandleItem(low=350.6, high=359.3, open=351.5, close=356.5, color='GREEN') 2020-09-10 04:00:20 INFO: check need new order None 2020-09-10 04:00:20 INFO: init new order end 2020-09-10 04:00:20 INFO: 2020-09-10 04:00:20 INFO: 2020-09-10 04:00:20 INFO: 2020-09-10 04:00:20 INFO: 2020-09-10 04:02:00 INFO: 2020-09-10 04:02:00 INFO: 2020-09-10 04:02:00 INFO: 2020-09-10 04:02:00 INFO: 2020-09-10 04:02:00 INFO: clearing start 2020-09-10 04:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '151364f8-4bec-fd4f-ad5e-e3aaf6243af4', 'clOrdID': 'e420916b953a4dcbb29460c75d18bb67', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 286, 'price': 350.5, 'displayQty': None, 'stopPx': 350.55, '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': 286, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 10, 0, 0, 21, 49000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 10, 0, 0, 21, 49000, tzinfo=tzutc())} 2020-09-10 04:02:00 INFO: order time=2020-09-10 00:00:21.049000+00:00; delta from now UTC=1:01:39.449765 time_delta.total_seconds()=3699.449765; time_diff_offset='3600' 2020-09-10 04:02:00 INFO: clear order e420916b953a4dcbb29460c75d18bb67 2020-09-10 04:02:00 INFO: cancel order resp=[{'orderID': '151364f8-4bec-fd4f-ad5e-e3aaf6243af4', 'clOrdID': 'e420916b953a4dcbb29460c75d18bb67', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 286, 'price': 350.5, 'displayQty': None, 'stopPx': 350.55, '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, 9, 10, 0, 0, 21, 49000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 10, 1, 2, 0, 677000, tzinfo=tzutc())}] 2020-09-10 04:02:00 INFO: clearing end 2020-09-10 04:02:00 INFO: 2020-09-10 04:02:00 INFO: 2020-09-10 04:02:00 INFO: 2020-09-10 04:02:00 INFO: 2020-09-10 04:02:00 INFO: process event {'orderID': '151364f8-4bec-fd4f-ad5e-e3aaf6243af4', 'ordStatus': 'Canceled', 'leavesQty': 0, 'text': 'Canceled: cancelled by clearing\nInit order by supervisor.py', 'timestamp': '2020-09-10T01:02:00.677Z', 'clOrdID': 'e420916b953a4dcbb29460c75d18bb67', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-10 04:02:00 INFO: skip event e420916b953a4dcbb29460c75d18bb67 Canceled 2020-09-10 05:00:20 INFO: 2020-09-10 05:00:20 INFO: 2020-09-10 05:00:20 INFO: 2020-09-10 05:00:20 INFO: 2020-09-10 05:00:20 INFO: init new order start 2020-09-10 05:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 10, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.5, 'high': 369.7, 'low': 355.15, 'close': 368.25, 'trades': 9347, 'volume': 8698730, 'vwap': 364.4, 'lastSize': 40, 'turnover': 316974223865, 'homeNotional': 89952.38535013815, 'foreignNotional': 32778901.300439477}, {'timestamp': datetime.datetime(2020, 9, 10, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.5, 'high': 359.3, 'low': 350.6, 'close': 356.5, 'trades': 5839, 'volume': 4025283, 'vwap': 356.0, 'lastSize': 380, 'turnover': 143300025940, 'homeNotional': 41416.97857912487, 'foreignNotional': 14744698.613326417}, {'timestamp': datetime.datetime(2020, 9, 10, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.7, 'high': 357.2, 'low': 350.6, 'close': 351.5, 'trades': 5152, 'volume': 3521954, 'vwap': 353.01, 'lastSize': 11, 'turnover': 124327076705, 'homeNotional': 36019.16858504419, 'foreignNotional': 12715125.462296758}] 2020-09-10 05:00:20 INFO: prepare candles [CandleItem(low=355.15, high=369.7, open=356.5, close=368.25, color='GREEN'), CandleItem(low=350.6, high=359.3, open=351.5, close=356.5, color='GREEN'), CandleItem(low=350.6, high=357.2, open=356.7, close=351.5, color='RED')] 2020-09-10 05:00:20 INFO: skip by colors first_candle=CandleItem(low=350.6, high=357.2, open=356.7, close=351.5, color='RED') second_candle=CandleItem(low=350.6, high=359.3, open=351.5, close=356.5, color='GREEN') last_candle=CandleItem(low=355.15, high=369.7, open=356.5, close=368.25, color='GREEN') 2020-09-10 05:00:20 INFO: check need new order None 2020-09-10 05:00:20 INFO: init new order end 2020-09-10 05:00:20 INFO: 2020-09-10 05:00:20 INFO: 2020-09-10 05:00:20 INFO: 2020-09-10 05:00:20 INFO: 2020-09-10 05:02:00 INFO: 2020-09-10 05:02:00 INFO: 2020-09-10 05:02:00 INFO: 2020-09-10 05:02:00 INFO: 2020-09-10 05:02:00 INFO: clearing start 2020-09-10 05:02:00 INFO: clearing end 2020-09-10 05:02:00 INFO: 2020-09-10 05:02:00 INFO: 2020-09-10 05:02:00 INFO: 2020-09-10 05:02:00 INFO: 2020-09-10 06:00:20 INFO: 2020-09-10 06:00:20 INFO: 2020-09-10 06:00:20 INFO: 2020-09-10 06:00:20 INFO: 2020-09-10 06:00:20 INFO: init new order start 2020-09-10 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 10, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.25, 'high': 371.8, 'low': 366.45, 'close': 367.65, 'trades': 6203, 'volume': 5333370, 'vwap': 369.34, 'lastSize': 278, 'turnover': 196980667165, 'homeNotional': 55393.65836790205, 'foreignNotional': 20458930.34357977}, {'timestamp': datetime.datetime(2020, 9, 10, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.5, 'high': 369.7, 'low': 355.15, 'close': 368.25, 'trades': 9347, 'volume': 8698730, 'vwap': 364.4, 'lastSize': 40, 'turnover': 316974223865, 'homeNotional': 89952.38535013815, 'foreignNotional': 32778901.300439477}, {'timestamp': datetime.datetime(2020, 9, 10, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.5, 'high': 359.3, 'low': 350.6, 'close': 356.5, 'trades': 5839, 'volume': 4025283, 'vwap': 356.0, 'lastSize': 380, 'turnover': 143300025940, 'homeNotional': 41416.97857912487, 'foreignNotional': 14744698.613326417}] 2020-09-10 06:00:20 INFO: prepare candles [CandleItem(low=366.45, high=371.8, open=368.25, close=367.65, color='RED'), CandleItem(low=355.15, high=369.7, open=356.5, close=368.25, color='GREEN'), CandleItem(low=350.6, high=359.3, open=351.5, close=356.5, color='GREEN')] 2020-09-10 06:00:20 INFO: last_candle=CandleItem(low=366.45, high=371.8, open=368.25, close=367.65, color='RED') 2020-09-10 06: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-10 06: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.45, high=371.8, open=368.25, close=367.65, color='RED') 2020-09-10 06:00:20 INFO: skip by CandleItem(low=366.45, high=371.8, open=368.25, close=367.65, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-10 06: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-10 06: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=366.45, high=371.8, open=368.25, close=367.65, color='RED') 2020-09-10 06:00:20 INFO: skip by CandleItem(low=366.45, high=371.8, open=368.25, close=367.65, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-10 06:00:20 INFO: not found applicable config for candle 2020-09-10 06:00:20 INFO: check need new order None 2020-09-10 06:00:20 INFO: init new order end 2020-09-10 06:00:20 INFO: 2020-09-10 06:00:20 INFO: 2020-09-10 06:00:20 INFO: 2020-09-10 06:00:20 INFO: 2020-09-10 06:02:00 INFO: 2020-09-10 06:02:00 INFO: 2020-09-10 06:02:00 INFO: 2020-09-10 06:02:00 INFO: 2020-09-10 06:02:00 INFO: clearing start 2020-09-10 06:02:00 INFO: clearing end 2020-09-10 06:02:00 INFO: 2020-09-10 06:02:00 INFO: 2020-09-10 06:02:00 INFO: 2020-09-10 06:02:00 INFO: 2020-09-10 07:00:20 INFO: 2020-09-10 07:00:20 INFO: 2020-09-10 07:00:20 INFO: 2020-09-10 07:00:20 INFO: 2020-09-10 07:00:20 INFO: init new order start 2020-09-10 07:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 10, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.65, 'high': 370.8, 'low': 367.25, 'close': 370.75, 'trades': 3553, 'volume': 2307478, 'vwap': 368.91, 'lastSize': 1, 'turnover': 85122932490, 'homeNotional': 23923.879984151954, 'foreignNotional': 8825535.395984875}, {'timestamp': datetime.datetime(2020, 9, 10, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.25, 'high': 371.8, 'low': 366.45, 'close': 367.65, 'trades': 6203, 'volume': 5333370, 'vwap': 369.34, 'lastSize': 278, 'turnover': 196980667165, 'homeNotional': 55393.65836790205, 'foreignNotional': 20458930.34357977}, {'timestamp': datetime.datetime(2020, 9, 10, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.5, 'high': 369.7, 'low': 355.15, 'close': 368.25, 'trades': 9347, 'volume': 8698730, 'vwap': 364.4, 'lastSize': 40, 'turnover': 316974223865, 'homeNotional': 89952.38535013815, 'foreignNotional': 32778901.300439477}] 2020-09-10 07:00:20 INFO: prepare candles [CandleItem(low=367.25, high=370.8, open=367.65, close=370.75, color='GREEN'), CandleItem(low=366.45, high=371.8, open=368.25, close=367.65, color='RED'), CandleItem(low=355.15, high=369.7, open=356.5, close=368.25, color='GREEN')] 2020-09-10 07:00:20 INFO: skip by colors first_candle=CandleItem(low=355.15, high=369.7, open=356.5, close=368.25, color='GREEN') second_candle=CandleItem(low=366.45, high=371.8, open=368.25, close=367.65, color='RED') last_candle=CandleItem(low=367.25, high=370.8, open=367.65, close=370.75, color='GREEN') 2020-09-10 07:00:20 INFO: check need new order None 2020-09-10 07:00:20 INFO: init new order end 2020-09-10 07:00:20 INFO: 2020-09-10 07:00:20 INFO: 2020-09-10 07:00:20 INFO: 2020-09-10 07:00:20 INFO: 2020-09-10 07:02:00 INFO: 2020-09-10 07:02:00 INFO: 2020-09-10 07:02:00 INFO: 2020-09-10 07:02:00 INFO: 2020-09-10 07:02:00 INFO: clearing start 2020-09-10 07:02:00 INFO: clearing end 2020-09-10 07:02:00 INFO: 2020-09-10 07:02:00 INFO: 2020-09-10 07:02:00 INFO: 2020-09-10 07:02:00 INFO: 2020-09-10 08:00:20 INFO: 2020-09-10 08:00:20 INFO: 2020-09-10 08:00:20 INFO: 2020-09-10 08:00:20 INFO: 2020-09-10 08:00:20 INFO: init new order start 2020-09-10 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 10, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 370.75, 'high': 376.15, 'low': 368.55, 'close': 373.7, 'trades': 5453, 'volume': 5492218, 'vwap': 373.11, 'lastSize': 10, 'turnover': 204916538635, 'homeNotional': 57067.11576633387, 'foreignNotional': 21292123.72391368}, {'timestamp': datetime.datetime(2020, 9, 10, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.65, 'high': 370.8, 'low': 367.25, 'close': 370.75, 'trades': 3553, 'volume': 2307478, 'vwap': 368.91, 'lastSize': 1, 'turnover': 85122932490, 'homeNotional': 23923.879984151954, 'foreignNotional': 8825535.395984875}, {'timestamp': datetime.datetime(2020, 9, 10, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.25, 'high': 371.8, 'low': 366.45, 'close': 367.65, 'trades': 6203, 'volume': 5333370, 'vwap': 369.34, 'lastSize': 278, 'turnover': 196980667165, 'homeNotional': 55393.65836790205, 'foreignNotional': 20458930.34357977}] 2020-09-10 08:00:20 INFO: prepare candles [CandleItem(low=368.55, high=376.15, open=370.75, close=373.7, color='GREEN'), CandleItem(low=367.25, high=370.8, open=367.65, close=370.75, color='GREEN'), CandleItem(low=366.45, high=371.8, open=368.25, close=367.65, color='RED')] 2020-09-10 08:00:20 INFO: skip by colors first_candle=CandleItem(low=366.45, high=371.8, open=368.25, close=367.65, color='RED') second_candle=CandleItem(low=367.25, high=370.8, open=367.65, close=370.75, color='GREEN') last_candle=CandleItem(low=368.55, high=376.15, open=370.75, close=373.7, color='GREEN') 2020-09-10 08:00:20 INFO: check need new order None 2020-09-10 08:00:20 INFO: init new order end 2020-09-10 08:00:20 INFO: 2020-09-10 08:00:20 INFO: 2020-09-10 08:00:20 INFO: 2020-09-10 08:00:20 INFO: 2020-09-10 08:02:00 INFO: 2020-09-10 08:02:00 INFO: 2020-09-10 08:02:00 INFO: 2020-09-10 08:02:00 INFO: 2020-09-10 08:02:00 INFO: clearing start 2020-09-10 08:02:01 INFO: clearing end 2020-09-10 08:02:01 INFO: 2020-09-10 08:02:01 INFO: 2020-09-10 08:02:01 INFO: 2020-09-10 08:02:01 INFO: 2020-09-10 09:00:20 INFO: 2020-09-10 09:00:20 INFO: 2020-09-10 09:00:20 INFO: 2020-09-10 09:00:20 INFO: 2020-09-10 09:00:20 INFO: init new order start 2020-09-10 09:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 10, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 373.7, 'high': 374.35, 'low': 371.0, 'close': 371.65, 'trades': 3012, 'volume': 2062010, 'vwap': 372.66, 'lastSize': 13, 'turnover': 76841422140, 'homeNotional': 21411.072989799337, 'foreignNotional': 7978907.964071854}, {'timestamp': datetime.datetime(2020, 9, 10, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 370.75, 'high': 376.15, 'low': 368.55, 'close': 373.7, 'trades': 5453, 'volume': 5492218, 'vwap': 373.11, 'lastSize': 10, 'turnover': 204916538635, 'homeNotional': 57067.11576633387, 'foreignNotional': 21292123.72391368}, {'timestamp': datetime.datetime(2020, 9, 10, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.65, 'high': 370.8, 'low': 367.25, 'close': 370.75, 'trades': 3553, 'volume': 2307478, 'vwap': 368.91, 'lastSize': 1, 'turnover': 85122932490, 'homeNotional': 23923.879984151954, 'foreignNotional': 8825535.395984875}] 2020-09-10 09:00:21 INFO: prepare candles [CandleItem(low=371.0, high=374.35, open=373.7, close=371.65, color='RED'), CandleItem(low=368.55, high=376.15, open=370.75, close=373.7, color='GREEN'), CandleItem(low=367.25, high=370.8, open=367.65, close=370.75, color='GREEN')] 2020-09-10 09:00:21 INFO: last_candle=CandleItem(low=371.0, high=374.35, open=373.7, close=371.65, color='RED') 2020-09-10 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-09-10 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=371.0, high=374.35, open=373.7, close=371.65, color='RED') 2020-09-10 09:00:21 INFO: skip by CandleItem(low=371.0, high=374.35, open=373.7, close=371.65, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-10 09: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-10 09: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=371.0, high=374.35, open=373.7, close=371.65, color='RED') 2020-09-10 09:00:21 INFO: skip by CandleItem(low=371.0, high=374.35, open=373.7, close=371.65, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-10 09:00:21 INFO: not found applicable config for candle 2020-09-10 09:00:21 INFO: check need new order None 2020-09-10 09:00:21 INFO: init new order end 2020-09-10 09:00:21 INFO: 2020-09-10 09:00:21 INFO: 2020-09-10 09:00:21 INFO: 2020-09-10 09:00:21 INFO: 2020-09-10 09:02:00 INFO: 2020-09-10 09:02:00 INFO: 2020-09-10 09:02:00 INFO: 2020-09-10 09:02:00 INFO: 2020-09-10 09:02:00 INFO: clearing start 2020-09-10 09:02:00 INFO: clearing end 2020-09-10 09:02:00 INFO: 2020-09-10 09:02:00 INFO: 2020-09-10 09:02:00 INFO: 2020-09-10 09:02:00 INFO: 2020-09-10 10:00:20 INFO: 2020-09-10 10:00:20 INFO: 2020-09-10 10:00:20 INFO: 2020-09-10 10:00:20 INFO: 2020-09-10 10:00:20 INFO: init new order start 2020-09-10 10:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 10, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 371.65, 'high': 373.95, 'low': 367.95, 'close': 368.45, 'trades': 4532, 'volume': 3838704, 'vwap': 369.83, 'lastSize': 140, 'turnover': 141963498905, 'homeNotional': 39719.97077122119, 'foreignNotional': 14689427.28493963}, {'timestamp': datetime.datetime(2020, 9, 10, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 373.7, 'high': 374.35, 'low': 371.0, 'close': 371.65, 'trades': 3012, 'volume': 2062010, 'vwap': 372.66, 'lastSize': 13, 'turnover': 76841422140, 'homeNotional': 21411.072989799337, 'foreignNotional': 7978907.964071854}, {'timestamp': datetime.datetime(2020, 9, 10, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 370.75, 'high': 376.15, 'low': 368.55, 'close': 373.7, 'trades': 5453, 'volume': 5492218, 'vwap': 373.11, 'lastSize': 10, 'turnover': 204916538635, 'homeNotional': 57067.11576633387, 'foreignNotional': 21292123.72391368}] 2020-09-10 10:00:20 INFO: prepare candles [CandleItem(low=367.95, high=373.95, open=371.65, close=368.45, color='RED'), CandleItem(low=371.0, high=374.35, open=373.7, close=371.65, color='RED'), CandleItem(low=368.55, high=376.15, open=370.75, close=373.7, color='GREEN')] 2020-09-10 10:00:20 INFO: skip by colors first_candle=CandleItem(low=368.55, high=376.15, open=370.75, close=373.7, color='GREEN') second_candle=CandleItem(low=371.0, high=374.35, open=373.7, close=371.65, color='RED') last_candle=CandleItem(low=367.95, high=373.95, open=371.65, close=368.45, color='RED') 2020-09-10 10:00:20 INFO: check need new order None 2020-09-10 10:00:20 INFO: init new order end 2020-09-10 10:00:20 INFO: 2020-09-10 10:00:20 INFO: 2020-09-10 10:00:20 INFO: 2020-09-10 10:00:20 INFO: 2020-09-10 10:02:00 INFO: 2020-09-10 10:02:00 INFO: 2020-09-10 10:02:00 INFO: 2020-09-10 10:02:00 INFO: 2020-09-10 10:02:00 INFO: clearing start 2020-09-10 10:02:00 INFO: clearing end 2020-09-10 10:02:00 INFO: 2020-09-10 10:02:00 INFO: 2020-09-10 10:02:00 INFO: 2020-09-10 10:02:00 INFO: 2020-09-10 11:00:20 INFO: 2020-09-10 11:00:20 INFO: 2020-09-10 11:00:20 INFO: 2020-09-10 11:00:20 INFO: 2020-09-10 11:00:20 INFO: init new order start 2020-09-10 11:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 10, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.45, 'high': 369.35, 'low': 362.35, 'close': 364.85, 'trades': 5598, 'volume': 5308837, 'vwap': 365.7, 'lastSize': 864, 'turnover': 194143705125, 'homeNotional': 54703.13701331944, 'foreignNotional': 20005148.315907057}, {'timestamp': datetime.datetime(2020, 9, 10, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 371.65, 'high': 373.95, 'low': 367.95, 'close': 368.45, 'trades': 4532, 'volume': 3838704, 'vwap': 369.83, 'lastSize': 140, 'turnover': 141963498905, 'homeNotional': 39719.97077122119, 'foreignNotional': 14689427.28493963}, {'timestamp': datetime.datetime(2020, 9, 10, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 373.7, 'high': 374.35, 'low': 371.0, 'close': 371.65, 'trades': 3012, 'volume': 2062010, 'vwap': 372.66, 'lastSize': 13, 'turnover': 76841422140, 'homeNotional': 21411.072989799337, 'foreignNotional': 7978907.964071854}] 2020-09-10 11:00:20 INFO: prepare candles [CandleItem(low=362.35, high=369.35, open=368.45, close=364.85, color='RED'), CandleItem(low=367.95, high=373.95, open=371.65, close=368.45, color='RED'), CandleItem(low=371.0, high=374.35, open=373.7, close=371.65, color='RED')] 2020-09-10 11:00:20 INFO: skip by colors first_candle=CandleItem(low=371.0, high=374.35, open=373.7, close=371.65, color='RED') second_candle=CandleItem(low=367.95, high=373.95, open=371.65, close=368.45, color='RED') last_candle=CandleItem(low=362.35, high=369.35, open=368.45, close=364.85, color='RED') 2020-09-10 11:00:20 INFO: check need new order None 2020-09-10 11:00:20 INFO: init new order end 2020-09-10 11:00:20 INFO: 2020-09-10 11:00:20 INFO: 2020-09-10 11:00:20 INFO: 2020-09-10 11:00:20 INFO: 2020-09-10 11:02:00 INFO: 2020-09-10 11:02:00 INFO: 2020-09-10 11:02:00 INFO: 2020-09-10 11:02:00 INFO: 2020-09-10 11:02:00 INFO: clearing start 2020-09-10 11:02:00 INFO: clearing end 2020-09-10 11:02:00 INFO: 2020-09-10 11:02:00 INFO: 2020-09-10 11:02:00 INFO: 2020-09-10 11:02:00 INFO: 2020-09-10 12:00:20 INFO: 2020-09-10 12:00:20 INFO: 2020-09-10 12:00:20 INFO: 2020-09-10 12:00:20 INFO: 2020-09-10 12:00:20 INFO: init new order start 2020-09-10 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 10, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.85, 'high': 366.75, 'low': 362.2, 'close': 364.25, 'trades': 4061, 'volume': 3164202, 'vwap': 364.72, 'lastSize': 300, 'turnover': 115404133240, 'homeNotional': 32529.385324289684, 'foreignNotional': 11864076.549322337}, {'timestamp': datetime.datetime(2020, 9, 10, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.45, 'high': 369.35, 'low': 362.35, 'close': 364.85, 'trades': 5598, 'volume': 5308837, 'vwap': 365.7, 'lastSize': 864, 'turnover': 194143705125, 'homeNotional': 54703.13701331944, 'foreignNotional': 20005148.315907057}, {'timestamp': datetime.datetime(2020, 9, 10, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 371.65, 'high': 373.95, 'low': 367.95, 'close': 368.45, 'trades': 4532, 'volume': 3838704, 'vwap': 369.83, 'lastSize': 140, 'turnover': 141963498905, 'homeNotional': 39719.97077122119, 'foreignNotional': 14689427.28493963}] 2020-09-10 12:00:20 INFO: prepare candles [CandleItem(low=362.2, high=366.75, open=364.85, close=364.25, color='RED'), CandleItem(low=362.35, high=369.35, open=368.45, close=364.85, color='RED'), CandleItem(low=367.95, high=373.95, open=371.65, close=368.45, color='RED')] 2020-09-10 12:00:20 INFO: skip by colors first_candle=CandleItem(low=367.95, high=373.95, open=371.65, close=368.45, color='RED') second_candle=CandleItem(low=362.35, high=369.35, open=368.45, close=364.85, color='RED') last_candle=CandleItem(low=362.2, high=366.75, open=364.85, close=364.25, color='RED') 2020-09-10 12:00:20 INFO: check need new order None 2020-09-10 12:00:20 INFO: init new order end 2020-09-10 12:00:20 INFO: 2020-09-10 12:00:20 INFO: 2020-09-10 12:00:20 INFO: 2020-09-10 12:00:20 INFO: 2020-09-10 12:02:00 INFO: 2020-09-10 12:02:00 INFO: 2020-09-10 12:02:00 INFO: 2020-09-10 12:02:00 INFO: 2020-09-10 12:02:00 INFO: clearing start 2020-09-10 12:02:01 INFO: clearing end 2020-09-10 12:02:01 INFO: 2020-09-10 12:02:01 INFO: 2020-09-10 12:02:01 INFO: 2020-09-10 12:02:01 INFO: 2020-09-10 13:00:20 INFO: 2020-09-10 13:00:20 INFO: 2020-09-10 13:00:20 INFO: 2020-09-10 13:00:20 INFO: 2020-09-10 13:00:20 INFO: init new order start 2020-09-10 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 10, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.25, 'high': 366.45, 'low': 361.75, 'close': 365.25, 'trades': 4182, 'volume': 3498151, 'vwap': 364.15, 'lastSize': 283, 'turnover': 127382804495, 'homeNotional': 35926.01377607285, 'foreignNotional': 13082256.399444442}, {'timestamp': datetime.datetime(2020, 9, 10, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.85, 'high': 366.75, 'low': 362.2, 'close': 364.25, 'trades': 4061, 'volume': 3164202, 'vwap': 364.72, 'lastSize': 300, 'turnover': 115404133240, 'homeNotional': 32529.385324289684, 'foreignNotional': 11864076.549322337}, {'timestamp': datetime.datetime(2020, 9, 10, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.45, 'high': 369.35, 'low': 362.35, 'close': 364.85, 'trades': 5598, 'volume': 5308837, 'vwap': 365.7, 'lastSize': 864, 'turnover': 194143705125, 'homeNotional': 54703.13701331944, 'foreignNotional': 20005148.315907057}] 2020-09-10 13:00:20 INFO: prepare candles [CandleItem(low=361.75, high=366.45, open=364.25, close=365.25, color='GREEN'), CandleItem(low=362.2, high=366.75, open=364.85, close=364.25, color='RED'), CandleItem(low=362.35, high=369.35, open=368.45, close=364.85, color='RED')] 2020-09-10 13:00:20 INFO: last_candle=CandleItem(low=361.75, high=366.45, open=364.25, close=365.25, color='GREEN') 2020-09-10 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-09-10 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=361.75, high=366.45, open=364.25, close=365.25, color='GREEN') 2020-09-10 13:00:20 INFO: skip by CandleItem(low=361.75, high=366.45, open=364.25, close=365.25, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-10 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-09-10 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=361.75, high=366.45, open=364.25, close=365.25, color='GREEN') 2020-09-10 13:00:20 INFO: skip by CandleItem(low=361.75, high=366.45, open=364.25, close=365.25, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-10 13:00:20 INFO: not found applicable config for candle 2020-09-10 13:00:20 INFO: check need new order None 2020-09-10 13:00:20 INFO: init new order end 2020-09-10 13:00:20 INFO: 2020-09-10 13:00:20 INFO: 2020-09-10 13:00:20 INFO: 2020-09-10 13:00:20 INFO: 2020-09-10 13:02:00 INFO: 2020-09-10 13:02:00 INFO: 2020-09-10 13:02:00 INFO: 2020-09-10 13:02:00 INFO: 2020-09-10 13:02:00 INFO: clearing start 2020-09-10 13:02:00 INFO: clearing end 2020-09-10 13:02:00 INFO: 2020-09-10 13:02:00 INFO: 2020-09-10 13:02:00 INFO: 2020-09-10 13:02:00 INFO: 2020-09-10 14:00:20 INFO: 2020-09-10 14:00:20 INFO: 2020-09-10 14:00:20 INFO: 2020-09-10 14:00:20 INFO: 2020-09-10 14:00:20 INFO: init new order start 2020-09-10 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 10, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.25, 'high': 368.95, 'low': 363.0, 'close': 364.35, 'trades': 4453, 'volume': 3635827, 'vwap': 366.2, 'lastSize': 77, 'turnover': 133143011440, 'homeNotional': 37432.78328584149, 'foreignNotional': 13707913.783413902}, {'timestamp': datetime.datetime(2020, 9, 10, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.25, 'high': 366.45, 'low': 361.75, 'close': 365.25, 'trades': 4182, 'volume': 3498151, 'vwap': 364.15, 'lastSize': 283, 'turnover': 127382804495, 'homeNotional': 35926.01377607285, 'foreignNotional': 13082256.399444442}, {'timestamp': datetime.datetime(2020, 9, 10, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.85, 'high': 366.75, 'low': 362.2, 'close': 364.25, 'trades': 4061, 'volume': 3164202, 'vwap': 364.72, 'lastSize': 300, 'turnover': 115404133240, 'homeNotional': 32529.385324289684, 'foreignNotional': 11864076.549322337}] 2020-09-10 14:00:20 INFO: prepare candles [CandleItem(low=363.0, high=368.95, open=365.25, close=364.35, color='RED'), CandleItem(low=361.75, high=366.45, open=364.25, close=365.25, color='GREEN'), CandleItem(low=362.2, high=366.75, open=364.85, close=364.25, color='RED')] 2020-09-10 14:00:20 INFO: skip by colors first_candle=CandleItem(low=362.2, high=366.75, open=364.85, close=364.25, color='RED') second_candle=CandleItem(low=361.75, high=366.45, open=364.25, close=365.25, color='GREEN') last_candle=CandleItem(low=363.0, high=368.95, open=365.25, close=364.35, color='RED') 2020-09-10 14:00:20 INFO: check need new order None 2020-09-10 14:00:20 INFO: init new order end 2020-09-10 14:00:20 INFO: 2020-09-10 14:00:20 INFO: 2020-09-10 14:00:20 INFO: 2020-09-10 14:00:20 INFO: 2020-09-10 14:02:00 INFO: 2020-09-10 14:02:00 INFO: 2020-09-10 14:02:00 INFO: 2020-09-10 14:02:00 INFO: 2020-09-10 14:02:00 INFO: clearing start 2020-09-10 14:02:00 INFO: clearing end 2020-09-10 14:02:00 INFO: 2020-09-10 14:02:00 INFO: 2020-09-10 14:02:00 INFO: 2020-09-10 14:02:00 INFO: 2020-09-10 15:00:20 INFO: 2020-09-10 15:00:20 INFO: 2020-09-10 15:00:20 INFO: 2020-09-10 15:00:20 INFO: 2020-09-10 15:00:20 INFO: init new order start 2020-09-10 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 10, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.35, 'high': 367.45, 'low': 362.55, 'close': 365.85, 'trades': 3759, 'volume': 3254635, 'vwap': 365.23, 'lastSize': 1300, 'turnover': 118867714610, 'homeNotional': 33499.102244699774, 'foreignNotional': 12234775.947146045}, {'timestamp': datetime.datetime(2020, 9, 10, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.25, 'high': 368.95, 'low': 363.0, 'close': 364.35, 'trades': 4453, 'volume': 3635827, 'vwap': 366.2, 'lastSize': 77, 'turnover': 133143011440, 'homeNotional': 37432.78328584149, 'foreignNotional': 13707913.783413902}, {'timestamp': datetime.datetime(2020, 9, 10, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.25, 'high': 366.45, 'low': 361.75, 'close': 365.25, 'trades': 4182, 'volume': 3498151, 'vwap': 364.15, 'lastSize': 283, 'turnover': 127382804495, 'homeNotional': 35926.01377607285, 'foreignNotional': 13082256.399444442}] 2020-09-10 15:00:20 INFO: prepare candles [CandleItem(low=362.55, high=367.45, open=364.35, close=365.85, color='GREEN'), CandleItem(low=363.0, high=368.95, open=365.25, close=364.35, color='RED'), CandleItem(low=361.75, high=366.45, open=364.25, close=365.25, color='GREEN')] 2020-09-10 15:00:20 INFO: skip by colors first_candle=CandleItem(low=361.75, high=366.45, open=364.25, close=365.25, color='GREEN') second_candle=CandleItem(low=363.0, high=368.95, open=365.25, close=364.35, color='RED') last_candle=CandleItem(low=362.55, high=367.45, open=364.35, close=365.85, color='GREEN') 2020-09-10 15:00:20 INFO: check need new order None 2020-09-10 15:00:20 INFO: init new order end 2020-09-10 15:00:20 INFO: 2020-09-10 15:00:20 INFO: 2020-09-10 15:00:20 INFO: 2020-09-10 15:00:20 INFO: 2020-09-10 15:02:00 INFO: 2020-09-10 15:02:00 INFO: 2020-09-10 15:02:00 INFO: 2020-09-10 15:02:00 INFO: 2020-09-10 15:02:00 INFO: clearing start 2020-09-10 15:02:00 INFO: clearing end 2020-09-10 15:02:00 INFO: 2020-09-10 15:02:00 INFO: 2020-09-10 15:02:00 INFO: 2020-09-10 15:02:00 INFO: 2020-09-10 16:00:20 INFO: 2020-09-10 16:00:20 INFO: 2020-09-10 16:00:20 INFO: 2020-09-10 16:00:20 INFO: 2020-09-10 16:00:20 INFO: init new order start 2020-09-10 16:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 10, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.85, 'high': 374.45, 'low': 365.55, 'close': 373.25, 'trades': 7900, 'volume': 5911134, 'vwap': 370.58, 'lastSize': 400, 'turnover': 219054368710, 'homeNotional': 61105.96943175363, 'foreignNotional': 22644886.621624995}, {'timestamp': datetime.datetime(2020, 9, 10, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.35, 'high': 367.45, 'low': 362.55, 'close': 365.85, 'trades': 3759, 'volume': 3254635, 'vwap': 365.23, 'lastSize': 1300, 'turnover': 118867714610, 'homeNotional': 33499.102244699774, 'foreignNotional': 12234775.947146045}, {'timestamp': datetime.datetime(2020, 9, 10, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.25, 'high': 368.95, 'low': 363.0, 'close': 364.35, 'trades': 4453, 'volume': 3635827, 'vwap': 366.2, 'lastSize': 77, 'turnover': 133143011440, 'homeNotional': 37432.78328584149, 'foreignNotional': 13707913.783413902}] 2020-09-10 16:00:20 INFO: prepare candles [CandleItem(low=365.55, high=374.45, open=365.85, close=373.25, color='GREEN'), CandleItem(low=362.55, high=367.45, open=364.35, close=365.85, color='GREEN'), CandleItem(low=363.0, high=368.95, open=365.25, close=364.35, color='RED')] 2020-09-10 16:00:20 INFO: skip by colors first_candle=CandleItem(low=363.0, high=368.95, open=365.25, close=364.35, color='RED') second_candle=CandleItem(low=362.55, high=367.45, open=364.35, close=365.85, color='GREEN') last_candle=CandleItem(low=365.55, high=374.45, open=365.85, close=373.25, color='GREEN') 2020-09-10 16:00:20 INFO: check need new order None 2020-09-10 16:00:20 INFO: init new order end 2020-09-10 16:00:20 INFO: 2020-09-10 16:00:20 INFO: 2020-09-10 16:00:20 INFO: 2020-09-10 16:00:20 INFO: 2020-09-10 16:02:00 INFO: 2020-09-10 16:02:00 INFO: 2020-09-10 16:02:00 INFO: 2020-09-10 16:02:00 INFO: 2020-09-10 16:02:00 INFO: clearing start 2020-09-10 16:02:00 INFO: clearing end 2020-09-10 16:02:00 INFO: 2020-09-10 16:02:00 INFO: 2020-09-10 16:02:00 INFO: 2020-09-10 16:02:00 INFO: 2020-09-10 17:00:20 INFO: 2020-09-10 17:00:20 INFO: 2020-09-10 17:00:20 INFO: 2020-09-10 17:00:20 INFO: 2020-09-10 17:00:20 INFO: init new order start 2020-09-10 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 10, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 373.25, 'high': 377.7, 'low': 370.55, 'close': 376.7, 'trades': 6997, 'volume': 5218457, 'vwap': 374.49, 'lastSize': 250, 'turnover': 195423850725, 'homeNotional': 54294.650228267456, 'foreignNotional': 20332778.929682728}, {'timestamp': datetime.datetime(2020, 9, 10, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.85, 'high': 374.45, 'low': 365.55, 'close': 373.25, 'trades': 7900, 'volume': 5911134, 'vwap': 370.58, 'lastSize': 400, 'turnover': 219054368710, 'homeNotional': 61105.96943175363, 'foreignNotional': 22644886.621624995}, {'timestamp': datetime.datetime(2020, 9, 10, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.35, 'high': 367.45, 'low': 362.55, 'close': 365.85, 'trades': 3759, 'volume': 3254635, 'vwap': 365.23, 'lastSize': 1300, 'turnover': 118867714610, 'homeNotional': 33499.102244699774, 'foreignNotional': 12234775.947146045}] 2020-09-10 17:00:20 INFO: prepare candles [CandleItem(low=370.55, high=377.7, open=373.25, close=376.7, color='GREEN'), CandleItem(low=365.55, high=374.45, open=365.85, close=373.25, color='GREEN'), CandleItem(low=362.55, high=367.45, open=364.35, close=365.85, color='GREEN')] 2020-09-10 17:00:20 INFO: skip by colors first_candle=CandleItem(low=362.55, high=367.45, open=364.35, close=365.85, color='GREEN') second_candle=CandleItem(low=365.55, high=374.45, open=365.85, close=373.25, color='GREEN') last_candle=CandleItem(low=370.55, high=377.7, open=373.25, close=376.7, color='GREEN') 2020-09-10 17:00:20 INFO: check need new order None 2020-09-10 17:00:20 INFO: init new order end 2020-09-10 17:00:20 INFO: 2020-09-10 17:00:20 INFO: 2020-09-10 17:00:20 INFO: 2020-09-10 17:00:20 INFO: 2020-09-10 17:02:00 INFO: 2020-09-10 17:02:00 INFO: 2020-09-10 17:02:00 INFO: 2020-09-10 17:02:00 INFO: 2020-09-10 17:02:00 INFO: clearing start 2020-09-10 17:02:00 INFO: clearing end 2020-09-10 17:02:00 INFO: 2020-09-10 17:02:00 INFO: 2020-09-10 17:02:00 INFO: 2020-09-10 17:02:00 INFO: 2020-09-10 18:00:20 INFO: 2020-09-10 18:00:20 INFO: 2020-09-10 18:00:20 INFO: 2020-09-10 18:00:20 INFO: 2020-09-10 18:00:20 INFO: init new order start 2020-09-10 18:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 10, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 376.7, 'high': 378.0, 'low': 367.6, 'close': 368.1, 'trades': 7453, 'volume': 5069127, 'vwap': 372.69, 'lastSize': 2000, 'turnover': 188919145545, 'homeNotional': 52878.458234633086, 'foreignNotional': 19707507.511614434}, {'timestamp': datetime.datetime(2020, 9, 10, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 373.25, 'high': 377.7, 'low': 370.55, 'close': 376.7, 'trades': 6997, 'volume': 5218457, 'vwap': 374.49, 'lastSize': 250, 'turnover': 195423850725, 'homeNotional': 54294.650228267456, 'foreignNotional': 20332778.929682728}, {'timestamp': datetime.datetime(2020, 9, 10, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.85, 'high': 374.45, 'low': 365.55, 'close': 373.25, 'trades': 7900, 'volume': 5911134, 'vwap': 370.58, 'lastSize': 400, 'turnover': 219054368710, 'homeNotional': 61105.96943175363, 'foreignNotional': 22644886.621624995}] 2020-09-10 18:00:21 INFO: prepare candles [CandleItem(low=367.6, high=378.0, open=376.7, close=368.1, color='RED'), CandleItem(low=370.55, high=377.7, open=373.25, close=376.7, color='GREEN'), CandleItem(low=365.55, high=374.45, open=365.85, close=373.25, color='GREEN')] 2020-09-10 18:00:21 INFO: last_candle=CandleItem(low=367.6, high=378.0, open=376.7, close=368.1, color='RED') 2020-09-10 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-09-10 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=367.6, high=378.0, open=376.7, close=368.1, color='RED') 2020-09-10 18:00:21 INFO: skip by CandleItem(low=367.6, high=378.0, open=376.7, close=368.1, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-10 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-09-10 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=367.6, high=378.0, open=376.7, close=368.1, color='RED') 2020-09-10 18:00:21 INFO: skip by CandleItem(low=367.6, high=378.0, open=376.7, close=368.1, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-10 18:00:21 INFO: not found applicable config for candle 2020-09-10 18:00:21 INFO: check need new order None 2020-09-10 18:00:21 INFO: init new order end 2020-09-10 18:00:21 INFO: 2020-09-10 18:00:21 INFO: 2020-09-10 18:00:21 INFO: 2020-09-10 18:00:21 INFO: 2020-09-10 18:02:00 INFO: 2020-09-10 18:02:00 INFO: 2020-09-10 18:02:00 INFO: 2020-09-10 18:02:00 INFO: 2020-09-10 18:02:00 INFO: clearing start 2020-09-10 18:02:00 INFO: clearing end 2020-09-10 18:02:00 INFO: 2020-09-10 18:02:00 INFO: 2020-09-10 18:02:00 INFO: 2020-09-10 18:02:00 INFO: 2020-09-10 19:00:20 INFO: 2020-09-10 19:00:20 INFO: 2020-09-10 19:00:20 INFO: 2020-09-10 19:00:20 INFO: 2020-09-10 19:00:20 INFO: init new order start 2020-09-10 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 10, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.1, 'high': 371.5, 'low': 366.8, 'close': 371.35, 'trades': 6287, 'volume': 3761586, 'vwap': 369.4, 'lastSize': 100, 'turnover': 138950178270, 'homeNotional': 39067.27009840339, 'foreignNotional': 14431210.874343993}, {'timestamp': datetime.datetime(2020, 9, 10, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 376.7, 'high': 378.0, 'low': 367.6, 'close': 368.1, 'trades': 7453, 'volume': 5069127, 'vwap': 372.69, 'lastSize': 2000, 'turnover': 188919145545, 'homeNotional': 52878.458234633086, 'foreignNotional': 19707507.511614434}, {'timestamp': datetime.datetime(2020, 9, 10, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 373.25, 'high': 377.7, 'low': 370.55, 'close': 376.7, 'trades': 6997, 'volume': 5218457, 'vwap': 374.49, 'lastSize': 250, 'turnover': 195423850725, 'homeNotional': 54294.650228267456, 'foreignNotional': 20332778.929682728}] 2020-09-10 19:00:20 INFO: prepare candles [CandleItem(low=366.8, high=371.5, open=368.1, close=371.35, color='GREEN'), CandleItem(low=367.6, high=378.0, open=376.7, close=368.1, color='RED'), CandleItem(low=370.55, high=377.7, open=373.25, close=376.7, color='GREEN')] 2020-09-10 19:00:20 INFO: skip by colors first_candle=CandleItem(low=370.55, high=377.7, open=373.25, close=376.7, color='GREEN') second_candle=CandleItem(low=367.6, high=378.0, open=376.7, close=368.1, color='RED') last_candle=CandleItem(low=366.8, high=371.5, open=368.1, close=371.35, color='GREEN') 2020-09-10 19:00:20 INFO: check need new order None 2020-09-10 19:00:20 INFO: init new order end 2020-09-10 19:00:20 INFO: 2020-09-10 19:00:20 INFO: 2020-09-10 19:00:20 INFO: 2020-09-10 19:00:20 INFO: 2020-09-10 19:02:00 INFO: 2020-09-10 19:02:00 INFO: 2020-09-10 19:02:00 INFO: 2020-09-10 19:02:00 INFO: 2020-09-10 19:02:00 INFO: clearing start 2020-09-10 19:02:00 INFO: clearing end 2020-09-10 19:02:00 INFO: 2020-09-10 19:02:00 INFO: 2020-09-10 19:02:00 INFO: 2020-09-10 19:02:00 INFO: 2020-09-10 20:00:20 INFO: 2020-09-10 20:00:20 INFO: 2020-09-10 20:00:20 INFO: 2020-09-10 20:00:20 INFO: 2020-09-10 20:00:20 INFO: init new order start 2020-09-10 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 10, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 371.35, 'high': 373.4, 'low': 365.15, 'close': 366.9, 'trades': 6568, 'volume': 4601359, 'vwap': 368.29, 'lastSize': 147, 'turnover': 169461231490, 'homeNotional': 47691.50524110261, 'foreignNotional': 17564401.9151979}, {'timestamp': datetime.datetime(2020, 9, 10, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.1, 'high': 371.5, 'low': 366.8, 'close': 371.35, 'trades': 6287, 'volume': 3761586, 'vwap': 369.4, 'lastSize': 100, 'turnover': 138950178270, 'homeNotional': 39067.27009840339, 'foreignNotional': 14431210.874343993}, {'timestamp': datetime.datetime(2020, 9, 10, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 376.7, 'high': 378.0, 'low': 367.6, 'close': 368.1, 'trades': 7453, 'volume': 5069127, 'vwap': 372.69, 'lastSize': 2000, 'turnover': 188919145545, 'homeNotional': 52878.458234633086, 'foreignNotional': 19707507.511614434}] 2020-09-10 20:00:20 INFO: prepare candles [CandleItem(low=365.15, high=373.4, open=371.35, close=366.9, color='RED'), CandleItem(low=366.8, high=371.5, open=368.1, close=371.35, color='GREEN'), CandleItem(low=367.6, high=378.0, open=376.7, close=368.1, color='RED')] 2020-09-10 20:00:20 INFO: skip by colors first_candle=CandleItem(low=367.6, high=378.0, open=376.7, close=368.1, color='RED') second_candle=CandleItem(low=366.8, high=371.5, open=368.1, close=371.35, color='GREEN') last_candle=CandleItem(low=365.15, high=373.4, open=371.35, close=366.9, color='RED') 2020-09-10 20:00:20 INFO: check need new order None 2020-09-10 20:00:20 INFO: init new order end 2020-09-10 20:00:20 INFO: 2020-09-10 20:00:20 INFO: 2020-09-10 20:00:20 INFO: 2020-09-10 20:00:20 INFO: 2020-09-10 20:02:00 INFO: 2020-09-10 20:02:00 INFO: 2020-09-10 20:02:00 INFO: 2020-09-10 20:02:00 INFO: 2020-09-10 20:02:00 INFO: clearing start 2020-09-10 20:02:00 INFO: clearing end 2020-09-10 20:02:00 INFO: 2020-09-10 20:02:00 INFO: 2020-09-10 20:02:00 INFO: 2020-09-10 20:02:00 INFO: 2020-09-10 21:00:20 INFO: 2020-09-10 21:00:20 INFO: 2020-09-10 21:00:20 INFO: 2020-09-10 21:00:20 INFO: 2020-09-10 21:00:20 INFO: init new order start 2020-09-10 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 10, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 366.9, 'high': 369.8, 'low': 366.0, 'close': 367.95, 'trades': 4304, 'volume': 2735430, 'vwap': 368.09, 'lastSize': 1, 'turnover': 100686946165, 'homeNotional': 28347.948797462188, 'foreignNotional': 10434454.43748783}, {'timestamp': datetime.datetime(2020, 9, 10, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 371.35, 'high': 373.4, 'low': 365.15, 'close': 366.9, 'trades': 6568, 'volume': 4601359, 'vwap': 368.29, 'lastSize': 147, 'turnover': 169461231490, 'homeNotional': 47691.50524110261, 'foreignNotional': 17564401.9151979}, {'timestamp': datetime.datetime(2020, 9, 10, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.1, 'high': 371.5, 'low': 366.8, 'close': 371.35, 'trades': 6287, 'volume': 3761586, 'vwap': 369.4, 'lastSize': 100, 'turnover': 138950178270, 'homeNotional': 39067.27009840339, 'foreignNotional': 14431210.874343993}] 2020-09-10 21:00:20 INFO: prepare candles [CandleItem(low=366.0, high=369.8, open=366.9, close=367.95, color='GREEN'), CandleItem(low=365.15, high=373.4, open=371.35, close=366.9, color='RED'), CandleItem(low=366.8, high=371.5, open=368.1, close=371.35, color='GREEN')] 2020-09-10 21:00:20 INFO: skip by colors first_candle=CandleItem(low=366.8, high=371.5, open=368.1, close=371.35, color='GREEN') second_candle=CandleItem(low=365.15, high=373.4, open=371.35, close=366.9, color='RED') last_candle=CandleItem(low=366.0, high=369.8, open=366.9, close=367.95, color='GREEN') 2020-09-10 21:00:20 INFO: check need new order None 2020-09-10 21:00:20 INFO: init new order end 2020-09-10 21:00:20 INFO: 2020-09-10 21:00:20 INFO: 2020-09-10 21:00:20 INFO: 2020-09-10 21:00:20 INFO: 2020-09-10 21:02:00 INFO: 2020-09-10 21:02:00 INFO: 2020-09-10 21:02:00 INFO: 2020-09-10 21:02:00 INFO: 2020-09-10 21:02:00 INFO: clearing start 2020-09-10 21:02:00 INFO: clearing end 2020-09-10 21:02:00 INFO: 2020-09-10 21:02:00 INFO: 2020-09-10 21:02:00 INFO: 2020-09-10 21:02:00 INFO: 2020-09-10 22:00:20 INFO: 2020-09-10 22:00:20 INFO: 2020-09-10 22:00:20 INFO: 2020-09-10 22:00:20 INFO: 2020-09-10 22:00:20 INFO: init new order start 2020-09-10 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 10, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.95, 'high': 369.8, 'low': 362.0, 'close': 364.35, 'trades': 5371, 'volume': 3714098, 'vwap': 365.12, 'lastSize': 319, 'turnover': 135605961345, 'homeNotional': 38309.723181296235, 'foreignNotional': 13987571.376997821}, {'timestamp': datetime.datetime(2020, 9, 10, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 366.9, 'high': 369.8, 'low': 366.0, 'close': 367.95, 'trades': 4304, 'volume': 2735430, 'vwap': 368.09, 'lastSize': 1, 'turnover': 100686946165, 'homeNotional': 28347.948797462188, 'foreignNotional': 10434454.43748783}, {'timestamp': datetime.datetime(2020, 9, 10, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 371.35, 'high': 373.4, 'low': 365.15, 'close': 366.9, 'trades': 6568, 'volume': 4601359, 'vwap': 368.29, 'lastSize': 147, 'turnover': 169461231490, 'homeNotional': 47691.50524110261, 'foreignNotional': 17564401.9151979}] 2020-09-10 22:00:20 INFO: prepare candles [CandleItem(low=362.0, high=369.8, open=367.95, close=364.35, color='RED'), CandleItem(low=366.0, high=369.8, open=366.9, close=367.95, color='GREEN'), CandleItem(low=365.15, high=373.4, open=371.35, close=366.9, color='RED')] 2020-09-10 22:00:20 INFO: skip by colors first_candle=CandleItem(low=365.15, high=373.4, open=371.35, close=366.9, color='RED') second_candle=CandleItem(low=366.0, high=369.8, open=366.9, close=367.95, color='GREEN') last_candle=CandleItem(low=362.0, high=369.8, open=367.95, close=364.35, color='RED') 2020-09-10 22:00:20 INFO: check need new order None 2020-09-10 22:00:20 INFO: init new order end 2020-09-10 22:00:20 INFO: 2020-09-10 22:00:20 INFO: 2020-09-10 22:00:20 INFO: 2020-09-10 22:00:20 INFO: 2020-09-10 22:02:00 INFO: 2020-09-10 22:02:00 INFO: 2020-09-10 22:02:00 INFO: 2020-09-10 22:02:00 INFO: 2020-09-10 22:02:00 INFO: clearing start 2020-09-10 22:02:00 INFO: clearing end 2020-09-10 22:02:00 INFO: 2020-09-10 22:02:00 INFO: 2020-09-10 22:02:00 INFO: 2020-09-10 22:02:00 INFO: 2020-09-10 23:00:20 INFO: 2020-09-10 23:00:20 INFO: 2020-09-10 23:00:20 INFO: 2020-09-10 23:00:20 INFO: 2020-09-10 23:00:20 INFO: init new order start 2020-09-10 23:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 10, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.35, 'high': 365.85, 'low': 362.15, 'close': 363.55, 'trades': 3457, 'volume': 2481664, 'vwap': 364.05, 'lastSize': 290, 'turnover': 90343437455, 'homeNotional': 25510.91027308314, 'foreignNotional': 9287101.040404279}, {'timestamp': datetime.datetime(2020, 9, 10, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.95, 'high': 369.8, 'low': 362.0, 'close': 364.35, 'trades': 5371, 'volume': 3714098, 'vwap': 365.12, 'lastSize': 319, 'turnover': 135605961345, 'homeNotional': 38309.723181296235, 'foreignNotional': 13987571.376997821}, {'timestamp': datetime.datetime(2020, 9, 10, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 366.9, 'high': 369.8, 'low': 366.0, 'close': 367.95, 'trades': 4304, 'volume': 2735430, 'vwap': 368.09, 'lastSize': 1, 'turnover': 100686946165, 'homeNotional': 28347.948797462188, 'foreignNotional': 10434454.43748783}] 2020-09-10 23:00:20 INFO: prepare candles [CandleItem(low=362.15, high=365.85, open=364.35, close=363.55, color='RED'), CandleItem(low=362.0, high=369.8, open=367.95, close=364.35, color='RED'), CandleItem(low=366.0, high=369.8, open=366.9, close=367.95, color='GREEN')] 2020-09-10 23:00:20 INFO: skip by colors first_candle=CandleItem(low=366.0, high=369.8, open=366.9, close=367.95, color='GREEN') second_candle=CandleItem(low=362.0, high=369.8, open=367.95, close=364.35, color='RED') last_candle=CandleItem(low=362.15, high=365.85, open=364.35, close=363.55, color='RED') 2020-09-10 23:00:20 INFO: check need new order None 2020-09-10 23:00:20 INFO: init new order end 2020-09-10 23:00:20 INFO: 2020-09-10 23:00:20 INFO: 2020-09-10 23:00:20 INFO: 2020-09-10 23:00:20 INFO: 2020-09-10 23:02:00 INFO: 2020-09-10 23:02:00 INFO: 2020-09-10 23:02:00 INFO: 2020-09-10 23:02:00 INFO: 2020-09-10 23:02:00 INFO: clearing start 2020-09-10 23:02:00 INFO: clearing end 2020-09-10 23:02:00 INFO: 2020-09-10 23:02:00 INFO: 2020-09-10 23:02:00 INFO: 2020-09-10 23:02:00 INFO: 2020-09-11 00:00:20 INFO: 2020-09-11 00:00:20 INFO: 2020-09-11 00:00:20 INFO: 2020-09-11 00:00:20 INFO: 2020-09-11 00:00:20 INFO: init new order start 2020-09-11 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 10, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.55, 'high': 368.1, 'low': 362.9, 'close': 365.8, 'trades': 3798, 'volume': 2111100, 'vwap': 365.8, 'lastSize': 462, 'turnover': 77222462320, 'homeNotional': 21753.98196152525, 'foreignNotional': 7957500.421073228}, {'timestamp': datetime.datetime(2020, 9, 10, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.35, 'high': 365.85, 'low': 362.15, 'close': 363.55, 'trades': 3457, 'volume': 2481664, 'vwap': 364.05, 'lastSize': 290, 'turnover': 90343437455, 'homeNotional': 25510.91027308314, 'foreignNotional': 9287101.040404279}, {'timestamp': datetime.datetime(2020, 9, 10, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.95, 'high': 369.8, 'low': 362.0, 'close': 364.35, 'trades': 5371, 'volume': 3714098, 'vwap': 365.12, 'lastSize': 319, 'turnover': 135605961345, 'homeNotional': 38309.723181296235, 'foreignNotional': 13987571.376997821}] 2020-09-11 00:00:20 INFO: prepare candles [CandleItem(low=362.9, high=368.1, open=363.55, close=365.8, color='GREEN'), CandleItem(low=362.15, high=365.85, open=364.35, close=363.55, color='RED'), CandleItem(low=362.0, high=369.8, open=367.95, close=364.35, color='RED')] 2020-09-11 00:00:20 INFO: last_candle=CandleItem(low=362.9, high=368.1, open=363.55, close=365.8, color='GREEN') 2020-09-11 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-09-11 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=362.9, high=368.1, open=363.55, close=365.8, color='GREEN') 2020-09-11 00:00:20 INFO: skip by CandleItem(low=362.9, high=368.1, open=363.55, close=365.8, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-11 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-09-11 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=362.9, high=368.1, open=363.55, close=365.8, color='GREEN') 2020-09-11 00:00:20 INFO: skip by CandleItem(low=362.9, high=368.1, open=363.55, close=365.8, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-11 00:00:20 INFO: not found applicable config for candle 2020-09-11 00:00:20 INFO: check need new order None 2020-09-11 00:00:20 INFO: init new order end 2020-09-11 00:00:20 INFO: 2020-09-11 00:00:20 INFO: 2020-09-11 00:00:20 INFO: 2020-09-11 00:00:20 INFO: 2020-09-11 00:02:00 INFO: 2020-09-11 00:02:00 INFO: 2020-09-11 00:02:00 INFO: 2020-09-11 00:02:00 INFO: 2020-09-11 00:02:00 INFO: clearing start 2020-09-11 00:02:00 INFO: clearing end 2020-09-11 00:02:00 INFO: 2020-09-11 00:02:00 INFO: 2020-09-11 00:02:00 INFO: 2020-09-11 00:02:00 INFO: 2020-09-11 01:00:20 INFO: 2020-09-11 01:00:20 INFO: 2020-09-11 01:00:20 INFO: 2020-09-11 01:00:20 INFO: 2020-09-11 01:00:20 INFO: init new order start 2020-09-11 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 10, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.8, 'high': 367.95, 'low': 363.8, 'close': 367.45, 'trades': 2340, 'volume': 1369202, 'vwap': 365.23, 'lastSize': 5, 'turnover': 50006717900, 'homeNotional': 14131.502746665652, 'foreignNotional': 5161191.165716909}, {'timestamp': datetime.datetime(2020, 9, 10, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.55, 'high': 368.1, 'low': 362.9, 'close': 365.8, 'trades': 3798, 'volume': 2111100, 'vwap': 365.8, 'lastSize': 462, 'turnover': 77222462320, 'homeNotional': 21753.98196152525, 'foreignNotional': 7957500.421073228}, {'timestamp': datetime.datetime(2020, 9, 10, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.35, 'high': 365.85, 'low': 362.15, 'close': 363.55, 'trades': 3457, 'volume': 2481664, 'vwap': 364.05, 'lastSize': 290, 'turnover': 90343437455, 'homeNotional': 25510.91027308314, 'foreignNotional': 9287101.040404279}] 2020-09-11 01:00:20 INFO: prepare candles [CandleItem(low=363.8, high=367.95, open=365.8, close=367.45, color='GREEN'), CandleItem(low=362.9, high=368.1, open=363.55, close=365.8, color='GREEN'), CandleItem(low=362.15, high=365.85, open=364.35, close=363.55, color='RED')] 2020-09-11 01:00:20 INFO: skip by colors first_candle=CandleItem(low=362.15, high=365.85, open=364.35, close=363.55, color='RED') second_candle=CandleItem(low=362.9, high=368.1, open=363.55, close=365.8, color='GREEN') last_candle=CandleItem(low=363.8, high=367.95, open=365.8, close=367.45, color='GREEN') 2020-09-11 01:00:20 INFO: check need new order None 2020-09-11 01:00:20 INFO: init new order end 2020-09-11 01:00:20 INFO: 2020-09-11 01:00:20 INFO: 2020-09-11 01:00:20 INFO: 2020-09-11 01:00:20 INFO: 2020-09-11 01:02:00 INFO: 2020-09-11 01:02:00 INFO: 2020-09-11 01:02:00 INFO: 2020-09-11 01:02:00 INFO: 2020-09-11 01:02:00 INFO: clearing start 2020-09-11 01:02:00 INFO: clearing end 2020-09-11 01:02:00 INFO: 2020-09-11 01:02:00 INFO: 2020-09-11 01:02:00 INFO: 2020-09-11 01:02:00 INFO: 2020-09-11 02:00:20 INFO: 2020-09-11 02:00:20 INFO: 2020-09-11 02:00:20 INFO: 2020-09-11 02:00:20 INFO: 2020-09-11 02:00:20 INFO: init new order start 2020-09-11 02:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 10, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.45, 'high': 369.7, 'low': 366.7, 'close': 369.4, 'trades': 3660, 'volume': 2471498, 'vwap': 368.18, 'lastSize': 100, 'turnover': 90994168275, 'homeNotional': 25579.767504916428, 'foreignNotional': 9417820.966049826}, {'timestamp': datetime.datetime(2020, 9, 10, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.8, 'high': 367.95, 'low': 363.8, 'close': 367.45, 'trades': 2340, 'volume': 1369202, 'vwap': 365.23, 'lastSize': 5, 'turnover': 50006717900, 'homeNotional': 14131.502746665652, 'foreignNotional': 5161191.165716909}, {'timestamp': datetime.datetime(2020, 9, 10, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.55, 'high': 368.1, 'low': 362.9, 'close': 365.8, 'trades': 3798, 'volume': 2111100, 'vwap': 365.8, 'lastSize': 462, 'turnover': 77222462320, 'homeNotional': 21753.98196152525, 'foreignNotional': 7957500.421073228}] 2020-09-11 02:00:21 INFO: prepare candles [CandleItem(low=366.7, high=369.7, open=367.45, close=369.4, color='GREEN'), CandleItem(low=363.8, high=367.95, open=365.8, close=367.45, color='GREEN'), CandleItem(low=362.9, high=368.1, open=363.55, close=365.8, color='GREEN')] 2020-09-11 02:00:21 INFO: skip by colors first_candle=CandleItem(low=362.9, high=368.1, open=363.55, close=365.8, color='GREEN') second_candle=CandleItem(low=363.8, high=367.95, open=365.8, close=367.45, color='GREEN') last_candle=CandleItem(low=366.7, high=369.7, open=367.45, close=369.4, color='GREEN') 2020-09-11 02:00:21 INFO: check need new order None 2020-09-11 02:00:21 INFO: init new order end 2020-09-11 02:00:21 INFO: 2020-09-11 02:00:21 INFO: 2020-09-11 02:00:21 INFO: 2020-09-11 02:00:21 INFO: 2020-09-11 02:02:00 INFO: 2020-09-11 02:02:00 INFO: 2020-09-11 02:02:00 INFO: 2020-09-11 02:02:00 INFO: 2020-09-11 02:02:00 INFO: clearing start 2020-09-11 02:02:00 INFO: clearing end 2020-09-11 02:02:00 INFO: 2020-09-11 02:02:00 INFO: 2020-09-11 02:02:00 INFO: 2020-09-11 02:02:00 INFO: 2020-09-11 03:00:20 INFO: 2020-09-11 03:00:20 INFO: 2020-09-11 03:00:20 INFO: 2020-09-11 03:00:20 INFO: 2020-09-11 03:00:20 INFO: init new order start 2020-09-11 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 11, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 369.4, 'high': 369.6, 'low': 366.55, 'close': 368.4, 'trades': 2086, 'volume': 1968690, 'vwap': 367.95, 'lastSize': 7, 'turnover': 72436965385, 'homeNotional': 20344.702003239745, 'foreignNotional': 7485740.258630495}, {'timestamp': datetime.datetime(2020, 9, 10, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.45, 'high': 369.7, 'low': 366.7, 'close': 369.4, 'trades': 3660, 'volume': 2471498, 'vwap': 368.18, 'lastSize': 100, 'turnover': 90994168275, 'homeNotional': 25579.767504916428, 'foreignNotional': 9417820.966049826}, {'timestamp': datetime.datetime(2020, 9, 10, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.8, 'high': 367.95, 'low': 363.8, 'close': 367.45, 'trades': 2340, 'volume': 1369202, 'vwap': 365.23, 'lastSize': 5, 'turnover': 50006717900, 'homeNotional': 14131.502746665652, 'foreignNotional': 5161191.165716909}] 2020-09-11 03:00:20 INFO: prepare candles [CandleItem(low=366.55, high=369.6, open=369.4, close=368.4, color='RED'), CandleItem(low=366.7, high=369.7, open=367.45, close=369.4, color='GREEN'), CandleItem(low=363.8, high=367.95, open=365.8, close=367.45, color='GREEN')] 2020-09-11 03:00:20 INFO: last_candle=CandleItem(low=366.55, high=369.6, open=369.4, close=368.4, color='RED') 2020-09-11 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-09-11 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=366.55, high=369.6, open=369.4, close=368.4, color='RED') 2020-09-11 03:00:20 INFO: skip by CandleItem(low=366.55, high=369.6, open=369.4, close=368.4, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-11 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-09-11 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=366.55, high=369.6, open=369.4, close=368.4, color='RED') 2020-09-11 03:00:20 INFO: skip by CandleItem(low=366.55, high=369.6, open=369.4, close=368.4, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-11 03:00:20 INFO: not found applicable config for candle 2020-09-11 03:00:20 INFO: check need new order None 2020-09-11 03:00:20 INFO: init new order end 2020-09-11 03:00:20 INFO: 2020-09-11 03:00:20 INFO: 2020-09-11 03:00:20 INFO: 2020-09-11 03:00:20 INFO: 2020-09-11 03:02:00 INFO: 2020-09-11 03:02:00 INFO: 2020-09-11 03:02:00 INFO: 2020-09-11 03:02:00 INFO: 2020-09-11 03:02:00 INFO: clearing start 2020-09-11 03:02:00 INFO: clearing end 2020-09-11 03:02:00 INFO: 2020-09-11 03:02:00 INFO: 2020-09-11 03:02:00 INFO: 2020-09-11 03:02:00 INFO: 2020-09-11 04:00:20 INFO: 2020-09-11 04:00:20 INFO: 2020-09-11 04:00:20 INFO: 2020-09-11 04:00:20 INFO: 2020-09-11 04:00:20 INFO: init new order start 2020-09-11 04:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 11, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.4, 'high': 372.15, 'low': 368.35, 'close': 369.3, 'trades': 3672, 'volume': 2935039, 'vwap': 370.57, 'lastSize': 100, 'turnover': 108761403830, 'homeNotional': 30417.755808496506, 'foreignNotional': 11271672.706163906}, {'timestamp': datetime.datetime(2020, 9, 11, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 369.4, 'high': 369.6, 'low': 366.55, 'close': 368.4, 'trades': 2086, 'volume': 1968690, 'vwap': 367.95, 'lastSize': 7, 'turnover': 72436965385, 'homeNotional': 20344.702003239745, 'foreignNotional': 7485740.258630495}, {'timestamp': datetime.datetime(2020, 9, 10, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.45, 'high': 369.7, 'low': 366.7, 'close': 369.4, 'trades': 3660, 'volume': 2471498, 'vwap': 368.18, 'lastSize': 100, 'turnover': 90994168275, 'homeNotional': 25579.767504916428, 'foreignNotional': 9417820.966049826}] 2020-09-11 04:00:20 INFO: prepare candles [CandleItem(low=368.35, high=372.15, open=368.4, close=369.3, color='GREEN'), CandleItem(low=366.55, high=369.6, open=369.4, close=368.4, color='RED'), CandleItem(low=366.7, high=369.7, open=367.45, close=369.4, color='GREEN')] 2020-09-11 04:00:20 INFO: skip by colors first_candle=CandleItem(low=366.7, high=369.7, open=367.45, close=369.4, color='GREEN') second_candle=CandleItem(low=366.55, high=369.6, open=369.4, close=368.4, color='RED') last_candle=CandleItem(low=368.35, high=372.15, open=368.4, close=369.3, color='GREEN') 2020-09-11 04:00:20 INFO: check need new order None 2020-09-11 04:00:20 INFO: init new order end 2020-09-11 04:00:20 INFO: 2020-09-11 04:00:20 INFO: 2020-09-11 04:00:20 INFO: 2020-09-11 04:00:20 INFO: 2020-09-11 04:02:00 INFO: 2020-09-11 04:02:00 INFO: 2020-09-11 04:02:00 INFO: 2020-09-11 04:02:00 INFO: 2020-09-11 04:02:00 INFO: clearing start 2020-09-11 04:02:00 INFO: clearing end 2020-09-11 04:02:00 INFO: 2020-09-11 04:02:00 INFO: 2020-09-11 04:02:00 INFO: 2020-09-11 04:02:00 INFO: 2020-09-11 05:00:20 INFO: 2020-09-11 05:00:20 INFO: 2020-09-11 05:00:20 INFO: 2020-09-11 05:00:20 INFO: 2020-09-11 05:00:20 INFO: init new order start 2020-09-11 05:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 11, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 369.3, 'high': 369.85, 'low': 365.0, 'close': 365.8, 'trades': 3170, 'volume': 2355261, 'vwap': 367.41, 'lastSize': 2500, 'turnover': 86534102710, 'homeNotional': 24325.651065316382, 'foreignNotional': 8937468.60547299}, {'timestamp': datetime.datetime(2020, 9, 11, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.4, 'high': 372.15, 'low': 368.35, 'close': 369.3, 'trades': 3672, 'volume': 2935039, 'vwap': 370.57, 'lastSize': 100, 'turnover': 108761403830, 'homeNotional': 30417.755808496506, 'foreignNotional': 11271672.706163906}, {'timestamp': datetime.datetime(2020, 9, 11, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 369.4, 'high': 369.6, 'low': 366.55, 'close': 368.4, 'trades': 2086, 'volume': 1968690, 'vwap': 367.95, 'lastSize': 7, 'turnover': 72436965385, 'homeNotional': 20344.702003239745, 'foreignNotional': 7485740.258630495}] 2020-09-11 05:00:20 INFO: prepare candles [CandleItem(low=365.0, high=369.85, open=369.3, close=365.8, color='RED'), CandleItem(low=368.35, high=372.15, open=368.4, close=369.3, color='GREEN'), CandleItem(low=366.55, high=369.6, open=369.4, close=368.4, color='RED')] 2020-09-11 05:00:20 INFO: skip by colors first_candle=CandleItem(low=366.55, high=369.6, open=369.4, close=368.4, color='RED') second_candle=CandleItem(low=368.35, high=372.15, open=368.4, close=369.3, color='GREEN') last_candle=CandleItem(low=365.0, high=369.85, open=369.3, close=365.8, color='RED') 2020-09-11 05:00:20 INFO: check need new order None 2020-09-11 05:00:20 INFO: init new order end 2020-09-11 05:00:20 INFO: 2020-09-11 05:00:20 INFO: 2020-09-11 05:00:20 INFO: 2020-09-11 05:00:20 INFO: 2020-09-11 05:02:00 INFO: 2020-09-11 05:02:00 INFO: 2020-09-11 05:02:00 INFO: 2020-09-11 05:02:00 INFO: 2020-09-11 05:02:00 INFO: clearing start 2020-09-11 05:02:00 INFO: clearing end 2020-09-11 05:02:00 INFO: 2020-09-11 05:02:00 INFO: 2020-09-11 05:02:00 INFO: 2020-09-11 05:02:00 INFO: 2020-09-11 06:00:20 INFO: 2020-09-11 06:00:20 INFO: 2020-09-11 06:00:20 INFO: 2020-09-11 06:00:20 INFO: 2020-09-11 06:00:20 INFO: init new order start 2020-09-11 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 11, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.8, 'high': 366.65, 'low': 363.0, 'close': 363.35, 'trades': 2754, 'volume': 3142639, 'vwap': 364.57, 'lastSize': 490, 'turnover': 114570789195, 'homeNotional': 32334.63537916522, 'foreignNotional': 11788227.20807593}, {'timestamp': datetime.datetime(2020, 9, 11, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 369.3, 'high': 369.85, 'low': 365.0, 'close': 365.8, 'trades': 3170, 'volume': 2355261, 'vwap': 367.41, 'lastSize': 2500, 'turnover': 86534102710, 'homeNotional': 24325.651065316382, 'foreignNotional': 8937468.60547299}, {'timestamp': datetime.datetime(2020, 9, 11, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.4, 'high': 372.15, 'low': 368.35, 'close': 369.3, 'trades': 3672, 'volume': 2935039, 'vwap': 370.57, 'lastSize': 100, 'turnover': 108761403830, 'homeNotional': 30417.755808496506, 'foreignNotional': 11271672.706163906}] 2020-09-11 06:00:20 INFO: prepare candles [CandleItem(low=363.0, high=366.65, open=365.8, close=363.35, color='RED'), CandleItem(low=365.0, high=369.85, open=369.3, close=365.8, color='RED'), CandleItem(low=368.35, high=372.15, open=368.4, close=369.3, color='GREEN')] 2020-09-11 06:00:20 INFO: skip by colors first_candle=CandleItem(low=368.35, high=372.15, open=368.4, close=369.3, color='GREEN') second_candle=CandleItem(low=365.0, high=369.85, open=369.3, close=365.8, color='RED') last_candle=CandleItem(low=363.0, high=366.65, open=365.8, close=363.35, color='RED') 2020-09-11 06:00:20 INFO: check need new order None 2020-09-11 06:00:20 INFO: init new order end 2020-09-11 06:00:20 INFO: 2020-09-11 06:00:20 INFO: 2020-09-11 06:00:20 INFO: 2020-09-11 06:00:20 INFO: 2020-09-11 06:02:00 INFO: 2020-09-11 06:02:00 INFO: 2020-09-11 06:02:00 INFO: 2020-09-11 06:02:00 INFO: 2020-09-11 06:02:00 INFO: clearing start 2020-09-11 06:02:00 INFO: clearing end 2020-09-11 06:02:00 INFO: 2020-09-11 06:02:00 INFO: 2020-09-11 06:02:00 INFO: 2020-09-11 06:02:00 INFO: 2020-09-11 07:00:20 INFO: 2020-09-11 07:00:20 INFO: 2020-09-11 07:00:20 INFO: 2020-09-11 07:00:20 INFO: 2020-09-11 07:00:20 INFO: init new order start 2020-09-11 07:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 11, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.35, 'high': 364.55, 'low': 357.3, 'close': 357.4, 'trades': 5096, 'volume': 5890766, 'vwap': 360.63, 'lastSize': 500, 'turnover': 212438037625, 'homeNotional': 60305.470382796826, 'foreignNotional': 21748054.138559274}, {'timestamp': datetime.datetime(2020, 9, 11, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.8, 'high': 366.65, 'low': 363.0, 'close': 363.35, 'trades': 2754, 'volume': 3142639, 'vwap': 364.57, 'lastSize': 490, 'turnover': 114570789195, 'homeNotional': 32334.63537916522, 'foreignNotional': 11788227.20807593}, {'timestamp': datetime.datetime(2020, 9, 11, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 369.3, 'high': 369.85, 'low': 365.0, 'close': 365.8, 'trades': 3170, 'volume': 2355261, 'vwap': 367.41, 'lastSize': 2500, 'turnover': 86534102710, 'homeNotional': 24325.651065316382, 'foreignNotional': 8937468.60547299}] 2020-09-11 07:00:20 INFO: prepare candles [CandleItem(low=357.3, high=364.55, open=363.35, close=357.4, color='RED'), CandleItem(low=363.0, high=366.65, open=365.8, close=363.35, color='RED'), CandleItem(low=365.0, high=369.85, open=369.3, close=365.8, color='RED')] 2020-09-11 07:00:20 INFO: skip by colors first_candle=CandleItem(low=365.0, high=369.85, open=369.3, close=365.8, color='RED') second_candle=CandleItem(low=363.0, high=366.65, open=365.8, close=363.35, color='RED') last_candle=CandleItem(low=357.3, high=364.55, open=363.35, close=357.4, color='RED') 2020-09-11 07:00:20 INFO: check need new order None 2020-09-11 07:00:20 INFO: init new order end 2020-09-11 07:00:20 INFO: 2020-09-11 07:00:20 INFO: 2020-09-11 07:00:20 INFO: 2020-09-11 07:00:20 INFO: 2020-09-11 07:02:00 INFO: 2020-09-11 07:02:00 INFO: 2020-09-11 07:02:00 INFO: 2020-09-11 07:02:00 INFO: 2020-09-11 07:02:00 INFO: clearing start 2020-09-11 07:02:00 INFO: clearing end 2020-09-11 07:02:00 INFO: 2020-09-11 07:02:00 INFO: 2020-09-11 07:02:00 INFO: 2020-09-11 07:02:00 INFO: 2020-09-11 08:00:20 INFO: 2020-09-11 08:00:20 INFO: 2020-09-11 08:00:20 INFO: 2020-09-11 08:00:20 INFO: 2020-09-11 08:00:20 INFO: init new order start 2020-09-11 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 11, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.4, 'high': 360.95, 'low': 356.5, 'close': 357.8, 'trades': 3792, 'volume': 3108726, 'vwap': 358.63, 'lastSize': 30, 'turnover': 111487322440, 'homeNotional': 31813.928786660355, 'foreignNotional': 11409378.415677888}, {'timestamp': datetime.datetime(2020, 9, 11, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.35, 'high': 364.55, 'low': 357.3, 'close': 357.4, 'trades': 5096, 'volume': 5890766, 'vwap': 360.63, 'lastSize': 500, 'turnover': 212438037625, 'homeNotional': 60305.470382796826, 'foreignNotional': 21748054.138559274}, {'timestamp': datetime.datetime(2020, 9, 11, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.8, 'high': 366.65, 'low': 363.0, 'close': 363.35, 'trades': 2754, 'volume': 3142639, 'vwap': 364.57, 'lastSize': 490, 'turnover': 114570789195, 'homeNotional': 32334.63537916522, 'foreignNotional': 11788227.20807593}] 2020-09-11 08:00:20 INFO: prepare candles [CandleItem(low=356.5, high=360.95, open=357.4, close=357.8, color='GREEN'), CandleItem(low=357.3, high=364.55, open=363.35, close=357.4, color='RED'), CandleItem(low=363.0, high=366.65, open=365.8, close=363.35, color='RED')] 2020-09-11 08:00:20 INFO: last_candle=CandleItem(low=356.5, high=360.95, open=357.4, close=357.8, color='GREEN') 2020-09-11 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-11 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=356.5, high=360.95, open=357.4, close=357.8, color='GREEN') 2020-09-11 08:00:20 INFO: skip by CandleItem(low=356.5, high=360.95, open=357.4, close=357.8, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-11 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-11 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=356.5, high=360.95, open=357.4, close=357.8, color='GREEN') 2020-09-11 08:00:20 INFO: skip by CandleItem(low=356.5, high=360.95, open=357.4, close=357.8, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-11 08:00:20 INFO: not found applicable config for candle 2020-09-11 08:00:20 INFO: check need new order None 2020-09-11 08:00:20 INFO: init new order end 2020-09-11 08:00:20 INFO: 2020-09-11 08:00:20 INFO: 2020-09-11 08:00:20 INFO: 2020-09-11 08:00:20 INFO: 2020-09-11 08:02:00 INFO: 2020-09-11 08:02:00 INFO: 2020-09-11 08:02:00 INFO: 2020-09-11 08:02:00 INFO: 2020-09-11 08:02:00 INFO: clearing start 2020-09-11 08:02:00 INFO: clearing end 2020-09-11 08:02:00 INFO: 2020-09-11 08:02:00 INFO: 2020-09-11 08:02:00 INFO: 2020-09-11 08:02:00 INFO: 2020-09-11 09:00:20 INFO: 2020-09-11 09:00:20 INFO: 2020-09-11 09:00:20 INFO: 2020-09-11 09:00:20 INFO: 2020-09-11 09:00:20 INFO: init new order start 2020-09-11 09:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 11, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.8, 'high': 363.5, 'low': 357.35, 'close': 362.6, 'trades': 3298, 'volume': 3070731, 'vwap': 360.81, 'lastSize': 250, 'turnover': 110794854250, 'homeNotional': 31486.27594396653, 'foreignNotional': 11360622.985294808}, {'timestamp': datetime.datetime(2020, 9, 11, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.4, 'high': 360.95, 'low': 356.5, 'close': 357.8, 'trades': 3792, 'volume': 3108726, 'vwap': 358.63, 'lastSize': 30, 'turnover': 111487322440, 'homeNotional': 31813.928786660355, 'foreignNotional': 11409378.415677888}, {'timestamp': datetime.datetime(2020, 9, 11, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.35, 'high': 364.55, 'low': 357.3, 'close': 357.4, 'trades': 5096, 'volume': 5890766, 'vwap': 360.63, 'lastSize': 500, 'turnover': 212438037625, 'homeNotional': 60305.470382796826, 'foreignNotional': 21748054.138559274}] 2020-09-11 09:00:20 INFO: prepare candles [CandleItem(low=357.35, high=363.5, open=357.8, close=362.6, color='GREEN'), CandleItem(low=356.5, high=360.95, open=357.4, close=357.8, color='GREEN'), CandleItem(low=357.3, high=364.55, open=363.35, close=357.4, color='RED')] 2020-09-11 09:00:20 INFO: skip by colors first_candle=CandleItem(low=357.3, high=364.55, open=363.35, close=357.4, color='RED') second_candle=CandleItem(low=356.5, high=360.95, open=357.4, close=357.8, color='GREEN') last_candle=CandleItem(low=357.35, high=363.5, open=357.8, close=362.6, color='GREEN') 2020-09-11 09:00:20 INFO: check need new order None 2020-09-11 09:00:20 INFO: init new order end 2020-09-11 09:00:20 INFO: 2020-09-11 09:00:20 INFO: 2020-09-11 09:00:20 INFO: 2020-09-11 09:00:20 INFO: 2020-09-11 09:02:00 INFO: 2020-09-11 09:02:00 INFO: 2020-09-11 09:02:00 INFO: 2020-09-11 09:02:00 INFO: 2020-09-11 09:02:00 INFO: clearing start 2020-09-11 09:02:00 INFO: clearing end 2020-09-11 09:02:00 INFO: 2020-09-11 09:02:00 INFO: 2020-09-11 09:02:00 INFO: 2020-09-11 09:02:00 INFO: 2020-09-11 10:00:20 INFO: 2020-09-11 10:00:20 INFO: 2020-09-11 10:00:20 INFO: 2020-09-11 10:00:20 INFO: 2020-09-11 10:00:20 INFO: init new order start 2020-09-11 10:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 11, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 362.6, 'high': 364.25, 'low': 361.05, 'close': 362.9, 'trades': 2803, 'volume': 1763656, 'vwap': 362.39, 'lastSize': 100, 'turnover': 63912993740, 'homeNotional': 18118.471497019378, 'foreignNotional': 6565946.613380536}, {'timestamp': datetime.datetime(2020, 9, 11, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.8, 'high': 363.5, 'low': 357.35, 'close': 362.6, 'trades': 3298, 'volume': 3070731, 'vwap': 360.81, 'lastSize': 250, 'turnover': 110794854250, 'homeNotional': 31486.27594396653, 'foreignNotional': 11360622.985294808}, {'timestamp': datetime.datetime(2020, 9, 11, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.4, 'high': 360.95, 'low': 356.5, 'close': 357.8, 'trades': 3792, 'volume': 3108726, 'vwap': 358.63, 'lastSize': 30, 'turnover': 111487322440, 'homeNotional': 31813.928786660355, 'foreignNotional': 11409378.415677888}] 2020-09-11 10:00:20 INFO: prepare candles [CandleItem(low=361.05, high=364.25, open=362.6, close=362.9, color='GREEN'), CandleItem(low=357.35, high=363.5, open=357.8, close=362.6, color='GREEN'), CandleItem(low=356.5, high=360.95, open=357.4, close=357.8, color='GREEN')] 2020-09-11 10:00:20 INFO: skip by colors first_candle=CandleItem(low=356.5, high=360.95, open=357.4, close=357.8, color='GREEN') second_candle=CandleItem(low=357.35, high=363.5, open=357.8, close=362.6, color='GREEN') last_candle=CandleItem(low=361.05, high=364.25, open=362.6, close=362.9, color='GREEN') 2020-09-11 10:00:20 INFO: check need new order None 2020-09-11 10:00:20 INFO: init new order end 2020-09-11 10:00:20 INFO: 2020-09-11 10:00:20 INFO: 2020-09-11 10:00:20 INFO: 2020-09-11 10:00:20 INFO: 2020-09-11 10:02:00 INFO: 2020-09-11 10:02:00 INFO: 2020-09-11 10:02:00 INFO: 2020-09-11 10:02:00 INFO: 2020-09-11 10:02:00 INFO: clearing start 2020-09-11 10:02:00 INFO: clearing end 2020-09-11 10:02:00 INFO: 2020-09-11 10:02:00 INFO: 2020-09-11 10:02:00 INFO: 2020-09-11 10:02:00 INFO: 2020-09-11 11:00:20 INFO: 2020-09-11 11:00:20 INFO: 2020-09-11 11:00:20 INFO: 2020-09-11 11:00:20 INFO: 2020-09-11 11:00:20 INFO: init new order start 2020-09-11 11:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 11, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 362.9, 'high': 364.7, 'low': 361.85, 'close': 362.5, 'trades': 2502, 'volume': 1718340, 'vwap': 363.27, 'lastSize': 10, 'turnover': 62421360530, 'homeNotional': 17644.135650772158, 'foreignNotional': 6409518.142225501}, {'timestamp': datetime.datetime(2020, 9, 11, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 362.6, 'high': 364.25, 'low': 361.05, 'close': 362.9, 'trades': 2803, 'volume': 1763656, 'vwap': 362.39, 'lastSize': 100, 'turnover': 63912993740, 'homeNotional': 18118.471497019378, 'foreignNotional': 6565946.613380536}, {'timestamp': datetime.datetime(2020, 9, 11, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.8, 'high': 363.5, 'low': 357.35, 'close': 362.6, 'trades': 3298, 'volume': 3070731, 'vwap': 360.81, 'lastSize': 250, 'turnover': 110794854250, 'homeNotional': 31486.27594396653, 'foreignNotional': 11360622.985294808}] 2020-09-11 11:00:21 INFO: prepare candles [CandleItem(low=361.85, high=364.7, open=362.9, close=362.5, color='RED'), CandleItem(low=361.05, high=364.25, open=362.6, close=362.9, color='GREEN'), CandleItem(low=357.35, high=363.5, open=357.8, close=362.6, color='GREEN')] 2020-09-11 11:00:21 INFO: last_candle=CandleItem(low=361.85, high=364.7, open=362.9, close=362.5, color='RED') 2020-09-11 11: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-11 11: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=361.85, high=364.7, open=362.9, close=362.5, color='RED') 2020-09-11 11:00:21 INFO: skip by CandleItem(low=361.85, high=364.7, open=362.9, close=362.5, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-11 11: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-11 11: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=361.85, high=364.7, open=362.9, close=362.5, color='RED') 2020-09-11 11:00:21 INFO: skip by CandleItem(low=361.85, high=364.7, open=362.9, close=362.5, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-11 11:00:21 INFO: not found applicable config for candle 2020-09-11 11:00:21 INFO: check need new order None 2020-09-11 11:00:21 INFO: init new order end 2020-09-11 11:00:21 INFO: 2020-09-11 11:00:21 INFO: 2020-09-11 11:00:21 INFO: 2020-09-11 11:00:21 INFO: 2020-09-11 11:02:00 INFO: 2020-09-11 11:02:00 INFO: 2020-09-11 11:02:00 INFO: 2020-09-11 11:02:00 INFO: 2020-09-11 11:02:00 INFO: clearing start 2020-09-11 11:02:00 INFO: clearing end 2020-09-11 11:02:00 INFO: 2020-09-11 11:02:00 INFO: 2020-09-11 11:02:00 INFO: 2020-09-11 11:02:00 INFO: 2020-09-11 12:00:20 INFO: 2020-09-11 12:00:20 INFO: 2020-09-11 12:00:20 INFO: 2020-09-11 12:00:20 INFO: 2020-09-11 12:00:20 INFO: init new order start 2020-09-11 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 11, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 362.5, 'high': 369.0, 'low': 362.45, 'close': 365.55, 'trades': 5009, 'volume': 4214266, 'vwap': 365.99, 'lastSize': 500, 'turnover': 154235290025, 'homeNotional': 43343.22451335559, 'foreignNotional': 15862992.188666346}, {'timestamp': datetime.datetime(2020, 9, 11, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 362.9, 'high': 364.7, 'low': 361.85, 'close': 362.5, 'trades': 2502, 'volume': 1718340, 'vwap': 363.27, 'lastSize': 10, 'turnover': 62421360530, 'homeNotional': 17644.135650772158, 'foreignNotional': 6409518.142225501}, {'timestamp': datetime.datetime(2020, 9, 11, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 362.6, 'high': 364.25, 'low': 361.05, 'close': 362.9, 'trades': 2803, 'volume': 1763656, 'vwap': 362.39, 'lastSize': 100, 'turnover': 63912993740, 'homeNotional': 18118.471497019378, 'foreignNotional': 6565946.613380536}] 2020-09-11 12:00:20 INFO: prepare candles [CandleItem(low=362.45, high=369.0, open=362.5, close=365.55, color='GREEN'), CandleItem(low=361.85, high=364.7, open=362.9, close=362.5, color='RED'), CandleItem(low=361.05, high=364.25, open=362.6, close=362.9, color='GREEN')] 2020-09-11 12:00:20 INFO: skip by colors first_candle=CandleItem(low=361.05, high=364.25, open=362.6, close=362.9, color='GREEN') second_candle=CandleItem(low=361.85, high=364.7, open=362.9, close=362.5, color='RED') last_candle=CandleItem(low=362.45, high=369.0, open=362.5, close=365.55, color='GREEN') 2020-09-11 12:00:20 INFO: check need new order None 2020-09-11 12:00:20 INFO: init new order end 2020-09-11 12:00:20 INFO: 2020-09-11 12:00:20 INFO: 2020-09-11 12:00:20 INFO: 2020-09-11 12:00:20 INFO: 2020-09-11 12:02:00 INFO: 2020-09-11 12:02:00 INFO: 2020-09-11 12:02:00 INFO: 2020-09-11 12:02:00 INFO: 2020-09-11 12:02:00 INFO: clearing start 2020-09-11 12:02:00 INFO: clearing end 2020-09-11 12:02:00 INFO: 2020-09-11 12:02:00 INFO: 2020-09-11 12:02:00 INFO: 2020-09-11 12:02:00 INFO: 2020-09-11 13:00:20 INFO: 2020-09-11 13:00:20 INFO: 2020-09-11 13:00:20 INFO: 2020-09-11 13:00:20 INFO: 2020-09-11 13:00:20 INFO: init new order start 2020-09-11 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 11, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.55, 'high': 368.8, 'low': 365.55, 'close': 368.2, 'trades': 3597, 'volume': 2825030, 'vwap': 367.58, 'lastSize': 4000, 'turnover': 103841959195, 'homeNotional': 29145.005178453954, 'foreignNotional': 10713084.442250077}, {'timestamp': datetime.datetime(2020, 9, 11, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 362.5, 'high': 369.0, 'low': 362.45, 'close': 365.55, 'trades': 5009, 'volume': 4214266, 'vwap': 365.99, 'lastSize': 500, 'turnover': 154235290025, 'homeNotional': 43343.22451335559, 'foreignNotional': 15862992.188666346}, {'timestamp': datetime.datetime(2020, 9, 11, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 362.9, 'high': 364.7, 'low': 361.85, 'close': 362.5, 'trades': 2502, 'volume': 1718340, 'vwap': 363.27, 'lastSize': 10, 'turnover': 62421360530, 'homeNotional': 17644.135650772158, 'foreignNotional': 6409518.142225501}] 2020-09-11 13:00:20 INFO: prepare candles [CandleItem(low=365.55, high=368.8, open=365.55, close=368.2, color='GREEN'), CandleItem(low=362.45, high=369.0, open=362.5, close=365.55, color='GREEN'), CandleItem(low=361.85, high=364.7, open=362.9, close=362.5, color='RED')] 2020-09-11 13:00:20 INFO: skip by colors first_candle=CandleItem(low=361.85, high=364.7, open=362.9, close=362.5, color='RED') second_candle=CandleItem(low=362.45, high=369.0, open=362.5, close=365.55, color='GREEN') last_candle=CandleItem(low=365.55, high=368.8, open=365.55, close=368.2, color='GREEN') 2020-09-11 13:00:20 INFO: check need new order None 2020-09-11 13:00:20 INFO: init new order end 2020-09-11 13:00:20 INFO: 2020-09-11 13:00:20 INFO: 2020-09-11 13:00:20 INFO: 2020-09-11 13:00:20 INFO: 2020-09-11 13:02:00 INFO: 2020-09-11 13:02:00 INFO: 2020-09-11 13:02:00 INFO: 2020-09-11 13:02:00 INFO: 2020-09-11 13:02:00 INFO: clearing start 2020-09-11 13:02:00 INFO: clearing end 2020-09-11 13:02:00 INFO: 2020-09-11 13:02:00 INFO: 2020-09-11 13:02:00 INFO: 2020-09-11 13:02:00 INFO: 2020-09-11 14:00:20 INFO: 2020-09-11 14:00:21 INFO: 2020-09-11 14:00:21 INFO: 2020-09-11 14:00:21 INFO: 2020-09-11 14:00:21 INFO: init new order start 2020-09-11 14:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 11, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.2, 'high': 368.3, 'low': 363.5, 'close': 365.65, 'trades': 4257, 'volume': 3493188, 'vwap': 365.43, 'lastSize': 30, 'turnover': 127648516080, 'homeNotional': 35965.69362464393, 'foreignNotional': 13142644.908581242}, {'timestamp': datetime.datetime(2020, 9, 11, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.55, 'high': 368.8, 'low': 365.55, 'close': 368.2, 'trades': 3597, 'volume': 2825030, 'vwap': 367.58, 'lastSize': 4000, 'turnover': 103841959195, 'homeNotional': 29145.005178453954, 'foreignNotional': 10713084.442250077}, {'timestamp': datetime.datetime(2020, 9, 11, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 362.5, 'high': 369.0, 'low': 362.45, 'close': 365.55, 'trades': 5009, 'volume': 4214266, 'vwap': 365.99, 'lastSize': 500, 'turnover': 154235290025, 'homeNotional': 43343.22451335559, 'foreignNotional': 15862992.188666346}] 2020-09-11 14:00:21 INFO: prepare candles [CandleItem(low=363.5, high=368.3, open=368.2, close=365.65, color='RED'), CandleItem(low=365.55, high=368.8, open=365.55, close=368.2, color='GREEN'), CandleItem(low=362.45, high=369.0, open=362.5, close=365.55, color='GREEN')] 2020-09-11 14:00:21 INFO: last_candle=CandleItem(low=363.5, high=368.3, open=368.2, close=365.65, color='RED') 2020-09-11 14: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-11 14: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=368.3, open=368.2, close=365.65, color='RED') 2020-09-11 14:00:21 INFO: skip by CandleItem(low=363.5, high=368.3, open=368.2, close=365.65, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-11 14: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-11 14: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=368.3, open=368.2, close=365.65, color='RED') 2020-09-11 14:00:21 INFO: skip by CandleItem(low=363.5, high=368.3, open=368.2, close=365.65, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-11 14:00:21 INFO: not found applicable config for candle 2020-09-11 14:00:21 INFO: check need new order None 2020-09-11 14:00:21 INFO: init new order end 2020-09-11 14:00:21 INFO: 2020-09-11 14:00:21 INFO: 2020-09-11 14:00:21 INFO: 2020-09-11 14:00:21 INFO: 2020-09-11 14:02:00 INFO: 2020-09-11 14:02:00 INFO: 2020-09-11 14:02:00 INFO: 2020-09-11 14:02:00 INFO: 2020-09-11 14:02:00 INFO: clearing start 2020-09-11 14:02:00 INFO: clearing end 2020-09-11 14:02:00 INFO: 2020-09-11 14:02:00 INFO: 2020-09-11 14:02:00 INFO: 2020-09-11 14:02:00 INFO: 2020-09-11 15:00:20 INFO: 2020-09-11 15:00:20 INFO: 2020-09-11 15:00:20 INFO: 2020-09-11 15:00:20 INFO: 2020-09-11 15:00:20 INFO: init new order start 2020-09-11 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 11, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.65, 'high': 368.0, 'low': 361.25, 'close': 362.4, 'trades': 6282, 'volume': 5563688, 'vwap': 363.65, 'lastSize': 158, 'turnover': 202318884700, 'homeNotional': 57162.5067454318, 'foreignNotional': 20786787.898931876}, {'timestamp': datetime.datetime(2020, 9, 11, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.2, 'high': 368.3, 'low': 363.5, 'close': 365.65, 'trades': 4257, 'volume': 3493188, 'vwap': 365.43, 'lastSize': 30, 'turnover': 127648516080, 'homeNotional': 35965.69362464393, 'foreignNotional': 13142644.908581242}, {'timestamp': datetime.datetime(2020, 9, 11, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.55, 'high': 368.8, 'low': 365.55, 'close': 368.2, 'trades': 3597, 'volume': 2825030, 'vwap': 367.58, 'lastSize': 4000, 'turnover': 103841959195, 'homeNotional': 29145.005178453954, 'foreignNotional': 10713084.442250077}] 2020-09-11 15:00:20 INFO: prepare candles [CandleItem(low=361.25, high=368.0, open=365.65, close=362.4, color='RED'), CandleItem(low=363.5, high=368.3, open=368.2, close=365.65, color='RED'), CandleItem(low=365.55, high=368.8, open=365.55, close=368.2, color='GREEN')] 2020-09-11 15:00:20 INFO: skip by colors first_candle=CandleItem(low=365.55, high=368.8, open=365.55, close=368.2, color='GREEN') second_candle=CandleItem(low=363.5, high=368.3, open=368.2, close=365.65, color='RED') last_candle=CandleItem(low=361.25, high=368.0, open=365.65, close=362.4, color='RED') 2020-09-11 15:00:20 INFO: check need new order None 2020-09-11 15:00:20 INFO: init new order end 2020-09-11 15:00:20 INFO: 2020-09-11 15:00:20 INFO: 2020-09-11 15:00:20 INFO: 2020-09-11 15:00:20 INFO: 2020-09-11 15:02:00 INFO: 2020-09-11 15:02:00 INFO: 2020-09-11 15:02:00 INFO: 2020-09-11 15:02:00 INFO: 2020-09-11 15:02:00 INFO: clearing start 2020-09-11 15:02:00 INFO: clearing end 2020-09-11 15:02:00 INFO: 2020-09-11 15:02:00 INFO: 2020-09-11 15:02:00 INFO: 2020-09-11 15:02:00 INFO: 2020-09-11 16:00:20 INFO: 2020-09-11 16:00:20 INFO: 2020-09-11 16:00:20 INFO: 2020-09-11 16:00:20 INFO: 2020-09-11 16:00:20 INFO: init new order start 2020-09-11 16:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 11, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 362.4, 'high': 365.9, 'low': 361.6, 'close': 365.5, 'trades': 3680, 'volume': 2328609, 'vwap': 363.85, 'lastSize': 10000, 'turnover': 84725344580, 'homeNotional': 23922.73269257931, 'foreignNotional': 8704194.287788466}, {'timestamp': datetime.datetime(2020, 9, 11, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.65, 'high': 368.0, 'low': 361.25, 'close': 362.4, 'trades': 6282, 'volume': 5563688, 'vwap': 363.65, 'lastSize': 158, 'turnover': 202318884700, 'homeNotional': 57162.5067454318, 'foreignNotional': 20786787.898931876}, {'timestamp': datetime.datetime(2020, 9, 11, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.2, 'high': 368.3, 'low': 363.5, 'close': 365.65, 'trades': 4257, 'volume': 3493188, 'vwap': 365.43, 'lastSize': 30, 'turnover': 127648516080, 'homeNotional': 35965.69362464393, 'foreignNotional': 13142644.908581242}] 2020-09-11 16:00:21 INFO: prepare candles [CandleItem(low=361.6, high=365.9, open=362.4, close=365.5, color='GREEN'), CandleItem(low=361.25, high=368.0, open=365.65, close=362.4, color='RED'), CandleItem(low=363.5, high=368.3, open=368.2, close=365.65, color='RED')] 2020-09-11 16:00:21 INFO: last_candle=CandleItem(low=361.6, high=365.9, open=362.4, close=365.5, color='GREEN') 2020-09-11 16: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-11 16: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=361.6, high=365.9, open=362.4, close=365.5, color='GREEN') 2020-09-11 16:00:21 INFO: skip by CandleItem(low=361.6, high=365.9, open=362.4, close=365.5, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-11 16: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-11 16: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=361.6, high=365.9, open=362.4, close=365.5, color='GREEN') 2020-09-11 16:00:21 INFO: skip by CandleItem(low=361.6, high=365.9, open=362.4, close=365.5, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-11 16:00:21 INFO: not found applicable config for candle 2020-09-11 16:00:21 INFO: check need new order None 2020-09-11 16:00:21 INFO: init new order end 2020-09-11 16:00:21 INFO: 2020-09-11 16:00:21 INFO: 2020-09-11 16:00:21 INFO: 2020-09-11 16:00:21 INFO: 2020-09-11 16:02:00 INFO: 2020-09-11 16:02:00 INFO: 2020-09-11 16:02:00 INFO: 2020-09-11 16:02:00 INFO: 2020-09-11 16:02:00 INFO: clearing start 2020-09-11 16:02:00 INFO: clearing end 2020-09-11 16:02:00 INFO: 2020-09-11 16:02:00 INFO: 2020-09-11 16:02:00 INFO: 2020-09-11 16:02:00 INFO: 2020-09-11 17:00:20 INFO: 2020-09-11 17:00:20 INFO: 2020-09-11 17:00:20 INFO: 2020-09-11 17:00:20 INFO: 2020-09-11 17:00:20 INFO: init new order start 2020-09-11 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 11, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.5, 'high': 368.6, 'low': 364.1, 'close': 365.3, 'trades': 4024, 'volume': 2879494, 'vwap': 366.37, 'lastSize': 11, 'turnover': 105494409525, 'homeNotional': 29645.29210441235, 'foreignNotional': 10861017.008823805}, {'timestamp': datetime.datetime(2020, 9, 11, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 362.4, 'high': 365.9, 'low': 361.6, 'close': 365.5, 'trades': 3680, 'volume': 2328609, 'vwap': 363.85, 'lastSize': 10000, 'turnover': 84725344580, 'homeNotional': 23922.73269257931, 'foreignNotional': 8704194.287788466}, {'timestamp': datetime.datetime(2020, 9, 11, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.65, 'high': 368.0, 'low': 361.25, 'close': 362.4, 'trades': 6282, 'volume': 5563688, 'vwap': 363.65, 'lastSize': 158, 'turnover': 202318884700, 'homeNotional': 57162.5067454318, 'foreignNotional': 20786787.898931876}] 2020-09-11 17:00:20 INFO: prepare candles [CandleItem(low=364.1, high=368.6, open=365.5, close=365.3, color='RED'), CandleItem(low=361.6, high=365.9, open=362.4, close=365.5, color='GREEN'), CandleItem(low=361.25, high=368.0, open=365.65, close=362.4, color='RED')] 2020-09-11 17:00:20 INFO: skip by colors first_candle=CandleItem(low=361.25, high=368.0, open=365.65, close=362.4, color='RED') second_candle=CandleItem(low=361.6, high=365.9, open=362.4, close=365.5, color='GREEN') last_candle=CandleItem(low=364.1, high=368.6, open=365.5, close=365.3, color='RED') 2020-09-11 17:00:20 INFO: check need new order None 2020-09-11 17:00:20 INFO: init new order end 2020-09-11 17:00:20 INFO: 2020-09-11 17:00:20 INFO: 2020-09-11 17:00:20 INFO: 2020-09-11 17:00:20 INFO: 2020-09-11 17:02:00 INFO: 2020-09-11 17:02:00 INFO: 2020-09-11 17:02:00 INFO: 2020-09-11 17:02:00 INFO: 2020-09-11 17:02:00 INFO: clearing start 2020-09-11 17:02:00 INFO: clearing end 2020-09-11 17:02:00 INFO: 2020-09-11 17:02:00 INFO: 2020-09-11 17:02:00 INFO: 2020-09-11 17:02:00 INFO: 2020-09-11 18:00:20 INFO: 2020-09-11 18:00:20 INFO: 2020-09-11 18:00:20 INFO: 2020-09-11 18:00:20 INFO: 2020-09-11 18:00:20 INFO: init new order start 2020-09-11 18:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 11, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.3, 'high': 368.1, 'low': 363.65, 'close': 367.0, 'trades': 3404, 'volume': 2479145, 'vwap': 366.0, 'lastSize': 1, 'turnover': 90736622600, 'homeNotional': 25481.44161081655, 'foreignNotional': 9326244.206100257}, {'timestamp': datetime.datetime(2020, 9, 11, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.5, 'high': 368.6, 'low': 364.1, 'close': 365.3, 'trades': 4024, 'volume': 2879494, 'vwap': 366.37, 'lastSize': 11, 'turnover': 105494409525, 'homeNotional': 29645.29210441235, 'foreignNotional': 10861017.008823805}, {'timestamp': datetime.datetime(2020, 9, 11, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 362.4, 'high': 365.9, 'low': 361.6, 'close': 365.5, 'trades': 3680, 'volume': 2328609, 'vwap': 363.85, 'lastSize': 10000, 'turnover': 84725344580, 'homeNotional': 23922.73269257931, 'foreignNotional': 8704194.287788466}] 2020-09-11 18:00:20 INFO: prepare candles [CandleItem(low=363.65, high=368.1, open=365.3, close=367.0, color='GREEN'), CandleItem(low=364.1, high=368.6, open=365.5, close=365.3, color='RED'), CandleItem(low=361.6, high=365.9, open=362.4, close=365.5, color='GREEN')] 2020-09-11 18:00:20 INFO: skip by colors first_candle=CandleItem(low=361.6, high=365.9, open=362.4, close=365.5, color='GREEN') second_candle=CandleItem(low=364.1, high=368.6, open=365.5, close=365.3, color='RED') last_candle=CandleItem(low=363.65, high=368.1, open=365.3, close=367.0, color='GREEN') 2020-09-11 18:00:20 INFO: check need new order None 2020-09-11 18:00:20 INFO: init new order end 2020-09-11 18:00:20 INFO: 2020-09-11 18:00:20 INFO: 2020-09-11 18:00:20 INFO: 2020-09-11 18:00:20 INFO: 2020-09-11 18:02:00 INFO: 2020-09-11 18:02:00 INFO: 2020-09-11 18:02:00 INFO: 2020-09-11 18:02:00 INFO: 2020-09-11 18:02:00 INFO: clearing start 2020-09-11 18:02:00 INFO: clearing end 2020-09-11 18:02:00 INFO: 2020-09-11 18:02:00 INFO: 2020-09-11 18:02:00 INFO: 2020-09-11 18:02:00 INFO: 2020-09-11 19:00:20 INFO: 2020-09-11 19:00:20 INFO: 2020-09-11 19:00:20 INFO: 2020-09-11 19:00:20 INFO: 2020-09-11 19:00:20 INFO: init new order start 2020-09-11 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 11, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.0, 'high': 371.45, 'low': 367.05, 'close': 370.35, 'trades': 5155, 'volume': 4446697, 'vwap': 369.79, 'lastSize': 700, 'turnover': 164433028505, 'homeNotional': 45867.859948315454, 'foreignNotional': 16961359.833967157}, {'timestamp': datetime.datetime(2020, 9, 11, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.3, 'high': 368.1, 'low': 363.65, 'close': 367.0, 'trades': 3404, 'volume': 2479145, 'vwap': 366.0, 'lastSize': 1, 'turnover': 90736622600, 'homeNotional': 25481.44161081655, 'foreignNotional': 9326244.206100257}, {'timestamp': datetime.datetime(2020, 9, 11, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.5, 'high': 368.6, 'low': 364.1, 'close': 365.3, 'trades': 4024, 'volume': 2879494, 'vwap': 366.37, 'lastSize': 11, 'turnover': 105494409525, 'homeNotional': 29645.29210441235, 'foreignNotional': 10861017.008823805}] 2020-09-11 19:00:20 INFO: prepare candles [CandleItem(low=367.05, high=371.45, open=367.0, close=370.35, color='GREEN'), CandleItem(low=363.65, high=368.1, open=365.3, close=367.0, color='GREEN'), CandleItem(low=364.1, high=368.6, open=365.5, close=365.3, color='RED')] 2020-09-11 19:00:20 INFO: skip by colors first_candle=CandleItem(low=364.1, high=368.6, open=365.5, close=365.3, color='RED') second_candle=CandleItem(low=363.65, high=368.1, open=365.3, close=367.0, color='GREEN') last_candle=CandleItem(low=367.05, high=371.45, open=367.0, close=370.35, color='GREEN') 2020-09-11 19:00:20 INFO: check need new order None 2020-09-11 19:00:20 INFO: init new order end 2020-09-11 19:00:20 INFO: 2020-09-11 19:00:20 INFO: 2020-09-11 19:00:20 INFO: 2020-09-11 19:00:20 INFO: 2020-09-11 19:02:00 INFO: 2020-09-11 19:02:00 INFO: 2020-09-11 19:02:00 INFO: 2020-09-11 19:02:00 INFO: 2020-09-11 19:02:00 INFO: clearing start 2020-09-11 19:02:00 INFO: clearing end 2020-09-11 19:02:00 INFO: 2020-09-11 19:02:00 INFO: 2020-09-11 19:02:00 INFO: 2020-09-11 19:02:00 INFO: 2020-09-11 20:00:20 INFO: 2020-09-11 20:00:20 INFO: 2020-09-11 20:00:20 INFO: 2020-09-11 20:00:20 INFO: 2020-09-11 20:00:20 INFO: init new order start 2020-09-11 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 11, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 370.35, 'high': 373.0, 'low': 367.3, 'close': 367.85, 'trades': 5236, 'volume': 3520423, 'vwap': 370.01, 'lastSize': 1000, 'turnover': 130256558225, 'homeNotional': 36329.158082200745, 'foreignNotional': 13441918.902262837}, {'timestamp': datetime.datetime(2020, 9, 11, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.0, 'high': 371.45, 'low': 367.05, 'close': 370.35, 'trades': 5155, 'volume': 4446697, 'vwap': 369.79, 'lastSize': 700, 'turnover': 164433028505, 'homeNotional': 45867.859948315454, 'foreignNotional': 16961359.833967157}, {'timestamp': datetime.datetime(2020, 9, 11, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.3, 'high': 368.1, 'low': 363.65, 'close': 367.0, 'trades': 3404, 'volume': 2479145, 'vwap': 366.0, 'lastSize': 1, 'turnover': 90736622600, 'homeNotional': 25481.44161081655, 'foreignNotional': 9326244.206100257}] 2020-09-11 20:00:20 INFO: prepare candles [CandleItem(low=367.3, high=373.0, open=370.35, close=367.85, color='RED'), CandleItem(low=367.05, high=371.45, open=367.0, close=370.35, color='GREEN'), CandleItem(low=363.65, high=368.1, open=365.3, close=367.0, color='GREEN')] 2020-09-11 20:00:20 INFO: last_candle=CandleItem(low=367.3, high=373.0, open=370.35, close=367.85, color='RED') 2020-09-11 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-09-11 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=367.3, high=373.0, open=370.35, close=367.85, color='RED') 2020-09-11 20:00:20 INFO: skip by CandleItem(low=367.3, high=373.0, open=370.35, close=367.85, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-11 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-09-11 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=367.3, high=373.0, open=370.35, close=367.85, color='RED') 2020-09-11 20:00:20 INFO: skip by CandleItem(low=367.3, high=373.0, open=370.35, close=367.85, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-11 20:00:20 INFO: not found applicable config for candle 2020-09-11 20:00:20 INFO: check need new order None 2020-09-11 20:00:20 INFO: init new order end 2020-09-11 20:00:20 INFO: 2020-09-11 20:00:20 INFO: 2020-09-11 20:00:20 INFO: 2020-09-11 20:00:20 INFO: 2020-09-11 20:02:00 INFO: 2020-09-11 20:02:00 INFO: 2020-09-11 20:02:00 INFO: 2020-09-11 20:02:00 INFO: 2020-09-11 20:02:00 INFO: clearing start 2020-09-11 20:02:00 INFO: clearing end 2020-09-11 20:02:00 INFO: 2020-09-11 20:02:00 INFO: 2020-09-11 20:02:00 INFO: 2020-09-11 20:02:00 INFO: 2020-09-11 21:00:20 INFO: 2020-09-11 21:00:20 INFO: 2020-09-11 21:00:20 INFO: 2020-09-11 21:00:20 INFO: 2020-09-11 21:00:20 INFO: init new order start 2020-09-11 21:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 11, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.85, 'high': 368.4, 'low': 365.15, 'close': 367.15, 'trades': 3232, 'volume': 2381642, 'vwap': 366.65, 'lastSize': 9270, 'turnover': 87322864725, 'homeNotional': 24502.61555783394, 'foreignNotional': 8983896.256792381}, {'timestamp': datetime.datetime(2020, 9, 11, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 370.35, 'high': 373.0, 'low': 367.3, 'close': 367.85, 'trades': 5236, 'volume': 3520423, 'vwap': 370.01, 'lastSize': 1000, 'turnover': 130256558225, 'homeNotional': 36329.158082200745, 'foreignNotional': 13441918.902262837}, {'timestamp': datetime.datetime(2020, 9, 11, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.0, 'high': 371.45, 'low': 367.05, 'close': 370.35, 'trades': 5155, 'volume': 4446697, 'vwap': 369.79, 'lastSize': 700, 'turnover': 164433028505, 'homeNotional': 45867.859948315454, 'foreignNotional': 16961359.833967157}] 2020-09-11 21:00:21 INFO: prepare candles [CandleItem(low=365.15, high=368.4, open=367.85, close=367.15, color='RED'), CandleItem(low=367.3, high=373.0, open=370.35, close=367.85, color='RED'), CandleItem(low=367.05, high=371.45, open=367.0, close=370.35, color='GREEN')] 2020-09-11 21:00:21 INFO: skip by colors first_candle=CandleItem(low=367.05, high=371.45, open=367.0, close=370.35, color='GREEN') second_candle=CandleItem(low=367.3, high=373.0, open=370.35, close=367.85, color='RED') last_candle=CandleItem(low=365.15, high=368.4, open=367.85, close=367.15, color='RED') 2020-09-11 21:00:21 INFO: check need new order None 2020-09-11 21:00:21 INFO: init new order end 2020-09-11 21:00:21 INFO: 2020-09-11 21:00:21 INFO: 2020-09-11 21:00:21 INFO: 2020-09-11 21:00:21 INFO: 2020-09-11 21:02:00 INFO: 2020-09-11 21:02:00 INFO: 2020-09-11 21:02:00 INFO: 2020-09-11 21:02:00 INFO: 2020-09-11 21:02:00 INFO: clearing start 2020-09-11 21:02:00 INFO: clearing end 2020-09-11 21:02:00 INFO: 2020-09-11 21:02:00 INFO: 2020-09-11 21:02:00 INFO: 2020-09-11 21:02:00 INFO: 2020-09-11 22:00:20 INFO: 2020-09-11 22:00:20 INFO: 2020-09-11 22:00:20 INFO: 2020-09-11 22:00:20 INFO: 2020-09-11 22:00:20 INFO: init new order start 2020-09-11 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 11, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.15, 'high': 368.75, 'low': 366.75, 'close': 368.45, 'trades': 2204, 'volume': 1308128, 'vwap': 367.76, 'lastSize': 12, 'turnover': 48106784475, 'homeNotional': 13492.756406150751, 'foreignNotional': 4962003.155712599}, {'timestamp': datetime.datetime(2020, 9, 11, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.85, 'high': 368.4, 'low': 365.15, 'close': 367.15, 'trades': 3232, 'volume': 2381642, 'vwap': 366.65, 'lastSize': 9270, 'turnover': 87322864725, 'homeNotional': 24502.61555783394, 'foreignNotional': 8983896.256792381}, {'timestamp': datetime.datetime(2020, 9, 11, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 370.35, 'high': 373.0, 'low': 367.3, 'close': 367.85, 'trades': 5236, 'volume': 3520423, 'vwap': 370.01, 'lastSize': 1000, 'turnover': 130256558225, 'homeNotional': 36329.158082200745, 'foreignNotional': 13441918.902262837}] 2020-09-11 22:00:20 INFO: prepare candles [CandleItem(low=366.75, high=368.75, open=367.15, close=368.45, color='GREEN'), CandleItem(low=365.15, high=368.4, open=367.85, close=367.15, color='RED'), CandleItem(low=367.3, high=373.0, open=370.35, close=367.85, color='RED')] 2020-09-11 22:00:20 INFO: last_candle=CandleItem(low=366.75, high=368.75, open=367.15, close=368.45, color='GREEN') 2020-09-11 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-11 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=366.75, high=368.75, open=367.15, close=368.45, color='GREEN') 2020-09-11 22:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=365.15, high=368.4, open=367.85, close=367.15, color='RED') 2020-09-11 22:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=367.3, high=373.0, open=370.35, close=367.85, color='RED') 2020-09-11 22:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=366.75, high=368.75, open=367.15, close=368.45, color='GREEN'), take_profit_factor=6.0, clearing_interval=3600) 2020-09-11 22:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=366.75, high=368.75, open=367.15, close=368.45, color='GREEN'), take_profit_factor=6.0, clearing_interval=3600) 2020-09-11 22:00:20 INFO: place order: start candle=CandleItem(low=366.75, high=368.75, open=367.15, close=368.45, color='GREEN') ticker='ETHUSD' price_offset=0.1 2020-09-11 22:00:20 INFO: place order: side_factor=-1 init_trigger_price=368.8 init_order_price=368.85 stop_price_offset=0.0 candle.size=2.0 stop_price=366.75 take_price=380.85 2020-09-11 22:00:20 INFO: place order round: side_factor=-1 init_trigger_price=Decimal('368.80000000000001136868377216160297393798828125') init_order_price=Decimal('368.8500000000000227373675443232059478759765625') stop_price_offset=0.0 candle.size=2.0 stop_price=Decimal('366.75') take_price=Decimal('380.8500000000000227373675443232059478759765625') 2020-09-11 22:00:20 INFO: place order: compute qty=927 2020-09-11 22:00:20 INFO: place order: save order to db d0ed735177cd4afc88d8026e9d2b4558; response=True 2020-09-11 22:00:20 INFO: post order to exchange resp={'orderID': '11295451-10b7-80db-47a0-603577b23260', 'clOrdID': 'd0ed735177cd4afc88d8026e9d2b4558', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 927, 'price': 368.85, 'displayQty': None, 'stopPx': 368.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': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 11, 19, 0, 20, 711000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 11, 19, 0, 20, 711000, tzinfo=tzutc())} 2020-09-11 22:00:20 INFO: place new init order {'qty': 927, 'init_price': Decimal('368.80000000000001136868377216160297393798828125'), 'stop_price': Decimal('366.75'), 'take_price': Decimal('380.8500000000000227373675443232059478759765625'), 'order_uid': 'd0ed735177cd4afc88d8026e9d2b4558', 'response': {'orderID': '11295451-10b7-80db-47a0-603577b23260', 'clOrdID': 'd0ed735177cd4afc88d8026e9d2b4558', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 927, 'price': 368.85, 'displayQty': None, 'stopPx': 368.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': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 11, 19, 0, 20, 711000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 11, 19, 0, 20, 711000, tzinfo=tzutc())}} 2020-09-11 22:00:20 INFO: init new order end 2020-09-11 22:00:20 INFO: 2020-09-11 22:00:20 INFO: 2020-09-11 22:00:20 INFO: 2020-09-11 22:00:20 INFO: 2020-09-11 22:00:20 INFO: process event {'orderID': '11295451-10b7-80db-47a0-603577b23260', 'clOrdID': 'd0ed735177cd4afc88d8026e9d2b4558', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 927, 'price': 368.85, 'displayQty': None, 'stopPx': 368.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': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-09-11T19:00:20.711Z', 'timestamp': '2020-09-11T19:00:20.711Z'} 2020-09-11 22:00:20 INFO: skip event d0ed735177cd4afc88d8026e9d2b4558 New 2020-09-11 22:02:00 INFO: 2020-09-11 22:02:00 INFO: 2020-09-11 22:02:00 INFO: 2020-09-11 22:02:00 INFO: 2020-09-11 22:02:00 INFO: clearing start 2020-09-11 22:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '11295451-10b7-80db-47a0-603577b23260', 'clOrdID': 'd0ed735177cd4afc88d8026e9d2b4558', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 927, 'price': 368.85, 'displayQty': None, 'stopPx': 368.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': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 11, 19, 0, 20, 711000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 11, 19, 0, 20, 711000, tzinfo=tzutc())} 2020-09-11 22:02:00 INFO: order time=2020-09-11 19:00:20.711000+00:00; delta from now UTC=0:01:40.197552 time_delta.total_seconds()=100.197552; time_diff_offset='3600' 2020-09-11 22:02:00 INFO: skip by time diff 2020-09-11 19:00:20.711000+00:00 2020-09-11 22:02:00 INFO: clearing end 2020-09-11 22:02:00 INFO: 2020-09-11 22:02:00 INFO: 2020-09-11 22:02:00 INFO: 2020-09-11 22:02:00 INFO: 2020-09-11 22:29:13 INFO: process event {'orderID': '11295451-10b7-80db-47a0-603577b23260', 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 927, 'avgPx': 368.85, 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'transactTime': '2020-09-11T19:29:13.676Z', 'timestamp': '2020-09-11T19:29:13.676Z', 'clOrdID': 'd0ed735177cd4afc88d8026e9d2b4558', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-11 22:29:13 INFO: add new event={'uid': 'd0ed735177cd4afc88d8026e9d2b4558', 'status': 'Filled'} 2020-09-11 22:29:13 INFO: 2020-09-11 22:29:13 INFO: 2020-09-11 22:29:13 INFO: 2020-09-11 22:29:13 INFO: 2020-09-11 22:29:13 INFO: process event start 2020-09-11 22:29:13 INFO: fetch new order event d0ed735177cd4afc88d8026e9d2b4558 2020-09-11 22:29:13 INFO: fetch orders by event init={'stop': '366.75', 'take': '380.8500000000000227373675443232059478759765625', 'qty': '927', 'color': 'GREEN', 'ticker': 'ETHUSD', 'clearing_offset': '3600'} profit_pair=None 2020-09-11 22:29:13 INFO: process init order filled 2020-09-11 22:29:13 INFO: save profit orders to storage stop=629ef63cb12542d98e3c4b352a5969d9 take=c2c894f085c34a77839a54cf972060ac 2020-09-11 22:29:13 INFO: place profit orders take_price=380.8500000000000227373675443232059478759765625, stop_price=366.75, qty=927, color=GREEN, ticker=ETHUSD 629ef63cb12542d98e3c4b352a5969d9 c2c894f085c34a77839a54cf972060ac 2020-09-11 22:29:13 INFO: place stop order ETHUSD: qty=-927, stop_price=366.75, stop_uid=629ef63cb12542d98e3c4b352a5969d9 2020-09-11 22:29:14 INFO: process event {'orderID': '6934a865-7d17-c6af-7593-8eb103196516', 'clOrdID': '629ef63cb12542d98e3c4b352a5969d9', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 927, 'price': None, 'displayQty': None, 'stopPx': 366.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': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': '2020-09-11T19:29:14.074Z', 'timestamp': '2020-09-11T19:29:14.074Z'} 2020-09-11 22:29:14 INFO: skip event 629ef63cb12542d98e3c4b352a5969d9 New 2020-09-11 22:29:14 INFO: exchange resp for stop order={'orderID': '6934a865-7d17-c6af-7593-8eb103196516', 'clOrdID': '629ef63cb12542d98e3c4b352a5969d9', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 927, 'price': None, 'displayQty': None, 'stopPx': 366.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': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 11, 19, 29, 14, 74000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 11, 19, 29, 14, 74000, tzinfo=tzutc())} 2020-09-11 22:29:14 INFO: place limit order ETHUSD: qty=-927, price=380.8500000000000227373675443232059478759765625, take_uid=c2c894f085c34a77839a54cf972060ac 2020-09-11 22:29:14 INFO: process event {'orderID': '32a44ee3-4e27-4921-79c9-2a379b160153', 'clOrdID': 'c2c894f085c34a77839a54cf972060ac', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 927, 'price': 380.85, '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': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': '2020-09-11T19:29:14.140Z', 'timestamp': '2020-09-11T19:29:14.140Z'} 2020-09-11 22:29:14 INFO: skip event c2c894f085c34a77839a54cf972060ac New 2020-09-11 22:29:14 INFO: exchange resp for take profit order={'orderID': '32a44ee3-4e27-4921-79c9-2a379b160153', 'clOrdID': 'c2c894f085c34a77839a54cf972060ac', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 927, 'price': 380.85, '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': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 11, 19, 29, 14, 140000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 11, 19, 29, 14, 140000, tzinfo=tzutc())} 2020-09-11 22:29:14 INFO: place profit orders={'stop': {'response': {'orderID': '6934a865-7d17-c6af-7593-8eb103196516', 'clOrdID': '629ef63cb12542d98e3c4b352a5969d9', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 927, 'price': None, 'displayQty': None, 'stopPx': 366.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': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 11, 19, 29, 14, 74000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 11, 19, 29, 14, 74000, tzinfo=tzutc())}, 'qty': Decimal('-927'), 'uid': '629ef63cb12542d98e3c4b352a5969d9', 'price': Decimal('366.75')}, 'take': {'response': {'orderID': '32a44ee3-4e27-4921-79c9-2a379b160153', 'clOrdID': 'c2c894f085c34a77839a54cf972060ac', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 927, 'price': 380.85, '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': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 11, 19, 29, 14, 140000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 11, 19, 29, 14, 140000, tzinfo=tzutc())}, 'qty': Decimal('-927'), 'uid': 'c2c894f085c34a77839a54cf972060ac', 'price': Decimal('380.8500000000000227373675443232059478759765625')}} 2020-09-11 22:29:14 INFO: rm init order from db d0ed735177cd4afc88d8026e9d2b4558 2020-09-11 22:29:14 INFO: end process event_processing_result='proceed init order' 2020-09-11 22:29:14 INFO: 2020-09-11 22:29:14 INFO: 2020-09-11 22:29:14 INFO: 2020-09-11 22:29:14 INFO: 2020-09-11 23:00:20 INFO: 2020-09-11 23:00:20 INFO: 2020-09-11 23:00:20 INFO: 2020-09-11 23:00:20 INFO: 2020-09-11 23:00:20 INFO: init new order start 2020-09-11 23:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 11, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.45, 'high': 370.15, 'low': 366.2, 'close': 368.95, 'trades': 2445, 'volume': 1731836, 'vwap': 368.85, 'lastSize': 400, 'turnover': 63877617625, 'homeNotional': 17889.142907280508, 'foreignNotional': 6598315.713980317}, {'timestamp': datetime.datetime(2020, 9, 11, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.15, 'high': 368.75, 'low': 366.75, 'close': 368.45, 'trades': 2204, 'volume': 1308128, 'vwap': 367.76, 'lastSize': 12, 'turnover': 48106784475, 'homeNotional': 13492.756406150751, 'foreignNotional': 4962003.155712599}, {'timestamp': datetime.datetime(2020, 9, 11, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.85, 'high': 368.4, 'low': 365.15, 'close': 367.15, 'trades': 3232, 'volume': 2381642, 'vwap': 366.65, 'lastSize': 9270, 'turnover': 87322864725, 'homeNotional': 24502.61555783394, 'foreignNotional': 8983896.256792381}] 2020-09-11 23:00:20 INFO: prepare candles [CandleItem(low=366.2, high=370.15, open=368.45, close=368.95, color='GREEN'), CandleItem(low=366.75, high=368.75, open=367.15, close=368.45, color='GREEN'), CandleItem(low=365.15, high=368.4, open=367.85, close=367.15, color='RED')] 2020-09-11 23:00:20 INFO: skip by colors first_candle=CandleItem(low=365.15, high=368.4, open=367.85, close=367.15, color='RED') second_candle=CandleItem(low=366.75, high=368.75, open=367.15, close=368.45, color='GREEN') last_candle=CandleItem(low=366.2, high=370.15, open=368.45, close=368.95, color='GREEN') 2020-09-11 23:00:20 INFO: check need new order None 2020-09-11 23:00:20 INFO: init new order end 2020-09-11 23:00:20 INFO: 2020-09-11 23:00:20 INFO: 2020-09-11 23:00:20 INFO: 2020-09-11 23:00:20 INFO: 2020-09-11 23:02:00 INFO: 2020-09-11 23:02:00 INFO: 2020-09-11 23:02:00 INFO: 2020-09-11 23:02:00 INFO: 2020-09-11 23:02:00 INFO: clearing start 2020-09-11 23:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '6934a865-7d17-c6af-7593-8eb103196516', 'clOrdID': '629ef63cb12542d98e3c4b352a5969d9', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 927, 'price': None, 'displayQty': None, 'stopPx': 366.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': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 11, 19, 29, 14, 74000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 11, 19, 29, 14, 74000, tzinfo=tzutc())} 2020-09-11 23:02:00 INFO: skip by not found init order into storage 2020-09-11 23:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '32a44ee3-4e27-4921-79c9-2a379b160153', 'clOrdID': 'c2c894f085c34a77839a54cf972060ac', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 927, 'price': 380.85, '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': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 11, 19, 29, 14, 140000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 11, 19, 29, 14, 140000, tzinfo=tzutc())} 2020-09-11 23:02:00 INFO: skip by not found init order into storage 2020-09-11 23:02:00 INFO: clearing end 2020-09-11 23:02:00 INFO: 2020-09-11 23:02:00 INFO: 2020-09-11 23:02:00 INFO: 2020-09-11 23:02:00 INFO: 2020-09-12 00:00:20 INFO: 2020-09-12 00:00:20 INFO: 2020-09-12 00:00:20 INFO: 2020-09-12 00:00:20 INFO: 2020-09-12 00:00:20 INFO: init new order start 2020-09-12 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 11, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.95, 'high': 370.9, 'low': 368.35, 'close': 369.1, 'trades': 2488, 'volume': 1460265, 'vwap': 369.55, 'lastSize': 21, 'turnover': 53962807030, 'homeNotional': 15075.974363823141, 'foreignNotional': 5571197.1334945895}, {'timestamp': datetime.datetime(2020, 9, 11, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.45, 'high': 370.15, 'low': 366.2, 'close': 368.95, 'trades': 2445, 'volume': 1731836, 'vwap': 368.85, 'lastSize': 400, 'turnover': 63877617625, 'homeNotional': 17889.142907280508, 'foreignNotional': 6598315.713980317}, {'timestamp': datetime.datetime(2020, 9, 11, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.15, 'high': 368.75, 'low': 366.75, 'close': 368.45, 'trades': 2204, 'volume': 1308128, 'vwap': 367.76, 'lastSize': 12, 'turnover': 48106784475, 'homeNotional': 13492.756406150751, 'foreignNotional': 4962003.155712599}] 2020-09-12 00:00:20 INFO: prepare candles [CandleItem(low=368.35, high=370.9, open=368.95, close=369.1, color='GREEN'), CandleItem(low=366.2, high=370.15, open=368.45, close=368.95, color='GREEN'), CandleItem(low=366.75, high=368.75, open=367.15, close=368.45, color='GREEN')] 2020-09-12 00:00:20 INFO: skip by colors first_candle=CandleItem(low=366.75, high=368.75, open=367.15, close=368.45, color='GREEN') second_candle=CandleItem(low=366.2, high=370.15, open=368.45, close=368.95, color='GREEN') last_candle=CandleItem(low=368.35, high=370.9, open=368.95, close=369.1, color='GREEN') 2020-09-12 00:00:20 INFO: check need new order None 2020-09-12 00:00:20 INFO: init new order end 2020-09-12 00:00:20 INFO: 2020-09-12 00:00:20 INFO: 2020-09-12 00:00:20 INFO: 2020-09-12 00:00:20 INFO: 2020-09-12 00:02:00 INFO: 2020-09-12 00:02:00 INFO: 2020-09-12 00:02:00 INFO: 2020-09-12 00:02:00 INFO: 2020-09-12 00:02:00 INFO: clearing start 2020-09-12 00:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '6934a865-7d17-c6af-7593-8eb103196516', 'clOrdID': '629ef63cb12542d98e3c4b352a5969d9', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 927, 'price': None, 'displayQty': None, 'stopPx': 366.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': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 11, 19, 29, 14, 74000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 11, 19, 29, 14, 74000, tzinfo=tzutc())} 2020-09-12 00:02:00 INFO: skip by not found init order into storage 2020-09-12 00:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '32a44ee3-4e27-4921-79c9-2a379b160153', 'clOrdID': 'c2c894f085c34a77839a54cf972060ac', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 927, 'price': 380.85, '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': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 11, 19, 29, 14, 140000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 11, 19, 29, 14, 140000, tzinfo=tzutc())} 2020-09-12 00:02:00 INFO: skip by not found init order into storage 2020-09-12 00:02:00 INFO: clearing end 2020-09-12 00:02:00 INFO: 2020-09-12 00:02:00 INFO: 2020-09-12 00:02:00 INFO: 2020-09-12 00:02:00 INFO: 2020-09-12 01:00:20 INFO: 2020-09-12 01:00:20 INFO: 2020-09-12 01:00:20 INFO: 2020-09-12 01:00:20 INFO: 2020-09-12 01:00:20 INFO: init new order start 2020-09-12 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 11, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 369.1, 'high': 371.05, 'low': 368.95, 'close': 370.55, 'trades': 1649, 'volume': 932901, 'vwap': 369.92, 'lastSize': 6, 'turnover': 34509286455, 'homeNotional': 9642.125769166178, 'foreignNotional': 3566756.9603745462}, {'timestamp': datetime.datetime(2020, 9, 11, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.95, 'high': 370.9, 'low': 368.35, 'close': 369.1, 'trades': 2488, 'volume': 1460265, 'vwap': 369.55, 'lastSize': 21, 'turnover': 53962807030, 'homeNotional': 15075.974363823141, 'foreignNotional': 5571197.1334945895}, {'timestamp': datetime.datetime(2020, 9, 11, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.45, 'high': 370.15, 'low': 366.2, 'close': 368.95, 'trades': 2445, 'volume': 1731836, 'vwap': 368.85, 'lastSize': 400, 'turnover': 63877617625, 'homeNotional': 17889.142907280508, 'foreignNotional': 6598315.713980317}] 2020-09-12 01:00:20 INFO: prepare candles [CandleItem(low=368.95, high=371.05, open=369.1, close=370.55, color='GREEN'), CandleItem(low=368.35, high=370.9, open=368.95, close=369.1, color='GREEN'), CandleItem(low=366.2, high=370.15, open=368.45, close=368.95, color='GREEN')] 2020-09-12 01:00:20 INFO: skip by colors first_candle=CandleItem(low=366.2, high=370.15, open=368.45, close=368.95, color='GREEN') second_candle=CandleItem(low=368.35, high=370.9, open=368.95, close=369.1, color='GREEN') last_candle=CandleItem(low=368.95, high=371.05, open=369.1, close=370.55, color='GREEN') 2020-09-12 01:00:20 INFO: check need new order None 2020-09-12 01:00:20 INFO: init new order end 2020-09-12 01:00:20 INFO: 2020-09-12 01:00:20 INFO: 2020-09-12 01:00:20 INFO: 2020-09-12 01:00:20 INFO: 2020-09-12 01:02:00 INFO: 2020-09-12 01:02:00 INFO: 2020-09-12 01:02:00 INFO: 2020-09-12 01:02:00 INFO: 2020-09-12 01:02:00 INFO: clearing start 2020-09-12 01:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '6934a865-7d17-c6af-7593-8eb103196516', 'clOrdID': '629ef63cb12542d98e3c4b352a5969d9', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 927, 'price': None, 'displayQty': None, 'stopPx': 366.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': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 11, 19, 29, 14, 74000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 11, 19, 29, 14, 74000, tzinfo=tzutc())} 2020-09-12 01:02:00 INFO: skip by not found init order into storage 2020-09-12 01:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '32a44ee3-4e27-4921-79c9-2a379b160153', 'clOrdID': 'c2c894f085c34a77839a54cf972060ac', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 927, 'price': 380.85, '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': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 11, 19, 29, 14, 140000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 11, 19, 29, 14, 140000, tzinfo=tzutc())} 2020-09-12 01:02:00 INFO: skip by not found init order into storage 2020-09-12 01:02:00 INFO: clearing end 2020-09-12 01:02:00 INFO: 2020-09-12 01:02:00 INFO: 2020-09-12 01:02:00 INFO: 2020-09-12 01:02:00 INFO: 2020-09-12 02:00:20 INFO: 2020-09-12 02:00:20 INFO: 2020-09-12 02:00:20 INFO: 2020-09-12 02:00:20 INFO: 2020-09-12 02:00:20 INFO: init new order start 2020-09-12 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 11, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 370.55, 'high': 376.2, 'low': 370.5, 'close': 374.25, 'trades': 6573, 'volume': 4469832, 'vwap': 373.92, 'lastSize': 40, 'turnover': 167133299150, 'homeNotional': 46394.75469214607, 'foreignNotional': 17347705.62000552}, {'timestamp': datetime.datetime(2020, 9, 11, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 369.1, 'high': 371.05, 'low': 368.95, 'close': 370.55, 'trades': 1649, 'volume': 932901, 'vwap': 369.92, 'lastSize': 6, 'turnover': 34509286455, 'homeNotional': 9642.125769166178, 'foreignNotional': 3566756.9603745462}, {'timestamp': datetime.datetime(2020, 9, 11, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.95, 'high': 370.9, 'low': 368.35, 'close': 369.1, 'trades': 2488, 'volume': 1460265, 'vwap': 369.55, 'lastSize': 21, 'turnover': 53962807030, 'homeNotional': 15075.974363823141, 'foreignNotional': 5571197.1334945895}] 2020-09-12 02:00:20 INFO: prepare candles [CandleItem(low=370.5, high=376.2, open=370.55, close=374.25, color='GREEN'), CandleItem(low=368.95, high=371.05, open=369.1, close=370.55, color='GREEN'), CandleItem(low=368.35, high=370.9, open=368.95, close=369.1, color='GREEN')] 2020-09-12 02:00:20 INFO: skip by colors first_candle=CandleItem(low=368.35, high=370.9, open=368.95, close=369.1, color='GREEN') second_candle=CandleItem(low=368.95, high=371.05, open=369.1, close=370.55, color='GREEN') last_candle=CandleItem(low=370.5, high=376.2, open=370.55, close=374.25, color='GREEN') 2020-09-12 02:00:20 INFO: check need new order None 2020-09-12 02:00:20 INFO: init new order end 2020-09-12 02:00:20 INFO: 2020-09-12 02:00:20 INFO: 2020-09-12 02:00:20 INFO: 2020-09-12 02:00:20 INFO: 2020-09-12 02:02:00 INFO: 2020-09-12 02:02:00 INFO: 2020-09-12 02:02:00 INFO: 2020-09-12 02:02:00 INFO: 2020-09-12 02:02:00 INFO: clearing start 2020-09-12 02:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '6934a865-7d17-c6af-7593-8eb103196516', 'clOrdID': '629ef63cb12542d98e3c4b352a5969d9', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 927, 'price': None, 'displayQty': None, 'stopPx': 366.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': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 11, 19, 29, 14, 74000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 11, 19, 29, 14, 74000, tzinfo=tzutc())} 2020-09-12 02:02:00 INFO: skip by not found init order into storage 2020-09-12 02:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '32a44ee3-4e27-4921-79c9-2a379b160153', 'clOrdID': 'c2c894f085c34a77839a54cf972060ac', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 927, 'price': 380.85, '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': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 11, 19, 29, 14, 140000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 11, 19, 29, 14, 140000, tzinfo=tzutc())} 2020-09-12 02:02:00 INFO: skip by not found init order into storage 2020-09-12 02:02:00 INFO: clearing end 2020-09-12 02:02:00 INFO: 2020-09-12 02:02:00 INFO: 2020-09-12 02:02:00 INFO: 2020-09-12 02:02:00 INFO: 2020-09-12 03:00:20 INFO: 2020-09-12 03:00:20 INFO: 2020-09-12 03:00:20 INFO: 2020-09-12 03:00:20 INFO: 2020-09-12 03:00:20 INFO: init new order start 2020-09-12 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 12, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 374.25, 'high': 375.4, 'low': 372.55, 'close': 374.45, 'trades': 3084, 'volume': 2835160, 'vwap': 374.09, 'lastSize': 40, 'turnover': 106058567690, 'homeNotional': 29423.45436940661, 'foreignNotional': 11006838.125867836}, {'timestamp': datetime.datetime(2020, 9, 11, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 370.55, 'high': 376.2, 'low': 370.5, 'close': 374.25, 'trades': 6573, 'volume': 4469832, 'vwap': 373.92, 'lastSize': 40, 'turnover': 167133299150, 'homeNotional': 46394.75469214607, 'foreignNotional': 17347705.62000552}, {'timestamp': datetime.datetime(2020, 9, 11, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 369.1, 'high': 371.05, 'low': 368.95, 'close': 370.55, 'trades': 1649, 'volume': 932901, 'vwap': 369.92, 'lastSize': 6, 'turnover': 34509286455, 'homeNotional': 9642.125769166178, 'foreignNotional': 3566756.9603745462}] 2020-09-12 03:00:20 INFO: prepare candles [CandleItem(low=372.55, high=375.4, open=374.25, close=374.45, color='GREEN'), CandleItem(low=370.5, high=376.2, open=370.55, close=374.25, color='GREEN'), CandleItem(low=368.95, high=371.05, open=369.1, close=370.55, color='GREEN')] 2020-09-12 03:00:20 INFO: skip by colors first_candle=CandleItem(low=368.95, high=371.05, open=369.1, close=370.55, color='GREEN') second_candle=CandleItem(low=370.5, high=376.2, open=370.55, close=374.25, color='GREEN') last_candle=CandleItem(low=372.55, high=375.4, open=374.25, close=374.45, color='GREEN') 2020-09-12 03:00:20 INFO: check need new order None 2020-09-12 03:00:20 INFO: init new order end 2020-09-12 03:00:20 INFO: 2020-09-12 03:00:20 INFO: 2020-09-12 03:00:20 INFO: 2020-09-12 03:00:20 INFO: 2020-09-12 03:02:00 INFO: 2020-09-12 03:02:00 INFO: 2020-09-12 03:02:00 INFO: 2020-09-12 03:02:00 INFO: 2020-09-12 03:02:00 INFO: clearing start 2020-09-12 03:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '6934a865-7d17-c6af-7593-8eb103196516', 'clOrdID': '629ef63cb12542d98e3c4b352a5969d9', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 927, 'price': None, 'displayQty': None, 'stopPx': 366.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': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 11, 19, 29, 14, 74000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 11, 19, 29, 14, 74000, tzinfo=tzutc())} 2020-09-12 03:02:00 INFO: skip by not found init order into storage 2020-09-12 03:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '32a44ee3-4e27-4921-79c9-2a379b160153', 'clOrdID': 'c2c894f085c34a77839a54cf972060ac', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 927, 'price': 380.85, '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': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 11, 19, 29, 14, 140000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 11, 19, 29, 14, 140000, tzinfo=tzutc())} 2020-09-12 03:02:00 INFO: skip by not found init order into storage 2020-09-12 03:02:00 INFO: clearing end 2020-09-12 03:02:00 INFO: 2020-09-12 03:02:00 INFO: 2020-09-12 03:02:00 INFO: 2020-09-12 03:02:00 INFO: 2020-09-12 04:00:20 INFO: 2020-09-12 04:00:20 INFO: 2020-09-12 04:00:20 INFO: 2020-09-12 04:00:20 INFO: 2020-09-12 04:00:20 INFO: init new order start 2020-09-12 04:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 12, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 374.45, 'high': 375.1, 'low': 370.2, 'close': 371.6, 'trades': 3248, 'volume': 2395606, 'vwap': 372.46, 'lastSize': 1, 'turnover': 89224441110, 'homeNotional': 24838.177534879258, 'foreignNotional': 9251051.108452078}, {'timestamp': datetime.datetime(2020, 9, 12, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 374.25, 'high': 375.4, 'low': 372.55, 'close': 374.45, 'trades': 3084, 'volume': 2835160, 'vwap': 374.09, 'lastSize': 40, 'turnover': 106058567690, 'homeNotional': 29423.45436940661, 'foreignNotional': 11006838.125867836}, {'timestamp': datetime.datetime(2020, 9, 11, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 370.55, 'high': 376.2, 'low': 370.5, 'close': 374.25, 'trades': 6573, 'volume': 4469832, 'vwap': 373.92, 'lastSize': 40, 'turnover': 167133299150, 'homeNotional': 46394.75469214607, 'foreignNotional': 17347705.62000552}] 2020-09-12 04:00:21 INFO: prepare candles [CandleItem(low=370.2, high=375.1, open=374.45, close=371.6, color='RED'), CandleItem(low=372.55, high=375.4, open=374.25, close=374.45, color='GREEN'), CandleItem(low=370.5, high=376.2, open=370.55, close=374.25, color='GREEN')] 2020-09-12 04:00:21 INFO: last_candle=CandleItem(low=370.2, high=375.1, open=374.45, close=371.6, color='RED') 2020-09-12 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-12 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=370.2, high=375.1, open=374.45, close=371.6, color='RED') 2020-09-12 04:00:21 INFO: skip by CandleItem(low=370.2, high=375.1, open=374.45, close=371.6, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-12 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-12 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=370.2, high=375.1, open=374.45, close=371.6, color='RED') 2020-09-12 04:00:21 INFO: skip by CandleItem(low=370.2, high=375.1, open=374.45, close=371.6, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-12 04:00:21 INFO: not found applicable config for candle 2020-09-12 04:00:21 INFO: check need new order None 2020-09-12 04:00:21 INFO: init new order end 2020-09-12 04:00:21 INFO: 2020-09-12 04:00:21 INFO: 2020-09-12 04:00:21 INFO: 2020-09-12 04:00:21 INFO: 2020-09-12 04:02:00 INFO: 2020-09-12 04:02:00 INFO: 2020-09-12 04:02:00 INFO: 2020-09-12 04:02:00 INFO: 2020-09-12 04:02:00 INFO: clearing start 2020-09-12 04:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '6934a865-7d17-c6af-7593-8eb103196516', 'clOrdID': '629ef63cb12542d98e3c4b352a5969d9', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 927, 'price': None, 'displayQty': None, 'stopPx': 366.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': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 11, 19, 29, 14, 74000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 11, 19, 29, 14, 74000, tzinfo=tzutc())} 2020-09-12 04:02:00 INFO: skip by not found init order into storage 2020-09-12 04:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '32a44ee3-4e27-4921-79c9-2a379b160153', 'clOrdID': 'c2c894f085c34a77839a54cf972060ac', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 927, 'price': 380.85, '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': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 11, 19, 29, 14, 140000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 11, 19, 29, 14, 140000, tzinfo=tzutc())} 2020-09-12 04:02:00 INFO: skip by not found init order into storage 2020-09-12 04:02:00 INFO: clearing end 2020-09-12 04:02:00 INFO: 2020-09-12 04:02:00 INFO: 2020-09-12 04:02:00 INFO: 2020-09-12 04:02:00 INFO: 2020-09-12 05:00:20 INFO: 2020-09-12 05:00:20 INFO: 2020-09-12 05:00:20 INFO: 2020-09-12 05:00:20 INFO: 2020-09-12 05:00:20 INFO: init new order start 2020-09-12 05:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 12, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 371.6, 'high': 373.75, 'low': 371.6, 'close': 373.4, 'trades': 2240, 'volume': 1740423, 'vwap': 372.6, 'lastSize': 96, 'turnover': 64846616445, 'homeNotional': 18045.508368509458, 'foreignNotional': 6723601.2025944665}, {'timestamp': datetime.datetime(2020, 9, 12, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 374.45, 'high': 375.1, 'low': 370.2, 'close': 371.6, 'trades': 3248, 'volume': 2395606, 'vwap': 372.46, 'lastSize': 1, 'turnover': 89224441110, 'homeNotional': 24838.177534879258, 'foreignNotional': 9251051.108452078}, {'timestamp': datetime.datetime(2020, 9, 12, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 374.25, 'high': 375.4, 'low': 372.55, 'close': 374.45, 'trades': 3084, 'volume': 2835160, 'vwap': 374.09, 'lastSize': 40, 'turnover': 106058567690, 'homeNotional': 29423.45436940661, 'foreignNotional': 11006838.125867836}] 2020-09-12 05:00:20 INFO: prepare candles [CandleItem(low=371.6, high=373.75, open=371.6, close=373.4, color='GREEN'), CandleItem(low=370.2, high=375.1, open=374.45, close=371.6, color='RED'), CandleItem(low=372.55, high=375.4, open=374.25, close=374.45, color='GREEN')] 2020-09-12 05:00:20 INFO: skip by colors first_candle=CandleItem(low=372.55, high=375.4, open=374.25, close=374.45, color='GREEN') second_candle=CandleItem(low=370.2, high=375.1, open=374.45, close=371.6, color='RED') last_candle=CandleItem(low=371.6, high=373.75, open=371.6, close=373.4, color='GREEN') 2020-09-12 05:00:20 INFO: check need new order None 2020-09-12 05:00:20 INFO: init new order end 2020-09-12 05:00:20 INFO: 2020-09-12 05:00:20 INFO: 2020-09-12 05:00:20 INFO: 2020-09-12 05:00:20 INFO: 2020-09-12 05:02:00 INFO: 2020-09-12 05:02:00 INFO: 2020-09-12 05:02:00 INFO: 2020-09-12 05:02:00 INFO: 2020-09-12 05:02:00 INFO: clearing start 2020-09-12 05:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '6934a865-7d17-c6af-7593-8eb103196516', 'clOrdID': '629ef63cb12542d98e3c4b352a5969d9', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 927, 'price': None, 'displayQty': None, 'stopPx': 366.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': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 11, 19, 29, 14, 74000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 11, 19, 29, 14, 74000, tzinfo=tzutc())} 2020-09-12 05:02:00 INFO: skip by not found init order into storage 2020-09-12 05:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '32a44ee3-4e27-4921-79c9-2a379b160153', 'clOrdID': 'c2c894f085c34a77839a54cf972060ac', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 927, 'price': 380.85, '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': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 11, 19, 29, 14, 140000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 11, 19, 29, 14, 140000, tzinfo=tzutc())} 2020-09-12 05:02:00 INFO: skip by not found init order into storage 2020-09-12 05:02:00 INFO: clearing end 2020-09-12 05:02:00 INFO: 2020-09-12 05:02:00 INFO: 2020-09-12 05:02:00 INFO: 2020-09-12 05:02:00 INFO: 2020-09-12 06:00:20 INFO: 2020-09-12 06:00:20 INFO: 2020-09-12 06:00:20 INFO: 2020-09-12 06:00:20 INFO: 2020-09-12 06:00:20 INFO: init new order start 2020-09-12 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 12, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 373.4, 'high': 373.45, 'low': 368.0, 'close': 369.55, 'trades': 3369, 'volume': 2480795, 'vwap': 370.28, 'lastSize': 11, 'turnover': 91856710070, 'homeNotional': 25674.152735607022, 'foreignNotional': 9506441.146466337}, {'timestamp': datetime.datetime(2020, 9, 12, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 371.6, 'high': 373.75, 'low': 371.6, 'close': 373.4, 'trades': 2240, 'volume': 1740423, 'vwap': 372.6, 'lastSize': 96, 'turnover': 64846616445, 'homeNotional': 18045.508368509458, 'foreignNotional': 6723601.2025944665}, {'timestamp': datetime.datetime(2020, 9, 12, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 374.45, 'high': 375.1, 'low': 370.2, 'close': 371.6, 'trades': 3248, 'volume': 2395606, 'vwap': 372.46, 'lastSize': 1, 'turnover': 89224441110, 'homeNotional': 24838.177534879258, 'foreignNotional': 9251051.108452078}] 2020-09-12 06:00:20 INFO: prepare candles [CandleItem(low=368.0, high=373.45, open=373.4, close=369.55, color='RED'), CandleItem(low=371.6, high=373.75, open=371.6, close=373.4, color='GREEN'), CandleItem(low=370.2, high=375.1, open=374.45, close=371.6, color='RED')] 2020-09-12 06:00:20 INFO: skip by colors first_candle=CandleItem(low=370.2, high=375.1, open=374.45, close=371.6, color='RED') second_candle=CandleItem(low=371.6, high=373.75, open=371.6, close=373.4, color='GREEN') last_candle=CandleItem(low=368.0, high=373.45, open=373.4, close=369.55, color='RED') 2020-09-12 06:00:20 INFO: check need new order None 2020-09-12 06:00:20 INFO: init new order end 2020-09-12 06:00:20 INFO: 2020-09-12 06:00:20 INFO: 2020-09-12 06:00:20 INFO: 2020-09-12 06:00:20 INFO: 2020-09-12 06:02:00 INFO: 2020-09-12 06:02:00 INFO: 2020-09-12 06:02:00 INFO: 2020-09-12 06:02:00 INFO: 2020-09-12 06:02:00 INFO: clearing start 2020-09-12 06:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '6934a865-7d17-c6af-7593-8eb103196516', 'clOrdID': '629ef63cb12542d98e3c4b352a5969d9', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 927, 'price': None, 'displayQty': None, 'stopPx': 366.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': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 11, 19, 29, 14, 74000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 11, 19, 29, 14, 74000, tzinfo=tzutc())} 2020-09-12 06:02:00 INFO: skip by not found init order into storage 2020-09-12 06:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '32a44ee3-4e27-4921-79c9-2a379b160153', 'clOrdID': 'c2c894f085c34a77839a54cf972060ac', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 927, 'price': 380.85, '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': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 11, 19, 29, 14, 140000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 11, 19, 29, 14, 140000, tzinfo=tzutc())} 2020-09-12 06:02:00 INFO: skip by not found init order into storage 2020-09-12 06:02:00 INFO: clearing end 2020-09-12 06:02:00 INFO: 2020-09-12 06:02:00 INFO: 2020-09-12 06:02:00 INFO: 2020-09-12 06:02:00 INFO: 2020-09-12 07:00:20 INFO: 2020-09-12 07:00:20 INFO: 2020-09-12 07:00:20 INFO: 2020-09-12 07:00:20 INFO: 2020-09-12 07:00:20 INFO: init new order start 2020-09-12 07:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 12, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 369.55, 'high': 370.95, 'low': 369.1, 'close': 370.0, 'trades': 1868, 'volume': 1659989, 'vwap': 370.15, 'lastSize': 41, 'turnover': 61443216435, 'homeNotional': 17179.1892623191, 'foreignNotional': 6358747.687015363}, {'timestamp': datetime.datetime(2020, 9, 12, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 373.4, 'high': 373.45, 'low': 368.0, 'close': 369.55, 'trades': 3369, 'volume': 2480795, 'vwap': 370.28, 'lastSize': 11, 'turnover': 91856710070, 'homeNotional': 25674.152735607022, 'foreignNotional': 9506441.146466337}, {'timestamp': datetime.datetime(2020, 9, 12, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 371.6, 'high': 373.75, 'low': 371.6, 'close': 373.4, 'trades': 2240, 'volume': 1740423, 'vwap': 372.6, 'lastSize': 96, 'turnover': 64846616445, 'homeNotional': 18045.508368509458, 'foreignNotional': 6723601.2025944665}] 2020-09-12 07:00:20 INFO: prepare candles [CandleItem(low=369.1, high=370.95, open=369.55, close=370.0, color='GREEN'), CandleItem(low=368.0, high=373.45, open=373.4, close=369.55, color='RED'), CandleItem(low=371.6, high=373.75, open=371.6, close=373.4, color='GREEN')] 2020-09-12 07:00:20 INFO: skip by colors first_candle=CandleItem(low=371.6, high=373.75, open=371.6, close=373.4, color='GREEN') second_candle=CandleItem(low=368.0, high=373.45, open=373.4, close=369.55, color='RED') last_candle=CandleItem(low=369.1, high=370.95, open=369.55, close=370.0, color='GREEN') 2020-09-12 07:00:20 INFO: check need new order None 2020-09-12 07:00:20 INFO: init new order end 2020-09-12 07:00:20 INFO: 2020-09-12 07:00:20 INFO: 2020-09-12 07:00:20 INFO: 2020-09-12 07:00:20 INFO: 2020-09-12 07:02:00 INFO: 2020-09-12 07:02:00 INFO: 2020-09-12 07:02:00 INFO: 2020-09-12 07:02:00 INFO: 2020-09-12 07:02:00 INFO: clearing start 2020-09-12 07:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '6934a865-7d17-c6af-7593-8eb103196516', 'clOrdID': '629ef63cb12542d98e3c4b352a5969d9', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 927, 'price': None, 'displayQty': None, 'stopPx': 366.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': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 11, 19, 29, 14, 74000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 11, 19, 29, 14, 74000, tzinfo=tzutc())} 2020-09-12 07:02:00 INFO: skip by not found init order into storage 2020-09-12 07:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '32a44ee3-4e27-4921-79c9-2a379b160153', 'clOrdID': 'c2c894f085c34a77839a54cf972060ac', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 927, 'price': 380.85, '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': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 11, 19, 29, 14, 140000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 11, 19, 29, 14, 140000, tzinfo=tzutc())} 2020-09-12 07:02:00 INFO: skip by not found init order into storage 2020-09-12 07:02:00 INFO: clearing end 2020-09-12 07:02:00 INFO: 2020-09-12 07:02:00 INFO: 2020-09-12 07:02:00 INFO: 2020-09-12 07:02:00 INFO: 2020-09-12 08:00:20 INFO: 2020-09-12 08:00:20 INFO: 2020-09-12 08:00:20 INFO: 2020-09-12 08:00:20 INFO: 2020-09-12 08:00:20 INFO: init new order start 2020-09-12 08:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 12, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 370.0, 'high': 371.5, 'low': 369.3, 'close': 371.2, 'trades': 1425, 'volume': 1064251, 'vwap': 370.74, 'lastSize': 500, 'turnover': 39455426680, 'homeNotional': 11025.730265423967, 'foreignNotional': 4087619.071219909}, {'timestamp': datetime.datetime(2020, 9, 12, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 369.55, 'high': 370.95, 'low': 369.1, 'close': 370.0, 'trades': 1868, 'volume': 1659989, 'vwap': 370.15, 'lastSize': 41, 'turnover': 61443216435, 'homeNotional': 17179.1892623191, 'foreignNotional': 6358747.687015363}, {'timestamp': datetime.datetime(2020, 9, 12, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 373.4, 'high': 373.45, 'low': 368.0, 'close': 369.55, 'trades': 3369, 'volume': 2480795, 'vwap': 370.28, 'lastSize': 11, 'turnover': 91856710070, 'homeNotional': 25674.152735607022, 'foreignNotional': 9506441.146466337}] 2020-09-12 08:00:21 INFO: prepare candles [CandleItem(low=369.3, high=371.5, open=370.0, close=371.2, color='GREEN'), CandleItem(low=369.1, high=370.95, open=369.55, close=370.0, color='GREEN'), CandleItem(low=368.0, high=373.45, open=373.4, close=369.55, color='RED')] 2020-09-12 08:00:21 INFO: skip by colors first_candle=CandleItem(low=368.0, high=373.45, open=373.4, close=369.55, color='RED') second_candle=CandleItem(low=369.1, high=370.95, open=369.55, close=370.0, color='GREEN') last_candle=CandleItem(low=369.3, high=371.5, open=370.0, close=371.2, color='GREEN') 2020-09-12 08:00:21 INFO: check need new order None 2020-09-12 08:00:21 INFO: init new order end 2020-09-12 08:00:21 INFO: 2020-09-12 08:00:21 INFO: 2020-09-12 08:00:21 INFO: 2020-09-12 08:00:21 INFO: 2020-09-12 08:02:00 INFO: 2020-09-12 08:02:00 INFO: 2020-09-12 08:02:00 INFO: 2020-09-12 08:02:00 INFO: 2020-09-12 08:02:00 INFO: clearing start 2020-09-12 08:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '6934a865-7d17-c6af-7593-8eb103196516', 'clOrdID': '629ef63cb12542d98e3c4b352a5969d9', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 927, 'price': None, 'displayQty': None, 'stopPx': 366.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': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 11, 19, 29, 14, 74000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 11, 19, 29, 14, 74000, tzinfo=tzutc())} 2020-09-12 08:02:00 INFO: skip by not found init order into storage 2020-09-12 08:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '32a44ee3-4e27-4921-79c9-2a379b160153', 'clOrdID': 'c2c894f085c34a77839a54cf972060ac', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 927, 'price': 380.85, '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': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 11, 19, 29, 14, 140000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 11, 19, 29, 14, 140000, tzinfo=tzutc())} 2020-09-12 08:02:00 INFO: skip by not found init order into storage 2020-09-12 08:02:00 INFO: clearing end 2020-09-12 08:02:00 INFO: 2020-09-12 08:02:00 INFO: 2020-09-12 08:02:00 INFO: 2020-09-12 08:02:00 INFO: 2020-09-12 09:00:20 INFO: 2020-09-12 09:00:20 INFO: 2020-09-12 09:00:20 INFO: 2020-09-12 09:00:20 INFO: 2020-09-12 09:00:20 INFO: init new order start 2020-09-12 09:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 12, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 371.2, 'high': 372.6, 'low': 370.85, 'close': 371.25, 'trades': 1669, 'volume': 1286766, 'vwap': 371.65, 'lastSize': 45, 'turnover': 47822650960, 'homeNotional': 13342.499033595668, 'foreignNotional': 4958739.424644162}, {'timestamp': datetime.datetime(2020, 9, 12, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 370.0, 'high': 371.5, 'low': 369.3, 'close': 371.2, 'trades': 1425, 'volume': 1064251, 'vwap': 370.74, 'lastSize': 500, 'turnover': 39455426680, 'homeNotional': 11025.730265423967, 'foreignNotional': 4087619.071219909}, {'timestamp': datetime.datetime(2020, 9, 12, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 369.55, 'high': 370.95, 'low': 369.1, 'close': 370.0, 'trades': 1868, 'volume': 1659989, 'vwap': 370.15, 'lastSize': 41, 'turnover': 61443216435, 'homeNotional': 17179.1892623191, 'foreignNotional': 6358747.687015363}] 2020-09-12 09:00:20 INFO: prepare candles [CandleItem(low=370.85, high=372.6, open=371.2, close=371.25, color='GREEN'), CandleItem(low=369.3, high=371.5, open=370.0, close=371.2, color='GREEN'), CandleItem(low=369.1, high=370.95, open=369.55, close=370.0, color='GREEN')] 2020-09-12 09:00:20 INFO: skip by colors first_candle=CandleItem(low=369.1, high=370.95, open=369.55, close=370.0, color='GREEN') second_candle=CandleItem(low=369.3, high=371.5, open=370.0, close=371.2, color='GREEN') last_candle=CandleItem(low=370.85, high=372.6, open=371.2, close=371.25, color='GREEN') 2020-09-12 09:00:20 INFO: check need new order None 2020-09-12 09:00:20 INFO: init new order end 2020-09-12 09:00:20 INFO: 2020-09-12 09:00:20 INFO: 2020-09-12 09:00:20 INFO: 2020-09-12 09:00:20 INFO: 2020-09-12 09:02:00 INFO: 2020-09-12 09:02:00 INFO: 2020-09-12 09:02:00 INFO: 2020-09-12 09:02:00 INFO: 2020-09-12 09:02:00 INFO: clearing start 2020-09-12 09:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '6934a865-7d17-c6af-7593-8eb103196516', 'clOrdID': '629ef63cb12542d98e3c4b352a5969d9', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 927, 'price': None, 'displayQty': None, 'stopPx': 366.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': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 11, 19, 29, 14, 74000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 11, 19, 29, 14, 74000, tzinfo=tzutc())} 2020-09-12 09:02:00 INFO: skip by not found init order into storage 2020-09-12 09:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '32a44ee3-4e27-4921-79c9-2a379b160153', 'clOrdID': 'c2c894f085c34a77839a54cf972060ac', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 927, 'price': 380.85, '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': 927, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 11, 19, 29, 14, 140000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 11, 19, 29, 14, 140000, tzinfo=tzutc())} 2020-09-12 09:02:00 INFO: skip by not found init order into storage 2020-09-12 09:02:00 INFO: clearing end 2020-09-12 09:02:00 INFO: 2020-09-12 09:02:00 INFO: 2020-09-12 09:02:00 INFO: 2020-09-12 09:02:00 INFO: 2020-09-12 09:54:22 INFO: process event {'orderID': '6934a865-7d17-c6af-7593-8eb103196516', 'price': 366.75, 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 927, 'avgPx': 366.75, 'text': 'Triggered: Order stop price reached\nStop order by trader.py', 'transactTime': '2020-09-12T06:54:22.631Z', 'timestamp': '2020-09-12T06:54:22.631Z', 'clOrdID': '629ef63cb12542d98e3c4b352a5969d9', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-12 09:54:22 INFO: add new event={'uid': '629ef63cb12542d98e3c4b352a5969d9', 'status': 'Filled'} 2020-09-12 09:54:22 INFO: 2020-09-12 09:54:22 INFO: 2020-09-12 09:54:22 INFO: 2020-09-12 09:54:22 INFO: 2020-09-12 09:54:22 INFO: process event start 2020-09-12 09:54:22 INFO: fetch new order event 629ef63cb12542d98e3c4b352a5969d9 2020-09-12 09:54:22 INFO: fetch orders by event init=None profit_pair=c2c894f085c34a77839a54cf972060ac 2020-09-12 09:54:22 INFO: process profit order filled 2020-09-12 09:54:22 INFO: process event {'orderID': '32a44ee3-4e27-4921-79c9-2a379b160153', 'ordStatus': 'Canceled', 'workingIndicator': False, 'leavesQty': 0, 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'timestamp': '2020-09-12T06:54:22.845Z', 'clOrdID': 'c2c894f085c34a77839a54cf972060ac', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-12 09:54:22 INFO: skip event c2c894f085c34a77839a54cf972060ac Canceled 2020-09-12 09:54:22 INFO: cancel order=c2c894f085c34a77839a54cf972060ac [{'orderID': '32a44ee3-4e27-4921-79c9-2a379b160153', 'clOrdID': 'c2c894f085c34a77839a54cf972060ac', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 927, 'price': 380.85, '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, 11, 19, 29, 14, 140000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 6, 54, 22, 845000, tzinfo=tzutc())}] 2020-09-12 09:54:22 INFO: end process event_processing_result='proceed profit order' 2020-09-12 09:54:22 INFO: 2020-09-12 09:54:22 INFO: 2020-09-12 09:54:22 INFO: 2020-09-12 09:54:22 INFO: 2020-09-12 10:00:20 INFO: 2020-09-12 10:00:20 INFO: 2020-09-12 10:00:20 INFO: 2020-09-12 10:00:20 INFO: 2020-09-12 10:00:20 INFO: init new order start 2020-09-12 10:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 12, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 371.25, 'high': 371.3, 'low': 365.8, 'close': 366.9, 'trades': 4161, 'volume': 3909871, 'vwap': 368.06, 'lastSize': 1, 'turnover': 143903639680, 'homeNotional': 40445.724266096935, 'foreignNotional': 14886161.537423559}, {'timestamp': datetime.datetime(2020, 9, 12, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 371.2, 'high': 372.6, 'low': 370.85, 'close': 371.25, 'trades': 1669, 'volume': 1286766, 'vwap': 371.65, 'lastSize': 45, 'turnover': 47822650960, 'homeNotional': 13342.499033595668, 'foreignNotional': 4958739.424644162}, {'timestamp': datetime.datetime(2020, 9, 12, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 370.0, 'high': 371.5, 'low': 369.3, 'close': 371.2, 'trades': 1425, 'volume': 1064251, 'vwap': 370.74, 'lastSize': 500, 'turnover': 39455426680, 'homeNotional': 11025.730265423967, 'foreignNotional': 4087619.071219909}] 2020-09-12 10:00:20 INFO: prepare candles [CandleItem(low=365.8, high=371.3, open=371.25, close=366.9, color='RED'), CandleItem(low=370.85, high=372.6, open=371.2, close=371.25, color='GREEN'), CandleItem(low=369.3, high=371.5, open=370.0, close=371.2, color='GREEN')] 2020-09-12 10:00:20 INFO: last_candle=CandleItem(low=365.8, high=371.3, open=371.25, close=366.9, color='RED') 2020-09-12 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-09-12 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=365.8, high=371.3, open=371.25, close=366.9, color='RED') 2020-09-12 10:00:20 INFO: skip by CandleItem(low=365.8, high=371.3, open=371.25, close=366.9, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-12 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-09-12 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=365.8, high=371.3, open=371.25, close=366.9, color='RED') 2020-09-12 10:00:20 INFO: skip by CandleItem(low=365.8, high=371.3, open=371.25, close=366.9, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-12 10:00:20 INFO: not found applicable config for candle 2020-09-12 10:00:20 INFO: check need new order None 2020-09-12 10:00:20 INFO: init new order end 2020-09-12 10:00:20 INFO: 2020-09-12 10:00:20 INFO: 2020-09-12 10:00:20 INFO: 2020-09-12 10:00:20 INFO: 2020-09-12 10:02:00 INFO: 2020-09-12 10:02:00 INFO: 2020-09-12 10:02:00 INFO: 2020-09-12 10:02:00 INFO: 2020-09-12 10:02:00 INFO: clearing start 2020-09-12 10:02:00 INFO: clearing end 2020-09-12 10:02:00 INFO: 2020-09-12 10:02:00 INFO: 2020-09-12 10:02:00 INFO: 2020-09-12 10:02:00 INFO: 2020-09-12 11:00:20 INFO: 2020-09-12 11:00:20 INFO: 2020-09-12 11:00:20 INFO: 2020-09-12 11:00:20 INFO: 2020-09-12 11:00:20 INFO: init new order start 2020-09-12 11:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 12, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 366.9, 'high': 368.95, 'low': 365.1, 'close': 368.4, 'trades': 2916, 'volume': 1882968, 'vwap': 367.17, 'lastSize': 100, 'turnover': 69135170990, 'homeNotional': 19460.303930289163, 'foreignNotional': 7145068.366428179}, {'timestamp': datetime.datetime(2020, 9, 12, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 371.25, 'high': 371.3, 'low': 365.8, 'close': 366.9, 'trades': 4161, 'volume': 3909871, 'vwap': 368.06, 'lastSize': 1, 'turnover': 143903639680, 'homeNotional': 40445.724266096935, 'foreignNotional': 14886161.537423559}, {'timestamp': datetime.datetime(2020, 9, 12, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 371.2, 'high': 372.6, 'low': 370.85, 'close': 371.25, 'trades': 1669, 'volume': 1286766, 'vwap': 371.65, 'lastSize': 45, 'turnover': 47822650960, 'homeNotional': 13342.499033595668, 'foreignNotional': 4958739.424644162}] 2020-09-12 11:00:20 INFO: prepare candles [CandleItem(low=365.1, high=368.95, open=366.9, close=368.4, color='GREEN'), CandleItem(low=365.8, high=371.3, open=371.25, close=366.9, color='RED'), CandleItem(low=370.85, high=372.6, open=371.2, close=371.25, color='GREEN')] 2020-09-12 11:00:20 INFO: skip by colors first_candle=CandleItem(low=370.85, high=372.6, open=371.2, close=371.25, color='GREEN') second_candle=CandleItem(low=365.8, high=371.3, open=371.25, close=366.9, color='RED') last_candle=CandleItem(low=365.1, high=368.95, open=366.9, close=368.4, color='GREEN') 2020-09-12 11:00:20 INFO: check need new order None 2020-09-12 11:00:20 INFO: init new order end 2020-09-12 11:00:20 INFO: 2020-09-12 11:00:20 INFO: 2020-09-12 11:00:20 INFO: 2020-09-12 11:00:20 INFO: 2020-09-12 11:02:00 INFO: 2020-09-12 11:02:00 INFO: 2020-09-12 11:02:00 INFO: 2020-09-12 11:02:00 INFO: 2020-09-12 11:02:00 INFO: clearing start 2020-09-12 11:02:00 INFO: clearing end 2020-09-12 11:02:00 INFO: 2020-09-12 11:02:00 INFO: 2020-09-12 11:02:00 INFO: 2020-09-12 11:02:00 INFO: 2020-09-12 12:00:20 INFO: 2020-09-12 12:00:20 INFO: 2020-09-12 12:00:20 INFO: 2020-09-12 12:00:20 INFO: 2020-09-12 12:00:20 INFO: init new order start 2020-09-12 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 12, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.4, 'high': 368.5, 'low': 366.3, 'close': 367.7, 'trades': 2171, 'volume': 1634502, 'vwap': 367.29, 'lastSize': 971, 'turnover': 60033618840, 'homeNotional': 16892.422314517105, 'foreignNotional': 6204420.27770218}, {'timestamp': datetime.datetime(2020, 9, 12, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 366.9, 'high': 368.95, 'low': 365.1, 'close': 368.4, 'trades': 2916, 'volume': 1882968, 'vwap': 367.17, 'lastSize': 100, 'turnover': 69135170990, 'homeNotional': 19460.303930289163, 'foreignNotional': 7145068.366428179}, {'timestamp': datetime.datetime(2020, 9, 12, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 371.25, 'high': 371.3, 'low': 365.8, 'close': 366.9, 'trades': 4161, 'volume': 3909871, 'vwap': 368.06, 'lastSize': 1, 'turnover': 143903639680, 'homeNotional': 40445.724266096935, 'foreignNotional': 14886161.537423559}] 2020-09-12 12:00:20 INFO: prepare candles [CandleItem(low=366.3, high=368.5, open=368.4, close=367.7, color='RED'), CandleItem(low=365.1, high=368.95, open=366.9, close=368.4, color='GREEN'), CandleItem(low=365.8, high=371.3, open=371.25, close=366.9, color='RED')] 2020-09-12 12:00:20 INFO: skip by colors first_candle=CandleItem(low=365.8, high=371.3, open=371.25, close=366.9, color='RED') second_candle=CandleItem(low=365.1, high=368.95, open=366.9, close=368.4, color='GREEN') last_candle=CandleItem(low=366.3, high=368.5, open=368.4, close=367.7, color='RED') 2020-09-12 12:00:20 INFO: check need new order None 2020-09-12 12:00:20 INFO: init new order end 2020-09-12 12:00:20 INFO: 2020-09-12 12:00:20 INFO: 2020-09-12 12:00:20 INFO: 2020-09-12 12:00:20 INFO: 2020-09-12 12:02:00 INFO: 2020-09-12 12:02:00 INFO: 2020-09-12 12:02:00 INFO: 2020-09-12 12:02:00 INFO: 2020-09-12 12:02:00 INFO: clearing start 2020-09-12 12:02:00 INFO: clearing end 2020-09-12 12:02:00 INFO: 2020-09-12 12:02:00 INFO: 2020-09-12 12:02:00 INFO: 2020-09-12 12:02:00 INFO: 2020-09-12 13:00:20 INFO: 2020-09-12 13:00:20 INFO: 2020-09-12 13:00:20 INFO: 2020-09-12 13:00:20 INFO: 2020-09-12 13:00:20 INFO: init new order start 2020-09-12 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 12, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.7, 'high': 370.4, 'low': 367.15, 'close': 369.8, 'trades': 2619, 'volume': 1724933, 'vwap': 369.06, 'lastSize': 14978, 'turnover': 63659772595, 'homeNotional': 17842.607107175456, 'foreignNotional': 6584937.428596201}, {'timestamp': datetime.datetime(2020, 9, 12, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.4, 'high': 368.5, 'low': 366.3, 'close': 367.7, 'trades': 2171, 'volume': 1634502, 'vwap': 367.29, 'lastSize': 971, 'turnover': 60033618840, 'homeNotional': 16892.422314517105, 'foreignNotional': 6204420.27770218}, {'timestamp': datetime.datetime(2020, 9, 12, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 366.9, 'high': 368.95, 'low': 365.1, 'close': 368.4, 'trades': 2916, 'volume': 1882968, 'vwap': 367.17, 'lastSize': 100, 'turnover': 69135170990, 'homeNotional': 19460.303930289163, 'foreignNotional': 7145068.366428179}] 2020-09-12 13:00:20 INFO: prepare candles [CandleItem(low=367.15, high=370.4, open=367.7, close=369.8, color='GREEN'), CandleItem(low=366.3, high=368.5, open=368.4, close=367.7, color='RED'), CandleItem(low=365.1, high=368.95, open=366.9, close=368.4, color='GREEN')] 2020-09-12 13:00:20 INFO: skip by colors first_candle=CandleItem(low=365.1, high=368.95, open=366.9, close=368.4, color='GREEN') second_candle=CandleItem(low=366.3, high=368.5, open=368.4, close=367.7, color='RED') last_candle=CandleItem(low=367.15, high=370.4, open=367.7, close=369.8, color='GREEN') 2020-09-12 13:00:20 INFO: check need new order None 2020-09-12 13:00:20 INFO: init new order end 2020-09-12 13:00:20 INFO: 2020-09-12 13:00:20 INFO: 2020-09-12 13:00:20 INFO: 2020-09-12 13:00:20 INFO: 2020-09-12 13:02:00 INFO: 2020-09-12 13:02:00 INFO: 2020-09-12 13:02:00 INFO: 2020-09-12 13:02:00 INFO: 2020-09-12 13:02:00 INFO: clearing start 2020-09-12 13:02:00 INFO: clearing end 2020-09-12 13:02:00 INFO: 2020-09-12 13:02:00 INFO: 2020-09-12 13:02:00 INFO: 2020-09-12 13:02:00 INFO: 2020-09-12 14:00:20 INFO: 2020-09-12 14:00:20 INFO: 2020-09-12 14:00:20 INFO: 2020-09-12 14:00:20 INFO: 2020-09-12 14:00:20 INFO: init new order start 2020-09-12 14:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 12, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 369.8, 'high': 370.85, 'low': 368.25, 'close': 368.6, 'trades': 2514, 'volume': 1748680, 'vwap': 369.46, 'lastSize': 50, 'turnover': 64605574485, 'homeNotional': 18097.77138470765, 'foreignNotional': 6686288.417575229}, {'timestamp': datetime.datetime(2020, 9, 12, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.7, 'high': 370.4, 'low': 367.15, 'close': 369.8, 'trades': 2619, 'volume': 1724933, 'vwap': 369.06, 'lastSize': 14978, 'turnover': 63659772595, 'homeNotional': 17842.607107175456, 'foreignNotional': 6584937.428596201}, {'timestamp': datetime.datetime(2020, 9, 12, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.4, 'high': 368.5, 'low': 366.3, 'close': 367.7, 'trades': 2171, 'volume': 1634502, 'vwap': 367.29, 'lastSize': 971, 'turnover': 60033618840, 'homeNotional': 16892.422314517105, 'foreignNotional': 6204420.27770218}] 2020-09-12 14:00:21 INFO: prepare candles [CandleItem(low=368.25, high=370.85, open=369.8, close=368.6, color='RED'), CandleItem(low=367.15, high=370.4, open=367.7, close=369.8, color='GREEN'), CandleItem(low=366.3, high=368.5, open=368.4, close=367.7, color='RED')] 2020-09-12 14:00:21 INFO: skip by colors first_candle=CandleItem(low=366.3, high=368.5, open=368.4, close=367.7, color='RED') second_candle=CandleItem(low=367.15, high=370.4, open=367.7, close=369.8, color='GREEN') last_candle=CandleItem(low=368.25, high=370.85, open=369.8, close=368.6, color='RED') 2020-09-12 14:00:21 INFO: check need new order None 2020-09-12 14:00:21 INFO: init new order end 2020-09-12 14:00:21 INFO: 2020-09-12 14:00:21 INFO: 2020-09-12 14:00:21 INFO: 2020-09-12 14:00:21 INFO: 2020-09-12 14:02:00 INFO: 2020-09-12 14:02:00 INFO: 2020-09-12 14:02:00 INFO: 2020-09-12 14:02:00 INFO: 2020-09-12 14:02:00 INFO: clearing start 2020-09-12 14:02:00 INFO: clearing end 2020-09-12 14:02:00 INFO: 2020-09-12 14:02:00 INFO: 2020-09-12 14:02:00 INFO: 2020-09-12 14:02:00 INFO: 2020-09-12 15:00:20 INFO: 2020-09-12 15:00:20 INFO: 2020-09-12 15:00:20 INFO: 2020-09-12 15:00:20 INFO: 2020-09-12 15:00:20 INFO: init new order start 2020-09-12 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 12, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.6, 'high': 371.55, 'low': 367.4, 'close': 370.7, 'trades': 2981, 'volume': 2184161, 'vwap': 369.59, 'lastSize': 22, 'turnover': 80723540830, 'homeNotional': 22588.519692344467, 'foreignNotional': 8348409.132293069}, {'timestamp': datetime.datetime(2020, 9, 12, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 369.8, 'high': 370.85, 'low': 368.25, 'close': 368.6, 'trades': 2514, 'volume': 1748680, 'vwap': 369.46, 'lastSize': 50, 'turnover': 64605574485, 'homeNotional': 18097.77138470765, 'foreignNotional': 6686288.417575229}, {'timestamp': datetime.datetime(2020, 9, 12, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.7, 'high': 370.4, 'low': 367.15, 'close': 369.8, 'trades': 2619, 'volume': 1724933, 'vwap': 369.06, 'lastSize': 14978, 'turnover': 63659772595, 'homeNotional': 17842.607107175456, 'foreignNotional': 6584937.428596201}] 2020-09-12 15:00:20 INFO: prepare candles [CandleItem(low=367.4, high=371.55, open=368.6, close=370.7, color='GREEN'), CandleItem(low=368.25, high=370.85, open=369.8, close=368.6, color='RED'), CandleItem(low=367.15, high=370.4, open=367.7, close=369.8, color='GREEN')] 2020-09-12 15:00:20 INFO: skip by colors first_candle=CandleItem(low=367.15, high=370.4, open=367.7, close=369.8, color='GREEN') second_candle=CandleItem(low=368.25, high=370.85, open=369.8, close=368.6, color='RED') last_candle=CandleItem(low=367.4, high=371.55, open=368.6, close=370.7, color='GREEN') 2020-09-12 15:00:20 INFO: check need new order None 2020-09-12 15:00:20 INFO: init new order end 2020-09-12 15:00:20 INFO: 2020-09-12 15:00:20 INFO: 2020-09-12 15:00:20 INFO: 2020-09-12 15:00:20 INFO: 2020-09-12 15:02:00 INFO: 2020-09-12 15:02:00 INFO: 2020-09-12 15:02:00 INFO: 2020-09-12 15:02:00 INFO: 2020-09-12 15:02:00 INFO: clearing start 2020-09-12 15:02:00 INFO: clearing end 2020-09-12 15:02:00 INFO: 2020-09-12 15:02:00 INFO: 2020-09-12 15:02:00 INFO: 2020-09-12 15:02:00 INFO: 2020-09-12 16:00:20 INFO: 2020-09-12 16:00:20 INFO: 2020-09-12 16:00:20 INFO: 2020-09-12 16:00:20 INFO: 2020-09-12 16:00:20 INFO: init new order start 2020-09-12 16:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 12, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 370.7, 'high': 370.7, 'low': 367.9, 'close': 368.7, 'trades': 2159, 'volume': 1738691, 'vwap': 369.12, 'lastSize': 2300, 'turnover': 64178270730, 'homeNotional': 17950.007612374393, 'foreignNotional': 6625685.173964944}, {'timestamp': datetime.datetime(2020, 9, 12, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.6, 'high': 371.55, 'low': 367.4, 'close': 370.7, 'trades': 2981, 'volume': 2184161, 'vwap': 369.59, 'lastSize': 22, 'turnover': 80723540830, 'homeNotional': 22588.519692344467, 'foreignNotional': 8348409.132293069}, {'timestamp': datetime.datetime(2020, 9, 12, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 369.8, 'high': 370.85, 'low': 368.25, 'close': 368.6, 'trades': 2514, 'volume': 1748680, 'vwap': 369.46, 'lastSize': 50, 'turnover': 64605574485, 'homeNotional': 18097.77138470765, 'foreignNotional': 6686288.417575229}] 2020-09-12 16:00:20 INFO: prepare candles [CandleItem(low=367.9, high=370.7, open=370.7, close=368.7, color='RED'), CandleItem(low=367.4, high=371.55, open=368.6, close=370.7, color='GREEN'), CandleItem(low=368.25, high=370.85, open=369.8, close=368.6, color='RED')] 2020-09-12 16:00:20 INFO: skip by colors first_candle=CandleItem(low=368.25, high=370.85, open=369.8, close=368.6, color='RED') second_candle=CandleItem(low=367.4, high=371.55, open=368.6, close=370.7, color='GREEN') last_candle=CandleItem(low=367.9, high=370.7, open=370.7, close=368.7, color='RED') 2020-09-12 16:00:20 INFO: check need new order None 2020-09-12 16:00:20 INFO: init new order end 2020-09-12 16:00:20 INFO: 2020-09-12 16:00:20 INFO: 2020-09-12 16:00:20 INFO: 2020-09-12 16:00:20 INFO: 2020-09-12 16:02:00 INFO: 2020-09-12 16:02:00 INFO: 2020-09-12 16:02:00 INFO: 2020-09-12 16:02:00 INFO: 2020-09-12 16:02:00 INFO: clearing start 2020-09-12 16:02:00 INFO: clearing end 2020-09-12 16:02:00 INFO: 2020-09-12 16:02:00 INFO: 2020-09-12 16:02:00 INFO: 2020-09-12 16:02:00 INFO: 2020-09-12 17:00:20 INFO: 2020-09-12 17:00:20 INFO: 2020-09-12 17:00:20 INFO: 2020-09-12 17:00:20 INFO: 2020-09-12 17:00:20 INFO: init new order start 2020-09-12 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 12, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.7, 'high': 369.5, 'low': 366.4, 'close': 368.3, 'trades': 2568, 'volume': 2188693, 'vwap': 367.81, 'lastSize': 40, 'turnover': 80501323845, 'homeNotional': 22542.538085142536, 'foreignNotional': 8291297.201848034}, {'timestamp': datetime.datetime(2020, 9, 12, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 370.7, 'high': 370.7, 'low': 367.9, 'close': 368.7, 'trades': 2159, 'volume': 1738691, 'vwap': 369.12, 'lastSize': 2300, 'turnover': 64178270730, 'homeNotional': 17950.007612374393, 'foreignNotional': 6625685.173964944}, {'timestamp': datetime.datetime(2020, 9, 12, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.6, 'high': 371.55, 'low': 367.4, 'close': 370.7, 'trades': 2981, 'volume': 2184161, 'vwap': 369.59, 'lastSize': 22, 'turnover': 80723540830, 'homeNotional': 22588.519692344467, 'foreignNotional': 8348409.132293069}] 2020-09-12 17:00:20 INFO: prepare candles [CandleItem(low=366.4, high=369.5, open=368.7, close=368.3, color='RED'), CandleItem(low=367.9, high=370.7, open=370.7, close=368.7, color='RED'), CandleItem(low=367.4, high=371.55, open=368.6, close=370.7, color='GREEN')] 2020-09-12 17:00:20 INFO: skip by colors first_candle=CandleItem(low=367.4, high=371.55, open=368.6, close=370.7, color='GREEN') second_candle=CandleItem(low=367.9, high=370.7, open=370.7, close=368.7, color='RED') last_candle=CandleItem(low=366.4, high=369.5, open=368.7, close=368.3, color='RED') 2020-09-12 17:00:20 INFO: check need new order None 2020-09-12 17:00:20 INFO: init new order end 2020-09-12 17:00:20 INFO: 2020-09-12 17:00:20 INFO: 2020-09-12 17:00:20 INFO: 2020-09-12 17:00:20 INFO: 2020-09-12 17:02:00 INFO: 2020-09-12 17:02:00 INFO: 2020-09-12 17:02:00 INFO: 2020-09-12 17:02:00 INFO: 2020-09-12 17:02:00 INFO: clearing start 2020-09-12 17:02:00 INFO: clearing end 2020-09-12 17:02:00 INFO: 2020-09-12 17:02:00 INFO: 2020-09-12 17:02:00 INFO: 2020-09-12 17:02:00 INFO: 2020-09-12 18:00:20 INFO: 2020-09-12 18:00:20 INFO: 2020-09-12 18:00:20 INFO: 2020-09-12 18:00:20 INFO: 2020-09-12 18:00:20 INFO: init new order start 2020-09-12 18:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 12, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.3, 'high': 373.75, 'low': 367.45, 'close': 373.25, 'trades': 4842, 'volume': 4942610, 'vwap': 371.45, 'lastSize': 50, 'turnover': 183591504595, 'homeNotional': 51088.44439733715, 'foreignNotional': 18976730.246306684}, {'timestamp': datetime.datetime(2020, 9, 12, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.7, 'high': 369.5, 'low': 366.4, 'close': 368.3, 'trades': 2568, 'volume': 2188693, 'vwap': 367.81, 'lastSize': 40, 'turnover': 80501323845, 'homeNotional': 22542.538085142536, 'foreignNotional': 8291297.201848034}, {'timestamp': datetime.datetime(2020, 9, 12, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 370.7, 'high': 370.7, 'low': 367.9, 'close': 368.7, 'trades': 2159, 'volume': 1738691, 'vwap': 369.12, 'lastSize': 2300, 'turnover': 64178270730, 'homeNotional': 17950.007612374393, 'foreignNotional': 6625685.173964944}] 2020-09-12 18:00:21 INFO: prepare candles [CandleItem(low=367.45, high=373.75, open=368.3, close=373.25, color='GREEN'), CandleItem(low=366.4, high=369.5, open=368.7, close=368.3, color='RED'), CandleItem(low=367.9, high=370.7, open=370.7, close=368.7, color='RED')] 2020-09-12 18:00:21 INFO: last_candle=CandleItem(low=367.45, high=373.75, open=368.3, close=373.25, color='GREEN') 2020-09-12 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-09-12 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=367.45, high=373.75, open=368.3, close=373.25, color='GREEN') 2020-09-12 18:00:21 INFO: skip by CandleItem(low=367.45, high=373.75, open=368.3, close=373.25, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-12 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-09-12 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=367.45, high=373.75, open=368.3, close=373.25, color='GREEN') 2020-09-12 18:00:21 INFO: apply filter None to candle=CandleItem(low=366.4, high=369.5, open=368.7, close=368.3, color='RED') 2020-09-12 18:00:21 INFO: apply filter None to candle=CandleItem(low=367.9, high=370.7, open=370.7, close=368.7, color='RED') 2020-09-12 18:00:21 INFO: hit candle order=OrderProperties(candle=CandleItem(low=367.45, high=373.75, open=368.3, close=373.25, color='GREEN'), take_profit_factor=5.0, clearing_interval=3600) 2020-09-12 18:00:21 INFO: check need new order OrderProperties(candle=CandleItem(low=367.45, high=373.75, open=368.3, close=373.25, color='GREEN'), take_profit_factor=5.0, clearing_interval=3600) 2020-09-12 18:00:21 INFO: place order: start candle=CandleItem(low=367.45, high=373.75, open=368.3, close=373.25, color='GREEN') ticker='ETHUSD' price_offset=0.1 2020-09-12 18:00:21 INFO: place order: side_factor=-1 init_trigger_price=373.8 init_order_price=373.85 stop_price_offset=0.0 candle.size=6.300000000000011 stop_price=367.45 take_price=405.3500000000001 2020-09-12 18:00:21 INFO: place order round: side_factor=-1 init_trigger_price=Decimal('373.80000000000001136868377216160297393798828125') init_order_price=Decimal('373.8500000000000227373675443232059478759765625') stop_price_offset=0.0 candle.size=6.300000000000011 stop_price=Decimal('367.44999999999998863131622783839702606201171875') take_price=Decimal('405.35000000000007958078640513122081756591796875') 2020-09-12 18:00:21 INFO: place order: compute qty=299 2020-09-12 18:00:21 INFO: place order: save order to db 1f0be9d84c264e53adebff3d87a187e4; response=True 2020-09-12 18:00:21 INFO: post order to exchange resp={'orderID': 'eb2bfda1-d404-2f23-5086-a83953dac139', 'clOrdID': '1f0be9d84c264e53adebff3d87a187e4', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 299, 'price': 373.85, 'displayQty': None, 'stopPx': 373.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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 0, 21, 116000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 0, 21, 116000, tzinfo=tzutc())} 2020-09-12 18:00:21 INFO: process event {'orderID': 'eb2bfda1-d404-2f23-5086-a83953dac139', 'clOrdID': '1f0be9d84c264e53adebff3d87a187e4', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 299, 'price': 373.85, 'displayQty': None, 'stopPx': 373.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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-09-12T15:00:21.116Z', 'timestamp': '2020-09-12T15:00:21.116Z'} 2020-09-12 18:00:21 INFO: skip event 1f0be9d84c264e53adebff3d87a187e4 New 2020-09-12 18:00:21 INFO: place new init order {'qty': 299, 'init_price': Decimal('373.80000000000001136868377216160297393798828125'), 'stop_price': Decimal('367.44999999999998863131622783839702606201171875'), 'take_price': Decimal('405.35000000000007958078640513122081756591796875'), 'order_uid': '1f0be9d84c264e53adebff3d87a187e4', 'response': {'orderID': 'eb2bfda1-d404-2f23-5086-a83953dac139', 'clOrdID': '1f0be9d84c264e53adebff3d87a187e4', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 299, 'price': 373.85, 'displayQty': None, 'stopPx': 373.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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 0, 21, 116000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 0, 21, 116000, tzinfo=tzutc())}} 2020-09-12 18:00:21 INFO: init new order end 2020-09-12 18:00:21 INFO: 2020-09-12 18:00:21 INFO: 2020-09-12 18:00:21 INFO: 2020-09-12 18:00:21 INFO: 2020-09-12 18:02:00 INFO: 2020-09-12 18:02:00 INFO: 2020-09-12 18:02:00 INFO: 2020-09-12 18:02:00 INFO: 2020-09-12 18:02:00 INFO: clearing start 2020-09-12 18:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'eb2bfda1-d404-2f23-5086-a83953dac139', 'clOrdID': '1f0be9d84c264e53adebff3d87a187e4', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 299, 'price': 373.85, 'displayQty': None, 'stopPx': 373.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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 0, 21, 116000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 0, 21, 116000, tzinfo=tzutc())} 2020-09-12 18:02:00 INFO: order time=2020-09-12 15:00:21.116000+00:00; delta from now UTC=0:01:39.175564 time_delta.total_seconds()=99.175564; time_diff_offset='3600' 2020-09-12 18:02:00 INFO: skip by time diff 2020-09-12 15:00:21.116000+00:00 2020-09-12 18:02:00 INFO: clearing end 2020-09-12 18:02:00 INFO: 2020-09-12 18:02:00 INFO: 2020-09-12 18:02:00 INFO: 2020-09-12 18:02:00 INFO: 2020-09-12 18:14:33 INFO: process event {'orderID': 'eb2bfda1-d404-2f23-5086-a83953dac139', 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 299, 'avgPx': 373.8, 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'transactTime': '2020-09-12T15:14:33.930Z', 'timestamp': '2020-09-12T15:14:33.930Z', 'clOrdID': '1f0be9d84c264e53adebff3d87a187e4', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-12 18:14:33 INFO: add new event={'uid': '1f0be9d84c264e53adebff3d87a187e4', 'status': 'Filled'} 2020-09-12 18:14:34 INFO: 2020-09-12 18:14:34 INFO: 2020-09-12 18:14:34 INFO: 2020-09-12 18:14:34 INFO: 2020-09-12 18:14:34 INFO: process event start 2020-09-12 18:14:34 INFO: fetch new order event 1f0be9d84c264e53adebff3d87a187e4 2020-09-12 18:14:34 INFO: fetch orders by event init={'stop': '367.44999999999998863131622783839702606201171875', 'take': '405.35000000000007958078640513122081756591796875', 'qty': '299', 'color': 'GREEN', 'ticker': 'ETHUSD', 'clearing_offset': '3600'} profit_pair=None 2020-09-12 18:14:34 INFO: process init order filled 2020-09-12 18:14:34 INFO: save profit orders to storage stop=36e41817ba744f61b875f34e228c3253 take=0e6b025321d245c381d9e37863aa42e0 2020-09-12 18:14:34 INFO: place profit orders take_price=405.35000000000007958078640513122081756591796875, stop_price=367.44999999999998863131622783839702606201171875, qty=299, color=GREEN, ticker=ETHUSD 36e41817ba744f61b875f34e228c3253 0e6b025321d245c381d9e37863aa42e0 2020-09-12 18:14:34 INFO: place stop order ETHUSD: qty=-299, stop_price=367.44999999999998863131622783839702606201171875, stop_uid=36e41817ba744f61b875f34e228c3253 2020-09-12 18:14:34 INFO: exchange resp for stop order={'orderID': '68e05e63-16a4-3d26-8288-1337b1615d5c', 'clOrdID': '36e41817ba744f61b875f34e228c3253', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': None, 'displayQty': None, 'stopPx': 367.45, '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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc())} 2020-09-12 18:14:34 INFO: place limit order ETHUSD: qty=-299, price=405.35000000000007958078640513122081756591796875, take_uid=0e6b025321d245c381d9e37863aa42e0 2020-09-12 18:14:34 INFO: process event {'orderID': '68e05e63-16a4-3d26-8288-1337b1615d5c', 'clOrdID': '36e41817ba744f61b875f34e228c3253', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': None, 'displayQty': None, 'stopPx': 367.45, '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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': '2020-09-12T15:14:34.355Z', 'timestamp': '2020-09-12T15:14:34.355Z'} 2020-09-12 18:14:34 INFO: skip event 36e41817ba744f61b875f34e228c3253 New 2020-09-12 18:14:34 INFO: exchange resp for take profit order={'orderID': '9ff6e4d6-9ab4-e1e8-dccf-818d5a4e471d', 'clOrdID': '0e6b025321d245c381d9e37863aa42e0', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': 405.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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc())} 2020-09-12 18:14:34 INFO: place profit orders={'stop': {'response': {'orderID': '68e05e63-16a4-3d26-8288-1337b1615d5c', 'clOrdID': '36e41817ba744f61b875f34e228c3253', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': None, 'displayQty': None, 'stopPx': 367.45, '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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc())}, 'qty': Decimal('-299'), 'uid': '36e41817ba744f61b875f34e228c3253', 'price': Decimal('367.44999999999998863131622783839702606201171875')}, 'take': {'response': {'orderID': '9ff6e4d6-9ab4-e1e8-dccf-818d5a4e471d', 'clOrdID': '0e6b025321d245c381d9e37863aa42e0', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': 405.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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc())}, 'qty': Decimal('-299'), 'uid': '0e6b025321d245c381d9e37863aa42e0', 'price': Decimal('405.35000000000007958078640513122081756591796875')}} 2020-09-12 18:14:34 INFO: process event {'orderID': '9ff6e4d6-9ab4-e1e8-dccf-818d5a4e471d', 'clOrdID': '0e6b025321d245c381d9e37863aa42e0', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': 405.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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': '2020-09-12T15:14:34.392Z', 'timestamp': '2020-09-12T15:14:34.392Z'} 2020-09-12 18:14:34 INFO: skip event 0e6b025321d245c381d9e37863aa42e0 New 2020-09-12 18:14:34 INFO: rm init order from db 1f0be9d84c264e53adebff3d87a187e4 2020-09-12 18:14:34 INFO: end process event_processing_result='proceed init order' 2020-09-12 18:14:34 INFO: 2020-09-12 18:14:34 INFO: 2020-09-12 18:14:34 INFO: 2020-09-12 18:14:34 INFO: 2020-09-12 19:00:20 INFO: 2020-09-12 19:00:20 INFO: 2020-09-12 19:00:20 INFO: 2020-09-12 19:00:20 INFO: 2020-09-12 19:00:20 INFO: init new order start 2020-09-12 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 12, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 373.25, 'high': 375.6, 'low': 372.1, 'close': 373.65, 'trades': 4995, 'volume': 4053764, 'vwap': 373.97, 'lastSize': 1, 'turnover': 151596572995, 'homeNotional': 42029.737271264035, 'foreignNotional': 15717669.324905178}, {'timestamp': datetime.datetime(2020, 9, 12, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.3, 'high': 373.75, 'low': 367.45, 'close': 373.25, 'trades': 4842, 'volume': 4942610, 'vwap': 371.45, 'lastSize': 50, 'turnover': 183591504595, 'homeNotional': 51088.44439733715, 'foreignNotional': 18976730.246306684}, {'timestamp': datetime.datetime(2020, 9, 12, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.7, 'high': 369.5, 'low': 366.4, 'close': 368.3, 'trades': 2568, 'volume': 2188693, 'vwap': 367.81, 'lastSize': 40, 'turnover': 80501323845, 'homeNotional': 22542.538085142536, 'foreignNotional': 8291297.201848034}] 2020-09-12 19:00:20 INFO: prepare candles [CandleItem(low=372.1, high=375.6, open=373.25, close=373.65, color='GREEN'), CandleItem(low=367.45, high=373.75, open=368.3, close=373.25, color='GREEN'), CandleItem(low=366.4, high=369.5, open=368.7, close=368.3, color='RED')] 2020-09-12 19:00:20 INFO: skip by colors first_candle=CandleItem(low=366.4, high=369.5, open=368.7, close=368.3, color='RED') second_candle=CandleItem(low=367.45, high=373.75, open=368.3, close=373.25, color='GREEN') last_candle=CandleItem(low=372.1, high=375.6, open=373.25, close=373.65, color='GREEN') 2020-09-12 19:00:20 INFO: check need new order None 2020-09-12 19:00:20 INFO: init new order end 2020-09-12 19:00:20 INFO: 2020-09-12 19:00:20 INFO: 2020-09-12 19:00:20 INFO: 2020-09-12 19:00:20 INFO: 2020-09-12 19:02:00 INFO: 2020-09-12 19:02:00 INFO: 2020-09-12 19:02:00 INFO: 2020-09-12 19:02:00 INFO: 2020-09-12 19:02:00 INFO: clearing start 2020-09-12 19:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '68e05e63-16a4-3d26-8288-1337b1615d5c', 'clOrdID': '36e41817ba744f61b875f34e228c3253', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': None, 'displayQty': None, 'stopPx': 367.45, '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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc())} 2020-09-12 19:02:00 INFO: skip by not found init order into storage 2020-09-12 19:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '9ff6e4d6-9ab4-e1e8-dccf-818d5a4e471d', 'clOrdID': '0e6b025321d245c381d9e37863aa42e0', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': 405.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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc())} 2020-09-12 19:02:00 INFO: skip by not found init order into storage 2020-09-12 19:02:00 INFO: clearing end 2020-09-12 19:02:00 INFO: 2020-09-12 19:02:00 INFO: 2020-09-12 19:02:00 INFO: 2020-09-12 19:02:00 INFO: 2020-09-12 20:00:20 INFO: 2020-09-12 20:00:20 INFO: 2020-09-12 20:00:20 INFO: 2020-09-12 20:00:20 INFO: 2020-09-12 20:00:20 INFO: init new order start 2020-09-12 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 12, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 373.65, 'high': 374.0, 'low': 372.65, 'close': 373.2, 'trades': 1714, 'volume': 1425038, 'vwap': 373.35, 'lastSize': 100, 'turnover': 53202402150, 'homeNotional': 14775.857210943752, 'foreignNotional': 5516422.039302131}, {'timestamp': datetime.datetime(2020, 9, 12, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 373.25, 'high': 375.6, 'low': 372.1, 'close': 373.65, 'trades': 4995, 'volume': 4053764, 'vwap': 373.97, 'lastSize': 1, 'turnover': 151596572995, 'homeNotional': 42029.737271264035, 'foreignNotional': 15717669.324905178}, {'timestamp': datetime.datetime(2020, 9, 12, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.3, 'high': 373.75, 'low': 367.45, 'close': 373.25, 'trades': 4842, 'volume': 4942610, 'vwap': 371.45, 'lastSize': 50, 'turnover': 183591504595, 'homeNotional': 51088.44439733715, 'foreignNotional': 18976730.246306684}] 2020-09-12 20:00:20 INFO: prepare candles [CandleItem(low=372.65, high=374.0, open=373.65, close=373.2, color='RED'), CandleItem(low=372.1, high=375.6, open=373.25, close=373.65, color='GREEN'), CandleItem(low=367.45, high=373.75, open=368.3, close=373.25, color='GREEN')] 2020-09-12 20:00:20 INFO: last_candle=CandleItem(low=372.65, high=374.0, open=373.65, close=373.2, color='RED') 2020-09-12 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-09-12 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.65, high=374.0, open=373.65, close=373.2, color='RED') 2020-09-12 20:00:20 INFO: skip by CandleItem(low=372.65, high=374.0, open=373.65, close=373.2, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-12 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-09-12 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=372.65, high=374.0, open=373.65, close=373.2, color='RED') 2020-09-12 20:00:20 INFO: skip by CandleItem(low=372.65, high=374.0, open=373.65, close=373.2, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-12 20:00:20 INFO: not found applicable config for candle 2020-09-12 20:00:20 INFO: check need new order None 2020-09-12 20:00:20 INFO: init new order end 2020-09-12 20:00:20 INFO: 2020-09-12 20:00:20 INFO: 2020-09-12 20:00:20 INFO: 2020-09-12 20:00:20 INFO: 2020-09-12 20:02:00 INFO: 2020-09-12 20:02:00 INFO: 2020-09-12 20:02:00 INFO: 2020-09-12 20:02:00 INFO: 2020-09-12 20:02:00 INFO: clearing start 2020-09-12 20:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '68e05e63-16a4-3d26-8288-1337b1615d5c', 'clOrdID': '36e41817ba744f61b875f34e228c3253', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': None, 'displayQty': None, 'stopPx': 367.45, '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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc())} 2020-09-12 20:02:00 INFO: skip by not found init order into storage 2020-09-12 20:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '9ff6e4d6-9ab4-e1e8-dccf-818d5a4e471d', 'clOrdID': '0e6b025321d245c381d9e37863aa42e0', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': 405.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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc())} 2020-09-12 20:02:00 INFO: skip by not found init order into storage 2020-09-12 20:02:00 INFO: clearing end 2020-09-12 20:02:00 INFO: 2020-09-12 20:02:00 INFO: 2020-09-12 20:02:00 INFO: 2020-09-12 20:02:00 INFO: 2020-09-12 21:00:20 INFO: 2020-09-12 21:00:20 INFO: 2020-09-12 21:00:20 INFO: 2020-09-12 21:00:20 INFO: 2020-09-12 21:00:20 INFO: init new order start 2020-09-12 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 12, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 373.2, 'high': 374.4, 'low': 372.15, 'close': 374.4, 'trades': 1822, 'volume': 1467265, 'vwap': 373.28, 'lastSize': 1000, 'turnover': 54769890465, 'homeNotional': 15218.848192291445, 'foreignNotional': 5680876.598874189}, {'timestamp': datetime.datetime(2020, 9, 12, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 373.65, 'high': 374.0, 'low': 372.65, 'close': 373.2, 'trades': 1714, 'volume': 1425038, 'vwap': 373.35, 'lastSize': 100, 'turnover': 53202402150, 'homeNotional': 14775.857210943752, 'foreignNotional': 5516422.039302131}, {'timestamp': datetime.datetime(2020, 9, 12, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 373.25, 'high': 375.6, 'low': 372.1, 'close': 373.65, 'trades': 4995, 'volume': 4053764, 'vwap': 373.97, 'lastSize': 1, 'turnover': 151596572995, 'homeNotional': 42029.737271264035, 'foreignNotional': 15717669.324905178}] 2020-09-12 21:00:20 INFO: prepare candles [CandleItem(low=372.15, high=374.4, open=373.2, close=374.4, color='GREEN'), CandleItem(low=372.65, high=374.0, open=373.65, close=373.2, color='RED'), CandleItem(low=372.1, high=375.6, open=373.25, close=373.65, color='GREEN')] 2020-09-12 21:00:20 INFO: skip by colors first_candle=CandleItem(low=372.1, high=375.6, open=373.25, close=373.65, color='GREEN') second_candle=CandleItem(low=372.65, high=374.0, open=373.65, close=373.2, color='RED') last_candle=CandleItem(low=372.15, high=374.4, open=373.2, close=374.4, color='GREEN') 2020-09-12 21:00:20 INFO: check need new order None 2020-09-12 21:00:20 INFO: init new order end 2020-09-12 21:00:20 INFO: 2020-09-12 21:00:20 INFO: 2020-09-12 21:00:20 INFO: 2020-09-12 21:00:20 INFO: 2020-09-12 21:02:00 INFO: 2020-09-12 21:02:00 INFO: 2020-09-12 21:02:00 INFO: 2020-09-12 21:02:00 INFO: 2020-09-12 21:02:00 INFO: clearing start 2020-09-12 21:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '68e05e63-16a4-3d26-8288-1337b1615d5c', 'clOrdID': '36e41817ba744f61b875f34e228c3253', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': None, 'displayQty': None, 'stopPx': 367.45, '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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc())} 2020-09-12 21:02:00 INFO: skip by not found init order into storage 2020-09-12 21:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '9ff6e4d6-9ab4-e1e8-dccf-818d5a4e471d', 'clOrdID': '0e6b025321d245c381d9e37863aa42e0', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': 405.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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc())} 2020-09-12 21:02:00 INFO: skip by not found init order into storage 2020-09-12 21:02:00 INFO: clearing end 2020-09-12 21:02:00 INFO: 2020-09-12 21:02:00 INFO: 2020-09-12 21:02:00 INFO: 2020-09-12 21:02:00 INFO: 2020-09-12 22:00:20 INFO: 2020-09-12 22:00:20 INFO: 2020-09-12 22:00:20 INFO: 2020-09-12 22:00:20 INFO: 2020-09-12 22:00:20 INFO: init new order start 2020-09-12 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 12, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 374.4, 'high': 385.25, 'low': 374.4, 'close': 383.8, 'trades': 12822, 'volume': 9073982, 'vwap': 380.59, 'lastSize': 100, 'turnover': 345343039305, 'homeNotional': 94644.47844972921, 'foreignNotional': 36020954.837153494}, {'timestamp': datetime.datetime(2020, 9, 12, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 373.2, 'high': 374.4, 'low': 372.15, 'close': 374.4, 'trades': 1822, 'volume': 1467265, 'vwap': 373.28, 'lastSize': 1000, 'turnover': 54769890465, 'homeNotional': 15218.848192291445, 'foreignNotional': 5680876.598874189}, {'timestamp': datetime.datetime(2020, 9, 12, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 373.65, 'high': 374.0, 'low': 372.65, 'close': 373.2, 'trades': 1714, 'volume': 1425038, 'vwap': 373.35, 'lastSize': 100, 'turnover': 53202402150, 'homeNotional': 14775.857210943752, 'foreignNotional': 5516422.039302131}] 2020-09-12 22:00:20 INFO: prepare candles [CandleItem(low=374.4, high=385.25, open=374.4, close=383.8, color='GREEN'), CandleItem(low=372.15, high=374.4, open=373.2, close=374.4, color='GREEN'), CandleItem(low=372.65, high=374.0, open=373.65, close=373.2, color='RED')] 2020-09-12 22:00:20 INFO: skip by colors first_candle=CandleItem(low=372.65, high=374.0, open=373.65, close=373.2, color='RED') second_candle=CandleItem(low=372.15, high=374.4, open=373.2, close=374.4, color='GREEN') last_candle=CandleItem(low=374.4, high=385.25, open=374.4, close=383.8, color='GREEN') 2020-09-12 22:00:20 INFO: check need new order None 2020-09-12 22:00:20 INFO: init new order end 2020-09-12 22:00:20 INFO: 2020-09-12 22:00:20 INFO: 2020-09-12 22:00:20 INFO: 2020-09-12 22:00:20 INFO: 2020-09-12 22:02:00 INFO: 2020-09-12 22:02:00 INFO: 2020-09-12 22:02:00 INFO: 2020-09-12 22:02:00 INFO: 2020-09-12 22:02:00 INFO: clearing start 2020-09-12 22:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '68e05e63-16a4-3d26-8288-1337b1615d5c', 'clOrdID': '36e41817ba744f61b875f34e228c3253', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': None, 'displayQty': None, 'stopPx': 367.45, '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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc())} 2020-09-12 22:02:00 INFO: skip by not found init order into storage 2020-09-12 22:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '9ff6e4d6-9ab4-e1e8-dccf-818d5a4e471d', 'clOrdID': '0e6b025321d245c381d9e37863aa42e0', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': 405.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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc())} 2020-09-12 22:02:00 INFO: skip by not found init order into storage 2020-09-12 22:02:00 INFO: clearing end 2020-09-12 22:02:00 INFO: 2020-09-12 22:02:00 INFO: 2020-09-12 22:02:00 INFO: 2020-09-12 22:02:00 INFO: 2020-09-12 23:00:20 INFO: 2020-09-12 23:00:20 INFO: 2020-09-12 23:00:20 INFO: 2020-09-12 23:00:20 INFO: 2020-09-12 23:00:20 INFO: init new order start 2020-09-12 23:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 12, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.8, 'high': 385.95, 'low': 382.75, 'close': 385.4, 'trades': 4359, 'volume': 3186095, 'vwap': 384.12, 'lastSize': 9400, 'turnover': 122383823475, 'homeNotional': 33304.19108004795, 'foreignNotional': 12792771.699999196}, {'timestamp': datetime.datetime(2020, 9, 12, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 374.4, 'high': 385.25, 'low': 374.4, 'close': 383.8, 'trades': 12822, 'volume': 9073982, 'vwap': 380.59, 'lastSize': 100, 'turnover': 345343039305, 'homeNotional': 94644.47844972921, 'foreignNotional': 36020954.837153494}, {'timestamp': datetime.datetime(2020, 9, 12, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 373.2, 'high': 374.4, 'low': 372.15, 'close': 374.4, 'trades': 1822, 'volume': 1467265, 'vwap': 373.28, 'lastSize': 1000, 'turnover': 54769890465, 'homeNotional': 15218.848192291445, 'foreignNotional': 5680876.598874189}] 2020-09-12 23:00:21 INFO: prepare candles [CandleItem(low=382.75, high=385.95, open=383.8, close=385.4, color='GREEN'), CandleItem(low=374.4, high=385.25, open=374.4, close=383.8, color='GREEN'), CandleItem(low=372.15, high=374.4, open=373.2, close=374.4, color='GREEN')] 2020-09-12 23:00:21 INFO: skip by colors first_candle=CandleItem(low=372.15, high=374.4, open=373.2, close=374.4, color='GREEN') second_candle=CandleItem(low=374.4, high=385.25, open=374.4, close=383.8, color='GREEN') last_candle=CandleItem(low=382.75, high=385.95, open=383.8, close=385.4, color='GREEN') 2020-09-12 23:00:21 INFO: check need new order None 2020-09-12 23:00:21 INFO: init new order end 2020-09-12 23:00:21 INFO: 2020-09-12 23:00:21 INFO: 2020-09-12 23:00:21 INFO: 2020-09-12 23:00:21 INFO: 2020-09-12 23:02:00 INFO: 2020-09-12 23:02:00 INFO: 2020-09-12 23:02:00 INFO: 2020-09-12 23:02:00 INFO: 2020-09-12 23:02:00 INFO: clearing start 2020-09-12 23:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '68e05e63-16a4-3d26-8288-1337b1615d5c', 'clOrdID': '36e41817ba744f61b875f34e228c3253', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': None, 'displayQty': None, 'stopPx': 367.45, '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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc())} 2020-09-12 23:02:00 INFO: skip by not found init order into storage 2020-09-12 23:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '9ff6e4d6-9ab4-e1e8-dccf-818d5a4e471d', 'clOrdID': '0e6b025321d245c381d9e37863aa42e0', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': 405.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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc())} 2020-09-12 23:02:00 INFO: skip by not found init order into storage 2020-09-12 23:02:00 INFO: clearing end 2020-09-12 23:02:00 INFO: 2020-09-12 23:02:00 INFO: 2020-09-12 23:02:00 INFO: 2020-09-12 23:02:00 INFO: 2020-09-13 00:00:20 INFO: 2020-09-13 00:00:20 INFO: 2020-09-13 00:00:20 INFO: 2020-09-13 00:00:20 INFO: 2020-09-13 00:00:20 INFO: init new order start 2020-09-13 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 12, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.4, 'high': 387.75, 'low': 383.55, 'close': 383.7, 'trades': 6061, 'volume': 4962500, 'vwap': 385.86, 'lastSize': 100, 'turnover': 191478660110, 'homeNotional': 51897.8886294631, 'foreignNotional': 20024894.332964215}, {'timestamp': datetime.datetime(2020, 9, 12, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.8, 'high': 385.95, 'low': 382.75, 'close': 385.4, 'trades': 4359, 'volume': 3186095, 'vwap': 384.12, 'lastSize': 9400, 'turnover': 122383823475, 'homeNotional': 33304.19108004795, 'foreignNotional': 12792771.699999196}, {'timestamp': datetime.datetime(2020, 9, 12, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 374.4, 'high': 385.25, 'low': 374.4, 'close': 383.8, 'trades': 12822, 'volume': 9073982, 'vwap': 380.59, 'lastSize': 100, 'turnover': 345343039305, 'homeNotional': 94644.47844972921, 'foreignNotional': 36020954.837153494}] 2020-09-13 00:00:20 INFO: prepare candles [CandleItem(low=383.55, high=387.75, open=385.4, close=383.7, color='RED'), CandleItem(low=382.75, high=385.95, open=383.8, close=385.4, color='GREEN'), CandleItem(low=374.4, high=385.25, open=374.4, close=383.8, color='GREEN')] 2020-09-13 00:00:20 INFO: last_candle=CandleItem(low=383.55, high=387.75, open=385.4, close=383.7, color='RED') 2020-09-13 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-09-13 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=383.55, high=387.75, open=385.4, close=383.7, color='RED') 2020-09-13 00:00:20 INFO: skip by CandleItem(low=383.55, high=387.75, open=385.4, close=383.7, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-13 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-09-13 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=383.55, high=387.75, open=385.4, close=383.7, color='RED') 2020-09-13 00:00:20 INFO: skip by CandleItem(low=383.55, high=387.75, open=385.4, close=383.7, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-13 00:00:20 INFO: not found applicable config for candle 2020-09-13 00:00:20 INFO: check need new order None 2020-09-13 00:00:20 INFO: init new order end 2020-09-13 00:00:20 INFO: 2020-09-13 00:00:20 INFO: 2020-09-13 00:00:20 INFO: 2020-09-13 00:00:20 INFO: 2020-09-13 00:02:00 INFO: 2020-09-13 00:02:00 INFO: 2020-09-13 00:02:00 INFO: 2020-09-13 00:02:00 INFO: 2020-09-13 00:02:00 INFO: clearing start 2020-09-13 00:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '68e05e63-16a4-3d26-8288-1337b1615d5c', 'clOrdID': '36e41817ba744f61b875f34e228c3253', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': None, 'displayQty': None, 'stopPx': 367.45, '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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc())} 2020-09-13 00:02:00 INFO: skip by not found init order into storage 2020-09-13 00:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '9ff6e4d6-9ab4-e1e8-dccf-818d5a4e471d', 'clOrdID': '0e6b025321d245c381d9e37863aa42e0', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': 405.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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc())} 2020-09-13 00:02:00 INFO: skip by not found init order into storage 2020-09-13 00:02:00 INFO: clearing end 2020-09-13 00:02:00 INFO: 2020-09-13 00:02:00 INFO: 2020-09-13 00:02:00 INFO: 2020-09-13 00:02:00 INFO: 2020-09-13 01:00:20 INFO: 2020-09-13 01:00:20 INFO: 2020-09-13 01:00:20 INFO: 2020-09-13 01:00:20 INFO: 2020-09-13 01:00:20 INFO: init new order start 2020-09-13 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 12, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.7, 'high': 385.6, 'low': 383.5, 'close': 384.8, 'trades': 2239, 'volume': 1605626, 'vwap': 384.42, 'lastSize': 73, 'turnover': 61722120625, 'homeNotional': 16781.501815127427, 'foreignNotional': 6451009.035957503}, {'timestamp': datetime.datetime(2020, 9, 12, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.4, 'high': 387.75, 'low': 383.55, 'close': 383.7, 'trades': 6061, 'volume': 4962500, 'vwap': 385.86, 'lastSize': 100, 'turnover': 191478660110, 'homeNotional': 51897.8886294631, 'foreignNotional': 20024894.332964215}, {'timestamp': datetime.datetime(2020, 9, 12, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.8, 'high': 385.95, 'low': 382.75, 'close': 385.4, 'trades': 4359, 'volume': 3186095, 'vwap': 384.12, 'lastSize': 9400, 'turnover': 122383823475, 'homeNotional': 33304.19108004795, 'foreignNotional': 12792771.699999196}] 2020-09-13 01:00:20 INFO: prepare candles [CandleItem(low=383.5, high=385.6, open=383.7, close=384.8, color='GREEN'), CandleItem(low=383.55, high=387.75, open=385.4, close=383.7, color='RED'), CandleItem(low=382.75, high=385.95, open=383.8, close=385.4, color='GREEN')] 2020-09-13 01:00:20 INFO: skip by colors first_candle=CandleItem(low=382.75, high=385.95, open=383.8, close=385.4, color='GREEN') second_candle=CandleItem(low=383.55, high=387.75, open=385.4, close=383.7, color='RED') last_candle=CandleItem(low=383.5, high=385.6, open=383.7, close=384.8, color='GREEN') 2020-09-13 01:00:20 INFO: check need new order None 2020-09-13 01:00:20 INFO: init new order end 2020-09-13 01:00:20 INFO: 2020-09-13 01:00:20 INFO: 2020-09-13 01:00:20 INFO: 2020-09-13 01:00:20 INFO: 2020-09-13 01:02:00 INFO: 2020-09-13 01:02:00 INFO: 2020-09-13 01:02:00 INFO: 2020-09-13 01:02:00 INFO: 2020-09-13 01:02:00 INFO: clearing start 2020-09-13 01:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '68e05e63-16a4-3d26-8288-1337b1615d5c', 'clOrdID': '36e41817ba744f61b875f34e228c3253', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': None, 'displayQty': None, 'stopPx': 367.45, '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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc())} 2020-09-13 01:02:00 INFO: skip by not found init order into storage 2020-09-13 01:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '9ff6e4d6-9ab4-e1e8-dccf-818d5a4e471d', 'clOrdID': '0e6b025321d245c381d9e37863aa42e0', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': 405.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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc())} 2020-09-13 01:02:00 INFO: skip by not found init order into storage 2020-09-13 01:02:00 INFO: clearing end 2020-09-13 01:02:00 INFO: 2020-09-13 01:02:00 INFO: 2020-09-13 01:02:00 INFO: 2020-09-13 01:02:00 INFO: 2020-09-13 02:00:20 INFO: 2020-09-13 02:00:20 INFO: 2020-09-13 02:00:20 INFO: 2020-09-13 02:00:20 INFO: 2020-09-13 02:00:20 INFO: init new order start 2020-09-13 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 12, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.8, 'high': 386.0, 'low': 382.85, 'close': 385.6, 'trades': 4727, 'volume': 3526206, 'vwap': 384.8, 'lastSize': 100, 'turnover': 135685256655, 'homeNotional': 36819.91834057917, 'foreignNotional': 14168010.575937074}, {'timestamp': datetime.datetime(2020, 9, 12, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.7, 'high': 385.6, 'low': 383.5, 'close': 384.8, 'trades': 2239, 'volume': 1605626, 'vwap': 384.42, 'lastSize': 73, 'turnover': 61722120625, 'homeNotional': 16781.501815127427, 'foreignNotional': 6451009.035957503}, {'timestamp': datetime.datetime(2020, 9, 12, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.4, 'high': 387.75, 'low': 383.55, 'close': 383.7, 'trades': 6061, 'volume': 4962500, 'vwap': 385.86, 'lastSize': 100, 'turnover': 191478660110, 'homeNotional': 51897.8886294631, 'foreignNotional': 20024894.332964215}] 2020-09-13 02:00:20 INFO: prepare candles [CandleItem(low=382.85, high=386.0, open=384.8, close=385.6, color='GREEN'), CandleItem(low=383.5, high=385.6, open=383.7, close=384.8, color='GREEN'), CandleItem(low=383.55, high=387.75, open=385.4, close=383.7, color='RED')] 2020-09-13 02:00:20 INFO: skip by colors first_candle=CandleItem(low=383.55, high=387.75, open=385.4, close=383.7, color='RED') second_candle=CandleItem(low=383.5, high=385.6, open=383.7, close=384.8, color='GREEN') last_candle=CandleItem(low=382.85, high=386.0, open=384.8, close=385.6, color='GREEN') 2020-09-13 02:00:20 INFO: check need new order None 2020-09-13 02:00:20 INFO: init new order end 2020-09-13 02:00:20 INFO: 2020-09-13 02:00:20 INFO: 2020-09-13 02:00:20 INFO: 2020-09-13 02:00:20 INFO: 2020-09-13 02:02:00 INFO: 2020-09-13 02:02:00 INFO: 2020-09-13 02:02:00 INFO: 2020-09-13 02:02:00 INFO: 2020-09-13 02:02:00 INFO: clearing start 2020-09-13 02:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '68e05e63-16a4-3d26-8288-1337b1615d5c', 'clOrdID': '36e41817ba744f61b875f34e228c3253', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': None, 'displayQty': None, 'stopPx': 367.45, '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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc())} 2020-09-13 02:02:00 INFO: skip by not found init order into storage 2020-09-13 02:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '9ff6e4d6-9ab4-e1e8-dccf-818d5a4e471d', 'clOrdID': '0e6b025321d245c381d9e37863aa42e0', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': 405.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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc())} 2020-09-13 02:02:00 INFO: skip by not found init order into storage 2020-09-13 02:02:00 INFO: clearing end 2020-09-13 02:02:00 INFO: 2020-09-13 02:02:00 INFO: 2020-09-13 02:02:00 INFO: 2020-09-13 02:02:00 INFO: 2020-09-13 03:00:20 INFO: 2020-09-13 03:00:20 INFO: 2020-09-13 03:00:20 INFO: 2020-09-13 03:00:20 INFO: 2020-09-13 03:00:20 INFO: init new order start 2020-09-13 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 13, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.6, 'high': 389.05, 'low': 384.35, 'close': 388.6, 'trades': 4593, 'volume': 3340432, 'vwap': 386.75, 'lastSize': 89, 'turnover': 129190745740, 'homeNotional': 34861.81823943918, 'foreignNotional': 13482783.774195764}, {'timestamp': datetime.datetime(2020, 9, 12, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.8, 'high': 386.0, 'low': 382.85, 'close': 385.6, 'trades': 4727, 'volume': 3526206, 'vwap': 384.8, 'lastSize': 100, 'turnover': 135685256655, 'homeNotional': 36819.91834057917, 'foreignNotional': 14168010.575937074}, {'timestamp': datetime.datetime(2020, 9, 12, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.7, 'high': 385.6, 'low': 383.5, 'close': 384.8, 'trades': 2239, 'volume': 1605626, 'vwap': 384.42, 'lastSize': 73, 'turnover': 61722120625, 'homeNotional': 16781.501815127427, 'foreignNotional': 6451009.035957503}] 2020-09-13 03:00:20 INFO: prepare candles [CandleItem(low=384.35, high=389.05, open=385.6, close=388.6, color='GREEN'), CandleItem(low=382.85, high=386.0, open=384.8, close=385.6, color='GREEN'), CandleItem(low=383.5, high=385.6, open=383.7, close=384.8, color='GREEN')] 2020-09-13 03:00:20 INFO: skip by colors first_candle=CandleItem(low=383.5, high=385.6, open=383.7, close=384.8, color='GREEN') second_candle=CandleItem(low=382.85, high=386.0, open=384.8, close=385.6, color='GREEN') last_candle=CandleItem(low=384.35, high=389.05, open=385.6, close=388.6, color='GREEN') 2020-09-13 03:00:20 INFO: check need new order None 2020-09-13 03:00:20 INFO: init new order end 2020-09-13 03:00:20 INFO: 2020-09-13 03:00:20 INFO: 2020-09-13 03:00:20 INFO: 2020-09-13 03:00:20 INFO: 2020-09-13 03:02:00 INFO: 2020-09-13 03:02:00 INFO: 2020-09-13 03:02:00 INFO: 2020-09-13 03:02:00 INFO: 2020-09-13 03:02:00 INFO: clearing start 2020-09-13 03:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '68e05e63-16a4-3d26-8288-1337b1615d5c', 'clOrdID': '36e41817ba744f61b875f34e228c3253', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': None, 'displayQty': None, 'stopPx': 367.45, '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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc())} 2020-09-13 03:02:00 INFO: skip by not found init order into storage 2020-09-13 03:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '9ff6e4d6-9ab4-e1e8-dccf-818d5a4e471d', 'clOrdID': '0e6b025321d245c381d9e37863aa42e0', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': 405.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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc())} 2020-09-13 03:02:00 INFO: skip by not found init order into storage 2020-09-13 03:02:00 INFO: clearing end 2020-09-13 03:02:00 INFO: 2020-09-13 03:02:00 INFO: 2020-09-13 03:02:00 INFO: 2020-09-13 03:02:00 INFO: 2020-09-13 04:00:20 INFO: 2020-09-13 04:00:20 INFO: 2020-09-13 04:00:20 INFO: 2020-09-13 04:00:20 INFO: 2020-09-13 04:00:20 INFO: init new order start 2020-09-13 04:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 13, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.6, 'high': 389.3, 'low': 384.1, 'close': 385.0, 'trades': 3233, 'volume': 2531227, 'vwap': 386.5, 'lastSize': 1, 'turnover': 97831576740, 'homeNotional': 26410.208636366515, 'foreignNotional': 10207522.11679742}, {'timestamp': datetime.datetime(2020, 9, 13, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.6, 'high': 389.05, 'low': 384.35, 'close': 388.6, 'trades': 4593, 'volume': 3340432, 'vwap': 386.75, 'lastSize': 89, 'turnover': 129190745740, 'homeNotional': 34861.81823943918, 'foreignNotional': 13482783.774195764}, {'timestamp': datetime.datetime(2020, 9, 12, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.8, 'high': 386.0, 'low': 382.85, 'close': 385.6, 'trades': 4727, 'volume': 3526206, 'vwap': 384.8, 'lastSize': 100, 'turnover': 135685256655, 'homeNotional': 36819.91834057917, 'foreignNotional': 14168010.575937074}] 2020-09-13 04:00:20 INFO: prepare candles [CandleItem(low=384.1, high=389.3, open=388.6, close=385.0, color='RED'), CandleItem(low=384.35, high=389.05, open=385.6, close=388.6, color='GREEN'), CandleItem(low=382.85, high=386.0, open=384.8, close=385.6, color='GREEN')] 2020-09-13 04:00:20 INFO: last_candle=CandleItem(low=384.1, high=389.3, open=388.6, close=385.0, color='RED') 2020-09-13 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-09-13 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=384.1, high=389.3, open=388.6, close=385.0, color='RED') 2020-09-13 04:00:20 INFO: skip by CandleItem(low=384.1, high=389.3, open=388.6, close=385.0, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-13 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-09-13 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=384.1, high=389.3, open=388.6, close=385.0, color='RED') 2020-09-13 04:00:20 INFO: skip by CandleItem(low=384.1, high=389.3, open=388.6, close=385.0, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-13 04:00:20 INFO: not found applicable config for candle 2020-09-13 04:00:20 INFO: check need new order None 2020-09-13 04:00:20 INFO: init new order end 2020-09-13 04:00:20 INFO: 2020-09-13 04:00:20 INFO: 2020-09-13 04:00:20 INFO: 2020-09-13 04:00:20 INFO: 2020-09-13 04:02:00 INFO: 2020-09-13 04:02:00 INFO: 2020-09-13 04:02:00 INFO: 2020-09-13 04:02:00 INFO: 2020-09-13 04:02:00 INFO: clearing start 2020-09-13 04:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '68e05e63-16a4-3d26-8288-1337b1615d5c', 'clOrdID': '36e41817ba744f61b875f34e228c3253', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': None, 'displayQty': None, 'stopPx': 367.45, '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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc())} 2020-09-13 04:02:00 INFO: skip by not found init order into storage 2020-09-13 04:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '9ff6e4d6-9ab4-e1e8-dccf-818d5a4e471d', 'clOrdID': '0e6b025321d245c381d9e37863aa42e0', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': 405.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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc())} 2020-09-13 04:02:00 INFO: skip by not found init order into storage 2020-09-13 04:02:00 INFO: clearing end 2020-09-13 04:02:00 INFO: 2020-09-13 04:02:00 INFO: 2020-09-13 04:02:00 INFO: 2020-09-13 04:02:00 INFO: 2020-09-13 05:00:20 INFO: 2020-09-13 05:00:20 INFO: 2020-09-13 05:00:20 INFO: 2020-09-13 05:00:20 INFO: 2020-09-13 05:00:20 INFO: init new order start 2020-09-13 05:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 13, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.0, 'high': 386.0, 'low': 383.7, 'close': 384.6, 'trades': 2004, 'volume': 1288419, 'vwap': 384.54, 'lastSize': 35, 'turnover': 49544474730, 'homeNotional': 13431.341160537373, 'foreignNotional': 5164852.600438455}, {'timestamp': datetime.datetime(2020, 9, 13, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.6, 'high': 389.3, 'low': 384.1, 'close': 385.0, 'trades': 3233, 'volume': 2531227, 'vwap': 386.5, 'lastSize': 1, 'turnover': 97831576740, 'homeNotional': 26410.208636366515, 'foreignNotional': 10207522.11679742}, {'timestamp': datetime.datetime(2020, 9, 13, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.6, 'high': 389.05, 'low': 384.35, 'close': 388.6, 'trades': 4593, 'volume': 3340432, 'vwap': 386.75, 'lastSize': 89, 'turnover': 129190745740, 'homeNotional': 34861.81823943918, 'foreignNotional': 13482783.774195764}] 2020-09-13 05:00:20 INFO: prepare candles [CandleItem(low=383.7, high=386.0, open=385.0, close=384.6, color='RED'), CandleItem(low=384.1, high=389.3, open=388.6, close=385.0, color='RED'), CandleItem(low=384.35, high=389.05, open=385.6, close=388.6, color='GREEN')] 2020-09-13 05:00:20 INFO: skip by colors first_candle=CandleItem(low=384.35, high=389.05, open=385.6, close=388.6, color='GREEN') second_candle=CandleItem(low=384.1, high=389.3, open=388.6, close=385.0, color='RED') last_candle=CandleItem(low=383.7, high=386.0, open=385.0, close=384.6, color='RED') 2020-09-13 05:00:20 INFO: check need new order None 2020-09-13 05:00:20 INFO: init new order end 2020-09-13 05:00:20 INFO: 2020-09-13 05:00:20 INFO: 2020-09-13 05:00:20 INFO: 2020-09-13 05:00:20 INFO: 2020-09-13 05:02:00 INFO: 2020-09-13 05:02:00 INFO: 2020-09-13 05:02:00 INFO: 2020-09-13 05:02:00 INFO: 2020-09-13 05:02:00 INFO: clearing start 2020-09-13 05:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '68e05e63-16a4-3d26-8288-1337b1615d5c', 'clOrdID': '36e41817ba744f61b875f34e228c3253', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': None, 'displayQty': None, 'stopPx': 367.45, '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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc())} 2020-09-13 05:02:00 INFO: skip by not found init order into storage 2020-09-13 05:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '9ff6e4d6-9ab4-e1e8-dccf-818d5a4e471d', 'clOrdID': '0e6b025321d245c381d9e37863aa42e0', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': 405.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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc())} 2020-09-13 05:02:00 INFO: skip by not found init order into storage 2020-09-13 05:02:00 INFO: clearing end 2020-09-13 05:02:00 INFO: 2020-09-13 05:02:00 INFO: 2020-09-13 05:02:00 INFO: 2020-09-13 05:02:00 INFO: 2020-09-13 06:00:20 INFO: 2020-09-13 06:00:20 INFO: 2020-09-13 06:00:20 INFO: 2020-09-13 06:00:20 INFO: 2020-09-13 06:00:20 INFO: init new order start 2020-09-13 06:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 13, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.6, 'high': 386.9, 'low': 383.75, 'close': 385.95, 'trades': 1818, 'volume': 1358156, 'vwap': 385.61, 'lastSize': 2600, 'turnover': 52371785270, 'homeNotional': 14180.172347202893, 'foreignNotional': 5468012.20379435}, {'timestamp': datetime.datetime(2020, 9, 13, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.0, 'high': 386.0, 'low': 383.7, 'close': 384.6, 'trades': 2004, 'volume': 1288419, 'vwap': 384.54, 'lastSize': 35, 'turnover': 49544474730, 'homeNotional': 13431.341160537373, 'foreignNotional': 5164852.600438455}, {'timestamp': datetime.datetime(2020, 9, 13, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.6, 'high': 389.3, 'low': 384.1, 'close': 385.0, 'trades': 3233, 'volume': 2531227, 'vwap': 386.5, 'lastSize': 1, 'turnover': 97831576740, 'homeNotional': 26410.208636366515, 'foreignNotional': 10207522.11679742}] 2020-09-13 06:00:21 INFO: prepare candles [CandleItem(low=383.75, high=386.9, open=384.6, close=385.95, color='GREEN'), CandleItem(low=383.7, high=386.0, open=385.0, close=384.6, color='RED'), CandleItem(low=384.1, high=389.3, open=388.6, close=385.0, color='RED')] 2020-09-13 06:00:21 INFO: last_candle=CandleItem(low=383.75, high=386.9, open=384.6, close=385.95, color='GREEN') 2020-09-13 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-09-13 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=383.75, high=386.9, open=384.6, close=385.95, color='GREEN') 2020-09-13 06:00:21 INFO: skip by CandleItem(low=383.75, high=386.9, open=384.6, close=385.95, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-13 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-09-13 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=383.75, high=386.9, open=384.6, close=385.95, color='GREEN') 2020-09-13 06:00:21 INFO: skip by CandleItem(low=383.75, high=386.9, open=384.6, close=385.95, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-13 06:00:21 INFO: not found applicable config for candle 2020-09-13 06:00:21 INFO: check need new order None 2020-09-13 06:00:21 INFO: init new order end 2020-09-13 06:00:21 INFO: 2020-09-13 06:00:21 INFO: 2020-09-13 06:00:21 INFO: 2020-09-13 06:00:21 INFO: 2020-09-13 06:02:00 INFO: 2020-09-13 06:02:00 INFO: 2020-09-13 06:02:00 INFO: 2020-09-13 06:02:00 INFO: 2020-09-13 06:02:00 INFO: clearing start 2020-09-13 06:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '68e05e63-16a4-3d26-8288-1337b1615d5c', 'clOrdID': '36e41817ba744f61b875f34e228c3253', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': None, 'displayQty': None, 'stopPx': 367.45, '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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc())} 2020-09-13 06:02:00 INFO: skip by not found init order into storage 2020-09-13 06:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '9ff6e4d6-9ab4-e1e8-dccf-818d5a4e471d', 'clOrdID': '0e6b025321d245c381d9e37863aa42e0', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': 405.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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc())} 2020-09-13 06:02:00 INFO: skip by not found init order into storage 2020-09-13 06:02:00 INFO: clearing end 2020-09-13 06:02:00 INFO: 2020-09-13 06:02:00 INFO: 2020-09-13 06:02:00 INFO: 2020-09-13 06:02:00 INFO: 2020-09-13 07:00:20 INFO: 2020-09-13 07:00:20 INFO: 2020-09-13 07:00:20 INFO: 2020-09-13 07:00:20 INFO: 2020-09-13 07:00:20 INFO: init new order start 2020-09-13 07:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 13, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.95, 'high': 390.5, 'low': 385.4, 'close': 389.65, 'trades': 3581, 'volume': 3226287, 'vwap': 388.55, 'lastSize': 100, 'turnover': 125354591165, 'homeNotional': 33924.97108509842, 'foreignNotional': 13181448.871159626}, {'timestamp': datetime.datetime(2020, 9, 13, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.6, 'high': 386.9, 'low': 383.75, 'close': 385.95, 'trades': 1818, 'volume': 1358156, 'vwap': 385.61, 'lastSize': 2600, 'turnover': 52371785270, 'homeNotional': 14180.172347202893, 'foreignNotional': 5468012.20379435}, {'timestamp': datetime.datetime(2020, 9, 13, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.0, 'high': 386.0, 'low': 383.7, 'close': 384.6, 'trades': 2004, 'volume': 1288419, 'vwap': 384.54, 'lastSize': 35, 'turnover': 49544474730, 'homeNotional': 13431.341160537373, 'foreignNotional': 5164852.600438455}] 2020-09-13 07:00:20 INFO: prepare candles [CandleItem(low=385.4, high=390.5, open=385.95, close=389.65, color='GREEN'), CandleItem(low=383.75, high=386.9, open=384.6, close=385.95, color='GREEN'), CandleItem(low=383.7, high=386.0, open=385.0, close=384.6, color='RED')] 2020-09-13 07:00:20 INFO: skip by colors first_candle=CandleItem(low=383.7, high=386.0, open=385.0, close=384.6, color='RED') second_candle=CandleItem(low=383.75, high=386.9, open=384.6, close=385.95, color='GREEN') last_candle=CandleItem(low=385.4, high=390.5, open=385.95, close=389.65, color='GREEN') 2020-09-13 07:00:20 INFO: check need new order None 2020-09-13 07:00:20 INFO: init new order end 2020-09-13 07:00:20 INFO: 2020-09-13 07:00:20 INFO: 2020-09-13 07:00:20 INFO: 2020-09-13 07:00:20 INFO: 2020-09-13 07:02:00 INFO: 2020-09-13 07:02:01 INFO: 2020-09-13 07:02:01 INFO: 2020-09-13 07:02:01 INFO: 2020-09-13 07:02:01 INFO: clearing start 2020-09-13 07:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '68e05e63-16a4-3d26-8288-1337b1615d5c', 'clOrdID': '36e41817ba744f61b875f34e228c3253', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': None, 'displayQty': None, 'stopPx': 367.45, '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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc())} 2020-09-13 07:02:01 INFO: skip by not found init order into storage 2020-09-13 07:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '9ff6e4d6-9ab4-e1e8-dccf-818d5a4e471d', 'clOrdID': '0e6b025321d245c381d9e37863aa42e0', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': 405.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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc())} 2020-09-13 07:02:01 INFO: skip by not found init order into storage 2020-09-13 07:02:01 INFO: clearing end 2020-09-13 07:02:01 INFO: 2020-09-13 07:02:01 INFO: 2020-09-13 07:02:01 INFO: 2020-09-13 07:02:01 INFO: 2020-09-13 08:00:20 INFO: 2020-09-13 08:00:20 INFO: 2020-09-13 08:00:20 INFO: 2020-09-13 08:00:20 INFO: 2020-09-13 08:00:20 INFO: init new order start 2020-09-13 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 13, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.65, 'high': 391.8, 'low': 385.7, 'close': 387.0, 'trades': 4261, 'volume': 3842435, 'vwap': 387.91, 'lastSize': 2500, 'turnover': 149050185875, 'homeNotional': 40531.21188139608, 'foreignNotional': 15722358.151547538}, {'timestamp': datetime.datetime(2020, 9, 13, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.95, 'high': 390.5, 'low': 385.4, 'close': 389.65, 'trades': 3581, 'volume': 3226287, 'vwap': 388.55, 'lastSize': 100, 'turnover': 125354591165, 'homeNotional': 33924.97108509842, 'foreignNotional': 13181448.871159626}, {'timestamp': datetime.datetime(2020, 9, 13, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.6, 'high': 386.9, 'low': 383.75, 'close': 385.95, 'trades': 1818, 'volume': 1358156, 'vwap': 385.61, 'lastSize': 2600, 'turnover': 52371785270, 'homeNotional': 14180.172347202893, 'foreignNotional': 5468012.20379435}] 2020-09-13 08:00:20 INFO: prepare candles [CandleItem(low=385.7, high=391.8, open=389.65, close=387.0, color='RED'), CandleItem(low=385.4, high=390.5, open=385.95, close=389.65, color='GREEN'), CandleItem(low=383.75, high=386.9, open=384.6, close=385.95, color='GREEN')] 2020-09-13 08:00:20 INFO: last_candle=CandleItem(low=385.7, high=391.8, open=389.65, close=387.0, color='RED') 2020-09-13 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-13 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=385.7, high=391.8, open=389.65, close=387.0, color='RED') 2020-09-13 08:00:20 INFO: skip by CandleItem(low=385.7, high=391.8, open=389.65, close=387.0, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-13 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-13 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=385.7, high=391.8, open=389.65, close=387.0, color='RED') 2020-09-13 08:00:20 INFO: skip by CandleItem(low=385.7, high=391.8, open=389.65, close=387.0, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-13 08:00:20 INFO: not found applicable config for candle 2020-09-13 08:00:20 INFO: check need new order None 2020-09-13 08:00:20 INFO: init new order end 2020-09-13 08:00:20 INFO: 2020-09-13 08:00:20 INFO: 2020-09-13 08:00:20 INFO: 2020-09-13 08:00:20 INFO: 2020-09-13 08:02:00 INFO: 2020-09-13 08:02:00 INFO: 2020-09-13 08:02:00 INFO: 2020-09-13 08:02:00 INFO: 2020-09-13 08:02:00 INFO: clearing start 2020-09-13 08:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '68e05e63-16a4-3d26-8288-1337b1615d5c', 'clOrdID': '36e41817ba744f61b875f34e228c3253', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': None, 'displayQty': None, 'stopPx': 367.45, '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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc())} 2020-09-13 08:02:00 INFO: skip by not found init order into storage 2020-09-13 08:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '9ff6e4d6-9ab4-e1e8-dccf-818d5a4e471d', 'clOrdID': '0e6b025321d245c381d9e37863aa42e0', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': 405.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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc())} 2020-09-13 08:02:00 INFO: skip by not found init order into storage 2020-09-13 08:02:00 INFO: clearing end 2020-09-13 08:02:00 INFO: 2020-09-13 08:02:00 INFO: 2020-09-13 08:02:00 INFO: 2020-09-13 08:02:00 INFO: 2020-09-13 09:00:20 INFO: 2020-09-13 09:00:20 INFO: 2020-09-13 09:00:20 INFO: 2020-09-13 09:00:20 INFO: 2020-09-13 09:00:20 INFO: init new order start 2020-09-13 09:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 13, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.0, 'high': 389.0, 'low': 386.3, 'close': 387.95, 'trades': 2001, 'volume': 1209186, 'vwap': 387.42, 'lastSize': 500, 'turnover': 46845665620, 'homeNotional': 12739.585573973745, 'foreignNotional': 4935506.494431887}, {'timestamp': datetime.datetime(2020, 9, 13, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.65, 'high': 391.8, 'low': 385.7, 'close': 387.0, 'trades': 4261, 'volume': 3842435, 'vwap': 387.91, 'lastSize': 2500, 'turnover': 149050185875, 'homeNotional': 40531.21188139608, 'foreignNotional': 15722358.151547538}, {'timestamp': datetime.datetime(2020, 9, 13, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.95, 'high': 390.5, 'low': 385.4, 'close': 389.65, 'trades': 3581, 'volume': 3226287, 'vwap': 388.55, 'lastSize': 100, 'turnover': 125354591165, 'homeNotional': 33924.97108509842, 'foreignNotional': 13181448.871159626}] 2020-09-13 09:00:20 INFO: prepare candles [CandleItem(low=386.3, high=389.0, open=387.0, close=387.95, color='GREEN'), CandleItem(low=385.7, high=391.8, open=389.65, close=387.0, color='RED'), CandleItem(low=385.4, high=390.5, open=385.95, close=389.65, color='GREEN')] 2020-09-13 09:00:20 INFO: skip by colors first_candle=CandleItem(low=385.4, high=390.5, open=385.95, close=389.65, color='GREEN') second_candle=CandleItem(low=385.7, high=391.8, open=389.65, close=387.0, color='RED') last_candle=CandleItem(low=386.3, high=389.0, open=387.0, close=387.95, color='GREEN') 2020-09-13 09:00:20 INFO: check need new order None 2020-09-13 09:00:20 INFO: init new order end 2020-09-13 09:00:20 INFO: 2020-09-13 09:00:20 INFO: 2020-09-13 09:00:20 INFO: 2020-09-13 09:00:20 INFO: 2020-09-13 09:02:00 INFO: 2020-09-13 09:02:00 INFO: 2020-09-13 09:02:00 INFO: 2020-09-13 09:02:00 INFO: 2020-09-13 09:02:00 INFO: clearing start 2020-09-13 09:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '68e05e63-16a4-3d26-8288-1337b1615d5c', 'clOrdID': '36e41817ba744f61b875f34e228c3253', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': None, 'displayQty': None, 'stopPx': 367.45, '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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc())} 2020-09-13 09:02:00 INFO: skip by not found init order into storage 2020-09-13 09:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '9ff6e4d6-9ab4-e1e8-dccf-818d5a4e471d', 'clOrdID': '0e6b025321d245c381d9e37863aa42e0', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': 405.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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc())} 2020-09-13 09:02:00 INFO: skip by not found init order into storage 2020-09-13 09:02:00 INFO: clearing end 2020-09-13 09:02:00 INFO: 2020-09-13 09:02:00 INFO: 2020-09-13 09:02:00 INFO: 2020-09-13 09:02:00 INFO: 2020-09-13 10:00:20 INFO: 2020-09-13 10:00:20 INFO: 2020-09-13 10:00:20 INFO: 2020-09-13 10:00:20 INFO: 2020-09-13 10:00:20 INFO: init new order start 2020-09-13 10:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 13, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.95, 'high': 389.05, 'low': 386.45, 'close': 386.7, 'trades': 1504, 'volume': 1087949, 'vwap': 387.61, 'lastSize': 100, 'turnover': 42169369485, 'homeNotional': 11464.278778762553, 'foreignNotional': 4443610.224417528}, {'timestamp': datetime.datetime(2020, 9, 13, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.0, 'high': 389.0, 'low': 386.3, 'close': 387.95, 'trades': 2001, 'volume': 1209186, 'vwap': 387.42, 'lastSize': 500, 'turnover': 46845665620, 'homeNotional': 12739.585573973745, 'foreignNotional': 4935506.494431887}, {'timestamp': datetime.datetime(2020, 9, 13, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.65, 'high': 391.8, 'low': 385.7, 'close': 387.0, 'trades': 4261, 'volume': 3842435, 'vwap': 387.91, 'lastSize': 2500, 'turnover': 149050185875, 'homeNotional': 40531.21188139608, 'foreignNotional': 15722358.151547538}] 2020-09-13 10:00:20 INFO: prepare candles [CandleItem(low=386.45, high=389.05, open=387.95, close=386.7, color='RED'), CandleItem(low=386.3, high=389.0, open=387.0, close=387.95, color='GREEN'), CandleItem(low=385.7, high=391.8, open=389.65, close=387.0, color='RED')] 2020-09-13 10:00:20 INFO: skip by colors first_candle=CandleItem(low=385.7, high=391.8, open=389.65, close=387.0, color='RED') second_candle=CandleItem(low=386.3, high=389.0, open=387.0, close=387.95, color='GREEN') last_candle=CandleItem(low=386.45, high=389.05, open=387.95, close=386.7, color='RED') 2020-09-13 10:00:20 INFO: check need new order None 2020-09-13 10:00:20 INFO: init new order end 2020-09-13 10:00:20 INFO: 2020-09-13 10:00:20 INFO: 2020-09-13 10:00:20 INFO: 2020-09-13 10:00:20 INFO: 2020-09-13 10:02:00 INFO: 2020-09-13 10:02:00 INFO: 2020-09-13 10:02:00 INFO: 2020-09-13 10:02:00 INFO: 2020-09-13 10:02:00 INFO: clearing start 2020-09-13 10:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '68e05e63-16a4-3d26-8288-1337b1615d5c', 'clOrdID': '36e41817ba744f61b875f34e228c3253', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': None, 'displayQty': None, 'stopPx': 367.45, '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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc())} 2020-09-13 10:02:00 INFO: skip by not found init order into storage 2020-09-13 10:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '9ff6e4d6-9ab4-e1e8-dccf-818d5a4e471d', 'clOrdID': '0e6b025321d245c381d9e37863aa42e0', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': 405.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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc())} 2020-09-13 10:02:00 INFO: skip by not found init order into storage 2020-09-13 10:02:00 INFO: clearing end 2020-09-13 10:02:00 INFO: 2020-09-13 10:02:00 INFO: 2020-09-13 10:02:00 INFO: 2020-09-13 10:02:00 INFO: 2020-09-13 11:00:20 INFO: 2020-09-13 11:00:20 INFO: 2020-09-13 11:00:20 INFO: 2020-09-13 11:00:20 INFO: 2020-09-13 11:00:20 INFO: init new order start 2020-09-13 11:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 13, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.7, 'high': 388.3, 'low': 386.4, 'close': 387.65, 'trades': 1544, 'volume': 1414634, 'vwap': 387.64, 'lastSize': 200, 'turnover': 54836818055, 'homeNotional': 14910.071176247766, 'foreignNotional': 5779739.774465661}, {'timestamp': datetime.datetime(2020, 9, 13, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.95, 'high': 389.05, 'low': 386.45, 'close': 386.7, 'trades': 1504, 'volume': 1087949, 'vwap': 387.61, 'lastSize': 100, 'turnover': 42169369485, 'homeNotional': 11464.278778762553, 'foreignNotional': 4443610.224417528}, {'timestamp': datetime.datetime(2020, 9, 13, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.0, 'high': 389.0, 'low': 386.3, 'close': 387.95, 'trades': 2001, 'volume': 1209186, 'vwap': 387.42, 'lastSize': 500, 'turnover': 46845665620, 'homeNotional': 12739.585573973745, 'foreignNotional': 4935506.494431887}] 2020-09-13 11:00:20 INFO: prepare candles [CandleItem(low=386.4, high=388.3, open=386.7, close=387.65, color='GREEN'), CandleItem(low=386.45, high=389.05, open=387.95, close=386.7, color='RED'), CandleItem(low=386.3, high=389.0, open=387.0, close=387.95, color='GREEN')] 2020-09-13 11:00:20 INFO: skip by colors first_candle=CandleItem(low=386.3, high=389.0, open=387.0, close=387.95, color='GREEN') second_candle=CandleItem(low=386.45, high=389.05, open=387.95, close=386.7, color='RED') last_candle=CandleItem(low=386.4, high=388.3, open=386.7, close=387.65, color='GREEN') 2020-09-13 11:00:20 INFO: check need new order None 2020-09-13 11:00:20 INFO: init new order end 2020-09-13 11:00:20 INFO: 2020-09-13 11:00:20 INFO: 2020-09-13 11:00:20 INFO: 2020-09-13 11:00:20 INFO: 2020-09-13 11:02:00 INFO: 2020-09-13 11:02:00 INFO: 2020-09-13 11:02:00 INFO: 2020-09-13 11:02:00 INFO: 2020-09-13 11:02:00 INFO: clearing start 2020-09-13 11:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '68e05e63-16a4-3d26-8288-1337b1615d5c', 'clOrdID': '36e41817ba744f61b875f34e228c3253', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': None, 'displayQty': None, 'stopPx': 367.45, '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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc())} 2020-09-13 11:02:01 INFO: skip by not found init order into storage 2020-09-13 11:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '9ff6e4d6-9ab4-e1e8-dccf-818d5a4e471d', 'clOrdID': '0e6b025321d245c381d9e37863aa42e0', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': 405.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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc())} 2020-09-13 11:02:01 INFO: skip by not found init order into storage 2020-09-13 11:02:01 INFO: clearing end 2020-09-13 11:02:01 INFO: 2020-09-13 11:02:01 INFO: 2020-09-13 11:02:01 INFO: 2020-09-13 11:02:01 INFO: 2020-09-13 12:00:20 INFO: 2020-09-13 12:00:20 INFO: 2020-09-13 12:00:20 INFO: 2020-09-13 12:00:20 INFO: 2020-09-13 12:00:20 INFO: init new order start 2020-09-13 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 13, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.65, 'high': 389.3, 'low': 384.2, 'close': 386.3, 'trades': 3991, 'volume': 4055576, 'vwap': 386.14, 'lastSize': 1407, 'turnover': 156600130940, 'homeNotional': 42757.05233226231, 'foreignNotional': 16510050.503707998}, {'timestamp': datetime.datetime(2020, 9, 13, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.7, 'high': 388.3, 'low': 386.4, 'close': 387.65, 'trades': 1544, 'volume': 1414634, 'vwap': 387.64, 'lastSize': 200, 'turnover': 54836818055, 'homeNotional': 14910.071176247766, 'foreignNotional': 5779739.774465661}, {'timestamp': datetime.datetime(2020, 9, 13, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.95, 'high': 389.05, 'low': 386.45, 'close': 386.7, 'trades': 1504, 'volume': 1087949, 'vwap': 387.61, 'lastSize': 100, 'turnover': 42169369485, 'homeNotional': 11464.278778762553, 'foreignNotional': 4443610.224417528}] 2020-09-13 12:00:20 INFO: prepare candles [CandleItem(low=384.2, high=389.3, open=387.65, close=386.3, color='RED'), CandleItem(low=386.4, high=388.3, open=386.7, close=387.65, color='GREEN'), CandleItem(low=386.45, high=389.05, open=387.95, close=386.7, color='RED')] 2020-09-13 12:00:20 INFO: skip by colors first_candle=CandleItem(low=386.45, high=389.05, open=387.95, close=386.7, color='RED') second_candle=CandleItem(low=386.4, high=388.3, open=386.7, close=387.65, color='GREEN') last_candle=CandleItem(low=384.2, high=389.3, open=387.65, close=386.3, color='RED') 2020-09-13 12:00:20 INFO: check need new order None 2020-09-13 12:00:20 INFO: init new order end 2020-09-13 12:00:20 INFO: 2020-09-13 12:00:20 INFO: 2020-09-13 12:00:20 INFO: 2020-09-13 12:00:20 INFO: 2020-09-13 12:02:00 INFO: 2020-09-13 12:02:00 INFO: 2020-09-13 12:02:00 INFO: 2020-09-13 12:02:00 INFO: 2020-09-13 12:02:00 INFO: clearing start 2020-09-13 12:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '68e05e63-16a4-3d26-8288-1337b1615d5c', 'clOrdID': '36e41817ba744f61b875f34e228c3253', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': None, 'displayQty': None, 'stopPx': 367.45, '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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc())} 2020-09-13 12:02:00 INFO: skip by not found init order into storage 2020-09-13 12:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '9ff6e4d6-9ab4-e1e8-dccf-818d5a4e471d', 'clOrdID': '0e6b025321d245c381d9e37863aa42e0', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': 405.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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc())} 2020-09-13 12:02:00 INFO: skip by not found init order into storage 2020-09-13 12:02:00 INFO: clearing end 2020-09-13 12:02:00 INFO: 2020-09-13 12:02:00 INFO: 2020-09-13 12:02:00 INFO: 2020-09-13 12:02:00 INFO: 2020-09-13 13:00:20 INFO: 2020-09-13 13:00:20 INFO: 2020-09-13 13:00:20 INFO: 2020-09-13 13:00:20 INFO: 2020-09-13 13:00:20 INFO: init new order start 2020-09-13 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 13, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.3, 'high': 387.3, 'low': 381.2, 'close': 382.75, 'trades': 5184, 'volume': 5398232, 'vwap': 384.32, 'lastSize': 300, 'turnover': 207462487650, 'homeNotional': 56771.80700561148, 'foreignNotional': 21818500.20013839}, {'timestamp': datetime.datetime(2020, 9, 13, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.65, 'high': 389.3, 'low': 384.2, 'close': 386.3, 'trades': 3991, 'volume': 4055576, 'vwap': 386.14, 'lastSize': 1407, 'turnover': 156600130940, 'homeNotional': 42757.05233226231, 'foreignNotional': 16510050.503707998}, {'timestamp': datetime.datetime(2020, 9, 13, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.7, 'high': 388.3, 'low': 386.4, 'close': 387.65, 'trades': 1544, 'volume': 1414634, 'vwap': 387.64, 'lastSize': 200, 'turnover': 54836818055, 'homeNotional': 14910.071176247766, 'foreignNotional': 5779739.774465661}] 2020-09-13 13:00:20 INFO: prepare candles [CandleItem(low=381.2, high=387.3, open=386.3, close=382.75, color='RED'), CandleItem(low=384.2, high=389.3, open=387.65, close=386.3, color='RED'), CandleItem(low=386.4, high=388.3, open=386.7, close=387.65, color='GREEN')] 2020-09-13 13:00:20 INFO: skip by colors first_candle=CandleItem(low=386.4, high=388.3, open=386.7, close=387.65, color='GREEN') second_candle=CandleItem(low=384.2, high=389.3, open=387.65, close=386.3, color='RED') last_candle=CandleItem(low=381.2, high=387.3, open=386.3, close=382.75, color='RED') 2020-09-13 13:00:20 INFO: check need new order None 2020-09-13 13:00:20 INFO: init new order end 2020-09-13 13:00:20 INFO: 2020-09-13 13:00:20 INFO: 2020-09-13 13:00:20 INFO: 2020-09-13 13:00:20 INFO: 2020-09-13 13:02:00 INFO: 2020-09-13 13:02:00 INFO: 2020-09-13 13:02:00 INFO: 2020-09-13 13:02:00 INFO: 2020-09-13 13:02:00 INFO: clearing start 2020-09-13 13:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '68e05e63-16a4-3d26-8288-1337b1615d5c', 'clOrdID': '36e41817ba744f61b875f34e228c3253', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': None, 'displayQty': None, 'stopPx': 367.45, '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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc())} 2020-09-13 13:02:00 INFO: skip by not found init order into storage 2020-09-13 13:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '9ff6e4d6-9ab4-e1e8-dccf-818d5a4e471d', 'clOrdID': '0e6b025321d245c381d9e37863aa42e0', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': 405.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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc())} 2020-09-13 13:02:00 INFO: skip by not found init order into storage 2020-09-13 13:02:00 INFO: clearing end 2020-09-13 13:02:00 INFO: 2020-09-13 13:02:00 INFO: 2020-09-13 13:02:00 INFO: 2020-09-13 13:02:00 INFO: 2020-09-13 14:00:20 INFO: 2020-09-13 14:00:20 INFO: 2020-09-13 14:00:20 INFO: 2020-09-13 14:00:20 INFO: 2020-09-13 14:00:20 INFO: init new order start 2020-09-13 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 13, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.75, 'high': 382.7, 'low': 376.6, 'close': 378.0, 'trades': 7790, 'volume': 6629309, 'vwap': 379.23, 'lastSize': 4200, 'turnover': 251401402320, 'homeNotional': 69383.1442132166, 'foreignNotional': 26312094.62386255}, {'timestamp': datetime.datetime(2020, 9, 13, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.3, 'high': 387.3, 'low': 381.2, 'close': 382.75, 'trades': 5184, 'volume': 5398232, 'vwap': 384.32, 'lastSize': 300, 'turnover': 207462487650, 'homeNotional': 56771.80700561148, 'foreignNotional': 21818500.20013839}, {'timestamp': datetime.datetime(2020, 9, 13, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.65, 'high': 389.3, 'low': 384.2, 'close': 386.3, 'trades': 3991, 'volume': 4055576, 'vwap': 386.14, 'lastSize': 1407, 'turnover': 156600130940, 'homeNotional': 42757.05233226231, 'foreignNotional': 16510050.503707998}] 2020-09-13 14:00:20 INFO: prepare candles [CandleItem(low=376.6, high=382.7, open=382.75, close=378.0, color='RED'), CandleItem(low=381.2, high=387.3, open=386.3, close=382.75, color='RED'), CandleItem(low=384.2, high=389.3, open=387.65, close=386.3, color='RED')] 2020-09-13 14:00:20 INFO: skip by colors first_candle=CandleItem(low=384.2, high=389.3, open=387.65, close=386.3, color='RED') second_candle=CandleItem(low=381.2, high=387.3, open=386.3, close=382.75, color='RED') last_candle=CandleItem(low=376.6, high=382.7, open=382.75, close=378.0, color='RED') 2020-09-13 14:00:20 INFO: check need new order None 2020-09-13 14:00:20 INFO: init new order end 2020-09-13 14:00:20 INFO: 2020-09-13 14:00:20 INFO: 2020-09-13 14:00:20 INFO: 2020-09-13 14:00:20 INFO: 2020-09-13 14:02:00 INFO: 2020-09-13 14:02:00 INFO: 2020-09-13 14:02:00 INFO: 2020-09-13 14:02:00 INFO: 2020-09-13 14:02:00 INFO: clearing start 2020-09-13 14:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '68e05e63-16a4-3d26-8288-1337b1615d5c', 'clOrdID': '36e41817ba744f61b875f34e228c3253', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': None, 'displayQty': None, 'stopPx': 367.45, '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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc())} 2020-09-13 14:02:00 INFO: skip by not found init order into storage 2020-09-13 14:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '9ff6e4d6-9ab4-e1e8-dccf-818d5a4e471d', 'clOrdID': '0e6b025321d245c381d9e37863aa42e0', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': 405.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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc())} 2020-09-13 14:02:00 INFO: skip by not found init order into storage 2020-09-13 14:02:00 INFO: clearing end 2020-09-13 14:02:00 INFO: 2020-09-13 14:02:00 INFO: 2020-09-13 14:02:00 INFO: 2020-09-13 14:02:00 INFO: 2020-09-13 15:00:20 INFO: 2020-09-13 15:00:20 INFO: 2020-09-13 15:00:20 INFO: 2020-09-13 15:00:20 INFO: 2020-09-13 15:00:20 INFO: init new order start 2020-09-13 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 13, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 378.0, 'high': 379.45, 'low': 371.15, 'close': 372.05, 'trades': 10958, 'volume': 9868127, 'vwap': 375.17, 'lastSize': 57, 'turnover': 370216327400, 'homeNotional': 102497.45526245728, 'foreignNotional': 38454333.21252942}, {'timestamp': datetime.datetime(2020, 9, 13, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.75, 'high': 382.7, 'low': 376.6, 'close': 378.0, 'trades': 7790, 'volume': 6629309, 'vwap': 379.23, 'lastSize': 4200, 'turnover': 251401402320, 'homeNotional': 69383.1442132166, 'foreignNotional': 26312094.62386255}, {'timestamp': datetime.datetime(2020, 9, 13, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.3, 'high': 387.3, 'low': 381.2, 'close': 382.75, 'trades': 5184, 'volume': 5398232, 'vwap': 384.32, 'lastSize': 300, 'turnover': 207462487650, 'homeNotional': 56771.80700561148, 'foreignNotional': 21818500.20013839}] 2020-09-13 15:00:20 INFO: prepare candles [CandleItem(low=371.15, high=379.45, open=378.0, close=372.05, color='RED'), CandleItem(low=376.6, high=382.7, open=382.75, close=378.0, color='RED'), CandleItem(low=381.2, high=387.3, open=386.3, close=382.75, color='RED')] 2020-09-13 15:00:20 INFO: skip by colors first_candle=CandleItem(low=381.2, high=387.3, open=386.3, close=382.75, color='RED') second_candle=CandleItem(low=376.6, high=382.7, open=382.75, close=378.0, color='RED') last_candle=CandleItem(low=371.15, high=379.45, open=378.0, close=372.05, color='RED') 2020-09-13 15:00:20 INFO: check need new order None 2020-09-13 15:00:20 INFO: init new order end 2020-09-13 15:00:20 INFO: 2020-09-13 15:00:20 INFO: 2020-09-13 15:00:20 INFO: 2020-09-13 15:00:20 INFO: 2020-09-13 15:02:00 INFO: 2020-09-13 15:02:00 INFO: 2020-09-13 15:02:00 INFO: 2020-09-13 15:02:00 INFO: 2020-09-13 15:02:00 INFO: clearing start 2020-09-13 15:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '68e05e63-16a4-3d26-8288-1337b1615d5c', 'clOrdID': '36e41817ba744f61b875f34e228c3253', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': None, 'displayQty': None, 'stopPx': 367.45, '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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 355000, tzinfo=tzutc())} 2020-09-13 15:02:00 INFO: skip by not found init order into storage 2020-09-13 15:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '9ff6e4d6-9ab4-e1e8-dccf-818d5a4e471d', 'clOrdID': '0e6b025321d245c381d9e37863aa42e0', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': 405.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': 299, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc())} 2020-09-13 15:02:00 INFO: skip by not found init order into storage 2020-09-13 15:02:00 INFO: clearing end 2020-09-13 15:02:00 INFO: 2020-09-13 15:02:00 INFO: 2020-09-13 15:02:00 INFO: 2020-09-13 15:02:00 INFO: 2020-09-13 15:58:00 INFO: process event {'orderID': '68e05e63-16a4-3d26-8288-1337b1615d5c', 'price': 367.45, 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 299, 'avgPx': 367.45, 'text': 'Triggered: Order stop price reached\nStop order by trader.py', 'transactTime': '2020-09-13T12:58:00.215Z', 'timestamp': '2020-09-13T12:58:00.215Z', 'clOrdID': '36e41817ba744f61b875f34e228c3253', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-13 15:58:00 INFO: add new event={'uid': '36e41817ba744f61b875f34e228c3253', 'status': 'Filled'} 2020-09-13 15:58:00 INFO: 2020-09-13 15:58:00 INFO: 2020-09-13 15:58:00 INFO: 2020-09-13 15:58:00 INFO: 2020-09-13 15:58:00 INFO: process event start 2020-09-13 15:58:00 INFO: fetch new order event 36e41817ba744f61b875f34e228c3253 2020-09-13 15:58:00 INFO: fetch orders by event init=None profit_pair=0e6b025321d245c381d9e37863aa42e0 2020-09-13 15:58:00 INFO: process profit order filled 2020-09-13 15:58:00 INFO: cancel order=0e6b025321d245c381d9e37863aa42e0 [{'orderID': '9ff6e4d6-9ab4-e1e8-dccf-818d5a4e471d', 'clOrdID': '0e6b025321d245c381d9e37863aa42e0', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 299, 'price': 405.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, 9, 12, 15, 14, 34, 392000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 13, 12, 58, 0, 786000, tzinfo=tzutc())}] 2020-09-13 15:58:00 INFO: end process event_processing_result='proceed profit order' 2020-09-13 15:58:00 INFO: 2020-09-13 15:58:00 INFO: 2020-09-13 15:58:00 INFO: 2020-09-13 15:58:00 INFO: 2020-09-13 15:58:01 INFO: process event {'orderID': '9ff6e4d6-9ab4-e1e8-dccf-818d5a4e471d', 'ordStatus': 'Canceled', 'workingIndicator': False, 'leavesQty': 0, 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'timestamp': '2020-09-13T12:58:00.786Z', 'clOrdID': '0e6b025321d245c381d9e37863aa42e0', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-13 15:58:01 INFO: skip event 0e6b025321d245c381d9e37863aa42e0 Canceled 2020-09-13 16:00:20 INFO: 2020-09-13 16:00:20 INFO: 2020-09-13 16:00:20 INFO: 2020-09-13 16:00:20 INFO: 2020-09-13 16:00:20 INFO: init new order start 2020-09-13 16:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 13, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 372.05, 'high': 372.95, 'low': 367.05, 'close': 367.15, 'trades': 11822, 'volume': 9611027, 'vwap': 370.39, 'lastSize': 400, 'turnover': 355981241665, 'homeNotional': 99267.63898663272, 'foreignNotional': 36767700.4029536}, {'timestamp': datetime.datetime(2020, 9, 13, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 378.0, 'high': 379.45, 'low': 371.15, 'close': 372.05, 'trades': 10958, 'volume': 9868127, 'vwap': 375.17, 'lastSize': 57, 'turnover': 370216327400, 'homeNotional': 102497.45526245728, 'foreignNotional': 38454333.21252942}, {'timestamp': datetime.datetime(2020, 9, 13, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.75, 'high': 382.7, 'low': 376.6, 'close': 378.0, 'trades': 7790, 'volume': 6629309, 'vwap': 379.23, 'lastSize': 4200, 'turnover': 251401402320, 'homeNotional': 69383.1442132166, 'foreignNotional': 26312094.62386255}] 2020-09-13 16:00:21 INFO: prepare candles [CandleItem(low=367.05, high=372.95, open=372.05, close=367.15, color='RED'), CandleItem(low=371.15, high=379.45, open=378.0, close=372.05, color='RED'), CandleItem(low=376.6, high=382.7, open=382.75, close=378.0, color='RED')] 2020-09-13 16:00:21 INFO: skip by colors first_candle=CandleItem(low=376.6, high=382.7, open=382.75, close=378.0, color='RED') second_candle=CandleItem(low=371.15, high=379.45, open=378.0, close=372.05, color='RED') last_candle=CandleItem(low=367.05, high=372.95, open=372.05, close=367.15, color='RED') 2020-09-13 16:00:21 INFO: check need new order None 2020-09-13 16:00:21 INFO: init new order end 2020-09-13 16:00:21 INFO: 2020-09-13 16:00:21 INFO: 2020-09-13 16:00:21 INFO: 2020-09-13 16:00:21 INFO: 2020-09-13 16:02:00 INFO: 2020-09-13 16:02:00 INFO: 2020-09-13 16:02:00 INFO: 2020-09-13 16:02:00 INFO: 2020-09-13 16:02:00 INFO: clearing start 2020-09-13 16:02:00 INFO: clearing end 2020-09-13 16:02:00 INFO: 2020-09-13 16:02:00 INFO: 2020-09-13 16:02:00 INFO: 2020-09-13 16:02:00 INFO: 2020-09-13 17:00:20 INFO: 2020-09-13 17:00:20 INFO: 2020-09-13 17:00:20 INFO: 2020-09-13 17:00:20 INFO: 2020-09-13 17:00:20 INFO: init new order start 2020-09-13 17:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 13, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.15, 'high': 369.5, 'low': 363.1, 'close': 368.6, 'trades': 8272, 'volume': 5706097, 'vwap': 366.67, 'lastSize': 3377, 'turnover': 209220147235, 'homeNotional': 58811.876487739304, 'foreignNotional': 21564174.36650567}, {'timestamp': datetime.datetime(2020, 9, 13, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 372.05, 'high': 372.95, 'low': 367.05, 'close': 367.15, 'trades': 11822, 'volume': 9611027, 'vwap': 370.39, 'lastSize': 400, 'turnover': 355981241665, 'homeNotional': 99267.63898663272, 'foreignNotional': 36767700.4029536}, {'timestamp': datetime.datetime(2020, 9, 13, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 378.0, 'high': 379.45, 'low': 371.15, 'close': 372.05, 'trades': 10958, 'volume': 9868127, 'vwap': 375.17, 'lastSize': 57, 'turnover': 370216327400, 'homeNotional': 102497.45526245728, 'foreignNotional': 38454333.21252942}] 2020-09-13 17:00:21 INFO: prepare candles [CandleItem(low=363.1, high=369.5, open=367.15, close=368.6, color='GREEN'), CandleItem(low=367.05, high=372.95, open=372.05, close=367.15, color='RED'), CandleItem(low=371.15, high=379.45, open=378.0, close=372.05, color='RED')] 2020-09-13 17:00:21 INFO: last_candle=CandleItem(low=363.1, high=369.5, open=367.15, close=368.6, color='GREEN') 2020-09-13 17: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-13 17: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.1, high=369.5, open=367.15, close=368.6, color='GREEN') 2020-09-13 17:00:21 INFO: skip by CandleItem(low=363.1, high=369.5, open=367.15, close=368.6, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-13 17: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-13 17: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.1, high=369.5, open=367.15, close=368.6, color='GREEN') 2020-09-13 17:00:21 INFO: apply filter None to candle=CandleItem(low=367.05, high=372.95, open=372.05, close=367.15, color='RED') 2020-09-13 17:00:21 INFO: apply filter None to candle=CandleItem(low=371.15, high=379.45, open=378.0, close=372.05, color='RED') 2020-09-13 17:00:21 INFO: hit candle order=OrderProperties(candle=CandleItem(low=363.1, high=369.5, open=367.15, close=368.6, color='GREEN'), take_profit_factor=5.0, clearing_interval=3600) 2020-09-13 17:00:21 INFO: check need new order OrderProperties(candle=CandleItem(low=363.1, high=369.5, open=367.15, close=368.6, color='GREEN'), take_profit_factor=5.0, clearing_interval=3600) 2020-09-13 17:00:21 INFO: place order: start candle=CandleItem(low=363.1, high=369.5, open=367.15, close=368.6, color='GREEN') ticker='ETHUSD' price_offset=0.1 2020-09-13 17:00:21 INFO: place order: side_factor=-1 init_trigger_price=369.55 init_order_price=369.6 stop_price_offset=0.0 candle.size=6.399999999999977 stop_price=363.1 take_price=401.5999999999999 2020-09-13 17:00:21 INFO: place order round: side_factor=-1 init_trigger_price=Decimal('369.55000000000001136868377216160297393798828125') init_order_price=Decimal('369.6000000000000227373675443232059478759765625') stop_price_offset=0.0 candle.size=6.399999999999977 stop_price=Decimal('363.1000000000000227373675443232059478759765625') take_price=Decimal('401.59999999999990905052982270717620849609375') 2020-09-13 17:00:21 INFO: place order: compute qty=295 2020-09-13 17:00:21 INFO: place order: save order to db 93e823f57fc3492189baab35038e64e1; response=True 2020-09-13 17:00:21 INFO: post order to exchange resp={'orderID': 'e6c1f5f1-1e8d-f31c-a182-281812ffbd78', 'clOrdID': '93e823f57fc3492189baab35038e64e1', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 295, 'price': 369.6, 'displayQty': None, 'stopPx': 369.55, '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': 295, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 13, 14, 0, 21, 259000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 13, 14, 0, 21, 259000, tzinfo=tzutc())} 2020-09-13 17:00:21 INFO: place new init order {'qty': 295, 'init_price': Decimal('369.55000000000001136868377216160297393798828125'), 'stop_price': Decimal('363.1000000000000227373675443232059478759765625'), 'take_price': Decimal('401.59999999999990905052982270717620849609375'), 'order_uid': '93e823f57fc3492189baab35038e64e1', 'response': {'orderID': 'e6c1f5f1-1e8d-f31c-a182-281812ffbd78', 'clOrdID': '93e823f57fc3492189baab35038e64e1', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 295, 'price': 369.6, 'displayQty': None, 'stopPx': 369.55, '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': 295, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 13, 14, 0, 21, 259000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 13, 14, 0, 21, 259000, tzinfo=tzutc())}} 2020-09-13 17:00:21 INFO: init new order end 2020-09-13 17:00:21 INFO: 2020-09-13 17:00:21 INFO: 2020-09-13 17:00:21 INFO: 2020-09-13 17:00:21 INFO: 2020-09-13 17:00:21 INFO: process event {'orderID': 'e6c1f5f1-1e8d-f31c-a182-281812ffbd78', 'clOrdID': '93e823f57fc3492189baab35038e64e1', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 295, 'price': 369.6, 'displayQty': None, 'stopPx': 369.55, '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': 295, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-09-13T14:00:21.259Z', 'timestamp': '2020-09-13T14:00:21.259Z'} 2020-09-13 17:00:21 INFO: skip event 93e823f57fc3492189baab35038e64e1 New 2020-09-13 17:02:00 INFO: 2020-09-13 17:02:00 INFO: 2020-09-13 17:02:00 INFO: 2020-09-13 17:02:00 INFO: 2020-09-13 17:02:00 INFO: clearing start 2020-09-13 17:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'e6c1f5f1-1e8d-f31c-a182-281812ffbd78', 'clOrdID': '93e823f57fc3492189baab35038e64e1', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 295, 'price': 369.6, 'displayQty': None, 'stopPx': 369.55, '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': 295, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 13, 14, 0, 21, 259000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 13, 14, 0, 21, 259000, tzinfo=tzutc())} 2020-09-13 17:02:00 INFO: order time=2020-09-13 14:00:21.259000+00:00; delta from now UTC=0:01:39.426858 time_delta.total_seconds()=99.426858; time_diff_offset='3600' 2020-09-13 17:02:00 INFO: skip by time diff 2020-09-13 14:00:21.259000+00:00 2020-09-13 17:02:00 INFO: clearing end 2020-09-13 17:02:00 INFO: 2020-09-13 17:02:00 INFO: 2020-09-13 17:02:00 INFO: 2020-09-13 17:02:00 INFO: 2020-09-13 17:48:03 INFO: process event {'orderID': 'e6c1f5f1-1e8d-f31c-a182-281812ffbd78', 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 295, 'avgPx': 369.55, 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'transactTime': '2020-09-13T14:48:02.979Z', 'timestamp': '2020-09-13T14:48:02.979Z', 'clOrdID': '93e823f57fc3492189baab35038e64e1', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-13 17:48:03 INFO: add new event={'uid': '93e823f57fc3492189baab35038e64e1', 'status': 'Filled'} 2020-09-13 17:48:03 INFO: 2020-09-13 17:48:03 INFO: 2020-09-13 17:48:03 INFO: 2020-09-13 17:48:03 INFO: 2020-09-13 17:48:03 INFO: process event start 2020-09-13 17:48:03 INFO: fetch new order event 93e823f57fc3492189baab35038e64e1 2020-09-13 17:48:03 INFO: fetch orders by event init={'stop': '363.1000000000000227373675443232059478759765625', 'take': '401.59999999999990905052982270717620849609375', 'qty': '295', 'color': 'GREEN', 'ticker': 'ETHUSD', 'clearing_offset': '3600'} profit_pair=None 2020-09-13 17:48:03 INFO: process init order filled 2020-09-13 17:48:03 INFO: save profit orders to storage stop=d86d0a67b0384602aa4f7513d4f33e83 take=669d764982a34889b1ab4e209b4f91b6 2020-09-13 17:48:03 INFO: place profit orders take_price=401.59999999999990905052982270717620849609375, stop_price=363.1000000000000227373675443232059478759765625, qty=295, color=GREEN, ticker=ETHUSD d86d0a67b0384602aa4f7513d4f33e83 669d764982a34889b1ab4e209b4f91b6 2020-09-13 17:48:03 INFO: place stop order ETHUSD: qty=-295, stop_price=363.1000000000000227373675443232059478759765625, stop_uid=d86d0a67b0384602aa4f7513d4f33e83 2020-09-13 17:48:03 INFO: process event {'orderID': '84b69ea1-ea55-8364-4107-e644e92109db', 'clOrdID': 'd86d0a67b0384602aa4f7513d4f33e83', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 295, 'price': None, 'displayQty': None, 'stopPx': 363.1, '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': 295, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': '2020-09-13T14:48:03.555Z', 'timestamp': '2020-09-13T14:48:03.555Z'} 2020-09-13 17:48:03 INFO: skip event d86d0a67b0384602aa4f7513d4f33e83 New 2020-09-13 17:48:03 INFO: exchange resp for stop order={'orderID': '84b69ea1-ea55-8364-4107-e644e92109db', 'clOrdID': 'd86d0a67b0384602aa4f7513d4f33e83', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 295, 'price': None, 'displayQty': None, 'stopPx': 363.1, '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': 295, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 13, 14, 48, 3, 555000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 13, 14, 48, 3, 555000, tzinfo=tzutc())} 2020-09-13 17:48:03 INFO: place limit order ETHUSD: qty=-295, price=401.59999999999990905052982270717620849609375, take_uid=669d764982a34889b1ab4e209b4f91b6 2020-09-13 17:48:03 INFO: process event {'orderID': '5d738e12-e0b3-5fc5-af95-6e6e17d2749a', 'clOrdID': '669d764982a34889b1ab4e209b4f91b6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 295, 'price': 401.6, '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': 295, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': '2020-09-13T14:48:03.610Z', 'timestamp': '2020-09-13T14:48:03.610Z'} 2020-09-13 17:48:03 INFO: skip event 669d764982a34889b1ab4e209b4f91b6 New 2020-09-13 17:48:03 INFO: exchange resp for take profit order={'orderID': '5d738e12-e0b3-5fc5-af95-6e6e17d2749a', 'clOrdID': '669d764982a34889b1ab4e209b4f91b6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 295, 'price': 401.6, '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': 295, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 13, 14, 48, 3, 610000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 13, 14, 48, 3, 610000, tzinfo=tzutc())} 2020-09-13 17:48:03 INFO: place profit orders={'stop': {'response': {'orderID': '84b69ea1-ea55-8364-4107-e644e92109db', 'clOrdID': 'd86d0a67b0384602aa4f7513d4f33e83', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 295, 'price': None, 'displayQty': None, 'stopPx': 363.1, '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': 295, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 13, 14, 48, 3, 555000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 13, 14, 48, 3, 555000, tzinfo=tzutc())}, 'qty': Decimal('-295'), 'uid': 'd86d0a67b0384602aa4f7513d4f33e83', 'price': Decimal('363.1000000000000227373675443232059478759765625')}, 'take': {'response': {'orderID': '5d738e12-e0b3-5fc5-af95-6e6e17d2749a', 'clOrdID': '669d764982a34889b1ab4e209b4f91b6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 295, 'price': 401.6, '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': 295, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 13, 14, 48, 3, 610000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 13, 14, 48, 3, 610000, tzinfo=tzutc())}, 'qty': Decimal('-295'), 'uid': '669d764982a34889b1ab4e209b4f91b6', 'price': Decimal('401.59999999999990905052982270717620849609375')}} 2020-09-13 17:48:03 INFO: rm init order from db 93e823f57fc3492189baab35038e64e1 2020-09-13 17:48:03 INFO: end process event_processing_result='proceed init order' 2020-09-13 17:48:03 INFO: 2020-09-13 17:48:03 INFO: 2020-09-13 17:48:03 INFO: 2020-09-13 17:48:03 INFO: 2020-09-13 18:00:20 INFO: 2020-09-13 18:00:20 INFO: 2020-09-13 18:00:20 INFO: 2020-09-13 18:00:20 INFO: 2020-09-13 18:00:20 INFO: init new order start 2020-09-13 18:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 13, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.6, 'high': 369.55, 'low': 365.55, 'close': 367.8, 'trades': 4836, 'volume': 3038548, 'vwap': 367.59, 'lastSize': 6792, 'turnover': 111692937275, 'homeNotional': 31371.298662509154, 'foreignNotional': 11531685.320499359}, {'timestamp': datetime.datetime(2020, 9, 13, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.15, 'high': 369.5, 'low': 363.1, 'close': 368.6, 'trades': 8272, 'volume': 5706097, 'vwap': 366.67, 'lastSize': 3377, 'turnover': 209220147235, 'homeNotional': 58811.876487739304, 'foreignNotional': 21564174.36650567}, {'timestamp': datetime.datetime(2020, 9, 13, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 372.05, 'high': 372.95, 'low': 367.05, 'close': 367.15, 'trades': 11822, 'volume': 9611027, 'vwap': 370.39, 'lastSize': 400, 'turnover': 355981241665, 'homeNotional': 99267.63898663272, 'foreignNotional': 36767700.4029536}] 2020-09-13 18:00:20 INFO: prepare candles [CandleItem(low=365.55, high=369.55, open=368.6, close=367.8, color='RED'), CandleItem(low=363.1, high=369.5, open=367.15, close=368.6, color='GREEN'), CandleItem(low=367.05, high=372.95, open=372.05, close=367.15, color='RED')] 2020-09-13 18:00:20 INFO: skip by colors first_candle=CandleItem(low=367.05, high=372.95, open=372.05, close=367.15, color='RED') second_candle=CandleItem(low=363.1, high=369.5, open=367.15, close=368.6, color='GREEN') last_candle=CandleItem(low=365.55, high=369.55, open=368.6, close=367.8, color='RED') 2020-09-13 18:00:20 INFO: check need new order None 2020-09-13 18:00:20 INFO: init new order end 2020-09-13 18:00:20 INFO: 2020-09-13 18:00:20 INFO: 2020-09-13 18:00:20 INFO: 2020-09-13 18:00:20 INFO: 2020-09-13 18:02:00 INFO: 2020-09-13 18:02:00 INFO: 2020-09-13 18:02:00 INFO: 2020-09-13 18:02:00 INFO: 2020-09-13 18:02:00 INFO: clearing start 2020-09-13 18:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '84b69ea1-ea55-8364-4107-e644e92109db', 'clOrdID': 'd86d0a67b0384602aa4f7513d4f33e83', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 295, 'price': None, 'displayQty': None, 'stopPx': 363.1, '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': 295, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 13, 14, 48, 3, 555000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 13, 14, 48, 3, 555000, tzinfo=tzutc())} 2020-09-13 18:02:01 INFO: skip by not found init order into storage 2020-09-13 18:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '5d738e12-e0b3-5fc5-af95-6e6e17d2749a', 'clOrdID': '669d764982a34889b1ab4e209b4f91b6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 295, 'price': 401.6, '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': 295, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 13, 14, 48, 3, 610000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 13, 14, 48, 3, 610000, tzinfo=tzutc())} 2020-09-13 18:02:01 INFO: skip by not found init order into storage 2020-09-13 18:02:01 INFO: clearing end 2020-09-13 18:02:01 INFO: 2020-09-13 18:02:01 INFO: 2020-09-13 18:02:01 INFO: 2020-09-13 18:02:01 INFO: 2020-09-13 18:45:24 INFO: process event {'orderID': '84b69ea1-ea55-8364-4107-e644e92109db', 'price': 363.05, 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 295, 'avgPx': 363.05, 'text': 'Triggered: Order stop price reached\nStop order by trader.py', 'transactTime': '2020-09-13T15:45:24.423Z', 'timestamp': '2020-09-13T15:45:24.423Z', 'clOrdID': 'd86d0a67b0384602aa4f7513d4f33e83', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-13 18:45:24 INFO: add new event={'uid': 'd86d0a67b0384602aa4f7513d4f33e83', 'status': 'Filled'} 2020-09-13 18:45:24 INFO: 2020-09-13 18:45:24 INFO: 2020-09-13 18:45:24 INFO: 2020-09-13 18:45:24 INFO: 2020-09-13 18:45:24 INFO: process event start 2020-09-13 18:45:24 INFO: fetch new order event d86d0a67b0384602aa4f7513d4f33e83 2020-09-13 18:45:24 INFO: fetch orders by event init=None profit_pair=669d764982a34889b1ab4e209b4f91b6 2020-09-13 18:45:24 INFO: process profit order filled 2020-09-13 18:45:26 INFO: cancel order=669d764982a34889b1ab4e209b4f91b6 [{'orderID': '5d738e12-e0b3-5fc5-af95-6e6e17d2749a', 'clOrdID': '669d764982a34889b1ab4e209b4f91b6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 295, 'price': 401.6, '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, 13, 14, 48, 3, 610000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 13, 15, 45, 26, 827000, tzinfo=tzutc())}] 2020-09-13 18:45:26 INFO: end process event_processing_result='proceed profit order' 2020-09-13 18:45:26 INFO: 2020-09-13 18:45:26 INFO: 2020-09-13 18:45:26 INFO: 2020-09-13 18:45:26 INFO: 2020-09-13 18:45:26 INFO: process event {'orderID': '5d738e12-e0b3-5fc5-af95-6e6e17d2749a', 'ordStatus': 'Canceled', 'workingIndicator': False, 'leavesQty': 0, 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'timestamp': '2020-09-13T15:45:26.827Z', 'clOrdID': '669d764982a34889b1ab4e209b4f91b6', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-13 18:45:26 INFO: skip event 669d764982a34889b1ab4e209b4f91b6 Canceled 2020-09-13 19:00:20 INFO: 2020-09-13 19:00:20 INFO: 2020-09-13 19:00:20 INFO: 2020-09-13 19:00:20 INFO: 2020-09-13 19:00:20 INFO: init new order start 2020-09-13 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 13, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.8, 'high': 368.2, 'low': 360.15, 'close': 360.85, 'trades': 7581, 'volume': 5823125, 'vwap': 363.91, 'lastSize': 92, 'turnover': 211906193670, 'homeNotional': 60012.3818291172, 'foreignNotional': 21838999.169996053}, {'timestamp': datetime.datetime(2020, 9, 13, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.6, 'high': 369.55, 'low': 365.55, 'close': 367.8, 'trades': 4836, 'volume': 3038548, 'vwap': 367.59, 'lastSize': 6792, 'turnover': 111692937275, 'homeNotional': 31371.298662509154, 'foreignNotional': 11531685.320499359}, {'timestamp': datetime.datetime(2020, 9, 13, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.15, 'high': 369.5, 'low': 363.1, 'close': 368.6, 'trades': 8272, 'volume': 5706097, 'vwap': 366.67, 'lastSize': 3377, 'turnover': 209220147235, 'homeNotional': 58811.876487739304, 'foreignNotional': 21564174.36650567}] 2020-09-13 19:00:20 INFO: prepare candles [CandleItem(low=360.15, high=368.2, open=367.8, close=360.85, color='RED'), CandleItem(low=365.55, high=369.55, open=368.6, close=367.8, color='RED'), CandleItem(low=363.1, high=369.5, open=367.15, close=368.6, color='GREEN')] 2020-09-13 19:00:20 INFO: skip by colors first_candle=CandleItem(low=363.1, high=369.5, open=367.15, close=368.6, color='GREEN') second_candle=CandleItem(low=365.55, high=369.55, open=368.6, close=367.8, color='RED') last_candle=CandleItem(low=360.15, high=368.2, open=367.8, close=360.85, color='RED') 2020-09-13 19:00:20 INFO: check need new order None 2020-09-13 19:00:20 INFO: init new order end 2020-09-13 19:00:20 INFO: 2020-09-13 19:00:20 INFO: 2020-09-13 19:00:20 INFO: 2020-09-13 19:00:20 INFO: 2020-09-13 19:02:00 INFO: 2020-09-13 19:02:00 INFO: 2020-09-13 19:02:00 INFO: 2020-09-13 19:02:00 INFO: 2020-09-13 19:02:00 INFO: clearing start 2020-09-13 19:02:00 INFO: clearing end 2020-09-13 19:02:00 INFO: 2020-09-13 19:02:00 INFO: 2020-09-13 19:02:00 INFO: 2020-09-13 19:02:00 INFO: 2020-09-13 20:00:20 INFO: 2020-09-13 20:00:20 INFO: 2020-09-13 20:00:20 INFO: 2020-09-13 20:00:20 INFO: 2020-09-13 20:00:20 INFO: init new order start 2020-09-13 20:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 13, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 360.85, 'high': 360.9, 'low': 355.05, 'close': 357.7, 'trades': 12230, 'volume': 10669809, 'vwap': 357.82, 'lastSize': 10134, 'turnover': 381777904145, 'homeNotional': 109517.57042794478, 'foreignNotional': 39186788.306679115}, {'timestamp': datetime.datetime(2020, 9, 13, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.8, 'high': 368.2, 'low': 360.15, 'close': 360.85, 'trades': 7581, 'volume': 5823125, 'vwap': 363.91, 'lastSize': 92, 'turnover': 211906193670, 'homeNotional': 60012.3818291172, 'foreignNotional': 21838999.169996053}, {'timestamp': datetime.datetime(2020, 9, 13, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.6, 'high': 369.55, 'low': 365.55, 'close': 367.8, 'trades': 4836, 'volume': 3038548, 'vwap': 367.59, 'lastSize': 6792, 'turnover': 111692937275, 'homeNotional': 31371.298662509154, 'foreignNotional': 11531685.320499359}] 2020-09-13 20:00:21 INFO: prepare candles [CandleItem(low=355.05, high=360.9, open=360.85, close=357.7, color='RED'), CandleItem(low=360.15, high=368.2, open=367.8, close=360.85, color='RED'), CandleItem(low=365.55, high=369.55, open=368.6, close=367.8, color='RED')] 2020-09-13 20:00:21 INFO: skip by colors first_candle=CandleItem(low=365.55, high=369.55, open=368.6, close=367.8, color='RED') second_candle=CandleItem(low=360.15, high=368.2, open=367.8, close=360.85, color='RED') last_candle=CandleItem(low=355.05, high=360.9, open=360.85, close=357.7, color='RED') 2020-09-13 20:00:21 INFO: check need new order None 2020-09-13 20:00:21 INFO: init new order end 2020-09-13 20:00:21 INFO: 2020-09-13 20:00:21 INFO: 2020-09-13 20:00:21 INFO: 2020-09-13 20:00:21 INFO: 2020-09-13 20:02:00 INFO: 2020-09-13 20:02:00 INFO: 2020-09-13 20:02:00 INFO: 2020-09-13 20:02:00 INFO: 2020-09-13 20:02:00 INFO: clearing start 2020-09-13 20:02:00 INFO: clearing end 2020-09-13 20:02:00 INFO: 2020-09-13 20:02:00 INFO: 2020-09-13 20:02:00 INFO: 2020-09-13 20:02:00 INFO: 2020-09-13 21:00:20 INFO: 2020-09-13 21:00:20 INFO: 2020-09-13 21:00:20 INFO: 2020-09-13 21:00:20 INFO: 2020-09-13 21:00:20 INFO: init new order start 2020-09-13 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 13, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.7, 'high': 359.8, 'low': 353.8, 'close': 359.3, 'trades': 7032, 'volume': 5350961, 'vwap': 357.01, 'lastSize': 2798, 'turnover': 191033397130, 'homeNotional': 54852.6693346622, 'foreignNotional': 19582969.339891516}, {'timestamp': datetime.datetime(2020, 9, 13, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 360.85, 'high': 360.9, 'low': 355.05, 'close': 357.7, 'trades': 12230, 'volume': 10669809, 'vwap': 357.82, 'lastSize': 10134, 'turnover': 381777904145, 'homeNotional': 109517.57042794478, 'foreignNotional': 39186788.306679115}, {'timestamp': datetime.datetime(2020, 9, 13, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.8, 'high': 368.2, 'low': 360.15, 'close': 360.85, 'trades': 7581, 'volume': 5823125, 'vwap': 363.91, 'lastSize': 92, 'turnover': 211906193670, 'homeNotional': 60012.3818291172, 'foreignNotional': 21838999.169996053}] 2020-09-13 21:00:20 INFO: prepare candles [CandleItem(low=353.8, high=359.8, open=357.7, close=359.3, color='GREEN'), CandleItem(low=355.05, high=360.9, open=360.85, close=357.7, color='RED'), CandleItem(low=360.15, high=368.2, open=367.8, close=360.85, color='RED')] 2020-09-13 21:00:20 INFO: last_candle=CandleItem(low=353.8, high=359.8, open=357.7, close=359.3, color='GREEN') 2020-09-13 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-13 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=353.8, high=359.8, open=357.7, close=359.3, color='GREEN') 2020-09-13 21:00:20 INFO: skip by CandleItem(low=353.8, high=359.8, open=357.7, close=359.3, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-13 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-13 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=353.8, high=359.8, open=357.7, close=359.3, color='GREEN') 2020-09-13 21:00:20 INFO: apply filter None to candle=CandleItem(low=355.05, high=360.9, open=360.85, close=357.7, color='RED') 2020-09-13 21:00:20 INFO: apply filter None to candle=CandleItem(low=360.15, high=368.2, open=367.8, close=360.85, color='RED') 2020-09-13 21:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=353.8, high=359.8, open=357.7, close=359.3, color='GREEN'), take_profit_factor=5.0, clearing_interval=3600) 2020-09-13 21:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=353.8, high=359.8, open=357.7, close=359.3, color='GREEN'), take_profit_factor=5.0, clearing_interval=3600) 2020-09-13 21:00:20 INFO: place order: start candle=CandleItem(low=353.8, high=359.8, open=357.7, close=359.3, color='GREEN') ticker='ETHUSD' price_offset=0.1 2020-09-13 21:00:20 INFO: place order: side_factor=-1 init_trigger_price=359.85 init_order_price=359.90000000000003 stop_price_offset=0.0 candle.size=6.0 stop_price=353.8 take_price=389.90000000000003 2020-09-13 21:00:20 INFO: place order round: side_factor=-1 init_trigger_price=Decimal('359.8500000000000227373675443232059478759765625') init_order_price=Decimal('359.90000000000003410605131648480892181396484375') stop_price_offset=0.0 candle.size=6.0 stop_price=Decimal('353.80000000000001136868377216160297393798828125') take_price=Decimal('389.90000000000003410605131648480892181396484375') 2020-09-13 21:00:20 INFO: place order: compute qty=314 2020-09-13 21:00:20 INFO: place order: save order to db 56b6c131dc2f41a6aa656daefbc46b7d; response=True 2020-09-13 21:00:21 INFO: post order to exchange resp={'orderID': 'ca6ba4ca-9af7-72e9-ba99-1152212aa9bc', 'clOrdID': '56b6c131dc2f41a6aa656daefbc46b7d', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 314, 'price': 359.9, 'displayQty': None, 'stopPx': 359.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': 314, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 13, 18, 0, 21, 148000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 13, 18, 0, 21, 148000, tzinfo=tzutc())} 2020-09-13 21:00:21 INFO: place new init order {'qty': 314, 'init_price': Decimal('359.8500000000000227373675443232059478759765625'), 'stop_price': Decimal('353.80000000000001136868377216160297393798828125'), 'take_price': Decimal('389.90000000000003410605131648480892181396484375'), 'order_uid': '56b6c131dc2f41a6aa656daefbc46b7d', 'response': {'orderID': 'ca6ba4ca-9af7-72e9-ba99-1152212aa9bc', 'clOrdID': '56b6c131dc2f41a6aa656daefbc46b7d', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 314, 'price': 359.9, 'displayQty': None, 'stopPx': 359.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': 314, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 13, 18, 0, 21, 148000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 13, 18, 0, 21, 148000, tzinfo=tzutc())}} 2020-09-13 21:00:21 INFO: init new order end 2020-09-13 21:00:21 INFO: 2020-09-13 21:00:21 INFO: 2020-09-13 21:00:21 INFO: 2020-09-13 21:00:21 INFO: 2020-09-13 21:00:21 INFO: process event {'orderID': 'ca6ba4ca-9af7-72e9-ba99-1152212aa9bc', 'clOrdID': '56b6c131dc2f41a6aa656daefbc46b7d', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 314, 'price': 359.9, 'displayQty': None, 'stopPx': 359.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': 314, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-09-13T18:00:21.148Z', 'timestamp': '2020-09-13T18:00:21.148Z'} 2020-09-13 21:00:21 INFO: skip event 56b6c131dc2f41a6aa656daefbc46b7d New 2020-09-13 21:02:00 INFO: 2020-09-13 21:02:00 INFO: 2020-09-13 21:02:00 INFO: 2020-09-13 21:02:00 INFO: 2020-09-13 21:02:00 INFO: clearing start 2020-09-13 21:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'ca6ba4ca-9af7-72e9-ba99-1152212aa9bc', 'clOrdID': '56b6c131dc2f41a6aa656daefbc46b7d', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 314, 'price': 359.9, 'displayQty': None, 'stopPx': 359.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': 314, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 13, 18, 0, 21, 148000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 13, 18, 0, 21, 148000, tzinfo=tzutc())} 2020-09-13 21:02:00 INFO: order time=2020-09-13 18:00:21.148000+00:00; delta from now UTC=0:01:39.214663 time_delta.total_seconds()=99.214663; time_diff_offset='3600' 2020-09-13 21:02:00 INFO: skip by time diff 2020-09-13 18:00:21.148000+00:00 2020-09-13 21:02:00 INFO: clearing end 2020-09-13 21:02:00 INFO: 2020-09-13 21:02:00 INFO: 2020-09-13 21:02:00 INFO: 2020-09-13 21:02:00 INFO: 2020-09-13 22:00:20 INFO: 2020-09-13 22:00:20 INFO: 2020-09-13 22:00:20 INFO: 2020-09-13 22:00:20 INFO: 2020-09-13 22:00:20 INFO: init new order start 2020-09-13 22:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 13, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 359.3, 'high': 359.6, 'low': 358.05, 'close': 359.05, 'trades': 2394, 'volume': 1547684, 'vwap': 358.84, 'lastSize': 5, 'turnover': 55536791625, 'homeNotional': 15900.143973177026, 'foreignNotional': 5705577.386067441}, {'timestamp': datetime.datetime(2020, 9, 13, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.7, 'high': 359.8, 'low': 353.8, 'close': 359.3, 'trades': 7032, 'volume': 5350961, 'vwap': 357.01, 'lastSize': 2798, 'turnover': 191033397130, 'homeNotional': 54852.6693346622, 'foreignNotional': 19582969.339891516}, {'timestamp': datetime.datetime(2020, 9, 13, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 360.85, 'high': 360.9, 'low': 355.05, 'close': 357.7, 'trades': 12230, 'volume': 10669809, 'vwap': 357.82, 'lastSize': 10134, 'turnover': 381777904145, 'homeNotional': 109517.57042794478, 'foreignNotional': 39186788.306679115}] 2020-09-13 22:00:21 INFO: prepare candles [CandleItem(low=358.05, high=359.6, open=359.3, close=359.05, color='RED'), CandleItem(low=353.8, high=359.8, open=357.7, close=359.3, color='GREEN'), CandleItem(low=355.05, high=360.9, open=360.85, close=357.7, color='RED')] 2020-09-13 22:00:21 INFO: skip by colors first_candle=CandleItem(low=355.05, high=360.9, open=360.85, close=357.7, color='RED') second_candle=CandleItem(low=353.8, high=359.8, open=357.7, close=359.3, color='GREEN') last_candle=CandleItem(low=358.05, high=359.6, open=359.3, close=359.05, color='RED') 2020-09-13 22:00:21 INFO: check need new order None 2020-09-13 22:00:21 INFO: init new order end 2020-09-13 22:00:21 INFO: 2020-09-13 22:00:21 INFO: 2020-09-13 22:00:21 INFO: 2020-09-13 22:00:21 INFO: 2020-09-13 22:02:00 INFO: 2020-09-13 22:02:00 INFO: 2020-09-13 22:02:00 INFO: 2020-09-13 22:02:00 INFO: 2020-09-13 22:02:00 INFO: clearing start 2020-09-13 22:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'ca6ba4ca-9af7-72e9-ba99-1152212aa9bc', 'clOrdID': '56b6c131dc2f41a6aa656daefbc46b7d', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 314, 'price': 359.9, 'displayQty': None, 'stopPx': 359.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': 314, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 13, 18, 0, 21, 148000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 13, 18, 0, 21, 148000, tzinfo=tzutc())} 2020-09-13 22:02:00 INFO: order time=2020-09-13 18:00:21.148000+00:00; delta from now UTC=1:01:39.073008 time_delta.total_seconds()=3699.073008; time_diff_offset='3600' 2020-09-13 22:02:00 INFO: clear order 56b6c131dc2f41a6aa656daefbc46b7d 2020-09-13 22:02:00 INFO: process event {'orderID': 'ca6ba4ca-9af7-72e9-ba99-1152212aa9bc', 'ordStatus': 'Canceled', 'leavesQty': 0, 'text': 'Canceled: cancelled by clearing\nInit order by supervisor.py', 'timestamp': '2020-09-13T19:02:00.244Z', 'clOrdID': '56b6c131dc2f41a6aa656daefbc46b7d', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-13 22:02:00 INFO: cancel order resp=[{'orderID': 'ca6ba4ca-9af7-72e9-ba99-1152212aa9bc', 'clOrdID': '56b6c131dc2f41a6aa656daefbc46b7d', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 314, 'price': 359.9, 'displayQty': None, 'stopPx': 359.85, '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, 9, 13, 18, 0, 21, 148000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 13, 19, 2, 0, 244000, tzinfo=tzutc())}] 2020-09-13 22:02:00 INFO: skip event 56b6c131dc2f41a6aa656daefbc46b7d Canceled 2020-09-13 22:02:00 INFO: clearing end 2020-09-13 22:02:00 INFO: 2020-09-13 22:02:00 INFO: 2020-09-13 22:02:00 INFO: 2020-09-13 22:02:00 INFO: 2020-09-13 23:00:20 INFO: 2020-09-13 23:00:20 INFO: 2020-09-13 23:00:20 INFO: 2020-09-13 23:00:20 INFO: 2020-09-13 23:00:20 INFO: init new order start 2020-09-13 23:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 13, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 359.05, 'high': 363.45, 'low': 358.2, 'close': 362.9, 'trades': 4001, 'volume': 2858274, 'vwap': 361.9, 'lastSize': 80, 'turnover': 103439837265, 'homeNotional': 29414.27258452625, 'foreignNotional': 10644959.192540761}, {'timestamp': datetime.datetime(2020, 9, 13, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 359.3, 'high': 359.6, 'low': 358.05, 'close': 359.05, 'trades': 2394, 'volume': 1547684, 'vwap': 358.84, 'lastSize': 5, 'turnover': 55536791625, 'homeNotional': 15900.143973177026, 'foreignNotional': 5705577.386067441}, {'timestamp': datetime.datetime(2020, 9, 13, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.7, 'high': 359.8, 'low': 353.8, 'close': 359.3, 'trades': 7032, 'volume': 5350961, 'vwap': 357.01, 'lastSize': 2798, 'turnover': 191033397130, 'homeNotional': 54852.6693346622, 'foreignNotional': 19582969.339891516}] 2020-09-13 23:00:20 INFO: prepare candles [CandleItem(low=358.2, high=363.45, open=359.05, close=362.9, color='GREEN'), CandleItem(low=358.05, high=359.6, open=359.3, close=359.05, color='RED'), CandleItem(low=353.8, high=359.8, open=357.7, close=359.3, color='GREEN')] 2020-09-13 23:00:20 INFO: skip by colors first_candle=CandleItem(low=353.8, high=359.8, open=357.7, close=359.3, color='GREEN') second_candle=CandleItem(low=358.05, high=359.6, open=359.3, close=359.05, color='RED') last_candle=CandleItem(low=358.2, high=363.45, open=359.05, close=362.9, color='GREEN') 2020-09-13 23:00:20 INFO: check need new order None 2020-09-13 23:00:20 INFO: init new order end 2020-09-13 23:00:20 INFO: 2020-09-13 23:00:20 INFO: 2020-09-13 23:00:20 INFO: 2020-09-13 23:00:20 INFO: 2020-09-13 23:02:00 INFO: 2020-09-13 23:02:00 INFO: 2020-09-13 23:02:00 INFO: 2020-09-13 23:02:00 INFO: 2020-09-13 23:02:00 INFO: clearing start 2020-09-13 23:02:00 INFO: clearing end 2020-09-13 23:02:00 INFO: 2020-09-13 23:02:00 INFO: 2020-09-13 23:02:00 INFO: 2020-09-13 23:02:00 INFO: 2020-09-14 00:00:20 INFO: 2020-09-14 00:00:20 INFO: 2020-09-14 00:00:20 INFO: 2020-09-14 00:00:20 INFO: 2020-09-14 00:00:20 INFO: init new order start 2020-09-14 00:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 13, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 362.9, 'high': 363.65, 'low': 360.15, 'close': 363.25, 'trades': 3872, 'volume': 2089364, 'vwap': 361.91, 'lastSize': 1000, 'turnover': 75615842875, 'homeNotional': 21530.418923213383, 'foreignNotional': 7792049.058903849}, {'timestamp': datetime.datetime(2020, 9, 13, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 359.05, 'high': 363.45, 'low': 358.2, 'close': 362.9, 'trades': 4001, 'volume': 2858274, 'vwap': 361.9, 'lastSize': 80, 'turnover': 103439837265, 'homeNotional': 29414.27258452625, 'foreignNotional': 10644959.192540761}, {'timestamp': datetime.datetime(2020, 9, 13, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 359.3, 'high': 359.6, 'low': 358.05, 'close': 359.05, 'trades': 2394, 'volume': 1547684, 'vwap': 358.84, 'lastSize': 5, 'turnover': 55536791625, 'homeNotional': 15900.143973177026, 'foreignNotional': 5705577.386067441}] 2020-09-14 00:00:21 INFO: prepare candles [CandleItem(low=360.15, high=363.65, open=362.9, close=363.25, color='GREEN'), CandleItem(low=358.2, high=363.45, open=359.05, close=362.9, color='GREEN'), CandleItem(low=358.05, high=359.6, open=359.3, close=359.05, color='RED')] 2020-09-14 00:00:21 INFO: skip by colors first_candle=CandleItem(low=358.05, high=359.6, open=359.3, close=359.05, color='RED') second_candle=CandleItem(low=358.2, high=363.45, open=359.05, close=362.9, color='GREEN') last_candle=CandleItem(low=360.15, high=363.65, open=362.9, close=363.25, color='GREEN') 2020-09-14 00:00:21 INFO: check need new order None 2020-09-14 00:00:21 INFO: init new order end 2020-09-14 00:00:21 INFO: 2020-09-14 00:00:21 INFO: 2020-09-14 00:00:21 INFO: 2020-09-14 00:00:21 INFO: 2020-09-14 00:02:00 INFO: 2020-09-14 00:02:00 INFO: 2020-09-14 00:02:00 INFO: 2020-09-14 00:02:00 INFO: 2020-09-14 00:02:00 INFO: clearing start 2020-09-14 00:02:00 INFO: clearing end 2020-09-14 00:02:00 INFO: 2020-09-14 00:02:00 INFO: 2020-09-14 00:02:00 INFO: 2020-09-14 00:02:00 INFO: 2020-09-14 01:00:20 INFO: 2020-09-14 01:00:20 INFO: 2020-09-14 01:00:20 INFO: 2020-09-14 01:00:20 INFO: 2020-09-14 01:00:20 INFO: init new order start 2020-09-14 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 13, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.25, 'high': 365.25, 'low': 361.35, 'close': 363.4, 'trades': 3038, 'volume': 1653487, 'vwap': 363.54, 'lastSize': 901, 'turnover': 60109492490, 'homeNotional': 17058.67267312364, 'foreignNotional': 6201381.204985931}, {'timestamp': datetime.datetime(2020, 9, 13, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 362.9, 'high': 363.65, 'low': 360.15, 'close': 363.25, 'trades': 3872, 'volume': 2089364, 'vwap': 361.91, 'lastSize': 1000, 'turnover': 75615842875, 'homeNotional': 21530.418923213383, 'foreignNotional': 7792049.058903849}, {'timestamp': datetime.datetime(2020, 9, 13, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 359.05, 'high': 363.45, 'low': 358.2, 'close': 362.9, 'trades': 4001, 'volume': 2858274, 'vwap': 361.9, 'lastSize': 80, 'turnover': 103439837265, 'homeNotional': 29414.27258452625, 'foreignNotional': 10644959.192540761}] 2020-09-14 01:00:20 INFO: prepare candles [CandleItem(low=361.35, high=365.25, open=363.25, close=363.4, color='GREEN'), CandleItem(low=360.15, high=363.65, open=362.9, close=363.25, color='GREEN'), CandleItem(low=358.2, high=363.45, open=359.05, close=362.9, color='GREEN')] 2020-09-14 01:00:20 INFO: skip by colors first_candle=CandleItem(low=358.2, high=363.45, open=359.05, close=362.9, color='GREEN') second_candle=CandleItem(low=360.15, high=363.65, open=362.9, close=363.25, color='GREEN') last_candle=CandleItem(low=361.35, high=365.25, open=363.25, close=363.4, color='GREEN') 2020-09-14 01:00:20 INFO: check need new order None 2020-09-14 01:00:20 INFO: init new order end 2020-09-14 01:00:20 INFO: 2020-09-14 01:00:20 INFO: 2020-09-14 01:00:20 INFO: 2020-09-14 01:00:20 INFO: 2020-09-14 01:02:00 INFO: 2020-09-14 01:02:00 INFO: 2020-09-14 01:02:00 INFO: 2020-09-14 01:02:00 INFO: 2020-09-14 01:02:00 INFO: clearing start 2020-09-14 01:02:01 INFO: clearing end 2020-09-14 01:02:01 INFO: 2020-09-14 01:02:01 INFO: 2020-09-14 01:02:01 INFO: 2020-09-14 01:02:01 INFO: 2020-09-14 02:00:20 INFO: 2020-09-14 02:00:20 INFO: 2020-09-14 02:00:20 INFO: 2020-09-14 02:00:20 INFO: 2020-09-14 02:00:20 INFO: init new order start 2020-09-14 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 13, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.4, 'high': 366.45, 'low': 363.0, 'close': 365.4, 'trades': 4375, 'volume': 3150625, 'vwap': 364.6, 'lastSize': 200, 'turnover': 114870685105, 'homeNotional': 32481.00910936225, 'foreignNotional': 11842472.777647832}, {'timestamp': datetime.datetime(2020, 9, 13, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.25, 'high': 365.25, 'low': 361.35, 'close': 363.4, 'trades': 3038, 'volume': 1653487, 'vwap': 363.54, 'lastSize': 901, 'turnover': 60109492490, 'homeNotional': 17058.67267312364, 'foreignNotional': 6201381.204985931}, {'timestamp': datetime.datetime(2020, 9, 13, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 362.9, 'high': 363.65, 'low': 360.15, 'close': 363.25, 'trades': 3872, 'volume': 2089364, 'vwap': 361.91, 'lastSize': 1000, 'turnover': 75615842875, 'homeNotional': 21530.418923213383, 'foreignNotional': 7792049.058903849}] 2020-09-14 02:00:20 INFO: prepare candles [CandleItem(low=363.0, high=366.45, open=363.4, close=365.4, color='GREEN'), CandleItem(low=361.35, high=365.25, open=363.25, close=363.4, color='GREEN'), CandleItem(low=360.15, high=363.65, open=362.9, close=363.25, color='GREEN')] 2020-09-14 02:00:20 INFO: skip by colors first_candle=CandleItem(low=360.15, high=363.65, open=362.9, close=363.25, color='GREEN') second_candle=CandleItem(low=361.35, high=365.25, open=363.25, close=363.4, color='GREEN') last_candle=CandleItem(low=363.0, high=366.45, open=363.4, close=365.4, color='GREEN') 2020-09-14 02:00:20 INFO: check need new order None 2020-09-14 02:00:20 INFO: init new order end 2020-09-14 02:00:20 INFO: 2020-09-14 02:00:20 INFO: 2020-09-14 02:00:20 INFO: 2020-09-14 02:00:20 INFO: 2020-09-14 02:02:00 INFO: 2020-09-14 02:02:00 INFO: 2020-09-14 02:02:00 INFO: 2020-09-14 02:02:00 INFO: 2020-09-14 02:02:00 INFO: clearing start 2020-09-14 02:02:00 INFO: clearing end 2020-09-14 02:02:00 INFO: 2020-09-14 02:02:00 INFO: 2020-09-14 02:02:00 INFO: 2020-09-14 02:02:00 INFO: 2020-09-14 03:00:20 INFO: 2020-09-14 03:00:20 INFO: 2020-09-14 03:00:20 INFO: 2020-09-14 03:00:20 INFO: 2020-09-14 03:00:20 INFO: init new order start 2020-09-14 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 14, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.4, 'high': 367.0, 'low': 364.25, 'close': 366.9, 'trades': 2639, 'volume': 1862409, 'vwap': 365.9, 'lastSize': 1978, 'turnover': 68144114305, 'homeNotional': 19219.94290786394, 'foreignNotional': 7032436.443730203}, {'timestamp': datetime.datetime(2020, 9, 13, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.4, 'high': 366.45, 'low': 363.0, 'close': 365.4, 'trades': 4375, 'volume': 3150625, 'vwap': 364.6, 'lastSize': 200, 'turnover': 114870685105, 'homeNotional': 32481.00910936225, 'foreignNotional': 11842472.777647832}, {'timestamp': datetime.datetime(2020, 9, 13, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.25, 'high': 365.25, 'low': 361.35, 'close': 363.4, 'trades': 3038, 'volume': 1653487, 'vwap': 363.54, 'lastSize': 901, 'turnover': 60109492490, 'homeNotional': 17058.67267312364, 'foreignNotional': 6201381.204985931}] 2020-09-14 03:00:20 INFO: prepare candles [CandleItem(low=364.25, high=367.0, open=365.4, close=366.9, color='GREEN'), CandleItem(low=363.0, high=366.45, open=363.4, close=365.4, color='GREEN'), CandleItem(low=361.35, high=365.25, open=363.25, close=363.4, color='GREEN')] 2020-09-14 03:00:20 INFO: skip by colors first_candle=CandleItem(low=361.35, high=365.25, open=363.25, close=363.4, color='GREEN') second_candle=CandleItem(low=363.0, high=366.45, open=363.4, close=365.4, color='GREEN') last_candle=CandleItem(low=364.25, high=367.0, open=365.4, close=366.9, color='GREEN') 2020-09-14 03:00:20 INFO: check need new order None 2020-09-14 03:00:20 INFO: init new order end 2020-09-14 03:00:20 INFO: 2020-09-14 03:00:20 INFO: 2020-09-14 03:00:20 INFO: 2020-09-14 03:00:20 INFO: 2020-09-14 03:02:00 INFO: 2020-09-14 03:02:00 INFO: 2020-09-14 03:02:00 INFO: 2020-09-14 03:02:00 INFO: 2020-09-14 03:02:00 INFO: clearing start 2020-09-14 03:02:00 INFO: clearing end 2020-09-14 03:02:00 INFO: 2020-09-14 03:02:00 INFO: 2020-09-14 03:02:00 INFO: 2020-09-14 03:02:00 INFO: 2020-09-14 04:00:20 INFO: 2020-09-14 04:00:20 INFO: 2020-09-14 04:00:20 INFO: 2020-09-14 04:00:20 INFO: 2020-09-14 04:00:20 INFO: init new order start 2020-09-14 04:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 14, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 366.9, 'high': 367.0, 'low': 356.25, 'close': 358.5, 'trades': 6919, 'volume': 5437418, 'vwap': 360.84, 'lastSize': 1700, 'turnover': 196201464705, 'homeNotional': 55993.949033765406, 'foreignNotional': 20204888.560213063}, {'timestamp': datetime.datetime(2020, 9, 14, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.4, 'high': 367.0, 'low': 364.25, 'close': 366.9, 'trades': 2639, 'volume': 1862409, 'vwap': 365.9, 'lastSize': 1978, 'turnover': 68144114305, 'homeNotional': 19219.94290786394, 'foreignNotional': 7032436.443730203}, {'timestamp': datetime.datetime(2020, 9, 13, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.4, 'high': 366.45, 'low': 363.0, 'close': 365.4, 'trades': 4375, 'volume': 3150625, 'vwap': 364.6, 'lastSize': 200, 'turnover': 114870685105, 'homeNotional': 32481.00910936225, 'foreignNotional': 11842472.777647832}] 2020-09-14 04:00:21 INFO: prepare candles [CandleItem(low=356.25, high=367.0, open=366.9, close=358.5, color='RED'), CandleItem(low=364.25, high=367.0, open=365.4, close=366.9, color='GREEN'), CandleItem(low=363.0, high=366.45, open=363.4, close=365.4, color='GREEN')] 2020-09-14 04:00:21 INFO: last_candle=CandleItem(low=356.25, high=367.0, open=366.9, close=358.5, color='RED') 2020-09-14 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-14 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=356.25, high=367.0, open=366.9, close=358.5, color='RED') 2020-09-14 04:00:21 INFO: skip by CandleItem(low=356.25, high=367.0, open=366.9, close=358.5, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-14 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-14 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=356.25, high=367.0, open=366.9, close=358.5, color='RED') 2020-09-14 04:00:21 INFO: skip by CandleItem(low=356.25, high=367.0, open=366.9, close=358.5, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-14 04:00:21 INFO: not found applicable config for candle 2020-09-14 04:00:21 INFO: check need new order None 2020-09-14 04:00:21 INFO: init new order end 2020-09-14 04:00:21 INFO: 2020-09-14 04:00:21 INFO: 2020-09-14 04:00:21 INFO: 2020-09-14 04:00:21 INFO: 2020-09-14 04:02:00 INFO: 2020-09-14 04:02:00 INFO: 2020-09-14 04:02:00 INFO: 2020-09-14 04:02:00 INFO: 2020-09-14 04:02:00 INFO: clearing start 2020-09-14 04:02:00 INFO: clearing end 2020-09-14 04:02:00 INFO: 2020-09-14 04:02:00 INFO: 2020-09-14 04:02:00 INFO: 2020-09-14 04:02:00 INFO: 2020-09-14 05:00:22 INFO: 2020-09-14 05:00:23 INFO: 2020-09-14 05:00:26 INFO: 2020-09-14 05:00:34 INFO: 2020-09-14 05:00:37 INFO: init new order start 2020-09-14 05:00:37 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 14, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 358.5, 'high': 364.4, 'low': 358.45, 'close': 364.4, 'trades': 3833, 'volume': 2367116, 'vwap': 361.19, 'lastSize': 14835, 'turnover': 85497435165, 'homeNotional': 24393.915774462206, 'foreignNotional': 8810832.550965687}, {'timestamp': datetime.datetime(2020, 9, 14, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 366.9, 'high': 367.0, 'low': 356.25, 'close': 358.5, 'trades': 6919, 'volume': 5437418, 'vwap': 360.84, 'lastSize': 1700, 'turnover': 196201464705, 'homeNotional': 55993.949033765406, 'foreignNotional': 20204888.560213063}, {'timestamp': datetime.datetime(2020, 9, 14, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.4, 'high': 367.0, 'low': 364.25, 'close': 366.9, 'trades': 2639, 'volume': 1862409, 'vwap': 365.9, 'lastSize': 1978, 'turnover': 68144114305, 'homeNotional': 19219.94290786394, 'foreignNotional': 7032436.443730203}] 2020-09-14 05:00:37 INFO: prepare candles [CandleItem(low=358.45, high=364.4, open=358.5, close=364.4, color='GREEN'), CandleItem(low=356.25, high=367.0, open=366.9, close=358.5, color='RED'), CandleItem(low=364.25, high=367.0, open=365.4, close=366.9, color='GREEN')] 2020-09-14 05:00:37 INFO: skip by colors first_candle=CandleItem(low=364.25, high=367.0, open=365.4, close=366.9, color='GREEN') second_candle=CandleItem(low=356.25, high=367.0, open=366.9, close=358.5, color='RED') last_candle=CandleItem(low=358.45, high=364.4, open=358.5, close=364.4, color='GREEN') 2020-09-14 05:00:37 INFO: check need new order None 2020-09-14 05:00:37 INFO: init new order end 2020-09-14 05:00:37 INFO: 2020-09-14 05:00:37 INFO: 2020-09-14 05:00:37 INFO: 2020-09-14 05:00:37 INFO: 2020-09-14 05:02:00 INFO: 2020-09-14 05:02:00 INFO: 2020-09-14 05:02:00 INFO: 2020-09-14 05:02:00 INFO: 2020-09-14 05:02:00 INFO: clearing start 2020-09-14 05:02:00 INFO: clearing end 2020-09-14 05:02:00 INFO: 2020-09-14 05:02:00 INFO: 2020-09-14 05:02:00 INFO: 2020-09-14 05:02:00 INFO: 2020-09-14 06:00:20 INFO: 2020-09-14 06:00:20 INFO: 2020-09-14 06:00:20 INFO: 2020-09-14 06:00:20 INFO: 2020-09-14 06:00:20 INFO: init new order start 2020-09-14 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 14, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.4, 'high': 368.3, 'low': 364.0, 'close': 367.2, 'trades': 6282, 'volume': 5126243, 'vwap': 366.41, 'lastSize': 1, 'turnover': 187827998510, 'homeNotional': 53075.27368409864, 'foreignNotional': 19447072.634085465}, {'timestamp': datetime.datetime(2020, 9, 14, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 358.5, 'high': 364.4, 'low': 358.45, 'close': 364.4, 'trades': 3833, 'volume': 2367116, 'vwap': 361.19, 'lastSize': 14835, 'turnover': 85497435165, 'homeNotional': 24393.915774462206, 'foreignNotional': 8810832.550965687}, {'timestamp': datetime.datetime(2020, 9, 14, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 366.9, 'high': 367.0, 'low': 356.25, 'close': 358.5, 'trades': 6919, 'volume': 5437418, 'vwap': 360.84, 'lastSize': 1700, 'turnover': 196201464705, 'homeNotional': 55993.949033765406, 'foreignNotional': 20204888.560213063}] 2020-09-14 06:00:20 INFO: prepare candles [CandleItem(low=364.0, high=368.3, open=364.4, close=367.2, color='GREEN'), CandleItem(low=358.45, high=364.4, open=358.5, close=364.4, color='GREEN'), CandleItem(low=356.25, high=367.0, open=366.9, close=358.5, color='RED')] 2020-09-14 06:00:20 INFO: skip by colors first_candle=CandleItem(low=356.25, high=367.0, open=366.9, close=358.5, color='RED') second_candle=CandleItem(low=358.45, high=364.4, open=358.5, close=364.4, color='GREEN') last_candle=CandleItem(low=364.0, high=368.3, open=364.4, close=367.2, color='GREEN') 2020-09-14 06:00:20 INFO: check need new order None 2020-09-14 06:00:20 INFO: init new order end 2020-09-14 06:00:20 INFO: 2020-09-14 06:00:20 INFO: 2020-09-14 06:00:20 INFO: 2020-09-14 06:00:20 INFO: 2020-09-14 06:02:00 INFO: 2020-09-14 06:02:00 INFO: 2020-09-14 06:02:00 INFO: 2020-09-14 06:02:00 INFO: 2020-09-14 06:02:00 INFO: clearing start 2020-09-14 06:02:00 INFO: clearing end 2020-09-14 06:02:00 INFO: 2020-09-14 06:02:00 INFO: 2020-09-14 06:02:00 INFO: 2020-09-14 06:02:00 INFO: 2020-09-14 07:00:20 INFO: 2020-09-14 07:00:20 INFO: 2020-09-14 07:00:20 INFO: 2020-09-14 07:00:20 INFO: 2020-09-14 07:00:20 INFO: init new order start 2020-09-14 07:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 14, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.2, 'high': 368.15, 'low': 365.8, 'close': 366.0, 'trades': 2419, 'volume': 1314426, 'vwap': 367.11, 'lastSize': 32, 'turnover': 48252665100, 'homeNotional': 13612.197980224391, 'foreignNotional': 4997049.820655335}, {'timestamp': datetime.datetime(2020, 9, 14, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.4, 'high': 368.3, 'low': 364.0, 'close': 367.2, 'trades': 6282, 'volume': 5126243, 'vwap': 366.41, 'lastSize': 1, 'turnover': 187827998510, 'homeNotional': 53075.27368409864, 'foreignNotional': 19447072.634085465}, {'timestamp': datetime.datetime(2020, 9, 14, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 358.5, 'high': 364.4, 'low': 358.45, 'close': 364.4, 'trades': 3833, 'volume': 2367116, 'vwap': 361.19, 'lastSize': 14835, 'turnover': 85497435165, 'homeNotional': 24393.915774462206, 'foreignNotional': 8810832.550965687}] 2020-09-14 07:00:20 INFO: prepare candles [CandleItem(low=365.8, high=368.15, open=367.2, close=366.0, color='RED'), CandleItem(low=364.0, high=368.3, open=364.4, close=367.2, color='GREEN'), CandleItem(low=358.45, high=364.4, open=358.5, close=364.4, color='GREEN')] 2020-09-14 07:00:20 INFO: last_candle=CandleItem(low=365.8, high=368.15, open=367.2, close=366.0, color='RED') 2020-09-14 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-09-14 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=365.8, high=368.15, open=367.2, close=366.0, color='RED') 2020-09-14 07:00:20 INFO: skip by CandleItem(low=365.8, high=368.15, open=367.2, close=366.0, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-14 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-09-14 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=365.8, high=368.15, open=367.2, close=366.0, color='RED') 2020-09-14 07:00:20 INFO: skip by CandleItem(low=365.8, high=368.15, open=367.2, close=366.0, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-14 07:00:20 INFO: not found applicable config for candle 2020-09-14 07:00:20 INFO: check need new order None 2020-09-14 07:00:20 INFO: init new order end 2020-09-14 07:00:20 INFO: 2020-09-14 07:00:20 INFO: 2020-09-14 07:00:20 INFO: 2020-09-14 07:00:20 INFO: 2020-09-14 07:02:00 INFO: 2020-09-14 07:02:00 INFO: 2020-09-14 07:02:00 INFO: 2020-09-14 07:02:00 INFO: 2020-09-14 07:02:00 INFO: clearing start 2020-09-14 07:02:00 INFO: clearing end 2020-09-14 07:02:00 INFO: 2020-09-14 07:02:00 INFO: 2020-09-14 07:02:00 INFO: 2020-09-14 07:02:00 INFO: 2020-09-14 08:00:20 INFO: 2020-09-14 08:00:20 INFO: 2020-09-14 08:00:20 INFO: 2020-09-14 08:00:20 INFO: 2020-09-14 08:00:20 INFO: init new order start 2020-09-14 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 14, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 366.0, 'high': 366.15, 'low': 362.6, 'close': 365.45, 'trades': 3461, 'volume': 2673088, 'vwap': 364.66, 'lastSize': 2993, 'turnover': 97474643770, 'homeNotional': 27634.700307485742, 'foreignNotional': 10077053.049414638}, {'timestamp': datetime.datetime(2020, 9, 14, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.2, 'high': 368.15, 'low': 365.8, 'close': 366.0, 'trades': 2419, 'volume': 1314426, 'vwap': 367.11, 'lastSize': 32, 'turnover': 48252665100, 'homeNotional': 13612.197980224391, 'foreignNotional': 4997049.820655335}, {'timestamp': datetime.datetime(2020, 9, 14, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.4, 'high': 368.3, 'low': 364.0, 'close': 367.2, 'trades': 6282, 'volume': 5126243, 'vwap': 366.41, 'lastSize': 1, 'turnover': 187827998510, 'homeNotional': 53075.27368409864, 'foreignNotional': 19447072.634085465}] 2020-09-14 08:00:20 INFO: prepare candles [CandleItem(low=362.6, high=366.15, open=366.0, close=365.45, color='RED'), CandleItem(low=365.8, high=368.15, open=367.2, close=366.0, color='RED'), CandleItem(low=364.0, high=368.3, open=364.4, close=367.2, color='GREEN')] 2020-09-14 08:00:20 INFO: skip by colors first_candle=CandleItem(low=364.0, high=368.3, open=364.4, close=367.2, color='GREEN') second_candle=CandleItem(low=365.8, high=368.15, open=367.2, close=366.0, color='RED') last_candle=CandleItem(low=362.6, high=366.15, open=366.0, close=365.45, color='RED') 2020-09-14 08:00:20 INFO: check need new order None 2020-09-14 08:00:20 INFO: init new order end 2020-09-14 08:00:20 INFO: 2020-09-14 08:00:20 INFO: 2020-09-14 08:00:20 INFO: 2020-09-14 08:00:20 INFO: 2020-09-14 08:02:00 INFO: 2020-09-14 08:02:00 INFO: 2020-09-14 08:02:00 INFO: 2020-09-14 08:02:00 INFO: 2020-09-14 08:02:00 INFO: clearing start 2020-09-14 08:02:01 INFO: clearing end 2020-09-14 08:02:01 INFO: 2020-09-14 08:02:01 INFO: 2020-09-14 08:02:01 INFO: 2020-09-14 08:02:01 INFO: 2020-09-14 09:00:20 INFO: 2020-09-14 09:00:20 INFO: 2020-09-14 09:00:20 INFO: 2020-09-14 09:00:20 INFO: 2020-09-14 09:00:20 INFO: init new order start 2020-09-14 09:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 14, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.45, 'high': 366.75, 'low': 363.5, 'close': 365.45, 'trades': 2496, 'volume': 1694114, 'vwap': 365.33, 'lastSize': 1, 'turnover': 61889686610, 'homeNotional': 17520.763700883348, 'foreignNotional': 6400735.711750418}, {'timestamp': datetime.datetime(2020, 9, 14, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 366.0, 'high': 366.15, 'low': 362.6, 'close': 365.45, 'trades': 3461, 'volume': 2673088, 'vwap': 364.66, 'lastSize': 2993, 'turnover': 97474643770, 'homeNotional': 27634.700307485742, 'foreignNotional': 10077053.049414638}, {'timestamp': datetime.datetime(2020, 9, 14, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.2, 'high': 368.15, 'low': 365.8, 'close': 366.0, 'trades': 2419, 'volume': 1314426, 'vwap': 367.11, 'lastSize': 32, 'turnover': 48252665100, 'homeNotional': 13612.197980224391, 'foreignNotional': 4997049.820655335}] 2020-09-14 09:00:20 INFO: skip by found empty buckets 2020-09-14 09:00:20 INFO: check need new order None 2020-09-14 09:00:20 INFO: init new order end 2020-09-14 09:00:20 INFO: 2020-09-14 09:00:20 INFO: 2020-09-14 09:00:20 INFO: 2020-09-14 09:00:20 INFO: 2020-09-14 09:02:00 INFO: 2020-09-14 09:02:00 INFO: 2020-09-14 09:02:00 INFO: 2020-09-14 09:02:00 INFO: 2020-09-14 09:02:00 INFO: clearing start 2020-09-14 09:02:00 INFO: clearing end 2020-09-14 09:02:00 INFO: 2020-09-14 09:02:00 INFO: 2020-09-14 09:02:00 INFO: 2020-09-14 09:02:00 INFO: 2020-09-14 10:00:20 INFO: 2020-09-14 10:00:20 INFO: 2020-09-14 10:00:20 INFO: 2020-09-14 10:00:20 INFO: 2020-09-14 10:00:20 INFO: init new order start 2020-09-14 10:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 14, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.45, 'high': 370.85, 'low': 365.5, 'close': 368.45, 'trades': 5698, 'volume': 5154596, 'vwap': 368.85, 'lastSize': 50, 'turnover': 190126677915, 'homeNotional': 53405.62614172443, 'foreignNotional': 19698644.024335705}, {'timestamp': datetime.datetime(2020, 9, 14, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.45, 'high': 366.75, 'low': 363.5, 'close': 365.45, 'trades': 2496, 'volume': 1694114, 'vwap': 365.33, 'lastSize': 1, 'turnover': 61889686610, 'homeNotional': 17520.763700883348, 'foreignNotional': 6400735.711750418}, {'timestamp': datetime.datetime(2020, 9, 14, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 366.0, 'high': 366.15, 'low': 362.6, 'close': 365.45, 'trades': 3461, 'volume': 2673088, 'vwap': 364.66, 'lastSize': 2993, 'turnover': 97474643770, 'homeNotional': 27634.700307485742, 'foreignNotional': 10077053.049414638}] 2020-09-14 10:00:20 INFO: skip by found empty buckets 2020-09-14 10:00:20 INFO: check need new order None 2020-09-14 10:00:20 INFO: init new order end 2020-09-14 10:00:20 INFO: 2020-09-14 10:00:20 INFO: 2020-09-14 10:00:20 INFO: 2020-09-14 10:00:20 INFO: 2020-09-14 10:02:00 INFO: 2020-09-14 10:02:00 INFO: 2020-09-14 10:02:00 INFO: 2020-09-14 10:02:00 INFO: 2020-09-14 10:02:00 INFO: clearing start 2020-09-14 10:02:00 INFO: clearing end 2020-09-14 10:02:00 INFO: 2020-09-14 10:02:00 INFO: 2020-09-14 10:02:00 INFO: 2020-09-14 10:02:00 INFO: 2020-09-14 11:00:20 INFO: 2020-09-14 11:00:20 INFO: 2020-09-14 11:00:20 INFO: 2020-09-14 11:00:20 INFO: 2020-09-14 11:00:20 INFO: init new order start 2020-09-14 11:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 14, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.45, 'high': 370.8, 'low': 367.25, 'close': 370.05, 'trades': 3281, 'volume': 2650926, 'vwap': 368.6, 'lastSize': 4000, 'turnover': 97712446725, 'homeNotional': 27491.391542632045, 'foreignNotional': 10133269.17289827}, {'timestamp': datetime.datetime(2020, 9, 14, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.45, 'high': 370.85, 'low': 365.5, 'close': 368.45, 'trades': 5698, 'volume': 5154596, 'vwap': 368.85, 'lastSize': 50, 'turnover': 190126677915, 'homeNotional': 53405.62614172443, 'foreignNotional': 19698644.024335705}, {'timestamp': datetime.datetime(2020, 9, 14, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.45, 'high': 366.75, 'low': 363.5, 'close': 365.45, 'trades': 2496, 'volume': 1694114, 'vwap': 365.33, 'lastSize': 1, 'turnover': 61889686610, 'homeNotional': 17520.763700883348, 'foreignNotional': 6400735.711750418}] 2020-09-14 11:00:20 INFO: skip by found empty buckets 2020-09-14 11:00:20 INFO: check need new order None 2020-09-14 11:00:20 INFO: init new order end 2020-09-14 11:00:20 INFO: 2020-09-14 11:00:20 INFO: 2020-09-14 11:00:20 INFO: 2020-09-14 11:00:20 INFO: 2020-09-14 11:02:00 INFO: 2020-09-14 11:02:00 INFO: 2020-09-14 11:02:00 INFO: 2020-09-14 11:02:00 INFO: 2020-09-14 11:02:00 INFO: clearing start 2020-09-14 11:02:00 INFO: clearing end 2020-09-14 11:02:00 INFO: 2020-09-14 11:02:00 INFO: 2020-09-14 11:02:00 INFO: 2020-09-14 11:02:00 INFO: 2020-09-14 12:00:20 INFO: 2020-09-14 12:00:20 INFO: 2020-09-14 12:00:20 INFO: 2020-09-14 12:00:20 INFO: 2020-09-14 12:00:20 INFO: init new order start 2020-09-14 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 14, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 370.05, 'high': 371.1, 'low': 363.55, 'close': 364.3, 'trades': 6132, 'volume': 4526477, 'vwap': 367.75, 'lastSize': 50, 'turnover': 166458340150, 'homeNotional': 47078.11716445542, 'foreignNotional': 17312942.569156267}, {'timestamp': datetime.datetime(2020, 9, 14, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.45, 'high': 370.8, 'low': 367.25, 'close': 370.05, 'trades': 3281, 'volume': 2650926, 'vwap': 368.6, 'lastSize': 4000, 'turnover': 97712446725, 'homeNotional': 27491.391542632045, 'foreignNotional': 10133269.17289827}, {'timestamp': datetime.datetime(2020, 9, 14, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.45, 'high': 370.85, 'low': 365.5, 'close': 368.45, 'trades': 5698, 'volume': 5154596, 'vwap': 368.85, 'lastSize': 50, 'turnover': 190126677915, 'homeNotional': 53405.62614172443, 'foreignNotional': 19698644.024335705}] 2020-09-14 12:00:20 INFO: prepare candles [CandleItem(low=363.55, high=371.1, open=370.05, close=364.3, color='RED'), CandleItem(low=367.25, high=370.8, open=368.45, close=370.05, color='GREEN'), CandleItem(low=365.5, high=370.85, open=365.45, close=368.45, color='GREEN')] 2020-09-14 12:00:20 INFO: last_candle=CandleItem(low=363.55, high=371.1, open=370.05, close=364.3, color='RED') 2020-09-14 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-09-14 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=363.55, high=371.1, open=370.05, close=364.3, color='RED') 2020-09-14 12:00:20 INFO: skip by CandleItem(low=363.55, high=371.1, open=370.05, close=364.3, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-14 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-09-14 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=363.55, high=371.1, open=370.05, close=364.3, color='RED') 2020-09-14 12:00:20 INFO: skip by CandleItem(low=363.55, high=371.1, open=370.05, close=364.3, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-14 12:00:20 INFO: not found applicable config for candle 2020-09-14 12:00:20 INFO: check need new order None 2020-09-14 12:00:20 INFO: init new order end 2020-09-14 12:00:20 INFO: 2020-09-14 12:00:20 INFO: 2020-09-14 12:00:20 INFO: 2020-09-14 12:00:20 INFO: 2020-09-14 12:02:00 INFO: 2020-09-14 12:02:00 INFO: 2020-09-14 12:02:00 INFO: 2020-09-14 12:02:00 INFO: 2020-09-14 12:02:00 INFO: clearing start 2020-09-14 12:02:01 INFO: clearing end 2020-09-14 12:02:01 INFO: 2020-09-14 12:02:01 INFO: 2020-09-14 12:02:01 INFO: 2020-09-14 12:02:01 INFO: 2020-09-14 13:00:20 INFO: 2020-09-14 13:00:20 INFO: 2020-09-14 13:00:20 INFO: 2020-09-14 13:00:20 INFO: 2020-09-14 13:00:20 INFO: init new order start 2020-09-14 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 14, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.3, 'high': 366.25, 'low': 362.15, 'close': 366.2, 'trades': 4439, 'volume': 2939074, 'vwap': 364.11, 'lastSize': 1, 'turnover': 107012710880, 'homeNotional': 30430.50656566728, 'foreignNotional': 11079872.147345329}, {'timestamp': datetime.datetime(2020, 9, 14, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 370.05, 'high': 371.1, 'low': 363.55, 'close': 364.3, 'trades': 6132, 'volume': 4526477, 'vwap': 367.75, 'lastSize': 50, 'turnover': 166458340150, 'homeNotional': 47078.11716445542, 'foreignNotional': 17312942.569156267}, {'timestamp': datetime.datetime(2020, 9, 14, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.45, 'high': 370.8, 'low': 367.25, 'close': 370.05, 'trades': 3281, 'volume': 2650926, 'vwap': 368.6, 'lastSize': 4000, 'turnover': 97712446725, 'homeNotional': 27491.391542632045, 'foreignNotional': 10133269.17289827}] 2020-09-14 13:00:20 INFO: prepare candles [CandleItem(low=362.15, high=366.25, open=364.3, close=366.2, color='GREEN'), CandleItem(low=363.55, high=371.1, open=370.05, close=364.3, color='RED'), CandleItem(low=367.25, high=370.8, open=368.45, close=370.05, color='GREEN')] 2020-09-14 13:00:20 INFO: skip by colors first_candle=CandleItem(low=367.25, high=370.8, open=368.45, close=370.05, color='GREEN') second_candle=CandleItem(low=363.55, high=371.1, open=370.05, close=364.3, color='RED') last_candle=CandleItem(low=362.15, high=366.25, open=364.3, close=366.2, color='GREEN') 2020-09-14 13:00:20 INFO: check need new order None 2020-09-14 13:00:20 INFO: init new order end 2020-09-14 13:00:20 INFO: 2020-09-14 13:00:20 INFO: 2020-09-14 13:00:20 INFO: 2020-09-14 13:00:20 INFO: 2020-09-14 13:02:00 INFO: 2020-09-14 13:02:00 INFO: 2020-09-14 13:02:00 INFO: 2020-09-14 13:02:00 INFO: 2020-09-14 13:02:00 INFO: clearing start 2020-09-14 13:02:00 INFO: clearing end 2020-09-14 13:02:00 INFO: 2020-09-14 13:02:00 INFO: 2020-09-14 13:02:00 INFO: 2020-09-14 13:02:00 INFO: 2020-09-14 14:00:20 INFO: 2020-09-14 14:00:20 INFO: 2020-09-14 14:00:20 INFO: 2020-09-14 14:00:20 INFO: 2020-09-14 14:00:20 INFO: init new order start 2020-09-14 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 14, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 366.2, 'high': 368.55, 'low': 365.85, 'close': 367.65, 'trades': 3182, 'volume': 2117041, 'vwap': 367.22, 'lastSize': 200, 'turnover': 77740823370, 'homeNotional': 22007.570618291822, 'foreignNotional': 8081507.53108028}, {'timestamp': datetime.datetime(2020, 9, 14, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.3, 'high': 366.25, 'low': 362.15, 'close': 366.2, 'trades': 4439, 'volume': 2939074, 'vwap': 364.11, 'lastSize': 1, 'turnover': 107012710880, 'homeNotional': 30430.50656566728, 'foreignNotional': 11079872.147345329}, {'timestamp': datetime.datetime(2020, 9, 14, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 370.05, 'high': 371.1, 'low': 363.55, 'close': 364.3, 'trades': 6132, 'volume': 4526477, 'vwap': 367.75, 'lastSize': 50, 'turnover': 166458340150, 'homeNotional': 47078.11716445542, 'foreignNotional': 17312942.569156267}] 2020-09-14 14:00:20 INFO: prepare candles [CandleItem(low=365.85, high=368.55, open=366.2, close=367.65, color='GREEN'), CandleItem(low=362.15, high=366.25, open=364.3, close=366.2, color='GREEN'), CandleItem(low=363.55, high=371.1, open=370.05, close=364.3, color='RED')] 2020-09-14 14:00:20 INFO: skip by colors first_candle=CandleItem(low=363.55, high=371.1, open=370.05, close=364.3, color='RED') second_candle=CandleItem(low=362.15, high=366.25, open=364.3, close=366.2, color='GREEN') last_candle=CandleItem(low=365.85, high=368.55, open=366.2, close=367.65, color='GREEN') 2020-09-14 14:00:20 INFO: check need new order None 2020-09-14 14:00:20 INFO: init new order end 2020-09-14 14:00:20 INFO: 2020-09-14 14:00:20 INFO: 2020-09-14 14:00:20 INFO: 2020-09-14 14:00:20 INFO: 2020-09-14 14:02:00 INFO: 2020-09-14 14:02:00 INFO: 2020-09-14 14:02:00 INFO: 2020-09-14 14:02:00 INFO: 2020-09-14 14:02:00 INFO: clearing start 2020-09-14 14:02:00 INFO: clearing end 2020-09-14 14:02:00 INFO: 2020-09-14 14:02:00 INFO: 2020-09-14 14:02:00 INFO: 2020-09-14 14:02:00 INFO: 2020-09-14 15:00:20 INFO: 2020-09-14 15:00:20 INFO: 2020-09-14 15:00:20 INFO: 2020-09-14 15:00:20 INFO: 2020-09-14 15:00:20 INFO: init new order start 2020-09-14 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 14, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.65, 'high': 369.55, 'low': 366.65, 'close': 369.4, 'trades': 3784, 'volume': 2723585, 'vwap': 368.52, 'lastSize': 100, 'turnover': 100367529460, 'homeNotional': 28462.93818651754, 'foreignNotional': 10488985.003346069}, {'timestamp': datetime.datetime(2020, 9, 14, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 366.2, 'high': 368.55, 'low': 365.85, 'close': 367.65, 'trades': 3182, 'volume': 2117041, 'vwap': 367.22, 'lastSize': 200, 'turnover': 77740823370, 'homeNotional': 22007.570618291822, 'foreignNotional': 8081507.53108028}, {'timestamp': datetime.datetime(2020, 9, 14, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.3, 'high': 366.25, 'low': 362.15, 'close': 366.2, 'trades': 4439, 'volume': 2939074, 'vwap': 364.11, 'lastSize': 1, 'turnover': 107012710880, 'homeNotional': 30430.50656566728, 'foreignNotional': 11079872.147345329}] 2020-09-14 15:00:20 INFO: prepare candles [CandleItem(low=366.65, high=369.55, open=367.65, close=369.4, color='GREEN'), CandleItem(low=365.85, high=368.55, open=366.2, close=367.65, color='GREEN'), CandleItem(low=362.15, high=366.25, open=364.3, close=366.2, color='GREEN')] 2020-09-14 15:00:20 INFO: skip by colors first_candle=CandleItem(low=362.15, high=366.25, open=364.3, close=366.2, color='GREEN') second_candle=CandleItem(low=365.85, high=368.55, open=366.2, close=367.65, color='GREEN') last_candle=CandleItem(low=366.65, high=369.55, open=367.65, close=369.4, color='GREEN') 2020-09-14 15:00:20 INFO: check need new order None 2020-09-14 15:00:20 INFO: init new order end 2020-09-14 15:00:20 INFO: 2020-09-14 15:00:20 INFO: 2020-09-14 15:00:20 INFO: 2020-09-14 15:00:20 INFO: 2020-09-14 15:02:00 INFO: 2020-09-14 15:02:00 INFO: 2020-09-14 15:02:00 INFO: 2020-09-14 15:02:00 INFO: 2020-09-14 15:02:00 INFO: clearing start 2020-09-14 15:02:00 INFO: clearing end 2020-09-14 15:02:00 INFO: 2020-09-14 15:02:00 INFO: 2020-09-14 15:02:00 INFO: 2020-09-14 15:02:00 INFO: 2020-09-14 16:00:20 INFO: 2020-09-14 16:00:20 INFO: 2020-09-14 16:00:20 INFO: 2020-09-14 16:00:20 INFO: 2020-09-14 16:00:20 INFO: init new order start 2020-09-14 16:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 14, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 369.4, 'high': 371.0, 'low': 367.75, 'close': 369.75, 'trades': 3882, 'volume': 2351654, 'vwap': 369.37, 'lastSize': 48, 'turnover': 86861650345, 'homeNotional': 24654.68068987773, 'foreignNotional': 9106584.916021375}, {'timestamp': datetime.datetime(2020, 9, 14, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.65, 'high': 369.55, 'low': 366.65, 'close': 369.4, 'trades': 3784, 'volume': 2723585, 'vwap': 368.52, 'lastSize': 100, 'turnover': 100367529460, 'homeNotional': 28462.93818651754, 'foreignNotional': 10488985.003346069}, {'timestamp': datetime.datetime(2020, 9, 14, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 366.2, 'high': 368.55, 'low': 365.85, 'close': 367.65, 'trades': 3182, 'volume': 2117041, 'vwap': 367.22, 'lastSize': 200, 'turnover': 77740823370, 'homeNotional': 22007.570618291822, 'foreignNotional': 8081507.53108028}] 2020-09-14 16:00:21 INFO: prepare candles [CandleItem(low=367.75, high=371.0, open=369.4, close=369.75, color='GREEN'), CandleItem(low=366.65, high=369.55, open=367.65, close=369.4, color='GREEN'), CandleItem(low=365.85, high=368.55, open=366.2, close=367.65, color='GREEN')] 2020-09-14 16:00:21 INFO: skip by colors first_candle=CandleItem(low=365.85, high=368.55, open=366.2, close=367.65, color='GREEN') second_candle=CandleItem(low=366.65, high=369.55, open=367.65, close=369.4, color='GREEN') last_candle=CandleItem(low=367.75, high=371.0, open=369.4, close=369.75, color='GREEN') 2020-09-14 16:00:21 INFO: check need new order None 2020-09-14 16:00:21 INFO: init new order end 2020-09-14 16:00:21 INFO: 2020-09-14 16:00:21 INFO: 2020-09-14 16:00:21 INFO: 2020-09-14 16:00:21 INFO: 2020-09-14 16:02:00 INFO: 2020-09-14 16:02:00 INFO: 2020-09-14 16:02:00 INFO: 2020-09-14 16:02:00 INFO: 2020-09-14 16:02:00 INFO: clearing start 2020-09-14 16:02:00 INFO: clearing end 2020-09-14 16:02:00 INFO: 2020-09-14 16:02:00 INFO: 2020-09-14 16:02:00 INFO: 2020-09-14 16:02:00 INFO: 2020-09-14 17:00:20 INFO: 2020-09-14 17:00:20 INFO: 2020-09-14 17:00:20 INFO: 2020-09-14 17:00:20 INFO: 2020-09-14 17:00:20 INFO: init new order start 2020-09-14 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 14, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 369.75, 'high': 376.6, 'low': 369.75, 'close': 375.3, 'trades': 9365, 'volume': 6917197, 'vwap': 374.28, 'lastSize': 1461, 'turnover': 258890879235, 'homeNotional': 73168.8753469463, 'foreignNotional': 27385419.11412258}, {'timestamp': datetime.datetime(2020, 9, 14, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 369.4, 'high': 371.0, 'low': 367.75, 'close': 369.75, 'trades': 3882, 'volume': 2351654, 'vwap': 369.37, 'lastSize': 48, 'turnover': 86861650345, 'homeNotional': 24654.68068987773, 'foreignNotional': 9106584.916021375}, {'timestamp': datetime.datetime(2020, 9, 14, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.65, 'high': 369.55, 'low': 366.65, 'close': 369.4, 'trades': 3784, 'volume': 2723585, 'vwap': 368.52, 'lastSize': 100, 'turnover': 100367529460, 'homeNotional': 28462.93818651754, 'foreignNotional': 10488985.003346069}] 2020-09-14 17:00:20 INFO: prepare candles [CandleItem(low=369.75, high=376.6, open=369.75, close=375.3, color='GREEN'), CandleItem(low=367.75, high=371.0, open=369.4, close=369.75, color='GREEN'), CandleItem(low=366.65, high=369.55, open=367.65, close=369.4, color='GREEN')] 2020-09-14 17:00:20 INFO: skip by colors first_candle=CandleItem(low=366.65, high=369.55, open=367.65, close=369.4, color='GREEN') second_candle=CandleItem(low=367.75, high=371.0, open=369.4, close=369.75, color='GREEN') last_candle=CandleItem(low=369.75, high=376.6, open=369.75, close=375.3, color='GREEN') 2020-09-14 17:00:20 INFO: check need new order None 2020-09-14 17:00:20 INFO: init new order end 2020-09-14 17:00:20 INFO: 2020-09-14 17:00:20 INFO: 2020-09-14 17:00:20 INFO: 2020-09-14 17:00:20 INFO: 2020-09-14 17:02:00 INFO: 2020-09-14 17:02:00 INFO: 2020-09-14 17:02:00 INFO: 2020-09-14 17:02:00 INFO: 2020-09-14 17:02:00 INFO: clearing start 2020-09-14 17:02:01 INFO: clearing end 2020-09-14 17:02:01 INFO: 2020-09-14 17:02:01 INFO: 2020-09-14 17:02:01 INFO: 2020-09-14 17:02:01 INFO: 2020-09-14 18:00:20 INFO: 2020-09-14 18:00:20 INFO: 2020-09-14 18:00:20 INFO: 2020-09-14 18:00:20 INFO: 2020-09-14 18:00:20 INFO: init new order start 2020-09-14 18:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 14, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 375.3, 'high': 377.65, 'low': 373.6, 'close': 374.3, 'trades': 5276, 'volume': 3689504, 'vwap': 375.42, 'lastSize': 200, 'turnover': 138508684315, 'homeNotional': 39302.90798239509, 'foreignNotional': 14754867.709004413}, {'timestamp': datetime.datetime(2020, 9, 14, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 369.75, 'high': 376.6, 'low': 369.75, 'close': 375.3, 'trades': 9365, 'volume': 6917197, 'vwap': 374.28, 'lastSize': 1461, 'turnover': 258890879235, 'homeNotional': 73168.8753469463, 'foreignNotional': 27385419.11412258}, {'timestamp': datetime.datetime(2020, 9, 14, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 369.4, 'high': 371.0, 'low': 367.75, 'close': 369.75, 'trades': 3882, 'volume': 2351654, 'vwap': 369.37, 'lastSize': 48, 'turnover': 86861650345, 'homeNotional': 24654.68068987773, 'foreignNotional': 9106584.916021375}] 2020-09-14 18:00:20 INFO: prepare candles [CandleItem(low=373.6, high=377.65, open=375.3, close=374.3, color='RED'), CandleItem(low=369.75, high=376.6, open=369.75, close=375.3, color='GREEN'), CandleItem(low=367.75, high=371.0, open=369.4, close=369.75, color='GREEN')] 2020-09-14 18:00:20 INFO: last_candle=CandleItem(low=373.6, high=377.65, open=375.3, close=374.3, color='RED') 2020-09-14 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-14 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=373.6, high=377.65, open=375.3, close=374.3, color='RED') 2020-09-14 18:00:20 INFO: skip by CandleItem(low=373.6, high=377.65, open=375.3, close=374.3, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-14 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-14 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=373.6, high=377.65, open=375.3, close=374.3, color='RED') 2020-09-14 18:00:20 INFO: skip by CandleItem(low=373.6, high=377.65, open=375.3, close=374.3, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-14 18:00:20 INFO: not found applicable config for candle 2020-09-14 18:00:20 INFO: check need new order None 2020-09-14 18:00:20 INFO: init new order end 2020-09-14 18:00:20 INFO: 2020-09-14 18:00:20 INFO: 2020-09-14 18:00:20 INFO: 2020-09-14 18:00:20 INFO: 2020-09-14 18:02:00 INFO: 2020-09-14 18:02:00 INFO: 2020-09-14 18:02:00 INFO: 2020-09-14 18:02:00 INFO: 2020-09-14 18:02:00 INFO: clearing start 2020-09-14 18:02:01 INFO: clearing end 2020-09-14 18:02:01 INFO: 2020-09-14 18:02:01 INFO: 2020-09-14 18:02:01 INFO: 2020-09-14 18:02:01 INFO: 2020-09-14 19:00:20 INFO: 2020-09-14 19:00:20 INFO: 2020-09-14 19:00:20 INFO: 2020-09-14 19:00:20 INFO: 2020-09-14 19:00:20 INFO: init new order start 2020-09-14 19:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 14, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 374.3, 'high': 384.8, 'low': 374.35, 'close': 383.5, 'trades': 8576, 'volume': 6198319, 'vwap': 380.55, 'lastSize': 35, 'turnover': 235876276100, 'homeNotional': 66242.68939651243, 'foreignNotional': 25208818.683979135}, {'timestamp': datetime.datetime(2020, 9, 14, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 375.3, 'high': 377.65, 'low': 373.6, 'close': 374.3, 'trades': 5276, 'volume': 3689504, 'vwap': 375.42, 'lastSize': 200, 'turnover': 138508684315, 'homeNotional': 39302.90798239509, 'foreignNotional': 14754867.709004413}, {'timestamp': datetime.datetime(2020, 9, 14, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 369.75, 'high': 376.6, 'low': 369.75, 'close': 375.3, 'trades': 9365, 'volume': 6917197, 'vwap': 374.28, 'lastSize': 1461, 'turnover': 258890879235, 'homeNotional': 73168.8753469463, 'foreignNotional': 27385419.11412258}] 2020-09-14 19:00:21 INFO: prepare candles [CandleItem(low=374.35, high=384.8, open=374.3, close=383.5, color='GREEN'), CandleItem(low=373.6, high=377.65, open=375.3, close=374.3, color='RED'), CandleItem(low=369.75, high=376.6, open=369.75, close=375.3, color='GREEN')] 2020-09-14 19:00:21 INFO: skip by colors first_candle=CandleItem(low=369.75, high=376.6, open=369.75, close=375.3, color='GREEN') second_candle=CandleItem(low=373.6, high=377.65, open=375.3, close=374.3, color='RED') last_candle=CandleItem(low=374.35, high=384.8, open=374.3, close=383.5, color='GREEN') 2020-09-14 19:00:21 INFO: check need new order None 2020-09-14 19:00:21 INFO: init new order end 2020-09-14 19:00:21 INFO: 2020-09-14 19:00:21 INFO: 2020-09-14 19:00:21 INFO: 2020-09-14 19:00:21 INFO: 2020-09-14 19:02:00 INFO: 2020-09-14 19:02:00 INFO: 2020-09-14 19:02:00 INFO: 2020-09-14 19:02:00 INFO: 2020-09-14 19:02:00 INFO: clearing start 2020-09-14 19:02:00 INFO: clearing end 2020-09-14 19:02:00 INFO: 2020-09-14 19:02:00 INFO: 2020-09-14 19:02:00 INFO: 2020-09-14 19:02:00 INFO: 2020-09-14 20:00:20 INFO: 2020-09-14 20:00:20 INFO: 2020-09-14 20:00:20 INFO: 2020-09-14 20:00:20 INFO: 2020-09-14 20:00:20 INFO: init new order start 2020-09-14 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 14, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.5, 'high': 385.5, 'low': 377.1, 'close': 380.95, 'trades': 7939, 'volume': 6198172, 'vwap': 380.93, 'lastSize': 50, 'turnover': 236104163945, 'homeNotional': 66376.63708008443, 'foreignNotional': 25284815.293219946}, {'timestamp': datetime.datetime(2020, 9, 14, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 374.3, 'high': 384.8, 'low': 374.35, 'close': 383.5, 'trades': 8576, 'volume': 6198319, 'vwap': 380.55, 'lastSize': 35, 'turnover': 235876276100, 'homeNotional': 66242.68939651243, 'foreignNotional': 25208818.683979135}, {'timestamp': datetime.datetime(2020, 9, 14, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 375.3, 'high': 377.65, 'low': 373.6, 'close': 374.3, 'trades': 5276, 'volume': 3689504, 'vwap': 375.42, 'lastSize': 200, 'turnover': 138508684315, 'homeNotional': 39302.90798239509, 'foreignNotional': 14754867.709004413}] 2020-09-14 20:00:20 INFO: prepare candles [CandleItem(low=377.1, high=385.5, open=383.5, close=380.95, color='RED'), CandleItem(low=374.35, high=384.8, open=374.3, close=383.5, color='GREEN'), CandleItem(low=373.6, high=377.65, open=375.3, close=374.3, color='RED')] 2020-09-14 20:00:20 INFO: skip by colors first_candle=CandleItem(low=373.6, high=377.65, open=375.3, close=374.3, color='RED') second_candle=CandleItem(low=374.35, high=384.8, open=374.3, close=383.5, color='GREEN') last_candle=CandleItem(low=377.1, high=385.5, open=383.5, close=380.95, color='RED') 2020-09-14 20:00:20 INFO: check need new order None 2020-09-14 20:00:20 INFO: init new order end 2020-09-14 20:00:20 INFO: 2020-09-14 20:00:20 INFO: 2020-09-14 20:00:20 INFO: 2020-09-14 20:00:20 INFO: 2020-09-14 20:02:00 INFO: 2020-09-14 20:02:00 INFO: 2020-09-14 20:02:00 INFO: 2020-09-14 20:02:00 INFO: 2020-09-14 20:02:00 INFO: clearing start 2020-09-14 20:02:00 INFO: clearing end 2020-09-14 20:02:00 INFO: 2020-09-14 20:02:00 INFO: 2020-09-14 20:02:00 INFO: 2020-09-14 20:02:00 INFO: 2020-09-14 21:00:20 INFO: 2020-09-14 21:00:20 INFO: 2020-09-14 21:00:20 INFO: 2020-09-14 21:00:20 INFO: 2020-09-14 21:00:20 INFO: init new order start 2020-09-14 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 14, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 380.95, 'high': 381.9, 'low': 375.95, 'close': 378.05, 'trades': 4917, 'volume': 3689232, 'vwap': 378.51, 'lastSize': 100, 'turnover': 139640209580, 'homeNotional': 39472.8821111262, 'foreignNotional': 14940853.129316268}, {'timestamp': datetime.datetime(2020, 9, 14, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.5, 'high': 385.5, 'low': 377.1, 'close': 380.95, 'trades': 7939, 'volume': 6198172, 'vwap': 380.93, 'lastSize': 50, 'turnover': 236104163945, 'homeNotional': 66376.63708008443, 'foreignNotional': 25284815.293219946}, {'timestamp': datetime.datetime(2020, 9, 14, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 374.3, 'high': 384.8, 'low': 374.35, 'close': 383.5, 'trades': 8576, 'volume': 6198319, 'vwap': 380.55, 'lastSize': 35, 'turnover': 235876276100, 'homeNotional': 66242.68939651243, 'foreignNotional': 25208818.683979135}] 2020-09-14 21:00:20 INFO: prepare candles [CandleItem(low=375.95, high=381.9, open=380.95, close=378.05, color='RED'), CandleItem(low=377.1, high=385.5, open=383.5, close=380.95, color='RED'), CandleItem(low=374.35, high=384.8, open=374.3, close=383.5, color='GREEN')] 2020-09-14 21:00:20 INFO: skip by colors first_candle=CandleItem(low=374.35, high=384.8, open=374.3, close=383.5, color='GREEN') second_candle=CandleItem(low=377.1, high=385.5, open=383.5, close=380.95, color='RED') last_candle=CandleItem(low=375.95, high=381.9, open=380.95, close=378.05, color='RED') 2020-09-14 21:00:20 INFO: check need new order None 2020-09-14 21:00:20 INFO: init new order end 2020-09-14 21:00:20 INFO: 2020-09-14 21:00:20 INFO: 2020-09-14 21:00:20 INFO: 2020-09-14 21:00:20 INFO: 2020-09-14 21:02:00 INFO: 2020-09-14 21:02:00 INFO: 2020-09-14 21:02:00 INFO: 2020-09-14 21:02:00 INFO: 2020-09-14 21:02:00 INFO: clearing start 2020-09-14 21:02:00 INFO: clearing end 2020-09-14 21:02:00 INFO: 2020-09-14 21:02:00 INFO: 2020-09-14 21:02:00 INFO: 2020-09-14 21:02:00 INFO: 2020-09-14 22:00:20 INFO: 2020-09-14 22:00:20 INFO: 2020-09-14 22:00:20 INFO: 2020-09-14 22:00:20 INFO: 2020-09-14 22:00:20 INFO: init new order start 2020-09-14 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 14, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 378.05, 'high': 378.6, 'low': 372.5, 'close': 375.85, 'trades': 4860, 'volume': 3293073, 'vwap': 375.8, 'lastSize': 13, 'turnover': 123751727120, 'homeNotional': 35171.22223680286, 'foreignNotional': 13217172.314281335}, {'timestamp': datetime.datetime(2020, 9, 14, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 380.95, 'high': 381.9, 'low': 375.95, 'close': 378.05, 'trades': 4917, 'volume': 3689232, 'vwap': 378.51, 'lastSize': 100, 'turnover': 139640209580, 'homeNotional': 39472.8821111262, 'foreignNotional': 14940853.129316268}, {'timestamp': datetime.datetime(2020, 9, 14, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.5, 'high': 385.5, 'low': 377.1, 'close': 380.95, 'trades': 7939, 'volume': 6198172, 'vwap': 380.93, 'lastSize': 50, 'turnover': 236104163945, 'homeNotional': 66376.63708008443, 'foreignNotional': 25284815.293219946}] 2020-09-14 22:00:20 INFO: prepare candles [CandleItem(low=372.5, high=378.6, open=378.05, close=375.85, color='RED'), CandleItem(low=375.95, high=381.9, open=380.95, close=378.05, color='RED'), CandleItem(low=377.1, high=385.5, open=383.5, close=380.95, color='RED')] 2020-09-14 22:00:20 INFO: skip by colors first_candle=CandleItem(low=377.1, high=385.5, open=383.5, close=380.95, color='RED') second_candle=CandleItem(low=375.95, high=381.9, open=380.95, close=378.05, color='RED') last_candle=CandleItem(low=372.5, high=378.6, open=378.05, close=375.85, color='RED') 2020-09-14 22:00:20 INFO: check need new order None 2020-09-14 22:00:20 INFO: init new order end 2020-09-14 22:00:20 INFO: 2020-09-14 22:00:20 INFO: 2020-09-14 22:00:20 INFO: 2020-09-14 22:00:20 INFO: 2020-09-14 22:02:00 INFO: 2020-09-14 22:02:00 INFO: 2020-09-14 22:02:00 INFO: 2020-09-14 22:02:00 INFO: 2020-09-14 22:02:00 INFO: clearing start 2020-09-14 22:02:00 INFO: clearing end 2020-09-14 22:02:00 INFO: 2020-09-14 22:02:00 INFO: 2020-09-14 22:02:00 INFO: 2020-09-14 22:02:00 INFO: 2020-09-14 23:00:20 INFO: 2020-09-14 23:00:20 INFO: 2020-09-14 23:00:20 INFO: 2020-09-14 23:00:20 INFO: 2020-09-14 23:00:20 INFO: init new order start 2020-09-14 23:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 14, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 375.85, 'high': 377.15, 'low': 373.45, 'close': 375.0, 'trades': 3232, 'volume': 1609934, 'vwap': 375.45, 'lastSize': 191, 'turnover': 60443999400, 'homeNotional': 17189.932933349413, 'foreignNotional': 6453871.354367366}, {'timestamp': datetime.datetime(2020, 9, 14, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 378.05, 'high': 378.6, 'low': 372.5, 'close': 375.85, 'trades': 4860, 'volume': 3293073, 'vwap': 375.8, 'lastSize': 13, 'turnover': 123751727120, 'homeNotional': 35171.22223680286, 'foreignNotional': 13217172.314281335}, {'timestamp': datetime.datetime(2020, 9, 14, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 380.95, 'high': 381.9, 'low': 375.95, 'close': 378.05, 'trades': 4917, 'volume': 3689232, 'vwap': 378.51, 'lastSize': 100, 'turnover': 139640209580, 'homeNotional': 39472.8821111262, 'foreignNotional': 14940853.129316268}] 2020-09-14 23:00:21 INFO: prepare candles [CandleItem(low=373.45, high=377.15, open=375.85, close=375.0, color='RED'), CandleItem(low=372.5, high=378.6, open=378.05, close=375.85, color='RED'), CandleItem(low=375.95, high=381.9, open=380.95, close=378.05, color='RED')] 2020-09-14 23:00:21 INFO: skip by colors first_candle=CandleItem(low=375.95, high=381.9, open=380.95, close=378.05, color='RED') second_candle=CandleItem(low=372.5, high=378.6, open=378.05, close=375.85, color='RED') last_candle=CandleItem(low=373.45, high=377.15, open=375.85, close=375.0, color='RED') 2020-09-14 23:00:21 INFO: check need new order None 2020-09-14 23:00:21 INFO: init new order end 2020-09-14 23:00:21 INFO: 2020-09-14 23:00:21 INFO: 2020-09-14 23:00:21 INFO: 2020-09-14 23:00:21 INFO: 2020-09-14 23:02:00 INFO: 2020-09-14 23:02:00 INFO: 2020-09-14 23:02:00 INFO: 2020-09-14 23:02:00 INFO: 2020-09-14 23:02:00 INFO: clearing start 2020-09-14 23:02:00 INFO: clearing end 2020-09-14 23:02:00 INFO: 2020-09-14 23:02:00 INFO: 2020-09-14 23:02:00 INFO: 2020-09-14 23:02:00 INFO: 2020-09-15 00:00:20 INFO: 2020-09-15 00:00:20 INFO: 2020-09-15 00:00:20 INFO: 2020-09-15 00:00:20 INFO: 2020-09-15 00:00:20 INFO: init new order start 2020-09-15 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 14, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 375.0, 'high': 378.55, 'low': 374.5, 'close': 376.85, 'trades': 3515, 'volume': 2005621, 'vwap': 376.63, 'lastSize': 10, 'turnover': 75537362430, 'homeNotional': 21442.563936775045, 'foreignNotional': 8075904.451615831}, {'timestamp': datetime.datetime(2020, 9, 14, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 375.85, 'high': 377.15, 'low': 373.45, 'close': 375.0, 'trades': 3232, 'volume': 1609934, 'vwap': 375.45, 'lastSize': 191, 'turnover': 60443999400, 'homeNotional': 17189.932933349413, 'foreignNotional': 6453871.354367366}, {'timestamp': datetime.datetime(2020, 9, 14, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 378.05, 'high': 378.6, 'low': 372.5, 'close': 375.85, 'trades': 4860, 'volume': 3293073, 'vwap': 375.8, 'lastSize': 13, 'turnover': 123751727120, 'homeNotional': 35171.22223680286, 'foreignNotional': 13217172.314281335}] 2020-09-15 00:00:20 INFO: prepare candles [CandleItem(low=374.5, high=378.55, open=375.0, close=376.85, color='GREEN'), CandleItem(low=373.45, high=377.15, open=375.85, close=375.0, color='RED'), CandleItem(low=372.5, high=378.6, open=378.05, close=375.85, color='RED')] 2020-09-15 00:00:20 INFO: last_candle=CandleItem(low=374.5, high=378.55, open=375.0, close=376.85, color='GREEN') 2020-09-15 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-09-15 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=374.5, high=378.55, open=375.0, close=376.85, color='GREEN') 2020-09-15 00:00:20 INFO: skip by CandleItem(low=374.5, high=378.55, open=375.0, close=376.85, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-15 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-09-15 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=374.5, high=378.55, open=375.0, close=376.85, color='GREEN') 2020-09-15 00:00:20 INFO: skip by CandleItem(low=374.5, high=378.55, open=375.0, close=376.85, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-15 00:00:20 INFO: not found applicable config for candle 2020-09-15 00:00:20 INFO: check need new order None 2020-09-15 00:00:20 INFO: init new order end 2020-09-15 00:00:20 INFO: 2020-09-15 00:00:20 INFO: 2020-09-15 00:00:20 INFO: 2020-09-15 00:00:20 INFO: 2020-09-15 00:02:00 INFO: 2020-09-15 00:02:00 INFO: 2020-09-15 00:02:00 INFO: 2020-09-15 00:02:00 INFO: 2020-09-15 00:02:00 INFO: clearing start 2020-09-15 00:02:00 INFO: clearing end 2020-09-15 00:02:00 INFO: 2020-09-15 00:02:00 INFO: 2020-09-15 00:02:00 INFO: 2020-09-15 00:02:00 INFO: 2020-09-15 01:00:20 INFO: 2020-09-15 01:00:20 INFO: 2020-09-15 01:00:20 INFO: 2020-09-15 01:00:20 INFO: 2020-09-15 01:00:20 INFO: init new order start 2020-09-15 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 14, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 376.85, 'high': 379.3, 'low': 375.75, 'close': 379.2, 'trades': 3383, 'volume': 2175556, 'vwap': 377.47, 'lastSize': 387, 'turnover': 82120360045, 'homeNotional': 23285.541344744324, 'foreignNotional': 8789575.429880707}, {'timestamp': datetime.datetime(2020, 9, 14, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 375.0, 'high': 378.55, 'low': 374.5, 'close': 376.85, 'trades': 3515, 'volume': 2005621, 'vwap': 376.63, 'lastSize': 10, 'turnover': 75537362430, 'homeNotional': 21442.563936775045, 'foreignNotional': 8075904.451615831}, {'timestamp': datetime.datetime(2020, 9, 14, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 375.85, 'high': 377.15, 'low': 373.45, 'close': 375.0, 'trades': 3232, 'volume': 1609934, 'vwap': 375.45, 'lastSize': 191, 'turnover': 60443999400, 'homeNotional': 17189.932933349413, 'foreignNotional': 6453871.354367366}] 2020-09-15 01:00:20 INFO: prepare candles [CandleItem(low=375.75, high=379.3, open=376.85, close=379.2, color='GREEN'), CandleItem(low=374.5, high=378.55, open=375.0, close=376.85, color='GREEN'), CandleItem(low=373.45, high=377.15, open=375.85, close=375.0, color='RED')] 2020-09-15 01:00:20 INFO: skip by colors first_candle=CandleItem(low=373.45, high=377.15, open=375.85, close=375.0, color='RED') second_candle=CandleItem(low=374.5, high=378.55, open=375.0, close=376.85, color='GREEN') last_candle=CandleItem(low=375.75, high=379.3, open=376.85, close=379.2, color='GREEN') 2020-09-15 01:00:20 INFO: check need new order None 2020-09-15 01:00:20 INFO: init new order end 2020-09-15 01:00:20 INFO: 2020-09-15 01:00:20 INFO: 2020-09-15 01:00:20 INFO: 2020-09-15 01:00:20 INFO: 2020-09-15 01:02:00 INFO: 2020-09-15 01:02:00 INFO: 2020-09-15 01:02:00 INFO: 2020-09-15 01:02:00 INFO: 2020-09-15 01:02:00 INFO: clearing start 2020-09-15 01:02:00 INFO: clearing end 2020-09-15 01:02:00 INFO: 2020-09-15 01:02:00 INFO: 2020-09-15 01:02:00 INFO: 2020-09-15 01:02:00 INFO: 2020-09-15 02:00:20 INFO: 2020-09-15 02:00:20 INFO: 2020-09-15 02:00:20 INFO: 2020-09-15 02:00:20 INFO: 2020-09-15 02:00:20 INFO: init new order start 2020-09-15 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 14, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.2, 'high': 380.15, 'low': 371.65, 'close': 372.75, 'trades': 5371, 'volume': 3388840, 'vwap': 375.66, 'lastSize': 500, 'turnover': 127303688555, 'homeNotional': 36240.68897431195, 'foreignNotional': 13614330.347318674}, {'timestamp': datetime.datetime(2020, 9, 14, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 376.85, 'high': 379.3, 'low': 375.75, 'close': 379.2, 'trades': 3383, 'volume': 2175556, 'vwap': 377.47, 'lastSize': 387, 'turnover': 82120360045, 'homeNotional': 23285.541344744324, 'foreignNotional': 8789575.429880707}, {'timestamp': datetime.datetime(2020, 9, 14, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 375.0, 'high': 378.55, 'low': 374.5, 'close': 376.85, 'trades': 3515, 'volume': 2005621, 'vwap': 376.63, 'lastSize': 10, 'turnover': 75537362430, 'homeNotional': 21442.563936775045, 'foreignNotional': 8075904.451615831}] 2020-09-15 02:00:20 INFO: prepare candles [CandleItem(low=371.65, high=380.15, open=379.2, close=372.75, color='RED'), CandleItem(low=375.75, high=379.3, open=376.85, close=379.2, color='GREEN'), CandleItem(low=374.5, high=378.55, open=375.0, close=376.85, color='GREEN')] 2020-09-15 02:00:20 INFO: last_candle=CandleItem(low=371.65, high=380.15, open=379.2, close=372.75, color='RED') 2020-09-15 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-09-15 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=371.65, high=380.15, open=379.2, close=372.75, color='RED') 2020-09-15 02:00:20 INFO: skip by CandleItem(low=371.65, high=380.15, open=379.2, close=372.75, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-15 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-09-15 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=371.65, high=380.15, open=379.2, close=372.75, color='RED') 2020-09-15 02:00:20 INFO: skip by CandleItem(low=371.65, high=380.15, open=379.2, close=372.75, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-15 02:00:20 INFO: not found applicable config for candle 2020-09-15 02:00:20 INFO: check need new order None 2020-09-15 02:00:20 INFO: init new order end 2020-09-15 02:00:20 INFO: 2020-09-15 02:00:20 INFO: 2020-09-15 02:00:20 INFO: 2020-09-15 02:00:20 INFO: 2020-09-15 02:02:00 INFO: 2020-09-15 02:02:00 INFO: 2020-09-15 02:02:00 INFO: 2020-09-15 02:02:00 INFO: 2020-09-15 02:02:00 INFO: clearing start 2020-09-15 02:02:00 INFO: clearing end 2020-09-15 02:02:00 INFO: 2020-09-15 02:02:00 INFO: 2020-09-15 02:02:00 INFO: 2020-09-15 02:02:00 INFO: 2020-09-15 02:41:58 INFO: Websocket Closed 2020-09-15 02:41:58 WARNING: reconnect to socket 2020-09-15 02:41:58 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-09-15 02:41:58 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-09-15 02:41:58 INFO: Authenticating with API Key. 2020-09-15 02:41:59 INFO: Connected to WS. 2020-09-15 03:00:20 INFO: 2020-09-15 03:00:20 INFO: 2020-09-15 03:00:20 INFO: 2020-09-15 03:00:20 INFO: 2020-09-15 03:00:20 INFO: init new order start 2020-09-15 03:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 15, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 372.75, 'high': 378.5, 'low': 371.95, 'close': 377.7, 'trades': 3970, 'volume': 2632053, 'vwap': 375.65, 'lastSize': 1, 'turnover': 98872558080, 'homeNotional': 28060.324539030247, 'foreignNotional': 10540854.720023002}, {'timestamp': datetime.datetime(2020, 9, 14, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.2, 'high': 380.15, 'low': 371.65, 'close': 372.75, 'trades': 5371, 'volume': 3388840, 'vwap': 375.66, 'lastSize': 500, 'turnover': 127303688555, 'homeNotional': 36240.68897431195, 'foreignNotional': 13614330.347318674}, {'timestamp': datetime.datetime(2020, 9, 14, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 376.85, 'high': 379.3, 'low': 375.75, 'close': 379.2, 'trades': 3383, 'volume': 2175556, 'vwap': 377.47, 'lastSize': 387, 'turnover': 82120360045, 'homeNotional': 23285.541344744324, 'foreignNotional': 8789575.429880707}] 2020-09-15 03:00:21 INFO: prepare candles [CandleItem(low=371.95, high=378.5, open=372.75, close=377.7, color='GREEN'), CandleItem(low=371.65, high=380.15, open=379.2, close=372.75, color='RED'), CandleItem(low=375.75, high=379.3, open=376.85, close=379.2, color='GREEN')] 2020-09-15 03:00:21 INFO: skip by colors first_candle=CandleItem(low=375.75, high=379.3, open=376.85, close=379.2, color='GREEN') second_candle=CandleItem(low=371.65, high=380.15, open=379.2, close=372.75, color='RED') last_candle=CandleItem(low=371.95, high=378.5, open=372.75, close=377.7, color='GREEN') 2020-09-15 03:00:21 INFO: check need new order None 2020-09-15 03:00:21 INFO: init new order end 2020-09-15 03:00:21 INFO: 2020-09-15 03:00:21 INFO: 2020-09-15 03:00:21 INFO: 2020-09-15 03:00:21 INFO: 2020-09-15 03:02:00 INFO: 2020-09-15 03:02:00 INFO: 2020-09-15 03:02:00 INFO: 2020-09-15 03:02:00 INFO: 2020-09-15 03:02:00 INFO: clearing start 2020-09-15 03:02:00 INFO: clearing end 2020-09-15 03:02:00 INFO: 2020-09-15 03:02:00 INFO: 2020-09-15 03:02:00 INFO: 2020-09-15 03:02:00 INFO: 2020-09-15 04:00:20 INFO: 2020-09-15 04:00:20 INFO: 2020-09-15 04:00:20 INFO: 2020-09-15 04:00:20 INFO: 2020-09-15 04:00:20 INFO: init new order start 2020-09-15 04:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 15, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 377.7, 'high': 379.9, 'low': 375.15, 'close': 377.45, 'trades': 4402, 'volume': 2466759, 'vwap': 377.37, 'lastSize': 1, 'turnover': 93087790930, 'homeNotional': 26348.674731064584, 'foreignNotional': 9943197.738355678}, {'timestamp': datetime.datetime(2020, 9, 15, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 372.75, 'high': 378.5, 'low': 371.95, 'close': 377.7, 'trades': 3970, 'volume': 2632053, 'vwap': 375.65, 'lastSize': 1, 'turnover': 98872558080, 'homeNotional': 28060.324539030247, 'foreignNotional': 10540854.720023002}, {'timestamp': datetime.datetime(2020, 9, 14, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.2, 'high': 380.15, 'low': 371.65, 'close': 372.75, 'trades': 5371, 'volume': 3388840, 'vwap': 375.66, 'lastSize': 500, 'turnover': 127303688555, 'homeNotional': 36240.68897431195, 'foreignNotional': 13614330.347318674}] 2020-09-15 04:00:20 INFO: prepare candles [CandleItem(low=375.15, high=379.9, open=377.7, close=377.45, color='RED'), CandleItem(low=371.95, high=378.5, open=372.75, close=377.7, color='GREEN'), CandleItem(low=371.65, high=380.15, open=379.2, close=372.75, color='RED')] 2020-09-15 04:00:20 INFO: skip by colors first_candle=CandleItem(low=371.65, high=380.15, open=379.2, close=372.75, color='RED') second_candle=CandleItem(low=371.95, high=378.5, open=372.75, close=377.7, color='GREEN') last_candle=CandleItem(low=375.15, high=379.9, open=377.7, close=377.45, color='RED') 2020-09-15 04:00:20 INFO: check need new order None 2020-09-15 04:00:20 INFO: init new order end 2020-09-15 04:00:20 INFO: 2020-09-15 04:00:20 INFO: 2020-09-15 04:00:20 INFO: 2020-09-15 04:00:20 INFO: 2020-09-15 04:02:00 INFO: 2020-09-15 04:02:00 INFO: 2020-09-15 04:02:00 INFO: 2020-09-15 04:02:00 INFO: 2020-09-15 04:02:00 INFO: clearing start 2020-09-15 04:02:00 INFO: clearing end 2020-09-15 04:02:00 INFO: 2020-09-15 04:02:00 INFO: 2020-09-15 04:02:00 INFO: 2020-09-15 04:02:00 INFO: 2020-09-15 05:00:20 INFO: 2020-09-15 05:00:20 INFO: 2020-09-15 05:00:20 INFO: 2020-09-15 05:00:20 INFO: 2020-09-15 05:00:20 INFO: init new order start 2020-09-15 05:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 15, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 377.45, 'high': 377.45, 'low': 374.8, 'close': 376.25, 'trades': 2900, 'volume': 2336090, 'vwap': 376.16, 'lastSize': 350, 'turnover': 87873522875, 'homeNotional': 24970.923155380384, 'foreignNotional': 9392985.37020198}, {'timestamp': datetime.datetime(2020, 9, 15, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 377.7, 'high': 379.9, 'low': 375.15, 'close': 377.45, 'trades': 4402, 'volume': 2466759, 'vwap': 377.37, 'lastSize': 1, 'turnover': 93087790930, 'homeNotional': 26348.674731064584, 'foreignNotional': 9943197.738355678}, {'timestamp': datetime.datetime(2020, 9, 15, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 372.75, 'high': 378.5, 'low': 371.95, 'close': 377.7, 'trades': 3970, 'volume': 2632053, 'vwap': 375.65, 'lastSize': 1, 'turnover': 98872558080, 'homeNotional': 28060.324539030247, 'foreignNotional': 10540854.720023002}] 2020-09-15 05:00:20 INFO: prepare candles [CandleItem(low=374.8, high=377.45, open=377.45, close=376.25, color='RED'), CandleItem(low=375.15, high=379.9, open=377.7, close=377.45, color='RED'), CandleItem(low=371.95, high=378.5, open=372.75, close=377.7, color='GREEN')] 2020-09-15 05:00:20 INFO: skip by colors first_candle=CandleItem(low=371.95, high=378.5, open=372.75, close=377.7, color='GREEN') second_candle=CandleItem(low=375.15, high=379.9, open=377.7, close=377.45, color='RED') last_candle=CandleItem(low=374.8, high=377.45, open=377.45, close=376.25, color='RED') 2020-09-15 05:00:20 INFO: check need new order None 2020-09-15 05:00:20 INFO: init new order end 2020-09-15 05:00:20 INFO: 2020-09-15 05:00:20 INFO: 2020-09-15 05:00:20 INFO: 2020-09-15 05:00:20 INFO: 2020-09-15 05:02:00 INFO: 2020-09-15 05:02:00 INFO: 2020-09-15 05:02:00 INFO: 2020-09-15 05:02:00 INFO: 2020-09-15 05:02:00 INFO: clearing start 2020-09-15 05:02:00 INFO: clearing end 2020-09-15 05:02:00 INFO: 2020-09-15 05:02:00 INFO: 2020-09-15 05:02:00 INFO: 2020-09-15 05:02:00 INFO: 2020-09-15 06:00:20 INFO: 2020-09-15 06:00:20 INFO: 2020-09-15 06:00:20 INFO: 2020-09-15 06:00:20 INFO: 2020-09-15 06:00:20 INFO: init new order start 2020-09-15 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 15, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 376.25, 'high': 382.8, 'low': 374.85, 'close': 378.2, 'trades': 5856, 'volume': 4127310, 'vwap': 379.57, 'lastSize': 400, 'turnover': 156660164615, 'homeNotional': 44452.26828604253, 'foreignNotional': 16872985.985326603}, {'timestamp': datetime.datetime(2020, 9, 15, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 377.45, 'high': 377.45, 'low': 374.8, 'close': 376.25, 'trades': 2900, 'volume': 2336090, 'vwap': 376.16, 'lastSize': 350, 'turnover': 87873522875, 'homeNotional': 24970.923155380384, 'foreignNotional': 9392985.37020198}, {'timestamp': datetime.datetime(2020, 9, 15, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 377.7, 'high': 379.9, 'low': 375.15, 'close': 377.45, 'trades': 4402, 'volume': 2466759, 'vwap': 377.37, 'lastSize': 1, 'turnover': 93087790930, 'homeNotional': 26348.674731064584, 'foreignNotional': 9943197.738355678}] 2020-09-15 06:00:20 INFO: prepare candles [CandleItem(low=374.85, high=382.8, open=376.25, close=378.2, color='GREEN'), CandleItem(low=374.8, high=377.45, open=377.45, close=376.25, color='RED'), CandleItem(low=375.15, high=379.9, open=377.7, close=377.45, color='RED')] 2020-09-15 06:00:20 INFO: last_candle=CandleItem(low=374.85, high=382.8, open=376.25, close=378.2, color='GREEN') 2020-09-15 06: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-15 06: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.85, high=382.8, open=376.25, close=378.2, color='GREEN') 2020-09-15 06:00:20 INFO: skip by CandleItem(low=374.85, high=382.8, open=376.25, close=378.2, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-15 06: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-15 06: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.85, high=382.8, open=376.25, close=378.2, color='GREEN') 2020-09-15 06:00:20 INFO: skip by CandleItem(low=374.85, high=382.8, open=376.25, close=378.2, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-15 06:00:20 INFO: not found applicable config for candle 2020-09-15 06:00:20 INFO: check need new order None 2020-09-15 06:00:20 INFO: init new order end 2020-09-15 06:00:20 INFO: 2020-09-15 06:00:20 INFO: 2020-09-15 06:00:20 INFO: 2020-09-15 06:00:20 INFO: 2020-09-15 06:02:00 INFO: 2020-09-15 06:02:00 INFO: 2020-09-15 06:02:00 INFO: 2020-09-15 06:02:00 INFO: 2020-09-15 06:02:00 INFO: clearing start 2020-09-15 06:02:00 INFO: clearing end 2020-09-15 06:02:00 INFO: 2020-09-15 06:02:00 INFO: 2020-09-15 06:02:00 INFO: 2020-09-15 06:02:00 INFO: 2020-09-15 06:51:12 INFO: Websocket Closed 2020-09-15 06:51:12 WARNING: reconnect to socket 2020-09-15 06:51:12 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-09-15 06:51:12 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-09-15 06:51:12 INFO: Authenticating with API Key. 2020-09-15 06:51:13 INFO: Connected to WS. 2020-09-15 06:58:23 ERROR: Error : Connection is already closed. 2020-09-15 06:58:23 ERROR: error from callback >: Connection is already closed. 2020-09-15 06:58:23 INFO: Websocket Closed 2020-09-15 06:58:24 WARNING: reconnect to socket 2020-09-15 06:58:24 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-09-15 06:58:24 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-09-15 06:58:24 INFO: Authenticating with API Key. 2020-09-15 06:58:25 INFO: Connected to WS. 2020-09-15 07:00:20 INFO: 2020-09-15 07:00:20 INFO: 2020-09-15 07:00:20 INFO: 2020-09-15 07:00:20 INFO: 2020-09-15 07:00:20 INFO: init new order start 2020-09-15 07:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 15, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 378.2, 'high': 379.45, 'low': 375.55, 'close': 376.2, 'trades': 2564, 'volume': 2752067, 'vwap': 377.13, 'lastSize': 6200, 'turnover': 103788197210, 'homeNotional': 29608.52783022322, 'foreignNotional': 11166236.13897208}, {'timestamp': datetime.datetime(2020, 9, 15, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 376.25, 'high': 382.8, 'low': 374.85, 'close': 378.2, 'trades': 5856, 'volume': 4127310, 'vwap': 379.57, 'lastSize': 400, 'turnover': 156660164615, 'homeNotional': 44452.26828604253, 'foreignNotional': 16872985.985326603}, {'timestamp': datetime.datetime(2020, 9, 15, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 377.45, 'high': 377.45, 'low': 374.8, 'close': 376.25, 'trades': 2900, 'volume': 2336090, 'vwap': 376.16, 'lastSize': 350, 'turnover': 87873522875, 'homeNotional': 24970.923155380384, 'foreignNotional': 9392985.37020198}] 2020-09-15 07:00:20 INFO: prepare candles [CandleItem(low=375.55, high=379.45, open=378.2, close=376.2, color='RED'), CandleItem(low=374.85, high=382.8, open=376.25, close=378.2, color='GREEN'), CandleItem(low=374.8, high=377.45, open=377.45, close=376.25, color='RED')] 2020-09-15 07:00:20 INFO: skip by colors first_candle=CandleItem(low=374.8, high=377.45, open=377.45, close=376.25, color='RED') second_candle=CandleItem(low=374.85, high=382.8, open=376.25, close=378.2, color='GREEN') last_candle=CandleItem(low=375.55, high=379.45, open=378.2, close=376.2, color='RED') 2020-09-15 07:00:20 INFO: check need new order None 2020-09-15 07:00:20 INFO: init new order end 2020-09-15 07:00:20 INFO: 2020-09-15 07:00:20 INFO: 2020-09-15 07:00:20 INFO: 2020-09-15 07:00:20 INFO: 2020-09-15 07:02:00 INFO: 2020-09-15 07:02:00 INFO: 2020-09-15 07:02:00 INFO: 2020-09-15 07:02:00 INFO: 2020-09-15 07:02:00 INFO: clearing start 2020-09-15 07:02:00 INFO: clearing end 2020-09-15 07:02:00 INFO: 2020-09-15 07:02:00 INFO: 2020-09-15 07:02:00 INFO: 2020-09-15 07:02:00 INFO: 2020-09-15 07:09:35 ERROR: Error : Connection is already closed. 2020-09-15 07:09:35 ERROR: error from callback >: Connection is already closed. 2020-09-15 07:09:35 INFO: Websocket Closed 2020-09-15 07:09:36 WARNING: reconnect to socket 2020-09-15 07:09:36 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-09-15 07:09:36 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-09-15 07:09:36 INFO: Authenticating with API Key. 2020-09-15 07:09:37 INFO: Connected to WS. 2020-09-15 07:52:41 ERROR: Error : Connection is already closed. 2020-09-15 07:52:41 ERROR: error from callback >: Connection is already closed. 2020-09-15 07:52:41 INFO: Websocket Closed 2020-09-15 07:52:42 WARNING: reconnect to socket 2020-09-15 07:52:42 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-09-15 07:52:42 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-09-15 07:52:42 INFO: Authenticating with API Key. 2020-09-15 07:52:43 INFO: Connected to WS. 2020-09-15 07:54:24 ERROR: Error : Connection is already closed. 2020-09-15 07:54:24 ERROR: error from callback >: Connection is already closed. 2020-09-15 07:54:24 INFO: Websocket Closed 2020-09-15 07:54:24 WARNING: reconnect to socket 2020-09-15 07:54:24 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-09-15 07:54:24 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-09-15 07:54:24 INFO: Authenticating with API Key. 2020-09-15 07:54:25 INFO: Connected to WS. 2020-09-15 07:56:30 ERROR: Error : Connection is already closed. 2020-09-15 07:56:30 ERROR: error from callback >: Connection is already closed. 2020-09-15 07:56:30 INFO: Websocket Closed 2020-09-15 07:56:31 WARNING: reconnect to socket 2020-09-15 07:56:31 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-09-15 07:56:31 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-09-15 07:56:31 INFO: Authenticating with API Key. 2020-09-15 07:56:32 INFO: Connected to WS. 2020-09-15 08:00:20 INFO: 2020-09-15 08:00:20 INFO: 2020-09-15 08:00:20 INFO: 2020-09-15 08:00:20 INFO: 2020-09-15 08:00:20 INFO: init new order start 2020-09-15 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 15, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 376.2, 'high': 377.4, 'low': 373.75, 'close': 375.4, 'trades': 4097, 'volume': 3745920, 'vwap': 375.52, 'lastSize': 2000, 'turnover': 140663145780, 'homeNotional': 40254.388504427116, 'foreignNotional': 15115997.117352884}, {'timestamp': datetime.datetime(2020, 9, 15, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 378.2, 'high': 379.45, 'low': 375.55, 'close': 376.2, 'trades': 2564, 'volume': 2752067, 'vwap': 377.13, 'lastSize': 6200, 'turnover': 103788197210, 'homeNotional': 29608.52783022322, 'foreignNotional': 11166236.13897208}, {'timestamp': datetime.datetime(2020, 9, 15, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 376.25, 'high': 382.8, 'low': 374.85, 'close': 378.2, 'trades': 5856, 'volume': 4127310, 'vwap': 379.57, 'lastSize': 400, 'turnover': 156660164615, 'homeNotional': 44452.26828604253, 'foreignNotional': 16872985.985326603}] 2020-09-15 08:00:20 INFO: prepare candles [CandleItem(low=373.75, high=377.4, open=376.2, close=375.4, color='RED'), CandleItem(low=375.55, high=379.45, open=378.2, close=376.2, color='RED'), CandleItem(low=374.85, high=382.8, open=376.25, close=378.2, color='GREEN')] 2020-09-15 08:00:20 INFO: skip by colors first_candle=CandleItem(low=374.85, high=382.8, open=376.25, close=378.2, color='GREEN') second_candle=CandleItem(low=375.55, high=379.45, open=378.2, close=376.2, color='RED') last_candle=CandleItem(low=373.75, high=377.4, open=376.2, close=375.4, color='RED') 2020-09-15 08:00:20 INFO: check need new order None 2020-09-15 08:00:20 INFO: init new order end 2020-09-15 08:00:20 INFO: 2020-09-15 08:00:20 INFO: 2020-09-15 08:00:20 INFO: 2020-09-15 08:00:20 INFO: 2020-09-15 08:02:00 INFO: 2020-09-15 08:02:00 INFO: 2020-09-15 08:02:00 INFO: 2020-09-15 08:02:00 INFO: 2020-09-15 08:02:00 INFO: clearing start 2020-09-15 08:02:00 INFO: clearing end 2020-09-15 08:02:00 INFO: 2020-09-15 08:02:00 INFO: 2020-09-15 08:02:00 INFO: 2020-09-15 08:02:00 INFO: 2020-09-15 08:27:11 ERROR: Error : Connection is already closed. 2020-09-15 08:27:11 ERROR: error from callback >: Connection is already closed. 2020-09-15 08:27:11 INFO: Websocket Closed 2020-09-15 08:27:11 WARNING: reconnect to socket 2020-09-15 08:27:11 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-09-15 08:27:11 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-09-15 08:27:11 INFO: Authenticating with API Key. 2020-09-15 08:27:12 INFO: Connected to WS. 2020-09-15 08:32:21 ERROR: Error : Connection is already closed. 2020-09-15 08:32:21 ERROR: error from callback >: Connection is already closed. 2020-09-15 08:32:21 INFO: Websocket Closed 2020-09-15 08:32:21 WARNING: reconnect to socket 2020-09-15 08:32:21 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-09-15 08:32:21 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-09-15 08:32:21 INFO: Authenticating with API Key. 2020-09-15 08:32:22 INFO: Connected to WS. 2020-09-15 09:00:20 INFO: 2020-09-15 09:00:20 INFO: 2020-09-15 09:00:20 INFO: 2020-09-15 09:00:20 INFO: 2020-09-15 09:00:20 INFO: init new order start 2020-09-15 09:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 15, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 375.4, 'high': 376.6, 'low': 374.1, 'close': 374.95, 'trades': 2712, 'volume': 2068129, 'vwap': 375.49, 'lastSize': 1, 'turnover': 77656009440, 'homeNotional': 22216.67001216899, 'foreignNotional': 8342133.954492775}, {'timestamp': datetime.datetime(2020, 9, 15, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 376.2, 'high': 377.4, 'low': 373.75, 'close': 375.4, 'trades': 4097, 'volume': 3745920, 'vwap': 375.52, 'lastSize': 2000, 'turnover': 140663145780, 'homeNotional': 40254.388504427116, 'foreignNotional': 15115997.117352884}, {'timestamp': datetime.datetime(2020, 9, 15, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 378.2, 'high': 379.45, 'low': 375.55, 'close': 376.2, 'trades': 2564, 'volume': 2752067, 'vwap': 377.13, 'lastSize': 6200, 'turnover': 103788197210, 'homeNotional': 29608.52783022322, 'foreignNotional': 11166236.13897208}] 2020-09-15 09:00:20 INFO: prepare candles [CandleItem(low=374.1, high=376.6, open=375.4, close=374.95, color='RED'), CandleItem(low=373.75, high=377.4, open=376.2, close=375.4, color='RED'), CandleItem(low=375.55, high=379.45, open=378.2, close=376.2, color='RED')] 2020-09-15 09:00:20 INFO: skip by colors first_candle=CandleItem(low=375.55, high=379.45, open=378.2, close=376.2, color='RED') second_candle=CandleItem(low=373.75, high=377.4, open=376.2, close=375.4, color='RED') last_candle=CandleItem(low=374.1, high=376.6, open=375.4, close=374.95, color='RED') 2020-09-15 09:00:20 INFO: check need new order None 2020-09-15 09:00:20 INFO: init new order end 2020-09-15 09:00:20 INFO: 2020-09-15 09:00:20 INFO: 2020-09-15 09:00:20 INFO: 2020-09-15 09:00:20 INFO: 2020-09-15 09:02:00 INFO: 2020-09-15 09:02:00 INFO: 2020-09-15 09:02:00 INFO: 2020-09-15 09:02:00 INFO: 2020-09-15 09:02:00 INFO: clearing start 2020-09-15 09:02:00 INFO: clearing end 2020-09-15 09:02:00 INFO: 2020-09-15 09:02:00 INFO: 2020-09-15 09:02:00 INFO: 2020-09-15 09:02:00 INFO: 2020-09-15 10:00:20 INFO: 2020-09-15 10:00:20 INFO: 2020-09-15 10:00:20 INFO: 2020-09-15 10:00:20 INFO: 2020-09-15 10:00:20 INFO: init new order start 2020-09-15 10:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 15, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 374.95, 'high': 375.7, 'low': 372.85, 'close': 375.45, 'trades': 2430, 'volume': 1506734, 'vwap': 374.04, 'lastSize': 50, 'turnover': 56357741480, 'homeNotional': 16162.343196952947, 'foreignNotional': 6045354.455514754}, {'timestamp': datetime.datetime(2020, 9, 15, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 375.4, 'high': 376.6, 'low': 374.1, 'close': 374.95, 'trades': 2712, 'volume': 2068129, 'vwap': 375.49, 'lastSize': 1, 'turnover': 77656009440, 'homeNotional': 22216.67001216899, 'foreignNotional': 8342133.954492775}, {'timestamp': datetime.datetime(2020, 9, 15, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 376.2, 'high': 377.4, 'low': 373.75, 'close': 375.4, 'trades': 4097, 'volume': 3745920, 'vwap': 375.52, 'lastSize': 2000, 'turnover': 140663145780, 'homeNotional': 40254.388504427116, 'foreignNotional': 15115997.117352884}] 2020-09-15 10:00:21 INFO: prepare candles [CandleItem(low=372.85, high=375.7, open=374.95, close=375.45, color='GREEN'), CandleItem(low=374.1, high=376.6, open=375.4, close=374.95, color='RED'), CandleItem(low=373.75, high=377.4, open=376.2, close=375.4, color='RED')] 2020-09-15 10:00:21 INFO: last_candle=CandleItem(low=372.85, high=375.7, open=374.95, close=375.45, color='GREEN') 2020-09-15 10: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-15 10: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=372.85, high=375.7, open=374.95, close=375.45, color='GREEN') 2020-09-15 10:00:21 INFO: skip by CandleItem(low=372.85, high=375.7, open=374.95, close=375.45, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-15 10: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-15 10: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=372.85, high=375.7, open=374.95, close=375.45, color='GREEN') 2020-09-15 10:00:21 INFO: skip by CandleItem(low=372.85, high=375.7, open=374.95, close=375.45, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-15 10:00:21 INFO: not found applicable config for candle 2020-09-15 10:00:21 INFO: check need new order None 2020-09-15 10:00:21 INFO: init new order end 2020-09-15 10:00:21 INFO: 2020-09-15 10:00:21 INFO: 2020-09-15 10:00:21 INFO: 2020-09-15 10:00:21 INFO: 2020-09-15 10:02:00 INFO: 2020-09-15 10:02:00 INFO: 2020-09-15 10:02:00 INFO: 2020-09-15 10:02:00 INFO: 2020-09-15 10:02:00 INFO: clearing start 2020-09-15 10:02:00 INFO: clearing end 2020-09-15 10:02:00 INFO: 2020-09-15 10:02:00 INFO: 2020-09-15 10:02:00 INFO: 2020-09-15 10:02:00 INFO: 2020-09-15 11:00:20 INFO: 2020-09-15 11:00:20 INFO: 2020-09-15 11:00:20 INFO: 2020-09-15 11:00:20 INFO: 2020-09-15 11:00:20 INFO: init new order start 2020-09-15 11:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 15, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 375.45, 'high': 376.8, 'low': 373.8, 'close': 375.75, 'trades': 2533, 'volume': 2213180, 'vwap': 375.3, 'lastSize': 1, 'turnover': 83058914875, 'homeNotional': 23759.15562966057, 'foreignNotional': 8916645.013595836}, {'timestamp': datetime.datetime(2020, 9, 15, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 374.95, 'high': 375.7, 'low': 372.85, 'close': 375.45, 'trades': 2430, 'volume': 1506734, 'vwap': 374.04, 'lastSize': 50, 'turnover': 56357741480, 'homeNotional': 16162.343196952947, 'foreignNotional': 6045354.455514754}, {'timestamp': datetime.datetime(2020, 9, 15, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 375.4, 'high': 376.6, 'low': 374.1, 'close': 374.95, 'trades': 2712, 'volume': 2068129, 'vwap': 375.49, 'lastSize': 1, 'turnover': 77656009440, 'homeNotional': 22216.67001216899, 'foreignNotional': 8342133.954492775}] 2020-09-15 11:00:20 INFO: prepare candles [CandleItem(low=373.8, high=376.8, open=375.45, close=375.75, color='GREEN'), CandleItem(low=372.85, high=375.7, open=374.95, close=375.45, color='GREEN'), CandleItem(low=374.1, high=376.6, open=375.4, close=374.95, color='RED')] 2020-09-15 11:00:20 INFO: skip by colors first_candle=CandleItem(low=374.1, high=376.6, open=375.4, close=374.95, color='RED') second_candle=CandleItem(low=372.85, high=375.7, open=374.95, close=375.45, color='GREEN') last_candle=CandleItem(low=373.8, high=376.8, open=375.45, close=375.75, color='GREEN') 2020-09-15 11:00:20 INFO: check need new order None 2020-09-15 11:00:20 INFO: init new order end 2020-09-15 11:00:20 INFO: 2020-09-15 11:00:20 INFO: 2020-09-15 11:00:20 INFO: 2020-09-15 11:00:20 INFO: 2020-09-15 11:02:00 INFO: 2020-09-15 11:02:00 INFO: 2020-09-15 11:02:00 INFO: 2020-09-15 11:02:00 INFO: 2020-09-15 11:02:00 INFO: clearing start 2020-09-15 11:02:00 INFO: clearing end 2020-09-15 11:02:00 INFO: 2020-09-15 11:02:00 INFO: 2020-09-15 11:02:00 INFO: 2020-09-15 11:02:00 INFO: 2020-09-15 12:00:20 INFO: 2020-09-15 12:00:20 INFO: 2020-09-15 12:00:20 INFO: 2020-09-15 12:00:20 INFO: 2020-09-15 12:00:20 INFO: init new order start 2020-09-15 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 15, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 375.75, 'high': 377.15, 'low': 369.25, 'close': 370.4, 'trades': 5753, 'volume': 4939434, 'vwap': 372.21, 'lastSize': 500, 'turnover': 183849085745, 'homeNotional': 52755.06488458254, 'foreignNotional': 19636223.789557654}, {'timestamp': datetime.datetime(2020, 9, 15, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 375.45, 'high': 376.8, 'low': 373.8, 'close': 375.75, 'trades': 2533, 'volume': 2213180, 'vwap': 375.3, 'lastSize': 1, 'turnover': 83058914875, 'homeNotional': 23759.15562966057, 'foreignNotional': 8916645.013595836}, {'timestamp': datetime.datetime(2020, 9, 15, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 374.95, 'high': 375.7, 'low': 372.85, 'close': 375.45, 'trades': 2430, 'volume': 1506734, 'vwap': 374.04, 'lastSize': 50, 'turnover': 56357741480, 'homeNotional': 16162.343196952947, 'foreignNotional': 6045354.455514754}] 2020-09-15 12:00:20 INFO: prepare candles [CandleItem(low=369.25, high=377.15, open=375.75, close=370.4, color='RED'), CandleItem(low=373.8, high=376.8, open=375.45, close=375.75, color='GREEN'), CandleItem(low=372.85, high=375.7, open=374.95, close=375.45, color='GREEN')] 2020-09-15 12:00:20 INFO: last_candle=CandleItem(low=369.25, high=377.15, open=375.75, close=370.4, color='RED') 2020-09-15 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-09-15 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=369.25, high=377.15, open=375.75, close=370.4, color='RED') 2020-09-15 12:00:20 INFO: skip by CandleItem(low=369.25, high=377.15, open=375.75, close=370.4, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-15 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-09-15 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=369.25, high=377.15, open=375.75, close=370.4, color='RED') 2020-09-15 12:00:20 INFO: skip by CandleItem(low=369.25, high=377.15, open=375.75, close=370.4, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-15 12:00:20 INFO: not found applicable config for candle 2020-09-15 12:00:20 INFO: check need new order None 2020-09-15 12:00:20 INFO: init new order end 2020-09-15 12:00:20 INFO: 2020-09-15 12:00:20 INFO: 2020-09-15 12:00:20 INFO: 2020-09-15 12:00:20 INFO: 2020-09-15 12:02:00 INFO: 2020-09-15 12:02:00 INFO: 2020-09-15 12:02:00 INFO: 2020-09-15 12:02:00 INFO: 2020-09-15 12:02:00 INFO: clearing start 2020-09-15 12:02:00 INFO: clearing end 2020-09-15 12:02:00 INFO: 2020-09-15 12:02:00 INFO: 2020-09-15 12:02:00 INFO: 2020-09-15 12:02:00 INFO: 2020-09-15 13:00:20 INFO: 2020-09-15 13:00:20 INFO: 2020-09-15 13:00:20 INFO: 2020-09-15 13:00:20 INFO: 2020-09-15 13:00:20 INFO: init new order start 2020-09-15 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 15, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 370.4, 'high': 373.05, 'low': 368.3, 'close': 372.1, 'trades': 4028, 'volume': 3551389, 'vwap': 371.0, 'lastSize': 10, 'turnover': 131755248390, 'homeNotional': 37882.14677863279, 'foreignNotional': 14054234.956904022}, {'timestamp': datetime.datetime(2020, 9, 15, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 375.75, 'high': 377.15, 'low': 369.25, 'close': 370.4, 'trades': 5753, 'volume': 4939434, 'vwap': 372.21, 'lastSize': 500, 'turnover': 183849085745, 'homeNotional': 52755.06488458254, 'foreignNotional': 19636223.789557654}, {'timestamp': datetime.datetime(2020, 9, 15, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 375.45, 'high': 376.8, 'low': 373.8, 'close': 375.75, 'trades': 2533, 'volume': 2213180, 'vwap': 375.3, 'lastSize': 1, 'turnover': 83058914875, 'homeNotional': 23759.15562966057, 'foreignNotional': 8916645.013595836}] 2020-09-15 13:00:20 INFO: prepare candles [CandleItem(low=368.3, high=373.05, open=370.4, close=372.1, color='GREEN'), CandleItem(low=369.25, high=377.15, open=375.75, close=370.4, color='RED'), CandleItem(low=373.8, high=376.8, open=375.45, close=375.75, color='GREEN')] 2020-09-15 13:00:20 INFO: skip by colors first_candle=CandleItem(low=373.8, high=376.8, open=375.45, close=375.75, color='GREEN') second_candle=CandleItem(low=369.25, high=377.15, open=375.75, close=370.4, color='RED') last_candle=CandleItem(low=368.3, high=373.05, open=370.4, close=372.1, color='GREEN') 2020-09-15 13:00:20 INFO: check need new order None 2020-09-15 13:00:20 INFO: init new order end 2020-09-15 13:00:20 INFO: 2020-09-15 13:00:20 INFO: 2020-09-15 13:00:20 INFO: 2020-09-15 13:00:20 INFO: 2020-09-15 13:02:00 INFO: 2020-09-15 13:02:00 INFO: 2020-09-15 13:02:00 INFO: 2020-09-15 13:02:00 INFO: 2020-09-15 13:02:00 INFO: clearing start 2020-09-15 13:02:00 INFO: clearing end 2020-09-15 13:02:00 INFO: 2020-09-15 13:02:00 INFO: 2020-09-15 13:02:00 INFO: 2020-09-15 13:02:00 INFO: 2020-09-15 14:00:20 INFO: 2020-09-15 14:00:20 INFO: 2020-09-15 14:00:20 INFO: 2020-09-15 14:00:20 INFO: 2020-09-15 14:00:20 INFO: init new order start 2020-09-15 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 15, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 372.1, 'high': 379.5, 'low': 370.45, 'close': 378.8, 'trades': 6109, 'volume': 4003733, 'vwap': 374.88, 'lastSize': 100, 'turnover': 150091872880, 'homeNotional': 43071.96819640227, 'foreignNotional': 16147357.263663813}, {'timestamp': datetime.datetime(2020, 9, 15, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 370.4, 'high': 373.05, 'low': 368.3, 'close': 372.1, 'trades': 4028, 'volume': 3551389, 'vwap': 371.0, 'lastSize': 10, 'turnover': 131755248390, 'homeNotional': 37882.14677863279, 'foreignNotional': 14054234.956904022}, {'timestamp': datetime.datetime(2020, 9, 15, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 375.75, 'high': 377.15, 'low': 369.25, 'close': 370.4, 'trades': 5753, 'volume': 4939434, 'vwap': 372.21, 'lastSize': 500, 'turnover': 183849085745, 'homeNotional': 52755.06488458254, 'foreignNotional': 19636223.789557654}] 2020-09-15 14:00:20 INFO: prepare candles [CandleItem(low=370.45, high=379.5, open=372.1, close=378.8, color='GREEN'), CandleItem(low=368.3, high=373.05, open=370.4, close=372.1, color='GREEN'), CandleItem(low=369.25, high=377.15, open=375.75, close=370.4, color='RED')] 2020-09-15 14:00:20 INFO: skip by colors first_candle=CandleItem(low=369.25, high=377.15, open=375.75, close=370.4, color='RED') second_candle=CandleItem(low=368.3, high=373.05, open=370.4, close=372.1, color='GREEN') last_candle=CandleItem(low=370.45, high=379.5, open=372.1, close=378.8, color='GREEN') 2020-09-15 14:00:20 INFO: check need new order None 2020-09-15 14:00:20 INFO: init new order end 2020-09-15 14:00:20 INFO: 2020-09-15 14:00:20 INFO: 2020-09-15 14:00:20 INFO: 2020-09-15 14:00:20 INFO: 2020-09-15 14:02:00 INFO: 2020-09-15 14:02:00 INFO: 2020-09-15 14:02:00 INFO: 2020-09-15 14:02:00 INFO: 2020-09-15 14:02:00 INFO: clearing start 2020-09-15 14:02:00 INFO: clearing end 2020-09-15 14:02:00 INFO: 2020-09-15 14:02:00 INFO: 2020-09-15 14:02:00 INFO: 2020-09-15 14:02:00 INFO: 2020-09-15 15:00:20 INFO: 2020-09-15 15:00:20 INFO: 2020-09-15 15:00:20 INFO: 2020-09-15 15:00:20 INFO: 2020-09-15 15:00:20 INFO: init new order start 2020-09-15 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 15, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 378.8, 'high': 379.3, 'low': 376.35, 'close': 376.95, 'trades': 4425, 'volume': 2865093, 'vwap': 377.68, 'lastSize': 15, 'turnover': 108208431550, 'homeNotional': 31063.320263708352, 'foreignNotional': 11731974.625951856}, {'timestamp': datetime.datetime(2020, 9, 15, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 372.1, 'high': 379.5, 'low': 370.45, 'close': 378.8, 'trades': 6109, 'volume': 4003733, 'vwap': 374.88, 'lastSize': 100, 'turnover': 150091872880, 'homeNotional': 43071.96819640227, 'foreignNotional': 16147357.263663813}, {'timestamp': datetime.datetime(2020, 9, 15, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 370.4, 'high': 373.05, 'low': 368.3, 'close': 372.1, 'trades': 4028, 'volume': 3551389, 'vwap': 371.0, 'lastSize': 10, 'turnover': 131755248390, 'homeNotional': 37882.14677863279, 'foreignNotional': 14054234.956904022}] 2020-09-15 15:00:20 INFO: prepare candles [CandleItem(low=376.35, high=379.3, open=378.8, close=376.95, color='RED'), CandleItem(low=370.45, high=379.5, open=372.1, close=378.8, color='GREEN'), CandleItem(low=368.3, high=373.05, open=370.4, close=372.1, color='GREEN')] 2020-09-15 15:00:20 INFO: last_candle=CandleItem(low=376.35, high=379.3, open=378.8, close=376.95, color='RED') 2020-09-15 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-09-15 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=376.35, high=379.3, open=378.8, close=376.95, color='RED') 2020-09-15 15:00:20 INFO: skip by CandleItem(low=376.35, high=379.3, open=378.8, close=376.95, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-15 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-09-15 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=376.35, high=379.3, open=378.8, close=376.95, color='RED') 2020-09-15 15:00:20 INFO: skip by CandleItem(low=376.35, high=379.3, open=378.8, close=376.95, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-15 15:00:20 INFO: not found applicable config for candle 2020-09-15 15:00:20 INFO: check need new order None 2020-09-15 15:00:20 INFO: init new order end 2020-09-15 15:00:20 INFO: 2020-09-15 15:00:20 INFO: 2020-09-15 15:00:20 INFO: 2020-09-15 15:00:20 INFO: 2020-09-15 15:02:00 INFO: 2020-09-15 15:02:00 INFO: 2020-09-15 15:02:00 INFO: 2020-09-15 15:02:00 INFO: 2020-09-15 15:02:00 INFO: clearing start 2020-09-15 15:02:00 INFO: clearing end 2020-09-15 15:02:00 INFO: 2020-09-15 15:02:00 INFO: 2020-09-15 15:02:00 INFO: 2020-09-15 15:02:00 INFO: 2020-09-15 16:00:20 INFO: 2020-09-15 16:00:20 INFO: 2020-09-15 16:00:20 INFO: 2020-09-15 16:00:20 INFO: 2020-09-15 16:00:20 INFO: init new order start 2020-09-15 16:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 15, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 376.95, 'high': 379.2, 'low': 375.75, 'close': 377.5, 'trades': 5205, 'volume': 4025310, 'vwap': 377.76, 'lastSize': 400, 'turnover': 152056686090, 'homeNotional': 43825.10084491056, 'foreignNotional': 16554994.494880779}, {'timestamp': datetime.datetime(2020, 9, 15, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 378.8, 'high': 379.3, 'low': 376.35, 'close': 376.95, 'trades': 4425, 'volume': 2865093, 'vwap': 377.68, 'lastSize': 15, 'turnover': 108208431550, 'homeNotional': 31063.320263708352, 'foreignNotional': 11731974.625951856}, {'timestamp': datetime.datetime(2020, 9, 15, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 372.1, 'high': 379.5, 'low': 370.45, 'close': 378.8, 'trades': 6109, 'volume': 4003733, 'vwap': 374.88, 'lastSize': 100, 'turnover': 150091872880, 'homeNotional': 43071.96819640227, 'foreignNotional': 16147357.263663813}] 2020-09-15 16:00:20 INFO: prepare candles [CandleItem(low=375.75, high=379.2, open=376.95, close=377.5, color='GREEN'), CandleItem(low=376.35, high=379.3, open=378.8, close=376.95, color='RED'), CandleItem(low=370.45, high=379.5, open=372.1, close=378.8, color='GREEN')] 2020-09-15 16:00:20 INFO: skip by colors first_candle=CandleItem(low=370.45, high=379.5, open=372.1, close=378.8, color='GREEN') second_candle=CandleItem(low=376.35, high=379.3, open=378.8, close=376.95, color='RED') last_candle=CandleItem(low=375.75, high=379.2, open=376.95, close=377.5, color='GREEN') 2020-09-15 16:00:20 INFO: check need new order None 2020-09-15 16:00:20 INFO: init new order end 2020-09-15 16:00:20 INFO: 2020-09-15 16:00:20 INFO: 2020-09-15 16:00:20 INFO: 2020-09-15 16:00:20 INFO: 2020-09-15 16:02:00 INFO: 2020-09-15 16:02:00 INFO: 2020-09-15 16:02:00 INFO: 2020-09-15 16:02:00 INFO: 2020-09-15 16:02:00 INFO: clearing start 2020-09-15 16:02:00 INFO: clearing end 2020-09-15 16:02:00 INFO: 2020-09-15 16:02:00 INFO: 2020-09-15 16:02:00 INFO: 2020-09-15 16:02:00 INFO: 2020-09-15 17:00:20 INFO: 2020-09-15 17:00:20 INFO: 2020-09-15 17:00:20 INFO: 2020-09-15 17:00:20 INFO: 2020-09-15 17:00:20 INFO: init new order start 2020-09-15 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 15, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 377.5, 'high': 378.0, 'low': 369.85, 'close': 369.95, 'trades': 7285, 'volume': 5706865, 'vwap': 373.34, 'lastSize': 10206, 'turnover': 213056608500, 'homeNotional': 62087.8294689734, 'foreignNotional': 23179700.477748115}, {'timestamp': datetime.datetime(2020, 9, 15, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 376.95, 'high': 379.2, 'low': 375.75, 'close': 377.5, 'trades': 5205, 'volume': 4025310, 'vwap': 377.76, 'lastSize': 400, 'turnover': 152056686090, 'homeNotional': 43825.10084491056, 'foreignNotional': 16554994.494880779}, {'timestamp': datetime.datetime(2020, 9, 15, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 378.8, 'high': 379.3, 'low': 376.35, 'close': 376.95, 'trades': 4425, 'volume': 2865093, 'vwap': 377.68, 'lastSize': 15, 'turnover': 108208431550, 'homeNotional': 31063.320263708352, 'foreignNotional': 11731974.625951856}] 2020-09-15 17:00:20 INFO: prepare candles [CandleItem(low=369.85, high=378.0, open=377.5, close=369.95, color='RED'), CandleItem(low=375.75, high=379.2, open=376.95, close=377.5, color='GREEN'), CandleItem(low=376.35, high=379.3, open=378.8, close=376.95, color='RED')] 2020-09-15 17:00:20 INFO: skip by colors first_candle=CandleItem(low=376.35, high=379.3, open=378.8, close=376.95, color='RED') second_candle=CandleItem(low=375.75, high=379.2, open=376.95, close=377.5, color='GREEN') last_candle=CandleItem(low=369.85, high=378.0, open=377.5, close=369.95, color='RED') 2020-09-15 17:00:20 INFO: check need new order None 2020-09-15 17:00:20 INFO: init new order end 2020-09-15 17:00:20 INFO: 2020-09-15 17:00:20 INFO: 2020-09-15 17:00:20 INFO: 2020-09-15 17:00:20 INFO: 2020-09-15 17:02:00 INFO: 2020-09-15 17:02:00 INFO: 2020-09-15 17:02:00 INFO: 2020-09-15 17:02:00 INFO: 2020-09-15 17:02:00 INFO: clearing start 2020-09-15 17:02:00 INFO: clearing end 2020-09-15 17:02:00 INFO: 2020-09-15 17:02:00 INFO: 2020-09-15 17:02:00 INFO: 2020-09-15 17:02:00 INFO: 2020-09-15 18:00:20 INFO: 2020-09-15 18:00:20 INFO: 2020-09-15 18:00:20 INFO: 2020-09-15 18:00:20 INFO: 2020-09-15 18:00:20 INFO: init new order start 2020-09-15 18:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 15, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 369.95, 'high': 371.85, 'low': 363.3, 'close': 364.3, 'trades': 10378, 'volume': 9761430, 'vwap': 367.98, 'lastSize': 1255, 'turnover': 359191831555, 'homeNotional': 105581.9725622285, 'foreignNotional': 38851903.82244635}, {'timestamp': datetime.datetime(2020, 9, 15, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 377.5, 'high': 378.0, 'low': 369.85, 'close': 369.95, 'trades': 7285, 'volume': 5706865, 'vwap': 373.34, 'lastSize': 10206, 'turnover': 213056608500, 'homeNotional': 62087.8294689734, 'foreignNotional': 23179700.477748115}, {'timestamp': datetime.datetime(2020, 9, 15, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 376.95, 'high': 379.2, 'low': 375.75, 'close': 377.5, 'trades': 5205, 'volume': 4025310, 'vwap': 377.76, 'lastSize': 400, 'turnover': 152056686090, 'homeNotional': 43825.10084491056, 'foreignNotional': 16554994.494880779}] 2020-09-15 18:00:21 INFO: prepare candles [CandleItem(low=363.3, high=371.85, open=369.95, close=364.3, color='RED'), CandleItem(low=369.85, high=378.0, open=377.5, close=369.95, color='RED'), CandleItem(low=375.75, high=379.2, open=376.95, close=377.5, color='GREEN')] 2020-09-15 18:00:21 INFO: skip by colors first_candle=CandleItem(low=375.75, high=379.2, open=376.95, close=377.5, color='GREEN') second_candle=CandleItem(low=369.85, high=378.0, open=377.5, close=369.95, color='RED') last_candle=CandleItem(low=363.3, high=371.85, open=369.95, close=364.3, color='RED') 2020-09-15 18:00:21 INFO: check need new order None 2020-09-15 18:00:21 INFO: init new order end 2020-09-15 18:00:21 INFO: 2020-09-15 18:00:21 INFO: 2020-09-15 18:00:21 INFO: 2020-09-15 18:00:21 INFO: 2020-09-15 18:02:00 INFO: 2020-09-15 18:02:00 INFO: 2020-09-15 18:02:00 INFO: 2020-09-15 18:02:00 INFO: 2020-09-15 18:02:00 INFO: clearing start 2020-09-15 18:02:00 INFO: clearing end 2020-09-15 18:02:00 INFO: 2020-09-15 18:02:00 INFO: 2020-09-15 18:02:00 INFO: 2020-09-15 18:02:00 INFO: 2020-09-15 19:00:20 INFO: 2020-09-15 19:00:20 INFO: 2020-09-15 19:00:20 INFO: 2020-09-15 19:00:20 INFO: 2020-09-15 19:00:20 INFO: init new order start 2020-09-15 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 15, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.3, 'high': 367.3, 'low': 363.7, 'close': 366.4, 'trades': 5287, 'volume': 4003357, 'vwap': 365.61, 'lastSize': 255, 'turnover': 146363506345, 'homeNotional': 43163.96628938854, 'foreignNotional': 15780861.907355284}, {'timestamp': datetime.datetime(2020, 9, 15, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 369.95, 'high': 371.85, 'low': 363.3, 'close': 364.3, 'trades': 10378, 'volume': 9761430, 'vwap': 367.98, 'lastSize': 1255, 'turnover': 359191831555, 'homeNotional': 105581.9725622285, 'foreignNotional': 38851903.82244635}, {'timestamp': datetime.datetime(2020, 9, 15, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 377.5, 'high': 378.0, 'low': 369.85, 'close': 369.95, 'trades': 7285, 'volume': 5706865, 'vwap': 373.34, 'lastSize': 10206, 'turnover': 213056608500, 'homeNotional': 62087.8294689734, 'foreignNotional': 23179700.477748115}] 2020-09-15 19:00:20 INFO: prepare candles [CandleItem(low=363.7, high=367.3, open=364.3, close=366.4, color='GREEN'), CandleItem(low=363.3, high=371.85, open=369.95, close=364.3, color='RED'), CandleItem(low=369.85, high=378.0, open=377.5, close=369.95, color='RED')] 2020-09-15 19:00:20 INFO: last_candle=CandleItem(low=363.7, high=367.3, open=364.3, close=366.4, color='GREEN') 2020-09-15 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-15 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=363.7, high=367.3, open=364.3, close=366.4, color='GREEN') 2020-09-15 19:00:20 INFO: skip by CandleItem(low=363.7, high=367.3, open=364.3, close=366.4, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-15 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-15 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=363.7, high=367.3, open=364.3, close=366.4, color='GREEN') 2020-09-15 19:00:20 INFO: skip by CandleItem(low=363.7, high=367.3, open=364.3, close=366.4, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-15 19:00:20 INFO: not found applicable config for candle 2020-09-15 19:00:20 INFO: check need new order None 2020-09-15 19:00:20 INFO: init new order end 2020-09-15 19:00:20 INFO: 2020-09-15 19:00:20 INFO: 2020-09-15 19:00:20 INFO: 2020-09-15 19:00:20 INFO: 2020-09-15 19:02:00 INFO: 2020-09-15 19:02:00 INFO: 2020-09-15 19:02:00 INFO: 2020-09-15 19:02:00 INFO: 2020-09-15 19:02:00 INFO: clearing start 2020-09-15 19:02:00 INFO: clearing end 2020-09-15 19:02:00 INFO: 2020-09-15 19:02:00 INFO: 2020-09-15 19:02:00 INFO: 2020-09-15 19:02:00 INFO: 2020-09-15 20:00:20 INFO: 2020-09-15 20:00:20 INFO: 2020-09-15 20:00:20 INFO: 2020-09-15 20:00:20 INFO: 2020-09-15 20:00:20 INFO: init new order start 2020-09-15 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 15, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 366.4, 'high': 368.25, 'low': 362.75, 'close': 367.9, 'trades': 5475, 'volume': 3588203, 'vwap': 365.69, 'lastSize': 283, 'turnover': 131216307105, 'homeNotional': 38607.626646723926, 'foreignNotional': 14118518.020877184}, {'timestamp': datetime.datetime(2020, 9, 15, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.3, 'high': 367.3, 'low': 363.7, 'close': 366.4, 'trades': 5287, 'volume': 4003357, 'vwap': 365.61, 'lastSize': 255, 'turnover': 146363506345, 'homeNotional': 43163.96628938854, 'foreignNotional': 15780861.907355284}, {'timestamp': datetime.datetime(2020, 9, 15, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 369.95, 'high': 371.85, 'low': 363.3, 'close': 364.3, 'trades': 10378, 'volume': 9761430, 'vwap': 367.98, 'lastSize': 1255, 'turnover': 359191831555, 'homeNotional': 105581.9725622285, 'foreignNotional': 38851903.82244635}] 2020-09-15 20:00:20 INFO: prepare candles [CandleItem(low=362.75, high=368.25, open=366.4, close=367.9, color='GREEN'), CandleItem(low=363.7, high=367.3, open=364.3, close=366.4, color='GREEN'), CandleItem(low=363.3, high=371.85, open=369.95, close=364.3, color='RED')] 2020-09-15 20:00:20 INFO: skip by colors first_candle=CandleItem(low=363.3, high=371.85, open=369.95, close=364.3, color='RED') second_candle=CandleItem(low=363.7, high=367.3, open=364.3, close=366.4, color='GREEN') last_candle=CandleItem(low=362.75, high=368.25, open=366.4, close=367.9, color='GREEN') 2020-09-15 20:00:20 INFO: check need new order None 2020-09-15 20:00:20 INFO: init new order end 2020-09-15 20:00:20 INFO: 2020-09-15 20:00:20 INFO: 2020-09-15 20:00:20 INFO: 2020-09-15 20:00:20 INFO: 2020-09-15 20:02:00 INFO: 2020-09-15 20:02:00 INFO: 2020-09-15 20:02:00 INFO: 2020-09-15 20:02:00 INFO: 2020-09-15 20:02:00 INFO: clearing start 2020-09-15 20:02:00 INFO: clearing end 2020-09-15 20:02:00 INFO: 2020-09-15 20:02:00 INFO: 2020-09-15 20:02:00 INFO: 2020-09-15 20:02:00 INFO: 2020-09-15 21:00:20 INFO: 2020-09-15 21:00:20 INFO: 2020-09-15 21:00:20 INFO: 2020-09-15 21:00:20 INFO: 2020-09-15 21:00:20 INFO: init new order start 2020-09-15 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 15, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.9, 'high': 369.4, 'low': 366.75, 'close': 368.45, 'trades': 2608, 'volume': 1368568, 'vwap': 367.94, 'lastSize': 300, 'turnover': 50355019455, 'homeNotional': 14747.632725515336, 'foreignNotional': 5426244.489639726}, {'timestamp': datetime.datetime(2020, 9, 15, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 366.4, 'high': 368.25, 'low': 362.75, 'close': 367.9, 'trades': 5475, 'volume': 3588203, 'vwap': 365.69, 'lastSize': 283, 'turnover': 131216307105, 'homeNotional': 38607.626646723926, 'foreignNotional': 14118518.020877184}, {'timestamp': datetime.datetime(2020, 9, 15, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.3, 'high': 367.3, 'low': 363.7, 'close': 366.4, 'trades': 5287, 'volume': 4003357, 'vwap': 365.61, 'lastSize': 255, 'turnover': 146363506345, 'homeNotional': 43163.96628938854, 'foreignNotional': 15780861.907355284}] 2020-09-15 21:00:20 INFO: prepare candles [CandleItem(low=366.75, high=369.4, open=367.9, close=368.45, color='GREEN'), CandleItem(low=362.75, high=368.25, open=366.4, close=367.9, color='GREEN'), CandleItem(low=363.7, high=367.3, open=364.3, close=366.4, color='GREEN')] 2020-09-15 21:00:20 INFO: skip by colors first_candle=CandleItem(low=363.7, high=367.3, open=364.3, close=366.4, color='GREEN') second_candle=CandleItem(low=362.75, high=368.25, open=366.4, close=367.9, color='GREEN') last_candle=CandleItem(low=366.75, high=369.4, open=367.9, close=368.45, color='GREEN') 2020-09-15 21:00:20 INFO: check need new order None 2020-09-15 21:00:20 INFO: init new order end 2020-09-15 21:00:20 INFO: 2020-09-15 21:00:20 INFO: 2020-09-15 21:00:20 INFO: 2020-09-15 21:00:20 INFO: 2020-09-15 21:02:00 INFO: 2020-09-15 21:02:00 INFO: 2020-09-15 21:02:00 INFO: 2020-09-15 21:02:00 INFO: 2020-09-15 21:02:00 INFO: clearing start 2020-09-15 21:02:00 INFO: clearing end 2020-09-15 21:02:00 INFO: 2020-09-15 21:02:00 INFO: 2020-09-15 21:02:00 INFO: 2020-09-15 21:02:00 INFO: 2020-09-15 22:00:20 INFO: 2020-09-15 22:00:20 INFO: 2020-09-15 22:00:20 INFO: 2020-09-15 22:00:20 INFO: 2020-09-15 22:00:20 INFO: init new order start 2020-09-15 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 15, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.45, 'high': 369.05, 'low': 364.1, 'close': 364.5, 'trades': 3044, 'volume': 2135802, 'vwap': 366.08, 'lastSize': 13, 'turnover': 78185413885, 'homeNotional': 23024.2439161839, 'foreignNotional': 8428533.298405845}, {'timestamp': datetime.datetime(2020, 9, 15, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.9, 'high': 369.4, 'low': 366.75, 'close': 368.45, 'trades': 2608, 'volume': 1368568, 'vwap': 367.94, 'lastSize': 300, 'turnover': 50355019455, 'homeNotional': 14747.632725515336, 'foreignNotional': 5426244.489639726}, {'timestamp': datetime.datetime(2020, 9, 15, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 366.4, 'high': 368.25, 'low': 362.75, 'close': 367.9, 'trades': 5475, 'volume': 3588203, 'vwap': 365.69, 'lastSize': 283, 'turnover': 131216307105, 'homeNotional': 38607.626646723926, 'foreignNotional': 14118518.020877184}] 2020-09-15 22:00:20 INFO: prepare candles [CandleItem(low=364.1, high=369.05, open=368.45, close=364.5, color='RED'), CandleItem(low=366.75, high=369.4, open=367.9, close=368.45, color='GREEN'), CandleItem(low=362.75, high=368.25, open=366.4, close=367.9, color='GREEN')] 2020-09-15 22:00:20 INFO: last_candle=CandleItem(low=364.1, high=369.05, open=368.45, close=364.5, color='RED') 2020-09-15 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-15 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=364.1, high=369.05, open=368.45, close=364.5, color='RED') 2020-09-15 22:00:20 INFO: skip by CandleItem(low=364.1, high=369.05, open=368.45, close=364.5, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-15 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-15 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=364.1, high=369.05, open=368.45, close=364.5, color='RED') 2020-09-15 22:00:20 INFO: skip by CandleItem(low=364.1, high=369.05, open=368.45, close=364.5, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-15 22:00:20 INFO: not found applicable config for candle 2020-09-15 22:00:20 INFO: check need new order None 2020-09-15 22:00:20 INFO: init new order end 2020-09-15 22:00:20 INFO: 2020-09-15 22:00:20 INFO: 2020-09-15 22:00:20 INFO: 2020-09-15 22:00:20 INFO: 2020-09-15 22:02:00 INFO: 2020-09-15 22:02:00 INFO: 2020-09-15 22:02:00 INFO: 2020-09-15 22:02:00 INFO: 2020-09-15 22:02:00 INFO: clearing start 2020-09-15 22:02:00 INFO: clearing end 2020-09-15 22:02:00 INFO: 2020-09-15 22:02:00 INFO: 2020-09-15 22:02:00 INFO: 2020-09-15 22:02:00 INFO: 2020-09-15 23:00:20 INFO: 2020-09-15 23:00:20 INFO: 2020-09-15 23:00:20 INFO: 2020-09-15 23:00:20 INFO: 2020-09-15 23:00:20 INFO: init new order start 2020-09-15 23:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 15, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.5, 'high': 365.3, 'low': 362.85, 'close': 365.0, 'trades': 3276, 'volume': 2412302, 'vwap': 363.98, 'lastSize': 3333, 'turnover': 87800891380, 'homeNotional': 25969.084930323534, 'foreignNotional': 9452008.186397756}, {'timestamp': datetime.datetime(2020, 9, 15, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.45, 'high': 369.05, 'low': 364.1, 'close': 364.5, 'trades': 3044, 'volume': 2135802, 'vwap': 366.08, 'lastSize': 13, 'turnover': 78185413885, 'homeNotional': 23024.2439161839, 'foreignNotional': 8428533.298405845}, {'timestamp': datetime.datetime(2020, 9, 15, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.9, 'high': 369.4, 'low': 366.75, 'close': 368.45, 'trades': 2608, 'volume': 1368568, 'vwap': 367.94, 'lastSize': 300, 'turnover': 50355019455, 'homeNotional': 14747.632725515336, 'foreignNotional': 5426244.489639726}] 2020-09-15 23:00:21 INFO: prepare candles [CandleItem(low=362.85, high=365.3, open=364.5, close=365.0, color='GREEN'), CandleItem(low=364.1, high=369.05, open=368.45, close=364.5, color='RED'), CandleItem(low=366.75, high=369.4, open=367.9, close=368.45, color='GREEN')] 2020-09-15 23:00:21 INFO: skip by colors first_candle=CandleItem(low=366.75, high=369.4, open=367.9, close=368.45, color='GREEN') second_candle=CandleItem(low=364.1, high=369.05, open=368.45, close=364.5, color='RED') last_candle=CandleItem(low=362.85, high=365.3, open=364.5, close=365.0, color='GREEN') 2020-09-15 23:00:21 INFO: check need new order None 2020-09-15 23:00:21 INFO: init new order end 2020-09-15 23:00:21 INFO: 2020-09-15 23:00:21 INFO: 2020-09-15 23:00:21 INFO: 2020-09-15 23:00:21 INFO: 2020-09-15 23:02:00 INFO: 2020-09-15 23:02:00 INFO: 2020-09-15 23:02:00 INFO: 2020-09-15 23:02:00 INFO: 2020-09-15 23:02:00 INFO: clearing start 2020-09-15 23:02:00 INFO: clearing end 2020-09-15 23:02:00 INFO: 2020-09-15 23:02:00 INFO: 2020-09-15 23:02:00 INFO: 2020-09-15 23:02:00 INFO: 2020-09-16 00:00:20 INFO: 2020-09-16 00:00:20 INFO: 2020-09-16 00:00:20 INFO: 2020-09-16 00:00:20 INFO: 2020-09-16 00:00:20 INFO: init new order start 2020-09-16 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 15, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.0, 'high': 367.7, 'low': 363.95, 'close': 366.0, 'trades': 3698, 'volume': 2029088, 'vwap': 365.96, 'lastSize': 156, 'turnover': 74256423870, 'homeNotional': 21979.234469071384, 'foreignNotional': 8043543.50002814}, {'timestamp': datetime.datetime(2020, 9, 15, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.5, 'high': 365.3, 'low': 362.85, 'close': 365.0, 'trades': 3276, 'volume': 2412302, 'vwap': 363.98, 'lastSize': 3333, 'turnover': 87800891380, 'homeNotional': 25969.084930323534, 'foreignNotional': 9452008.186397756}, {'timestamp': datetime.datetime(2020, 9, 15, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.45, 'high': 369.05, 'low': 364.1, 'close': 364.5, 'trades': 3044, 'volume': 2135802, 'vwap': 366.08, 'lastSize': 13, 'turnover': 78185413885, 'homeNotional': 23024.2439161839, 'foreignNotional': 8428533.298405845}] 2020-09-16 00:00:20 INFO: prepare candles [CandleItem(low=363.95, high=367.7, open=365.0, close=366.0, color='GREEN'), CandleItem(low=362.85, high=365.3, open=364.5, close=365.0, color='GREEN'), CandleItem(low=364.1, high=369.05, open=368.45, close=364.5, color='RED')] 2020-09-16 00:00:20 INFO: skip by colors first_candle=CandleItem(low=364.1, high=369.05, open=368.45, close=364.5, color='RED') second_candle=CandleItem(low=362.85, high=365.3, open=364.5, close=365.0, color='GREEN') last_candle=CandleItem(low=363.95, high=367.7, open=365.0, close=366.0, color='GREEN') 2020-09-16 00:00:20 INFO: check need new order None 2020-09-16 00:00:20 INFO: init new order end 2020-09-16 00:00:20 INFO: 2020-09-16 00:00:20 INFO: 2020-09-16 00:00:20 INFO: 2020-09-16 00:00:20 INFO: 2020-09-16 00:02:00 INFO: 2020-09-16 00:02:00 INFO: 2020-09-16 00:02:00 INFO: 2020-09-16 00:02:00 INFO: 2020-09-16 00:02:00 INFO: clearing start 2020-09-16 00:02:00 INFO: clearing end 2020-09-16 00:02:00 INFO: 2020-09-16 00:02:00 INFO: 2020-09-16 00:02:00 INFO: 2020-09-16 00:02:00 INFO: 2020-09-16 01:00:20 INFO: 2020-09-16 01:00:20 INFO: 2020-09-16 01:00:20 INFO: 2020-09-16 01:00:20 INFO: 2020-09-16 01:00:20 INFO: init new order start 2020-09-16 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 15, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 366.0, 'high': 368.55, 'low': 364.35, 'close': 368.5, 'trades': 2314, 'volume': 1479693, 'vwap': 366.52, 'lastSize': 12, 'turnover': 54233222300, 'homeNotional': 16063.742218623287, 'foreignNotional': 5887651.923676626}, {'timestamp': datetime.datetime(2020, 9, 15, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.0, 'high': 367.7, 'low': 363.95, 'close': 366.0, 'trades': 3698, 'volume': 2029088, 'vwap': 365.96, 'lastSize': 156, 'turnover': 74256423870, 'homeNotional': 21979.234469071384, 'foreignNotional': 8043543.50002814}, {'timestamp': datetime.datetime(2020, 9, 15, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.5, 'high': 365.3, 'low': 362.85, 'close': 365.0, 'trades': 3276, 'volume': 2412302, 'vwap': 363.98, 'lastSize': 3333, 'turnover': 87800891380, 'homeNotional': 25969.084930323534, 'foreignNotional': 9452008.186397756}] 2020-09-16 01:00:20 INFO: prepare candles [CandleItem(low=364.35, high=368.55, open=366.0, close=368.5, color='GREEN'), CandleItem(low=363.95, high=367.7, open=365.0, close=366.0, color='GREEN'), CandleItem(low=362.85, high=365.3, open=364.5, close=365.0, color='GREEN')] 2020-09-16 01:00:20 INFO: skip by colors first_candle=CandleItem(low=362.85, high=365.3, open=364.5, close=365.0, color='GREEN') second_candle=CandleItem(low=363.95, high=367.7, open=365.0, close=366.0, color='GREEN') last_candle=CandleItem(low=364.35, high=368.55, open=366.0, close=368.5, color='GREEN') 2020-09-16 01:00:20 INFO: check need new order None 2020-09-16 01:00:20 INFO: init new order end 2020-09-16 01:00:20 INFO: 2020-09-16 01:00:20 INFO: 2020-09-16 01:00:20 INFO: 2020-09-16 01:00:20 INFO: 2020-09-16 01:02:00 INFO: 2020-09-16 01:02:00 INFO: 2020-09-16 01:02:00 INFO: 2020-09-16 01:02:00 INFO: 2020-09-16 01:02:00 INFO: clearing start 2020-09-16 01:02:00 INFO: clearing end 2020-09-16 01:02:00 INFO: 2020-09-16 01:02:00 INFO: 2020-09-16 01:02:00 INFO: 2020-09-16 01:02:00 INFO: 2020-09-16 02:00:20 INFO: 2020-09-16 02:00:20 INFO: 2020-09-16 02:00:20 INFO: 2020-09-16 02:00:20 INFO: 2020-09-16 02:00:20 INFO: init new order start 2020-09-16 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 15, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.5, 'high': 368.55, 'low': 364.9, 'close': 365.5, 'trades': 2619, 'volume': 1515082, 'vwap': 366.66, 'lastSize': 100, 'turnover': 55551759470, 'homeNotional': 16405.410873485223, 'foreignNotional': 6015215.073987931}, {'timestamp': datetime.datetime(2020, 9, 15, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 366.0, 'high': 368.55, 'low': 364.35, 'close': 368.5, 'trades': 2314, 'volume': 1479693, 'vwap': 366.52, 'lastSize': 12, 'turnover': 54233222300, 'homeNotional': 16063.742218623287, 'foreignNotional': 5887651.923676626}, {'timestamp': datetime.datetime(2020, 9, 15, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.0, 'high': 367.7, 'low': 363.95, 'close': 366.0, 'trades': 3698, 'volume': 2029088, 'vwap': 365.96, 'lastSize': 156, 'turnover': 74256423870, 'homeNotional': 21979.234469071384, 'foreignNotional': 8043543.50002814}] 2020-09-16 02:00:20 INFO: prepare candles [CandleItem(low=364.9, high=368.55, open=368.5, close=365.5, color='RED'), CandleItem(low=364.35, high=368.55, open=366.0, close=368.5, color='GREEN'), CandleItem(low=363.95, high=367.7, open=365.0, close=366.0, color='GREEN')] 2020-09-16 02:00:20 INFO: last_candle=CandleItem(low=364.9, high=368.55, open=368.5, close=365.5, color='RED') 2020-09-16 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-09-16 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=364.9, high=368.55, open=368.5, close=365.5, color='RED') 2020-09-16 02:00:20 INFO: skip by CandleItem(low=364.9, high=368.55, open=368.5, close=365.5, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-16 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-09-16 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=364.9, high=368.55, open=368.5, close=365.5, color='RED') 2020-09-16 02:00:20 INFO: skip by CandleItem(low=364.9, high=368.55, open=368.5, close=365.5, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-16 02:00:20 INFO: not found applicable config for candle 2020-09-16 02:00:20 INFO: check need new order None 2020-09-16 02:00:20 INFO: init new order end 2020-09-16 02:00:20 INFO: 2020-09-16 02:00:20 INFO: 2020-09-16 02:00:20 INFO: 2020-09-16 02:00:20 INFO: 2020-09-16 02:02:00 INFO: 2020-09-16 02:02:00 INFO: 2020-09-16 02:02:00 INFO: 2020-09-16 02:02:00 INFO: 2020-09-16 02:02:00 INFO: clearing start 2020-09-16 02:02:00 INFO: clearing end 2020-09-16 02:02:00 INFO: 2020-09-16 02:02:00 INFO: 2020-09-16 02:02:00 INFO: 2020-09-16 02:02:00 INFO: 2020-09-16 02:43:54 ERROR: Error : Connection is already closed. 2020-09-16 02:43:54 ERROR: error from callback >: Connection is already closed. 2020-09-16 02:43:54 INFO: Websocket Closed 2020-09-16 02:43:54 WARNING: reconnect to socket 2020-09-16 02:43:54 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-09-16 02:43:54 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-09-16 02:43:54 INFO: Authenticating with API Key. 2020-09-16 02:43:56 INFO: Connected to WS. 2020-09-16 03:00:20 INFO: 2020-09-16 03:00:20 INFO: 2020-09-16 03:00:20 INFO: 2020-09-16 03:00:20 INFO: 2020-09-16 03:00:20 INFO: init new order start 2020-09-16 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 16, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.5, 'high': 365.55, 'low': 363.5, 'close': 364.6, 'trades': 2824, 'volume': 1893686, 'vwap': 364.48, 'lastSize': 1, 'turnover': 69019446470, 'homeNotional': 20412.73533856107, 'foreignNotional': 7439861.177730707}, {'timestamp': datetime.datetime(2020, 9, 15, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.5, 'high': 368.55, 'low': 364.9, 'close': 365.5, 'trades': 2619, 'volume': 1515082, 'vwap': 366.66, 'lastSize': 100, 'turnover': 55551759470, 'homeNotional': 16405.410873485223, 'foreignNotional': 6015215.073987931}, {'timestamp': datetime.datetime(2020, 9, 15, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 366.0, 'high': 368.55, 'low': 364.35, 'close': 368.5, 'trades': 2314, 'volume': 1479693, 'vwap': 366.52, 'lastSize': 12, 'turnover': 54233222300, 'homeNotional': 16063.742218623287, 'foreignNotional': 5887651.923676626}] 2020-09-16 03:00:20 INFO: prepare candles [CandleItem(low=363.5, high=365.55, open=365.5, close=364.6, color='RED'), CandleItem(low=364.9, high=368.55, open=368.5, close=365.5, color='RED'), CandleItem(low=364.35, high=368.55, open=366.0, close=368.5, color='GREEN')] 2020-09-16 03:00:20 INFO: skip by colors first_candle=CandleItem(low=364.35, high=368.55, open=366.0, close=368.5, color='GREEN') second_candle=CandleItem(low=364.9, high=368.55, open=368.5, close=365.5, color='RED') last_candle=CandleItem(low=363.5, high=365.55, open=365.5, close=364.6, color='RED') 2020-09-16 03:00:20 INFO: check need new order None 2020-09-16 03:00:20 INFO: init new order end 2020-09-16 03:00:20 INFO: 2020-09-16 03:00:20 INFO: 2020-09-16 03:00:20 INFO: 2020-09-16 03:00:20 INFO: 2020-09-16 03:02:00 INFO: 2020-09-16 03:02:00 INFO: 2020-09-16 03:02:00 INFO: 2020-09-16 03:02:00 INFO: 2020-09-16 03:02:00 INFO: clearing start 2020-09-16 03:02:00 INFO: clearing end 2020-09-16 03:02:00 INFO: 2020-09-16 03:02:00 INFO: 2020-09-16 03:02:00 INFO: 2020-09-16 03:02:00 INFO: 2020-09-16 04:00:20 INFO: 2020-09-16 04:00:20 INFO: 2020-09-16 04:00:20 INFO: 2020-09-16 04:00:20 INFO: 2020-09-16 04:00:20 INFO: init new order start 2020-09-16 04:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 16, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.6, 'high': 365.15, 'low': 355.35, 'close': 357.35, 'trades': 8865, 'volume': 6934439, 'vwap': 359.18, 'lastSize': 166, 'turnover': 249068462040, 'homeNotional': 74338.52238645384, 'foreignNotional': 26701146.409701064}, {'timestamp': datetime.datetime(2020, 9, 16, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.5, 'high': 365.55, 'low': 363.5, 'close': 364.6, 'trades': 2824, 'volume': 1893686, 'vwap': 364.48, 'lastSize': 1, 'turnover': 69019446470, 'homeNotional': 20412.73533856107, 'foreignNotional': 7439861.177730707}, {'timestamp': datetime.datetime(2020, 9, 15, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.5, 'high': 368.55, 'low': 364.9, 'close': 365.5, 'trades': 2619, 'volume': 1515082, 'vwap': 366.66, 'lastSize': 100, 'turnover': 55551759470, 'homeNotional': 16405.410873485223, 'foreignNotional': 6015215.073987931}] 2020-09-16 04:00:20 INFO: prepare candles [CandleItem(low=355.35, high=365.15, open=364.6, close=357.35, color='RED'), CandleItem(low=363.5, high=365.55, open=365.5, close=364.6, color='RED'), CandleItem(low=364.9, high=368.55, open=368.5, close=365.5, color='RED')] 2020-09-16 04:00:20 INFO: skip by colors first_candle=CandleItem(low=364.9, high=368.55, open=368.5, close=365.5, color='RED') second_candle=CandleItem(low=363.5, high=365.55, open=365.5, close=364.6, color='RED') last_candle=CandleItem(low=355.35, high=365.15, open=364.6, close=357.35, color='RED') 2020-09-16 04:00:20 INFO: check need new order None 2020-09-16 04:00:20 INFO: init new order end 2020-09-16 04:00:20 INFO: 2020-09-16 04:00:20 INFO: 2020-09-16 04:00:20 INFO: 2020-09-16 04:00:20 INFO: 2020-09-16 04:02:00 INFO: 2020-09-16 04:02:00 INFO: 2020-09-16 04:02:00 INFO: 2020-09-16 04:02:00 INFO: 2020-09-16 04:02:00 INFO: clearing start 2020-09-16 04:02:01 INFO: clearing end 2020-09-16 04:02:01 INFO: 2020-09-16 04:02:01 INFO: 2020-09-16 04:02:01 INFO: 2020-09-16 04:02:01 INFO: 2020-09-16 05:00:23 INFO: 2020-09-16 05:00:23 INFO: 2020-09-16 05:00:23 INFO: 2020-09-16 05:00:23 INFO: 2020-09-16 05:00:23 INFO: init new order start 2020-09-16 05:00:24 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 16, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.35, 'high': 360.7, 'low': 356.3, 'close': 360.3, 'trades': 4190, 'volume': 4041495, 'vwap': 358.53, 'lastSize': 11, 'turnover': 144896301475, 'homeNotional': 43312.52387395452, 'foreignNotional': 15528547.320310496}, {'timestamp': datetime.datetime(2020, 9, 16, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.6, 'high': 365.15, 'low': 355.35, 'close': 357.35, 'trades': 8865, 'volume': 6934439, 'vwap': 359.18, 'lastSize': 166, 'turnover': 249068462040, 'homeNotional': 74338.52238645384, 'foreignNotional': 26701146.409701064}, {'timestamp': datetime.datetime(2020, 9, 16, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.5, 'high': 365.55, 'low': 363.5, 'close': 364.6, 'trades': 2824, 'volume': 1893686, 'vwap': 364.48, 'lastSize': 1, 'turnover': 69019446470, 'homeNotional': 20412.73533856107, 'foreignNotional': 7439861.177730707}] 2020-09-16 05:00:24 INFO: prepare candles [CandleItem(low=356.3, high=360.7, open=357.35, close=360.3, color='GREEN'), CandleItem(low=355.35, high=365.15, open=364.6, close=357.35, color='RED'), CandleItem(low=363.5, high=365.55, open=365.5, close=364.6, color='RED')] 2020-09-16 05:00:24 INFO: last_candle=CandleItem(low=356.3, high=360.7, open=357.35, close=360.3, color='GREEN') 2020-09-16 05:00:24 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-16 05:00:24 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.3, high=360.7, open=357.35, close=360.3, color='GREEN') 2020-09-16 05:00:24 INFO: skip by CandleItem(low=356.3, high=360.7, open=357.35, close=360.3, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-16 05:00:24 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-16 05:00:24 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.3, high=360.7, open=357.35, close=360.3, color='GREEN') 2020-09-16 05:00:24 INFO: skip by CandleItem(low=356.3, high=360.7, open=357.35, close=360.3, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-16 05:00:24 INFO: not found applicable config for candle 2020-09-16 05:00:24 INFO: check need new order None 2020-09-16 05:00:24 INFO: init new order end 2020-09-16 05:00:24 INFO: 2020-09-16 05:00:24 INFO: 2020-09-16 05:00:24 INFO: 2020-09-16 05:00:24 INFO: 2020-09-16 05:02:00 INFO: 2020-09-16 05:02:00 INFO: 2020-09-16 05:02:00 INFO: 2020-09-16 05:02:00 INFO: 2020-09-16 05:02:00 INFO: clearing start 2020-09-16 05:02:00 INFO: clearing end 2020-09-16 05:02:00 INFO: 2020-09-16 05:02:00 INFO: 2020-09-16 05:02:00 INFO: 2020-09-16 05:02:00 INFO: 2020-09-16 06:00:20 INFO: 2020-09-16 06:00:20 INFO: 2020-09-16 06:00:20 INFO: 2020-09-16 06:00:20 INFO: 2020-09-16 06:00:20 INFO: init new order start 2020-09-16 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 16, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 360.3, 'high': 360.45, 'low': 356.9, 'close': 359.25, 'trades': 3373, 'volume': 2724624, 'vwap': 358.86, 'lastSize': 13, 'turnover': 97773696535, 'homeNotional': 29211.96079356614, 'foreignNotional': 10482785.510107702}, {'timestamp': datetime.datetime(2020, 9, 16, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.35, 'high': 360.7, 'low': 356.3, 'close': 360.3, 'trades': 4190, 'volume': 4041495, 'vwap': 358.53, 'lastSize': 11, 'turnover': 144896301475, 'homeNotional': 43312.52387395452, 'foreignNotional': 15528547.320310496}, {'timestamp': datetime.datetime(2020, 9, 16, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.6, 'high': 365.15, 'low': 355.35, 'close': 357.35, 'trades': 8865, 'volume': 6934439, 'vwap': 359.18, 'lastSize': 166, 'turnover': 249068462040, 'homeNotional': 74338.52238645384, 'foreignNotional': 26701146.409701064}] 2020-09-16 06:00:20 INFO: prepare candles [CandleItem(low=356.9, high=360.45, open=360.3, close=359.25, color='RED'), CandleItem(low=356.3, high=360.7, open=357.35, close=360.3, color='GREEN'), CandleItem(low=355.35, high=365.15, open=364.6, close=357.35, color='RED')] 2020-09-16 06:00:20 INFO: skip by colors first_candle=CandleItem(low=355.35, high=365.15, open=364.6, close=357.35, color='RED') second_candle=CandleItem(low=356.3, high=360.7, open=357.35, close=360.3, color='GREEN') last_candle=CandleItem(low=356.9, high=360.45, open=360.3, close=359.25, color='RED') 2020-09-16 06:00:20 INFO: check need new order None 2020-09-16 06:00:20 INFO: init new order end 2020-09-16 06:00:20 INFO: 2020-09-16 06:00:20 INFO: 2020-09-16 06:00:20 INFO: 2020-09-16 06:00:20 INFO: 2020-09-16 06:02:00 INFO: 2020-09-16 06:02:00 INFO: 2020-09-16 06:02:00 INFO: 2020-09-16 06:02:00 INFO: 2020-09-16 06:02:00 INFO: clearing start 2020-09-16 06:02:00 INFO: clearing end 2020-09-16 06:02:00 INFO: 2020-09-16 06:02:00 INFO: 2020-09-16 06:02:00 INFO: 2020-09-16 06:02:00 INFO: 2020-09-16 07:00:20 INFO: 2020-09-16 07:00:20 INFO: 2020-09-16 07:00:20 INFO: 2020-09-16 07:00:20 INFO: 2020-09-16 07:00:20 INFO: init new order start 2020-09-16 07:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 16, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 359.25, 'high': 359.95, 'low': 356.95, 'close': 359.6, 'trades': 2819, 'volume': 2182217, 'vwap': 358.63, 'lastSize': 27, 'turnover': 78258671140, 'homeNotional': 23454.913629780927, 'foreignNotional': 8411429.527015334}, {'timestamp': datetime.datetime(2020, 9, 16, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 360.3, 'high': 360.45, 'low': 356.9, 'close': 359.25, 'trades': 3373, 'volume': 2724624, 'vwap': 358.86, 'lastSize': 13, 'turnover': 97773696535, 'homeNotional': 29211.96079356614, 'foreignNotional': 10482785.510107702}, {'timestamp': datetime.datetime(2020, 9, 16, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.35, 'high': 360.7, 'low': 356.3, 'close': 360.3, 'trades': 4190, 'volume': 4041495, 'vwap': 358.53, 'lastSize': 11, 'turnover': 144896301475, 'homeNotional': 43312.52387395452, 'foreignNotional': 15528547.320310496}] 2020-09-16 07:00:20 INFO: prepare candles [CandleItem(low=356.95, high=359.95, open=359.25, close=359.6, color='GREEN'), CandleItem(low=356.9, high=360.45, open=360.3, close=359.25, color='RED'), CandleItem(low=356.3, high=360.7, open=357.35, close=360.3, color='GREEN')] 2020-09-16 07:00:20 INFO: skip by colors first_candle=CandleItem(low=356.3, high=360.7, open=357.35, close=360.3, color='GREEN') second_candle=CandleItem(low=356.9, high=360.45, open=360.3, close=359.25, color='RED') last_candle=CandleItem(low=356.95, high=359.95, open=359.25, close=359.6, color='GREEN') 2020-09-16 07:00:20 INFO: check need new order None 2020-09-16 07:00:20 INFO: init new order end 2020-09-16 07:00:20 INFO: 2020-09-16 07:00:20 INFO: 2020-09-16 07:00:20 INFO: 2020-09-16 07:00:20 INFO: 2020-09-16 07:02:00 INFO: 2020-09-16 07:02:00 INFO: 2020-09-16 07:02:00 INFO: 2020-09-16 07:02:00 INFO: 2020-09-16 07:02:00 INFO: clearing start 2020-09-16 07:02:00 INFO: clearing end 2020-09-16 07:02:00 INFO: 2020-09-16 07:02:00 INFO: 2020-09-16 07:02:00 INFO: 2020-09-16 07:02:00 INFO: 2020-09-16 08:00:20 INFO: 2020-09-16 08:00:20 INFO: 2020-09-16 08:00:20 INFO: 2020-09-16 08:00:20 INFO: 2020-09-16 08:00:20 INFO: init new order start 2020-09-16 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 16, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 359.6, 'high': 362.8, 'low': 359.0, 'close': 362.15, 'trades': 3199, 'volume': 2765357, 'vwap': 361.25, 'lastSize': 1, 'turnover': 99897586460, 'homeNotional': 29851.056247347133, 'foreignNotional': 10783638.911808703}, {'timestamp': datetime.datetime(2020, 9, 16, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 359.25, 'high': 359.95, 'low': 356.95, 'close': 359.6, 'trades': 2819, 'volume': 2182217, 'vwap': 358.63, 'lastSize': 27, 'turnover': 78258671140, 'homeNotional': 23454.913629780927, 'foreignNotional': 8411429.527015334}, {'timestamp': datetime.datetime(2020, 9, 16, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 360.3, 'high': 360.45, 'low': 356.9, 'close': 359.25, 'trades': 3373, 'volume': 2724624, 'vwap': 358.86, 'lastSize': 13, 'turnover': 97773696535, 'homeNotional': 29211.96079356614, 'foreignNotional': 10482785.510107702}] 2020-09-16 08:00:20 INFO: prepare candles [CandleItem(low=359.0, high=362.8, open=359.6, close=362.15, color='GREEN'), CandleItem(low=356.95, high=359.95, open=359.25, close=359.6, color='GREEN'), CandleItem(low=356.9, high=360.45, open=360.3, close=359.25, color='RED')] 2020-09-16 08:00:20 INFO: skip by colors first_candle=CandleItem(low=356.9, high=360.45, open=360.3, close=359.25, color='RED') second_candle=CandleItem(low=356.95, high=359.95, open=359.25, close=359.6, color='GREEN') last_candle=CandleItem(low=359.0, high=362.8, open=359.6, close=362.15, color='GREEN') 2020-09-16 08:00:20 INFO: check need new order None 2020-09-16 08:00:20 INFO: init new order end 2020-09-16 08:00:20 INFO: 2020-09-16 08:00:20 INFO: 2020-09-16 08:00:20 INFO: 2020-09-16 08:00:20 INFO: 2020-09-16 08:02:00 INFO: 2020-09-16 08:02:00 INFO: 2020-09-16 08:02:00 INFO: 2020-09-16 08:02:00 INFO: 2020-09-16 08:02:00 INFO: clearing start 2020-09-16 08:02:00 INFO: clearing end 2020-09-16 08:02:00 INFO: 2020-09-16 08:02:00 INFO: 2020-09-16 08:02:00 INFO: 2020-09-16 08:02:00 INFO: 2020-09-16 08:26:20 INFO: Websocket Closed 2020-09-16 08:26:21 WARNING: reconnect to socket 2020-09-16 08:26:21 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-09-16 08:26:21 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-09-16 08:26:21 INFO: Authenticating with API Key. 2020-09-16 08:26:22 INFO: Connected to WS. 2020-09-16 09:00:20 INFO: 2020-09-16 09:00:20 INFO: 2020-09-16 09:00:20 INFO: 2020-09-16 09:00:20 INFO: 2020-09-16 09:00:20 INFO: init new order start 2020-09-16 09:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 16, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 362.15, 'high': 363.85, 'low': 361.75, 'close': 362.45, 'trades': 2793, 'volume': 2652186, 'vwap': 362.91, 'lastSize': 500, 'turnover': 96248892615, 'homeNotional': 28648.282820307875, 'foreignNotional': 10396587.531604152}, {'timestamp': datetime.datetime(2020, 9, 16, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 359.6, 'high': 362.8, 'low': 359.0, 'close': 362.15, 'trades': 3199, 'volume': 2765357, 'vwap': 361.25, 'lastSize': 1, 'turnover': 99897586460, 'homeNotional': 29851.056247347133, 'foreignNotional': 10783638.911808703}, {'timestamp': datetime.datetime(2020, 9, 16, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 359.25, 'high': 359.95, 'low': 356.95, 'close': 359.6, 'trades': 2819, 'volume': 2182217, 'vwap': 358.63, 'lastSize': 27, 'turnover': 78258671140, 'homeNotional': 23454.913629780927, 'foreignNotional': 8411429.527015334}] 2020-09-16 09:00:20 INFO: prepare candles [CandleItem(low=361.75, high=363.85, open=362.15, close=362.45, color='GREEN'), CandleItem(low=359.0, high=362.8, open=359.6, close=362.15, color='GREEN'), CandleItem(low=356.95, high=359.95, open=359.25, close=359.6, color='GREEN')] 2020-09-16 09:00:20 INFO: skip by colors first_candle=CandleItem(low=356.95, high=359.95, open=359.25, close=359.6, color='GREEN') second_candle=CandleItem(low=359.0, high=362.8, open=359.6, close=362.15, color='GREEN') last_candle=CandleItem(low=361.75, high=363.85, open=362.15, close=362.45, color='GREEN') 2020-09-16 09:00:20 INFO: check need new order None 2020-09-16 09:00:20 INFO: init new order end 2020-09-16 09:00:20 INFO: 2020-09-16 09:00:20 INFO: 2020-09-16 09:00:20 INFO: 2020-09-16 09:00:20 INFO: 2020-09-16 09:02:00 INFO: 2020-09-16 09:02:00 INFO: 2020-09-16 09:02:00 INFO: 2020-09-16 09:02:00 INFO: 2020-09-16 09:02:00 INFO: clearing start 2020-09-16 09:02:00 INFO: clearing end 2020-09-16 09:02:00 INFO: 2020-09-16 09:02:00 INFO: 2020-09-16 09:02:00 INFO: 2020-09-16 09:02:00 INFO: 2020-09-16 10:00:20 INFO: 2020-09-16 10:00:20 INFO: 2020-09-16 10:00:20 INFO: 2020-09-16 10:00:20 INFO: 2020-09-16 10:00:20 INFO: init new order start 2020-09-16 10:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 16, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 362.45, 'high': 365.75, 'low': 361.25, 'close': 364.55, 'trades': 2865, 'volume': 2031355, 'vwap': 363.14, 'lastSize': 100, 'turnover': 73765474880, 'homeNotional': 21958.247228746983, 'foreignNotional': 7973872.038869882}, {'timestamp': datetime.datetime(2020, 9, 16, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 362.15, 'high': 363.85, 'low': 361.75, 'close': 362.45, 'trades': 2793, 'volume': 2652186, 'vwap': 362.91, 'lastSize': 500, 'turnover': 96248892615, 'homeNotional': 28648.282820307875, 'foreignNotional': 10396587.531604152}, {'timestamp': datetime.datetime(2020, 9, 16, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 359.6, 'high': 362.8, 'low': 359.0, 'close': 362.15, 'trades': 3199, 'volume': 2765357, 'vwap': 361.25, 'lastSize': 1, 'turnover': 99897586460, 'homeNotional': 29851.056247347133, 'foreignNotional': 10783638.911808703}] 2020-09-16 10:00:20 INFO: prepare candles [CandleItem(low=361.25, high=365.75, open=362.45, close=364.55, color='GREEN'), CandleItem(low=361.75, high=363.85, open=362.15, close=362.45, color='GREEN'), CandleItem(low=359.0, high=362.8, open=359.6, close=362.15, color='GREEN')] 2020-09-16 10:00:20 INFO: skip by colors first_candle=CandleItem(low=359.0, high=362.8, open=359.6, close=362.15, color='GREEN') second_candle=CandleItem(low=361.75, high=363.85, open=362.15, close=362.45, color='GREEN') last_candle=CandleItem(low=361.25, high=365.75, open=362.45, close=364.55, color='GREEN') 2020-09-16 10:00:20 INFO: check need new order None 2020-09-16 10:00:20 INFO: init new order end 2020-09-16 10:00:20 INFO: 2020-09-16 10:00:20 INFO: 2020-09-16 10:00:20 INFO: 2020-09-16 10:00:20 INFO: 2020-09-16 10:02:00 INFO: 2020-09-16 10:02:00 INFO: 2020-09-16 10:02:00 INFO: 2020-09-16 10:02:00 INFO: 2020-09-16 10:02:00 INFO: clearing start 2020-09-16 10:02:00 INFO: clearing end 2020-09-16 10:02:00 INFO: 2020-09-16 10:02:00 INFO: 2020-09-16 10:02:00 INFO: 2020-09-16 10:02:00 INFO: 2020-09-16 11:00:20 INFO: 2020-09-16 11:00:20 INFO: 2020-09-16 11:00:20 INFO: 2020-09-16 11:00:20 INFO: 2020-09-16 11:00:20 INFO: init new order start 2020-09-16 11:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 16, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.55, 'high': 366.6, 'low': 363.05, 'close': 365.9, 'trades': 3512, 'volume': 1794735, 'vwap': 364.52, 'lastSize': 97, 'turnover': 65421150655, 'homeNotional': 19513.024253162395, 'foreignNotional': 7112882.453029513}, {'timestamp': datetime.datetime(2020, 9, 16, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 362.45, 'high': 365.75, 'low': 361.25, 'close': 364.55, 'trades': 2865, 'volume': 2031355, 'vwap': 363.14, 'lastSize': 100, 'turnover': 73765474880, 'homeNotional': 21958.247228746983, 'foreignNotional': 7973872.038869882}, {'timestamp': datetime.datetime(2020, 9, 16, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 362.15, 'high': 363.85, 'low': 361.75, 'close': 362.45, 'trades': 2793, 'volume': 2652186, 'vwap': 362.91, 'lastSize': 500, 'turnover': 96248892615, 'homeNotional': 28648.282820307875, 'foreignNotional': 10396587.531604152}] 2020-09-16 11:00:21 INFO: prepare candles [CandleItem(low=363.05, high=366.6, open=364.55, close=365.9, color='GREEN'), CandleItem(low=361.25, high=365.75, open=362.45, close=364.55, color='GREEN'), CandleItem(low=361.75, high=363.85, open=362.15, close=362.45, color='GREEN')] 2020-09-16 11:00:21 INFO: skip by colors first_candle=CandleItem(low=361.75, high=363.85, open=362.15, close=362.45, color='GREEN') second_candle=CandleItem(low=361.25, high=365.75, open=362.45, close=364.55, color='GREEN') last_candle=CandleItem(low=363.05, high=366.6, open=364.55, close=365.9, color='GREEN') 2020-09-16 11:00:21 INFO: check need new order None 2020-09-16 11:00:21 INFO: init new order end 2020-09-16 11:00:21 INFO: 2020-09-16 11:00:21 INFO: 2020-09-16 11:00:21 INFO: 2020-09-16 11:00:21 INFO: 2020-09-16 11:02:00 INFO: 2020-09-16 11:02:00 INFO: 2020-09-16 11:02:00 INFO: 2020-09-16 11:02:00 INFO: 2020-09-16 11:02:00 INFO: clearing start 2020-09-16 11:02:00 INFO: clearing end 2020-09-16 11:02:00 INFO: 2020-09-16 11:02:00 INFO: 2020-09-16 11:02:00 INFO: 2020-09-16 11:02:00 INFO: 2020-09-16 12:00:20 INFO: 2020-09-16 12:00:20 INFO: 2020-09-16 12:00:20 INFO: 2020-09-16 12:00:20 INFO: 2020-09-16 12:00:20 INFO: init new order start 2020-09-16 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 16, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.9, 'high': 366.85, 'low': 363.25, 'close': 364.35, 'trades': 3593, 'volume': 3346805, 'vwap': 364.85, 'lastSize': 109, 'turnover': 122107510075, 'homeNotional': 36476.47848165281, 'foreignNotional': 13308400.542917464}, {'timestamp': datetime.datetime(2020, 9, 16, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.55, 'high': 366.6, 'low': 363.05, 'close': 365.9, 'trades': 3512, 'volume': 1794735, 'vwap': 364.52, 'lastSize': 97, 'turnover': 65421150655, 'homeNotional': 19513.024253162395, 'foreignNotional': 7112882.453029513}, {'timestamp': datetime.datetime(2020, 9, 16, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 362.45, 'high': 365.75, 'low': 361.25, 'close': 364.55, 'trades': 2865, 'volume': 2031355, 'vwap': 363.14, 'lastSize': 100, 'turnover': 73765474880, 'homeNotional': 21958.247228746983, 'foreignNotional': 7973872.038869882}] 2020-09-16 12:00:20 INFO: prepare candles [CandleItem(low=363.25, high=366.85, open=365.9, close=364.35, color='RED'), CandleItem(low=363.05, high=366.6, open=364.55, close=365.9, color='GREEN'), CandleItem(low=361.25, high=365.75, open=362.45, close=364.55, color='GREEN')] 2020-09-16 12:00:20 INFO: last_candle=CandleItem(low=363.25, high=366.85, open=365.9, close=364.35, color='RED') 2020-09-16 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-09-16 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=363.25, high=366.85, open=365.9, close=364.35, color='RED') 2020-09-16 12:00:20 INFO: skip by CandleItem(low=363.25, high=366.85, open=365.9, close=364.35, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-16 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-09-16 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=363.25, high=366.85, open=365.9, close=364.35, color='RED') 2020-09-16 12:00:20 INFO: skip by CandleItem(low=363.25, high=366.85, open=365.9, close=364.35, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-16 12:00:20 INFO: not found applicable config for candle 2020-09-16 12:00:20 INFO: check need new order None 2020-09-16 12:00:20 INFO: init new order end 2020-09-16 12:00:20 INFO: 2020-09-16 12:00:20 INFO: 2020-09-16 12:00:20 INFO: 2020-09-16 12:00:20 INFO: 2020-09-16 12:02:00 INFO: 2020-09-16 12:02:00 INFO: 2020-09-16 12:02:00 INFO: 2020-09-16 12:02:00 INFO: 2020-09-16 12:02:00 INFO: clearing start 2020-09-16 12:02:00 INFO: clearing end 2020-09-16 12:02:00 INFO: 2020-09-16 12:02:00 INFO: 2020-09-16 12:02:00 INFO: 2020-09-16 12:02:00 INFO: 2020-09-16 13:00:20 INFO: 2020-09-16 13:00:20 INFO: 2020-09-16 13:00:20 INFO: 2020-09-16 13:00:20 INFO: 2020-09-16 13:00:20 INFO: init new order start 2020-09-16 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 16, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.35, 'high': 365.2, 'low': 363.25, 'close': 364.55, 'trades': 2145, 'volume': 1707845, 'vwap': 364.25, 'lastSize': 13, 'turnover': 62208053050, 'homeNotional': 18574.254696928914, 'foreignNotional': 6765652.714071579}, {'timestamp': datetime.datetime(2020, 9, 16, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.9, 'high': 366.85, 'low': 363.25, 'close': 364.35, 'trades': 3593, 'volume': 3346805, 'vwap': 364.85, 'lastSize': 109, 'turnover': 122107510075, 'homeNotional': 36476.47848165281, 'foreignNotional': 13308400.542917464}, {'timestamp': datetime.datetime(2020, 9, 16, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.55, 'high': 366.6, 'low': 363.05, 'close': 365.9, 'trades': 3512, 'volume': 1794735, 'vwap': 364.52, 'lastSize': 97, 'turnover': 65421150655, 'homeNotional': 19513.024253162395, 'foreignNotional': 7112882.453029513}] 2020-09-16 13:00:20 INFO: prepare candles [CandleItem(low=363.25, high=365.2, open=364.35, close=364.55, color='GREEN'), CandleItem(low=363.25, high=366.85, open=365.9, close=364.35, color='RED'), CandleItem(low=363.05, high=366.6, open=364.55, close=365.9, color='GREEN')] 2020-09-16 13:00:20 INFO: skip by colors first_candle=CandleItem(low=363.05, high=366.6, open=364.55, close=365.9, color='GREEN') second_candle=CandleItem(low=363.25, high=366.85, open=365.9, close=364.35, color='RED') last_candle=CandleItem(low=363.25, high=365.2, open=364.35, close=364.55, color='GREEN') 2020-09-16 13:00:20 INFO: check need new order None 2020-09-16 13:00:20 INFO: init new order end 2020-09-16 13:00:20 INFO: 2020-09-16 13:00:20 INFO: 2020-09-16 13:00:20 INFO: 2020-09-16 13:00:20 INFO: 2020-09-16 13:02:00 INFO: 2020-09-16 13:02:00 INFO: 2020-09-16 13:02:00 INFO: 2020-09-16 13:02:00 INFO: 2020-09-16 13:02:00 INFO: clearing start 2020-09-16 13:02:00 INFO: clearing end 2020-09-16 13:02:00 INFO: 2020-09-16 13:02:00 INFO: 2020-09-16 13:02:00 INFO: 2020-09-16 13:02:00 INFO: 2020-09-16 14:00:20 INFO: 2020-09-16 14:00:20 INFO: 2020-09-16 14:00:20 INFO: 2020-09-16 14:00:20 INFO: 2020-09-16 14:00:20 INFO: init new order start 2020-09-16 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 16, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.55, 'high': 365.35, 'low': 361.35, 'close': 361.95, 'trades': 3107, 'volume': 1711937, 'vwap': 363.18, 'lastSize': 361, 'turnover': 62173145105, 'homeNotional': 18602.50625665029, 'foreignNotional': 6755996.294015424}, {'timestamp': datetime.datetime(2020, 9, 16, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.35, 'high': 365.2, 'low': 363.25, 'close': 364.55, 'trades': 2145, 'volume': 1707845, 'vwap': 364.25, 'lastSize': 13, 'turnover': 62208053050, 'homeNotional': 18574.254696928914, 'foreignNotional': 6765652.714071579}, {'timestamp': datetime.datetime(2020, 9, 16, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.9, 'high': 366.85, 'low': 363.25, 'close': 364.35, 'trades': 3593, 'volume': 3346805, 'vwap': 364.85, 'lastSize': 109, 'turnover': 122107510075, 'homeNotional': 36476.47848165281, 'foreignNotional': 13308400.542917464}] 2020-09-16 14:00:20 INFO: prepare candles [CandleItem(low=361.35, high=365.35, open=364.55, close=361.95, color='RED'), CandleItem(low=363.25, high=365.2, open=364.35, close=364.55, color='GREEN'), CandleItem(low=363.25, high=366.85, open=365.9, close=364.35, color='RED')] 2020-09-16 14:00:20 INFO: skip by colors first_candle=CandleItem(low=363.25, high=366.85, open=365.9, close=364.35, color='RED') second_candle=CandleItem(low=363.25, high=365.2, open=364.35, close=364.55, color='GREEN') last_candle=CandleItem(low=361.35, high=365.35, open=364.55, close=361.95, color='RED') 2020-09-16 14:00:20 INFO: check need new order None 2020-09-16 14:00:20 INFO: init new order end 2020-09-16 14:00:20 INFO: 2020-09-16 14:00:20 INFO: 2020-09-16 14:00:20 INFO: 2020-09-16 14:00:20 INFO: 2020-09-16 14:02:00 INFO: 2020-09-16 14:02:00 INFO: 2020-09-16 14:02:00 INFO: 2020-09-16 14:02:00 INFO: 2020-09-16 14:02:00 INFO: clearing start 2020-09-16 14:02:00 INFO: clearing end 2020-09-16 14:02:00 INFO: 2020-09-16 14:02:00 INFO: 2020-09-16 14:02:00 INFO: 2020-09-16 14:02:00 INFO: 2020-09-16 15:00:20 INFO: 2020-09-16 15:00:20 INFO: 2020-09-16 15:00:20 INFO: 2020-09-16 15:00:20 INFO: 2020-09-16 15:00:20 INFO: init new order start 2020-09-16 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 16, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 361.95, 'high': 365.3, 'low': 361.85, 'close': 365.05, 'trades': 2682, 'volume': 1929093, 'vwap': 363.38, 'lastSize': 100, 'turnover': 70098856100, 'homeNotional': 20978.914370842496, 'foreignNotional': 7623287.79566164}, {'timestamp': datetime.datetime(2020, 9, 16, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.55, 'high': 365.35, 'low': 361.35, 'close': 361.95, 'trades': 3107, 'volume': 1711937, 'vwap': 363.18, 'lastSize': 361, 'turnover': 62173145105, 'homeNotional': 18602.50625665029, 'foreignNotional': 6755996.294015424}, {'timestamp': datetime.datetime(2020, 9, 16, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.35, 'high': 365.2, 'low': 363.25, 'close': 364.55, 'trades': 2145, 'volume': 1707845, 'vwap': 364.25, 'lastSize': 13, 'turnover': 62208053050, 'homeNotional': 18574.254696928914, 'foreignNotional': 6765652.714071579}] 2020-09-16 15:00:20 INFO: prepare candles [CandleItem(low=361.85, high=365.3, open=361.95, close=365.05, color='GREEN'), CandleItem(low=361.35, high=365.35, open=364.55, close=361.95, color='RED'), CandleItem(low=363.25, high=365.2, open=364.35, close=364.55, color='GREEN')] 2020-09-16 15:00:20 INFO: skip by colors first_candle=CandleItem(low=363.25, high=365.2, open=364.35, close=364.55, color='GREEN') second_candle=CandleItem(low=361.35, high=365.35, open=364.55, close=361.95, color='RED') last_candle=CandleItem(low=361.85, high=365.3, open=361.95, close=365.05, color='GREEN') 2020-09-16 15:00:20 INFO: check need new order None 2020-09-16 15:00:20 INFO: init new order end 2020-09-16 15:00:20 INFO: 2020-09-16 15:00:20 INFO: 2020-09-16 15:00:20 INFO: 2020-09-16 15:00:20 INFO: 2020-09-16 15:02:00 INFO: 2020-09-16 15:02:00 INFO: 2020-09-16 15:02:00 INFO: 2020-09-16 15:02:00 INFO: 2020-09-16 15:02:00 INFO: clearing start 2020-09-16 15:02:00 INFO: clearing end 2020-09-16 15:02:00 INFO: 2020-09-16 15:02:00 INFO: 2020-09-16 15:02:00 INFO: 2020-09-16 15:02:00 INFO: 2020-09-16 16:00:20 INFO: 2020-09-16 16:00:20 INFO: 2020-09-16 16:00:20 INFO: 2020-09-16 16:00:20 INFO: 2020-09-16 16:00:20 INFO: init new order start 2020-09-16 16:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 16, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.05, 'high': 369.8, 'low': 363.5, 'close': 367.75, 'trades': 7199, 'volume': 4651873, 'vwap': 366.73, 'lastSize': 1, 'turnover': 170595688215, 'homeNotional': 50766.66022581089, 'foreignNotional': 18617502.574460965}, {'timestamp': datetime.datetime(2020, 9, 16, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 361.95, 'high': 365.3, 'low': 361.85, 'close': 365.05, 'trades': 2682, 'volume': 1929093, 'vwap': 363.38, 'lastSize': 100, 'turnover': 70098856100, 'homeNotional': 20978.914370842496, 'foreignNotional': 7623287.79566164}, {'timestamp': datetime.datetime(2020, 9, 16, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 364.55, 'high': 365.35, 'low': 361.35, 'close': 361.95, 'trades': 3107, 'volume': 1711937, 'vwap': 363.18, 'lastSize': 361, 'turnover': 62173145105, 'homeNotional': 18602.50625665029, 'foreignNotional': 6755996.294015424}] 2020-09-16 16:00:20 INFO: prepare candles [CandleItem(low=363.5, high=369.8, open=365.05, close=367.75, color='GREEN'), CandleItem(low=361.85, high=365.3, open=361.95, close=365.05, color='GREEN'), CandleItem(low=361.35, high=365.35, open=364.55, close=361.95, color='RED')] 2020-09-16 16:00:20 INFO: skip by colors first_candle=CandleItem(low=361.35, high=365.35, open=364.55, close=361.95, color='RED') second_candle=CandleItem(low=361.85, high=365.3, open=361.95, close=365.05, color='GREEN') last_candle=CandleItem(low=363.5, high=369.8, open=365.05, close=367.75, color='GREEN') 2020-09-16 16:00:20 INFO: check need new order None 2020-09-16 16:00:20 INFO: init new order end 2020-09-16 16:00:20 INFO: 2020-09-16 16:00:20 INFO: 2020-09-16 16:00:20 INFO: 2020-09-16 16:00:20 INFO: 2020-09-16 16:02:00 INFO: 2020-09-16 16:02:00 INFO: 2020-09-16 16:02:00 INFO: 2020-09-16 16:02:00 INFO: 2020-09-16 16:02:00 INFO: clearing start 2020-09-16 16:02:00 INFO: clearing end 2020-09-16 16:02:00 INFO: 2020-09-16 16:02:00 INFO: 2020-09-16 16:02:00 INFO: 2020-09-16 16:02:00 INFO: 2020-09-16 17:00:20 INFO: 2020-09-16 17:00:20 INFO: 2020-09-16 17:00:20 INFO: 2020-09-16 17:00:20 INFO: 2020-09-16 17:00:20 INFO: init new order start 2020-09-16 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 16, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.75, 'high': 371.1, 'low': 366.45, 'close': 368.3, 'trades': 5417, 'volume': 3209308, 'vwap': 368.89, 'lastSize': 100, 'turnover': 118386916270, 'homeNotional': 35084.85860253059, 'foreignNotional': 12942361.300048178}, {'timestamp': datetime.datetime(2020, 9, 16, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.05, 'high': 369.8, 'low': 363.5, 'close': 367.75, 'trades': 7199, 'volume': 4651873, 'vwap': 366.73, 'lastSize': 1, 'turnover': 170595688215, 'homeNotional': 50766.66022581089, 'foreignNotional': 18617502.574460965}, {'timestamp': datetime.datetime(2020, 9, 16, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 361.95, 'high': 365.3, 'low': 361.85, 'close': 365.05, 'trades': 2682, 'volume': 1929093, 'vwap': 363.38, 'lastSize': 100, 'turnover': 70098856100, 'homeNotional': 20978.914370842496, 'foreignNotional': 7623287.79566164}] 2020-09-16 17:00:20 INFO: prepare candles [CandleItem(low=366.45, high=371.1, open=367.75, close=368.3, color='GREEN'), CandleItem(low=363.5, high=369.8, open=365.05, close=367.75, color='GREEN'), CandleItem(low=361.85, high=365.3, open=361.95, close=365.05, color='GREEN')] 2020-09-16 17:00:20 INFO: skip by colors first_candle=CandleItem(low=361.85, high=365.3, open=361.95, close=365.05, color='GREEN') second_candle=CandleItem(low=363.5, high=369.8, open=365.05, close=367.75, color='GREEN') last_candle=CandleItem(low=366.45, high=371.1, open=367.75, close=368.3, color='GREEN') 2020-09-16 17:00:20 INFO: check need new order None 2020-09-16 17:00:20 INFO: init new order end 2020-09-16 17:00:20 INFO: 2020-09-16 17:00:20 INFO: 2020-09-16 17:00:20 INFO: 2020-09-16 17:00:20 INFO: 2020-09-16 17:02:00 INFO: 2020-09-16 17:02:00 INFO: 2020-09-16 17:02:00 INFO: 2020-09-16 17:02:00 INFO: 2020-09-16 17:02:00 INFO: clearing start 2020-09-16 17:02:00 INFO: clearing end 2020-09-16 17:02:00 INFO: 2020-09-16 17:02:00 INFO: 2020-09-16 17:02:00 INFO: 2020-09-16 17:02:00 INFO: 2020-09-16 18:00:20 INFO: 2020-09-16 18:00:21 INFO: 2020-09-16 18:00:21 INFO: 2020-09-16 18:00:21 INFO: 2020-09-16 18:00:21 INFO: init new order start 2020-09-16 18:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 16, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.3, 'high': 369.25, 'low': 365.3, 'close': 367.0, 'trades': 3627, 'volume': 2406221, 'vwap': 367.2, 'lastSize': 1, 'turnover': 88355022515, 'homeNotional': 26244.43249431596, 'foreignNotional': 9636841.137841081}, {'timestamp': datetime.datetime(2020, 9, 16, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.75, 'high': 371.1, 'low': 366.45, 'close': 368.3, 'trades': 5417, 'volume': 3209308, 'vwap': 368.89, 'lastSize': 100, 'turnover': 118386916270, 'homeNotional': 35084.85860253059, 'foreignNotional': 12942361.300048178}, {'timestamp': datetime.datetime(2020, 9, 16, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.05, 'high': 369.8, 'low': 363.5, 'close': 367.75, 'trades': 7199, 'volume': 4651873, 'vwap': 366.73, 'lastSize': 1, 'turnover': 170595688215, 'homeNotional': 50766.66022581089, 'foreignNotional': 18617502.574460965}] 2020-09-16 18:00:21 INFO: prepare candles [CandleItem(low=365.3, high=369.25, open=368.3, close=367.0, color='RED'), CandleItem(low=366.45, high=371.1, open=367.75, close=368.3, color='GREEN'), CandleItem(low=363.5, high=369.8, open=365.05, close=367.75, color='GREEN')] 2020-09-16 18:00:21 INFO: last_candle=CandleItem(low=365.3, high=369.25, open=368.3, close=367.0, color='RED') 2020-09-16 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-09-16 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=365.3, high=369.25, open=368.3, close=367.0, color='RED') 2020-09-16 18:00:21 INFO: skip by CandleItem(low=365.3, high=369.25, open=368.3, close=367.0, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-16 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-09-16 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=365.3, high=369.25, open=368.3, close=367.0, color='RED') 2020-09-16 18:00:21 INFO: skip by CandleItem(low=365.3, high=369.25, open=368.3, close=367.0, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-16 18:00:21 INFO: not found applicable config for candle 2020-09-16 18:00:21 INFO: check need new order None 2020-09-16 18:00:21 INFO: init new order end 2020-09-16 18:00:21 INFO: 2020-09-16 18:00:21 INFO: 2020-09-16 18:00:21 INFO: 2020-09-16 18:00:21 INFO: 2020-09-16 18:02:00 INFO: 2020-09-16 18:02:00 INFO: 2020-09-16 18:02:00 INFO: 2020-09-16 18:02:00 INFO: 2020-09-16 18:02:00 INFO: clearing start 2020-09-16 18:02:00 INFO: clearing end 2020-09-16 18:02:00 INFO: 2020-09-16 18:02:00 INFO: 2020-09-16 18:02:00 INFO: 2020-09-16 18:02:00 INFO: 2020-09-16 19:00:20 INFO: 2020-09-16 19:00:20 INFO: 2020-09-16 19:00:20 INFO: 2020-09-16 19:00:20 INFO: 2020-09-16 19:00:20 INFO: init new order start 2020-09-16 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 16, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.0, 'high': 372.0, 'low': 366.8, 'close': 371.1, 'trades': 5435, 'volume': 4015374, 'vwap': 370.0, 'lastSize': 40, 'turnover': 148566380470, 'homeNotional': 44071.83904582784, 'foreignNotional': 16306432.107314404}, {'timestamp': datetime.datetime(2020, 9, 16, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.3, 'high': 369.25, 'low': 365.3, 'close': 367.0, 'trades': 3627, 'volume': 2406221, 'vwap': 367.2, 'lastSize': 1, 'turnover': 88355022515, 'homeNotional': 26244.43249431596, 'foreignNotional': 9636841.137841081}, {'timestamp': datetime.datetime(2020, 9, 16, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.75, 'high': 371.1, 'low': 366.45, 'close': 368.3, 'trades': 5417, 'volume': 3209308, 'vwap': 368.89, 'lastSize': 100, 'turnover': 118386916270, 'homeNotional': 35084.85860253059, 'foreignNotional': 12942361.300048178}] 2020-09-16 19:00:20 INFO: prepare candles [CandleItem(low=366.8, high=372.0, open=367.0, close=371.1, color='GREEN'), CandleItem(low=365.3, high=369.25, open=368.3, close=367.0, color='RED'), CandleItem(low=366.45, high=371.1, open=367.75, close=368.3, color='GREEN')] 2020-09-16 19:00:20 INFO: skip by colors first_candle=CandleItem(low=366.45, high=371.1, open=367.75, close=368.3, color='GREEN') second_candle=CandleItem(low=365.3, high=369.25, open=368.3, close=367.0, color='RED') last_candle=CandleItem(low=366.8, high=372.0, open=367.0, close=371.1, color='GREEN') 2020-09-16 19:00:20 INFO: check need new order None 2020-09-16 19:00:20 INFO: init new order end 2020-09-16 19:00:20 INFO: 2020-09-16 19:00:20 INFO: 2020-09-16 19:00:20 INFO: 2020-09-16 19:00:20 INFO: 2020-09-16 19:02:00 INFO: 2020-09-16 19:02:00 INFO: 2020-09-16 19:02:00 INFO: 2020-09-16 19:02:00 INFO: 2020-09-16 19:02:00 INFO: clearing start 2020-09-16 19:02:01 INFO: clearing end 2020-09-16 19:02:01 INFO: 2020-09-16 19:02:01 INFO: 2020-09-16 19:02:01 INFO: 2020-09-16 19:02:01 INFO: 2020-09-16 20:00:20 INFO: 2020-09-16 20:00:20 INFO: 2020-09-16 20:00:20 INFO: 2020-09-16 20:00:20 INFO: 2020-09-16 20:00:20 INFO: init new order start 2020-09-16 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 16, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 371.1, 'high': 374.3, 'low': 370.0, 'close': 370.65, 'trades': 5987, 'volume': 4311795, 'vwap': 371.8, 'lastSize': 70, 'turnover': 160310724005, 'homeNotional': 47614.384301231104, 'foreignNotional': 17702824.932828058}, {'timestamp': datetime.datetime(2020, 9, 16, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.0, 'high': 372.0, 'low': 366.8, 'close': 371.1, 'trades': 5435, 'volume': 4015374, 'vwap': 370.0, 'lastSize': 40, 'turnover': 148566380470, 'homeNotional': 44071.83904582784, 'foreignNotional': 16306432.107314404}, {'timestamp': datetime.datetime(2020, 9, 16, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.3, 'high': 369.25, 'low': 365.3, 'close': 367.0, 'trades': 3627, 'volume': 2406221, 'vwap': 367.2, 'lastSize': 1, 'turnover': 88355022515, 'homeNotional': 26244.43249431596, 'foreignNotional': 9636841.137841081}] 2020-09-16 20:00:20 INFO: prepare candles [CandleItem(low=370.0, high=374.3, open=371.1, close=370.65, color='RED'), CandleItem(low=366.8, high=372.0, open=367.0, close=371.1, color='GREEN'), CandleItem(low=365.3, high=369.25, open=368.3, close=367.0, color='RED')] 2020-09-16 20:00:20 INFO: skip by colors first_candle=CandleItem(low=365.3, high=369.25, open=368.3, close=367.0, color='RED') second_candle=CandleItem(low=366.8, high=372.0, open=367.0, close=371.1, color='GREEN') last_candle=CandleItem(low=370.0, high=374.3, open=371.1, close=370.65, color='RED') 2020-09-16 20:00:20 INFO: check need new order None 2020-09-16 20:00:20 INFO: init new order end 2020-09-16 20:00:20 INFO: 2020-09-16 20:00:20 INFO: 2020-09-16 20:00:20 INFO: 2020-09-16 20:00:20 INFO: 2020-09-16 20:02:00 INFO: 2020-09-16 20:02:00 INFO: 2020-09-16 20:02:00 INFO: 2020-09-16 20:02:00 INFO: 2020-09-16 20:02:00 INFO: clearing start 2020-09-16 20:02:00 INFO: clearing end 2020-09-16 20:02:00 INFO: 2020-09-16 20:02:00 INFO: 2020-09-16 20:02:00 INFO: 2020-09-16 20:02:00 INFO: 2020-09-16 21:00:20 INFO: 2020-09-16 21:00:20 INFO: 2020-09-16 21:00:20 INFO: 2020-09-16 21:00:20 INFO: 2020-09-16 21:00:20 INFO: init new order start 2020-09-16 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 16, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 370.65, 'high': 370.9, 'low': 367.8, 'close': 369.6, 'trades': 3283, 'volume': 2496671, 'vwap': 368.95, 'lastSize': 16, 'turnover': 92113155815, 'homeNotional': 27561.176428239884, 'foreignNotional': 10168553.663625814}, {'timestamp': datetime.datetime(2020, 9, 16, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 371.1, 'high': 374.3, 'low': 370.0, 'close': 370.65, 'trades': 5987, 'volume': 4311795, 'vwap': 371.8, 'lastSize': 70, 'turnover': 160310724005, 'homeNotional': 47614.384301231104, 'foreignNotional': 17702824.932828058}, {'timestamp': datetime.datetime(2020, 9, 16, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.0, 'high': 372.0, 'low': 366.8, 'close': 371.1, 'trades': 5435, 'volume': 4015374, 'vwap': 370.0, 'lastSize': 40, 'turnover': 148566380470, 'homeNotional': 44071.83904582784, 'foreignNotional': 16306432.107314404}] 2020-09-16 21:00:20 INFO: prepare candles [CandleItem(low=367.8, high=370.9, open=370.65, close=369.6, color='RED'), CandleItem(low=370.0, high=374.3, open=371.1, close=370.65, color='RED'), CandleItem(low=366.8, high=372.0, open=367.0, close=371.1, color='GREEN')] 2020-09-16 21:00:20 INFO: skip by colors first_candle=CandleItem(low=366.8, high=372.0, open=367.0, close=371.1, color='GREEN') second_candle=CandleItem(low=370.0, high=374.3, open=371.1, close=370.65, color='RED') last_candle=CandleItem(low=367.8, high=370.9, open=370.65, close=369.6, color='RED') 2020-09-16 21:00:20 INFO: check need new order None 2020-09-16 21:00:20 INFO: init new order end 2020-09-16 21:00:20 INFO: 2020-09-16 21:00:20 INFO: 2020-09-16 21:00:20 INFO: 2020-09-16 21:00:20 INFO: 2020-09-16 21:02:00 INFO: 2020-09-16 21:02:00 INFO: 2020-09-16 21:02:00 INFO: 2020-09-16 21:02:00 INFO: 2020-09-16 21:02:00 INFO: clearing start 2020-09-16 21:02:00 INFO: clearing end 2020-09-16 21:02:00 INFO: 2020-09-16 21:02:00 INFO: 2020-09-16 21:02:00 INFO: 2020-09-16 21:02:00 INFO: 2020-09-16 22:00:20 INFO: 2020-09-16 22:00:20 INFO: 2020-09-16 22:00:20 INFO: 2020-09-16 22:00:20 INFO: 2020-09-16 22:00:20 INFO: init new order start 2020-09-16 22:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 16, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 369.6, 'high': 370.8, 'low': 364.3, 'close': 366.8, 'trades': 6256, 'volume': 4355063, 'vwap': 367.4, 'lastSize': 1500, 'turnover': 160000976770, 'homeNotional': 48043.64974424773, 'foreignNotional': 17650997.837042265}, {'timestamp': datetime.datetime(2020, 9, 16, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 370.65, 'high': 370.9, 'low': 367.8, 'close': 369.6, 'trades': 3283, 'volume': 2496671, 'vwap': 368.95, 'lastSize': 16, 'turnover': 92113155815, 'homeNotional': 27561.176428239884, 'foreignNotional': 10168553.663625814}, {'timestamp': datetime.datetime(2020, 9, 16, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 371.1, 'high': 374.3, 'low': 370.0, 'close': 370.65, 'trades': 5987, 'volume': 4311795, 'vwap': 371.8, 'lastSize': 70, 'turnover': 160310724005, 'homeNotional': 47614.384301231104, 'foreignNotional': 17702824.932828058}] 2020-09-16 22:00:21 INFO: prepare candles [CandleItem(low=364.3, high=370.8, open=369.6, close=366.8, color='RED'), CandleItem(low=367.8, high=370.9, open=370.65, close=369.6, color='RED'), CandleItem(low=370.0, high=374.3, open=371.1, close=370.65, color='RED')] 2020-09-16 22:00:21 INFO: skip by colors first_candle=CandleItem(low=370.0, high=374.3, open=371.1, close=370.65, color='RED') second_candle=CandleItem(low=367.8, high=370.9, open=370.65, close=369.6, color='RED') last_candle=CandleItem(low=364.3, high=370.8, open=369.6, close=366.8, color='RED') 2020-09-16 22:00:21 INFO: check need new order None 2020-09-16 22:00:21 INFO: init new order end 2020-09-16 22:00:21 INFO: 2020-09-16 22:00:21 INFO: 2020-09-16 22:00:21 INFO: 2020-09-16 22:00:21 INFO: 2020-09-16 22:02:00 INFO: 2020-09-16 22:02:00 INFO: 2020-09-16 22:02:00 INFO: 2020-09-16 22:02:00 INFO: 2020-09-16 22:02:00 INFO: clearing start 2020-09-16 22:02:00 INFO: clearing end 2020-09-16 22:02:00 INFO: 2020-09-16 22:02:00 INFO: 2020-09-16 22:02:00 INFO: 2020-09-16 22:02:00 INFO: 2020-09-16 23:00:20 INFO: 2020-09-16 23:00:20 INFO: 2020-09-16 23:00:20 INFO: 2020-09-16 23:00:20 INFO: 2020-09-16 23:00:20 INFO: init new order start 2020-09-16 23:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 16, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 366.8, 'high': 367.7, 'low': 365.2, 'close': 365.6, 'trades': 2668, 'volume': 1431076, 'vwap': 366.53, 'lastSize': 113, 'turnover': 52452841045, 'homeNotional': 15738.325762142154, 'foreignNotional': 5768530.408630744}, {'timestamp': datetime.datetime(2020, 9, 16, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 369.6, 'high': 370.8, 'low': 364.3, 'close': 366.8, 'trades': 6256, 'volume': 4355063, 'vwap': 367.4, 'lastSize': 1500, 'turnover': 160000976770, 'homeNotional': 48043.64974424773, 'foreignNotional': 17650997.837042265}, {'timestamp': datetime.datetime(2020, 9, 16, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 370.65, 'high': 370.9, 'low': 367.8, 'close': 369.6, 'trades': 3283, 'volume': 2496671, 'vwap': 368.95, 'lastSize': 16, 'turnover': 92113155815, 'homeNotional': 27561.176428239884, 'foreignNotional': 10168553.663625814}] 2020-09-16 23:00:20 INFO: prepare candles [CandleItem(low=365.2, high=367.7, open=366.8, close=365.6, color='RED'), CandleItem(low=364.3, high=370.8, open=369.6, close=366.8, color='RED'), CandleItem(low=367.8, high=370.9, open=370.65, close=369.6, color='RED')] 2020-09-16 23:00:20 INFO: skip by colors first_candle=CandleItem(low=367.8, high=370.9, open=370.65, close=369.6, color='RED') second_candle=CandleItem(low=364.3, high=370.8, open=369.6, close=366.8, color='RED') last_candle=CandleItem(low=365.2, high=367.7, open=366.8, close=365.6, color='RED') 2020-09-16 23:00:20 INFO: check need new order None 2020-09-16 23:00:20 INFO: init new order end 2020-09-16 23:00:20 INFO: 2020-09-16 23:00:20 INFO: 2020-09-16 23:00:20 INFO: 2020-09-16 23:00:20 INFO: 2020-09-16 23:02:00 INFO: 2020-09-16 23:02:00 INFO: 2020-09-16 23:02:00 INFO: 2020-09-16 23:02:00 INFO: 2020-09-16 23:02:00 INFO: clearing start 2020-09-16 23:02:00 INFO: clearing end 2020-09-16 23:02:00 INFO: 2020-09-16 23:02:00 INFO: 2020-09-16 23:02:00 INFO: 2020-09-16 23:02:00 INFO: 2020-09-17 00:00:20 INFO: 2020-09-17 00:00:20 INFO: 2020-09-17 00:00:20 INFO: 2020-09-17 00:00:20 INFO: 2020-09-17 00:00:20 INFO: init new order start 2020-09-17 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 16, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.6, 'high': 367.5, 'low': 364.3, 'close': 366.15, 'trades': 2780, 'volume': 1463442, 'vwap': 366.01, 'lastSize': 100, 'turnover': 53562939190, 'homeNotional': 16101.880804775537, 'foreignNotional': 5893410.843671308}, {'timestamp': datetime.datetime(2020, 9, 16, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 366.8, 'high': 367.7, 'low': 365.2, 'close': 365.6, 'trades': 2668, 'volume': 1431076, 'vwap': 366.53, 'lastSize': 113, 'turnover': 52452841045, 'homeNotional': 15738.325762142154, 'foreignNotional': 5768530.408630744}, {'timestamp': datetime.datetime(2020, 9, 16, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 369.6, 'high': 370.8, 'low': 364.3, 'close': 366.8, 'trades': 6256, 'volume': 4355063, 'vwap': 367.4, 'lastSize': 1500, 'turnover': 160000976770, 'homeNotional': 48043.64974424773, 'foreignNotional': 17650997.837042265}] 2020-09-17 00:00:20 INFO: prepare candles [CandleItem(low=364.3, high=367.5, open=365.6, close=366.15, color='GREEN'), CandleItem(low=365.2, high=367.7, open=366.8, close=365.6, color='RED'), CandleItem(low=364.3, high=370.8, open=369.6, close=366.8, color='RED')] 2020-09-17 00:00:20 INFO: last_candle=CandleItem(low=364.3, high=367.5, open=365.6, close=366.15, color='GREEN') 2020-09-17 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-09-17 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=364.3, high=367.5, open=365.6, close=366.15, color='GREEN') 2020-09-17 00:00:20 INFO: skip by CandleItem(low=364.3, high=367.5, open=365.6, close=366.15, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-17 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-09-17 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=364.3, high=367.5, open=365.6, close=366.15, color='GREEN') 2020-09-17 00:00:20 INFO: skip by CandleItem(low=364.3, high=367.5, open=365.6, close=366.15, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-17 00:00:20 INFO: not found applicable config for candle 2020-09-17 00:00:20 INFO: check need new order None 2020-09-17 00:00:20 INFO: init new order end 2020-09-17 00:00:20 INFO: 2020-09-17 00:00:20 INFO: 2020-09-17 00:00:20 INFO: 2020-09-17 00:00:20 INFO: 2020-09-17 00:02:00 INFO: 2020-09-17 00:02:00 INFO: 2020-09-17 00:02:00 INFO: 2020-09-17 00:02:00 INFO: 2020-09-17 00:02:00 INFO: clearing start 2020-09-17 00:02:01 INFO: clearing end 2020-09-17 00:02:01 INFO: 2020-09-17 00:02:01 INFO: 2020-09-17 00:02:01 INFO: 2020-09-17 00:02:01 INFO: 2020-09-17 01:00:20 INFO: 2020-09-17 01:00:20 INFO: 2020-09-17 01:00:20 INFO: 2020-09-17 01:00:20 INFO: 2020-09-17 01:00:20 INFO: init new order start 2020-09-17 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 16, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 366.15, 'high': 367.55, 'low': 365.15, 'close': 367.5, 'trades': 1734, 'volume': 492790, 'vwap': 366.45, 'lastSize': 25, 'turnover': 18057865670, 'homeNotional': 5419.762319202226, 'foreignNotional': 1986028.9921080975}, {'timestamp': datetime.datetime(2020, 9, 16, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.6, 'high': 367.5, 'low': 364.3, 'close': 366.15, 'trades': 2780, 'volume': 1463442, 'vwap': 366.01, 'lastSize': 100, 'turnover': 53562939190, 'homeNotional': 16101.880804775537, 'foreignNotional': 5893410.843671308}, {'timestamp': datetime.datetime(2020, 9, 16, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 366.8, 'high': 367.7, 'low': 365.2, 'close': 365.6, 'trades': 2668, 'volume': 1431076, 'vwap': 366.53, 'lastSize': 113, 'turnover': 52452841045, 'homeNotional': 15738.325762142154, 'foreignNotional': 5768530.408630744}] 2020-09-17 01:00:20 INFO: prepare candles [CandleItem(low=365.15, high=367.55, open=366.15, close=367.5, color='GREEN'), CandleItem(low=364.3, high=367.5, open=365.6, close=366.15, color='GREEN'), CandleItem(low=365.2, high=367.7, open=366.8, close=365.6, color='RED')] 2020-09-17 01:00:20 INFO: skip by colors first_candle=CandleItem(low=365.2, high=367.7, open=366.8, close=365.6, color='RED') second_candle=CandleItem(low=364.3, high=367.5, open=365.6, close=366.15, color='GREEN') last_candle=CandleItem(low=365.15, high=367.55, open=366.15, close=367.5, color='GREEN') 2020-09-17 01:00:20 INFO: check need new order None 2020-09-17 01:00:20 INFO: init new order end 2020-09-17 01:00:20 INFO: 2020-09-17 01:00:20 INFO: 2020-09-17 01:00:20 INFO: 2020-09-17 01:00:20 INFO: 2020-09-17 01:02:00 INFO: 2020-09-17 01:02:00 INFO: 2020-09-17 01:02:00 INFO: 2020-09-17 01:02:00 INFO: 2020-09-17 01:02:00 INFO: clearing start 2020-09-17 01:02:00 INFO: clearing end 2020-09-17 01:02:00 INFO: 2020-09-17 01:02:00 INFO: 2020-09-17 01:02:00 INFO: 2020-09-17 01:02:00 INFO: 2020-09-17 02:00:20 INFO: 2020-09-17 02:00:20 INFO: 2020-09-17 02:00:20 INFO: 2020-09-17 02:00:20 INFO: 2020-09-17 02:00:20 INFO: init new order start 2020-09-17 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 16, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.5, 'high': 369.05, 'low': 365.45, 'close': 368.65, 'trades': 3439, 'volume': 1627994, 'vwap': 367.24, 'lastSize': 229, 'turnover': 59785554775, 'homeNotional': 17940.634093631317, 'foreignNotional': 6588428.837444724}, {'timestamp': datetime.datetime(2020, 9, 16, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 366.15, 'high': 367.55, 'low': 365.15, 'close': 367.5, 'trades': 1734, 'volume': 492790, 'vwap': 366.45, 'lastSize': 25, 'turnover': 18057865670, 'homeNotional': 5419.762319202226, 'foreignNotional': 1986028.9921080975}, {'timestamp': datetime.datetime(2020, 9, 16, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.6, 'high': 367.5, 'low': 364.3, 'close': 366.15, 'trades': 2780, 'volume': 1463442, 'vwap': 366.01, 'lastSize': 100, 'turnover': 53562939190, 'homeNotional': 16101.880804775537, 'foreignNotional': 5893410.843671308}] 2020-09-17 02:00:20 INFO: prepare candles [CandleItem(low=365.45, high=369.05, open=367.5, close=368.65, color='GREEN'), CandleItem(low=365.15, high=367.55, open=366.15, close=367.5, color='GREEN'), CandleItem(low=364.3, high=367.5, open=365.6, close=366.15, color='GREEN')] 2020-09-17 02:00:20 INFO: skip by colors first_candle=CandleItem(low=364.3, high=367.5, open=365.6, close=366.15, color='GREEN') second_candle=CandleItem(low=365.15, high=367.55, open=366.15, close=367.5, color='GREEN') last_candle=CandleItem(low=365.45, high=369.05, open=367.5, close=368.65, color='GREEN') 2020-09-17 02:00:20 INFO: check need new order None 2020-09-17 02:00:20 INFO: init new order end 2020-09-17 02:00:20 INFO: 2020-09-17 02:00:20 INFO: 2020-09-17 02:00:20 INFO: 2020-09-17 02:00:20 INFO: 2020-09-17 02:02:00 INFO: 2020-09-17 02:02:00 INFO: 2020-09-17 02:02:00 INFO: 2020-09-17 02:02:00 INFO: 2020-09-17 02:02:00 INFO: clearing start 2020-09-17 02:02:00 INFO: clearing end 2020-09-17 02:02:00 INFO: 2020-09-17 02:02:00 INFO: 2020-09-17 02:02:00 INFO: 2020-09-17 02:02:00 INFO: 2020-09-17 03:00:20 INFO: 2020-09-17 03:00:20 INFO: 2020-09-17 03:00:20 INFO: 2020-09-17 03:00:20 INFO: 2020-09-17 03:00:20 INFO: init new order start 2020-09-17 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 17, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.65, 'high': 369.1, 'low': 364.25, 'close': 365.25, 'trades': 3066, 'volume': 1507983, 'vwap': 365.76, 'lastSize': 11, 'turnover': 55154800875, 'homeNotional': 16548.905006772962, 'foreignNotional': 6052843.591655052}, {'timestamp': datetime.datetime(2020, 9, 16, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.5, 'high': 369.05, 'low': 365.45, 'close': 368.65, 'trades': 3439, 'volume': 1627994, 'vwap': 367.24, 'lastSize': 229, 'turnover': 59785554775, 'homeNotional': 17940.634093631317, 'foreignNotional': 6588428.837444724}, {'timestamp': datetime.datetime(2020, 9, 16, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 366.15, 'high': 367.55, 'low': 365.15, 'close': 367.5, 'trades': 1734, 'volume': 492790, 'vwap': 366.45, 'lastSize': 25, 'turnover': 18057865670, 'homeNotional': 5419.762319202226, 'foreignNotional': 1986028.9921080975}] 2020-09-17 03:00:20 INFO: prepare candles [CandleItem(low=364.25, high=369.1, open=368.65, close=365.25, color='RED'), CandleItem(low=365.45, high=369.05, open=367.5, close=368.65, color='GREEN'), CandleItem(low=365.15, high=367.55, open=366.15, close=367.5, color='GREEN')] 2020-09-17 03:00:20 INFO: last_candle=CandleItem(low=364.25, high=369.1, open=368.65, close=365.25, color='RED') 2020-09-17 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-09-17 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=364.25, high=369.1, open=368.65, close=365.25, color='RED') 2020-09-17 03:00:20 INFO: skip by CandleItem(low=364.25, high=369.1, open=368.65, close=365.25, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-17 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-09-17 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=364.25, high=369.1, open=368.65, close=365.25, color='RED') 2020-09-17 03:00:20 INFO: skip by CandleItem(low=364.25, high=369.1, open=368.65, close=365.25, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-17 03:00:20 INFO: not found applicable config for candle 2020-09-17 03:00:20 INFO: check need new order None 2020-09-17 03:00:20 INFO: init new order end 2020-09-17 03:00:20 INFO: 2020-09-17 03:00:20 INFO: 2020-09-17 03:00:20 INFO: 2020-09-17 03:00:20 INFO: 2020-09-17 03:02:00 INFO: 2020-09-17 03:02:00 INFO: 2020-09-17 03:02:00 INFO: 2020-09-17 03:02:00 INFO: 2020-09-17 03:02:00 INFO: clearing start 2020-09-17 03:02:00 INFO: clearing end 2020-09-17 03:02:00 INFO: 2020-09-17 03:02:00 INFO: 2020-09-17 03:02:00 INFO: 2020-09-17 03:02:00 INFO: 2020-09-17 04:00:20 INFO: 2020-09-17 04:00:20 INFO: 2020-09-17 04:00:20 INFO: 2020-09-17 04:00:20 INFO: 2020-09-17 04:00:20 INFO: init new order start 2020-09-17 04:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 17, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.25, 'high': 383.7, 'low': 363.05, 'close': 379.05, 'trades': 13960, 'volume': 12007882, 'vwap': 374.44, 'lastSize': 27, 'turnover': 449616066080, 'homeNotional': 132130.05736811436, 'foreignNotional': 49476424.315760456}, {'timestamp': datetime.datetime(2020, 9, 17, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.65, 'high': 369.1, 'low': 364.25, 'close': 365.25, 'trades': 3066, 'volume': 1507983, 'vwap': 365.76, 'lastSize': 11, 'turnover': 55154800875, 'homeNotional': 16548.905006772962, 'foreignNotional': 6052843.591655052}, {'timestamp': datetime.datetime(2020, 9, 16, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.5, 'high': 369.05, 'low': 365.45, 'close': 368.65, 'trades': 3439, 'volume': 1627994, 'vwap': 367.24, 'lastSize': 229, 'turnover': 59785554775, 'homeNotional': 17940.634093631317, 'foreignNotional': 6588428.837444724}] 2020-09-17 04:00:20 INFO: prepare candles [CandleItem(low=363.05, high=383.7, open=365.25, close=379.05, color='GREEN'), CandleItem(low=364.25, high=369.1, open=368.65, close=365.25, color='RED'), CandleItem(low=365.45, high=369.05, open=367.5, close=368.65, color='GREEN')] 2020-09-17 04:00:20 INFO: skip by colors first_candle=CandleItem(low=365.45, high=369.05, open=367.5, close=368.65, color='GREEN') second_candle=CandleItem(low=364.25, high=369.1, open=368.65, close=365.25, color='RED') last_candle=CandleItem(low=363.05, high=383.7, open=365.25, close=379.05, color='GREEN') 2020-09-17 04:00:20 INFO: check need new order None 2020-09-17 04:00:20 INFO: init new order end 2020-09-17 04:00:20 INFO: 2020-09-17 04:00:20 INFO: 2020-09-17 04:00:20 INFO: 2020-09-17 04:00:20 INFO: 2020-09-17 04:02:00 INFO: 2020-09-17 04:02:00 INFO: 2020-09-17 04:02:00 INFO: 2020-09-17 04:02:00 INFO: 2020-09-17 04:02:00 INFO: clearing start 2020-09-17 04:02:00 INFO: clearing end 2020-09-17 04:02:00 INFO: 2020-09-17 04:02:00 INFO: 2020-09-17 04:02:00 INFO: 2020-09-17 04:02:00 INFO: 2020-09-17 05:00:20 INFO: 2020-09-17 05:00:20 INFO: 2020-09-17 05:00:20 INFO: 2020-09-17 05:00:20 INFO: 2020-09-17 05:00:20 INFO: init new order start 2020-09-17 05:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 17, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.05, 'high': 385.5, 'low': 379.1, 'close': 380.15, 'trades': 10649, 'volume': 8685493, 'vwap': 381.87, 'lastSize': 1, 'turnover': 331665265285, 'homeNotional': 95619.41882412272, 'foreignNotional': 36513495.17984521}, {'timestamp': datetime.datetime(2020, 9, 17, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.25, 'high': 383.7, 'low': 363.05, 'close': 379.05, 'trades': 13960, 'volume': 12007882, 'vwap': 374.44, 'lastSize': 27, 'turnover': 449616066080, 'homeNotional': 132130.05736811436, 'foreignNotional': 49476424.315760456}, {'timestamp': datetime.datetime(2020, 9, 17, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 368.65, 'high': 369.1, 'low': 364.25, 'close': 365.25, 'trades': 3066, 'volume': 1507983, 'vwap': 365.76, 'lastSize': 11, 'turnover': 55154800875, 'homeNotional': 16548.905006772962, 'foreignNotional': 6052843.591655052}] 2020-09-17 05:00:20 INFO: prepare candles [CandleItem(low=379.1, high=385.5, open=379.05, close=380.15, color='GREEN'), CandleItem(low=363.05, high=383.7, open=365.25, close=379.05, color='GREEN'), CandleItem(low=364.25, high=369.1, open=368.65, close=365.25, color='RED')] 2020-09-17 05:00:20 INFO: skip by colors first_candle=CandleItem(low=364.25, high=369.1, open=368.65, close=365.25, color='RED') second_candle=CandleItem(low=363.05, high=383.7, open=365.25, close=379.05, color='GREEN') last_candle=CandleItem(low=379.1, high=385.5, open=379.05, close=380.15, color='GREEN') 2020-09-17 05:00:20 INFO: check need new order None 2020-09-17 05:00:20 INFO: init new order end 2020-09-17 05:00:20 INFO: 2020-09-17 05:00:20 INFO: 2020-09-17 05:00:20 INFO: 2020-09-17 05:00:20 INFO: 2020-09-17 05:02:00 INFO: 2020-09-17 05:02:00 INFO: 2020-09-17 05:02:00 INFO: 2020-09-17 05:02:00 INFO: 2020-09-17 05:02:00 INFO: clearing start 2020-09-17 05:02:00 INFO: clearing end 2020-09-17 05:02:00 INFO: 2020-09-17 05:02:00 INFO: 2020-09-17 05:02:00 INFO: 2020-09-17 05:02:00 INFO: 2020-09-17 06:00:20 INFO: 2020-09-17 06:00:20 INFO: 2020-09-17 06:00:20 INFO: 2020-09-17 06:00:20 INFO: 2020-09-17 06:00:20 INFO: init new order start 2020-09-17 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 17, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 380.15, 'high': 382.95, 'low': 376.5, 'close': 380.25, 'trades': 6968, 'volume': 5764556, 'vwap': 379.62, 'lastSize': 1, 'turnover': 218833580610, 'homeNotional': 63039.980910535574, 'foreignNotional': 23931239.80164917}, {'timestamp': datetime.datetime(2020, 9, 17, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.05, 'high': 385.5, 'low': 379.1, 'close': 380.15, 'trades': 10649, 'volume': 8685493, 'vwap': 381.87, 'lastSize': 1, 'turnover': 331665265285, 'homeNotional': 95619.41882412272, 'foreignNotional': 36513495.17984521}, {'timestamp': datetime.datetime(2020, 9, 17, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 365.25, 'high': 383.7, 'low': 363.05, 'close': 379.05, 'trades': 13960, 'volume': 12007882, 'vwap': 374.44, 'lastSize': 27, 'turnover': 449616066080, 'homeNotional': 132130.05736811436, 'foreignNotional': 49476424.315760456}] 2020-09-17 06:00:20 INFO: prepare candles [CandleItem(low=376.5, high=382.95, open=380.15, close=380.25, color='GREEN'), CandleItem(low=379.1, high=385.5, open=379.05, close=380.15, color='GREEN'), CandleItem(low=363.05, high=383.7, open=365.25, close=379.05, color='GREEN')] 2020-09-17 06:00:20 INFO: skip by colors first_candle=CandleItem(low=363.05, high=383.7, open=365.25, close=379.05, color='GREEN') second_candle=CandleItem(low=379.1, high=385.5, open=379.05, close=380.15, color='GREEN') last_candle=CandleItem(low=376.5, high=382.95, open=380.15, close=380.25, color='GREEN') 2020-09-17 06:00:20 INFO: check need new order None 2020-09-17 06:00:20 INFO: init new order end 2020-09-17 06:00:20 INFO: 2020-09-17 06:00:20 INFO: 2020-09-17 06:00:20 INFO: 2020-09-17 06:00:20 INFO: 2020-09-17 06:02:00 INFO: 2020-09-17 06:02:00 INFO: 2020-09-17 06:02:00 INFO: 2020-09-17 06:02:00 INFO: 2020-09-17 06:02:00 INFO: clearing start 2020-09-17 06:02:00 INFO: clearing end 2020-09-17 06:02:00 INFO: 2020-09-17 06:02:00 INFO: 2020-09-17 06:02:00 INFO: 2020-09-17 06:02:00 INFO: 2020-09-17 07:00:20 INFO: 2020-09-17 07:00:20 INFO: 2020-09-17 07:00:20 INFO: 2020-09-17 07:00:20 INFO: 2020-09-17 07:00:20 INFO: init new order start 2020-09-17 07:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 17, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 380.25, 'high': 381.95, 'low': 376.45, 'close': 377.0, 'trades': 4915, 'volume': 3813245, 'vwap': 378.71, 'lastSize': 2251, 'turnover': 144408295410, 'homeNotional': 41573.94287094389, 'foreignNotional': 15744190.321622808}, {'timestamp': datetime.datetime(2020, 9, 17, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 380.15, 'high': 382.95, 'low': 376.5, 'close': 380.25, 'trades': 6968, 'volume': 5764556, 'vwap': 379.62, 'lastSize': 1, 'turnover': 218833580610, 'homeNotional': 63039.980910535574, 'foreignNotional': 23931239.80164917}, {'timestamp': datetime.datetime(2020, 9, 17, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.05, 'high': 385.5, 'low': 379.1, 'close': 380.15, 'trades': 10649, 'volume': 8685493, 'vwap': 381.87, 'lastSize': 1, 'turnover': 331665265285, 'homeNotional': 95619.41882412272, 'foreignNotional': 36513495.17984521}] 2020-09-17 07:00:20 INFO: prepare candles [CandleItem(low=376.45, high=381.95, open=380.25, close=377.0, color='RED'), CandleItem(low=376.5, high=382.95, open=380.15, close=380.25, color='GREEN'), CandleItem(low=379.1, high=385.5, open=379.05, close=380.15, color='GREEN')] 2020-09-17 07:00:20 INFO: last_candle=CandleItem(low=376.45, high=381.95, open=380.25, close=377.0, color='RED') 2020-09-17 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-09-17 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=376.45, high=381.95, open=380.25, close=377.0, color='RED') 2020-09-17 07:00:20 INFO: skip by CandleItem(low=376.45, high=381.95, open=380.25, close=377.0, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-17 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-09-17 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=376.45, high=381.95, open=380.25, close=377.0, color='RED') 2020-09-17 07:00:20 INFO: skip by CandleItem(low=376.45, high=381.95, open=380.25, close=377.0, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-17 07:00:20 INFO: not found applicable config for candle 2020-09-17 07:00:20 INFO: check need new order None 2020-09-17 07:00:20 INFO: init new order end 2020-09-17 07:00:20 INFO: 2020-09-17 07:00:20 INFO: 2020-09-17 07:00:20 INFO: 2020-09-17 07:00:20 INFO: 2020-09-17 07:02:00 INFO: 2020-09-17 07:02:00 INFO: 2020-09-17 07:02:00 INFO: 2020-09-17 07:02:00 INFO: 2020-09-17 07:02:00 INFO: clearing start 2020-09-17 07:02:00 INFO: clearing end 2020-09-17 07:02:00 INFO: 2020-09-17 07:02:00 INFO: 2020-09-17 07:02:00 INFO: 2020-09-17 07:02:00 INFO: 2020-09-17 08:00:20 INFO: 2020-09-17 08:00:20 INFO: 2020-09-17 08:00:20 INFO: 2020-09-17 08:00:20 INFO: 2020-09-17 08:00:20 INFO: init new order start 2020-09-17 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 17, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 377.0, 'high': 380.0, 'low': 376.65, 'close': 379.25, 'trades': 3911, 'volume': 2134609, 'vwap': 378.35, 'lastSize': 9, 'turnover': 80761266325, 'homeNotional': 23247.86934478796, 'foreignNotional': 8795662.587070534}, {'timestamp': datetime.datetime(2020, 9, 17, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 380.25, 'high': 381.95, 'low': 376.45, 'close': 377.0, 'trades': 4915, 'volume': 3813245, 'vwap': 378.71, 'lastSize': 2251, 'turnover': 144408295410, 'homeNotional': 41573.94287094389, 'foreignNotional': 15744190.321622808}, {'timestamp': datetime.datetime(2020, 9, 17, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 380.15, 'high': 382.95, 'low': 376.5, 'close': 380.25, 'trades': 6968, 'volume': 5764556, 'vwap': 379.62, 'lastSize': 1, 'turnover': 218833580610, 'homeNotional': 63039.980910535574, 'foreignNotional': 23931239.80164917}] 2020-09-17 08:00:20 INFO: prepare candles [CandleItem(low=376.65, high=380.0, open=377.0, close=379.25, color='GREEN'), CandleItem(low=376.45, high=381.95, open=380.25, close=377.0, color='RED'), CandleItem(low=376.5, high=382.95, open=380.15, close=380.25, color='GREEN')] 2020-09-17 08:00:20 INFO: skip by colors first_candle=CandleItem(low=376.5, high=382.95, open=380.15, close=380.25, color='GREEN') second_candle=CandleItem(low=376.45, high=381.95, open=380.25, close=377.0, color='RED') last_candle=CandleItem(low=376.65, high=380.0, open=377.0, close=379.25, color='GREEN') 2020-09-17 08:00:20 INFO: check need new order None 2020-09-17 08:00:20 INFO: init new order end 2020-09-17 08:00:20 INFO: 2020-09-17 08:00:20 INFO: 2020-09-17 08:00:20 INFO: 2020-09-17 08:00:20 INFO: 2020-09-17 08:02:00 INFO: 2020-09-17 08:02:01 INFO: 2020-09-17 08:02:01 INFO: 2020-09-17 08:02:01 INFO: 2020-09-17 08:02:01 INFO: clearing start 2020-09-17 08:02:01 INFO: clearing end 2020-09-17 08:02:01 INFO: 2020-09-17 08:02:01 INFO: 2020-09-17 08:02:01 INFO: 2020-09-17 08:02:01 INFO: 2020-09-17 09:00:20 INFO: 2020-09-17 09:00:20 INFO: 2020-09-17 09:00:20 INFO: 2020-09-17 09:00:20 INFO: 2020-09-17 09:00:20 INFO: init new order start 2020-09-17 09:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 17, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.25, 'high': 382.1, 'low': 378.5, 'close': 380.4, 'trades': 4204, 'volume': 3365542, 'vwap': 380.67, 'lastSize': 58, 'turnover': 128114901685, 'homeNotional': 36748.39099601054, 'foreignNotional': 13988902.009418553}, {'timestamp': datetime.datetime(2020, 9, 17, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 377.0, 'high': 380.0, 'low': 376.65, 'close': 379.25, 'trades': 3911, 'volume': 2134609, 'vwap': 378.35, 'lastSize': 9, 'turnover': 80761266325, 'homeNotional': 23247.86934478796, 'foreignNotional': 8795662.587070534}, {'timestamp': datetime.datetime(2020, 9, 17, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 380.25, 'high': 381.95, 'low': 376.45, 'close': 377.0, 'trades': 4915, 'volume': 3813245, 'vwap': 378.71, 'lastSize': 2251, 'turnover': 144408295410, 'homeNotional': 41573.94287094389, 'foreignNotional': 15744190.321622808}] 2020-09-17 09:00:20 INFO: prepare candles [CandleItem(low=378.5, high=382.1, open=379.25, close=380.4, color='GREEN'), CandleItem(low=376.65, high=380.0, open=377.0, close=379.25, color='GREEN'), CandleItem(low=376.45, high=381.95, open=380.25, close=377.0, color='RED')] 2020-09-17 09:00:20 INFO: skip by colors first_candle=CandleItem(low=376.45, high=381.95, open=380.25, close=377.0, color='RED') second_candle=CandleItem(low=376.65, high=380.0, open=377.0, close=379.25, color='GREEN') last_candle=CandleItem(low=378.5, high=382.1, open=379.25, close=380.4, color='GREEN') 2020-09-17 09:00:20 INFO: check need new order None 2020-09-17 09:00:20 INFO: init new order end 2020-09-17 09:00:20 INFO: 2020-09-17 09:00:20 INFO: 2020-09-17 09:00:20 INFO: 2020-09-17 09:00:20 INFO: 2020-09-17 09:02:00 INFO: 2020-09-17 09:02:00 INFO: 2020-09-17 09:02:00 INFO: 2020-09-17 09:02:00 INFO: 2020-09-17 09:02:00 INFO: clearing start 2020-09-17 09:02:00 INFO: clearing end 2020-09-17 09:02:00 INFO: 2020-09-17 09:02:00 INFO: 2020-09-17 09:02:00 INFO: 2020-09-17 09:02:00 INFO: 2020-09-17 10:00:20 INFO: 2020-09-17 10:00:20 INFO: 2020-09-17 10:00:20 INFO: 2020-09-17 10:00:20 INFO: 2020-09-17 10:00:20 INFO: init new order start 2020-09-17 10:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 17, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 380.4, 'high': 381.55, 'low': 378.25, 'close': 379.5, 'trades': 4252, 'volume': 2400485, 'vwap': 379.47, 'lastSize': 25, 'turnover': 91090189695, 'homeNotional': 26125.809418409084, 'foreignNotional': 9913888.643545607}, {'timestamp': datetime.datetime(2020, 9, 17, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.25, 'high': 382.1, 'low': 378.5, 'close': 380.4, 'trades': 4204, 'volume': 3365542, 'vwap': 380.67, 'lastSize': 58, 'turnover': 128114901685, 'homeNotional': 36748.39099601054, 'foreignNotional': 13988902.009418553}, {'timestamp': datetime.datetime(2020, 9, 17, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 377.0, 'high': 380.0, 'low': 376.65, 'close': 379.25, 'trades': 3911, 'volume': 2134609, 'vwap': 378.35, 'lastSize': 9, 'turnover': 80761266325, 'homeNotional': 23247.86934478796, 'foreignNotional': 8795662.587070534}] 2020-09-17 10:00:20 INFO: prepare candles [CandleItem(low=378.25, high=381.55, open=380.4, close=379.5, color='RED'), CandleItem(low=378.5, high=382.1, open=379.25, close=380.4, color='GREEN'), CandleItem(low=376.65, high=380.0, open=377.0, close=379.25, color='GREEN')] 2020-09-17 10:00:20 INFO: last_candle=CandleItem(low=378.25, high=381.55, open=380.4, close=379.5, color='RED') 2020-09-17 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-09-17 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=378.25, high=381.55, open=380.4, close=379.5, color='RED') 2020-09-17 10:00:20 INFO: skip by CandleItem(low=378.25, high=381.55, open=380.4, close=379.5, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-17 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-09-17 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=378.25, high=381.55, open=380.4, close=379.5, color='RED') 2020-09-17 10:00:20 INFO: skip by CandleItem(low=378.25, high=381.55, open=380.4, close=379.5, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-17 10:00:20 INFO: not found applicable config for candle 2020-09-17 10:00:20 INFO: check need new order None 2020-09-17 10:00:20 INFO: init new order end 2020-09-17 10:00:20 INFO: 2020-09-17 10:00:20 INFO: 2020-09-17 10:00:20 INFO: 2020-09-17 10:00:20 INFO: 2020-09-17 10:02:00 INFO: 2020-09-17 10:02:00 INFO: 2020-09-17 10:02:00 INFO: 2020-09-17 10:02:00 INFO: 2020-09-17 10:02:00 INFO: clearing start 2020-09-17 10:02:00 INFO: clearing end 2020-09-17 10:02:00 INFO: 2020-09-17 10:02:00 INFO: 2020-09-17 10:02:00 INFO: 2020-09-17 10:02:00 INFO: 2020-09-17 11:00:20 INFO: 2020-09-17 11:00:20 INFO: 2020-09-17 11:00:20 INFO: 2020-09-17 11:00:20 INFO: 2020-09-17 11:00:20 INFO: init new order start 2020-09-17 11:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 17, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.5, 'high': 382.85, 'low': 379.25, 'close': 380.45, 'trades': 4345, 'volume': 3286622, 'vwap': 380.93, 'lastSize': 295, 'turnover': 125194968335, 'homeNotional': 35744.209773246315, 'foreignNotional': 13615815.04783643}, {'timestamp': datetime.datetime(2020, 9, 17, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 380.4, 'high': 381.55, 'low': 378.25, 'close': 379.5, 'trades': 4252, 'volume': 2400485, 'vwap': 379.47, 'lastSize': 25, 'turnover': 91090189695, 'homeNotional': 26125.809418409084, 'foreignNotional': 9913888.643545607}, {'timestamp': datetime.datetime(2020, 9, 17, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.25, 'high': 382.1, 'low': 378.5, 'close': 380.4, 'trades': 4204, 'volume': 3365542, 'vwap': 380.67, 'lastSize': 58, 'turnover': 128114901685, 'homeNotional': 36748.39099601054, 'foreignNotional': 13988902.009418553}] 2020-09-17 11:00:21 INFO: prepare candles [CandleItem(low=379.25, high=382.85, open=379.5, close=380.45, color='GREEN'), CandleItem(low=378.25, high=381.55, open=380.4, close=379.5, color='RED'), CandleItem(low=378.5, high=382.1, open=379.25, close=380.4, color='GREEN')] 2020-09-17 11:00:21 INFO: skip by colors first_candle=CandleItem(low=378.5, high=382.1, open=379.25, close=380.4, color='GREEN') second_candle=CandleItem(low=378.25, high=381.55, open=380.4, close=379.5, color='RED') last_candle=CandleItem(low=379.25, high=382.85, open=379.5, close=380.45, color='GREEN') 2020-09-17 11:00:21 INFO: check need new order None 2020-09-17 11:00:21 INFO: init new order end 2020-09-17 11:00:21 INFO: 2020-09-17 11:00:21 INFO: 2020-09-17 11:00:21 INFO: 2020-09-17 11:00:21 INFO: 2020-09-17 11:02:00 INFO: 2020-09-17 11:02:00 INFO: 2020-09-17 11:02:00 INFO: 2020-09-17 11:02:00 INFO: 2020-09-17 11:02:00 INFO: clearing start 2020-09-17 11:02:00 INFO: clearing end 2020-09-17 11:02:00 INFO: 2020-09-17 11:02:00 INFO: 2020-09-17 11:02:00 INFO: 2020-09-17 11:02:00 INFO: 2020-09-17 12:00:20 INFO: 2020-09-17 12:00:20 INFO: 2020-09-17 12:00:20 INFO: 2020-09-17 12:00:20 INFO: 2020-09-17 12:00:20 INFO: init new order start 2020-09-17 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 17, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 380.45, 'high': 381.65, 'low': 378.6, 'close': 379.0, 'trades': 3006, 'volume': 2564099, 'vwap': 380.1, 'lastSize': 292, 'turnover': 97460299050, 'homeNotional': 27910.512372899142, 'foreignNotional': 10608686.688728707}, {'timestamp': datetime.datetime(2020, 9, 17, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.5, 'high': 382.85, 'low': 379.25, 'close': 380.45, 'trades': 4345, 'volume': 3286622, 'vwap': 380.93, 'lastSize': 295, 'turnover': 125194968335, 'homeNotional': 35744.209773246315, 'foreignNotional': 13615815.04783643}, {'timestamp': datetime.datetime(2020, 9, 17, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 380.4, 'high': 381.55, 'low': 378.25, 'close': 379.5, 'trades': 4252, 'volume': 2400485, 'vwap': 379.47, 'lastSize': 25, 'turnover': 91090189695, 'homeNotional': 26125.809418409084, 'foreignNotional': 9913888.643545607}] 2020-09-17 12:00:20 INFO: prepare candles [CandleItem(low=378.6, high=381.65, open=380.45, close=379.0, color='RED'), CandleItem(low=379.25, high=382.85, open=379.5, close=380.45, color='GREEN'), CandleItem(low=378.25, high=381.55, open=380.4, close=379.5, color='RED')] 2020-09-17 12:00:20 INFO: skip by colors first_candle=CandleItem(low=378.25, high=381.55, open=380.4, close=379.5, color='RED') second_candle=CandleItem(low=379.25, high=382.85, open=379.5, close=380.45, color='GREEN') last_candle=CandleItem(low=378.6, high=381.65, open=380.45, close=379.0, color='RED') 2020-09-17 12:00:20 INFO: check need new order None 2020-09-17 12:00:20 INFO: init new order end 2020-09-17 12:00:20 INFO: 2020-09-17 12:00:20 INFO: 2020-09-17 12:00:20 INFO: 2020-09-17 12:00:20 INFO: 2020-09-17 12:02:00 INFO: 2020-09-17 12:02:00 INFO: 2020-09-17 12:02:00 INFO: 2020-09-17 12:02:00 INFO: 2020-09-17 12:02:00 INFO: clearing start 2020-09-17 12:02:00 INFO: clearing end 2020-09-17 12:02:00 INFO: 2020-09-17 12:02:00 INFO: 2020-09-17 12:02:00 INFO: 2020-09-17 12:02:00 INFO: 2020-09-17 13:00:20 INFO: 2020-09-17 13:00:20 INFO: 2020-09-17 13:00:20 INFO: 2020-09-17 13:00:20 INFO: 2020-09-17 13:00:20 INFO: init new order start 2020-09-17 13:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 17, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.0, 'high': 379.7, 'low': 376.05, 'close': 378.6, 'trades': 3430, 'volume': 2252904, 'vwap': 377.98, 'lastSize': 839, 'turnover': 85154509805, 'homeNotional': 24499.708386270497, 'foreignNotional': 9260330.2911997}, {'timestamp': datetime.datetime(2020, 9, 17, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 380.45, 'high': 381.65, 'low': 378.6, 'close': 379.0, 'trades': 3006, 'volume': 2564099, 'vwap': 380.1, 'lastSize': 292, 'turnover': 97460299050, 'homeNotional': 27910.512372899142, 'foreignNotional': 10608686.688728707}, {'timestamp': datetime.datetime(2020, 9, 17, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.5, 'high': 382.85, 'low': 379.25, 'close': 380.45, 'trades': 4345, 'volume': 3286622, 'vwap': 380.93, 'lastSize': 295, 'turnover': 125194968335, 'homeNotional': 35744.209773246315, 'foreignNotional': 13615815.04783643}] 2020-09-17 13:00:21 INFO: prepare candles [CandleItem(low=376.05, high=379.7, open=379.0, close=378.6, color='RED'), CandleItem(low=378.6, high=381.65, open=380.45, close=379.0, color='RED'), CandleItem(low=379.25, high=382.85, open=379.5, close=380.45, color='GREEN')] 2020-09-17 13:00:21 INFO: skip by colors first_candle=CandleItem(low=379.25, high=382.85, open=379.5, close=380.45, color='GREEN') second_candle=CandleItem(low=378.6, high=381.65, open=380.45, close=379.0, color='RED') last_candle=CandleItem(low=376.05, high=379.7, open=379.0, close=378.6, color='RED') 2020-09-17 13:00:21 INFO: check need new order None 2020-09-17 13:00:21 INFO: init new order end 2020-09-17 13:00:21 INFO: 2020-09-17 13:00:21 INFO: 2020-09-17 13:00:21 INFO: 2020-09-17 13:00:21 INFO: 2020-09-17 13:02:00 INFO: 2020-09-17 13:02:00 INFO: 2020-09-17 13:02:00 INFO: 2020-09-17 13:02:00 INFO: 2020-09-17 13:02:00 INFO: clearing start 2020-09-17 13:02:00 INFO: clearing end 2020-09-17 13:02:00 INFO: 2020-09-17 13:02:00 INFO: 2020-09-17 13:02:00 INFO: 2020-09-17 13:02:00 INFO: 2020-09-17 14:00:20 INFO: 2020-09-17 14:00:20 INFO: 2020-09-17 14:00:20 INFO: 2020-09-17 14:00:20 INFO: 2020-09-17 14:00:20 INFO: init new order start 2020-09-17 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 17, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 378.6, 'high': 380.85, 'low': 374.75, 'close': 380.2, 'trades': 5703, 'volume': 3258597, 'vwap': 377.26, 'lastSize': 107, 'turnover': 122932270270, 'homeNotional': 35296.02157214934, 'foreignNotional': 13315667.52812456}, {'timestamp': datetime.datetime(2020, 9, 17, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.0, 'high': 379.7, 'low': 376.05, 'close': 378.6, 'trades': 3430, 'volume': 2252904, 'vwap': 377.98, 'lastSize': 839, 'turnover': 85154509805, 'homeNotional': 24499.708386270497, 'foreignNotional': 9260330.2911997}, {'timestamp': datetime.datetime(2020, 9, 17, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 380.45, 'high': 381.65, 'low': 378.6, 'close': 379.0, 'trades': 3006, 'volume': 2564099, 'vwap': 380.1, 'lastSize': 292, 'turnover': 97460299050, 'homeNotional': 27910.512372899142, 'foreignNotional': 10608686.688728707}] 2020-09-17 14:00:20 INFO: prepare candles [CandleItem(low=374.75, high=380.85, open=378.6, close=380.2, color='GREEN'), CandleItem(low=376.05, high=379.7, open=379.0, close=378.6, color='RED'), CandleItem(low=378.6, high=381.65, open=380.45, close=379.0, color='RED')] 2020-09-17 14:00:20 INFO: last_candle=CandleItem(low=374.75, high=380.85, open=378.6, close=380.2, color='GREEN') 2020-09-17 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-09-17 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=374.75, high=380.85, open=378.6, close=380.2, color='GREEN') 2020-09-17 14:00:20 INFO: skip by CandleItem(low=374.75, high=380.85, open=378.6, close=380.2, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-17 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-09-17 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=374.75, high=380.85, open=378.6, close=380.2, color='GREEN') 2020-09-17 14:00:20 INFO: apply filter None to candle=CandleItem(low=376.05, high=379.7, open=379.0, close=378.6, color='RED') 2020-09-17 14:00:20 INFO: apply filter None to candle=CandleItem(low=378.6, high=381.65, open=380.45, close=379.0, color='RED') 2020-09-17 14:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=374.75, high=380.85, open=378.6, close=380.2, color='GREEN'), take_profit_factor=5.0, clearing_interval=3600) 2020-09-17 14:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=374.75, high=380.85, open=378.6, close=380.2, color='GREEN'), take_profit_factor=5.0, clearing_interval=3600) 2020-09-17 14:00:20 INFO: place order: start candle=CandleItem(low=374.75, high=380.85, open=378.6, close=380.2, color='GREEN') ticker='ETHUSD' price_offset=0.1 2020-09-17 14:00:20 INFO: place order: side_factor=-1 init_trigger_price=380.90000000000003 init_order_price=380.95000000000005 stop_price_offset=0.0 candle.size=6.100000000000023 stop_price=374.75 take_price=411.45000000000016 2020-09-17 14:00:20 INFO: place order round: side_factor=-1 init_trigger_price=Decimal('380.90000000000003410605131648480892181396484375') init_order_price=Decimal('380.950000000000045474735088646411895751953125') stop_price_offset=0.0 candle.size=6.100000000000023 stop_price=Decimal('374.75') take_price=Decimal('411.4500000000001591615728102624416351318359375') 2020-09-17 14:00:20 INFO: place order: compute qty=309 2020-09-17 14:00:20 INFO: place order: save order to db d79a2c1e30d94b7e9e2475d04f0d2ca1; response=True 2020-09-17 14:00:20 INFO: post order to exchange resp={'orderID': '0b65c8f7-23c9-f878-b088-7ea93e0eeba8', 'clOrdID': 'd79a2c1e30d94b7e9e2475d04f0d2ca1', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 309, 'price': 380.95, 'displayQty': None, 'stopPx': 380.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 0, 20, 591000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 0, 20, 591000, tzinfo=tzutc())} 2020-09-17 14:00:20 INFO: place new init order {'qty': 309, 'init_price': Decimal('380.90000000000003410605131648480892181396484375'), 'stop_price': Decimal('374.75'), 'take_price': Decimal('411.4500000000001591615728102624416351318359375'), 'order_uid': 'd79a2c1e30d94b7e9e2475d04f0d2ca1', 'response': {'orderID': '0b65c8f7-23c9-f878-b088-7ea93e0eeba8', 'clOrdID': 'd79a2c1e30d94b7e9e2475d04f0d2ca1', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 309, 'price': 380.95, 'displayQty': None, 'stopPx': 380.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 0, 20, 591000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 0, 20, 591000, tzinfo=tzutc())}} 2020-09-17 14:00:20 INFO: init new order end 2020-09-17 14:00:20 INFO: 2020-09-17 14:00:20 INFO: 2020-09-17 14:00:20 INFO: 2020-09-17 14:00:20 INFO: 2020-09-17 14:00:20 INFO: process event {'orderID': '0b65c8f7-23c9-f878-b088-7ea93e0eeba8', 'clOrdID': 'd79a2c1e30d94b7e9e2475d04f0d2ca1', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 309, 'price': 380.95, 'displayQty': None, 'stopPx': 380.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-09-17T11:00:20.591Z', 'timestamp': '2020-09-17T11:00:20.591Z'} 2020-09-17 14:00:20 INFO: skip event d79a2c1e30d94b7e9e2475d04f0d2ca1 New 2020-09-17 14:02:00 INFO: 2020-09-17 14:02:00 INFO: 2020-09-17 14:02:00 INFO: 2020-09-17 14:02:00 INFO: 2020-09-17 14:02:00 INFO: clearing start 2020-09-17 14:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '0b65c8f7-23c9-f878-b088-7ea93e0eeba8', 'clOrdID': 'd79a2c1e30d94b7e9e2475d04f0d2ca1', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 309, 'price': 380.95, 'displayQty': None, 'stopPx': 380.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 0, 20, 591000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 0, 20, 591000, tzinfo=tzutc())} 2020-09-17 14:02:00 INFO: order time=2020-09-17 11:00:20.591000+00:00; delta from now UTC=0:01:40.194422 time_delta.total_seconds()=100.194422; time_diff_offset='3600' 2020-09-17 14:02:00 INFO: skip by time diff 2020-09-17 11:00:20.591000+00:00 2020-09-17 14:02:00 INFO: clearing end 2020-09-17 14:02:00 INFO: 2020-09-17 14:02:00 INFO: 2020-09-17 14:02:00 INFO: 2020-09-17 14:02:00 INFO: 2020-09-17 14:26:34 INFO: process event {'orderID': '0b65c8f7-23c9-f878-b088-7ea93e0eeba8', 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 309, 'avgPx': 380.9, 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'transactTime': '2020-09-17T11:26:34.494Z', 'timestamp': '2020-09-17T11:26:34.494Z', 'clOrdID': 'd79a2c1e30d94b7e9e2475d04f0d2ca1', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-17 14:26:34 INFO: add new event={'uid': 'd79a2c1e30d94b7e9e2475d04f0d2ca1', 'status': 'Filled'} 2020-09-17 14:26:34 INFO: 2020-09-17 14:26:34 INFO: 2020-09-17 14:26:34 INFO: 2020-09-17 14:26:34 INFO: 2020-09-17 14:26:34 INFO: process event start 2020-09-17 14:26:34 INFO: fetch new order event d79a2c1e30d94b7e9e2475d04f0d2ca1 2020-09-17 14:26:34 INFO: fetch orders by event init={'stop': '374.75', 'take': '411.4500000000001591615728102624416351318359375', 'qty': '309', 'color': 'GREEN', 'ticker': 'ETHUSD', 'clearing_offset': '3600'} profit_pair=None 2020-09-17 14:26:34 INFO: process init order filled 2020-09-17 14:26:34 INFO: save profit orders to storage stop=4e6ac393d36d481ca6d2c22d0f8966c6 take=07b41fe0c790491e96ea48f71300ad43 2020-09-17 14:26:34 INFO: place profit orders take_price=411.4500000000001591615728102624416351318359375, stop_price=374.75, qty=309, color=GREEN, ticker=ETHUSD 4e6ac393d36d481ca6d2c22d0f8966c6 07b41fe0c790491e96ea48f71300ad43 2020-09-17 14:26:34 INFO: place stop order ETHUSD: qty=-309, stop_price=374.75, stop_uid=4e6ac393d36d481ca6d2c22d0f8966c6 2020-09-17 14:26:34 INFO: exchange resp for stop order={'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-17 14:26:34 INFO: place limit order ETHUSD: qty=-309, price=411.4500000000001591615728102624416351318359375, take_uid=07b41fe0c790491e96ea48f71300ad43 2020-09-17 14:26:34 INFO: process event {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': '2020-09-17T11:26:34.704Z', 'timestamp': '2020-09-17T11:26:34.704Z'} 2020-09-17 14:26:34 INFO: skip event 4e6ac393d36d481ca6d2c22d0f8966c6 New 2020-09-17 14:26:34 INFO: exchange resp for take profit order={'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-17 14:26:34 INFO: place profit orders={'stop': {'response': {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())}, 'qty': Decimal('-309'), 'uid': '4e6ac393d36d481ca6d2c22d0f8966c6', 'price': Decimal('374.75')}, 'take': {'response': {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())}, 'qty': Decimal('-309'), 'uid': '07b41fe0c790491e96ea48f71300ad43', 'price': Decimal('411.4500000000001591615728102624416351318359375')}} 2020-09-17 14:26:34 INFO: process event {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': '2020-09-17T11:26:34.740Z', 'timestamp': '2020-09-17T11:26:34.740Z'} 2020-09-17 14:26:34 INFO: skip event 07b41fe0c790491e96ea48f71300ad43 New 2020-09-17 14:26:34 INFO: rm init order from db d79a2c1e30d94b7e9e2475d04f0d2ca1 2020-09-17 14:26:34 INFO: end process event_processing_result='proceed init order' 2020-09-17 14:26:34 INFO: 2020-09-17 14:26:34 INFO: 2020-09-17 14:26:34 INFO: 2020-09-17 14:26:34 INFO: 2020-09-17 15:00:20 INFO: 2020-09-17 15:00:20 INFO: 2020-09-17 15:00:20 INFO: 2020-09-17 15:00:20 INFO: 2020-09-17 15:00:20 INFO: init new order start 2020-09-17 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 17, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 380.2, 'high': 384.55, 'low': 378.9, 'close': 383.4, 'trades': 6239, 'volume': 3608339, 'vwap': 381.97, 'lastSize': 700, 'turnover': 137825168180, 'homeNotional': 39156.71322937752, 'foreignNotional': 14956546.143595936}, {'timestamp': datetime.datetime(2020, 9, 17, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 378.6, 'high': 380.85, 'low': 374.75, 'close': 380.2, 'trades': 5703, 'volume': 3258597, 'vwap': 377.26, 'lastSize': 107, 'turnover': 122932270270, 'homeNotional': 35296.02157214934, 'foreignNotional': 13315667.52812456}, {'timestamp': datetime.datetime(2020, 9, 17, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.0, 'high': 379.7, 'low': 376.05, 'close': 378.6, 'trades': 3430, 'volume': 2252904, 'vwap': 377.98, 'lastSize': 839, 'turnover': 85154509805, 'homeNotional': 24499.708386270497, 'foreignNotional': 9260330.2911997}] 2020-09-17 15:00:20 INFO: prepare candles [CandleItem(low=378.9, high=384.55, open=380.2, close=383.4, color='GREEN'), CandleItem(low=374.75, high=380.85, open=378.6, close=380.2, color='GREEN'), CandleItem(low=376.05, high=379.7, open=379.0, close=378.6, color='RED')] 2020-09-17 15:00:20 INFO: skip by colors first_candle=CandleItem(low=376.05, high=379.7, open=379.0, close=378.6, color='RED') second_candle=CandleItem(low=374.75, high=380.85, open=378.6, close=380.2, color='GREEN') last_candle=CandleItem(low=378.9, high=384.55, open=380.2, close=383.4, color='GREEN') 2020-09-17 15:00:20 INFO: check need new order None 2020-09-17 15:00:20 INFO: init new order end 2020-09-17 15:00:20 INFO: 2020-09-17 15:00:20 INFO: 2020-09-17 15:00:20 INFO: 2020-09-17 15:00:20 INFO: 2020-09-17 15:02:00 INFO: 2020-09-17 15:02:00 INFO: 2020-09-17 15:02:00 INFO: 2020-09-17 15:02:00 INFO: 2020-09-17 15:02:00 INFO: clearing start 2020-09-17 15:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-17 15:02:00 INFO: skip by not found init order into storage 2020-09-17 15:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-17 15:02:00 INFO: skip by not found init order into storage 2020-09-17 15:02:00 INFO: clearing end 2020-09-17 15:02:00 INFO: 2020-09-17 15:02:00 INFO: 2020-09-17 15:02:00 INFO: 2020-09-17 15:02:00 INFO: 2020-09-17 16:00:20 INFO: 2020-09-17 16:00:20 INFO: 2020-09-17 16:00:20 INFO: 2020-09-17 16:00:20 INFO: 2020-09-17 16:00:20 INFO: init new order start 2020-09-17 16:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 17, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.4, 'high': 384.15, 'low': 377.6, 'close': 378.0, 'trades': 4740, 'volume': 3461638, 'vwap': 380.49, 'lastSize': 4309, 'turnover': 131708714435, 'homeNotional': 37522.82694845583, 'foreignNotional': 14276814.78801531}, {'timestamp': datetime.datetime(2020, 9, 17, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 380.2, 'high': 384.55, 'low': 378.9, 'close': 383.4, 'trades': 6239, 'volume': 3608339, 'vwap': 381.97, 'lastSize': 700, 'turnover': 137825168180, 'homeNotional': 39156.71322937752, 'foreignNotional': 14956546.143595936}, {'timestamp': datetime.datetime(2020, 9, 17, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 378.6, 'high': 380.85, 'low': 374.75, 'close': 380.2, 'trades': 5703, 'volume': 3258597, 'vwap': 377.26, 'lastSize': 107, 'turnover': 122932270270, 'homeNotional': 35296.02157214934, 'foreignNotional': 13315667.52812456}] 2020-09-17 16:00:20 INFO: prepare candles [CandleItem(low=377.6, high=384.15, open=383.4, close=378.0, color='RED'), CandleItem(low=378.9, high=384.55, open=380.2, close=383.4, color='GREEN'), CandleItem(low=374.75, high=380.85, open=378.6, close=380.2, color='GREEN')] 2020-09-17 16:00:20 INFO: last_candle=CandleItem(low=377.6, high=384.15, open=383.4, close=378.0, color='RED') 2020-09-17 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-09-17 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=377.6, high=384.15, open=383.4, close=378.0, color='RED') 2020-09-17 16:00:20 INFO: skip by CandleItem(low=377.6, high=384.15, open=383.4, close=378.0, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-17 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-09-17 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=377.6, high=384.15, open=383.4, close=378.0, color='RED') 2020-09-17 16:00:20 INFO: apply filter None to candle=CandleItem(low=378.9, high=384.55, open=380.2, close=383.4, color='GREEN') 2020-09-17 16:00:20 INFO: apply filter None to candle=CandleItem(low=374.75, high=380.85, open=378.6, close=380.2, color='GREEN') 2020-09-17 16:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=377.6, high=384.15, open=383.4, close=378.0, color='RED'), take_profit_factor=5.0, clearing_interval=3600) 2020-09-17 16:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=377.6, high=384.15, open=383.4, close=378.0, color='RED'), take_profit_factor=5.0, clearing_interval=3600) 2020-09-17 16:00:20 INFO: place order: start candle=CandleItem(low=377.6, high=384.15, open=383.4, close=378.0, color='RED') ticker='ETHUSD' price_offset=0.1 2020-09-17 16:00:20 INFO: place order: side_factor=1 init_trigger_price=377.55 init_order_price=377.5 stop_price_offset=0.0 candle.size=6.5499999999999545 stop_price=384.15 take_price=344.7500000000002 2020-09-17 16:00:20 INFO: place order round: side_factor=1 init_trigger_price=Decimal('377.55000000000001136868377216160297393798828125') init_order_price=Decimal('377.5') stop_price_offset=0.0 candle.size=6.5499999999999545 stop_price=Decimal('384.1499999999999772626324556767940521240234375') take_price=Decimal('344.750000000000227373675443232059478759765625') 2020-09-17 16:00:20 INFO: place order: compute qty=-288 2020-09-17 16:00:20 INFO: place order: save order to db 355ed8c8c8964a4b90e24e43b69ccc40; response=True 2020-09-17 16:00:20 INFO: post order to exchange resp={'orderID': 'bddd2538-f431-86e8-2791-a1dee8133363', 'clOrdID': '355ed8c8c8964a4b90e24e43b69ccc40', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 288, 'price': 377.5, 'displayQty': None, 'stopPx': 377.55, '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': 288, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 17, 13, 0, 20, 898000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 13, 0, 20, 898000, tzinfo=tzutc())} 2020-09-17 16:00:20 INFO: place new init order {'qty': -288, 'init_price': Decimal('377.55000000000001136868377216160297393798828125'), 'stop_price': Decimal('384.1499999999999772626324556767940521240234375'), 'take_price': Decimal('344.750000000000227373675443232059478759765625'), 'order_uid': '355ed8c8c8964a4b90e24e43b69ccc40', 'response': {'orderID': 'bddd2538-f431-86e8-2791-a1dee8133363', 'clOrdID': '355ed8c8c8964a4b90e24e43b69ccc40', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 288, 'price': 377.5, 'displayQty': None, 'stopPx': 377.55, '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': 288, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 17, 13, 0, 20, 898000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 13, 0, 20, 898000, tzinfo=tzutc())}} 2020-09-17 16:00:20 INFO: init new order end 2020-09-17 16:00:20 INFO: 2020-09-17 16:00:20 INFO: 2020-09-17 16:00:20 INFO: 2020-09-17 16:00:20 INFO: 2020-09-17 16:00:21 INFO: process event {'orderID': 'bddd2538-f431-86e8-2791-a1dee8133363', 'clOrdID': '355ed8c8c8964a4b90e24e43b69ccc40', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 288, 'price': 377.5, 'displayQty': None, 'stopPx': 377.55, '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': 288, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-09-17T13:00:20.898Z', 'timestamp': '2020-09-17T13:00:20.898Z'} 2020-09-17 16:00:21 INFO: skip event 355ed8c8c8964a4b90e24e43b69ccc40 New 2020-09-17 16:02:00 INFO: 2020-09-17 16:02:00 INFO: 2020-09-17 16:02:00 INFO: 2020-09-17 16:02:00 INFO: 2020-09-17 16:02:00 INFO: clearing start 2020-09-17 16:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-17 16:02:00 INFO: skip by not found init order into storage 2020-09-17 16:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-17 16:02:00 INFO: skip by not found init order into storage 2020-09-17 16:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'bddd2538-f431-86e8-2791-a1dee8133363', 'clOrdID': '355ed8c8c8964a4b90e24e43b69ccc40', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 288, 'price': 377.5, 'displayQty': None, 'stopPx': 377.55, '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': 288, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 17, 13, 0, 20, 898000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 13, 0, 20, 898000, tzinfo=tzutc())} 2020-09-17 16:02:00 INFO: order time=2020-09-17 13:00:20.898000+00:00; delta from now UTC=0:01:39.190622 time_delta.total_seconds()=99.190622; time_diff_offset='3600' 2020-09-17 16:02:00 INFO: skip by time diff 2020-09-17 13:00:20.898000+00:00 2020-09-17 16:02:00 INFO: clearing end 2020-09-17 16:02:00 INFO: 2020-09-17 16:02:00 INFO: 2020-09-17 16:02:00 INFO: 2020-09-17 16:02:00 INFO: 2020-09-17 16:08:02 INFO: process event {'orderID': 'bddd2538-f431-86e8-2791-a1dee8133363', 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 288, 'avgPx': 377.5, 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'transactTime': '2020-09-17T13:08:02.590Z', 'timestamp': '2020-09-17T13:08:02.590Z', 'clOrdID': '355ed8c8c8964a4b90e24e43b69ccc40', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-17 16:08:02 INFO: add new event={'uid': '355ed8c8c8964a4b90e24e43b69ccc40', 'status': 'Filled'} 2020-09-17 16:08:03 INFO: 2020-09-17 16:08:03 INFO: 2020-09-17 16:08:03 INFO: 2020-09-17 16:08:03 INFO: 2020-09-17 16:08:03 INFO: process event start 2020-09-17 16:08:03 INFO: fetch new order event 355ed8c8c8964a4b90e24e43b69ccc40 2020-09-17 16:08:03 INFO: fetch orders by event init={'stop': '384.1499999999999772626324556767940521240234375', 'take': '344.750000000000227373675443232059478759765625', 'qty': '288', 'color': 'RED', 'ticker': 'ETHUSD', 'clearing_offset': '3600'} profit_pair=None 2020-09-17 16:08:03 INFO: process init order filled 2020-09-17 16:08:03 INFO: save profit orders to storage stop=860f50d5794a4437b9c37231296022a8 take=f16fa7cc44ad48b99f4a319b5913931b 2020-09-17 16:08:03 INFO: place profit orders take_price=344.750000000000227373675443232059478759765625, stop_price=384.1499999999999772626324556767940521240234375, qty=288, color=RED, ticker=ETHUSD 860f50d5794a4437b9c37231296022a8 f16fa7cc44ad48b99f4a319b5913931b 2020-09-17 16:08:03 INFO: place stop order ETHUSD: qty=288, stop_price=384.1499999999999772626324556767940521240234375, stop_uid=860f50d5794a4437b9c37231296022a8 2020-09-17 16:08:04 INFO: process event {'orderID': '9d7ae573-306f-29a3-ad00-313d9aa22305', 'clOrdID': '860f50d5794a4437b9c37231296022a8', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 288, 'price': None, 'displayQty': None, 'stopPx': 384.15, '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': 288, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': '2020-09-17T13:08:04.357Z', 'timestamp': '2020-09-17T13:08:04.357Z'} 2020-09-17 16:08:04 INFO: exchange resp for stop order={'orderID': '9d7ae573-306f-29a3-ad00-313d9aa22305', 'clOrdID': '860f50d5794a4437b9c37231296022a8', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 288, 'price': None, 'displayQty': None, 'stopPx': 384.15, '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': 288, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 13, 8, 4, 357000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 13, 8, 4, 357000, tzinfo=tzutc())} 2020-09-17 16:08:04 INFO: place limit order ETHUSD: qty=288, price=344.750000000000227373675443232059478759765625, take_uid=f16fa7cc44ad48b99f4a319b5913931b 2020-09-17 16:08:04 INFO: skip event 860f50d5794a4437b9c37231296022a8 New 2020-09-17 16:08:04 INFO: exchange resp for take profit order={'orderID': '79b1e503-08a9-44da-3e33-16c8cd2525ec', 'clOrdID': 'f16fa7cc44ad48b99f4a319b5913931b', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 288, 'price': 344.75, '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': 288, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 13, 8, 4, 923000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 13, 8, 4, 923000, tzinfo=tzutc())} 2020-09-17 16:08:04 INFO: place profit orders={'stop': {'response': {'orderID': '9d7ae573-306f-29a3-ad00-313d9aa22305', 'clOrdID': '860f50d5794a4437b9c37231296022a8', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 288, 'price': None, 'displayQty': None, 'stopPx': 384.15, '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': 288, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 13, 8, 4, 357000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 13, 8, 4, 357000, tzinfo=tzutc())}, 'qty': Decimal('288'), 'uid': '860f50d5794a4437b9c37231296022a8', 'price': Decimal('384.1499999999999772626324556767940521240234375')}, 'take': {'response': {'orderID': '79b1e503-08a9-44da-3e33-16c8cd2525ec', 'clOrdID': 'f16fa7cc44ad48b99f4a319b5913931b', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 288, 'price': 344.75, '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': 288, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 13, 8, 4, 923000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 13, 8, 4, 923000, tzinfo=tzutc())}, 'qty': Decimal('288'), 'uid': 'f16fa7cc44ad48b99f4a319b5913931b', 'price': Decimal('344.750000000000227373675443232059478759765625')}} 2020-09-17 16:08:04 INFO: process event {'orderID': '79b1e503-08a9-44da-3e33-16c8cd2525ec', 'clOrdID': 'f16fa7cc44ad48b99f4a319b5913931b', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 288, 'price': 344.75, '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': 288, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': '2020-09-17T13:08:04.923Z', 'timestamp': '2020-09-17T13:08:04.923Z'} 2020-09-17 16:08:04 INFO: skip event f16fa7cc44ad48b99f4a319b5913931b New 2020-09-17 16:08:04 INFO: rm init order from db 355ed8c8c8964a4b90e24e43b69ccc40 2020-09-17 16:08:04 INFO: end process event_processing_result='proceed init order' 2020-09-17 16:08:04 INFO: 2020-09-17 16:08:04 INFO: 2020-09-17 16:08:04 INFO: 2020-09-17 16:08:04 INFO: 2020-09-17 17:00:20 INFO: 2020-09-17 17:00:20 INFO: 2020-09-17 17:00:20 INFO: 2020-09-17 17:00:20 INFO: 2020-09-17 17:00:20 INFO: init new order start 2020-09-17 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 17, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 378.0, 'high': 380.85, 'low': 376.25, 'close': 380.2, 'trades': 4906, 'volume': 4119877, 'vwap': 378.0, 'lastSize': 450, 'turnover': 155730420055, 'homeNotional': 44429.21578312158, 'foreignNotional': 16794203.943749472}, {'timestamp': datetime.datetime(2020, 9, 17, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.4, 'high': 384.15, 'low': 377.6, 'close': 378.0, 'trades': 4740, 'volume': 3461638, 'vwap': 380.49, 'lastSize': 4309, 'turnover': 131708714435, 'homeNotional': 37522.82694845583, 'foreignNotional': 14276814.78801531}, {'timestamp': datetime.datetime(2020, 9, 17, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 380.2, 'high': 384.55, 'low': 378.9, 'close': 383.4, 'trades': 6239, 'volume': 3608339, 'vwap': 381.97, 'lastSize': 700, 'turnover': 137825168180, 'homeNotional': 39156.71322937752, 'foreignNotional': 14956546.143595936}] 2020-09-17 17:00:20 INFO: prepare candles [CandleItem(low=376.25, high=380.85, open=378.0, close=380.2, color='GREEN'), CandleItem(low=377.6, high=384.15, open=383.4, close=378.0, color='RED'), CandleItem(low=378.9, high=384.55, open=380.2, close=383.4, color='GREEN')] 2020-09-17 17:00:20 INFO: skip by colors first_candle=CandleItem(low=378.9, high=384.55, open=380.2, close=383.4, color='GREEN') second_candle=CandleItem(low=377.6, high=384.15, open=383.4, close=378.0, color='RED') last_candle=CandleItem(low=376.25, high=380.85, open=378.0, close=380.2, color='GREEN') 2020-09-17 17:00:20 INFO: check need new order None 2020-09-17 17:00:20 INFO: init new order end 2020-09-17 17:00:20 INFO: 2020-09-17 17:00:20 INFO: 2020-09-17 17:00:20 INFO: 2020-09-17 17:00:20 INFO: 2020-09-17 17:02:00 INFO: 2020-09-17 17:02:01 INFO: 2020-09-17 17:02:01 INFO: 2020-09-17 17:02:01 INFO: 2020-09-17 17:02:01 INFO: clearing start 2020-09-17 17:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-17 17:02:01 INFO: skip by not found init order into storage 2020-09-17 17:02:01 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-17 17:02:01 INFO: skip by not found init order into storage 2020-09-17 17:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '9d7ae573-306f-29a3-ad00-313d9aa22305', 'clOrdID': '860f50d5794a4437b9c37231296022a8', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 288, 'price': None, 'displayQty': None, 'stopPx': 384.15, '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': 288, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 13, 8, 4, 357000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 13, 8, 4, 357000, tzinfo=tzutc())} 2020-09-17 17:02:01 INFO: skip by not found init order into storage 2020-09-17 17:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '79b1e503-08a9-44da-3e33-16c8cd2525ec', 'clOrdID': 'f16fa7cc44ad48b99f4a319b5913931b', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 288, 'price': 344.75, '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': 288, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 13, 8, 4, 923000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 13, 8, 4, 923000, tzinfo=tzutc())} 2020-09-17 17:02:01 INFO: skip by not found init order into storage 2020-09-17 17:02:01 INFO: clearing end 2020-09-17 17:02:01 INFO: 2020-09-17 17:02:01 INFO: 2020-09-17 17:02:01 INFO: 2020-09-17 17:02:01 INFO: 2020-09-17 18:00:20 INFO: 2020-09-17 18:00:20 INFO: 2020-09-17 18:00:20 INFO: 2020-09-17 18:00:20 INFO: 2020-09-17 18:00:20 INFO: init new order start 2020-09-17 18:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 17, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 380.2, 'high': 382.1, 'low': 377.75, 'close': 381.1, 'trades': 4461, 'volume': 2500752, 'vwap': 380.28, 'lastSize': 200, 'turnover': 95097389450, 'homeNotional': 27077.463866222104, 'foreignNotional': 10296926.160831863}, {'timestamp': datetime.datetime(2020, 9, 17, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 378.0, 'high': 380.85, 'low': 376.25, 'close': 380.2, 'trades': 4906, 'volume': 4119877, 'vwap': 378.0, 'lastSize': 450, 'turnover': 155730420055, 'homeNotional': 44429.21578312158, 'foreignNotional': 16794203.943749472}, {'timestamp': datetime.datetime(2020, 9, 17, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.4, 'high': 384.15, 'low': 377.6, 'close': 378.0, 'trades': 4740, 'volume': 3461638, 'vwap': 380.49, 'lastSize': 4309, 'turnover': 131708714435, 'homeNotional': 37522.82694845583, 'foreignNotional': 14276814.78801531}] 2020-09-17 18:00:20 INFO: prepare candles [CandleItem(low=377.75, high=382.1, open=380.2, close=381.1, color='GREEN'), CandleItem(low=376.25, high=380.85, open=378.0, close=380.2, color='GREEN'), CandleItem(low=377.6, high=384.15, open=383.4, close=378.0, color='RED')] 2020-09-17 18:00:20 INFO: skip by colors first_candle=CandleItem(low=377.6, high=384.15, open=383.4, close=378.0, color='RED') second_candle=CandleItem(low=376.25, high=380.85, open=378.0, close=380.2, color='GREEN') last_candle=CandleItem(low=377.75, high=382.1, open=380.2, close=381.1, color='GREEN') 2020-09-17 18:00:20 INFO: check need new order None 2020-09-17 18:00:20 INFO: init new order end 2020-09-17 18:00:20 INFO: 2020-09-17 18:00:20 INFO: 2020-09-17 18:00:20 INFO: 2020-09-17 18:00:20 INFO: 2020-09-17 18:02:00 INFO: 2020-09-17 18:02:00 INFO: 2020-09-17 18:02:00 INFO: 2020-09-17 18:02:00 INFO: 2020-09-17 18:02:00 INFO: clearing start 2020-09-17 18:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-17 18:02:00 INFO: skip by not found init order into storage 2020-09-17 18:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-17 18:02:00 INFO: skip by not found init order into storage 2020-09-17 18:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '9d7ae573-306f-29a3-ad00-313d9aa22305', 'clOrdID': '860f50d5794a4437b9c37231296022a8', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 288, 'price': None, 'displayQty': None, 'stopPx': 384.15, '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': 288, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 13, 8, 4, 357000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 13, 8, 4, 357000, tzinfo=tzutc())} 2020-09-17 18:02:00 INFO: skip by not found init order into storage 2020-09-17 18:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '79b1e503-08a9-44da-3e33-16c8cd2525ec', 'clOrdID': 'f16fa7cc44ad48b99f4a319b5913931b', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 288, 'price': 344.75, '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': 288, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 13, 8, 4, 923000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 13, 8, 4, 923000, tzinfo=tzutc())} 2020-09-17 18:02:00 INFO: skip by not found init order into storage 2020-09-17 18:02:00 INFO: clearing end 2020-09-17 18:02:00 INFO: 2020-09-17 18:02:00 INFO: 2020-09-17 18:02:00 INFO: 2020-09-17 18:02:00 INFO: 2020-09-17 19:00:20 INFO: 2020-09-17 19:00:20 INFO: 2020-09-17 19:00:20 INFO: 2020-09-17 19:00:20 INFO: 2020-09-17 19:00:20 INFO: init new order start 2020-09-17 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 17, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 381.1, 'high': 383.4, 'low': 380.0, 'close': 380.5, 'trades': 4171, 'volume': 3115502, 'vwap': 381.67, 'lastSize': 103, 'turnover': 118907791040, 'homeNotional': 33836.13005866041, 'foreignNotional': 12914085.90040434}, {'timestamp': datetime.datetime(2020, 9, 17, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 380.2, 'high': 382.1, 'low': 377.75, 'close': 381.1, 'trades': 4461, 'volume': 2500752, 'vwap': 380.28, 'lastSize': 200, 'turnover': 95097389450, 'homeNotional': 27077.463866222104, 'foreignNotional': 10296926.160831863}, {'timestamp': datetime.datetime(2020, 9, 17, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 378.0, 'high': 380.85, 'low': 376.25, 'close': 380.2, 'trades': 4906, 'volume': 4119877, 'vwap': 378.0, 'lastSize': 450, 'turnover': 155730420055, 'homeNotional': 44429.21578312158, 'foreignNotional': 16794203.943749472}] 2020-09-17 19:00:20 INFO: prepare candles [CandleItem(low=380.0, high=383.4, open=381.1, close=380.5, color='RED'), CandleItem(low=377.75, high=382.1, open=380.2, close=381.1, color='GREEN'), CandleItem(low=376.25, high=380.85, open=378.0, close=380.2, color='GREEN')] 2020-09-17 19:00:20 INFO: last_candle=CandleItem(low=380.0, high=383.4, open=381.1, close=380.5, color='RED') 2020-09-17 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-17 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=380.0, high=383.4, open=381.1, close=380.5, color='RED') 2020-09-17 19:00:20 INFO: skip by CandleItem(low=380.0, high=383.4, open=381.1, close=380.5, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-17 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-17 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=380.0, high=383.4, open=381.1, close=380.5, color='RED') 2020-09-17 19:00:20 INFO: skip by CandleItem(low=380.0, high=383.4, open=381.1, close=380.5, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-17 19:00:20 INFO: not found applicable config for candle 2020-09-17 19:00:20 INFO: check need new order None 2020-09-17 19:00:20 INFO: init new order end 2020-09-17 19:00:20 INFO: 2020-09-17 19:00:20 INFO: 2020-09-17 19:00:20 INFO: 2020-09-17 19:00:20 INFO: 2020-09-17 19:02:00 INFO: 2020-09-17 19:02:00 INFO: 2020-09-17 19:02:00 INFO: 2020-09-17 19:02:00 INFO: 2020-09-17 19:02:00 INFO: clearing start 2020-09-17 19:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-17 19:02:00 INFO: skip by not found init order into storage 2020-09-17 19:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-17 19:02:00 INFO: skip by not found init order into storage 2020-09-17 19:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '9d7ae573-306f-29a3-ad00-313d9aa22305', 'clOrdID': '860f50d5794a4437b9c37231296022a8', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 288, 'price': None, 'displayQty': None, 'stopPx': 384.15, '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': 288, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 13, 8, 4, 357000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 13, 8, 4, 357000, tzinfo=tzutc())} 2020-09-17 19:02:00 INFO: skip by not found init order into storage 2020-09-17 19:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '79b1e503-08a9-44da-3e33-16c8cd2525ec', 'clOrdID': 'f16fa7cc44ad48b99f4a319b5913931b', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 288, 'price': 344.75, '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': 288, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 13, 8, 4, 923000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 13, 8, 4, 923000, tzinfo=tzutc())} 2020-09-17 19:02:00 INFO: skip by not found init order into storage 2020-09-17 19:02:00 INFO: clearing end 2020-09-17 19:02:00 INFO: 2020-09-17 19:02:00 INFO: 2020-09-17 19:02:00 INFO: 2020-09-17 19:02:00 INFO: 2020-09-17 20:00:20 INFO: 2020-09-17 20:00:20 INFO: 2020-09-17 20:00:20 INFO: 2020-09-17 20:00:20 INFO: 2020-09-17 20:00:20 INFO: init new order start 2020-09-17 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 17, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 380.5, 'high': 381.6, 'low': 378.85, 'close': 381.05, 'trades': 2854, 'volume': 1865696, 'vwap': 379.97, 'lastSize': 12, 'turnover': 70890725630, 'homeNotional': 20202.43679460469, 'foreignNotional': 7676320.96311199}, {'timestamp': datetime.datetime(2020, 9, 17, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 381.1, 'high': 383.4, 'low': 380.0, 'close': 380.5, 'trades': 4171, 'volume': 3115502, 'vwap': 381.67, 'lastSize': 103, 'turnover': 118907791040, 'homeNotional': 33836.13005866041, 'foreignNotional': 12914085.90040434}, {'timestamp': datetime.datetime(2020, 9, 17, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 380.2, 'high': 382.1, 'low': 377.75, 'close': 381.1, 'trades': 4461, 'volume': 2500752, 'vwap': 380.28, 'lastSize': 200, 'turnover': 95097389450, 'homeNotional': 27077.463866222104, 'foreignNotional': 10296926.160831863}] 2020-09-17 20:00:20 INFO: prepare candles [CandleItem(low=378.85, high=381.6, open=380.5, close=381.05, color='GREEN'), CandleItem(low=380.0, high=383.4, open=381.1, close=380.5, color='RED'), CandleItem(low=377.75, high=382.1, open=380.2, close=381.1, color='GREEN')] 2020-09-17 20:00:20 INFO: skip by colors first_candle=CandleItem(low=377.75, high=382.1, open=380.2, close=381.1, color='GREEN') second_candle=CandleItem(low=380.0, high=383.4, open=381.1, close=380.5, color='RED') last_candle=CandleItem(low=378.85, high=381.6, open=380.5, close=381.05, color='GREEN') 2020-09-17 20:00:20 INFO: check need new order None 2020-09-17 20:00:20 INFO: init new order end 2020-09-17 20:00:20 INFO: 2020-09-17 20:00:20 INFO: 2020-09-17 20:00:20 INFO: 2020-09-17 20:00:20 INFO: 2020-09-17 20:02:00 INFO: 2020-09-17 20:02:00 INFO: 2020-09-17 20:02:00 INFO: 2020-09-17 20:02:00 INFO: 2020-09-17 20:02:00 INFO: clearing start 2020-09-17 20:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-17 20:02:00 INFO: skip by not found init order into storage 2020-09-17 20:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-17 20:02:00 INFO: skip by not found init order into storage 2020-09-17 20:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '9d7ae573-306f-29a3-ad00-313d9aa22305', 'clOrdID': '860f50d5794a4437b9c37231296022a8', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 288, 'price': None, 'displayQty': None, 'stopPx': 384.15, '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': 288, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 13, 8, 4, 357000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 13, 8, 4, 357000, tzinfo=tzutc())} 2020-09-17 20:02:00 INFO: skip by not found init order into storage 2020-09-17 20:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '79b1e503-08a9-44da-3e33-16c8cd2525ec', 'clOrdID': 'f16fa7cc44ad48b99f4a319b5913931b', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 288, 'price': 344.75, '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': 288, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 13, 8, 4, 923000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 13, 8, 4, 923000, tzinfo=tzutc())} 2020-09-17 20:02:00 INFO: skip by not found init order into storage 2020-09-17 20:02:00 INFO: clearing end 2020-09-17 20:02:00 INFO: 2020-09-17 20:02:00 INFO: 2020-09-17 20:02:00 INFO: 2020-09-17 20:02:00 INFO: 2020-09-17 21:00:20 INFO: 2020-09-17 21:00:20 INFO: 2020-09-17 21:00:20 INFO: 2020-09-17 21:00:20 INFO: 2020-09-17 21:00:20 INFO: init new order start 2020-09-17 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 17, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 381.05, 'high': 382.95, 'low': 380.95, 'close': 381.7, 'trades': 2989, 'volume': 2369618, 'vwap': 381.73, 'lastSize': 26, 'turnover': 90454950245, 'homeNotional': 25726.20870100759, 'foreignNotional': 9820416.957047042}, {'timestamp': datetime.datetime(2020, 9, 17, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 380.5, 'high': 381.6, 'low': 378.85, 'close': 381.05, 'trades': 2854, 'volume': 1865696, 'vwap': 379.97, 'lastSize': 12, 'turnover': 70890725630, 'homeNotional': 20202.43679460469, 'foreignNotional': 7676320.96311199}, {'timestamp': datetime.datetime(2020, 9, 17, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 381.1, 'high': 383.4, 'low': 380.0, 'close': 380.5, 'trades': 4171, 'volume': 3115502, 'vwap': 381.67, 'lastSize': 103, 'turnover': 118907791040, 'homeNotional': 33836.13005866041, 'foreignNotional': 12914085.90040434}] 2020-09-17 21:00:20 INFO: prepare candles [CandleItem(low=380.95, high=382.95, open=381.05, close=381.7, color='GREEN'), CandleItem(low=378.85, high=381.6, open=380.5, close=381.05, color='GREEN'), CandleItem(low=380.0, high=383.4, open=381.1, close=380.5, color='RED')] 2020-09-17 21:00:20 INFO: skip by colors first_candle=CandleItem(low=380.0, high=383.4, open=381.1, close=380.5, color='RED') second_candle=CandleItem(low=378.85, high=381.6, open=380.5, close=381.05, color='GREEN') last_candle=CandleItem(low=380.95, high=382.95, open=381.05, close=381.7, color='GREEN') 2020-09-17 21:00:20 INFO: check need new order None 2020-09-17 21:00:20 INFO: init new order end 2020-09-17 21:00:20 INFO: 2020-09-17 21:00:20 INFO: 2020-09-17 21:00:20 INFO: 2020-09-17 21:00:20 INFO: 2020-09-17 21:02:00 INFO: 2020-09-17 21:02:00 INFO: 2020-09-17 21:02:00 INFO: 2020-09-17 21:02:00 INFO: 2020-09-17 21:02:00 INFO: clearing start 2020-09-17 21:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-17 21:02:00 INFO: skip by not found init order into storage 2020-09-17 21:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-17 21:02:00 INFO: skip by not found init order into storage 2020-09-17 21:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '9d7ae573-306f-29a3-ad00-313d9aa22305', 'clOrdID': '860f50d5794a4437b9c37231296022a8', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 288, 'price': None, 'displayQty': None, 'stopPx': 384.15, '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': 288, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 13, 8, 4, 357000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 13, 8, 4, 357000, tzinfo=tzutc())} 2020-09-17 21:02:00 INFO: skip by not found init order into storage 2020-09-17 21:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '79b1e503-08a9-44da-3e33-16c8cd2525ec', 'clOrdID': 'f16fa7cc44ad48b99f4a319b5913931b', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 288, 'price': 344.75, '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': 288, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 13, 8, 4, 923000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 13, 8, 4, 923000, tzinfo=tzutc())} 2020-09-17 21:02:00 INFO: skip by not found init order into storage 2020-09-17 21:02:00 INFO: clearing end 2020-09-17 21:02:00 INFO: 2020-09-17 21:02:00 INFO: 2020-09-17 21:02:00 INFO: 2020-09-17 21:02:00 INFO: 2020-09-17 21:08:43 INFO: process event {'orderID': '9d7ae573-306f-29a3-ad00-313d9aa22305', 'price': 384.35, 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 288, 'avgPx': 384.35, 'text': 'Triggered: Order stop price reached\nStop order by trader.py', 'transactTime': '2020-09-17T18:08:43.185Z', 'timestamp': '2020-09-17T18:08:43.185Z', 'clOrdID': '860f50d5794a4437b9c37231296022a8', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-17 21:08:43 INFO: add new event={'uid': '860f50d5794a4437b9c37231296022a8', 'status': 'Filled'} 2020-09-17 21:08:43 INFO: 2020-09-17 21:08:43 INFO: 2020-09-17 21:08:43 INFO: 2020-09-17 21:08:43 INFO: 2020-09-17 21:08:43 INFO: process event start 2020-09-17 21:08:43 INFO: fetch new order event 860f50d5794a4437b9c37231296022a8 2020-09-17 21:08:43 INFO: fetch orders by event init=None profit_pair=f16fa7cc44ad48b99f4a319b5913931b 2020-09-17 21:08:43 INFO: process profit order filled 2020-09-17 21:08:43 INFO: cancel order=f16fa7cc44ad48b99f4a319b5913931b [{'orderID': '79b1e503-08a9-44da-3e33-16c8cd2525ec', 'clOrdID': 'f16fa7cc44ad48b99f4a319b5913931b', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 288, 'price': 344.75, '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, 17, 13, 8, 4, 923000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 18, 8, 43, 750000, tzinfo=tzutc())}] 2020-09-17 21:08:43 INFO: end process event_processing_result='proceed profit order' 2020-09-17 21:08:43 INFO: 2020-09-17 21:08:43 INFO: 2020-09-17 21:08:43 INFO: 2020-09-17 21:08:43 INFO: 2020-09-17 21:08:43 INFO: process event {'orderID': '79b1e503-08a9-44da-3e33-16c8cd2525ec', 'ordStatus': 'Canceled', 'workingIndicator': False, 'leavesQty': 0, 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'timestamp': '2020-09-17T18:08:43.750Z', 'clOrdID': 'f16fa7cc44ad48b99f4a319b5913931b', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-17 21:08:43 INFO: skip event f16fa7cc44ad48b99f4a319b5913931b Canceled 2020-09-17 22:00:20 INFO: 2020-09-17 22:00:20 INFO: 2020-09-17 22:00:20 INFO: 2020-09-17 22:00:20 INFO: 2020-09-17 22:00:20 INFO: init new order start 2020-09-17 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 17, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 381.7, 'high': 389.5, 'low': 381.7, 'close': 387.35, 'trades': 9201, 'volume': 6098265, 'vwap': 386.41, 'lastSize': 89, 'turnover': 235640976635, 'homeNotional': 66487.57309792843, 'foreignNotional': 25691364.351766076}, {'timestamp': datetime.datetime(2020, 9, 17, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 381.05, 'high': 382.95, 'low': 380.95, 'close': 381.7, 'trades': 2989, 'volume': 2369618, 'vwap': 381.73, 'lastSize': 26, 'turnover': 90454950245, 'homeNotional': 25726.20870100759, 'foreignNotional': 9820416.957047042}, {'timestamp': datetime.datetime(2020, 9, 17, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 380.5, 'high': 381.6, 'low': 378.85, 'close': 381.05, 'trades': 2854, 'volume': 1865696, 'vwap': 379.97, 'lastSize': 12, 'turnover': 70890725630, 'homeNotional': 20202.43679460469, 'foreignNotional': 7676320.96311199}] 2020-09-17 22:00:20 INFO: prepare candles [CandleItem(low=381.7, high=389.5, open=381.7, close=387.35, color='GREEN'), CandleItem(low=380.95, high=382.95, open=381.05, close=381.7, color='GREEN'), CandleItem(low=378.85, high=381.6, open=380.5, close=381.05, color='GREEN')] 2020-09-17 22:00:20 INFO: skip by colors first_candle=CandleItem(low=378.85, high=381.6, open=380.5, close=381.05, color='GREEN') second_candle=CandleItem(low=380.95, high=382.95, open=381.05, close=381.7, color='GREEN') last_candle=CandleItem(low=381.7, high=389.5, open=381.7, close=387.35, color='GREEN') 2020-09-17 22:00:20 INFO: check need new order None 2020-09-17 22:00:20 INFO: init new order end 2020-09-17 22:00:20 INFO: 2020-09-17 22:00:20 INFO: 2020-09-17 22:00:20 INFO: 2020-09-17 22:00:20 INFO: 2020-09-17 22:02:00 INFO: 2020-09-17 22:02:00 INFO: 2020-09-17 22:02:00 INFO: 2020-09-17 22:02:00 INFO: 2020-09-17 22:02:00 INFO: clearing start 2020-09-17 22:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-17 22:02:00 INFO: skip by not found init order into storage 2020-09-17 22:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-17 22:02:00 INFO: skip by not found init order into storage 2020-09-17 22:02:00 INFO: clearing end 2020-09-17 22:02:00 INFO: 2020-09-17 22:02:00 INFO: 2020-09-17 22:02:00 INFO: 2020-09-17 22:02:00 INFO: 2020-09-17 23:00:20 INFO: 2020-09-17 23:00:20 INFO: 2020-09-17 23:00:20 INFO: 2020-09-17 23:00:20 INFO: 2020-09-17 23:00:20 INFO: init new order start 2020-09-17 23:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 17, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.35, 'high': 390.45, 'low': 386.65, 'close': 389.65, 'trades': 4906, 'volume': 2530521, 'vwap': 388.46, 'lastSize': 39, 'turnover': 98299986290, 'homeNotional': 27627.63473708696, 'foreignNotional': 10732176.308871495}, {'timestamp': datetime.datetime(2020, 9, 17, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 381.7, 'high': 389.5, 'low': 381.7, 'close': 387.35, 'trades': 9201, 'volume': 6098265, 'vwap': 386.41, 'lastSize': 89, 'turnover': 235640976635, 'homeNotional': 66487.57309792843, 'foreignNotional': 25691364.351766076}, {'timestamp': datetime.datetime(2020, 9, 17, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 381.05, 'high': 382.95, 'low': 380.95, 'close': 381.7, 'trades': 2989, 'volume': 2369618, 'vwap': 381.73, 'lastSize': 26, 'turnover': 90454950245, 'homeNotional': 25726.20870100759, 'foreignNotional': 9820416.957047042}] 2020-09-17 23:00:20 INFO: prepare candles [CandleItem(low=386.65, high=390.45, open=387.35, close=389.65, color='GREEN'), CandleItem(low=381.7, high=389.5, open=381.7, close=387.35, color='GREEN'), CandleItem(low=380.95, high=382.95, open=381.05, close=381.7, color='GREEN')] 2020-09-17 23:00:20 INFO: skip by colors first_candle=CandleItem(low=380.95, high=382.95, open=381.05, close=381.7, color='GREEN') second_candle=CandleItem(low=381.7, high=389.5, open=381.7, close=387.35, color='GREEN') last_candle=CandleItem(low=386.65, high=390.45, open=387.35, close=389.65, color='GREEN') 2020-09-17 23:00:20 INFO: check need new order None 2020-09-17 23:00:20 INFO: init new order end 2020-09-17 23:00:20 INFO: 2020-09-17 23:00:20 INFO: 2020-09-17 23:00:20 INFO: 2020-09-17 23:00:20 INFO: 2020-09-17 23:02:00 INFO: 2020-09-17 23:02:00 INFO: 2020-09-17 23:02:00 INFO: 2020-09-17 23:02:00 INFO: 2020-09-17 23:02:00 INFO: clearing start 2020-09-17 23:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-17 23:02:00 INFO: skip by not found init order into storage 2020-09-17 23:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-17 23:02:00 INFO: skip by not found init order into storage 2020-09-17 23:02:00 INFO: clearing end 2020-09-17 23:02:00 INFO: 2020-09-17 23:02:00 INFO: 2020-09-17 23:02:00 INFO: 2020-09-17 23:02:00 INFO: 2020-09-18 00:00:20 INFO: 2020-09-18 00:00:20 INFO: 2020-09-18 00:00:20 INFO: 2020-09-18 00:00:20 INFO: 2020-09-18 00:00:20 INFO: init new order start 2020-09-18 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 17, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.65, 'high': 394.9, 'low': 389.7, 'close': 392.65, 'trades': 7135, 'volume': 5217153, 'vwap': 392.64, 'lastSize': 555, 'turnover': 204844613760, 'homeNotional': 57024.487816300745, 'foreignNotional': 22389927.242532153}, {'timestamp': datetime.datetime(2020, 9, 17, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.35, 'high': 390.45, 'low': 386.65, 'close': 389.65, 'trades': 4906, 'volume': 2530521, 'vwap': 388.46, 'lastSize': 39, 'turnover': 98299986290, 'homeNotional': 27627.63473708696, 'foreignNotional': 10732176.308871495}, {'timestamp': datetime.datetime(2020, 9, 17, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 381.7, 'high': 389.5, 'low': 381.7, 'close': 387.35, 'trades': 9201, 'volume': 6098265, 'vwap': 386.41, 'lastSize': 89, 'turnover': 235640976635, 'homeNotional': 66487.57309792843, 'foreignNotional': 25691364.351766076}] 2020-09-18 00:00:20 INFO: prepare candles [CandleItem(low=389.7, high=394.9, open=389.65, close=392.65, color='GREEN'), CandleItem(low=386.65, high=390.45, open=387.35, close=389.65, color='GREEN'), CandleItem(low=381.7, high=389.5, open=381.7, close=387.35, color='GREEN')] 2020-09-18 00:00:20 INFO: skip by colors first_candle=CandleItem(low=381.7, high=389.5, open=381.7, close=387.35, color='GREEN') second_candle=CandleItem(low=386.65, high=390.45, open=387.35, close=389.65, color='GREEN') last_candle=CandleItem(low=389.7, high=394.9, open=389.65, close=392.65, color='GREEN') 2020-09-18 00:00:20 INFO: check need new order None 2020-09-18 00:00:20 INFO: init new order end 2020-09-18 00:00:20 INFO: 2020-09-18 00:00:20 INFO: 2020-09-18 00:00:20 INFO: 2020-09-18 00:00:20 INFO: 2020-09-18 00:02:00 INFO: 2020-09-18 00:02:00 INFO: 2020-09-18 00:02:00 INFO: 2020-09-18 00:02:00 INFO: 2020-09-18 00:02:00 INFO: clearing start 2020-09-18 00:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-18 00:02:00 INFO: skip by not found init order into storage 2020-09-18 00:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-18 00:02:00 INFO: skip by not found init order into storage 2020-09-18 00:02:00 INFO: clearing end 2020-09-18 00:02:00 INFO: 2020-09-18 00:02:00 INFO: 2020-09-18 00:02:00 INFO: 2020-09-18 00:02:00 INFO: 2020-09-18 01:00:20 INFO: 2020-09-18 01:00:20 INFO: 2020-09-18 01:00:20 INFO: 2020-09-18 01:00:20 INFO: 2020-09-18 01:00:20 INFO: init new order start 2020-09-18 01:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 17, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.65, 'high': 394.45, 'low': 392.55, 'close': 393.4, 'trades': 2754, 'volume': 2079217, 'vwap': 393.57, 'lastSize': 100, 'turnover': 81830490715, 'homeNotional': 22768.407707206487, 'foreignNotional': 8960825.119439516}, {'timestamp': datetime.datetime(2020, 9, 17, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.65, 'high': 394.9, 'low': 389.7, 'close': 392.65, 'trades': 7135, 'volume': 5217153, 'vwap': 392.64, 'lastSize': 555, 'turnover': 204844613760, 'homeNotional': 57024.487816300745, 'foreignNotional': 22389927.242532153}, {'timestamp': datetime.datetime(2020, 9, 17, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.35, 'high': 390.45, 'low': 386.65, 'close': 389.65, 'trades': 4906, 'volume': 2530521, 'vwap': 388.46, 'lastSize': 39, 'turnover': 98299986290, 'homeNotional': 27627.63473708696, 'foreignNotional': 10732176.308871495}] 2020-09-18 01:00:21 INFO: prepare candles [CandleItem(low=392.55, high=394.45, open=392.65, close=393.4, color='GREEN'), CandleItem(low=389.7, high=394.9, open=389.65, close=392.65, color='GREEN'), CandleItem(low=386.65, high=390.45, open=387.35, close=389.65, color='GREEN')] 2020-09-18 01:00:21 INFO: skip by colors first_candle=CandleItem(low=386.65, high=390.45, open=387.35, close=389.65, color='GREEN') second_candle=CandleItem(low=389.7, high=394.9, open=389.65, close=392.65, color='GREEN') last_candle=CandleItem(low=392.55, high=394.45, open=392.65, close=393.4, color='GREEN') 2020-09-18 01:00:21 INFO: check need new order None 2020-09-18 01:00:21 INFO: init new order end 2020-09-18 01:00:21 INFO: 2020-09-18 01:00:21 INFO: 2020-09-18 01:00:21 INFO: 2020-09-18 01:00:21 INFO: 2020-09-18 01:02:00 INFO: 2020-09-18 01:02:00 INFO: 2020-09-18 01:02:00 INFO: 2020-09-18 01:02:00 INFO: 2020-09-18 01:02:00 INFO: clearing start 2020-09-18 01:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-18 01:02:00 INFO: skip by not found init order into storage 2020-09-18 01:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-18 01:02:00 INFO: skip by not found init order into storage 2020-09-18 01:02:00 INFO: clearing end 2020-09-18 01:02:00 INFO: 2020-09-18 01:02:00 INFO: 2020-09-18 01:02:00 INFO: 2020-09-18 01:02:00 INFO: 2020-09-18 02:00:20 INFO: 2020-09-18 02:00:20 INFO: 2020-09-18 02:00:20 INFO: 2020-09-18 02:00:20 INFO: 2020-09-18 02:00:20 INFO: init new order start 2020-09-18 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 17, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.4, 'high': 393.8, 'low': 387.4, 'close': 388.3, 'trades': 5865, 'volume': 3284993, 'vwap': 390.26, 'lastSize': 661, 'turnover': 128197803980, 'homeNotional': 35925.06242179918, 'foreignNotional': 14019921.42257393}, {'timestamp': datetime.datetime(2020, 9, 17, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.65, 'high': 394.45, 'low': 392.55, 'close': 393.4, 'trades': 2754, 'volume': 2079217, 'vwap': 393.57, 'lastSize': 100, 'turnover': 81830490715, 'homeNotional': 22768.407707206487, 'foreignNotional': 8960825.119439516}, {'timestamp': datetime.datetime(2020, 9, 17, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.65, 'high': 394.9, 'low': 389.7, 'close': 392.65, 'trades': 7135, 'volume': 5217153, 'vwap': 392.64, 'lastSize': 555, 'turnover': 204844613760, 'homeNotional': 57024.487816300745, 'foreignNotional': 22389927.242532153}] 2020-09-18 02:00:20 INFO: prepare candles [CandleItem(low=387.4, high=393.8, open=393.4, close=388.3, color='RED'), CandleItem(low=392.55, high=394.45, open=392.65, close=393.4, color='GREEN'), CandleItem(low=389.7, high=394.9, open=389.65, close=392.65, color='GREEN')] 2020-09-18 02:00:20 INFO: last_candle=CandleItem(low=387.4, high=393.8, open=393.4, close=388.3, color='RED') 2020-09-18 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-09-18 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=387.4, high=393.8, open=393.4, close=388.3, color='RED') 2020-09-18 02:00:20 INFO: skip by CandleItem(low=387.4, high=393.8, open=393.4, close=388.3, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-18 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-09-18 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=387.4, high=393.8, open=393.4, close=388.3, color='RED') 2020-09-18 02:00:20 INFO: apply filter None to candle=CandleItem(low=392.55, high=394.45, open=392.65, close=393.4, color='GREEN') 2020-09-18 02:00:20 INFO: apply filter None to candle=CandleItem(low=389.7, high=394.9, open=389.65, close=392.65, color='GREEN') 2020-09-18 02:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=387.4, high=393.8, open=393.4, close=388.3, color='RED'), take_profit_factor=5.0, clearing_interval=3600) 2020-09-18 02:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=387.4, high=393.8, open=393.4, close=388.3, color='RED'), take_profit_factor=5.0, clearing_interval=3600) 2020-09-18 02:00:20 INFO: place order: start candle=CandleItem(low=387.4, high=393.8, open=393.4, close=388.3, color='RED') ticker='ETHUSD' price_offset=0.1 2020-09-18 02:00:20 INFO: place order: side_factor=1 init_trigger_price=387.34999999999997 init_order_price=387.29999999999995 stop_price_offset=0.0 candle.size=6.400000000000034 stop_price=393.8 take_price=355.2999999999998 2020-09-18 02:00:20 INFO: place order round: side_factor=1 init_trigger_price=Decimal('387.34999999999996589394868351519107818603515625') init_order_price=Decimal('387.299999999999954525264911353588104248046875') stop_price_offset=0.0 candle.size=6.400000000000034 stop_price=Decimal('393.80000000000001136868377216160297393798828125') take_price=Decimal('355.29999999999978399500832892954349517822265625') 2020-09-18 02:00:20 INFO: place order: compute qty=-295 2020-09-18 02:00:20 INFO: place order: save order to db ab87019297a5427f8ad135a9209c6899; response=True 2020-09-18 02:00:20 INFO: process event {'orderID': '8a993999-f3d4-4c4d-1b28-9bcaed242d75', 'clOrdID': 'ab87019297a5427f8ad135a9209c6899', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 295, 'price': 387.3, 'displayQty': None, 'stopPx': 387.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': 295, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-09-17T23:00:20.340Z', 'timestamp': '2020-09-17T23:00:20.340Z'} 2020-09-18 02:00:20 INFO: skip event ab87019297a5427f8ad135a9209c6899 New 2020-09-18 02:00:20 INFO: post order to exchange resp={'orderID': '8a993999-f3d4-4c4d-1b28-9bcaed242d75', 'clOrdID': 'ab87019297a5427f8ad135a9209c6899', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 295, 'price': 387.3, 'displayQty': None, 'stopPx': 387.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': 295, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 17, 23, 0, 20, 340000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 23, 0, 20, 340000, tzinfo=tzutc())} 2020-09-18 02:00:20 INFO: place new init order {'qty': -295, 'init_price': Decimal('387.34999999999996589394868351519107818603515625'), 'stop_price': Decimal('393.80000000000001136868377216160297393798828125'), 'take_price': Decimal('355.29999999999978399500832892954349517822265625'), 'order_uid': 'ab87019297a5427f8ad135a9209c6899', 'response': {'orderID': '8a993999-f3d4-4c4d-1b28-9bcaed242d75', 'clOrdID': 'ab87019297a5427f8ad135a9209c6899', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 295, 'price': 387.3, 'displayQty': None, 'stopPx': 387.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': 295, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 17, 23, 0, 20, 340000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 23, 0, 20, 340000, tzinfo=tzutc())}} 2020-09-18 02:00:20 INFO: init new order end 2020-09-18 02:00:20 INFO: 2020-09-18 02:00:20 INFO: 2020-09-18 02:00:20 INFO: 2020-09-18 02:00:20 INFO: 2020-09-18 02:02:00 INFO: 2020-09-18 02:02:00 INFO: 2020-09-18 02:02:00 INFO: 2020-09-18 02:02:00 INFO: 2020-09-18 02:02:00 INFO: clearing start 2020-09-18 02:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-18 02:02:00 INFO: skip by not found init order into storage 2020-09-18 02:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-18 02:02:00 INFO: skip by not found init order into storage 2020-09-18 02:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '8a993999-f3d4-4c4d-1b28-9bcaed242d75', 'clOrdID': 'ab87019297a5427f8ad135a9209c6899', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 295, 'price': 387.3, 'displayQty': None, 'stopPx': 387.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': 295, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 17, 23, 0, 20, 340000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 23, 0, 20, 340000, tzinfo=tzutc())} 2020-09-18 02:02:00 INFO: order time=2020-09-17 23:00:20.340000+00:00; delta from now UTC=0:01:40.180750 time_delta.total_seconds()=100.18075; time_diff_offset='3600' 2020-09-18 02:02:00 INFO: skip by time diff 2020-09-17 23:00:20.340000+00:00 2020-09-18 02:02:00 INFO: clearing end 2020-09-18 02:02:00 INFO: 2020-09-18 02:02:00 INFO: 2020-09-18 02:02:00 INFO: 2020-09-18 02:02:00 INFO: 2020-09-18 03:00:20 INFO: 2020-09-18 03:00:20 INFO: 2020-09-18 03:00:20 INFO: 2020-09-18 03:00:20 INFO: 2020-09-18 03:00:20 INFO: init new order start 2020-09-18 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 18, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.3, 'high': 390.85, 'low': 388.25, 'close': 389.95, 'trades': 2444, 'volume': 1617764, 'vwap': 389.86, 'lastSize': 534, 'turnover': 63070066035, 'homeNotional': 17687.823523186773, 'foreignNotional': 6895769.433300523}, {'timestamp': datetime.datetime(2020, 9, 17, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.4, 'high': 393.8, 'low': 387.4, 'close': 388.3, 'trades': 5865, 'volume': 3284993, 'vwap': 390.26, 'lastSize': 661, 'turnover': 128197803980, 'homeNotional': 35925.06242179918, 'foreignNotional': 14019921.42257393}, {'timestamp': datetime.datetime(2020, 9, 17, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.65, 'high': 394.45, 'low': 392.55, 'close': 393.4, 'trades': 2754, 'volume': 2079217, 'vwap': 393.57, 'lastSize': 100, 'turnover': 81830490715, 'homeNotional': 22768.407707206487, 'foreignNotional': 8960825.119439516}] 2020-09-18 03:00:20 INFO: prepare candles [CandleItem(low=388.25, high=390.85, open=388.3, close=389.95, color='GREEN'), CandleItem(low=387.4, high=393.8, open=393.4, close=388.3, color='RED'), CandleItem(low=392.55, high=394.45, open=392.65, close=393.4, color='GREEN')] 2020-09-18 03:00:20 INFO: skip by colors first_candle=CandleItem(low=392.55, high=394.45, open=392.65, close=393.4, color='GREEN') second_candle=CandleItem(low=387.4, high=393.8, open=393.4, close=388.3, color='RED') last_candle=CandleItem(low=388.25, high=390.85, open=388.3, close=389.95, color='GREEN') 2020-09-18 03:00:20 INFO: check need new order None 2020-09-18 03:00:20 INFO: init new order end 2020-09-18 03:00:20 INFO: 2020-09-18 03:00:20 INFO: 2020-09-18 03:00:20 INFO: 2020-09-18 03:00:20 INFO: 2020-09-18 03:02:00 INFO: 2020-09-18 03:02:00 INFO: 2020-09-18 03:02:00 INFO: 2020-09-18 03:02:00 INFO: 2020-09-18 03:02:00 INFO: clearing start 2020-09-18 03:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-18 03:02:00 INFO: skip by not found init order into storage 2020-09-18 03:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-18 03:02:00 INFO: skip by not found init order into storage 2020-09-18 03:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '8a993999-f3d4-4c4d-1b28-9bcaed242d75', 'clOrdID': 'ab87019297a5427f8ad135a9209c6899', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 295, 'price': 387.3, 'displayQty': None, 'stopPx': 387.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': 295, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 17, 23, 0, 20, 340000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 23, 0, 20, 340000, tzinfo=tzutc())} 2020-09-18 03:02:00 INFO: order time=2020-09-17 23:00:20.340000+00:00; delta from now UTC=1:01:39.887084 time_delta.total_seconds()=3699.887084; time_diff_offset='3600' 2020-09-18 03:02:00 INFO: clear order ab87019297a5427f8ad135a9209c6899 2020-09-18 03:02:00 INFO: process event {'orderID': '8a993999-f3d4-4c4d-1b28-9bcaed242d75', 'ordStatus': 'Canceled', 'leavesQty': 0, 'text': 'Canceled: cancelled by clearing\nInit order by supervisor.py', 'timestamp': '2020-09-18T00:02:00.252Z', 'clOrdID': 'ab87019297a5427f8ad135a9209c6899', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-18 03:02:00 INFO: skip event ab87019297a5427f8ad135a9209c6899 Canceled 2020-09-18 03:02:00 INFO: cancel order resp=[{'orderID': '8a993999-f3d4-4c4d-1b28-9bcaed242d75', 'clOrdID': 'ab87019297a5427f8ad135a9209c6899', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 295, 'price': 387.3, 'displayQty': None, 'stopPx': 387.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, 9, 17, 23, 0, 20, 340000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 18, 0, 2, 0, 252000, tzinfo=tzutc())}] 2020-09-18 03:02:00 INFO: clearing end 2020-09-18 03:02:00 INFO: 2020-09-18 03:02:00 INFO: 2020-09-18 03:02:00 INFO: 2020-09-18 03:02:00 INFO: 2020-09-18 04:00:20 INFO: 2020-09-18 04:00:20 INFO: 2020-09-18 04:00:20 INFO: 2020-09-18 04:00:20 INFO: 2020-09-18 04:00:20 INFO: init new order start 2020-09-18 04:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 18, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.95, 'high': 392.8, 'low': 386.8, 'close': 387.7, 'trades': 4982, 'volume': 2925157, 'vwap': 389.64, 'lastSize': 1, 'turnover': 113974385160, 'homeNotional': 31969.677654137162, 'foreignNotional': 12456620.309605211}, {'timestamp': datetime.datetime(2020, 9, 18, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.3, 'high': 390.85, 'low': 388.25, 'close': 389.95, 'trades': 2444, 'volume': 1617764, 'vwap': 389.86, 'lastSize': 534, 'turnover': 63070066035, 'homeNotional': 17687.823523186773, 'foreignNotional': 6895769.433300523}, {'timestamp': datetime.datetime(2020, 9, 17, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.4, 'high': 393.8, 'low': 387.4, 'close': 388.3, 'trades': 5865, 'volume': 3284993, 'vwap': 390.26, 'lastSize': 661, 'turnover': 128197803980, 'homeNotional': 35925.06242179918, 'foreignNotional': 14019921.42257393}] 2020-09-18 04:00:20 INFO: prepare candles [CandleItem(low=386.8, high=392.8, open=389.95, close=387.7, color='RED'), CandleItem(low=388.25, high=390.85, open=388.3, close=389.95, color='GREEN'), CandleItem(low=387.4, high=393.8, open=393.4, close=388.3, color='RED')] 2020-09-18 04:00:20 INFO: skip by colors first_candle=CandleItem(low=387.4, high=393.8, open=393.4, close=388.3, color='RED') second_candle=CandleItem(low=388.25, high=390.85, open=388.3, close=389.95, color='GREEN') last_candle=CandleItem(low=386.8, high=392.8, open=389.95, close=387.7, color='RED') 2020-09-18 04:00:20 INFO: check need new order None 2020-09-18 04:00:20 INFO: init new order end 2020-09-18 04:00:20 INFO: 2020-09-18 04:00:20 INFO: 2020-09-18 04:00:20 INFO: 2020-09-18 04:00:20 INFO: 2020-09-18 04:02:00 INFO: 2020-09-18 04:02:00 INFO: 2020-09-18 04:02:00 INFO: 2020-09-18 04:02:00 INFO: 2020-09-18 04:02:00 INFO: clearing start 2020-09-18 04:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-18 04:02:00 INFO: skip by not found init order into storage 2020-09-18 04:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-18 04:02:00 INFO: skip by not found init order into storage 2020-09-18 04:02:00 INFO: clearing end 2020-09-18 04:02:00 INFO: 2020-09-18 04:02:00 INFO: 2020-09-18 04:02:00 INFO: 2020-09-18 04:02:00 INFO: 2020-09-18 05:00:20 INFO: 2020-09-18 05:00:20 INFO: 2020-09-18 05:00:20 INFO: 2020-09-18 05:00:20 INFO: 2020-09-18 05:00:20 INFO: init new order start 2020-09-18 05:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 18, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.7, 'high': 388.3, 'low': 386.1, 'close': 387.05, 'trades': 2951, 'volume': 2069972, 'vwap': 386.92, 'lastSize': 1, 'turnover': 80090820155, 'homeNotional': 22571.603248025265, 'foreignNotional': 8733356.352776974}, {'timestamp': datetime.datetime(2020, 9, 18, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.95, 'high': 392.8, 'low': 386.8, 'close': 387.7, 'trades': 4982, 'volume': 2925157, 'vwap': 389.64, 'lastSize': 1, 'turnover': 113974385160, 'homeNotional': 31969.677654137162, 'foreignNotional': 12456620.309605211}, {'timestamp': datetime.datetime(2020, 9, 18, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.3, 'high': 390.85, 'low': 388.25, 'close': 389.95, 'trades': 2444, 'volume': 1617764, 'vwap': 389.86, 'lastSize': 534, 'turnover': 63070066035, 'homeNotional': 17687.823523186773, 'foreignNotional': 6895769.433300523}] 2020-09-18 05:00:20 INFO: prepare candles [CandleItem(low=386.1, high=388.3, open=387.7, close=387.05, color='RED'), CandleItem(low=386.8, high=392.8, open=389.95, close=387.7, color='RED'), CandleItem(low=388.25, high=390.85, open=388.3, close=389.95, color='GREEN')] 2020-09-18 05:00:20 INFO: skip by colors first_candle=CandleItem(low=388.25, high=390.85, open=388.3, close=389.95, color='GREEN') second_candle=CandleItem(low=386.8, high=392.8, open=389.95, close=387.7, color='RED') last_candle=CandleItem(low=386.1, high=388.3, open=387.7, close=387.05, color='RED') 2020-09-18 05:00:20 INFO: check need new order None 2020-09-18 05:00:20 INFO: init new order end 2020-09-18 05:00:20 INFO: 2020-09-18 05:00:20 INFO: 2020-09-18 05:00:20 INFO: 2020-09-18 05:00:20 INFO: 2020-09-18 05:02:00 INFO: 2020-09-18 05:02:00 INFO: 2020-09-18 05:02:00 INFO: 2020-09-18 05:02:00 INFO: 2020-09-18 05:02:00 INFO: clearing start 2020-09-18 05:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-18 05:02:00 INFO: skip by not found init order into storage 2020-09-18 05:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-18 05:02:00 INFO: skip by not found init order into storage 2020-09-18 05:02:00 INFO: clearing end 2020-09-18 05:02:00 INFO: 2020-09-18 05:02:00 INFO: 2020-09-18 05:02:00 INFO: 2020-09-18 05:02:00 INFO: 2020-09-18 06:00:20 INFO: 2020-09-18 06:00:20 INFO: 2020-09-18 06:00:20 INFO: 2020-09-18 06:00:20 INFO: 2020-09-18 06:00:20 INFO: init new order start 2020-09-18 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 18, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.05, 'high': 388.45, 'low': 386.95, 'close': 387.75, 'trades': 1844, 'volume': 1070642, 'vwap': 387.59, 'lastSize': 16917, 'turnover': 41496849205, 'homeNotional': 11691.970780692833, 'foreignNotional': 4531674.822538295}, {'timestamp': datetime.datetime(2020, 9, 18, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.7, 'high': 388.3, 'low': 386.1, 'close': 387.05, 'trades': 2951, 'volume': 2069972, 'vwap': 386.92, 'lastSize': 1, 'turnover': 80090820155, 'homeNotional': 22571.603248025265, 'foreignNotional': 8733356.352776974}, {'timestamp': datetime.datetime(2020, 9, 18, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.95, 'high': 392.8, 'low': 386.8, 'close': 387.7, 'trades': 4982, 'volume': 2925157, 'vwap': 389.64, 'lastSize': 1, 'turnover': 113974385160, 'homeNotional': 31969.677654137162, 'foreignNotional': 12456620.309605211}] 2020-09-18 06:00:20 INFO: prepare candles [CandleItem(low=386.95, high=388.45, open=387.05, close=387.75, color='GREEN'), CandleItem(low=386.1, high=388.3, open=387.7, close=387.05, color='RED'), CandleItem(low=386.8, high=392.8, open=389.95, close=387.7, color='RED')] 2020-09-18 06:00:20 INFO: last_candle=CandleItem(low=386.95, high=388.45, open=387.05, close=387.75, color='GREEN') 2020-09-18 06: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-18 06: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=386.95, high=388.45, open=387.05, close=387.75, color='GREEN') 2020-09-18 06:00:20 INFO: skip by CandleItem(low=386.95, high=388.45, open=387.05, close=387.75, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-18 06: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-18 06: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=386.95, high=388.45, open=387.05, close=387.75, color='GREEN') 2020-09-18 06:00:20 INFO: skip by CandleItem(low=386.95, high=388.45, open=387.05, close=387.75, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-18 06:00:20 INFO: not found applicable config for candle 2020-09-18 06:00:20 INFO: check need new order None 2020-09-18 06:00:20 INFO: init new order end 2020-09-18 06:00:20 INFO: 2020-09-18 06:00:20 INFO: 2020-09-18 06:00:20 INFO: 2020-09-18 06:00:20 INFO: 2020-09-18 06:02:00 INFO: 2020-09-18 06:02:00 INFO: 2020-09-18 06:02:00 INFO: 2020-09-18 06:02:00 INFO: 2020-09-18 06:02:00 INFO: clearing start 2020-09-18 06:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-18 06:02:00 INFO: skip by not found init order into storage 2020-09-18 06:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-18 06:02:00 INFO: skip by not found init order into storage 2020-09-18 06:02:00 INFO: clearing end 2020-09-18 06:02:00 INFO: 2020-09-18 06:02:00 INFO: 2020-09-18 06:02:00 INFO: 2020-09-18 06:02:00 INFO: 2020-09-18 07:00:20 INFO: 2020-09-18 07:00:20 INFO: 2020-09-18 07:00:20 INFO: 2020-09-18 07:00:20 INFO: 2020-09-18 07:00:20 INFO: init new order start 2020-09-18 07:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 18, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.75, 'high': 388.0, 'low': 386.9, 'close': 387.7, 'trades': 1509, 'volume': 1162079, 'vwap': 387.51, 'lastSize': 324, 'turnover': 45030810010, 'homeNotional': 12703.20825400621, 'foreignNotional': 4922519.798865686}, {'timestamp': datetime.datetime(2020, 9, 18, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.05, 'high': 388.45, 'low': 386.95, 'close': 387.75, 'trades': 1844, 'volume': 1070642, 'vwap': 387.59, 'lastSize': 16917, 'turnover': 41496849205, 'homeNotional': 11691.970780692833, 'foreignNotional': 4531674.822538295}, {'timestamp': datetime.datetime(2020, 9, 18, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.7, 'high': 388.3, 'low': 386.1, 'close': 387.05, 'trades': 2951, 'volume': 2069972, 'vwap': 386.92, 'lastSize': 1, 'turnover': 80090820155, 'homeNotional': 22571.603248025265, 'foreignNotional': 8733356.352776974}] 2020-09-18 07:00:21 INFO: prepare candles [CandleItem(low=386.9, high=388.0, open=387.75, close=387.7, color='RED'), CandleItem(low=386.95, high=388.45, open=387.05, close=387.75, color='GREEN'), CandleItem(low=386.1, high=388.3, open=387.7, close=387.05, color='RED')] 2020-09-18 07:00:21 INFO: skip by colors first_candle=CandleItem(low=386.1, high=388.3, open=387.7, close=387.05, color='RED') second_candle=CandleItem(low=386.95, high=388.45, open=387.05, close=387.75, color='GREEN') last_candle=CandleItem(low=386.9, high=388.0, open=387.75, close=387.7, color='RED') 2020-09-18 07:00:21 INFO: check need new order None 2020-09-18 07:00:21 INFO: init new order end 2020-09-18 07:00:21 INFO: 2020-09-18 07:00:21 INFO: 2020-09-18 07:00:21 INFO: 2020-09-18 07:00:21 INFO: 2020-09-18 07:02:00 INFO: 2020-09-18 07:02:00 INFO: 2020-09-18 07:02:00 INFO: 2020-09-18 07:02:00 INFO: 2020-09-18 07:02:00 INFO: clearing start 2020-09-18 07:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-18 07:02:00 INFO: skip by not found init order into storage 2020-09-18 07:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-18 07:02:00 INFO: skip by not found init order into storage 2020-09-18 07:02:00 INFO: clearing end 2020-09-18 07:02:00 INFO: 2020-09-18 07:02:00 INFO: 2020-09-18 07:02:00 INFO: 2020-09-18 07:02:00 INFO: 2020-09-18 08:00:20 INFO: 2020-09-18 08:00:20 INFO: 2020-09-18 08:00:20 INFO: 2020-09-18 08:00:20 INFO: 2020-09-18 08:00:20 INFO: init new order start 2020-09-18 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 18, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.7, 'high': 387.75, 'low': 382.5, 'close': 383.85, 'trades': 5675, 'volume': 4951942, 'vwap': 384.48, 'lastSize': 25, 'turnover': 190387461690, 'homeNotional': 53978.848750881334, 'foreignNotional': 20753297.34463201}, {'timestamp': datetime.datetime(2020, 9, 18, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.75, 'high': 388.0, 'low': 386.9, 'close': 387.7, 'trades': 1509, 'volume': 1162079, 'vwap': 387.51, 'lastSize': 324, 'turnover': 45030810010, 'homeNotional': 12703.20825400621, 'foreignNotional': 4922519.798865686}, {'timestamp': datetime.datetime(2020, 9, 18, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.05, 'high': 388.45, 'low': 386.95, 'close': 387.75, 'trades': 1844, 'volume': 1070642, 'vwap': 387.59, 'lastSize': 16917, 'turnover': 41496849205, 'homeNotional': 11691.970780692833, 'foreignNotional': 4531674.822538295}] 2020-09-18 08:00:20 INFO: prepare candles [CandleItem(low=382.5, high=387.75, open=387.7, close=383.85, color='RED'), CandleItem(low=386.9, high=388.0, open=387.75, close=387.7, color='RED'), CandleItem(low=386.95, high=388.45, open=387.05, close=387.75, color='GREEN')] 2020-09-18 08:00:20 INFO: skip by colors first_candle=CandleItem(low=386.95, high=388.45, open=387.05, close=387.75, color='GREEN') second_candle=CandleItem(low=386.9, high=388.0, open=387.75, close=387.7, color='RED') last_candle=CandleItem(low=382.5, high=387.75, open=387.7, close=383.85, color='RED') 2020-09-18 08:00:20 INFO: check need new order None 2020-09-18 08:00:20 INFO: init new order end 2020-09-18 08:00:20 INFO: 2020-09-18 08:00:20 INFO: 2020-09-18 08:00:20 INFO: 2020-09-18 08:00:20 INFO: 2020-09-18 08:02:00 INFO: 2020-09-18 08:02:00 INFO: 2020-09-18 08:02:00 INFO: 2020-09-18 08:02:00 INFO: 2020-09-18 08:02:00 INFO: clearing start 2020-09-18 08:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-18 08:02:01 INFO: skip by not found init order into storage 2020-09-18 08:02:01 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-18 08:02:01 INFO: skip by not found init order into storage 2020-09-18 08:02:01 INFO: clearing end 2020-09-18 08:02:01 INFO: 2020-09-18 08:02:01 INFO: 2020-09-18 08:02:01 INFO: 2020-09-18 08:02:01 INFO: 2020-09-18 09:00:20 INFO: 2020-09-18 09:00:20 INFO: 2020-09-18 09:00:20 INFO: 2020-09-18 09:00:20 INFO: 2020-09-18 09:00:20 INFO: init new order start 2020-09-18 09:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 18, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.85, 'high': 385.9, 'low': 383.05, 'close': 385.85, 'trades': 1875, 'volume': 1494394, 'vwap': 384.54, 'lastSize': 196, 'turnover': 57464004295, 'homeNotional': 16311.531291579755, 'foreignNotional': 6272291.033988291}, {'timestamp': datetime.datetime(2020, 9, 18, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.7, 'high': 387.75, 'low': 382.5, 'close': 383.85, 'trades': 5675, 'volume': 4951942, 'vwap': 384.48, 'lastSize': 25, 'turnover': 190387461690, 'homeNotional': 53978.848750881334, 'foreignNotional': 20753297.34463201}, {'timestamp': datetime.datetime(2020, 9, 18, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.75, 'high': 388.0, 'low': 386.9, 'close': 387.7, 'trades': 1509, 'volume': 1162079, 'vwap': 387.51, 'lastSize': 324, 'turnover': 45030810010, 'homeNotional': 12703.20825400621, 'foreignNotional': 4922519.798865686}] 2020-09-18 09:00:20 INFO: prepare candles [CandleItem(low=383.05, high=385.9, open=383.85, close=385.85, color='GREEN'), CandleItem(low=382.5, high=387.75, open=387.7, close=383.85, color='RED'), CandleItem(low=386.9, high=388.0, open=387.75, close=387.7, color='RED')] 2020-09-18 09:00:20 INFO: last_candle=CandleItem(low=383.05, high=385.9, open=383.85, close=385.85, color='GREEN') 2020-09-18 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-09-18 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=383.05, high=385.9, open=383.85, close=385.85, color='GREEN') 2020-09-18 09:00:20 INFO: skip by CandleItem(low=383.05, high=385.9, open=383.85, close=385.85, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-18 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-09-18 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=383.05, high=385.9, open=383.85, close=385.85, color='GREEN') 2020-09-18 09:00:20 INFO: skip by CandleItem(low=383.05, high=385.9, open=383.85, close=385.85, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-18 09:00:20 INFO: not found applicable config for candle 2020-09-18 09:00:20 INFO: check need new order None 2020-09-18 09:00:20 INFO: init new order end 2020-09-18 09:00:20 INFO: 2020-09-18 09:00:20 INFO: 2020-09-18 09:00:20 INFO: 2020-09-18 09:00:20 INFO: 2020-09-18 09:02:00 INFO: 2020-09-18 09:02:00 INFO: 2020-09-18 09:02:00 INFO: 2020-09-18 09:02:00 INFO: 2020-09-18 09:02:00 INFO: clearing start 2020-09-18 09:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-18 09:02:00 INFO: skip by not found init order into storage 2020-09-18 09:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-18 09:02:00 INFO: skip by not found init order into storage 2020-09-18 09:02:00 INFO: clearing end 2020-09-18 09:02:00 INFO: 2020-09-18 09:02:00 INFO: 2020-09-18 09:02:00 INFO: 2020-09-18 09:02:00 INFO: 2020-09-18 10:00:20 INFO: 2020-09-18 10:00:20 INFO: 2020-09-18 10:00:20 INFO: 2020-09-18 10:00:20 INFO: 2020-09-18 10:00:20 INFO: init new order start 2020-09-18 10:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 18, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.85, 'high': 388.95, 'low': 384.55, 'close': 388.55, 'trades': 3207, 'volume': 2365839, 'vwap': 386.67, 'lastSize': 500, 'turnover': 91479800360, 'homeNotional': 25888.2915858755, 'foreignNotional': 10010279.683274545}, {'timestamp': datetime.datetime(2020, 9, 18, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.85, 'high': 385.9, 'low': 383.05, 'close': 385.85, 'trades': 1875, 'volume': 1494394, 'vwap': 384.54, 'lastSize': 196, 'turnover': 57464004295, 'homeNotional': 16311.531291579755, 'foreignNotional': 6272291.033988291}, {'timestamp': datetime.datetime(2020, 9, 18, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.7, 'high': 387.75, 'low': 382.5, 'close': 383.85, 'trades': 5675, 'volume': 4951942, 'vwap': 384.48, 'lastSize': 25, 'turnover': 190387461690, 'homeNotional': 53978.848750881334, 'foreignNotional': 20753297.34463201}] 2020-09-18 10:00:20 INFO: prepare candles [CandleItem(low=384.55, high=388.95, open=385.85, close=388.55, color='GREEN'), CandleItem(low=383.05, high=385.9, open=383.85, close=385.85, color='GREEN'), CandleItem(low=382.5, high=387.75, open=387.7, close=383.85, color='RED')] 2020-09-18 10:00:20 INFO: skip by colors first_candle=CandleItem(low=382.5, high=387.75, open=387.7, close=383.85, color='RED') second_candle=CandleItem(low=383.05, high=385.9, open=383.85, close=385.85, color='GREEN') last_candle=CandleItem(low=384.55, high=388.95, open=385.85, close=388.55, color='GREEN') 2020-09-18 10:00:20 INFO: check need new order None 2020-09-18 10:00:20 INFO: init new order end 2020-09-18 10:00:20 INFO: 2020-09-18 10:00:20 INFO: 2020-09-18 10:00:20 INFO: 2020-09-18 10:00:20 INFO: 2020-09-18 10:02:00 INFO: 2020-09-18 10:02:00 INFO: 2020-09-18 10:02:00 INFO: 2020-09-18 10:02:00 INFO: 2020-09-18 10:02:00 INFO: clearing start 2020-09-18 10:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-18 10:02:00 INFO: skip by not found init order into storage 2020-09-18 10:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-18 10:02:00 INFO: skip by not found init order into storage 2020-09-18 10:02:00 INFO: clearing end 2020-09-18 10:02:00 INFO: 2020-09-18 10:02:00 INFO: 2020-09-18 10:02:00 INFO: 2020-09-18 10:02:00 INFO: 2020-09-18 11:00:20 INFO: 2020-09-18 11:00:20 INFO: 2020-09-18 11:00:20 INFO: 2020-09-18 11:00:20 INFO: 2020-09-18 11:00:20 INFO: init new order start 2020-09-18 11:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 18, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.55, 'high': 388.6, 'low': 385.25, 'close': 386.75, 'trades': 2052, 'volume': 1632075, 'vwap': 387.0, 'lastSize': 25, 'turnover': 63161132410, 'homeNotional': 17883.453173960894, 'foreignNotional': 6920880.7368887}, {'timestamp': datetime.datetime(2020, 9, 18, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.85, 'high': 388.95, 'low': 384.55, 'close': 388.55, 'trades': 3207, 'volume': 2365839, 'vwap': 386.67, 'lastSize': 500, 'turnover': 91479800360, 'homeNotional': 25888.2915858755, 'foreignNotional': 10010279.683274545}, {'timestamp': datetime.datetime(2020, 9, 18, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.85, 'high': 385.9, 'low': 383.05, 'close': 385.85, 'trades': 1875, 'volume': 1494394, 'vwap': 384.54, 'lastSize': 196, 'turnover': 57464004295, 'homeNotional': 16311.531291579755, 'foreignNotional': 6272291.033988291}] 2020-09-18 11:00:20 INFO: prepare candles [CandleItem(low=385.25, high=388.6, open=388.55, close=386.75, color='RED'), CandleItem(low=384.55, high=388.95, open=385.85, close=388.55, color='GREEN'), CandleItem(low=383.05, high=385.9, open=383.85, close=385.85, color='GREEN')] 2020-09-18 11:00:20 INFO: last_candle=CandleItem(low=385.25, high=388.6, open=388.55, close=386.75, color='RED') 2020-09-18 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-09-18 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=385.25, high=388.6, open=388.55, close=386.75, color='RED') 2020-09-18 11:00:20 INFO: skip by CandleItem(low=385.25, high=388.6, open=388.55, close=386.75, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-18 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-09-18 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=385.25, high=388.6, open=388.55, close=386.75, color='RED') 2020-09-18 11:00:20 INFO: skip by CandleItem(low=385.25, high=388.6, open=388.55, close=386.75, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-18 11:00:20 INFO: not found applicable config for candle 2020-09-18 11:00:20 INFO: check need new order None 2020-09-18 11:00:20 INFO: init new order end 2020-09-18 11:00:20 INFO: 2020-09-18 11:00:20 INFO: 2020-09-18 11:00:20 INFO: 2020-09-18 11:00:20 INFO: 2020-09-18 11:02:00 INFO: 2020-09-18 11:02:00 INFO: 2020-09-18 11:02:00 INFO: 2020-09-18 11:02:00 INFO: 2020-09-18 11:02:00 INFO: clearing start 2020-09-18 11:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-18 11:02:00 INFO: skip by not found init order into storage 2020-09-18 11:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-18 11:02:00 INFO: skip by not found init order into storage 2020-09-18 11:02:00 INFO: clearing end 2020-09-18 11:02:00 INFO: 2020-09-18 11:02:00 INFO: 2020-09-18 11:02:00 INFO: 2020-09-18 11:02:00 INFO: 2020-09-18 12:00:20 INFO: 2020-09-18 12:00:20 INFO: 2020-09-18 12:00:20 INFO: 2020-09-18 12:00:20 INFO: 2020-09-18 12:00:20 INFO: init new order start 2020-09-18 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 18, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.75, 'high': 387.45, 'low': 384.55, 'close': 387.45, 'trades': 2631, 'volume': 1555516, 'vwap': 386.09, 'lastSize': 2, 'turnover': 60055834785, 'homeNotional': 17027.095417575485, 'foreignNotional': 6573881.019395407}, {'timestamp': datetime.datetime(2020, 9, 18, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.55, 'high': 388.6, 'low': 385.25, 'close': 386.75, 'trades': 2052, 'volume': 1632075, 'vwap': 387.0, 'lastSize': 25, 'turnover': 63161132410, 'homeNotional': 17883.453173960894, 'foreignNotional': 6920880.7368887}, {'timestamp': datetime.datetime(2020, 9, 18, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.85, 'high': 388.95, 'low': 384.55, 'close': 388.55, 'trades': 3207, 'volume': 2365839, 'vwap': 386.67, 'lastSize': 500, 'turnover': 91479800360, 'homeNotional': 25888.2915858755, 'foreignNotional': 10010279.683274545}] 2020-09-18 12:00:20 INFO: prepare candles [CandleItem(low=384.55, high=387.45, open=386.75, close=387.45, color='GREEN'), CandleItem(low=385.25, high=388.6, open=388.55, close=386.75, color='RED'), CandleItem(low=384.55, high=388.95, open=385.85, close=388.55, color='GREEN')] 2020-09-18 12:00:20 INFO: skip by colors first_candle=CandleItem(low=384.55, high=388.95, open=385.85, close=388.55, color='GREEN') second_candle=CandleItem(low=385.25, high=388.6, open=388.55, close=386.75, color='RED') last_candle=CandleItem(low=384.55, high=387.45, open=386.75, close=387.45, color='GREEN') 2020-09-18 12:00:20 INFO: check need new order None 2020-09-18 12:00:20 INFO: init new order end 2020-09-18 12:00:20 INFO: 2020-09-18 12:00:20 INFO: 2020-09-18 12:00:20 INFO: 2020-09-18 12:00:20 INFO: 2020-09-18 12:02:00 INFO: 2020-09-18 12:02:00 INFO: 2020-09-18 12:02:00 INFO: 2020-09-18 12:02:00 INFO: 2020-09-18 12:02:00 INFO: clearing start 2020-09-18 12:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-18 12:02:00 INFO: skip by not found init order into storage 2020-09-18 12:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-18 12:02:00 INFO: skip by not found init order into storage 2020-09-18 12:02:00 INFO: clearing end 2020-09-18 12:02:00 INFO: 2020-09-18 12:02:00 INFO: 2020-09-18 12:02:00 INFO: 2020-09-18 12:02:00 INFO: 2020-09-18 13:00:20 INFO: 2020-09-18 13:00:20 INFO: 2020-09-18 13:00:20 INFO: 2020-09-18 13:00:20 INFO: 2020-09-18 13:00:20 INFO: init new order start 2020-09-18 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 18, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.45, 'high': 389.3, 'low': 386.95, 'close': 388.55, 'trades': 2763, 'volume': 2807495, 'vwap': 388.2, 'lastSize': 11, 'turnover': 108984599580, 'homeNotional': 30852.726849260816, 'foreignNotional': 11976796.671081802}, {'timestamp': datetime.datetime(2020, 9, 18, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.75, 'high': 387.45, 'low': 384.55, 'close': 387.45, 'trades': 2631, 'volume': 1555516, 'vwap': 386.09, 'lastSize': 2, 'turnover': 60055834785, 'homeNotional': 17027.095417575485, 'foreignNotional': 6573881.019395407}, {'timestamp': datetime.datetime(2020, 9, 18, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.55, 'high': 388.6, 'low': 385.25, 'close': 386.75, 'trades': 2052, 'volume': 1632075, 'vwap': 387.0, 'lastSize': 25, 'turnover': 63161132410, 'homeNotional': 17883.453173960894, 'foreignNotional': 6920880.7368887}] 2020-09-18 13:00:20 INFO: prepare candles [CandleItem(low=386.95, high=389.3, open=387.45, close=388.55, color='GREEN'), CandleItem(low=384.55, high=387.45, open=386.75, close=387.45, color='GREEN'), CandleItem(low=385.25, high=388.6, open=388.55, close=386.75, color='RED')] 2020-09-18 13:00:20 INFO: skip by colors first_candle=CandleItem(low=385.25, high=388.6, open=388.55, close=386.75, color='RED') second_candle=CandleItem(low=384.55, high=387.45, open=386.75, close=387.45, color='GREEN') last_candle=CandleItem(low=386.95, high=389.3, open=387.45, close=388.55, color='GREEN') 2020-09-18 13:00:20 INFO: check need new order None 2020-09-18 13:00:20 INFO: init new order end 2020-09-18 13:00:20 INFO: 2020-09-18 13:00:20 INFO: 2020-09-18 13:00:20 INFO: 2020-09-18 13:00:20 INFO: 2020-09-18 13:02:00 INFO: 2020-09-18 13:02:00 INFO: 2020-09-18 13:02:00 INFO: 2020-09-18 13:02:00 INFO: 2020-09-18 13:02:00 INFO: clearing start 2020-09-18 13:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-18 13:02:00 INFO: skip by not found init order into storage 2020-09-18 13:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-18 13:02:00 INFO: skip by not found init order into storage 2020-09-18 13:02:00 INFO: clearing end 2020-09-18 13:02:00 INFO: 2020-09-18 13:02:00 INFO: 2020-09-18 13:02:00 INFO: 2020-09-18 13:02:00 INFO: 2020-09-18 14:00:20 INFO: 2020-09-18 14:00:20 INFO: 2020-09-18 14:00:20 INFO: 2020-09-18 14:00:20 INFO: 2020-09-18 14:00:20 INFO: init new order start 2020-09-18 14:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 18, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.55, 'high': 389.0, 'low': 385.7, 'close': 385.8, 'trades': 2321, 'volume': 1516543, 'vwap': 387.28, 'lastSize': 700, 'turnover': 58732404445, 'homeNotional': 16670.341903497672, 'foreignNotional': 6456071.272993006}, {'timestamp': datetime.datetime(2020, 9, 18, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.45, 'high': 389.3, 'low': 386.95, 'close': 388.55, 'trades': 2763, 'volume': 2807495, 'vwap': 388.2, 'lastSize': 11, 'turnover': 108984599580, 'homeNotional': 30852.726849260816, 'foreignNotional': 11976796.671081802}, {'timestamp': datetime.datetime(2020, 9, 18, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.75, 'high': 387.45, 'low': 384.55, 'close': 387.45, 'trades': 2631, 'volume': 1555516, 'vwap': 386.09, 'lastSize': 2, 'turnover': 60055834785, 'homeNotional': 17027.095417575485, 'foreignNotional': 6573881.019395407}] 2020-09-18 14:00:21 INFO: prepare candles [CandleItem(low=385.7, high=389.0, open=388.55, close=385.8, color='RED'), CandleItem(low=386.95, high=389.3, open=387.45, close=388.55, color='GREEN'), CandleItem(low=384.55, high=387.45, open=386.75, close=387.45, color='GREEN')] 2020-09-18 14:00:21 INFO: last_candle=CandleItem(low=385.7, high=389.0, open=388.55, close=385.8, color='RED') 2020-09-18 14: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-18 14: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=385.7, high=389.0, open=388.55, close=385.8, color='RED') 2020-09-18 14:00:21 INFO: skip by CandleItem(low=385.7, high=389.0, open=388.55, close=385.8, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-18 14: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-18 14: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=385.7, high=389.0, open=388.55, close=385.8, color='RED') 2020-09-18 14:00:21 INFO: skip by CandleItem(low=385.7, high=389.0, open=388.55, close=385.8, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-18 14:00:21 INFO: not found applicable config for candle 2020-09-18 14:00:21 INFO: check need new order None 2020-09-18 14:00:21 INFO: init new order end 2020-09-18 14:00:21 INFO: 2020-09-18 14:00:21 INFO: 2020-09-18 14:00:21 INFO: 2020-09-18 14:00:21 INFO: 2020-09-18 14:02:00 INFO: 2020-09-18 14:02:00 INFO: 2020-09-18 14:02:00 INFO: 2020-09-18 14:02:00 INFO: 2020-09-18 14:02:00 INFO: clearing start 2020-09-18 14:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-18 14:02:00 INFO: skip by not found init order into storage 2020-09-18 14:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-18 14:02:00 INFO: skip by not found init order into storage 2020-09-18 14:02:00 INFO: clearing end 2020-09-18 14:02:00 INFO: 2020-09-18 14:02:00 INFO: 2020-09-18 14:02:00 INFO: 2020-09-18 14:02:00 INFO: 2020-09-18 15:00:20 INFO: 2020-09-18 15:00:20 INFO: 2020-09-18 15:00:20 INFO: 2020-09-18 15:00:20 INFO: 2020-09-18 15:00:20 INFO: init new order start 2020-09-18 15:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 18, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.8, 'high': 387.1, 'low': 385.2, 'close': 385.5, 'trades': 2267, 'volume': 1420647, 'vwap': 386.17, 'lastSize': 100, 'turnover': 54860102315, 'homeNotional': 15603.376514571444, 'foreignNotional': 6025448.428402258}, {'timestamp': datetime.datetime(2020, 9, 18, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.55, 'high': 389.0, 'low': 385.7, 'close': 385.8, 'trades': 2321, 'volume': 1516543, 'vwap': 387.28, 'lastSize': 700, 'turnover': 58732404445, 'homeNotional': 16670.341903497672, 'foreignNotional': 6456071.272993006}, {'timestamp': datetime.datetime(2020, 9, 18, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.45, 'high': 389.3, 'low': 386.95, 'close': 388.55, 'trades': 2763, 'volume': 2807495, 'vwap': 388.2, 'lastSize': 11, 'turnover': 108984599580, 'homeNotional': 30852.726849260816, 'foreignNotional': 11976796.671081802}] 2020-09-18 15:00:21 INFO: prepare candles [CandleItem(low=385.2, high=387.1, open=385.8, close=385.5, color='RED'), CandleItem(low=385.7, high=389.0, open=388.55, close=385.8, color='RED'), CandleItem(low=386.95, high=389.3, open=387.45, close=388.55, color='GREEN')] 2020-09-18 15:00:21 INFO: skip by colors first_candle=CandleItem(low=386.95, high=389.3, open=387.45, close=388.55, color='GREEN') second_candle=CandleItem(low=385.7, high=389.0, open=388.55, close=385.8, color='RED') last_candle=CandleItem(low=385.2, high=387.1, open=385.8, close=385.5, color='RED') 2020-09-18 15:00:21 INFO: check need new order None 2020-09-18 15:00:21 INFO: init new order end 2020-09-18 15:00:21 INFO: 2020-09-18 15:00:21 INFO: 2020-09-18 15:00:21 INFO: 2020-09-18 15:00:21 INFO: 2020-09-18 15:02:00 INFO: 2020-09-18 15:02:00 INFO: 2020-09-18 15:02:00 INFO: 2020-09-18 15:02:00 INFO: 2020-09-18 15:02:00 INFO: clearing start 2020-09-18 15:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-18 15:02:00 INFO: skip by not found init order into storage 2020-09-18 15:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-18 15:02:00 INFO: skip by not found init order into storage 2020-09-18 15:02:00 INFO: clearing end 2020-09-18 15:02:00 INFO: 2020-09-18 15:02:00 INFO: 2020-09-18 15:02:00 INFO: 2020-09-18 15:02:00 INFO: 2020-09-18 16:00:20 INFO: 2020-09-18 16:00:20 INFO: 2020-09-18 16:00:20 INFO: 2020-09-18 16:00:20 INFO: 2020-09-18 16:00:20 INFO: init new order start 2020-09-18 16:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 18, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.5, 'high': 387.45, 'low': 385.2, 'close': 387.0, 'trades': 2560, 'volume': 2086010, 'vwap': 386.13, 'lastSize': 10, 'turnover': 80546601015, 'homeNotional': 22891.990139539917, 'foreignNotional': 8839242.242490955}, {'timestamp': datetime.datetime(2020, 9, 18, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.8, 'high': 387.1, 'low': 385.2, 'close': 385.5, 'trades': 2267, 'volume': 1420647, 'vwap': 386.17, 'lastSize': 100, 'turnover': 54860102315, 'homeNotional': 15603.376514571444, 'foreignNotional': 6025448.428402258}, {'timestamp': datetime.datetime(2020, 9, 18, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.55, 'high': 389.0, 'low': 385.7, 'close': 385.8, 'trades': 2321, 'volume': 1516543, 'vwap': 387.28, 'lastSize': 700, 'turnover': 58732404445, 'homeNotional': 16670.341903497672, 'foreignNotional': 6456071.272993006}] 2020-09-18 16:00:20 INFO: prepare candles [CandleItem(low=385.2, high=387.45, open=385.5, close=387.0, color='GREEN'), CandleItem(low=385.2, high=387.1, open=385.8, close=385.5, color='RED'), CandleItem(low=385.7, high=389.0, open=388.55, close=385.8, color='RED')] 2020-09-18 16:00:20 INFO: last_candle=CandleItem(low=385.2, high=387.45, open=385.5, close=387.0, color='GREEN') 2020-09-18 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-09-18 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=385.2, high=387.45, open=385.5, close=387.0, color='GREEN') 2020-09-18 16:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=385.2, high=387.1, open=385.8, close=385.5, color='RED') 2020-09-18 16:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=385.7, high=389.0, open=388.55, close=385.8, color='RED') 2020-09-18 16:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=385.2, high=387.45, open=385.5, close=387.0, color='GREEN'), take_profit_factor=6.0, clearing_interval=3600) 2020-09-18 16:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=385.2, high=387.45, open=385.5, close=387.0, color='GREEN'), take_profit_factor=6.0, clearing_interval=3600) 2020-09-18 16:00:20 INFO: place order: start candle=CandleItem(low=385.2, high=387.45, open=385.5, close=387.0, color='GREEN') ticker='ETHUSD' price_offset=0.1 2020-09-18 16:00:20 INFO: place order: side_factor=-1 init_trigger_price=387.5 init_order_price=387.55 stop_price_offset=0.0 candle.size=2.25 stop_price=385.2 take_price=401.05 2020-09-18 16:00:20 INFO: place order round: side_factor=-1 init_trigger_price=Decimal('387.5') init_order_price=Decimal('387.55000000000001136868377216160297393798828125') stop_price_offset=0.0 candle.size=2.25 stop_price=Decimal('385.19999999999998863131622783839702606201171875') take_price=Decimal('401.05000000000001136868377216160297393798828125') 2020-09-18 16:00:20 INFO: place order: compute qty=826 2020-09-18 16:00:20 INFO: place order: save order to db 62a7e460b5b44e3aa534f29b49219479; response=True 2020-09-18 16:00:20 INFO: post order to exchange resp={'orderID': '202492ec-4211-c27a-8c7a-05ff7d984cae', 'clOrdID': '62a7e460b5b44e3aa534f29b49219479', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 826, 'price': 387.55, 'displayQty': None, 'stopPx': 387.5, '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': 826, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 18, 13, 0, 20, 756000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 18, 13, 0, 20, 756000, tzinfo=tzutc())} 2020-09-18 16:00:20 INFO: place new init order {'qty': 826, 'init_price': Decimal('387.5'), 'stop_price': Decimal('385.19999999999998863131622783839702606201171875'), 'take_price': Decimal('401.05000000000001136868377216160297393798828125'), 'order_uid': '62a7e460b5b44e3aa534f29b49219479', 'response': {'orderID': '202492ec-4211-c27a-8c7a-05ff7d984cae', 'clOrdID': '62a7e460b5b44e3aa534f29b49219479', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 826, 'price': 387.55, 'displayQty': None, 'stopPx': 387.5, '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': 826, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 18, 13, 0, 20, 756000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 18, 13, 0, 20, 756000, tzinfo=tzutc())}} 2020-09-18 16:00:20 INFO: init new order end 2020-09-18 16:00:20 INFO: 2020-09-18 16:00:20 INFO: 2020-09-18 16:00:20 INFO: 2020-09-18 16:00:20 INFO: 2020-09-18 16:00:21 INFO: process event {'orderID': '202492ec-4211-c27a-8c7a-05ff7d984cae', 'clOrdID': '62a7e460b5b44e3aa534f29b49219479', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 826, 'price': 387.55, 'displayQty': None, 'stopPx': 387.5, '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': 826, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-09-18T13:00:20.756Z', 'timestamp': '2020-09-18T13:00:20.756Z'} 2020-09-18 16:00:21 INFO: skip event 62a7e460b5b44e3aa534f29b49219479 New 2020-09-18 16:02:00 INFO: 2020-09-18 16:02:00 INFO: 2020-09-18 16:02:00 INFO: 2020-09-18 16:02:00 INFO: 2020-09-18 16:02:00 INFO: clearing start 2020-09-18 16:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-18 16:02:00 INFO: skip by not found init order into storage 2020-09-18 16:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-18 16:02:00 INFO: skip by not found init order into storage 2020-09-18 16:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '202492ec-4211-c27a-8c7a-05ff7d984cae', 'clOrdID': '62a7e460b5b44e3aa534f29b49219479', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 826, 'price': 387.55, 'displayQty': None, 'stopPx': 387.5, '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': 826, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 18, 13, 0, 20, 756000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 18, 13, 0, 20, 756000, tzinfo=tzutc())} 2020-09-18 16:02:00 INFO: order time=2020-09-18 13:00:20.756000+00:00; delta from now UTC=0:01:40.194366 time_delta.total_seconds()=100.194366; time_diff_offset='3600' 2020-09-18 16:02:00 INFO: skip by time diff 2020-09-18 13:00:20.756000+00:00 2020-09-18 16:02:00 INFO: clearing end 2020-09-18 16:02:00 INFO: 2020-09-18 16:02:00 INFO: 2020-09-18 16:02:00 INFO: 2020-09-18 16:02:00 INFO: 2020-09-18 16:06:28 INFO: process event {'orderID': '202492ec-4211-c27a-8c7a-05ff7d984cae', 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 826, 'avgPx': 387.5, 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'transactTime': '2020-09-18T13:06:28.089Z', 'timestamp': '2020-09-18T13:06:28.089Z', 'clOrdID': '62a7e460b5b44e3aa534f29b49219479', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-18 16:06:28 INFO: add new event={'uid': '62a7e460b5b44e3aa534f29b49219479', 'status': 'Filled'} 2020-09-18 16:06:28 INFO: 2020-09-18 16:06:28 INFO: 2020-09-18 16:06:28 INFO: 2020-09-18 16:06:28 INFO: 2020-09-18 16:06:28 INFO: process event start 2020-09-18 16:06:28 INFO: fetch new order event 62a7e460b5b44e3aa534f29b49219479 2020-09-18 16:06:28 INFO: fetch orders by event init={'stop': '385.19999999999998863131622783839702606201171875', 'take': '401.05000000000001136868377216160297393798828125', 'qty': '826', 'color': 'GREEN', 'ticker': 'ETHUSD', 'clearing_offset': '3600'} profit_pair=None 2020-09-18 16:06:28 INFO: process init order filled 2020-09-18 16:06:28 INFO: save profit orders to storage stop=edb0ef6c2cc9449192f74afa55300602 take=aff86b78a64740558ec5b41757be3b52 2020-09-18 16:06:28 INFO: place profit orders take_price=401.05000000000001136868377216160297393798828125, stop_price=385.19999999999998863131622783839702606201171875, qty=826, color=GREEN, ticker=ETHUSD edb0ef6c2cc9449192f74afa55300602 aff86b78a64740558ec5b41757be3b52 2020-09-18 16:06:28 INFO: place stop order ETHUSD: qty=-826, stop_price=385.19999999999998863131622783839702606201171875, stop_uid=edb0ef6c2cc9449192f74afa55300602 2020-09-18 16:06:28 INFO: exchange resp for stop order={'orderID': '1e84f521-2a8f-1bd9-695d-3a4f220e4299', 'clOrdID': 'edb0ef6c2cc9449192f74afa55300602', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 826, 'price': None, 'displayQty': None, 'stopPx': 385.2, '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': 826, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 18, 13, 6, 28, 402000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 18, 13, 6, 28, 402000, tzinfo=tzutc())} 2020-09-18 16:06:28 INFO: place limit order ETHUSD: qty=-826, price=401.05000000000001136868377216160297393798828125, take_uid=aff86b78a64740558ec5b41757be3b52 2020-09-18 16:06:28 INFO: process event {'orderID': '1e84f521-2a8f-1bd9-695d-3a4f220e4299', 'clOrdID': 'edb0ef6c2cc9449192f74afa55300602', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 826, 'price': None, 'displayQty': None, 'stopPx': 385.2, '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': 826, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': '2020-09-18T13:06:28.402Z', 'timestamp': '2020-09-18T13:06:28.402Z'} 2020-09-18 16:06:28 INFO: skip event edb0ef6c2cc9449192f74afa55300602 New 2020-09-18 16:06:28 INFO: exchange resp for take profit order={'orderID': '9cd422dc-0220-509c-05c7-fd985a98f267', 'clOrdID': 'aff86b78a64740558ec5b41757be3b52', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 826, 'price': 401.05, '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': 826, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 18, 13, 6, 28, 444000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 18, 13, 6, 28, 444000, tzinfo=tzutc())} 2020-09-18 16:06:28 INFO: place profit orders={'stop': {'response': {'orderID': '1e84f521-2a8f-1bd9-695d-3a4f220e4299', 'clOrdID': 'edb0ef6c2cc9449192f74afa55300602', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 826, 'price': None, 'displayQty': None, 'stopPx': 385.2, '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': 826, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 18, 13, 6, 28, 402000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 18, 13, 6, 28, 402000, tzinfo=tzutc())}, 'qty': Decimal('-826'), 'uid': 'edb0ef6c2cc9449192f74afa55300602', 'price': Decimal('385.19999999999998863131622783839702606201171875')}, 'take': {'response': {'orderID': '9cd422dc-0220-509c-05c7-fd985a98f267', 'clOrdID': 'aff86b78a64740558ec5b41757be3b52', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 826, 'price': 401.05, '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': 826, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 18, 13, 6, 28, 444000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 18, 13, 6, 28, 444000, tzinfo=tzutc())}, 'qty': Decimal('-826'), 'uid': 'aff86b78a64740558ec5b41757be3b52', 'price': Decimal('401.05000000000001136868377216160297393798828125')}} 2020-09-18 16:06:28 INFO: process event {'orderID': '9cd422dc-0220-509c-05c7-fd985a98f267', 'clOrdID': 'aff86b78a64740558ec5b41757be3b52', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 826, 'price': 401.05, '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': 826, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': '2020-09-18T13:06:28.444Z', 'timestamp': '2020-09-18T13:06:28.444Z'} 2020-09-18 16:06:28 INFO: skip event aff86b78a64740558ec5b41757be3b52 New 2020-09-18 16:06:28 INFO: rm init order from db 62a7e460b5b44e3aa534f29b49219479 2020-09-18 16:06:28 INFO: end process event_processing_result='proceed init order' 2020-09-18 16:06:28 INFO: 2020-09-18 16:06:28 INFO: 2020-09-18 16:06:28 INFO: 2020-09-18 16:06:28 INFO: 2020-09-18 16:47:32 INFO: process event {'orderID': '1e84f521-2a8f-1bd9-695d-3a4f220e4299', 'price': 384.95, 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 826, 'avgPx': 384.95, 'text': 'Triggered: Order stop price reached\nStop order by trader.py', 'transactTime': '2020-09-18T13:47:32.479Z', 'timestamp': '2020-09-18T13:47:32.479Z', 'clOrdID': 'edb0ef6c2cc9449192f74afa55300602', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-18 16:47:32 INFO: add new event={'uid': 'edb0ef6c2cc9449192f74afa55300602', 'status': 'Filled'} 2020-09-18 16:47:33 INFO: 2020-09-18 16:47:33 INFO: 2020-09-18 16:47:33 INFO: 2020-09-18 16:47:33 INFO: 2020-09-18 16:47:33 INFO: process event start 2020-09-18 16:47:33 INFO: fetch new order event edb0ef6c2cc9449192f74afa55300602 2020-09-18 16:47:33 INFO: fetch orders by event init=None profit_pair=aff86b78a64740558ec5b41757be3b52 2020-09-18 16:47:33 INFO: process profit order filled 2020-09-18 16:47:33 INFO: process event {'orderID': '9cd422dc-0220-509c-05c7-fd985a98f267', 'ordStatus': 'Canceled', 'workingIndicator': False, 'leavesQty': 0, 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'timestamp': '2020-09-18T13:47:33.487Z', 'clOrdID': 'aff86b78a64740558ec5b41757be3b52', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-18 16:47:33 INFO: skip event aff86b78a64740558ec5b41757be3b52 Canceled 2020-09-18 16:47:33 INFO: cancel order=aff86b78a64740558ec5b41757be3b52 [{'orderID': '9cd422dc-0220-509c-05c7-fd985a98f267', 'clOrdID': 'aff86b78a64740558ec5b41757be3b52', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 826, 'price': 401.05, '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, 18, 13, 6, 28, 444000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 18, 13, 47, 33, 487000, tzinfo=tzutc())}] 2020-09-18 16:47:33 INFO: end process event_processing_result='proceed profit order' 2020-09-18 16:47:33 INFO: 2020-09-18 16:47:33 INFO: 2020-09-18 16:47:33 INFO: 2020-09-18 16:47:33 INFO: 2020-09-18 17:00:20 INFO: 2020-09-18 17:00:20 INFO: 2020-09-18 17:00:20 INFO: 2020-09-18 17:00:20 INFO: 2020-09-18 17:00:20 INFO: init new order start 2020-09-18 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 18, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.0, 'high': 387.5, 'low': 383.55, 'close': 383.8, 'trades': 3531, 'volume': 2275059, 'vwap': 385.38, 'lastSize': 960, 'turnover': 87675647555, 'homeNotional': 24941.896132525668, 'foreignNotional': 9612108.103557937}, {'timestamp': datetime.datetime(2020, 9, 18, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.5, 'high': 387.45, 'low': 385.2, 'close': 387.0, 'trades': 2560, 'volume': 2086010, 'vwap': 386.13, 'lastSize': 10, 'turnover': 80546601015, 'homeNotional': 22891.990139539917, 'foreignNotional': 8839242.242490955}, {'timestamp': datetime.datetime(2020, 9, 18, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.8, 'high': 387.1, 'low': 385.2, 'close': 385.5, 'trades': 2267, 'volume': 1420647, 'vwap': 386.17, 'lastSize': 100, 'turnover': 54860102315, 'homeNotional': 15603.376514571444, 'foreignNotional': 6025448.428402258}] 2020-09-18 17:00:20 INFO: prepare candles [CandleItem(low=383.55, high=387.5, open=387.0, close=383.8, color='RED'), CandleItem(low=385.2, high=387.45, open=385.5, close=387.0, color='GREEN'), CandleItem(low=385.2, high=387.1, open=385.8, close=385.5, color='RED')] 2020-09-18 17:00:20 INFO: skip by colors first_candle=CandleItem(low=385.2, high=387.1, open=385.8, close=385.5, color='RED') second_candle=CandleItem(low=385.2, high=387.45, open=385.5, close=387.0, color='GREEN') last_candle=CandleItem(low=383.55, high=387.5, open=387.0, close=383.8, color='RED') 2020-09-18 17:00:20 INFO: check need new order None 2020-09-18 17:00:20 INFO: init new order end 2020-09-18 17:00:20 INFO: 2020-09-18 17:00:20 INFO: 2020-09-18 17:00:20 INFO: 2020-09-18 17:00:20 INFO: 2020-09-18 17:02:00 INFO: 2020-09-18 17:02:00 INFO: 2020-09-18 17:02:00 INFO: 2020-09-18 17:02:00 INFO: 2020-09-18 17:02:00 INFO: clearing start 2020-09-18 17:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-18 17:02:00 INFO: skip by not found init order into storage 2020-09-18 17:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-18 17:02:00 INFO: skip by not found init order into storage 2020-09-18 17:02:00 INFO: clearing end 2020-09-18 17:02:00 INFO: 2020-09-18 17:02:00 INFO: 2020-09-18 17:02:00 INFO: 2020-09-18 17:02:00 INFO: 2020-09-18 18:00:20 INFO: 2020-09-18 18:00:20 INFO: 2020-09-18 18:00:20 INFO: 2020-09-18 18:00:20 INFO: 2020-09-18 18:00:20 INFO: init new order start 2020-09-18 18:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 18, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.8, 'high': 385.85, 'low': 383.55, 'close': 385.75, 'trades': 2206, 'volume': 1352228, 'vwap': 384.97, 'lastSize': 410, 'turnover': 52055485535, 'homeNotional': 14793.671469770063, 'foreignNotional': 5694989.22159313}, {'timestamp': datetime.datetime(2020, 9, 18, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.0, 'high': 387.5, 'low': 383.55, 'close': 383.8, 'trades': 3531, 'volume': 2275059, 'vwap': 385.38, 'lastSize': 960, 'turnover': 87675647555, 'homeNotional': 24941.896132525668, 'foreignNotional': 9612108.103557937}, {'timestamp': datetime.datetime(2020, 9, 18, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.5, 'high': 387.45, 'low': 385.2, 'close': 387.0, 'trades': 2560, 'volume': 2086010, 'vwap': 386.13, 'lastSize': 10, 'turnover': 80546601015, 'homeNotional': 22891.990139539917, 'foreignNotional': 8839242.242490955}] 2020-09-18 18:00:20 INFO: prepare candles [CandleItem(low=383.55, high=385.85, open=383.8, close=385.75, color='GREEN'), CandleItem(low=383.55, high=387.5, open=387.0, close=383.8, color='RED'), CandleItem(low=385.2, high=387.45, open=385.5, close=387.0, color='GREEN')] 2020-09-18 18:00:20 INFO: skip by colors first_candle=CandleItem(low=385.2, high=387.45, open=385.5, close=387.0, color='GREEN') second_candle=CandleItem(low=383.55, high=387.5, open=387.0, close=383.8, color='RED') last_candle=CandleItem(low=383.55, high=385.85, open=383.8, close=385.75, color='GREEN') 2020-09-18 18:00:20 INFO: check need new order None 2020-09-18 18:00:20 INFO: init new order end 2020-09-18 18:00:20 INFO: 2020-09-18 18:00:20 INFO: 2020-09-18 18:00:20 INFO: 2020-09-18 18:00:20 INFO: 2020-09-18 18:02:00 INFO: 2020-09-18 18:02:00 INFO: 2020-09-18 18:02:00 INFO: 2020-09-18 18:02:00 INFO: 2020-09-18 18:02:00 INFO: clearing start 2020-09-18 18:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-18 18:02:00 INFO: skip by not found init order into storage 2020-09-18 18:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-18 18:02:00 INFO: skip by not found init order into storage 2020-09-18 18:02:00 INFO: clearing end 2020-09-18 18:02:00 INFO: 2020-09-18 18:02:00 INFO: 2020-09-18 18:02:00 INFO: 2020-09-18 18:02:00 INFO: 2020-09-18 19:00:20 INFO: 2020-09-18 19:00:20 INFO: 2020-09-18 19:00:20 INFO: 2020-09-18 19:00:20 INFO: 2020-09-18 19:00:20 INFO: init new order start 2020-09-18 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 18, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.75, 'high': 385.75, 'low': 380.35, 'close': 382.55, 'trades': 4756, 'volume': 3945853, 'vwap': 382.05, 'lastSize': 13, 'turnover': 150749074270, 'homeNotional': 42994.44083990929, 'foreignNotional': 16425849.823864125}, {'timestamp': datetime.datetime(2020, 9, 18, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.8, 'high': 385.85, 'low': 383.55, 'close': 385.75, 'trades': 2206, 'volume': 1352228, 'vwap': 384.97, 'lastSize': 410, 'turnover': 52055485535, 'homeNotional': 14793.671469770063, 'foreignNotional': 5694989.22159313}, {'timestamp': datetime.datetime(2020, 9, 18, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.0, 'high': 387.5, 'low': 383.55, 'close': 383.8, 'trades': 3531, 'volume': 2275059, 'vwap': 385.38, 'lastSize': 960, 'turnover': 87675647555, 'homeNotional': 24941.896132525668, 'foreignNotional': 9612108.103557937}] 2020-09-18 19:00:20 INFO: prepare candles [CandleItem(low=380.35, high=385.75, open=385.75, close=382.55, color='RED'), CandleItem(low=383.55, high=385.85, open=383.8, close=385.75, color='GREEN'), CandleItem(low=383.55, high=387.5, open=387.0, close=383.8, color='RED')] 2020-09-18 19:00:20 INFO: skip by colors first_candle=CandleItem(low=383.55, high=387.5, open=387.0, close=383.8, color='RED') second_candle=CandleItem(low=383.55, high=385.85, open=383.8, close=385.75, color='GREEN') last_candle=CandleItem(low=380.35, high=385.75, open=385.75, close=382.55, color='RED') 2020-09-18 19:00:20 INFO: check need new order None 2020-09-18 19:00:20 INFO: init new order end 2020-09-18 19:00:20 INFO: 2020-09-18 19:00:20 INFO: 2020-09-18 19:00:20 INFO: 2020-09-18 19:00:20 INFO: 2020-09-18 19:02:00 INFO: 2020-09-18 19:02:00 INFO: 2020-09-18 19:02:00 INFO: 2020-09-18 19:02:00 INFO: 2020-09-18 19:02:00 INFO: clearing start 2020-09-18 19:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-18 19:02:00 INFO: skip by not found init order into storage 2020-09-18 19:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-18 19:02:00 INFO: skip by not found init order into storage 2020-09-18 19:02:00 INFO: clearing end 2020-09-18 19:02:00 INFO: 2020-09-18 19:02:00 INFO: 2020-09-18 19:02:00 INFO: 2020-09-18 19:02:00 INFO: 2020-09-18 20:00:20 INFO: 2020-09-18 20:00:20 INFO: 2020-09-18 20:00:20 INFO: 2020-09-18 20:00:20 INFO: 2020-09-18 20:00:20 INFO: init new order start 2020-09-18 20:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 18, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.55, 'high': 384.05, 'low': 379.7, 'close': 382.75, 'trades': 3923, 'volume': 2445561, 'vwap': 382.2, 'lastSize': 1000, 'turnover': 93467164435, 'homeNotional': 26594.806825030646, 'foreignNotional': 10164324.318648422}, {'timestamp': datetime.datetime(2020, 9, 18, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.75, 'high': 385.75, 'low': 380.35, 'close': 382.55, 'trades': 4756, 'volume': 3945853, 'vwap': 382.05, 'lastSize': 13, 'turnover': 150749074270, 'homeNotional': 42994.44083990929, 'foreignNotional': 16425849.823864125}, {'timestamp': datetime.datetime(2020, 9, 18, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.8, 'high': 385.85, 'low': 383.55, 'close': 385.75, 'trades': 2206, 'volume': 1352228, 'vwap': 384.97, 'lastSize': 410, 'turnover': 52055485535, 'homeNotional': 14793.671469770063, 'foreignNotional': 5694989.22159313}] 2020-09-18 20:00:21 INFO: prepare candles [CandleItem(low=379.7, high=384.05, open=382.55, close=382.75, color='GREEN'), CandleItem(low=380.35, high=385.75, open=385.75, close=382.55, color='RED'), CandleItem(low=383.55, high=385.85, open=383.8, close=385.75, color='GREEN')] 2020-09-18 20:00:21 INFO: skip by colors first_candle=CandleItem(low=383.55, high=385.85, open=383.8, close=385.75, color='GREEN') second_candle=CandleItem(low=380.35, high=385.75, open=385.75, close=382.55, color='RED') last_candle=CandleItem(low=379.7, high=384.05, open=382.55, close=382.75, color='GREEN') 2020-09-18 20:00:21 INFO: check need new order None 2020-09-18 20:00:21 INFO: init new order end 2020-09-18 20:00:21 INFO: 2020-09-18 20:00:21 INFO: 2020-09-18 20:00:21 INFO: 2020-09-18 20:00:21 INFO: 2020-09-18 20:02:00 INFO: 2020-09-18 20:02:00 INFO: 2020-09-18 20:02:00 INFO: 2020-09-18 20:02:00 INFO: 2020-09-18 20:02:00 INFO: clearing start 2020-09-18 20:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-18 20:02:00 INFO: skip by not found init order into storage 2020-09-18 20:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-18 20:02:00 INFO: skip by not found init order into storage 2020-09-18 20:02:00 INFO: clearing end 2020-09-18 20:02:00 INFO: 2020-09-18 20:02:00 INFO: 2020-09-18 20:02:00 INFO: 2020-09-18 20:02:00 INFO: 2020-09-18 21:00:20 INFO: 2020-09-18 21:00:20 INFO: 2020-09-18 21:00:20 INFO: 2020-09-18 21:00:20 INFO: 2020-09-18 21:00:20 INFO: init new order start 2020-09-18 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 18, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.75, 'high': 383.55, 'low': 375.5, 'close': 377.0, 'trades': 6324, 'volume': 4772341, 'vwap': 378.98, 'lastSize': 20, 'turnover': 180860708680, 'homeNotional': 51780.691928808614, 'foreignNotional': 19623916.59536317}, {'timestamp': datetime.datetime(2020, 9, 18, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.55, 'high': 384.05, 'low': 379.7, 'close': 382.75, 'trades': 3923, 'volume': 2445561, 'vwap': 382.2, 'lastSize': 1000, 'turnover': 93467164435, 'homeNotional': 26594.806825030646, 'foreignNotional': 10164324.318648422}, {'timestamp': datetime.datetime(2020, 9, 18, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.75, 'high': 385.75, 'low': 380.35, 'close': 382.55, 'trades': 4756, 'volume': 3945853, 'vwap': 382.05, 'lastSize': 13, 'turnover': 150749074270, 'homeNotional': 42994.44083990929, 'foreignNotional': 16425849.823864125}] 2020-09-18 21:00:20 INFO: prepare candles [CandleItem(low=375.5, high=383.55, open=382.75, close=377.0, color='RED'), CandleItem(low=379.7, high=384.05, open=382.55, close=382.75, color='GREEN'), CandleItem(low=380.35, high=385.75, open=385.75, close=382.55, color='RED')] 2020-09-18 21:00:20 INFO: skip by colors first_candle=CandleItem(low=380.35, high=385.75, open=385.75, close=382.55, color='RED') second_candle=CandleItem(low=379.7, high=384.05, open=382.55, close=382.75, color='GREEN') last_candle=CandleItem(low=375.5, high=383.55, open=382.75, close=377.0, color='RED') 2020-09-18 21:00:20 INFO: check need new order None 2020-09-18 21:00:20 INFO: init new order end 2020-09-18 21:00:20 INFO: 2020-09-18 21:00:20 INFO: 2020-09-18 21:00:20 INFO: 2020-09-18 21:00:20 INFO: 2020-09-18 21:02:00 INFO: 2020-09-18 21:02:00 INFO: 2020-09-18 21:02:00 INFO: 2020-09-18 21:02:00 INFO: 2020-09-18 21:02:00 INFO: clearing start 2020-09-18 21:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-18 21:02:01 INFO: skip by not found init order into storage 2020-09-18 21:02:01 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-18 21:02:01 INFO: skip by not found init order into storage 2020-09-18 21:02:01 INFO: clearing end 2020-09-18 21:02:01 INFO: 2020-09-18 21:02:01 INFO: 2020-09-18 21:02:01 INFO: 2020-09-18 21:02:01 INFO: 2020-09-18 22:00:20 INFO: 2020-09-18 22:00:20 INFO: 2020-09-18 22:00:20 INFO: 2020-09-18 22:00:20 INFO: 2020-09-18 22:00:20 INFO: init new order start 2020-09-18 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 18, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 377.0, 'high': 379.65, 'low': 375.85, 'close': 379.5, 'trades': 2946, 'volume': 2221350, 'vwap': 378.21, 'lastSize': 196, 'turnover': 84012410935, 'homeNotional': 24101.492017681892, 'foreignNotional': 9115328.759970361}, {'timestamp': datetime.datetime(2020, 9, 18, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.75, 'high': 383.55, 'low': 375.5, 'close': 377.0, 'trades': 6324, 'volume': 4772341, 'vwap': 378.98, 'lastSize': 20, 'turnover': 180860708680, 'homeNotional': 51780.691928808614, 'foreignNotional': 19623916.59536317}, {'timestamp': datetime.datetime(2020, 9, 18, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.55, 'high': 384.05, 'low': 379.7, 'close': 382.75, 'trades': 3923, 'volume': 2445561, 'vwap': 382.2, 'lastSize': 1000, 'turnover': 93467164435, 'homeNotional': 26594.806825030646, 'foreignNotional': 10164324.318648422}] 2020-09-18 22:00:20 INFO: prepare candles [CandleItem(low=375.85, high=379.65, open=377.0, close=379.5, color='GREEN'), CandleItem(low=375.5, high=383.55, open=382.75, close=377.0, color='RED'), CandleItem(low=379.7, high=384.05, open=382.55, close=382.75, color='GREEN')] 2020-09-18 22:00:20 INFO: skip by colors first_candle=CandleItem(low=379.7, high=384.05, open=382.55, close=382.75, color='GREEN') second_candle=CandleItem(low=375.5, high=383.55, open=382.75, close=377.0, color='RED') last_candle=CandleItem(low=375.85, high=379.65, open=377.0, close=379.5, color='GREEN') 2020-09-18 22:00:20 INFO: check need new order None 2020-09-18 22:00:20 INFO: init new order end 2020-09-18 22:00:20 INFO: 2020-09-18 22:00:20 INFO: 2020-09-18 22:00:20 INFO: 2020-09-18 22:00:20 INFO: 2020-09-18 22:02:00 INFO: 2020-09-18 22:02:00 INFO: 2020-09-18 22:02:00 INFO: 2020-09-18 22:02:00 INFO: 2020-09-18 22:02:00 INFO: clearing start 2020-09-18 22:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-18 22:02:00 INFO: skip by not found init order into storage 2020-09-18 22:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-18 22:02:00 INFO: skip by not found init order into storage 2020-09-18 22:02:00 INFO: clearing end 2020-09-18 22:02:00 INFO: 2020-09-18 22:02:00 INFO: 2020-09-18 22:02:00 INFO: 2020-09-18 22:02:00 INFO: 2020-09-18 23:00:20 INFO: 2020-09-18 23:00:20 INFO: 2020-09-18 23:00:20 INFO: 2020-09-18 23:00:20 INFO: 2020-09-18 23:00:20 INFO: init new order start 2020-09-18 23:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 18, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.5, 'high': 379.75, 'low': 377.25, 'close': 379.15, 'trades': 2380, 'volume': 1646306, 'vwap': 378.76, 'lastSize': 998, 'turnover': 62355073870, 'homeNotional': 17885.339780808143, 'foreignNotional': 6774209.76145916}, {'timestamp': datetime.datetime(2020, 9, 18, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 377.0, 'high': 379.65, 'low': 375.85, 'close': 379.5, 'trades': 2946, 'volume': 2221350, 'vwap': 378.21, 'lastSize': 196, 'turnover': 84012410935, 'homeNotional': 24101.492017681892, 'foreignNotional': 9115328.759970361}, {'timestamp': datetime.datetime(2020, 9, 18, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.75, 'high': 383.55, 'low': 375.5, 'close': 377.0, 'trades': 6324, 'volume': 4772341, 'vwap': 378.98, 'lastSize': 20, 'turnover': 180860708680, 'homeNotional': 51780.691928808614, 'foreignNotional': 19623916.59536317}] 2020-09-18 23:00:20 INFO: prepare candles [CandleItem(low=377.25, high=379.75, open=379.5, close=379.15, color='RED'), CandleItem(low=375.85, high=379.65, open=377.0, close=379.5, color='GREEN'), CandleItem(low=375.5, high=383.55, open=382.75, close=377.0, color='RED')] 2020-09-18 23:00:20 INFO: skip by colors first_candle=CandleItem(low=375.5, high=383.55, open=382.75, close=377.0, color='RED') second_candle=CandleItem(low=375.85, high=379.65, open=377.0, close=379.5, color='GREEN') last_candle=CandleItem(low=377.25, high=379.75, open=379.5, close=379.15, color='RED') 2020-09-18 23:00:20 INFO: check need new order None 2020-09-18 23:00:20 INFO: init new order end 2020-09-18 23:00:20 INFO: 2020-09-18 23:00:20 INFO: 2020-09-18 23:00:20 INFO: 2020-09-18 23:00:20 INFO: 2020-09-18 23:02:00 INFO: 2020-09-18 23:02:00 INFO: 2020-09-18 23:02:00 INFO: 2020-09-18 23:02:00 INFO: 2020-09-18 23:02:00 INFO: clearing start 2020-09-18 23:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-18 23:02:00 INFO: skip by not found init order into storage 2020-09-18 23:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-18 23:02:00 INFO: skip by not found init order into storage 2020-09-18 23:02:00 INFO: clearing end 2020-09-18 23:02:00 INFO: 2020-09-18 23:02:00 INFO: 2020-09-18 23:02:00 INFO: 2020-09-18 23:02:00 INFO: 2020-09-19 00:00:20 INFO: 2020-09-19 00:00:20 INFO: 2020-09-19 00:00:20 INFO: 2020-09-19 00:00:20 INFO: 2020-09-19 00:00:20 INFO: init new order start 2020-09-19 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 18, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.15, 'high': 382.6, 'low': 378.3, 'close': 380.5, 'trades': 3578, 'volume': 2576799, 'vwap': 380.44, 'lastSize': 107, 'turnover': 98030164765, 'homeNotional': 28034.64087910454, 'foreignNotional': 10665372.50598783}, {'timestamp': datetime.datetime(2020, 9, 18, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.5, 'high': 379.75, 'low': 377.25, 'close': 379.15, 'trades': 2380, 'volume': 1646306, 'vwap': 378.76, 'lastSize': 998, 'turnover': 62355073870, 'homeNotional': 17885.339780808143, 'foreignNotional': 6774209.76145916}, {'timestamp': datetime.datetime(2020, 9, 18, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 377.0, 'high': 379.65, 'low': 375.85, 'close': 379.5, 'trades': 2946, 'volume': 2221350, 'vwap': 378.21, 'lastSize': 196, 'turnover': 84012410935, 'homeNotional': 24101.492017681892, 'foreignNotional': 9115328.759970361}] 2020-09-19 00:00:20 INFO: prepare candles [CandleItem(low=378.3, high=382.6, open=379.15, close=380.5, color='GREEN'), CandleItem(low=377.25, high=379.75, open=379.5, close=379.15, color='RED'), CandleItem(low=375.85, high=379.65, open=377.0, close=379.5, color='GREEN')] 2020-09-19 00:00:20 INFO: skip by colors first_candle=CandleItem(low=375.85, high=379.65, open=377.0, close=379.5, color='GREEN') second_candle=CandleItem(low=377.25, high=379.75, open=379.5, close=379.15, color='RED') last_candle=CandleItem(low=378.3, high=382.6, open=379.15, close=380.5, color='GREEN') 2020-09-19 00:00:20 INFO: check need new order None 2020-09-19 00:00:20 INFO: init new order end 2020-09-19 00:00:20 INFO: 2020-09-19 00:00:20 INFO: 2020-09-19 00:00:20 INFO: 2020-09-19 00:00:20 INFO: 2020-09-19 00:02:00 INFO: 2020-09-19 00:02:00 INFO: 2020-09-19 00:02:00 INFO: 2020-09-19 00:02:00 INFO: 2020-09-19 00:02:00 INFO: clearing start 2020-09-19 00:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-19 00:02:01 INFO: skip by not found init order into storage 2020-09-19 00:02:01 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-19 00:02:01 INFO: skip by not found init order into storage 2020-09-19 00:02:01 INFO: clearing end 2020-09-19 00:02:01 INFO: 2020-09-19 00:02:01 INFO: 2020-09-19 00:02:01 INFO: 2020-09-19 00:02:01 INFO: 2020-09-19 01:00:20 INFO: 2020-09-19 01:00:20 INFO: 2020-09-19 01:00:20 INFO: 2020-09-19 01:00:20 INFO: 2020-09-19 01:00:20 INFO: init new order start 2020-09-19 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 18, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 380.5, 'high': 382.7, 'low': 379.85, 'close': 382.45, 'trades': 1688, 'volume': 966522, 'vwap': 381.54, 'lastSize': 50, 'turnover': 36876263660, 'homeNotional': 10543.815114707326, 'foreignNotional': 4022855.66095664}, {'timestamp': datetime.datetime(2020, 9, 18, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.15, 'high': 382.6, 'low': 378.3, 'close': 380.5, 'trades': 3578, 'volume': 2576799, 'vwap': 380.44, 'lastSize': 107, 'turnover': 98030164765, 'homeNotional': 28034.64087910454, 'foreignNotional': 10665372.50598783}, {'timestamp': datetime.datetime(2020, 9, 18, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.5, 'high': 379.75, 'low': 377.25, 'close': 379.15, 'trades': 2380, 'volume': 1646306, 'vwap': 378.76, 'lastSize': 998, 'turnover': 62355073870, 'homeNotional': 17885.339780808143, 'foreignNotional': 6774209.76145916}] 2020-09-19 01:00:20 INFO: prepare candles [CandleItem(low=379.85, high=382.7, open=380.5, close=382.45, color='GREEN'), CandleItem(low=378.3, high=382.6, open=379.15, close=380.5, color='GREEN'), CandleItem(low=377.25, high=379.75, open=379.5, close=379.15, color='RED')] 2020-09-19 01:00:20 INFO: skip by colors first_candle=CandleItem(low=377.25, high=379.75, open=379.5, close=379.15, color='RED') second_candle=CandleItem(low=378.3, high=382.6, open=379.15, close=380.5, color='GREEN') last_candle=CandleItem(low=379.85, high=382.7, open=380.5, close=382.45, color='GREEN') 2020-09-19 01:00:20 INFO: check need new order None 2020-09-19 01:00:20 INFO: init new order end 2020-09-19 01:00:20 INFO: 2020-09-19 01:00:20 INFO: 2020-09-19 01:00:20 INFO: 2020-09-19 01:00:20 INFO: 2020-09-19 01:02:00 INFO: 2020-09-19 01:02:00 INFO: 2020-09-19 01:02:00 INFO: 2020-09-19 01:02:00 INFO: 2020-09-19 01:02:00 INFO: clearing start 2020-09-19 01:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-19 01:02:00 INFO: skip by not found init order into storage 2020-09-19 01:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-19 01:02:00 INFO: skip by not found init order into storage 2020-09-19 01:02:00 INFO: clearing end 2020-09-19 01:02:00 INFO: 2020-09-19 01:02:00 INFO: 2020-09-19 01:02:00 INFO: 2020-09-19 01:02:00 INFO: 2020-09-19 02:00:20 INFO: 2020-09-19 02:00:20 INFO: 2020-09-19 02:00:20 INFO: 2020-09-19 02:00:20 INFO: 2020-09-19 02:00:20 INFO: init new order start 2020-09-19 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 18, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.45, 'high': 384.55, 'low': 382.05, 'close': 383.8, 'trades': 3097, 'volume': 1806079, 'vwap': 383.44, 'lastSize': 2000, 'turnover': 69252168285, 'homeNotional': 19750.479060332076, 'foreignNotional': 7573111.094984701}, {'timestamp': datetime.datetime(2020, 9, 18, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 380.5, 'high': 382.7, 'low': 379.85, 'close': 382.45, 'trades': 1688, 'volume': 966522, 'vwap': 381.54, 'lastSize': 50, 'turnover': 36876263660, 'homeNotional': 10543.815114707326, 'foreignNotional': 4022855.66095664}, {'timestamp': datetime.datetime(2020, 9, 18, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.15, 'high': 382.6, 'low': 378.3, 'close': 380.5, 'trades': 3578, 'volume': 2576799, 'vwap': 380.44, 'lastSize': 107, 'turnover': 98030164765, 'homeNotional': 28034.64087910454, 'foreignNotional': 10665372.50598783}] 2020-09-19 02:00:20 INFO: prepare candles [CandleItem(low=382.05, high=384.55, open=382.45, close=383.8, color='GREEN'), CandleItem(low=379.85, high=382.7, open=380.5, close=382.45, color='GREEN'), CandleItem(low=378.3, high=382.6, open=379.15, close=380.5, color='GREEN')] 2020-09-19 02:00:20 INFO: skip by colors first_candle=CandleItem(low=378.3, high=382.6, open=379.15, close=380.5, color='GREEN') second_candle=CandleItem(low=379.85, high=382.7, open=380.5, close=382.45, color='GREEN') last_candle=CandleItem(low=382.05, high=384.55, open=382.45, close=383.8, color='GREEN') 2020-09-19 02:00:20 INFO: check need new order None 2020-09-19 02:00:20 INFO: init new order end 2020-09-19 02:00:20 INFO: 2020-09-19 02:00:20 INFO: 2020-09-19 02:00:20 INFO: 2020-09-19 02:00:20 INFO: 2020-09-19 02:02:00 INFO: 2020-09-19 02:02:00 INFO: 2020-09-19 02:02:00 INFO: 2020-09-19 02:02:00 INFO: 2020-09-19 02:02:00 INFO: clearing start 2020-09-19 02:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-19 02:02:00 INFO: skip by not found init order into storage 2020-09-19 02:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-19 02:02:00 INFO: skip by not found init order into storage 2020-09-19 02:02:00 INFO: clearing end 2020-09-19 02:02:00 INFO: 2020-09-19 02:02:00 INFO: 2020-09-19 02:02:00 INFO: 2020-09-19 02:02:00 INFO: 2020-09-19 03:00:20 INFO: 2020-09-19 03:00:20 INFO: 2020-09-19 03:00:20 INFO: 2020-09-19 03:00:20 INFO: 2020-09-19 03:00:20 INFO: init new order start 2020-09-19 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 19, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.8, 'high': 384.9, 'low': 380.5, 'close': 384.8, 'trades': 3725, 'volume': 2802981, 'vwap': 382.47, 'lastSize': 2135, 'turnover': 107205174465, 'homeNotional': 30607.84101385341, 'foreignNotional': 11706559.669112165}, {'timestamp': datetime.datetime(2020, 9, 18, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.45, 'high': 384.55, 'low': 382.05, 'close': 383.8, 'trades': 3097, 'volume': 1806079, 'vwap': 383.44, 'lastSize': 2000, 'turnover': 69252168285, 'homeNotional': 19750.479060332076, 'foreignNotional': 7573111.094984701}, {'timestamp': datetime.datetime(2020, 9, 18, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 380.5, 'high': 382.7, 'low': 379.85, 'close': 382.45, 'trades': 1688, 'volume': 966522, 'vwap': 381.54, 'lastSize': 50, 'turnover': 36876263660, 'homeNotional': 10543.815114707326, 'foreignNotional': 4022855.66095664}] 2020-09-19 03:00:20 INFO: prepare candles [CandleItem(low=380.5, high=384.9, open=383.8, close=384.8, color='GREEN'), CandleItem(low=382.05, high=384.55, open=382.45, close=383.8, color='GREEN'), CandleItem(low=379.85, high=382.7, open=380.5, close=382.45, color='GREEN')] 2020-09-19 03:00:20 INFO: skip by colors first_candle=CandleItem(low=379.85, high=382.7, open=380.5, close=382.45, color='GREEN') second_candle=CandleItem(low=382.05, high=384.55, open=382.45, close=383.8, color='GREEN') last_candle=CandleItem(low=380.5, high=384.9, open=383.8, close=384.8, color='GREEN') 2020-09-19 03:00:20 INFO: check need new order None 2020-09-19 03:00:20 INFO: init new order end 2020-09-19 03:00:20 INFO: 2020-09-19 03:00:20 INFO: 2020-09-19 03:00:20 INFO: 2020-09-19 03:00:20 INFO: 2020-09-19 03:02:00 INFO: 2020-09-19 03:02:00 INFO: 2020-09-19 03:02:00 INFO: 2020-09-19 03:02:00 INFO: 2020-09-19 03:02:00 INFO: clearing start 2020-09-19 03:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-19 03:02:00 INFO: skip by not found init order into storage 2020-09-19 03:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-19 03:02:00 INFO: skip by not found init order into storage 2020-09-19 03:02:00 INFO: clearing end 2020-09-19 03:02:00 INFO: 2020-09-19 03:02:00 INFO: 2020-09-19 03:02:00 INFO: 2020-09-19 03:02:00 INFO: 2020-09-19 04:00:20 INFO: 2020-09-19 04:00:20 INFO: 2020-09-19 04:00:20 INFO: 2020-09-19 04:00:20 INFO: 2020-09-19 04:00:20 INFO: init new order start 2020-09-19 04:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 19, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.8, 'high': 385.45, 'low': 383.1, 'close': 384.05, 'trades': 2620, 'volume': 1826966, 'vwap': 384.39, 'lastSize': 552, 'turnover': 70226019370, 'homeNotional': 20007.406344458268, 'foreignNotional': 7690572.979692628}, {'timestamp': datetime.datetime(2020, 9, 19, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.8, 'high': 384.9, 'low': 380.5, 'close': 384.8, 'trades': 3725, 'volume': 2802981, 'vwap': 382.47, 'lastSize': 2135, 'turnover': 107205174465, 'homeNotional': 30607.84101385341, 'foreignNotional': 11706559.669112165}, {'timestamp': datetime.datetime(2020, 9, 18, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.45, 'high': 384.55, 'low': 382.05, 'close': 383.8, 'trades': 3097, 'volume': 1806079, 'vwap': 383.44, 'lastSize': 2000, 'turnover': 69252168285, 'homeNotional': 19750.479060332076, 'foreignNotional': 7573111.094984701}] 2020-09-19 04:00:20 INFO: prepare candles [CandleItem(low=383.1, high=385.45, open=384.8, close=384.05, color='RED'), CandleItem(low=380.5, high=384.9, open=383.8, close=384.8, color='GREEN'), CandleItem(low=382.05, high=384.55, open=382.45, close=383.8, color='GREEN')] 2020-09-19 04:00:20 INFO: last_candle=CandleItem(low=383.1, high=385.45, open=384.8, close=384.05, color='RED') 2020-09-19 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-09-19 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=383.1, high=385.45, open=384.8, close=384.05, color='RED') 2020-09-19 04:00:20 INFO: skip by CandleItem(low=383.1, high=385.45, open=384.8, close=384.05, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-19 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-09-19 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=383.1, high=385.45, open=384.8, close=384.05, color='RED') 2020-09-19 04:00:20 INFO: skip by CandleItem(low=383.1, high=385.45, open=384.8, close=384.05, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-19 04:00:20 INFO: not found applicable config for candle 2020-09-19 04:00:20 INFO: check need new order None 2020-09-19 04:00:20 INFO: init new order end 2020-09-19 04:00:20 INFO: 2020-09-19 04:00:20 INFO: 2020-09-19 04:00:20 INFO: 2020-09-19 04:00:20 INFO: 2020-09-19 04:02:00 INFO: 2020-09-19 04:02:00 INFO: 2020-09-19 04:02:00 INFO: 2020-09-19 04:02:00 INFO: 2020-09-19 04:02:00 INFO: clearing start 2020-09-19 04:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-19 04:02:00 INFO: skip by not found init order into storage 2020-09-19 04:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-19 04:02:00 INFO: skip by not found init order into storage 2020-09-19 04:02:00 INFO: clearing end 2020-09-19 04:02:00 INFO: 2020-09-19 04:02:00 INFO: 2020-09-19 04:02:00 INFO: 2020-09-19 04:02:00 INFO: 2020-09-19 05:00:20 INFO: 2020-09-19 05:00:20 INFO: 2020-09-19 05:00:20 INFO: 2020-09-19 05:00:20 INFO: 2020-09-19 05:00:20 INFO: init new order start 2020-09-19 05:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 19, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.05, 'high': 384.35, 'low': 381.8, 'close': 382.65, 'trades': 2080, 'volume': 1619745, 'vwap': 382.94, 'lastSize': 1, 'turnover': 62025642440, 'homeNotional': 17744.794516378883, 'foreignNotional': 6795105.738518973}, {'timestamp': datetime.datetime(2020, 9, 19, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.8, 'high': 385.45, 'low': 383.1, 'close': 384.05, 'trades': 2620, 'volume': 1826966, 'vwap': 384.39, 'lastSize': 552, 'turnover': 70226019370, 'homeNotional': 20007.406344458268, 'foreignNotional': 7690572.979692628}, {'timestamp': datetime.datetime(2020, 9, 19, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.8, 'high': 384.9, 'low': 380.5, 'close': 384.8, 'trades': 3725, 'volume': 2802981, 'vwap': 382.47, 'lastSize': 2135, 'turnover': 107205174465, 'homeNotional': 30607.84101385341, 'foreignNotional': 11706559.669112165}] 2020-09-19 05:00:20 INFO: prepare candles [CandleItem(low=381.8, high=384.35, open=384.05, close=382.65, color='RED'), CandleItem(low=383.1, high=385.45, open=384.8, close=384.05, color='RED'), CandleItem(low=380.5, high=384.9, open=383.8, close=384.8, color='GREEN')] 2020-09-19 05:00:20 INFO: skip by colors first_candle=CandleItem(low=380.5, high=384.9, open=383.8, close=384.8, color='GREEN') second_candle=CandleItem(low=383.1, high=385.45, open=384.8, close=384.05, color='RED') last_candle=CandleItem(low=381.8, high=384.35, open=384.05, close=382.65, color='RED') 2020-09-19 05:00:20 INFO: check need new order None 2020-09-19 05:00:20 INFO: init new order end 2020-09-19 05:00:20 INFO: 2020-09-19 05:00:20 INFO: 2020-09-19 05:00:20 INFO: 2020-09-19 05:00:20 INFO: 2020-09-19 05:02:00 INFO: 2020-09-19 05:02:00 INFO: 2020-09-19 05:02:00 INFO: 2020-09-19 05:02:00 INFO: 2020-09-19 05:02:00 INFO: clearing start 2020-09-19 05:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '050324da-2289-7df3-7427-52a9ea31fc1b', 'clOrdID': '4e6ac393d36d481ca6d2c22d0f8966c6', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': None, 'displayQty': None, 'stopPx': 374.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 704000, tzinfo=tzutc())} 2020-09-19 05:02:00 INFO: skip by not found init order into storage 2020-09-19 05:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f769d60c-eec3-3b30-7a6b-71fff0278d70', 'clOrdID': '07b41fe0c790491e96ea48f71300ad43', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 309, 'price': 411.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': 309, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 17, 11, 26, 34, 740000, tzinfo=tzutc())} 2020-09-19 05:02:00 INFO: skip by not found init order into storage 2020-09-19 05:02:00 INFO: clearing end 2020-09-19 05:02:00 INFO: 2020-09-19 05:02:00 INFO: 2020-09-19 05:02:00 INFO: 2020-09-19 05:02:00 INFO: 2020-09-19 06:00:20 INFO: 2020-09-19 06:00:20 INFO: 2020-09-19 06:00:20 INFO: 2020-09-19 06:00:20 INFO: 2020-09-19 06:00:20 INFO: init new order start 2020-09-19 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 19, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.65, 'high': 384.25, 'low': 382.6, 'close': 384.2, 'trades': 1492, 'volume': 1263571, 'vwap': 383.73, 'lastSize': 30, 'turnover': 48485873965, 'homeNotional': 13850.356499725885, 'foreignNotional': 5314673.805226376}, {'timestamp': datetime.datetime(2020, 9, 19, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.05, 'high': 384.35, 'low': 381.8, 'close': 382.65, 'trades': 2080, 'volume': 1619745, 'vwap': 382.94, 'lastSize': 1, 'turnover': 62025642440, 'homeNotional': 17744.794516378883, 'foreignNotional': 6795105.738518973}, {'timestamp': datetime.datetime(2020, 9, 19, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.8, 'high': 385.45, 'low': 383.1, 'close': 384.05, 'trades': 2620, 'volume': 1826966, 'vwap': 384.39, 'lastSize': 552, 'turnover': 70226019370, 'homeNotional': 20007.406344458268, 'foreignNotional': 7690572.979692628}] 2020-09-19 06:00:20 INFO: prepare candles [CandleItem(low=382.6, high=384.25, open=382.65, close=384.2, color='GREEN'), CandleItem(low=381.8, high=384.35, open=384.05, close=382.65, color='RED'), CandleItem(low=383.1, high=385.45, open=384.8, close=384.05, color='RED')] 2020-09-19 06:00:20 INFO: last_candle=CandleItem(low=382.6, high=384.25, open=382.65, close=384.2, color='GREEN') 2020-09-19 06: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-19 06: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=382.6, high=384.25, open=382.65, close=384.2, color='GREEN') 2020-09-19 06:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=381.8, high=384.35, open=384.05, close=382.65, color='RED') 2020-09-19 06:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=383.1, high=385.45, open=384.8, close=384.05, color='RED') 2020-09-19 06:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=382.6, high=384.25, open=382.65, close=384.2, color='GREEN'), take_profit_factor=6.0, clearing_interval=3600) 2020-09-19 06:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=382.6, high=384.25, open=382.65, close=384.2, color='GREEN'), take_profit_factor=6.0, clearing_interval=3600) 2020-09-19 06:00:20 INFO: place order: start candle=CandleItem(low=382.6, high=384.25, open=382.65, close=384.2, color='GREEN') ticker='ETHUSD' price_offset=0.1 2020-09-19 06:00:20 INFO: place order: side_factor=-1 init_trigger_price=384.3 init_order_price=384.35 stop_price_offset=0.0 candle.size=1.6499999999999773 stop_price=382.6 take_price=394.2499999999999 2020-09-19 06:00:20 INFO: place order round: side_factor=-1 init_trigger_price=Decimal('384.30000000000001136868377216160297393798828125') init_order_price=Decimal('384.3500000000000227373675443232059478759765625') stop_price_offset=0.0 candle.size=1.6499999999999773 stop_price=Decimal('382.6000000000000227373675443232059478759765625') take_price=Decimal('394.2499999999998863131622783839702606201171875') 2020-09-19 06:00:20 INFO: place order: compute qty=1118 2020-09-19 06:00:20 INFO: place order: save order to db 45b523d558d5443ab2dbd1d454266a09; response=True 2020-09-19 06:00:20 INFO: post order to exchange resp={'orderID': 'd44e6d90-2aab-fea3-c60e-a674e3f09894', 'clOrdID': '45b523d558d5443ab2dbd1d454266a09', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1118, 'price': 384.35, 'displayQty': None, 'stopPx': 384.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': 1118, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 19, 3, 0, 20, 619000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 19, 3, 0, 20, 619000, tzinfo=tzutc())} 2020-09-19 06:00:20 INFO: place new init order {'qty': 1118, 'init_price': Decimal('384.30000000000001136868377216160297393798828125'), 'stop_price': Decimal('382.6000000000000227373675443232059478759765625'), 'take_price': Decimal('394.2499999999998863131622783839702606201171875'), 'order_uid': '45b523d558d5443ab2dbd1d454266a09', 'response': {'orderID': 'd44e6d90-2aab-fea3-c60e-a674e3f09894', 'clOrdID': '45b523d558d5443ab2dbd1d454266a09', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1118, 'price': 384.35, 'displayQty': None, 'stopPx': 384.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': 1118, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 19, 3, 0, 20, 619000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 19, 3, 0, 20, 619000, tzinfo=tzutc())}} 2020-09-19 06:00:20 INFO: init new order end 2020-09-19 06:00:20 INFO: 2020-09-19 06:00:20 INFO: 2020-09-19 06:00:20 INFO: 2020-09-19 06:00:20 INFO: 2020-09-19 06:00:20 INFO: process event {'orderID': 'd44e6d90-2aab-fea3-c60e-a674e3f09894', 'clOrdID': '45b523d558d5443ab2dbd1d454266a09', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1118, 'price': 384.35, 'displayQty': None, 'stopPx': 384.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': 1118, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-09-19T03:00:20.619Z', 'timestamp': '2020-09-19T03:00:20.619Z'} 2020-09-19 06:00:20 INFO: skip event 45b523d558d5443ab2dbd1d454266a09 New 2020-09-19 06:00:23 INFO: process event {'orderID': 'd44e6d90-2aab-fea3-c60e-a674e3f09894', 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 1118, 'avgPx': 384.3, 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'transactTime': '2020-09-19T03:00:23.224Z', 'timestamp': '2020-09-19T03:00:23.224Z', 'clOrdID': '45b523d558d5443ab2dbd1d454266a09', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-19 06:00:23 INFO: add new event={'uid': '45b523d558d5443ab2dbd1d454266a09', 'status': 'Filled'} 2020-09-19 06:00:23 INFO: 2020-09-19 06:00:23 INFO: 2020-09-19 06:00:23 INFO: 2020-09-19 06:00:23 INFO: 2020-09-19 06:00:23 INFO: process event start 2020-09-19 06:00:23 INFO: fetch new order event 45b523d558d5443ab2dbd1d454266a09 2020-09-19 06:00:23 INFO: fetch orders by event init={'stop': '382.6000000000000227373675443232059478759765625', 'take': '394.2499999999998863131622783839702606201171875', 'qty': '1118', 'color': 'GREEN', 'ticker': 'ETHUSD', 'clearing_offset': '3600'} profit_pair=None 2020-09-19 06:00:23 INFO: process init order filled 2020-09-19 06:00:23 INFO: save profit orders to storage stop=1e0371bd06ff4125a72978c6d7660acc take=64c20c51f19043b88a80cad92f78025c 2020-09-19 06:00:23 INFO: place profit orders take_price=394.2499999999998863131622783839702606201171875, stop_price=382.6000000000000227373675443232059478759765625, qty=1118, color=GREEN, ticker=ETHUSD 1e0371bd06ff4125a72978c6d7660acc 64c20c51f19043b88a80cad92f78025c 2020-09-19 06:00:23 INFO: place stop order ETHUSD: qty=-1118, stop_price=382.6000000000000227373675443232059478759765625, stop_uid=1e0371bd06ff4125a72978c6d7660acc 2020-09-19 06:00:23 INFO: process event {'orderID': '92a7c44a-266b-0001-e60d-2d934e5905ae', 'clOrdID': '1e0371bd06ff4125a72978c6d7660acc', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1118, 'price': None, 'displayQty': None, 'stopPx': 382.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': 1118, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': '2020-09-19T03:00:23