2020-08-27 08:00:20 INFO: 2020-08-27 08:00:20 INFO: 2020-08-27 08:00:20 INFO: 2020-08-27 08:00:20 INFO: 2020-08-27 08:02:00 INFO: 2020-08-27 08:02:00 INFO: 2020-08-27 08:02:00 INFO: 2020-08-27 08:02:00 INFO: 2020-08-27 08:02:00 INFO: clearing start 2020-08-27 08:02:00 INFO: clearing end 2020-08-27 08:02:00 INFO: 2020-08-27 08:02:00 INFO: 2020-08-27 08:02:00 INFO: 2020-08-27 08:02:00 INFO: 2020-08-27 09:00:20 INFO: 2020-08-27 09:00:20 INFO: 2020-08-27 09:00:20 INFO: 2020-08-27 09:00:20 INFO: 2020-08-27 09:00:20 INFO: init new order start 2020-08-27 09:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 27, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.55, 'high': 384.3, 'low': 381.0, 'close': 381.95, 'trades': 4253, 'volume': 2461756, 'vwap': 382.23, 'lastSize': 1700, 'turnover': 94093926625, 'homeNotional': 27964.92949527295, 'foreignNotional': 10688858.446816912}, {'timestamp': datetime.datetime(2020, 8, 27, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.65, 'high': 386.05, 'low': 383.55, 'close': 383.55, 'trades': 2289, 'volume': 1869919, 'vwap': 385.09, 'lastSize': 150, 'turnover': 72007517680, 'homeNotional': 21299.5474293203, 'foreignNotional': 8202119.131149339}, {'timestamp': datetime.datetime(2020, 8, 27, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.85, 'high': 385.4, 'low': 383.8, 'close': 384.65, 'trades': 1804, 'volume': 1023306, 'vwap': 384.73, 'lastSize': 1, 'turnover': 39369144615, 'homeNotional': 11664.865382360427, 'foreignNotional': 4487769.204792882}] 2020-08-27 09:00:21 INFO: prepare candles [CandleItem(low=381.0, high=384.3, open=383.55, close=381.95, color='RED'), CandleItem(low=383.55, high=386.05, open=384.65, close=383.55, color='RED'), CandleItem(low=383.8, high=385.4, open=383.85, close=384.65, color='GREEN')] 2020-08-27 09:00:21 INFO: skip by colors first_candle=CandleItem(low=383.8, high=385.4, open=383.85, close=384.65, color='GREEN') second_candle=CandleItem(low=383.55, high=386.05, open=384.65, close=383.55, color='RED') last_candle=CandleItem(low=381.0, high=384.3, open=383.55, close=381.95, color='RED') 2020-08-27 09:00:21 INFO: check need new order None 2020-08-27 09:00:21 INFO: init new order end 2020-08-27 09:00:21 INFO: 2020-08-27 09:00:21 INFO: 2020-08-27 09:00:21 INFO: 2020-08-27 09:00:21 INFO: 2020-08-27 09:02:00 INFO: 2020-08-27 09:02:00 INFO: 2020-08-27 09:02:00 INFO: 2020-08-27 09:02:00 INFO: 2020-08-27 09:02:00 INFO: clearing start 2020-08-27 09:02:00 INFO: clearing end 2020-08-27 09:02:00 INFO: 2020-08-27 09:02:00 INFO: 2020-08-27 09:02:00 INFO: 2020-08-27 09:02:00 INFO: 2020-08-27 10:00:20 INFO: 2020-08-27 10:00:20 INFO: 2020-08-27 10:00:20 INFO: 2020-08-27 10:00:20 INFO: 2020-08-27 10:00:20 INFO: init new order start 2020-08-27 10:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 27, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 381.95, 'high': 386.35, 'low': 381.8, 'close': 385.4, 'trades': 3235, 'volume': 2277868, 'vwap': 384.25, 'lastSize': 100, 'turnover': 87525486550, 'homeNotional': 25914.37317481815, 'foreignNotional': 9957451.741762508}, {'timestamp': datetime.datetime(2020, 8, 27, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.55, 'high': 384.3, 'low': 381.0, 'close': 381.95, 'trades': 4253, 'volume': 2461756, 'vwap': 382.23, 'lastSize': 1700, 'turnover': 94093926625, 'homeNotional': 27964.92949527295, 'foreignNotional': 10688858.446816912}, {'timestamp': datetime.datetime(2020, 8, 27, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.65, 'high': 386.05, 'low': 383.55, 'close': 383.55, 'trades': 2289, 'volume': 1869919, 'vwap': 385.09, 'lastSize': 150, 'turnover': 72007517680, 'homeNotional': 21299.5474293203, 'foreignNotional': 8202119.131149339}] 2020-08-27 10:00:21 INFO: prepare candles [CandleItem(low=381.8, high=386.35, open=381.95, close=385.4, color='GREEN'), CandleItem(low=381.0, high=384.3, open=383.55, close=381.95, color='RED'), CandleItem(low=383.55, high=386.05, open=384.65, close=383.55, color='RED')] 2020-08-27 10:00:21 INFO: last_candle=CandleItem(low=381.8, high=386.35, open=381.95, close=385.4, color='GREEN') 2020-08-27 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-08-27 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=381.8, high=386.35, open=381.95, close=385.4, color='GREEN') 2020-08-27 10:00:21 INFO: skip by CandleItem(low=381.8, high=386.35, open=381.95, close=385.4, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-27 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-08-27 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=381.8, high=386.35, open=381.95, close=385.4, color='GREEN') 2020-08-27 10:00:21 INFO: skip by CandleItem(low=381.8, high=386.35, open=381.95, close=385.4, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-27 10:00:21 INFO: not found applicable config for candle 2020-08-27 10:00:21 INFO: check need new order None 2020-08-27 10:00:21 INFO: init new order end 2020-08-27 10:00:21 INFO: 2020-08-27 10:00:21 INFO: 2020-08-27 10:00:21 INFO: 2020-08-27 10:00:21 INFO: 2020-08-27 10:02:00 INFO: 2020-08-27 10:02:00 INFO: 2020-08-27 10:02:00 INFO: 2020-08-27 10:02:00 INFO: 2020-08-27 10:02:00 INFO: clearing start 2020-08-27 10:02:00 INFO: clearing end 2020-08-27 10:02:00 INFO: 2020-08-27 10:02:00 INFO: 2020-08-27 10:02:00 INFO: 2020-08-27 10:02:00 INFO: 2020-08-27 11:00:20 INFO: 2020-08-27 11:00:20 INFO: 2020-08-27 11:00:20 INFO: 2020-08-27 11:00:20 INFO: 2020-08-27 11:00:20 INFO: init new order start 2020-08-27 11:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 27, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.4, 'high': 386.9, 'low': 384.9, 'close': 386.1, 'trades': 2427, 'volume': 1295556, 'vwap': 385.98, 'lastSize': 12, 'turnover': 50005821425, 'homeNotional': 14763.326656007737, 'foreignNotional': 5698351.422106429}, {'timestamp': datetime.datetime(2020, 8, 27, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 381.95, 'high': 386.35, 'low': 381.8, 'close': 385.4, 'trades': 3235, 'volume': 2277868, 'vwap': 384.25, 'lastSize': 100, 'turnover': 87525486550, 'homeNotional': 25914.37317481815, 'foreignNotional': 9957451.741762508}, {'timestamp': datetime.datetime(2020, 8, 27, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.55, 'high': 384.3, 'low': 381.0, 'close': 381.95, 'trades': 4253, 'volume': 2461756, 'vwap': 382.23, 'lastSize': 1700, 'turnover': 94093926625, 'homeNotional': 27964.92949527295, 'foreignNotional': 10688858.446816912}] 2020-08-27 11:00:20 INFO: prepare candles [CandleItem(low=384.9, high=386.9, open=385.4, close=386.1, color='GREEN'), CandleItem(low=381.8, high=386.35, open=381.95, close=385.4, color='GREEN'), CandleItem(low=381.0, high=384.3, open=383.55, close=381.95, color='RED')] 2020-08-27 11:00:20 INFO: skip by colors first_candle=CandleItem(low=381.0, high=384.3, open=383.55, close=381.95, color='RED') second_candle=CandleItem(low=381.8, high=386.35, open=381.95, close=385.4, color='GREEN') last_candle=CandleItem(low=384.9, high=386.9, open=385.4, close=386.1, color='GREEN') 2020-08-27 11:00:20 INFO: check need new order None 2020-08-27 11:00:20 INFO: init new order end 2020-08-27 11:00:20 INFO: 2020-08-27 11:00:20 INFO: 2020-08-27 11:00:20 INFO: 2020-08-27 11:00:20 INFO: 2020-08-27 11:02:00 INFO: 2020-08-27 11:02:00 INFO: 2020-08-27 11:02:00 INFO: 2020-08-27 11:02:00 INFO: 2020-08-27 11:02:00 INFO: clearing start 2020-08-27 11:02:00 INFO: clearing end 2020-08-27 11:02:00 INFO: 2020-08-27 11:02:00 INFO: 2020-08-27 11:02:00 INFO: 2020-08-27 11:02:00 INFO: 2020-08-27 12:00:20 INFO: 2020-08-27 12:00:20 INFO: 2020-08-27 12:00:20 INFO: 2020-08-27 12:00:20 INFO: 2020-08-27 12:00:20 INFO: init new order start 2020-08-27 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 27, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.1, 'high': 386.15, 'low': 383.8, 'close': 384.1, 'trades': 2019, 'volume': 1149976, 'vwap': 384.5, 'lastSize': 300, 'turnover': 44216324995, 'homeNotional': 13093.264162924988, 'foreignNotional': 5034335.658134786}, {'timestamp': datetime.datetime(2020, 8, 27, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.4, 'high': 386.9, 'low': 384.9, 'close': 386.1, 'trades': 2427, 'volume': 1295556, 'vwap': 385.98, 'lastSize': 12, 'turnover': 50005821425, 'homeNotional': 14763.326656007737, 'foreignNotional': 5698351.422106429}, {'timestamp': datetime.datetime(2020, 8, 27, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 381.95, 'high': 386.35, 'low': 381.8, 'close': 385.4, 'trades': 3235, 'volume': 2277868, 'vwap': 384.25, 'lastSize': 100, 'turnover': 87525486550, 'homeNotional': 25914.37317481815, 'foreignNotional': 9957451.741762508}] 2020-08-27 12:00:20 INFO: prepare candles [CandleItem(low=383.8, high=386.15, open=386.1, close=384.1, color='RED'), CandleItem(low=384.9, high=386.9, open=385.4, close=386.1, color='GREEN'), CandleItem(low=381.8, high=386.35, open=381.95, close=385.4, color='GREEN')] 2020-08-27 12:00:20 INFO: last_candle=CandleItem(low=383.8, high=386.15, open=386.1, close=384.1, color='RED') 2020-08-27 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-08-27 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=383.8, high=386.15, open=386.1, close=384.1, color='RED') 2020-08-27 12:00:20 INFO: skip by CandleItem(low=383.8, high=386.15, open=386.1, close=384.1, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-27 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-08-27 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=383.8, high=386.15, open=386.1, close=384.1, color='RED') 2020-08-27 12:00:20 INFO: skip by CandleItem(low=383.8, high=386.15, open=386.1, close=384.1, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-27 12:00:20 INFO: not found applicable config for candle 2020-08-27 12:00:20 INFO: check need new order None 2020-08-27 12:00:20 INFO: init new order end 2020-08-27 12:00:20 INFO: 2020-08-27 12:00:20 INFO: 2020-08-27 12:00:20 INFO: 2020-08-27 12:00:20 INFO: 2020-08-27 12:02:00 INFO: 2020-08-27 12:02:00 INFO: 2020-08-27 12:02:00 INFO: 2020-08-27 12:02:00 INFO: 2020-08-27 12:02:00 INFO: clearing start 2020-08-27 12:02:00 INFO: clearing end 2020-08-27 12:02:00 INFO: 2020-08-27 12:02:00 INFO: 2020-08-27 12:02:00 INFO: 2020-08-27 12:02:00 INFO: 2020-08-27 13:00:20 INFO: 2020-08-27 13:00:20 INFO: 2020-08-27 13:00:20 INFO: 2020-08-27 13:00:20 INFO: 2020-08-27 13:00:20 INFO: init new order start 2020-08-27 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 27, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.1, 'high': 388.0, 'low': 383.3, 'close': 387.4, 'trades': 4419, 'volume': 3498622, 'vwap': 385.82, 'lastSize': 1350, 'turnover': 134981433690, 'homeNotional': 39887.55836383379, 'foreignNotional': 15389254.840589665}, {'timestamp': datetime.datetime(2020, 8, 27, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.1, 'high': 386.15, 'low': 383.8, 'close': 384.1, 'trades': 2019, 'volume': 1149976, 'vwap': 384.5, 'lastSize': 300, 'turnover': 44216324995, 'homeNotional': 13093.264162924988, 'foreignNotional': 5034335.658134786}, {'timestamp': datetime.datetime(2020, 8, 27, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.4, 'high': 386.9, 'low': 384.9, 'close': 386.1, 'trades': 2427, 'volume': 1295556, 'vwap': 385.98, 'lastSize': 12, 'turnover': 50005821425, 'homeNotional': 14763.326656007737, 'foreignNotional': 5698351.422106429}] 2020-08-27 13:00:20 INFO: prepare candles [CandleItem(low=383.3, high=388.0, open=384.1, close=387.4, color='GREEN'), CandleItem(low=383.8, high=386.15, open=386.1, close=384.1, color='RED'), CandleItem(low=384.9, high=386.9, open=385.4, close=386.1, color='GREEN')] 2020-08-27 13:00:20 INFO: skip by colors first_candle=CandleItem(low=384.9, high=386.9, open=385.4, close=386.1, color='GREEN') second_candle=CandleItem(low=383.8, high=386.15, open=386.1, close=384.1, color='RED') last_candle=CandleItem(low=383.3, high=388.0, open=384.1, close=387.4, color='GREEN') 2020-08-27 13:00:20 INFO: check need new order None 2020-08-27 13:00:20 INFO: init new order end 2020-08-27 13:00:20 INFO: 2020-08-27 13:00:20 INFO: 2020-08-27 13:00:20 INFO: 2020-08-27 13:00:20 INFO: 2020-08-27 13:02:00 INFO: 2020-08-27 13:02:00 INFO: 2020-08-27 13:02:00 INFO: 2020-08-27 13:02:00 INFO: 2020-08-27 13:02:00 INFO: clearing start 2020-08-27 13:02:00 INFO: clearing end 2020-08-27 13:02:00 INFO: 2020-08-27 13:02:00 INFO: 2020-08-27 13:02:00 INFO: 2020-08-27 13:02:00 INFO: 2020-08-27 14:00:20 INFO: 2020-08-27 14:00:20 INFO: 2020-08-27 14:00:20 INFO: 2020-08-27 14:00:20 INFO: 2020-08-27 14:00:20 INFO: init new order start 2020-08-27 14:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 27, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.4, 'high': 388.3, 'low': 383.45, 'close': 384.5, 'trades': 4185, 'volume': 2263038, 'vwap': 385.66, 'lastSize': 67, 'turnover': 87274596875, 'homeNotional': 25766.974377223323, 'foreignNotional': 9937170.113446526}, {'timestamp': datetime.datetime(2020, 8, 27, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.1, 'high': 388.0, 'low': 383.3, 'close': 387.4, 'trades': 4419, 'volume': 3498622, 'vwap': 385.82, 'lastSize': 1350, 'turnover': 134981433690, 'homeNotional': 39887.55836383379, 'foreignNotional': 15389254.840589665}, {'timestamp': datetime.datetime(2020, 8, 27, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.1, 'high': 386.15, 'low': 383.8, 'close': 384.1, 'trades': 2019, 'volume': 1149976, 'vwap': 384.5, 'lastSize': 300, 'turnover': 44216324995, 'homeNotional': 13093.264162924988, 'foreignNotional': 5034335.658134786}] 2020-08-27 14:00:21 INFO: prepare candles [CandleItem(low=383.45, high=388.3, open=387.4, close=384.5, color='RED'), CandleItem(low=383.3, high=388.0, open=384.1, close=387.4, color='GREEN'), CandleItem(low=383.8, high=386.15, open=386.1, close=384.1, color='RED')] 2020-08-27 14:00:21 INFO: skip by colors first_candle=CandleItem(low=383.8, high=386.15, open=386.1, close=384.1, color='RED') second_candle=CandleItem(low=383.3, high=388.0, open=384.1, close=387.4, color='GREEN') last_candle=CandleItem(low=383.45, high=388.3, open=387.4, close=384.5, color='RED') 2020-08-27 14:00:21 INFO: check need new order None 2020-08-27 14:00:21 INFO: init new order end 2020-08-27 14:00:21 INFO: 2020-08-27 14:00:21 INFO: 2020-08-27 14:00:21 INFO: 2020-08-27 14:00:21 INFO: 2020-08-27 14:02:00 INFO: 2020-08-27 14:02:00 INFO: 2020-08-27 14:02:00 INFO: 2020-08-27 14:02:00 INFO: 2020-08-27 14:02:00 INFO: clearing start 2020-08-27 14:02:00 INFO: clearing end 2020-08-27 14:02:00 INFO: 2020-08-27 14:02:00 INFO: 2020-08-27 14:02:00 INFO: 2020-08-27 14:02:00 INFO: 2020-08-27 15:00:20 INFO: 2020-08-27 15:00:20 INFO: 2020-08-27 15:00:20 INFO: 2020-08-27 15:00:20 INFO: 2020-08-27 15:00:20 INFO: init new order start 2020-08-27 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 27, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.5, 'high': 385.65, 'low': 382.4, 'close': 382.4, 'trades': 3567, 'volume': 2079918, 'vwap': 383.89, 'lastSize': 1995, 'turnover': 79844818700, 'homeNotional': 23608.693727950027, 'foreignNotional': 9063034.034259748}, {'timestamp': datetime.datetime(2020, 8, 27, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.4, 'high': 388.3, 'low': 383.45, 'close': 384.5, 'trades': 4185, 'volume': 2263038, 'vwap': 385.66, 'lastSize': 67, 'turnover': 87274596875, 'homeNotional': 25766.974377223323, 'foreignNotional': 9937170.113446526}, {'timestamp': datetime.datetime(2020, 8, 27, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.1, 'high': 388.0, 'low': 383.3, 'close': 387.4, 'trades': 4419, 'volume': 3498622, 'vwap': 385.82, 'lastSize': 1350, 'turnover': 134981433690, 'homeNotional': 39887.55836383379, 'foreignNotional': 15389254.840589665}] 2020-08-27 15:00:20 INFO: prepare candles [CandleItem(low=382.4, high=385.65, open=384.5, close=382.4, color='RED'), CandleItem(low=383.45, high=388.3, open=387.4, close=384.5, color='RED'), CandleItem(low=383.3, high=388.0, open=384.1, close=387.4, color='GREEN')] 2020-08-27 15:00:20 INFO: skip by colors first_candle=CandleItem(low=383.3, high=388.0, open=384.1, close=387.4, color='GREEN') second_candle=CandleItem(low=383.45, high=388.3, open=387.4, close=384.5, color='RED') last_candle=CandleItem(low=382.4, high=385.65, open=384.5, close=382.4, color='RED') 2020-08-27 15:00:20 INFO: check need new order None 2020-08-27 15:00:20 INFO: init new order end 2020-08-27 15:00:20 INFO: 2020-08-27 15:00:20 INFO: 2020-08-27 15:00:20 INFO: 2020-08-27 15:00:20 INFO: 2020-08-27 15:02:00 INFO: 2020-08-27 15:02:00 INFO: 2020-08-27 15:02:00 INFO: 2020-08-27 15:02:00 INFO: 2020-08-27 15:02:00 INFO: clearing start 2020-08-27 15:02:00 INFO: clearing end 2020-08-27 15:02:00 INFO: 2020-08-27 15:02:00 INFO: 2020-08-27 15:02:00 INFO: 2020-08-27 15:02:00 INFO: 2020-08-27 16:00:20 INFO: 2020-08-27 16:00:20 INFO: 2020-08-27 16:00:20 INFO: 2020-08-27 16:00:20 INFO: 2020-08-27 16:00:20 INFO: init new order start 2020-08-27 16:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 27, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.4, 'high': 387.15, 'low': 380.95, 'close': 386.05, 'trades': 8307, 'volume': 5175047, 'vwap': 383.86, 'lastSize': 300, 'turnover': 198645331115, 'homeNotional': 58635.894013645004, 'foreignNotional': 22507791.78062995}, {'timestamp': datetime.datetime(2020, 8, 27, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.5, 'high': 385.65, 'low': 382.4, 'close': 382.4, 'trades': 3567, 'volume': 2079918, 'vwap': 383.89, 'lastSize': 1995, 'turnover': 79844818700, 'homeNotional': 23608.693727950027, 'foreignNotional': 9063034.034259748}, {'timestamp': datetime.datetime(2020, 8, 27, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.4, 'high': 388.3, 'low': 383.45, 'close': 384.5, 'trades': 4185, 'volume': 2263038, 'vwap': 385.66, 'lastSize': 67, 'turnover': 87274596875, 'homeNotional': 25766.974377223323, 'foreignNotional': 9937170.113446526}] 2020-08-27 16:00:21 INFO: prepare candles [CandleItem(low=380.95, high=387.15, open=382.4, close=386.05, color='GREEN'), CandleItem(low=382.4, high=385.65, open=384.5, close=382.4, color='RED'), CandleItem(low=383.45, high=388.3, open=387.4, close=384.5, color='RED')] 2020-08-27 16:00:21 INFO: last_candle=CandleItem(low=380.95, high=387.15, open=382.4, close=386.05, color='GREEN') 2020-08-27 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-08-27 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=380.95, high=387.15, open=382.4, close=386.05, color='GREEN') 2020-08-27 16:00:21 INFO: skip by CandleItem(low=380.95, high=387.15, open=382.4, close=386.05, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-27 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-08-27 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=380.95, high=387.15, open=382.4, close=386.05, color='GREEN') 2020-08-27 16:00:21 INFO: apply filter None to candle=CandleItem(low=382.4, high=385.65, open=384.5, close=382.4, color='RED') 2020-08-27 16:00:21 INFO: apply filter None to candle=CandleItem(low=383.45, high=388.3, open=387.4, close=384.5, color='RED') 2020-08-27 16:00:21 INFO: hit candle order=OrderProperties(candle=CandleItem(low=380.95, high=387.15, open=382.4, close=386.05, color='GREEN'), take_profit_factor=5.0, clearing_interval=3600) 2020-08-27 16:00:21 INFO: check need new order OrderProperties(candle=CandleItem(low=380.95, high=387.15, open=382.4, close=386.05, color='GREEN'), take_profit_factor=5.0, clearing_interval=3600) 2020-08-27 16:00:21 INFO: place order: start candle=CandleItem(low=380.95, high=387.15, open=382.4, close=386.05, color='GREEN') ticker='ETHUSD' price_offset=0.1 2020-08-27 16:00:21 INFO: place order: side_factor=-1 init_trigger_price=387.2 init_order_price=387.25 stop_price_offset=0.0 candle.size=6.199999999999989 stop_price=380.95 take_price=418.24999999999994 2020-08-27 16:00:21 INFO: place order round: side_factor=-1 init_trigger_price=Decimal('387.19999999999998863131622783839702606201171875') init_order_price=Decimal('387.25') stop_price_offset=0.0 candle.size=6.199999999999989 stop_price=Decimal('380.94999999999998863131622783839702606201171875') take_price=Decimal('418.24999999999994315658113919198513031005859375') 2020-08-27 16:00:21 INFO: place order: compute qty=304 2020-08-27 16:00:21 INFO: place order: save order to db 3448dd2f314f4e78adc42ba33757d60f; response=True 2020-08-27 16:00:21 INFO: post order to exchange resp={'orderID': '35a58785-f336-0c10-50cb-3fa01778e432', 'clOrdID': '3448dd2f314f4e78adc42ba33757d60f', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 304, 'price': 387.25, 'displayQty': None, 'stopPx': 387.2, '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': 304, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 27, 13, 0, 21, 459000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 27, 13, 0, 21, 459000, tzinfo=tzutc())} 2020-08-27 16:00:21 INFO: place new init order {'qty': 304, 'init_price': Decimal('387.19999999999998863131622783839702606201171875'), 'stop_price': Decimal('380.94999999999998863131622783839702606201171875'), 'take_price': Decimal('418.24999999999994315658113919198513031005859375'), 'order_uid': '3448dd2f314f4e78adc42ba33757d60f', 'response': {'orderID': '35a58785-f336-0c10-50cb-3fa01778e432', 'clOrdID': '3448dd2f314f4e78adc42ba33757d60f', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 304, 'price': 387.25, 'displayQty': None, 'stopPx': 387.2, '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': 304, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 27, 13, 0, 21, 459000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 27, 13, 0, 21, 459000, tzinfo=tzutc())}} 2020-08-27 16:00:21 INFO: init new order end 2020-08-27 16:00:21 INFO: 2020-08-27 16:00:21 INFO: 2020-08-27 16:00:21 INFO: 2020-08-27 16:00:21 INFO: 2020-08-27 16:00:21 INFO: process event {'orderID': '35a58785-f336-0c10-50cb-3fa01778e432', 'clOrdID': '3448dd2f314f4e78adc42ba33757d60f', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 304, 'price': 387.25, 'displayQty': None, 'stopPx': 387.2, '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': 304, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-08-27T13:00:21.459Z', 'timestamp': '2020-08-27T13:00:21.459Z'} 2020-08-27 16:00:21 INFO: skip event 3448dd2f314f4e78adc42ba33757d60f New 2020-08-27 16:02:00 INFO: 2020-08-27 16:02:00 INFO: 2020-08-27 16:02:00 INFO: 2020-08-27 16:02:00 INFO: 2020-08-27 16:02:00 INFO: clearing start 2020-08-27 16:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '35a58785-f336-0c10-50cb-3fa01778e432', 'clOrdID': '3448dd2f314f4e78adc42ba33757d60f', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 304, 'price': 387.25, 'displayQty': None, 'stopPx': 387.2, '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': 304, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 27, 13, 0, 21, 459000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 27, 13, 0, 21, 459000, tzinfo=tzutc())} 2020-08-27 16:02:00 INFO: order time=2020-08-27 13:00:21.459000+00:00; delta from now UTC=0:01:39.179480 time_delta.total_seconds()=99.17948; time_diff_offset='3600' 2020-08-27 16:02:00 INFO: skip by time diff 2020-08-27 13:00:21.459000+00:00 2020-08-27 16:02:00 INFO: clearing end 2020-08-27 16:02:00 INFO: 2020-08-27 16:02:00 INFO: 2020-08-27 16:02:00 INFO: 2020-08-27 16:02:00 INFO: 2020-08-27 16:07:29 INFO: process event {'orderID': '35a58785-f336-0c10-50cb-3fa01778e432', 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 304, 'avgPx': 387.22, 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'transactTime': '2020-08-27T13:07:29.562Z', 'timestamp': '2020-08-27T13:07:29.562Z', 'clOrdID': '3448dd2f314f4e78adc42ba33757d60f', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-27 16:07:29 INFO: add new event={'uid': '3448dd2f314f4e78adc42ba33757d60f', 'status': 'Filled'} 2020-08-27 16:07:30 INFO: 2020-08-27 16:07:30 INFO: 2020-08-27 16:07:30 INFO: 2020-08-27 16:07:30 INFO: 2020-08-27 16:07:30 INFO: process event start 2020-08-27 16:07:30 INFO: fetch new order event 3448dd2f314f4e78adc42ba33757d60f 2020-08-27 16:07:30 INFO: fetch orders by event init={'stop': '380.94999999999998863131622783839702606201171875', 'take': '418.24999999999994315658113919198513031005859375', 'qty': '304', 'color': 'GREEN', 'ticker': 'ETHUSD', 'clearing_offset': '3600'} profit_pair=None 2020-08-27 16:07:30 INFO: process init order filled 2020-08-27 16:07:30 INFO: save profit orders to storage stop=356339c538004da18aaa9afaf37411ca take=776ac5471be840188fff449bf0fa5b75 2020-08-27 16:07:30 INFO: place profit orders take_price=418.24999999999994315658113919198513031005859375, stop_price=380.94999999999998863131622783839702606201171875, qty=304, color=GREEN, ticker=ETHUSD 356339c538004da18aaa9afaf37411ca 776ac5471be840188fff449bf0fa5b75 2020-08-27 16:07:30 INFO: place stop order ETHUSD: qty=-304, stop_price=380.94999999999998863131622783839702606201171875, stop_uid=356339c538004da18aaa9afaf37411ca 2020-08-27 16:07:31 INFO: exchange resp for stop order={'orderID': 'edf8b086-55a0-227b-ee9c-ecec694a4132', 'clOrdID': '356339c538004da18aaa9afaf37411ca', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 304, 'price': None, 'displayQty': None, 'stopPx': 380.95, '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': 304, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 27, 13, 7, 31, 166000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 27, 13, 7, 31, 166000, tzinfo=tzutc())} 2020-08-27 16:07:31 INFO: place limit order ETHUSD: qty=-304, price=418.24999999999994315658113919198513031005859375, take_uid=776ac5471be840188fff449bf0fa5b75 2020-08-27 16:07:31 INFO: process event {'orderID': 'edf8b086-55a0-227b-ee9c-ecec694a4132', 'clOrdID': '356339c538004da18aaa9afaf37411ca', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 304, 'price': None, 'displayQty': None, 'stopPx': 380.95, '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': 304, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': '2020-08-27T13:07:31.166Z', 'timestamp': '2020-08-27T13:07:31.166Z'} 2020-08-27 16:07:31 INFO: skip event 356339c538004da18aaa9afaf37411ca New 2020-08-27 16:07:31 INFO: exchange resp for take profit order={'orderID': '99ef7762-26c9-44a2-ae81-6f059f511006', 'clOrdID': '776ac5471be840188fff449bf0fa5b75', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 304, 'price': 418.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 304, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 27, 13, 7, 31, 656000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 27, 13, 7, 31, 656000, tzinfo=tzutc())} 2020-08-27 16:07:31 INFO: place profit orders={'stop': {'response': {'orderID': 'edf8b086-55a0-227b-ee9c-ecec694a4132', 'clOrdID': '356339c538004da18aaa9afaf37411ca', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 304, 'price': None, 'displayQty': None, 'stopPx': 380.95, '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': 304, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 27, 13, 7, 31, 166000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 27, 13, 7, 31, 166000, tzinfo=tzutc())}, 'qty': Decimal('-304'), 'uid': '356339c538004da18aaa9afaf37411ca', 'price': Decimal('380.94999999999998863131622783839702606201171875')}, 'take': {'response': {'orderID': '99ef7762-26c9-44a2-ae81-6f059f511006', 'clOrdID': '776ac5471be840188fff449bf0fa5b75', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 304, 'price': 418.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 304, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 27, 13, 7, 31, 656000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 27, 13, 7, 31, 656000, tzinfo=tzutc())}, 'qty': Decimal('-304'), 'uid': '776ac5471be840188fff449bf0fa5b75', 'price': Decimal('418.24999999999994315658113919198513031005859375')}} 2020-08-27 16:07:31 INFO: rm init order from db 3448dd2f314f4e78adc42ba33757d60f 2020-08-27 16:07:31 INFO: end process event_processing_result='proceed init order' 2020-08-27 16:07:31 INFO: 2020-08-27 16:07:31 INFO: 2020-08-27 16:07:31 INFO: 2020-08-27 16:07:31 INFO: 2020-08-27 16:07:31 INFO: process event {'orderID': '99ef7762-26c9-44a2-ae81-6f059f511006', 'clOrdID': '776ac5471be840188fff449bf0fa5b75', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 304, 'price': 418.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 304, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': '2020-08-27T13:07:31.656Z', 'timestamp': '2020-08-27T13:07:31.656Z'} 2020-08-27 16:07:31 INFO: skip event 776ac5471be840188fff449bf0fa5b75 New 2020-08-27 17:00:20 INFO: 2020-08-27 17:00:20 INFO: 2020-08-27 17:00:20 INFO: 2020-08-27 17:00:20 INFO: 2020-08-27 17:00:20 INFO: init new order start 2020-08-27 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 27, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.05, 'high': 397.45, 'low': 385.25, 'close': 388.8, 'trades': 19284, 'volume': 16331167, 'vwap': 391.62, 'lastSize': 400, 'turnover': 639552921880, 'homeNotional': 187575.19176657058, 'foreignNotional': 73460468.06249464}, {'timestamp': datetime.datetime(2020, 8, 27, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.4, 'high': 387.15, 'low': 380.95, 'close': 386.05, 'trades': 8307, 'volume': 5175047, 'vwap': 383.86, 'lastSize': 300, 'turnover': 198645331115, 'homeNotional': 58635.894013645004, 'foreignNotional': 22507791.78062995}, {'timestamp': datetime.datetime(2020, 8, 27, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.5, 'high': 385.65, 'low': 382.4, 'close': 382.4, 'trades': 3567, 'volume': 2079918, 'vwap': 383.89, 'lastSize': 1995, 'turnover': 79844818700, 'homeNotional': 23608.693727950027, 'foreignNotional': 9063034.034259748}] 2020-08-27 17:00:20 INFO: prepare candles [CandleItem(low=385.25, high=397.45, open=386.05, close=388.8, color='GREEN'), CandleItem(low=380.95, high=387.15, open=382.4, close=386.05, color='GREEN'), CandleItem(low=382.4, high=385.65, open=384.5, close=382.4, color='RED')] 2020-08-27 17:00:20 INFO: skip by colors first_candle=CandleItem(low=382.4, high=385.65, open=384.5, close=382.4, color='RED') second_candle=CandleItem(low=380.95, high=387.15, open=382.4, close=386.05, color='GREEN') last_candle=CandleItem(low=385.25, high=397.45, open=386.05, close=388.8, color='GREEN') 2020-08-27 17:00:20 INFO: check need new order None 2020-08-27 17:00:20 INFO: init new order end 2020-08-27 17:00:20 INFO: 2020-08-27 17:00:20 INFO: 2020-08-27 17:00:20 INFO: 2020-08-27 17:00:20 INFO: 2020-08-27 17:02:00 INFO: 2020-08-27 17:02:00 INFO: 2020-08-27 17:02:00 INFO: 2020-08-27 17:02:00 INFO: 2020-08-27 17:02:00 INFO: clearing start 2020-08-27 17:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'edf8b086-55a0-227b-ee9c-ecec694a4132', 'clOrdID': '356339c538004da18aaa9afaf37411ca', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 304, 'price': None, 'displayQty': None, 'stopPx': 380.95, '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': 304, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 27, 13, 7, 31, 166000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 27, 13, 7, 31, 166000, tzinfo=tzutc())} 2020-08-27 17:02:00 INFO: skip by not found init order into storage 2020-08-27 17:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '99ef7762-26c9-44a2-ae81-6f059f511006', 'clOrdID': '776ac5471be840188fff449bf0fa5b75', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 304, 'price': 418.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 304, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 27, 13, 7, 31, 656000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 27, 13, 7, 31, 656000, tzinfo=tzutc())} 2020-08-27 17:02:00 INFO: skip by not found init order into storage 2020-08-27 17:02:00 INFO: clearing end 2020-08-27 17:02:00 INFO: 2020-08-27 17:02:00 INFO: 2020-08-27 17:02:00 INFO: 2020-08-27 17:02:00 INFO: 2020-08-27 18:00:20 INFO: 2020-08-27 18:00:20 INFO: 2020-08-27 18:00:20 INFO: 2020-08-27 18:00:20 INFO: 2020-08-27 18:00:20 INFO: init new order start 2020-08-27 18:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 27, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.8, 'high': 389.85, 'low': 381.55, 'close': 383.35, 'trades': 11153, 'volume': 9217167, 'vwap': 384.73, 'lastSize': 78, 'turnover': 354606788265, 'homeNotional': 104436.97079308113, 'foreignNotional': 40180045.35433645}, {'timestamp': datetime.datetime(2020, 8, 27, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.05, 'high': 397.45, 'low': 385.25, 'close': 388.8, 'trades': 19284, 'volume': 16331167, 'vwap': 391.62, 'lastSize': 400, 'turnover': 639552921880, 'homeNotional': 187575.19176657058, 'foreignNotional': 73460468.06249464}, {'timestamp': datetime.datetime(2020, 8, 27, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.4, 'high': 387.15, 'low': 380.95, 'close': 386.05, 'trades': 8307, 'volume': 5175047, 'vwap': 383.86, 'lastSize': 300, 'turnover': 198645331115, 'homeNotional': 58635.894013645004, 'foreignNotional': 22507791.78062995}] 2020-08-27 18:00:20 INFO: prepare candles [CandleItem(low=381.55, high=389.85, open=388.8, close=383.35, color='RED'), CandleItem(low=385.25, high=397.45, open=386.05, close=388.8, color='GREEN'), CandleItem(low=380.95, high=387.15, open=382.4, close=386.05, color='GREEN')] 2020-08-27 18:00:20 INFO: last_candle=CandleItem(low=381.55, high=389.85, open=388.8, close=383.35, color='RED') 2020-08-27 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-08-27 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=381.55, high=389.85, open=388.8, close=383.35, color='RED') 2020-08-27 18:00:20 INFO: skip by CandleItem(low=381.55, high=389.85, open=388.8, close=383.35, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-27 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-08-27 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=381.55, high=389.85, open=388.8, close=383.35, color='RED') 2020-08-27 18:00:20 INFO: skip by CandleItem(low=381.55, high=389.85, open=388.8, close=383.35, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-27 18:00:20 INFO: not found applicable config for candle 2020-08-27 18:00:20 INFO: check need new order None 2020-08-27 18:00:20 INFO: init new order end 2020-08-27 18:00:20 INFO: 2020-08-27 18:00:20 INFO: 2020-08-27 18:00:20 INFO: 2020-08-27 18:00:20 INFO: 2020-08-27 18:02:00 INFO: 2020-08-27 18:02:00 INFO: 2020-08-27 18:02:00 INFO: 2020-08-27 18:02:00 INFO: 2020-08-27 18:02:00 INFO: clearing start 2020-08-27 18:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'edf8b086-55a0-227b-ee9c-ecec694a4132', 'clOrdID': '356339c538004da18aaa9afaf37411ca', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 304, 'price': None, 'displayQty': None, 'stopPx': 380.95, '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': 304, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 27, 13, 7, 31, 166000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 27, 13, 7, 31, 166000, tzinfo=tzutc())} 2020-08-27 18:02:00 INFO: skip by not found init order into storage 2020-08-27 18:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '99ef7762-26c9-44a2-ae81-6f059f511006', 'clOrdID': '776ac5471be840188fff449bf0fa5b75', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 304, 'price': 418.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 304, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 27, 13, 7, 31, 656000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 27, 13, 7, 31, 656000, tzinfo=tzutc())} 2020-08-27 18:02:00 INFO: skip by not found init order into storage 2020-08-27 18:02:00 INFO: clearing end 2020-08-27 18:02:00 INFO: 2020-08-27 18:02:00 INFO: 2020-08-27 18:02:00 INFO: 2020-08-27 18:02:00 INFO: 2020-08-27 19:00:20 INFO: 2020-08-27 19:00:20 INFO: 2020-08-27 19:00:20 INFO: 2020-08-27 19:00:20 INFO: 2020-08-27 19:00:20 INFO: init new order start 2020-08-27 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 27, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.35, 'high': 385.05, 'low': 382.85, 'close': 384.1, 'trades': 3779, 'volume': 1865139, 'vwap': 384.02, 'lastSize': 5, 'turnover': 71624363700, 'homeNotional': 21110.058665272558, 'foreignNotional': 8106614.632304451}, {'timestamp': datetime.datetime(2020, 8, 27, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.8, 'high': 389.85, 'low': 381.55, 'close': 383.35, 'trades': 11153, 'volume': 9217167, 'vwap': 384.73, 'lastSize': 78, 'turnover': 354606788265, 'homeNotional': 104436.97079308113, 'foreignNotional': 40180045.35433645}, {'timestamp': datetime.datetime(2020, 8, 27, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.05, 'high': 397.45, 'low': 385.25, 'close': 388.8, 'trades': 19284, 'volume': 16331167, 'vwap': 391.62, 'lastSize': 400, 'turnover': 639552921880, 'homeNotional': 187575.19176657058, 'foreignNotional': 73460468.06249464}] 2020-08-27 19:00:20 INFO: prepare candles [CandleItem(low=382.85, high=385.05, open=383.35, close=384.1, color='GREEN'), CandleItem(low=381.55, high=389.85, open=388.8, close=383.35, color='RED'), CandleItem(low=385.25, high=397.45, open=386.05, close=388.8, color='GREEN')] 2020-08-27 19:00:20 INFO: skip by colors first_candle=CandleItem(low=385.25, high=397.45, open=386.05, close=388.8, color='GREEN') second_candle=CandleItem(low=381.55, high=389.85, open=388.8, close=383.35, color='RED') last_candle=CandleItem(low=382.85, high=385.05, open=383.35, close=384.1, color='GREEN') 2020-08-27 19:00:20 INFO: check need new order None 2020-08-27 19:00:20 INFO: init new order end 2020-08-27 19:00:20 INFO: 2020-08-27 19:00:20 INFO: 2020-08-27 19:00:20 INFO: 2020-08-27 19:00:20 INFO: 2020-08-27 19:02:00 INFO: 2020-08-27 19:02:00 INFO: 2020-08-27 19:02:00 INFO: 2020-08-27 19:02:00 INFO: 2020-08-27 19:02:00 INFO: clearing start 2020-08-27 19:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'edf8b086-55a0-227b-ee9c-ecec694a4132', 'clOrdID': '356339c538004da18aaa9afaf37411ca', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 304, 'price': None, 'displayQty': None, 'stopPx': 380.95, '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': 304, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 27, 13, 7, 31, 166000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 27, 13, 7, 31, 166000, tzinfo=tzutc())} 2020-08-27 19:02:00 INFO: skip by not found init order into storage 2020-08-27 19:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '99ef7762-26c9-44a2-ae81-6f059f511006', 'clOrdID': '776ac5471be840188fff449bf0fa5b75', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 304, 'price': 418.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 304, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 27, 13, 7, 31, 656000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 27, 13, 7, 31, 656000, tzinfo=tzutc())} 2020-08-27 19:02:00 INFO: skip by not found init order into storage 2020-08-27 19:02:00 INFO: clearing end 2020-08-27 19:02:00 INFO: 2020-08-27 19:02:00 INFO: 2020-08-27 19:02:00 INFO: 2020-08-27 19:02:00 INFO: 2020-08-27 19:57:27 INFO: process event {'orderID': 'edf8b086-55a0-227b-ee9c-ecec694a4132', 'price': 380.9, 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 304, 'avgPx': 380.9, 'text': 'Triggered: Order stop price reached\nStop order by trader.py', 'transactTime': '2020-08-27T16:57:27.921Z', 'timestamp': '2020-08-27T16:57:27.921Z', 'clOrdID': '356339c538004da18aaa9afaf37411ca', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-27 19:57:27 INFO: add new event={'uid': '356339c538004da18aaa9afaf37411ca', 'status': 'Filled'} 2020-08-27 19:57:28 INFO: 2020-08-27 19:57:28 INFO: 2020-08-27 19:57:28 INFO: 2020-08-27 19:57:28 INFO: 2020-08-27 19:57:28 INFO: process event start 2020-08-27 19:57:28 INFO: fetch new order event 356339c538004da18aaa9afaf37411ca 2020-08-27 19:57:28 INFO: fetch orders by event init=None profit_pair=776ac5471be840188fff449bf0fa5b75 2020-08-27 19:57:28 INFO: process profit order filled 2020-08-27 19:57:29 INFO: cancel order=776ac5471be840188fff449bf0fa5b75 [{'orderID': '99ef7762-26c9-44a2-ae81-6f059f511006', 'clOrdID': '776ac5471be840188fff449bf0fa5b75', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 304, 'price': 418.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'Canceled', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 0, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 27, 13, 7, 31, 656000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 27, 16, 57, 29, 754000, tzinfo=tzutc())}] 2020-08-27 19:57:29 INFO: process event {'orderID': '99ef7762-26c9-44a2-ae81-6f059f511006', 'ordStatus': 'Canceled', 'workingIndicator': False, 'leavesQty': 0, 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'timestamp': '2020-08-27T16:57:29.754Z', 'clOrdID': '776ac5471be840188fff449bf0fa5b75', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-27 19:57:29 INFO: skip event 776ac5471be840188fff449bf0fa5b75 Canceled 2020-08-27 19:57:29 INFO: end process event_processing_result='proceed profit order' 2020-08-27 19:57:29 INFO: 2020-08-27 19:57:29 INFO: 2020-08-27 19:57:29 INFO: 2020-08-27 19:57:29 INFO: 2020-08-27 20:00:20 INFO: 2020-08-27 20:00:20 INFO: 2020-08-27 20:00:20 INFO: 2020-08-27 20:00:20 INFO: 2020-08-27 20:00:20 INFO: init new order start 2020-08-27 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 27, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.1, 'high': 386.85, 'low': 377.75, 'close': 378.3, 'trades': 8825, 'volume': 5888148, 'vwap': 382.2, 'lastSize': 26, 'turnover': 225040614620, 'homeNotional': 66573.68331232193, 'foreignNotional': 25444381.2249186}, {'timestamp': datetime.datetime(2020, 8, 27, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.35, 'high': 385.05, 'low': 382.85, 'close': 384.1, 'trades': 3779, 'volume': 1865139, 'vwap': 384.02, 'lastSize': 5, 'turnover': 71624363700, 'homeNotional': 21110.058665272558, 'foreignNotional': 8106614.632304451}, {'timestamp': datetime.datetime(2020, 8, 27, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.8, 'high': 389.85, 'low': 381.55, 'close': 383.35, 'trades': 11153, 'volume': 9217167, 'vwap': 384.73, 'lastSize': 78, 'turnover': 354606788265, 'homeNotional': 104436.97079308113, 'foreignNotional': 40180045.35433645}] 2020-08-27 20:00:20 INFO: prepare candles [CandleItem(low=377.75, high=386.85, open=384.1, close=378.3, color='RED'), CandleItem(low=382.85, high=385.05, open=383.35, close=384.1, color='GREEN'), CandleItem(low=381.55, high=389.85, open=388.8, close=383.35, color='RED')] 2020-08-27 20:00:20 INFO: skip by colors first_candle=CandleItem(low=381.55, high=389.85, open=388.8, close=383.35, color='RED') second_candle=CandleItem(low=382.85, high=385.05, open=383.35, close=384.1, color='GREEN') last_candle=CandleItem(low=377.75, high=386.85, open=384.1, close=378.3, color='RED') 2020-08-27 20:00:20 INFO: check need new order None 2020-08-27 20:00:20 INFO: init new order end 2020-08-27 20:00:20 INFO: 2020-08-27 20:00:20 INFO: 2020-08-27 20:00:20 INFO: 2020-08-27 20:00:20 INFO: 2020-08-27 20:02:00 INFO: 2020-08-27 20:02:00 INFO: 2020-08-27 20:02:00 INFO: 2020-08-27 20:02:00 INFO: 2020-08-27 20:02:00 INFO: clearing start 2020-08-27 20:02:00 INFO: clearing end 2020-08-27 20:02:00 INFO: 2020-08-27 20:02:00 INFO: 2020-08-27 20:02:00 INFO: 2020-08-27 20:02:00 INFO: 2020-08-27 21:00:20 INFO: 2020-08-27 21:00:20 INFO: 2020-08-27 21:00:20 INFO: 2020-08-27 21:00:20 INFO: 2020-08-27 21:00:20 INFO: init new order start 2020-08-27 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 27, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 378.3, 'high': 378.7, 'low': 371.8, 'close': 376.8, 'trades': 19522, 'volume': 14659533, 'vwap': 375.34, 'lastSize': 25, 'turnover': 550221177315, 'homeNotional': 164249.22308372628, 'foreignNotional': 61648545.36722625}, {'timestamp': datetime.datetime(2020, 8, 27, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.1, 'high': 386.85, 'low': 377.75, 'close': 378.3, 'trades': 8825, 'volume': 5888148, 'vwap': 382.2, 'lastSize': 26, 'turnover': 225040614620, 'homeNotional': 66573.68331232193, 'foreignNotional': 25444381.2249186}, {'timestamp': datetime.datetime(2020, 8, 27, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.35, 'high': 385.05, 'low': 382.85, 'close': 384.1, 'trades': 3779, 'volume': 1865139, 'vwap': 384.02, 'lastSize': 5, 'turnover': 71624363700, 'homeNotional': 21110.058665272558, 'foreignNotional': 8106614.632304451}] 2020-08-27 21:00:20 INFO: prepare candles [CandleItem(low=371.8, high=378.7, open=378.3, close=376.8, color='RED'), CandleItem(low=377.75, high=386.85, open=384.1, close=378.3, color='RED'), CandleItem(low=382.85, high=385.05, open=383.35, close=384.1, color='GREEN')] 2020-08-27 21:00:20 INFO: skip by colors first_candle=CandleItem(low=382.85, high=385.05, open=383.35, close=384.1, color='GREEN') second_candle=CandleItem(low=377.75, high=386.85, open=384.1, close=378.3, color='RED') last_candle=CandleItem(low=371.8, high=378.7, open=378.3, close=376.8, color='RED') 2020-08-27 21:00:20 INFO: check need new order None 2020-08-27 21:00:20 INFO: init new order end 2020-08-27 21:00:20 INFO: 2020-08-27 21:00:20 INFO: 2020-08-27 21:00:20 INFO: 2020-08-27 21:00:20 INFO: 2020-08-27 21:02:00 INFO: 2020-08-27 21:02:00 INFO: 2020-08-27 21:02:00 INFO: 2020-08-27 21:02:00 INFO: 2020-08-27 21:02:00 INFO: clearing start 2020-08-27 21:02:00 INFO: clearing end 2020-08-27 21:02:00 INFO: 2020-08-27 21:02:00 INFO: 2020-08-27 21:02:00 INFO: 2020-08-27 21:02:00 INFO: 2020-08-27 22:00:20 INFO: 2020-08-27 22:00:20 INFO: 2020-08-27 22:00:20 INFO: 2020-08-27 22:00:20 INFO: 2020-08-27 22:00:20 INFO: init new order start 2020-08-27 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 27, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 376.8, 'high': 381.85, 'low': 375.8, 'close': 380.3, 'trades': 6738, 'volume': 5481110, 'vwap': 378.5, 'lastSize': 2590, 'turnover': 207456793345, 'homeNotional': 61514.079309973735, 'foreignNotional': 23282953.32972991}, {'timestamp': datetime.datetime(2020, 8, 27, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 378.3, 'high': 378.7, 'low': 371.8, 'close': 376.8, 'trades': 19522, 'volume': 14659533, 'vwap': 375.34, 'lastSize': 25, 'turnover': 550221177315, 'homeNotional': 164249.22308372628, 'foreignNotional': 61648545.36722625}, {'timestamp': datetime.datetime(2020, 8, 27, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.1, 'high': 386.85, 'low': 377.75, 'close': 378.3, 'trades': 8825, 'volume': 5888148, 'vwap': 382.2, 'lastSize': 26, 'turnover': 225040614620, 'homeNotional': 66573.68331232193, 'foreignNotional': 25444381.2249186}] 2020-08-27 22:00:20 INFO: prepare candles [CandleItem(low=375.8, high=381.85, open=376.8, close=380.3, color='GREEN'), CandleItem(low=371.8, high=378.7, open=378.3, close=376.8, color='RED'), CandleItem(low=377.75, high=386.85, open=384.1, close=378.3, color='RED')] 2020-08-27 22:00:20 INFO: last_candle=CandleItem(low=375.8, high=381.85, open=376.8, close=380.3, color='GREEN') 2020-08-27 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-08-27 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=375.8, high=381.85, open=376.8, close=380.3, color='GREEN') 2020-08-27 22:00:20 INFO: skip by CandleItem(low=375.8, high=381.85, open=376.8, close=380.3, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-27 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-08-27 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=375.8, high=381.85, open=376.8, close=380.3, color='GREEN') 2020-08-27 22:00:20 INFO: skip by CandleItem(low=375.8, high=381.85, open=376.8, close=380.3, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-27 22:00:20 INFO: not found applicable config for candle 2020-08-27 22:00:20 INFO: check need new order None 2020-08-27 22:00:20 INFO: init new order end 2020-08-27 22:00:20 INFO: 2020-08-27 22:00:20 INFO: 2020-08-27 22:00:20 INFO: 2020-08-27 22:00:20 INFO: 2020-08-27 22:02:00 INFO: 2020-08-27 22:02:00 INFO: 2020-08-27 22:02:00 INFO: 2020-08-27 22:02:00 INFO: 2020-08-27 22:02:00 INFO: clearing start 2020-08-27 22:02:00 INFO: clearing end 2020-08-27 22:02:00 INFO: 2020-08-27 22:02:00 INFO: 2020-08-27 22:02:00 INFO: 2020-08-27 22:02:00 INFO: 2020-08-27 23:00:20 INFO: 2020-08-27 23:00:20 INFO: 2020-08-27 23:00:20 INFO: 2020-08-27 23:00:20 INFO: 2020-08-27 23:00:20 INFO: init new order start 2020-08-27 23:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 27, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 380.3, 'high': 380.35, 'low': 377.75, 'close': 378.2, 'trades': 3367, 'volume': 2120419, 'vwap': 379.13, 'lastSize': 12, 'turnover': 80389397040, 'homeNotional': 23878.602593210366, 'foreignNotional': 9052866.730743295}, {'timestamp': datetime.datetime(2020, 8, 27, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 376.8, 'high': 381.85, 'low': 375.8, 'close': 380.3, 'trades': 6738, 'volume': 5481110, 'vwap': 378.5, 'lastSize': 2590, 'turnover': 207456793345, 'homeNotional': 61514.079309973735, 'foreignNotional': 23282953.32972991}, {'timestamp': datetime.datetime(2020, 8, 27, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 378.3, 'high': 378.7, 'low': 371.8, 'close': 376.8, 'trades': 19522, 'volume': 14659533, 'vwap': 375.34, 'lastSize': 25, 'turnover': 550221177315, 'homeNotional': 164249.22308372628, 'foreignNotional': 61648545.36722625}] 2020-08-27 23:00:20 INFO: prepare candles [CandleItem(low=377.75, high=380.35, open=380.3, close=378.2, color='RED'), CandleItem(low=375.8, high=381.85, open=376.8, close=380.3, color='GREEN'), CandleItem(low=371.8, high=378.7, open=378.3, close=376.8, color='RED')] 2020-08-27 23:00:20 INFO: skip by colors first_candle=CandleItem(low=371.8, high=378.7, open=378.3, close=376.8, color='RED') second_candle=CandleItem(low=375.8, high=381.85, open=376.8, close=380.3, color='GREEN') last_candle=CandleItem(low=377.75, high=380.35, open=380.3, close=378.2, color='RED') 2020-08-27 23:00:20 INFO: check need new order None 2020-08-27 23:00:20 INFO: init new order end 2020-08-27 23:00:20 INFO: 2020-08-27 23:00:20 INFO: 2020-08-27 23:00:20 INFO: 2020-08-27 23:00:20 INFO: 2020-08-27 23:02:00 INFO: 2020-08-27 23:02:00 INFO: 2020-08-27 23:02:00 INFO: 2020-08-27 23:02:00 INFO: 2020-08-27 23:02:00 INFO: clearing start 2020-08-27 23:02:00 INFO: clearing end 2020-08-27 23:02:00 INFO: 2020-08-27 23:02:00 INFO: 2020-08-27 23:02:00 INFO: 2020-08-27 23:02:00 INFO: 2020-08-28 00:00:20 INFO: 2020-08-28 00:00:20 INFO: 2020-08-28 00:00:20 INFO: 2020-08-28 00:00:20 INFO: 2020-08-28 00:00:20 INFO: init new order start 2020-08-28 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 27, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 378.2, 'high': 382.0, 'low': 377.15, 'close': 379.65, 'trades': 4187, 'volume': 3792877, 'vwap': 380.18, 'lastSize': 10, 'turnover': 144196403980, 'homeNotional': 42765.000919615886, 'foreignNotional': 16258343.811304448}, {'timestamp': datetime.datetime(2020, 8, 27, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 380.3, 'high': 380.35, 'low': 377.75, 'close': 378.2, 'trades': 3367, 'volume': 2120419, 'vwap': 379.13, 'lastSize': 12, 'turnover': 80389397040, 'homeNotional': 23878.602593210366, 'foreignNotional': 9052866.730743295}, {'timestamp': datetime.datetime(2020, 8, 27, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 376.8, 'high': 381.85, 'low': 375.8, 'close': 380.3, 'trades': 6738, 'volume': 5481110, 'vwap': 378.5, 'lastSize': 2590, 'turnover': 207456793345, 'homeNotional': 61514.079309973735, 'foreignNotional': 23282953.32972991}] 2020-08-28 00:00:20 INFO: prepare candles [CandleItem(low=377.15, high=382.0, open=378.2, close=379.65, color='GREEN'), CandleItem(low=377.75, high=380.35, open=380.3, close=378.2, color='RED'), CandleItem(low=375.8, high=381.85, open=376.8, close=380.3, color='GREEN')] 2020-08-28 00:00:20 INFO: skip by colors first_candle=CandleItem(low=375.8, high=381.85, open=376.8, close=380.3, color='GREEN') second_candle=CandleItem(low=377.75, high=380.35, open=380.3, close=378.2, color='RED') last_candle=CandleItem(low=377.15, high=382.0, open=378.2, close=379.65, color='GREEN') 2020-08-28 00:00:20 INFO: check need new order None 2020-08-28 00:00:20 INFO: init new order end 2020-08-28 00:00:20 INFO: 2020-08-28 00:00:20 INFO: 2020-08-28 00:00:20 INFO: 2020-08-28 00:00:20 INFO: 2020-08-28 00:02:00 INFO: 2020-08-28 00:02:00 INFO: 2020-08-28 00:02:00 INFO: 2020-08-28 00:02:00 INFO: 2020-08-28 00:02:00 INFO: clearing start 2020-08-28 00:02:00 INFO: clearing end 2020-08-28 00:02:00 INFO: 2020-08-28 00:02:00 INFO: 2020-08-28 00:02:00 INFO: 2020-08-28 00:02:00 INFO: 2020-08-28 01:00:20 INFO: 2020-08-28 01:00:20 INFO: 2020-08-28 01:00:20 INFO: 2020-08-28 01:00:20 INFO: 2020-08-28 01:00:20 INFO: init new order start 2020-08-28 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 27, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.65, 'high': 382.6, 'low': 379.4, 'close': 382.6, 'trades': 2561, 'volume': 1383973, 'vwap': 381.64, 'lastSize': 1, 'turnover': 52816592295, 'homeNotional': 15621.431364482094, 'foreignNotional': 5961619.123744004}, {'timestamp': datetime.datetime(2020, 8, 27, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 378.2, 'high': 382.0, 'low': 377.15, 'close': 379.65, 'trades': 4187, 'volume': 3792877, 'vwap': 380.18, 'lastSize': 10, 'turnover': 144196403980, 'homeNotional': 42765.000919615886, 'foreignNotional': 16258343.811304448}, {'timestamp': datetime.datetime(2020, 8, 27, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 380.3, 'high': 380.35, 'low': 377.75, 'close': 378.2, 'trades': 3367, 'volume': 2120419, 'vwap': 379.13, 'lastSize': 12, 'turnover': 80389397040, 'homeNotional': 23878.602593210366, 'foreignNotional': 9052866.730743295}] 2020-08-28 01:00:20 INFO: prepare candles [CandleItem(low=379.4, high=382.6, open=379.65, close=382.6, color='GREEN'), CandleItem(low=377.15, high=382.0, open=378.2, close=379.65, color='GREEN'), CandleItem(low=377.75, high=380.35, open=380.3, close=378.2, color='RED')] 2020-08-28 01:00:20 INFO: skip by colors first_candle=CandleItem(low=377.75, high=380.35, open=380.3, close=378.2, color='RED') second_candle=CandleItem(low=377.15, high=382.0, open=378.2, close=379.65, color='GREEN') last_candle=CandleItem(low=379.4, high=382.6, open=379.65, close=382.6, color='GREEN') 2020-08-28 01:00:20 INFO: check need new order None 2020-08-28 01:00:20 INFO: init new order end 2020-08-28 01:00:20 INFO: 2020-08-28 01:00:20 INFO: 2020-08-28 01:00:20 INFO: 2020-08-28 01:00:20 INFO: 2020-08-28 01:02:00 INFO: 2020-08-28 01:02:00 INFO: 2020-08-28 01:02:00 INFO: 2020-08-28 01:02:00 INFO: 2020-08-28 01:02:00 INFO: clearing start 2020-08-28 01:02:00 INFO: clearing end 2020-08-28 01:02:00 INFO: 2020-08-28 01:02:00 INFO: 2020-08-28 01:02:00 INFO: 2020-08-28 01:02:00 INFO: 2020-08-28 02:00:20 INFO: 2020-08-28 02:00:20 INFO: 2020-08-28 02:00:20 INFO: 2020-08-28 02:00:20 INFO: 2020-08-28 02:00:20 INFO: init new order start 2020-08-28 02:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 27, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.6, 'high': 383.5, 'low': 379.5, 'close': 379.6, 'trades': 3497, 'volume': 1612791, 'vwap': 381.3, 'lastSize': 10, 'turnover': 61495426635, 'homeNotional': 18212.804818082466, 'foreignNotional': 6944529.699228889}, {'timestamp': datetime.datetime(2020, 8, 27, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.65, 'high': 382.6, 'low': 379.4, 'close': 382.6, 'trades': 2561, 'volume': 1383973, 'vwap': 381.64, 'lastSize': 1, 'turnover': 52816592295, 'homeNotional': 15621.431364482094, 'foreignNotional': 5961619.123744004}, {'timestamp': datetime.datetime(2020, 8, 27, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 378.2, 'high': 382.0, 'low': 377.15, 'close': 379.65, 'trades': 4187, 'volume': 3792877, 'vwap': 380.18, 'lastSize': 10, 'turnover': 144196403980, 'homeNotional': 42765.000919615886, 'foreignNotional': 16258343.811304448}] 2020-08-28 02:00:21 INFO: prepare candles [CandleItem(low=379.5, high=383.5, open=382.6, close=379.6, color='RED'), CandleItem(low=379.4, high=382.6, open=379.65, close=382.6, color='GREEN'), CandleItem(low=377.15, high=382.0, open=378.2, close=379.65, color='GREEN')] 2020-08-28 02:00:21 INFO: last_candle=CandleItem(low=379.5, high=383.5, open=382.6, close=379.6, color='RED') 2020-08-28 02: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-08-28 02: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=379.5, high=383.5, open=382.6, close=379.6, color='RED') 2020-08-28 02:00:21 INFO: skip by CandleItem(low=379.5, high=383.5, open=382.6, close=379.6, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-28 02: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-08-28 02: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=379.5, high=383.5, open=382.6, close=379.6, color='RED') 2020-08-28 02:00:21 INFO: skip by CandleItem(low=379.5, high=383.5, open=382.6, close=379.6, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-28 02:00:21 INFO: not found applicable config for candle 2020-08-28 02:00:21 INFO: check need new order None 2020-08-28 02:00:21 INFO: init new order end 2020-08-28 02:00:21 INFO: 2020-08-28 02:00:21 INFO: 2020-08-28 02:00:21 INFO: 2020-08-28 02:00:21 INFO: 2020-08-28 02:02:00 INFO: 2020-08-28 02:02:00 INFO: 2020-08-28 02:02:00 INFO: 2020-08-28 02:02:00 INFO: 2020-08-28 02:02:00 INFO: clearing start 2020-08-28 02:02:00 INFO: clearing end 2020-08-28 02:02:00 INFO: 2020-08-28 02:02:00 INFO: 2020-08-28 02:02:00 INFO: 2020-08-28 02:02:00 INFO: 2020-08-28 03:00:20 INFO: 2020-08-28 03:00:20 INFO: 2020-08-28 03:00:20 INFO: 2020-08-28 03:00:20 INFO: 2020-08-28 03:00:20 INFO: init new order start 2020-08-28 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 28, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.6, 'high': 384.2, 'low': 379.55, 'close': 383.95, 'trades': 4270, 'volume': 3275022, 'vwap': 382.8, 'lastSize': 2247, 'turnover': 125365968575, 'homeNotional': 37067.01545745514, 'foreignNotional': 14189078.496684257}, {'timestamp': datetime.datetime(2020, 8, 27, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.6, 'high': 383.5, 'low': 379.5, 'close': 379.6, 'trades': 3497, 'volume': 1612791, 'vwap': 381.3, 'lastSize': 10, 'turnover': 61495426635, 'homeNotional': 18212.804818082466, 'foreignNotional': 6944529.699228889}, {'timestamp': datetime.datetime(2020, 8, 27, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.65, 'high': 382.6, 'low': 379.4, 'close': 382.6, 'trades': 2561, 'volume': 1383973, 'vwap': 381.64, 'lastSize': 1, 'turnover': 52816592295, 'homeNotional': 15621.431364482094, 'foreignNotional': 5961619.123744004}] 2020-08-28 03:00:20 INFO: prepare candles [CandleItem(low=379.55, high=384.2, open=379.6, close=383.95, color='GREEN'), CandleItem(low=379.5, high=383.5, open=382.6, close=379.6, color='RED'), CandleItem(low=379.4, high=382.6, open=379.65, close=382.6, color='GREEN')] 2020-08-28 03:00:20 INFO: skip by colors first_candle=CandleItem(low=379.4, high=382.6, open=379.65, close=382.6, color='GREEN') second_candle=CandleItem(low=379.5, high=383.5, open=382.6, close=379.6, color='RED') last_candle=CandleItem(low=379.55, high=384.2, open=379.6, close=383.95, color='GREEN') 2020-08-28 03:00:20 INFO: check need new order None 2020-08-28 03:00:20 INFO: init new order end 2020-08-28 03:00:20 INFO: 2020-08-28 03:00:20 INFO: 2020-08-28 03:00:20 INFO: 2020-08-28 03:00:20 INFO: 2020-08-28 03:02:00 INFO: 2020-08-28 03:02:00 INFO: 2020-08-28 03:02:00 INFO: 2020-08-28 03:02:00 INFO: 2020-08-28 03:02:00 INFO: clearing start 2020-08-28 03:02:00 INFO: clearing end 2020-08-28 03:02:00 INFO: 2020-08-28 03:02:00 INFO: 2020-08-28 03:02:00 INFO: 2020-08-28 03:02:00 INFO: 2020-08-28 03:13:22 INFO: Websocket Closed 2020-08-28 03:13:22 WARNING: reconnect to socket 2020-08-28 03:13:22 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-08-28 03:13:22 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-08-28 03:13:22 INFO: Authenticating with API Key. 2020-08-28 03:13:23 INFO: Connected to WS. 2020-08-28 03:13:31 ERROR: Error : Connection is already closed. 2020-08-28 03:13:31 ERROR: error from callback >: Connection is already closed. 2020-08-28 03:13:31 INFO: Websocket Closed 2020-08-28 03:13:31 WARNING: reconnect to socket 2020-08-28 03:13:31 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-08-28 03:13:31 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-08-28 03:13:31 INFO: Authenticating with API Key. 2020-08-28 03:13:32 INFO: Connected to WS. 2020-08-28 03:28:14 INFO: Websocket Closed 2020-08-28 03:28:15 WARNING: reconnect to socket 2020-08-28 03:28:15 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-08-28 03:28:15 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-08-28 03:28:15 INFO: Authenticating with API Key. 2020-08-28 03:28:16 INFO: Connected to WS. 2020-08-28 04:00:20 INFO: 2020-08-28 04:00:20 INFO: 2020-08-28 04:00:20 INFO: 2020-08-28 04:00:20 INFO: 2020-08-28 04:00:20 INFO: init new order start 2020-08-28 04:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 28, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.95, 'high': 384.25, 'low': 380.15, 'close': 384.1, 'trades': 4134, 'volume': 3905744, 'vwap': 382.52, 'lastSize': 20, 'turnover': 149401317190, 'homeNotional': 44218.33484128827, 'foreignNotional': 16914319.622012347}, {'timestamp': datetime.datetime(2020, 8, 28, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.6, 'high': 384.2, 'low': 379.55, 'close': 383.95, 'trades': 4270, 'volume': 3275022, 'vwap': 382.8, 'lastSize': 2247, 'turnover': 125365968575, 'homeNotional': 37067.01545745514, 'foreignNotional': 14189078.496684257}, {'timestamp': datetime.datetime(2020, 8, 27, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.6, 'high': 383.5, 'low': 379.5, 'close': 379.6, 'trades': 3497, 'volume': 1612791, 'vwap': 381.3, 'lastSize': 10, 'turnover': 61495426635, 'homeNotional': 18212.804818082466, 'foreignNotional': 6944529.699228889}] 2020-08-28 04:00:20 INFO: prepare candles [CandleItem(low=380.15, high=384.25, open=383.95, close=384.1, color='GREEN'), CandleItem(low=379.55, high=384.2, open=379.6, close=383.95, color='GREEN'), CandleItem(low=379.5, high=383.5, open=382.6, close=379.6, color='RED')] 2020-08-28 04:00:20 INFO: skip by colors first_candle=CandleItem(low=379.5, high=383.5, open=382.6, close=379.6, color='RED') second_candle=CandleItem(low=379.55, high=384.2, open=379.6, close=383.95, color='GREEN') last_candle=CandleItem(low=380.15, high=384.25, open=383.95, close=384.1, color='GREEN') 2020-08-28 04:00:20 INFO: check need new order None 2020-08-28 04:00:20 INFO: init new order end 2020-08-28 04:00:20 INFO: 2020-08-28 04:00:20 INFO: 2020-08-28 04:00:20 INFO: 2020-08-28 04:00:20 INFO: 2020-08-28 04:02:00 INFO: 2020-08-28 04:02:00 INFO: 2020-08-28 04:02:00 INFO: 2020-08-28 04:02:00 INFO: 2020-08-28 04:02:00 INFO: clearing start 2020-08-28 04:02:00 INFO: clearing end 2020-08-28 04:02:00 INFO: 2020-08-28 04:02:00 INFO: 2020-08-28 04:02:00 INFO: 2020-08-28 04:02:00 INFO: 2020-08-28 05:00:20 INFO: 2020-08-28 05:00:21 INFO: 2020-08-28 05:00:24 INFO: 2020-08-28 05:00:25 INFO: 2020-08-28 05:00:30 INFO: init new order start 2020-08-28 05:00:55 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 28, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.1, 'high': 387.8, 'low': 383.8, 'close': 387.05, 'trades': 5124, 'volume': 2729077, 'vwap': 385.7, 'lastSize': 50, 'turnover': 105258419915, 'homeNotional': 31018.79029541137, 'foreignNotional': 11963743.933517778}, {'timestamp': datetime.datetime(2020, 8, 28, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.95, 'high': 384.25, 'low': 380.15, 'close': 384.1, 'trades': 4134, 'volume': 3905744, 'vwap': 382.52, 'lastSize': 20, 'turnover': 149401317190, 'homeNotional': 44218.33484128827, 'foreignNotional': 16914319.622012347}, {'timestamp': datetime.datetime(2020, 8, 28, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.6, 'high': 384.2, 'low': 379.55, 'close': 383.95, 'trades': 4270, 'volume': 3275022, 'vwap': 382.8, 'lastSize': 2247, 'turnover': 125365968575, 'homeNotional': 37067.01545745514, 'foreignNotional': 14189078.496684257}] 2020-08-28 05:00:55 INFO: prepare candles [CandleItem(low=383.8, high=387.8, open=384.1, close=387.05, color='GREEN'), CandleItem(low=380.15, high=384.25, open=383.95, close=384.1, color='GREEN'), CandleItem(low=379.55, high=384.2, open=379.6, close=383.95, color='GREEN')] 2020-08-28 05:00:55 INFO: skip by colors first_candle=CandleItem(low=379.55, high=384.2, open=379.6, close=383.95, color='GREEN') second_candle=CandleItem(low=380.15, high=384.25, open=383.95, close=384.1, color='GREEN') last_candle=CandleItem(low=383.8, high=387.8, open=384.1, close=387.05, color='GREEN') 2020-08-28 05:00:55 INFO: check need new order None 2020-08-28 05:00:55 INFO: init new order end 2020-08-28 05:00:55 INFO: 2020-08-28 05:00:55 INFO: 2020-08-28 05:00:55 INFO: 2020-08-28 05:00:55 INFO: 2020-08-28 05:02:00 INFO: 2020-08-28 05:02:00 INFO: 2020-08-28 05:02:00 INFO: 2020-08-28 05:02:00 INFO: 2020-08-28 05:02:00 INFO: clearing start 2020-08-28 05:02:00 INFO: clearing end 2020-08-28 05:02:00 INFO: 2020-08-28 05:02:00 INFO: 2020-08-28 05:02:00 INFO: 2020-08-28 05:02:00 INFO: 2020-08-28 05:37:03 INFO: Websocket Closed 2020-08-28 05:37:04 WARNING: reconnect to socket 2020-08-28 05:37:04 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-08-28 05:37:04 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-08-28 05:37:04 INFO: Authenticating with API Key. 2020-08-28 05:37:05 INFO: Connected to WS. 2020-08-28 06:00:20 INFO: 2020-08-28 06:00:20 INFO: 2020-08-28 06:00:20 INFO: 2020-08-28 06:00:20 INFO: 2020-08-28 06:00:20 INFO: init new order start 2020-08-28 06:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 28, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.05, 'high': 387.95, 'low': 385.5, 'close': 386.65, 'trades': 3289, 'volume': 2476230, 'vwap': 386.88, 'lastSize': 430, 'turnover': 95798173005, 'homeNotional': 28173.450013625596, 'foreignNotional': 10899498.626375096}, {'timestamp': datetime.datetime(2020, 8, 28, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.1, 'high': 387.8, 'low': 383.8, 'close': 387.05, 'trades': 5124, 'volume': 2729077, 'vwap': 385.7, 'lastSize': 50, 'turnover': 105258419915, 'homeNotional': 31018.79029541137, 'foreignNotional': 11963743.933517778}, {'timestamp': datetime.datetime(2020, 8, 28, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.95, 'high': 384.25, 'low': 380.15, 'close': 384.1, 'trades': 4134, 'volume': 3905744, 'vwap': 382.52, 'lastSize': 20, 'turnover': 149401317190, 'homeNotional': 44218.33484128827, 'foreignNotional': 16914319.622012347}] 2020-08-28 06:00:21 INFO: prepare candles [CandleItem(low=385.5, high=387.95, open=387.05, close=386.65, color='RED'), CandleItem(low=383.8, high=387.8, open=384.1, close=387.05, color='GREEN'), CandleItem(low=380.15, high=384.25, open=383.95, close=384.1, color='GREEN')] 2020-08-28 06:00:21 INFO: last_candle=CandleItem(low=385.5, high=387.95, open=387.05, close=386.65, color='RED') 2020-08-28 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-08-28 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=385.5, high=387.95, open=387.05, close=386.65, color='RED') 2020-08-28 06:00:21 INFO: skip by CandleItem(low=385.5, high=387.95, open=387.05, close=386.65, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-28 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-08-28 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=385.5, high=387.95, open=387.05, close=386.65, color='RED') 2020-08-28 06:00:21 INFO: skip by CandleItem(low=385.5, high=387.95, open=387.05, close=386.65, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-28 06:00:21 INFO: not found applicable config for candle 2020-08-28 06:00:21 INFO: check need new order None 2020-08-28 06:00:21 INFO: init new order end 2020-08-28 06:00:21 INFO: 2020-08-28 06:00:21 INFO: 2020-08-28 06:00:21 INFO: 2020-08-28 06:00:21 INFO: 2020-08-28 06:02:00 INFO: 2020-08-28 06:02:00 INFO: 2020-08-28 06:02:00 INFO: 2020-08-28 06:02:00 INFO: 2020-08-28 06:02:00 INFO: clearing start 2020-08-28 06:02:00 INFO: clearing end 2020-08-28 06:02:00 INFO: 2020-08-28 06:02:00 INFO: 2020-08-28 06:02:00 INFO: 2020-08-28 06:02:00 INFO: 2020-08-28 07:00:20 INFO: 2020-08-28 07:00:20 INFO: 2020-08-28 07:00:20 INFO: 2020-08-28 07:00:20 INFO: 2020-08-28 07:00:20 INFO: init new order start 2020-08-28 07:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 28, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.65, 'high': 388.9, 'low': 386.2, 'close': 388.0, 'trades': 4261, 'volume': 2981420, 'vwap': 387.6, 'lastSize': 700, 'turnover': 115558769695, 'homeNotional': 33921.56438054955, 'foreignNotional': 13147899.541525025}, {'timestamp': datetime.datetime(2020, 8, 28, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.05, 'high': 387.95, 'low': 385.5, 'close': 386.65, 'trades': 3289, 'volume': 2476230, 'vwap': 386.88, 'lastSize': 430, 'turnover': 95798173005, 'homeNotional': 28173.450013625596, 'foreignNotional': 10899498.626375096}, {'timestamp': datetime.datetime(2020, 8, 28, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.1, 'high': 387.8, 'low': 383.8, 'close': 387.05, 'trades': 5124, 'volume': 2729077, 'vwap': 385.7, 'lastSize': 50, 'turnover': 105258419915, 'homeNotional': 31018.79029541137, 'foreignNotional': 11963743.933517778}] 2020-08-28 07:00:20 INFO: prepare candles [CandleItem(low=386.2, high=388.9, open=386.65, close=388.0, color='GREEN'), CandleItem(low=385.5, high=387.95, open=387.05, close=386.65, color='RED'), CandleItem(low=383.8, high=387.8, open=384.1, close=387.05, color='GREEN')] 2020-08-28 07:00:20 INFO: skip by colors first_candle=CandleItem(low=383.8, high=387.8, open=384.1, close=387.05, color='GREEN') second_candle=CandleItem(low=385.5, high=387.95, open=387.05, close=386.65, color='RED') last_candle=CandleItem(low=386.2, high=388.9, open=386.65, close=388.0, color='GREEN') 2020-08-28 07:00:20 INFO: check need new order None 2020-08-28 07:00:20 INFO: init new order end 2020-08-28 07:00:20 INFO: 2020-08-28 07:00:20 INFO: 2020-08-28 07:00:20 INFO: 2020-08-28 07:00:20 INFO: 2020-08-28 07:02:00 INFO: 2020-08-28 07:02:00 INFO: 2020-08-28 07:02:00 INFO: 2020-08-28 07:02:00 INFO: 2020-08-28 07:02:00 INFO: clearing start 2020-08-28 07:02:00 INFO: clearing end 2020-08-28 07:02:00 INFO: 2020-08-28 07:02:00 INFO: 2020-08-28 07:02:00 INFO: 2020-08-28 07:02:00 INFO: 2020-08-28 08:00:20 INFO: 2020-08-28 08:00:20 INFO: 2020-08-28 08:00:20 INFO: 2020-08-28 08:00:20 INFO: 2020-08-28 08:00:20 INFO: init new order start 2020-08-28 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 28, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.0, 'high': 388.85, 'low': 386.85, 'close': 388.3, 'trades': 2457, 'volume': 1493461, 'vwap': 387.91, 'lastSize': 14, 'turnover': 57932504300, 'homeNotional': 16999.70899287548, 'foreignNotional': 6594320.5732152015}, {'timestamp': datetime.datetime(2020, 8, 28, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.65, 'high': 388.9, 'low': 386.2, 'close': 388.0, 'trades': 4261, 'volume': 2981420, 'vwap': 387.6, 'lastSize': 700, 'turnover': 115558769695, 'homeNotional': 33921.56438054955, 'foreignNotional': 13147899.541525025}, {'timestamp': datetime.datetime(2020, 8, 28, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.05, 'high': 387.95, 'low': 385.5, 'close': 386.65, 'trades': 3289, 'volume': 2476230, 'vwap': 386.88, 'lastSize': 430, 'turnover': 95798173005, 'homeNotional': 28173.450013625596, 'foreignNotional': 10899498.626375096}] 2020-08-28 08:00:20 INFO: prepare candles [CandleItem(low=386.85, high=388.85, open=388.0, close=388.3, color='GREEN'), CandleItem(low=386.2, high=388.9, open=386.65, close=388.0, color='GREEN'), CandleItem(low=385.5, high=387.95, open=387.05, close=386.65, color='RED')] 2020-08-28 08:00:20 INFO: skip by colors first_candle=CandleItem(low=385.5, high=387.95, open=387.05, close=386.65, color='RED') second_candle=CandleItem(low=386.2, high=388.9, open=386.65, close=388.0, color='GREEN') last_candle=CandleItem(low=386.85, high=388.85, open=388.0, close=388.3, color='GREEN') 2020-08-28 08:00:20 INFO: check need new order None 2020-08-28 08:00:20 INFO: init new order end 2020-08-28 08:00:20 INFO: 2020-08-28 08:00:20 INFO: 2020-08-28 08:00:20 INFO: 2020-08-28 08:00:20 INFO: 2020-08-28 08:02:00 INFO: 2020-08-28 08:02:00 INFO: 2020-08-28 08:02:00 INFO: 2020-08-28 08:02:00 INFO: 2020-08-28 08:02:00 INFO: clearing start 2020-08-28 08:02:00 INFO: clearing end 2020-08-28 08:02:00 INFO: 2020-08-28 08:02:00 INFO: 2020-08-28 08:02:00 INFO: 2020-08-28 08:02:00 INFO: 2020-08-28 09:00:20 INFO: 2020-08-28 09:00:20 INFO: 2020-08-28 09:00:20 INFO: 2020-08-28 09:00:20 INFO: 2020-08-28 09:00:20 INFO: init new order start 2020-08-28 09:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 28, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.3, 'high': 389.45, 'low': 387.05, 'close': 388.9, 'trades': 2676, 'volume': 2629092, 'vwap': 388.45, 'lastSize': 56, 'turnover': 102126587950, 'homeNotional': 29956.190903153267, 'foreignNotional': 11636437.30765065}, {'timestamp': datetime.datetime(2020, 8, 28, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.0, 'high': 388.85, 'low': 386.85, 'close': 388.3, 'trades': 2457, 'volume': 1493461, 'vwap': 387.91, 'lastSize': 14, 'turnover': 57932504300, 'homeNotional': 16999.70899287548, 'foreignNotional': 6594320.5732152015}, {'timestamp': datetime.datetime(2020, 8, 28, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.65, 'high': 388.9, 'low': 386.2, 'close': 388.0, 'trades': 4261, 'volume': 2981420, 'vwap': 387.6, 'lastSize': 700, 'turnover': 115558769695, 'homeNotional': 33921.56438054955, 'foreignNotional': 13147899.541525025}] 2020-08-28 09:00:20 INFO: prepare candles [CandleItem(low=387.05, high=389.45, open=388.3, close=388.9, color='GREEN'), CandleItem(low=386.85, high=388.85, open=388.0, close=388.3, color='GREEN'), CandleItem(low=386.2, high=388.9, open=386.65, close=388.0, color='GREEN')] 2020-08-28 09:00:20 INFO: skip by colors first_candle=CandleItem(low=386.2, high=388.9, open=386.65, close=388.0, color='GREEN') second_candle=CandleItem(low=386.85, high=388.85, open=388.0, close=388.3, color='GREEN') last_candle=CandleItem(low=387.05, high=389.45, open=388.3, close=388.9, color='GREEN') 2020-08-28 09:00:20 INFO: check need new order None 2020-08-28 09:00:20 INFO: init new order end 2020-08-28 09:00:20 INFO: 2020-08-28 09:00:20 INFO: 2020-08-28 09:00:20 INFO: 2020-08-28 09:00:20 INFO: 2020-08-28 09:02:00 INFO: 2020-08-28 09:02:00 INFO: 2020-08-28 09:02:00 INFO: 2020-08-28 09:02:00 INFO: 2020-08-28 09:02:00 INFO: clearing start 2020-08-28 09:02:00 INFO: clearing end 2020-08-28 09:02:00 INFO: 2020-08-28 09:02:00 INFO: 2020-08-28 09:02:00 INFO: 2020-08-28 09:02:00 INFO: 2020-08-28 10:00:20 INFO: 2020-08-28 10:00:20 INFO: 2020-08-28 10:00:20 INFO: 2020-08-28 10:00:20 INFO: 2020-08-28 10:00:20 INFO: init new order start 2020-08-28 10:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 28, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.9, 'high': 392.5, 'low': 387.7, 'close': 391.5, 'trades': 5969, 'volume': 3990613, 'vwap': 390.57, 'lastSize': 8, 'turnover': 155859481350, 'homeNotional': 45617.56934640744, 'foreignNotional': 17816695.1234123}, {'timestamp': datetime.datetime(2020, 8, 28, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.3, 'high': 389.45, 'low': 387.05, 'close': 388.9, 'trades': 2676, 'volume': 2629092, 'vwap': 388.45, 'lastSize': 56, 'turnover': 102126587950, 'homeNotional': 29956.190903153267, 'foreignNotional': 11636437.30765065}, {'timestamp': datetime.datetime(2020, 8, 28, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.0, 'high': 388.85, 'low': 386.85, 'close': 388.3, 'trades': 2457, 'volume': 1493461, 'vwap': 387.91, 'lastSize': 14, 'turnover': 57932504300, 'homeNotional': 16999.70899287548, 'foreignNotional': 6594320.5732152015}] 2020-08-28 10:00:20 INFO: prepare candles [CandleItem(low=387.7, high=392.5, open=388.9, close=391.5, color='GREEN'), CandleItem(low=387.05, high=389.45, open=388.3, close=388.9, color='GREEN'), CandleItem(low=386.85, high=388.85, open=388.0, close=388.3, color='GREEN')] 2020-08-28 10:00:20 INFO: skip by colors first_candle=CandleItem(low=386.85, high=388.85, open=388.0, close=388.3, color='GREEN') second_candle=CandleItem(low=387.05, high=389.45, open=388.3, close=388.9, color='GREEN') last_candle=CandleItem(low=387.7, high=392.5, open=388.9, close=391.5, color='GREEN') 2020-08-28 10:00:20 INFO: check need new order None 2020-08-28 10:00:20 INFO: init new order end 2020-08-28 10:00:20 INFO: 2020-08-28 10:00:20 INFO: 2020-08-28 10:00:20 INFO: 2020-08-28 10:00:20 INFO: 2020-08-28 10:02:00 INFO: 2020-08-28 10:02:00 INFO: 2020-08-28 10:02:00 INFO: 2020-08-28 10:02:00 INFO: 2020-08-28 10:02:00 INFO: clearing start 2020-08-28 10:02:00 INFO: clearing end 2020-08-28 10:02:00 INFO: 2020-08-28 10:02:00 INFO: 2020-08-28 10:02:00 INFO: 2020-08-28 10:02:00 INFO: 2020-08-28 11:00:20 INFO: 2020-08-28 11:00:20 INFO: 2020-08-28 11:00:20 INFO: 2020-08-28 11:00:20 INFO: 2020-08-28 11:00:20 INFO: init new order start 2020-08-28 11:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 28, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.5, 'high': 392.2, 'low': 387.65, 'close': 387.95, 'trades': 3262, 'volume': 1722361, 'vwap': 389.26, 'lastSize': 12, 'turnover': 67044568890, 'homeNotional': 19644.394995200277, 'foreignNotional': 7646819.943692431}, {'timestamp': datetime.datetime(2020, 8, 28, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.9, 'high': 392.5, 'low': 387.7, 'close': 391.5, 'trades': 5969, 'volume': 3990613, 'vwap': 390.57, 'lastSize': 8, 'turnover': 155859481350, 'homeNotional': 45617.56934640744, 'foreignNotional': 17816695.1234123}, {'timestamp': datetime.datetime(2020, 8, 28, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.3, 'high': 389.45, 'low': 387.05, 'close': 388.9, 'trades': 2676, 'volume': 2629092, 'vwap': 388.45, 'lastSize': 56, 'turnover': 102126587950, 'homeNotional': 29956.190903153267, 'foreignNotional': 11636437.30765065}] 2020-08-28 11:00:20 INFO: prepare candles [CandleItem(low=387.65, high=392.2, open=391.5, close=387.95, color='RED'), CandleItem(low=387.7, high=392.5, open=388.9, close=391.5, color='GREEN'), CandleItem(low=387.05, high=389.45, open=388.3, close=388.9, color='GREEN')] 2020-08-28 11:00:20 INFO: last_candle=CandleItem(low=387.65, high=392.2, open=391.5, close=387.95, color='RED') 2020-08-28 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-08-28 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=387.65, high=392.2, open=391.5, close=387.95, color='RED') 2020-08-28 11:00:20 INFO: skip by CandleItem(low=387.65, high=392.2, open=391.5, close=387.95, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-28 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-08-28 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=387.65, high=392.2, open=391.5, close=387.95, color='RED') 2020-08-28 11:00:20 INFO: skip by CandleItem(low=387.65, high=392.2, open=391.5, close=387.95, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-28 11:00:20 INFO: not found applicable config for candle 2020-08-28 11:00:20 INFO: check need new order None 2020-08-28 11:00:20 INFO: init new order end 2020-08-28 11:00:20 INFO: 2020-08-28 11:00:20 INFO: 2020-08-28 11:00:20 INFO: 2020-08-28 11:00:20 INFO: 2020-08-28 11:02:00 INFO: 2020-08-28 11:02:00 INFO: 2020-08-28 11:02:00 INFO: 2020-08-28 11:02:00 INFO: 2020-08-28 11:02:00 INFO: clearing start 2020-08-28 11:02:00 INFO: clearing end 2020-08-28 11:02:00 INFO: 2020-08-28 11:02:00 INFO: 2020-08-28 11:02:00 INFO: 2020-08-28 11:02:00 INFO: 2020-08-28 12:00:20 INFO: 2020-08-28 12:00:20 INFO: 2020-08-28 12:00:20 INFO: 2020-08-28 12:00:20 INFO: 2020-08-28 12:00:20 INFO: init new order start 2020-08-28 12:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 28, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.95, 'high': 389.35, 'low': 387.25, 'close': 388.15, 'trades': 2259, 'volume': 1608647, 'vwap': 388.33, 'lastSize': 10, 'turnover': 62467411450, 'homeNotional': 18332.087383737962, 'foreignNotional': 7118776.314548972}, {'timestamp': datetime.datetime(2020, 8, 28, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.5, 'high': 392.2, 'low': 387.65, 'close': 387.95, 'trades': 3262, 'volume': 1722361, 'vwap': 389.26, 'lastSize': 12, 'turnover': 67044568890, 'homeNotional': 19644.394995200277, 'foreignNotional': 7646819.943692431}, {'timestamp': datetime.datetime(2020, 8, 28, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.9, 'high': 392.5, 'low': 387.7, 'close': 391.5, 'trades': 5969, 'volume': 3990613, 'vwap': 390.57, 'lastSize': 8, 'turnover': 155859481350, 'homeNotional': 45617.56934640744, 'foreignNotional': 17816695.1234123}] 2020-08-28 12:00:21 INFO: prepare candles [CandleItem(low=387.25, high=389.35, open=387.95, close=388.15, color='GREEN'), CandleItem(low=387.65, high=392.2, open=391.5, close=387.95, color='RED'), CandleItem(low=387.7, high=392.5, open=388.9, close=391.5, color='GREEN')] 2020-08-28 12:00:21 INFO: skip by colors first_candle=CandleItem(low=387.7, high=392.5, open=388.9, close=391.5, color='GREEN') second_candle=CandleItem(low=387.65, high=392.2, open=391.5, close=387.95, color='RED') last_candle=CandleItem(low=387.25, high=389.35, open=387.95, close=388.15, color='GREEN') 2020-08-28 12:00:21 INFO: check need new order None 2020-08-28 12:00:21 INFO: init new order end 2020-08-28 12:00:21 INFO: 2020-08-28 12:00:21 INFO: 2020-08-28 12:00:21 INFO: 2020-08-28 12:00:21 INFO: 2020-08-28 12:02:00 INFO: 2020-08-28 12:02:00 INFO: 2020-08-28 12:02:00 INFO: 2020-08-28 12:02:00 INFO: 2020-08-28 12:02:00 INFO: clearing start 2020-08-28 12:02:00 INFO: clearing end 2020-08-28 12:02:00 INFO: 2020-08-28 12:02:00 INFO: 2020-08-28 12:02:00 INFO: 2020-08-28 12:02:00 INFO: 2020-08-28 13:00:20 INFO: 2020-08-28 13:00:20 INFO: 2020-08-28 13:00:20 INFO: 2020-08-28 13:00:20 INFO: 2020-08-28 13:00:20 INFO: init new order start 2020-08-28 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 28, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.15, 'high': 392.95, 'low': 388.0, 'close': 392.45, 'trades': 4564, 'volume': 3806113, 'vwap': 390.95, 'lastSize': 8828, 'turnover': 148799575790, 'homeNotional': 43547.14098225038, 'foreignNotional': 17024766.627419252}, {'timestamp': datetime.datetime(2020, 8, 28, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.95, 'high': 389.35, 'low': 387.25, 'close': 388.15, 'trades': 2259, 'volume': 1608647, 'vwap': 388.33, 'lastSize': 10, 'turnover': 62467411450, 'homeNotional': 18332.087383737962, 'foreignNotional': 7118776.314548972}, {'timestamp': datetime.datetime(2020, 8, 28, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.5, 'high': 392.2, 'low': 387.65, 'close': 387.95, 'trades': 3262, 'volume': 1722361, 'vwap': 389.26, 'lastSize': 12, 'turnover': 67044568890, 'homeNotional': 19644.394995200277, 'foreignNotional': 7646819.943692431}] 2020-08-28 13:00:20 INFO: prepare candles [CandleItem(low=388.0, high=392.95, open=388.15, close=392.45, color='GREEN'), CandleItem(low=387.25, high=389.35, open=387.95, close=388.15, color='GREEN'), CandleItem(low=387.65, high=392.2, open=391.5, close=387.95, color='RED')] 2020-08-28 13:00:20 INFO: skip by colors first_candle=CandleItem(low=387.65, high=392.2, open=391.5, close=387.95, color='RED') second_candle=CandleItem(low=387.25, high=389.35, open=387.95, close=388.15, color='GREEN') last_candle=CandleItem(low=388.0, high=392.95, open=388.15, close=392.45, color='GREEN') 2020-08-28 13:00:20 INFO: check need new order None 2020-08-28 13:00:20 INFO: init new order end 2020-08-28 13:00:20 INFO: 2020-08-28 13:00:20 INFO: 2020-08-28 13:00:20 INFO: 2020-08-28 13:00:20 INFO: 2020-08-28 13:02:00 INFO: 2020-08-28 13:02:00 INFO: 2020-08-28 13:02:00 INFO: 2020-08-28 13:02:00 INFO: 2020-08-28 13:02:00 INFO: clearing start 2020-08-28 13:02:00 INFO: clearing end 2020-08-28 13:02:00 INFO: 2020-08-28 13:02:00 INFO: 2020-08-28 13:02:00 INFO: 2020-08-28 13:02:00 INFO: 2020-08-28 14:00:20 INFO: 2020-08-28 14:00:20 INFO: 2020-08-28 14:00:20 INFO: 2020-08-28 14:00:20 INFO: 2020-08-28 14:00:20 INFO: init new order start 2020-08-28 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 28, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.45, 'high': 392.9, 'low': 390.1, 'close': 391.9, 'trades': 3021, 'volume': 1998252, 'vwap': 391.28, 'lastSize': 2940, 'turnover': 78186908710, 'homeNotional': 22849.42053303897, 'foreignNotional': 8940451.314531056}, {'timestamp': datetime.datetime(2020, 8, 28, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.15, 'high': 392.95, 'low': 388.0, 'close': 392.45, 'trades': 4564, 'volume': 3806113, 'vwap': 390.95, 'lastSize': 8828, 'turnover': 148799575790, 'homeNotional': 43547.14098225038, 'foreignNotional': 17024766.627419252}, {'timestamp': datetime.datetime(2020, 8, 28, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.95, 'high': 389.35, 'low': 387.25, 'close': 388.15, 'trades': 2259, 'volume': 1608647, 'vwap': 388.33, 'lastSize': 10, 'turnover': 62467411450, 'homeNotional': 18332.087383737962, 'foreignNotional': 7118776.314548972}] 2020-08-28 14:00:20 INFO: prepare candles [CandleItem(low=390.1, high=392.9, open=392.45, close=391.9, color='RED'), CandleItem(low=388.0, high=392.95, open=388.15, close=392.45, color='GREEN'), CandleItem(low=387.25, high=389.35, open=387.95, close=388.15, color='GREEN')] 2020-08-28 14:00:20 INFO: last_candle=CandleItem(low=390.1, high=392.9, open=392.45, close=391.9, color='RED') 2020-08-28 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-08-28 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=390.1, high=392.9, open=392.45, close=391.9, color='RED') 2020-08-28 14:00:20 INFO: skip by CandleItem(low=390.1, high=392.9, open=392.45, close=391.9, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-28 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-08-28 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=390.1, high=392.9, open=392.45, close=391.9, color='RED') 2020-08-28 14:00:20 INFO: skip by CandleItem(low=390.1, high=392.9, open=392.45, close=391.9, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-28 14:00:20 INFO: not found applicable config for candle 2020-08-28 14:00:20 INFO: check need new order None 2020-08-28 14:00:20 INFO: init new order end 2020-08-28 14:00:20 INFO: 2020-08-28 14:00:20 INFO: 2020-08-28 14:00:20 INFO: 2020-08-28 14:00:20 INFO: 2020-08-28 14:02:00 INFO: 2020-08-28 14:02:00 INFO: 2020-08-28 14:02:00 INFO: 2020-08-28 14:02:00 INFO: 2020-08-28 14:02:00 INFO: clearing start 2020-08-28 14:02:00 INFO: clearing end 2020-08-28 14:02:00 INFO: 2020-08-28 14:02:00 INFO: 2020-08-28 14:02:00 INFO: 2020-08-28 14:02:00 INFO: 2020-08-28 15:00:20 INFO: 2020-08-28 15:00:20 INFO: 2020-08-28 15:00:20 INFO: 2020-08-28 15:00:20 INFO: 2020-08-28 15:00:20 INFO: init new order start 2020-08-28 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 28, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.9, 'high': 394.4, 'low': 390.55, 'close': 393.9, 'trades': 3802, 'volume': 1745107, 'vwap': 392.63, 'lastSize': 25, 'turnover': 68517550525, 'homeNotional': 19982.991084056484, 'foreignNotional': 7845879.189387845}, {'timestamp': datetime.datetime(2020, 8, 28, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.45, 'high': 392.9, 'low': 390.1, 'close': 391.9, 'trades': 3021, 'volume': 1998252, 'vwap': 391.28, 'lastSize': 2940, 'turnover': 78186908710, 'homeNotional': 22849.42053303897, 'foreignNotional': 8940451.314531056}, {'timestamp': datetime.datetime(2020, 8, 28, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.15, 'high': 392.95, 'low': 388.0, 'close': 392.45, 'trades': 4564, 'volume': 3806113, 'vwap': 390.95, 'lastSize': 8828, 'turnover': 148799575790, 'homeNotional': 43547.14098225038, 'foreignNotional': 17024766.627419252}] 2020-08-28 15:00:20 INFO: prepare candles [CandleItem(low=390.55, high=394.4, open=391.9, close=393.9, color='GREEN'), CandleItem(low=390.1, high=392.9, open=392.45, close=391.9, color='RED'), CandleItem(low=388.0, high=392.95, open=388.15, close=392.45, color='GREEN')] 2020-08-28 15:00:20 INFO: skip by colors first_candle=CandleItem(low=388.0, high=392.95, open=388.15, close=392.45, color='GREEN') second_candle=CandleItem(low=390.1, high=392.9, open=392.45, close=391.9, color='RED') last_candle=CandleItem(low=390.55, high=394.4, open=391.9, close=393.9, color='GREEN') 2020-08-28 15:00:20 INFO: check need new order None 2020-08-28 15:00:20 INFO: init new order end 2020-08-28 15:00:20 INFO: 2020-08-28 15:00:20 INFO: 2020-08-28 15:00:20 INFO: 2020-08-28 15:00:20 INFO: 2020-08-28 15:02:00 INFO: 2020-08-28 15:02:00 INFO: 2020-08-28 15:02:00 INFO: 2020-08-28 15:02:00 INFO: 2020-08-28 15:02:00 INFO: clearing start 2020-08-28 15:02:00 INFO: clearing end 2020-08-28 15:02:00 INFO: 2020-08-28 15:02:00 INFO: 2020-08-28 15:02:00 INFO: 2020-08-28 15:02:00 INFO: 2020-08-28 16:00:20 INFO: 2020-08-28 16:00:20 INFO: 2020-08-28 16:00:20 INFO: 2020-08-28 16:00:20 INFO: 2020-08-28 16:00:20 INFO: init new order start 2020-08-28 16:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 28, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.9, 'high': 394.5, 'low': 390.8, 'close': 391.8, 'trades': 3954, 'volume': 2829715, 'vwap': 392.77, 'lastSize': 875, 'turnover': 111140348115, 'homeNotional': 32427.387522515128, 'foreignNotional': 12736270.872014519}, {'timestamp': datetime.datetime(2020, 8, 28, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.9, 'high': 394.4, 'low': 390.55, 'close': 393.9, 'trades': 3802, 'volume': 1745107, 'vwap': 392.63, 'lastSize': 25, 'turnover': 68517550525, 'homeNotional': 19982.991084056484, 'foreignNotional': 7845879.189387845}, {'timestamp': datetime.datetime(2020, 8, 28, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.45, 'high': 392.9, 'low': 390.1, 'close': 391.9, 'trades': 3021, 'volume': 1998252, 'vwap': 391.28, 'lastSize': 2940, 'turnover': 78186908710, 'homeNotional': 22849.42053303897, 'foreignNotional': 8940451.314531056}] 2020-08-28 16:00:20 INFO: prepare candles [CandleItem(low=390.8, high=394.5, open=393.9, close=391.8, color='RED'), CandleItem(low=390.55, high=394.4, open=391.9, close=393.9, color='GREEN'), CandleItem(low=390.1, high=392.9, open=392.45, close=391.9, color='RED')] 2020-08-28 16:00:20 INFO: skip by colors first_candle=CandleItem(low=390.1, high=392.9, open=392.45, close=391.9, color='RED') second_candle=CandleItem(low=390.55, high=394.4, open=391.9, close=393.9, color='GREEN') last_candle=CandleItem(low=390.8, high=394.5, open=393.9, close=391.8, color='RED') 2020-08-28 16:00:20 INFO: check need new order None 2020-08-28 16:00:20 INFO: init new order end 2020-08-28 16:00:20 INFO: 2020-08-28 16:00:20 INFO: 2020-08-28 16:00:20 INFO: 2020-08-28 16:00:20 INFO: 2020-08-28 16:02:00 INFO: 2020-08-28 16:02:00 INFO: 2020-08-28 16:02:00 INFO: 2020-08-28 16:02:00 INFO: 2020-08-28 16:02:00 INFO: clearing start 2020-08-28 16:02:00 INFO: clearing end 2020-08-28 16:02:00 INFO: 2020-08-28 16:02:00 INFO: 2020-08-28 16:02:00 INFO: 2020-08-28 16:02:00 INFO: 2020-08-28 17:00:20 INFO: 2020-08-28 17:00:20 INFO: 2020-08-28 17:00:20 INFO: 2020-08-28 17:00:20 INFO: 2020-08-28 17:00:20 INFO: init new order start 2020-08-28 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 28, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.8, 'high': 392.75, 'low': 391.1, 'close': 392.45, 'trades': 2913, 'volume': 2932283, 'vwap': 391.8, 'lastSize': 238, 'turnover': 114886154640, 'homeNotional': 33573.414292720496, 'foreignNotional': 13153987.908467844}, {'timestamp': datetime.datetime(2020, 8, 28, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.9, 'high': 394.5, 'low': 390.8, 'close': 391.8, 'trades': 3954, 'volume': 2829715, 'vwap': 392.77, 'lastSize': 875, 'turnover': 111140348115, 'homeNotional': 32427.387522515128, 'foreignNotional': 12736270.872014519}, {'timestamp': datetime.datetime(2020, 8, 28, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.9, 'high': 394.4, 'low': 390.55, 'close': 393.9, 'trades': 3802, 'volume': 1745107, 'vwap': 392.63, 'lastSize': 25, 'turnover': 68517550525, 'homeNotional': 19982.991084056484, 'foreignNotional': 7845879.189387845}] 2020-08-28 17:00:20 INFO: prepare candles [CandleItem(low=391.1, high=392.75, open=391.8, close=392.45, color='GREEN'), CandleItem(low=390.8, high=394.5, open=393.9, close=391.8, color='RED'), CandleItem(low=390.55, high=394.4, open=391.9, close=393.9, color='GREEN')] 2020-08-28 17:00:20 INFO: skip by colors first_candle=CandleItem(low=390.55, high=394.4, open=391.9, close=393.9, color='GREEN') second_candle=CandleItem(low=390.8, high=394.5, open=393.9, close=391.8, color='RED') last_candle=CandleItem(low=391.1, high=392.75, open=391.8, close=392.45, color='GREEN') 2020-08-28 17:00:20 INFO: check need new order None 2020-08-28 17:00:20 INFO: init new order end 2020-08-28 17:00:20 INFO: 2020-08-28 17:00:20 INFO: 2020-08-28 17:00:20 INFO: 2020-08-28 17:00:20 INFO: 2020-08-28 17:02:00 INFO: 2020-08-28 17:02:00 INFO: 2020-08-28 17:02:00 INFO: 2020-08-28 17:02:00 INFO: 2020-08-28 17:02:00 INFO: clearing start 2020-08-28 17:02:00 INFO: clearing end 2020-08-28 17:02:00 INFO: 2020-08-28 17:02:00 INFO: 2020-08-28 17:02:00 INFO: 2020-08-28 17:02:00 INFO: 2020-08-28 18:00:20 INFO: 2020-08-28 18:00:20 INFO: 2020-08-28 18:00:20 INFO: 2020-08-28 18:00:20 INFO: 2020-08-28 18:00:20 INFO: init new order start 2020-08-28 18:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 28, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.45, 'high': 393.5, 'low': 390.35, 'close': 391.85, 'trades': 3722, 'volume': 2756098, 'vwap': 392.03, 'lastSize': 111, 'turnover': 108047121270, 'homeNotional': 31557.747709356678, 'foreignNotional': 12371587.147620153}, {'timestamp': datetime.datetime(2020, 8, 28, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.8, 'high': 392.75, 'low': 391.1, 'close': 392.45, 'trades': 2913, 'volume': 2932283, 'vwap': 391.8, 'lastSize': 238, 'turnover': 114886154640, 'homeNotional': 33573.414292720496, 'foreignNotional': 13153987.908467844}, {'timestamp': datetime.datetime(2020, 8, 28, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.9, 'high': 394.5, 'low': 390.8, 'close': 391.8, 'trades': 3954, 'volume': 2829715, 'vwap': 392.77, 'lastSize': 875, 'turnover': 111140348115, 'homeNotional': 32427.387522515128, 'foreignNotional': 12736270.872014519}] 2020-08-28 18:00:20 INFO: prepare candles [CandleItem(low=390.35, high=393.5, open=392.45, close=391.85, color='RED'), CandleItem(low=391.1, high=392.75, open=391.8, close=392.45, color='GREEN'), CandleItem(low=390.8, high=394.5, open=393.9, close=391.8, color='RED')] 2020-08-28 18:00:20 INFO: skip by colors first_candle=CandleItem(low=390.8, high=394.5, open=393.9, close=391.8, color='RED') second_candle=CandleItem(low=391.1, high=392.75, open=391.8, close=392.45, color='GREEN') last_candle=CandleItem(low=390.35, high=393.5, open=392.45, close=391.85, color='RED') 2020-08-28 18:00:20 INFO: check need new order None 2020-08-28 18:00:20 INFO: init new order end 2020-08-28 18:00:20 INFO: 2020-08-28 18:00:20 INFO: 2020-08-28 18:00:20 INFO: 2020-08-28 18:00:20 INFO: 2020-08-28 18:02:00 INFO: 2020-08-28 18:02:00 INFO: 2020-08-28 18:02:00 INFO: 2020-08-28 18:02:00 INFO: 2020-08-28 18:02:00 INFO: clearing start 2020-08-28 18:02:00 INFO: clearing end 2020-08-28 18:02:00 INFO: 2020-08-28 18:02:00 INFO: 2020-08-28 18:02:00 INFO: 2020-08-28 18:02:00 INFO: 2020-08-28 19:00:20 INFO: 2020-08-28 19:00:20 INFO: 2020-08-28 19:00:20 INFO: 2020-08-28 19:00:20 INFO: 2020-08-28 19:00:20 INFO: init new order start 2020-08-28 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 28, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.85, 'high': 397.35, 'low': 391.8, 'close': 396.85, 'trades': 7113, 'volume': 5857699, 'vwap': 395.48, 'lastSize': 35, 'turnover': 231655936795, 'homeNotional': 67320.63593162615, 'foreignNotional': 26623600.11142649}, {'timestamp': datetime.datetime(2020, 8, 28, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.45, 'high': 393.5, 'low': 390.35, 'close': 391.85, 'trades': 3722, 'volume': 2756098, 'vwap': 392.03, 'lastSize': 111, 'turnover': 108047121270, 'homeNotional': 31557.747709356678, 'foreignNotional': 12371587.147620153}, {'timestamp': datetime.datetime(2020, 8, 28, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.8, 'high': 392.75, 'low': 391.1, 'close': 392.45, 'trades': 2913, 'volume': 2932283, 'vwap': 391.8, 'lastSize': 238, 'turnover': 114886154640, 'homeNotional': 33573.414292720496, 'foreignNotional': 13153987.908467844}] 2020-08-28 19:00:20 INFO: prepare candles [CandleItem(low=391.8, high=397.35, open=391.85, close=396.85, color='GREEN'), CandleItem(low=390.35, high=393.5, open=392.45, close=391.85, color='RED'), CandleItem(low=391.1, high=392.75, open=391.8, close=392.45, color='GREEN')] 2020-08-28 19:00:20 INFO: skip by colors first_candle=CandleItem(low=391.1, high=392.75, open=391.8, close=392.45, color='GREEN') second_candle=CandleItem(low=390.35, high=393.5, open=392.45, close=391.85, color='RED') last_candle=CandleItem(low=391.8, high=397.35, open=391.85, close=396.85, color='GREEN') 2020-08-28 19:00:20 INFO: check need new order None 2020-08-28 19:00:20 INFO: init new order end 2020-08-28 19:00:20 INFO: 2020-08-28 19:00:20 INFO: 2020-08-28 19:00:20 INFO: 2020-08-28 19:00:20 INFO: 2020-08-28 19:02:00 INFO: 2020-08-28 19:02:00 INFO: 2020-08-28 19:02:00 INFO: 2020-08-28 19:02:00 INFO: 2020-08-28 19:02:00 INFO: clearing start 2020-08-28 19:02:00 INFO: clearing end 2020-08-28 19:02:00 INFO: 2020-08-28 19:02:00 INFO: 2020-08-28 19:02:00 INFO: 2020-08-28 19:02:00 INFO: 2020-08-28 20:00:20 INFO: 2020-08-28 20:00:20 INFO: 2020-08-28 20:00:20 INFO: 2020-08-28 20:00:20 INFO: 2020-08-28 20:00:20 INFO: init new order start 2020-08-28 20:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 28, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 396.85, 'high': 398.5, 'low': 395.5, 'close': 396.15, 'trades': 4594, 'volume': 3195581, 'vwap': 396.74, 'lastSize': 1000, 'turnover': 126778816555, 'homeNotional': 36851.086813686656, 'foreignNotional': 14620010.943410287}, {'timestamp': datetime.datetime(2020, 8, 28, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.85, 'high': 397.35, 'low': 391.8, 'close': 396.85, 'trades': 7113, 'volume': 5857699, 'vwap': 395.48, 'lastSize': 35, 'turnover': 231655936795, 'homeNotional': 67320.63593162615, 'foreignNotional': 26623600.11142649}, {'timestamp': datetime.datetime(2020, 8, 28, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.45, 'high': 393.5, 'low': 390.35, 'close': 391.85, 'trades': 3722, 'volume': 2756098, 'vwap': 392.03, 'lastSize': 111, 'turnover': 108047121270, 'homeNotional': 31557.747709356678, 'foreignNotional': 12371587.147620153}] 2020-08-28 20:00:21 INFO: prepare candles [CandleItem(low=395.5, high=398.5, open=396.85, close=396.15, color='RED'), CandleItem(low=391.8, high=397.35, open=391.85, close=396.85, color='GREEN'), CandleItem(low=390.35, high=393.5, open=392.45, close=391.85, color='RED')] 2020-08-28 20:00:21 INFO: skip by colors first_candle=CandleItem(low=390.35, high=393.5, open=392.45, close=391.85, color='RED') second_candle=CandleItem(low=391.8, high=397.35, open=391.85, close=396.85, color='GREEN') last_candle=CandleItem(low=395.5, high=398.5, open=396.85, close=396.15, color='RED') 2020-08-28 20:00:21 INFO: check need new order None 2020-08-28 20:00:21 INFO: init new order end 2020-08-28 20:00:21 INFO: 2020-08-28 20:00:21 INFO: 2020-08-28 20:00:21 INFO: 2020-08-28 20:00:21 INFO: 2020-08-28 20:02:00 INFO: 2020-08-28 20:02:00 INFO: 2020-08-28 20:02:00 INFO: 2020-08-28 20:02:00 INFO: 2020-08-28 20:02:00 INFO: clearing start 2020-08-28 20:02:00 INFO: clearing end 2020-08-28 20:02:00 INFO: 2020-08-28 20:02:00 INFO: 2020-08-28 20:02:00 INFO: 2020-08-28 20:02:00 INFO: 2020-08-28 21:00:20 INFO: 2020-08-28 21:00:20 INFO: 2020-08-28 21:00:20 INFO: 2020-08-28 21:00:20 INFO: 2020-08-28 21:00:20 INFO: init new order start 2020-08-28 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 28, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 396.15, 'high': 396.7, 'low': 393.3, 'close': 394.1, 'trades': 3636, 'volume': 2556780, 'vwap': 394.77, 'lastSize': 250, 'turnover': 100932204480, 'homeNotional': 29396.141519237055, 'foreignNotional': 11604546.565454328}, {'timestamp': datetime.datetime(2020, 8, 28, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 396.85, 'high': 398.5, 'low': 395.5, 'close': 396.15, 'trades': 4594, 'volume': 3195581, 'vwap': 396.74, 'lastSize': 1000, 'turnover': 126778816555, 'homeNotional': 36851.086813686656, 'foreignNotional': 14620010.943410287}, {'timestamp': datetime.datetime(2020, 8, 28, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.85, 'high': 397.35, 'low': 391.8, 'close': 396.85, 'trades': 7113, 'volume': 5857699, 'vwap': 395.48, 'lastSize': 35, 'turnover': 231655936795, 'homeNotional': 67320.63593162615, 'foreignNotional': 26623600.11142649}] 2020-08-28 21:00:20 INFO: prepare candles [CandleItem(low=393.3, high=396.7, open=396.15, close=394.1, color='RED'), CandleItem(low=395.5, high=398.5, open=396.85, close=396.15, color='RED'), CandleItem(low=391.8, high=397.35, open=391.85, close=396.85, color='GREEN')] 2020-08-28 21:00:20 INFO: skip by colors first_candle=CandleItem(low=391.8, high=397.35, open=391.85, close=396.85, color='GREEN') second_candle=CandleItem(low=395.5, high=398.5, open=396.85, close=396.15, color='RED') last_candle=CandleItem(low=393.3, high=396.7, open=396.15, close=394.1, color='RED') 2020-08-28 21:00:20 INFO: check need new order None 2020-08-28 21:00:20 INFO: init new order end 2020-08-28 21:00:20 INFO: 2020-08-28 21:00:20 INFO: 2020-08-28 21:00:20 INFO: 2020-08-28 21:00:20 INFO: 2020-08-28 21:02:00 INFO: 2020-08-28 21:02:00 INFO: 2020-08-28 21:02:00 INFO: 2020-08-28 21:02:00 INFO: 2020-08-28 21:02:00 INFO: clearing start 2020-08-28 21:02:00 INFO: clearing end 2020-08-28 21:02:00 INFO: 2020-08-28 21:02:00 INFO: 2020-08-28 21:02:00 INFO: 2020-08-28 21:02:00 INFO: 2020-08-28 22:00:20 INFO: 2020-08-28 22:00:20 INFO: 2020-08-28 22:00:20 INFO: 2020-08-28 22:00:20 INFO: 2020-08-28 22:00:20 INFO: init new order start 2020-08-28 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 28, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 394.1, 'high': 395.9, 'low': 393.8, 'close': 395.15, 'trades': 2879, 'volume': 1770258, 'vwap': 394.95, 'lastSize': 13, 'turnover': 69915830745, 'homeNotional': 20351.611041486256, 'foreignNotional': 8037817.323893498}, {'timestamp': datetime.datetime(2020, 8, 28, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 396.15, 'high': 396.7, 'low': 393.3, 'close': 394.1, 'trades': 3636, 'volume': 2556780, 'vwap': 394.77, 'lastSize': 250, 'turnover': 100932204480, 'homeNotional': 29396.141519237055, 'foreignNotional': 11604546.565454328}, {'timestamp': datetime.datetime(2020, 8, 28, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 396.85, 'high': 398.5, 'low': 395.5, 'close': 396.15, 'trades': 4594, 'volume': 3195581, 'vwap': 396.74, 'lastSize': 1000, 'turnover': 126778816555, 'homeNotional': 36851.086813686656, 'foreignNotional': 14620010.943410287}] 2020-08-28 22:00:20 INFO: prepare candles [CandleItem(low=393.8, high=395.9, open=394.1, close=395.15, color='GREEN'), CandleItem(low=393.3, high=396.7, open=396.15, close=394.1, color='RED'), CandleItem(low=395.5, high=398.5, open=396.85, close=396.15, color='RED')] 2020-08-28 22:00:20 INFO: last_candle=CandleItem(low=393.8, high=395.9, open=394.1, close=395.15, color='GREEN') 2020-08-28 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-08-28 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=393.8, high=395.9, open=394.1, close=395.15, color='GREEN') 2020-08-28 22:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=393.3, high=396.7, open=396.15, close=394.1, color='RED') 2020-08-28 22:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=395.5, high=398.5, open=396.85, close=396.15, color='RED') 2020-08-28 22:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=393.8, high=395.9, open=394.1, close=395.15, color='GREEN'), take_profit_factor=6.0, clearing_interval=3600) 2020-08-28 22:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=393.8, high=395.9, open=394.1, close=395.15, color='GREEN'), take_profit_factor=6.0, clearing_interval=3600) 2020-08-28 22:00:20 INFO: place order: start candle=CandleItem(low=393.8, high=395.9, open=394.1, close=395.15, color='GREEN') ticker='ETHUSD' price_offset=0.1 2020-08-28 22:00:20 INFO: place order: side_factor=-1 init_trigger_price=395.95 init_order_price=396.0 stop_price_offset=0.0 candle.size=2.099999999999966 stop_price=393.8 take_price=408.5999999999998 2020-08-28 22:00:20 INFO: place order round: side_factor=-1 init_trigger_price=Decimal('395.94999999999998863131622783839702606201171875') init_order_price=Decimal('396') stop_price_offset=0.0 candle.size=2.099999999999966 stop_price=Decimal('393.80000000000001136868377216160297393798828125') take_price=Decimal('408.5999999999997953636921010911464691162109375') 2020-08-28 22:00:20 INFO: place order: compute qty=884 2020-08-28 22:00:20 INFO: place order: save order to db 0bd130aa554a4cac99be7c9311f954e3; response=True 2020-08-28 22:00:20 INFO: post order to exchange resp={'orderID': '618c2bfd-db8d-8468-fe5c-f4ac56aa096b', 'clOrdID': '0bd130aa554a4cac99be7c9311f954e3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 884, 'price': 396.0, 'displayQty': None, 'stopPx': 395.95, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 28, 19, 0, 20, 617000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 28, 19, 0, 20, 617000, tzinfo=tzutc())} 2020-08-28 22:00:20 INFO: place new init order {'qty': 884, 'init_price': Decimal('395.94999999999998863131622783839702606201171875'), 'stop_price': Decimal('393.80000000000001136868377216160297393798828125'), 'take_price': Decimal('408.5999999999997953636921010911464691162109375'), 'order_uid': '0bd130aa554a4cac99be7c9311f954e3', 'response': {'orderID': '618c2bfd-db8d-8468-fe5c-f4ac56aa096b', 'clOrdID': '0bd130aa554a4cac99be7c9311f954e3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 884, 'price': 396.0, 'displayQty': None, 'stopPx': 395.95, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 28, 19, 0, 20, 617000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 28, 19, 0, 20, 617000, tzinfo=tzutc())}} 2020-08-28 22:00:20 INFO: init new order end 2020-08-28 22:00:20 INFO: 2020-08-28 22:00:20 INFO: 2020-08-28 22:00:20 INFO: 2020-08-28 22:00:20 INFO: 2020-08-28 22:00:20 INFO: process event {'orderID': '618c2bfd-db8d-8468-fe5c-f4ac56aa096b', 'clOrdID': '0bd130aa554a4cac99be7c9311f954e3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 884, 'price': 396, 'displayQty': None, 'stopPx': 395.95, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-08-28T19:00:20.617Z', 'timestamp': '2020-08-28T19:00:20.617Z'} 2020-08-28 22:00:20 INFO: skip event 0bd130aa554a4cac99be7c9311f954e3 New 2020-08-28 22:02:00 INFO: 2020-08-28 22:02:00 INFO: 2020-08-28 22:02:00 INFO: 2020-08-28 22:02:00 INFO: 2020-08-28 22:02:00 INFO: clearing start 2020-08-28 22:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '618c2bfd-db8d-8468-fe5c-f4ac56aa096b', 'clOrdID': '0bd130aa554a4cac99be7c9311f954e3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 884, 'price': 396.0, 'displayQty': None, 'stopPx': 395.95, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 28, 19, 0, 20, 617000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 28, 19, 0, 20, 617000, tzinfo=tzutc())} 2020-08-28 22:02:00 INFO: order time=2020-08-28 19:00:20.617000+00:00; delta from now UTC=0:01:40.206224 time_delta.total_seconds()=100.206224; time_diff_offset='3600' 2020-08-28 22:02:00 INFO: skip by time diff 2020-08-28 19:00:20.617000+00:00 2020-08-28 22:02:00 INFO: clearing end 2020-08-28 22:02:00 INFO: 2020-08-28 22:02:00 INFO: 2020-08-28 22:02:00 INFO: 2020-08-28 22:02:00 INFO: 2020-08-28 22:10:00 INFO: process event {'orderID': '618c2bfd-db8d-8468-fe5c-f4ac56aa096b', 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 884, 'avgPx': 395.95, 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'transactTime': '2020-08-28T19:10:00.720Z', 'timestamp': '2020-08-28T19:10:00.720Z', 'clOrdID': '0bd130aa554a4cac99be7c9311f954e3', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-28 22:10:00 INFO: add new event={'uid': '0bd130aa554a4cac99be7c9311f954e3', 'status': 'Filled'} 2020-08-28 22:10:01 INFO: 2020-08-28 22:10:01 INFO: 2020-08-28 22:10:01 INFO: 2020-08-28 22:10:01 INFO: 2020-08-28 22:10:01 INFO: process event start 2020-08-28 22:10:01 INFO: fetch new order event 0bd130aa554a4cac99be7c9311f954e3 2020-08-28 22:10:01 INFO: fetch orders by event init={'stop': '393.80000000000001136868377216160297393798828125', 'take': '408.5999999999997953636921010911464691162109375', 'qty': '884', 'color': 'GREEN', 'ticker': 'ETHUSD', 'clearing_offset': '3600'} profit_pair=None 2020-08-28 22:10:01 INFO: process init order filled 2020-08-28 22:10:01 INFO: save profit orders to storage stop=33429f1c036040569c2c2f046f4583ea take=de76fdf231d140e1b802053a71d0eb59 2020-08-28 22:10:01 INFO: place profit orders take_price=408.5999999999997953636921010911464691162109375, stop_price=393.80000000000001136868377216160297393798828125, qty=884, color=GREEN, ticker=ETHUSD 33429f1c036040569c2c2f046f4583ea de76fdf231d140e1b802053a71d0eb59 2020-08-28 22:10:01 INFO: place stop order ETHUSD: qty=-884, stop_price=393.80000000000001136868377216160297393798828125, stop_uid=33429f1c036040569c2c2f046f4583ea 2020-08-28 22:10:01 INFO: process event {'orderID': 'e244b00f-e098-93ca-eb18-24cf6d3509a8', 'clOrdID': '33429f1c036040569c2c2f046f4583ea', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 884, 'price': None, 'displayQty': None, 'stopPx': 393.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': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': '2020-08-28T19:10:01.569Z', 'timestamp': '2020-08-28T19:10:01.569Z'} 2020-08-28 22:10:01 INFO: skip event 33429f1c036040569c2c2f046f4583ea New 2020-08-28 22:10:01 INFO: exchange resp for stop order={'orderID': 'e244b00f-e098-93ca-eb18-24cf6d3509a8', 'clOrdID': '33429f1c036040569c2c2f046f4583ea', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 884, 'price': None, 'displayQty': None, 'stopPx': 393.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': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 28, 19, 10, 1, 569000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 28, 19, 10, 1, 569000, tzinfo=tzutc())} 2020-08-28 22:10:01 INFO: place limit order ETHUSD: qty=-884, price=408.5999999999997953636921010911464691162109375, take_uid=de76fdf231d140e1b802053a71d0eb59 2020-08-28 22:10:01 INFO: process event {'orderID': '15d0d21e-41f9-16de-76e3-6888559defef', 'clOrdID': 'de76fdf231d140e1b802053a71d0eb59', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 884, 'price': 408.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': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': '2020-08-28T19:10:01.613Z', 'timestamp': '2020-08-28T19:10:01.613Z'} 2020-08-28 22:10:01 INFO: skip event de76fdf231d140e1b802053a71d0eb59 New 2020-08-28 22:10:01 INFO: exchange resp for take profit order={'orderID': '15d0d21e-41f9-16de-76e3-6888559defef', 'clOrdID': 'de76fdf231d140e1b802053a71d0eb59', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 884, 'price': 408.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': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 28, 19, 10, 1, 613000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 28, 19, 10, 1, 613000, tzinfo=tzutc())} 2020-08-28 22:10:01 INFO: place profit orders={'stop': {'response': {'orderID': 'e244b00f-e098-93ca-eb18-24cf6d3509a8', 'clOrdID': '33429f1c036040569c2c2f046f4583ea', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 884, 'price': None, 'displayQty': None, 'stopPx': 393.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': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 28, 19, 10, 1, 569000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 28, 19, 10, 1, 569000, tzinfo=tzutc())}, 'qty': Decimal('-884'), 'uid': '33429f1c036040569c2c2f046f4583ea', 'price': Decimal('393.80000000000001136868377216160297393798828125')}, 'take': {'response': {'orderID': '15d0d21e-41f9-16de-76e3-6888559defef', 'clOrdID': 'de76fdf231d140e1b802053a71d0eb59', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 884, 'price': 408.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': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 28, 19, 10, 1, 613000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 28, 19, 10, 1, 613000, tzinfo=tzutc())}, 'qty': Decimal('-884'), 'uid': 'de76fdf231d140e1b802053a71d0eb59', 'price': Decimal('408.5999999999997953636921010911464691162109375')}} 2020-08-28 22:10:01 INFO: rm init order from db 0bd130aa554a4cac99be7c9311f954e3 2020-08-28 22:10:01 INFO: end process event_processing_result='proceed init order' 2020-08-28 22:10:01 INFO: 2020-08-28 22:10:01 INFO: 2020-08-28 22:10:01 INFO: 2020-08-28 22:10:01 INFO: 2020-08-28 23:00:20 INFO: 2020-08-28 23:00:20 INFO: 2020-08-28 23:00:20 INFO: 2020-08-28 23:00:20 INFO: 2020-08-28 23:00:20 INFO: init new order start 2020-08-28 23:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 28, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 395.15, 'high': 397.8, 'low': 394.9, 'close': 396.35, 'trades': 2932, 'volume': 1532199, 'vwap': 396.41, 'lastSize': 71, 'turnover': 60736728010, 'homeNotional': 17636.06810950798, 'foreignNotional': 6990991.13223447}, {'timestamp': datetime.datetime(2020, 8, 28, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 394.1, 'high': 395.9, 'low': 393.8, 'close': 395.15, 'trades': 2879, 'volume': 1770258, 'vwap': 394.95, 'lastSize': 13, 'turnover': 69915830745, 'homeNotional': 20351.611041486256, 'foreignNotional': 8037817.323893498}, {'timestamp': datetime.datetime(2020, 8, 28, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 396.15, 'high': 396.7, 'low': 393.3, 'close': 394.1, 'trades': 3636, 'volume': 2556780, 'vwap': 394.77, 'lastSize': 250, 'turnover': 100932204480, 'homeNotional': 29396.141519237055, 'foreignNotional': 11604546.565454328}] 2020-08-28 23:00:20 INFO: prepare candles [CandleItem(low=394.9, high=397.8, open=395.15, close=396.35, color='GREEN'), CandleItem(low=393.8, high=395.9, open=394.1, close=395.15, color='GREEN'), CandleItem(low=393.3, high=396.7, open=396.15, close=394.1, color='RED')] 2020-08-28 23:00:20 INFO: skip by colors first_candle=CandleItem(low=393.3, high=396.7, open=396.15, close=394.1, color='RED') second_candle=CandleItem(low=393.8, high=395.9, open=394.1, close=395.15, color='GREEN') last_candle=CandleItem(low=394.9, high=397.8, open=395.15, close=396.35, color='GREEN') 2020-08-28 23:00:20 INFO: check need new order None 2020-08-28 23:00:20 INFO: init new order end 2020-08-28 23:00:20 INFO: 2020-08-28 23:00:20 INFO: 2020-08-28 23:00:20 INFO: 2020-08-28 23:00:20 INFO: 2020-08-28 23:02:00 INFO: 2020-08-28 23:02:00 INFO: 2020-08-28 23:02:00 INFO: 2020-08-28 23:02:00 INFO: 2020-08-28 23:02:00 INFO: clearing start 2020-08-28 23:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'e244b00f-e098-93ca-eb18-24cf6d3509a8', 'clOrdID': '33429f1c036040569c2c2f046f4583ea', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 884, 'price': None, 'displayQty': None, 'stopPx': 393.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': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 28, 19, 10, 1, 569000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 28, 19, 10, 1, 569000, tzinfo=tzutc())} 2020-08-28 23:02:00 INFO: skip by not found init order into storage 2020-08-28 23:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '15d0d21e-41f9-16de-76e3-6888559defef', 'clOrdID': 'de76fdf231d140e1b802053a71d0eb59', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 884, 'price': 408.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': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 28, 19, 10, 1, 613000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 28, 19, 10, 1, 613000, tzinfo=tzutc())} 2020-08-28 23:02:00 INFO: skip by not found init order into storage 2020-08-28 23:02:00 INFO: clearing end 2020-08-28 23:02:00 INFO: 2020-08-28 23:02:00 INFO: 2020-08-28 23:02:00 INFO: 2020-08-28 23:02:00 INFO: 2020-08-29 00:00:20 INFO: 2020-08-29 00:00:20 INFO: 2020-08-29 00:00:20 INFO: 2020-08-29 00:00:20 INFO: 2020-08-29 00:00:20 INFO: init new order start 2020-08-29 00:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 28, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 396.35, 'high': 396.4, 'low': 394.1, 'close': 394.4, 'trades': 2136, 'volume': 1206352, 'vwap': 395.29, 'lastSize': 13, 'turnover': 47684873100, 'homeNotional': 13875.528295833057, 'foreignNotional': 5484744.413515416}, {'timestamp': datetime.datetime(2020, 8, 28, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 395.15, 'high': 397.8, 'low': 394.9, 'close': 396.35, 'trades': 2932, 'volume': 1532199, 'vwap': 396.41, 'lastSize': 71, 'turnover': 60736728010, 'homeNotional': 17636.06810950798, 'foreignNotional': 6990991.13223447}, {'timestamp': datetime.datetime(2020, 8, 28, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 394.1, 'high': 395.9, 'low': 393.8, 'close': 395.15, 'trades': 2879, 'volume': 1770258, 'vwap': 394.95, 'lastSize': 13, 'turnover': 69915830745, 'homeNotional': 20351.611041486256, 'foreignNotional': 8037817.323893498}] 2020-08-29 00:00:21 INFO: prepare candles [CandleItem(low=394.1, high=396.4, open=396.35, close=394.4, color='RED'), CandleItem(low=394.9, high=397.8, open=395.15, close=396.35, color='GREEN'), CandleItem(low=393.8, high=395.9, open=394.1, close=395.15, color='GREEN')] 2020-08-29 00:00:21 INFO: last_candle=CandleItem(low=394.1, high=396.4, open=396.35, close=394.4, color='RED') 2020-08-29 00:00:21 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-08-29 00:00:21 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=394.1, high=396.4, open=396.35, close=394.4, color='RED') 2020-08-29 00:00:21 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=394.9, high=397.8, open=395.15, close=396.35, color='GREEN') 2020-08-29 00:00:21 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=393.8, high=395.9, open=394.1, close=395.15, color='GREEN') 2020-08-29 00:00:21 INFO: hit candle order=OrderProperties(candle=CandleItem(low=394.1, high=396.4, open=396.35, close=394.4, color='RED'), take_profit_factor=6.0, clearing_interval=3600) 2020-08-29 00:00:21 INFO: check need new order OrderProperties(candle=CandleItem(low=394.1, high=396.4, open=396.35, close=394.4, color='RED'), take_profit_factor=6.0, clearing_interval=3600) 2020-08-29 00:00:21 INFO: place order: start candle=CandleItem(low=394.1, high=396.4, open=396.35, close=394.4, color='RED') ticker='ETHUSD' price_offset=0.1 2020-08-29 00:00:21 INFO: place order: side_factor=1 init_trigger_price=394.05 init_order_price=394.0 stop_price_offset=0.0 candle.size=2.2999999999999545 stop_price=396.4 take_price=380.2000000000003 2020-08-29 00:00:21 INFO: place order round: side_factor=1 init_trigger_price=Decimal('394.05000000000001136868377216160297393798828125') init_order_price=Decimal('394') stop_price_offset=0.0 candle.size=2.2999999999999545 stop_price=Decimal('396.3999999999999772626324556767940521240234375') take_price=Decimal('380.20000000000027284841053187847137451171875') 2020-08-29 00:00:21 INFO: place order: compute qty=-809 2020-08-29 00:00:21 INFO: place order: save order to db 2d6e3f4c5e8a44229dc272e87f535581; response=True 2020-08-29 00:00:21 INFO: post order to exchange resp={'orderID': '7d02233a-502f-a80a-afa9-b4ffaeedd626', 'clOrdID': '2d6e3f4c5e8a44229dc272e87f535581', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 809, 'price': 394.0, 'displayQty': None, 'stopPx': 394.05, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 809, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 28, 21, 0, 21, 106000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 28, 21, 0, 21, 106000, tzinfo=tzutc())} 2020-08-29 00:00:21 INFO: place new init order {'qty': -809, 'init_price': Decimal('394.05000000000001136868377216160297393798828125'), 'stop_price': Decimal('396.3999999999999772626324556767940521240234375'), 'take_price': Decimal('380.20000000000027284841053187847137451171875'), 'order_uid': '2d6e3f4c5e8a44229dc272e87f535581', 'response': {'orderID': '7d02233a-502f-a80a-afa9-b4ffaeedd626', 'clOrdID': '2d6e3f4c5e8a44229dc272e87f535581', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 809, 'price': 394.0, 'displayQty': None, 'stopPx': 394.05, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 809, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 28, 21, 0, 21, 106000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 28, 21, 0, 21, 106000, tzinfo=tzutc())}} 2020-08-29 00:00:21 INFO: init new order end 2020-08-29 00:00:21 INFO: 2020-08-29 00:00:21 INFO: 2020-08-29 00:00:21 INFO: 2020-08-29 00:00:21 INFO: 2020-08-29 00:00:21 INFO: process event {'orderID': '7d02233a-502f-a80a-afa9-b4ffaeedd626', 'clOrdID': '2d6e3f4c5e8a44229dc272e87f535581', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 809, 'price': 394, 'displayQty': None, 'stopPx': 394.05, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 809, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-08-28T21:00:21.106Z', 'timestamp': '2020-08-28T21:00:21.106Z'} 2020-08-29 00:00:21 INFO: skip event 2d6e3f4c5e8a44229dc272e87f535581 New 2020-08-29 00:02:00 INFO: 2020-08-29 00:02:00 INFO: 2020-08-29 00:02:00 INFO: 2020-08-29 00:02:00 INFO: 2020-08-29 00:02:00 INFO: clearing start 2020-08-29 00:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'e244b00f-e098-93ca-eb18-24cf6d3509a8', 'clOrdID': '33429f1c036040569c2c2f046f4583ea', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 884, 'price': None, 'displayQty': None, 'stopPx': 393.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': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 28, 19, 10, 1, 569000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 28, 19, 10, 1, 569000, tzinfo=tzutc())} 2020-08-29 00:02:00 INFO: skip by not found init order into storage 2020-08-29 00:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '15d0d21e-41f9-16de-76e3-6888559defef', 'clOrdID': 'de76fdf231d140e1b802053a71d0eb59', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 884, 'price': 408.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': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 28, 19, 10, 1, 613000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 28, 19, 10, 1, 613000, tzinfo=tzutc())} 2020-08-29 00:02:00 INFO: skip by not found init order into storage 2020-08-29 00:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '7d02233a-502f-a80a-afa9-b4ffaeedd626', 'clOrdID': '2d6e3f4c5e8a44229dc272e87f535581', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 809, 'price': 394.0, 'displayQty': None, 'stopPx': 394.05, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 809, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 28, 21, 0, 21, 106000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 28, 21, 0, 21, 106000, tzinfo=tzutc())} 2020-08-29 00:02:00 INFO: order time=2020-08-28 21:00:21.106000+00:00; delta from now UTC=0:01:39.192618 time_delta.total_seconds()=99.192618; time_diff_offset='3600' 2020-08-29 00:02:00 INFO: skip by time diff 2020-08-28 21:00:21.106000+00:00 2020-08-29 00:02:00 INFO: clearing end 2020-08-29 00:02:00 INFO: 2020-08-29 00:02:00 INFO: 2020-08-29 00:02:00 INFO: 2020-08-29 00:02:00 INFO: 2020-08-29 00:02:02 INFO: process event {'orderID': '7d02233a-502f-a80a-afa9-b4ffaeedd626', 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 809, 'avgPx': 394.05, 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'transactTime': '2020-08-28T21:02:02.933Z', 'timestamp': '2020-08-28T21:02:02.933Z', 'clOrdID': '2d6e3f4c5e8a44229dc272e87f535581', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-29 00:02:02 INFO: add new event={'uid': '2d6e3f4c5e8a44229dc272e87f535581', 'status': 'Filled'} 2020-08-29 00:02:03 INFO: 2020-08-29 00:02:03 INFO: 2020-08-29 00:02:03 INFO: 2020-08-29 00:02:03 INFO: 2020-08-29 00:02:03 INFO: process event start 2020-08-29 00:02:03 INFO: fetch new order event 2d6e3f4c5e8a44229dc272e87f535581 2020-08-29 00:02:03 INFO: fetch orders by event init={'stop': '396.3999999999999772626324556767940521240234375', 'take': '380.20000000000027284841053187847137451171875', 'qty': '809', 'color': 'RED', 'ticker': 'ETHUSD', 'clearing_offset': '3600'} profit_pair=None 2020-08-29 00:02:03 INFO: process init order filled 2020-08-29 00:02:03 INFO: save profit orders to storage stop=6d01cae3abb24c4fbbd5359a4b34e72b take=addc20460b2246daa561b59b26564fd7 2020-08-29 00:02:03 INFO: place profit orders take_price=380.20000000000027284841053187847137451171875, stop_price=396.3999999999999772626324556767940521240234375, qty=809, color=RED, ticker=ETHUSD 6d01cae3abb24c4fbbd5359a4b34e72b addc20460b2246daa561b59b26564fd7 2020-08-29 00:02:03 INFO: place stop order ETHUSD: qty=809, stop_price=396.3999999999999772626324556767940521240234375, stop_uid=6d01cae3abb24c4fbbd5359a4b34e72b 2020-08-29 00:02:03 INFO: exchange resp for stop order={'orderID': '9763e644-3ba9-5201-ca1f-80d19b593eee', 'clOrdID': '6d01cae3abb24c4fbbd5359a4b34e72b', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 809, 'price': None, 'displayQty': None, 'stopPx': 396.4, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 809, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 28, 21, 2, 3, 376000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 28, 21, 2, 3, 376000, tzinfo=tzutc())} 2020-08-29 00:02:03 INFO: process event {'orderID': '9763e644-3ba9-5201-ca1f-80d19b593eee', 'clOrdID': '6d01cae3abb24c4fbbd5359a4b34e72b', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 809, 'price': None, 'displayQty': None, 'stopPx': 396.4, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 809, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': '2020-08-28T21:02:03.376Z', 'timestamp': '2020-08-28T21:02:03.376Z'} 2020-08-29 00:02:03 INFO: place limit order ETHUSD: qty=809, price=380.20000000000027284841053187847137451171875, take_uid=addc20460b2246daa561b59b26564fd7 2020-08-29 00:02:03 INFO: skip event 6d01cae3abb24c4fbbd5359a4b34e72b New 2020-08-29 00:02:03 INFO: process event {'orderID': '1edbe601-dce6-ef37-ee88-1962c81dce6b', 'clOrdID': 'addc20460b2246daa561b59b26564fd7', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 809, 'price': 380.2, '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': 809, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': '2020-08-28T21:02:03.426Z', 'timestamp': '2020-08-28T21:02:03.426Z'} 2020-08-29 00:02:03 INFO: exchange resp for take profit order={'orderID': '1edbe601-dce6-ef37-ee88-1962c81dce6b', 'clOrdID': 'addc20460b2246daa561b59b26564fd7', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 809, 'price': 380.2, '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': 809, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 28, 21, 2, 3, 426000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 28, 21, 2, 3, 426000, tzinfo=tzutc())} 2020-08-29 00:02:03 INFO: skip event addc20460b2246daa561b59b26564fd7 New 2020-08-29 00:02:03 INFO: place profit orders={'stop': {'response': {'orderID': '9763e644-3ba9-5201-ca1f-80d19b593eee', 'clOrdID': '6d01cae3abb24c4fbbd5359a4b34e72b', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 809, 'price': None, 'displayQty': None, 'stopPx': 396.4, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 809, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 28, 21, 2, 3, 376000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 28, 21, 2, 3, 376000, tzinfo=tzutc())}, 'qty': Decimal('809'), 'uid': '6d01cae3abb24c4fbbd5359a4b34e72b', 'price': Decimal('396.3999999999999772626324556767940521240234375')}, 'take': {'response': {'orderID': '1edbe601-dce6-ef37-ee88-1962c81dce6b', 'clOrdID': 'addc20460b2246daa561b59b26564fd7', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 809, 'price': 380.2, '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': 809, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 28, 21, 2, 3, 426000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 28, 21, 2, 3, 426000, tzinfo=tzutc())}, 'qty': Decimal('809'), 'uid': 'addc20460b2246daa561b59b26564fd7', 'price': Decimal('380.20000000000027284841053187847137451171875')}} 2020-08-29 00:02:03 INFO: rm init order from db 2d6e3f4c5e8a44229dc272e87f535581 2020-08-29 00:02:03 INFO: end process event_processing_result='proceed init order' 2020-08-29 00:02:03 INFO: 2020-08-29 00:02:03 INFO: 2020-08-29 00:02:03 INFO: 2020-08-29 00:02:03 INFO: 2020-08-29 00:39:45 INFO: process event {'orderID': 'e244b00f-e098-93ca-eb18-24cf6d3509a8', 'price': 393.75, 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 884, 'avgPx': 393.75, 'text': 'Triggered: Order stop price reached\nStop order by trader.py', 'transactTime': '2020-08-28T21:39:45.100Z', 'timestamp': '2020-08-28T21:39:45.100Z', 'clOrdID': '33429f1c036040569c2c2f046f4583ea', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-29 00:39:45 INFO: add new event={'uid': '33429f1c036040569c2c2f046f4583ea', 'status': 'Filled'} 2020-08-29 00:39:45 INFO: 2020-08-29 00:39:45 INFO: 2020-08-29 00:39:45 INFO: 2020-08-29 00:39:45 INFO: 2020-08-29 00:39:45 INFO: process event start 2020-08-29 00:39:45 INFO: fetch new order event 33429f1c036040569c2c2f046f4583ea 2020-08-29 00:39:45 INFO: fetch orders by event init=None profit_pair=de76fdf231d140e1b802053a71d0eb59 2020-08-29 00:39:45 INFO: process profit order filled 2020-08-29 00:39:45 INFO: cancel order=de76fdf231d140e1b802053a71d0eb59 [{'orderID': '15d0d21e-41f9-16de-76e3-6888559defef', 'clOrdID': 'de76fdf231d140e1b802053a71d0eb59', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 884, 'price': 408.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, 8, 28, 19, 10, 1, 613000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 28, 21, 39, 45, 621000, tzinfo=tzutc())}] 2020-08-29 00:39:45 INFO: end process event_processing_result='proceed profit order' 2020-08-29 00:39:45 INFO: 2020-08-29 00:39:45 INFO: 2020-08-29 00:39:45 INFO: 2020-08-29 00:39:45 INFO: 2020-08-29 00:39:45 INFO: process event {'orderID': '15d0d21e-41f9-16de-76e3-6888559defef', 'ordStatus': 'Canceled', 'workingIndicator': False, 'leavesQty': 0, 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'timestamp': '2020-08-28T21:39:45.621Z', 'clOrdID': 'de76fdf231d140e1b802053a71d0eb59', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-29 00:39:45 INFO: skip event de76fdf231d140e1b802053a71d0eb59 Canceled 2020-08-29 01:00:20 INFO: 2020-08-29 01:00:20 INFO: 2020-08-29 01:00:20 INFO: 2020-08-29 01:00:20 INFO: 2020-08-29 01:00:20 INFO: init new order start 2020-08-29 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 28, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 394.4, 'high': 395.45, 'low': 393.3, 'close': 394.8, 'trades': 2659, 'volume': 1191241, 'vwap': 394.37, 'lastSize': 10, 'turnover': 46977826520, 'homeNotional': 13686.409732159096, 'foreignNotional': 5397382.406927525}, {'timestamp': datetime.datetime(2020, 8, 28, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 396.35, 'high': 396.4, 'low': 394.1, 'close': 394.4, 'trades': 2136, 'volume': 1206352, 'vwap': 395.29, 'lastSize': 13, 'turnover': 47684873100, 'homeNotional': 13875.528295833057, 'foreignNotional': 5484744.413515416}, {'timestamp': datetime.datetime(2020, 8, 28, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 395.15, 'high': 397.8, 'low': 394.9, 'close': 396.35, 'trades': 2932, 'volume': 1532199, 'vwap': 396.41, 'lastSize': 71, 'turnover': 60736728010, 'homeNotional': 17636.06810950798, 'foreignNotional': 6990991.13223447}] 2020-08-29 01:00:20 INFO: prepare candles [CandleItem(low=393.3, high=395.45, open=394.4, close=394.8, color='GREEN'), CandleItem(low=394.1, high=396.4, open=396.35, close=394.4, color='RED'), CandleItem(low=394.9, high=397.8, open=395.15, close=396.35, color='GREEN')] 2020-08-29 01:00:20 INFO: skip by colors first_candle=CandleItem(low=394.9, high=397.8, open=395.15, close=396.35, color='GREEN') second_candle=CandleItem(low=394.1, high=396.4, open=396.35, close=394.4, color='RED') last_candle=CandleItem(low=393.3, high=395.45, open=394.4, close=394.8, color='GREEN') 2020-08-29 01:00:20 INFO: check need new order None 2020-08-29 01:00:20 INFO: init new order end 2020-08-29 01:00:20 INFO: 2020-08-29 01:00:20 INFO: 2020-08-29 01:00:20 INFO: 2020-08-29 01:00:20 INFO: 2020-08-29 01:02:00 INFO: 2020-08-29 01:02:00 INFO: 2020-08-29 01:02:00 INFO: 2020-08-29 01:02:00 INFO: 2020-08-29 01:02:00 INFO: clearing start 2020-08-29 01:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '9763e644-3ba9-5201-ca1f-80d19b593eee', 'clOrdID': '6d01cae3abb24c4fbbd5359a4b34e72b', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 809, 'price': None, 'displayQty': None, 'stopPx': 396.4, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 809, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 28, 21, 2, 3, 376000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 28, 21, 2, 3, 376000, tzinfo=tzutc())} 2020-08-29 01:02:00 INFO: skip by not found init order into storage 2020-08-29 01:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '1edbe601-dce6-ef37-ee88-1962c81dce6b', 'clOrdID': 'addc20460b2246daa561b59b26564fd7', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 809, 'price': 380.2, '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': 809, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 28, 21, 2, 3, 426000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 28, 21, 2, 3, 426000, tzinfo=tzutc())} 2020-08-29 01:02:00 INFO: skip by not found init order into storage 2020-08-29 01:02:00 INFO: clearing end 2020-08-29 01:02:00 INFO: 2020-08-29 01:02:00 INFO: 2020-08-29 01:02:00 INFO: 2020-08-29 01:02:00 INFO: 2020-08-29 02:00:20 INFO: 2020-08-29 02:00:20 INFO: 2020-08-29 02:00:20 INFO: 2020-08-29 02:00:20 INFO: 2020-08-29 02:00:20 INFO: init new order start 2020-08-29 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 28, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 394.8, 'high': 395.0, 'low': 391.35, 'close': 392.7, 'trades': 3300, 'volume': 2491915, 'vwap': 392.93, 'lastSize': 400, 'turnover': 97912818845, 'homeNotional': 28608.34912568769, 'foreignNotional': 11240857.986901008}, {'timestamp': datetime.datetime(2020, 8, 28, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 394.4, 'high': 395.45, 'low': 393.3, 'close': 394.8, 'trades': 2659, 'volume': 1191241, 'vwap': 394.37, 'lastSize': 10, 'turnover': 46977826520, 'homeNotional': 13686.409732159096, 'foreignNotional': 5397382.406927525}, {'timestamp': datetime.datetime(2020, 8, 28, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 396.35, 'high': 396.4, 'low': 394.1, 'close': 394.4, 'trades': 2136, 'volume': 1206352, 'vwap': 395.29, 'lastSize': 13, 'turnover': 47684873100, 'homeNotional': 13875.528295833057, 'foreignNotional': 5484744.413515416}] 2020-08-29 02:00:20 INFO: prepare candles [CandleItem(low=391.35, high=395.0, open=394.8, close=392.7, color='RED'), CandleItem(low=393.3, high=395.45, open=394.4, close=394.8, color='GREEN'), CandleItem(low=394.1, high=396.4, open=396.35, close=394.4, color='RED')] 2020-08-29 02:00:20 INFO: skip by colors first_candle=CandleItem(low=394.1, high=396.4, open=396.35, close=394.4, color='RED') second_candle=CandleItem(low=393.3, high=395.45, open=394.4, close=394.8, color='GREEN') last_candle=CandleItem(low=391.35, high=395.0, open=394.8, close=392.7, color='RED') 2020-08-29 02:00:20 INFO: check need new order None 2020-08-29 02:00:20 INFO: init new order end 2020-08-29 02:00:20 INFO: 2020-08-29 02:00:20 INFO: 2020-08-29 02:00:20 INFO: 2020-08-29 02:00:20 INFO: 2020-08-29 02:02:00 INFO: 2020-08-29 02:02:00 INFO: 2020-08-29 02:02:00 INFO: 2020-08-29 02:02:00 INFO: 2020-08-29 02:02:00 INFO: clearing start 2020-08-29 02:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '9763e644-3ba9-5201-ca1f-80d19b593eee', 'clOrdID': '6d01cae3abb24c4fbbd5359a4b34e72b', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 809, 'price': None, 'displayQty': None, 'stopPx': 396.4, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 809, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 28, 21, 2, 3, 376000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 28, 21, 2, 3, 376000, tzinfo=tzutc())} 2020-08-29 02:02:00 INFO: skip by not found init order into storage 2020-08-29 02:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '1edbe601-dce6-ef37-ee88-1962c81dce6b', 'clOrdID': 'addc20460b2246daa561b59b26564fd7', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 809, 'price': 380.2, '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': 809, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 28, 21, 2, 3, 426000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 28, 21, 2, 3, 426000, tzinfo=tzutc())} 2020-08-29 02:02:00 INFO: skip by not found init order into storage 2020-08-29 02:02:00 INFO: clearing end 2020-08-29 02:02:00 INFO: 2020-08-29 02:02:00 INFO: 2020-08-29 02:02:00 INFO: 2020-08-29 02:02:00 INFO: 2020-08-29 02:45:07 INFO: process event {'orderID': '9763e644-3ba9-5201-ca1f-80d19b593eee', 'price': 396.45, 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 809, 'avgPx': 396.45, 'text': 'Triggered: Order stop price reached\nStop order by trader.py', 'transactTime': '2020-08-28T23:45:07.361Z', 'timestamp': '2020-08-28T23:45:07.361Z', 'clOrdID': '6d01cae3abb24c4fbbd5359a4b34e72b', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-29 02:45:07 INFO: add new event={'uid': '6d01cae3abb24c4fbbd5359a4b34e72b', 'status': 'Filled'} 2020-08-29 02:45:07 INFO: 2020-08-29 02:45:07 INFO: 2020-08-29 02:45:07 INFO: 2020-08-29 02:45:07 INFO: 2020-08-29 02:45:07 INFO: process event start 2020-08-29 02:45:07 INFO: fetch new order event 6d01cae3abb24c4fbbd5359a4b34e72b 2020-08-29 02:45:07 INFO: fetch orders by event init=None profit_pair=addc20460b2246daa561b59b26564fd7 2020-08-29 02:45:07 INFO: process profit order filled 2020-08-29 02:45:07 INFO: cancel order=addc20460b2246daa561b59b26564fd7 [{'orderID': '1edbe601-dce6-ef37-ee88-1962c81dce6b', 'clOrdID': 'addc20460b2246daa561b59b26564fd7', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 809, 'price': 380.2, '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, 8, 28, 21, 2, 3, 426000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 28, 23, 45, 7, 657000, tzinfo=tzutc())}] 2020-08-29 02:45:07 INFO: process event {'orderID': '1edbe601-dce6-ef37-ee88-1962c81dce6b', 'ordStatus': 'Canceled', 'workingIndicator': False, 'leavesQty': 0, 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'timestamp': '2020-08-28T23:45:07.657Z', 'clOrdID': 'addc20460b2246daa561b59b26564fd7', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-29 02:45:07 INFO: skip event addc20460b2246daa561b59b26564fd7 Canceled 2020-08-29 02:45:07 INFO: end process event_processing_result='proceed profit order' 2020-08-29 02:45:07 INFO: 2020-08-29 02:45:07 INFO: 2020-08-29 02:45:07 INFO: 2020-08-29 02:45:07 INFO: 2020-08-29 03:00:20 INFO: 2020-08-29 03:00:20 INFO: 2020-08-29 03:00:20 INFO: 2020-08-29 03:00:20 INFO: 2020-08-29 03:00:20 INFO: init new order start 2020-08-29 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 29, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.7, 'high': 396.65, 'low': 392.35, 'close': 395.55, 'trades': 2754, 'volume': 1379149, 'vwap': 394.8, 'lastSize': 1, 'turnover': 54447694045, 'homeNotional': 15891.64607073453, 'foreignNotional': 6273911.603303162}, {'timestamp': datetime.datetime(2020, 8, 28, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 394.8, 'high': 395.0, 'low': 391.35, 'close': 392.7, 'trades': 3300, 'volume': 2491915, 'vwap': 392.93, 'lastSize': 400, 'turnover': 97912818845, 'homeNotional': 28608.34912568769, 'foreignNotional': 11240857.986901008}, {'timestamp': datetime.datetime(2020, 8, 28, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 394.4, 'high': 395.45, 'low': 393.3, 'close': 394.8, 'trades': 2659, 'volume': 1191241, 'vwap': 394.37, 'lastSize': 10, 'turnover': 46977826520, 'homeNotional': 13686.409732159096, 'foreignNotional': 5397382.406927525}] 2020-08-29 03:00:20 INFO: prepare candles [CandleItem(low=392.35, high=396.65, open=392.7, close=395.55, color='GREEN'), CandleItem(low=391.35, high=395.0, open=394.8, close=392.7, color='RED'), CandleItem(low=393.3, high=395.45, open=394.4, close=394.8, color='GREEN')] 2020-08-29 03:00:20 INFO: skip by colors first_candle=CandleItem(low=393.3, high=395.45, open=394.4, close=394.8, color='GREEN') second_candle=CandleItem(low=391.35, high=395.0, open=394.8, close=392.7, color='RED') last_candle=CandleItem(low=392.35, high=396.65, open=392.7, close=395.55, color='GREEN') 2020-08-29 03:00:20 INFO: check need new order None 2020-08-29 03:00:20 INFO: init new order end 2020-08-29 03:00:20 INFO: 2020-08-29 03:00:20 INFO: 2020-08-29 03:00:20 INFO: 2020-08-29 03:00:20 INFO: 2020-08-29 03:02:00 INFO: 2020-08-29 03:02:00 INFO: 2020-08-29 03:02:00 INFO: 2020-08-29 03:02:00 INFO: 2020-08-29 03:02:00 INFO: clearing start 2020-08-29 03:02:01 INFO: clearing end 2020-08-29 03:02:01 INFO: 2020-08-29 03:02:01 INFO: 2020-08-29 03:02:01 INFO: 2020-08-29 03:02:01 INFO: 2020-08-29 03:14:28 INFO: Websocket Closed 2020-08-29 03:14:28 WARNING: reconnect to socket 2020-08-29 03:14:28 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-08-29 03:14:28 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-08-29 03:14:28 INFO: Authenticating with API Key. 2020-08-29 03:14:29 INFO: Connected to WS. 2020-08-29 03:25:04 INFO: Websocket Closed 2020-08-29 03:25:05 WARNING: reconnect to socket 2020-08-29 03:25:05 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-08-29 03:25:05 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-08-29 03:25:05 INFO: Authenticating with API Key. 2020-08-29 03:25:06 INFO: Connected to WS. 2020-08-29 04:00:20 INFO: 2020-08-29 04:00:20 INFO: 2020-08-29 04:00:20 INFO: 2020-08-29 04:00:20 INFO: 2020-08-29 04:00:20 INFO: init new order start 2020-08-29 04:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 29, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 395.55, 'high': 396.05, 'low': 392.85, 'close': 394.15, 'trades': 2951, 'volume': 1263627, 'vwap': 394.3, 'lastSize': 11, 'turnover': 49824296900, 'homeNotional': 14543.811421343256, 'foreignNotional': 5734582.541003777}, {'timestamp': datetime.datetime(2020, 8, 29, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.7, 'high': 396.65, 'low': 392.35, 'close': 395.55, 'trades': 2754, 'volume': 1379149, 'vwap': 394.8, 'lastSize': 1, 'turnover': 54447694045, 'homeNotional': 15891.64607073453, 'foreignNotional': 6273911.603303162}, {'timestamp': datetime.datetime(2020, 8, 28, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 394.8, 'high': 395.0, 'low': 391.35, 'close': 392.7, 'trades': 3300, 'volume': 2491915, 'vwap': 392.93, 'lastSize': 400, 'turnover': 97912818845, 'homeNotional': 28608.34912568769, 'foreignNotional': 11240857.986901008}] 2020-08-29 04:00:20 INFO: prepare candles [CandleItem(low=392.85, high=396.05, open=395.55, close=394.15, color='RED'), CandleItem(low=392.35, high=396.65, open=392.7, close=395.55, color='GREEN'), CandleItem(low=391.35, high=395.0, open=394.8, close=392.7, color='RED')] 2020-08-29 04:00:20 INFO: skip by colors first_candle=CandleItem(low=391.35, high=395.0, open=394.8, close=392.7, color='RED') second_candle=CandleItem(low=392.35, high=396.65, open=392.7, close=395.55, color='GREEN') last_candle=CandleItem(low=392.85, high=396.05, open=395.55, close=394.15, color='RED') 2020-08-29 04:00:20 INFO: check need new order None 2020-08-29 04:00:20 INFO: init new order end 2020-08-29 04:00:20 INFO: 2020-08-29 04:00:20 INFO: 2020-08-29 04:00:20 INFO: 2020-08-29 04:00:20 INFO: 2020-08-29 04:02:00 INFO: 2020-08-29 04:02:00 INFO: 2020-08-29 04:02:00 INFO: 2020-08-29 04:02:00 INFO: 2020-08-29 04:02:00 INFO: clearing start 2020-08-29 04:02:00 INFO: clearing end 2020-08-29 04:02:00 INFO: 2020-08-29 04:02:00 INFO: 2020-08-29 04:02:00 INFO: 2020-08-29 04:02:00 INFO: 2020-08-29 05:00:20 INFO: 2020-08-29 05:00:20 INFO: 2020-08-29 05:00:20 INFO: 2020-08-29 05:00:20 INFO: 2020-08-29 05:00:20 INFO: init new order start 2020-08-29 05:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 29, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 394.15, 'high': 394.3, 'low': 392.95, 'close': 393.3, 'trades': 2211, 'volume': 1066004, 'vwap': 393.57, 'lastSize': 200, 'turnover': 41954292530, 'homeNotional': 12252.783699165455, 'foreignNotional': 4822281.467979743}, {'timestamp': datetime.datetime(2020, 8, 29, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 395.55, 'high': 396.05, 'low': 392.85, 'close': 394.15, 'trades': 2951, 'volume': 1263627, 'vwap': 394.3, 'lastSize': 11, 'turnover': 49824296900, 'homeNotional': 14543.811421343256, 'foreignNotional': 5734582.541003777}, {'timestamp': datetime.datetime(2020, 8, 29, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.7, 'high': 396.65, 'low': 392.35, 'close': 395.55, 'trades': 2754, 'volume': 1379149, 'vwap': 394.8, 'lastSize': 1, 'turnover': 54447694045, 'homeNotional': 15891.64607073453, 'foreignNotional': 6273911.603303162}] 2020-08-29 05:00:20 INFO: prepare candles [CandleItem(low=392.95, high=394.3, open=394.15, close=393.3, color='RED'), CandleItem(low=392.85, high=396.05, open=395.55, close=394.15, color='RED'), CandleItem(low=392.35, high=396.65, open=392.7, close=395.55, color='GREEN')] 2020-08-29 05:00:20 INFO: skip by colors first_candle=CandleItem(low=392.35, high=396.65, open=392.7, close=395.55, color='GREEN') second_candle=CandleItem(low=392.85, high=396.05, open=395.55, close=394.15, color='RED') last_candle=CandleItem(low=392.95, high=394.3, open=394.15, close=393.3, color='RED') 2020-08-29 05:00:20 INFO: check need new order None 2020-08-29 05:00:20 INFO: init new order end 2020-08-29 05:00:20 INFO: 2020-08-29 05:00:20 INFO: 2020-08-29 05:00:20 INFO: 2020-08-29 05:00:20 INFO: 2020-08-29 05:02:00 INFO: 2020-08-29 05:02:00 INFO: 2020-08-29 05:02:00 INFO: 2020-08-29 05:02:00 INFO: 2020-08-29 05:02:00 INFO: clearing start 2020-08-29 05:02:00 INFO: clearing end 2020-08-29 05:02:00 INFO: 2020-08-29 05:02:00 INFO: 2020-08-29 05:02:00 INFO: 2020-08-29 05:02:00 INFO: 2020-08-29 06:00:20 INFO: 2020-08-29 06:00:20 INFO: 2020-08-29 06:00:20 INFO: 2020-08-29 06:00:20 INFO: 2020-08-29 06:00:20 INFO: init new order start 2020-08-29 06:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 29, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.3, 'high': 394.2, 'low': 392.55, 'close': 393.35, 'trades': 1810, 'volume': 982909, 'vwap': 393.48, 'lastSize': 470, 'turnover': 38674904315, 'homeNotional': 11295.873995751981, 'foreignNotional': 4444635.00782402}, {'timestamp': datetime.datetime(2020, 8, 29, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 394.15, 'high': 394.3, 'low': 392.95, 'close': 393.3, 'trades': 2211, 'volume': 1066004, 'vwap': 393.57, 'lastSize': 200, 'turnover': 41954292530, 'homeNotional': 12252.783699165455, 'foreignNotional': 4822281.467979743}, {'timestamp': datetime.datetime(2020, 8, 29, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 395.55, 'high': 396.05, 'low': 392.85, 'close': 394.15, 'trades': 2951, 'volume': 1263627, 'vwap': 394.3, 'lastSize': 11, 'turnover': 49824296900, 'homeNotional': 14543.811421343256, 'foreignNotional': 5734582.541003777}] 2020-08-29 06:00:21 INFO: prepare candles [CandleItem(low=392.55, high=394.2, open=393.3, close=393.35, color='GREEN'), CandleItem(low=392.95, high=394.3, open=394.15, close=393.3, color='RED'), CandleItem(low=392.85, high=396.05, open=395.55, close=394.15, color='RED')] 2020-08-29 06:00:21 INFO: last_candle=CandleItem(low=392.55, high=394.2, open=393.3, close=393.35, color='GREEN') 2020-08-29 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-08-29 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=392.55, high=394.2, open=393.3, close=393.35, color='GREEN') 2020-08-29 06:00:21 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=392.95, high=394.3, open=394.15, close=393.3, color='RED') 2020-08-29 06:00:21 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=392.85, high=396.05, open=395.55, close=394.15, color='RED') 2020-08-29 06:00:21 INFO: hit candle order=OrderProperties(candle=CandleItem(low=392.55, high=394.2, open=393.3, close=393.35, color='GREEN'), take_profit_factor=6.0, clearing_interval=3600) 2020-08-29 06:00:21 INFO: check need new order OrderProperties(candle=CandleItem(low=392.55, high=394.2, open=393.3, close=393.35, color='GREEN'), take_profit_factor=6.0, clearing_interval=3600) 2020-08-29 06:00:21 INFO: place order: start candle=CandleItem(low=392.55, high=394.2, open=393.3, close=393.35, color='GREEN') ticker='ETHUSD' price_offset=0.1 2020-08-29 06:00:21 INFO: place order: side_factor=-1 init_trigger_price=394.25 init_order_price=394.3 stop_price_offset=0.0 candle.size=1.6499999999999773 stop_price=392.55 take_price=404.1999999999999 2020-08-29 06:00:21 INFO: place order round: side_factor=-1 init_trigger_price=Decimal('394.25') init_order_price=Decimal('394.30000000000001136868377216160297393798828125') stop_price_offset=0.0 candle.size=1.6499999999999773 stop_price=Decimal('392.55000000000001136868377216160297393798828125') take_price=Decimal('404.19999999999987494447850622236728668212890625') 2020-08-29 06:00:21 INFO: place order: compute qty=1118 2020-08-29 06:00:21 INFO: place order: save order to db 9c7638908a024d0c86eaa0cfb1af7c82; response=True 2020-08-29 06:00:21 INFO: post order to exchange resp={'orderID': '1bad5592-2e9e-cdfd-eb31-a0bbe206cb83', 'clOrdID': '9c7638908a024d0c86eaa0cfb1af7c82', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1118, 'price': 394.3, 'displayQty': None, 'stopPx': 394.25, '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, 8, 29, 3, 0, 21, 169000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 29, 3, 0, 21, 169000, tzinfo=tzutc())} 2020-08-29 06:00:21 INFO: place new init order {'qty': 1118, 'init_price': Decimal('394.25'), 'stop_price': Decimal('392.55000000000001136868377216160297393798828125'), 'take_price': Decimal('404.19999999999987494447850622236728668212890625'), 'order_uid': '9c7638908a024d0c86eaa0cfb1af7c82', 'response': {'orderID': '1bad5592-2e9e-cdfd-eb31-a0bbe206cb83', 'clOrdID': '9c7638908a024d0c86eaa0cfb1af7c82', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1118, 'price': 394.3, 'displayQty': None, 'stopPx': 394.25, '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, 8, 29, 3, 0, 21, 169000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 29, 3, 0, 21, 169000, tzinfo=tzutc())}} 2020-08-29 06:00:21 INFO: init new order end 2020-08-29 06:00:21 INFO: 2020-08-29 06:00:21 INFO: 2020-08-29 06:00:21 INFO: 2020-08-29 06:00:21 INFO: 2020-08-29 06:00:21 INFO: process event {'orderID': '1bad5592-2e9e-cdfd-eb31-a0bbe206cb83', 'clOrdID': '9c7638908a024d0c86eaa0cfb1af7c82', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1118, 'price': 394.3, 'displayQty': None, 'stopPx': 394.25, '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-08-29T03:00:21.169Z', 'timestamp': '2020-08-29T03:00:21.169Z'} 2020-08-29 06:00:21 INFO: skip event 9c7638908a024d0c86eaa0cfb1af7c82 New 2020-08-29 06:02:00 INFO: 2020-08-29 06:02:00 INFO: 2020-08-29 06:02:00 INFO: 2020-08-29 06:02:00 INFO: 2020-08-29 06:02:00 INFO: clearing start 2020-08-29 06:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '1bad5592-2e9e-cdfd-eb31-a0bbe206cb83', 'clOrdID': '9c7638908a024d0c86eaa0cfb1af7c82', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1118, 'price': 394.3, 'displayQty': None, 'stopPx': 394.25, '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, 8, 29, 3, 0, 21, 169000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 29, 3, 0, 21, 169000, tzinfo=tzutc())} 2020-08-29 06:02:00 INFO: order time=2020-08-29 03:00:21.169000+00:00; delta from now UTC=0:01:39.182631 time_delta.total_seconds()=99.182631; time_diff_offset='3600' 2020-08-29 06:02:00 INFO: skip by time diff 2020-08-29 03:00:21.169000+00:00 2020-08-29 06:02:00 INFO: clearing end 2020-08-29 06:02:00 INFO: 2020-08-29 06:02:00 INFO: 2020-08-29 06:02:00 INFO: 2020-08-29 06:02:00 INFO: 2020-08-29 06:41:21 INFO: process event {'orderID': '1bad5592-2e9e-cdfd-eb31-a0bbe206cb83', 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 1118, 'avgPx': 394.25, 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'transactTime': '2020-08-29T03:41:21.383Z', 'timestamp': '2020-08-29T03:41:21.383Z', 'clOrdID': '9c7638908a024d0c86eaa0cfb1af7c82', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-29 06:41:21 INFO: add new event={'uid': '9c7638908a024d0c86eaa0cfb1af7c82', 'status': 'Filled'} 2020-08-29 06:41:22 INFO: 2020-08-29 06:41:22 INFO: 2020-08-29 06:41:22 INFO: 2020-08-29 06:41:22 INFO: 2020-08-29 06:41:22 INFO: process event start 2020-08-29 06:41:22 INFO: fetch new order event 9c7638908a024d0c86eaa0cfb1af7c82 2020-08-29 06:41:22 INFO: fetch orders by event init={'stop': '392.55000000000001136868377216160297393798828125', 'take': '404.19999999999987494447850622236728668212890625', 'qty': '1118', 'color': 'GREEN', 'ticker': 'ETHUSD', 'clearing_offset': '3600'} profit_pair=None 2020-08-29 06:41:22 INFO: process init order filled 2020-08-29 06:41:22 INFO: save profit orders to storage stop=598571c93d474864881a89edf68100ac take=cb1986364ee649d2b9e70a4b48edc2c1 2020-08-29 06:41:22 INFO: place profit orders take_price=404.19999999999987494447850622236728668212890625, stop_price=392.55000000000001136868377216160297393798828125, qty=1118, color=GREEN, ticker=ETHUSD 598571c93d474864881a89edf68100ac cb1986364ee649d2b9e70a4b48edc2c1 2020-08-29 06:41:22 INFO: place stop order ETHUSD: qty=-1118, stop_price=392.55000000000001136868377216160297393798828125, stop_uid=598571c93d474864881a89edf68100ac 2020-08-29 06:41:22 INFO: process event {'orderID': 'a3baba83-e3f7-75f6-32bc-4b30b5bfca89', 'clOrdID': '598571c93d474864881a89edf68100ac', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1118, 'price': None, 'displayQty': None, 'stopPx': 392.55, '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-08-29T03:41:22.280Z', 'timestamp': '2020-08-29T03:41:22.280Z'} 2020-08-29 06:41:22 INFO: skip event 598571c93d474864881a89edf68100ac New 2020-08-29 06:41:22 INFO: exchange resp for stop order={'orderID': 'a3baba83-e3f7-75f6-32bc-4b30b5bfca89', 'clOrdID': '598571c93d474864881a89edf68100ac', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1118, 'price': None, 'displayQty': None, 'stopPx': 392.55, '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': datetime.datetime(2020, 8, 29, 3, 41, 22, 280000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 29, 3, 41, 22, 280000, tzinfo=tzutc())} 2020-08-29 06:41:22 INFO: place limit order ETHUSD: qty=-1118, price=404.19999999999987494447850622236728668212890625, take_uid=cb1986364ee649d2b9e70a4b48edc2c1 2020-08-29 06:41:22 INFO: process event {'orderID': '56c25fe7-117b-f16d-b050-5d2acd782aee', 'clOrdID': 'cb1986364ee649d2b9e70a4b48edc2c1', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1118, 'price': 404.2, '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': 1118, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': '2020-08-29T03:41:22.318Z', 'timestamp': '2020-08-29T03:41:22.318Z'} 2020-08-29 06:41:22 INFO: skip event cb1986364ee649d2b9e70a4b48edc2c1 New 2020-08-29 06:41:22 INFO: exchange resp for take profit order={'orderID': '56c25fe7-117b-f16d-b050-5d2acd782aee', 'clOrdID': 'cb1986364ee649d2b9e70a4b48edc2c1', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1118, 'price': 404.2, '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': 1118, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 29, 3, 41, 22, 318000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 29, 3, 41, 22, 318000, tzinfo=tzutc())} 2020-08-29 06:41:22 INFO: place profit orders={'stop': {'response': {'orderID': 'a3baba83-e3f7-75f6-32bc-4b30b5bfca89', 'clOrdID': '598571c93d474864881a89edf68100ac', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1118, 'price': None, 'displayQty': None, 'stopPx': 392.55, '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': datetime.datetime(2020, 8, 29, 3, 41, 22, 280000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 29, 3, 41, 22, 280000, tzinfo=tzutc())}, 'qty': Decimal('-1118'), 'uid': '598571c93d474864881a89edf68100ac', 'price': Decimal('392.55000000000001136868377216160297393798828125')}, 'take': {'response': {'orderID': '56c25fe7-117b-f16d-b050-5d2acd782aee', 'clOrdID': 'cb1986364ee649d2b9e70a4b48edc2c1', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1118, 'price': 404.2, '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': 1118, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 29, 3, 41, 22, 318000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 29, 3, 41, 22, 318000, tzinfo=tzutc())}, 'qty': Decimal('-1118'), 'uid': 'cb1986364ee649d2b9e70a4b48edc2c1', 'price': Decimal('404.19999999999987494447850622236728668212890625')}} 2020-08-29 06:41:22 INFO: rm init order from db 9c7638908a024d0c86eaa0cfb1af7c82 2020-08-29 06:41:22 INFO: end process event_processing_result='proceed init order' 2020-08-29 06:41:22 INFO: 2020-08-29 06:41:22 INFO: 2020-08-29 06:41:22 INFO: 2020-08-29 06:41:22 INFO: 2020-08-29 07:00:20 INFO: 2020-08-29 07:00:20 INFO: 2020-08-29 07:00:20 INFO: 2020-08-29 07:00:20 INFO: 2020-08-29 07:00:20 INFO: init new order start 2020-08-29 07:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 29, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.35, 'high': 395.55, 'low': 392.75, 'close': 394.85, 'trades': 1677, 'volume': 1290499, 'vwap': 394.09, 'lastSize': 50, 'turnover': 50856562340, 'homeNotional': 14839.63702763465, 'foreignNotional': 5848084.2146204095}, {'timestamp': datetime.datetime(2020, 8, 29, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.3, 'high': 394.2, 'low': 392.55, 'close': 393.35, 'trades': 1810, 'volume': 982909, 'vwap': 393.48, 'lastSize': 470, 'turnover': 38674904315, 'homeNotional': 11295.873995751981, 'foreignNotional': 4444635.00782402}, {'timestamp': datetime.datetime(2020, 8, 29, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 394.15, 'high': 394.3, 'low': 392.95, 'close': 393.3, 'trades': 2211, 'volume': 1066004, 'vwap': 393.57, 'lastSize': 200, 'turnover': 41954292530, 'homeNotional': 12252.783699165455, 'foreignNotional': 4822281.467979743}] 2020-08-29 07:00:20 INFO: prepare candles [CandleItem(low=392.75, high=395.55, open=393.35, close=394.85, color='GREEN'), CandleItem(low=392.55, high=394.2, open=393.3, close=393.35, color='GREEN'), CandleItem(low=392.95, high=394.3, open=394.15, close=393.3, color='RED')] 2020-08-29 07:00:20 INFO: skip by colors first_candle=CandleItem(low=392.95, high=394.3, open=394.15, close=393.3, color='RED') second_candle=CandleItem(low=392.55, high=394.2, open=393.3, close=393.35, color='GREEN') last_candle=CandleItem(low=392.75, high=395.55, open=393.35, close=394.85, color='GREEN') 2020-08-29 07:00:20 INFO: check need new order None 2020-08-29 07:00:20 INFO: init new order end 2020-08-29 07:00:20 INFO: 2020-08-29 07:00:20 INFO: 2020-08-29 07:00:20 INFO: 2020-08-29 07:00:20 INFO: 2020-08-29 07:02:00 INFO: 2020-08-29 07:02:00 INFO: 2020-08-29 07:02:00 INFO: 2020-08-29 07:02:00 INFO: 2020-08-29 07:02:00 INFO: clearing start 2020-08-29 07:02:01 INFO: fetch_orders_for_clearing test order {'orderID': 'a3baba83-e3f7-75f6-32bc-4b30b5bfca89', 'clOrdID': '598571c93d474864881a89edf68100ac', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1118, 'price': None, 'displayQty': None, 'stopPx': 392.55, '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': datetime.datetime(2020, 8, 29, 3, 41, 22, 280000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 29, 3, 41, 22, 280000, tzinfo=tzutc())} 2020-08-29 07:02:01 INFO: skip by not found init order into storage 2020-08-29 07:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '56c25fe7-117b-f16d-b050-5d2acd782aee', 'clOrdID': 'cb1986364ee649d2b9e70a4b48edc2c1', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1118, 'price': 404.2, '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': 1118, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 29, 3, 41, 22, 318000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 29, 3, 41, 22, 318000, tzinfo=tzutc())} 2020-08-29 07:02:01 INFO: skip by not found init order into storage 2020-08-29 07:02:01 INFO: clearing end 2020-08-29 07:02:01 INFO: 2020-08-29 07:02:01 INFO: 2020-08-29 07:02:01 INFO: 2020-08-29 07:02:01 INFO: 2020-08-29 08:00:20 INFO: 2020-08-29 08:00:20 INFO: 2020-08-29 08:00:20 INFO: 2020-08-29 08:00:20 INFO: 2020-08-29 08:00:20 INFO: init new order start 2020-08-29 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 29, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 394.85, 'high': 395.8, 'low': 393.45, 'close': 395.05, 'trades': 2083, 'volume': 1483111, 'vwap': 394.99, 'lastSize': 1900, 'turnover': 58580850420, 'homeNotional': 17059.59824178634, 'foreignNotional': 6738311.34671552}, {'timestamp': datetime.datetime(2020, 8, 29, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.35, 'high': 395.55, 'low': 392.75, 'close': 394.85, 'trades': 1677, 'volume': 1290499, 'vwap': 394.09, 'lastSize': 50, 'turnover': 50856562340, 'homeNotional': 14839.63702763465, 'foreignNotional': 5848084.2146204095}, {'timestamp': datetime.datetime(2020, 8, 29, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.3, 'high': 394.2, 'low': 392.55, 'close': 393.35, 'trades': 1810, 'volume': 982909, 'vwap': 393.48, 'lastSize': 470, 'turnover': 38674904315, 'homeNotional': 11295.873995751981, 'foreignNotional': 4444635.00782402}] 2020-08-29 08:00:20 INFO: prepare candles [CandleItem(low=393.45, high=395.8, open=394.85, close=395.05, color='GREEN'), CandleItem(low=392.75, high=395.55, open=393.35, close=394.85, color='GREEN'), CandleItem(low=392.55, high=394.2, open=393.3, close=393.35, color='GREEN')] 2020-08-29 08:00:20 INFO: skip by colors first_candle=CandleItem(low=392.55, high=394.2, open=393.3, close=393.35, color='GREEN') second_candle=CandleItem(low=392.75, high=395.55, open=393.35, close=394.85, color='GREEN') last_candle=CandleItem(low=393.45, high=395.8, open=394.85, close=395.05, color='GREEN') 2020-08-29 08:00:20 INFO: check need new order None 2020-08-29 08:00:20 INFO: init new order end 2020-08-29 08:00:20 INFO: 2020-08-29 08:00:20 INFO: 2020-08-29 08:00:20 INFO: 2020-08-29 08:00:20 INFO: 2020-08-29 08:02:00 INFO: 2020-08-29 08:02:00 INFO: 2020-08-29 08:02:00 INFO: 2020-08-29 08:02:00 INFO: 2020-08-29 08:02:00 INFO: clearing start 2020-08-29 08:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'a3baba83-e3f7-75f6-32bc-4b30b5bfca89', 'clOrdID': '598571c93d474864881a89edf68100ac', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1118, 'price': None, 'displayQty': None, 'stopPx': 392.55, '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': datetime.datetime(2020, 8, 29, 3, 41, 22, 280000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 29, 3, 41, 22, 280000, tzinfo=tzutc())} 2020-08-29 08:02:00 INFO: skip by not found init order into storage 2020-08-29 08:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '56c25fe7-117b-f16d-b050-5d2acd782aee', 'clOrdID': 'cb1986364ee649d2b9e70a4b48edc2c1', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1118, 'price': 404.2, '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': 1118, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 29, 3, 41, 22, 318000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 29, 3, 41, 22, 318000, tzinfo=tzutc())} 2020-08-29 08:02:00 INFO: skip by not found init order into storage 2020-08-29 08:02:00 INFO: clearing end 2020-08-29 08:02:00 INFO: 2020-08-29 08:02:00 INFO: 2020-08-29 08:02:00 INFO: 2020-08-29 08:02:00 INFO: 2020-08-29 09:00:20 INFO: 2020-08-29 09:00:20 INFO: 2020-08-29 09:00:20 INFO: 2020-08-29 09:00:20 INFO: 2020-08-29 09:00:20 INFO: init new order start 2020-08-29 09:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 29, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 395.05, 'high': 397.25, 'low': 394.95, 'close': 396.35, 'trades': 2738, 'volume': 2167028, 'vwap': 396.11, 'lastSize': 540, 'turnover': 85837752980, 'homeNotional': 24939.99422455828, 'foreignNotional': 9878943.857199617}, {'timestamp': datetime.datetime(2020, 8, 29, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 394.85, 'high': 395.8, 'low': 393.45, 'close': 395.05, 'trades': 2083, 'volume': 1483111, 'vwap': 394.99, 'lastSize': 1900, 'turnover': 58580850420, 'homeNotional': 17059.59824178634, 'foreignNotional': 6738311.34671552}, {'timestamp': datetime.datetime(2020, 8, 29, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.35, 'high': 395.55, 'low': 392.75, 'close': 394.85, 'trades': 1677, 'volume': 1290499, 'vwap': 394.09, 'lastSize': 50, 'turnover': 50856562340, 'homeNotional': 14839.63702763465, 'foreignNotional': 5848084.2146204095}] 2020-08-29 09:00:20 INFO: prepare candles [CandleItem(low=394.95, high=397.25, open=395.05, close=396.35, color='GREEN'), CandleItem(low=393.45, high=395.8, open=394.85, close=395.05, color='GREEN'), CandleItem(low=392.75, high=395.55, open=393.35, close=394.85, color='GREEN')] 2020-08-29 09:00:20 INFO: skip by colors first_candle=CandleItem(low=392.75, high=395.55, open=393.35, close=394.85, color='GREEN') second_candle=CandleItem(low=393.45, high=395.8, open=394.85, close=395.05, color='GREEN') last_candle=CandleItem(low=394.95, high=397.25, open=395.05, close=396.35, color='GREEN') 2020-08-29 09:00:20 INFO: check need new order None 2020-08-29 09:00:20 INFO: init new order end 2020-08-29 09:00:20 INFO: 2020-08-29 09:00:20 INFO: 2020-08-29 09:00:20 INFO: 2020-08-29 09:00:20 INFO: 2020-08-29 09:02:00 INFO: 2020-08-29 09:02:00 INFO: 2020-08-29 09:02:00 INFO: 2020-08-29 09:02:00 INFO: 2020-08-29 09:02:00 INFO: clearing start 2020-08-29 09:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'a3baba83-e3f7-75f6-32bc-4b30b5bfca89', 'clOrdID': '598571c93d474864881a89edf68100ac', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1118, 'price': None, 'displayQty': None, 'stopPx': 392.55, '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': datetime.datetime(2020, 8, 29, 3, 41, 22, 280000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 29, 3, 41, 22, 280000, tzinfo=tzutc())} 2020-08-29 09:02:00 INFO: skip by not found init order into storage 2020-08-29 09:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '56c25fe7-117b-f16d-b050-5d2acd782aee', 'clOrdID': 'cb1986364ee649d2b9e70a4b48edc2c1', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1118, 'price': 404.2, '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': 1118, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 29, 3, 41, 22, 318000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 29, 3, 41, 22, 318000, tzinfo=tzutc())} 2020-08-29 09:02:00 INFO: skip by not found init order into storage 2020-08-29 09:02:00 INFO: clearing end 2020-08-29 09:02:00 INFO: 2020-08-29 09:02:00 INFO: 2020-08-29 09:02:00 INFO: 2020-08-29 09:02:00 INFO: 2020-08-29 10:00:20 INFO: 2020-08-29 10:00:20 INFO: 2020-08-29 10:00:20 INFO: 2020-08-29 10:00:20 INFO: 2020-08-29 10:00:20 INFO: init new order start 2020-08-29 10:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 29, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 396.35, 'high': 400.5, 'low': 396.3, 'close': 399.7, 'trades': 5572, 'volume': 4728941, 'vwap': 398.98, 'lastSize': 250, 'turnover': 188673171235, 'homeNotional': 54487.57038669733, 'foreignNotional': 21739230.852925234}, {'timestamp': datetime.datetime(2020, 8, 29, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 395.05, 'high': 397.25, 'low': 394.95, 'close': 396.35, 'trades': 2738, 'volume': 2167028, 'vwap': 396.11, 'lastSize': 540, 'turnover': 85837752980, 'homeNotional': 24939.99422455828, 'foreignNotional': 9878943.857199617}, {'timestamp': datetime.datetime(2020, 8, 29, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 394.85, 'high': 395.8, 'low': 393.45, 'close': 395.05, 'trades': 2083, 'volume': 1483111, 'vwap': 394.99, 'lastSize': 1900, 'turnover': 58580850420, 'homeNotional': 17059.59824178634, 'foreignNotional': 6738311.34671552}] 2020-08-29 10:00:21 INFO: prepare candles [CandleItem(low=396.3, high=400.5, open=396.35, close=399.7, color='GREEN'), CandleItem(low=394.95, high=397.25, open=395.05, close=396.35, color='GREEN'), CandleItem(low=393.45, high=395.8, open=394.85, close=395.05, color='GREEN')] 2020-08-29 10:00:21 INFO: skip by colors first_candle=CandleItem(low=393.45, high=395.8, open=394.85, close=395.05, color='GREEN') second_candle=CandleItem(low=394.95, high=397.25, open=395.05, close=396.35, color='GREEN') last_candle=CandleItem(low=396.3, high=400.5, open=396.35, close=399.7, color='GREEN') 2020-08-29 10:00:21 INFO: check need new order None 2020-08-29 10:00:21 INFO: init new order end 2020-08-29 10:00:21 INFO: 2020-08-29 10:00:21 INFO: 2020-08-29 10:00:21 INFO: 2020-08-29 10:00:21 INFO: 2020-08-29 10:02:00 INFO: 2020-08-29 10:02:00 INFO: 2020-08-29 10:02:00 INFO: 2020-08-29 10:02:00 INFO: 2020-08-29 10:02:00 INFO: clearing start 2020-08-29 10:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'a3baba83-e3f7-75f6-32bc-4b30b5bfca89', 'clOrdID': '598571c93d474864881a89edf68100ac', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1118, 'price': None, 'displayQty': None, 'stopPx': 392.55, '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': datetime.datetime(2020, 8, 29, 3, 41, 22, 280000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 29, 3, 41, 22, 280000, tzinfo=tzutc())} 2020-08-29 10:02:00 INFO: skip by not found init order into storage 2020-08-29 10:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '56c25fe7-117b-f16d-b050-5d2acd782aee', 'clOrdID': 'cb1986364ee649d2b9e70a4b48edc2c1', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1118, 'price': 404.2, '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': 1118, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 29, 3, 41, 22, 318000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 29, 3, 41, 22, 318000, tzinfo=tzutc())} 2020-08-29 10:02:00 INFO: skip by not found init order into storage 2020-08-29 10:02:00 INFO: clearing end 2020-08-29 10:02:00 INFO: 2020-08-29 10:02:00 INFO: 2020-08-29 10:02:00 INFO: 2020-08-29 10:02:00 INFO: 2020-08-29 10:46:31 INFO: process event {'orderID': '56c25fe7-117b-f16d-b050-5d2acd782aee', 'ordStatus': 'Filled', 'workingIndicator': False, 'leavesQty': 0, 'cumQty': 1118, 'avgPx': 404.2, 'timestamp': '2020-08-29T07:46:30.687Z', 'clOrdID': 'cb1986364ee649d2b9e70a4b48edc2c1', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-29 10:46:31 INFO: add new event={'uid': 'cb1986364ee649d2b9e70a4b48edc2c1', 'status': 'Filled'} 2020-08-29 10:46:31 INFO: 2020-08-29 10:46:31 INFO: 2020-08-29 10:46:31 INFO: 2020-08-29 10:46:31 INFO: 2020-08-29 10:46:31 INFO: process event start 2020-08-29 10:46:31 INFO: fetch new order event cb1986364ee649d2b9e70a4b48edc2c1 2020-08-29 10:46:31 INFO: fetch orders by event init=None profit_pair=598571c93d474864881a89edf68100ac 2020-08-29 10:46:31 INFO: process profit order filled 2020-08-29 10:46:31 INFO: process event {'orderID': 'a3baba83-e3f7-75f6-32bc-4b30b5bfca89', 'ordStatus': 'Canceled', 'leavesQty': 0, 'text': 'Canceled: Cancel order by trader.py\nStop order by trader.py', 'timestamp': '2020-08-29T07:46:31.314Z', 'clOrdID': '598571c93d474864881a89edf68100ac', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-29 10:46:31 INFO: skip event 598571c93d474864881a89edf68100ac Canceled 2020-08-29 10:46:31 INFO: cancel order=598571c93d474864881a89edf68100ac [{'orderID': 'a3baba83-e3f7-75f6-32bc-4b30b5bfca89', 'clOrdID': '598571c93d474864881a89edf68100ac', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1118, 'price': None, 'displayQty': None, 'stopPx': 392.55, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', '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: Cancel order by trader.py\nStop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 29, 3, 41, 22, 280000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 29, 7, 46, 31, 314000, tzinfo=tzutc())}] 2020-08-29 10:46:31 INFO: end process event_processing_result='proceed profit order' 2020-08-29 10:46:31 INFO: 2020-08-29 10:46:31 INFO: 2020-08-29 10:46:31 INFO: 2020-08-29 10:46:31 INFO: 2020-08-29 11:00:20 INFO: 2020-08-29 11:00:20 INFO: 2020-08-29 11:00:20 INFO: 2020-08-29 11:00:20 INFO: 2020-08-29 11:00:20 INFO: init new order start 2020-08-29 11:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 29, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 399.7, 'high': 404.55, 'low': 398.75, 'close': 404.05, 'trades': 5329, 'volume': 4632286, 'vwap': 402.06, 'lastSize': 157, 'turnover': 186242324935, 'homeNotional': 53502.34935034361, 'foreignNotional': 21510925.025130562}, {'timestamp': datetime.datetime(2020, 8, 29, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 396.35, 'high': 400.5, 'low': 396.3, 'close': 399.7, 'trades': 5572, 'volume': 4728941, 'vwap': 398.98, 'lastSize': 250, 'turnover': 188673171235, 'homeNotional': 54487.57038669733, 'foreignNotional': 21739230.852925234}, {'timestamp': datetime.datetime(2020, 8, 29, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 395.05, 'high': 397.25, 'low': 394.95, 'close': 396.35, 'trades': 2738, 'volume': 2167028, 'vwap': 396.11, 'lastSize': 540, 'turnover': 85837752980, 'homeNotional': 24939.99422455828, 'foreignNotional': 9878943.857199617}] 2020-08-29 11:00:20 INFO: prepare candles [CandleItem(low=398.75, high=404.55, open=399.7, close=404.05, color='GREEN'), CandleItem(low=396.3, high=400.5, open=396.35, close=399.7, color='GREEN'), CandleItem(low=394.95, high=397.25, open=395.05, close=396.35, color='GREEN')] 2020-08-29 11:00:20 INFO: skip by colors first_candle=CandleItem(low=394.95, high=397.25, open=395.05, close=396.35, color='GREEN') second_candle=CandleItem(low=396.3, high=400.5, open=396.35, close=399.7, color='GREEN') last_candle=CandleItem(low=398.75, high=404.55, open=399.7, close=404.05, color='GREEN') 2020-08-29 11:00:20 INFO: check need new order None 2020-08-29 11:00:20 INFO: init new order end 2020-08-29 11:00:20 INFO: 2020-08-29 11:00:20 INFO: 2020-08-29 11:00:20 INFO: 2020-08-29 11:00:20 INFO: 2020-08-29 11:02:00 INFO: 2020-08-29 11:02:00 INFO: 2020-08-29 11:02:00 INFO: 2020-08-29 11:02:00 INFO: 2020-08-29 11:02:00 INFO: clearing start 2020-08-29 11:02:00 INFO: clearing end 2020-08-29 11:02:00 INFO: 2020-08-29 11:02:00 INFO: 2020-08-29 11:02:00 INFO: 2020-08-29 11:02:00 INFO: 2020-08-29 12:00:20 INFO: 2020-08-29 12:00:20 INFO: 2020-08-29 12:00:20 INFO: 2020-08-29 12:00:20 INFO: 2020-08-29 12:00:20 INFO: init new order start 2020-08-29 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 29, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 404.05, 'high': 404.55, 'low': 401.85, 'close': 402.6, 'trades': 2585, 'volume': 3181248, 'vwap': 402.67, 'lastSize': 8758, 'turnover': 128099106070, 'homeNotional': 36753.647292900125, 'foreignNotional': 14799582.679432783}, {'timestamp': datetime.datetime(2020, 8, 29, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 399.7, 'high': 404.55, 'low': 398.75, 'close': 404.05, 'trades': 5329, 'volume': 4632286, 'vwap': 402.06, 'lastSize': 157, 'turnover': 186242324935, 'homeNotional': 53502.34935034361, 'foreignNotional': 21510925.025130562}, {'timestamp': datetime.datetime(2020, 8, 29, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 396.35, 'high': 400.5, 'low': 396.3, 'close': 399.7, 'trades': 5572, 'volume': 4728941, 'vwap': 398.98, 'lastSize': 250, 'turnover': 188673171235, 'homeNotional': 54487.57038669733, 'foreignNotional': 21739230.852925234}] 2020-08-29 12:00:20 INFO: prepare candles [CandleItem(low=401.85, high=404.55, open=404.05, close=402.6, color='RED'), CandleItem(low=398.75, high=404.55, open=399.7, close=404.05, color='GREEN'), CandleItem(low=396.3, high=400.5, open=396.35, close=399.7, color='GREEN')] 2020-08-29 12:00:20 INFO: last_candle=CandleItem(low=401.85, high=404.55, open=404.05, close=402.6, color='RED') 2020-08-29 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-08-29 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=401.85, high=404.55, open=404.05, close=402.6, color='RED') 2020-08-29 12:00:20 INFO: skip by CandleItem(low=401.85, high=404.55, open=404.05, close=402.6, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-29 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-08-29 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=401.85, high=404.55, open=404.05, close=402.6, color='RED') 2020-08-29 12:00:20 INFO: skip by CandleItem(low=401.85, high=404.55, open=404.05, close=402.6, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-29 12:00:20 INFO: not found applicable config for candle 2020-08-29 12:00:20 INFO: check need new order None 2020-08-29 12:00:20 INFO: init new order end 2020-08-29 12:00:20 INFO: 2020-08-29 12:00:20 INFO: 2020-08-29 12:00:20 INFO: 2020-08-29 12:00:20 INFO: 2020-08-29 12:02:00 INFO: 2020-08-29 12:02:00 INFO: 2020-08-29 12:02:00 INFO: 2020-08-29 12:02:00 INFO: 2020-08-29 12:02:00 INFO: clearing start 2020-08-29 12:02:01 INFO: clearing end 2020-08-29 12:02:01 INFO: 2020-08-29 12:02:01 INFO: 2020-08-29 12:02:01 INFO: 2020-08-29 12:02:01 INFO: 2020-08-29 13:00:20 INFO: 2020-08-29 13:00:20 INFO: 2020-08-29 13:00:20 INFO: 2020-08-29 13:00:20 INFO: 2020-08-29 13:00:20 INFO: init new order start 2020-08-29 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 29, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 402.6, 'high': 404.3, 'low': 401.85, 'close': 403.5, 'trades': 2851, 'volume': 1724844, 'vwap': 403.1, 'lastSize': 1000, 'turnover': 69527490225, 'homeNotional': 19910.687428855854, 'foreignNotional': 8025894.075686415}, {'timestamp': datetime.datetime(2020, 8, 29, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 404.05, 'high': 404.55, 'low': 401.85, 'close': 402.6, 'trades': 2585, 'volume': 3181248, 'vwap': 402.67, 'lastSize': 8758, 'turnover': 128099106070, 'homeNotional': 36753.647292900125, 'foreignNotional': 14799582.679432783}, {'timestamp': datetime.datetime(2020, 8, 29, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 399.7, 'high': 404.55, 'low': 398.75, 'close': 404.05, 'trades': 5329, 'volume': 4632286, 'vwap': 402.06, 'lastSize': 157, 'turnover': 186242324935, 'homeNotional': 53502.34935034361, 'foreignNotional': 21510925.025130562}] 2020-08-29 13:00:20 INFO: prepare candles [CandleItem(low=401.85, high=404.3, open=402.6, close=403.5, color='GREEN'), CandleItem(low=401.85, high=404.55, open=404.05, close=402.6, color='RED'), CandleItem(low=398.75, high=404.55, open=399.7, close=404.05, color='GREEN')] 2020-08-29 13:00:20 INFO: skip by colors first_candle=CandleItem(low=398.75, high=404.55, open=399.7, close=404.05, color='GREEN') second_candle=CandleItem(low=401.85, high=404.55, open=404.05, close=402.6, color='RED') last_candle=CandleItem(low=401.85, high=404.3, open=402.6, close=403.5, color='GREEN') 2020-08-29 13:00:20 INFO: check need new order None 2020-08-29 13:00:20 INFO: init new order end 2020-08-29 13:00:20 INFO: 2020-08-29 13:00:20 INFO: 2020-08-29 13:00:20 INFO: 2020-08-29 13:00:20 INFO: 2020-08-29 13:02:00 INFO: 2020-08-29 13:02:00 INFO: 2020-08-29 13:02:00 INFO: 2020-08-29 13:02:00 INFO: 2020-08-29 13:02:00 INFO: clearing start 2020-08-29 13:02:00 INFO: clearing end 2020-08-29 13:02:00 INFO: 2020-08-29 13:02:00 INFO: 2020-08-29 13:02:00 INFO: 2020-08-29 13:02:00 INFO: 2020-08-29 14:00:20 INFO: 2020-08-29 14:00:20 INFO: 2020-08-29 14:00:20 INFO: 2020-08-29 14:00:20 INFO: 2020-08-29 14:00:20 INFO: init new order start 2020-08-29 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 29, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 403.5, 'high': 403.9, 'low': 398.25, 'close': 398.25, 'trades': 5098, 'volume': 2770550, 'vwap': 400.47, 'lastSize': 11, 'turnover': 110949768360, 'homeNotional': 31866.852155348188, 'foreignNotional': 12761562.317981312}, {'timestamp': datetime.datetime(2020, 8, 29, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 402.6, 'high': 404.3, 'low': 401.85, 'close': 403.5, 'trades': 2851, 'volume': 1724844, 'vwap': 403.1, 'lastSize': 1000, 'turnover': 69527490225, 'homeNotional': 19910.687428855854, 'foreignNotional': 8025894.075686415}, {'timestamp': datetime.datetime(2020, 8, 29, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 404.05, 'high': 404.55, 'low': 401.85, 'close': 402.6, 'trades': 2585, 'volume': 3181248, 'vwap': 402.67, 'lastSize': 8758, 'turnover': 128099106070, 'homeNotional': 36753.647292900125, 'foreignNotional': 14799582.679432783}] 2020-08-29 14:00:20 INFO: prepare candles [CandleItem(low=398.25, high=403.9, open=403.5, close=398.25, color='RED'), CandleItem(low=401.85, high=404.3, open=402.6, close=403.5, color='GREEN'), CandleItem(low=401.85, high=404.55, open=404.05, close=402.6, color='RED')] 2020-08-29 14:00:20 INFO: skip by colors first_candle=CandleItem(low=401.85, high=404.55, open=404.05, close=402.6, color='RED') second_candle=CandleItem(low=401.85, high=404.3, open=402.6, close=403.5, color='GREEN') last_candle=CandleItem(low=398.25, high=403.9, open=403.5, close=398.25, color='RED') 2020-08-29 14:00:20 INFO: check need new order None 2020-08-29 14:00:20 INFO: init new order end 2020-08-29 14:00:20 INFO: 2020-08-29 14:00:20 INFO: 2020-08-29 14:00:20 INFO: 2020-08-29 14:00:20 INFO: 2020-08-29 14:02:00 INFO: 2020-08-29 14:02:00 INFO: 2020-08-29 14:02:00 INFO: 2020-08-29 14:02:00 INFO: 2020-08-29 14:02:00 INFO: clearing start 2020-08-29 14:02:01 INFO: clearing end 2020-08-29 14:02:01 INFO: 2020-08-29 14:02:01 INFO: 2020-08-29 14:02:01 INFO: 2020-08-29 14:02:01 INFO: 2020-08-29 15:00:20 INFO: 2020-08-29 15:00:20 INFO: 2020-08-29 15:00:20 INFO: 2020-08-29 15:00:20 INFO: 2020-08-29 15:00:20 INFO: init new order start 2020-08-29 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 29, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 398.25, 'high': 399.65, 'low': 396.9, 'close': 398.65, 'trades': 4320, 'volume': 3077116, 'vwap': 398.66, 'lastSize': 13, 'turnover': 122671571980, 'homeNotional': 35272.846738600296, 'foreignNotional': 14061806.8399915}, {'timestamp': datetime.datetime(2020, 8, 29, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 403.5, 'high': 403.9, 'low': 398.25, 'close': 398.25, 'trades': 5098, 'volume': 2770550, 'vwap': 400.47, 'lastSize': 11, 'turnover': 110949768360, 'homeNotional': 31866.852155348188, 'foreignNotional': 12761562.317981312}, {'timestamp': datetime.datetime(2020, 8, 29, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 402.6, 'high': 404.3, 'low': 401.85, 'close': 403.5, 'trades': 2851, 'volume': 1724844, 'vwap': 403.1, 'lastSize': 1000, 'turnover': 69527490225, 'homeNotional': 19910.687428855854, 'foreignNotional': 8025894.075686415}] 2020-08-29 15:00:20 INFO: prepare candles [CandleItem(low=396.9, high=399.65, open=398.25, close=398.65, color='GREEN'), CandleItem(low=398.25, high=403.9, open=403.5, close=398.25, color='RED'), CandleItem(low=401.85, high=404.3, open=402.6, close=403.5, color='GREEN')] 2020-08-29 15:00:20 INFO: skip by colors first_candle=CandleItem(low=401.85, high=404.3, open=402.6, close=403.5, color='GREEN') second_candle=CandleItem(low=398.25, high=403.9, open=403.5, close=398.25, color='RED') last_candle=CandleItem(low=396.9, high=399.65, open=398.25, close=398.65, color='GREEN') 2020-08-29 15:00:20 INFO: check need new order None 2020-08-29 15:00:20 INFO: init new order end 2020-08-29 15:00:20 INFO: 2020-08-29 15:00:20 INFO: 2020-08-29 15:00:20 INFO: 2020-08-29 15:00:20 INFO: 2020-08-29 15:02:00 INFO: 2020-08-29 15:02:00 INFO: 2020-08-29 15:02:00 INFO: 2020-08-29 15:02:00 INFO: 2020-08-29 15:02:00 INFO: clearing start 2020-08-29 15:02:00 INFO: clearing end 2020-08-29 15:02:00 INFO: 2020-08-29 15:02:00 INFO: 2020-08-29 15:02:00 INFO: 2020-08-29 15:02:00 INFO: 2020-08-29 16:00:20 INFO: 2020-08-29 16:00:20 INFO: 2020-08-29 16:00:20 INFO: 2020-08-29 16:00:20 INFO: 2020-08-29 16:00:20 INFO: init new order start 2020-08-29 16:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 29, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 398.65, 'high': 400.25, 'low': 398.05, 'close': 399.05, 'trades': 2785, 'volume': 2160219, 'vwap': 399.39, 'lastSize': 60, 'turnover': 86276406275, 'homeNotional': 24779.222852231924, 'foreignNotional': 9896522.867335333}, {'timestamp': datetime.datetime(2020, 8, 29, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 398.25, 'high': 399.65, 'low': 396.9, 'close': 398.65, 'trades': 4320, 'volume': 3077116, 'vwap': 398.66, 'lastSize': 13, 'turnover': 122671571980, 'homeNotional': 35272.846738600296, 'foreignNotional': 14061806.8399915}, {'timestamp': datetime.datetime(2020, 8, 29, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 403.5, 'high': 403.9, 'low': 398.25, 'close': 398.25, 'trades': 5098, 'volume': 2770550, 'vwap': 400.47, 'lastSize': 11, 'turnover': 110949768360, 'homeNotional': 31866.852155348188, 'foreignNotional': 12761562.317981312}] 2020-08-29 16:00:20 INFO: prepare candles [CandleItem(low=398.05, high=400.25, open=398.65, close=399.05, color='GREEN'), CandleItem(low=396.9, high=399.65, open=398.25, close=398.65, color='GREEN'), CandleItem(low=398.25, high=403.9, open=403.5, close=398.25, color='RED')] 2020-08-29 16:00:20 INFO: skip by colors first_candle=CandleItem(low=398.25, high=403.9, open=403.5, close=398.25, color='RED') second_candle=CandleItem(low=396.9, high=399.65, open=398.25, close=398.65, color='GREEN') last_candle=CandleItem(low=398.05, high=400.25, open=398.65, close=399.05, color='GREEN') 2020-08-29 16:00:20 INFO: check need new order None 2020-08-29 16:00:20 INFO: init new order end 2020-08-29 16:00:20 INFO: 2020-08-29 16:00:20 INFO: 2020-08-29 16:00:20 INFO: 2020-08-29 16:00:20 INFO: 2020-08-29 16:02:00 INFO: 2020-08-29 16:02:00 INFO: 2020-08-29 16:02:00 INFO: 2020-08-29 16:02:00 INFO: 2020-08-29 16:02:00 INFO: clearing start 2020-08-29 16:02:00 INFO: clearing end 2020-08-29 16:02:00 INFO: 2020-08-29 16:02:00 INFO: 2020-08-29 16:02:00 INFO: 2020-08-29 16:02:00 INFO: 2020-08-29 17:00:20 INFO: 2020-08-29 17:00:20 INFO: 2020-08-29 17:00:20 INFO: 2020-08-29 17:00:20 INFO: 2020-08-29 17:00:20 INFO: init new order start 2020-08-29 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 29, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 399.05, 'high': 399.5, 'low': 396.6, 'close': 396.85, 'trades': 3419, 'volume': 2441755, 'vwap': 398.28, 'lastSize': 20, 'turnover': 97250180945, 'homeNotional': 27990.21063938529, 'foreignNotional': 11147955.412856665}, {'timestamp': datetime.datetime(2020, 8, 29, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 398.65, 'high': 400.25, 'low': 398.05, 'close': 399.05, 'trades': 2785, 'volume': 2160219, 'vwap': 399.39, 'lastSize': 60, 'turnover': 86276406275, 'homeNotional': 24779.222852231924, 'foreignNotional': 9896522.867335333}, {'timestamp': datetime.datetime(2020, 8, 29, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 398.25, 'high': 399.65, 'low': 396.9, 'close': 398.65, 'trades': 4320, 'volume': 3077116, 'vwap': 398.66, 'lastSize': 13, 'turnover': 122671571980, 'homeNotional': 35272.846738600296, 'foreignNotional': 14061806.8399915}] 2020-08-29 17:00:20 INFO: prepare candles [CandleItem(low=396.6, high=399.5, open=399.05, close=396.85, color='RED'), CandleItem(low=398.05, high=400.25, open=398.65, close=399.05, color='GREEN'), CandleItem(low=396.9, high=399.65, open=398.25, close=398.65, color='GREEN')] 2020-08-29 17:00:20 INFO: last_candle=CandleItem(low=396.6, high=399.5, open=399.05, close=396.85, color='RED') 2020-08-29 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-08-29 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=396.6, high=399.5, open=399.05, close=396.85, color='RED') 2020-08-29 17:00:20 INFO: skip by CandleItem(low=396.6, high=399.5, open=399.05, close=396.85, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-29 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-08-29 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=396.6, high=399.5, open=399.05, close=396.85, color='RED') 2020-08-29 17:00:20 INFO: skip by CandleItem(low=396.6, high=399.5, open=399.05, close=396.85, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-29 17:00:20 INFO: not found applicable config for candle 2020-08-29 17:00:20 INFO: check need new order None 2020-08-29 17:00:20 INFO: init new order end 2020-08-29 17:00:20 INFO: 2020-08-29 17:00:20 INFO: 2020-08-29 17:00:20 INFO: 2020-08-29 17:00:20 INFO: 2020-08-29 17:02:00 INFO: 2020-08-29 17:02:00 INFO: 2020-08-29 17:02:00 INFO: 2020-08-29 17:02:00 INFO: 2020-08-29 17:02:00 INFO: clearing start 2020-08-29 17:02:00 INFO: clearing end 2020-08-29 17:02:00 INFO: 2020-08-29 17:02:00 INFO: 2020-08-29 17:02:00 INFO: 2020-08-29 17:02:00 INFO: 2020-08-29 18:00:20 INFO: 2020-08-29 18:00:20 INFO: 2020-08-29 18:00:20 INFO: 2020-08-29 18:00:20 INFO: 2020-08-29 18:00:20 INFO: init new order start 2020-08-29 18:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 29, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 396.85, 'high': 400.0, 'low': 396.6, 'close': 399.75, 'trades': 2781, 'volume': 1862068, 'vwap': 398.27, 'lastSize': 19, 'turnover': 74160008880, 'homeNotional': 21348.37416703212, 'foreignNotional': 8502380.579109974}, {'timestamp': datetime.datetime(2020, 8, 29, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 399.05, 'high': 399.5, 'low': 396.6, 'close': 396.85, 'trades': 3419, 'volume': 2441755, 'vwap': 398.28, 'lastSize': 20, 'turnover': 97250180945, 'homeNotional': 27990.21063938529, 'foreignNotional': 11147955.412856665}, {'timestamp': datetime.datetime(2020, 8, 29, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 398.65, 'high': 400.25, 'low': 398.05, 'close': 399.05, 'trades': 2785, 'volume': 2160219, 'vwap': 399.39, 'lastSize': 60, 'turnover': 86276406275, 'homeNotional': 24779.222852231924, 'foreignNotional': 9896522.867335333}] 2020-08-29 18:00:20 INFO: prepare candles [CandleItem(low=396.6, high=400.0, open=396.85, close=399.75, color='GREEN'), CandleItem(low=396.6, high=399.5, open=399.05, close=396.85, color='RED'), CandleItem(low=398.05, high=400.25, open=398.65, close=399.05, color='GREEN')] 2020-08-29 18:00:20 INFO: skip by colors first_candle=CandleItem(low=398.05, high=400.25, open=398.65, close=399.05, color='GREEN') second_candle=CandleItem(low=396.6, high=399.5, open=399.05, close=396.85, color='RED') last_candle=CandleItem(low=396.6, high=400.0, open=396.85, close=399.75, color='GREEN') 2020-08-29 18:00:20 INFO: check need new order None 2020-08-29 18:00:20 INFO: init new order end 2020-08-29 18:00:20 INFO: 2020-08-29 18:00:20 INFO: 2020-08-29 18:00:20 INFO: 2020-08-29 18:00:20 INFO: 2020-08-29 18:02:00 INFO: 2020-08-29 18:02:00 INFO: 2020-08-29 18:02:00 INFO: 2020-08-29 18:02:00 INFO: 2020-08-29 18:02:00 INFO: clearing start 2020-08-29 18:02:01 INFO: clearing end 2020-08-29 18:02:01 INFO: 2020-08-29 18:02:01 INFO: 2020-08-29 18:02:01 INFO: 2020-08-29 18:02:01 INFO: 2020-08-29 19:00:20 INFO: 2020-08-29 19:00:20 INFO: 2020-08-29 19:00:20 INFO: 2020-08-29 19:00:20 INFO: 2020-08-29 19:00:20 INFO: init new order start 2020-08-29 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 29, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 399.75, 'high': 402.8, 'low': 399.3, 'close': 402.8, 'trades': 4671, 'volume': 2742729, 'vwap': 401.23, 'lastSize': 858, 'turnover': 110045266175, 'homeNotional': 31529.43900157378, 'foreignNotional': 12650432.748724416}, {'timestamp': datetime.datetime(2020, 8, 29, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 396.85, 'high': 400.0, 'low': 396.6, 'close': 399.75, 'trades': 2781, 'volume': 1862068, 'vwap': 398.27, 'lastSize': 19, 'turnover': 74160008880, 'homeNotional': 21348.37416703212, 'foreignNotional': 8502380.579109974}, {'timestamp': datetime.datetime(2020, 8, 29, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 399.05, 'high': 399.5, 'low': 396.6, 'close': 396.85, 'trades': 3419, 'volume': 2441755, 'vwap': 398.28, 'lastSize': 20, 'turnover': 97250180945, 'homeNotional': 27990.21063938529, 'foreignNotional': 11147955.412856665}] 2020-08-29 19:00:20 INFO: prepare candles [CandleItem(low=399.3, high=402.8, open=399.75, close=402.8, color='GREEN'), CandleItem(low=396.6, high=400.0, open=396.85, close=399.75, color='GREEN'), CandleItem(low=396.6, high=399.5, open=399.05, close=396.85, color='RED')] 2020-08-29 19:00:20 INFO: skip by colors first_candle=CandleItem(low=396.6, high=399.5, open=399.05, close=396.85, color='RED') second_candle=CandleItem(low=396.6, high=400.0, open=396.85, close=399.75, color='GREEN') last_candle=CandleItem(low=399.3, high=402.8, open=399.75, close=402.8, color='GREEN') 2020-08-29 19:00:20 INFO: check need new order None 2020-08-29 19:00:20 INFO: init new order end 2020-08-29 19:00:20 INFO: 2020-08-29 19:00:20 INFO: 2020-08-29 19:00:20 INFO: 2020-08-29 19:00:20 INFO: 2020-08-29 19:02:00 INFO: 2020-08-29 19:02:00 INFO: 2020-08-29 19:02:00 INFO: 2020-08-29 19:02:00 INFO: 2020-08-29 19:02:00 INFO: clearing start 2020-08-29 19:02:00 INFO: clearing end 2020-08-29 19:02:00 INFO: 2020-08-29 19:02:00 INFO: 2020-08-29 19:02:00 INFO: 2020-08-29 19:02:00 INFO: 2020-08-29 20:00:20 INFO: 2020-08-29 20:00:20 INFO: 2020-08-29 20:00:20 INFO: 2020-08-29 20:00:20 INFO: 2020-08-29 20:00:20 INFO: init new order start 2020-08-29 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 29, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 402.8, 'high': 403.75, 'low': 400.9, 'close': 402.7, 'trades': 3431, 'volume': 1936636, 'vwap': 402.35, 'lastSize': 40, 'turnover': 77919251690, 'homeNotional': 22269.599030320493, 'foreignNotional': 8960033.93322337}, {'timestamp': datetime.datetime(2020, 8, 29, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 399.75, 'high': 402.8, 'low': 399.3, 'close': 402.8, 'trades': 4671, 'volume': 2742729, 'vwap': 401.23, 'lastSize': 858, 'turnover': 110045266175, 'homeNotional': 31529.43900157378, 'foreignNotional': 12650432.748724416}, {'timestamp': datetime.datetime(2020, 8, 29, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 396.85, 'high': 400.0, 'low': 396.6, 'close': 399.75, 'trades': 2781, 'volume': 1862068, 'vwap': 398.27, 'lastSize': 19, 'turnover': 74160008880, 'homeNotional': 21348.37416703212, 'foreignNotional': 8502380.579109974}] 2020-08-29 20:00:20 INFO: prepare candles [CandleItem(low=400.9, high=403.75, open=402.8, close=402.7, color='RED'), CandleItem(low=399.3, high=402.8, open=399.75, close=402.8, color='GREEN'), CandleItem(low=396.6, high=400.0, open=396.85, close=399.75, color='GREEN')] 2020-08-29 20:00:20 INFO: last_candle=CandleItem(low=400.9, high=403.75, open=402.8, close=402.7, color='RED') 2020-08-29 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-08-29 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=400.9, high=403.75, open=402.8, close=402.7, color='RED') 2020-08-29 20:00:20 INFO: skip by CandleItem(low=400.9, high=403.75, open=402.8, close=402.7, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-29 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-08-29 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=400.9, high=403.75, open=402.8, close=402.7, color='RED') 2020-08-29 20:00:20 INFO: skip by CandleItem(low=400.9, high=403.75, open=402.8, close=402.7, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-29 20:00:20 INFO: not found applicable config for candle 2020-08-29 20:00:20 INFO: check need new order None 2020-08-29 20:00:20 INFO: init new order end 2020-08-29 20:00:20 INFO: 2020-08-29 20:00:20 INFO: 2020-08-29 20:00:20 INFO: 2020-08-29 20:00:20 INFO: 2020-08-29 20:02:00 INFO: 2020-08-29 20:02:00 INFO: 2020-08-29 20:02:00 INFO: 2020-08-29 20:02:00 INFO: 2020-08-29 20:02:00 INFO: clearing start 2020-08-29 20:02:01 INFO: clearing end 2020-08-29 20:02:01 INFO: 2020-08-29 20:02:01 INFO: 2020-08-29 20:02:01 INFO: 2020-08-29 20:02:01 INFO: 2020-08-29 21:00:20 INFO: 2020-08-29 21:00:20 INFO: 2020-08-29 21:00:20 INFO: 2020-08-29 21:00:20 INFO: 2020-08-29 21:00:20 INFO: init new order start 2020-08-29 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 29, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 402.7, 'high': 404.55, 'low': 401.8, 'close': 401.9, 'trades': 3164, 'volume': 2199906, 'vwap': 403.18, 'lastSize': 210, 'turnover': 88695308745, 'homeNotional': 25350.314215781695, 'foreignNotional': 10220693.87483078}, {'timestamp': datetime.datetime(2020, 8, 29, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 402.8, 'high': 403.75, 'low': 400.9, 'close': 402.7, 'trades': 3431, 'volume': 1936636, 'vwap': 402.35, 'lastSize': 40, 'turnover': 77919251690, 'homeNotional': 22269.599030320493, 'foreignNotional': 8960033.93322337}, {'timestamp': datetime.datetime(2020, 8, 29, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 399.75, 'high': 402.8, 'low': 399.3, 'close': 402.8, 'trades': 4671, 'volume': 2742729, 'vwap': 401.23, 'lastSize': 858, 'turnover': 110045266175, 'homeNotional': 31529.43900157378, 'foreignNotional': 12650432.748724416}] 2020-08-29 21:00:20 INFO: prepare candles [CandleItem(low=401.8, high=404.55, open=402.7, close=401.9, color='RED'), CandleItem(low=400.9, high=403.75, open=402.8, close=402.7, color='RED'), CandleItem(low=399.3, high=402.8, open=399.75, close=402.8, color='GREEN')] 2020-08-29 21:00:20 INFO: skip by colors first_candle=CandleItem(low=399.3, high=402.8, open=399.75, close=402.8, color='GREEN') second_candle=CandleItem(low=400.9, high=403.75, open=402.8, close=402.7, color='RED') last_candle=CandleItem(low=401.8, high=404.55, open=402.7, close=401.9, color='RED') 2020-08-29 21:00:20 INFO: check need new order None 2020-08-29 21:00:20 INFO: init new order end 2020-08-29 21:00:20 INFO: 2020-08-29 21:00:20 INFO: 2020-08-29 21:00:20 INFO: 2020-08-29 21:00:20 INFO: 2020-08-29 21:02:00 INFO: 2020-08-29 21:02:00 INFO: 2020-08-29 21:02:00 INFO: 2020-08-29 21:02:00 INFO: 2020-08-29 21:02:00 INFO: clearing start 2020-08-29 21:02:00 INFO: clearing end 2020-08-29 21:02:00 INFO: 2020-08-29 21:02:00 INFO: 2020-08-29 21:02:00 INFO: 2020-08-29 21:02:00 INFO: 2020-08-29 22:00:20 INFO: 2020-08-29 22:00:20 INFO: 2020-08-29 22:00:20 INFO: 2020-08-29 22:00:20 INFO: 2020-08-29 22:00:20 INFO: init new order start 2020-08-29 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 29, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 401.9, 'high': 405.15, 'low': 402.0, 'close': 403.9, 'trades': 3029, 'volume': 2338361, 'vwap': 403.8, 'lastSize': 1638, 'turnover': 94422133655, 'homeNotional': 26973.565006806206, 'foreignNotional': 10891834.913579548}, {'timestamp': datetime.datetime(2020, 8, 29, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 402.7, 'high': 404.55, 'low': 401.8, 'close': 401.9, 'trades': 3164, 'volume': 2199906, 'vwap': 403.18, 'lastSize': 210, 'turnover': 88695308745, 'homeNotional': 25350.314215781695, 'foreignNotional': 10220693.87483078}, {'timestamp': datetime.datetime(2020, 8, 29, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 402.8, 'high': 403.75, 'low': 400.9, 'close': 402.7, 'trades': 3431, 'volume': 1936636, 'vwap': 402.35, 'lastSize': 40, 'turnover': 77919251690, 'homeNotional': 22269.599030320493, 'foreignNotional': 8960033.93322337}] 2020-08-29 22:00:20 INFO: prepare candles [CandleItem(low=402.0, high=405.15, open=401.9, close=403.9, color='GREEN'), CandleItem(low=401.8, high=404.55, open=402.7, close=401.9, color='RED'), CandleItem(low=400.9, high=403.75, open=402.8, close=402.7, color='RED')] 2020-08-29 22:00:20 INFO: last_candle=CandleItem(low=402.0, high=405.15, open=401.9, close=403.9, color='GREEN') 2020-08-29 22:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-08-29 22:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=402.0, high=405.15, open=401.9, close=403.9, color='GREEN') 2020-08-29 22:00:20 INFO: skip by CandleItem(low=402.0, high=405.15, open=401.9, close=403.9, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-29 22:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-08-29 22:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=402.0, high=405.15, open=401.9, close=403.9, color='GREEN') 2020-08-29 22:00:20 INFO: skip by CandleItem(low=402.0, high=405.15, open=401.9, close=403.9, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-29 22:00:20 INFO: not found applicable config for candle 2020-08-29 22:00:20 INFO: check need new order None 2020-08-29 22:00:20 INFO: init new order end 2020-08-29 22:00:20 INFO: 2020-08-29 22:00:20 INFO: 2020-08-29 22:00:20 INFO: 2020-08-29 22:00:20 INFO: 2020-08-29 22:02:00 INFO: 2020-08-29 22:02:00 INFO: 2020-08-29 22:02:00 INFO: 2020-08-29 22:02:00 INFO: 2020-08-29 22:02:00 INFO: clearing start 2020-08-29 22:02:00 INFO: clearing end 2020-08-29 22:02:00 INFO: 2020-08-29 22:02:00 INFO: 2020-08-29 22:02:00 INFO: 2020-08-29 22:02:00 INFO: 2020-08-29 23:00:20 INFO: 2020-08-29 23:00:20 INFO: 2020-08-29 23:00:20 INFO: 2020-08-29 23:00:20 INFO: 2020-08-29 23:00:20 INFO: init new order start 2020-08-29 23:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 29, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 403.9, 'high': 406.2, 'low': 402.85, 'close': 403.2, 'trades': 3780, 'volume': 3024549, 'vwap': 404.85, 'lastSize': 127, 'turnover': 122448328400, 'homeNotional': 34916.99031542386, 'foreignNotional': 14136104.189891547}, {'timestamp': datetime.datetime(2020, 8, 29, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 401.9, 'high': 405.15, 'low': 402.0, 'close': 403.9, 'trades': 3029, 'volume': 2338361, 'vwap': 403.8, 'lastSize': 1638, 'turnover': 94422133655, 'homeNotional': 26973.565006806206, 'foreignNotional': 10891834.913579548}, {'timestamp': datetime.datetime(2020, 8, 29, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 402.7, 'high': 404.55, 'low': 401.8, 'close': 401.9, 'trades': 3164, 'volume': 2199906, 'vwap': 403.18, 'lastSize': 210, 'turnover': 88695308745, 'homeNotional': 25350.314215781695, 'foreignNotional': 10220693.87483078}] 2020-08-29 23:00:21 INFO: prepare candles [CandleItem(low=402.85, high=406.2, open=403.9, close=403.2, color='RED'), CandleItem(low=402.0, high=405.15, open=401.9, close=403.9, color='GREEN'), CandleItem(low=401.8, high=404.55, open=402.7, close=401.9, color='RED')] 2020-08-29 23:00:21 INFO: skip by colors first_candle=CandleItem(low=401.8, high=404.55, open=402.7, close=401.9, color='RED') second_candle=CandleItem(low=402.0, high=405.15, open=401.9, close=403.9, color='GREEN') last_candle=CandleItem(low=402.85, high=406.2, open=403.9, close=403.2, color='RED') 2020-08-29 23:00:21 INFO: check need new order None 2020-08-29 23:00:21 INFO: init new order end 2020-08-29 23:00:21 INFO: 2020-08-29 23:00:21 INFO: 2020-08-29 23:00:21 INFO: 2020-08-29 23:00:21 INFO: 2020-08-29 23:02:00 INFO: 2020-08-29 23:02:00 INFO: 2020-08-29 23:02:00 INFO: 2020-08-29 23:02:00 INFO: 2020-08-29 23:02:00 INFO: clearing start 2020-08-29 23:02:00 INFO: clearing end 2020-08-29 23:02:00 INFO: 2020-08-29 23:02:00 INFO: 2020-08-29 23:02:00 INFO: 2020-08-29 23:02:00 INFO: 2020-08-30 00:00:20 INFO: 2020-08-30 00:00:20 INFO: 2020-08-30 00:00:20 INFO: 2020-08-30 00:00:20 INFO: 2020-08-30 00:00:20 INFO: init new order start 2020-08-30 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 29, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 403.2, 'high': 405.55, 'low': 403.15, 'close': 405.5, 'trades': 2079, 'volume': 1828119, 'vwap': 404.48, 'lastSize': 412, 'turnover': 73942850185, 'homeNotional': 21070.33348406337, 'foreignNotional': 8522423.992597036}, {'timestamp': datetime.datetime(2020, 8, 29, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 403.9, 'high': 406.2, 'low': 402.85, 'close': 403.2, 'trades': 3780, 'volume': 3024549, 'vwap': 404.85, 'lastSize': 127, 'turnover': 122448328400, 'homeNotional': 34916.99031542386, 'foreignNotional': 14136104.189891547}, {'timestamp': datetime.datetime(2020, 8, 29, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 401.9, 'high': 405.15, 'low': 402.0, 'close': 403.9, 'trades': 3029, 'volume': 2338361, 'vwap': 403.8, 'lastSize': 1638, 'turnover': 94422133655, 'homeNotional': 26973.565006806206, 'foreignNotional': 10891834.913579548}] 2020-08-30 00:00:20 INFO: prepare candles [CandleItem(low=403.15, high=405.55, open=403.2, close=405.5, color='GREEN'), CandleItem(low=402.85, high=406.2, open=403.9, close=403.2, color='RED'), CandleItem(low=402.0, high=405.15, open=401.9, close=403.9, color='GREEN')] 2020-08-30 00:00:20 INFO: skip by colors first_candle=CandleItem(low=402.0, high=405.15, open=401.9, close=403.9, color='GREEN') second_candle=CandleItem(low=402.85, high=406.2, open=403.9, close=403.2, color='RED') last_candle=CandleItem(low=403.15, high=405.55, open=403.2, close=405.5, color='GREEN') 2020-08-30 00:00:20 INFO: check need new order None 2020-08-30 00:00:20 INFO: init new order end 2020-08-30 00:00:20 INFO: 2020-08-30 00:00:20 INFO: 2020-08-30 00:00:20 INFO: 2020-08-30 00:00:20 INFO: 2020-08-30 00:02:00 INFO: 2020-08-30 00:02:00 INFO: 2020-08-30 00:02:00 INFO: 2020-08-30 00:02:00 INFO: 2020-08-30 00:02:00 INFO: clearing start 2020-08-30 00:02:00 INFO: clearing end 2020-08-30 00:02:00 INFO: 2020-08-30 00:02:00 INFO: 2020-08-30 00:02:00 INFO: 2020-08-30 00:02:00 INFO: 2020-08-30 01:00:20 INFO: 2020-08-30 01:00:20 INFO: 2020-08-30 01:00:20 INFO: 2020-08-30 01:00:20 INFO: 2020-08-30 01:00:20 INFO: init new order start 2020-08-30 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 29, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.5, 'high': 405.8, 'low': 403.75, 'close': 404.85, 'trades': 2118, 'volume': 887878, 'vwap': 404.88, 'lastSize': 12, 'turnover': 35947791445, 'homeNotional': 10222.188658708888, 'foreignNotional': 4138690.526400162}, {'timestamp': datetime.datetime(2020, 8, 29, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 403.2, 'high': 405.55, 'low': 403.15, 'close': 405.5, 'trades': 2079, 'volume': 1828119, 'vwap': 404.48, 'lastSize': 412, 'turnover': 73942850185, 'homeNotional': 21070.33348406337, 'foreignNotional': 8522423.992597036}, {'timestamp': datetime.datetime(2020, 8, 29, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 403.9, 'high': 406.2, 'low': 402.85, 'close': 403.2, 'trades': 3780, 'volume': 3024549, 'vwap': 404.85, 'lastSize': 127, 'turnover': 122448328400, 'homeNotional': 34916.99031542386, 'foreignNotional': 14136104.189891547}] 2020-08-30 01:00:20 INFO: prepare candles [CandleItem(low=403.75, high=405.8, open=405.5, close=404.85, color='RED'), CandleItem(low=403.15, high=405.55, open=403.2, close=405.5, color='GREEN'), CandleItem(low=402.85, high=406.2, open=403.9, close=403.2, color='RED')] 2020-08-30 01:00:20 INFO: skip by colors first_candle=CandleItem(low=402.85, high=406.2, open=403.9, close=403.2, color='RED') second_candle=CandleItem(low=403.15, high=405.55, open=403.2, close=405.5, color='GREEN') last_candle=CandleItem(low=403.75, high=405.8, open=405.5, close=404.85, color='RED') 2020-08-30 01:00:20 INFO: check need new order None 2020-08-30 01:00:20 INFO: init new order end 2020-08-30 01:00:20 INFO: 2020-08-30 01:00:20 INFO: 2020-08-30 01:00:20 INFO: 2020-08-30 01:00:20 INFO: 2020-08-30 01:02:00 INFO: 2020-08-30 01:02:00 INFO: 2020-08-30 01:02:00 INFO: 2020-08-30 01:02:00 INFO: 2020-08-30 01:02:00 INFO: clearing start 2020-08-30 01:02:00 INFO: clearing end 2020-08-30 01:02:00 INFO: 2020-08-30 01:02:00 INFO: 2020-08-30 01:02:00 INFO: 2020-08-30 01:02:00 INFO: 2020-08-30 02:00:20 INFO: 2020-08-30 02:00:20 INFO: 2020-08-30 02:00:20 INFO: 2020-08-30 02:00:20 INFO: 2020-08-30 02:00:20 INFO: init new order start 2020-08-30 02:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 29, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 404.85, 'high': 405.1, 'low': 400.55, 'close': 401.1, 'trades': 2826, 'volume': 1698819, 'vwap': 402.79, 'lastSize': 100, 'turnover': 68426482220, 'homeNotional': 19541.01082390221, 'foreignNotional': 7870911.398043262}, {'timestamp': datetime.datetime(2020, 8, 29, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.5, 'high': 405.8, 'low': 403.75, 'close': 404.85, 'trades': 2118, 'volume': 887878, 'vwap': 404.88, 'lastSize': 12, 'turnover': 35947791445, 'homeNotional': 10222.188658708888, 'foreignNotional': 4138690.526400162}, {'timestamp': datetime.datetime(2020, 8, 29, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 403.2, 'high': 405.55, 'low': 403.15, 'close': 405.5, 'trades': 2079, 'volume': 1828119, 'vwap': 404.48, 'lastSize': 412, 'turnover': 73942850185, 'homeNotional': 21070.33348406337, 'foreignNotional': 8522423.992597036}] 2020-08-30 02:00:21 INFO: prepare candles [CandleItem(low=400.55, high=405.1, open=404.85, close=401.1, color='RED'), CandleItem(low=403.75, high=405.8, open=405.5, close=404.85, color='RED'), CandleItem(low=403.15, high=405.55, open=403.2, close=405.5, color='GREEN')] 2020-08-30 02:00:21 INFO: skip by colors first_candle=CandleItem(low=403.15, high=405.55, open=403.2, close=405.5, color='GREEN') second_candle=CandleItem(low=403.75, high=405.8, open=405.5, close=404.85, color='RED') last_candle=CandleItem(low=400.55, high=405.1, open=404.85, close=401.1, color='RED') 2020-08-30 02:00:21 INFO: check need new order None 2020-08-30 02:00:21 INFO: init new order end 2020-08-30 02:00:21 INFO: 2020-08-30 02:00:21 INFO: 2020-08-30 02:00:21 INFO: 2020-08-30 02:00:21 INFO: 2020-08-30 02:02:00 INFO: 2020-08-30 02:02:00 INFO: 2020-08-30 02:02:00 INFO: 2020-08-30 02:02:00 INFO: 2020-08-30 02:02:00 INFO: clearing start 2020-08-30 02:02:00 INFO: clearing end 2020-08-30 02:02:00 INFO: 2020-08-30 02:02:00 INFO: 2020-08-30 02:02:00 INFO: 2020-08-30 02:02:00 INFO: 2020-08-30 03:00:20 INFO: 2020-08-30 03:00:20 INFO: 2020-08-30 03:00:20 INFO: 2020-08-30 03:00:20 INFO: 2020-08-30 03:00:20 INFO: init new order start 2020-08-30 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 30, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 401.1, 'high': 402.85, 'low': 398.7, 'close': 398.9, 'trades': 3680, 'volume': 3148932, 'vwap': 401.08, 'lastSize': 34, 'turnover': 126295003575, 'homeNotional': 36191.99502430175, 'foreignNotional': 14515655.717545053}, {'timestamp': datetime.datetime(2020, 8, 29, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 404.85, 'high': 405.1, 'low': 400.55, 'close': 401.1, 'trades': 2826, 'volume': 1698819, 'vwap': 402.79, 'lastSize': 100, 'turnover': 68426482220, 'homeNotional': 19541.01082390221, 'foreignNotional': 7870911.398043262}, {'timestamp': datetime.datetime(2020, 8, 29, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.5, 'high': 405.8, 'low': 403.75, 'close': 404.85, 'trades': 2118, 'volume': 887878, 'vwap': 404.88, 'lastSize': 12, 'turnover': 35947791445, 'homeNotional': 10222.188658708888, 'foreignNotional': 4138690.526400162}] 2020-08-30 03:00:20 INFO: prepare candles [CandleItem(low=398.7, high=402.85, open=401.1, close=398.9, color='RED'), CandleItem(low=400.55, high=405.1, open=404.85, close=401.1, color='RED'), CandleItem(low=403.75, high=405.8, open=405.5, close=404.85, color='RED')] 2020-08-30 03:00:20 INFO: skip by colors first_candle=CandleItem(low=403.75, high=405.8, open=405.5, close=404.85, color='RED') second_candle=CandleItem(low=400.55, high=405.1, open=404.85, close=401.1, color='RED') last_candle=CandleItem(low=398.7, high=402.85, open=401.1, close=398.9, color='RED') 2020-08-30 03:00:20 INFO: check need new order None 2020-08-30 03:00:20 INFO: init new order end 2020-08-30 03:00:20 INFO: 2020-08-30 03:00:20 INFO: 2020-08-30 03:00:20 INFO: 2020-08-30 03:00:20 INFO: 2020-08-30 03:02:00 INFO: 2020-08-30 03:02:00 INFO: 2020-08-30 03:02:00 INFO: 2020-08-30 03:02:00 INFO: 2020-08-30 03:02:00 INFO: clearing start 2020-08-30 03:02:00 INFO: clearing end 2020-08-30 03:02:00 INFO: 2020-08-30 03:02:00 INFO: 2020-08-30 03:02:00 INFO: 2020-08-30 03:02:00 INFO: 2020-08-30 04:00:20 INFO: 2020-08-30 04:00:20 INFO: 2020-08-30 04:00:20 INFO: 2020-08-30 04:00:20 INFO: 2020-08-30 04:00:20 INFO: init new order start 2020-08-30 04:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 30, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 398.9, 'high': 401.7, 'low': 398.55, 'close': 401.55, 'trades': 2730, 'volume': 2233493, 'vwap': 400.21, 'lastSize': 2, 'turnover': 89385620370, 'homeNotional': 25668.036881028635, 'foreignNotional': 10272515.80855679}, {'timestamp': datetime.datetime(2020, 8, 30, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 401.1, 'high': 402.85, 'low': 398.7, 'close': 398.9, 'trades': 3680, 'volume': 3148932, 'vwap': 401.08, 'lastSize': 34, 'turnover': 126295003575, 'homeNotional': 36191.99502430175, 'foreignNotional': 14515655.717545053}, {'timestamp': datetime.datetime(2020, 8, 29, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 404.85, 'high': 405.1, 'low': 400.55, 'close': 401.1, 'trades': 2826, 'volume': 1698819, 'vwap': 402.79, 'lastSize': 100, 'turnover': 68426482220, 'homeNotional': 19541.01082390221, 'foreignNotional': 7870911.398043262}] 2020-08-30 04:00:20 INFO: prepare candles [CandleItem(low=398.55, high=401.7, open=398.9, close=401.55, color='GREEN'), CandleItem(low=398.7, high=402.85, open=401.1, close=398.9, color='RED'), CandleItem(low=400.55, high=405.1, open=404.85, close=401.1, color='RED')] 2020-08-30 04:00:20 INFO: last_candle=CandleItem(low=398.55, high=401.7, open=398.9, close=401.55, color='GREEN') 2020-08-30 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-08-30 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=398.55, high=401.7, open=398.9, close=401.55, color='GREEN') 2020-08-30 04:00:20 INFO: skip by CandleItem(low=398.55, high=401.7, open=398.9, close=401.55, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-30 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-08-30 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=398.55, high=401.7, open=398.9, close=401.55, color='GREEN') 2020-08-30 04:00:20 INFO: skip by CandleItem(low=398.55, high=401.7, open=398.9, close=401.55, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-30 04:00:20 INFO: not found applicable config for candle 2020-08-30 04:00:20 INFO: check need new order None 2020-08-30 04:00:20 INFO: init new order end 2020-08-30 04:00:20 INFO: 2020-08-30 04:00:20 INFO: 2020-08-30 04:00:20 INFO: 2020-08-30 04:00:20 INFO: 2020-08-30 04:02:00 INFO: 2020-08-30 04:02:00 INFO: 2020-08-30 04:02:00 INFO: 2020-08-30 04:02:00 INFO: 2020-08-30 04:02:00 INFO: clearing start 2020-08-30 04:02:00 INFO: clearing end 2020-08-30 04:02:00 INFO: 2020-08-30 04:02:00 INFO: 2020-08-30 04:02:00 INFO: 2020-08-30 04:02:00 INFO: 2020-08-30 05:00:20 INFO: 2020-08-30 05:00:20 INFO: 2020-08-30 05:00:20 INFO: 2020-08-30 05:00:20 INFO: 2020-08-30 05:00:20 INFO: init new order start 2020-08-30 05:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 30, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 401.55, 'high': 407.0, 'low': 401.0, 'close': 406.45, 'trades': 6265, 'volume': 3799327, 'vwap': 404.79, 'lastSize': 243, 'turnover': 153789231795, 'homeNotional': 43960.124511369664, 'foreignNotional': 17794463.904840205}, {'timestamp': datetime.datetime(2020, 8, 30, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 398.9, 'high': 401.7, 'low': 398.55, 'close': 401.55, 'trades': 2730, 'volume': 2233493, 'vwap': 400.21, 'lastSize': 2, 'turnover': 89385620370, 'homeNotional': 25668.036881028635, 'foreignNotional': 10272515.80855679}, {'timestamp': datetime.datetime(2020, 8, 30, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 401.1, 'high': 402.85, 'low': 398.7, 'close': 398.9, 'trades': 3680, 'volume': 3148932, 'vwap': 401.08, 'lastSize': 34, 'turnover': 126295003575, 'homeNotional': 36191.99502430175, 'foreignNotional': 14515655.717545053}] 2020-08-30 05:00:20 INFO: prepare candles [CandleItem(low=401.0, high=407.0, open=401.55, close=406.45, color='GREEN'), CandleItem(low=398.55, high=401.7, open=398.9, close=401.55, color='GREEN'), CandleItem(low=398.7, high=402.85, open=401.1, close=398.9, color='RED')] 2020-08-30 05:00:20 INFO: skip by colors first_candle=CandleItem(low=398.7, high=402.85, open=401.1, close=398.9, color='RED') second_candle=CandleItem(low=398.55, high=401.7, open=398.9, close=401.55, color='GREEN') last_candle=CandleItem(low=401.0, high=407.0, open=401.55, close=406.45, color='GREEN') 2020-08-30 05:00:20 INFO: check need new order None 2020-08-30 05:00:20 INFO: init new order end 2020-08-30 05:00:20 INFO: 2020-08-30 05:00:20 INFO: 2020-08-30 05:00:20 INFO: 2020-08-30 05:00:20 INFO: 2020-08-30 05:02:00 INFO: 2020-08-30 05:02:00 INFO: 2020-08-30 05:02:00 INFO: 2020-08-30 05:02:00 INFO: 2020-08-30 05:02:00 INFO: clearing start 2020-08-30 05:02:00 INFO: clearing end 2020-08-30 05:02:00 INFO: 2020-08-30 05:02:00 INFO: 2020-08-30 05:02:00 INFO: 2020-08-30 05:02:00 INFO: 2020-08-30 06:00:20 INFO: 2020-08-30 06:00:20 INFO: 2020-08-30 06:00:20 INFO: 2020-08-30 06:00:20 INFO: 2020-08-30 06:00:20 INFO: init new order start 2020-08-30 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 30, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 406.45, 'high': 406.7, 'low': 404.6, 'close': 405.8, 'trades': 3026, 'volume': 1579887, 'vwap': 405.51, 'lastSize': 13, 'turnover': 64065405210, 'homeNotional': 18363.479098430438, 'foreignNotional': 7446506.432789842}, {'timestamp': datetime.datetime(2020, 8, 30, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 401.55, 'high': 407.0, 'low': 401.0, 'close': 406.45, 'trades': 6265, 'volume': 3799327, 'vwap': 404.79, 'lastSize': 243, 'turnover': 153789231795, 'homeNotional': 43960.124511369664, 'foreignNotional': 17794463.904840205}, {'timestamp': datetime.datetime(2020, 8, 30, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 398.9, 'high': 401.7, 'low': 398.55, 'close': 401.55, 'trades': 2730, 'volume': 2233493, 'vwap': 400.21, 'lastSize': 2, 'turnover': 89385620370, 'homeNotional': 25668.036881028635, 'foreignNotional': 10272515.80855679}] 2020-08-30 06:00:20 INFO: prepare candles [CandleItem(low=404.6, high=406.7, open=406.45, close=405.8, color='RED'), CandleItem(low=401.0, high=407.0, open=401.55, close=406.45, color='GREEN'), CandleItem(low=398.55, high=401.7, open=398.9, close=401.55, color='GREEN')] 2020-08-30 06:00:20 INFO: last_candle=CandleItem(low=404.6, high=406.7, open=406.45, close=405.8, color='RED') 2020-08-30 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-08-30 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=404.6, high=406.7, open=406.45, close=405.8, color='RED') 2020-08-30 06:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=401.0, high=407.0, open=401.55, close=406.45, color='GREEN') 2020-08-30 06:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=398.55, high=401.7, open=398.9, close=401.55, color='GREEN') 2020-08-30 06:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=404.6, high=406.7, open=406.45, close=405.8, color='RED'), take_profit_factor=6.0, clearing_interval=3600) 2020-08-30 06:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=404.6, high=406.7, open=406.45, close=405.8, color='RED'), take_profit_factor=6.0, clearing_interval=3600) 2020-08-30 06:00:20 INFO: place order: start candle=CandleItem(low=404.6, high=406.7, open=406.45, close=405.8, color='RED') ticker='ETHUSD' price_offset=0.1 2020-08-30 06:00:20 INFO: place order: side_factor=1 init_trigger_price=404.55 init_order_price=404.5 stop_price_offset=0.0 candle.size=2.099999999999966 stop_price=406.7 take_price=391.9000000000002 2020-08-30 06:00:20 INFO: place order round: side_factor=1 init_trigger_price=Decimal('404.55000000000001136868377216160297393798828125') init_order_price=Decimal('404.5') stop_price_offset=0.0 candle.size=2.099999999999966 stop_price=Decimal('406.69999999999998863131622783839702606201171875') take_price=Decimal('391.9000000000002046363078989088535308837890625') 2020-08-30 06:00:20 INFO: place order: compute qty=-884 2020-08-30 06:00:20 INFO: place order: save order to db 40c96a90b8a6466fb7c80a3565efcb85; response=True 2020-08-30 06:00:20 INFO: post order to exchange resp={'orderID': '973eea76-46e2-fbd0-10eb-072a2513c2a2', 'clOrdID': '40c96a90b8a6466fb7c80a3565efcb85', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 884, 'price': 404.5, 'displayQty': None, 'stopPx': 404.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': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 30, 3, 0, 20, 796000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 30, 3, 0, 20, 796000, tzinfo=tzutc())} 2020-08-30 06:00:20 INFO: place new init order {'qty': -884, 'init_price': Decimal('404.55000000000001136868377216160297393798828125'), 'stop_price': Decimal('406.69999999999998863131622783839702606201171875'), 'take_price': Decimal('391.9000000000002046363078989088535308837890625'), 'order_uid': '40c96a90b8a6466fb7c80a3565efcb85', 'response': {'orderID': '973eea76-46e2-fbd0-10eb-072a2513c2a2', 'clOrdID': '40c96a90b8a6466fb7c80a3565efcb85', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 884, 'price': 404.5, 'displayQty': None, 'stopPx': 404.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': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 30, 3, 0, 20, 796000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 30, 3, 0, 20, 796000, tzinfo=tzutc())}} 2020-08-30 06:00:20 INFO: init new order end 2020-08-30 06:00:20 INFO: 2020-08-30 06:00:20 INFO: 2020-08-30 06:00:20 INFO: 2020-08-30 06:00:20 INFO: 2020-08-30 06:00:20 INFO: process event {'orderID': '973eea76-46e2-fbd0-10eb-072a2513c2a2', 'clOrdID': '40c96a90b8a6466fb7c80a3565efcb85', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 884, 'price': 404.5, 'displayQty': None, 'stopPx': 404.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': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-08-30T03:00:20.796Z', 'timestamp': '2020-08-30T03:00:20.796Z'} 2020-08-30 06:00:20 INFO: skip event 40c96a90b8a6466fb7c80a3565efcb85 New 2020-08-30 06:02:00 INFO: 2020-08-30 06:02:00 INFO: 2020-08-30 06:02:00 INFO: 2020-08-30 06:02:00 INFO: 2020-08-30 06:02:00 INFO: clearing start 2020-08-30 06:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '973eea76-46e2-fbd0-10eb-072a2513c2a2', 'clOrdID': '40c96a90b8a6466fb7c80a3565efcb85', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 884, 'price': 404.5, 'displayQty': None, 'stopPx': 404.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': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 30, 3, 0, 20, 796000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 30, 3, 0, 20, 796000, tzinfo=tzutc())} 2020-08-30 06:02:00 INFO: order time=2020-08-30 03:00:20.796000+00:00; delta from now UTC=0:01:40.179687 time_delta.total_seconds()=100.179687; time_diff_offset='3600' 2020-08-30 06:02:00 INFO: skip by time diff 2020-08-30 03:00:20.796000+00:00 2020-08-30 06:02:00 INFO: clearing end 2020-08-30 06:02:00 INFO: 2020-08-30 06:02:00 INFO: 2020-08-30 06:02:00 INFO: 2020-08-30 06:02:00 INFO: 2020-08-30 06:27:48 INFO: process event {'orderID': '973eea76-46e2-fbd0-10eb-072a2513c2a2', 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 884, 'avgPx': 404.5, 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'transactTime': '2020-08-30T03:27:48.028Z', 'timestamp': '2020-08-30T03:27:48.028Z', 'clOrdID': '40c96a90b8a6466fb7c80a3565efcb85', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-30 06:27:48 INFO: add new event={'uid': '40c96a90b8a6466fb7c80a3565efcb85', 'status': 'Filled'} 2020-08-30 06:27:48 INFO: 2020-08-30 06:27:48 INFO: 2020-08-30 06:27:48 INFO: 2020-08-30 06:27:48 INFO: 2020-08-30 06:27:48 INFO: process event start 2020-08-30 06:27:48 INFO: fetch new order event 40c96a90b8a6466fb7c80a3565efcb85 2020-08-30 06:27:48 INFO: fetch orders by event init={'stop': '406.69999999999998863131622783839702606201171875', 'take': '391.9000000000002046363078989088535308837890625', 'qty': '884', 'color': 'RED', 'ticker': 'ETHUSD', 'clearing_offset': '3600'} profit_pair=None 2020-08-30 06:27:48 INFO: process init order filled 2020-08-30 06:27:48 INFO: save profit orders to storage stop=9f1c1d5137724fc4ab786e932108c56d take=2654f931b649452cba3b4722232a7435 2020-08-30 06:27:48 INFO: place profit orders take_price=391.9000000000002046363078989088535308837890625, stop_price=406.69999999999998863131622783839702606201171875, qty=884, color=RED, ticker=ETHUSD 9f1c1d5137724fc4ab786e932108c56d 2654f931b649452cba3b4722232a7435 2020-08-30 06:27:48 INFO: place stop order ETHUSD: qty=884, stop_price=406.69999999999998863131622783839702606201171875, stop_uid=9f1c1d5137724fc4ab786e932108c56d 2020-08-30 06:27:49 INFO: exchange resp for stop order={'orderID': 'd6b0006b-34f7-294d-d1a8-2df2352bfbcf', 'clOrdID': '9f1c1d5137724fc4ab786e932108c56d', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 884, 'price': None, 'displayQty': None, 'stopPx': 406.7, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 30, 3, 27, 48, 992000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 30, 3, 27, 48, 992000, tzinfo=tzutc())} 2020-08-30 06:27:49 INFO: process event {'orderID': 'd6b0006b-34f7-294d-d1a8-2df2352bfbcf', 'clOrdID': '9f1c1d5137724fc4ab786e932108c56d', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 884, 'price': None, 'displayQty': None, 'stopPx': 406.7, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': '2020-08-30T03:27:48.992Z', 'timestamp': '2020-08-30T03:27:48.992Z'} 2020-08-30 06:27:49 INFO: skip event 9f1c1d5137724fc4ab786e932108c56d New 2020-08-30 06:27:49 INFO: place limit order ETHUSD: qty=884, price=391.9000000000002046363078989088535308837890625, take_uid=2654f931b649452cba3b4722232a7435 2020-08-30 06:27:49 INFO: exchange resp for take profit order={'orderID': '0e4936cc-f8bf-6c86-90e1-7e55b911823c', 'clOrdID': '2654f931b649452cba3b4722232a7435', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 884, 'price': 391.9, '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': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 30, 3, 27, 49, 36000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 30, 3, 27, 49, 36000, tzinfo=tzutc())} 2020-08-30 06:27:49 INFO: place profit orders={'stop': {'response': {'orderID': 'd6b0006b-34f7-294d-d1a8-2df2352bfbcf', 'clOrdID': '9f1c1d5137724fc4ab786e932108c56d', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 884, 'price': None, 'displayQty': None, 'stopPx': 406.7, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 30, 3, 27, 48, 992000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 30, 3, 27, 48, 992000, tzinfo=tzutc())}, 'qty': Decimal('884'), 'uid': '9f1c1d5137724fc4ab786e932108c56d', 'price': Decimal('406.69999999999998863131622783839702606201171875')}, 'take': {'response': {'orderID': '0e4936cc-f8bf-6c86-90e1-7e55b911823c', 'clOrdID': '2654f931b649452cba3b4722232a7435', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 884, 'price': 391.9, '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': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 30, 3, 27, 49, 36000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 30, 3, 27, 49, 36000, tzinfo=tzutc())}, 'qty': Decimal('884'), 'uid': '2654f931b649452cba3b4722232a7435', 'price': Decimal('391.9000000000002046363078989088535308837890625')}} 2020-08-30 06:27:49 INFO: process event {'orderID': '0e4936cc-f8bf-6c86-90e1-7e55b911823c', 'clOrdID': '2654f931b649452cba3b4722232a7435', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 884, 'price': 391.9, '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': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': '2020-08-30T03:27:49.036Z', 'timestamp': '2020-08-30T03:27:49.036Z'} 2020-08-30 06:27:49 INFO: rm init order from db 40c96a90b8a6466fb7c80a3565efcb85 2020-08-30 06:27:49 INFO: end process event_processing_result='proceed init order' 2020-08-30 06:27:49 INFO: 2020-08-30 06:27:49 INFO: 2020-08-30 06:27:49 INFO: 2020-08-30 06:27:49 INFO: 2020-08-30 06:27:49 INFO: skip event 2654f931b649452cba3b4722232a7435 New 2020-08-30 07:00:20 INFO: 2020-08-30 07:00:20 INFO: 2020-08-30 07:00:20 INFO: 2020-08-30 07:00:20 INFO: 2020-08-30 07:00:20 INFO: init new order start 2020-08-30 07:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 30, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.8, 'high': 405.8, 'low': 403.65, 'close': 405.0, 'trades': 2892, 'volume': 1363968, 'vwap': 404.59, 'lastSize': 10, 'turnover': 55184718465, 'homeNotional': 15827.189014395977, 'foreignNotional': 6403521.400828629}, {'timestamp': datetime.datetime(2020, 8, 30, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 406.45, 'high': 406.7, 'low': 404.6, 'close': 405.8, 'trades': 3026, 'volume': 1579887, 'vwap': 405.51, 'lastSize': 13, 'turnover': 64065405210, 'homeNotional': 18363.479098430438, 'foreignNotional': 7446506.432789842}, {'timestamp': datetime.datetime(2020, 8, 30, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 401.55, 'high': 407.0, 'low': 401.0, 'close': 406.45, 'trades': 6265, 'volume': 3799327, 'vwap': 404.79, 'lastSize': 243, 'turnover': 153789231795, 'homeNotional': 43960.124511369664, 'foreignNotional': 17794463.904840205}] 2020-08-30 07:00:20 INFO: prepare candles [CandleItem(low=403.65, high=405.8, open=405.8, close=405.0, color='RED'), CandleItem(low=404.6, high=406.7, open=406.45, close=405.8, color='RED'), CandleItem(low=401.0, high=407.0, open=401.55, close=406.45, color='GREEN')] 2020-08-30 07:00:20 INFO: skip by colors first_candle=CandleItem(low=401.0, high=407.0, open=401.55, close=406.45, color='GREEN') second_candle=CandleItem(low=404.6, high=406.7, open=406.45, close=405.8, color='RED') last_candle=CandleItem(low=403.65, high=405.8, open=405.8, close=405.0, color='RED') 2020-08-30 07:00:20 INFO: check need new order None 2020-08-30 07:00:20 INFO: init new order end 2020-08-30 07:00:20 INFO: 2020-08-30 07:00:20 INFO: 2020-08-30 07:00:20 INFO: 2020-08-30 07:00:20 INFO: 2020-08-30 07:02:00 INFO: 2020-08-30 07:02:00 INFO: 2020-08-30 07:02:00 INFO: 2020-08-30 07:02:00 INFO: 2020-08-30 07:02:00 INFO: clearing start 2020-08-30 07:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6b0006b-34f7-294d-d1a8-2df2352bfbcf', 'clOrdID': '9f1c1d5137724fc4ab786e932108c56d', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 884, 'price': None, 'displayQty': None, 'stopPx': 406.7, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 30, 3, 27, 48, 992000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 30, 3, 27, 48, 992000, tzinfo=tzutc())} 2020-08-30 07:02:00 INFO: skip by not found init order into storage 2020-08-30 07:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '0e4936cc-f8bf-6c86-90e1-7e55b911823c', 'clOrdID': '2654f931b649452cba3b4722232a7435', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 884, 'price': 391.9, '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': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 30, 3, 27, 49, 36000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 30, 3, 27, 49, 36000, tzinfo=tzutc())} 2020-08-30 07:02:00 INFO: skip by not found init order into storage 2020-08-30 07:02:00 INFO: clearing end 2020-08-30 07:02:00 INFO: 2020-08-30 07:02:00 INFO: 2020-08-30 07:02:00 INFO: 2020-08-30 07:02:00 INFO: 2020-08-30 08:00:20 INFO: 2020-08-30 08:00:20 INFO: 2020-08-30 08:00:20 INFO: 2020-08-30 08:00:20 INFO: 2020-08-30 08:00:20 INFO: init new order start 2020-08-30 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 30, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.0, 'high': 405.5, 'low': 403.55, 'close': 404.15, 'trades': 2466, 'volume': 1506170, 'vwap': 404.28, 'lastSize': 11, 'turnover': 60890698030, 'homeNotional': 17476.505123184983, 'foreignNotional': 7065324.722137931}, {'timestamp': datetime.datetime(2020, 8, 30, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.8, 'high': 405.8, 'low': 403.65, 'close': 405.0, 'trades': 2892, 'volume': 1363968, 'vwap': 404.59, 'lastSize': 10, 'turnover': 55184718465, 'homeNotional': 15827.189014395977, 'foreignNotional': 6403521.400828629}, {'timestamp': datetime.datetime(2020, 8, 30, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 406.45, 'high': 406.7, 'low': 404.6, 'close': 405.8, 'trades': 3026, 'volume': 1579887, 'vwap': 405.51, 'lastSize': 13, 'turnover': 64065405210, 'homeNotional': 18363.479098430438, 'foreignNotional': 7446506.432789842}] 2020-08-30 08:00:20 INFO: prepare candles [CandleItem(low=403.55, high=405.5, open=405.0, close=404.15, color='RED'), CandleItem(low=403.65, high=405.8, open=405.8, close=405.0, color='RED'), CandleItem(low=404.6, high=406.7, open=406.45, close=405.8, color='RED')] 2020-08-30 08:00:20 INFO: skip by colors first_candle=CandleItem(low=404.6, high=406.7, open=406.45, close=405.8, color='RED') second_candle=CandleItem(low=403.65, high=405.8, open=405.8, close=405.0, color='RED') last_candle=CandleItem(low=403.55, high=405.5, open=405.0, close=404.15, color='RED') 2020-08-30 08:00:20 INFO: check need new order None 2020-08-30 08:00:20 INFO: init new order end 2020-08-30 08:00:20 INFO: 2020-08-30 08:00:20 INFO: 2020-08-30 08:00:20 INFO: 2020-08-30 08:00:20 INFO: 2020-08-30 08:02:00 INFO: 2020-08-30 08:02:00 INFO: 2020-08-30 08:02:00 INFO: 2020-08-30 08:02:00 INFO: 2020-08-30 08:02:00 INFO: clearing start 2020-08-30 08:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6b0006b-34f7-294d-d1a8-2df2352bfbcf', 'clOrdID': '9f1c1d5137724fc4ab786e932108c56d', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 884, 'price': None, 'displayQty': None, 'stopPx': 406.7, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 30, 3, 27, 48, 992000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 30, 3, 27, 48, 992000, tzinfo=tzutc())} 2020-08-30 08:02:00 INFO: skip by not found init order into storage 2020-08-30 08:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '0e4936cc-f8bf-6c86-90e1-7e55b911823c', 'clOrdID': '2654f931b649452cba3b4722232a7435', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 884, 'price': 391.9, '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': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 30, 3, 27, 49, 36000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 30, 3, 27, 49, 36000, tzinfo=tzutc())} 2020-08-30 08:02:00 INFO: skip by not found init order into storage 2020-08-30 08:02:00 INFO: clearing end 2020-08-30 08:02:00 INFO: 2020-08-30 08:02:00 INFO: 2020-08-30 08:02:00 INFO: 2020-08-30 08:02:00 INFO: 2020-08-30 09:00:20 INFO: 2020-08-30 09:00:20 INFO: 2020-08-30 09:00:20 INFO: 2020-08-30 09:00:20 INFO: 2020-08-30 09:00:20 INFO: init new order start 2020-08-30 09:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 30, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 404.15, 'high': 404.75, 'low': 403.1, 'close': 403.7, 'trades': 2076, 'volume': 1650984, 'vwap': 403.86, 'lastSize': 373, 'turnover': 66675182140, 'homeNotional': 19128.77561967304, 'foreignNotional': 7725183.356702046}, {'timestamp': datetime.datetime(2020, 8, 30, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.0, 'high': 405.5, 'low': 403.55, 'close': 404.15, 'trades': 2466, 'volume': 1506170, 'vwap': 404.28, 'lastSize': 11, 'turnover': 60890698030, 'homeNotional': 17476.505123184983, 'foreignNotional': 7065324.722137931}, {'timestamp': datetime.datetime(2020, 8, 30, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.8, 'high': 405.8, 'low': 403.65, 'close': 405.0, 'trades': 2892, 'volume': 1363968, 'vwap': 404.59, 'lastSize': 10, 'turnover': 55184718465, 'homeNotional': 15827.189014395977, 'foreignNotional': 6403521.400828629}] 2020-08-30 09:00:20 INFO: prepare candles [CandleItem(low=403.1, high=404.75, open=404.15, close=403.7, color='RED'), CandleItem(low=403.55, high=405.5, open=405.0, close=404.15, color='RED'), CandleItem(low=403.65, high=405.8, open=405.8, close=405.0, color='RED')] 2020-08-30 09:00:20 INFO: skip by colors first_candle=CandleItem(low=403.65, high=405.8, open=405.8, close=405.0, color='RED') second_candle=CandleItem(low=403.55, high=405.5, open=405.0, close=404.15, color='RED') last_candle=CandleItem(low=403.1, high=404.75, open=404.15, close=403.7, color='RED') 2020-08-30 09:00:20 INFO: check need new order None 2020-08-30 09:00:20 INFO: init new order end 2020-08-30 09:00:20 INFO: 2020-08-30 09:00:20 INFO: 2020-08-30 09:00:20 INFO: 2020-08-30 09:00:20 INFO: 2020-08-30 09:02:00 INFO: 2020-08-30 09:02:00 INFO: 2020-08-30 09:02:00 INFO: 2020-08-30 09:02:00 INFO: 2020-08-30 09:02:00 INFO: clearing start 2020-08-30 09:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6b0006b-34f7-294d-d1a8-2df2352bfbcf', 'clOrdID': '9f1c1d5137724fc4ab786e932108c56d', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 884, 'price': None, 'displayQty': None, 'stopPx': 406.7, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 30, 3, 27, 48, 992000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 30, 3, 27, 48, 992000, tzinfo=tzutc())} 2020-08-30 09:02:00 INFO: skip by not found init order into storage 2020-08-30 09:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '0e4936cc-f8bf-6c86-90e1-7e55b911823c', 'clOrdID': '2654f931b649452cba3b4722232a7435', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 884, 'price': 391.9, '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': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 30, 3, 27, 49, 36000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 30, 3, 27, 49, 36000, tzinfo=tzutc())} 2020-08-30 09:02:00 INFO: skip by not found init order into storage 2020-08-30 09:02:00 INFO: clearing end 2020-08-30 09:02:00 INFO: 2020-08-30 09:02:00 INFO: 2020-08-30 09:02:00 INFO: 2020-08-30 09:02:00 INFO: 2020-08-30 10:00:20 INFO: 2020-08-30 10:00:20 INFO: 2020-08-30 10:00:20 INFO: 2020-08-30 10:00:20 INFO: 2020-08-30 10:00:20 INFO: init new order start 2020-08-30 10:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 30, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 403.7, 'high': 405.1, 'low': 403.25, 'close': 404.05, 'trades': 1992, 'volume': 1324156, 'vwap': 404.04, 'lastSize': 334, 'turnover': 53499887120, 'homeNotional': 15347.600640236327, 'foreignNotional': 6200896.367756288}, {'timestamp': datetime.datetime(2020, 8, 30, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 404.15, 'high': 404.75, 'low': 403.1, 'close': 403.7, 'trades': 2076, 'volume': 1650984, 'vwap': 403.86, 'lastSize': 373, 'turnover': 66675182140, 'homeNotional': 19128.77561967304, 'foreignNotional': 7725183.356702046}, {'timestamp': datetime.datetime(2020, 8, 30, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.0, 'high': 405.5, 'low': 403.55, 'close': 404.15, 'trades': 2466, 'volume': 1506170, 'vwap': 404.28, 'lastSize': 11, 'turnover': 60890698030, 'homeNotional': 17476.505123184983, 'foreignNotional': 7065324.722137931}] 2020-08-30 10:00:20 INFO: prepare candles [CandleItem(low=403.25, high=405.1, open=403.7, close=404.05, color='GREEN'), CandleItem(low=403.1, high=404.75, open=404.15, close=403.7, color='RED'), CandleItem(low=403.55, high=405.5, open=405.0, close=404.15, color='RED')] 2020-08-30 10:00:20 INFO: last_candle=CandleItem(low=403.25, high=405.1, open=403.7, close=404.05, color='GREEN') 2020-08-30 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-08-30 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=403.25, high=405.1, open=403.7, close=404.05, color='GREEN') 2020-08-30 10:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=403.1, high=404.75, open=404.15, close=403.7, color='RED') 2020-08-30 10:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=403.55, high=405.5, open=405.0, close=404.15, color='RED') 2020-08-30 10:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=403.25, high=405.1, open=403.7, close=404.05, color='GREEN'), take_profit_factor=6.0, clearing_interval=3600) 2020-08-30 10:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=403.25, high=405.1, open=403.7, close=404.05, color='GREEN'), take_profit_factor=6.0, clearing_interval=3600) 2020-08-30 10:00:20 INFO: place order: start candle=CandleItem(low=403.25, high=405.1, open=403.7, close=404.05, color='GREEN') ticker='ETHUSD' price_offset=0.1 2020-08-30 10:00:20 INFO: place order: side_factor=-1 init_trigger_price=405.15000000000003 init_order_price=405.20000000000005 stop_price_offset=0.0 candle.size=1.8500000000000227 stop_price=403.25 take_price=416.3000000000002 2020-08-30 10:00:20 INFO: place order round: side_factor=-1 init_trigger_price=Decimal('405.15000000000003410605131648480892181396484375') init_order_price=Decimal('405.200000000000045474735088646411895751953125') stop_price_offset=0.0 candle.size=1.8500000000000227 stop_price=Decimal('403.25') take_price=Decimal('416.3000000000001818989403545856475830078125') 2020-08-30 10:00:20 INFO: place order: compute qty=1000 2020-08-30 10:00:20 INFO: place order: save order to db b52f983dcc5b4432aced70a190ee21cf; response=True 2020-08-30 10:00:21 INFO: process event {'orderID': '4ccf8dc9-55b6-5f3c-7f71-a9a4c4635fbb', 'clOrdID': 'b52f983dcc5b4432aced70a190ee21cf', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1000, 'price': 405.2, 'displayQty': None, 'stopPx': 405.15, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1000, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-08-30T07:00:21.003Z', 'timestamp': '2020-08-30T07:00:21.003Z'} 2020-08-30 10:00:21 INFO: skip event b52f983dcc5b4432aced70a190ee21cf New 2020-08-30 10:00:21 INFO: post order to exchange resp={'orderID': '4ccf8dc9-55b6-5f3c-7f71-a9a4c4635fbb', 'clOrdID': 'b52f983dcc5b4432aced70a190ee21cf', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1000, 'price': 405.2, 'displayQty': None, 'stopPx': 405.15, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1000, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 30, 7, 0, 21, 3000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 30, 7, 0, 21, 3000, tzinfo=tzutc())} 2020-08-30 10:00:21 INFO: place new init order {'qty': 1000, 'init_price': Decimal('405.15000000000003410605131648480892181396484375'), 'stop_price': Decimal('403.25'), 'take_price': Decimal('416.3000000000001818989403545856475830078125'), 'order_uid': 'b52f983dcc5b4432aced70a190ee21cf', 'response': {'orderID': '4ccf8dc9-55b6-5f3c-7f71-a9a4c4635fbb', 'clOrdID': 'b52f983dcc5b4432aced70a190ee21cf', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1000, 'price': 405.2, 'displayQty': None, 'stopPx': 405.15, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1000, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 30, 7, 0, 21, 3000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 30, 7, 0, 21, 3000, tzinfo=tzutc())}} 2020-08-30 10:00:21 INFO: init new order end 2020-08-30 10:00:21 INFO: 2020-08-30 10:00:21 INFO: 2020-08-30 10:00:21 INFO: 2020-08-30 10:00:21 INFO: 2020-08-30 10:02:00 INFO: 2020-08-30 10:02:00 INFO: 2020-08-30 10:02:00 INFO: 2020-08-30 10:02:00 INFO: 2020-08-30 10:02:00 INFO: clearing start 2020-08-30 10:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6b0006b-34f7-294d-d1a8-2df2352bfbcf', 'clOrdID': '9f1c1d5137724fc4ab786e932108c56d', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 884, 'price': None, 'displayQty': None, 'stopPx': 406.7, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 30, 3, 27, 48, 992000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 30, 3, 27, 48, 992000, tzinfo=tzutc())} 2020-08-30 10:02:00 INFO: skip by not found init order into storage 2020-08-30 10:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '0e4936cc-f8bf-6c86-90e1-7e55b911823c', 'clOrdID': '2654f931b649452cba3b4722232a7435', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 884, 'price': 391.9, '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': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 30, 3, 27, 49, 36000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 30, 3, 27, 49, 36000, tzinfo=tzutc())} 2020-08-30 10:02:00 INFO: skip by not found init order into storage 2020-08-30 10:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '4ccf8dc9-55b6-5f3c-7f71-a9a4c4635fbb', 'clOrdID': 'b52f983dcc5b4432aced70a190ee21cf', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1000, 'price': 405.2, 'displayQty': None, 'stopPx': 405.15, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1000, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 30, 7, 0, 21, 3000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 30, 7, 0, 21, 3000, tzinfo=tzutc())} 2020-08-30 10:02:00 INFO: order time=2020-08-30 07:00:21.003000+00:00; delta from now UTC=0:01:39.188269 time_delta.total_seconds()=99.188269; time_diff_offset='3600' 2020-08-30 10:02:00 INFO: skip by time diff 2020-08-30 07:00:21.003000+00:00 2020-08-30 10:02:00 INFO: clearing end 2020-08-30 10:02:00 INFO: 2020-08-30 10:02:00 INFO: 2020-08-30 10:02:00 INFO: 2020-08-30 10:02:00 INFO: 2020-08-30 10:17:52 INFO: process event {'orderID': '4ccf8dc9-55b6-5f3c-7f71-a9a4c4635fbb', 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 1000, 'avgPx': 405.15, 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'transactTime': '2020-08-30T07:17:52.280Z', 'timestamp': '2020-08-30T07:17:52.280Z', 'clOrdID': 'b52f983dcc5b4432aced70a190ee21cf', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-30 10:17:52 INFO: add new event={'uid': 'b52f983dcc5b4432aced70a190ee21cf', 'status': 'Filled'} 2020-08-30 10:17:52 INFO: 2020-08-30 10:17:52 INFO: 2020-08-30 10:17:52 INFO: 2020-08-30 10:17:52 INFO: 2020-08-30 10:17:52 INFO: process event start 2020-08-30 10:17:52 INFO: fetch new order event b52f983dcc5b4432aced70a190ee21cf 2020-08-30 10:17:52 INFO: fetch orders by event init={'stop': '403.25', 'take': '416.3000000000001818989403545856475830078125', 'qty': '1000', 'color': 'GREEN', 'ticker': 'ETHUSD', 'clearing_offset': '3600'} profit_pair=None 2020-08-30 10:17:52 INFO: process init order filled 2020-08-30 10:17:52 INFO: save profit orders to storage stop=9dbc69f450664f6a8381ab9f7c4cf0bc take=c20388ad38f24b9686db15558a3a222c 2020-08-30 10:17:52 INFO: place profit orders take_price=416.3000000000001818989403545856475830078125, stop_price=403.25, qty=1000, color=GREEN, ticker=ETHUSD 9dbc69f450664f6a8381ab9f7c4cf0bc c20388ad38f24b9686db15558a3a222c 2020-08-30 10:17:52 INFO: place stop order ETHUSD: qty=-1000, stop_price=403.25, stop_uid=9dbc69f450664f6a8381ab9f7c4cf0bc 2020-08-30 10:17:52 INFO: process event {'orderID': '6b4ce8ae-0b57-8074-6d4a-2a2bf827f295', 'clOrdID': '9dbc69f450664f6a8381ab9f7c4cf0bc', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1000, 'price': None, 'displayQty': None, 'stopPx': 403.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1000, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': '2020-08-30T07:17:52.432Z', 'timestamp': '2020-08-30T07:17:52.432Z'} 2020-08-30 10:17:52 INFO: skip event 9dbc69f450664f6a8381ab9f7c4cf0bc New 2020-08-30 10:17:52 INFO: exchange resp for stop order={'orderID': '6b4ce8ae-0b57-8074-6d4a-2a2bf827f295', 'clOrdID': '9dbc69f450664f6a8381ab9f7c4cf0bc', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1000, 'price': None, 'displayQty': None, 'stopPx': 403.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1000, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 30, 7, 17, 52, 432000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 30, 7, 17, 52, 432000, tzinfo=tzutc())} 2020-08-30 10:17:52 INFO: place limit order ETHUSD: qty=-1000, price=416.3000000000001818989403545856475830078125, take_uid=c20388ad38f24b9686db15558a3a222c 2020-08-30 10:17:52 INFO: process event {'orderID': 'd9f99b02-069d-649d-7ffa-7ccfd02ca432', 'clOrdID': 'c20388ad38f24b9686db15558a3a222c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1000, 'price': 416.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': 1000, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': '2020-08-30T07:17:52.473Z', 'timestamp': '2020-08-30T07:17:52.473Z'} 2020-08-30 10:17:52 INFO: skip event c20388ad38f24b9686db15558a3a222c New 2020-08-30 10:17:52 INFO: exchange resp for take profit order={'orderID': 'd9f99b02-069d-649d-7ffa-7ccfd02ca432', 'clOrdID': 'c20388ad38f24b9686db15558a3a222c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1000, 'price': 416.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': 1000, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 30, 7, 17, 52, 473000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 30, 7, 17, 52, 473000, tzinfo=tzutc())} 2020-08-30 10:17:52 INFO: place profit orders={'stop': {'response': {'orderID': '6b4ce8ae-0b57-8074-6d4a-2a2bf827f295', 'clOrdID': '9dbc69f450664f6a8381ab9f7c4cf0bc', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1000, 'price': None, 'displayQty': None, 'stopPx': 403.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1000, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 30, 7, 17, 52, 432000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 30, 7, 17, 52, 432000, tzinfo=tzutc())}, 'qty': Decimal('-1000'), 'uid': '9dbc69f450664f6a8381ab9f7c4cf0bc', 'price': Decimal('403.25')}, 'take': {'response': {'orderID': 'd9f99b02-069d-649d-7ffa-7ccfd02ca432', 'clOrdID': 'c20388ad38f24b9686db15558a3a222c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1000, 'price': 416.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': 1000, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 30, 7, 17, 52, 473000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 30, 7, 17, 52, 473000, tzinfo=tzutc())}, 'qty': Decimal('-1000'), 'uid': 'c20388ad38f24b9686db15558a3a222c', 'price': Decimal('416.3000000000001818989403545856475830078125')}} 2020-08-30 10:17:52 INFO: rm init order from db b52f983dcc5b4432aced70a190ee21cf 2020-08-30 10:17:52 INFO: end process event_processing_result='proceed init order' 2020-08-30 10:17:52 INFO: 2020-08-30 10:17:52 INFO: 2020-08-30 10:17:52 INFO: 2020-08-30 10:17:52 INFO: 2020-08-30 11:00:20 INFO: 2020-08-30 11:00:20 INFO: 2020-08-30 11:00:20 INFO: 2020-08-30 11:00:20 INFO: 2020-08-30 11:00:20 INFO: init new order start 2020-08-30 11:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 30, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 404.05, 'high': 406.0, 'low': 403.85, 'close': 405.5, 'trades': 1893, 'volume': 1188344, 'vwap': 405.13, 'lastSize': 100, 'turnover': 48142222950, 'homeNotional': 13774.312724068808, 'foreignNotional': 5580253.426384945}, {'timestamp': datetime.datetime(2020, 8, 30, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 403.7, 'high': 405.1, 'low': 403.25, 'close': 404.05, 'trades': 1992, 'volume': 1324156, 'vwap': 404.04, 'lastSize': 334, 'turnover': 53499887120, 'homeNotional': 15347.600640236327, 'foreignNotional': 6200896.367756288}, {'timestamp': datetime.datetime(2020, 8, 30, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 404.15, 'high': 404.75, 'low': 403.1, 'close': 403.7, 'trades': 2076, 'volume': 1650984, 'vwap': 403.86, 'lastSize': 373, 'turnover': 66675182140, 'homeNotional': 19128.77561967304, 'foreignNotional': 7725183.356702046}] 2020-08-30 11:00:20 INFO: prepare candles [CandleItem(low=403.85, high=406.0, open=404.05, close=405.5, color='GREEN'), CandleItem(low=403.25, high=405.1, open=403.7, close=404.05, color='GREEN'), CandleItem(low=403.1, high=404.75, open=404.15, close=403.7, color='RED')] 2020-08-30 11:00:20 INFO: skip by colors first_candle=CandleItem(low=403.1, high=404.75, open=404.15, close=403.7, color='RED') second_candle=CandleItem(low=403.25, high=405.1, open=403.7, close=404.05, color='GREEN') last_candle=CandleItem(low=403.85, high=406.0, open=404.05, close=405.5, color='GREEN') 2020-08-30 11:00:20 INFO: check need new order None 2020-08-30 11:00:20 INFO: init new order end 2020-08-30 11:00:20 INFO: 2020-08-30 11:00:20 INFO: 2020-08-30 11:00:20 INFO: 2020-08-30 11:00:20 INFO: 2020-08-30 11:02:00 INFO: 2020-08-30 11:02:00 INFO: 2020-08-30 11:02:00 INFO: 2020-08-30 11:02:00 INFO: 2020-08-30 11:02:00 INFO: clearing start 2020-08-30 11:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6b0006b-34f7-294d-d1a8-2df2352bfbcf', 'clOrdID': '9f1c1d5137724fc4ab786e932108c56d', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 884, 'price': None, 'displayQty': None, 'stopPx': 406.7, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 30, 3, 27, 48, 992000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 30, 3, 27, 48, 992000, tzinfo=tzutc())} 2020-08-30 11:02:00 INFO: skip by not found init order into storage 2020-08-30 11:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '0e4936cc-f8bf-6c86-90e1-7e55b911823c', 'clOrdID': '2654f931b649452cba3b4722232a7435', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 884, 'price': 391.9, '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': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 30, 3, 27, 49, 36000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 30, 3, 27, 49, 36000, tzinfo=tzutc())} 2020-08-30 11:02:00 INFO: skip by not found init order into storage 2020-08-30 11:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '6b4ce8ae-0b57-8074-6d4a-2a2bf827f295', 'clOrdID': '9dbc69f450664f6a8381ab9f7c4cf0bc', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1000, 'price': None, 'displayQty': None, 'stopPx': 403.25, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1000, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 30, 7, 17, 52, 432000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 30, 7, 17, 52, 432000, tzinfo=tzutc())} 2020-08-30 11:02:00 INFO: skip by not found init order into storage 2020-08-30 11:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd9f99b02-069d-649d-7ffa-7ccfd02ca432', 'clOrdID': 'c20388ad38f24b9686db15558a3a222c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1000, 'price': 416.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': 1000, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 30, 7, 17, 52, 473000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 30, 7, 17, 52, 473000, tzinfo=tzutc())} 2020-08-30 11:02:00 INFO: skip by not found init order into storage 2020-08-30 11:02:00 INFO: clearing end 2020-08-30 11:02:00 INFO: 2020-08-30 11:02:00 INFO: 2020-08-30 11:02:00 INFO: 2020-08-30 11:02:00 INFO: 2020-08-30 11:08:35 INFO: process event {'orderID': 'd6b0006b-34f7-294d-d1a8-2df2352bfbcf', 'price': 406.7, 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 884, 'avgPx': 406.7, 'text': 'Triggered: Order stop price reached\nStop order by trader.py', 'transactTime': '2020-08-30T08:08:35.138Z', 'timestamp': '2020-08-30T08:08:35.138Z', 'clOrdID': '9f1c1d5137724fc4ab786e932108c56d', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-30 11:08:35 INFO: add new event={'uid': '9f1c1d5137724fc4ab786e932108c56d', 'status': 'Filled'} 2020-08-30 11:08:35 INFO: 2020-08-30 11:08:35 INFO: 2020-08-30 11:08:35 INFO: 2020-08-30 11:08:35 INFO: 2020-08-30 11:08:35 INFO: process event start 2020-08-30 11:08:35 INFO: fetch new order event 9f1c1d5137724fc4ab786e932108c56d 2020-08-30 11:08:35 INFO: fetch orders by event init=None profit_pair=2654f931b649452cba3b4722232a7435 2020-08-30 11:08:35 INFO: process profit order filled 2020-08-30 11:08:35 INFO: process event {'orderID': '0e4936cc-f8bf-6c86-90e1-7e55b911823c', 'ordStatus': 'Canceled', 'workingIndicator': False, 'leavesQty': 0, 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'timestamp': '2020-08-30T08:08:35.303Z', 'clOrdID': '2654f931b649452cba3b4722232a7435', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-30 11:08:35 INFO: skip event 2654f931b649452cba3b4722232a7435 Canceled 2020-08-30 11:08:35 INFO: cancel order=2654f931b649452cba3b4722232a7435 [{'orderID': '0e4936cc-f8bf-6c86-90e1-7e55b911823c', 'clOrdID': '2654f931b649452cba3b4722232a7435', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 884, 'price': 391.9, '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, 8, 30, 3, 27, 49, 36000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 30, 8, 8, 35, 303000, tzinfo=tzutc())}] 2020-08-30 11:08:35 INFO: end process event_processing_result='proceed profit order' 2020-08-30 11:08:35 INFO: 2020-08-30 11:08:35 INFO: 2020-08-30 11:08:35 INFO: 2020-08-30 11:08:35 INFO: 2020-08-30 11:51:54 INFO: process event {'orderID': '6b4ce8ae-0b57-8074-6d4a-2a2bf827f295', 'price': 403.25, 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 1000, 'avgPx': 403.25, 'text': 'Triggered: Order stop price reached\nStop order by trader.py', 'transactTime': '2020-08-30T08:51:54.425Z', 'timestamp': '2020-08-30T08:51:54.425Z', 'clOrdID': '9dbc69f450664f6a8381ab9f7c4cf0bc', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-30 11:51:54 INFO: add new event={'uid': '9dbc69f450664f6a8381ab9f7c4cf0bc', 'status': 'Filled'} 2020-08-30 11:51:55 INFO: 2020-08-30 11:51:55 INFO: 2020-08-30 11:51:55 INFO: 2020-08-30 11:51:55 INFO: 2020-08-30 11:51:55 INFO: process event start 2020-08-30 11:51:55 INFO: fetch new order event 9dbc69f450664f6a8381ab9f7c4cf0bc 2020-08-30 11:51:55 INFO: fetch orders by event init=None profit_pair=c20388ad38f24b9686db15558a3a222c 2020-08-30 11:51:55 INFO: process profit order filled 2020-08-30 11:51:56 INFO: cancel order=c20388ad38f24b9686db15558a3a222c [{'orderID': 'd9f99b02-069d-649d-7ffa-7ccfd02ca432', 'clOrdID': 'c20388ad38f24b9686db15558a3a222c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1000, 'price': 416.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, 8, 30, 7, 17, 52, 473000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 30, 8, 51, 56, 167000, tzinfo=tzutc())}] 2020-08-30 11:51:56 INFO: end process event_processing_result='proceed profit order' 2020-08-30 11:51:56 INFO: 2020-08-30 11:51:56 INFO: 2020-08-30 11:51:56 INFO: 2020-08-30 11:51:56 INFO: 2020-08-30 11:51:56 INFO: process event {'orderID': 'd9f99b02-069d-649d-7ffa-7ccfd02ca432', 'ordStatus': 'Canceled', 'workingIndicator': False, 'leavesQty': 0, 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'timestamp': '2020-08-30T08:51:56.167Z', 'clOrdID': 'c20388ad38f24b9686db15558a3a222c', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-30 11:51:56 INFO: skip event c20388ad38f24b9686db15558a3a222c Canceled 2020-08-30 12:00:20 INFO: 2020-08-30 12:00:20 INFO: 2020-08-30 12:00:20 INFO: 2020-08-30 12:00:20 INFO: 2020-08-30 12:00:20 INFO: init new order start 2020-08-30 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 30, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.5, 'high': 406.7, 'low': 403.0, 'close': 403.25, 'trades': 3328, 'volume': 2126527, 'vwap': 405.12, 'lastSize': 200, 'turnover': 86149396775, 'homeNotional': 24643.61224047358, 'foreignNotional': 9983616.168581612}, {'timestamp': datetime.datetime(2020, 8, 30, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 404.05, 'high': 406.0, 'low': 403.85, 'close': 405.5, 'trades': 1893, 'volume': 1188344, 'vwap': 405.13, 'lastSize': 100, 'turnover': 48142222950, 'homeNotional': 13774.312724068808, 'foreignNotional': 5580253.426384945}, {'timestamp': datetime.datetime(2020, 8, 30, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 403.7, 'high': 405.1, 'low': 403.25, 'close': 404.05, 'trades': 1992, 'volume': 1324156, 'vwap': 404.04, 'lastSize': 334, 'turnover': 53499887120, 'homeNotional': 15347.600640236327, 'foreignNotional': 6200896.367756288}] 2020-08-30 12:00:20 INFO: prepare candles [CandleItem(low=403.0, high=406.7, open=405.5, close=403.25, color='RED'), CandleItem(low=403.85, high=406.0, open=404.05, close=405.5, color='GREEN'), CandleItem(low=403.25, high=405.1, open=403.7, close=404.05, color='GREEN')] 2020-08-30 12:00:20 INFO: last_candle=CandleItem(low=403.0, high=406.7, open=405.5, close=403.25, color='RED') 2020-08-30 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-08-30 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=403.0, high=406.7, open=405.5, close=403.25, color='RED') 2020-08-30 12:00:20 INFO: skip by CandleItem(low=403.0, high=406.7, open=405.5, close=403.25, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-30 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-08-30 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=403.0, high=406.7, open=405.5, close=403.25, color='RED') 2020-08-30 12:00:20 INFO: skip by CandleItem(low=403.0, high=406.7, open=405.5, close=403.25, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-30 12:00:20 INFO: not found applicable config for candle 2020-08-30 12:00:20 INFO: check need new order None 2020-08-30 12:00:20 INFO: init new order end 2020-08-30 12:00:20 INFO: 2020-08-30 12:00:20 INFO: 2020-08-30 12:00:20 INFO: 2020-08-30 12:00:20 INFO: 2020-08-30 12:02:00 INFO: 2020-08-30 12:02:00 INFO: 2020-08-30 12:02:00 INFO: 2020-08-30 12:02:00 INFO: 2020-08-30 12:02:00 INFO: clearing start 2020-08-30 12:02:00 INFO: clearing end 2020-08-30 12:02:00 INFO: 2020-08-30 12:02:00 INFO: 2020-08-30 12:02:00 INFO: 2020-08-30 12:02:00 INFO: 2020-08-30 13:00:20 INFO: 2020-08-30 13:00:20 INFO: 2020-08-30 13:00:20 INFO: 2020-08-30 13:00:20 INFO: 2020-08-30 13:00:20 INFO: init new order start 2020-08-30 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 30, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 403.25, 'high': 405.75, 'low': 402.9, 'close': 404.8, 'trades': 2045, 'volume': 791303, 'vwap': 404.28, 'lastSize': 68, 'turnover': 31990559585, 'homeNotional': 9162.514247078981, 'foreignNotional': 3704200.399912401}, {'timestamp': datetime.datetime(2020, 8, 30, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.5, 'high': 406.7, 'low': 403.0, 'close': 403.25, 'trades': 3328, 'volume': 2126527, 'vwap': 405.12, 'lastSize': 200, 'turnover': 86149396775, 'homeNotional': 24643.61224047358, 'foreignNotional': 9983616.168581612}, {'timestamp': datetime.datetime(2020, 8, 30, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 404.05, 'high': 406.0, 'low': 403.85, 'close': 405.5, 'trades': 1893, 'volume': 1188344, 'vwap': 405.13, 'lastSize': 100, 'turnover': 48142222950, 'homeNotional': 13774.312724068808, 'foreignNotional': 5580253.426384945}] 2020-08-30 13:00:20 INFO: prepare candles [CandleItem(low=402.9, high=405.75, open=403.25, close=404.8, color='GREEN'), CandleItem(low=403.0, high=406.7, open=405.5, close=403.25, color='RED'), CandleItem(low=403.85, high=406.0, open=404.05, close=405.5, color='GREEN')] 2020-08-30 13:00:20 INFO: skip by colors first_candle=CandleItem(low=403.85, high=406.0, open=404.05, close=405.5, color='GREEN') second_candle=CandleItem(low=403.0, high=406.7, open=405.5, close=403.25, color='RED') last_candle=CandleItem(low=402.9, high=405.75, open=403.25, close=404.8, color='GREEN') 2020-08-30 13:00:20 INFO: check need new order None 2020-08-30 13:00:20 INFO: init new order end 2020-08-30 13:00:20 INFO: 2020-08-30 13:00:20 INFO: 2020-08-30 13:00:20 INFO: 2020-08-30 13:00:20 INFO: 2020-08-30 13:02:00 INFO: 2020-08-30 13:02:00 INFO: 2020-08-30 13:02:00 INFO: 2020-08-30 13:02:00 INFO: 2020-08-30 13:02:00 INFO: clearing start 2020-08-30 13:02:00 INFO: clearing end 2020-08-30 13:02:00 INFO: 2020-08-30 13:02:00 INFO: 2020-08-30 13:02:00 INFO: 2020-08-30 13:02:00 INFO: 2020-08-30 14:00:20 INFO: 2020-08-30 14:00:20 INFO: 2020-08-30 14:00:20 INFO: 2020-08-30 14:00:20 INFO: 2020-08-30 14:00:20 INFO: init new order start 2020-08-30 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 30, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 404.8, 'high': 404.9, 'low': 403.15, 'close': 403.65, 'trades': 1756, 'volume': 783878, 'vwap': 403.98, 'lastSize': 1, 'turnover': 31666374490, 'homeNotional': 9071.00042243858, 'foreignNotional': 3664419.7232042444}, {'timestamp': datetime.datetime(2020, 8, 30, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 403.25, 'high': 405.75, 'low': 402.9, 'close': 404.8, 'trades': 2045, 'volume': 791303, 'vwap': 404.28, 'lastSize': 68, 'turnover': 31990559585, 'homeNotional': 9162.514247078981, 'foreignNotional': 3704200.399912401}, {'timestamp': datetime.datetime(2020, 8, 30, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.5, 'high': 406.7, 'low': 403.0, 'close': 403.25, 'trades': 3328, 'volume': 2126527, 'vwap': 405.12, 'lastSize': 200, 'turnover': 86149396775, 'homeNotional': 24643.61224047358, 'foreignNotional': 9983616.168581612}] 2020-08-30 14:00:20 INFO: prepare candles [CandleItem(low=403.15, high=404.9, open=404.8, close=403.65, color='RED'), CandleItem(low=402.9, high=405.75, open=403.25, close=404.8, color='GREEN'), CandleItem(low=403.0, high=406.7, open=405.5, close=403.25, color='RED')] 2020-08-30 14:00:20 INFO: skip by colors first_candle=CandleItem(low=403.0, high=406.7, open=405.5, close=403.25, color='RED') second_candle=CandleItem(low=402.9, high=405.75, open=403.25, close=404.8, color='GREEN') last_candle=CandleItem(low=403.15, high=404.9, open=404.8, close=403.65, color='RED') 2020-08-30 14:00:20 INFO: check need new order None 2020-08-30 14:00:20 INFO: init new order end 2020-08-30 14:00:20 INFO: 2020-08-30 14:00:20 INFO: 2020-08-30 14:00:20 INFO: 2020-08-30 14:00:20 INFO: 2020-08-30 14:02:00 INFO: 2020-08-30 14:02:00 INFO: 2020-08-30 14:02:00 INFO: 2020-08-30 14:02:00 INFO: 2020-08-30 14:02:00 INFO: clearing start 2020-08-30 14:02:00 INFO: clearing end 2020-08-30 14:02:00 INFO: 2020-08-30 14:02:00 INFO: 2020-08-30 14:02:00 INFO: 2020-08-30 14:02:00 INFO: 2020-08-30 15:00:20 INFO: 2020-08-30 15:00:20 INFO: 2020-08-30 15:00:20 INFO: 2020-08-30 15:00:20 INFO: 2020-08-30 15:00:20 INFO: init new order start 2020-08-30 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 30, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 403.65, 'high': 407.95, 'low': 403.2, 'close': 407.2, 'trades': 3632, 'volume': 2765275, 'vwap': 406.1, 'lastSize': 374, 'turnover': 112297460700, 'homeNotional': 32056.00578500059, 'foreignNotional': 13017934.165669315}, {'timestamp': datetime.datetime(2020, 8, 30, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 404.8, 'high': 404.9, 'low': 403.15, 'close': 403.65, 'trades': 1756, 'volume': 783878, 'vwap': 403.98, 'lastSize': 1, 'turnover': 31666374490, 'homeNotional': 9071.00042243858, 'foreignNotional': 3664419.7232042444}, {'timestamp': datetime.datetime(2020, 8, 30, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 403.25, 'high': 405.75, 'low': 402.9, 'close': 404.8, 'trades': 2045, 'volume': 791303, 'vwap': 404.28, 'lastSize': 68, 'turnover': 31990559585, 'homeNotional': 9162.514247078981, 'foreignNotional': 3704200.399912401}] 2020-08-30 15:00:20 INFO: prepare candles [CandleItem(low=403.2, high=407.95, open=403.65, close=407.2, color='GREEN'), CandleItem(low=403.15, high=404.9, open=404.8, close=403.65, color='RED'), CandleItem(low=402.9, high=405.75, open=403.25, close=404.8, color='GREEN')] 2020-08-30 15:00:20 INFO: skip by colors first_candle=CandleItem(low=402.9, high=405.75, open=403.25, close=404.8, color='GREEN') second_candle=CandleItem(low=403.15, high=404.9, open=404.8, close=403.65, color='RED') last_candle=CandleItem(low=403.2, high=407.95, open=403.65, close=407.2, color='GREEN') 2020-08-30 15:00:20 INFO: check need new order None 2020-08-30 15:00:20 INFO: init new order end 2020-08-30 15:00:20 INFO: 2020-08-30 15:00:20 INFO: 2020-08-30 15:00:20 INFO: 2020-08-30 15:00:20 INFO: 2020-08-30 15:02:00 INFO: 2020-08-30 15:02:00 INFO: 2020-08-30 15:02:00 INFO: 2020-08-30 15:02:00 INFO: 2020-08-30 15:02:00 INFO: clearing start 2020-08-30 15:02:00 INFO: clearing end 2020-08-30 15:02:00 INFO: 2020-08-30 15:02:00 INFO: 2020-08-30 15:02:00 INFO: 2020-08-30 15:02:00 INFO: 2020-08-30 16:00:20 INFO: 2020-08-30 16:00:20 INFO: 2020-08-30 16:00:20 INFO: 2020-08-30 16:00:20 INFO: 2020-08-30 16:00:20 INFO: init new order start 2020-08-30 16:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 30, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 407.2, 'high': 409.0, 'low': 405.35, 'close': 407.65, 'trades': 5460, 'volume': 4024500, 'vwap': 407.54, 'lastSize': 10, 'turnover': 164014237950, 'homeNotional': 46672.556320987394, 'foreignNotional': 19020957.10527016}, {'timestamp': datetime.datetime(2020, 8, 30, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 403.65, 'high': 407.95, 'low': 403.2, 'close': 407.2, 'trades': 3632, 'volume': 2765275, 'vwap': 406.1, 'lastSize': 374, 'turnover': 112297460700, 'homeNotional': 32056.00578500059, 'foreignNotional': 13017934.165669315}, {'timestamp': datetime.datetime(2020, 8, 30, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 404.8, 'high': 404.9, 'low': 403.15, 'close': 403.65, 'trades': 1756, 'volume': 783878, 'vwap': 403.98, 'lastSize': 1, 'turnover': 31666374490, 'homeNotional': 9071.00042243858, 'foreignNotional': 3664419.7232042444}] 2020-08-30 16:00:21 INFO: prepare candles [CandleItem(low=405.35, high=409.0, open=407.2, close=407.65, color='GREEN'), CandleItem(low=403.2, high=407.95, open=403.65, close=407.2, color='GREEN'), CandleItem(low=403.15, high=404.9, open=404.8, close=403.65, color='RED')] 2020-08-30 16:00:21 INFO: skip by colors first_candle=CandleItem(low=403.15, high=404.9, open=404.8, close=403.65, color='RED') second_candle=CandleItem(low=403.2, high=407.95, open=403.65, close=407.2, color='GREEN') last_candle=CandleItem(low=405.35, high=409.0, open=407.2, close=407.65, color='GREEN') 2020-08-30 16:00:21 INFO: check need new order None 2020-08-30 16:00:21 INFO: init new order end 2020-08-30 16:00:21 INFO: 2020-08-30 16:00:21 INFO: 2020-08-30 16:00:21 INFO: 2020-08-30 16:00:21 INFO: 2020-08-30 16:02:00 INFO: 2020-08-30 16:02:00 INFO: 2020-08-30 16:02:00 INFO: 2020-08-30 16:02:00 INFO: 2020-08-30 16:02:00 INFO: clearing start 2020-08-30 16:02:00 INFO: clearing end 2020-08-30 16:02:00 INFO: 2020-08-30 16:02:00 INFO: 2020-08-30 16:02:00 INFO: 2020-08-30 16:02:00 INFO: 2020-08-30 17:00:20 INFO: 2020-08-30 17:00:20 INFO: 2020-08-30 17:00:20 INFO: 2020-08-30 17:00:20 INFO: 2020-08-30 17:00:20 INFO: init new order start 2020-08-30 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 30, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 407.65, 'high': 415.25, 'low': 407.6, 'close': 414.0, 'trades': 9675, 'volume': 8141377, 'vwap': 412.3, 'lastSize': 612, 'turnover': 335663674330, 'homeNotional': 94640.64584616106, 'foreignNotional': 39019814.4342899}, {'timestamp': datetime.datetime(2020, 8, 30, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 407.2, 'high': 409.0, 'low': 405.35, 'close': 407.65, 'trades': 5460, 'volume': 4024500, 'vwap': 407.54, 'lastSize': 10, 'turnover': 164014237950, 'homeNotional': 46672.556320987394, 'foreignNotional': 19020957.10527016}, {'timestamp': datetime.datetime(2020, 8, 30, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 403.65, 'high': 407.95, 'low': 403.2, 'close': 407.2, 'trades': 3632, 'volume': 2765275, 'vwap': 406.1, 'lastSize': 374, 'turnover': 112297460700, 'homeNotional': 32056.00578500059, 'foreignNotional': 13017934.165669315}] 2020-08-30 17:00:20 INFO: prepare candles [CandleItem(low=407.6, high=415.25, open=407.65, close=414.0, color='GREEN'), CandleItem(low=405.35, high=409.0, open=407.2, close=407.65, color='GREEN'), CandleItem(low=403.2, high=407.95, open=403.65, close=407.2, color='GREEN')] 2020-08-30 17:00:20 INFO: skip by colors first_candle=CandleItem(low=403.2, high=407.95, open=403.65, close=407.2, color='GREEN') second_candle=CandleItem(low=405.35, high=409.0, open=407.2, close=407.65, color='GREEN') last_candle=CandleItem(low=407.6, high=415.25, open=407.65, close=414.0, color='GREEN') 2020-08-30 17:00:20 INFO: check need new order None 2020-08-30 17:00:20 INFO: init new order end 2020-08-30 17:00:20 INFO: 2020-08-30 17:00:20 INFO: 2020-08-30 17:00:20 INFO: 2020-08-30 17:00:20 INFO: 2020-08-30 17:02:00 INFO: 2020-08-30 17:02:00 INFO: 2020-08-30 17:02:00 INFO: 2020-08-30 17:02:00 INFO: 2020-08-30 17:02:00 INFO: clearing start 2020-08-30 17:02:00 INFO: clearing end 2020-08-30 17:02:00 INFO: 2020-08-30 17:02:00 INFO: 2020-08-30 17:02:00 INFO: 2020-08-30 17:02:00 INFO: 2020-08-30 18:00:20 INFO: 2020-08-30 18:00:20 INFO: 2020-08-30 18:00:20 INFO: 2020-08-30 18:00:20 INFO: 2020-08-30 18:00:20 INFO: init new order start 2020-08-30 18:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 30, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 414.0, 'high': 416.0, 'low': 412.3, 'close': 414.9, 'trades': 4880, 'volume': 4295902, 'vwap': 414.09, 'lastSize': 27, 'turnover': 177885942055, 'homeNotional': 49913.995108781186, 'foreignNotional': 20668555.273005173}, {'timestamp': datetime.datetime(2020, 8, 30, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 407.65, 'high': 415.25, 'low': 407.6, 'close': 414.0, 'trades': 9675, 'volume': 8141377, 'vwap': 412.3, 'lastSize': 612, 'turnover': 335663674330, 'homeNotional': 94640.64584616106, 'foreignNotional': 39019814.4342899}, {'timestamp': datetime.datetime(2020, 8, 30, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 407.2, 'high': 409.0, 'low': 405.35, 'close': 407.65, 'trades': 5460, 'volume': 4024500, 'vwap': 407.54, 'lastSize': 10, 'turnover': 164014237950, 'homeNotional': 46672.556320987394, 'foreignNotional': 19020957.10527016}] 2020-08-30 18:00:20 INFO: prepare candles [CandleItem(low=412.3, high=416.0, open=414.0, close=414.9, color='GREEN'), CandleItem(low=407.6, high=415.25, open=407.65, close=414.0, color='GREEN'), CandleItem(low=405.35, high=409.0, open=407.2, close=407.65, color='GREEN')] 2020-08-30 18:00:20 INFO: skip by colors first_candle=CandleItem(low=405.35, high=409.0, open=407.2, close=407.65, color='GREEN') second_candle=CandleItem(low=407.6, high=415.25, open=407.65, close=414.0, color='GREEN') last_candle=CandleItem(low=412.3, high=416.0, open=414.0, close=414.9, color='GREEN') 2020-08-30 18:00:20 INFO: check need new order None 2020-08-30 18:00:20 INFO: init new order end 2020-08-30 18:00:20 INFO: 2020-08-30 18:00:20 INFO: 2020-08-30 18:00:20 INFO: 2020-08-30 18:00:20 INFO: 2020-08-30 18:02:00 INFO: 2020-08-30 18:02:00 INFO: 2020-08-30 18:02:00 INFO: 2020-08-30 18:02:00 INFO: 2020-08-30 18:02:00 INFO: clearing start 2020-08-30 18:02:00 INFO: clearing end 2020-08-30 18:02:00 INFO: 2020-08-30 18:02:00 INFO: 2020-08-30 18:02:00 INFO: 2020-08-30 18:02:00 INFO: 2020-08-30 19:00:20 INFO: 2020-08-30 19:00:20 INFO: 2020-08-30 19:00:20 INFO: 2020-08-30 19:00:20 INFO: 2020-08-30 19:00:20 INFO: init new order start 2020-08-30 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 30, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 414.9, 'high': 418.8, 'low': 414.3, 'close': 417.0, 'trades': 7853, 'volume': 6511887, 'vwap': 416.56, 'lastSize': 3694, 'turnover': 271253456625, 'homeNotional': 75708.32029089649, 'foreignNotional': 31536461.77937004}, {'timestamp': datetime.datetime(2020, 8, 30, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 414.0, 'high': 416.0, 'low': 412.3, 'close': 414.9, 'trades': 4880, 'volume': 4295902, 'vwap': 414.09, 'lastSize': 27, 'turnover': 177885942055, 'homeNotional': 49913.995108781186, 'foreignNotional': 20668555.273005173}, {'timestamp': datetime.datetime(2020, 8, 30, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 407.65, 'high': 415.25, 'low': 407.6, 'close': 414.0, 'trades': 9675, 'volume': 8141377, 'vwap': 412.3, 'lastSize': 612, 'turnover': 335663674330, 'homeNotional': 94640.64584616106, 'foreignNotional': 39019814.4342899}] 2020-08-30 19:00:20 INFO: prepare candles [CandleItem(low=414.3, high=418.8, open=414.9, close=417.0, color='GREEN'), CandleItem(low=412.3, high=416.0, open=414.0, close=414.9, color='GREEN'), CandleItem(low=407.6, high=415.25, open=407.65, close=414.0, color='GREEN')] 2020-08-30 19:00:20 INFO: skip by colors first_candle=CandleItem(low=407.6, high=415.25, open=407.65, close=414.0, color='GREEN') second_candle=CandleItem(low=412.3, high=416.0, open=414.0, close=414.9, color='GREEN') last_candle=CandleItem(low=414.3, high=418.8, open=414.9, close=417.0, color='GREEN') 2020-08-30 19:00:20 INFO: check need new order None 2020-08-30 19:00:20 INFO: init new order end 2020-08-30 19:00:20 INFO: 2020-08-30 19:00:20 INFO: 2020-08-30 19:00:20 INFO: 2020-08-30 19:00:20 INFO: 2020-08-30 19:02:00 INFO: 2020-08-30 19:02:00 INFO: 2020-08-30 19:02:00 INFO: 2020-08-30 19:02:00 INFO: 2020-08-30 19:02:00 INFO: clearing start 2020-08-30 19:02:00 INFO: clearing end 2020-08-30 19:02:00 INFO: 2020-08-30 19:02:00 INFO: 2020-08-30 19:02:00 INFO: 2020-08-30 19:02:00 INFO: 2020-08-30 20:00:20 INFO: 2020-08-30 20:00:20 INFO: 2020-08-30 20:00:20 INFO: 2020-08-30 20:00:20 INFO: 2020-08-30 20:00:20 INFO: init new order start 2020-08-30 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 30, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 417.0, 'high': 424.55, 'low': 415.65, 'close': 423.4, 'trades': 11004, 'volume': 7268176, 'vwap': 420.58, 'lastSize': 300, 'turnover': 305682384340, 'homeNotional': 84658.68869436665, 'foreignNotional': 35605808.41137967}, {'timestamp': datetime.datetime(2020, 8, 30, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 414.9, 'high': 418.8, 'low': 414.3, 'close': 417.0, 'trades': 7853, 'volume': 6511887, 'vwap': 416.56, 'lastSize': 3694, 'turnover': 271253456625, 'homeNotional': 75708.32029089649, 'foreignNotional': 31536461.77937004}, {'timestamp': datetime.datetime(2020, 8, 30, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 414.0, 'high': 416.0, 'low': 412.3, 'close': 414.9, 'trades': 4880, 'volume': 4295902, 'vwap': 414.09, 'lastSize': 27, 'turnover': 177885942055, 'homeNotional': 49913.995108781186, 'foreignNotional': 20668555.273005173}] 2020-08-30 20:00:20 INFO: prepare candles [CandleItem(low=415.65, high=424.55, open=417.0, close=423.4, color='GREEN'), CandleItem(low=414.3, high=418.8, open=414.9, close=417.0, color='GREEN'), CandleItem(low=412.3, high=416.0, open=414.0, close=414.9, color='GREEN')] 2020-08-30 20:00:20 INFO: skip by colors first_candle=CandleItem(low=412.3, high=416.0, open=414.0, close=414.9, color='GREEN') second_candle=CandleItem(low=414.3, high=418.8, open=414.9, close=417.0, color='GREEN') last_candle=CandleItem(low=415.65, high=424.55, open=417.0, close=423.4, color='GREEN') 2020-08-30 20:00:20 INFO: check need new order None 2020-08-30 20:00:20 INFO: init new order end 2020-08-30 20:00:20 INFO: 2020-08-30 20:00:20 INFO: 2020-08-30 20:00:20 INFO: 2020-08-30 20:00:20 INFO: 2020-08-30 20:02:00 INFO: 2020-08-30 20:02:00 INFO: 2020-08-30 20:02:00 INFO: 2020-08-30 20:02:00 INFO: 2020-08-30 20:02:00 INFO: clearing start 2020-08-30 20:02:00 INFO: clearing end 2020-08-30 20:02:00 INFO: 2020-08-30 20:02:00 INFO: 2020-08-30 20:02:00 INFO: 2020-08-30 20:02:00 INFO: 2020-08-30 21:00:20 INFO: 2020-08-30 21:00:20 INFO: 2020-08-30 21:00:20 INFO: 2020-08-30 21:00:20 INFO: 2020-08-30 21:00:20 INFO: init new order start 2020-08-30 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 30, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 423.4, 'high': 425.6, 'low': 422.65, 'close': 424.2, 'trades': 6800, 'volume': 5201621, 'vwap': 424.18, 'lastSize': 500, 'turnover': 220638194670, 'homeNotional': 60609.38813398179, 'foreignNotional': 25708820.612669032}, {'timestamp': datetime.datetime(2020, 8, 30, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 417.0, 'high': 424.55, 'low': 415.65, 'close': 423.4, 'trades': 11004, 'volume': 7268176, 'vwap': 420.58, 'lastSize': 300, 'turnover': 305682384340, 'homeNotional': 84658.68869436665, 'foreignNotional': 35605808.41137967}, {'timestamp': datetime.datetime(2020, 8, 30, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 414.9, 'high': 418.8, 'low': 414.3, 'close': 417.0, 'trades': 7853, 'volume': 6511887, 'vwap': 416.56, 'lastSize': 3694, 'turnover': 271253456625, 'homeNotional': 75708.32029089649, 'foreignNotional': 31536461.77937004}] 2020-08-30 21:00:20 INFO: prepare candles [CandleItem(low=422.65, high=425.6, open=423.4, close=424.2, color='GREEN'), CandleItem(low=415.65, high=424.55, open=417.0, close=423.4, color='GREEN'), CandleItem(low=414.3, high=418.8, open=414.9, close=417.0, color='GREEN')] 2020-08-30 21:00:20 INFO: skip by colors first_candle=CandleItem(low=414.3, high=418.8, open=414.9, close=417.0, color='GREEN') second_candle=CandleItem(low=415.65, high=424.55, open=417.0, close=423.4, color='GREEN') last_candle=CandleItem(low=422.65, high=425.6, open=423.4, close=424.2, color='GREEN') 2020-08-30 21:00:20 INFO: check need new order None 2020-08-30 21:00:20 INFO: init new order end 2020-08-30 21:00:20 INFO: 2020-08-30 21:00:20 INFO: 2020-08-30 21:00:20 INFO: 2020-08-30 21:00:20 INFO: 2020-08-30 21:02:00 INFO: 2020-08-30 21:02:00 INFO: 2020-08-30 21:02:00 INFO: 2020-08-30 21:02:00 INFO: 2020-08-30 21:02:00 INFO: clearing start 2020-08-30 21:02:00 INFO: clearing end 2020-08-30 21:02:00 INFO: 2020-08-30 21:02:00 INFO: 2020-08-30 21:02:00 INFO: 2020-08-30 21:02:00 INFO: 2020-08-30 22:00:20 INFO: 2020-08-30 22:00:20 INFO: 2020-08-30 22:00:20 INFO: 2020-08-30 22:00:20 INFO: 2020-08-30 22:00:20 INFO: init new order start 2020-08-30 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 30, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 424.2, 'high': 427.0, 'low': 423.1, 'close': 427.0, 'trades': 3809, 'volume': 2618631, 'vwap': 424.56, 'lastSize': 300, 'turnover': 111175220570, 'homeNotional': 30491.424697808852, 'foreignNotional': 12945285.475590525}, {'timestamp': datetime.datetime(2020, 8, 30, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 423.4, 'high': 425.6, 'low': 422.65, 'close': 424.2, 'trades': 6800, 'volume': 5201621, 'vwap': 424.18, 'lastSize': 500, 'turnover': 220638194670, 'homeNotional': 60609.38813398179, 'foreignNotional': 25708820.612669032}, {'timestamp': datetime.datetime(2020, 8, 30, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 417.0, 'high': 424.55, 'low': 415.65, 'close': 423.4, 'trades': 11004, 'volume': 7268176, 'vwap': 420.58, 'lastSize': 300, 'turnover': 305682384340, 'homeNotional': 84658.68869436665, 'foreignNotional': 35605808.41137967}] 2020-08-30 22:00:20 INFO: prepare candles [CandleItem(low=423.1, high=427.0, open=424.2, close=427.0, color='GREEN'), CandleItem(low=422.65, high=425.6, open=423.4, close=424.2, color='GREEN'), CandleItem(low=415.65, high=424.55, open=417.0, close=423.4, color='GREEN')] 2020-08-30 22:00:20 INFO: skip by colors first_candle=CandleItem(low=415.65, high=424.55, open=417.0, close=423.4, color='GREEN') second_candle=CandleItem(low=422.65, high=425.6, open=423.4, close=424.2, color='GREEN') last_candle=CandleItem(low=423.1, high=427.0, open=424.2, close=427.0, color='GREEN') 2020-08-30 22:00:20 INFO: check need new order None 2020-08-30 22:00:20 INFO: init new order end 2020-08-30 22:00:20 INFO: 2020-08-30 22:00:20 INFO: 2020-08-30 22:00:20 INFO: 2020-08-30 22:00:20 INFO: 2020-08-30 22:02:00 INFO: 2020-08-30 22:02:00 INFO: 2020-08-30 22:02:00 INFO: 2020-08-30 22:02:00 INFO: 2020-08-30 22:02:00 INFO: clearing start 2020-08-30 22:02:00 INFO: clearing end 2020-08-30 22:02:00 INFO: 2020-08-30 22:02:00 INFO: 2020-08-30 22:02:00 INFO: 2020-08-30 22:02:00 INFO: 2020-08-30 23:00:20 INFO: 2020-08-30 23:00:20 INFO: 2020-08-30 23:00:20 INFO: 2020-08-30 23:00:20 INFO: 2020-08-30 23:00:20 INFO: init new order start 2020-08-30 23:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 30, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 427.0, 'high': 428.3, 'low': 425.55, 'close': 425.55, 'trades': 5074, 'volume': 4387616, 'vwap': 426.67, 'lastSize': 12, 'turnover': 187203002825, 'homeNotional': 51108.002896271595, 'foreignNotional': 21805865.245676953}, {'timestamp': datetime.datetime(2020, 8, 30, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 424.2, 'high': 427.0, 'low': 423.1, 'close': 427.0, 'trades': 3809, 'volume': 2618631, 'vwap': 424.56, 'lastSize': 300, 'turnover': 111175220570, 'homeNotional': 30491.424697808852, 'foreignNotional': 12945285.475590525}, {'timestamp': datetime.datetime(2020, 8, 30, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 423.4, 'high': 425.6, 'low': 422.65, 'close': 424.2, 'trades': 6800, 'volume': 5201621, 'vwap': 424.18, 'lastSize': 500, 'turnover': 220638194670, 'homeNotional': 60609.38813398179, 'foreignNotional': 25708820.612669032}] 2020-08-30 23:00:20 INFO: prepare candles [CandleItem(low=425.55, high=428.3, open=427.0, close=425.55, color='RED'), CandleItem(low=423.1, high=427.0, open=424.2, close=427.0, color='GREEN'), CandleItem(low=422.65, high=425.6, open=423.4, close=424.2, color='GREEN')] 2020-08-30 23:00:20 INFO: last_candle=CandleItem(low=425.55, high=428.3, open=427.0, close=425.55, color='RED') 2020-08-30 23: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-08-30 23: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=425.55, high=428.3, open=427.0, close=425.55, color='RED') 2020-08-30 23:00:20 INFO: skip by CandleItem(low=425.55, high=428.3, open=427.0, close=425.55, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-30 23: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-08-30 23: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=425.55, high=428.3, open=427.0, close=425.55, color='RED') 2020-08-30 23:00:20 INFO: skip by CandleItem(low=425.55, high=428.3, open=427.0, close=425.55, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-30 23:00:20 INFO: not found applicable config for candle 2020-08-30 23:00:20 INFO: check need new order None 2020-08-30 23:00:20 INFO: init new order end 2020-08-30 23:00:20 INFO: 2020-08-30 23:00:20 INFO: 2020-08-30 23:00:20 INFO: 2020-08-30 23:00:20 INFO: 2020-08-30 23:02:00 INFO: 2020-08-30 23:02:00 INFO: 2020-08-30 23:02:00 INFO: 2020-08-30 23:02:00 INFO: 2020-08-30 23:02:00 INFO: clearing start 2020-08-30 23:02:00 INFO: clearing end 2020-08-30 23:02:00 INFO: 2020-08-30 23:02:00 INFO: 2020-08-30 23:02:00 INFO: 2020-08-30 23:02:00 INFO: 2020-08-31 00:00:20 INFO: 2020-08-31 00:00:20 INFO: 2020-08-31 00:00:20 INFO: 2020-08-31 00:00:20 INFO: 2020-08-31 00:00:20 INFO: init new order start 2020-08-31 00:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 30, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 425.55, 'high': 426.7, 'low': 421.45, 'close': 423.6, 'trades': 6672, 'volume': 5014540, 'vwap': 423.38, 'lastSize': 11, 'turnover': 212303778545, 'homeNotional': 58381.44590213119, 'foreignNotional': 24717373.180919174}, {'timestamp': datetime.datetime(2020, 8, 30, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 427.0, 'high': 428.3, 'low': 425.55, 'close': 425.55, 'trades': 5074, 'volume': 4387616, 'vwap': 426.67, 'lastSize': 12, 'turnover': 187203002825, 'homeNotional': 51108.002896271595, 'foreignNotional': 21805865.245676953}, {'timestamp': datetime.datetime(2020, 8, 30, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 424.2, 'high': 427.0, 'low': 423.1, 'close': 427.0, 'trades': 3809, 'volume': 2618631, 'vwap': 424.56, 'lastSize': 300, 'turnover': 111175220570, 'homeNotional': 30491.424697808852, 'foreignNotional': 12945285.475590525}] 2020-08-31 00:00:21 INFO: prepare candles [CandleItem(low=421.45, high=426.7, open=425.55, close=423.6, color='RED'), CandleItem(low=425.55, high=428.3, open=427.0, close=425.55, color='RED'), CandleItem(low=423.1, high=427.0, open=424.2, close=427.0, color='GREEN')] 2020-08-31 00:00:21 INFO: skip by colors first_candle=CandleItem(low=423.1, high=427.0, open=424.2, close=427.0, color='GREEN') second_candle=CandleItem(low=425.55, high=428.3, open=427.0, close=425.55, color='RED') last_candle=CandleItem(low=421.45, high=426.7, open=425.55, close=423.6, color='RED') 2020-08-31 00:00:21 INFO: check need new order None 2020-08-31 00:00:21 INFO: init new order end 2020-08-31 00:00:21 INFO: 2020-08-31 00:00:21 INFO: 2020-08-31 00:00:21 INFO: 2020-08-31 00:00:21 INFO: 2020-08-31 00:02:00 INFO: 2020-08-31 00:02:00 INFO: 2020-08-31 00:02:00 INFO: 2020-08-31 00:02:00 INFO: 2020-08-31 00:02:00 INFO: clearing start 2020-08-31 00:02:00 INFO: clearing end 2020-08-31 00:02:00 INFO: 2020-08-31 00:02:00 INFO: 2020-08-31 00:02:00 INFO: 2020-08-31 00:02:00 INFO: 2020-08-31 01:00:20 INFO: 2020-08-31 01:00:20 INFO: 2020-08-31 01:00:20 INFO: 2020-08-31 01:00:20 INFO: 2020-08-31 01:00:20 INFO: init new order start 2020-08-31 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 30, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 423.6, 'high': 425.0, 'low': 421.05, 'close': 422.2, 'trades': 3575, 'volume': 2125576, 'vwap': 423.38, 'lastSize': 100, 'turnover': 89991588380, 'homeNotional': 24705.831225537255, 'foreignNotional': 10459862.61184637}, {'timestamp': datetime.datetime(2020, 8, 30, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 425.55, 'high': 426.7, 'low': 421.45, 'close': 423.6, 'trades': 6672, 'volume': 5014540, 'vwap': 423.38, 'lastSize': 11, 'turnover': 212303778545, 'homeNotional': 58381.44590213119, 'foreignNotional': 24717373.180919174}, {'timestamp': datetime.datetime(2020, 8, 30, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 427.0, 'high': 428.3, 'low': 425.55, 'close': 425.55, 'trades': 5074, 'volume': 4387616, 'vwap': 426.67, 'lastSize': 12, 'turnover': 187203002825, 'homeNotional': 51108.002896271595, 'foreignNotional': 21805865.245676953}] 2020-08-31 01:00:20 INFO: prepare candles [CandleItem(low=421.05, high=425.0, open=423.6, close=422.2, color='RED'), CandleItem(low=421.45, high=426.7, open=425.55, close=423.6, color='RED'), CandleItem(low=425.55, high=428.3, open=427.0, close=425.55, color='RED')] 2020-08-31 01:00:20 INFO: skip by colors first_candle=CandleItem(low=425.55, high=428.3, open=427.0, close=425.55, color='RED') second_candle=CandleItem(low=421.45, high=426.7, open=425.55, close=423.6, color='RED') last_candle=CandleItem(low=421.05, high=425.0, open=423.6, close=422.2, color='RED') 2020-08-31 01:00:20 INFO: check need new order None 2020-08-31 01:00:20 INFO: init new order end 2020-08-31 01:00:20 INFO: 2020-08-31 01:00:20 INFO: 2020-08-31 01:00:20 INFO: 2020-08-31 01:00:20 INFO: 2020-08-31 01:02:00 INFO: 2020-08-31 01:02:00 INFO: 2020-08-31 01:02:00 INFO: 2020-08-31 01:02:00 INFO: 2020-08-31 01:02:00 INFO: clearing start 2020-08-31 01:02:00 INFO: clearing end 2020-08-31 01:02:00 INFO: 2020-08-31 01:02:00 INFO: 2020-08-31 01:02:00 INFO: 2020-08-31 01:02:00 INFO: 2020-08-31 02:00:20 INFO: 2020-08-31 02:00:20 INFO: 2020-08-31 02:00:20 INFO: 2020-08-31 02:00:20 INFO: 2020-08-31 02:00:20 INFO: init new order start 2020-08-31 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 30, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 422.2, 'high': 424.75, 'low': 421.75, 'close': 424.55, 'trades': 2806, 'volume': 1967046, 'vwap': 423.5, 'lastSize': 2, 'turnover': 83303259400, 'homeNotional': 22876.305707436597, 'foreignNotional': 9688009.087504668}, {'timestamp': datetime.datetime(2020, 8, 30, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 423.6, 'high': 425.0, 'low': 421.05, 'close': 422.2, 'trades': 3575, 'volume': 2125576, 'vwap': 423.38, 'lastSize': 100, 'turnover': 89991588380, 'homeNotional': 24705.831225537255, 'foreignNotional': 10459862.61184637}, {'timestamp': datetime.datetime(2020, 8, 30, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 425.55, 'high': 426.7, 'low': 421.45, 'close': 423.6, 'trades': 6672, 'volume': 5014540, 'vwap': 423.38, 'lastSize': 11, 'turnover': 212303778545, 'homeNotional': 58381.44590213119, 'foreignNotional': 24717373.180919174}] 2020-08-31 02:00:20 INFO: prepare candles [CandleItem(low=421.75, high=424.75, open=422.2, close=424.55, color='GREEN'), CandleItem(low=421.05, high=425.0, open=423.6, close=422.2, color='RED'), CandleItem(low=421.45, high=426.7, open=425.55, close=423.6, color='RED')] 2020-08-31 02:00:20 INFO: last_candle=CandleItem(low=421.75, high=424.75, open=422.2, close=424.55, color='GREEN') 2020-08-31 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-08-31 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=421.75, high=424.75, open=422.2, close=424.55, color='GREEN') 2020-08-31 02:00:20 INFO: skip by CandleItem(low=421.75, high=424.75, open=422.2, close=424.55, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-31 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-08-31 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=421.75, high=424.75, open=422.2, close=424.55, color='GREEN') 2020-08-31 02:00:20 INFO: skip by CandleItem(low=421.75, high=424.75, open=422.2, close=424.55, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-31 02:00:20 INFO: not found applicable config for candle 2020-08-31 02:00:20 INFO: check need new order None 2020-08-31 02:00:20 INFO: init new order end 2020-08-31 02:00:20 INFO: 2020-08-31 02:00:20 INFO: 2020-08-31 02:00:20 INFO: 2020-08-31 02:00:20 INFO: 2020-08-31 02:02:00 INFO: 2020-08-31 02:02:00 INFO: 2020-08-31 02:02:00 INFO: 2020-08-31 02:02:00 INFO: 2020-08-31 02:02:00 INFO: clearing start 2020-08-31 02:02:00 INFO: clearing end 2020-08-31 02:02:00 INFO: 2020-08-31 02:02:00 INFO: 2020-08-31 02:02:00 INFO: 2020-08-31 02:02:00 INFO: 2020-08-31 03:00:20 INFO: 2020-08-31 03:00:20 INFO: 2020-08-31 03:00:20 INFO: 2020-08-31 03:00:20 INFO: 2020-08-31 03:00:20 INFO: init new order start 2020-08-31 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 31, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 424.55, 'high': 430.55, 'low': 424.35, 'close': 429.5, 'trades': 7729, 'volume': 5200401, 'vwap': 428.47, 'lastSize': 100, 'turnover': 222820506100, 'homeNotional': 60813.99648960509, 'foreignNotional': 26056918.347469676}, {'timestamp': datetime.datetime(2020, 8, 30, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 422.2, 'high': 424.75, 'low': 421.75, 'close': 424.55, 'trades': 2806, 'volume': 1967046, 'vwap': 423.5, 'lastSize': 2, 'turnover': 83303259400, 'homeNotional': 22876.305707436597, 'foreignNotional': 9688009.087504668}, {'timestamp': datetime.datetime(2020, 8, 30, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 423.6, 'high': 425.0, 'low': 421.05, 'close': 422.2, 'trades': 3575, 'volume': 2125576, 'vwap': 423.38, 'lastSize': 100, 'turnover': 89991588380, 'homeNotional': 24705.831225537255, 'foreignNotional': 10459862.61184637}] 2020-08-31 03:00:20 INFO: prepare candles [CandleItem(low=424.35, high=430.55, open=424.55, close=429.5, color='GREEN'), CandleItem(low=421.75, high=424.75, open=422.2, close=424.55, color='GREEN'), CandleItem(low=421.05, high=425.0, open=423.6, close=422.2, color='RED')] 2020-08-31 03:00:20 INFO: skip by colors first_candle=CandleItem(low=421.05, high=425.0, open=423.6, close=422.2, color='RED') second_candle=CandleItem(low=421.75, high=424.75, open=422.2, close=424.55, color='GREEN') last_candle=CandleItem(low=424.35, high=430.55, open=424.55, close=429.5, color='GREEN') 2020-08-31 03:00:20 INFO: check need new order None 2020-08-31 03:00:20 INFO: init new order end 2020-08-31 03:00:20 INFO: 2020-08-31 03:00:20 INFO: 2020-08-31 03:00:20 INFO: 2020-08-31 03:00:20 INFO: 2020-08-31 03:02:00 INFO: 2020-08-31 03:02:00 INFO: 2020-08-31 03:02:00 INFO: 2020-08-31 03:02:00 INFO: 2020-08-31 03:02:00 INFO: clearing start 2020-08-31 03:02:00 INFO: clearing end 2020-08-31 03:02:00 INFO: 2020-08-31 03:02:00 INFO: 2020-08-31 03:02:00 INFO: 2020-08-31 03:02:00 INFO: 2020-08-31 04:00:20 INFO: 2020-08-31 04:00:20 INFO: 2020-08-31 04:00:20 INFO: 2020-08-31 04:00:20 INFO: 2020-08-31 04:00:20 INFO: init new order start 2020-08-31 04:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 31, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 429.5, 'high': 431.2, 'low': 426.5, 'close': 426.65, 'trades': 5219, 'volume': 4495190, 'vwap': 429.19, 'lastSize': 10, 'turnover': 192925905415, 'homeNotional': 52656.3554054859, 'foreignNotional': 22599237.643429138}, {'timestamp': datetime.datetime(2020, 8, 31, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 424.55, 'high': 430.55, 'low': 424.35, 'close': 429.5, 'trades': 7729, 'volume': 5200401, 'vwap': 428.47, 'lastSize': 100, 'turnover': 222820506100, 'homeNotional': 60813.99648960509, 'foreignNotional': 26056918.347469676}, {'timestamp': datetime.datetime(2020, 8, 30, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 422.2, 'high': 424.75, 'low': 421.75, 'close': 424.55, 'trades': 2806, 'volume': 1967046, 'vwap': 423.5, 'lastSize': 2, 'turnover': 83303259400, 'homeNotional': 22876.305707436597, 'foreignNotional': 9688009.087504668}] 2020-08-31 04:00:21 INFO: prepare candles [CandleItem(low=426.5, high=431.2, open=429.5, close=426.65, color='RED'), CandleItem(low=424.35, high=430.55, open=424.55, close=429.5, color='GREEN'), CandleItem(low=421.75, high=424.75, open=422.2, close=424.55, color='GREEN')] 2020-08-31 04:00:21 INFO: last_candle=CandleItem(low=426.5, high=431.2, open=429.5, close=426.65, color='RED') 2020-08-31 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-08-31 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=426.5, high=431.2, open=429.5, close=426.65, color='RED') 2020-08-31 04:00:21 INFO: skip by CandleItem(low=426.5, high=431.2, open=429.5, close=426.65, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-31 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-08-31 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=426.5, high=431.2, open=429.5, close=426.65, color='RED') 2020-08-31 04:00:21 INFO: skip by CandleItem(low=426.5, high=431.2, open=429.5, close=426.65, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-31 04:00:21 INFO: not found applicable config for candle 2020-08-31 04:00:21 INFO: check need new order None 2020-08-31 04:00:21 INFO: init new order end 2020-08-31 04:00:21 INFO: 2020-08-31 04:00:21 INFO: 2020-08-31 04:00:21 INFO: 2020-08-31 04:00:21 INFO: 2020-08-31 04:02:00 INFO: 2020-08-31 04:02:00 INFO: 2020-08-31 04:02:00 INFO: 2020-08-31 04:02:00 INFO: 2020-08-31 04:02:00 INFO: clearing start 2020-08-31 04:02:00 INFO: clearing end 2020-08-31 04:02:00 INFO: 2020-08-31 04:02:00 INFO: 2020-08-31 04:02:00 INFO: 2020-08-31 04:02:00 INFO: 2020-08-31 05:00:20 INFO: 2020-08-31 05:00:20 INFO: 2020-08-31 05:00:20 INFO: 2020-08-31 05:00:20 INFO: 2020-08-31 05:00:20 INFO: init new order start 2020-08-31 05:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 31, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 426.65, 'high': 427.75, 'low': 424.65, 'close': 427.25, 'trades': 3476, 'volume': 2085311, 'vwap': 426.54, 'lastSize': 1, 'turnover': 88946240615, 'homeNotional': 24393.18681636119, 'foreignNotional': 10404602.727280613}, {'timestamp': datetime.datetime(2020, 8, 31, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 429.5, 'high': 431.2, 'low': 426.5, 'close': 426.65, 'trades': 5219, 'volume': 4495190, 'vwap': 429.19, 'lastSize': 10, 'turnover': 192925905415, 'homeNotional': 52656.3554054859, 'foreignNotional': 22599237.643429138}, {'timestamp': datetime.datetime(2020, 8, 31, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 424.55, 'high': 430.55, 'low': 424.35, 'close': 429.5, 'trades': 7729, 'volume': 5200401, 'vwap': 428.47, 'lastSize': 100, 'turnover': 222820506100, 'homeNotional': 60813.99648960509, 'foreignNotional': 26056918.347469676}] 2020-08-31 05:00:20 INFO: prepare candles [CandleItem(low=424.65, high=427.75, open=426.65, close=427.25, color='GREEN'), CandleItem(low=426.5, high=431.2, open=429.5, close=426.65, color='RED'), CandleItem(low=424.35, high=430.55, open=424.55, close=429.5, color='GREEN')] 2020-08-31 05:00:20 INFO: skip by colors first_candle=CandleItem(low=424.35, high=430.55, open=424.55, close=429.5, color='GREEN') second_candle=CandleItem(low=426.5, high=431.2, open=429.5, close=426.65, color='RED') last_candle=CandleItem(low=424.65, high=427.75, open=426.65, close=427.25, color='GREEN') 2020-08-31 05:00:20 INFO: check need new order None 2020-08-31 05:00:20 INFO: init new order end 2020-08-31 05:00:20 INFO: 2020-08-31 05:00:20 INFO: 2020-08-31 05:00:20 INFO: 2020-08-31 05:00:20 INFO: 2020-08-31 05:02:00 INFO: 2020-08-31 05:02:00 INFO: 2020-08-31 05:02:00 INFO: 2020-08-31 05:02:00 INFO: 2020-08-31 05:02:00 INFO: clearing start 2020-08-31 05:02:00 INFO: clearing end 2020-08-31 05:02:00 INFO: 2020-08-31 05:02:00 INFO: 2020-08-31 05:02:00 INFO: 2020-08-31 05:02:00 INFO: 2020-08-31 06:00:20 INFO: 2020-08-31 06:00:20 INFO: 2020-08-31 06:00:20 INFO: 2020-08-31 06:00:20 INFO: 2020-08-31 06:00:20 INFO: init new order start 2020-08-31 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 31, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 427.25, 'high': 428.35, 'low': 425.85, 'close': 426.0, 'trades': 2001, 'volume': 1478650, 'vwap': 427.05, 'lastSize': 4, 'turnover': 63145394385, 'homeNotional': 17287.73882228782, 'foreignNotional': 7382692.820973438}, {'timestamp': datetime.datetime(2020, 8, 31, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 426.65, 'high': 427.75, 'low': 424.65, 'close': 427.25, 'trades': 3476, 'volume': 2085311, 'vwap': 426.54, 'lastSize': 1, 'turnover': 88946240615, 'homeNotional': 24393.18681636119, 'foreignNotional': 10404602.727280613}, {'timestamp': datetime.datetime(2020, 8, 31, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 429.5, 'high': 431.2, 'low': 426.5, 'close': 426.65, 'trades': 5219, 'volume': 4495190, 'vwap': 429.19, 'lastSize': 10, 'turnover': 192925905415, 'homeNotional': 52656.3554054859, 'foreignNotional': 22599237.643429138}] 2020-08-31 06:00:20 INFO: prepare candles [CandleItem(low=425.85, high=428.35, open=427.25, close=426.0, color='RED'), CandleItem(low=424.65, high=427.75, open=426.65, close=427.25, color='GREEN'), CandleItem(low=426.5, high=431.2, open=429.5, close=426.65, color='RED')] 2020-08-31 06:00:20 INFO: skip by colors first_candle=CandleItem(low=426.5, high=431.2, open=429.5, close=426.65, color='RED') second_candle=CandleItem(low=424.65, high=427.75, open=426.65, close=427.25, color='GREEN') last_candle=CandleItem(low=425.85, high=428.35, open=427.25, close=426.0, color='RED') 2020-08-31 06:00:20 INFO: check need new order None 2020-08-31 06:00:20 INFO: init new order end 2020-08-31 06:00:20 INFO: 2020-08-31 06:00:20 INFO: 2020-08-31 06:00:20 INFO: 2020-08-31 06:00:20 INFO: 2020-08-31 06:02:00 INFO: 2020-08-31 06:02:00 INFO: 2020-08-31 06:02:00 INFO: 2020-08-31 06:02:00 INFO: 2020-08-31 06:02:00 INFO: clearing start 2020-08-31 06:02:00 INFO: clearing end 2020-08-31 06:02:00 INFO: 2020-08-31 06:02:00 INFO: 2020-08-31 06:02:00 INFO: 2020-08-31 06:02:00 INFO: 2020-08-31 07:00:20 INFO: 2020-08-31 07:00:20 INFO: 2020-08-31 07:00:20 INFO: 2020-08-31 07:00:20 INFO: 2020-08-31 07:00:20 INFO: init new order start 2020-08-31 07:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 31, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 426.0, 'high': 427.0, 'low': 424.75, 'close': 425.35, 'trades': 2583, 'volume': 1584209, 'vwap': 425.89, 'lastSize': 400, 'turnover': 67469090725, 'homeNotional': 18510.053500367158, 'foreignNotional': 7883158.771275757}, {'timestamp': datetime.datetime(2020, 8, 31, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 427.25, 'high': 428.35, 'low': 425.85, 'close': 426.0, 'trades': 2001, 'volume': 1478650, 'vwap': 427.05, 'lastSize': 4, 'turnover': 63145394385, 'homeNotional': 17287.73882228782, 'foreignNotional': 7382692.820973438}, {'timestamp': datetime.datetime(2020, 8, 31, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 426.65, 'high': 427.75, 'low': 424.65, 'close': 427.25, 'trades': 3476, 'volume': 2085311, 'vwap': 426.54, 'lastSize': 1, 'turnover': 88946240615, 'homeNotional': 24393.18681636119, 'foreignNotional': 10404602.727280613}] 2020-08-31 07:00:20 INFO: prepare candles [CandleItem(low=424.75, high=427.0, open=426.0, close=425.35, color='RED'), CandleItem(low=425.85, high=428.35, open=427.25, close=426.0, color='RED'), CandleItem(low=424.65, high=427.75, open=426.65, close=427.25, color='GREEN')] 2020-08-31 07:00:20 INFO: skip by colors first_candle=CandleItem(low=424.65, high=427.75, open=426.65, close=427.25, color='GREEN') second_candle=CandleItem(low=425.85, high=428.35, open=427.25, close=426.0, color='RED') last_candle=CandleItem(low=424.75, high=427.0, open=426.0, close=425.35, color='RED') 2020-08-31 07:00:20 INFO: check need new order None 2020-08-31 07:00:20 INFO: init new order end 2020-08-31 07:00:20 INFO: 2020-08-31 07:00:20 INFO: 2020-08-31 07:00:20 INFO: 2020-08-31 07:00:20 INFO: 2020-08-31 07:02:00 INFO: 2020-08-31 07:02:00 INFO: 2020-08-31 07:02:00 INFO: 2020-08-31 07:02:00 INFO: 2020-08-31 07:02:00 INFO: clearing start 2020-08-31 07:02:00 INFO: clearing end 2020-08-31 07:02:00 INFO: 2020-08-31 07:02:00 INFO: 2020-08-31 07:02:00 INFO: 2020-08-31 07:02:00 INFO: 2020-08-31 08:00:20 INFO: 2020-08-31 08:00:20 INFO: 2020-08-31 08:00:20 INFO: 2020-08-31 08:00:20 INFO: 2020-08-31 08:00:20 INFO: init new order start 2020-08-31 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 31, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 425.35, 'high': 428.4, 'low': 424.75, 'close': 425.0, 'trades': 3528, 'volume': 4489878, 'vwap': 426.77, 'lastSize': 1, 'turnover': 191610526815, 'homeNotional': 52469.22264649606, 'foreignNotional': 22391859.695787378}, {'timestamp': datetime.datetime(2020, 8, 31, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 426.0, 'high': 427.0, 'low': 424.75, 'close': 425.35, 'trades': 2583, 'volume': 1584209, 'vwap': 425.89, 'lastSize': 400, 'turnover': 67469090725, 'homeNotional': 18510.053500367158, 'foreignNotional': 7883158.771275757}, {'timestamp': datetime.datetime(2020, 8, 31, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 427.25, 'high': 428.35, 'low': 425.85, 'close': 426.0, 'trades': 2001, 'volume': 1478650, 'vwap': 427.05, 'lastSize': 4, 'turnover': 63145394385, 'homeNotional': 17287.73882228782, 'foreignNotional': 7382692.820973438}] 2020-08-31 08:00:20 INFO: prepare candles [CandleItem(low=424.75, high=428.4, open=425.35, close=425.0, color='RED'), CandleItem(low=424.75, high=427.0, open=426.0, close=425.35, color='RED'), CandleItem(low=425.85, high=428.35, open=427.25, close=426.0, color='RED')] 2020-08-31 08:00:20 INFO: skip by colors first_candle=CandleItem(low=425.85, high=428.35, open=427.25, close=426.0, color='RED') second_candle=CandleItem(low=424.75, high=427.0, open=426.0, close=425.35, color='RED') last_candle=CandleItem(low=424.75, high=428.4, open=425.35, close=425.0, color='RED') 2020-08-31 08:00:20 INFO: check need new order None 2020-08-31 08:00:20 INFO: init new order end 2020-08-31 08:00:20 INFO: 2020-08-31 08:00:20 INFO: 2020-08-31 08:00:20 INFO: 2020-08-31 08:00:20 INFO: 2020-08-31 08:02:00 INFO: 2020-08-31 08:02:00 INFO: 2020-08-31 08:02:00 INFO: 2020-08-31 08:02:00 INFO: 2020-08-31 08:02:00 INFO: clearing start 2020-08-31 08:02:00 INFO: clearing end 2020-08-31 08:02:00 INFO: 2020-08-31 08:02:00 INFO: 2020-08-31 08:02:00 INFO: 2020-08-31 08:02:00 INFO: 2020-08-31 09:00:20 INFO: 2020-08-31 09:00:20 INFO: 2020-08-31 09:00:20 INFO: 2020-08-31 09:00:20 INFO: 2020-08-31 09:00:20 INFO: init new order start 2020-08-31 09:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 31, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 425.0, 'high': 426.4, 'low': 422.9, 'close': 423.3, 'trades': 2944, 'volume': 2523482, 'vwap': 424.35, 'lastSize': 4907, 'turnover': 107083593750, 'homeNotional': 29440.06601272786, 'foreignNotional': 12492850.331765298}, {'timestamp': datetime.datetime(2020, 8, 31, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 425.35, 'high': 428.4, 'low': 424.75, 'close': 425.0, 'trades': 3528, 'volume': 4489878, 'vwap': 426.77, 'lastSize': 1, 'turnover': 191610526815, 'homeNotional': 52469.22264649606, 'foreignNotional': 22391859.695787378}, {'timestamp': datetime.datetime(2020, 8, 31, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 426.0, 'high': 427.0, 'low': 424.75, 'close': 425.35, 'trades': 2583, 'volume': 1584209, 'vwap': 425.89, 'lastSize': 400, 'turnover': 67469090725, 'homeNotional': 18510.053500367158, 'foreignNotional': 7883158.771275757}] 2020-08-31 09:00:20 INFO: prepare candles [CandleItem(low=422.9, high=426.4, open=425.0, close=423.3, color='RED'), CandleItem(low=424.75, high=428.4, open=425.35, close=425.0, color='RED'), CandleItem(low=424.75, high=427.0, open=426.0, close=425.35, color='RED')] 2020-08-31 09:00:20 INFO: skip by colors first_candle=CandleItem(low=424.75, high=427.0, open=426.0, close=425.35, color='RED') second_candle=CandleItem(low=424.75, high=428.4, open=425.35, close=425.0, color='RED') last_candle=CandleItem(low=422.9, high=426.4, open=425.0, close=423.3, color='RED') 2020-08-31 09:00:20 INFO: check need new order None 2020-08-31 09:00:20 INFO: init new order end 2020-08-31 09:00:20 INFO: 2020-08-31 09:00:20 INFO: 2020-08-31 09:00:20 INFO: 2020-08-31 09:00:20 INFO: 2020-08-31 09:02:00 INFO: 2020-08-31 09:02:00 INFO: 2020-08-31 09:02:00 INFO: 2020-08-31 09:02:00 INFO: 2020-08-31 09:02:00 INFO: clearing start 2020-08-31 09:02:00 INFO: clearing end 2020-08-31 09:02:00 INFO: 2020-08-31 09:02:00 INFO: 2020-08-31 09:02:00 INFO: 2020-08-31 09:02:00 INFO: 2020-08-31 10:00:20 INFO: 2020-08-31 10:00:20 INFO: 2020-08-31 10:00:20 INFO: 2020-08-31 10:00:20 INFO: 2020-08-31 10:00:20 INFO: init new order start 2020-08-31 10:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 31, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 423.3, 'high': 424.35, 'low': 420.1, 'close': 424.3, 'trades': 5170, 'volume': 4620118, 'vwap': 422.07, 'lastSize': 1200, 'turnover': 195000588910, 'homeNotional': 53875.85998998146, 'foreignNotional': 22739336.27707292}, {'timestamp': datetime.datetime(2020, 8, 31, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 425.0, 'high': 426.4, 'low': 422.9, 'close': 423.3, 'trades': 2944, 'volume': 2523482, 'vwap': 424.35, 'lastSize': 4907, 'turnover': 107083593750, 'homeNotional': 29440.06601272786, 'foreignNotional': 12492850.331765298}, {'timestamp': datetime.datetime(2020, 8, 31, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 425.35, 'high': 428.4, 'low': 424.75, 'close': 425.0, 'trades': 3528, 'volume': 4489878, 'vwap': 426.77, 'lastSize': 1, 'turnover': 191610526815, 'homeNotional': 52469.22264649606, 'foreignNotional': 22391859.695787378}] 2020-08-31 10:00:21 INFO: prepare candles [CandleItem(low=420.1, high=424.35, open=423.3, close=424.3, color='GREEN'), CandleItem(low=422.9, high=426.4, open=425.0, close=423.3, color='RED'), CandleItem(low=424.75, high=428.4, open=425.35, close=425.0, color='RED')] 2020-08-31 10:00:21 INFO: last_candle=CandleItem(low=420.1, high=424.35, open=423.3, close=424.3, color='GREEN') 2020-08-31 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-08-31 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=420.1, high=424.35, open=423.3, close=424.3, color='GREEN') 2020-08-31 10:00:21 INFO: skip by CandleItem(low=420.1, high=424.35, open=423.3, close=424.3, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-31 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-08-31 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=420.1, high=424.35, open=423.3, close=424.3, color='GREEN') 2020-08-31 10:00:21 INFO: skip by CandleItem(low=420.1, high=424.35, open=423.3, close=424.3, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-31 10:00:21 INFO: not found applicable config for candle 2020-08-31 10:00:21 INFO: check need new order None 2020-08-31 10:00:21 INFO: init new order end 2020-08-31 10:00:21 INFO: 2020-08-31 10:00:21 INFO: 2020-08-31 10:00:21 INFO: 2020-08-31 10:00:21 INFO: 2020-08-31 10:02:00 INFO: 2020-08-31 10:02:00 INFO: 2020-08-31 10:02:00 INFO: 2020-08-31 10:02:00 INFO: 2020-08-31 10:02:00 INFO: clearing start 2020-08-31 10:02:00 INFO: clearing end 2020-08-31 10:02:00 INFO: 2020-08-31 10:02:00 INFO: 2020-08-31 10:02:00 INFO: 2020-08-31 10:02:00 INFO: 2020-08-31 11:00:20 INFO: 2020-08-31 11:00:20 INFO: 2020-08-31 11:00:20 INFO: 2020-08-31 11:00:20 INFO: 2020-08-31 11:00:20 INFO: init new order start 2020-08-31 11:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 31, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 424.3, 'high': 424.35, 'low': 418.8, 'close': 421.15, 'trades': 4849, 'volume': 5168261, 'vwap': 421.26, 'lastSize': 450, 'turnover': 217717203385, 'homeNotional': 60110.79570008536, 'foreignNotional': 25322268.941218756}, {'timestamp': datetime.datetime(2020, 8, 31, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 423.3, 'high': 424.35, 'low': 420.1, 'close': 424.3, 'trades': 5170, 'volume': 4620118, 'vwap': 422.07, 'lastSize': 1200, 'turnover': 195000588910, 'homeNotional': 53875.85998998146, 'foreignNotional': 22739336.27707292}, {'timestamp': datetime.datetime(2020, 8, 31, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 425.0, 'high': 426.4, 'low': 422.9, 'close': 423.3, 'trades': 2944, 'volume': 2523482, 'vwap': 424.35, 'lastSize': 4907, 'turnover': 107083593750, 'homeNotional': 29440.06601272786, 'foreignNotional': 12492850.331765298}] 2020-08-31 11:00:20 INFO: prepare candles [CandleItem(low=418.8, high=424.35, open=424.3, close=421.15, color='RED'), CandleItem(low=420.1, high=424.35, open=423.3, close=424.3, color='GREEN'), CandleItem(low=422.9, high=426.4, open=425.0, close=423.3, color='RED')] 2020-08-31 11:00:20 INFO: skip by colors first_candle=CandleItem(low=422.9, high=426.4, open=425.0, close=423.3, color='RED') second_candle=CandleItem(low=420.1, high=424.35, open=423.3, close=424.3, color='GREEN') last_candle=CandleItem(low=418.8, high=424.35, open=424.3, close=421.15, color='RED') 2020-08-31 11:00:20 INFO: check need new order None 2020-08-31 11:00:20 INFO: init new order end 2020-08-31 11:00:20 INFO: 2020-08-31 11:00:20 INFO: 2020-08-31 11:00:20 INFO: 2020-08-31 11:00:20 INFO: 2020-08-31 11:02:00 INFO: 2020-08-31 11:02:00 INFO: 2020-08-31 11:02:00 INFO: 2020-08-31 11:02:00 INFO: 2020-08-31 11:02:00 INFO: clearing start 2020-08-31 11:02:00 INFO: clearing end 2020-08-31 11:02:00 INFO: 2020-08-31 11:02:00 INFO: 2020-08-31 11:02:00 INFO: 2020-08-31 11:02:00 INFO: 2020-08-31 12:00:20 INFO: 2020-08-31 12:00:20 INFO: 2020-08-31 12:00:20 INFO: 2020-08-31 12:00:20 INFO: 2020-08-31 12:00:20 INFO: init new order start 2020-08-31 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 31, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 421.15, 'high': 422.05, 'low': 419.35, 'close': 420.6, 'trades': 4218, 'volume': 4805088, 'vwap': 420.62, 'lastSize': 100, 'turnover': 202110256735, 'homeNotional': 55786.06445414222, 'foreignNotional': 23464613.910571724}, {'timestamp': datetime.datetime(2020, 8, 31, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 424.3, 'high': 424.35, 'low': 418.8, 'close': 421.15, 'trades': 4849, 'volume': 5168261, 'vwap': 421.26, 'lastSize': 450, 'turnover': 217717203385, 'homeNotional': 60110.79570008536, 'foreignNotional': 25322268.941218756}, {'timestamp': datetime.datetime(2020, 8, 31, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 423.3, 'high': 424.35, 'low': 420.1, 'close': 424.3, 'trades': 5170, 'volume': 4620118, 'vwap': 422.07, 'lastSize': 1200, 'turnover': 195000588910, 'homeNotional': 53875.85998998146, 'foreignNotional': 22739336.27707292}] 2020-08-31 12:00:20 INFO: prepare candles [CandleItem(low=419.35, high=422.05, open=421.15, close=420.6, color='RED'), CandleItem(low=418.8, high=424.35, open=424.3, close=421.15, color='RED'), CandleItem(low=420.1, high=424.35, open=423.3, close=424.3, color='GREEN')] 2020-08-31 12:00:20 INFO: skip by colors first_candle=CandleItem(low=420.1, high=424.35, open=423.3, close=424.3, color='GREEN') second_candle=CandleItem(low=418.8, high=424.35, open=424.3, close=421.15, color='RED') last_candle=CandleItem(low=419.35, high=422.05, open=421.15, close=420.6, color='RED') 2020-08-31 12:00:20 INFO: check need new order None 2020-08-31 12:00:20 INFO: init new order end 2020-08-31 12:00:20 INFO: 2020-08-31 12:00:20 INFO: 2020-08-31 12:00:20 INFO: 2020-08-31 12:00:20 INFO: 2020-08-31 12:02:00 INFO: 2020-08-31 12:02:00 INFO: 2020-08-31 12:02:00 INFO: 2020-08-31 12:02:00 INFO: 2020-08-31 12:02:00 INFO: clearing start 2020-08-31 12:02:00 INFO: clearing end 2020-08-31 12:02:00 INFO: 2020-08-31 12:02:00 INFO: 2020-08-31 12:02:00 INFO: 2020-08-31 12:02:00 INFO: 2020-08-31 13:00:20 INFO: 2020-08-31 13:00:20 INFO: 2020-08-31 13:00:20 INFO: 2020-08-31 13:00:20 INFO: 2020-08-31 13:00:20 INFO: init new order start 2020-08-31 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 31, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 420.6, 'high': 423.6, 'low': 419.75, 'close': 422.0, 'trades': 3396, 'volume': 2519137, 'vwap': 422.33, 'lastSize': 1, 'turnover': 106389063195, 'homeNotional': 29241.765628324545, 'foreignNotional': 12349505.6642581}, {'timestamp': datetime.datetime(2020, 8, 31, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 421.15, 'high': 422.05, 'low': 419.35, 'close': 420.6, 'trades': 4218, 'volume': 4805088, 'vwap': 420.62, 'lastSize': 100, 'turnover': 202110256735, 'homeNotional': 55786.06445414222, 'foreignNotional': 23464613.910571724}, {'timestamp': datetime.datetime(2020, 8, 31, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 424.3, 'high': 424.35, 'low': 418.8, 'close': 421.15, 'trades': 4849, 'volume': 5168261, 'vwap': 421.26, 'lastSize': 450, 'turnover': 217717203385, 'homeNotional': 60110.79570008536, 'foreignNotional': 25322268.941218756}] 2020-08-31 13:00:20 INFO: prepare candles [CandleItem(low=419.75, high=423.6, open=420.6, close=422.0, color='GREEN'), CandleItem(low=419.35, high=422.05, open=421.15, close=420.6, color='RED'), CandleItem(low=418.8, high=424.35, open=424.3, close=421.15, color='RED')] 2020-08-31 13:00:20 INFO: last_candle=CandleItem(low=419.75, high=423.6, open=420.6, close=422.0, color='GREEN') 2020-08-31 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-08-31 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=419.75, high=423.6, open=420.6, close=422.0, color='GREEN') 2020-08-31 13:00:20 INFO: skip by CandleItem(low=419.75, high=423.6, open=420.6, close=422.0, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-31 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-08-31 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=419.75, high=423.6, open=420.6, close=422.0, color='GREEN') 2020-08-31 13:00:20 INFO: skip by CandleItem(low=419.75, high=423.6, open=420.6, close=422.0, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-31 13:00:20 INFO: not found applicable config for candle 2020-08-31 13:00:20 INFO: check need new order None 2020-08-31 13:00:20 INFO: init new order end 2020-08-31 13:00:20 INFO: 2020-08-31 13:00:20 INFO: 2020-08-31 13:00:20 INFO: 2020-08-31 13:00:20 INFO: 2020-08-31 13:02:00 INFO: 2020-08-31 13:02:00 INFO: 2020-08-31 13:02:00 INFO: 2020-08-31 13:02:00 INFO: 2020-08-31 13:02:00 INFO: clearing start 2020-08-31 13:02:01 INFO: clearing end 2020-08-31 13:02:01 INFO: 2020-08-31 13:02:01 INFO: 2020-08-31 13:02:01 INFO: 2020-08-31 13:02:01 INFO: 2020-08-31 14:00:20 INFO: 2020-08-31 14:00:20 INFO: 2020-08-31 14:00:20 INFO: 2020-08-31 14:00:20 INFO: 2020-08-31 14:00:20 INFO: init new order start 2020-08-31 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 31, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 422.0, 'high': 427.7, 'low': 421.4, 'close': 426.8, 'trades': 4984, 'volume': 3865149, 'vwap': 425.46, 'lastSize': 1, 'turnover': 164446538910, 'homeNotional': 44887.25276155207, 'foreignNotional': 19097791.127425414}, {'timestamp': datetime.datetime(2020, 8, 31, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 420.6, 'high': 423.6, 'low': 419.75, 'close': 422.0, 'trades': 3396, 'volume': 2519137, 'vwap': 422.33, 'lastSize': 1, 'turnover': 106389063195, 'homeNotional': 29241.765628324545, 'foreignNotional': 12349505.6642581}, {'timestamp': datetime.datetime(2020, 8, 31, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 421.15, 'high': 422.05, 'low': 419.35, 'close': 420.6, 'trades': 4218, 'volume': 4805088, 'vwap': 420.62, 'lastSize': 100, 'turnover': 202110256735, 'homeNotional': 55786.06445414222, 'foreignNotional': 23464613.910571724}] 2020-08-31 14:00:20 INFO: prepare candles [CandleItem(low=421.4, high=427.7, open=422.0, close=426.8, color='GREEN'), CandleItem(low=419.75, high=423.6, open=420.6, close=422.0, color='GREEN'), CandleItem(low=419.35, high=422.05, open=421.15, close=420.6, color='RED')] 2020-08-31 14:00:20 INFO: skip by colors first_candle=CandleItem(low=419.35, high=422.05, open=421.15, close=420.6, color='RED') second_candle=CandleItem(low=419.75, high=423.6, open=420.6, close=422.0, color='GREEN') last_candle=CandleItem(low=421.4, high=427.7, open=422.0, close=426.8, color='GREEN') 2020-08-31 14:00:20 INFO: check need new order None 2020-08-31 14:00:20 INFO: init new order end 2020-08-31 14:00:20 INFO: 2020-08-31 14:00:20 INFO: 2020-08-31 14:00:20 INFO: 2020-08-31 14:00:20 INFO: 2020-08-31 14:02:00 INFO: 2020-08-31 14:02:00 INFO: 2020-08-31 14:02:00 INFO: 2020-08-31 14:02:00 INFO: 2020-08-31 14:02:00 INFO: clearing start 2020-08-31 14:02:00 INFO: clearing end 2020-08-31 14:02:00 INFO: 2020-08-31 14:02:00 INFO: 2020-08-31 14:02:00 INFO: 2020-08-31 14:02:00 INFO: 2020-08-31 15:00:20 INFO: 2020-08-31 15:00:20 INFO: 2020-08-31 15:00:20 INFO: 2020-08-31 15:00:20 INFO: 2020-08-31 15:00:20 INFO: init new order start 2020-08-31 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 31, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 426.8, 'high': 435.1, 'low': 426.3, 'close': 432.7, 'trades': 10162, 'volume': 6880535, 'vwap': 431.87, 'lastSize': 12, 'turnover': 297148829755, 'homeNotional': 80336.23710135333, 'foreignNotional': 34695052.44740049}, {'timestamp': datetime.datetime(2020, 8, 31, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 422.0, 'high': 427.7, 'low': 421.4, 'close': 426.8, 'trades': 4984, 'volume': 3865149, 'vwap': 425.46, 'lastSize': 1, 'turnover': 164446538910, 'homeNotional': 44887.25276155207, 'foreignNotional': 19097791.127425414}, {'timestamp': datetime.datetime(2020, 8, 31, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 420.6, 'high': 423.6, 'low': 419.75, 'close': 422.0, 'trades': 3396, 'volume': 2519137, 'vwap': 422.33, 'lastSize': 1, 'turnover': 106389063195, 'homeNotional': 29241.765628324545, 'foreignNotional': 12349505.6642581}] 2020-08-31 15:00:20 INFO: prepare candles [CandleItem(low=426.3, high=435.1, open=426.8, close=432.7, color='GREEN'), CandleItem(low=421.4, high=427.7, open=422.0, close=426.8, color='GREEN'), CandleItem(low=419.75, high=423.6, open=420.6, close=422.0, color='GREEN')] 2020-08-31 15:00:20 INFO: skip by colors first_candle=CandleItem(low=419.75, high=423.6, open=420.6, close=422.0, color='GREEN') second_candle=CandleItem(low=421.4, high=427.7, open=422.0, close=426.8, color='GREEN') last_candle=CandleItem(low=426.3, high=435.1, open=426.8, close=432.7, color='GREEN') 2020-08-31 15:00:20 INFO: check need new order None 2020-08-31 15:00:20 INFO: init new order end 2020-08-31 15:00:20 INFO: 2020-08-31 15:00:20 INFO: 2020-08-31 15:00:20 INFO: 2020-08-31 15:00:20 INFO: 2020-08-31 15:02:00 INFO: 2020-08-31 15:02:00 INFO: 2020-08-31 15:02:00 INFO: 2020-08-31 15:02:00 INFO: 2020-08-31 15:02:00 INFO: clearing start 2020-08-31 15:02:00 INFO: clearing end 2020-08-31 15:02:00 INFO: 2020-08-31 15:02:00 INFO: 2020-08-31 15:02:00 INFO: 2020-08-31 15:02:00 INFO: 2020-08-31 16:00:20 INFO: 2020-08-31 16:00:20 INFO: 2020-08-31 16:00:20 INFO: 2020-08-31 16:00:20 INFO: 2020-08-31 16:00:20 INFO: init new order start 2020-08-31 16:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 31, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 432.7, 'high': 438.95, 'low': 431.55, 'close': 436.7, 'trades': 10201, 'volume': 9500982, 'vwap': 435.03, 'lastSize': 13, 'turnover': 413314910110, 'homeNotional': 111139.81749917276, 'foreignNotional': 48348743.50842799}, {'timestamp': datetime.datetime(2020, 8, 31, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 426.8, 'high': 435.1, 'low': 426.3, 'close': 432.7, 'trades': 10162, 'volume': 6880535, 'vwap': 431.87, 'lastSize': 12, 'turnover': 297148829755, 'homeNotional': 80336.23710135333, 'foreignNotional': 34695052.44740049}, {'timestamp': datetime.datetime(2020, 8, 31, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 422.0, 'high': 427.7, 'low': 421.4, 'close': 426.8, 'trades': 4984, 'volume': 3865149, 'vwap': 425.46, 'lastSize': 1, 'turnover': 164446538910, 'homeNotional': 44887.25276155207, 'foreignNotional': 19097791.127425414}] 2020-08-31 16:00:20 INFO: prepare candles [CandleItem(low=431.55, high=438.95, open=432.7, close=436.7, color='GREEN'), CandleItem(low=426.3, high=435.1, open=426.8, close=432.7, color='GREEN'), CandleItem(low=421.4, high=427.7, open=422.0, close=426.8, color='GREEN')] 2020-08-31 16:00:20 INFO: skip by colors first_candle=CandleItem(low=421.4, high=427.7, open=422.0, close=426.8, color='GREEN') second_candle=CandleItem(low=426.3, high=435.1, open=426.8, close=432.7, color='GREEN') last_candle=CandleItem(low=431.55, high=438.95, open=432.7, close=436.7, color='GREEN') 2020-08-31 16:00:20 INFO: check need new order None 2020-08-31 16:00:20 INFO: init new order end 2020-08-31 16:00:20 INFO: 2020-08-31 16:00:20 INFO: 2020-08-31 16:00:20 INFO: 2020-08-31 16:00:20 INFO: 2020-08-31 16:02:00 INFO: 2020-08-31 16:02:00 INFO: 2020-08-31 16:02:00 INFO: 2020-08-31 16:02:00 INFO: 2020-08-31 16:02:00 INFO: clearing start 2020-08-31 16:02:00 INFO: clearing end 2020-08-31 16:02:00 INFO: 2020-08-31 16:02:00 INFO: 2020-08-31 16:02:00 INFO: 2020-08-31 16:02:00 INFO: 2020-08-31 17:00:20 INFO: 2020-08-31 17:00:20 INFO: 2020-08-31 17:00:20 INFO: 2020-08-31 17:00:20 INFO: 2020-08-31 17:00:20 INFO: init new order start 2020-08-31 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 31, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 436.7, 'high': 440.2, 'low': 434.35, 'close': 434.95, 'trades': 10306, 'volume': 11526678, 'vwap': 437.89, 'lastSize': 1, 'turnover': 504737034965, 'homeNotional': 135376.32268251057, 'foreignNotional': 59279704.354188174}, {'timestamp': datetime.datetime(2020, 8, 31, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 432.7, 'high': 438.95, 'low': 431.55, 'close': 436.7, 'trades': 10201, 'volume': 9500982, 'vwap': 435.03, 'lastSize': 13, 'turnover': 413314910110, 'homeNotional': 111139.81749917276, 'foreignNotional': 48348743.50842799}, {'timestamp': datetime.datetime(2020, 8, 31, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 426.8, 'high': 435.1, 'low': 426.3, 'close': 432.7, 'trades': 10162, 'volume': 6880535, 'vwap': 431.87, 'lastSize': 12, 'turnover': 297148829755, 'homeNotional': 80336.23710135333, 'foreignNotional': 34695052.44740049}] 2020-08-31 17:00:20 INFO: prepare candles [CandleItem(low=434.35, high=440.2, open=436.7, close=434.95, color='RED'), CandleItem(low=431.55, high=438.95, open=432.7, close=436.7, color='GREEN'), CandleItem(low=426.3, high=435.1, open=426.8, close=432.7, color='GREEN')] 2020-08-31 17:00:20 INFO: last_candle=CandleItem(low=434.35, high=440.2, open=436.7, close=434.95, color='RED') 2020-08-31 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-08-31 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=434.35, high=440.2, open=436.7, close=434.95, color='RED') 2020-08-31 17:00:20 INFO: skip by CandleItem(low=434.35, high=440.2, open=436.7, close=434.95, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-31 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-08-31 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=434.35, high=440.2, open=436.7, close=434.95, color='RED') 2020-08-31 17:00:20 INFO: skip by CandleItem(low=434.35, high=440.2, open=436.7, close=434.95, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-31 17:00:20 INFO: not found applicable config for candle 2020-08-31 17:00:20 INFO: check need new order None 2020-08-31 17:00:20 INFO: init new order end 2020-08-31 17:00:20 INFO: 2020-08-31 17:00:20 INFO: 2020-08-31 17:00:20 INFO: 2020-08-31 17:00:20 INFO: 2020-08-31 17:02:00 INFO: 2020-08-31 17:02:00 INFO: 2020-08-31 17:02:00 INFO: 2020-08-31 17:02:00 INFO: 2020-08-31 17:02:00 INFO: clearing start 2020-08-31 17:02:00 INFO: clearing end 2020-08-31 17:02:00 INFO: 2020-08-31 17:02:00 INFO: 2020-08-31 17:02:00 INFO: 2020-08-31 17:02:00 INFO: 2020-08-31 18:00:20 INFO: 2020-08-31 18:00:20 INFO: 2020-08-31 18:00:20 INFO: 2020-08-31 18:00:20 INFO: 2020-08-31 18:00:20 INFO: init new order start 2020-08-31 18:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 31, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 434.95, 'high': 436.1, 'low': 432.1, 'close': 435.55, 'trades': 6777, 'volume': 6943486, 'vwap': 433.98, 'lastSize': 3000, 'turnover': 301332145445, 'homeNotional': 81342.87515804256, 'foreignNotional': 35301105.73531719}, {'timestamp': datetime.datetime(2020, 8, 31, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 436.7, 'high': 440.2, 'low': 434.35, 'close': 434.95, 'trades': 10306, 'volume': 11526678, 'vwap': 437.89, 'lastSize': 1, 'turnover': 504737034965, 'homeNotional': 135376.32268251057, 'foreignNotional': 59279704.354188174}, {'timestamp': datetime.datetime(2020, 8, 31, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 432.7, 'high': 438.95, 'low': 431.55, 'close': 436.7, 'trades': 10201, 'volume': 9500982, 'vwap': 435.03, 'lastSize': 13, 'turnover': 413314910110, 'homeNotional': 111139.81749917276, 'foreignNotional': 48348743.50842799}] 2020-08-31 18:00:20 INFO: prepare candles [CandleItem(low=432.1, high=436.1, open=434.95, close=435.55, color='GREEN'), CandleItem(low=434.35, high=440.2, open=436.7, close=434.95, color='RED'), CandleItem(low=431.55, high=438.95, open=432.7, close=436.7, color='GREEN')] 2020-08-31 18:00:20 INFO: skip by colors first_candle=CandleItem(low=431.55, high=438.95, open=432.7, close=436.7, color='GREEN') second_candle=CandleItem(low=434.35, high=440.2, open=436.7, close=434.95, color='RED') last_candle=CandleItem(low=432.1, high=436.1, open=434.95, close=435.55, color='GREEN') 2020-08-31 18:00:20 INFO: check need new order None 2020-08-31 18:00:20 INFO: init new order end 2020-08-31 18:00:20 INFO: 2020-08-31 18:00:20 INFO: 2020-08-31 18:00:20 INFO: 2020-08-31 18:00:20 INFO: 2020-08-31 18:02:00 INFO: 2020-08-31 18:02:00 INFO: 2020-08-31 18:02:00 INFO: 2020-08-31 18:02:00 INFO: 2020-08-31 18:02:00 INFO: clearing start 2020-08-31 18:02:00 INFO: clearing end 2020-08-31 18:02:00 INFO: 2020-08-31 18:02:00 INFO: 2020-08-31 18:02:00 INFO: 2020-08-31 18:02:00 INFO: 2020-08-31 19:00:20 INFO: 2020-08-31 19:00:20 INFO: 2020-08-31 19:00:20 INFO: 2020-08-31 19:00:20 INFO: 2020-08-31 19:00:20 INFO: init new order start 2020-08-31 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 31, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 435.55, 'high': 436.05, 'low': 432.6, 'close': 434.85, 'trades': 3804, 'volume': 3014539, 'vwap': 434.26, 'lastSize': 13, 'turnover': 130907344920, 'homeNotional': 35364.44688905824, 'foreignNotional': 15357152.205805544}, {'timestamp': datetime.datetime(2020, 8, 31, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 434.95, 'high': 436.1, 'low': 432.1, 'close': 435.55, 'trades': 6777, 'volume': 6943486, 'vwap': 433.98, 'lastSize': 3000, 'turnover': 301332145445, 'homeNotional': 81342.87515804256, 'foreignNotional': 35301105.73531719}, {'timestamp': datetime.datetime(2020, 8, 31, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 436.7, 'high': 440.2, 'low': 434.35, 'close': 434.95, 'trades': 10306, 'volume': 11526678, 'vwap': 437.89, 'lastSize': 1, 'turnover': 504737034965, 'homeNotional': 135376.32268251057, 'foreignNotional': 59279704.354188174}] 2020-08-31 19:00:20 INFO: prepare candles [CandleItem(low=432.6, high=436.05, open=435.55, close=434.85, color='RED'), CandleItem(low=432.1, high=436.1, open=434.95, close=435.55, color='GREEN'), CandleItem(low=434.35, high=440.2, open=436.7, close=434.95, color='RED')] 2020-08-31 19:00:20 INFO: skip by colors first_candle=CandleItem(low=434.35, high=440.2, open=436.7, close=434.95, color='RED') second_candle=CandleItem(low=432.1, high=436.1, open=434.95, close=435.55, color='GREEN') last_candle=CandleItem(low=432.6, high=436.05, open=435.55, close=434.85, color='RED') 2020-08-31 19:00:20 INFO: check need new order None 2020-08-31 19:00:20 INFO: init new order end 2020-08-31 19:00:20 INFO: 2020-08-31 19:00:20 INFO: 2020-08-31 19:00:20 INFO: 2020-08-31 19:00:20 INFO: 2020-08-31 19:02:00 INFO: 2020-08-31 19:02:00 INFO: 2020-08-31 19:02:00 INFO: 2020-08-31 19:02:00 INFO: 2020-08-31 19:02:00 INFO: clearing start 2020-08-31 19:02:00 INFO: clearing end 2020-08-31 19:02:00 INFO: 2020-08-31 19:02:00 INFO: 2020-08-31 19:02:00 INFO: 2020-08-31 19:02:00 INFO: 2020-08-31 20:00:20 INFO: 2020-08-31 20:00:20 INFO: 2020-08-31 20:00:20 INFO: 2020-08-31 20:00:20 INFO: 2020-08-31 20:00:20 INFO: init new order start 2020-08-31 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 31, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 434.85, 'high': 436.05, 'low': 433.0, 'close': 433.2, 'trades': 3778, 'volume': 3368848, 'vwap': 434.64, 'lastSize': 2471, 'turnover': 146422581110, 'homeNotional': 39538.31044405413, 'foreignNotional': 17184836.834134635}, {'timestamp': datetime.datetime(2020, 8, 31, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 435.55, 'high': 436.05, 'low': 432.6, 'close': 434.85, 'trades': 3804, 'volume': 3014539, 'vwap': 434.26, 'lastSize': 13, 'turnover': 130907344920, 'homeNotional': 35364.44688905824, 'foreignNotional': 15357152.205805544}, {'timestamp': datetime.datetime(2020, 8, 31, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 434.95, 'high': 436.1, 'low': 432.1, 'close': 435.55, 'trades': 6777, 'volume': 6943486, 'vwap': 433.98, 'lastSize': 3000, 'turnover': 301332145445, 'homeNotional': 81342.87515804256, 'foreignNotional': 35301105.73531719}] 2020-08-31 20:00:20 INFO: prepare candles [CandleItem(low=433.0, high=436.05, open=434.85, close=433.2, color='RED'), CandleItem(low=432.6, high=436.05, open=435.55, close=434.85, color='RED'), CandleItem(low=432.1, high=436.1, open=434.95, close=435.55, color='GREEN')] 2020-08-31 20:00:20 INFO: skip by colors first_candle=CandleItem(low=432.1, high=436.1, open=434.95, close=435.55, color='GREEN') second_candle=CandleItem(low=432.6, high=436.05, open=435.55, close=434.85, color='RED') last_candle=CandleItem(low=433.0, high=436.05, open=434.85, close=433.2, color='RED') 2020-08-31 20:00:20 INFO: check need new order None 2020-08-31 20:00:20 INFO: init new order end 2020-08-31 20:00:20 INFO: 2020-08-31 20:00:20 INFO: 2020-08-31 20:00:20 INFO: 2020-08-31 20:00:20 INFO: 2020-08-31 20:02:00 INFO: 2020-08-31 20:02:00 INFO: 2020-08-31 20:02:00 INFO: 2020-08-31 20:02:00 INFO: 2020-08-31 20:02:00 INFO: clearing start 2020-08-31 20:02:00 INFO: clearing end 2020-08-31 20:02:00 INFO: 2020-08-31 20:02:00 INFO: 2020-08-31 20:02:00 INFO: 2020-08-31 20:02:00 INFO: 2020-08-31 21:00:20 INFO: 2020-08-31 21:00:20 INFO: 2020-08-31 21:00:20 INFO: 2020-08-31 21:00:20 INFO: 2020-08-31 21:00:20 INFO: init new order start 2020-08-31 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 31, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 433.2, 'high': 435.2, 'low': 431.85, 'close': 434.35, 'trades': 2818, 'volume': 2238516, 'vwap': 433.41, 'lastSize': 4, 'turnover': 97019227820, 'homeNotional': 26231.559138530047, 'foreignNotional': 11368999.011752335}, {'timestamp': datetime.datetime(2020, 8, 31, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 434.85, 'high': 436.05, 'low': 433.0, 'close': 433.2, 'trades': 3778, 'volume': 3368848, 'vwap': 434.64, 'lastSize': 2471, 'turnover': 146422581110, 'homeNotional': 39538.31044405413, 'foreignNotional': 17184836.834134635}, {'timestamp': datetime.datetime(2020, 8, 31, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 435.55, 'high': 436.05, 'low': 432.6, 'close': 434.85, 'trades': 3804, 'volume': 3014539, 'vwap': 434.26, 'lastSize': 13, 'turnover': 130907344920, 'homeNotional': 35364.44688905824, 'foreignNotional': 15357152.205805544}] 2020-08-31 21:00:20 INFO: prepare candles [CandleItem(low=431.85, high=435.2, open=433.2, close=434.35, color='GREEN'), CandleItem(low=433.0, high=436.05, open=434.85, close=433.2, color='RED'), CandleItem(low=432.6, high=436.05, open=435.55, close=434.85, color='RED')] 2020-08-31 21:00:20 INFO: last_candle=CandleItem(low=431.85, high=435.2, open=433.2, close=434.35, color='GREEN') 2020-08-31 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-08-31 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=431.85, high=435.2, open=433.2, close=434.35, color='GREEN') 2020-08-31 21:00:20 INFO: skip by CandleItem(low=431.85, high=435.2, open=433.2, close=434.35, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-31 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-08-31 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=431.85, high=435.2, open=433.2, close=434.35, color='GREEN') 2020-08-31 21:00:20 INFO: skip by CandleItem(low=431.85, high=435.2, open=433.2, close=434.35, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-31 21:00:20 INFO: not found applicable config for candle 2020-08-31 21:00:20 INFO: check need new order None 2020-08-31 21:00:20 INFO: init new order end 2020-08-31 21:00:20 INFO: 2020-08-31 21:00:20 INFO: 2020-08-31 21:00:20 INFO: 2020-08-31 21:00:20 INFO: 2020-08-31 21:02:00 INFO: 2020-08-31 21:02:00 INFO: 2020-08-31 21:02:00 INFO: 2020-08-31 21:02:00 INFO: 2020-08-31 21:02:00 INFO: clearing start 2020-08-31 21:02:00 INFO: clearing end 2020-08-31 21:02:00 INFO: 2020-08-31 21:02:00 INFO: 2020-08-31 21:02:00 INFO: 2020-08-31 21:02:00 INFO: 2020-08-31 22:00:20 INFO: 2020-08-31 22:00:20 INFO: 2020-08-31 22:00:20 INFO: 2020-08-31 22:00:20 INFO: 2020-08-31 22:00:20 INFO: init new order start 2020-08-31 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 31, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 434.35, 'high': 439.4, 'low': 434.15, 'close': 437.15, 'trades': 4587, 'volume': 3686253, 'vwap': 436.76, 'lastSize': 1, 'turnover': 160997682665, 'homeNotional': 43229.57863131833, 'foreignNotional': 18880618.920904435}, {'timestamp': datetime.datetime(2020, 8, 31, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 433.2, 'high': 435.2, 'low': 431.85, 'close': 434.35, 'trades': 2818, 'volume': 2238516, 'vwap': 433.41, 'lastSize': 4, 'turnover': 97019227820, 'homeNotional': 26231.559138530047, 'foreignNotional': 11368999.011752335}, {'timestamp': datetime.datetime(2020, 8, 31, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 434.85, 'high': 436.05, 'low': 433.0, 'close': 433.2, 'trades': 3778, 'volume': 3368848, 'vwap': 434.64, 'lastSize': 2471, 'turnover': 146422581110, 'homeNotional': 39538.31044405413, 'foreignNotional': 17184836.834134635}] 2020-08-31 22:00:20 INFO: prepare candles [CandleItem(low=434.15, high=439.4, open=434.35, close=437.15, color='GREEN'), CandleItem(low=431.85, high=435.2, open=433.2, close=434.35, color='GREEN'), CandleItem(low=433.0, high=436.05, open=434.85, close=433.2, color='RED')] 2020-08-31 22:00:20 INFO: skip by colors first_candle=CandleItem(low=433.0, high=436.05, open=434.85, close=433.2, color='RED') second_candle=CandleItem(low=431.85, high=435.2, open=433.2, close=434.35, color='GREEN') last_candle=CandleItem(low=434.15, high=439.4, open=434.35, close=437.15, color='GREEN') 2020-08-31 22:00:20 INFO: check need new order None 2020-08-31 22:00:20 INFO: init new order end 2020-08-31 22:00:20 INFO: 2020-08-31 22:00:20 INFO: 2020-08-31 22:00:20 INFO: 2020-08-31 22:00:20 INFO: 2020-08-31 22:02:00 INFO: 2020-08-31 22:02:00 INFO: 2020-08-31 22:02:00 INFO: 2020-08-31 22:02:00 INFO: 2020-08-31 22:02:00 INFO: clearing start 2020-08-31 22:02:00 INFO: clearing end 2020-08-31 22:02:00 INFO: 2020-08-31 22:02:00 INFO: 2020-08-31 22:02:00 INFO: 2020-08-31 22:02:00 INFO: 2020-08-31 23:00:20 INFO: 2020-08-31 23:00:20 INFO: 2020-08-31 23:00:20 INFO: 2020-08-31 23:00:20 INFO: 2020-08-31 23:00:20 INFO: init new order start 2020-08-31 23:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 31, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 437.15, 'high': 438.9, 'low': 435.9, 'close': 437.3, 'trades': 3441, 'volume': 2793069, 'vwap': 437.56, 'lastSize': 40, 'turnover': 122211047980, 'homeNotional': 32755.17306217256, 'foreignNotional': 14332072.83035818}, {'timestamp': datetime.datetime(2020, 8, 31, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 434.35, 'high': 439.4, 'low': 434.15, 'close': 437.15, 'trades': 4587, 'volume': 3686253, 'vwap': 436.76, 'lastSize': 1, 'turnover': 160997682665, 'homeNotional': 43229.57863131833, 'foreignNotional': 18880618.920904435}, {'timestamp': datetime.datetime(2020, 8, 31, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 433.2, 'high': 435.2, 'low': 431.85, 'close': 434.35, 'trades': 2818, 'volume': 2238516, 'vwap': 433.41, 'lastSize': 4, 'turnover': 97019227820, 'homeNotional': 26231.559138530047, 'foreignNotional': 11368999.011752335}] 2020-08-31 23:00:20 INFO: prepare candles [CandleItem(low=435.9, high=438.9, open=437.15, close=437.3, color='GREEN'), CandleItem(low=434.15, high=439.4, open=434.35, close=437.15, color='GREEN'), CandleItem(low=431.85, high=435.2, open=433.2, close=434.35, color='GREEN')] 2020-08-31 23:00:20 INFO: skip by colors first_candle=CandleItem(low=431.85, high=435.2, open=433.2, close=434.35, color='GREEN') second_candle=CandleItem(low=434.15, high=439.4, open=434.35, close=437.15, color='GREEN') last_candle=CandleItem(low=435.9, high=438.9, open=437.15, close=437.3, color='GREEN') 2020-08-31 23:00:20 INFO: check need new order None 2020-08-31 23:00:20 INFO: init new order end 2020-08-31 23:00:20 INFO: 2020-08-31 23:00:20 INFO: 2020-08-31 23:00:20 INFO: 2020-08-31 23:00:20 INFO: 2020-08-31 23:02:00 INFO: 2020-08-31 23:02:00 INFO: 2020-08-31 23:02:00 INFO: 2020-08-31 23:02:00 INFO: 2020-08-31 23:02:00 INFO: clearing start 2020-08-31 23:02:00 INFO: clearing end 2020-08-31 23:02:00 INFO: 2020-08-31 23:02:00 INFO: 2020-08-31 23:02:00 INFO: 2020-08-31 23:02:00 INFO: 2020-09-01 00:00:20 INFO: 2020-09-01 00:00:20 INFO: 2020-09-01 00:00:20 INFO: 2020-09-01 00:00:20 INFO: 2020-09-01 00:00:20 INFO: init new order start 2020-09-01 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 31, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 437.3, 'high': 438.85, 'low': 430.0, 'close': 432.8, 'trades': 8870, 'volume': 6494026, 'vwap': 433.51, 'lastSize': 500, 'turnover': 281517398440, 'homeNotional': 75883.79157304399, 'foreignNotional': 32896133.974296197}, {'timestamp': datetime.datetime(2020, 8, 31, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 437.15, 'high': 438.9, 'low': 435.9, 'close': 437.3, 'trades': 3441, 'volume': 2793069, 'vwap': 437.56, 'lastSize': 40, 'turnover': 122211047980, 'homeNotional': 32755.17306217256, 'foreignNotional': 14332072.83035818}, {'timestamp': datetime.datetime(2020, 8, 31, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 434.35, 'high': 439.4, 'low': 434.15, 'close': 437.15, 'trades': 4587, 'volume': 3686253, 'vwap': 436.76, 'lastSize': 1, 'turnover': 160997682665, 'homeNotional': 43229.57863131833, 'foreignNotional': 18880618.920904435}] 2020-09-01 00:00:20 INFO: prepare candles [CandleItem(low=430.0, high=438.85, open=437.3, close=432.8, color='RED'), CandleItem(low=435.9, high=438.9, open=437.15, close=437.3, color='GREEN'), CandleItem(low=434.15, high=439.4, open=434.35, close=437.15, color='GREEN')] 2020-09-01 00:00:20 INFO: last_candle=CandleItem(low=430.0, high=438.85, open=437.3, close=432.8, color='RED') 2020-09-01 00:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-09-01 00:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=430.0, high=438.85, open=437.3, close=432.8, color='RED') 2020-09-01 00:00:20 INFO: skip by CandleItem(low=430.0, high=438.85, open=437.3, close=432.8, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-01 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-01 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=430.0, high=438.85, open=437.3, close=432.8, color='RED') 2020-09-01 00:00:20 INFO: skip by CandleItem(low=430.0, high=438.85, open=437.3, close=432.8, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-01 00:00:20 INFO: not found applicable config for candle 2020-09-01 00:00:20 INFO: check need new order None 2020-09-01 00:00:20 INFO: init new order end 2020-09-01 00:00:20 INFO: 2020-09-01 00:00:20 INFO: 2020-09-01 00:00:20 INFO: 2020-09-01 00:00:20 INFO: 2020-09-01 00:02:00 INFO: 2020-09-01 00:02:00 INFO: 2020-09-01 00:02:00 INFO: 2020-09-01 00:02:00 INFO: 2020-09-01 00:02:00 INFO: clearing start 2020-09-01 00:02:00 INFO: clearing end 2020-09-01 00:02:00 INFO: 2020-09-01 00:02:00 INFO: 2020-09-01 00:02:00 INFO: 2020-09-01 00:02:00 INFO: 2020-09-01 01:00:20 INFO: 2020-09-01 01:00:20 INFO: 2020-09-01 01:00:20 INFO: 2020-09-01 01:00:20 INFO: 2020-09-01 01:00:20 INFO: init new order start 2020-09-01 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 31, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 432.8, 'high': 435.35, 'low': 431.0, 'close': 431.4, 'trades': 3915, 'volume': 2970941, 'vwap': 433.13, 'lastSize': 2, 'turnover': 128677527960, 'homeNotional': 34691.63360654782, 'foreignNotional': 15025720.448489565}, {'timestamp': datetime.datetime(2020, 8, 31, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 437.3, 'high': 438.85, 'low': 430.0, 'close': 432.8, 'trades': 8870, 'volume': 6494026, 'vwap': 433.51, 'lastSize': 500, 'turnover': 281517398440, 'homeNotional': 75883.79157304399, 'foreignNotional': 32896133.974296197}, {'timestamp': datetime.datetime(2020, 8, 31, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 437.15, 'high': 438.9, 'low': 435.9, 'close': 437.3, 'trades': 3441, 'volume': 2793069, 'vwap': 437.56, 'lastSize': 40, 'turnover': 122211047980, 'homeNotional': 32755.17306217256, 'foreignNotional': 14332072.83035818}] 2020-09-01 01:00:20 INFO: prepare candles [CandleItem(low=431.0, high=435.35, open=432.8, close=431.4, color='RED'), CandleItem(low=430.0, high=438.85, open=437.3, close=432.8, color='RED'), CandleItem(low=435.9, high=438.9, open=437.15, close=437.3, color='GREEN')] 2020-09-01 01:00:20 INFO: skip by colors first_candle=CandleItem(low=435.9, high=438.9, open=437.15, close=437.3, color='GREEN') second_candle=CandleItem(low=430.0, high=438.85, open=437.3, close=432.8, color='RED') last_candle=CandleItem(low=431.0, high=435.35, open=432.8, close=431.4, color='RED') 2020-09-01 01:00:20 INFO: check need new order None 2020-09-01 01:00:20 INFO: init new order end 2020-09-01 01:00:20 INFO: 2020-09-01 01:00:20 INFO: 2020-09-01 01:00:20 INFO: 2020-09-01 01:00:20 INFO: 2020-09-01 01:02:00 INFO: 2020-09-01 01:02:00 INFO: 2020-09-01 01:02:00 INFO: 2020-09-01 01:02:00 INFO: 2020-09-01 01:02:00 INFO: clearing start 2020-09-01 01:02:00 INFO: clearing end 2020-09-01 01:02:00 INFO: 2020-09-01 01:02:00 INFO: 2020-09-01 01:02:00 INFO: 2020-09-01 01:02:00 INFO: 2020-09-01 02:00:20 INFO: 2020-09-01 02:00:20 INFO: 2020-09-01 02:00:20 INFO: 2020-09-01 02:00:20 INFO: 2020-09-01 02:00:20 INFO: init new order start 2020-09-01 02:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 31, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 431.4, 'high': 437.8, 'low': 430.15, 'close': 436.05, 'trades': 6362, 'volume': 4099747, 'vwap': 435.46, 'lastSize': 20, 'turnover': 178525817745, 'homeNotional': 47851.01006976161, 'foreignNotional': 20837079.88621152}, {'timestamp': datetime.datetime(2020, 8, 31, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 432.8, 'high': 435.35, 'low': 431.0, 'close': 431.4, 'trades': 3915, 'volume': 2970941, 'vwap': 433.13, 'lastSize': 2, 'turnover': 128677527960, 'homeNotional': 34691.63360654782, 'foreignNotional': 15025720.448489565}, {'timestamp': datetime.datetime(2020, 8, 31, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 437.3, 'high': 438.85, 'low': 430.0, 'close': 432.8, 'trades': 8870, 'volume': 6494026, 'vwap': 433.51, 'lastSize': 500, 'turnover': 281517398440, 'homeNotional': 75883.79157304399, 'foreignNotional': 32896133.974296197}] 2020-09-01 02:00:21 INFO: prepare candles [CandleItem(low=430.15, high=437.8, open=431.4, close=436.05, color='GREEN'), CandleItem(low=431.0, high=435.35, open=432.8, close=431.4, color='RED'), CandleItem(low=430.0, high=438.85, open=437.3, close=432.8, color='RED')] 2020-09-01 02:00:21 INFO: last_candle=CandleItem(low=430.15, high=437.8, open=431.4, close=436.05, color='GREEN') 2020-09-01 02: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-01 02: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=430.15, high=437.8, open=431.4, close=436.05, color='GREEN') 2020-09-01 02:00:21 INFO: skip by CandleItem(low=430.15, high=437.8, open=431.4, close=436.05, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-01 02: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-01 02: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=430.15, high=437.8, open=431.4, close=436.05, color='GREEN') 2020-09-01 02:00:21 INFO: apply filter None to candle=CandleItem(low=431.0, high=435.35, open=432.8, close=431.4, color='RED') 2020-09-01 02:00:21 INFO: apply filter None to candle=CandleItem(low=430.0, high=438.85, open=437.3, close=432.8, color='RED') 2020-09-01 02:00:21 INFO: hit candle order=OrderProperties(candle=CandleItem(low=430.15, high=437.8, open=431.4, close=436.05, color='GREEN'), take_profit_factor=5.0, clearing_interval=3600) 2020-09-01 02:00:21 INFO: check need new order OrderProperties(candle=CandleItem(low=430.15, high=437.8, open=431.4, close=436.05, color='GREEN'), take_profit_factor=5.0, clearing_interval=3600) 2020-09-01 02:00:21 INFO: place order: start candle=CandleItem(low=430.15, high=437.8, open=431.4, close=436.05, color='GREEN') ticker='ETHUSD' price_offset=0.1 2020-09-01 02:00:21 INFO: place order: side_factor=-1 init_trigger_price=437.85 init_order_price=437.90000000000003 stop_price_offset=0.0 candle.size=7.650000000000034 stop_price=430.15 take_price=476.1500000000002 2020-09-01 02:00:21 INFO: place order round: side_factor=-1 init_trigger_price=Decimal('437.8500000000000227373675443232059478759765625') init_order_price=Decimal('437.90000000000003410605131648480892181396484375') stop_price_offset=0.0 candle.size=7.650000000000034 stop_price=Decimal('430.1499999999999772626324556767940521240234375') take_price=Decimal('476.1500000000002046363078989088535308837890625') 2020-09-01 02:00:21 INFO: place order: compute qty=247 2020-09-01 02:00:21 INFO: place order: save order to db be8c7ec2bb7c493fb930d351011cf76a; response=True 2020-09-01 02:00:21 INFO: process event {'orderID': '53696d20-a2b0-e619-8d9b-a111935aa5d9', 'clOrdID': 'be8c7ec2bb7c493fb930d351011cf76a', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 247, 'price': 437.9, 'displayQty': None, 'stopPx': 437.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': 247, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-08-31T23:00:21.095Z', 'timestamp': '2020-08-31T23:00:21.095Z'} 2020-09-01 02:00:21 INFO: skip event be8c7ec2bb7c493fb930d351011cf76a New 2020-09-01 02:00:21 INFO: post order to exchange resp={'orderID': '53696d20-a2b0-e619-8d9b-a111935aa5d9', 'clOrdID': 'be8c7ec2bb7c493fb930d351011cf76a', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 247, 'price': 437.9, 'displayQty': None, 'stopPx': 437.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': 247, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 31, 23, 0, 21, 95000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 31, 23, 0, 21, 95000, tzinfo=tzutc())} 2020-09-01 02:00:21 INFO: place new init order {'qty': 247, 'init_price': Decimal('437.8500000000000227373675443232059478759765625'), 'stop_price': Decimal('430.1499999999999772626324556767940521240234375'), 'take_price': Decimal('476.1500000000002046363078989088535308837890625'), 'order_uid': 'be8c7ec2bb7c493fb930d351011cf76a', 'response': {'orderID': '53696d20-a2b0-e619-8d9b-a111935aa5d9', 'clOrdID': 'be8c7ec2bb7c493fb930d351011cf76a', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 247, 'price': 437.9, 'displayQty': None, 'stopPx': 437.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': 247, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 31, 23, 0, 21, 95000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 31, 23, 0, 21, 95000, tzinfo=tzutc())}} 2020-09-01 02:00:21 INFO: init new order end 2020-09-01 02:00:21 INFO: 2020-09-01 02:00:21 INFO: 2020-09-01 02:00:21 INFO: 2020-09-01 02:00:21 INFO: 2020-09-01 02:02:00 INFO: 2020-09-01 02:02:00 INFO: 2020-09-01 02:02:00 INFO: 2020-09-01 02:02:00 INFO: 2020-09-01 02:02:00 INFO: clearing start 2020-09-01 02:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '53696d20-a2b0-e619-8d9b-a111935aa5d9', 'clOrdID': 'be8c7ec2bb7c493fb930d351011cf76a', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 247, 'price': 437.9, 'displayQty': None, 'stopPx': 437.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': 247, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 31, 23, 0, 21, 95000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 31, 23, 0, 21, 95000, tzinfo=tzutc())} 2020-09-01 02:02:00 INFO: order time=2020-08-31 23:00:21.095000+00:00; delta from now UTC=0:01:39.188638 time_delta.total_seconds()=99.188638; time_diff_offset='3600' 2020-09-01 02:02:00 INFO: skip by time diff 2020-08-31 23:00:21.095000+00:00 2020-09-01 02:02:00 INFO: clearing end 2020-09-01 02:02:00 INFO: 2020-09-01 02:02:00 INFO: 2020-09-01 02:02:00 INFO: 2020-09-01 02:02:00 INFO: 2020-09-01 02:13:55 INFO: process event {'orderID': '53696d20-a2b0-e619-8d9b-a111935aa5d9', 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 247, 'avgPx': 437.9, 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'transactTime': '2020-08-31T23:13:55.797Z', 'timestamp': '2020-08-31T23:13:55.797Z', 'clOrdID': 'be8c7ec2bb7c493fb930d351011cf76a', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-01 02:13:55 INFO: add new event={'uid': 'be8c7ec2bb7c493fb930d351011cf76a', 'status': 'Filled'} 2020-09-01 02:13:56 INFO: 2020-09-01 02:13:56 INFO: 2020-09-01 02:13:56 INFO: 2020-09-01 02:13:56 INFO: 2020-09-01 02:13:56 INFO: process event start 2020-09-01 02:13:56 INFO: fetch new order event be8c7ec2bb7c493fb930d351011cf76a 2020-09-01 02:13:56 INFO: fetch orders by event init={'stop': '430.1499999999999772626324556767940521240234375', 'take': '476.1500000000002046363078989088535308837890625', 'qty': '247', 'color': 'GREEN', 'ticker': 'ETHUSD', 'clearing_offset': '3600'} profit_pair=None 2020-09-01 02:13:56 INFO: process init order filled 2020-09-01 02:13:56 INFO: save profit orders to storage stop=04dc97b96e88476eae76a1355ca8390e take=a66ab9c4033543ba8a36aebd316ceebe 2020-09-01 02:13:56 INFO: place profit orders take_price=476.1500000000002046363078989088535308837890625, stop_price=430.1499999999999772626324556767940521240234375, qty=247, color=GREEN, ticker=ETHUSD 04dc97b96e88476eae76a1355ca8390e a66ab9c4033543ba8a36aebd316ceebe 2020-09-01 02:13:56 INFO: place stop order ETHUSD: qty=-247, stop_price=430.1499999999999772626324556767940521240234375, stop_uid=04dc97b96e88476eae76a1355ca8390e 2020-09-01 02:13:56 INFO: exchange resp for stop order={'orderID': '870e4499-2189-fc3b-4de4-d1b0b98b8f37', 'clOrdID': '04dc97b96e88476eae76a1355ca8390e', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 247, 'price': None, 'displayQty': None, 'stopPx': 430.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': 247, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 31, 23, 13, 56, 185000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 31, 23, 13, 56, 185000, tzinfo=tzutc())} 2020-09-01 02:13:56 INFO: place limit order ETHUSD: qty=-247, price=476.1500000000002046363078989088535308837890625, take_uid=a66ab9c4033543ba8a36aebd316ceebe 2020-09-01 02:13:56 INFO: process event {'orderID': '870e4499-2189-fc3b-4de4-d1b0b98b8f37', 'clOrdID': '04dc97b96e88476eae76a1355ca8390e', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 247, 'price': None, 'displayQty': None, 'stopPx': 430.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': 247, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': '2020-08-31T23:13:56.185Z', 'timestamp': '2020-08-31T23:13:56.185Z'} 2020-09-01 02:13:56 INFO: skip event 04dc97b96e88476eae76a1355ca8390e New 2020-09-01 02:13:56 INFO: exchange resp for take profit order={'orderID': '16c90c4a-d2e7-7c2a-da14-a156cc5f0030', 'clOrdID': 'a66ab9c4033543ba8a36aebd316ceebe', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 247, 'price': 476.15, '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': 247, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 31, 23, 13, 56, 221000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 31, 23, 13, 56, 221000, tzinfo=tzutc())} 2020-09-01 02:13:56 INFO: place profit orders={'stop': {'response': {'orderID': '870e4499-2189-fc3b-4de4-d1b0b98b8f37', 'clOrdID': '04dc97b96e88476eae76a1355ca8390e', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 247, 'price': None, 'displayQty': None, 'stopPx': 430.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': 247, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 31, 23, 13, 56, 185000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 31, 23, 13, 56, 185000, tzinfo=tzutc())}, 'qty': Decimal('-247'), 'uid': '04dc97b96e88476eae76a1355ca8390e', 'price': Decimal('430.1499999999999772626324556767940521240234375')}, 'take': {'response': {'orderID': '16c90c4a-d2e7-7c2a-da14-a156cc5f0030', 'clOrdID': 'a66ab9c4033543ba8a36aebd316ceebe', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 247, 'price': 476.15, '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': 247, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 31, 23, 13, 56, 221000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 31, 23, 13, 56, 221000, tzinfo=tzutc())}, 'qty': Decimal('-247'), 'uid': 'a66ab9c4033543ba8a36aebd316ceebe', 'price': Decimal('476.1500000000002046363078989088535308837890625')}} 2020-09-01 02:13:56 INFO: process event {'orderID': '16c90c4a-d2e7-7c2a-da14-a156cc5f0030', 'clOrdID': 'a66ab9c4033543ba8a36aebd316ceebe', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 247, 'price': 476.15, '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': 247, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': '2020-08-31T23:13:56.221Z', 'timestamp': '2020-08-31T23:13:56.221Z'} 2020-09-01 02:13:56 INFO: skip event a66ab9c4033543ba8a36aebd316ceebe New 2020-09-01 02:13:56 INFO: rm init order from db be8c7ec2bb7c493fb930d351011cf76a 2020-09-01 02:13:56 INFO: end process event_processing_result='proceed init order' 2020-09-01 02:13:56 INFO: 2020-09-01 02:13:56 INFO: 2020-09-01 02:13:56 INFO: 2020-09-01 02:13:56 INFO: 2020-09-01 03:00:20 INFO: 2020-09-01 03:00:20 INFO: 2020-09-01 03:00:20 INFO: 2020-09-01 03:00:20 INFO: 2020-09-01 03:00:20 INFO: init new order start 2020-09-01 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 1, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 436.05, 'high': 438.45, 'low': 434.2, 'close': 434.25, 'trades': 5219, 'volume': 3115424, 'vwap': 436.81, 'lastSize': 714, 'turnover': 136083920390, 'homeNotional': 36390.65252419053, 'foreignNotional': 15895732.375434488}, {'timestamp': datetime.datetime(2020, 8, 31, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 431.4, 'high': 437.8, 'low': 430.15, 'close': 436.05, 'trades': 6362, 'volume': 4099747, 'vwap': 435.46, 'lastSize': 20, 'turnover': 178525817745, 'homeNotional': 47851.01006976161, 'foreignNotional': 20837079.88621152}, {'timestamp': datetime.datetime(2020, 8, 31, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 432.8, 'high': 435.35, 'low': 431.0, 'close': 431.4, 'trades': 3915, 'volume': 2970941, 'vwap': 433.13, 'lastSize': 2, 'turnover': 128677527960, 'homeNotional': 34691.63360654782, 'foreignNotional': 15025720.448489565}] 2020-09-01 03:00:20 INFO: prepare candles [CandleItem(low=434.2, high=438.45, open=436.05, close=434.25, color='RED'), CandleItem(low=430.15, high=437.8, open=431.4, close=436.05, color='GREEN'), CandleItem(low=431.0, high=435.35, open=432.8, close=431.4, color='RED')] 2020-09-01 03:00:20 INFO: skip by colors first_candle=CandleItem(low=431.0, high=435.35, open=432.8, close=431.4, color='RED') second_candle=CandleItem(low=430.15, high=437.8, open=431.4, close=436.05, color='GREEN') last_candle=CandleItem(low=434.2, high=438.45, open=436.05, close=434.25, color='RED') 2020-09-01 03:00:20 INFO: check need new order None 2020-09-01 03:00:20 INFO: init new order end 2020-09-01 03:00:20 INFO: 2020-09-01 03:00:20 INFO: 2020-09-01 03:00:20 INFO: 2020-09-01 03:00:20 INFO: 2020-09-01 03:02:00 INFO: 2020-09-01 03:02:00 INFO: 2020-09-01 03:02:00 INFO: 2020-09-01 03:02:00 INFO: 2020-09-01 03:02:00 INFO: clearing start 2020-09-01 03:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '870e4499-2189-fc3b-4de4-d1b0b98b8f37', 'clOrdID': '04dc97b96e88476eae76a1355ca8390e', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 247, 'price': None, 'displayQty': None, 'stopPx': 430.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': 247, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 31, 23, 13, 56, 185000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 31, 23, 13, 56, 185000, tzinfo=tzutc())} 2020-09-01 03:02:00 INFO: skip by not found init order into storage 2020-09-01 03:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '16c90c4a-d2e7-7c2a-da14-a156cc5f0030', 'clOrdID': 'a66ab9c4033543ba8a36aebd316ceebe', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 247, 'price': 476.15, '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': 247, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 31, 23, 13, 56, 221000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 31, 23, 13, 56, 221000, tzinfo=tzutc())} 2020-09-01 03:02:00 INFO: skip by not found init order into storage 2020-09-01 03:02:00 INFO: clearing end 2020-09-01 03:02:00 INFO: 2020-09-01 03:02:00 INFO: 2020-09-01 03:02:00 INFO: 2020-09-01 03:02:00 INFO: 2020-09-01 03:21:18 INFO: process event {'orderID': '870e4499-2189-fc3b-4de4-d1b0b98b8f37', 'price': 430.1, 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 247, 'avgPx': 430.1, 'text': 'Triggered: Order stop price reached\nStop order by trader.py', 'transactTime': '2020-09-01T00:21:18.440Z', 'timestamp': '2020-09-01T00:21:18.440Z', 'clOrdID': '04dc97b96e88476eae76a1355ca8390e', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-01 03:21:18 INFO: add new event={'uid': '04dc97b96e88476eae76a1355ca8390e', 'status': 'Filled'} 2020-09-01 03:21:19 INFO: 2020-09-01 03:21:19 INFO: 2020-09-01 03:21:19 INFO: 2020-09-01 03:21:19 INFO: 2020-09-01 03:21:19 INFO: process event start 2020-09-01 03:21:19 INFO: fetch new order event 04dc97b96e88476eae76a1355ca8390e 2020-09-01 03:21:19 INFO: fetch orders by event init=None profit_pair=a66ab9c4033543ba8a36aebd316ceebe 2020-09-01 03:21:19 INFO: process profit order filled Traceback (most recent call last): File "app/trader.py", line 131, in main() File "app/trader.py", line 116, in main event_processing_result = proceed_event(current_event['uid']) File "/home/crypto/current/app/event_driven_operations.py", line 48, in proceed_event cancel_resp = cancel_order(profit_order_pair_uid, comment='Cancel order by trader.py') File "/home/crypto/current/app/bitmex_rest.py", line 39, in cancel_order return client_rest.Order.Order_cancel(clOrdID=order_uid, text=comment).result()[0] File "/home/crypto/venv/lib/python3.8/site-packages/bravado/http_future.py", line 271, in result swagger_result = self._get_swagger_result(incoming_response) File "/home/crypto/venv/lib/python3.8/site-packages/bravado/http_future.py", line 124, in wrapper return func(self, *args, **kwargs) File "/home/crypto/venv/lib/python3.8/site-packages/bravado/http_future.py", line 300, in _get_swagger_result unmarshal_response( File "/home/crypto/venv/lib/python3.8/site-packages/bravado/http_future.py", line 334, in unmarshal_response raise_on_unexpected(incoming_response) File "/home/crypto/venv/lib/python3.8/site-packages/bravado/http_future.py", line 408, in raise_on_unexpected raise make_http_exception(response=http_response) bravado.exception.HTTPBadGateway: 502 Bad Gateway: 502 Bad Gateway

502 Bad Gateway

/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-01 03:21:22 INFO: 2020-09-01 03:21:22 INFO: 2020-09-01 03:21:22 INFO: 2020-09-01 03:21:22 INFO: 2020-09-01 03:21:22 INFO: start trader process 2020-09-01 03:21:22 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-09-01 03:21:22 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-09-01 03:21:22 INFO: Authenticating with API Key. 2020-09-01 03:21:23 INFO: Connected to WS. 2020-09-01 04:00:20 INFO: 2020-09-01 04:00:20 INFO: 2020-09-01 04:00:20 INFO: 2020-09-01 04:00:20 INFO: 2020-09-01 04:00:20 INFO: init new order start 2020-09-01 04:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 1, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 434.25, 'high': 435.75, 'low': 430.05, 'close': 433.65, 'trades': 5367, 'volume': 3457936, 'vwap': 432.56, 'lastSize': 11, 'turnover': 149575524835, 'homeNotional': 40184.619978446535, 'foreignNotional': 17382231.596497394}, {'timestamp': datetime.datetime(2020, 9, 1, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 436.05, 'high': 438.45, 'low': 434.2, 'close': 434.25, 'trades': 5219, 'volume': 3115424, 'vwap': 436.81, 'lastSize': 714, 'turnover': 136083920390, 'homeNotional': 36390.65252419053, 'foreignNotional': 15895732.375434488}, {'timestamp': datetime.datetime(2020, 8, 31, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 431.4, 'high': 437.8, 'low': 430.15, 'close': 436.05, 'trades': 6362, 'volume': 4099747, 'vwap': 435.46, 'lastSize': 20, 'turnover': 178525817745, 'homeNotional': 47851.01006976161, 'foreignNotional': 20837079.88621152}] 2020-09-01 04:00:20 INFO: prepare candles [CandleItem(low=430.05, high=435.75, open=434.25, close=433.65, color='RED'), CandleItem(low=434.2, high=438.45, open=436.05, close=434.25, color='RED'), CandleItem(low=430.15, high=437.8, open=431.4, close=436.05, color='GREEN')] 2020-09-01 04:00:20 INFO: skip by colors first_candle=CandleItem(low=430.15, high=437.8, open=431.4, close=436.05, color='GREEN') second_candle=CandleItem(low=434.2, high=438.45, open=436.05, close=434.25, color='RED') last_candle=CandleItem(low=430.05, high=435.75, open=434.25, close=433.65, color='RED') 2020-09-01 04:00:20 INFO: check need new order None 2020-09-01 04:00:20 INFO: init new order end 2020-09-01 04:00:20 INFO: 2020-09-01 04:00:20 INFO: 2020-09-01 04:00:20 INFO: 2020-09-01 04:00:20 INFO: 2020-09-01 04:02:00 INFO: 2020-09-01 04:02:00 INFO: 2020-09-01 04:02:00 INFO: 2020-09-01 04:02:00 INFO: 2020-09-01 04: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-01 04:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '16c90c4a-d2e7-7c2a-da14-a156cc5f0030', 'clOrdID': 'a66ab9c4033543ba8a36aebd316ceebe', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 247, 'price': 476.15, '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': 247, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 31, 23, 13, 56, 221000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 31, 23, 13, 56, 221000, tzinfo=tzutc())} 2020-09-01 04:02:00 INFO: skip by not found init order into storage 2020-09-01 04:02:00 INFO: clearing end 2020-09-01 04:02:00 INFO: 2020-09-01 04:02:00 INFO: 2020-09-01 04:02:00 INFO: 2020-09-01 04:02:00 INFO: 2020-09-01 05:00:20 INFO: 2020-09-01 05:00:20 INFO: 2020-09-01 05:00:20 INFO: 2020-09-01 05:00:20 INFO: 2020-09-01 05:00:20 INFO: init new order start 2020-09-01 05:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 1, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 433.65, 'high': 437.25, 'low': 433.05, 'close': 436.55, 'trades': 3231, 'volume': 2365412, 'vwap': 435.33, 'lastSize': 200, 'turnover': 102972137710, 'homeNotional': 27485.747939809295, 'foreignNotional': 11965242.817365045}, {'timestamp': datetime.datetime(2020, 9, 1, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 434.25, 'high': 435.75, 'low': 430.05, 'close': 433.65, 'trades': 5367, 'volume': 3457936, 'vwap': 432.56, 'lastSize': 11, 'turnover': 149575524835, 'homeNotional': 40184.619978446535, 'foreignNotional': 17382231.596497394}, {'timestamp': datetime.datetime(2020, 9, 1, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 436.05, 'high': 438.45, 'low': 434.2, 'close': 434.25, 'trades': 5219, 'volume': 3115424, 'vwap': 436.81, 'lastSize': 714, 'turnover': 136083920390, 'homeNotional': 36390.65252419053, 'foreignNotional': 15895732.375434488}] 2020-09-01 05:00:21 INFO: prepare candles [CandleItem(low=433.05, high=437.25, open=433.65, close=436.55, color='GREEN'), CandleItem(low=430.05, high=435.75, open=434.25, close=433.65, color='RED'), CandleItem(low=434.2, high=438.45, open=436.05, close=434.25, color='RED')] 2020-09-01 05:00:21 INFO: last_candle=CandleItem(low=433.05, high=437.25, open=433.65, close=436.55, color='GREEN') 2020-09-01 05: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-01 05: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=433.05, high=437.25, open=433.65, close=436.55, color='GREEN') 2020-09-01 05:00:21 INFO: skip by CandleItem(low=433.05, high=437.25, open=433.65, close=436.55, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-01 05: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-01 05: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=433.05, high=437.25, open=433.65, close=436.55, color='GREEN') 2020-09-01 05:00:21 INFO: skip by CandleItem(low=433.05, high=437.25, open=433.65, close=436.55, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-01 05:00:21 INFO: not found applicable config for candle 2020-09-01 05:00:21 INFO: check need new order None 2020-09-01 05:00:21 INFO: init new order end 2020-09-01 05:00:21 INFO: 2020-09-01 05:00:21 INFO: 2020-09-01 05:00:21 INFO: 2020-09-01 05:00:21 INFO: 2020-09-01 05:02:00 INFO: 2020-09-01 05:02:00 INFO: 2020-09-01 05:02:00 INFO: 2020-09-01 05:02:00 INFO: 2020-09-01 05:02:00 INFO: clearing start 2020-09-01 05:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '16c90c4a-d2e7-7c2a-da14-a156cc5f0030', 'clOrdID': 'a66ab9c4033543ba8a36aebd316ceebe', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 247, 'price': 476.15, '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': 247, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 31, 23, 13, 56, 221000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 31, 23, 13, 56, 221000, tzinfo=tzutc())} 2020-09-01 05:02:00 INFO: skip by not found init order into storage 2020-09-01 05:02:00 INFO: clearing end 2020-09-01 05:02:00 INFO: 2020-09-01 05:02:00 INFO: 2020-09-01 05:02:00 INFO: 2020-09-01 05:02:00 INFO: 2020-09-01 06:00:20 INFO: 2020-09-01 06:00:20 INFO: 2020-09-01 06:00:20 INFO: 2020-09-01 06:00:20 INFO: 2020-09-01 06:00:20 INFO: init new order start 2020-09-01 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 1, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 436.55, 'high': 437.5, 'low': 435.45, 'close': 437.4, 'trades': 2977, 'volume': 1860723, 'vwap': 436.49, 'lastSize': 12, 'turnover': 81218101285, 'homeNotional': 21634.40424515069, 'foreignNotional': 9443137.13572711}, {'timestamp': datetime.datetime(2020, 9, 1, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 433.65, 'high': 437.25, 'low': 433.05, 'close': 436.55, 'trades': 3231, 'volume': 2365412, 'vwap': 435.33, 'lastSize': 200, 'turnover': 102972137710, 'homeNotional': 27485.747939809295, 'foreignNotional': 11965242.817365045}, {'timestamp': datetime.datetime(2020, 9, 1, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 434.25, 'high': 435.75, 'low': 430.05, 'close': 433.65, 'trades': 5367, 'volume': 3457936, 'vwap': 432.56, 'lastSize': 11, 'turnover': 149575524835, 'homeNotional': 40184.619978446535, 'foreignNotional': 17382231.596497394}] 2020-09-01 06:00:20 INFO: prepare candles [CandleItem(low=435.45, high=437.5, open=436.55, close=437.4, color='GREEN'), CandleItem(low=433.05, high=437.25, open=433.65, close=436.55, color='GREEN'), CandleItem(low=430.05, high=435.75, open=434.25, close=433.65, color='RED')] 2020-09-01 06:00:20 INFO: skip by colors first_candle=CandleItem(low=430.05, high=435.75, open=434.25, close=433.65, color='RED') second_candle=CandleItem(low=433.05, high=437.25, open=433.65, close=436.55, color='GREEN') last_candle=CandleItem(low=435.45, high=437.5, open=436.55, close=437.4, color='GREEN') 2020-09-01 06:00:20 INFO: check need new order None 2020-09-01 06:00:20 INFO: init new order end 2020-09-01 06:00:20 INFO: 2020-09-01 06:00:20 INFO: 2020-09-01 06:00:20 INFO: 2020-09-01 06:00:20 INFO: 2020-09-01 06:02:00 INFO: 2020-09-01 06:02:00 INFO: 2020-09-01 06:02:00 INFO: 2020-09-01 06:02:00 INFO: 2020-09-01 06:02:00 INFO: clearing start 2020-09-01 06:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '16c90c4a-d2e7-7c2a-da14-a156cc5f0030', 'clOrdID': 'a66ab9c4033543ba8a36aebd316ceebe', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 247, 'price': 476.15, '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': 247, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 31, 23, 13, 56, 221000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 31, 23, 13, 56, 221000, tzinfo=tzutc())} 2020-09-01 06:02:00 INFO: skip by not found init order into storage 2020-09-01 06:02:00 INFO: clearing end 2020-09-01 06:02:00 INFO: 2020-09-01 06:02:00 INFO: 2020-09-01 06:02:00 INFO: 2020-09-01 06:02:00 INFO: 2020-09-01 07:00:20 INFO: 2020-09-01 07:00:20 INFO: 2020-09-01 07:00:20 INFO: 2020-09-01 07:00:20 INFO: 2020-09-01 07:00:20 INFO: init new order start 2020-09-01 07:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 1, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 437.4, 'high': 444.9, 'low': 436.5, 'close': 444.3, 'trades': 7838, 'volume': 6508584, 'vwap': 441.55, 'lastSize': 20, 'turnover': 287383687045, 'homeNotional': 75949.23810709674, 'foreignNotional': 33535430.045432}, {'timestamp': datetime.datetime(2020, 9, 1, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 436.55, 'high': 437.5, 'low': 435.45, 'close': 437.4, 'trades': 2977, 'volume': 1860723, 'vwap': 436.49, 'lastSize': 12, 'turnover': 81218101285, 'homeNotional': 21634.40424515069, 'foreignNotional': 9443137.13572711}, {'timestamp': datetime.datetime(2020, 9, 1, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 433.65, 'high': 437.25, 'low': 433.05, 'close': 436.55, 'trades': 3231, 'volume': 2365412, 'vwap': 435.33, 'lastSize': 200, 'turnover': 102972137710, 'homeNotional': 27485.747939809295, 'foreignNotional': 11965242.817365045}] 2020-09-01 07:00:20 INFO: prepare candles [CandleItem(low=436.5, high=444.9, open=437.4, close=444.3, color='GREEN'), CandleItem(low=435.45, high=437.5, open=436.55, close=437.4, color='GREEN'), CandleItem(low=433.05, high=437.25, open=433.65, close=436.55, color='GREEN')] 2020-09-01 07:00:20 INFO: skip by colors first_candle=CandleItem(low=433.05, high=437.25, open=433.65, close=436.55, color='GREEN') second_candle=CandleItem(low=435.45, high=437.5, open=436.55, close=437.4, color='GREEN') last_candle=CandleItem(low=436.5, high=444.9, open=437.4, close=444.3, color='GREEN') 2020-09-01 07:00:20 INFO: check need new order None 2020-09-01 07:00:20 INFO: init new order end 2020-09-01 07:00:20 INFO: 2020-09-01 07:00:20 INFO: 2020-09-01 07:00:20 INFO: 2020-09-01 07:00:20 INFO: 2020-09-01 07:02:00 INFO: 2020-09-01 07:02:00 INFO: 2020-09-01 07:02:00 INFO: 2020-09-01 07:02:00 INFO: 2020-09-01 07:02:00 INFO: clearing start 2020-09-01 07:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '16c90c4a-d2e7-7c2a-da14-a156cc5f0030', 'clOrdID': 'a66ab9c4033543ba8a36aebd316ceebe', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 247, 'price': 476.15, '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': 247, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 31, 23, 13, 56, 221000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 31, 23, 13, 56, 221000, tzinfo=tzutc())} 2020-09-01 07:02:00 INFO: skip by not found init order into storage 2020-09-01 07:02:00 INFO: clearing end 2020-09-01 07:02:00 INFO: 2020-09-01 07:02:00 INFO: 2020-09-01 07:02:00 INFO: 2020-09-01 07:02:00 INFO: 2020-09-01 08:00:20 INFO: 2020-09-01 08:00:20 INFO: 2020-09-01 08:00:20 INFO: 2020-09-01 08:00:20 INFO: 2020-09-01 08:00:20 INFO: init new order start 2020-09-01 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 1, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 444.3, 'high': 448.1, 'low': 443.1, 'close': 445.9, 'trades': 7138, 'volume': 6911349, 'vwap': 445.58, 'lastSize': 1000, 'turnover': 307955112590, 'homeNotional': 80918.7922124024, 'foreignNotional': 36055753.18798262}, {'timestamp': datetime.datetime(2020, 9, 1, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 437.4, 'high': 444.9, 'low': 436.5, 'close': 444.3, 'trades': 7838, 'volume': 6508584, 'vwap': 441.55, 'lastSize': 20, 'turnover': 287383687045, 'homeNotional': 75949.23810709674, 'foreignNotional': 33535430.045432}, {'timestamp': datetime.datetime(2020, 9, 1, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 436.55, 'high': 437.5, 'low': 435.45, 'close': 437.4, 'trades': 2977, 'volume': 1860723, 'vwap': 436.49, 'lastSize': 12, 'turnover': 81218101285, 'homeNotional': 21634.40424515069, 'foreignNotional': 9443137.13572711}] 2020-09-01 08:00:20 INFO: prepare candles [CandleItem(low=443.1, high=448.1, open=444.3, close=445.9, color='GREEN'), CandleItem(low=436.5, high=444.9, open=437.4, close=444.3, color='GREEN'), CandleItem(low=435.45, high=437.5, open=436.55, close=437.4, color='GREEN')] 2020-09-01 08:00:20 INFO: skip by colors first_candle=CandleItem(low=435.45, high=437.5, open=436.55, close=437.4, color='GREEN') second_candle=CandleItem(low=436.5, high=444.9, open=437.4, close=444.3, color='GREEN') last_candle=CandleItem(low=443.1, high=448.1, open=444.3, close=445.9, color='GREEN') 2020-09-01 08:00:20 INFO: check need new order None 2020-09-01 08:00:20 INFO: init new order end 2020-09-01 08:00:20 INFO: 2020-09-01 08:00:20 INFO: 2020-09-01 08:00:20 INFO: 2020-09-01 08:00:20 INFO: 2020-09-01 08:02:00 INFO: 2020-09-01 08:02:00 INFO: 2020-09-01 08:02:00 INFO: 2020-09-01 08:02:00 INFO: 2020-09-01 08:02:00 INFO: clearing start 2020-09-01 08:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '16c90c4a-d2e7-7c2a-da14-a156cc5f0030', 'clOrdID': 'a66ab9c4033543ba8a36aebd316ceebe', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 247, 'price': 476.15, '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': 247, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 31, 23, 13, 56, 221000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 31, 23, 13, 56, 221000, tzinfo=tzutc())} 2020-09-01 08:02:00 INFO: skip by not found init order into storage 2020-09-01 08:02:00 INFO: clearing end 2020-09-01 08:02:00 INFO: 2020-09-01 08:02:00 INFO: 2020-09-01 08:02:00 INFO: 2020-09-01 08:02:00 INFO: 2020-09-01 09:00:20 INFO: 2020-09-01 09:00:20 INFO: 2020-09-01 09:00:20 INFO: 2020-09-01 09:00:20 INFO: 2020-09-01 09:00:20 INFO: init new order start 2020-09-01 09:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 1, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 445.9, 'high': 456.5, 'low': 444.0, 'close': 456.45, 'trades': 10309, 'volume': 8874606, 'vwap': 450.18, 'lastSize': 49, 'turnover': 399513290030, 'homeNotional': 104251.51132327151, 'foreignNotional': 46932520.39621981}, {'timestamp': datetime.datetime(2020, 9, 1, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 444.3, 'high': 448.1, 'low': 443.1, 'close': 445.9, 'trades': 7138, 'volume': 6911349, 'vwap': 445.58, 'lastSize': 1000, 'turnover': 307955112590, 'homeNotional': 80918.7922124024, 'foreignNotional': 36055753.18798262}, {'timestamp': datetime.datetime(2020, 9, 1, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 437.4, 'high': 444.9, 'low': 436.5, 'close': 444.3, 'trades': 7838, 'volume': 6508584, 'vwap': 441.55, 'lastSize': 20, 'turnover': 287383687045, 'homeNotional': 75949.23810709674, 'foreignNotional': 33535430.045432}] 2020-09-01 09:00:20 INFO: prepare candles [CandleItem(low=444.0, high=456.5, open=445.9, close=456.45, color='GREEN'), CandleItem(low=443.1, high=448.1, open=444.3, close=445.9, color='GREEN'), CandleItem(low=436.5, high=444.9, open=437.4, close=444.3, color='GREEN')] 2020-09-01 09:00:20 INFO: skip by colors first_candle=CandleItem(low=436.5, high=444.9, open=437.4, close=444.3, color='GREEN') second_candle=CandleItem(low=443.1, high=448.1, open=444.3, close=445.9, color='GREEN') last_candle=CandleItem(low=444.0, high=456.5, open=445.9, close=456.45, color='GREEN') 2020-09-01 09:00:20 INFO: check need new order None 2020-09-01 09:00:20 INFO: init new order end 2020-09-01 09:00:20 INFO: 2020-09-01 09:00:20 INFO: 2020-09-01 09:00:20 INFO: 2020-09-01 09:00:20 INFO: 2020-09-01 09:02:00 INFO: 2020-09-01 09:02:00 INFO: 2020-09-01 09:02:00 INFO: 2020-09-01 09:02:00 INFO: 2020-09-01 09:02:00 INFO: clearing start 2020-09-01 09:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '16c90c4a-d2e7-7c2a-da14-a156cc5f0030', 'clOrdID': 'a66ab9c4033543ba8a36aebd316ceebe', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 247, 'price': 476.15, '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': 247, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 31, 23, 13, 56, 221000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 31, 23, 13, 56, 221000, tzinfo=tzutc())} 2020-09-01 09:02:00 INFO: skip by not found init order into storage 2020-09-01 09:02:00 INFO: clearing end 2020-09-01 09:02:00 INFO: 2020-09-01 09:02:00 INFO: 2020-09-01 09:02:00 INFO: 2020-09-01 09:02:00 INFO: 2020-09-01 10:00:20 INFO: 2020-09-01 10:00:20 INFO: 2020-09-01 10:00:20 INFO: 2020-09-01 10:00:20 INFO: 2020-09-01 10:00:20 INFO: init new order start 2020-09-01 10:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 1, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 456.45, 'high': 467.2, 'low': 455.75, 'close': 464.4, 'trades': 18251, 'volume': 18966911, 'vwap': 461.95, 'lastSize': 12, 'turnover': 876158987695, 'homeNotional': 224347.21776793356, 'foreignNotional': 103636212.81091249}, {'timestamp': datetime.datetime(2020, 9, 1, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 445.9, 'high': 456.5, 'low': 444.0, 'close': 456.45, 'trades': 10309, 'volume': 8874606, 'vwap': 450.18, 'lastSize': 49, 'turnover': 399513290030, 'homeNotional': 104251.51132327151, 'foreignNotional': 46932520.39621981}, {'timestamp': datetime.datetime(2020, 9, 1, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 444.3, 'high': 448.1, 'low': 443.1, 'close': 445.9, 'trades': 7138, 'volume': 6911349, 'vwap': 445.58, 'lastSize': 1000, 'turnover': 307955112590, 'homeNotional': 80918.7922124024, 'foreignNotional': 36055753.18798262}] 2020-09-01 10:00:20 INFO: prepare candles [CandleItem(low=455.75, high=467.2, open=456.45, close=464.4, color='GREEN'), CandleItem(low=444.0, high=456.5, open=445.9, close=456.45, color='GREEN'), CandleItem(low=443.1, high=448.1, open=444.3, close=445.9, color='GREEN')] 2020-09-01 10:00:20 INFO: skip by colors first_candle=CandleItem(low=443.1, high=448.1, open=444.3, close=445.9, color='GREEN') second_candle=CandleItem(low=444.0, high=456.5, open=445.9, close=456.45, color='GREEN') last_candle=CandleItem(low=455.75, high=467.2, open=456.45, close=464.4, color='GREEN') 2020-09-01 10:00:20 INFO: check need new order None 2020-09-01 10:00:20 INFO: init new order end 2020-09-01 10:00:20 INFO: 2020-09-01 10:00:20 INFO: 2020-09-01 10:00:20 INFO: 2020-09-01 10:00:20 INFO: 2020-09-01 10:02:00 INFO: 2020-09-01 10:02:00 INFO: 2020-09-01 10:02:00 INFO: 2020-09-01 10:02:00 INFO: 2020-09-01 10:02:00 INFO: clearing start 2020-09-01 10:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '16c90c4a-d2e7-7c2a-da14-a156cc5f0030', 'clOrdID': 'a66ab9c4033543ba8a36aebd316ceebe', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 247, 'price': 476.15, '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': 247, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 31, 23, 13, 56, 221000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 31, 23, 13, 56, 221000, tzinfo=tzutc())} 2020-09-01 10:02:01 INFO: skip by not found init order into storage 2020-09-01 10:02:01 INFO: clearing end 2020-09-01 10:02:01 INFO: 2020-09-01 10:02:01 INFO: 2020-09-01 10:02:01 INFO: 2020-09-01 10:02:01 INFO: 2020-09-01 11:00:20 INFO: 2020-09-01 11:00:20 INFO: 2020-09-01 11:00:20 INFO: 2020-09-01 11:00:20 INFO: 2020-09-01 11:00:20 INFO: init new order start 2020-09-01 11:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 1, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 464.4, 'high': 466.55, 'low': 459.15, 'close': 464.05, 'trades': 9722, 'volume': 8897790, 'vwap': 462.28, 'lastSize': 13, 'turnover': 411323654805, 'homeNotional': 105869.65627227776, 'foreignNotional': 48941001.430338375}, {'timestamp': datetime.datetime(2020, 9, 1, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 456.45, 'high': 467.2, 'low': 455.75, 'close': 464.4, 'trades': 18251, 'volume': 18966911, 'vwap': 461.95, 'lastSize': 12, 'turnover': 876158987695, 'homeNotional': 224347.21776793356, 'foreignNotional': 103636212.81091249}, {'timestamp': datetime.datetime(2020, 9, 1, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 445.9, 'high': 456.5, 'low': 444.0, 'close': 456.45, 'trades': 10309, 'volume': 8874606, 'vwap': 450.18, 'lastSize': 49, 'turnover': 399513290030, 'homeNotional': 104251.51132327151, 'foreignNotional': 46932520.39621981}] 2020-09-01 11:00:20 INFO: prepare candles [CandleItem(low=459.15, high=466.55, open=464.4, close=464.05, color='RED'), CandleItem(low=455.75, high=467.2, open=456.45, close=464.4, color='GREEN'), CandleItem(low=444.0, high=456.5, open=445.9, close=456.45, color='GREEN')] 2020-09-01 11:00:20 INFO: last_candle=CandleItem(low=459.15, high=466.55, open=464.4, close=464.05, color='RED') 2020-09-01 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-01 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=459.15, high=466.55, open=464.4, close=464.05, color='RED') 2020-09-01 11:00:20 INFO: skip by CandleItem(low=459.15, high=466.55, open=464.4, close=464.05, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-01 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-01 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=459.15, high=466.55, open=464.4, close=464.05, color='RED') 2020-09-01 11:00:20 INFO: skip by CandleItem(low=459.15, high=466.55, open=464.4, close=464.05, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-01 11:00:20 INFO: not found applicable config for candle 2020-09-01 11:00:20 INFO: check need new order None 2020-09-01 11:00:20 INFO: init new order end 2020-09-01 11:00:20 INFO: 2020-09-01 11:00:20 INFO: 2020-09-01 11:00:20 INFO: 2020-09-01 11:00:20 INFO: 2020-09-01 11:02:00 INFO: 2020-09-01 11:02:00 INFO: 2020-09-01 11:02:00 INFO: 2020-09-01 11:02:00 INFO: 2020-09-01 11:02:00 INFO: clearing start 2020-09-01 11:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '16c90c4a-d2e7-7c2a-da14-a156cc5f0030', 'clOrdID': 'a66ab9c4033543ba8a36aebd316ceebe', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 247, 'price': 476.15, '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': 247, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 31, 23, 13, 56, 221000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 31, 23, 13, 56, 221000, tzinfo=tzutc())} 2020-09-01 11:02:00 INFO: skip by not found init order into storage 2020-09-01 11:02:00 INFO: clearing end 2020-09-01 11:02:00 INFO: 2020-09-01 11:02:00 INFO: 2020-09-01 11:02:00 INFO: 2020-09-01 11:02:00 INFO: 2020-09-01 12:00:20 INFO: 2020-09-01 12:00:20 INFO: 2020-09-01 12:00:20 INFO: 2020-09-01 12:00:20 INFO: 2020-09-01 12:00:20 INFO: init new order start 2020-09-01 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 1, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 464.05, 'high': 464.75, 'low': 459.0, 'close': 461.9, 'trades': 6525, 'volume': 4308621, 'vwap': 461.9, 'lastSize': 90, 'turnover': 199012118325, 'homeNotional': 51317.29977868824, 'foreignNotional': 23703168.858356044}, {'timestamp': datetime.datetime(2020, 9, 1, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 464.4, 'high': 466.55, 'low': 459.15, 'close': 464.05, 'trades': 9722, 'volume': 8897790, 'vwap': 462.28, 'lastSize': 13, 'turnover': 411323654805, 'homeNotional': 105869.65627227776, 'foreignNotional': 48941001.430338375}, {'timestamp': datetime.datetime(2020, 9, 1, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 456.45, 'high': 467.2, 'low': 455.75, 'close': 464.4, 'trades': 18251, 'volume': 18966911, 'vwap': 461.95, 'lastSize': 12, 'turnover': 876158987695, 'homeNotional': 224347.21776793356, 'foreignNotional': 103636212.81091249}] 2020-09-01 12:00:20 INFO: prepare candles [CandleItem(low=459.0, high=464.75, open=464.05, close=461.9, color='RED'), CandleItem(low=459.15, high=466.55, open=464.4, close=464.05, color='RED'), CandleItem(low=455.75, high=467.2, open=456.45, close=464.4, color='GREEN')] 2020-09-01 12:00:20 INFO: skip by colors first_candle=CandleItem(low=455.75, high=467.2, open=456.45, close=464.4, color='GREEN') second_candle=CandleItem(low=459.15, high=466.55, open=464.4, close=464.05, color='RED') last_candle=CandleItem(low=459.0, high=464.75, open=464.05, close=461.9, color='RED') 2020-09-01 12:00:20 INFO: check need new order None 2020-09-01 12:00:20 INFO: init new order end 2020-09-01 12:00:20 INFO: 2020-09-01 12:00:20 INFO: 2020-09-01 12:00:20 INFO: 2020-09-01 12:00:20 INFO: 2020-09-01 12:02:00 INFO: 2020-09-01 12:02:00 INFO: 2020-09-01 12:02:00 INFO: 2020-09-01 12:02:00 INFO: 2020-09-01 12:02:00 INFO: clearing start 2020-09-01 12:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '16c90c4a-d2e7-7c2a-da14-a156cc5f0030', 'clOrdID': 'a66ab9c4033543ba8a36aebd316ceebe', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 247, 'price': 476.15, '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': 247, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 31, 23, 13, 56, 221000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 31, 23, 13, 56, 221000, tzinfo=tzutc())} 2020-09-01 12:02:00 INFO: skip by not found init order into storage 2020-09-01 12:02:00 INFO: clearing end 2020-09-01 12:02:00 INFO: 2020-09-01 12:02:00 INFO: 2020-09-01 12:02:00 INFO: 2020-09-01 12:02:00 INFO: 2020-09-01 12:19:54 INFO: process event {'orderID': '16c90c4a-d2e7-7c2a-da14-a156cc5f0030', 'ordStatus': 'Canceled', 'workingIndicator': False, 'leavesQty': 0, 'text': 'Canceled: Cancel from www.bitmex.com\nProfit order by trader.py', 'timestamp': '2020-09-01T09:19:54.896Z', 'clOrdID': 'a66ab9c4033543ba8a36aebd316ceebe', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-01 12:19:54 INFO: skip event a66ab9c4033543ba8a36aebd316ceebe Canceled 2020-09-01 13:00:20 INFO: 2020-09-01 13:00:20 INFO: 2020-09-01 13:00:20 INFO: 2020-09-01 13:00:20 INFO: 2020-09-01 13:00:20 INFO: init new order start 2020-09-01 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 1, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 461.9, 'high': 473.2, 'low': 460.3, 'close': 471.0, 'trades': 11073, 'volume': 8289374, 'vwap': 468.03, 'lastSize': 1000, 'turnover': 387961322195, 'homeNotional': 98936.91048485173, 'foreignNotional': 46305203.38542616}, {'timestamp': datetime.datetime(2020, 9, 1, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 464.05, 'high': 464.75, 'low': 459.0, 'close': 461.9, 'trades': 6525, 'volume': 4308621, 'vwap': 461.9, 'lastSize': 90, 'turnover': 199012118325, 'homeNotional': 51317.29977868824, 'foreignNotional': 23703168.858356044}, {'timestamp': datetime.datetime(2020, 9, 1, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 464.4, 'high': 466.55, 'low': 459.15, 'close': 464.05, 'trades': 9722, 'volume': 8897790, 'vwap': 462.28, 'lastSize': 13, 'turnover': 411323654805, 'homeNotional': 105869.65627227776, 'foreignNotional': 48941001.430338375}] 2020-09-01 13:00:20 INFO: prepare candles [CandleItem(low=460.3, high=473.2, open=461.9, close=471.0, color='GREEN'), CandleItem(low=459.0, high=464.75, open=464.05, close=461.9, color='RED'), CandleItem(low=459.15, high=466.55, open=464.4, close=464.05, color='RED')] 2020-09-01 13:00:20 INFO: last_candle=CandleItem(low=460.3, high=473.2, open=461.9, close=471.0, color='GREEN') 2020-09-01 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-01 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=460.3, high=473.2, open=461.9, close=471.0, color='GREEN') 2020-09-01 13:00:20 INFO: skip by CandleItem(low=460.3, high=473.2, open=461.9, close=471.0, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-01 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-01 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=460.3, high=473.2, open=461.9, close=471.0, color='GREEN') 2020-09-01 13:00:20 INFO: skip by CandleItem(low=460.3, high=473.2, open=461.9, close=471.0, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-01 13:00:20 INFO: not found applicable config for candle 2020-09-01 13:00:20 INFO: check need new order None 2020-09-01 13:00:20 INFO: init new order end 2020-09-01 13:00:20 INFO: 2020-09-01 13:00:20 INFO: 2020-09-01 13:00:20 INFO: 2020-09-01 13:00:20 INFO: 2020-09-01 13:02:00 INFO: 2020-09-01 13:02:00 INFO: 2020-09-01 13:02:00 INFO: 2020-09-01 13:02:00 INFO: 2020-09-01 13:02:00 INFO: clearing start 2020-09-01 13:02:00 INFO: clearing end 2020-09-01 13:02:00 INFO: 2020-09-01 13:02:00 INFO: 2020-09-01 13:02:00 INFO: 2020-09-01 13:02:00 INFO: 2020-09-01 14:00:20 INFO: 2020-09-01 14:00:20 INFO: 2020-09-01 14:00:20 INFO: 2020-09-01 14:00:20 INFO: 2020-09-01 14:00:20 INFO: init new order start 2020-09-01 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 1, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 471.0, 'high': 474.4, 'low': 468.3, 'close': 471.7, 'trades': 8441, 'volume': 5514063, 'vwap': 470.9, 'lastSize': 250, 'turnover': 259655778225, 'homeNotional': 65837.96756101491, 'foreignNotional': 31002927.30703405}, {'timestamp': datetime.datetime(2020, 9, 1, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 461.9, 'high': 473.2, 'low': 460.3, 'close': 471.0, 'trades': 11073, 'volume': 8289374, 'vwap': 468.03, 'lastSize': 1000, 'turnover': 387961322195, 'homeNotional': 98936.91048485173, 'foreignNotional': 46305203.38542616}, {'timestamp': datetime.datetime(2020, 9, 1, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 464.05, 'high': 464.75, 'low': 459.0, 'close': 461.9, 'trades': 6525, 'volume': 4308621, 'vwap': 461.9, 'lastSize': 90, 'turnover': 199012118325, 'homeNotional': 51317.29977868824, 'foreignNotional': 23703168.858356044}] 2020-09-01 14:00:20 INFO: prepare candles [CandleItem(low=468.3, high=474.4, open=471.0, close=471.7, color='GREEN'), CandleItem(low=460.3, high=473.2, open=461.9, close=471.0, color='GREEN'), CandleItem(low=459.0, high=464.75, open=464.05, close=461.9, color='RED')] 2020-09-01 14:00:20 INFO: skip by colors first_candle=CandleItem(low=459.0, high=464.75, open=464.05, close=461.9, color='RED') second_candle=CandleItem(low=460.3, high=473.2, open=461.9, close=471.0, color='GREEN') last_candle=CandleItem(low=468.3, high=474.4, open=471.0, close=471.7, color='GREEN') 2020-09-01 14:00:20 INFO: check need new order None 2020-09-01 14:00:20 INFO: init new order end 2020-09-01 14:00:20 INFO: 2020-09-01 14:00:20 INFO: 2020-09-01 14:00:20 INFO: 2020-09-01 14:00:20 INFO: 2020-09-01 14:02:00 INFO: 2020-09-01 14:02:00 INFO: 2020-09-01 14:02:00 INFO: 2020-09-01 14:02:00 INFO: 2020-09-01 14:02:00 INFO: clearing start 2020-09-01 14:02:00 INFO: clearing end 2020-09-01 14:02:00 INFO: 2020-09-01 14:02:00 INFO: 2020-09-01 14:02:00 INFO: 2020-09-01 14:02:00 INFO: 2020-09-01 15:00:20 INFO: 2020-09-01 15:00:20 INFO: 2020-09-01 15:00:20 INFO: 2020-09-01 15:00:20 INFO: 2020-09-01 15:00:20 INFO: init new order start 2020-09-01 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 1, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 471.7, 'high': 472.6, 'low': 466.5, 'close': 469.85, 'trades': 8580, 'volume': 6859933, 'vwap': 469.8, 'lastSize': 10, 'turnover': 322275987815, 'homeNotional': 81677.80299071106, 'foreignNotional': 38371879.596034914}, {'timestamp': datetime.datetime(2020, 9, 1, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 471.0, 'high': 474.4, 'low': 468.3, 'close': 471.7, 'trades': 8441, 'volume': 5514063, 'vwap': 470.9, 'lastSize': 250, 'turnover': 259655778225, 'homeNotional': 65837.96756101491, 'foreignNotional': 31002927.30703405}, {'timestamp': datetime.datetime(2020, 9, 1, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 461.9, 'high': 473.2, 'low': 460.3, 'close': 471.0, 'trades': 11073, 'volume': 8289374, 'vwap': 468.03, 'lastSize': 1000, 'turnover': 387961322195, 'homeNotional': 98936.91048485173, 'foreignNotional': 46305203.38542616}] 2020-09-01 15:00:20 INFO: prepare candles [CandleItem(low=466.5, high=472.6, open=471.7, close=469.85, color='RED'), CandleItem(low=468.3, high=474.4, open=471.0, close=471.7, color='GREEN'), CandleItem(low=460.3, high=473.2, open=461.9, close=471.0, color='GREEN')] 2020-09-01 15:00:20 INFO: last_candle=CandleItem(low=466.5, high=472.6, open=471.7, close=469.85, color='RED') 2020-09-01 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-01 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=466.5, high=472.6, open=471.7, close=469.85, color='RED') 2020-09-01 15:00:20 INFO: skip by CandleItem(low=466.5, high=472.6, open=471.7, close=469.85, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-01 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-01 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=466.5, high=472.6, open=471.7, close=469.85, color='RED') 2020-09-01 15:00:20 INFO: skip by CandleItem(low=466.5, high=472.6, open=471.7, close=469.85, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-01 15:00:20 INFO: not found applicable config for candle 2020-09-01 15:00:20 INFO: check need new order None 2020-09-01 15:00:20 INFO: init new order end 2020-09-01 15:00:20 INFO: 2020-09-01 15:00:20 INFO: 2020-09-01 15:00:20 INFO: 2020-09-01 15:00:20 INFO: 2020-09-01 15:02:00 INFO: 2020-09-01 15:02:00 INFO: 2020-09-01 15:02:00 INFO: 2020-09-01 15:02:00 INFO: 2020-09-01 15:02:00 INFO: clearing start 2020-09-01 15:02:00 INFO: clearing end 2020-09-01 15:02:00 INFO: 2020-09-01 15:02:00 INFO: 2020-09-01 15:02:00 INFO: 2020-09-01 15:02:00 INFO: 2020-09-01 16:00:20 INFO: 2020-09-01 16:00:20 INFO: 2020-09-01 16:00:20 INFO: 2020-09-01 16:00:20 INFO: 2020-09-01 16:00:20 INFO: init new order start 2020-09-01 16:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 1, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 469.85, 'high': 472.5, 'low': 467.35, 'close': 470.6, 'trades': 6332, 'volume': 5165872, 'vwap': 470.01, 'lastSize': 50, 'turnover': 242796587105, 'homeNotional': 61432.99654456073, 'foreignNotional': 28873704.21807181}, {'timestamp': datetime.datetime(2020, 9, 1, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 471.7, 'high': 472.6, 'low': 466.5, 'close': 469.85, 'trades': 8580, 'volume': 6859933, 'vwap': 469.8, 'lastSize': 10, 'turnover': 322275987815, 'homeNotional': 81677.80299071106, 'foreignNotional': 38371879.596034914}, {'timestamp': datetime.datetime(2020, 9, 1, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 471.0, 'high': 474.4, 'low': 468.3, 'close': 471.7, 'trades': 8441, 'volume': 5514063, 'vwap': 470.9, 'lastSize': 250, 'turnover': 259655778225, 'homeNotional': 65837.96756101491, 'foreignNotional': 31002927.30703405}] 2020-09-01 16:00:20 INFO: prepare candles [CandleItem(low=467.35, high=472.5, open=469.85, close=470.6, color='GREEN'), CandleItem(low=466.5, high=472.6, open=471.7, close=469.85, color='RED'), CandleItem(low=468.3, high=474.4, open=471.0, close=471.7, color='GREEN')] 2020-09-01 16:00:20 INFO: skip by colors first_candle=CandleItem(low=468.3, high=474.4, open=471.0, close=471.7, color='GREEN') second_candle=CandleItem(low=466.5, high=472.6, open=471.7, close=469.85, color='RED') last_candle=CandleItem(low=467.35, high=472.5, open=469.85, close=470.6, color='GREEN') 2020-09-01 16:00:20 INFO: check need new order None 2020-09-01 16:00:20 INFO: init new order end 2020-09-01 16:00:20 INFO: 2020-09-01 16:00:20 INFO: 2020-09-01 16:00:20 INFO: 2020-09-01 16:00:20 INFO: 2020-09-01 16:02:00 INFO: 2020-09-01 16:02:00 INFO: 2020-09-01 16:02:00 INFO: 2020-09-01 16:02:00 INFO: 2020-09-01 16:02:00 INFO: clearing start 2020-09-01 16:02:00 INFO: clearing end 2020-09-01 16:02:00 INFO: 2020-09-01 16:02:00 INFO: 2020-09-01 16:02:00 INFO: 2020-09-01 16:02:00 INFO: 2020-09-01 17:00:20 INFO: 2020-09-01 17:00:20 INFO: 2020-09-01 17:00:20 INFO: 2020-09-01 17:00:20 INFO: 2020-09-01 17:00:20 INFO: init new order start 2020-09-01 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 1, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 470.6, 'high': 471.95, 'low': 468.8, 'close': 469.45, 'trades': 4722, 'volume': 4857179, 'vwap': 470.16, 'lastSize': 5000, 'turnover': 228360342410, 'homeNotional': 57754.76144301958, 'foreignNotional': 27153421.02421437}, {'timestamp': datetime.datetime(2020, 9, 1, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 469.85, 'high': 472.5, 'low': 467.35, 'close': 470.6, 'trades': 6332, 'volume': 5165872, 'vwap': 470.01, 'lastSize': 50, 'turnover': 242796587105, 'homeNotional': 61432.99654456073, 'foreignNotional': 28873704.21807181}, {'timestamp': datetime.datetime(2020, 9, 1, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 471.7, 'high': 472.6, 'low': 466.5, 'close': 469.85, 'trades': 8580, 'volume': 6859933, 'vwap': 469.8, 'lastSize': 10, 'turnover': 322275987815, 'homeNotional': 81677.80299071106, 'foreignNotional': 38371879.596034914}] 2020-09-01 17:00:20 INFO: prepare candles [CandleItem(low=468.8, high=471.95, open=470.6, close=469.45, color='RED'), CandleItem(low=467.35, high=472.5, open=469.85, close=470.6, color='GREEN'), CandleItem(low=466.5, high=472.6, open=471.7, close=469.85, color='RED')] 2020-09-01 17:00:20 INFO: skip by colors first_candle=CandleItem(low=466.5, high=472.6, open=471.7, close=469.85, color='RED') second_candle=CandleItem(low=467.35, high=472.5, open=469.85, close=470.6, color='GREEN') last_candle=CandleItem(low=468.8, high=471.95, open=470.6, close=469.45, color='RED') 2020-09-01 17:00:20 INFO: check need new order None 2020-09-01 17:00:20 INFO: init new order end 2020-09-01 17:00:20 INFO: 2020-09-01 17:00:20 INFO: 2020-09-01 17:00:20 INFO: 2020-09-01 17:00:20 INFO: 2020-09-01 17:02:00 INFO: 2020-09-01 17:02:00 INFO: 2020-09-01 17:02:00 INFO: 2020-09-01 17:02:00 INFO: 2020-09-01 17:02:00 INFO: clearing start 2020-09-01 17:02:00 INFO: clearing end 2020-09-01 17:02:00 INFO: 2020-09-01 17:02:00 INFO: 2020-09-01 17:02:00 INFO: 2020-09-01 17:02:00 INFO: 2020-09-01 18:00:20 INFO: 2020-09-01 18:00:20 INFO: 2020-09-01 18:00:20 INFO: 2020-09-01 18:00:20 INFO: 2020-09-01 18:00:20 INFO: init new order start 2020-09-01 18:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 1, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 469.45, 'high': 473.9, 'low': 461.55, 'close': 473.8, 'trades': 11219, 'volume': 9497250, 'vwap': 467.21, 'lastSize': 2116, 'turnover': 443715799620, 'homeNotional': 112591.09691229423, 'foreignNotional': 52603585.66534217}, {'timestamp': datetime.datetime(2020, 9, 1, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 470.6, 'high': 471.95, 'low': 468.8, 'close': 469.45, 'trades': 4722, 'volume': 4857179, 'vwap': 470.16, 'lastSize': 5000, 'turnover': 228360342410, 'homeNotional': 57754.76144301958, 'foreignNotional': 27153421.02421437}, {'timestamp': datetime.datetime(2020, 9, 1, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 469.85, 'high': 472.5, 'low': 467.35, 'close': 470.6, 'trades': 6332, 'volume': 5165872, 'vwap': 470.01, 'lastSize': 50, 'turnover': 242796587105, 'homeNotional': 61432.99654456073, 'foreignNotional': 28873704.21807181}] 2020-09-01 18:00:20 INFO: prepare candles [CandleItem(low=461.55, high=473.9, open=469.45, close=473.8, color='GREEN'), CandleItem(low=468.8, high=471.95, open=470.6, close=469.45, color='RED'), CandleItem(low=467.35, high=472.5, open=469.85, close=470.6, color='GREEN')] 2020-09-01 18:00:20 INFO: skip by colors first_candle=CandleItem(low=467.35, high=472.5, open=469.85, close=470.6, color='GREEN') second_candle=CandleItem(low=468.8, high=471.95, open=470.6, close=469.45, color='RED') last_candle=CandleItem(low=461.55, high=473.9, open=469.45, close=473.8, color='GREEN') 2020-09-01 18:00:20 INFO: check need new order None 2020-09-01 18:00:20 INFO: init new order end 2020-09-01 18:00:20 INFO: 2020-09-01 18:00:20 INFO: 2020-09-01 18:00:20 INFO: 2020-09-01 18:00:20 INFO: 2020-09-01 18:02:00 INFO: 2020-09-01 18:02:00 INFO: 2020-09-01 18:02:00 INFO: 2020-09-01 18:02:00 INFO: 2020-09-01 18:02:00 INFO: clearing start 2020-09-01 18:02:00 INFO: clearing end 2020-09-01 18:02:00 INFO: 2020-09-01 18:02:00 INFO: 2020-09-01 18:02:00 INFO: 2020-09-01 18:02:00 INFO: 2020-09-01 19:00:20 INFO: 2020-09-01 19:00:20 INFO: 2020-09-01 19:00:20 INFO: 2020-09-01 19:00:20 INFO: 2020-09-01 19:00:20 INFO: init new order start 2020-09-01 19:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 1, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 473.8, 'high': 487.35, 'low': 473.5, 'close': 482.65, 'trades': 19124, 'volume': 18558036, 'vwap': 481.2, 'lastSize': 4573, 'turnover': 892999126970, 'homeNotional': 221970.6668874328, 'foreignNotional': 106812468.27746794}, {'timestamp': datetime.datetime(2020, 9, 1, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 469.45, 'high': 473.9, 'low': 461.55, 'close': 473.8, 'trades': 11219, 'volume': 9497250, 'vwap': 467.21, 'lastSize': 2116, 'turnover': 443715799620, 'homeNotional': 112591.09691229423, 'foreignNotional': 52603585.66534217}, {'timestamp': datetime.datetime(2020, 9, 1, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 470.6, 'high': 471.95, 'low': 468.8, 'close': 469.45, 'trades': 4722, 'volume': 4857179, 'vwap': 470.16, 'lastSize': 5000, 'turnover': 228360342410, 'homeNotional': 57754.76144301958, 'foreignNotional': 27153421.02421437}] 2020-09-01 19:00:21 INFO: prepare candles [CandleItem(low=473.5, high=487.35, open=473.8, close=482.65, color='GREEN'), CandleItem(low=461.55, high=473.9, open=469.45, close=473.8, color='GREEN'), CandleItem(low=468.8, high=471.95, open=470.6, close=469.45, color='RED')] 2020-09-01 19:00:21 INFO: skip by colors first_candle=CandleItem(low=468.8, high=471.95, open=470.6, close=469.45, color='RED') second_candle=CandleItem(low=461.55, high=473.9, open=469.45, close=473.8, color='GREEN') last_candle=CandleItem(low=473.5, high=487.35, open=473.8, close=482.65, color='GREEN') 2020-09-01 19:00:21 INFO: check need new order None 2020-09-01 19:00:21 INFO: init new order end 2020-09-01 19:00:21 INFO: 2020-09-01 19:00:21 INFO: 2020-09-01 19:00:21 INFO: 2020-09-01 19:00:21 INFO: 2020-09-01 19:02:00 INFO: 2020-09-01 19:02:00 INFO: 2020-09-01 19:02:00 INFO: 2020-09-01 19:02:00 INFO: 2020-09-01 19:02:00 INFO: clearing start 2020-09-01 19:02:00 INFO: clearing end 2020-09-01 19:02:00 INFO: 2020-09-01 19:02:00 INFO: 2020-09-01 19:02:00 INFO: 2020-09-01 19:02:00 INFO: 2020-09-01 20:00:20 INFO: 2020-09-01 20:00:20 INFO: 2020-09-01 20:00:20 INFO: 2020-09-01 20:00:20 INFO: 2020-09-01 20:00:20 INFO: init new order start 2020-09-01 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 1, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 482.65, 'high': 484.05, 'low': 475.9, 'close': 479.55, 'trades': 11542, 'volume': 8449142, 'vwap': 480.1, 'lastSize': 10, 'turnover': 405639381500, 'homeNotional': 101644.07979507711, 'foreignNotional': 48799059.51621777}, {'timestamp': datetime.datetime(2020, 9, 1, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 473.8, 'high': 487.35, 'low': 473.5, 'close': 482.65, 'trades': 19124, 'volume': 18558036, 'vwap': 481.2, 'lastSize': 4573, 'turnover': 892999126970, 'homeNotional': 221970.6668874328, 'foreignNotional': 106812468.27746794}, {'timestamp': datetime.datetime(2020, 9, 1, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 469.45, 'high': 473.9, 'low': 461.55, 'close': 473.8, 'trades': 11219, 'volume': 9497250, 'vwap': 467.21, 'lastSize': 2116, 'turnover': 443715799620, 'homeNotional': 112591.09691229423, 'foreignNotional': 52603585.66534217}] 2020-09-01 20:00:20 INFO: prepare candles [CandleItem(low=475.9, high=484.05, open=482.65, close=479.55, color='RED'), CandleItem(low=473.5, high=487.35, open=473.8, close=482.65, color='GREEN'), CandleItem(low=461.55, high=473.9, open=469.45, close=473.8, color='GREEN')] 2020-09-01 20:00:20 INFO: last_candle=CandleItem(low=475.9, high=484.05, open=482.65, close=479.55, color='RED') 2020-09-01 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-01 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=475.9, high=484.05, open=482.65, close=479.55, color='RED') 2020-09-01 20:00:20 INFO: skip by CandleItem(low=475.9, high=484.05, open=482.65, close=479.55, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-01 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-01 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=475.9, high=484.05, open=482.65, close=479.55, color='RED') 2020-09-01 20:00:20 INFO: apply filter None to candle=CandleItem(low=473.5, high=487.35, open=473.8, close=482.65, color='GREEN') 2020-09-01 20:00:20 INFO: apply filter None to candle=CandleItem(low=461.55, high=473.9, open=469.45, close=473.8, color='GREEN') 2020-09-01 20:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=475.9, high=484.05, open=482.65, close=479.55, color='RED'), take_profit_factor=5.0, clearing_interval=3600) 2020-09-01 20:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=475.9, high=484.05, open=482.65, close=479.55, color='RED'), take_profit_factor=5.0, clearing_interval=3600) 2020-09-01 20:00:20 INFO: place order: start candle=CandleItem(low=475.9, high=484.05, open=482.65, close=479.55, color='RED') ticker='ETHUSD' price_offset=0.1 2020-09-01 20:00:20 INFO: place order: side_factor=1 init_trigger_price=475.84999999999997 init_order_price=475.79999999999995 stop_price_offset=0.0 candle.size=8.150000000000034 stop_price=484.05 take_price=435.0499999999998 2020-09-01 20:00:20 INFO: place order round: side_factor=1 init_trigger_price=Decimal('475.84999999999996589394868351519107818603515625') init_order_price=Decimal('475.799999999999954525264911353588104248046875') stop_price_offset=0.0 candle.size=8.150000000000034 stop_price=Decimal('484.05000000000001136868377216160297393798828125') take_price=Decimal('435.04999999999978399500832892954349517822265625') 2020-09-01 20:00:20 INFO: place order: compute qty=-232 2020-09-01 20:00:20 INFO: place order: save order to db 8ef85aa4fd6840ea963676570ed025d9; response=True 2020-09-01 20:00:20 INFO: process event {'orderID': '6ba5fb92-0438-55bd-afc6-c6ca120003f6', 'clOrdID': '8ef85aa4fd6840ea963676570ed025d9', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 232, 'price': 475.8, 'displayQty': None, 'stopPx': 475.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-09-01T17:00:20.319Z', 'timestamp': '2020-09-01T17:00:20.319Z'} 2020-09-01 20:00:20 INFO: skip event 8ef85aa4fd6840ea963676570ed025d9 New 2020-09-01 20:00:20 INFO: post order to exchange resp={'orderID': '6ba5fb92-0438-55bd-afc6-c6ca120003f6', 'clOrdID': '8ef85aa4fd6840ea963676570ed025d9', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 232, 'price': 475.8, 'displayQty': None, 'stopPx': 475.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 1, 17, 0, 20, 319000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 1, 17, 0, 20, 319000, tzinfo=tzutc())} 2020-09-01 20:00:20 INFO: place new init order {'qty': -232, 'init_price': Decimal('475.84999999999996589394868351519107818603515625'), 'stop_price': Decimal('484.05000000000001136868377216160297393798828125'), 'take_price': Decimal('435.04999999999978399500832892954349517822265625'), 'order_uid': '8ef85aa4fd6840ea963676570ed025d9', 'response': {'orderID': '6ba5fb92-0438-55bd-afc6-c6ca120003f6', 'clOrdID': '8ef85aa4fd6840ea963676570ed025d9', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 232, 'price': 475.8, 'displayQty': None, 'stopPx': 475.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 1, 17, 0, 20, 319000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 1, 17, 0, 20, 319000, tzinfo=tzutc())}} 2020-09-01 20:00:20 INFO: init new order end 2020-09-01 20:00:20 INFO: 2020-09-01 20:00:20 INFO: 2020-09-01 20:00:20 INFO: 2020-09-01 20:00:20 INFO: 2020-09-01 20:02:00 INFO: 2020-09-01 20:02:00 INFO: 2020-09-01 20:02:00 INFO: 2020-09-01 20:02:00 INFO: 2020-09-01 20:02:00 INFO: clearing start 2020-09-01 20:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '6ba5fb92-0438-55bd-afc6-c6ca120003f6', 'clOrdID': '8ef85aa4fd6840ea963676570ed025d9', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 232, 'price': 475.8, 'displayQty': None, 'stopPx': 475.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 1, 17, 0, 20, 319000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 1, 17, 0, 20, 319000, tzinfo=tzutc())} 2020-09-01 20:02:00 INFO: order time=2020-09-01 17:00:20.319000+00:00; delta from now UTC=0:01:40.229008 time_delta.total_seconds()=100.229008; time_diff_offset='3600' 2020-09-01 20:02:00 INFO: skip by time diff 2020-09-01 17:00:20.319000+00:00 2020-09-01 20:02:00 INFO: clearing end 2020-09-01 20:02:00 INFO: 2020-09-01 20:02:00 INFO: 2020-09-01 20:02:00 INFO: 2020-09-01 20:02:00 INFO: 2020-09-01 20:42:24 INFO: process event {'orderID': '6ba5fb92-0438-55bd-afc6-c6ca120003f6', 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 232, 'avgPx': 475.8, 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'transactTime': '2020-09-01T17:42:24.561Z', 'timestamp': '2020-09-01T17:42:24.561Z', 'clOrdID': '8ef85aa4fd6840ea963676570ed025d9', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-01 20:42:24 INFO: add new event={'uid': '8ef85aa4fd6840ea963676570ed025d9', 'status': 'Filled'} 2020-09-01 20:42:25 INFO: 2020-09-01 20:42:25 INFO: 2020-09-01 20:42:25 INFO: 2020-09-01 20:42:25 INFO: 2020-09-01 20:42:25 INFO: process event start 2020-09-01 20:42:25 INFO: fetch new order event 8ef85aa4fd6840ea963676570ed025d9 2020-09-01 20:42:25 INFO: fetch orders by event init={'stop': '484.05000000000001136868377216160297393798828125', 'take': '435.04999999999978399500832892954349517822265625', 'qty': '232', 'color': 'RED', 'ticker': 'ETHUSD', 'clearing_offset': '3600'} profit_pair=None 2020-09-01 20:42:25 INFO: process init order filled 2020-09-01 20:42:25 INFO: save profit orders to storage stop=aa649f458a314e7c9bef87a0058812e9 take=9965af09a4ab443097d1bce09bd2a7ab 2020-09-01 20:42:25 INFO: place profit orders take_price=435.04999999999978399500832892954349517822265625, stop_price=484.05000000000001136868377216160297393798828125, qty=232, color=RED, ticker=ETHUSD aa649f458a314e7c9bef87a0058812e9 9965af09a4ab443097d1bce09bd2a7ab 2020-09-01 20:42:25 INFO: place stop order ETHUSD: qty=232, stop_price=484.05000000000001136868377216160297393798828125, stop_uid=aa649f458a314e7c9bef87a0058812e9 2020-09-01 20:42:26 INFO: exchange resp for stop order={'orderID': 'b8082e14-ee13-ff72-c550-f9a50921ff63', 'clOrdID': 'aa649f458a314e7c9bef87a0058812e9', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 232, 'price': None, 'displayQty': None, 'stopPx': 484.05, '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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 1, 17, 42, 26, 53000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 1, 17, 42, 26, 53000, tzinfo=tzutc())} 2020-09-01 20:42:26 INFO: place limit order ETHUSD: qty=232, price=435.04999999999978399500832892954349517822265625, take_uid=9965af09a4ab443097d1bce09bd2a7ab 2020-09-01 20:42:26 INFO: process event {'orderID': 'b8082e14-ee13-ff72-c550-f9a50921ff63', 'clOrdID': 'aa649f458a314e7c9bef87a0058812e9', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 232, 'price': None, 'displayQty': None, 'stopPx': 484.05, '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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': '2020-09-01T17:42:26.053Z', 'timestamp': '2020-09-01T17:42:26.053Z'} 2020-09-01 20:42:26 INFO: skip event aa649f458a314e7c9bef87a0058812e9 New 2020-09-01 20:42:26 INFO: process event {'orderID': '4b3132c5-6103-4c79-daa1-69ef0d317d86', 'clOrdID': '9965af09a4ab443097d1bce09bd2a7ab', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 232, 'price': 435.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': '2020-09-01T17:42:26.877Z', 'timestamp': '2020-09-01T17:42:26.877Z'} 2020-09-01 20:42:26 INFO: skip event 9965af09a4ab443097d1bce09bd2a7ab New 2020-09-01 20:42:26 INFO: exchange resp for take profit order={'orderID': '4b3132c5-6103-4c79-daa1-69ef0d317d86', 'clOrdID': '9965af09a4ab443097d1bce09bd2a7ab', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 232, 'price': 435.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 1, 17, 42, 26, 877000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 1, 17, 42, 26, 877000, tzinfo=tzutc())} 2020-09-01 20:42:26 INFO: place profit orders={'stop': {'response': {'orderID': 'b8082e14-ee13-ff72-c550-f9a50921ff63', 'clOrdID': 'aa649f458a314e7c9bef87a0058812e9', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 232, 'price': None, 'displayQty': None, 'stopPx': 484.05, '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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 1, 17, 42, 26, 53000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 1, 17, 42, 26, 53000, tzinfo=tzutc())}, 'qty': Decimal('232'), 'uid': 'aa649f458a314e7c9bef87a0058812e9', 'price': Decimal('484.05000000000001136868377216160297393798828125')}, 'take': {'response': {'orderID': '4b3132c5-6103-4c79-daa1-69ef0d317d86', 'clOrdID': '9965af09a4ab443097d1bce09bd2a7ab', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 232, 'price': 435.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 1, 17, 42, 26, 877000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 1, 17, 42, 26, 877000, tzinfo=tzutc())}, 'qty': Decimal('232'), 'uid': '9965af09a4ab443097d1bce09bd2a7ab', 'price': Decimal('435.04999999999978399500832892954349517822265625')}} 2020-09-01 20:42:26 INFO: rm init order from db 8ef85aa4fd6840ea963676570ed025d9 2020-09-01 20:42:26 INFO: end process event_processing_result='proceed init order' 2020-09-01 20:42:26 INFO: 2020-09-01 20:42:26 INFO: 2020-09-01 20:42:26 INFO: 2020-09-01 20:42:26 INFO: 2020-09-01 21:00:20 INFO: 2020-09-01 21:00:20 INFO: 2020-09-01 21:00:20 INFO: 2020-09-01 21:00:20 INFO: 2020-09-01 21:00:20 INFO: init new order start 2020-09-01 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 1, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 479.55, 'high': 480.85, 'low': 475.0, 'close': 476.25, 'trades': 6038, 'volume': 3927046, 'vwap': 477.26, 'lastSize': 400, 'turnover': 187420132180, 'homeNotional': 47063.703815815854, 'foreignNotional': 22461417.839264322}, {'timestamp': datetime.datetime(2020, 9, 1, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 482.65, 'high': 484.05, 'low': 475.9, 'close': 479.55, 'trades': 11542, 'volume': 8449142, 'vwap': 480.1, 'lastSize': 10, 'turnover': 405639381500, 'homeNotional': 101644.07979507711, 'foreignNotional': 48799059.51621777}, {'timestamp': datetime.datetime(2020, 9, 1, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 473.8, 'high': 487.35, 'low': 473.5, 'close': 482.65, 'trades': 19124, 'volume': 18558036, 'vwap': 481.2, 'lastSize': 4573, 'turnover': 892999126970, 'homeNotional': 221970.6668874328, 'foreignNotional': 106812468.27746794}] 2020-09-01 21:00:20 INFO: prepare candles [CandleItem(low=475.0, high=480.85, open=479.55, close=476.25, color='RED'), CandleItem(low=475.9, high=484.05, open=482.65, close=479.55, color='RED'), CandleItem(low=473.5, high=487.35, open=473.8, close=482.65, color='GREEN')] 2020-09-01 21:00:20 INFO: skip by colors first_candle=CandleItem(low=473.5, high=487.35, open=473.8, close=482.65, color='GREEN') second_candle=CandleItem(low=475.9, high=484.05, open=482.65, close=479.55, color='RED') last_candle=CandleItem(low=475.0, high=480.85, open=479.55, close=476.25, color='RED') 2020-09-01 21:00:20 INFO: check need new order None 2020-09-01 21:00:20 INFO: init new order end 2020-09-01 21:00:20 INFO: 2020-09-01 21:00:20 INFO: 2020-09-01 21:00:20 INFO: 2020-09-01 21:00:20 INFO: 2020-09-01 21:02:00 INFO: 2020-09-01 21:02:00 INFO: 2020-09-01 21:02:00 INFO: 2020-09-01 21:02:00 INFO: 2020-09-01 21:02:00 INFO: clearing start 2020-09-01 21:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'b8082e14-ee13-ff72-c550-f9a50921ff63', 'clOrdID': 'aa649f458a314e7c9bef87a0058812e9', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 232, 'price': None, 'displayQty': None, 'stopPx': 484.05, '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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 1, 17, 42, 26, 53000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 1, 17, 42, 26, 53000, tzinfo=tzutc())} 2020-09-01 21:02:00 INFO: skip by not found init order into storage 2020-09-01 21:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '4b3132c5-6103-4c79-daa1-69ef0d317d86', 'clOrdID': '9965af09a4ab443097d1bce09bd2a7ab', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 232, 'price': 435.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 1, 17, 42, 26, 877000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 1, 17, 42, 26, 877000, tzinfo=tzutc())} 2020-09-01 21:02:00 INFO: skip by not found init order into storage 2020-09-01 21:02:00 INFO: clearing end 2020-09-01 21:02:00 INFO: 2020-09-01 21:02:00 INFO: 2020-09-01 21:02:00 INFO: 2020-09-01 21:02:00 INFO: 2020-09-01 22:00:29 INFO: 2020-09-01 22:00:29 INFO: 2020-09-01 22:00:29 INFO: 2020-09-01 22:00:29 INFO: 2020-09-01 22:00:29 INFO: init new order start 2020-09-01 22:00:29 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 1, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 476.25, 'high': 480.0, 'low': 476.0, 'close': 478.5, 'trades': 4275, 'volume': 2756231, 'vwap': 478.25, 'lastSize': 50, 'turnover': 131816304740, 'homeNotional': 33083.03363542558, 'foreignNotional': 15821924.739828777}, {'timestamp': datetime.datetime(2020, 9, 1, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 479.55, 'high': 480.85, 'low': 475.0, 'close': 476.25, 'trades': 6038, 'volume': 3927046, 'vwap': 477.26, 'lastSize': 400, 'turnover': 187420132180, 'homeNotional': 47063.703815815854, 'foreignNotional': 22461417.839264322}, {'timestamp': datetime.datetime(2020, 9, 1, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 482.65, 'high': 484.05, 'low': 475.9, 'close': 479.55, 'trades': 11542, 'volume': 8449142, 'vwap': 480.1, 'lastSize': 10, 'turnover': 405639381500, 'homeNotional': 101644.07979507711, 'foreignNotional': 48799059.51621777}] 2020-09-01 22:00:29 INFO: prepare candles [CandleItem(low=476.0, high=480.0, open=476.25, close=478.5, color='GREEN'), CandleItem(low=475.0, high=480.85, open=479.55, close=476.25, color='RED'), CandleItem(low=475.9, high=484.05, open=482.65, close=479.55, color='RED')] 2020-09-01 22:00:29 INFO: last_candle=CandleItem(low=476.0, high=480.0, open=476.25, close=478.5, color='GREEN') 2020-09-01 22:00:29 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-01 22:00:29 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=476.0, high=480.0, open=476.25, close=478.5, color='GREEN') 2020-09-01 22:00:29 INFO: skip by CandleItem(low=476.0, high=480.0, open=476.25, close=478.5, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-01 22:00:29 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-01 22:00:29 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=476.0, high=480.0, open=476.25, close=478.5, color='GREEN') 2020-09-01 22:00:29 INFO: skip by CandleItem(low=476.0, high=480.0, open=476.25, close=478.5, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-01 22:00:29 INFO: not found applicable config for candle 2020-09-01 22:00:29 INFO: check need new order None 2020-09-01 22:00:29 INFO: init new order end 2020-09-01 22:00:29 INFO: 2020-09-01 22:00:29 INFO: 2020-09-01 22:00:29 INFO: 2020-09-01 22:00:29 INFO: 2020-09-01 22:02:00 INFO: 2020-09-01 22:02:00 INFO: 2020-09-01 22:02:00 INFO: 2020-09-01 22:02:00 INFO: 2020-09-01 22:02:00 INFO: clearing start 2020-09-01 22:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'b8082e14-ee13-ff72-c550-f9a50921ff63', 'clOrdID': 'aa649f458a314e7c9bef87a0058812e9', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 232, 'price': None, 'displayQty': None, 'stopPx': 484.05, '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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 1, 17, 42, 26, 53000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 1, 17, 42, 26, 53000, tzinfo=tzutc())} 2020-09-01 22:02:00 INFO: skip by not found init order into storage 2020-09-01 22:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '4b3132c5-6103-4c79-daa1-69ef0d317d86', 'clOrdID': '9965af09a4ab443097d1bce09bd2a7ab', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 232, 'price': 435.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 1, 17, 42, 26, 877000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 1, 17, 42, 26, 877000, tzinfo=tzutc())} 2020-09-01 22:02:00 INFO: skip by not found init order into storage 2020-09-01 22:02:00 INFO: clearing end 2020-09-01 22:02:00 INFO: 2020-09-01 22:02:00 INFO: 2020-09-01 22:02:00 INFO: 2020-09-01 22:02:00 INFO: 2020-09-01 23:00:20 INFO: 2020-09-01 23:00:20 INFO: 2020-09-01 23:00:20 INFO: 2020-09-01 23:00:20 INFO: 2020-09-01 23:00:20 INFO: init new order start 2020-09-01 23:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 1, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 478.5, 'high': 480.05, 'low': 475.35, 'close': 476.2, 'trades': 4068, 'volume': 3160580, 'vwap': 478.08, 'lastSize': 187, 'turnover': 151098715540, 'homeNotional': 37909.45965151807, 'foreignNotional': 18123508.003393624}, {'timestamp': datetime.datetime(2020, 9, 1, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 476.25, 'high': 480.0, 'low': 476.0, 'close': 478.5, 'trades': 4275, 'volume': 2756231, 'vwap': 478.25, 'lastSize': 50, 'turnover': 131816304740, 'homeNotional': 33083.03363542558, 'foreignNotional': 15821924.739828777}, {'timestamp': datetime.datetime(2020, 9, 1, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 479.55, 'high': 480.85, 'low': 475.0, 'close': 476.25, 'trades': 6038, 'volume': 3927046, 'vwap': 477.26, 'lastSize': 400, 'turnover': 187420132180, 'homeNotional': 47063.703815815854, 'foreignNotional': 22461417.839264322}] 2020-09-01 23:00:20 INFO: prepare candles [CandleItem(low=475.35, high=480.05, open=478.5, close=476.2, color='RED'), CandleItem(low=476.0, high=480.0, open=476.25, close=478.5, color='GREEN'), CandleItem(low=475.0, high=480.85, open=479.55, close=476.25, color='RED')] 2020-09-01 23:00:20 INFO: skip by colors first_candle=CandleItem(low=475.0, high=480.85, open=479.55, close=476.25, color='RED') second_candle=CandleItem(low=476.0, high=480.0, open=476.25, close=478.5, color='GREEN') last_candle=CandleItem(low=475.35, high=480.05, open=478.5, close=476.2, color='RED') 2020-09-01 23:00:20 INFO: check need new order None 2020-09-01 23:00:20 INFO: init new order end 2020-09-01 23:00:20 INFO: 2020-09-01 23:00:20 INFO: 2020-09-01 23:00:20 INFO: 2020-09-01 23:00:20 INFO: 2020-09-01 23:02:00 INFO: 2020-09-01 23:02:00 INFO: 2020-09-01 23:02:00 INFO: 2020-09-01 23:02:00 INFO: 2020-09-01 23:02:00 INFO: clearing start 2020-09-01 23:02:01 INFO: fetch_orders_for_clearing test order {'orderID': 'b8082e14-ee13-ff72-c550-f9a50921ff63', 'clOrdID': 'aa649f458a314e7c9bef87a0058812e9', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 232, 'price': None, 'displayQty': None, 'stopPx': 484.05, '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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 1, 17, 42, 26, 53000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 1, 17, 42, 26, 53000, tzinfo=tzutc())} 2020-09-01 23:02:01 INFO: skip by not found init order into storage 2020-09-01 23:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '4b3132c5-6103-4c79-daa1-69ef0d317d86', 'clOrdID': '9965af09a4ab443097d1bce09bd2a7ab', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 232, 'price': 435.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 1, 17, 42, 26, 877000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 1, 17, 42, 26, 877000, tzinfo=tzutc())} 2020-09-01 23:02:01 INFO: skip by not found init order into storage 2020-09-01 23:02:01 INFO: clearing end 2020-09-01 23:02:01 INFO: 2020-09-01 23:02:01 INFO: 2020-09-01 23:02:01 INFO: 2020-09-01 23:02:01 INFO: 2020-09-02 00:00:20 INFO: 2020-09-02 00:00:20 INFO: 2020-09-02 00:00:20 INFO: 2020-09-02 00:00:20 INFO: 2020-09-02 00:00:20 INFO: init new order start 2020-09-02 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 1, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 476.2, 'high': 483.35, 'low': 476.2, 'close': 482.7, 'trades': 4819, 'volume': 3320940, 'vwap': 479.3, 'lastSize': 270, 'turnover': 159172470980, 'homeNotional': 39810.201813863896, 'foreignNotional': 19081091.651732072}, {'timestamp': datetime.datetime(2020, 9, 1, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 478.5, 'high': 480.05, 'low': 475.35, 'close': 476.2, 'trades': 4068, 'volume': 3160580, 'vwap': 478.08, 'lastSize': 187, 'turnover': 151098715540, 'homeNotional': 37909.45965151807, 'foreignNotional': 18123508.003393624}, {'timestamp': datetime.datetime(2020, 9, 1, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 476.25, 'high': 480.0, 'low': 476.0, 'close': 478.5, 'trades': 4275, 'volume': 2756231, 'vwap': 478.25, 'lastSize': 50, 'turnover': 131816304740, 'homeNotional': 33083.03363542558, 'foreignNotional': 15821924.739828777}] 2020-09-02 00:00:20 INFO: prepare candles [CandleItem(low=476.2, high=483.35, open=476.2, close=482.7, color='GREEN'), CandleItem(low=475.35, high=480.05, open=478.5, close=476.2, color='RED'), CandleItem(low=476.0, high=480.0, open=476.25, close=478.5, color='GREEN')] 2020-09-02 00:00:20 INFO: skip by colors first_candle=CandleItem(low=476.0, high=480.0, open=476.25, close=478.5, color='GREEN') second_candle=CandleItem(low=475.35, high=480.05, open=478.5, close=476.2, color='RED') last_candle=CandleItem(low=476.2, high=483.35, open=476.2, close=482.7, color='GREEN') 2020-09-02 00:00:20 INFO: check need new order None 2020-09-02 00:00:20 INFO: init new order end 2020-09-02 00:00:20 INFO: 2020-09-02 00:00:20 INFO: 2020-09-02 00:00:20 INFO: 2020-09-02 00:00:20 INFO: 2020-09-02 00:02:00 INFO: 2020-09-02 00:02:00 INFO: 2020-09-02 00:02:00 INFO: 2020-09-02 00:02:00 INFO: 2020-09-02 00:02:00 INFO: clearing start 2020-09-02 00:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'b8082e14-ee13-ff72-c550-f9a50921ff63', 'clOrdID': 'aa649f458a314e7c9bef87a0058812e9', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 232, 'price': None, 'displayQty': None, 'stopPx': 484.05, '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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 1, 17, 42, 26, 53000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 1, 17, 42, 26, 53000, tzinfo=tzutc())} 2020-09-02 00:02:00 INFO: skip by not found init order into storage 2020-09-02 00:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '4b3132c5-6103-4c79-daa1-69ef0d317d86', 'clOrdID': '9965af09a4ab443097d1bce09bd2a7ab', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 232, 'price': 435.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 1, 17, 42, 26, 877000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 1, 17, 42, 26, 877000, tzinfo=tzutc())} 2020-09-02 00:02:00 INFO: skip by not found init order into storage 2020-09-02 00:02:00 INFO: clearing end 2020-09-02 00:02:00 INFO: 2020-09-02 00:02:00 INFO: 2020-09-02 00:02:00 INFO: 2020-09-02 00:02:00 INFO: 2020-09-02 00:37:57 INFO: process event {'orderID': 'b8082e14-ee13-ff72-c550-f9a50921ff63', 'price': 484.2, 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 232, 'avgPx': 484.2, 'text': 'Triggered: Order stop price reached\nStop order by trader.py', 'transactTime': '2020-09-01T21:37:57.595Z', 'timestamp': '2020-09-01T21:37:57.595Z', 'clOrdID': 'aa649f458a314e7c9bef87a0058812e9', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-02 00:37:57 INFO: add new event={'uid': 'aa649f458a314e7c9bef87a0058812e9', 'status': 'Filled'} 2020-09-02 00:37:57 INFO: 2020-09-02 00:37:57 INFO: 2020-09-02 00:37:57 INFO: 2020-09-02 00:37:57 INFO: 2020-09-02 00:37:57 INFO: process event start 2020-09-02 00:37:57 INFO: fetch new order event aa649f458a314e7c9bef87a0058812e9 2020-09-02 00:37:57 INFO: fetch orders by event init=None profit_pair=9965af09a4ab443097d1bce09bd2a7ab 2020-09-02 00:37:57 INFO: process profit order filled 2020-09-02 00:37:58 INFO: process event {'orderID': '4b3132c5-6103-4c79-daa1-69ef0d317d86', 'ordStatus': 'Canceled', 'workingIndicator': False, 'leavesQty': 0, 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'timestamp': '2020-09-01T21:37:57.995Z', 'clOrdID': '9965af09a4ab443097d1bce09bd2a7ab', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-02 00:37:58 INFO: skip event 9965af09a4ab443097d1bce09bd2a7ab Canceled 2020-09-02 00:37:58 INFO: cancel order=9965af09a4ab443097d1bce09bd2a7ab [{'orderID': '4b3132c5-6103-4c79-daa1-69ef0d317d86', 'clOrdID': '9965af09a4ab443097d1bce09bd2a7ab', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 232, 'price': 435.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, 1, 17, 42, 26, 877000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 1, 21, 37, 57, 995000, tzinfo=tzutc())}] 2020-09-02 00:37:58 INFO: end process event_processing_result='proceed profit order' 2020-09-02 00:37:58 INFO: 2020-09-02 00:37:58 INFO: 2020-09-02 00:37:58 INFO: 2020-09-02 00:37:58 INFO: 2020-09-02 01:00:20 INFO: 2020-09-02 01:00:20 INFO: 2020-09-02 01:00:20 INFO: 2020-09-02 01:00:20 INFO: 2020-09-02 01:00:20 INFO: init new order start 2020-09-02 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 1, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 482.7, 'high': 486.35, 'low': 480.85, 'close': 483.8, 'trades': 5225, 'volume': 3003444, 'vwap': 483.5, 'lastSize': 50, 'turnover': 145214772155, 'homeNotional': 36120.65526550787, 'foreignNotional': 17464166.530479558}, {'timestamp': datetime.datetime(2020, 9, 1, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 476.2, 'high': 483.35, 'low': 476.2, 'close': 482.7, 'trades': 4819, 'volume': 3320940, 'vwap': 479.3, 'lastSize': 270, 'turnover': 159172470980, 'homeNotional': 39810.201813863896, 'foreignNotional': 19081091.651732072}, {'timestamp': datetime.datetime(2020, 9, 1, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 478.5, 'high': 480.05, 'low': 475.35, 'close': 476.2, 'trades': 4068, 'volume': 3160580, 'vwap': 478.08, 'lastSize': 187, 'turnover': 151098715540, 'homeNotional': 37909.45965151807, 'foreignNotional': 18123508.003393624}] 2020-09-02 01:00:20 INFO: prepare candles [CandleItem(low=480.85, high=486.35, open=482.7, close=483.8, color='GREEN'), CandleItem(low=476.2, high=483.35, open=476.2, close=482.7, color='GREEN'), CandleItem(low=475.35, high=480.05, open=478.5, close=476.2, color='RED')] 2020-09-02 01:00:20 INFO: skip by colors first_candle=CandleItem(low=475.35, high=480.05, open=478.5, close=476.2, color='RED') second_candle=CandleItem(low=476.2, high=483.35, open=476.2, close=482.7, color='GREEN') last_candle=CandleItem(low=480.85, high=486.35, open=482.7, close=483.8, color='GREEN') 2020-09-02 01:00:20 INFO: check need new order None 2020-09-02 01:00:20 INFO: init new order end 2020-09-02 01:00:20 INFO: 2020-09-02 01:00:20 INFO: 2020-09-02 01:00:20 INFO: 2020-09-02 01:00:20 INFO: 2020-09-02 01:02:00 INFO: 2020-09-02 01:02:00 INFO: 2020-09-02 01:02:00 INFO: 2020-09-02 01:02:00 INFO: 2020-09-02 01:02:00 INFO: clearing start 2020-09-02 01:02:00 INFO: clearing end 2020-09-02 01:02:00 INFO: 2020-09-02 01:02:00 INFO: 2020-09-02 01:02:00 INFO: 2020-09-02 01:02:00 INFO: 2020-09-02 02:00:20 INFO: 2020-09-02 02:00:21 INFO: 2020-09-02 02:00:21 INFO: 2020-09-02 02:00:21 INFO: 2020-09-02 02:00:21 INFO: init new order start 2020-09-02 02:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 1, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 483.8, 'high': 490.6, 'low': 480.6, 'close': 482.4, 'trades': 11087, 'volume': 7170158, 'vwap': 485.12, 'lastSize': 100, 'turnover': 347836313310, 'homeNotional': 86159.49333553312, 'foreignNotional': 41797996.36804288}, {'timestamp': datetime.datetime(2020, 9, 1, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 482.7, 'high': 486.35, 'low': 480.85, 'close': 483.8, 'trades': 5225, 'volume': 3003444, 'vwap': 483.5, 'lastSize': 50, 'turnover': 145214772155, 'homeNotional': 36120.65526550787, 'foreignNotional': 17464166.530479558}, {'timestamp': datetime.datetime(2020, 9, 1, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 476.2, 'high': 483.35, 'low': 476.2, 'close': 482.7, 'trades': 4819, 'volume': 3320940, 'vwap': 479.3, 'lastSize': 270, 'turnover': 159172470980, 'homeNotional': 39810.201813863896, 'foreignNotional': 19081091.651732072}] 2020-09-02 02:00:21 INFO: prepare candles [CandleItem(low=480.6, high=490.6, open=483.8, close=482.4, color='RED'), CandleItem(low=480.85, high=486.35, open=482.7, close=483.8, color='GREEN'), CandleItem(low=476.2, high=483.35, open=476.2, close=482.7, color='GREEN')] 2020-09-02 02:00:21 INFO: last_candle=CandleItem(low=480.6, high=490.6, open=483.8, close=482.4, color='RED') 2020-09-02 02: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-02 02: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=480.6, high=490.6, open=483.8, close=482.4, color='RED') 2020-09-02 02:00:21 INFO: skip by CandleItem(low=480.6, high=490.6, open=483.8, close=482.4, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-02 02: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-02 02: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=480.6, high=490.6, open=483.8, close=482.4, color='RED') 2020-09-02 02:00:21 INFO: skip by CandleItem(low=480.6, high=490.6, open=483.8, close=482.4, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-02 02:00:21 INFO: not found applicable config for candle 2020-09-02 02:00:21 INFO: check need new order None 2020-09-02 02:00:21 INFO: init new order end 2020-09-02 02:00:21 INFO: 2020-09-02 02:00:21 INFO: 2020-09-02 02:00:21 INFO: 2020-09-02 02:00:21 INFO: 2020-09-02 02:02:00 INFO: 2020-09-02 02:02:00 INFO: 2020-09-02 02:02:00 INFO: 2020-09-02 02:02:00 INFO: 2020-09-02 02:02:00 INFO: clearing start 2020-09-02 02:02:00 INFO: clearing end 2020-09-02 02:02:00 INFO: 2020-09-02 02:02:00 INFO: 2020-09-02 02:02:00 INFO: 2020-09-02 02:02:00 INFO: 2020-09-02 03:00:20 INFO: 2020-09-02 03:00:20 INFO: 2020-09-02 03:00:20 INFO: 2020-09-02 03:00:20 INFO: 2020-09-02 03:00:20 INFO: init new order start 2020-09-02 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 2, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 482.4, 'high': 485.8, 'low': 471.6, 'close': 476.45, 'trades': 8016, 'volume': 6840045, 'vwap': 478.91, 'lastSize': 10, 'turnover': 327574266210, 'homeNotional': 81707.82078252031, 'foreignNotional': 39131690.714925855}, {'timestamp': datetime.datetime(2020, 9, 1, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 483.8, 'high': 490.6, 'low': 480.6, 'close': 482.4, 'trades': 11087, 'volume': 7170158, 'vwap': 485.12, 'lastSize': 100, 'turnover': 347836313310, 'homeNotional': 86159.49333553312, 'foreignNotional': 41797996.36804288}, {'timestamp': datetime.datetime(2020, 9, 1, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 482.7, 'high': 486.35, 'low': 480.85, 'close': 483.8, 'trades': 5225, 'volume': 3003444, 'vwap': 483.5, 'lastSize': 50, 'turnover': 145214772155, 'homeNotional': 36120.65526550787, 'foreignNotional': 17464166.530479558}] 2020-09-02 03:00:20 INFO: prepare candles [CandleItem(low=471.6, high=485.8, open=482.4, close=476.45, color='RED'), CandleItem(low=480.6, high=490.6, open=483.8, close=482.4, color='RED'), CandleItem(low=480.85, high=486.35, open=482.7, close=483.8, color='GREEN')] 2020-09-02 03:00:20 INFO: skip by colors first_candle=CandleItem(low=480.85, high=486.35, open=482.7, close=483.8, color='GREEN') second_candle=CandleItem(low=480.6, high=490.6, open=483.8, close=482.4, color='RED') last_candle=CandleItem(low=471.6, high=485.8, open=482.4, close=476.45, color='RED') 2020-09-02 03:00:20 INFO: check need new order None 2020-09-02 03:00:20 INFO: init new order end 2020-09-02 03:00:20 INFO: 2020-09-02 03:00:20 INFO: 2020-09-02 03:00:20 INFO: 2020-09-02 03:00:20 INFO: 2020-09-02 03:02:00 INFO: 2020-09-02 03:02:00 INFO: 2020-09-02 03:02:00 INFO: 2020-09-02 03:02:00 INFO: 2020-09-02 03:02:00 INFO: clearing start 2020-09-02 03:02:00 INFO: clearing end 2020-09-02 03:02:00 INFO: 2020-09-02 03:02:00 INFO: 2020-09-02 03:02:00 INFO: 2020-09-02 03:02:00 INFO: 2020-09-02 04:00:20 INFO: 2020-09-02 04:00:20 INFO: 2020-09-02 04:00:20 INFO: 2020-09-02 04:00:20 INFO: 2020-09-02 04:00:20 INFO: init new order start 2020-09-02 04:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 2, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 476.45, 'high': 479.05, 'low': 466.85, 'close': 469.25, 'trades': 10186, 'volume': 8354631, 'vwap': 472.76, 'lastSize': 12, 'turnover': 394972388650, 'homeNotional': 99553.47404474208, 'foreignNotional': 47065211.83776238}, {'timestamp': datetime.datetime(2020, 9, 2, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 482.4, 'high': 485.8, 'low': 471.6, 'close': 476.45, 'trades': 8016, 'volume': 6840045, 'vwap': 478.91, 'lastSize': 10, 'turnover': 327574266210, 'homeNotional': 81707.82078252031, 'foreignNotional': 39131690.714925855}, {'timestamp': datetime.datetime(2020, 9, 1, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 483.8, 'high': 490.6, 'low': 480.6, 'close': 482.4, 'trades': 11087, 'volume': 7170158, 'vwap': 485.12, 'lastSize': 100, 'turnover': 347836313310, 'homeNotional': 86159.49333553312, 'foreignNotional': 41797996.36804288}] 2020-09-02 04:00:20 INFO: prepare candles [CandleItem(low=466.85, high=479.05, open=476.45, close=469.25, color='RED'), CandleItem(low=471.6, high=485.8, open=482.4, close=476.45, color='RED'), CandleItem(low=480.6, high=490.6, open=483.8, close=482.4, color='RED')] 2020-09-02 04:00:20 INFO: skip by colors first_candle=CandleItem(low=480.6, high=490.6, open=483.8, close=482.4, color='RED') second_candle=CandleItem(low=471.6, high=485.8, open=482.4, close=476.45, color='RED') last_candle=CandleItem(low=466.85, high=479.05, open=476.45, close=469.25, color='RED') 2020-09-02 04:00:20 INFO: check need new order None 2020-09-02 04:00:20 INFO: init new order end 2020-09-02 04:00:20 INFO: 2020-09-02 04:00:20 INFO: 2020-09-02 04:00:20 INFO: 2020-09-02 04:00:20 INFO: 2020-09-02 04:02:00 INFO: 2020-09-02 04:02:00 INFO: 2020-09-02 04:02:00 INFO: 2020-09-02 04:02:00 INFO: 2020-09-02 04:02:00 INFO: clearing start 2020-09-02 04:02:01 INFO: clearing end 2020-09-02 04:02:01 INFO: 2020-09-02 04:02:01 INFO: 2020-09-02 04:02:01 INFO: 2020-09-02 04:02:01 INFO: 2020-09-02 05:00:20 INFO: 2020-09-02 05:00:20 INFO: 2020-09-02 05:00:20 INFO: 2020-09-02 05:00:20 INFO: 2020-09-02 05:00:20 INFO: init new order start 2020-09-02 05:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 2, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 469.25, 'high': 474.65, 'low': 466.15, 'close': 471.95, 'trades': 6355, 'volume': 5717488, 'vwap': 470.7, 'lastSize': 12, 'turnover': 269117906630, 'homeNotional': 68023.49760879226, 'foreignNotional': 32018308.88138973}, {'timestamp': datetime.datetime(2020, 9, 2, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 476.45, 'high': 479.05, 'low': 466.85, 'close': 469.25, 'trades': 10186, 'volume': 8354631, 'vwap': 472.76, 'lastSize': 12, 'turnover': 394972388650, 'homeNotional': 99553.47404474208, 'foreignNotional': 47065211.83776238}, {'timestamp': datetime.datetime(2020, 9, 2, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 482.4, 'high': 485.8, 'low': 471.6, 'close': 476.45, 'trades': 8016, 'volume': 6840045, 'vwap': 478.91, 'lastSize': 10, 'turnover': 327574266210, 'homeNotional': 81707.82078252031, 'foreignNotional': 39131690.714925855}] 2020-09-02 05:00:20 INFO: prepare candles [CandleItem(low=466.15, high=474.65, open=469.25, close=471.95, color='GREEN'), CandleItem(low=466.85, high=479.05, open=476.45, close=469.25, color='RED'), CandleItem(low=471.6, high=485.8, open=482.4, close=476.45, color='RED')] 2020-09-02 05:00:20 INFO: last_candle=CandleItem(low=466.15, high=474.65, open=469.25, close=471.95, color='GREEN') 2020-09-02 05:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-09-02 05:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=466.15, high=474.65, open=469.25, close=471.95, color='GREEN') 2020-09-02 05:00:20 INFO: skip by CandleItem(low=466.15, high=474.65, open=469.25, close=471.95, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-02 05:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-09-02 05:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=466.15, high=474.65, open=469.25, close=471.95, color='GREEN') 2020-09-02 05:00:20 INFO: apply filter None to candle=CandleItem(low=466.85, high=479.05, open=476.45, close=469.25, color='RED') 2020-09-02 05:00:20 INFO: apply filter None to candle=CandleItem(low=471.6, high=485.8, open=482.4, close=476.45, color='RED') 2020-09-02 05:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=466.15, high=474.65, open=469.25, close=471.95, color='GREEN'), take_profit_factor=5.0, clearing_interval=3600) 2020-09-02 05:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=466.15, high=474.65, open=469.25, close=471.95, color='GREEN'), take_profit_factor=5.0, clearing_interval=3600) 2020-09-02 05:00:20 INFO: place order: start candle=CandleItem(low=466.15, high=474.65, open=469.25, close=471.95, color='GREEN') ticker='ETHUSD' price_offset=0.1 2020-09-02 05:00:20 INFO: place order: side_factor=-1 init_trigger_price=474.7 init_order_price=474.75 stop_price_offset=0.0 candle.size=8.5 stop_price=466.15 take_price=517.25 2020-09-02 05:00:20 INFO: place order round: side_factor=-1 init_trigger_price=Decimal('474.69999999999998863131622783839702606201171875') init_order_price=Decimal('474.75') stop_price_offset=0.0 candle.size=8.5 stop_price=Decimal('466.1499999999999772626324556767940521240234375') take_price=Decimal('517.25') 2020-09-02 05:00:20 INFO: place order: compute qty=222 2020-09-02 05:00:20 INFO: place order: save order to db e42dcc549cb146dbb95016f3082d880b; response=True 2020-09-02 05:00:20 INFO: post order to exchange resp={'orderID': '2ccd823c-9868-5354-da77-2d68da2c063a', 'clOrdID': 'e42dcc549cb146dbb95016f3082d880b', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 222, 'price': 474.75, 'displayQty': None, 'stopPx': 474.7, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 222, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 2, 2, 0, 20, 646000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 2, 2, 0, 20, 646000, tzinfo=tzutc())} 2020-09-02 05:00:20 INFO: place new init order {'qty': 222, 'init_price': Decimal('474.69999999999998863131622783839702606201171875'), 'stop_price': Decimal('466.1499999999999772626324556767940521240234375'), 'take_price': Decimal('517.25'), 'order_uid': 'e42dcc549cb146dbb95016f3082d880b', 'response': {'orderID': '2ccd823c-9868-5354-da77-2d68da2c063a', 'clOrdID': 'e42dcc549cb146dbb95016f3082d880b', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 222, 'price': 474.75, 'displayQty': None, 'stopPx': 474.7, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 222, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 2, 2, 0, 20, 646000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 2, 2, 0, 20, 646000, tzinfo=tzutc())}} 2020-09-02 05:00:20 INFO: init new order end 2020-09-02 05:00:20 INFO: 2020-09-02 05:00:20 INFO: 2020-09-02 05:00:20 INFO: 2020-09-02 05:00:20 INFO: 2020-09-02 05:00:20 INFO: process event {'orderID': '2ccd823c-9868-5354-da77-2d68da2c063a', 'clOrdID': 'e42dcc549cb146dbb95016f3082d880b', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 222, 'price': 474.75, 'displayQty': None, 'stopPx': 474.7, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 222, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-09-02T02:00:20.646Z', 'timestamp': '2020-09-02T02:00:20.646Z'} 2020-09-02 05:00:20 INFO: skip event e42dcc549cb146dbb95016f3082d880b New 2020-09-02 05:02:00 INFO: 2020-09-02 05:02:00 INFO: 2020-09-02 05:02:00 INFO: 2020-09-02 05:02:00 INFO: 2020-09-02 05:02:00 INFO: clearing start 2020-09-02 05:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '2ccd823c-9868-5354-da77-2d68da2c063a', 'clOrdID': 'e42dcc549cb146dbb95016f3082d880b', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 222, 'price': 474.75, 'displayQty': None, 'stopPx': 474.7, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 222, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 2, 2, 0, 20, 646000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 2, 2, 0, 20, 646000, tzinfo=tzutc())} 2020-09-02 05:02:00 INFO: order time=2020-09-02 02:00:20.646000+00:00; delta from now UTC=0:01:40.184916 time_delta.total_seconds()=100.184916; time_diff_offset='3600' 2020-09-02 05:02:00 INFO: skip by time diff 2020-09-02 02:00:20.646000+00:00 2020-09-02 05:02:00 INFO: clearing end 2020-09-02 05:02:00 INFO: 2020-09-02 05:02:00 INFO: 2020-09-02 05:02:00 INFO: 2020-09-02 05:02:00 INFO: 2020-09-02 05:28:49 INFO: process event {'orderID': '2ccd823c-9868-5354-da77-2d68da2c063a', 'triggered': 'StopOrderTriggered', 'workingIndicator': True, 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'transactTime': '2020-09-02T02:28:49.741Z', 'timestamp': '2020-09-02T02:28:49.741Z', 'clOrdID': 'e42dcc549cb146dbb95016f3082d880b', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-02 05:28:49 INFO: skip event e42dcc549cb146dbb95016f3082d880b 2020-09-02 05:28:49 INFO: process event {'orderID': '2ccd823c-9868-5354-da77-2d68da2c063a', 'ordStatus': 'PartiallyFilled', 'leavesQty': 122, 'cumQty': 100, 'avgPx': 474.75, 'timestamp': '2020-09-02T02:28:49.806Z', 'clOrdID': 'e42dcc549cb146dbb95016f3082d880b', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-02 05:28:49 INFO: skip event e42dcc549cb146dbb95016f3082d880b PartiallyFilled 2020-09-02 05:28:49 INFO: process event {'orderID': '2ccd823c-9868-5354-da77-2d68da2c063a', 'ordStatus': 'Filled', 'workingIndicator': False, 'leavesQty': 0, 'cumQty': 222, 'timestamp': '2020-09-02T02:28:49.810Z', 'clOrdID': 'e42dcc549cb146dbb95016f3082d880b', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-02 05:28:49 INFO: add new event={'uid': 'e42dcc549cb146dbb95016f3082d880b', 'status': 'Filled'} 2020-09-02 05:28:50 INFO: 2020-09-02 05:28:50 INFO: 2020-09-02 05:28:50 INFO: 2020-09-02 05:28:50 INFO: 2020-09-02 05:28:50 INFO: process event start 2020-09-02 05:28:50 INFO: fetch new order event e42dcc549cb146dbb95016f3082d880b 2020-09-02 05:28:50 INFO: fetch orders by event init={'stop': '466.1499999999999772626324556767940521240234375', 'take': '517.25', 'qty': '222', 'color': 'GREEN', 'ticker': 'ETHUSD', 'clearing_offset': '3600'} profit_pair=None 2020-09-02 05:28:50 INFO: process init order filled 2020-09-02 05:28:50 INFO: save profit orders to storage stop=fe7d35f616f14b2b989dd213f9e91f1a take=8a2fd963db944048b9ef2dbfdf6a964c 2020-09-02 05:28:50 INFO: place profit orders take_price=517.25, stop_price=466.1499999999999772626324556767940521240234375, qty=222, color=GREEN, ticker=ETHUSD fe7d35f616f14b2b989dd213f9e91f1a 8a2fd963db944048b9ef2dbfdf6a964c 2020-09-02 05:28:50 INFO: place stop order ETHUSD: qty=-222, stop_price=466.1499999999999772626324556767940521240234375, stop_uid=fe7d35f616f14b2b989dd213f9e91f1a 2020-09-02 05:28:51 INFO: exchange resp for stop order={'orderID': '7467e0d2-1e0e-31b4-cab9-0def004ffac1', 'clOrdID': 'fe7d35f616f14b2b989dd213f9e91f1a', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 222, 'price': None, 'displayQty': None, 'stopPx': 466.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': 222, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 2, 2, 28, 51, 48000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 2, 2, 28, 51, 48000, tzinfo=tzutc())} 2020-09-02 05:28:51 INFO: place limit order ETHUSD: qty=-222, price=517.25, take_uid=8a2fd963db944048b9ef2dbfdf6a964c 2020-09-02 05:28:51 INFO: process event {'orderID': '7467e0d2-1e0e-31b4-cab9-0def004ffac1', 'clOrdID': 'fe7d35f616f14b2b989dd213f9e91f1a', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 222, 'price': None, 'displayQty': None, 'stopPx': 466.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': 222, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': '2020-09-02T02:28:51.048Z', 'timestamp': '2020-09-02T02:28:51.048Z'} 2020-09-02 05:28:51 INFO: skip event fe7d35f616f14b2b989dd213f9e91f1a New 2020-09-02 05:28:51 INFO: exchange resp for take profit order={'orderID': '47a96ced-4c78-a161-3e8e-f7206a8862ac', 'clOrdID': '8a2fd963db944048b9ef2dbfdf6a964c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 222, 'price': 517.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 222, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 2, 2, 28, 51, 379000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 2, 2, 28, 51, 379000, tzinfo=tzutc())} 2020-09-02 05:28:51 INFO: place profit orders={'stop': {'response': {'orderID': '7467e0d2-1e0e-31b4-cab9-0def004ffac1', 'clOrdID': 'fe7d35f616f14b2b989dd213f9e91f1a', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 222, 'price': None, 'displayQty': None, 'stopPx': 466.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': 222, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 2, 2, 28, 51, 48000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 2, 2, 28, 51, 48000, tzinfo=tzutc())}, 'qty': Decimal('-222'), 'uid': 'fe7d35f616f14b2b989dd213f9e91f1a', 'price': Decimal('466.1499999999999772626324556767940521240234375')}, 'take': {'response': {'orderID': '47a96ced-4c78-a161-3e8e-f7206a8862ac', 'clOrdID': '8a2fd963db944048b9ef2dbfdf6a964c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 222, 'price': 517.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 222, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 2, 2, 28, 51, 379000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 2, 2, 28, 51, 379000, tzinfo=tzutc())}, 'qty': Decimal('-222'), 'uid': '8a2fd963db944048b9ef2dbfdf6a964c', 'price': Decimal('517.25')}} 2020-09-02 05:28:51 INFO: rm init order from db e42dcc549cb146dbb95016f3082d880b 2020-09-02 05:28:51 INFO: end process event_processing_result='proceed init order' 2020-09-02 05:28:51 INFO: 2020-09-02 05:28:51 INFO: 2020-09-02 05:28:51 INFO: 2020-09-02 05:28:51 INFO: 2020-09-02 05:28:51 INFO: process event {'orderID': '47a96ced-4c78-a161-3e8e-f7206a8862ac', 'clOrdID': '8a2fd963db944048b9ef2dbfdf6a964c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 222, 'price': 517.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 222, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': '2020-09-02T02:28:51.379Z', 'timestamp': '2020-09-02T02:28:51.379Z'} 2020-09-02 05:28:51 INFO: skip event 8a2fd963db944048b9ef2dbfdf6a964c New 2020-09-02 06:00:20 INFO: 2020-09-02 06:00:20 INFO: 2020-09-02 06:00:20 INFO: 2020-09-02 06:00:20 INFO: 2020-09-02 06:00:20 INFO: init new order start 2020-09-02 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 2, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 471.95, 'high': 474.9, 'low': 468.5, 'close': 470.7, 'trades': 4488, 'volume': 3876559, 'vwap': 471.9, 'lastSize': 11, 'turnover': 182932013735, 'homeNotional': 46087.96734877651, 'foreignNotional': 21748674.328706868}, {'timestamp': datetime.datetime(2020, 9, 2, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 469.25, 'high': 474.65, 'low': 466.15, 'close': 471.95, 'trades': 6355, 'volume': 5717488, 'vwap': 470.7, 'lastSize': 12, 'turnover': 269117906630, 'homeNotional': 68023.49760879226, 'foreignNotional': 32018308.88138973}, {'timestamp': datetime.datetime(2020, 9, 2, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 476.45, 'high': 479.05, 'low': 466.85, 'close': 469.25, 'trades': 10186, 'volume': 8354631, 'vwap': 472.76, 'lastSize': 12, 'turnover': 394972388650, 'homeNotional': 99553.47404474208, 'foreignNotional': 47065211.83776238}] 2020-09-02 06:00:20 INFO: prepare candles [CandleItem(low=468.5, high=474.9, open=471.95, close=470.7, color='RED'), CandleItem(low=466.15, high=474.65, open=469.25, close=471.95, color='GREEN'), CandleItem(low=466.85, high=479.05, open=476.45, close=469.25, color='RED')] 2020-09-02 06:00:20 INFO: skip by colors first_candle=CandleItem(low=466.85, high=479.05, open=476.45, close=469.25, color='RED') second_candle=CandleItem(low=466.15, high=474.65, open=469.25, close=471.95, color='GREEN') last_candle=CandleItem(low=468.5, high=474.9, open=471.95, close=470.7, color='RED') 2020-09-02 06:00:20 INFO: check need new order None 2020-09-02 06:00:20 INFO: init new order end 2020-09-02 06:00:20 INFO: 2020-09-02 06:00:20 INFO: 2020-09-02 06:00:20 INFO: 2020-09-02 06:00:20 INFO: 2020-09-02 06:02:00 INFO: 2020-09-02 06:02:00 INFO: 2020-09-02 06:02:00 INFO: 2020-09-02 06:02:00 INFO: 2020-09-02 06:02:00 INFO: clearing start 2020-09-02 06:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '7467e0d2-1e0e-31b4-cab9-0def004ffac1', 'clOrdID': 'fe7d35f616f14b2b989dd213f9e91f1a', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 222, 'price': None, 'displayQty': None, 'stopPx': 466.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': 222, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 2, 2, 28, 51, 48000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 2, 2, 28, 51, 48000, tzinfo=tzutc())} 2020-09-02 06:02:00 INFO: skip by not found init order into storage 2020-09-02 06:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '47a96ced-4c78-a161-3e8e-f7206a8862ac', 'clOrdID': '8a2fd963db944048b9ef2dbfdf6a964c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 222, 'price': 517.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 222, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 2, 2, 28, 51, 379000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 2, 2, 28, 51, 379000, tzinfo=tzutc())} 2020-09-02 06:02:00 INFO: skip by not found init order into storage 2020-09-02 06:02:00 INFO: clearing end 2020-09-02 06:02:00 INFO: 2020-09-02 06:02:00 INFO: 2020-09-02 06:02:00 INFO: 2020-09-02 06:02:00 INFO: 2020-09-02 07:00:20 INFO: 2020-09-02 07:00:20 INFO: 2020-09-02 07:00:20 INFO: 2020-09-02 07:00:20 INFO: 2020-09-02 07:00:20 INFO: init new order start 2020-09-02 07:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 2, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 470.7, 'high': 472.7, 'low': 469.25, 'close': 470.25, 'trades': 4746, 'volume': 4374733, 'vwap': 470.87, 'lastSize': 12, 'turnover': 205989919895, 'homeNotional': 51846.81635862704, 'foreignNotional': 24412767.54818198}, {'timestamp': datetime.datetime(2020, 9, 2, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 471.95, 'high': 474.9, 'low': 468.5, 'close': 470.7, 'trades': 4488, 'volume': 3876559, 'vwap': 471.9, 'lastSize': 11, 'turnover': 182932013735, 'homeNotional': 46087.96734877651, 'foreignNotional': 21748674.328706868}, {'timestamp': datetime.datetime(2020, 9, 2, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 469.25, 'high': 474.65, 'low': 466.15, 'close': 471.95, 'trades': 6355, 'volume': 5717488, 'vwap': 470.7, 'lastSize': 12, 'turnover': 269117906630, 'homeNotional': 68023.49760879226, 'foreignNotional': 32018308.88138973}] 2020-09-02 07:00:20 INFO: prepare candles [CandleItem(low=469.25, high=472.7, open=470.7, close=470.25, color='RED'), CandleItem(low=468.5, high=474.9, open=471.95, close=470.7, color='RED'), CandleItem(low=466.15, high=474.65, open=469.25, close=471.95, color='GREEN')] 2020-09-02 07:00:20 INFO: skip by colors first_candle=CandleItem(low=466.15, high=474.65, open=469.25, close=471.95, color='GREEN') second_candle=CandleItem(low=468.5, high=474.9, open=471.95, close=470.7, color='RED') last_candle=CandleItem(low=469.25, high=472.7, open=470.7, close=470.25, color='RED') 2020-09-02 07:00:20 INFO: check need new order None 2020-09-02 07:00:20 INFO: init new order end 2020-09-02 07:00:20 INFO: 2020-09-02 07:00:20 INFO: 2020-09-02 07:00:20 INFO: 2020-09-02 07:00:20 INFO: 2020-09-02 07:02:00 INFO: 2020-09-02 07:02:00 INFO: 2020-09-02 07:02:00 INFO: 2020-09-02 07:02:00 INFO: 2020-09-02 07:02:00 INFO: clearing start 2020-09-02 07:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '7467e0d2-1e0e-31b4-cab9-0def004ffac1', 'clOrdID': 'fe7d35f616f14b2b989dd213f9e91f1a', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 222, 'price': None, 'displayQty': None, 'stopPx': 466.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': 222, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 2, 2, 28, 51, 48000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 2, 2, 28, 51, 48000, tzinfo=tzutc())} 2020-09-02 07:02:00 INFO: skip by not found init order into storage 2020-09-02 07:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '47a96ced-4c78-a161-3e8e-f7206a8862ac', 'clOrdID': '8a2fd963db944048b9ef2dbfdf6a964c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 222, 'price': 517.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 222, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 2, 2, 28, 51, 379000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 2, 2, 28, 51, 379000, tzinfo=tzutc())} 2020-09-02 07:02:00 INFO: skip by not found init order into storage 2020-09-02 07:02:00 INFO: clearing end 2020-09-02 07:02:00 INFO: 2020-09-02 07:02:00 INFO: 2020-09-02 07:02:00 INFO: 2020-09-02 07:02:00 INFO: 2020-09-02 08:00:20 INFO: 2020-09-02 08:00:20 INFO: 2020-09-02 08:00:20 INFO: 2020-09-02 08:00:20 INFO: 2020-09-02 08:00:20 INFO: init new order start 2020-09-02 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 2, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 470.25, 'high': 479.15, 'low': 469.9, 'close': 476.75, 'trades': 6235, 'volume': 6147407, 'vwap': 474.81, 'lastSize': 690, 'turnover': 291880402860, 'homeNotional': 72923.30457130437, 'foreignNotional': 34624501.08748637}, {'timestamp': datetime.datetime(2020, 9, 2, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 470.7, 'high': 472.7, 'low': 469.25, 'close': 470.25, 'trades': 4746, 'volume': 4374733, 'vwap': 470.87, 'lastSize': 12, 'turnover': 205989919895, 'homeNotional': 51846.81635862704, 'foreignNotional': 24412767.54818198}, {'timestamp': datetime.datetime(2020, 9, 2, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 471.95, 'high': 474.9, 'low': 468.5, 'close': 470.7, 'trades': 4488, 'volume': 3876559, 'vwap': 471.9, 'lastSize': 11, 'turnover': 182932013735, 'homeNotional': 46087.96734877651, 'foreignNotional': 21748674.328706868}] 2020-09-02 08:00:20 INFO: prepare candles [CandleItem(low=469.9, high=479.15, open=470.25, close=476.75, color='GREEN'), CandleItem(low=469.25, high=472.7, open=470.7, close=470.25, color='RED'), CandleItem(low=468.5, high=474.9, open=471.95, close=470.7, color='RED')] 2020-09-02 08:00:20 INFO: last_candle=CandleItem(low=469.9, high=479.15, open=470.25, close=476.75, color='GREEN') 2020-09-02 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-02 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=469.9, high=479.15, open=470.25, close=476.75, color='GREEN') 2020-09-02 08:00:20 INFO: skip by CandleItem(low=469.9, high=479.15, open=470.25, close=476.75, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-02 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-02 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=469.9, high=479.15, open=470.25, close=476.75, color='GREEN') 2020-09-02 08:00:20 INFO: apply filter None to candle=CandleItem(low=469.25, high=472.7, open=470.7, close=470.25, color='RED') 2020-09-02 08:00:20 INFO: apply filter None to candle=CandleItem(low=468.5, high=474.9, open=471.95, close=470.7, color='RED') 2020-09-02 08:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=469.9, high=479.15, open=470.25, close=476.75, color='GREEN'), take_profit_factor=5.0, clearing_interval=3600) 2020-09-02 08:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=469.9, high=479.15, open=470.25, close=476.75, color='GREEN'), take_profit_factor=5.0, clearing_interval=3600) 2020-09-02 08:00:20 INFO: place order: start candle=CandleItem(low=469.9, high=479.15, open=470.25, close=476.75, color='GREEN') ticker='ETHUSD' price_offset=0.1 2020-09-02 08:00:20 INFO: place order: side_factor=-1 init_trigger_price=479.2 init_order_price=479.25 stop_price_offset=0.0 candle.size=9.25 stop_price=469.9 take_price=525.5 2020-09-02 08:00:20 INFO: place order round: side_factor=-1 init_trigger_price=Decimal('479.19999999999998863131622783839702606201171875') init_order_price=Decimal('479.25') stop_price_offset=0.0 candle.size=9.25 stop_price=Decimal('469.8999999999999772626324556767940521240234375') take_price=Decimal('525.5') 2020-09-02 08:00:20 INFO: place order: compute qty=204 2020-09-02 08:00:20 INFO: place order: save order to db 222916c6670c4c019f6ff14937b71235; response=True 2020-09-02 08:00:20 INFO: post order to exchange resp={'orderID': 'a94736ed-ddbd-2cd7-bed6-db86854334f9', 'clOrdID': '222916c6670c4c019f6ff14937b71235', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 204, 'price': 479.25, 'displayQty': None, 'stopPx': 479.2, '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': 204, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 2, 5, 0, 20, 858000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 2, 5, 0, 20, 858000, tzinfo=tzutc())} 2020-09-02 08:00:20 INFO: place new init order {'qty': 204, 'init_price': Decimal('479.19999999999998863131622783839702606201171875'), 'stop_price': Decimal('469.8999999999999772626324556767940521240234375'), 'take_price': Decimal('525.5'), 'order_uid': '222916c6670c4c019f6ff14937b71235', 'response': {'orderID': 'a94736ed-ddbd-2cd7-bed6-db86854334f9', 'clOrdID': '222916c6670c4c019f6ff14937b71235', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 204, 'price': 479.25, 'displayQty': None, 'stopPx': 479.2, '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': 204, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 2, 5, 0, 20, 858000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 2, 5, 0, 20, 858000, tzinfo=tzutc())}} 2020-09-02 08:00:20 INFO: init new order end 2020-09-02 08:00:20 INFO: 2020-09-02 08:00:20 INFO: 2020-09-02 08:00:20 INFO: 2020-09-02 08:00:20 INFO: 2020-09-02 08:00:21 INFO: process event {'orderID': 'a94736ed-ddbd-2cd7-bed6-db86854334f9', 'clOrdID': '222916c6670c4c019f6ff14937b71235', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 204, 'price': 479.25, 'displayQty': None, 'stopPx': 479.2, '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': 204, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-09-02T05:00:20.858Z', 'timestamp': '2020-09-02T05:00:20.858Z'} 2020-09-02 08:00:21 INFO: skip event 222916c6670c4c019f6ff14937b71235 New 2020-09-02 08:02:00 INFO: 2020-09-02 08:02:01 INFO: 2020-09-02 08:02:01 INFO: 2020-09-02 08:02:01 INFO: 2020-09-02 08:02:01 INFO: clearing start 2020-09-02 08:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '7467e0d2-1e0e-31b4-cab9-0def004ffac1', 'clOrdID': 'fe7d35f616f14b2b989dd213f9e91f1a', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 222, 'price': None, 'displayQty': None, 'stopPx': 466.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': 222, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 2, 2, 28, 51, 48000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 2, 2, 28, 51, 48000, tzinfo=tzutc())} 2020-09-02 08:02:01 INFO: skip by not found init order into storage 2020-09-02 08:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '47a96ced-4c78-a161-3e8e-f7206a8862ac', 'clOrdID': '8a2fd963db944048b9ef2dbfdf6a964c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 222, 'price': 517.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 222, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 2, 2, 28, 51, 379000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 2, 2, 28, 51, 379000, tzinfo=tzutc())} 2020-09-02 08:02:01 INFO: skip by not found init order into storage 2020-09-02 08:02:01 INFO: fetch_orders_for_clearing test order {'orderID': 'a94736ed-ddbd-2cd7-bed6-db86854334f9', 'clOrdID': '222916c6670c4c019f6ff14937b71235', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 204, 'price': 479.25, 'displayQty': None, 'stopPx': 479.2, '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': 204, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 2, 5, 0, 20, 858000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 2, 5, 0, 20, 858000, tzinfo=tzutc())} 2020-09-02 08:02:01 INFO: order time=2020-09-02 05:00:20.858000+00:00; delta from now UTC=0:01:40.207695 time_delta.total_seconds()=100.207695; time_diff_offset='3600' 2020-09-02 08:02:01 INFO: skip by time diff 2020-09-02 05:00:20.858000+00:00 2020-09-02 08:02:01 INFO: clearing end 2020-09-02 08:02:01 INFO: 2020-09-02 08:02:01 INFO: 2020-09-02 08:02:01 INFO: 2020-09-02 08:02:01 INFO: 2020-09-02 08:12:16 INFO: process event {'orderID': 'a94736ed-ddbd-2cd7-bed6-db86854334f9', 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 204, 'avgPx': 479.25, 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'transactTime': '2020-09-02T05:12:16.003Z', 'timestamp': '2020-09-02T05:12:16.003Z', 'clOrdID': '222916c6670c4c019f6ff14937b71235', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-02 08:12:16 INFO: add new event={'uid': '222916c6670c4c019f6ff14937b71235', 'status': 'Filled'} 2020-09-02 08:12:16 INFO: 2020-09-02 08:12:16 INFO: 2020-09-02 08:12:16 INFO: 2020-09-02 08:12:16 INFO: 2020-09-02 08:12:16 INFO: process event start 2020-09-02 08:12:16 INFO: fetch new order event 222916c6670c4c019f6ff14937b71235 2020-09-02 08:12:16 INFO: fetch orders by event init={'stop': '469.8999999999999772626324556767940521240234375', 'take': '525.5', 'qty': '204', 'color': 'GREEN', 'ticker': 'ETHUSD', 'clearing_offset': '3600'} profit_pair=None 2020-09-02 08:12:16 INFO: process init order filled 2020-09-02 08:12:16 INFO: save profit orders to storage stop=f1101769e11d4065bf9d30e6a96821f3 take=60f6fb918f394b18a60589331cf62618 2020-09-02 08:12:16 INFO: place profit orders take_price=525.5, stop_price=469.8999999999999772626324556767940521240234375, qty=204, color=GREEN, ticker=ETHUSD f1101769e11d4065bf9d30e6a96821f3 60f6fb918f394b18a60589331cf62618 2020-09-02 08:12:16 INFO: place stop order ETHUSD: qty=-204, stop_price=469.8999999999999772626324556767940521240234375, stop_uid=f1101769e11d4065bf9d30e6a96821f3 2020-09-02 08:12:17 INFO: process event {'orderID': 'ec79fa77-d2a8-f527-1c4f-2b771e8f2d27', 'clOrdID': 'f1101769e11d4065bf9d30e6a96821f3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 204, 'price': None, 'displayQty': None, 'stopPx': 469.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': 204, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': '2020-09-02T05:12:17.056Z', 'timestamp': '2020-09-02T05:12:17.056Z'} 2020-09-02 08:12:17 INFO: skip event f1101769e11d4065bf9d30e6a96821f3 New 2020-09-02 08:12:17 INFO: exchange resp for stop order={'orderID': 'ec79fa77-d2a8-f527-1c4f-2b771e8f2d27', 'clOrdID': 'f1101769e11d4065bf9d30e6a96821f3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 204, 'price': None, 'displayQty': None, 'stopPx': 469.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': 204, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 2, 5, 12, 17, 56000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 2, 5, 12, 17, 56000, tzinfo=tzutc())} 2020-09-02 08:12:17 INFO: place limit order ETHUSD: qty=-204, price=525.5, take_uid=60f6fb918f394b18a60589331cf62618 2020-09-02 08:12:17 INFO: process event {'orderID': 'c154f8ac-7984-a394-1793-6d0892658e18', 'clOrdID': '60f6fb918f394b18a60589331cf62618', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 204, 'price': 525.5, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 204, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': '2020-09-02T05:12:17.094Z', 'timestamp': '2020-09-02T05:12:17.094Z'} 2020-09-02 08:12:17 INFO: skip event 60f6fb918f394b18a60589331cf62618 New 2020-09-02 08:12:17 INFO: exchange resp for take profit order={'orderID': 'c154f8ac-7984-a394-1793-6d0892658e18', 'clOrdID': '60f6fb918f394b18a60589331cf62618', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 204, 'price': 525.5, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 204, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 2, 5, 12, 17, 94000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 2, 5, 12, 17, 94000, tzinfo=tzutc())} 2020-09-02 08:12:17 INFO: place profit orders={'stop': {'response': {'orderID': 'ec79fa77-d2a8-f527-1c4f-2b771e8f2d27', 'clOrdID': 'f1101769e11d4065bf9d30e6a96821f3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 204, 'price': None, 'displayQty': None, 'stopPx': 469.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': 204, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 2, 5, 12, 17, 56000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 2, 5, 12, 17, 56000, tzinfo=tzutc())}, 'qty': Decimal('-204'), 'uid': 'f1101769e11d4065bf9d30e6a96821f3', 'price': Decimal('469.8999999999999772626324556767940521240234375')}, 'take': {'response': {'orderID': 'c154f8ac-7984-a394-1793-6d0892658e18', 'clOrdID': '60f6fb918f394b18a60589331cf62618', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 204, 'price': 525.5, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 204, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 2, 5, 12, 17, 94000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 2, 5, 12, 17, 94000, tzinfo=tzutc())}, 'qty': Decimal('-204'), 'uid': '60f6fb918f394b18a60589331cf62618', 'price': Decimal('525.5')}} 2020-09-02 08:12:17 INFO: rm init order from db 222916c6670c4c019f6ff14937b71235 2020-09-02 08:12:17 INFO: end process event_processing_result='proceed init order' 2020-09-02 08:12:17 INFO: 2020-09-02 08:12:17 INFO: 2020-09-02 08:12:17 INFO: 2020-09-02 08:12:17 INFO: 2020-09-02 09:00:20 INFO: 2020-09-02 09:00:21 INFO: 2020-09-02 09:00:21 INFO: 2020-09-02 09:00:21 INFO: 2020-09-02 09:00:21 INFO: init new order start 2020-09-02 09:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 2, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 476.75, 'high': 482.1, 'low': 475.95, 'close': 477.3, 'trades': 5095, 'volume': 3698672, 'vwap': 478.94, 'lastSize': 750, 'turnover': 177142895585, 'homeNotional': 43946.12049104497, 'foreignNotional': 21047464.289686784}, {'timestamp': datetime.datetime(2020, 9, 2, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 470.25, 'high': 479.15, 'low': 469.9, 'close': 476.75, 'trades': 6235, 'volume': 6147407, 'vwap': 474.81, 'lastSize': 690, 'turnover': 291880402860, 'homeNotional': 72923.30457130437, 'foreignNotional': 34624501.08748637}, {'timestamp': datetime.datetime(2020, 9, 2, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 470.7, 'high': 472.7, 'low': 469.25, 'close': 470.25, 'trades': 4746, 'volume': 4374733, 'vwap': 470.87, 'lastSize': 12, 'turnover': 205989919895, 'homeNotional': 51846.81635862704, 'foreignNotional': 24412767.54818198}] 2020-09-02 09:00:21 INFO: prepare candles [CandleItem(low=475.95, high=482.1, open=476.75, close=477.3, color='GREEN'), CandleItem(low=469.9, high=479.15, open=470.25, close=476.75, color='GREEN'), CandleItem(low=469.25, high=472.7, open=470.7, close=470.25, color='RED')] 2020-09-02 09:00:21 INFO: skip by colors first_candle=CandleItem(low=469.25, high=472.7, open=470.7, close=470.25, color='RED') second_candle=CandleItem(low=469.9, high=479.15, open=470.25, close=476.75, color='GREEN') last_candle=CandleItem(low=475.95, high=482.1, open=476.75, close=477.3, color='GREEN') 2020-09-02 09:00:21 INFO: check need new order None 2020-09-02 09:00:21 INFO: init new order end 2020-09-02 09:00:21 INFO: 2020-09-02 09:00:21 INFO: 2020-09-02 09:00:21 INFO: 2020-09-02 09:00:21 INFO: 2020-09-02 09:02:00 INFO: 2020-09-02 09:02:00 INFO: 2020-09-02 09:02:00 INFO: 2020-09-02 09:02:00 INFO: 2020-09-02 09:02:00 INFO: clearing start 2020-09-02 09:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '7467e0d2-1e0e-31b4-cab9-0def004ffac1', 'clOrdID': 'fe7d35f616f14b2b989dd213f9e91f1a', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 222, 'price': None, 'displayQty': None, 'stopPx': 466.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': 222, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 2, 2, 28, 51, 48000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 2, 2, 28, 51, 48000, tzinfo=tzutc())} 2020-09-02 09:02:01 INFO: skip by not found init order into storage 2020-09-02 09:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '47a96ced-4c78-a161-3e8e-f7206a8862ac', 'clOrdID': '8a2fd963db944048b9ef2dbfdf6a964c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 222, 'price': 517.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 222, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 2, 2, 28, 51, 379000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 2, 2, 28, 51, 379000, tzinfo=tzutc())} 2020-09-02 09:02:01 INFO: skip by not found init order into storage 2020-09-02 09:02:01 INFO: fetch_orders_for_clearing test order {'orderID': 'ec79fa77-d2a8-f527-1c4f-2b771e8f2d27', 'clOrdID': 'f1101769e11d4065bf9d30e6a96821f3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 204, 'price': None, 'displayQty': None, 'stopPx': 469.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': 204, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 2, 5, 12, 17, 56000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 2, 5, 12, 17, 56000, tzinfo=tzutc())} 2020-09-02 09:02:01 INFO: skip by not found init order into storage 2020-09-02 09:02:01 INFO: fetch_orders_for_clearing test order {'orderID': 'c154f8ac-7984-a394-1793-6d0892658e18', 'clOrdID': '60f6fb918f394b18a60589331cf62618', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 204, 'price': 525.5, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 204, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 2, 5, 12, 17, 94000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 2, 5, 12, 17, 94000, tzinfo=tzutc())} 2020-09-02 09:02:01 INFO: skip by not found init order into storage 2020-09-02 09:02:01 INFO: clearing end 2020-09-02 09:02:01 INFO: 2020-09-02 09:02:01 INFO: 2020-09-02 09:02:01 INFO: 2020-09-02 09:02:01 INFO: 2020-09-02 10:00:20 INFO: 2020-09-02 10:00:20 INFO: 2020-09-02 10:00:20 INFO: 2020-09-02 10:00:20 INFO: 2020-09-02 10:00:20 INFO: init new order start 2020-09-02 10:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 2, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 477.3, 'high': 477.3, 'low': 471.6, 'close': 474.2, 'trades': 6051, 'volume': 4826889, 'vwap': 473.73, 'lastSize': 1000, 'turnover': 228662643955, 'homeNotional': 56958.164845521074, 'foreignNotional': 26982713.10850284}, {'timestamp': datetime.datetime(2020, 9, 2, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 476.75, 'high': 482.1, 'low': 475.95, 'close': 477.3, 'trades': 5095, 'volume': 3698672, 'vwap': 478.94, 'lastSize': 750, 'turnover': 177142895585, 'homeNotional': 43946.12049104497, 'foreignNotional': 21047464.289686784}, {'timestamp': datetime.datetime(2020, 9, 2, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 470.25, 'high': 479.15, 'low': 469.9, 'close': 476.75, 'trades': 6235, 'volume': 6147407, 'vwap': 474.81, 'lastSize': 690, 'turnover': 291880402860, 'homeNotional': 72923.30457130437, 'foreignNotional': 34624501.08748637}] 2020-09-02 10:00:20 INFO: prepare candles [CandleItem(low=471.6, high=477.3, open=477.3, close=474.2, color='RED'), CandleItem(low=475.95, high=482.1, open=476.75, close=477.3, color='GREEN'), CandleItem(low=469.9, high=479.15, open=470.25, close=476.75, color='GREEN')] 2020-09-02 10:00:20 INFO: last_candle=CandleItem(low=471.6, high=477.3, open=477.3, close=474.2, color='RED') 2020-09-02 10:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-09-02 10:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=471.6, high=477.3, open=477.3, close=474.2, color='RED') 2020-09-02 10:00:20 INFO: skip by CandleItem(low=471.6, high=477.3, open=477.3, close=474.2, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-02 10:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-09-02 10:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=471.6, high=477.3, open=477.3, close=474.2, color='RED') 2020-09-02 10:00:20 INFO: skip by CandleItem(low=471.6, high=477.3, open=477.3, close=474.2, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-02 10:00:20 INFO: not found applicable config for candle 2020-09-02 10:00:20 INFO: check need new order None 2020-09-02 10:00:20 INFO: init new order end 2020-09-02 10:00:20 INFO: 2020-09-02 10:00:20 INFO: 2020-09-02 10:00:20 INFO: 2020-09-02 10:00:20 INFO: 2020-09-02 10:02:00 INFO: 2020-09-02 10:02:00 INFO: 2020-09-02 10:02:00 INFO: 2020-09-02 10:02:00 INFO: 2020-09-02 10:02:00 INFO: clearing start 2020-09-02 10:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '7467e0d2-1e0e-31b4-cab9-0def004ffac1', 'clOrdID': 'fe7d35f616f14b2b989dd213f9e91f1a', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 222, 'price': None, 'displayQty': None, 'stopPx': 466.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': 222, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 2, 2, 28, 51, 48000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 2, 2, 28, 51, 48000, tzinfo=tzutc())} 2020-09-02 10:02:00 INFO: skip by not found init order into storage 2020-09-02 10:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '47a96ced-4c78-a161-3e8e-f7206a8862ac', 'clOrdID': '8a2fd963db944048b9ef2dbfdf6a964c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 222, 'price': 517.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 222, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 2, 2, 28, 51, 379000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 2, 2, 28, 51, 379000, tzinfo=tzutc())} 2020-09-02 10:02:00 INFO: skip by not found init order into storage 2020-09-02 10:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'ec79fa77-d2a8-f527-1c4f-2b771e8f2d27', 'clOrdID': 'f1101769e11d4065bf9d30e6a96821f3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 204, 'price': None, 'displayQty': None, 'stopPx': 469.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': 204, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 2, 5, 12, 17, 56000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 2, 5, 12, 17, 56000, tzinfo=tzutc())} 2020-09-02 10:02:00 INFO: skip by not found init order into storage 2020-09-02 10:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'c154f8ac-7984-a394-1793-6d0892658e18', 'clOrdID': '60f6fb918f394b18a60589331cf62618', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 204, 'price': 525.5, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 204, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 2, 5, 12, 17, 94000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 2, 5, 12, 17, 94000, tzinfo=tzutc())} 2020-09-02 10:02:00 INFO: skip by not found init order into storage 2020-09-02 10:02:00 INFO: clearing end 2020-09-02 10:02:00 INFO: 2020-09-02 10:02:00 INFO: 2020-09-02 10:02:00 INFO: 2020-09-02 10:02:00 INFO: 2020-09-02 10:11:39 INFO: process event {'orderID': 'ec79fa77-d2a8-f527-1c4f-2b771e8f2d27', 'price': 470.2, 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 204, 'avgPx': 470.2, 'text': 'Triggered: Order stop price reached\nStop order by trader.py', 'transactTime': '2020-09-02T07:11:39.361Z', 'timestamp': '2020-09-02T07:11:39.361Z', 'clOrdID': 'f1101769e11d4065bf9d30e6a96821f3', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-02 10:11:39 INFO: add new event={'uid': 'f1101769e11d4065bf9d30e6a96821f3', 'status': 'Filled'} 2020-09-02 10:11:40 INFO: 2020-09-02 10:11:40 INFO: 2020-09-02 10:11:40 INFO: 2020-09-02 10:11:40 INFO: 2020-09-02 10:11:40 INFO: process event start 2020-09-02 10:11:40 INFO: fetch new order event f1101769e11d4065bf9d30e6a96821f3 2020-09-02 10:11:40 INFO: fetch orders by event init=None profit_pair=60f6fb918f394b18a60589331cf62618 2020-09-02 10:11:40 INFO: process profit order filled 2020-09-02 10:11:40 INFO: cancel order=60f6fb918f394b18a60589331cf62618 [{'orderID': 'c154f8ac-7984-a394-1793-6d0892658e18', 'clOrdID': '60f6fb918f394b18a60589331cf62618', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 204, 'price': 525.5, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'Canceled', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 0, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 2, 5, 12, 17, 94000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 2, 7, 11, 40, 648000, tzinfo=tzutc())}] 2020-09-02 10:11:40 INFO: end process event_processing_result='proceed profit order' 2020-09-02 10:11:40 INFO: 2020-09-02 10:11:40 INFO: 2020-09-02 10:11:40 INFO: 2020-09-02 10:11:40 INFO: 2020-09-02 10:11:40 INFO: process event {'orderID': 'c154f8ac-7984-a394-1793-6d0892658e18', 'ordStatus': 'Canceled', 'workingIndicator': False, 'leavesQty': 0, 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'timestamp': '2020-09-02T07:11:40.648Z', 'clOrdID': '60f6fb918f394b18a60589331cf62618', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-02 10:11:40 INFO: skip event 60f6fb918f394b18a60589331cf62618 Canceled 2020-09-02 11:00:20 INFO: 2020-09-02 11:00:20 INFO: 2020-09-02 11:00:20 INFO: 2020-09-02 11:00:20 INFO: 2020-09-02 11:00:20 INFO: init new order start 2020-09-02 11:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 2, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 474.2, 'high': 474.45, 'low': 466.85, 'close': 467.45, 'trades': 6035, 'volume': 5549086, 'vwap': 470.67, 'lastSize': 7, 'turnover': 261176105420, 'homeNotional': 65283.694208477566, 'foreignNotional': 30726915.54736486}, {'timestamp': datetime.datetime(2020, 9, 2, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 477.3, 'high': 477.3, 'low': 471.6, 'close': 474.2, 'trades': 6051, 'volume': 4826889, 'vwap': 473.73, 'lastSize': 1000, 'turnover': 228662643955, 'homeNotional': 56958.164845521074, 'foreignNotional': 26982713.10850284}, {'timestamp': datetime.datetime(2020, 9, 2, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 476.75, 'high': 482.1, 'low': 475.95, 'close': 477.3, 'trades': 5095, 'volume': 3698672, 'vwap': 478.94, 'lastSize': 750, 'turnover': 177142895585, 'homeNotional': 43946.12049104497, 'foreignNotional': 21047464.289686784}] 2020-09-02 11:00:20 INFO: prepare candles [CandleItem(low=466.85, high=474.45, open=474.2, close=467.45, color='RED'), CandleItem(low=471.6, high=477.3, open=477.3, close=474.2, color='RED'), CandleItem(low=475.95, high=482.1, open=476.75, close=477.3, color='GREEN')] 2020-09-02 11:00:20 INFO: skip by colors first_candle=CandleItem(low=475.95, high=482.1, open=476.75, close=477.3, color='GREEN') second_candle=CandleItem(low=471.6, high=477.3, open=477.3, close=474.2, color='RED') last_candle=CandleItem(low=466.85, high=474.45, open=474.2, close=467.45, color='RED') 2020-09-02 11:00:20 INFO: check need new order None 2020-09-02 11:00:20 INFO: init new order end 2020-09-02 11:00:20 INFO: 2020-09-02 11:00:20 INFO: 2020-09-02 11:00:20 INFO: 2020-09-02 11:00:20 INFO: 2020-09-02 11:02:00 INFO: 2020-09-02 11:02:00 INFO: 2020-09-02 11:02:00 INFO: 2020-09-02 11:02:00 INFO: 2020-09-02 11:02:00 INFO: clearing start 2020-09-02 11:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '7467e0d2-1e0e-31b4-cab9-0def004ffac1', 'clOrdID': 'fe7d35f616f14b2b989dd213f9e91f1a', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 222, 'price': None, 'displayQty': None, 'stopPx': 466.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': 222, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 2, 2, 28, 51, 48000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 2, 2, 28, 51, 48000, tzinfo=tzutc())} 2020-09-02 11:02:00 INFO: skip by not found init order into storage 2020-09-02 11:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '47a96ced-4c78-a161-3e8e-f7206a8862ac', 'clOrdID': '8a2fd963db944048b9ef2dbfdf6a964c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 222, 'price': 517.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 222, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 2, 2, 28, 51, 379000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 2, 2, 28, 51, 379000, tzinfo=tzutc())} 2020-09-02 11:02:00 INFO: skip by not found init order into storage 2020-09-02 11:02:00 INFO: clearing end 2020-09-02 11:02:00 INFO: 2020-09-02 11:02:00 INFO: 2020-09-02 11:02:00 INFO: 2020-09-02 11:02:00 INFO: 2020-09-02 11:04:11 INFO: process event {'orderID': '7467e0d2-1e0e-31b4-cab9-0def004ffac1', 'price': 466.1, 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 222, 'avgPx': 466.1, 'text': 'Triggered: Order stop price reached\nStop order by trader.py', 'transactTime': '2020-09-02T08:04:10.771Z', 'timestamp': '2020-09-02T08:04:10.771Z', 'clOrdID': 'fe7d35f616f14b2b989dd213f9e91f1a', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-02 11:04:11 INFO: add new event={'uid': 'fe7d35f616f14b2b989dd213f9e91f1a', 'status': 'Filled'} 2020-09-02 11:04:11 INFO: 2020-09-02 11:04:11 INFO: 2020-09-02 11:04:11 INFO: 2020-09-02 11:04:11 INFO: 2020-09-02 11:04:11 INFO: process event start 2020-09-02 11:04:11 INFO: fetch new order event fe7d35f616f14b2b989dd213f9e91f1a 2020-09-02 11:04:11 INFO: fetch orders by event init=None profit_pair=8a2fd963db944048b9ef2dbfdf6a964c 2020-09-02 11:04:11 INFO: process profit order filled 2020-09-02 11:04:13 INFO: cancel order=8a2fd963db944048b9ef2dbfdf6a964c [{'orderID': '47a96ced-4c78-a161-3e8e-f7206a8862ac', 'clOrdID': '8a2fd963db944048b9ef2dbfdf6a964c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 222, 'price': 517.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'Canceled', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 0, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 2, 2, 28, 51, 379000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 2, 8, 4, 13, 277000, tzinfo=tzutc())}] 2020-09-02 11:04:13 INFO: end process event_processing_result='proceed profit order' 2020-09-02 11:04:13 INFO: 2020-09-02 11:04:13 INFO: 2020-09-02 11:04:13 INFO: 2020-09-02 11:04:13 INFO: 2020-09-02 11:04:13 INFO: process event {'orderID': '47a96ced-4c78-a161-3e8e-f7206a8862ac', 'ordStatus': 'Canceled', 'workingIndicator': False, 'leavesQty': 0, 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'timestamp': '2020-09-02T08:04:13.277Z', 'clOrdID': '8a2fd963db944048b9ef2dbfdf6a964c', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-02 11:04:13 INFO: skip event 8a2fd963db944048b9ef2dbfdf6a964c Canceled 2020-09-02 12:00:20 INFO: 2020-09-02 12:00:20 INFO: 2020-09-02 12:00:20 INFO: 2020-09-02 12:00:20 INFO: 2020-09-02 12:00:20 INFO: init new order start 2020-09-02 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 2, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 467.45, 'high': 470.4, 'low': 463.8, 'close': 469.2, 'trades': 8977, 'volume': 7583635, 'vwap': 467.18, 'lastSize': 5000, 'turnover': 354287028275, 'homeNotional': 88798.74463567584, 'foreignNotional': 41484508.37734803}, {'timestamp': datetime.datetime(2020, 9, 2, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 474.2, 'high': 474.45, 'low': 466.85, 'close': 467.45, 'trades': 6035, 'volume': 5549086, 'vwap': 470.67, 'lastSize': 7, 'turnover': 261176105420, 'homeNotional': 65283.694208477566, 'foreignNotional': 30726915.54736486}, {'timestamp': datetime.datetime(2020, 9, 2, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 477.3, 'high': 477.3, 'low': 471.6, 'close': 474.2, 'trades': 6051, 'volume': 4826889, 'vwap': 473.73, 'lastSize': 1000, 'turnover': 228662643955, 'homeNotional': 56958.164845521074, 'foreignNotional': 26982713.10850284}] 2020-09-02 12:00:20 INFO: prepare candles [CandleItem(low=463.8, high=470.4, open=467.45, close=469.2, color='GREEN'), CandleItem(low=466.85, high=474.45, open=474.2, close=467.45, color='RED'), CandleItem(low=471.6, high=477.3, open=477.3, close=474.2, color='RED')] 2020-09-02 12:00:20 INFO: last_candle=CandleItem(low=463.8, high=470.4, open=467.45, close=469.2, color='GREEN') 2020-09-02 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-02 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=463.8, high=470.4, open=467.45, close=469.2, color='GREEN') 2020-09-02 12:00:20 INFO: skip by CandleItem(low=463.8, high=470.4, open=467.45, close=469.2, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-02 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-02 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=463.8, high=470.4, open=467.45, close=469.2, color='GREEN') 2020-09-02 12:00:20 INFO: skip by CandleItem(low=463.8, high=470.4, open=467.45, close=469.2, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-02 12:00:20 INFO: not found applicable config for candle 2020-09-02 12:00:20 INFO: check need new order None 2020-09-02 12:00:20 INFO: init new order end 2020-09-02 12:00:20 INFO: 2020-09-02 12:00:20 INFO: 2020-09-02 12:00:20 INFO: 2020-09-02 12:00:20 INFO: 2020-09-02 12:02:00 INFO: 2020-09-02 12:02:00 INFO: 2020-09-02 12:02:00 INFO: 2020-09-02 12:02:00 INFO: 2020-09-02 12:02:00 INFO: clearing start 2020-09-02 12:02:00 INFO: clearing end 2020-09-02 12:02:00 INFO: 2020-09-02 12:02:00 INFO: 2020-09-02 12:02:00 INFO: 2020-09-02 12:02:00 INFO: 2020-09-02 13:00:20 INFO: 2020-09-02 13:00:20 INFO: 2020-09-02 13:00:20 INFO: 2020-09-02 13:00:20 INFO: 2020-09-02 13:00:20 INFO: init new order start 2020-09-02 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 2, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 469.2, 'high': 472.15, 'low': 468.2, 'close': 471.5, 'trades': 3838, 'volume': 2957894, 'vwap': 470.8, 'lastSize': 11, 'turnover': 139255557480, 'homeNotional': 34695.178086919215, 'foreignNotional': 16334266.835538642}, {'timestamp': datetime.datetime(2020, 9, 2, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 467.45, 'high': 470.4, 'low': 463.8, 'close': 469.2, 'trades': 8977, 'volume': 7583635, 'vwap': 467.18, 'lastSize': 5000, 'turnover': 354287028275, 'homeNotional': 88798.74463567584, 'foreignNotional': 41484508.37734803}, {'timestamp': datetime.datetime(2020, 9, 2, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 474.2, 'high': 474.45, 'low': 466.85, 'close': 467.45, 'trades': 6035, 'volume': 5549086, 'vwap': 470.67, 'lastSize': 7, 'turnover': 261176105420, 'homeNotional': 65283.694208477566, 'foreignNotional': 30726915.54736486}] 2020-09-02 13:00:20 INFO: prepare candles [CandleItem(low=468.2, high=472.15, open=469.2, close=471.5, color='GREEN'), CandleItem(low=463.8, high=470.4, open=467.45, close=469.2, color='GREEN'), CandleItem(low=466.85, high=474.45, open=474.2, close=467.45, color='RED')] 2020-09-02 13:00:20 INFO: skip by colors first_candle=CandleItem(low=466.85, high=474.45, open=474.2, close=467.45, color='RED') second_candle=CandleItem(low=463.8, high=470.4, open=467.45, close=469.2, color='GREEN') last_candle=CandleItem(low=468.2, high=472.15, open=469.2, close=471.5, color='GREEN') 2020-09-02 13:00:20 INFO: check need new order None 2020-09-02 13:00:20 INFO: init new order end 2020-09-02 13:00:20 INFO: 2020-09-02 13:00:20 INFO: 2020-09-02 13:00:20 INFO: 2020-09-02 13:00:20 INFO: 2020-09-02 13:02:00 INFO: 2020-09-02 13:02:00 INFO: 2020-09-02 13:02:00 INFO: 2020-09-02 13:02:00 INFO: 2020-09-02 13:02:00 INFO: clearing start 2020-09-02 13:02:00 INFO: clearing end 2020-09-02 13:02:00 INFO: 2020-09-02 13:02:00 INFO: 2020-09-02 13:02:00 INFO: 2020-09-02 13:02:00 INFO: 2020-09-02 14:00:20 INFO: 2020-09-02 14:00:20 INFO: 2020-09-02 14:00:20 INFO: 2020-09-02 14:00:20 INFO: 2020-09-02 14:00:20 INFO: init new order start 2020-09-02 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 2, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 471.5, 'high': 471.5, 'low': 456.75, 'close': 459.9, 'trades': 11621, 'volume': 10507283, 'vwap': 463.68, 'lastSize': 1, 'turnover': 487197472045, 'homeNotional': 122208.46934386967, 'foreignNotional': 56667200.81857428}, {'timestamp': datetime.datetime(2020, 9, 2, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 469.2, 'high': 472.15, 'low': 468.2, 'close': 471.5, 'trades': 3838, 'volume': 2957894, 'vwap': 470.8, 'lastSize': 11, 'turnover': 139255557480, 'homeNotional': 34695.178086919215, 'foreignNotional': 16334266.835538642}, {'timestamp': datetime.datetime(2020, 9, 2, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 467.45, 'high': 470.4, 'low': 463.8, 'close': 469.2, 'trades': 8977, 'volume': 7583635, 'vwap': 467.18, 'lastSize': 5000, 'turnover': 354287028275, 'homeNotional': 88798.74463567584, 'foreignNotional': 41484508.37734803}] 2020-09-02 14:00:20 INFO: prepare candles [CandleItem(low=456.75, high=471.5, open=471.5, close=459.9, color='RED'), CandleItem(low=468.2, high=472.15, open=469.2, close=471.5, color='GREEN'), CandleItem(low=463.8, high=470.4, open=467.45, close=469.2, color='GREEN')] 2020-09-02 14:00:20 INFO: last_candle=CandleItem(low=456.75, high=471.5, open=471.5, close=459.9, color='RED') 2020-09-02 14:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-09-02 14:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=456.75, high=471.5, open=471.5, close=459.9, color='RED') 2020-09-02 14:00:20 INFO: skip by CandleItem(low=456.75, high=471.5, open=471.5, close=459.9, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-02 14:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-09-02 14:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=456.75, high=471.5, open=471.5, close=459.9, color='RED') 2020-09-02 14:00:20 INFO: skip by CandleItem(low=456.75, high=471.5, open=471.5, close=459.9, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-02 14:00:20 INFO: not found applicable config for candle 2020-09-02 14:00:20 INFO: check need new order None 2020-09-02 14:00:20 INFO: init new order end 2020-09-02 14:00:20 INFO: 2020-09-02 14:00:20 INFO: 2020-09-02 14:00:20 INFO: 2020-09-02 14:00:20 INFO: 2020-09-02 14:02:00 INFO: 2020-09-02 14:02:00 INFO: 2020-09-02 14:02:00 INFO: 2020-09-02 14:02:00 INFO: 2020-09-02 14:02:00 INFO: clearing start 2020-09-02 14:02:00 INFO: clearing end 2020-09-02 14:02:00 INFO: 2020-09-02 14:02:00 INFO: 2020-09-02 14:02:00 INFO: 2020-09-02 14:02:00 INFO: 2020-09-02 15:00:20 INFO: 2020-09-02 15:00:20 INFO: 2020-09-02 15:00:20 INFO: 2020-09-02 15:00:20 INFO: 2020-09-02 15:00:20 INFO: init new order start 2020-09-02 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 2, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 459.9, 'high': 459.95, 'low': 417.5, 'close': 441.8, 'trades': 35064, 'volume': 44897915, 'vwap': 439.79, 'lastSize': 100, 'turnover': 1974565331715, 'homeNotional': 510424.9059631343, 'foreignNotional': 224511197.32724464}, {'timestamp': datetime.datetime(2020, 9, 2, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 471.5, 'high': 471.5, 'low': 456.75, 'close': 459.9, 'trades': 11621, 'volume': 10507283, 'vwap': 463.68, 'lastSize': 1, 'turnover': 487197472045, 'homeNotional': 122208.46934386967, 'foreignNotional': 56667200.81857428}, {'timestamp': datetime.datetime(2020, 9, 2, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 469.2, 'high': 472.15, 'low': 468.2, 'close': 471.5, 'trades': 3838, 'volume': 2957894, 'vwap': 470.8, 'lastSize': 11, 'turnover': 139255557480, 'homeNotional': 34695.178086919215, 'foreignNotional': 16334266.835538642}] 2020-09-02 15:00:20 INFO: prepare candles [CandleItem(low=417.5, high=459.95, open=459.9, close=441.8, color='RED'), CandleItem(low=456.75, high=471.5, open=471.5, close=459.9, color='RED'), CandleItem(low=468.2, high=472.15, open=469.2, close=471.5, color='GREEN')] 2020-09-02 15:00:20 INFO: skip by colors first_candle=CandleItem(low=468.2, high=472.15, open=469.2, close=471.5, color='GREEN') second_candle=CandleItem(low=456.75, high=471.5, open=471.5, close=459.9, color='RED') last_candle=CandleItem(low=417.5, high=459.95, open=459.9, close=441.8, color='RED') 2020-09-02 15:00:20 INFO: check need new order None 2020-09-02 15:00:20 INFO: init new order end 2020-09-02 15:00:20 INFO: 2020-09-02 15:00:20 INFO: 2020-09-02 15:00:20 INFO: 2020-09-02 15:00:20 INFO: 2020-09-02 15:02:00 INFO: 2020-09-02 15:02:00 INFO: 2020-09-02 15:02:00 INFO: 2020-09-02 15:02:00 INFO: 2020-09-02 15:02:00 INFO: clearing start 2020-09-02 15:02:00 INFO: clearing end 2020-09-02 15:02:00 INFO: 2020-09-02 15:02:00 INFO: 2020-09-02 15:02:00 INFO: 2020-09-02 15:02:00 INFO: 2020-09-02 16:00:20 INFO: 2020-09-02 16:00:20 INFO: 2020-09-02 16:00:20 INFO: 2020-09-02 16:00:20 INFO: 2020-09-02 16:00:20 INFO: init new order start 2020-09-02 16:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 2, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 441.8, 'high': 448.15, 'low': 438.35, 'close': 444.45, 'trades': 11970, 'volume': 11667197, 'vwap': 444.1, 'lastSize': 3, 'turnover': 518139904585, 'homeNotional': 133359.34728570792, 'foreignNotional': 59225227.1323399}, {'timestamp': datetime.datetime(2020, 9, 2, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 459.9, 'high': 459.95, 'low': 417.5, 'close': 441.8, 'trades': 35064, 'volume': 44897915, 'vwap': 439.79, 'lastSize': 100, 'turnover': 1974565331715, 'homeNotional': 510424.9059631343, 'foreignNotional': 224511197.32724464}, {'timestamp': datetime.datetime(2020, 9, 2, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 471.5, 'high': 471.5, 'low': 456.75, 'close': 459.9, 'trades': 11621, 'volume': 10507283, 'vwap': 463.68, 'lastSize': 1, 'turnover': 487197472045, 'homeNotional': 122208.46934386967, 'foreignNotional': 56667200.81857428}] 2020-09-02 16:00:20 INFO: prepare candles [CandleItem(low=438.35, high=448.15, open=441.8, close=444.45, color='GREEN'), CandleItem(low=417.5, high=459.95, open=459.9, close=441.8, color='RED'), CandleItem(low=456.75, high=471.5, open=471.5, close=459.9, color='RED')] 2020-09-02 16:00:20 INFO: last_candle=CandleItem(low=438.35, high=448.15, open=441.8, close=444.45, color='GREEN') 2020-09-02 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-02 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=438.35, high=448.15, open=441.8, close=444.45, color='GREEN') 2020-09-02 16:00:20 INFO: skip by CandleItem(low=438.35, high=448.15, open=441.8, close=444.45, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-02 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-02 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=438.35, high=448.15, open=441.8, close=444.45, color='GREEN') 2020-09-02 16:00:20 INFO: skip by CandleItem(low=438.35, high=448.15, open=441.8, close=444.45, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-02 16:00:20 INFO: not found applicable config for candle 2020-09-02 16:00:20 INFO: check need new order None 2020-09-02 16:00:20 INFO: init new order end 2020-09-02 16:00:20 INFO: 2020-09-02 16:00:20 INFO: 2020-09-02 16:00:20 INFO: 2020-09-02 16:00:20 INFO: 2020-09-02 16:02:00 INFO: 2020-09-02 16:02:00 INFO: 2020-09-02 16:02:00 INFO: 2020-09-02 16:02:00 INFO: 2020-09-02 16:02:00 INFO: clearing start 2020-09-02 16:02:00 INFO: clearing end 2020-09-02 16:02:00 INFO: 2020-09-02 16:02:00 INFO: 2020-09-02 16:02:00 INFO: 2020-09-02 16:02:00 INFO: 2020-09-02 17:00:20 INFO: 2020-09-02 17:00:20 INFO: 2020-09-02 17:00:20 INFO: 2020-09-02 17:00:20 INFO: 2020-09-02 17:00:20 INFO: init new order start 2020-09-02 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 2, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 444.45, 'high': 448.5, 'low': 440.0, 'close': 441.85, 'trades': 8880, 'volume': 6678375, 'vwap': 444.16, 'lastSize': 1, 'turnover': 296623564050, 'homeNotional': 76126.6808098339, 'foreignNotional': 33812640.686011285}, {'timestamp': datetime.datetime(2020, 9, 2, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 441.8, 'high': 448.15, 'low': 438.35, 'close': 444.45, 'trades': 11970, 'volume': 11667197, 'vwap': 444.1, 'lastSize': 3, 'turnover': 518139904585, 'homeNotional': 133359.34728570792, 'foreignNotional': 59225227.1323399}, {'timestamp': datetime.datetime(2020, 9, 2, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 459.9, 'high': 459.95, 'low': 417.5, 'close': 441.8, 'trades': 35064, 'volume': 44897915, 'vwap': 439.79, 'lastSize': 100, 'turnover': 1974565331715, 'homeNotional': 510424.9059631343, 'foreignNotional': 224511197.32724464}] 2020-09-02 17:00:20 INFO: prepare candles [CandleItem(low=440.0, high=448.5, open=444.45, close=441.85, color='RED'), CandleItem(low=438.35, high=448.15, open=441.8, close=444.45, color='GREEN'), CandleItem(low=417.5, high=459.95, open=459.9, close=441.8, color='RED')] 2020-09-02 17:00:20 INFO: skip by colors first_candle=CandleItem(low=417.5, high=459.95, open=459.9, close=441.8, color='RED') second_candle=CandleItem(low=438.35, high=448.15, open=441.8, close=444.45, color='GREEN') last_candle=CandleItem(low=440.0, high=448.5, open=444.45, close=441.85, color='RED') 2020-09-02 17:00:20 INFO: check need new order None 2020-09-02 17:00:20 INFO: init new order end 2020-09-02 17:00:20 INFO: 2020-09-02 17:00:20 INFO: 2020-09-02 17:00:20 INFO: 2020-09-02 17:00:20 INFO: 2020-09-02 17:02:00 INFO: 2020-09-02 17:02:00 INFO: 2020-09-02 17:02:00 INFO: 2020-09-02 17:02:00 INFO: 2020-09-02 17:02:00 INFO: clearing start 2020-09-02 17:02:00 INFO: clearing end 2020-09-02 17:02:00 INFO: 2020-09-02 17:02:00 INFO: 2020-09-02 17:02:00 INFO: 2020-09-02 17:02:00 INFO: 2020-09-02 18:00:20 INFO: 2020-09-02 18:00:20 INFO: 2020-09-02 18:00:20 INFO: 2020-09-02 18:00:20 INFO: 2020-09-02 18:00:20 INFO: init new order start 2020-09-02 18:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 2, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 441.85, 'high': 442.85, 'low': 426.2, 'close': 431.45, 'trades': 13335, 'volume': 11557660, 'vwap': 435.18, 'lastSize': 70, 'turnover': 502961532210, 'homeNotional': 130657.16796358585, 'foreignNotional': 56860814.32012818}, {'timestamp': datetime.datetime(2020, 9, 2, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 444.45, 'high': 448.5, 'low': 440.0, 'close': 441.85, 'trades': 8880, 'volume': 6678375, 'vwap': 444.16, 'lastSize': 1, 'turnover': 296623564050, 'homeNotional': 76126.6808098339, 'foreignNotional': 33812640.686011285}, {'timestamp': datetime.datetime(2020, 9, 2, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 441.8, 'high': 448.15, 'low': 438.35, 'close': 444.45, 'trades': 11970, 'volume': 11667197, 'vwap': 444.1, 'lastSize': 3, 'turnover': 518139904585, 'homeNotional': 133359.34728570792, 'foreignNotional': 59225227.1323399}] 2020-09-02 18:00:20 INFO: prepare candles [CandleItem(low=426.2, high=442.85, open=441.85, close=431.45, color='RED'), CandleItem(low=440.0, high=448.5, open=444.45, close=441.85, color='RED'), CandleItem(low=438.35, high=448.15, open=441.8, close=444.45, color='GREEN')] 2020-09-02 18:00:20 INFO: skip by colors first_candle=CandleItem(low=438.35, high=448.15, open=441.8, close=444.45, color='GREEN') second_candle=CandleItem(low=440.0, high=448.5, open=444.45, close=441.85, color='RED') last_candle=CandleItem(low=426.2, high=442.85, open=441.85, close=431.45, color='RED') 2020-09-02 18:00:20 INFO: check need new order None 2020-09-02 18:00:20 INFO: init new order end 2020-09-02 18:00:20 INFO: 2020-09-02 18:00:20 INFO: 2020-09-02 18:00:20 INFO: 2020-09-02 18:00:20 INFO: 2020-09-02 18:02:00 INFO: 2020-09-02 18:02:00 INFO: 2020-09-02 18:02:00 INFO: 2020-09-02 18:02:00 INFO: 2020-09-02 18:02:00 INFO: clearing start 2020-09-02 18:02:00 INFO: clearing end 2020-09-02 18:02:00 INFO: 2020-09-02 18:02:00 INFO: 2020-09-02 18:02:00 INFO: 2020-09-02 18:02:00 INFO: 2020-09-02 19:00:20 INFO: 2020-09-02 19:00:20 INFO: 2020-09-02 19:00:20 INFO: 2020-09-02 19:00:20 INFO: 2020-09-02 19:00:20 INFO: init new order start 2020-09-02 19:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 2, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 431.45, 'high': 438.2, 'low': 429.8, 'close': 433.35, 'trades': 10482, 'volume': 7888084, 'vwap': 434.45, 'lastSize': 50, 'turnover': 342695442795, 'homeNotional': 89250.44489369512, 'foreignNotional': 38774981.21811279}, {'timestamp': datetime.datetime(2020, 9, 2, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 441.85, 'high': 442.85, 'low': 426.2, 'close': 431.45, 'trades': 13335, 'volume': 11557660, 'vwap': 435.18, 'lastSize': 70, 'turnover': 502961532210, 'homeNotional': 130657.16796358585, 'foreignNotional': 56860814.32012818}, {'timestamp': datetime.datetime(2020, 9, 2, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 444.45, 'high': 448.5, 'low': 440.0, 'close': 441.85, 'trades': 8880, 'volume': 6678375, 'vwap': 444.16, 'lastSize': 1, 'turnover': 296623564050, 'homeNotional': 76126.6808098339, 'foreignNotional': 33812640.686011285}] 2020-09-02 19:00:21 INFO: prepare candles [CandleItem(low=429.8, high=438.2, open=431.45, close=433.35, color='GREEN'), CandleItem(low=426.2, high=442.85, open=441.85, close=431.45, color='RED'), CandleItem(low=440.0, high=448.5, open=444.45, close=441.85, color='RED')] 2020-09-02 19:00:21 INFO: last_candle=CandleItem(low=429.8, high=438.2, open=431.45, close=433.35, color='GREEN') 2020-09-02 19: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-02 19: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=429.8, high=438.2, open=431.45, close=433.35, color='GREEN') 2020-09-02 19:00:21 INFO: skip by CandleItem(low=429.8, high=438.2, open=431.45, close=433.35, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-02 19: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-02 19: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=429.8, high=438.2, open=431.45, close=433.35, color='GREEN') 2020-09-02 19:00:21 INFO: apply filter None to candle=CandleItem(low=426.2, high=442.85, open=441.85, close=431.45, color='RED') 2020-09-02 19:00:21 INFO: apply filter None to candle=CandleItem(low=440.0, high=448.5, open=444.45, close=441.85, color='RED') 2020-09-02 19:00:21 INFO: hit candle order=OrderProperties(candle=CandleItem(low=429.8, high=438.2, open=431.45, close=433.35, color='GREEN'), take_profit_factor=5.0, clearing_interval=3600) 2020-09-02 19:00:21 INFO: check need new order OrderProperties(candle=CandleItem(low=429.8, high=438.2, open=431.45, close=433.35, color='GREEN'), take_profit_factor=5.0, clearing_interval=3600) 2020-09-02 19:00:21 INFO: place order: start candle=CandleItem(low=429.8, high=438.2, open=431.45, close=433.35, color='GREEN') ticker='ETHUSD' price_offset=0.1 2020-09-02 19:00:21 INFO: place order: side_factor=-1 init_trigger_price=438.25 init_order_price=438.3 stop_price_offset=0.0 candle.size=8.399999999999977 stop_price=429.8 take_price=480.2999999999999 2020-09-02 19:00:21 INFO: place order round: side_factor=-1 init_trigger_price=Decimal('438.25') init_order_price=Decimal('438.30000000000001136868377216160297393798828125') stop_price_offset=0.0 candle.size=8.399999999999977 stop_price=Decimal('429.80000000000001136868377216160297393798828125') take_price=Decimal('480.29999999999989768184605054557323455810546875') 2020-09-02 19:00:21 INFO: place order: compute qty=225 2020-09-02 19:00:21 INFO: place order: save order to db fb12391de161412c8d779f185e92e68f; response=True 2020-09-02 19:00:21 INFO: post order to exchange resp={'orderID': 'da375590-4737-f033-87bf-db9e5ed31f75', 'clOrdID': 'fb12391de161412c8d779f185e92e68f', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 225, 'price': 438.3, 'displayQty': None, 'stopPx': 438.25, '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': 225, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 2, 16, 0, 21, 532000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 2, 16, 0, 21, 532000, tzinfo=tzutc())} 2020-09-02 19:00:21 INFO: place new init order {'qty': 225, 'init_price': Decimal('438.25'), 'stop_price': Decimal('429.80000000000001136868377216160297393798828125'), 'take_price': Decimal('480.29999999999989768184605054557323455810546875'), 'order_uid': 'fb12391de161412c8d779f185e92e68f', 'response': {'orderID': 'da375590-4737-f033-87bf-db9e5ed31f75', 'clOrdID': 'fb12391de161412c8d779f185e92e68f', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 225, 'price': 438.3, 'displayQty': None, 'stopPx': 438.25, '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': 225, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 2, 16, 0, 21, 532000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 2, 16, 0, 21, 532000, tzinfo=tzutc())}} 2020-09-02 19:00:21 INFO: init new order end 2020-09-02 19:00:21 INFO: 2020-09-02 19:00:21 INFO: 2020-09-02 19:00:21 INFO: 2020-09-02 19:00:21 INFO: 2020-09-02 19:00:21 INFO: process event {'orderID': 'da375590-4737-f033-87bf-db9e5ed31f75', 'clOrdID': 'fb12391de161412c8d779f185e92e68f', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 225, 'price': 438.3, 'displayQty': None, 'stopPx': 438.25, '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': 225, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-09-02T16:00:21.532Z', 'timestamp': '2020-09-02T16:00:21.532Z'} 2020-09-02 19:00:21 INFO: skip event fb12391de161412c8d779f185e92e68f New 2020-09-02 19:02:00 INFO: 2020-09-02 19:02:00 INFO: 2020-09-02 19:02:00 INFO: 2020-09-02 19:02:00 INFO: 2020-09-02 19:02:00 INFO: clearing start 2020-09-02 19:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'da375590-4737-f033-87bf-db9e5ed31f75', 'clOrdID': 'fb12391de161412c8d779f185e92e68f', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 225, 'price': 438.3, 'displayQty': None, 'stopPx': 438.25, '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': 225, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 2, 16, 0, 21, 532000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 2, 16, 0, 21, 532000, tzinfo=tzutc())} 2020-09-02 19:02:00 INFO: order time=2020-09-02 16:00:21.532000+00:00; delta from now UTC=0:01:39.197702 time_delta.total_seconds()=99.197702; time_diff_offset='3600' 2020-09-02 19:02:00 INFO: skip by time diff 2020-09-02 16:00:21.532000+00:00 2020-09-02 19:02:00 INFO: clearing end 2020-09-02 19:02:00 INFO: 2020-09-02 19:02:00 INFO: 2020-09-02 19:02:00 INFO: 2020-09-02 19:02:00 INFO: 2020-09-02 20:00:20 INFO: 2020-09-02 20:00:20 INFO: 2020-09-02 20:00:20 INFO: 2020-09-02 20:00:20 INFO: 2020-09-02 20:00:20 INFO: init new order start 2020-09-02 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 2, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 433.35, 'high': 437.1, 'low': 421.0, 'close': 428.05, 'trades': 15328, 'volume': 11900300, 'vwap': 427.93, 'lastSize': 5, 'turnover': 509239311420, 'homeNotional': 134400.7165623273, 'foreignNotional': 57513882.84266744}, {'timestamp': datetime.datetime(2020, 9, 2, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 431.45, 'high': 438.2, 'low': 429.8, 'close': 433.35, 'trades': 10482, 'volume': 7888084, 'vwap': 434.45, 'lastSize': 50, 'turnover': 342695442795, 'homeNotional': 89250.44489369512, 'foreignNotional': 38774981.21811279}, {'timestamp': datetime.datetime(2020, 9, 2, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 441.85, 'high': 442.85, 'low': 426.2, 'close': 431.45, 'trades': 13335, 'volume': 11557660, 'vwap': 435.18, 'lastSize': 70, 'turnover': 502961532210, 'homeNotional': 130657.16796358585, 'foreignNotional': 56860814.32012818}] 2020-09-02 20:00:20 INFO: prepare candles [CandleItem(low=421.0, high=437.1, open=433.35, close=428.05, color='RED'), CandleItem(low=429.8, high=438.2, open=431.45, close=433.35, color='GREEN'), CandleItem(low=426.2, high=442.85, open=441.85, close=431.45, color='RED')] 2020-09-02 20:00:20 INFO: skip by colors first_candle=CandleItem(low=426.2, high=442.85, open=441.85, close=431.45, color='RED') second_candle=CandleItem(low=429.8, high=438.2, open=431.45, close=433.35, color='GREEN') last_candle=CandleItem(low=421.0, high=437.1, open=433.35, close=428.05, color='RED') 2020-09-02 20:00:20 INFO: check need new order None 2020-09-02 20:00:20 INFO: init new order end 2020-09-02 20:00:20 INFO: 2020-09-02 20:00:20 INFO: 2020-09-02 20:00:20 INFO: 2020-09-02 20:00:20 INFO: 2020-09-02 20:02:00 INFO: 2020-09-02 20:02:00 INFO: 2020-09-02 20:02:00 INFO: 2020-09-02 20:02:00 INFO: 2020-09-02 20:02:00 INFO: clearing start 2020-09-02 20:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'da375590-4737-f033-87bf-db9e5ed31f75', 'clOrdID': 'fb12391de161412c8d779f185e92e68f', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 225, 'price': 438.3, 'displayQty': None, 'stopPx': 438.25, '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': 225, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 2, 16, 0, 21, 532000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 2, 16, 0, 21, 532000, tzinfo=tzutc())} 2020-09-02 20:02:00 INFO: order time=2020-09-02 16:00:21.532000+00:00; delta from now UTC=1:01:38.864214 time_delta.total_seconds()=3698.864214; time_diff_offset='3600' 2020-09-02 20:02:00 INFO: clear order fb12391de161412c8d779f185e92e68f 2020-09-02 20:02:00 INFO: cancel order resp=[{'orderID': 'da375590-4737-f033-87bf-db9e5ed31f75', 'clOrdID': 'fb12391de161412c8d779f185e92e68f', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 225, 'price': 438.3, 'displayQty': None, 'stopPx': 438.25, '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, 2, 16, 0, 21, 532000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 2, 17, 2, 0, 495000, tzinfo=tzutc())}] 2020-09-02 20:02:00 INFO: clearing end 2020-09-02 20:02:00 INFO: 2020-09-02 20:02:00 INFO: 2020-09-02 20:02:00 INFO: 2020-09-02 20:02:00 INFO: 2020-09-02 20:02:00 INFO: process event {'orderID': 'da375590-4737-f033-87bf-db9e5ed31f75', 'ordStatus': 'Canceled', 'leavesQty': 0, 'text': 'Canceled: cancelled by clearing\nInit order by supervisor.py', 'timestamp': '2020-09-02T17:02:00.495Z', 'clOrdID': 'fb12391de161412c8d779f185e92e68f', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-02 20:02:00 INFO: skip event fb12391de161412c8d779f185e92e68f Canceled 2020-09-02 21:00:20 INFO: 2020-09-02 21:00:20 INFO: 2020-09-02 21:00:20 INFO: 2020-09-02 21:00:20 INFO: 2020-09-02 21:00:20 INFO: init new order start 2020-09-02 21:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 2, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 428.05, 'high': 434.5, 'low': 426.8, 'close': 432.05, 'trades': 5880, 'volume': 4448546, 'vwap': 431.54, 'lastSize': 1487, 'turnover': 191972517845, 'homeNotional': 50444.632855130156, 'foreignNotional': 21769025.754742205}, {'timestamp': datetime.datetime(2020, 9, 2, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 433.35, 'high': 437.1, 'low': 421.0, 'close': 428.05, 'trades': 15328, 'volume': 11900300, 'vwap': 427.93, 'lastSize': 5, 'turnover': 509239311420, 'homeNotional': 134400.7165623273, 'foreignNotional': 57513882.84266744}, {'timestamp': datetime.datetime(2020, 9, 2, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 431.45, 'high': 438.2, 'low': 429.8, 'close': 433.35, 'trades': 10482, 'volume': 7888084, 'vwap': 434.45, 'lastSize': 50, 'turnover': 342695442795, 'homeNotional': 89250.44489369512, 'foreignNotional': 38774981.21811279}] 2020-09-02 21:00:21 INFO: prepare candles [CandleItem(low=426.8, high=434.5, open=428.05, close=432.05, color='GREEN'), CandleItem(low=421.0, high=437.1, open=433.35, close=428.05, color='RED'), CandleItem(low=429.8, high=438.2, open=431.45, close=433.35, color='GREEN')] 2020-09-02 21:00:21 INFO: skip by colors first_candle=CandleItem(low=429.8, high=438.2, open=431.45, close=433.35, color='GREEN') second_candle=CandleItem(low=421.0, high=437.1, open=433.35, close=428.05, color='RED') last_candle=CandleItem(low=426.8, high=434.5, open=428.05, close=432.05, color='GREEN') 2020-09-02 21:00:21 INFO: check need new order None 2020-09-02 21:00:21 INFO: init new order end 2020-09-02 21:00:21 INFO: 2020-09-02 21:00:21 INFO: 2020-09-02 21:00:21 INFO: 2020-09-02 21:00:21 INFO: 2020-09-02 21:02:00 INFO: 2020-09-02 21:02:00 INFO: 2020-09-02 21:02:00 INFO: 2020-09-02 21:02:00 INFO: 2020-09-02 21:02:00 INFO: clearing start 2020-09-02 21:02:00 INFO: clearing end 2020-09-02 21:02:00 INFO: 2020-09-02 21:02:00 INFO: 2020-09-02 21:02:00 INFO: 2020-09-02 21:02:00 INFO: 2020-09-02 22:00:20 INFO: 2020-09-02 22:00:20 INFO: 2020-09-02 22:00:20 INFO: 2020-09-02 22:00:20 INFO: 2020-09-02 22:00:20 INFO: init new order start 2020-09-02 22:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 2, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 432.05, 'high': 437.0, 'low': 429.3, 'close': 436.85, 'trades': 5136, 'volume': 3935888, 'vwap': 433.47, 'lastSize': 200, 'turnover': 170606663260, 'homeNotional': 44780.33595788438, 'foreignNotional': 19410816.76937242}, {'timestamp': datetime.datetime(2020, 9, 2, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 428.05, 'high': 434.5, 'low': 426.8, 'close': 432.05, 'trades': 5880, 'volume': 4448546, 'vwap': 431.54, 'lastSize': 1487, 'turnover': 191972517845, 'homeNotional': 50444.632855130156, 'foreignNotional': 21769025.754742205}, {'timestamp': datetime.datetime(2020, 9, 2, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 433.35, 'high': 437.1, 'low': 421.0, 'close': 428.05, 'trades': 15328, 'volume': 11900300, 'vwap': 427.93, 'lastSize': 5, 'turnover': 509239311420, 'homeNotional': 134400.7165623273, 'foreignNotional': 57513882.84266744}] 2020-09-02 22:00:21 INFO: prepare candles [CandleItem(low=429.3, high=437.0, open=432.05, close=436.85, color='GREEN'), CandleItem(low=426.8, high=434.5, open=428.05, close=432.05, color='GREEN'), CandleItem(low=421.0, high=437.1, open=433.35, close=428.05, color='RED')] 2020-09-02 22:00:21 INFO: skip by colors first_candle=CandleItem(low=421.0, high=437.1, open=433.35, close=428.05, color='RED') second_candle=CandleItem(low=426.8, high=434.5, open=428.05, close=432.05, color='GREEN') last_candle=CandleItem(low=429.3, high=437.0, open=432.05, close=436.85, color='GREEN') 2020-09-02 22:00:21 INFO: check need new order None 2020-09-02 22:00:21 INFO: init new order end 2020-09-02 22:00:21 INFO: 2020-09-02 22:00:21 INFO: 2020-09-02 22:00:21 INFO: 2020-09-02 22:00:21 INFO: 2020-09-02 22:02:00 INFO: 2020-09-02 22:02:00 INFO: 2020-09-02 22:02:00 INFO: 2020-09-02 22:02:00 INFO: 2020-09-02 22:02:00 INFO: clearing start 2020-09-02 22:02:00 INFO: clearing end 2020-09-02 22:02:00 INFO: 2020-09-02 22:02:00 INFO: 2020-09-02 22:02:00 INFO: 2020-09-02 22:02:00 INFO: 2020-09-02 23:00:20 INFO: 2020-09-02 23:00:20 INFO: 2020-09-02 23:00:20 INFO: 2020-09-02 23:00:20 INFO: 2020-09-02 23:00:20 INFO: init new order start 2020-09-02 23:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 2, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 436.85, 'high': 438.2, 'low': 433.35, 'close': 436.4, 'trades': 4078, 'volume': 2926619, 'vwap': 436.05, 'lastSize': 5, 'turnover': 127614630980, 'homeNotional': 33336.5311264332, 'foreignNotional': 14536371.304368336}, {'timestamp': datetime.datetime(2020, 9, 2, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 432.05, 'high': 437.0, 'low': 429.3, 'close': 436.85, 'trades': 5136, 'volume': 3935888, 'vwap': 433.47, 'lastSize': 200, 'turnover': 170606663260, 'homeNotional': 44780.33595788438, 'foreignNotional': 19410816.76937242}, {'timestamp': datetime.datetime(2020, 9, 2, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 428.05, 'high': 434.5, 'low': 426.8, 'close': 432.05, 'trades': 5880, 'volume': 4448546, 'vwap': 431.54, 'lastSize': 1487, 'turnover': 191972517845, 'homeNotional': 50444.632855130156, 'foreignNotional': 21769025.754742205}] 2020-09-02 23:00:20 INFO: prepare candles [CandleItem(low=433.35, high=438.2, open=436.85, close=436.4, color='RED'), CandleItem(low=429.3, high=437.0, open=432.05, close=436.85, color='GREEN'), CandleItem(low=426.8, high=434.5, open=428.05, close=432.05, color='GREEN')] 2020-09-02 23:00:20 INFO: last_candle=CandleItem(low=433.35, high=438.2, open=436.85, close=436.4, color='RED') 2020-09-02 23: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-02 23: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=433.35, high=438.2, open=436.85, close=436.4, color='RED') 2020-09-02 23:00:20 INFO: skip by CandleItem(low=433.35, high=438.2, open=436.85, close=436.4, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-02 23: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-02 23: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=433.35, high=438.2, open=436.85, close=436.4, color='RED') 2020-09-02 23:00:20 INFO: skip by CandleItem(low=433.35, high=438.2, open=436.85, close=436.4, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-02 23:00:20 INFO: not found applicable config for candle 2020-09-02 23:00:20 INFO: check need new order None 2020-09-02 23:00:20 INFO: init new order end 2020-09-02 23:00:20 INFO: 2020-09-02 23:00:20 INFO: 2020-09-02 23:00:20 INFO: 2020-09-02 23:00:20 INFO: 2020-09-02 23:02:00 INFO: 2020-09-02 23:02:00 INFO: 2020-09-02 23:02:00 INFO: 2020-09-02 23:02:00 INFO: 2020-09-02 23:02:00 INFO: clearing start 2020-09-02 23:02:00 INFO: clearing end 2020-09-02 23:02:00 INFO: 2020-09-02 23:02:00 INFO: 2020-09-02 23:02:00 INFO: 2020-09-02 23:02:00 INFO: 2020-09-03 00:00:20 INFO: 2020-09-03 00:00:20 INFO: 2020-09-03 00:00:20 INFO: 2020-09-03 00:00:20 INFO: 2020-09-03 00:00:20 INFO: init new order start 2020-09-03 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 2, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 436.4, 'high': 438.15, 'low': 432.25, 'close': 436.9, 'trades': 4228, 'volume': 2727571, 'vwap': 434.95, 'lastSize': 500, 'turnover': 118634424690, 'homeNotional': 30992.017338039936, 'foreignNotional': 13479859.61553683}, {'timestamp': datetime.datetime(2020, 9, 2, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 436.85, 'high': 438.2, 'low': 433.35, 'close': 436.4, 'trades': 4078, 'volume': 2926619, 'vwap': 436.05, 'lastSize': 5, 'turnover': 127614630980, 'homeNotional': 33336.5311264332, 'foreignNotional': 14536371.304368336}, {'timestamp': datetime.datetime(2020, 9, 2, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 432.05, 'high': 437.0, 'low': 429.3, 'close': 436.85, 'trades': 5136, 'volume': 3935888, 'vwap': 433.47, 'lastSize': 200, 'turnover': 170606663260, 'homeNotional': 44780.33595788438, 'foreignNotional': 19410816.76937242}] 2020-09-03 00:00:20 INFO: prepare candles [CandleItem(low=432.25, high=438.15, open=436.4, close=436.9, color='GREEN'), CandleItem(low=433.35, high=438.2, open=436.85, close=436.4, color='RED'), CandleItem(low=429.3, high=437.0, open=432.05, close=436.85, color='GREEN')] 2020-09-03 00:00:20 INFO: skip by colors first_candle=CandleItem(low=429.3, high=437.0, open=432.05, close=436.85, color='GREEN') second_candle=CandleItem(low=433.35, high=438.2, open=436.85, close=436.4, color='RED') last_candle=CandleItem(low=432.25, high=438.15, open=436.4, close=436.9, color='GREEN') 2020-09-03 00:00:20 INFO: check need new order None 2020-09-03 00:00:20 INFO: init new order end 2020-09-03 00:00:20 INFO: 2020-09-03 00:00:20 INFO: 2020-09-03 00:00:20 INFO: 2020-09-03 00:00:20 INFO: 2020-09-03 00:02:00 INFO: 2020-09-03 00:02:00 INFO: 2020-09-03 00:02:00 INFO: 2020-09-03 00:02:00 INFO: 2020-09-03 00:02:00 INFO: clearing start 2020-09-03 00:02:00 INFO: clearing end 2020-09-03 00:02:00 INFO: 2020-09-03 00:02:00 INFO: 2020-09-03 00:02:00 INFO: 2020-09-03 00:02:00 INFO: 2020-09-03 01:00:20 INFO: 2020-09-03 01:00:20 INFO: 2020-09-03 01:00:20 INFO: 2020-09-03 01:00:20 INFO: 2020-09-03 01:00:20 INFO: init new order start 2020-09-03 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 2, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 436.9, 'high': 438.75, 'low': 435.75, 'close': 438.55, 'trades': 2183, 'volume': 1309185, 'vwap': 437.24, 'lastSize': 13, 'turnover': 57242581035, 'homeNotional': 14890.52251150208, 'foreignNotional': 6510711.348114008}, {'timestamp': datetime.datetime(2020, 9, 2, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 436.4, 'high': 438.15, 'low': 432.25, 'close': 436.9, 'trades': 4228, 'volume': 2727571, 'vwap': 434.95, 'lastSize': 500, 'turnover': 118634424690, 'homeNotional': 30992.017338039936, 'foreignNotional': 13479859.61553683}, {'timestamp': datetime.datetime(2020, 9, 2, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 436.85, 'high': 438.2, 'low': 433.35, 'close': 436.4, 'trades': 4078, 'volume': 2926619, 'vwap': 436.05, 'lastSize': 5, 'turnover': 127614630980, 'homeNotional': 33336.5311264332, 'foreignNotional': 14536371.304368336}] 2020-09-03 01:00:20 INFO: prepare candles [CandleItem(low=435.75, high=438.75, open=436.9, close=438.55, color='GREEN'), CandleItem(low=432.25, high=438.15, open=436.4, close=436.9, color='GREEN'), CandleItem(low=433.35, high=438.2, open=436.85, close=436.4, color='RED')] 2020-09-03 01:00:20 INFO: skip by colors first_candle=CandleItem(low=433.35, high=438.2, open=436.85, close=436.4, color='RED') second_candle=CandleItem(low=432.25, high=438.15, open=436.4, close=436.9, color='GREEN') last_candle=CandleItem(low=435.75, high=438.75, open=436.9, close=438.55, color='GREEN') 2020-09-03 01:00:20 INFO: check need new order None 2020-09-03 01:00:20 INFO: init new order end 2020-09-03 01:00:20 INFO: 2020-09-03 01:00:20 INFO: 2020-09-03 01:00:20 INFO: 2020-09-03 01:00:20 INFO: 2020-09-03 01:02:00 INFO: 2020-09-03 01:02:00 INFO: 2020-09-03 01:02:00 INFO: 2020-09-03 01:02:00 INFO: 2020-09-03 01:02:00 INFO: clearing start 2020-09-03 01:02:00 INFO: clearing end 2020-09-03 01:02:00 INFO: 2020-09-03 01:02:00 INFO: 2020-09-03 01:02:00 INFO: 2020-09-03 01:02:00 INFO: 2020-09-03 02:00:20 INFO: 2020-09-03 02:00:20 INFO: 2020-09-03 02:00:20 INFO: 2020-09-03 02:00:20 INFO: 2020-09-03 02:00:20 INFO: init new order start 2020-09-03 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 2, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 438.55, 'high': 445.7, 'low': 436.35, 'close': 443.2, 'trades': 5971, 'volume': 4712027, 'vwap': 441.81, 'lastSize': 400, 'turnover': 208180943020, 'homeNotional': 53818.483668851826, 'foreignNotional': 23777650.872662984}, {'timestamp': datetime.datetime(2020, 9, 2, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 436.9, 'high': 438.75, 'low': 435.75, 'close': 438.55, 'trades': 2183, 'volume': 1309185, 'vwap': 437.24, 'lastSize': 13, 'turnover': 57242581035, 'homeNotional': 14890.52251150208, 'foreignNotional': 6510711.348114008}, {'timestamp': datetime.datetime(2020, 9, 2, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 436.4, 'high': 438.15, 'low': 432.25, 'close': 436.9, 'trades': 4228, 'volume': 2727571, 'vwap': 434.95, 'lastSize': 500, 'turnover': 118634424690, 'homeNotional': 30992.017338039936, 'foreignNotional': 13479859.61553683}] 2020-09-03 02:00:20 INFO: prepare candles [CandleItem(low=436.35, high=445.7, open=438.55, close=443.2, color='GREEN'), CandleItem(low=435.75, high=438.75, open=436.9, close=438.55, color='GREEN'), CandleItem(low=432.25, high=438.15, open=436.4, close=436.9, color='GREEN')] 2020-09-03 02:00:20 INFO: skip by colors first_candle=CandleItem(low=432.25, high=438.15, open=436.4, close=436.9, color='GREEN') second_candle=CandleItem(low=435.75, high=438.75, open=436.9, close=438.55, color='GREEN') last_candle=CandleItem(low=436.35, high=445.7, open=438.55, close=443.2, color='GREEN') 2020-09-03 02:00:20 INFO: check need new order None 2020-09-03 02:00:20 INFO: init new order end 2020-09-03 02:00:20 INFO: 2020-09-03 02:00:20 INFO: 2020-09-03 02:00:20 INFO: 2020-09-03 02:00:20 INFO: 2020-09-03 02:02:00 INFO: 2020-09-03 02:02:00 INFO: 2020-09-03 02:02:00 INFO: 2020-09-03 02:02:00 INFO: 2020-09-03 02:02:00 INFO: clearing start 2020-09-03 02:02:00 INFO: clearing end 2020-09-03 02:02:00 INFO: 2020-09-03 02:02:00 INFO: 2020-09-03 02:02:00 INFO: 2020-09-03 02:02:00 INFO: 2020-09-03 03:00:20 INFO: 2020-09-03 03:00:20 INFO: 2020-09-03 03:00:20 INFO: 2020-09-03 03:00:20 INFO: 2020-09-03 03:00:20 INFO: init new order start 2020-09-03 03:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 3, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 443.2, 'high': 443.9, 'low': 439.65, 'close': 440.3, 'trades': 3698, 'volume': 2069316, 'vwap': 441.93, 'lastSize': 15000, 'turnover': 91447279385, 'homeNotional': 23637.154877078243, 'foreignNotional': 10445756.103336114}, {'timestamp': datetime.datetime(2020, 9, 2, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 438.55, 'high': 445.7, 'low': 436.35, 'close': 443.2, 'trades': 5971, 'volume': 4712027, 'vwap': 441.81, 'lastSize': 400, 'turnover': 208180943020, 'homeNotional': 53818.483668851826, 'foreignNotional': 23777650.872662984}, {'timestamp': datetime.datetime(2020, 9, 2, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 436.9, 'high': 438.75, 'low': 435.75, 'close': 438.55, 'trades': 2183, 'volume': 1309185, 'vwap': 437.24, 'lastSize': 13, 'turnover': 57242581035, 'homeNotional': 14890.52251150208, 'foreignNotional': 6510711.348114008}] 2020-09-03 03:00:21 INFO: prepare candles [CandleItem(low=439.65, high=443.9, open=443.2, close=440.3, color='RED'), CandleItem(low=436.35, high=445.7, open=438.55, close=443.2, color='GREEN'), CandleItem(low=435.75, high=438.75, open=436.9, close=438.55, color='GREEN')] 2020-09-03 03:00:21 INFO: last_candle=CandleItem(low=439.65, high=443.9, open=443.2, close=440.3, color='RED') 2020-09-03 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-03 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=439.65, high=443.9, open=443.2, close=440.3, color='RED') 2020-09-03 03:00:21 INFO: skip by CandleItem(low=439.65, high=443.9, open=443.2, close=440.3, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-03 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-03 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=439.65, high=443.9, open=443.2, close=440.3, color='RED') 2020-09-03 03:00:21 INFO: skip by CandleItem(low=439.65, high=443.9, open=443.2, close=440.3, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-03 03:00:21 INFO: not found applicable config for candle 2020-09-03 03:00:21 INFO: check need new order None 2020-09-03 03:00:21 INFO: init new order end 2020-09-03 03:00:21 INFO: 2020-09-03 03:00:21 INFO: 2020-09-03 03:00:21 INFO: 2020-09-03 03:00:21 INFO: 2020-09-03 03:02:00 INFO: 2020-09-03 03:02:00 INFO: 2020-09-03 03:02:00 INFO: 2020-09-03 03:02:00 INFO: 2020-09-03 03:02:00 INFO: clearing start 2020-09-03 03:02:00 INFO: clearing end 2020-09-03 03:02:00 INFO: 2020-09-03 03:02:00 INFO: 2020-09-03 03:02:00 INFO: 2020-09-03 03:02:00 INFO: 2020-09-03 04:00:20 INFO: 2020-09-03 04:00:20 INFO: 2020-09-03 04:00:20 INFO: 2020-09-03 04:00:20 INFO: 2020-09-03 04:00:20 INFO: init new order start 2020-09-03 04:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 3, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 440.3, 'high': 446.6, 'low': 438.6, 'close': 445.1, 'trades': 5091, 'volume': 3216656, 'vwap': 443.69, 'lastSize': 131, 'turnover': 142718776980, 'homeNotional': 36727.92073492884, 'foreignNotional': 16295882.605781425}, {'timestamp': datetime.datetime(2020, 9, 3, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 443.2, 'high': 443.9, 'low': 439.65, 'close': 440.3, 'trades': 3698, 'volume': 2069316, 'vwap': 441.93, 'lastSize': 15000, 'turnover': 91447279385, 'homeNotional': 23637.154877078243, 'foreignNotional': 10445756.103336114}, {'timestamp': datetime.datetime(2020, 9, 2, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 438.55, 'high': 445.7, 'low': 436.35, 'close': 443.2, 'trades': 5971, 'volume': 4712027, 'vwap': 441.81, 'lastSize': 400, 'turnover': 208180943020, 'homeNotional': 53818.483668851826, 'foreignNotional': 23777650.872662984}] 2020-09-03 04:00:20 INFO: prepare candles [CandleItem(low=438.6, high=446.6, open=440.3, close=445.1, color='GREEN'), CandleItem(low=439.65, high=443.9, open=443.2, close=440.3, color='RED'), CandleItem(low=436.35, high=445.7, open=438.55, close=443.2, color='GREEN')] 2020-09-03 04:00:20 INFO: skip by colors first_candle=CandleItem(low=436.35, high=445.7, open=438.55, close=443.2, color='GREEN') second_candle=CandleItem(low=439.65, high=443.9, open=443.2, close=440.3, color='RED') last_candle=CandleItem(low=438.6, high=446.6, open=440.3, close=445.1, color='GREEN') 2020-09-03 04:00:20 INFO: check need new order None 2020-09-03 04:00:20 INFO: init new order end 2020-09-03 04:00:20 INFO: 2020-09-03 04:00:20 INFO: 2020-09-03 04:00:20 INFO: 2020-09-03 04:00:20 INFO: 2020-09-03 04:02:00 INFO: 2020-09-03 04:02:00 INFO: 2020-09-03 04:02:00 INFO: 2020-09-03 04:02:00 INFO: 2020-09-03 04:02:00 INFO: clearing start 2020-09-03 04:02:00 INFO: clearing end 2020-09-03 04:02:00 INFO: 2020-09-03 04:02:00 INFO: 2020-09-03 04:02:00 INFO: 2020-09-03 04:02:00 INFO: 2020-09-03 05:00:22 INFO: 2020-09-03 05:00:22 INFO: 2020-09-03 05:00:22 INFO: 2020-09-03 05:00:22 INFO: 2020-09-03 05:00:22 INFO: init new order start 2020-09-03 05:00:22 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 3, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 445.1, 'high': 448.95, 'low': 442.6, 'close': 448.7, 'trades': 4039, 'volume': 2712584, 'vwap': 445.95, 'lastSize': 13, 'turnover': 120966803410, 'homeNotional': 30971.70114310186, 'foreignNotional': 13811787.898124887}, {'timestamp': datetime.datetime(2020, 9, 3, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 440.3, 'high': 446.6, 'low': 438.6, 'close': 445.1, 'trades': 5091, 'volume': 3216656, 'vwap': 443.69, 'lastSize': 131, 'turnover': 142718776980, 'homeNotional': 36727.92073492884, 'foreignNotional': 16295882.605781425}, {'timestamp': datetime.datetime(2020, 9, 3, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 443.2, 'high': 443.9, 'low': 439.65, 'close': 440.3, 'trades': 3698, 'volume': 2069316, 'vwap': 441.93, 'lastSize': 15000, 'turnover': 91447279385, 'homeNotional': 23637.154877078243, 'foreignNotional': 10445756.103336114}] 2020-09-03 05:00:22 INFO: prepare candles [CandleItem(low=442.6, high=448.95, open=445.1, close=448.7, color='GREEN'), CandleItem(low=438.6, high=446.6, open=440.3, close=445.1, color='GREEN'), CandleItem(low=439.65, high=443.9, open=443.2, close=440.3, color='RED')] 2020-09-03 05:00:22 INFO: skip by colors first_candle=CandleItem(low=439.65, high=443.9, open=443.2, close=440.3, color='RED') second_candle=CandleItem(low=438.6, high=446.6, open=440.3, close=445.1, color='GREEN') last_candle=CandleItem(low=442.6, high=448.95, open=445.1, close=448.7, color='GREEN') 2020-09-03 05:00:22 INFO: check need new order None 2020-09-03 05:00:22 INFO: init new order end 2020-09-03 05:00:22 INFO: 2020-09-03 05:00:22 INFO: 2020-09-03 05:00:22 INFO: 2020-09-03 05:00:22 INFO: 2020-09-03 05:02:00 INFO: 2020-09-03 05:02:00 INFO: 2020-09-03 05:02:00 INFO: 2020-09-03 05:02:00 INFO: 2020-09-03 05:02:00 INFO: clearing start 2020-09-03 05:02:00 INFO: clearing end 2020-09-03 05:02:00 INFO: 2020-09-03 05:02:00 INFO: 2020-09-03 05:02:00 INFO: 2020-09-03 05:02:00 INFO: 2020-09-03 06:00:20 INFO: 2020-09-03 06:00:20 INFO: 2020-09-03 06:00:20 INFO: 2020-09-03 06:00:20 INFO: 2020-09-03 06:00:20 INFO: init new order start 2020-09-03 06:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 3, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 448.7, 'high': 451.5, 'low': 446.25, 'close': 448.35, 'trades': 5147, 'volume': 3876491, 'vwap': 448.81, 'lastSize': 1014, 'turnover': 173980504135, 'homeNotional': 44300.137961389446, 'foreignNotional': 19882333.28701415}, {'timestamp': datetime.datetime(2020, 9, 3, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 445.1, 'high': 448.95, 'low': 442.6, 'close': 448.7, 'trades': 4039, 'volume': 2712584, 'vwap': 445.95, 'lastSize': 13, 'turnover': 120966803410, 'homeNotional': 30971.70114310186, 'foreignNotional': 13811787.898124887}, {'timestamp': datetime.datetime(2020, 9, 3, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 440.3, 'high': 446.6, 'low': 438.6, 'close': 445.1, 'trades': 5091, 'volume': 3216656, 'vwap': 443.69, 'lastSize': 131, 'turnover': 142718776980, 'homeNotional': 36727.92073492884, 'foreignNotional': 16295882.605781425}] 2020-09-03 06:00:21 INFO: prepare candles [CandleItem(low=446.25, high=451.5, open=448.7, close=448.35, color='RED'), CandleItem(low=442.6, high=448.95, open=445.1, close=448.7, color='GREEN'), CandleItem(low=438.6, high=446.6, open=440.3, close=445.1, color='GREEN')] 2020-09-03 06:00:21 INFO: last_candle=CandleItem(low=446.25, high=451.5, open=448.7, close=448.35, color='RED') 2020-09-03 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-03 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=446.25, high=451.5, open=448.7, close=448.35, color='RED') 2020-09-03 06:00:21 INFO: skip by CandleItem(low=446.25, high=451.5, open=448.7, close=448.35, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-03 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-03 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=446.25, high=451.5, open=448.7, close=448.35, color='RED') 2020-09-03 06:00:21 INFO: skip by CandleItem(low=446.25, high=451.5, open=448.7, close=448.35, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-03 06:00:21 INFO: not found applicable config for candle 2020-09-03 06:00:21 INFO: check need new order None 2020-09-03 06:00:21 INFO: init new order end 2020-09-03 06:00:21 INFO: 2020-09-03 06:00:21 INFO: 2020-09-03 06:00:21 INFO: 2020-09-03 06:00:21 INFO: 2020-09-03 06:02:00 INFO: 2020-09-03 06:02:00 INFO: 2020-09-03 06:02:00 INFO: 2020-09-03 06:02:00 INFO: 2020-09-03 06:02:00 INFO: clearing start 2020-09-03 06:02:00 INFO: clearing end 2020-09-03 06:02:00 INFO: 2020-09-03 06:02:00 INFO: 2020-09-03 06:02:00 INFO: 2020-09-03 06:02:00 INFO: 2020-09-03 07:00:20 INFO: 2020-09-03 07:00:20 INFO: 2020-09-03 07:00:20 INFO: 2020-09-03 07:00:20 INFO: 2020-09-03 07:00:20 INFO: init new order start 2020-09-03 07:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 3, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 448.35, 'high': 449.4, 'low': 441.3, 'close': 443.65, 'trades': 5156, 'volume': 3647450, 'vwap': 444.49, 'lastSize': 500, 'turnover': 162125409255, 'homeNotional': 41543.197378337616, 'foreignNotional': 18465706.743962582}, {'timestamp': datetime.datetime(2020, 9, 3, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 448.7, 'high': 451.5, 'low': 446.25, 'close': 448.35, 'trades': 5147, 'volume': 3876491, 'vwap': 448.81, 'lastSize': 1014, 'turnover': 173980504135, 'homeNotional': 44300.137961389446, 'foreignNotional': 19882333.28701415}, {'timestamp': datetime.datetime(2020, 9, 3, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 445.1, 'high': 448.95, 'low': 442.6, 'close': 448.7, 'trades': 4039, 'volume': 2712584, 'vwap': 445.95, 'lastSize': 13, 'turnover': 120966803410, 'homeNotional': 30971.70114310186, 'foreignNotional': 13811787.898124887}] 2020-09-03 07:00:20 INFO: prepare candles [CandleItem(low=441.3, high=449.4, open=448.35, close=443.65, color='RED'), CandleItem(low=446.25, high=451.5, open=448.7, close=448.35, color='RED'), CandleItem(low=442.6, high=448.95, open=445.1, close=448.7, color='GREEN')] 2020-09-03 07:00:20 INFO: skip by colors first_candle=CandleItem(low=442.6, high=448.95, open=445.1, close=448.7, color='GREEN') second_candle=CandleItem(low=446.25, high=451.5, open=448.7, close=448.35, color='RED') last_candle=CandleItem(low=441.3, high=449.4, open=448.35, close=443.65, color='RED') 2020-09-03 07:00:20 INFO: check need new order None 2020-09-03 07:00:20 INFO: init new order end 2020-09-03 07:00:20 INFO: 2020-09-03 07:00:20 INFO: 2020-09-03 07:00:20 INFO: 2020-09-03 07:00:20 INFO: 2020-09-03 07:02:00 INFO: 2020-09-03 07:02:00 INFO: 2020-09-03 07:02:00 INFO: 2020-09-03 07:02:00 INFO: 2020-09-03 07:02:00 INFO: clearing start 2020-09-03 07:02:00 INFO: clearing end 2020-09-03 07:02:00 INFO: 2020-09-03 07:02:00 INFO: 2020-09-03 07:02:00 INFO: 2020-09-03 07:02:00 INFO: 2020-09-03 08:00:20 INFO: 2020-09-03 08:00:20 INFO: 2020-09-03 08:00:20 INFO: 2020-09-03 08:00:20 INFO: 2020-09-03 08:00:20 INFO: init new order start 2020-09-03 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 3, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 443.65, 'high': 446.0, 'low': 433.8, 'close': 435.75, 'trades': 7534, 'volume': 5622552, 'vwap': 439.74, 'lastSize': 60, 'turnover': 247244728895, 'homeNotional': 63702.43289003761, 'foreignNotional': 28012849.246938363}, {'timestamp': datetime.datetime(2020, 9, 3, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 448.35, 'high': 449.4, 'low': 441.3, 'close': 443.65, 'trades': 5156, 'volume': 3647450, 'vwap': 444.49, 'lastSize': 500, 'turnover': 162125409255, 'homeNotional': 41543.197378337616, 'foreignNotional': 18465706.743962582}, {'timestamp': datetime.datetime(2020, 9, 3, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 448.7, 'high': 451.5, 'low': 446.25, 'close': 448.35, 'trades': 5147, 'volume': 3876491, 'vwap': 448.81, 'lastSize': 1014, 'turnover': 173980504135, 'homeNotional': 44300.137961389446, 'foreignNotional': 19882333.28701415}] 2020-09-03 08:00:20 INFO: prepare candles [CandleItem(low=433.8, high=446.0, open=443.65, close=435.75, color='RED'), CandleItem(low=441.3, high=449.4, open=448.35, close=443.65, color='RED'), CandleItem(low=446.25, high=451.5, open=448.7, close=448.35, color='RED')] 2020-09-03 08:00:20 INFO: skip by colors first_candle=CandleItem(low=446.25, high=451.5, open=448.7, close=448.35, color='RED') second_candle=CandleItem(low=441.3, high=449.4, open=448.35, close=443.65, color='RED') last_candle=CandleItem(low=433.8, high=446.0, open=443.65, close=435.75, color='RED') 2020-09-03 08:00:20 INFO: check need new order None 2020-09-03 08:00:20 INFO: init new order end 2020-09-03 08:00:20 INFO: 2020-09-03 08:00:20 INFO: 2020-09-03 08:00:20 INFO: 2020-09-03 08:00:20 INFO: 2020-09-03 08:02:00 INFO: 2020-09-03 08:02:00 INFO: 2020-09-03 08:02:00 INFO: 2020-09-03 08:02:00 INFO: 2020-09-03 08:02:00 INFO: clearing start 2020-09-03 08:02:00 INFO: clearing end 2020-09-03 08:02:00 INFO: 2020-09-03 08:02:00 INFO: 2020-09-03 08:02:00 INFO: 2020-09-03 08:02:00 INFO: 2020-09-03 09:00:20 INFO: 2020-09-03 09:00:20 INFO: 2020-09-03 09:00:20 INFO: 2020-09-03 09:00:20 INFO: 2020-09-03 09:00:20 INFO: init new order start 2020-09-03 09:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 3, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 435.75, 'high': 437.65, 'low': 430.25, 'close': 433.2, 'trades': 8628, 'volume': 6035473, 'vwap': 434.3, 'lastSize': 100, 'turnover': 262115031715, 'homeNotional': 68191.67340376876, 'foreignNotional': 29615138.316782136}, {'timestamp': datetime.datetime(2020, 9, 3, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 443.65, 'high': 446.0, 'low': 433.8, 'close': 435.75, 'trades': 7534, 'volume': 5622552, 'vwap': 439.74, 'lastSize': 60, 'turnover': 247244728895, 'homeNotional': 63702.43289003761, 'foreignNotional': 28012849.246938363}, {'timestamp': datetime.datetime(2020, 9, 3, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 448.35, 'high': 449.4, 'low': 441.3, 'close': 443.65, 'trades': 5156, 'volume': 3647450, 'vwap': 444.49, 'lastSize': 500, 'turnover': 162125409255, 'homeNotional': 41543.197378337616, 'foreignNotional': 18465706.743962582}] 2020-09-03 09:00:20 INFO: prepare candles [CandleItem(low=430.25, high=437.65, open=435.75, close=433.2, color='RED'), CandleItem(low=433.8, high=446.0, open=443.65, close=435.75, color='RED'), CandleItem(low=441.3, high=449.4, open=448.35, close=443.65, color='RED')] 2020-09-03 09:00:20 INFO: skip by colors first_candle=CandleItem(low=441.3, high=449.4, open=448.35, close=443.65, color='RED') second_candle=CandleItem(low=433.8, high=446.0, open=443.65, close=435.75, color='RED') last_candle=CandleItem(low=430.25, high=437.65, open=435.75, close=433.2, color='RED') 2020-09-03 09:00:20 INFO: check need new order None 2020-09-03 09:00:20 INFO: init new order end 2020-09-03 09:00:20 INFO: 2020-09-03 09:00:20 INFO: 2020-09-03 09:00:20 INFO: 2020-09-03 09:00:20 INFO: 2020-09-03 09:02:00 INFO: 2020-09-03 09:02:00 INFO: 2020-09-03 09:02:00 INFO: 2020-09-03 09:02:00 INFO: 2020-09-03 09:02:00 INFO: clearing start 2020-09-03 09:02:00 INFO: clearing end 2020-09-03 09:02:00 INFO: 2020-09-03 09:02:00 INFO: 2020-09-03 09:02:00 INFO: 2020-09-03 09:02:00 INFO: 2020-09-03 10:00:20 INFO: 2020-09-03 10:00:20 INFO: 2020-09-03 10:00:20 INFO: 2020-09-03 10:00:20 INFO: 2020-09-03 10:00:20 INFO: init new order start 2020-09-03 10:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 3, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 433.2, 'high': 435.75, 'low': 427.0, 'close': 428.5, 'trades': 8365, 'volume': 6413848, 'vwap': 430.82, 'lastSize': 100, 'turnover': 276321306320, 'homeNotional': 72447.9015194799, 'foreignNotional': 31212245.279468168}, {'timestamp': datetime.datetime(2020, 9, 3, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 435.75, 'high': 437.65, 'low': 430.25, 'close': 433.2, 'trades': 8628, 'volume': 6035473, 'vwap': 434.3, 'lastSize': 100, 'turnover': 262115031715, 'homeNotional': 68191.67340376876, 'foreignNotional': 29615138.316782136}, {'timestamp': datetime.datetime(2020, 9, 3, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 443.65, 'high': 446.0, 'low': 433.8, 'close': 435.75, 'trades': 7534, 'volume': 5622552, 'vwap': 439.74, 'lastSize': 60, 'turnover': 247244728895, 'homeNotional': 63702.43289003761, 'foreignNotional': 28012849.246938363}] 2020-09-03 10:00:21 INFO: prepare candles [CandleItem(low=427.0, high=435.75, open=433.2, close=428.5, color='RED'), CandleItem(low=430.25, high=437.65, open=435.75, close=433.2, color='RED'), CandleItem(low=433.8, high=446.0, open=443.65, close=435.75, color='RED')] 2020-09-03 10:00:21 INFO: skip by colors first_candle=CandleItem(low=433.8, high=446.0, open=443.65, close=435.75, color='RED') second_candle=CandleItem(low=430.25, high=437.65, open=435.75, close=433.2, color='RED') last_candle=CandleItem(low=427.0, high=435.75, open=433.2, close=428.5, color='RED') 2020-09-03 10:00:21 INFO: check need new order None 2020-09-03 10:00:21 INFO: init new order end 2020-09-03 10:00:21 INFO: 2020-09-03 10:00:21 INFO: 2020-09-03 10:00:21 INFO: 2020-09-03 10:00:21 INFO: 2020-09-03 10:02:00 INFO: 2020-09-03 10:02:00 INFO: 2020-09-03 10:02:00 INFO: 2020-09-03 10:02:00 INFO: 2020-09-03 10:02:00 INFO: clearing start 2020-09-03 10:02:00 INFO: clearing end 2020-09-03 10:02:00 INFO: 2020-09-03 10:02:00 INFO: 2020-09-03 10:02:00 INFO: 2020-09-03 10:02:00 INFO: 2020-09-03 11:00:20 INFO: 2020-09-03 11:00:20 INFO: 2020-09-03 11:00:20 INFO: 2020-09-03 11:00:20 INFO: 2020-09-03 11:00:20 INFO: init new order start 2020-09-03 11:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 3, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 428.5, 'high': 439.55, 'low': 424.25, 'close': 437.75, 'trades': 9196, 'volume': 7702502, 'vwap': 431.86, 'lastSize': 25, 'turnover': 332637836515, 'homeNotional': 87262.94708123291, 'foreignNotional': 37686720.553052686}, {'timestamp': datetime.datetime(2020, 9, 3, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 433.2, 'high': 435.75, 'low': 427.0, 'close': 428.5, 'trades': 8365, 'volume': 6413848, 'vwap': 430.82, 'lastSize': 100, 'turnover': 276321306320, 'homeNotional': 72447.9015194799, 'foreignNotional': 31212245.279468168}, {'timestamp': datetime.datetime(2020, 9, 3, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 435.75, 'high': 437.65, 'low': 430.25, 'close': 433.2, 'trades': 8628, 'volume': 6035473, 'vwap': 434.3, 'lastSize': 100, 'turnover': 262115031715, 'homeNotional': 68191.67340376876, 'foreignNotional': 29615138.316782136}] 2020-09-03 11:00:20 INFO: prepare candles [CandleItem(low=424.25, high=439.55, open=428.5, close=437.75, color='GREEN'), CandleItem(low=427.0, high=435.75, open=433.2, close=428.5, color='RED'), CandleItem(low=430.25, high=437.65, open=435.75, close=433.2, color='RED')] 2020-09-03 11:00:20 INFO: last_candle=CandleItem(low=424.25, high=439.55, open=428.5, close=437.75, color='GREEN') 2020-09-03 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-03 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=424.25, high=439.55, open=428.5, close=437.75, color='GREEN') 2020-09-03 11:00:20 INFO: skip by CandleItem(low=424.25, high=439.55, open=428.5, close=437.75, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-03 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-03 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=424.25, high=439.55, open=428.5, close=437.75, color='GREEN') 2020-09-03 11:00:20 INFO: skip by CandleItem(low=424.25, high=439.55, open=428.5, close=437.75, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-03 11:00:20 INFO: not found applicable config for candle 2020-09-03 11:00:20 INFO: check need new order None 2020-09-03 11:00:20 INFO: init new order end 2020-09-03 11:00:20 INFO: 2020-09-03 11:00:20 INFO: 2020-09-03 11:00:20 INFO: 2020-09-03 11:00:20 INFO: 2020-09-03 11:02:00 INFO: 2020-09-03 11:02:00 INFO: 2020-09-03 11:02:00 INFO: 2020-09-03 11:02:00 INFO: 2020-09-03 11:02:00 INFO: clearing start 2020-09-03 11:02:00 INFO: clearing end 2020-09-03 11:02:00 INFO: 2020-09-03 11:02:00 INFO: 2020-09-03 11:02:00 INFO: 2020-09-03 11:02:00 INFO: 2020-09-03 12:00:20 INFO: 2020-09-03 12:00:20 INFO: 2020-09-03 12:00:20 INFO: 2020-09-03 12:00:20 INFO: 2020-09-03 12:00:20 INFO: init new order start 2020-09-03 12:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 3, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 437.75, 'high': 439.7, 'low': 434.4, 'close': 438.25, 'trades': 5330, 'volume': 3907640, 'vwap': 436.64, 'lastSize': 100, 'turnover': 170620089330, 'homeNotional': 44531.401852320545, 'foreignNotional': 19443938.24644163}, {'timestamp': datetime.datetime(2020, 9, 3, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 428.5, 'high': 439.55, 'low': 424.25, 'close': 437.75, 'trades': 9196, 'volume': 7702502, 'vwap': 431.86, 'lastSize': 25, 'turnover': 332637836515, 'homeNotional': 87262.94708123291, 'foreignNotional': 37686720.553052686}, {'timestamp': datetime.datetime(2020, 9, 3, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 433.2, 'high': 435.75, 'low': 427.0, 'close': 428.5, 'trades': 8365, 'volume': 6413848, 'vwap': 430.82, 'lastSize': 100, 'turnover': 276321306320, 'homeNotional': 72447.9015194799, 'foreignNotional': 31212245.279468168}] 2020-09-03 12:00:21 INFO: prepare candles [CandleItem(low=434.4, high=439.7, open=437.75, close=438.25, color='GREEN'), CandleItem(low=424.25, high=439.55, open=428.5, close=437.75, color='GREEN'), CandleItem(low=427.0, high=435.75, open=433.2, close=428.5, color='RED')] 2020-09-03 12:00:21 INFO: skip by colors first_candle=CandleItem(low=427.0, high=435.75, open=433.2, close=428.5, color='RED') second_candle=CandleItem(low=424.25, high=439.55, open=428.5, close=437.75, color='GREEN') last_candle=CandleItem(low=434.4, high=439.7, open=437.75, close=438.25, color='GREEN') 2020-09-03 12:00:21 INFO: check need new order None 2020-09-03 12:00:21 INFO: init new order end 2020-09-03 12:00:21 INFO: 2020-09-03 12:00:21 INFO: 2020-09-03 12:00:21 INFO: 2020-09-03 12:00:21 INFO: 2020-09-03 12:02:00 INFO: 2020-09-03 12:02:00 INFO: 2020-09-03 12:02:00 INFO: 2020-09-03 12:02:00 INFO: 2020-09-03 12:02:00 INFO: clearing start 2020-09-03 12:02:00 INFO: clearing end 2020-09-03 12:02:00 INFO: 2020-09-03 12:02:00 INFO: 2020-09-03 12:02:00 INFO: 2020-09-03 12:02:00 INFO: 2020-09-03 13:00:20 INFO: 2020-09-03 13:00:20 INFO: 2020-09-03 13:00:20 INFO: 2020-09-03 13:00:20 INFO: 2020-09-03 13:00:20 INFO: init new order start 2020-09-03 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 3, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 438.25, 'high': 438.85, 'low': 431.75, 'close': 431.8, 'trades': 3970, 'volume': 2731059, 'vwap': 436.28, 'lastSize': 77, 'turnover': 119150143040, 'homeNotional': 31075.191173085066, 'foreignNotional': 13557479.601889651}, {'timestamp': datetime.datetime(2020, 9, 3, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 437.75, 'high': 439.7, 'low': 434.4, 'close': 438.25, 'trades': 5330, 'volume': 3907640, 'vwap': 436.64, 'lastSize': 100, 'turnover': 170620089330, 'homeNotional': 44531.401852320545, 'foreignNotional': 19443938.24644163}, {'timestamp': datetime.datetime(2020, 9, 3, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 428.5, 'high': 439.55, 'low': 424.25, 'close': 437.75, 'trades': 9196, 'volume': 7702502, 'vwap': 431.86, 'lastSize': 25, 'turnover': 332637836515, 'homeNotional': 87262.94708123291, 'foreignNotional': 37686720.553052686}] 2020-09-03 13:00:20 INFO: prepare candles [CandleItem(low=431.75, high=438.85, open=438.25, close=431.8, color='RED'), CandleItem(low=434.4, high=439.7, open=437.75, close=438.25, color='GREEN'), CandleItem(low=424.25, high=439.55, open=428.5, close=437.75, color='GREEN')] 2020-09-03 13:00:20 INFO: last_candle=CandleItem(low=431.75, high=438.85, open=438.25, close=431.8, color='RED') 2020-09-03 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-03 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=431.75, high=438.85, open=438.25, close=431.8, color='RED') 2020-09-03 13:00:20 INFO: skip by CandleItem(low=431.75, high=438.85, open=438.25, close=431.8, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-03 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-03 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=431.75, high=438.85, open=438.25, close=431.8, color='RED') 2020-09-03 13:00:20 INFO: apply filter None to candle=CandleItem(low=434.4, high=439.7, open=437.75, close=438.25, color='GREEN') 2020-09-03 13:00:20 INFO: apply filter None to candle=CandleItem(low=424.25, high=439.55, open=428.5, close=437.75, color='GREEN') 2020-09-03 13:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=431.75, high=438.85, open=438.25, close=431.8, color='RED'), take_profit_factor=5.0, clearing_interval=3600) 2020-09-03 13:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=431.75, high=438.85, open=438.25, close=431.8, color='RED'), take_profit_factor=5.0, clearing_interval=3600) 2020-09-03 13:00:20 INFO: place order: start candle=CandleItem(low=431.75, high=438.85, open=438.25, close=431.8, color='RED') ticker='ETHUSD' price_offset=0.1 2020-09-03 13:00:20 INFO: place order: side_factor=1 init_trigger_price=431.7 init_order_price=431.65 stop_price_offset=0.0 candle.size=7.100000000000023 stop_price=438.85 take_price=396.14999999999986 2020-09-03 13:00:20 INFO: place order round: side_factor=1 init_trigger_price=Decimal('431.69999999999998863131622783839702606201171875') init_order_price=Decimal('431.6499999999999772626324556767940521240234375') stop_price_offset=0.0 candle.size=7.100000000000023 stop_price=Decimal('438.8500000000000227373675443232059478759765625') take_price=Decimal('396.149999999999863575794734060764312744140625') 2020-09-03 13:00:20 INFO: place order: compute qty=-266 2020-09-03 13:00:20 INFO: place order: save order to db 21fe2ae726ab410f942dda17e448f46a; response=True 2020-09-03 13:00:20 INFO: post order to exchange resp={'orderID': '6152b03d-0871-2877-2099-34820bb98bea', 'clOrdID': '21fe2ae726ab410f942dda17e448f46a', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 266, 'price': 431.65, 'displayQty': None, 'stopPx': 431.7, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 266, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 3, 10, 0, 20, 945000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 3, 10, 0, 20, 945000, tzinfo=tzutc())} 2020-09-03 13:00:20 INFO: place new init order {'qty': -266, 'init_price': Decimal('431.69999999999998863131622783839702606201171875'), 'stop_price': Decimal('438.8500000000000227373675443232059478759765625'), 'take_price': Decimal('396.149999999999863575794734060764312744140625'), 'order_uid': '21fe2ae726ab410f942dda17e448f46a', 'response': {'orderID': '6152b03d-0871-2877-2099-34820bb98bea', 'clOrdID': '21fe2ae726ab410f942dda17e448f46a', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 266, 'price': 431.65, 'displayQty': None, 'stopPx': 431.7, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 266, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 3, 10, 0, 20, 945000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 3, 10, 0, 20, 945000, tzinfo=tzutc())}} 2020-09-03 13:00:20 INFO: init new order end 2020-09-03 13:00:20 INFO: 2020-09-03 13:00:20 INFO: 2020-09-03 13:00:20 INFO: 2020-09-03 13:00:20 INFO: 2020-09-03 13:00:21 INFO: process event {'orderID': '6152b03d-0871-2877-2099-34820bb98bea', 'clOrdID': '21fe2ae726ab410f942dda17e448f46a', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 266, 'price': 431.65, 'displayQty': None, 'stopPx': 431.7, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 266, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-09-03T10:00:20.945Z', 'timestamp': '2020-09-03T10:00:20.945Z'} 2020-09-03 13:00:21 INFO: skip event 21fe2ae726ab410f942dda17e448f46a New 2020-09-03 13:02:00 INFO: 2020-09-03 13:02:00 INFO: 2020-09-03 13:02:00 INFO: 2020-09-03 13:02:00 INFO: 2020-09-03 13:02:00 INFO: clearing start 2020-09-03 13:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '6152b03d-0871-2877-2099-34820bb98bea', 'clOrdID': '21fe2ae726ab410f942dda17e448f46a', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 266, 'price': 431.65, 'displayQty': None, 'stopPx': 431.7, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 266, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 3, 10, 0, 20, 945000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 3, 10, 0, 20, 945000, tzinfo=tzutc())} 2020-09-03 13:02:00 INFO: order time=2020-09-03 10:00:20.945000+00:00; delta from now UTC=0:01:39.265604 time_delta.total_seconds()=99.265604; time_diff_offset='3600' 2020-09-03 13:02:00 INFO: skip by time diff 2020-09-03 10:00:20.945000+00:00 2020-09-03 13:02:00 INFO: clearing end 2020-09-03 13:02:00 INFO: 2020-09-03 13:02:00 INFO: 2020-09-03 13:02:00 INFO: 2020-09-03 13:02:00 INFO: 2020-09-03 13:03:05 INFO: process event {'orderID': '6152b03d-0871-2877-2099-34820bb98bea', 'triggered': 'StopOrderTriggered', 'workingIndicator': True, 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'transactTime': '2020-09-03T10:03:05.261Z', 'timestamp': '2020-09-03T10:03:05.261Z', 'clOrdID': '21fe2ae726ab410f942dda17e448f46a', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-03 13:03:05 INFO: skip event 21fe2ae726ab410f942dda17e448f46a 2020-09-03 13:03:46 INFO: process event {'orderID': '6152b03d-0871-2877-2099-34820bb98bea', 'ordStatus': 'Filled', 'workingIndicator': False, 'leavesQty': 0, 'cumQty': 266, 'avgPx': 431.65, 'timestamp': '2020-09-03T10:03:46.312Z', 'clOrdID': '21fe2ae726ab410f942dda17e448f46a', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-03 13:03:46 INFO: add new event={'uid': '21fe2ae726ab410f942dda17e448f46a', 'status': 'Filled'} 2020-09-03 13:03:46 INFO: 2020-09-03 13:03:46 INFO: 2020-09-03 13:03:46 INFO: 2020-09-03 13:03:46 INFO: 2020-09-03 13:03:46 INFO: process event start 2020-09-03 13:03:46 INFO: fetch new order event 21fe2ae726ab410f942dda17e448f46a 2020-09-03 13:03:46 INFO: fetch orders by event init={'stop': '438.8500000000000227373675443232059478759765625', 'take': '396.149999999999863575794734060764312744140625', 'qty': '266', 'color': 'RED', 'ticker': 'ETHUSD', 'clearing_offset': '3600'} profit_pair=None 2020-09-03 13:03:46 INFO: process init order filled 2020-09-03 13:03:46 INFO: save profit orders to storage stop=2e819f56f902451db071caf8b2dd711e take=3c06d3e0d8ec4079bf09b3cbb1c58f1f 2020-09-03 13:03:46 INFO: place profit orders take_price=396.149999999999863575794734060764312744140625, stop_price=438.8500000000000227373675443232059478759765625, qty=266, color=RED, ticker=ETHUSD 2e819f56f902451db071caf8b2dd711e 3c06d3e0d8ec4079bf09b3cbb1c58f1f 2020-09-03 13:03:46 INFO: place stop order ETHUSD: qty=266, stop_price=438.8500000000000227373675443232059478759765625, stop_uid=2e819f56f902451db071caf8b2dd711e 2020-09-03 13:03:46 INFO: exchange resp for stop order={'orderID': '4bd845c9-c546-ab91-f836-ac60f010b8b8', 'clOrdID': '2e819f56f902451db071caf8b2dd711e', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 266, 'price': None, 'displayQty': None, 'stopPx': 438.85, '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': 266, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 3, 10, 3, 46, 409000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 3, 10, 3, 46, 409000, tzinfo=tzutc())} 2020-09-03 13:03:46 INFO: place limit order ETHUSD: qty=266, price=396.149999999999863575794734060764312744140625, take_uid=3c06d3e0d8ec4079bf09b3cbb1c58f1f 2020-09-03 13:03:46 INFO: process event {'orderID': '4bd845c9-c546-ab91-f836-ac60f010b8b8', 'clOrdID': '2e819f56f902451db071caf8b2dd711e', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 266, 'price': None, 'displayQty': None, 'stopPx': 438.85, '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': 266, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': '2020-09-03T10:03:46.409Z', 'timestamp': '2020-09-03T10:03:46.409Z'} 2020-09-03 13:03:46 INFO: skip event 2e819f56f902451db071caf8b2dd711e New 2020-09-03 13:03:46 INFO: process event {'orderID': '5809f999-cc2d-6885-511a-838ee46bfc6e', 'clOrdID': '3c06d3e0d8ec4079bf09b3cbb1c58f1f', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 266, 'price': 396.15, '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': 266, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': '2020-09-03T10:03:46.451Z', 'timestamp': '2020-09-03T10:03:46.451Z'} 2020-09-03 13:03:46 INFO: skip event 3c06d3e0d8ec4079bf09b3cbb1c58f1f New 2020-09-03 13:03:46 INFO: exchange resp for take profit order={'orderID': '5809f999-cc2d-6885-511a-838ee46bfc6e', 'clOrdID': '3c06d3e0d8ec4079bf09b3cbb1c58f1f', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 266, 'price': 396.15, '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': 266, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 3, 10, 3, 46, 451000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 3, 10, 3, 46, 451000, tzinfo=tzutc())} 2020-09-03 13:03:46 INFO: place profit orders={'stop': {'response': {'orderID': '4bd845c9-c546-ab91-f836-ac60f010b8b8', 'clOrdID': '2e819f56f902451db071caf8b2dd711e', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 266, 'price': None, 'displayQty': None, 'stopPx': 438.85, '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': 266, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 3, 10, 3, 46, 409000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 3, 10, 3, 46, 409000, tzinfo=tzutc())}, 'qty': Decimal('266'), 'uid': '2e819f56f902451db071caf8b2dd711e', 'price': Decimal('438.8500000000000227373675443232059478759765625')}, 'take': {'response': {'orderID': '5809f999-cc2d-6885-511a-838ee46bfc6e', 'clOrdID': '3c06d3e0d8ec4079bf09b3cbb1c58f1f', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 266, 'price': 396.15, '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': 266, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 3, 10, 3, 46, 451000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 3, 10, 3, 46, 451000, tzinfo=tzutc())}, 'qty': Decimal('266'), 'uid': '3c06d3e0d8ec4079bf09b3cbb1c58f1f', 'price': Decimal('396.149999999999863575794734060764312744140625')}} 2020-09-03 13:03:46 INFO: rm init order from db 21fe2ae726ab410f942dda17e448f46a 2020-09-03 13:03:46 INFO: end process event_processing_result='proceed init order' 2020-09-03 13:03:46 INFO: 2020-09-03 13:03:46 INFO: 2020-09-03 13:03:46 INFO: 2020-09-03 13:03:46 INFO: 2020-09-03 14:00:20 INFO: 2020-09-03 14:00:20 INFO: 2020-09-03 14:00:20 INFO: 2020-09-03 14:00:20 INFO: 2020-09-03 14:00:20 INFO: init new order start 2020-09-03 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 3, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 431.8, 'high': 433.5, 'low': 422.3, 'close': 425.75, 'trades': 8049, 'volume': 6221387, 'vwap': 427.91, 'lastSize': 332, 'turnover': 266215273040, 'homeNotional': 70291.84933158137, 'foreignNotional': 30078578.16665046}, {'timestamp': datetime.datetime(2020, 9, 3, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 438.25, 'high': 438.85, 'low': 431.75, 'close': 431.8, 'trades': 3970, 'volume': 2731059, 'vwap': 436.28, 'lastSize': 77, 'turnover': 119150143040, 'homeNotional': 31075.191173085066, 'foreignNotional': 13557479.601889651}, {'timestamp': datetime.datetime(2020, 9, 3, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 437.75, 'high': 439.7, 'low': 434.4, 'close': 438.25, 'trades': 5330, 'volume': 3907640, 'vwap': 436.64, 'lastSize': 100, 'turnover': 170620089330, 'homeNotional': 44531.401852320545, 'foreignNotional': 19443938.24644163}] 2020-09-03 14:00:20 INFO: prepare candles [CandleItem(low=422.3, high=433.5, open=431.8, close=425.75, color='RED'), CandleItem(low=431.75, high=438.85, open=438.25, close=431.8, color='RED'), CandleItem(low=434.4, high=439.7, open=437.75, close=438.25, color='GREEN')] 2020-09-03 14:00:20 INFO: skip by colors first_candle=CandleItem(low=434.4, high=439.7, open=437.75, close=438.25, color='GREEN') second_candle=CandleItem(low=431.75, high=438.85, open=438.25, close=431.8, color='RED') last_candle=CandleItem(low=422.3, high=433.5, open=431.8, close=425.75, color='RED') 2020-09-03 14:00:20 INFO: check need new order None 2020-09-03 14:00:20 INFO: init new order end 2020-09-03 14:00:20 INFO: 2020-09-03 14:00:20 INFO: 2020-09-03 14:00:20 INFO: 2020-09-03 14:00:20 INFO: 2020-09-03 14:02:00 INFO: 2020-09-03 14:02:00 INFO: 2020-09-03 14:02:00 INFO: 2020-09-03 14:02:00 INFO: 2020-09-03 14:02:00 INFO: clearing start 2020-09-03 14:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '4bd845c9-c546-ab91-f836-ac60f010b8b8', 'clOrdID': '2e819f56f902451db071caf8b2dd711e', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 266, 'price': None, 'displayQty': None, 'stopPx': 438.85, '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': 266, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 3, 10, 3, 46, 409000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 3, 10, 3, 46, 409000, tzinfo=tzutc())} 2020-09-03 14:02:00 INFO: skip by not found init order into storage 2020-09-03 14:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5809f999-cc2d-6885-511a-838ee46bfc6e', 'clOrdID': '3c06d3e0d8ec4079bf09b3cbb1c58f1f', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 266, 'price': 396.15, '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': 266, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 3, 10, 3, 46, 451000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 3, 10, 3, 46, 451000, tzinfo=tzutc())} 2020-09-03 14:02:00 INFO: skip by not found init order into storage 2020-09-03 14:02:00 INFO: clearing end 2020-09-03 14:02:00 INFO: 2020-09-03 14:02:00 INFO: 2020-09-03 14:02:00 INFO: 2020-09-03 14:02:00 INFO: 2020-09-03 15:00:20 INFO: 2020-09-03 15:00:20 INFO: 2020-09-03 15:00:20 INFO: 2020-09-03 15:00:20 INFO: 2020-09-03 15:00:20 INFO: init new order start 2020-09-03 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 3, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 425.75, 'high': 430.3, 'low': 421.65, 'close': 423.85, 'trades': 10689, 'volume': 8829256, 'vwap': 425.49, 'lastSize': 13, 'turnover': 375673718230, 'homeNotional': 99328.91068642362, 'foreignNotional': 42263533.068666406}, {'timestamp': datetime.datetime(2020, 9, 3, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 431.8, 'high': 433.5, 'low': 422.3, 'close': 425.75, 'trades': 8049, 'volume': 6221387, 'vwap': 427.91, 'lastSize': 332, 'turnover': 266215273040, 'homeNotional': 70291.84933158137, 'foreignNotional': 30078578.16665046}, {'timestamp': datetime.datetime(2020, 9, 3, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 438.25, 'high': 438.85, 'low': 431.75, 'close': 431.8, 'trades': 3970, 'volume': 2731059, 'vwap': 436.28, 'lastSize': 77, 'turnover': 119150143040, 'homeNotional': 31075.191173085066, 'foreignNotional': 13557479.601889651}] 2020-09-03 15:00:20 INFO: prepare candles [CandleItem(low=421.65, high=430.3, open=425.75, close=423.85, color='RED'), CandleItem(low=422.3, high=433.5, open=431.8, close=425.75, color='RED'), CandleItem(low=431.75, high=438.85, open=438.25, close=431.8, color='RED')] 2020-09-03 15:00:20 INFO: skip by colors first_candle=CandleItem(low=431.75, high=438.85, open=438.25, close=431.8, color='RED') second_candle=CandleItem(low=422.3, high=433.5, open=431.8, close=425.75, color='RED') last_candle=CandleItem(low=421.65, high=430.3, open=425.75, close=423.85, color='RED') 2020-09-03 15:00:20 INFO: check need new order None 2020-09-03 15:00:20 INFO: init new order end 2020-09-03 15:00:20 INFO: 2020-09-03 15:00:20 INFO: 2020-09-03 15:00:20 INFO: 2020-09-03 15:00:20 INFO: 2020-09-03 15:02:00 INFO: 2020-09-03 15:02:00 INFO: 2020-09-03 15:02:00 INFO: 2020-09-03 15:02:00 INFO: 2020-09-03 15:02:00 INFO: clearing start 2020-09-03 15:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '4bd845c9-c546-ab91-f836-ac60f010b8b8', 'clOrdID': '2e819f56f902451db071caf8b2dd711e', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 266, 'price': None, 'displayQty': None, 'stopPx': 438.85, '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': 266, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 3, 10, 3, 46, 409000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 3, 10, 3, 46, 409000, tzinfo=tzutc())} 2020-09-03 15:02:00 INFO: skip by not found init order into storage 2020-09-03 15:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5809f999-cc2d-6885-511a-838ee46bfc6e', 'clOrdID': '3c06d3e0d8ec4079bf09b3cbb1c58f1f', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 266, 'price': 396.15, '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': 266, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 3, 10, 3, 46, 451000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 3, 10, 3, 46, 451000, tzinfo=tzutc())} 2020-09-03 15:02:00 INFO: skip by not found init order into storage 2020-09-03 15:02:00 INFO: clearing end 2020-09-03 15:02:00 INFO: 2020-09-03 15:02:00 INFO: 2020-09-03 15:02:00 INFO: 2020-09-03 15:02:00 INFO: 2020-09-03 16:00:20 INFO: 2020-09-03 16:00:20 INFO: 2020-09-03 16:00:20 INFO: 2020-09-03 16:00:20 INFO: 2020-09-03 16:00:20 INFO: init new order start 2020-09-03 16:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 3, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 423.85, 'high': 426.9, 'low': 400.0, 'close': 412.7, 'trades': 27272, 'volume': 31868830, 'vwap': 410.86, 'lastSize': 13, 'turnover': 1309345585345, 'homeNotional': 348406.8354688945, 'foreignNotional': 143170018.45657238}, {'timestamp': datetime.datetime(2020, 9, 3, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 425.75, 'high': 430.3, 'low': 421.65, 'close': 423.85, 'trades': 10689, 'volume': 8829256, 'vwap': 425.49, 'lastSize': 13, 'turnover': 375673718230, 'homeNotional': 99328.91068642362, 'foreignNotional': 42263533.068666406}, {'timestamp': datetime.datetime(2020, 9, 3, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 431.8, 'high': 433.5, 'low': 422.3, 'close': 425.75, 'trades': 8049, 'volume': 6221387, 'vwap': 427.91, 'lastSize': 332, 'turnover': 266215273040, 'homeNotional': 70291.84933158137, 'foreignNotional': 30078578.16665046}] 2020-09-03 16:00:20 INFO: prepare candles [CandleItem(low=400.0, high=426.9, open=423.85, close=412.7, color='RED'), CandleItem(low=421.65, high=430.3, open=425.75, close=423.85, color='RED'), CandleItem(low=422.3, high=433.5, open=431.8, close=425.75, color='RED')] 2020-09-03 16:00:20 INFO: skip by colors first_candle=CandleItem(low=422.3, high=433.5, open=431.8, close=425.75, color='RED') second_candle=CandleItem(low=421.65, high=430.3, open=425.75, close=423.85, color='RED') last_candle=CandleItem(low=400.0, high=426.9, open=423.85, close=412.7, color='RED') 2020-09-03 16:00:20 INFO: check need new order None 2020-09-03 16:00:20 INFO: init new order end 2020-09-03 16:00:20 INFO: 2020-09-03 16:00:20 INFO: 2020-09-03 16:00:20 INFO: 2020-09-03 16:00:20 INFO: 2020-09-03 16:02:00 INFO: 2020-09-03 16:02:00 INFO: 2020-09-03 16:02:00 INFO: 2020-09-03 16:02:00 INFO: 2020-09-03 16:02:00 INFO: clearing start 2020-09-03 16:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '4bd845c9-c546-ab91-f836-ac60f010b8b8', 'clOrdID': '2e819f56f902451db071caf8b2dd711e', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 266, 'price': None, 'displayQty': None, 'stopPx': 438.85, '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': 266, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 3, 10, 3, 46, 409000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 3, 10, 3, 46, 409000, tzinfo=tzutc())} 2020-09-03 16:02:00 INFO: skip by not found init order into storage 2020-09-03 16:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5809f999-cc2d-6885-511a-838ee46bfc6e', 'clOrdID': '3c06d3e0d8ec4079bf09b3cbb1c58f1f', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 266, 'price': 396.15, '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': 266, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 3, 10, 3, 46, 451000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 3, 10, 3, 46, 451000, tzinfo=tzutc())} 2020-09-03 16:02:00 INFO: skip by not found init order into storage 2020-09-03 16:02:00 INFO: clearing end 2020-09-03 16:02:00 INFO: 2020-09-03 16:02:00 INFO: 2020-09-03 16:02:00 INFO: 2020-09-03 16:02:00 INFO: 2020-09-03 17:00:20 INFO: 2020-09-03 17:00:20 INFO: 2020-09-03 17:00:20 INFO: 2020-09-03 17:00:20 INFO: 2020-09-03 17:00:20 INFO: init new order start 2020-09-03 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 3, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 412.7, 'high': 419.2, 'low': 408.0, 'close': 418.8, 'trades': 8893, 'volume': 6598289, 'vwap': 413.16, 'lastSize': 150, 'turnover': 272610027105, 'homeNotional': 71584.6121967311, 'foreignNotional': 29576055.541588295}, {'timestamp': datetime.datetime(2020, 9, 3, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 423.85, 'high': 426.9, 'low': 400.0, 'close': 412.7, 'trades': 27272, 'volume': 31868830, 'vwap': 410.86, 'lastSize': 13, 'turnover': 1309345585345, 'homeNotional': 348406.8354688945, 'foreignNotional': 143170018.45657238}, {'timestamp': datetime.datetime(2020, 9, 3, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 425.75, 'high': 430.3, 'low': 421.65, 'close': 423.85, 'trades': 10689, 'volume': 8829256, 'vwap': 425.49, 'lastSize': 13, 'turnover': 375673718230, 'homeNotional': 99328.91068642362, 'foreignNotional': 42263533.068666406}] 2020-09-03 17:00:20 INFO: prepare candles [CandleItem(low=408.0, high=419.2, open=412.7, close=418.8, color='GREEN'), CandleItem(low=400.0, high=426.9, open=423.85, close=412.7, color='RED'), CandleItem(low=421.65, high=430.3, open=425.75, close=423.85, color='RED')] 2020-09-03 17:00:20 INFO: last_candle=CandleItem(low=408.0, high=419.2, open=412.7, close=418.8, color='GREEN') 2020-09-03 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-03 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=408.0, high=419.2, open=412.7, close=418.8, color='GREEN') 2020-09-03 17:00:20 INFO: skip by CandleItem(low=408.0, high=419.2, open=412.7, close=418.8, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-03 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-03 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=408.0, high=419.2, open=412.7, close=418.8, color='GREEN') 2020-09-03 17:00:20 INFO: skip by CandleItem(low=408.0, high=419.2, open=412.7, close=418.8, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-03 17:00:20 INFO: not found applicable config for candle 2020-09-03 17:00:20 INFO: check need new order None 2020-09-03 17:00:20 INFO: init new order end 2020-09-03 17:00:20 INFO: 2020-09-03 17:00:20 INFO: 2020-09-03 17:00:20 INFO: 2020-09-03 17:00:20 INFO: 2020-09-03 17:02:00 INFO: 2020-09-03 17:02:00 INFO: 2020-09-03 17:02:00 INFO: 2020-09-03 17:02:00 INFO: 2020-09-03 17:02:00 INFO: clearing start 2020-09-03 17:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '4bd845c9-c546-ab91-f836-ac60f010b8b8', 'clOrdID': '2e819f56f902451db071caf8b2dd711e', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 266, 'price': None, 'displayQty': None, 'stopPx': 438.85, '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': 266, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 3, 10, 3, 46, 409000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 3, 10, 3, 46, 409000, tzinfo=tzutc())} 2020-09-03 17:02:00 INFO: skip by not found init order into storage 2020-09-03 17:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5809f999-cc2d-6885-511a-838ee46bfc6e', 'clOrdID': '3c06d3e0d8ec4079bf09b3cbb1c58f1f', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 266, 'price': 396.15, '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': 266, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 3, 10, 3, 46, 451000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 3, 10, 3, 46, 451000, tzinfo=tzutc())} 2020-09-03 17:02:00 INFO: skip by not found init order into storage 2020-09-03 17:02:00 INFO: clearing end 2020-09-03 17:02:00 INFO: 2020-09-03 17:02:00 INFO: 2020-09-03 17:02:00 INFO: 2020-09-03 17:02:00 INFO: 2020-09-03 18:00:20 INFO: 2020-09-03 18:00:20 INFO: 2020-09-03 18:00:20 INFO: 2020-09-03 18:00:20 INFO: 2020-09-03 18:00:20 INFO: init new order start 2020-09-03 18:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 3, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 418.8, 'high': 418.8, 'low': 410.0, 'close': 413.1, 'trades': 8358, 'volume': 7912463, 'vwap': 412.9, 'lastSize': 4060, 'turnover': 326705553405, 'homeNotional': 86010.52889645123, 'foreignNotional': 35514059.45343465}, {'timestamp': datetime.datetime(2020, 9, 3, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 412.7, 'high': 419.2, 'low': 408.0, 'close': 418.8, 'trades': 8893, 'volume': 6598289, 'vwap': 413.16, 'lastSize': 150, 'turnover': 272610027105, 'homeNotional': 71584.6121967311, 'foreignNotional': 29576055.541588295}, {'timestamp': datetime.datetime(2020, 9, 3, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 423.85, 'high': 426.9, 'low': 400.0, 'close': 412.7, 'trades': 27272, 'volume': 31868830, 'vwap': 410.86, 'lastSize': 13, 'turnover': 1309345585345, 'homeNotional': 348406.8354688945, 'foreignNotional': 143170018.45657238}] 2020-09-03 18:00:20 INFO: prepare candles [CandleItem(low=410.0, high=418.8, open=418.8, close=413.1, color='RED'), CandleItem(low=408.0, high=419.2, open=412.7, close=418.8, color='GREEN'), CandleItem(low=400.0, high=426.9, open=423.85, close=412.7, color='RED')] 2020-09-03 18:00:20 INFO: skip by colors first_candle=CandleItem(low=400.0, high=426.9, open=423.85, close=412.7, color='RED') second_candle=CandleItem(low=408.0, high=419.2, open=412.7, close=418.8, color='GREEN') last_candle=CandleItem(low=410.0, high=418.8, open=418.8, close=413.1, color='RED') 2020-09-03 18:00:20 INFO: check need new order None 2020-09-03 18:00:20 INFO: init new order end 2020-09-03 18:00:20 INFO: 2020-09-03 18:00:20 INFO: 2020-09-03 18:00:20 INFO: 2020-09-03 18:00:20 INFO: 2020-09-03 18:02:00 INFO: 2020-09-03 18:02:00 INFO: 2020-09-03 18:02:00 INFO: 2020-09-03 18:02:00 INFO: 2020-09-03 18:02:00 INFO: clearing start 2020-09-03 18:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '4bd845c9-c546-ab91-f836-ac60f010b8b8', 'clOrdID': '2e819f56f902451db071caf8b2dd711e', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 266, 'price': None, 'displayQty': None, 'stopPx': 438.85, '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': 266, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 3, 10, 3, 46, 409000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 3, 10, 3, 46, 409000, tzinfo=tzutc())} 2020-09-03 18:02:00 INFO: skip by not found init order into storage 2020-09-03 18:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5809f999-cc2d-6885-511a-838ee46bfc6e', 'clOrdID': '3c06d3e0d8ec4079bf09b3cbb1c58f1f', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 266, 'price': 396.15, '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': 266, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 3, 10, 3, 46, 451000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 3, 10, 3, 46, 451000, tzinfo=tzutc())} 2020-09-03 18:02:00 INFO: skip by not found init order into storage 2020-09-03 18:02:00 INFO: clearing end 2020-09-03 18:02:00 INFO: 2020-09-03 18:02:00 INFO: 2020-09-03 18:02:00 INFO: 2020-09-03 18:02:00 INFO: 2020-09-03 18:37:21 INFO: process event {'orderID': '5809f999-cc2d-6885-511a-838ee46bfc6e', 'ordStatus': 'Filled', 'workingIndicator': False, 'leavesQty': 0, 'cumQty': 266, 'avgPx': 396.15, 'timestamp': '2020-09-03T15:37:21.617Z', 'clOrdID': '3c06d3e0d8ec4079bf09b3cbb1c58f1f', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-03 18:37:21 INFO: add new event={'uid': '3c06d3e0d8ec4079bf09b3cbb1c58f1f', 'status': 'Filled'} 2020-09-03 18:37:22 INFO: 2020-09-03 18:37:22 INFO: 2020-09-03 18:37:22 INFO: 2020-09-03 18:37:22 INFO: 2020-09-03 18:37:22 INFO: process event start 2020-09-03 18:37:22 INFO: fetch new order event 3c06d3e0d8ec4079bf09b3cbb1c58f1f 2020-09-03 18:37:22 INFO: fetch orders by event init=None profit_pair=2e819f56f902451db071caf8b2dd711e 2020-09-03 18:37:22 INFO: process profit order filled 2020-09-03 18:37:23 INFO: process event {'orderID': '4bd845c9-c546-ab91-f836-ac60f010b8b8', 'ordStatus': 'Canceled', 'leavesQty': 0, 'text': 'Canceled: Cancel order by trader.py\nStop order by trader.py', 'timestamp': '2020-09-03T15:37:23.052Z', 'clOrdID': '2e819f56f902451db071caf8b2dd711e', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-03 18:37:23 INFO: skip event 2e819f56f902451db071caf8b2dd711e Canceled 2020-09-03 18:37:23 INFO: cancel order=2e819f56f902451db071caf8b2dd711e [{'orderID': '4bd845c9-c546-ab91-f836-ac60f010b8b8', 'clOrdID': '2e819f56f902451db071caf8b2dd711e', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 266, 'price': None, 'displayQty': None, 'stopPx': 438.85, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', '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: Cancel order by trader.py\nStop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 3, 10, 3, 46, 409000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 3, 15, 37, 23, 52000, tzinfo=tzutc())}] 2020-09-03 18:37:23 INFO: end process event_processing_result='proceed profit order' 2020-09-03 18:37:23 INFO: 2020-09-03 18:37:23 INFO: 2020-09-03 18:37:23 INFO: 2020-09-03 18:37:23 INFO: 2020-09-03 19:00:20 INFO: 2020-09-03 19:00:20 INFO: 2020-09-03 19:00:20 INFO: 2020-09-03 19:00:20 INFO: 2020-09-03 19:00:20 INFO: init new order start 2020-09-03 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 3, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 413.1, 'high': 413.2, 'low': 392.0, 'close': 403.85, 'trades': 20091, 'volume': 20098887, 'vwap': 402.77, 'lastSize': 45, 'turnover': 809522036585, 'homeNotional': 214553.1219278008, 'foreignNotional': 86422101.94402936}, {'timestamp': datetime.datetime(2020, 9, 3, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 418.8, 'high': 418.8, 'low': 410.0, 'close': 413.1, 'trades': 8358, 'volume': 7912463, 'vwap': 412.9, 'lastSize': 4060, 'turnover': 326705553405, 'homeNotional': 86010.52889645123, 'foreignNotional': 35514059.45343465}, {'timestamp': datetime.datetime(2020, 9, 3, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 412.7, 'high': 419.2, 'low': 408.0, 'close': 418.8, 'trades': 8893, 'volume': 6598289, 'vwap': 413.16, 'lastSize': 150, 'turnover': 272610027105, 'homeNotional': 71584.6121967311, 'foreignNotional': 29576055.541588295}] 2020-09-03 19:00:20 INFO: prepare candles [CandleItem(low=392.0, high=413.2, open=413.1, close=403.85, color='RED'), CandleItem(low=410.0, high=418.8, open=418.8, close=413.1, color='RED'), CandleItem(low=408.0, high=419.2, open=412.7, close=418.8, color='GREEN')] 2020-09-03 19:00:20 INFO: skip by colors first_candle=CandleItem(low=408.0, high=419.2, open=412.7, close=418.8, color='GREEN') second_candle=CandleItem(low=410.0, high=418.8, open=418.8, close=413.1, color='RED') last_candle=CandleItem(low=392.0, high=413.2, open=413.1, close=403.85, color='RED') 2020-09-03 19:00:20 INFO: check need new order None 2020-09-03 19:00:20 INFO: init new order end 2020-09-03 19:00:20 INFO: 2020-09-03 19:00:20 INFO: 2020-09-03 19:00:20 INFO: 2020-09-03 19:00:20 INFO: 2020-09-03 19:02:00 INFO: 2020-09-03 19:02:00 INFO: 2020-09-03 19:02:00 INFO: 2020-09-03 19:02:00 INFO: 2020-09-03 19:02:00 INFO: clearing start 2020-09-03 19:02:00 INFO: clearing end 2020-09-03 19:02:00 INFO: 2020-09-03 19:02:00 INFO: 2020-09-03 19:02:00 INFO: 2020-09-03 19:02:00 INFO: 2020-09-03 20:00:20 INFO: 2020-09-03 20:00:20 INFO: 2020-09-03 20:00:20 INFO: 2020-09-03 20:00:20 INFO: 2020-09-03 20:00:20 INFO: init new order start 2020-09-03 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 3, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 403.85, 'high': 408.45, 'low': 392.0, 'close': 392.2, 'trades': 16633, 'volume': 12809373, 'vwap': 400.38, 'lastSize': 5, 'turnover': 512853237630, 'homeNotional': 136502.4673607579, 'foreignNotional': 54653844.2594385}, {'timestamp': datetime.datetime(2020, 9, 3, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 413.1, 'high': 413.2, 'low': 392.0, 'close': 403.85, 'trades': 20091, 'volume': 20098887, 'vwap': 402.77, 'lastSize': 45, 'turnover': 809522036585, 'homeNotional': 214553.1219278008, 'foreignNotional': 86422101.94402936}, {'timestamp': datetime.datetime(2020, 9, 3, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 418.8, 'high': 418.8, 'low': 410.0, 'close': 413.1, 'trades': 8358, 'volume': 7912463, 'vwap': 412.9, 'lastSize': 4060, 'turnover': 326705553405, 'homeNotional': 86010.52889645123, 'foreignNotional': 35514059.45343465}] 2020-09-03 20:00:20 INFO: prepare candles [CandleItem(low=392.0, high=408.45, open=403.85, close=392.2, color='RED'), CandleItem(low=392.0, high=413.2, open=413.1, close=403.85, color='RED'), CandleItem(low=410.0, high=418.8, open=418.8, close=413.1, color='RED')] 2020-09-03 20:00:20 INFO: skip by colors first_candle=CandleItem(low=410.0, high=418.8, open=418.8, close=413.1, color='RED') second_candle=CandleItem(low=392.0, high=413.2, open=413.1, close=403.85, color='RED') last_candle=CandleItem(low=392.0, high=408.45, open=403.85, close=392.2, color='RED') 2020-09-03 20:00:20 INFO: check need new order None 2020-09-03 20:00:20 INFO: init new order end 2020-09-03 20:00:20 INFO: 2020-09-03 20:00:20 INFO: 2020-09-03 20:00:20 INFO: 2020-09-03 20:00:20 INFO: 2020-09-03 20:02:00 INFO: 2020-09-03 20:02:00 INFO: 2020-09-03 20:02:00 INFO: 2020-09-03 20:02:00 INFO: 2020-09-03 20:02:00 INFO: clearing start 2020-09-03 20:02:00 INFO: clearing end 2020-09-03 20:02:00 INFO: 2020-09-03 20:02:00 INFO: 2020-09-03 20:02:00 INFO: 2020-09-03 20:02:00 INFO: 2020-09-03 21:00:20 INFO: 2020-09-03 21:00:20 INFO: 2020-09-03 21:00:20 INFO: 2020-09-03 21:00:20 INFO: 2020-09-03 21:00:20 INFO: init new order start 2020-09-03 21:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 3, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.2, 'high': 406.6, 'low': 392.1, 'close': 400.6, 'trades': 13190, 'volume': 9912800, 'vwap': 400.56, 'lastSize': 692, 'turnover': 397060271395, 'homeNotional': 105883.09508865813, 'foreignNotional': 42414153.01277071}, {'timestamp': datetime.datetime(2020, 9, 3, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 403.85, 'high': 408.45, 'low': 392.0, 'close': 392.2, 'trades': 16633, 'volume': 12809373, 'vwap': 400.38, 'lastSize': 5, 'turnover': 512853237630, 'homeNotional': 136502.4673607579, 'foreignNotional': 54653844.2594385}, {'timestamp': datetime.datetime(2020, 9, 3, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 413.1, 'high': 413.2, 'low': 392.0, 'close': 403.85, 'trades': 20091, 'volume': 20098887, 'vwap': 402.77, 'lastSize': 45, 'turnover': 809522036585, 'homeNotional': 214553.1219278008, 'foreignNotional': 86422101.94402936}] 2020-09-03 21:00:21 INFO: prepare candles [CandleItem(low=392.1, high=406.6, open=392.2, close=400.6, color='GREEN'), CandleItem(low=392.0, high=408.45, open=403.85, close=392.2, color='RED'), CandleItem(low=392.0, high=413.2, open=413.1, close=403.85, color='RED')] 2020-09-03 21:00:21 INFO: last_candle=CandleItem(low=392.1, high=406.6, open=392.2, close=400.6, color='GREEN') 2020-09-03 21: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-03 21: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=392.1, high=406.6, open=392.2, close=400.6, color='GREEN') 2020-09-03 21:00:21 INFO: skip by CandleItem(low=392.1, high=406.6, open=392.2, close=400.6, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-03 21: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-03 21: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=392.1, high=406.6, open=392.2, close=400.6, color='GREEN') 2020-09-03 21:00:21 INFO: skip by CandleItem(low=392.1, high=406.6, open=392.2, close=400.6, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-03 21:00:21 INFO: not found applicable config for candle 2020-09-03 21:00:21 INFO: check need new order None 2020-09-03 21:00:21 INFO: init new order end 2020-09-03 21:00:21 INFO: 2020-09-03 21:00:21 INFO: 2020-09-03 21:00:21 INFO: 2020-09-03 21:00:21 INFO: 2020-09-03 21:02:00 INFO: 2020-09-03 21:02:00 INFO: 2020-09-03 21:02:00 INFO: 2020-09-03 21:02:00 INFO: 2020-09-03 21:02:00 INFO: clearing start 2020-09-03 21:02:00 INFO: clearing end 2020-09-03 21:02:00 INFO: 2020-09-03 21:02:00 INFO: 2020-09-03 21:02:00 INFO: 2020-09-03 21:02:00 INFO: 2020-09-03 22:00:20 INFO: 2020-09-03 22:00:20 INFO: 2020-09-03 22:00:20 INFO: 2020-09-03 22:00:20 INFO: 2020-09-03 22:00:20 INFO: init new order start 2020-09-03 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 3, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 400.6, 'high': 403.65, 'low': 394.2, 'close': 399.15, 'trades': 7993, 'volume': 5043313, 'vwap': 399.62, 'lastSize': 100, 'turnover': 201540226850, 'homeNotional': 53942.248734076245, 'foreignNotional': 21556574.714642107}, {'timestamp': datetime.datetime(2020, 9, 3, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.2, 'high': 406.6, 'low': 392.1, 'close': 400.6, 'trades': 13190, 'volume': 9912800, 'vwap': 400.56, 'lastSize': 692, 'turnover': 397060271395, 'homeNotional': 105883.09508865813, 'foreignNotional': 42414153.01277071}, {'timestamp': datetime.datetime(2020, 9, 3, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 403.85, 'high': 408.45, 'low': 392.0, 'close': 392.2, 'trades': 16633, 'volume': 12809373, 'vwap': 400.38, 'lastSize': 5, 'turnover': 512853237630, 'homeNotional': 136502.4673607579, 'foreignNotional': 54653844.2594385}] 2020-09-03 22:00:20 INFO: prepare candles [CandleItem(low=394.2, high=403.65, open=400.6, close=399.15, color='RED'), CandleItem(low=392.1, high=406.6, open=392.2, close=400.6, color='GREEN'), CandleItem(low=392.0, high=408.45, open=403.85, close=392.2, color='RED')] 2020-09-03 22:00:20 INFO: skip by colors first_candle=CandleItem(low=392.0, high=408.45, open=403.85, close=392.2, color='RED') second_candle=CandleItem(low=392.1, high=406.6, open=392.2, close=400.6, color='GREEN') last_candle=CandleItem(low=394.2, high=403.65, open=400.6, close=399.15, color='RED') 2020-09-03 22:00:20 INFO: check need new order None 2020-09-03 22:00:20 INFO: init new order end 2020-09-03 22:00:20 INFO: 2020-09-03 22:00:20 INFO: 2020-09-03 22:00:20 INFO: 2020-09-03 22:00:20 INFO: 2020-09-03 22:02:00 INFO: 2020-09-03 22:02:00 INFO: 2020-09-03 22:02:00 INFO: 2020-09-03 22:02:00 INFO: 2020-09-03 22:02:00 INFO: clearing start 2020-09-03 22:02:00 INFO: clearing end 2020-09-03 22:02:00 INFO: 2020-09-03 22:02:00 INFO: 2020-09-03 22:02:00 INFO: 2020-09-03 22:02:00 INFO: 2020-09-03 23:00:20 INFO: 2020-09-03 23:00:20 INFO: 2020-09-03 23:00:20 INFO: 2020-09-03 23:00:20 INFO: 2020-09-03 23:00:20 INFO: init new order start 2020-09-03 23:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 3, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 399.15, 'high': 405.25, 'low': 395.95, 'close': 402.2, 'trades': 5679, 'volume': 4169928, 'vwap': 400.91, 'lastSize': 7, 'turnover': 167176289735, 'homeNotional': 44487.976852225795, 'foreignNotional': 17835905.75326052}, {'timestamp': datetime.datetime(2020, 9, 3, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 400.6, 'high': 403.65, 'low': 394.2, 'close': 399.15, 'trades': 7993, 'volume': 5043313, 'vwap': 399.62, 'lastSize': 100, 'turnover': 201540226850, 'homeNotional': 53942.248734076245, 'foreignNotional': 21556574.714642107}, {'timestamp': datetime.datetime(2020, 9, 3, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.2, 'high': 406.6, 'low': 392.1, 'close': 400.6, 'trades': 13190, 'volume': 9912800, 'vwap': 400.56, 'lastSize': 692, 'turnover': 397060271395, 'homeNotional': 105883.09508865813, 'foreignNotional': 42414153.01277071}] 2020-09-03 23:00:20 INFO: prepare candles [CandleItem(low=395.95, high=405.25, open=399.15, close=402.2, color='GREEN'), CandleItem(low=394.2, high=403.65, open=400.6, close=399.15, color='RED'), CandleItem(low=392.1, high=406.6, open=392.2, close=400.6, color='GREEN')] 2020-09-03 23:00:20 INFO: skip by colors first_candle=CandleItem(low=392.1, high=406.6, open=392.2, close=400.6, color='GREEN') second_candle=CandleItem(low=394.2, high=403.65, open=400.6, close=399.15, color='RED') last_candle=CandleItem(low=395.95, high=405.25, open=399.15, close=402.2, color='GREEN') 2020-09-03 23:00:20 INFO: check need new order None 2020-09-03 23:00:20 INFO: init new order end 2020-09-03 23:00:20 INFO: 2020-09-03 23:00:20 INFO: 2020-09-03 23:00:20 INFO: 2020-09-03 23:00:20 INFO: 2020-09-03 23:02:00 INFO: 2020-09-03 23:02:00 INFO: 2020-09-03 23:02:00 INFO: 2020-09-03 23:02:00 INFO: 2020-09-03 23:02:00 INFO: clearing start 2020-09-03 23:02:00 INFO: clearing end 2020-09-03 23:02:00 INFO: 2020-09-03 23:02:00 INFO: 2020-09-03 23:02:00 INFO: 2020-09-03 23:02:00 INFO: 2020-09-04 00:00:20 INFO: 2020-09-04 00:00:20 INFO: 2020-09-04 00:00:20 INFO: 2020-09-04 00:00:20 INFO: 2020-09-04 00:00:20 INFO: init new order start 2020-09-04 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 3, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 402.2, 'high': 408.45, 'low': 401.55, 'close': 406.3, 'trades': 5476, 'volume': 3899710, 'vwap': 405.96, 'lastSize': 27, 'turnover': 158310761160, 'homeNotional': 41885.29629327372, 'foreignNotional': 17003648.40830543}, {'timestamp': datetime.datetime(2020, 9, 3, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 399.15, 'high': 405.25, 'low': 395.95, 'close': 402.2, 'trades': 5679, 'volume': 4169928, 'vwap': 400.91, 'lastSize': 7, 'turnover': 167176289735, 'homeNotional': 44487.976852225795, 'foreignNotional': 17835905.75326052}, {'timestamp': datetime.datetime(2020, 9, 3, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 400.6, 'high': 403.65, 'low': 394.2, 'close': 399.15, 'trades': 7993, 'volume': 5043313, 'vwap': 399.62, 'lastSize': 100, 'turnover': 201540226850, 'homeNotional': 53942.248734076245, 'foreignNotional': 21556574.714642107}] 2020-09-04 00:00:20 INFO: prepare candles [CandleItem(low=401.55, high=408.45, open=402.2, close=406.3, color='GREEN'), CandleItem(low=395.95, high=405.25, open=399.15, close=402.2, color='GREEN'), CandleItem(low=394.2, high=403.65, open=400.6, close=399.15, color='RED')] 2020-09-04 00:00:20 INFO: skip by colors first_candle=CandleItem(low=394.2, high=403.65, open=400.6, close=399.15, color='RED') second_candle=CandleItem(low=395.95, high=405.25, open=399.15, close=402.2, color='GREEN') last_candle=CandleItem(low=401.55, high=408.45, open=402.2, close=406.3, color='GREEN') 2020-09-04 00:00:20 INFO: check need new order None 2020-09-04 00:00:20 INFO: init new order end 2020-09-04 00:00:20 INFO: 2020-09-04 00:00:20 INFO: 2020-09-04 00:00:20 INFO: 2020-09-04 00:00:20 INFO: 2020-09-04 00:02:00 INFO: 2020-09-04 00:02:00 INFO: 2020-09-04 00:02:00 INFO: 2020-09-04 00:02:00 INFO: 2020-09-04 00:02:00 INFO: clearing start 2020-09-04 00:02:00 INFO: clearing end 2020-09-04 00:02:00 INFO: 2020-09-04 00:02:00 INFO: 2020-09-04 00:02:00 INFO: 2020-09-04 00:02:00 INFO: 2020-09-04 00:21:53 INFO: Websocket Closed 2020-09-04 00:21:54 WARNING: reconnect to socket 2020-09-04 00:21:54 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-09-04 00:21:54 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-09-04 00:21:54 INFO: Authenticating with API Key. 2020-09-04 00:21:55 INFO: Connected to WS. 2020-09-04 00:40:01 ERROR: Error : Connection is already closed. 2020-09-04 00:40:01 ERROR: error from callback >: Connection is already closed. 2020-09-04 00:40:01 INFO: Websocket Closed 2020-09-04 00:40:01 WARNING: reconnect to socket 2020-09-04 00:40:01 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-09-04 00:40:01 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-09-04 00:40:01 INFO: Authenticating with API Key. 2020-09-04 00:40:02 INFO: Connected to WS. 2020-09-04 01:00:20 INFO: 2020-09-04 01:00:20 INFO: 2020-09-04 01:00:20 INFO: 2020-09-04 01:00:20 INFO: 2020-09-04 01:00:20 INFO: init new order start 2020-09-04 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 3, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 406.3, 'high': 407.4, 'low': 399.15, 'close': 402.85, 'trades': 4475, 'volume': 3035739, 'vwap': 402.62, 'lastSize': 2, 'turnover': 122223066470, 'homeNotional': 32599.63420760408, 'foreignNotional': 13125199.31251671}, {'timestamp': datetime.datetime(2020, 9, 3, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 402.2, 'high': 408.45, 'low': 401.55, 'close': 406.3, 'trades': 5476, 'volume': 3899710, 'vwap': 405.96, 'lastSize': 27, 'turnover': 158310761160, 'homeNotional': 41885.29629327372, 'foreignNotional': 17003648.40830543}, {'timestamp': datetime.datetime(2020, 9, 3, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 399.15, 'high': 405.25, 'low': 395.95, 'close': 402.2, 'trades': 5679, 'volume': 4169928, 'vwap': 400.91, 'lastSize': 7, 'turnover': 167176289735, 'homeNotional': 44487.976852225795, 'foreignNotional': 17835905.75326052}] 2020-09-04 01:00:20 INFO: prepare candles [CandleItem(low=399.15, high=407.4, open=406.3, close=402.85, color='RED'), CandleItem(low=401.55, high=408.45, open=402.2, close=406.3, color='GREEN'), CandleItem(low=395.95, high=405.25, open=399.15, close=402.2, color='GREEN')] 2020-09-04 01:00:20 INFO: last_candle=CandleItem(low=399.15, high=407.4, open=406.3, close=402.85, color='RED') 2020-09-04 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-04 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=399.15, high=407.4, open=406.3, close=402.85, color='RED') 2020-09-04 01:00:20 INFO: skip by CandleItem(low=399.15, high=407.4, open=406.3, close=402.85, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-04 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-04 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=399.15, high=407.4, open=406.3, close=402.85, color='RED') 2020-09-04 01:00:20 INFO: skip by CandleItem(low=399.15, high=407.4, open=406.3, close=402.85, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-04 01:00:20 INFO: not found applicable config for candle 2020-09-04 01:00:20 INFO: check need new order None 2020-09-04 01:00:20 INFO: init new order end 2020-09-04 01:00:20 INFO: 2020-09-04 01:00:20 INFO: 2020-09-04 01:00:20 INFO: 2020-09-04 01:00:20 INFO: 2020-09-04 01:02:00 INFO: 2020-09-04 01:02:00 INFO: 2020-09-04 01:02:00 INFO: 2020-09-04 01:02:00 INFO: 2020-09-04 01:02:00 INFO: clearing start 2020-09-04 01:02:00 INFO: clearing end 2020-09-04 01:02:00 INFO: 2020-09-04 01:02:00 INFO: 2020-09-04 01:02:00 INFO: 2020-09-04 01:02:00 INFO: 2020-09-04 02:00:20 INFO: 2020-09-04 02:00:20 INFO: 2020-09-04 02:00:20 INFO: 2020-09-04 02:00:20 INFO: 2020-09-04 02:00:20 INFO: init new order start 2020-09-04 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 3, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 402.85, 'high': 404.3, 'low': 395.3, 'close': 396.95, 'trades': 5464, 'volume': 3281200, 'vwap': 398.98, 'lastSize': 6, 'turnover': 130910374010, 'homeNotional': 35099.510671416996, 'foreignNotional': 14003878.295148004}, {'timestamp': datetime.datetime(2020, 9, 3, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 406.3, 'high': 407.4, 'low': 399.15, 'close': 402.85, 'trades': 4475, 'volume': 3035739, 'vwap': 402.62, 'lastSize': 2, 'turnover': 122223066470, 'homeNotional': 32599.63420760408, 'foreignNotional': 13125199.31251671}, {'timestamp': datetime.datetime(2020, 9, 3, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 402.2, 'high': 408.45, 'low': 401.55, 'close': 406.3, 'trades': 5476, 'volume': 3899710, 'vwap': 405.96, 'lastSize': 27, 'turnover': 158310761160, 'homeNotional': 41885.29629327372, 'foreignNotional': 17003648.40830543}] 2020-09-04 02:00:20 INFO: prepare candles [CandleItem(low=395.3, high=404.3, open=402.85, close=396.95, color='RED'), CandleItem(low=399.15, high=407.4, open=406.3, close=402.85, color='RED'), CandleItem(low=401.55, high=408.45, open=402.2, close=406.3, color='GREEN')] 2020-09-04 02:00:20 INFO: skip by colors first_candle=CandleItem(low=401.55, high=408.45, open=402.2, close=406.3, color='GREEN') second_candle=CandleItem(low=399.15, high=407.4, open=406.3, close=402.85, color='RED') last_candle=CandleItem(low=395.3, high=404.3, open=402.85, close=396.95, color='RED') 2020-09-04 02:00:20 INFO: check need new order None 2020-09-04 02:00:20 INFO: init new order end 2020-09-04 02:00:20 INFO: 2020-09-04 02:00:20 INFO: 2020-09-04 02:00:20 INFO: 2020-09-04 02:00:20 INFO: 2020-09-04 02:02:00 INFO: 2020-09-04 02:02:00 INFO: 2020-09-04 02:02:00 INFO: 2020-09-04 02:02:00 INFO: 2020-09-04 02:02:00 INFO: clearing start 2020-09-04 02:02:00 INFO: clearing end 2020-09-04 02:02:00 INFO: 2020-09-04 02:02:00 INFO: 2020-09-04 02:02:00 INFO: 2020-09-04 02:02:00 INFO: 2020-09-04 02:41:58 ERROR: Error : Connection is already closed. 2020-09-04 02:41:58 ERROR: error from callback >: Connection is already closed. 2020-09-04 02:41:58 INFO: Websocket Closed 2020-09-04 02:41:58 WARNING: reconnect to socket 2020-09-04 02:41:58 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-09-04 02:41:58 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-09-04 02:41:58 INFO: Authenticating with API Key. 2020-09-04 02:41:59 INFO: Connected to WS. 2020-09-04 03:00:20 INFO: 2020-09-04 03:00:20 INFO: 2020-09-04 03:00:20 INFO: 2020-09-04 03:00:20 INFO: 2020-09-04 03:00:20 INFO: init new order start 2020-09-04 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 4, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 396.95, 'high': 396.85, 'low': 370.0, 'close': 381.6, 'trades': 23919, 'volume': 27898027, 'vwap': 382.79, 'lastSize': 365, 'turnover': 1067886798875, 'homeNotional': 287730.6450574113, 'foreignNotional': 110168362.75253321}, {'timestamp': datetime.datetime(2020, 9, 3, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 402.85, 'high': 404.3, 'low': 395.3, 'close': 396.95, 'trades': 5464, 'volume': 3281200, 'vwap': 398.98, 'lastSize': 6, 'turnover': 130910374010, 'homeNotional': 35099.510671416996, 'foreignNotional': 14003878.295148004}, {'timestamp': datetime.datetime(2020, 9, 3, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 406.3, 'high': 407.4, 'low': 399.15, 'close': 402.85, 'trades': 4475, 'volume': 3035739, 'vwap': 402.62, 'lastSize': 2, 'turnover': 122223066470, 'homeNotional': 32599.63420760408, 'foreignNotional': 13125199.31251671}] 2020-09-04 03:00:20 INFO: prepare candles [CandleItem(low=370.0, high=396.85, open=396.95, close=381.6, color='RED'), CandleItem(low=395.3, high=404.3, open=402.85, close=396.95, color='RED'), CandleItem(low=399.15, high=407.4, open=406.3, close=402.85, color='RED')] 2020-09-04 03:00:20 INFO: skip by colors first_candle=CandleItem(low=399.15, high=407.4, open=406.3, close=402.85, color='RED') second_candle=CandleItem(low=395.3, high=404.3, open=402.85, close=396.95, color='RED') last_candle=CandleItem(low=370.0, high=396.85, open=396.95, close=381.6, color='RED') 2020-09-04 03:00:20 INFO: check need new order None 2020-09-04 03:00:20 INFO: init new order end 2020-09-04 03:00:20 INFO: 2020-09-04 03:00:20 INFO: 2020-09-04 03:00:20 INFO: 2020-09-04 03:00:20 INFO: 2020-09-04 03:02:00 INFO: 2020-09-04 03:02:00 INFO: 2020-09-04 03:02:00 INFO: 2020-09-04 03:02:00 INFO: 2020-09-04 03:02:00 INFO: clearing start 2020-09-04 03:02:00 INFO: clearing end 2020-09-04 03:02:00 INFO: 2020-09-04 03:02:00 INFO: 2020-09-04 03:02:00 INFO: 2020-09-04 03:02:00 INFO: 2020-09-04 04:00:20 INFO: 2020-09-04 04:00:20 INFO: 2020-09-04 04:00:20 INFO: 2020-09-04 04:00:20 INFO: 2020-09-04 04:00:20 INFO: init new order start 2020-09-04 04:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 4, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 381.6, 'high': 391.7, 'low': 373.8, 'close': 389.2, 'trades': 12413, 'volume': 11933791, 'vwap': 384.79, 'lastSize': 24, 'turnover': 459193328040, 'homeNotional': 122476.16254605874, 'foreignNotional': 47130374.26868136}, {'timestamp': datetime.datetime(2020, 9, 4, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 396.95, 'high': 396.85, 'low': 370.0, 'close': 381.6, 'trades': 23919, 'volume': 27898027, 'vwap': 382.79, 'lastSize': 365, 'turnover': 1067886798875, 'homeNotional': 287730.6450574113, 'foreignNotional': 110168362.75253321}, {'timestamp': datetime.datetime(2020, 9, 3, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 402.85, 'high': 404.3, 'low': 395.3, 'close': 396.95, 'trades': 5464, 'volume': 3281200, 'vwap': 398.98, 'lastSize': 6, 'turnover': 130910374010, 'homeNotional': 35099.510671416996, 'foreignNotional': 14003878.295148004}] 2020-09-04 04:00:20 INFO: prepare candles [CandleItem(low=373.8, high=391.7, open=381.6, close=389.2, color='GREEN'), CandleItem(low=370.0, high=396.85, open=396.95, close=381.6, color='RED'), CandleItem(low=395.3, high=404.3, open=402.85, close=396.95, color='RED')] 2020-09-04 04:00:20 INFO: last_candle=CandleItem(low=373.8, high=391.7, open=381.6, close=389.2, color='GREEN') 2020-09-04 04:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-09-04 04:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=373.8, high=391.7, open=381.6, close=389.2, color='GREEN') 2020-09-04 04:00:20 INFO: skip by CandleItem(low=373.8, high=391.7, open=381.6, close=389.2, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-04 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-04 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=373.8, high=391.7, open=381.6, close=389.2, color='GREEN') 2020-09-04 04:00:20 INFO: skip by CandleItem(low=373.8, high=391.7, open=381.6, close=389.2, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-04 04:00:20 INFO: not found applicable config for candle 2020-09-04 04:00:20 INFO: check need new order None 2020-09-04 04:00:20 INFO: init new order end 2020-09-04 04:00:20 INFO: 2020-09-04 04:00:20 INFO: 2020-09-04 04:00:20 INFO: 2020-09-04 04:00:20 INFO: 2020-09-04 04:02:00 INFO: 2020-09-04 04:02:00 INFO: 2020-09-04 04:02:00 INFO: 2020-09-04 04:02:00 INFO: 2020-09-04 04:02:00 INFO: clearing start 2020-09-04 04:02:00 INFO: clearing end 2020-09-04 04:02:00 INFO: 2020-09-04 04:02:00 INFO: 2020-09-04 04:02:00 INFO: 2020-09-04 04:02:00 INFO: 2020-09-04 05:00:20 INFO: 2020-09-04 05:00:20 INFO: 2020-09-04 05:00:20 INFO: 2020-09-04 05:00:20 INFO: 2020-09-04 05:00:20 INFO: init new order start 2020-09-04 05:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 4, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.2, 'high': 390.85, 'low': 385.35, 'close': 388.15, 'trades': 4729, 'volume': 3860449, 'vwap': 388.7, 'lastSize': 9906, 'turnover': 150052016735, 'homeNotional': 39721.15294134488, 'foreignNotional': 15439290.668317879}, {'timestamp': datetime.datetime(2020, 9, 4, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 381.6, 'high': 391.7, 'low': 373.8, 'close': 389.2, 'trades': 12413, 'volume': 11933791, 'vwap': 384.79, 'lastSize': 24, 'turnover': 459193328040, 'homeNotional': 122476.16254605874, 'foreignNotional': 47130374.26868136}, {'timestamp': datetime.datetime(2020, 9, 4, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 396.95, 'high': 396.85, 'low': 370.0, 'close': 381.6, 'trades': 23919, 'volume': 27898027, 'vwap': 382.79, 'lastSize': 365, 'turnover': 1067886798875, 'homeNotional': 287730.6450574113, 'foreignNotional': 110168362.75253321}] 2020-09-04 05:00:21 INFO: prepare candles [CandleItem(low=385.35, high=390.85, open=389.2, close=388.15, color='RED'), CandleItem(low=373.8, high=391.7, open=381.6, close=389.2, color='GREEN'), CandleItem(low=370.0, high=396.85, open=396.95, close=381.6, color='RED')] 2020-09-04 05:00:21 INFO: skip by colors first_candle=CandleItem(low=370.0, high=396.85, open=396.95, close=381.6, color='RED') second_candle=CandleItem(low=373.8, high=391.7, open=381.6, close=389.2, color='GREEN') last_candle=CandleItem(low=385.35, high=390.85, open=389.2, close=388.15, color='RED') 2020-09-04 05:00:21 INFO: check need new order None 2020-09-04 05:00:21 INFO: init new order end 2020-09-04 05:00:21 INFO: 2020-09-04 05:00:21 INFO: 2020-09-04 05:00:21 INFO: 2020-09-04 05:00:21 INFO: 2020-09-04 05:02:00 INFO: 2020-09-04 05:02:00 INFO: 2020-09-04 05:02:00 INFO: 2020-09-04 05:02:00 INFO: 2020-09-04 05:02:00 INFO: clearing start 2020-09-04 05:02:00 INFO: clearing end 2020-09-04 05:02:00 INFO: 2020-09-04 05:02:00 INFO: 2020-09-04 05:02:00 INFO: 2020-09-04 05:02:00 INFO: 2020-09-04 06:00:20 INFO: 2020-09-04 06:00:20 INFO: 2020-09-04 06:00:20 INFO: 2020-09-04 06:00:20 INFO: 2020-09-04 06:00:20 INFO: init new order start 2020-09-04 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 4, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.15, 'high': 389.25, 'low': 381.1, 'close': 387.65, 'trades': 6619, 'volume': 6176678, 'vwap': 385.02, 'lastSize': 400, 'turnover': 237811991730, 'homeNotional': 63202.34012114034, 'foreignNotional': 24334152.079225555}, {'timestamp': datetime.datetime(2020, 9, 4, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.2, 'high': 390.85, 'low': 385.35, 'close': 388.15, 'trades': 4729, 'volume': 3860449, 'vwap': 388.7, 'lastSize': 9906, 'turnover': 150052016735, 'homeNotional': 39721.15294134488, 'foreignNotional': 15439290.668317879}, {'timestamp': datetime.datetime(2020, 9, 4, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 381.6, 'high': 391.7, 'low': 373.8, 'close': 389.2, 'trades': 12413, 'volume': 11933791, 'vwap': 384.79, 'lastSize': 24, 'turnover': 459193328040, 'homeNotional': 122476.16254605874, 'foreignNotional': 47130374.26868136}] 2020-09-04 06:00:20 INFO: prepare candles [CandleItem(low=381.1, high=389.25, open=388.15, close=387.65, color='RED'), CandleItem(low=385.35, high=390.85, open=389.2, close=388.15, color='RED'), CandleItem(low=373.8, high=391.7, open=381.6, close=389.2, color='GREEN')] 2020-09-04 06:00:20 INFO: skip by colors first_candle=CandleItem(low=373.8, high=391.7, open=381.6, close=389.2, color='GREEN') second_candle=CandleItem(low=385.35, high=390.85, open=389.2, close=388.15, color='RED') last_candle=CandleItem(low=381.1, high=389.25, open=388.15, close=387.65, color='RED') 2020-09-04 06:00:20 INFO: check need new order None 2020-09-04 06:00:20 INFO: init new order end 2020-09-04 06:00:20 INFO: 2020-09-04 06:00:20 INFO: 2020-09-04 06:00:20 INFO: 2020-09-04 06:00:20 INFO: 2020-09-04 06:02:00 INFO: 2020-09-04 06:02:00 INFO: 2020-09-04 06:02:00 INFO: 2020-09-04 06:02:00 INFO: 2020-09-04 06:02:00 INFO: clearing start 2020-09-04 06:02:00 INFO: clearing end 2020-09-04 06:02:00 INFO: 2020-09-04 06:02:00 INFO: 2020-09-04 06:02:00 INFO: 2020-09-04 06:02:00 INFO: 2020-09-04 07:00:20 INFO: 2020-09-04 07:00:20 INFO: 2020-09-04 07:00:20 INFO: 2020-09-04 07:00:20 INFO: 2020-09-04 07:00:20 INFO: init new order start 2020-09-04 07:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 4, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.65, 'high': 389.15, 'low': 383.5, 'close': 383.85, 'trades': 2953, 'volume': 2159944, 'vwap': 386.8, 'lastSize': 211, 'turnover': 83546342165, 'homeNotional': 22197.092816293018, 'foreignNotional': 8585820.717160596}, {'timestamp': datetime.datetime(2020, 9, 4, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.15, 'high': 389.25, 'low': 381.1, 'close': 387.65, 'trades': 6619, 'volume': 6176678, 'vwap': 385.02, 'lastSize': 400, 'turnover': 237811991730, 'homeNotional': 63202.34012114034, 'foreignNotional': 24334152.079225555}, {'timestamp': datetime.datetime(2020, 9, 4, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.2, 'high': 390.85, 'low': 385.35, 'close': 388.15, 'trades': 4729, 'volume': 3860449, 'vwap': 388.7, 'lastSize': 9906, 'turnover': 150052016735, 'homeNotional': 39721.15294134488, 'foreignNotional': 15439290.668317879}] 2020-09-04 07:00:21 INFO: prepare candles [CandleItem(low=383.5, high=389.15, open=387.65, close=383.85, color='RED'), CandleItem(low=381.1, high=389.25, open=388.15, close=387.65, color='RED'), CandleItem(low=385.35, high=390.85, open=389.2, close=388.15, color='RED')] 2020-09-04 07:00:21 INFO: skip by colors first_candle=CandleItem(low=385.35, high=390.85, open=389.2, close=388.15, color='RED') second_candle=CandleItem(low=381.1, high=389.25, open=388.15, close=387.65, color='RED') last_candle=CandleItem(low=383.5, high=389.15, open=387.65, close=383.85, color='RED') 2020-09-04 07:00:21 INFO: check need new order None 2020-09-04 07:00:21 INFO: init new order end 2020-09-04 07:00:21 INFO: 2020-09-04 07:00:21 INFO: 2020-09-04 07:00:21 INFO: 2020-09-04 07:00:21 INFO: 2020-09-04 07:02:00 INFO: 2020-09-04 07:02:00 INFO: 2020-09-04 07:02:00 INFO: 2020-09-04 07:02:00 INFO: 2020-09-04 07:02:00 INFO: clearing start 2020-09-04 07:02:00 INFO: clearing end 2020-09-04 07:02:00 INFO: 2020-09-04 07:02:00 INFO: 2020-09-04 07:02:00 INFO: 2020-09-04 07:02:00 INFO: 2020-09-04 08:00:20 INFO: 2020-09-04 08:00:20 INFO: 2020-09-04 08:00:20 INFO: 2020-09-04 08:00:20 INFO: 2020-09-04 08:00:20 INFO: init new order start 2020-09-04 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 4, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.85, 'high': 389.45, 'low': 383.8, 'close': 388.0, 'trades': 4351, 'volume': 3932223, 'vwap': 386.74, 'lastSize': 800, 'turnover': 152074241345, 'homeNotional': 40441.53483646227, 'foreignNotional': 15640437.201469805}, {'timestamp': datetime.datetime(2020, 9, 4, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.65, 'high': 389.15, 'low': 383.5, 'close': 383.85, 'trades': 2953, 'volume': 2159944, 'vwap': 386.8, 'lastSize': 211, 'turnover': 83546342165, 'homeNotional': 22197.092816293018, 'foreignNotional': 8585820.717160596}, {'timestamp': datetime.datetime(2020, 9, 4, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.15, 'high': 389.25, 'low': 381.1, 'close': 387.65, 'trades': 6619, 'volume': 6176678, 'vwap': 385.02, 'lastSize': 400, 'turnover': 237811991730, 'homeNotional': 63202.34012114034, 'foreignNotional': 24334152.079225555}] 2020-09-04 08:00:20 INFO: prepare candles [CandleItem(low=383.8, high=389.45, open=383.85, close=388.0, color='GREEN'), CandleItem(low=383.5, high=389.15, open=387.65, close=383.85, color='RED'), CandleItem(low=381.1, high=389.25, open=388.15, close=387.65, color='RED')] 2020-09-04 08:00:20 INFO: last_candle=CandleItem(low=383.8, high=389.45, open=383.85, close=388.0, color='GREEN') 2020-09-04 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-04 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=383.8, high=389.45, open=383.85, close=388.0, color='GREEN') 2020-09-04 08:00:20 INFO: skip by CandleItem(low=383.8, high=389.45, open=383.85, close=388.0, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-04 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-04 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=383.8, high=389.45, open=383.85, close=388.0, color='GREEN') 2020-09-04 08:00:20 INFO: skip by CandleItem(low=383.8, high=389.45, open=383.85, close=388.0, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-04 08:00:20 INFO: not found applicable config for candle 2020-09-04 08:00:20 INFO: check need new order None 2020-09-04 08:00:20 INFO: init new order end 2020-09-04 08:00:20 INFO: 2020-09-04 08:00:20 INFO: 2020-09-04 08:00:20 INFO: 2020-09-04 08:00:20 INFO: 2020-09-04 08:02:00 INFO: 2020-09-04 08:02:00 INFO: 2020-09-04 08:02:00 INFO: 2020-09-04 08:02:00 INFO: 2020-09-04 08:02:00 INFO: clearing start 2020-09-04 08:02:00 INFO: clearing end 2020-09-04 08:02:00 INFO: 2020-09-04 08:02:00 INFO: 2020-09-04 08:02:00 INFO: 2020-09-04 08:02:00 INFO: 2020-09-04 09:00:21 INFO: 2020-09-04 09:00:21 INFO: 2020-09-04 09:00:21 INFO: 2020-09-04 09:00:21 INFO: 2020-09-04 09:00:21 INFO: init new order start 2020-09-04 09:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 4, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.0, 'high': 389.8, 'low': 385.3, 'close': 388.7, 'trades': 3654, 'volume': 3763665, 'vwap': 387.91, 'lastSize': 6054, 'turnover': 145993051855, 'homeNotional': 38718.67585158662, 'foreignNotional': 15019070.12263835}, {'timestamp': datetime.datetime(2020, 9, 4, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.85, 'high': 389.45, 'low': 383.8, 'close': 388.0, 'trades': 4351, 'volume': 3932223, 'vwap': 386.74, 'lastSize': 800, 'turnover': 152074241345, 'homeNotional': 40441.53483646227, 'foreignNotional': 15640437.201469805}, {'timestamp': datetime.datetime(2020, 9, 4, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.65, 'high': 389.15, 'low': 383.5, 'close': 383.85, 'trades': 2953, 'volume': 2159944, 'vwap': 386.8, 'lastSize': 211, 'turnover': 83546342165, 'homeNotional': 22197.092816293018, 'foreignNotional': 8585820.717160596}] 2020-09-04 09:00:21 INFO: prepare candles [CandleItem(low=385.3, high=389.8, open=388.0, close=388.7, color='GREEN'), CandleItem(low=383.8, high=389.45, open=383.85, close=388.0, color='GREEN'), CandleItem(low=383.5, high=389.15, open=387.65, close=383.85, color='RED')] 2020-09-04 09:00:21 INFO: skip by colors first_candle=CandleItem(low=383.5, high=389.15, open=387.65, close=383.85, color='RED') second_candle=CandleItem(low=383.8, high=389.45, open=383.85, close=388.0, color='GREEN') last_candle=CandleItem(low=385.3, high=389.8, open=388.0, close=388.7, color='GREEN') 2020-09-04 09:00:21 INFO: check need new order None 2020-09-04 09:00:21 INFO: init new order end 2020-09-04 09:00:21 INFO: 2020-09-04 09:00:21 INFO: 2020-09-04 09:00:21 INFO: 2020-09-04 09:00:21 INFO: 2020-09-04 09:02:00 INFO: 2020-09-04 09:02:00 INFO: 2020-09-04 09:02:00 INFO: 2020-09-04 09:02:00 INFO: 2020-09-04 09:02:00 INFO: clearing start 2020-09-04 09:02:00 INFO: clearing end 2020-09-04 09:02:00 INFO: 2020-09-04 09:02:00 INFO: 2020-09-04 09:02:00 INFO: 2020-09-04 09:02:00 INFO: 2020-09-04 10:00:20 INFO: 2020-09-04 10:00:20 INFO: 2020-09-04 10:00:20 INFO: 2020-09-04 10:00:20 INFO: 2020-09-04 10:00:20 INFO: init new order start 2020-09-04 10:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 4, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.7, 'high': 389.35, 'low': 383.3, 'close': 383.75, 'trades': 2706, 'volume': 1721786, 'vwap': 386.46, 'lastSize': 30, 'turnover': 66539284765, 'homeNotional': 17698.305645191555, 'foreignNotional': 6839640.21014453}, {'timestamp': datetime.datetime(2020, 9, 4, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.0, 'high': 389.8, 'low': 385.3, 'close': 388.7, 'trades': 3654, 'volume': 3763665, 'vwap': 387.91, 'lastSize': 6054, 'turnover': 145993051855, 'homeNotional': 38718.67585158662, 'foreignNotional': 15019070.12263835}, {'timestamp': datetime.datetime(2020, 9, 4, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.85, 'high': 389.45, 'low': 383.8, 'close': 388.0, 'trades': 4351, 'volume': 3932223, 'vwap': 386.74, 'lastSize': 800, 'turnover': 152074241345, 'homeNotional': 40441.53483646227, 'foreignNotional': 15640437.201469805}] 2020-09-04 10:00:20 INFO: prepare candles [CandleItem(low=383.3, high=389.35, open=388.7, close=383.75, color='RED'), CandleItem(low=385.3, high=389.8, open=388.0, close=388.7, color='GREEN'), CandleItem(low=383.8, high=389.45, open=383.85, close=388.0, color='GREEN')] 2020-09-04 10:00:20 INFO: last_candle=CandleItem(low=383.3, high=389.35, open=388.7, close=383.75, color='RED') 2020-09-04 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-04 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=383.3, high=389.35, open=388.7, close=383.75, color='RED') 2020-09-04 10:00:20 INFO: skip by CandleItem(low=383.3, high=389.35, open=388.7, close=383.75, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-04 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-04 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=383.3, high=389.35, open=388.7, close=383.75, color='RED') 2020-09-04 10:00:20 INFO: skip by CandleItem(low=383.3, high=389.35, open=388.7, close=383.75, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-04 10:00:20 INFO: not found applicable config for candle 2020-09-04 10:00:20 INFO: check need new order None 2020-09-04 10:00:20 INFO: init new order end 2020-09-04 10:00:20 INFO: 2020-09-04 10:00:20 INFO: 2020-09-04 10:00:20 INFO: 2020-09-04 10:00:20 INFO: 2020-09-04 10:02:00 INFO: 2020-09-04 10:02:00 INFO: 2020-09-04 10:02:00 INFO: 2020-09-04 10:02:00 INFO: 2020-09-04 10:02:00 INFO: clearing start 2020-09-04 10:02:00 INFO: clearing end 2020-09-04 10:02:00 INFO: 2020-09-04 10:02:00 INFO: 2020-09-04 10:02:00 INFO: 2020-09-04 10:02:00 INFO: 2020-09-04 11:00:20 INFO: 2020-09-04 11:00:20 INFO: 2020-09-04 11:00:20 INFO: 2020-09-04 11:00:20 INFO: 2020-09-04 11:00:20 INFO: init new order start 2020-09-04 11:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 4, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.75, 'high': 387.65, 'low': 376.1, 'close': 386.95, 'trades': 8421, 'volume': 8536006, 'vwap': 382.37, 'lastSize': 11532, 'turnover': 326387458430, 'homeNotional': 87463.17825772896, 'foreignNotional': 33443963.596659724}, {'timestamp': datetime.datetime(2020, 9, 4, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.7, 'high': 389.35, 'low': 383.3, 'close': 383.75, 'trades': 2706, 'volume': 1721786, 'vwap': 386.46, 'lastSize': 30, 'turnover': 66539284765, 'homeNotional': 17698.305645191555, 'foreignNotional': 6839640.21014453}, {'timestamp': datetime.datetime(2020, 9, 4, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.0, 'high': 389.8, 'low': 385.3, 'close': 388.7, 'trades': 3654, 'volume': 3763665, 'vwap': 387.91, 'lastSize': 6054, 'turnover': 145993051855, 'homeNotional': 38718.67585158662, 'foreignNotional': 15019070.12263835}] 2020-09-04 11:00:20 INFO: prepare candles [CandleItem(low=376.1, high=387.65, open=383.75, close=386.95, color='GREEN'), CandleItem(low=383.3, high=389.35, open=388.7, close=383.75, color='RED'), CandleItem(low=385.3, high=389.8, open=388.0, close=388.7, color='GREEN')] 2020-09-04 11:00:20 INFO: skip by colors first_candle=CandleItem(low=385.3, high=389.8, open=388.0, close=388.7, color='GREEN') second_candle=CandleItem(low=383.3, high=389.35, open=388.7, close=383.75, color='RED') last_candle=CandleItem(low=376.1, high=387.65, open=383.75, close=386.95, color='GREEN') 2020-09-04 11:00:20 INFO: check need new order None 2020-09-04 11:00:20 INFO: init new order end 2020-09-04 11:00:20 INFO: 2020-09-04 11:00:20 INFO: 2020-09-04 11:00:20 INFO: 2020-09-04 11:00:20 INFO: 2020-09-04 11:02:00 INFO: 2020-09-04 11:02:00 INFO: 2020-09-04 11:02:00 INFO: 2020-09-04 11:02:00 INFO: 2020-09-04 11:02:00 INFO: clearing start 2020-09-04 11:02:00 INFO: clearing end 2020-09-04 11:02:00 INFO: 2020-09-04 11:02:00 INFO: 2020-09-04 11:02:00 INFO: 2020-09-04 11:02:00 INFO: 2020-09-04 12:00:20 INFO: 2020-09-04 12:00:20 INFO: 2020-09-04 12:00:20 INFO: 2020-09-04 12:00:20 INFO: 2020-09-04 12:00:20 INFO: init new order start 2020-09-04 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 4, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.95, 'high': 398.35, 'low': 386.65, 'close': 396.35, 'trades': 10147, 'volume': 8386669, 'vwap': 393.83, 'lastSize': 5479, 'turnover': 330288071400, 'homeNotional': 87207.75121181659, 'foreignNotional': 34345326.29004503}, {'timestamp': datetime.datetime(2020, 9, 4, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.75, 'high': 387.65, 'low': 376.1, 'close': 386.95, 'trades': 8421, 'volume': 8536006, 'vwap': 382.37, 'lastSize': 11532, 'turnover': 326387458430, 'homeNotional': 87463.17825772896, 'foreignNotional': 33443963.596659724}, {'timestamp': datetime.datetime(2020, 9, 4, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.7, 'high': 389.35, 'low': 383.3, 'close': 383.75, 'trades': 2706, 'volume': 1721786, 'vwap': 386.46, 'lastSize': 30, 'turnover': 66539284765, 'homeNotional': 17698.305645191555, 'foreignNotional': 6839640.21014453}] 2020-09-04 12:00:20 INFO: prepare candles [CandleItem(low=386.65, high=398.35, open=386.95, close=396.35, color='GREEN'), CandleItem(low=376.1, high=387.65, open=383.75, close=386.95, color='GREEN'), CandleItem(low=383.3, high=389.35, open=388.7, close=383.75, color='RED')] 2020-09-04 12:00:20 INFO: skip by colors first_candle=CandleItem(low=383.3, high=389.35, open=388.7, close=383.75, color='RED') second_candle=CandleItem(low=376.1, high=387.65, open=383.75, close=386.95, color='GREEN') last_candle=CandleItem(low=386.65, high=398.35, open=386.95, close=396.35, color='GREEN') 2020-09-04 12:00:20 INFO: check need new order None 2020-09-04 12:00:20 INFO: init new order end 2020-09-04 12:00:20 INFO: 2020-09-04 12:00:20 INFO: 2020-09-04 12:00:20 INFO: 2020-09-04 12:00:20 INFO: 2020-09-04 12:02:00 INFO: 2020-09-04 12:02:00 INFO: 2020-09-04 12:02:00 INFO: 2020-09-04 12:02:00 INFO: 2020-09-04 12:02:00 INFO: clearing start 2020-09-04 12:02:00 INFO: clearing end 2020-09-04 12:02:00 INFO: 2020-09-04 12:02:00 INFO: 2020-09-04 12:02:00 INFO: 2020-09-04 12:02:00 INFO: 2020-09-04 13:00:20 INFO: 2020-09-04 13:00:20 INFO: 2020-09-04 13:00:20 INFO: 2020-09-04 13:00:20 INFO: 2020-09-04 13:00:20 INFO: init new order start 2020-09-04 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 4, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 396.35, 'high': 401.0, 'low': 393.5, 'close': 400.85, 'trades': 5189, 'volume': 4415992, 'vwap': 397.52, 'lastSize': 150, 'turnover': 175541632035, 'homeNotional': 46185.14983051529, 'foreignNotional': 18359466.69537246}, {'timestamp': datetime.datetime(2020, 9, 4, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.95, 'high': 398.35, 'low': 386.65, 'close': 396.35, 'trades': 10147, 'volume': 8386669, 'vwap': 393.83, 'lastSize': 5479, 'turnover': 330288071400, 'homeNotional': 87207.75121181659, 'foreignNotional': 34345326.29004503}, {'timestamp': datetime.datetime(2020, 9, 4, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.75, 'high': 387.65, 'low': 376.1, 'close': 386.95, 'trades': 8421, 'volume': 8536006, 'vwap': 382.37, 'lastSize': 11532, 'turnover': 326387458430, 'homeNotional': 87463.17825772896, 'foreignNotional': 33443963.596659724}] 2020-09-04 13:00:20 INFO: prepare candles [CandleItem(low=393.5, high=401.0, open=396.35, close=400.85, color='GREEN'), CandleItem(low=386.65, high=398.35, open=386.95, close=396.35, color='GREEN'), CandleItem(low=376.1, high=387.65, open=383.75, close=386.95, color='GREEN')] 2020-09-04 13:00:20 INFO: skip by colors first_candle=CandleItem(low=376.1, high=387.65, open=383.75, close=386.95, color='GREEN') second_candle=CandleItem(low=386.65, high=398.35, open=386.95, close=396.35, color='GREEN') last_candle=CandleItem(low=393.5, high=401.0, open=396.35, close=400.85, color='GREEN') 2020-09-04 13:00:20 INFO: check need new order None 2020-09-04 13:00:20 INFO: init new order end 2020-09-04 13:00:20 INFO: 2020-09-04 13:00:20 INFO: 2020-09-04 13:00:20 INFO: 2020-09-04 13:00:20 INFO: 2020-09-04 13:02:00 INFO: 2020-09-04 13:02:00 INFO: 2020-09-04 13:02:00 INFO: 2020-09-04 13:02:00 INFO: 2020-09-04 13:02:00 INFO: clearing start 2020-09-04 13:02:00 INFO: clearing end 2020-09-04 13:02:00 INFO: 2020-09-04 13:02:00 INFO: 2020-09-04 13:02:00 INFO: 2020-09-04 13:02:00 INFO: 2020-09-04 14:00:20 INFO: 2020-09-04 14:00:20 INFO: 2020-09-04 14:00:20 INFO: 2020-09-04 14:00:20 INFO: 2020-09-04 14:00:20 INFO: init new order start 2020-09-04 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 4, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 400.85, 'high': 400.85, 'low': 396.05, 'close': 396.2, 'trades': 4677, 'volume': 3740369, 'vwap': 398.57, 'lastSize': 40, 'turnover': 149078219505, 'homeNotional': 39316.06956613022, 'foreignNotional': 15670065.468870865}, {'timestamp': datetime.datetime(2020, 9, 4, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 396.35, 'high': 401.0, 'low': 393.5, 'close': 400.85, 'trades': 5189, 'volume': 4415992, 'vwap': 397.52, 'lastSize': 150, 'turnover': 175541632035, 'homeNotional': 46185.14983051529, 'foreignNotional': 18359466.69537246}, {'timestamp': datetime.datetime(2020, 9, 4, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.95, 'high': 398.35, 'low': 386.65, 'close': 396.35, 'trades': 10147, 'volume': 8386669, 'vwap': 393.83, 'lastSize': 5479, 'turnover': 330288071400, 'homeNotional': 87207.75121181659, 'foreignNotional': 34345326.29004503}] 2020-09-04 14:00:20 INFO: prepare candles [CandleItem(low=396.05, high=400.85, open=400.85, close=396.2, color='RED'), CandleItem(low=393.5, high=401.0, open=396.35, close=400.85, color='GREEN'), CandleItem(low=386.65, high=398.35, open=386.95, close=396.35, color='GREEN')] 2020-09-04 14:00:20 INFO: last_candle=CandleItem(low=396.05, high=400.85, open=400.85, close=396.2, color='RED') 2020-09-04 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-04 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=396.05, high=400.85, open=400.85, close=396.2, color='RED') 2020-09-04 14:00:20 INFO: skip by CandleItem(low=396.05, high=400.85, open=400.85, close=396.2, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-04 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-04 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=396.05, high=400.85, open=400.85, close=396.2, color='RED') 2020-09-04 14:00:20 INFO: skip by CandleItem(low=396.05, high=400.85, open=400.85, close=396.2, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-04 14:00:20 INFO: not found applicable config for candle 2020-09-04 14:00:20 INFO: check need new order None 2020-09-04 14:00:20 INFO: init new order end 2020-09-04 14:00:20 INFO: 2020-09-04 14:00:20 INFO: 2020-09-04 14:00:20 INFO: 2020-09-04 14:00:20 INFO: 2020-09-04 14:02:00 INFO: 2020-09-04 14:02:00 INFO: 2020-09-04 14:02:00 INFO: 2020-09-04 14:02:00 INFO: 2020-09-04 14:02:00 INFO: clearing start 2020-09-04 14:02:00 INFO: clearing end 2020-09-04 14:02:00 INFO: 2020-09-04 14:02:00 INFO: 2020-09-04 14:02:00 INFO: 2020-09-04 14:02:00 INFO: 2020-09-04 15:00:20 INFO: 2020-09-04 15:00:20 INFO: 2020-09-04 15:00:20 INFO: 2020-09-04 15:00:20 INFO: 2020-09-04 15:00:20 INFO: init new order start 2020-09-04 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 4, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 396.2, 'high': 397.15, 'low': 391.3, 'close': 395.8, 'trades': 5394, 'volume': 4188769, 'vwap': 394.37, 'lastSize': 500, 'turnover': 165190401525, 'homeNotional': 43698.16704278327, 'foreignNotional': 17233162.485745504}, {'timestamp': datetime.datetime(2020, 9, 4, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 400.85, 'high': 400.85, 'low': 396.05, 'close': 396.2, 'trades': 4677, 'volume': 3740369, 'vwap': 398.57, 'lastSize': 40, 'turnover': 149078219505, 'homeNotional': 39316.06956613022, 'foreignNotional': 15670065.468870865}, {'timestamp': datetime.datetime(2020, 9, 4, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 396.35, 'high': 401.0, 'low': 393.5, 'close': 400.85, 'trades': 5189, 'volume': 4415992, 'vwap': 397.52, 'lastSize': 150, 'turnover': 175541632035, 'homeNotional': 46185.14983051529, 'foreignNotional': 18359466.69537246}] 2020-09-04 15:00:20 INFO: prepare candles [CandleItem(low=391.3, high=397.15, open=396.2, close=395.8, color='RED'), CandleItem(low=396.05, high=400.85, open=400.85, close=396.2, color='RED'), CandleItem(low=393.5, high=401.0, open=396.35, close=400.85, color='GREEN')] 2020-09-04 15:00:20 INFO: skip by colors first_candle=CandleItem(low=393.5, high=401.0, open=396.35, close=400.85, color='GREEN') second_candle=CandleItem(low=396.05, high=400.85, open=400.85, close=396.2, color='RED') last_candle=CandleItem(low=391.3, high=397.15, open=396.2, close=395.8, color='RED') 2020-09-04 15:00:20 INFO: check need new order None 2020-09-04 15:00:20 INFO: init new order end 2020-09-04 15:00:20 INFO: 2020-09-04 15:00:20 INFO: 2020-09-04 15:00:20 INFO: 2020-09-04 15:00:20 INFO: 2020-09-04 15:02:00 INFO: 2020-09-04 15:02:00 INFO: 2020-09-04 15:02:00 INFO: 2020-09-04 15:02:00 INFO: 2020-09-04 15:02:00 INFO: clearing start 2020-09-04 15:02:00 INFO: clearing end 2020-09-04 15:02:00 INFO: 2020-09-04 15:02:00 INFO: 2020-09-04 15:02:00 INFO: 2020-09-04 15:02:00 INFO: 2020-09-04 16:00:20 INFO: 2020-09-04 16:00:20 INFO: 2020-09-04 16:00:20 INFO: 2020-09-04 16:00:20 INFO: 2020-09-04 16:00:20 INFO: init new order start 2020-09-04 16:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 4, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 395.8, 'high': 398.65, 'low': 392.05, 'close': 395.3, 'trades': 4926, 'volume': 3483748, 'vwap': 395.44, 'lastSize': 500, 'turnover': 137759778875, 'homeNotional': 36383.2707297423, 'foreignNotional': 14387328.741334505}, {'timestamp': datetime.datetime(2020, 9, 4, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 396.2, 'high': 397.15, 'low': 391.3, 'close': 395.8, 'trades': 5394, 'volume': 4188769, 'vwap': 394.37, 'lastSize': 500, 'turnover': 165190401525, 'homeNotional': 43698.16704278327, 'foreignNotional': 17233162.485745504}, {'timestamp': datetime.datetime(2020, 9, 4, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 400.85, 'high': 400.85, 'low': 396.05, 'close': 396.2, 'trades': 4677, 'volume': 3740369, 'vwap': 398.57, 'lastSize': 40, 'turnover': 149078219505, 'homeNotional': 39316.06956613022, 'foreignNotional': 15670065.468870865}] 2020-09-04 16:00:20 INFO: prepare candles [CandleItem(low=392.05, high=398.65, open=395.8, close=395.3, color='RED'), CandleItem(low=391.3, high=397.15, open=396.2, close=395.8, color='RED'), CandleItem(low=396.05, high=400.85, open=400.85, close=396.2, color='RED')] 2020-09-04 16:00:20 INFO: skip by colors first_candle=CandleItem(low=396.05, high=400.85, open=400.85, close=396.2, color='RED') second_candle=CandleItem(low=391.3, high=397.15, open=396.2, close=395.8, color='RED') last_candle=CandleItem(low=392.05, high=398.65, open=395.8, close=395.3, color='RED') 2020-09-04 16:00:20 INFO: check need new order None 2020-09-04 16:00:20 INFO: init new order end 2020-09-04 16:00:20 INFO: 2020-09-04 16:00:20 INFO: 2020-09-04 16:00:20 INFO: 2020-09-04 16:00:20 INFO: 2020-09-04 16:02:00 INFO: 2020-09-04 16:02:00 INFO: 2020-09-04 16:02:00 INFO: 2020-09-04 16:02:00 INFO: 2020-09-04 16:02:00 INFO: clearing start 2020-09-04 16:02:00 INFO: clearing end 2020-09-04 16:02:00 INFO: 2020-09-04 16:02:00 INFO: 2020-09-04 16:02:00 INFO: 2020-09-04 16:02:00 INFO: 2020-09-04 17:00:20 INFO: 2020-09-04 17:00:20 INFO: 2020-09-04 17:00:20 INFO: 2020-09-04 17:00:20 INFO: 2020-09-04 17:00:20 INFO: init new order start 2020-09-04 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 4, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 395.3, 'high': 399.4, 'low': 392.35, 'close': 392.35, 'trades': 5295, 'volume': 3580126, 'vwap': 396.06, 'lastSize': 2, 'turnover': 141793046310, 'homeNotional': 37458.755500388885, 'foreignNotional': 14835933.52820677}, {'timestamp': datetime.datetime(2020, 9, 4, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 395.8, 'high': 398.65, 'low': 392.05, 'close': 395.3, 'trades': 4926, 'volume': 3483748, 'vwap': 395.44, 'lastSize': 500, 'turnover': 137759778875, 'homeNotional': 36383.2707297423, 'foreignNotional': 14387328.741334505}, {'timestamp': datetime.datetime(2020, 9, 4, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 396.2, 'high': 397.15, 'low': 391.3, 'close': 395.8, 'trades': 5394, 'volume': 4188769, 'vwap': 394.37, 'lastSize': 500, 'turnover': 165190401525, 'homeNotional': 43698.16704278327, 'foreignNotional': 17233162.485745504}] 2020-09-04 17:00:20 INFO: prepare candles [CandleItem(low=392.35, high=399.4, open=395.3, close=392.35, color='RED'), CandleItem(low=392.05, high=398.65, open=395.8, close=395.3, color='RED'), CandleItem(low=391.3, high=397.15, open=396.2, close=395.8, color='RED')] 2020-09-04 17:00:20 INFO: skip by colors first_candle=CandleItem(low=391.3, high=397.15, open=396.2, close=395.8, color='RED') second_candle=CandleItem(low=392.05, high=398.65, open=395.8, close=395.3, color='RED') last_candle=CandleItem(low=392.35, high=399.4, open=395.3, close=392.35, color='RED') 2020-09-04 17:00:20 INFO: check need new order None 2020-09-04 17:00:20 INFO: init new order end 2020-09-04 17:00:20 INFO: 2020-09-04 17:00:20 INFO: 2020-09-04 17:00:20 INFO: 2020-09-04 17:00:20 INFO: 2020-09-04 17:02:00 INFO: 2020-09-04 17:02:00 INFO: 2020-09-04 17:02:00 INFO: 2020-09-04 17:02:00 INFO: 2020-09-04 17:02:00 INFO: clearing start 2020-09-04 17:02:00 INFO: clearing end 2020-09-04 17:02:00 INFO: 2020-09-04 17:02:00 INFO: 2020-09-04 17:02:00 INFO: 2020-09-04 17:02:00 INFO: 2020-09-04 18:00:20 INFO: 2020-09-04 18:00:20 INFO: 2020-09-04 18:00:20 INFO: 2020-09-04 18:00:20 INFO: 2020-09-04 18:00:20 INFO: init new order start 2020-09-04 18:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 4, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.35, 'high': 393.95, 'low': 354.3, 'close': 383.85, 'trades': 24237, 'volume': 24438995, 'vwap': 375.16, 'lastSize': 1495, 'turnover': 916848000585, 'homeNotional': 249110.19792033368, 'foreignNotional': 93481348.12056136}, {'timestamp': datetime.datetime(2020, 9, 4, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 395.3, 'high': 399.4, 'low': 392.35, 'close': 392.35, 'trades': 5295, 'volume': 3580126, 'vwap': 396.06, 'lastSize': 2, 'turnover': 141793046310, 'homeNotional': 37458.755500388885, 'foreignNotional': 14835933.52820677}, {'timestamp': datetime.datetime(2020, 9, 4, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 395.8, 'high': 398.65, 'low': 392.05, 'close': 395.3, 'trades': 4926, 'volume': 3483748, 'vwap': 395.44, 'lastSize': 500, 'turnover': 137759778875, 'homeNotional': 36383.2707297423, 'foreignNotional': 14387328.741334505}] 2020-09-04 18:00:20 INFO: prepare candles [CandleItem(low=354.3, high=393.95, open=392.35, close=383.85, color='RED'), CandleItem(low=392.35, high=399.4, open=395.3, close=392.35, color='RED'), CandleItem(low=392.05, high=398.65, open=395.8, close=395.3, color='RED')] 2020-09-04 18:00:20 INFO: skip by colors first_candle=CandleItem(low=392.05, high=398.65, open=395.8, close=395.3, color='RED') second_candle=CandleItem(low=392.35, high=399.4, open=395.3, close=392.35, color='RED') last_candle=CandleItem(low=354.3, high=393.95, open=392.35, close=383.85, color='RED') 2020-09-04 18:00:20 INFO: check need new order None 2020-09-04 18:00:20 INFO: init new order end 2020-09-04 18:00:20 INFO: 2020-09-04 18:00:20 INFO: 2020-09-04 18:00:20 INFO: 2020-09-04 18:00:20 INFO: 2020-09-04 18:02:00 INFO: 2020-09-04 18:02:00 INFO: 2020-09-04 18:02:00 INFO: 2020-09-04 18:02:00 INFO: 2020-09-04 18:02:00 INFO: clearing start 2020-09-04 18:02:00 INFO: clearing end 2020-09-04 18:02:00 INFO: 2020-09-04 18:02:00 INFO: 2020-09-04 18:02:00 INFO: 2020-09-04 18:02:00 INFO: 2020-09-04 19:00:20 INFO: 2020-09-04 19:00:20 INFO: 2020-09-04 19:00:20 INFO: 2020-09-04 19:00:20 INFO: 2020-09-04 19:00:20 INFO: init new order start 2020-09-04 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 4, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.85, 'high': 386.1, 'low': 372.05, 'close': 385.0, 'trades': 13353, 'volume': 10016527, 'vwap': 377.76, 'lastSize': 237, 'turnover': 378382137075, 'homeNotional': 103069.35849697061, 'foreignNotional': 38937187.87316324}, {'timestamp': datetime.datetime(2020, 9, 4, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.35, 'high': 393.95, 'low': 354.3, 'close': 383.85, 'trades': 24237, 'volume': 24438995, 'vwap': 375.16, 'lastSize': 1495, 'turnover': 916848000585, 'homeNotional': 249110.19792033368, 'foreignNotional': 93481348.12056136}, {'timestamp': datetime.datetime(2020, 9, 4, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 395.3, 'high': 399.4, 'low': 392.35, 'close': 392.35, 'trades': 5295, 'volume': 3580126, 'vwap': 396.06, 'lastSize': 2, 'turnover': 141793046310, 'homeNotional': 37458.755500388885, 'foreignNotional': 14835933.52820677}] 2020-09-04 19:00:20 INFO: prepare candles [CandleItem(low=372.05, high=386.1, open=383.85, close=385.0, color='GREEN'), CandleItem(low=354.3, high=393.95, open=392.35, close=383.85, color='RED'), CandleItem(low=392.35, high=399.4, open=395.3, close=392.35, color='RED')] 2020-09-04 19:00:20 INFO: last_candle=CandleItem(low=372.05, high=386.1, open=383.85, close=385.0, color='GREEN') 2020-09-04 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-04 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=372.05, high=386.1, open=383.85, close=385.0, color='GREEN') 2020-09-04 19:00:20 INFO: skip by CandleItem(low=372.05, high=386.1, open=383.85, close=385.0, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-04 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-04 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=372.05, high=386.1, open=383.85, close=385.0, color='GREEN') 2020-09-04 19:00:20 INFO: skip by CandleItem(low=372.05, high=386.1, open=383.85, close=385.0, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-04 19:00:20 INFO: not found applicable config for candle 2020-09-04 19:00:20 INFO: check need new order None 2020-09-04 19:00:20 INFO: init new order end 2020-09-04 19:00:20 INFO: 2020-09-04 19:00:20 INFO: 2020-09-04 19:00:20 INFO: 2020-09-04 19:00:20 INFO: 2020-09-04 19:02:00 INFO: 2020-09-04 19:02:00 INFO: 2020-09-04 19:02:00 INFO: 2020-09-04 19:02:00 INFO: 2020-09-04 19:02:00 INFO: clearing start 2020-09-04 19:02:00 INFO: clearing end 2020-09-04 19:02:00 INFO: 2020-09-04 19:02:00 INFO: 2020-09-04 19:02:00 INFO: 2020-09-04 19:02:00 INFO: 2020-09-04 20:00:20 INFO: 2020-09-04 20:00:20 INFO: 2020-09-04 20:00:20 INFO: 2020-09-04 20:00:20 INFO: 2020-09-04 20:00:20 INFO: init new order start 2020-09-04 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 4, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.0, 'high': 389.15, 'low': 376.5, 'close': 385.9, 'trades': 10182, 'volume': 7569076, 'vwap': 382.67, 'lastSize': 12, 'turnover': 289640488225, 'homeNotional': 78779.40410063254, 'foreignNotional': 30146832.767158225}, {'timestamp': datetime.datetime(2020, 9, 4, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.85, 'high': 386.1, 'low': 372.05, 'close': 385.0, 'trades': 13353, 'volume': 10016527, 'vwap': 377.76, 'lastSize': 237, 'turnover': 378382137075, 'homeNotional': 103069.35849697061, 'foreignNotional': 38937187.87316324}, {'timestamp': datetime.datetime(2020, 9, 4, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.35, 'high': 393.95, 'low': 354.3, 'close': 383.85, 'trades': 24237, 'volume': 24438995, 'vwap': 375.16, 'lastSize': 1495, 'turnover': 916848000585, 'homeNotional': 249110.19792033368, 'foreignNotional': 93481348.12056136}] 2020-09-04 20:00:20 INFO: prepare candles [CandleItem(low=376.5, high=389.15, open=385.0, close=385.9, color='GREEN'), CandleItem(low=372.05, high=386.1, open=383.85, close=385.0, color='GREEN'), CandleItem(low=354.3, high=393.95, open=392.35, close=383.85, color='RED')] 2020-09-04 20:00:20 INFO: skip by colors first_candle=CandleItem(low=354.3, high=393.95, open=392.35, close=383.85, color='RED') second_candle=CandleItem(low=372.05, high=386.1, open=383.85, close=385.0, color='GREEN') last_candle=CandleItem(low=376.5, high=389.15, open=385.0, close=385.9, color='GREEN') 2020-09-04 20:00:20 INFO: check need new order None 2020-09-04 20:00:20 INFO: init new order end 2020-09-04 20:00:20 INFO: 2020-09-04 20:00:20 INFO: 2020-09-04 20:00:20 INFO: 2020-09-04 20:00:20 INFO: 2020-09-04 20:02:00 INFO: 2020-09-04 20:02:00 INFO: 2020-09-04 20:02:00 INFO: 2020-09-04 20:02:00 INFO: 2020-09-04 20:02:00 INFO: clearing start 2020-09-04 20:02:00 INFO: clearing end 2020-09-04 20:02:00 INFO: 2020-09-04 20:02:00 INFO: 2020-09-04 20:02:00 INFO: 2020-09-04 20:02:00 INFO: 2020-09-04 21:00:20 INFO: 2020-09-04 21:00:20 INFO: 2020-09-04 21:00:20 INFO: 2020-09-04 21:00:20 INFO: 2020-09-04 21:00:20 INFO: init new order start 2020-09-04 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 4, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.9, 'high': 386.5, 'low': 380.15, 'close': 384.3, 'trades': 6260, 'volume': 4082189, 'vwap': 383.65, 'lastSize': 100, 'turnover': 156611860395, 'homeNotional': 42576.60371315265, 'foreignNotional': 16334455.867867198}, {'timestamp': datetime.datetime(2020, 9, 4, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.0, 'high': 389.15, 'low': 376.5, 'close': 385.9, 'trades': 10182, 'volume': 7569076, 'vwap': 382.67, 'lastSize': 12, 'turnover': 289640488225, 'homeNotional': 78779.40410063254, 'foreignNotional': 30146832.767158225}, {'timestamp': datetime.datetime(2020, 9, 4, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.85, 'high': 386.1, 'low': 372.05, 'close': 385.0, 'trades': 13353, 'volume': 10016527, 'vwap': 377.76, 'lastSize': 237, 'turnover': 378382137075, 'homeNotional': 103069.35849697061, 'foreignNotional': 38937187.87316324}] 2020-09-04 21:00:20 INFO: prepare candles [CandleItem(low=380.15, high=386.5, open=385.9, close=384.3, color='RED'), CandleItem(low=376.5, high=389.15, open=385.0, close=385.9, color='GREEN'), CandleItem(low=372.05, high=386.1, open=383.85, close=385.0, color='GREEN')] 2020-09-04 21:00:20 INFO: last_candle=CandleItem(low=380.15, high=386.5, open=385.9, close=384.3, color='RED') 2020-09-04 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-04 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=380.15, high=386.5, open=385.9, close=384.3, color='RED') 2020-09-04 21:00:20 INFO: skip by CandleItem(low=380.15, high=386.5, open=385.9, close=384.3, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-04 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-04 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=380.15, high=386.5, open=385.9, close=384.3, color='RED') 2020-09-04 21:00:20 INFO: apply filter None to candle=CandleItem(low=376.5, high=389.15, open=385.0, close=385.9, color='GREEN') 2020-09-04 21:00:20 INFO: apply filter None to candle=CandleItem(low=372.05, high=386.1, open=383.85, close=385.0, color='GREEN') 2020-09-04 21:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=380.15, high=386.5, open=385.9, close=384.3, color='RED'), take_profit_factor=5.0, clearing_interval=3600) 2020-09-04 21:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=380.15, high=386.5, open=385.9, close=384.3, color='RED'), take_profit_factor=5.0, clearing_interval=3600) 2020-09-04 21:00:20 INFO: place order: start candle=CandleItem(low=380.15, high=386.5, open=385.9, close=384.3, color='RED') ticker='ETHUSD' price_offset=0.1 2020-09-04 21:00:20 INFO: place order: side_factor=1 init_trigger_price=380.09999999999997 init_order_price=380.04999999999995 stop_price_offset=0.0 candle.size=6.350000000000023 stop_price=386.5 take_price=348.29999999999984 2020-09-04 21:00:20 INFO: place order round: side_factor=1 init_trigger_price=Decimal('380.09999999999996589394868351519107818603515625') init_order_price=Decimal('380.049999999999954525264911353588104248046875') stop_price_offset=0.0 candle.size=6.350000000000023 stop_price=Decimal('386.5') take_price=Decimal('348.2999999999998408384271897375583648681640625') 2020-09-04 21:00:20 INFO: place order: compute qty=-297 2020-09-04 21:00:20 INFO: place order: save order to db b604341d226c40fea4ad9ceed5b67515; response=True 2020-09-04 21:00:20 INFO: post order to exchange resp={'orderID': 'fd848352-e0e8-e3ab-862a-a65ed62d0c93', 'clOrdID': 'b604341d226c40fea4ad9ceed5b67515', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 297, 'price': 380.05, 'displayQty': None, 'stopPx': 380.1, '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': 297, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 4, 18, 0, 20, 825000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 4, 18, 0, 20, 825000, tzinfo=tzutc())} 2020-09-04 21:00:20 INFO: place new init order {'qty': -297, 'init_price': Decimal('380.09999999999996589394868351519107818603515625'), 'stop_price': Decimal('386.5'), 'take_price': Decimal('348.2999999999998408384271897375583648681640625'), 'order_uid': 'b604341d226c40fea4ad9ceed5b67515', 'response': {'orderID': 'fd848352-e0e8-e3ab-862a-a65ed62d0c93', 'clOrdID': 'b604341d226c40fea4ad9ceed5b67515', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 297, 'price': 380.05, 'displayQty': None, 'stopPx': 380.1, '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': 297, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 4, 18, 0, 20, 825000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 4, 18, 0, 20, 825000, tzinfo=tzutc())}} 2020-09-04 21:00:20 INFO: init new order end 2020-09-04 21:00:20 INFO: 2020-09-04 21:00:20 INFO: 2020-09-04 21:00:20 INFO: 2020-09-04 21:00:20 INFO: 2020-09-04 21:00:21 INFO: process event {'orderID': 'fd848352-e0e8-e3ab-862a-a65ed62d0c93', 'clOrdID': 'b604341d226c40fea4ad9ceed5b67515', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 297, 'price': 380.05, 'displayQty': None, 'stopPx': 380.1, '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': 297, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-09-04T18:00:20.825Z', 'timestamp': '2020-09-04T18:00:20.825Z'} 2020-09-04 21:00:21 INFO: skip event b604341d226c40fea4ad9ceed5b67515 New 2020-09-04 21:02:00 INFO: 2020-09-04 21:02:00 INFO: 2020-09-04 21:02:00 INFO: 2020-09-04 21:02:00 INFO: 2020-09-04 21:02:00 INFO: clearing start 2020-09-04 21:02:01 INFO: fetch_orders_for_clearing test order {'orderID': 'fd848352-e0e8-e3ab-862a-a65ed62d0c93', 'clOrdID': 'b604341d226c40fea4ad9ceed5b67515', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 297, 'price': 380.05, 'displayQty': None, 'stopPx': 380.1, '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': 297, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 4, 18, 0, 20, 825000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 4, 18, 0, 20, 825000, tzinfo=tzutc())} 2020-09-04 21:02:01 INFO: order time=2020-09-04 18:00:20.825000+00:00; delta from now UTC=0:01:40.204325 time_delta.total_seconds()=100.204325; time_diff_offset='3600' 2020-09-04 21:02:01 INFO: skip by time diff 2020-09-04 18:00:20.825000+00:00 2020-09-04 21:02:01 INFO: clearing end 2020-09-04 21:02:01 INFO: 2020-09-04 21:02:01 INFO: 2020-09-04 21:02:01 INFO: 2020-09-04 21:02:01 INFO: 2020-09-04 21:23:42 INFO: process event {'orderID': 'fd848352-e0e8-e3ab-862a-a65ed62d0c93', 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 297, 'avgPx': 380.08, 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'transactTime': '2020-09-04T18:23:42.215Z', 'timestamp': '2020-09-04T18:23:42.215Z', 'clOrdID': 'b604341d226c40fea4ad9ceed5b67515', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-04 21:23:42 INFO: add new event={'uid': 'b604341d226c40fea4ad9ceed5b67515', 'status': 'Filled'} 2020-09-04 21:23:42 INFO: 2020-09-04 21:23:42 INFO: 2020-09-04 21:23:42 INFO: 2020-09-04 21:23:42 INFO: 2020-09-04 21:23:42 INFO: process event start 2020-09-04 21:23:42 INFO: fetch new order event b604341d226c40fea4ad9ceed5b67515 2020-09-04 21:23:42 INFO: fetch orders by event init={'stop': '386.5', 'take': '348.2999999999998408384271897375583648681640625', 'qty': '297', 'color': 'RED', 'ticker': 'ETHUSD', 'clearing_offset': '3600'} profit_pair=None 2020-09-04 21:23:42 INFO: process init order filled 2020-09-04 21:23:42 INFO: save profit orders to storage stop=81c49799c6834abc8e84b7f69e4b8086 take=33c4903f74a64d58a239c76cf2b3c2f9 2020-09-04 21:23:42 INFO: place profit orders take_price=348.2999999999998408384271897375583648681640625, stop_price=386.5, qty=297, color=RED, ticker=ETHUSD 81c49799c6834abc8e84b7f69e4b8086 33c4903f74a64d58a239c76cf2b3c2f9 2020-09-04 21:23:42 INFO: place stop order ETHUSD: qty=297, stop_price=386.5, stop_uid=81c49799c6834abc8e84b7f69e4b8086 2020-09-04 21:23:43 INFO: exchange resp for stop order={'orderID': '0b7b0134-c283-3832-6b5a-4e36a0a75242', 'clOrdID': '81c49799c6834abc8e84b7f69e4b8086', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 297, 'price': None, 'displayQty': None, 'stopPx': 386.5, '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': 297, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 4, 18, 23, 43, 278000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 4, 18, 23, 43, 278000, tzinfo=tzutc())} 2020-09-04 21:23:43 INFO: place limit order ETHUSD: qty=297, price=348.2999999999998408384271897375583648681640625, take_uid=33c4903f74a64d58a239c76cf2b3c2f9 2020-09-04 21:23:43 INFO: process event {'orderID': '0b7b0134-c283-3832-6b5a-4e36a0a75242', 'clOrdID': '81c49799c6834abc8e84b7f69e4b8086', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 297, 'price': None, 'displayQty': None, 'stopPx': 386.5, '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': 297, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': '2020-09-04T18:23:43.278Z', 'timestamp': '2020-09-04T18:23:43.278Z'} 2020-09-04 21:23:43 INFO: skip event 81c49799c6834abc8e84b7f69e4b8086 New 2020-09-04 21:23:44 INFO: exchange resp for take profit order={'orderID': '38e88c70-db0b-7755-38d6-4c3dc1446214', 'clOrdID': '33c4903f74a64d58a239c76cf2b3c2f9', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 297, 'price': 348.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': 297, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 4, 18, 23, 44, 49000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 4, 18, 23, 44, 49000, tzinfo=tzutc())} 2020-09-04 21:23:44 INFO: place profit orders={'stop': {'response': {'orderID': '0b7b0134-c283-3832-6b5a-4e36a0a75242', 'clOrdID': '81c49799c6834abc8e84b7f69e4b8086', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 297, 'price': None, 'displayQty': None, 'stopPx': 386.5, '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': 297, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 4, 18, 23, 43, 278000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 4, 18, 23, 43, 278000, tzinfo=tzutc())}, 'qty': Decimal('297'), 'uid': '81c49799c6834abc8e84b7f69e4b8086', 'price': Decimal('386.5')}, 'take': {'response': {'orderID': '38e88c70-db0b-7755-38d6-4c3dc1446214', 'clOrdID': '33c4903f74a64d58a239c76cf2b3c2f9', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 297, 'price': 348.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': 297, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 4, 18, 23, 44, 49000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 4, 18, 23, 44, 49000, tzinfo=tzutc())}, 'qty': Decimal('297'), 'uid': '33c4903f74a64d58a239c76cf2b3c2f9', 'price': Decimal('348.2999999999998408384271897375583648681640625')}} 2020-09-04 21:23:44 INFO: rm init order from db b604341d226c40fea4ad9ceed5b67515 2020-09-04 21:23:44 INFO: end process event_processing_result='proceed init order' 2020-09-04 21:23:44 INFO: 2020-09-04 21:23:44 INFO: 2020-09-04 21:23:44 INFO: 2020-09-04 21:23:44 INFO: 2020-09-04 21:23:44 INFO: process event {'orderID': '38e88c70-db0b-7755-38d6-4c3dc1446214', 'clOrdID': '33c4903f74a64d58a239c76cf2b3c2f9', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 297, 'price': 348.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': 297, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': '2020-09-04T18:23:44.049Z', 'timestamp': '2020-09-04T18:23:44.049Z'} 2020-09-04 21:23:44 INFO: skip event 33c4903f74a64d58a239c76cf2b3c2f9 New 2020-09-04 21:56:59 INFO: process event {'orderID': '0b7b0134-c283-3832-6b5a-4e36a0a75242', 'price': 386.5, 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 297, 'avgPx': 386.5, 'text': 'Triggered: Order stop price reached\nStop order by trader.py', 'transactTime': '2020-09-04T18:56:59.806Z', 'timestamp': '2020-09-04T18:56:59.806Z', 'clOrdID': '81c49799c6834abc8e84b7f69e4b8086', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-04 21:56:59 INFO: add new event={'uid': '81c49799c6834abc8e84b7f69e4b8086', 'status': 'Filled'} 2020-09-04 21:57:00 INFO: 2020-09-04 21:57:00 INFO: 2020-09-04 21:57:00 INFO: 2020-09-04 21:57:00 INFO: 2020-09-04 21:57:00 INFO: process event start 2020-09-04 21:57:00 INFO: fetch new order event 81c49799c6834abc8e84b7f69e4b8086 2020-09-04 21:57:00 INFO: fetch orders by event init=None profit_pair=33c4903f74a64d58a239c76cf2b3c2f9 2020-09-04 21:57:00 INFO: process profit order filled 2020-09-04 21:57:02 INFO: process event {'orderID': '38e88c70-db0b-7755-38d6-4c3dc1446214', 'ordStatus': 'Canceled', 'workingIndicator': False, 'leavesQty': 0, 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'timestamp': '2020-09-04T18:57:02.225Z', 'clOrdID': '33c4903f74a64d58a239c76cf2b3c2f9', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-04 21:57:02 INFO: skip event 33c4903f74a64d58a239c76cf2b3c2f9 Canceled 2020-09-04 21:57:02 INFO: cancel order=33c4903f74a64d58a239c76cf2b3c2f9 [{'orderID': '38e88c70-db0b-7755-38d6-4c3dc1446214', 'clOrdID': '33c4903f74a64d58a239c76cf2b3c2f9', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 297, 'price': 348.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, 4, 18, 23, 44, 49000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 4, 18, 57, 2, 225000, tzinfo=tzutc())}] 2020-09-04 21:57:02 INFO: end process event_processing_result='proceed profit order' 2020-09-04 21:57:02 INFO: 2020-09-04 21:57:02 INFO: 2020-09-04 21:57:02 INFO: 2020-09-04 21:57:02 INFO: 2020-09-04 22:00:20 INFO: 2020-09-04 22:00:20 INFO: 2020-09-04 22:00:20 INFO: 2020-09-04 22:00:20 INFO: 2020-09-04 22:00:20 INFO: init new order start 2020-09-04 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 4, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.3, 'high': 387.85, 'low': 378.85, 'close': 387.85, 'trades': 6457, 'volume': 4044120, 'vwap': 382.91, 'lastSize': 1000, 'turnover': 154851178195, 'homeNotional': 42113.01986476326, 'foreignNotional': 16125544.069096474}, {'timestamp': datetime.datetime(2020, 9, 4, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.9, 'high': 386.5, 'low': 380.15, 'close': 384.3, 'trades': 6260, 'volume': 4082189, 'vwap': 383.65, 'lastSize': 100, 'turnover': 156611860395, 'homeNotional': 42576.60371315265, 'foreignNotional': 16334455.867867198}, {'timestamp': datetime.datetime(2020, 9, 4, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.0, 'high': 389.15, 'low': 376.5, 'close': 385.9, 'trades': 10182, 'volume': 7569076, 'vwap': 382.67, 'lastSize': 12, 'turnover': 289640488225, 'homeNotional': 78779.40410063254, 'foreignNotional': 30146832.767158225}] 2020-09-04 22:00:20 INFO: prepare candles [CandleItem(low=378.85, high=387.85, open=384.3, close=387.85, color='GREEN'), CandleItem(low=380.15, high=386.5, open=385.9, close=384.3, color='RED'), CandleItem(low=376.5, high=389.15, open=385.0, close=385.9, color='GREEN')] 2020-09-04 22:00:20 INFO: skip by colors first_candle=CandleItem(low=376.5, high=389.15, open=385.0, close=385.9, color='GREEN') second_candle=CandleItem(low=380.15, high=386.5, open=385.9, close=384.3, color='RED') last_candle=CandleItem(low=378.85, high=387.85, open=384.3, close=387.85, color='GREEN') 2020-09-04 22:00:20 INFO: check need new order None 2020-09-04 22:00:20 INFO: init new order end 2020-09-04 22:00:20 INFO: 2020-09-04 22:00:20 INFO: 2020-09-04 22:00:20 INFO: 2020-09-04 22:00:20 INFO: 2020-09-04 22:02:00 INFO: 2020-09-04 22:02:00 INFO: 2020-09-04 22:02:00 INFO: 2020-09-04 22:02:00 INFO: 2020-09-04 22:02:00 INFO: clearing start 2020-09-04 22:02:00 INFO: clearing end 2020-09-04 22:02:00 INFO: 2020-09-04 22:02:00 INFO: 2020-09-04 22:02:00 INFO: 2020-09-04 22:02:00 INFO: 2020-09-04 23:00:20 INFO: 2020-09-04 23:00:20 INFO: 2020-09-04 23:00:20 INFO: 2020-09-04 23:00:20 INFO: 2020-09-04 23:00:20 INFO: init new order start 2020-09-04 23:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 4, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.85, 'high': 392.85, 'low': 385.3, 'close': 392.05, 'trades': 6805, 'volume': 3263850, 'vwap': 389.03, 'lastSize': 1, 'turnover': 126973229155, 'homeNotional': 34338.21514831424, 'foreignNotional': 13358700.16274952}, {'timestamp': datetime.datetime(2020, 9, 4, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.3, 'high': 387.85, 'low': 378.85, 'close': 387.85, 'trades': 6457, 'volume': 4044120, 'vwap': 382.91, 'lastSize': 1000, 'turnover': 154851178195, 'homeNotional': 42113.01986476326, 'foreignNotional': 16125544.069096474}, {'timestamp': datetime.datetime(2020, 9, 4, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.9, 'high': 386.5, 'low': 380.15, 'close': 384.3, 'trades': 6260, 'volume': 4082189, 'vwap': 383.65, 'lastSize': 100, 'turnover': 156611860395, 'homeNotional': 42576.60371315265, 'foreignNotional': 16334455.867867198}] 2020-09-04 23:00:20 INFO: prepare candles [CandleItem(low=385.3, high=392.85, open=387.85, close=392.05, color='GREEN'), CandleItem(low=378.85, high=387.85, open=384.3, close=387.85, color='GREEN'), CandleItem(low=380.15, high=386.5, open=385.9, close=384.3, color='RED')] 2020-09-04 23:00:20 INFO: skip by colors first_candle=CandleItem(low=380.15, high=386.5, open=385.9, close=384.3, color='RED') second_candle=CandleItem(low=378.85, high=387.85, open=384.3, close=387.85, color='GREEN') last_candle=CandleItem(low=385.3, high=392.85, open=387.85, close=392.05, color='GREEN') 2020-09-04 23:00:20 INFO: check need new order None 2020-09-04 23:00:20 INFO: init new order end 2020-09-04 23:00:20 INFO: 2020-09-04 23:00:20 INFO: 2020-09-04 23:00:20 INFO: 2020-09-04 23:00:20 INFO: 2020-09-04 23:02:00 INFO: 2020-09-04 23:02:00 INFO: 2020-09-04 23:02:00 INFO: 2020-09-04 23:02:00 INFO: 2020-09-04 23:02:00 INFO: clearing start 2020-09-04 23:02:00 INFO: clearing end 2020-09-04 23:02:00 INFO: 2020-09-04 23:02:00 INFO: 2020-09-04 23:02:00 INFO: 2020-09-04 23:02:00 INFO: 2020-09-05 00:00:20 INFO: 2020-09-05 00:00:20 INFO: 2020-09-05 00:00:20 INFO: 2020-09-05 00:00:20 INFO: 2020-09-05 00:00:20 INFO: init new order start 2020-09-05 00:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 4, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.05, 'high': 393.0, 'low': 388.2, 'close': 391.85, 'trades': 4630, 'volume': 1797509, 'vwap': 391.1, 'lastSize': 900, 'turnover': 70298956275, 'homeNotional': 19017.231254545743, 'foreignNotional': 7437482.155340015}, {'timestamp': datetime.datetime(2020, 9, 4, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.85, 'high': 392.85, 'low': 385.3, 'close': 392.05, 'trades': 6805, 'volume': 3263850, 'vwap': 389.03, 'lastSize': 1, 'turnover': 126973229155, 'homeNotional': 34338.21514831424, 'foreignNotional': 13358700.16274952}, {'timestamp': datetime.datetime(2020, 9, 4, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.3, 'high': 387.85, 'low': 378.85, 'close': 387.85, 'trades': 6457, 'volume': 4044120, 'vwap': 382.91, 'lastSize': 1000, 'turnover': 154851178195, 'homeNotional': 42113.01986476326, 'foreignNotional': 16125544.069096474}] 2020-09-05 00:00:21 INFO: prepare candles [CandleItem(low=388.2, high=393.0, open=392.05, close=391.85, color='RED'), CandleItem(low=385.3, high=392.85, open=387.85, close=392.05, color='GREEN'), CandleItem(low=378.85, high=387.85, open=384.3, close=387.85, color='GREEN')] 2020-09-05 00:00:21 INFO: last_candle=CandleItem(low=388.2, high=393.0, open=392.05, close=391.85, color='RED') 2020-09-05 00:00:21 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-09-05 00:00:21 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=388.2, high=393.0, open=392.05, close=391.85, color='RED') 2020-09-05 00:00:21 INFO: skip by CandleItem(low=388.2, high=393.0, open=392.05, close=391.85, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-05 00:00:21 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-09-05 00:00:21 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=388.2, high=393.0, open=392.05, close=391.85, color='RED') 2020-09-05 00:00:21 INFO: skip by CandleItem(low=388.2, high=393.0, open=392.05, close=391.85, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-05 00:00:21 INFO: not found applicable config for candle 2020-09-05 00:00:21 INFO: check need new order None 2020-09-05 00:00:21 INFO: init new order end 2020-09-05 00:00:21 INFO: 2020-09-05 00:00:21 INFO: 2020-09-05 00:00:21 INFO: 2020-09-05 00:00:21 INFO: 2020-09-05 00:02:00 INFO: 2020-09-05 00:02:00 INFO: 2020-09-05 00:02:00 INFO: 2020-09-05 00:02:00 INFO: 2020-09-05 00:02:00 INFO: clearing start 2020-09-05 00:02:00 INFO: clearing end 2020-09-05 00:02:00 INFO: 2020-09-05 00:02:00 INFO: 2020-09-05 00:02:00 INFO: 2020-09-05 00:02:00 INFO: 2020-09-05 01:00:20 INFO: 2020-09-05 01:00:20 INFO: 2020-09-05 01:00:20 INFO: 2020-09-05 01:00:20 INFO: 2020-09-05 01:00:20 INFO: init new order start 2020-09-05 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 4, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.85, 'high': 393.25, 'low': 388.2, 'close': 388.95, 'trades': 3233, 'volume': 1425470, 'vwap': 390.42, 'lastSize': 30, 'turnover': 55653049755, 'homeNotional': 15086.298322872513, 'foreignNotional': 5890011.250926215}, {'timestamp': datetime.datetime(2020, 9, 4, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.05, 'high': 393.0, 'low': 388.2, 'close': 391.85, 'trades': 4630, 'volume': 1797509, 'vwap': 391.1, 'lastSize': 900, 'turnover': 70298956275, 'homeNotional': 19017.231254545743, 'foreignNotional': 7437482.155340015}, {'timestamp': datetime.datetime(2020, 9, 4, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.85, 'high': 392.85, 'low': 385.3, 'close': 392.05, 'trades': 6805, 'volume': 3263850, 'vwap': 389.03, 'lastSize': 1, 'turnover': 126973229155, 'homeNotional': 34338.21514831424, 'foreignNotional': 13358700.16274952}] 2020-09-05 01:00:20 INFO: prepare candles [CandleItem(low=388.2, high=393.25, open=391.85, close=388.95, color='RED'), CandleItem(low=388.2, high=393.0, open=392.05, close=391.85, color='RED'), CandleItem(low=385.3, high=392.85, open=387.85, close=392.05, color='GREEN')] 2020-09-05 01:00:20 INFO: skip by colors first_candle=CandleItem(low=385.3, high=392.85, open=387.85, close=392.05, color='GREEN') second_candle=CandleItem(low=388.2, high=393.0, open=392.05, close=391.85, color='RED') last_candle=CandleItem(low=388.2, high=393.25, open=391.85, close=388.95, color='RED') 2020-09-05 01:00:20 INFO: check need new order None 2020-09-05 01:00:20 INFO: init new order end 2020-09-05 01:00:20 INFO: 2020-09-05 01:00:20 INFO: 2020-09-05 01:00:20 INFO: 2020-09-05 01:00:20 INFO: 2020-09-05 01:02:00 INFO: 2020-09-05 01:02:00 INFO: 2020-09-05 01:02:00 INFO: 2020-09-05 01:02:00 INFO: 2020-09-05 01:02:00 INFO: clearing start 2020-09-05 01:02:00 INFO: clearing end 2020-09-05 01:02:00 INFO: 2020-09-05 01:02:00 INFO: 2020-09-05 01:02:00 INFO: 2020-09-05 01:02:00 INFO: 2020-09-05 02:00:20 INFO: 2020-09-05 02:00:20 INFO: 2020-09-05 02:00:20 INFO: 2020-09-05 02:00:20 INFO: 2020-09-05 02:00:20 INFO: init new order start 2020-09-05 02:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 4, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.95, 'high': 393.85, 'low': 386.75, 'close': 388.25, 'trades': 4869, 'volume': 2013276, 'vwap': 390.47, 'lastSize': 14, 'turnover': 78611661745, 'homeNotional': 21232.828739553548, 'foreignNotional': 8290795.077648085}, {'timestamp': datetime.datetime(2020, 9, 4, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.85, 'high': 393.25, 'low': 388.2, 'close': 388.95, 'trades': 3233, 'volume': 1425470, 'vwap': 390.42, 'lastSize': 30, 'turnover': 55653049755, 'homeNotional': 15086.298322872513, 'foreignNotional': 5890011.250926215}, {'timestamp': datetime.datetime(2020, 9, 4, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.05, 'high': 393.0, 'low': 388.2, 'close': 391.85, 'trades': 4630, 'volume': 1797509, 'vwap': 391.1, 'lastSize': 900, 'turnover': 70298956275, 'homeNotional': 19017.231254545743, 'foreignNotional': 7437482.155340015}] 2020-09-05 02:00:21 INFO: prepare candles [CandleItem(low=386.75, high=393.85, open=388.95, close=388.25, color='RED'), CandleItem(low=388.2, high=393.25, open=391.85, close=388.95, color='RED'), CandleItem(low=388.2, high=393.0, open=392.05, close=391.85, color='RED')] 2020-09-05 02:00:21 INFO: skip by colors first_candle=CandleItem(low=388.2, high=393.0, open=392.05, close=391.85, color='RED') second_candle=CandleItem(low=388.2, high=393.25, open=391.85, close=388.95, color='RED') last_candle=CandleItem(low=386.75, high=393.85, open=388.95, close=388.25, color='RED') 2020-09-05 02:00:21 INFO: check need new order None 2020-09-05 02:00:21 INFO: init new order end 2020-09-05 02:00:21 INFO: 2020-09-05 02:00:21 INFO: 2020-09-05 02:00:21 INFO: 2020-09-05 02:00:21 INFO: 2020-09-05 02:02:00 INFO: 2020-09-05 02:02:00 INFO: 2020-09-05 02:02:00 INFO: 2020-09-05 02:02:00 INFO: 2020-09-05 02:02:00 INFO: clearing start 2020-09-05 02:02:00 INFO: clearing end 2020-09-05 02:02:00 INFO: 2020-09-05 02:02:00 INFO: 2020-09-05 02:02:00 INFO: 2020-09-05 02:02:00 INFO: 2020-09-05 03:00:20 INFO: 2020-09-05 03:00:20 INFO: 2020-09-05 03:00:20 INFO: 2020-09-05 03:00:20 INFO: 2020-09-05 03:00:20 INFO: init new order start 2020-09-05 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 5, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.25, 'high': 389.1, 'low': 385.0, 'close': 386.1, 'trades': 3306, 'volume': 1660011, 'vwap': 386.78, 'lastSize': 92, 'turnover': 64205522450, 'homeNotional': 17378.646638014827, 'foreignNotional': 6721686.775281635}, {'timestamp': datetime.datetime(2020, 9, 4, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.95, 'high': 393.85, 'low': 386.75, 'close': 388.25, 'trades': 4869, 'volume': 2013276, 'vwap': 390.47, 'lastSize': 14, 'turnover': 78611661745, 'homeNotional': 21232.828739553548, 'foreignNotional': 8290795.077648085}, {'timestamp': datetime.datetime(2020, 9, 4, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.85, 'high': 393.25, 'low': 388.2, 'close': 388.95, 'trades': 3233, 'volume': 1425470, 'vwap': 390.42, 'lastSize': 30, 'turnover': 55653049755, 'homeNotional': 15086.298322872513, 'foreignNotional': 5890011.250926215}] 2020-09-05 03:00:20 INFO: prepare candles [CandleItem(low=385.0, high=389.1, open=388.25, close=386.1, color='RED'), CandleItem(low=386.75, high=393.85, open=388.95, close=388.25, color='RED'), CandleItem(low=388.2, high=393.25, open=391.85, close=388.95, color='RED')] 2020-09-05 03:00:20 INFO: skip by colors first_candle=CandleItem(low=388.2, high=393.25, open=391.85, close=388.95, color='RED') second_candle=CandleItem(low=386.75, high=393.85, open=388.95, close=388.25, color='RED') last_candle=CandleItem(low=385.0, high=389.1, open=388.25, close=386.1, color='RED') 2020-09-05 03:00:20 INFO: check need new order None 2020-09-05 03:00:20 INFO: init new order end 2020-09-05 03:00:20 INFO: 2020-09-05 03:00:20 INFO: 2020-09-05 03:00:20 INFO: 2020-09-05 03:00:20 INFO: 2020-09-05 03:02:00 INFO: 2020-09-05 03:02:00 INFO: 2020-09-05 03:02:00 INFO: 2020-09-05 03:02:00 INFO: 2020-09-05 03:02:00 INFO: clearing start 2020-09-05 03:02:00 INFO: clearing end 2020-09-05 03:02:00 INFO: 2020-09-05 03:02:00 INFO: 2020-09-05 03:02:00 INFO: 2020-09-05 03:02:00 INFO: 2020-09-05 04:00:20 INFO: 2020-09-05 04:00:20 INFO: 2020-09-05 04:00:20 INFO: 2020-09-05 04:00:20 INFO: 2020-09-05 04:00:20 INFO: init new order start 2020-09-05 04:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 5, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.1, 'high': 395.2, 'low': 385.0, 'close': 389.5, 'trades': 5215, 'volume': 3190577, 'vwap': 390.19, 'lastSize': 2, 'turnover': 124490020180, 'homeNotional': 33517.503183880006, 'foreignNotional': 13078050.353813084}, {'timestamp': datetime.datetime(2020, 9, 5, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.25, 'high': 389.1, 'low': 385.0, 'close': 386.1, 'trades': 3306, 'volume': 1660011, 'vwap': 386.78, 'lastSize': 92, 'turnover': 64205522450, 'homeNotional': 17378.646638014827, 'foreignNotional': 6721686.775281635}, {'timestamp': datetime.datetime(2020, 9, 4, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.95, 'high': 393.85, 'low': 386.75, 'close': 388.25, 'trades': 4869, 'volume': 2013276, 'vwap': 390.47, 'lastSize': 14, 'turnover': 78611661745, 'homeNotional': 21232.828739553548, 'foreignNotional': 8290795.077648085}] 2020-09-05 04:00:21 INFO: prepare candles [CandleItem(low=385.0, high=395.2, open=386.1, close=389.5, color='GREEN'), CandleItem(low=385.0, high=389.1, open=388.25, close=386.1, color='RED'), CandleItem(low=386.75, high=393.85, open=388.95, close=388.25, color='RED')] 2020-09-05 04:00:21 INFO: last_candle=CandleItem(low=385.0, high=395.2, open=386.1, close=389.5, color='GREEN') 2020-09-05 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-05 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=385.0, high=395.2, open=386.1, close=389.5, color='GREEN') 2020-09-05 04:00:21 INFO: skip by CandleItem(low=385.0, high=395.2, open=386.1, close=389.5, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-05 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-05 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=385.0, high=395.2, open=386.1, close=389.5, color='GREEN') 2020-09-05 04:00:21 INFO: skip by CandleItem(low=385.0, high=395.2, open=386.1, close=389.5, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-05 04:00:21 INFO: not found applicable config for candle 2020-09-05 04:00:21 INFO: check need new order None 2020-09-05 04:00:21 INFO: init new order end 2020-09-05 04:00:21 INFO: 2020-09-05 04:00:21 INFO: 2020-09-05 04:00:21 INFO: 2020-09-05 04:00:21 INFO: 2020-09-05 04:02:00 INFO: 2020-09-05 04:02:00 INFO: 2020-09-05 04:02:00 INFO: 2020-09-05 04:02:00 INFO: 2020-09-05 04:02:00 INFO: clearing start 2020-09-05 04:02:00 INFO: clearing end 2020-09-05 04:02:00 INFO: 2020-09-05 04:02:00 INFO: 2020-09-05 04:02:00 INFO: 2020-09-05 04:02:00 INFO: 2020-09-05 05:00:20 INFO: 2020-09-05 05:00:20 INFO: 2020-09-05 05:00:20 INFO: 2020-09-05 05:00:20 INFO: 2020-09-05 05:00:20 INFO: init new order start 2020-09-05 05:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 5, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.5, 'high': 393.25, 'low': 385.85, 'close': 391.4, 'trades': 3771, 'volume': 2033170, 'vwap': 389.28, 'lastSize': 100, 'turnover': 79146760610, 'homeNotional': 21287.787795647033, 'foreignNotional': 8286981.964158943}, {'timestamp': datetime.datetime(2020, 9, 5, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.1, 'high': 395.2, 'low': 385.0, 'close': 389.5, 'trades': 5215, 'volume': 3190577, 'vwap': 390.19, 'lastSize': 2, 'turnover': 124490020180, 'homeNotional': 33517.503183880006, 'foreignNotional': 13078050.353813084}, {'timestamp': datetime.datetime(2020, 9, 5, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.25, 'high': 389.1, 'low': 385.0, 'close': 386.1, 'trades': 3306, 'volume': 1660011, 'vwap': 386.78, 'lastSize': 92, 'turnover': 64205522450, 'homeNotional': 17378.646638014827, 'foreignNotional': 6721686.775281635}] 2020-09-05 05:00:21 INFO: prepare candles [CandleItem(low=385.85, high=393.25, open=389.5, close=391.4, color='GREEN'), CandleItem(low=385.0, high=395.2, open=386.1, close=389.5, color='GREEN'), CandleItem(low=385.0, high=389.1, open=388.25, close=386.1, color='RED')] 2020-09-05 05:00:21 INFO: skip by colors first_candle=CandleItem(low=385.0, high=389.1, open=388.25, close=386.1, color='RED') second_candle=CandleItem(low=385.0, high=395.2, open=386.1, close=389.5, color='GREEN') last_candle=CandleItem(low=385.85, high=393.25, open=389.5, close=391.4, color='GREEN') 2020-09-05 05:00:21 INFO: check need new order None 2020-09-05 05:00:21 INFO: init new order end 2020-09-05 05:00:21 INFO: 2020-09-05 05:00:21 INFO: 2020-09-05 05:00:21 INFO: 2020-09-05 05:00:21 INFO: 2020-09-05 05:02:00 INFO: 2020-09-05 05:02:00 INFO: 2020-09-05 05:02:00 INFO: 2020-09-05 05:02:00 INFO: 2020-09-05 05:02:00 INFO: clearing start 2020-09-05 05:02:00 INFO: clearing end 2020-09-05 05:02:00 INFO: 2020-09-05 05:02:00 INFO: 2020-09-05 05:02:00 INFO: 2020-09-05 05:02:00 INFO: 2020-09-05 06:00:20 INFO: 2020-09-05 06:00:20 INFO: 2020-09-05 06:00:20 INFO: 2020-09-05 06:00:20 INFO: 2020-09-05 06:00:20 INFO: init new order start 2020-09-05 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 5, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.4, 'high': 392.4, 'low': 387.4, 'close': 388.3, 'trades': 3915, 'volume': 2005640, 'vwap': 389.61, 'lastSize': 75, 'turnover': 78139800500, 'homeNotional': 20978.678609730337, 'foreignNotional': 8173359.729622073}, {'timestamp': datetime.datetime(2020, 9, 5, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.5, 'high': 393.25, 'low': 385.85, 'close': 391.4, 'trades': 3771, 'volume': 2033170, 'vwap': 389.28, 'lastSize': 100, 'turnover': 79146760610, 'homeNotional': 21287.787795647033, 'foreignNotional': 8286981.964158943}, {'timestamp': datetime.datetime(2020, 9, 5, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.1, 'high': 395.2, 'low': 385.0, 'close': 389.5, 'trades': 5215, 'volume': 3190577, 'vwap': 390.19, 'lastSize': 2, 'turnover': 124490020180, 'homeNotional': 33517.503183880006, 'foreignNotional': 13078050.353813084}] 2020-09-05 06:00:20 INFO: prepare candles [CandleItem(low=387.4, high=392.4, open=391.4, close=388.3, color='RED'), CandleItem(low=385.85, high=393.25, open=389.5, close=391.4, color='GREEN'), CandleItem(low=385.0, high=395.2, open=386.1, close=389.5, color='GREEN')] 2020-09-05 06:00:20 INFO: last_candle=CandleItem(low=387.4, high=392.4, open=391.4, close=388.3, color='RED') 2020-09-05 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-05 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=387.4, high=392.4, open=391.4, close=388.3, color='RED') 2020-09-05 06:00:20 INFO: skip by CandleItem(low=387.4, high=392.4, open=391.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-05 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-05 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=387.4, high=392.4, open=391.4, close=388.3, color='RED') 2020-09-05 06:00:20 INFO: skip by CandleItem(low=387.4, high=392.4, open=391.4, close=388.3, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-05 06:00:20 INFO: not found applicable config for candle 2020-09-05 06:00:20 INFO: check need new order None 2020-09-05 06:00:20 INFO: init new order end 2020-09-05 06:00:20 INFO: 2020-09-05 06:00:20 INFO: 2020-09-05 06:00:20 INFO: 2020-09-05 06:00:20 INFO: 2020-09-05 06:02:00 INFO: 2020-09-05 06:02:00 INFO: 2020-09-05 06:02:00 INFO: 2020-09-05 06:02:00 INFO: 2020-09-05 06:02:00 INFO: clearing start 2020-09-05 06:02:00 INFO: clearing end 2020-09-05 06:02:00 INFO: 2020-09-05 06:02:00 INFO: 2020-09-05 06:02:00 INFO: 2020-09-05 06:02:00 INFO: 2020-09-05 07:00:20 INFO: 2020-09-05 07:00:20 INFO: 2020-09-05 07:00:20 INFO: 2020-09-05 07:00:20 INFO: 2020-09-05 07:00:20 INFO: init new order start 2020-09-05 07:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 5, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.3, 'high': 391.05, 'low': 386.8, 'close': 387.55, 'trades': 3429, 'volume': 2270082, 'vwap': 388.68, 'lastSize': 50, 'turnover': 88233214275, 'homeNotional': 23683.74849480704, 'foreignNotional': 9205403.3699787}, {'timestamp': datetime.datetime(2020, 9, 5, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.4, 'high': 392.4, 'low': 387.4, 'close': 388.3, 'trades': 3915, 'volume': 2005640, 'vwap': 389.61, 'lastSize': 75, 'turnover': 78139800500, 'homeNotional': 20978.678609730337, 'foreignNotional': 8173359.729622073}, {'timestamp': datetime.datetime(2020, 9, 5, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.5, 'high': 393.25, 'low': 385.85, 'close': 391.4, 'trades': 3771, 'volume': 2033170, 'vwap': 389.28, 'lastSize': 100, 'turnover': 79146760610, 'homeNotional': 21287.787795647033, 'foreignNotional': 8286981.964158943}] 2020-09-05 07:00:20 INFO: prepare candles [CandleItem(low=386.8, high=391.05, open=388.3, close=387.55, color='RED'), CandleItem(low=387.4, high=392.4, open=391.4, close=388.3, color='RED'), CandleItem(low=385.85, high=393.25, open=389.5, close=391.4, color='GREEN')] 2020-09-05 07:00:20 INFO: skip by colors first_candle=CandleItem(low=385.85, high=393.25, open=389.5, close=391.4, color='GREEN') second_candle=CandleItem(low=387.4, high=392.4, open=391.4, close=388.3, color='RED') last_candle=CandleItem(low=386.8, high=391.05, open=388.3, close=387.55, color='RED') 2020-09-05 07:00:20 INFO: check need new order None 2020-09-05 07:00:20 INFO: init new order end 2020-09-05 07:00:20 INFO: 2020-09-05 07:00:20 INFO: 2020-09-05 07:00:20 INFO: 2020-09-05 07:00:20 INFO: 2020-09-05 07:02:00 INFO: 2020-09-05 07:02:00 INFO: 2020-09-05 07:02:00 INFO: 2020-09-05 07:02:00 INFO: 2020-09-05 07:02:00 INFO: clearing start 2020-09-05 07:02:00 INFO: clearing end 2020-09-05 07:02:00 INFO: 2020-09-05 07:02:00 INFO: 2020-09-05 07:02:00 INFO: 2020-09-05 07:02:00 INFO: 2020-09-05 08:00:20 INFO: 2020-09-05 08:00:20 INFO: 2020-09-05 08:00:20 INFO: 2020-09-05 08:00:20 INFO: 2020-09-05 08:00:20 INFO: init new order start 2020-09-05 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 5, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.55, 'high': 389.95, 'low': 385.35, 'close': 385.45, 'trades': 4256, 'volume': 2955000, 'vwap': 387.44, 'lastSize': 3000, 'turnover': 114485669565, 'homeNotional': 30808.572617723617, 'foreignNotional': 11936199.230931688}, {'timestamp': datetime.datetime(2020, 9, 5, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.3, 'high': 391.05, 'low': 386.8, 'close': 387.55, 'trades': 3429, 'volume': 2270082, 'vwap': 388.68, 'lastSize': 50, 'turnover': 88233214275, 'homeNotional': 23683.74849480704, 'foreignNotional': 9205403.3699787}, {'timestamp': datetime.datetime(2020, 9, 5, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.4, 'high': 392.4, 'low': 387.4, 'close': 388.3, 'trades': 3915, 'volume': 2005640, 'vwap': 389.61, 'lastSize': 75, 'turnover': 78139800500, 'homeNotional': 20978.678609730337, 'foreignNotional': 8173359.729622073}] 2020-09-05 08:00:20 INFO: prepare candles [CandleItem(low=385.35, high=389.95, open=387.55, close=385.45, color='RED'), CandleItem(low=386.8, high=391.05, open=388.3, close=387.55, color='RED'), CandleItem(low=387.4, high=392.4, open=391.4, close=388.3, color='RED')] 2020-09-05 08:00:20 INFO: skip by colors first_candle=CandleItem(low=387.4, high=392.4, open=391.4, close=388.3, color='RED') second_candle=CandleItem(low=386.8, high=391.05, open=388.3, close=387.55, color='RED') last_candle=CandleItem(low=385.35, high=389.95, open=387.55, close=385.45, color='RED') 2020-09-05 08:00:20 INFO: check need new order None 2020-09-05 08:00:20 INFO: init new order end 2020-09-05 08:00:20 INFO: 2020-09-05 08:00:20 INFO: 2020-09-05 08:00:20 INFO: 2020-09-05 08:00:20 INFO: 2020-09-05 08:02:00 INFO: 2020-09-05 08:02:00 INFO: 2020-09-05 08:02:00 INFO: 2020-09-05 08:02:00 INFO: 2020-09-05 08:02:00 INFO: clearing start 2020-09-05 08:02:00 INFO: clearing end 2020-09-05 08:02:00 INFO: 2020-09-05 08:02:00 INFO: 2020-09-05 08:02:00 INFO: 2020-09-05 08:02:00 INFO: 2020-09-05 09:00:20 INFO: 2020-09-05 09:00:20 INFO: 2020-09-05 09:00:20 INFO: 2020-09-05 09:00:20 INFO: 2020-09-05 09:00:20 INFO: init new order start 2020-09-05 09:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 5, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.45, 'high': 386.4, 'low': 381.5, 'close': 382.35, 'trades': 4556, 'volume': 3142291, 'vwap': 384.04, 'lastSize': 3000, 'turnover': 120675776430, 'homeNotional': 32773.33142581618, 'foreignNotional': 12586221.242885035}, {'timestamp': datetime.datetime(2020, 9, 5, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.55, 'high': 389.95, 'low': 385.35, 'close': 385.45, 'trades': 4256, 'volume': 2955000, 'vwap': 387.44, 'lastSize': 3000, 'turnover': 114485669565, 'homeNotional': 30808.572617723617, 'foreignNotional': 11936199.230931688}, {'timestamp': datetime.datetime(2020, 9, 5, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.3, 'high': 391.05, 'low': 386.8, 'close': 387.55, 'trades': 3429, 'volume': 2270082, 'vwap': 388.68, 'lastSize': 50, 'turnover': 88233214275, 'homeNotional': 23683.74849480704, 'foreignNotional': 9205403.3699787}] 2020-09-05 09:00:20 INFO: prepare candles [CandleItem(low=381.5, high=386.4, open=385.45, close=382.35, color='RED'), CandleItem(low=385.35, high=389.95, open=387.55, close=385.45, color='RED'), CandleItem(low=386.8, high=391.05, open=388.3, close=387.55, color='RED')] 2020-09-05 09:00:20 INFO: skip by colors first_candle=CandleItem(low=386.8, high=391.05, open=388.3, close=387.55, color='RED') second_candle=CandleItem(low=385.35, high=389.95, open=387.55, close=385.45, color='RED') last_candle=CandleItem(low=381.5, high=386.4, open=385.45, close=382.35, color='RED') 2020-09-05 09:00:20 INFO: check need new order None 2020-09-05 09:00:20 INFO: init new order end 2020-09-05 09:00:20 INFO: 2020-09-05 09:00:20 INFO: 2020-09-05 09:00:20 INFO: 2020-09-05 09:00:20 INFO: 2020-09-05 09:02:00 INFO: 2020-09-05 09:02:00 INFO: 2020-09-05 09:02:00 INFO: 2020-09-05 09:02:00 INFO: 2020-09-05 09:02:00 INFO: clearing start 2020-09-05 09:02:00 INFO: clearing end 2020-09-05 09:02:00 INFO: 2020-09-05 09:02:00 INFO: 2020-09-05 09:02:00 INFO: 2020-09-05 09:02:00 INFO: 2020-09-05 10:00:20 INFO: 2020-09-05 10:00:20 INFO: 2020-09-05 10:00:20 INFO: 2020-09-05 10:00:20 INFO: 2020-09-05 10:00:20 INFO: init new order start 2020-09-05 10:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 5, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.35, 'high': 388.7, 'low': 381.65, 'close': 386.6, 'trades': 3906, 'volume': 2708213, 'vwap': 385.99, 'lastSize': 10, 'turnover': 104533533520, 'homeNotional': 28323.031667603907, 'foreignNotional': 10932493.002708161}, {'timestamp': datetime.datetime(2020, 9, 5, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.45, 'high': 386.4, 'low': 381.5, 'close': 382.35, 'trades': 4556, 'volume': 3142291, 'vwap': 384.04, 'lastSize': 3000, 'turnover': 120675776430, 'homeNotional': 32773.33142581618, 'foreignNotional': 12586221.242885035}, {'timestamp': datetime.datetime(2020, 9, 5, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.55, 'high': 389.95, 'low': 385.35, 'close': 385.45, 'trades': 4256, 'volume': 2955000, 'vwap': 387.44, 'lastSize': 3000, 'turnover': 114485669565, 'homeNotional': 30808.572617723617, 'foreignNotional': 11936199.230931688}] 2020-09-05 10:00:20 INFO: prepare candles [CandleItem(low=381.65, high=388.7, open=382.35, close=386.6, color='GREEN'), CandleItem(low=381.5, high=386.4, open=385.45, close=382.35, color='RED'), CandleItem(low=385.35, high=389.95, open=387.55, close=385.45, color='RED')] 2020-09-05 10:00:20 INFO: last_candle=CandleItem(low=381.65, high=388.7, open=382.35, close=386.6, color='GREEN') 2020-09-05 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-05 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=381.65, high=388.7, open=382.35, close=386.6, color='GREEN') 2020-09-05 10:00:20 INFO: skip by CandleItem(low=381.65, high=388.7, open=382.35, close=386.6, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-05 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-05 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=381.65, high=388.7, open=382.35, close=386.6, color='GREEN') 2020-09-05 10:00:20 INFO: apply filter None to candle=CandleItem(low=381.5, high=386.4, open=385.45, close=382.35, color='RED') 2020-09-05 10:00:20 INFO: apply filter None to candle=CandleItem(low=385.35, high=389.95, open=387.55, close=385.45, color='RED') 2020-09-05 10:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=381.65, high=388.7, open=382.35, close=386.6, color='GREEN'), take_profit_factor=5.0, clearing_interval=3600) 2020-09-05 10:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=381.65, high=388.7, open=382.35, close=386.6, color='GREEN'), take_profit_factor=5.0, clearing_interval=3600) 2020-09-05 10:00:20 INFO: place order: start candle=CandleItem(low=381.65, high=388.7, open=382.35, close=386.6, color='GREEN') ticker='ETHUSD' price_offset=0.1 2020-09-05 10:00:20 INFO: place order: side_factor=-1 init_trigger_price=388.75 init_order_price=388.8 stop_price_offset=0.0 candle.size=7.050000000000011 stop_price=381.65 take_price=424.05000000000007 2020-09-05 10:00:20 INFO: place order round: side_factor=-1 init_trigger_price=Decimal('388.75') init_order_price=Decimal('388.80000000000001136868377216160297393798828125') stop_price_offset=0.0 candle.size=7.050000000000011 stop_price=Decimal('381.6499999999999772626324556767940521240234375') take_price=Decimal('424.0500000000000682121026329696178436279296875') 2020-09-05 10:00:20 INFO: place order: compute qty=268 2020-09-05 10:00:20 INFO: place order: save order to db a3b7cdbc3d3a4181999ed65fde06d844; response=True 2020-09-05 10:00:20 INFO: post order to exchange resp={'orderID': 'de386a3a-389c-c000-1e31-b46f48b84011', 'clOrdID': 'a3b7cdbc3d3a4181999ed65fde06d844', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 268, 'price': 388.8, 'displayQty': None, 'stopPx': 388.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': 268, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 5, 7, 0, 20, 816000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 5, 7, 0, 20, 816000, tzinfo=tzutc())} 2020-09-05 10:00:20 INFO: place new init order {'qty': 268, 'init_price': Decimal('388.75'), 'stop_price': Decimal('381.6499999999999772626324556767940521240234375'), 'take_price': Decimal('424.0500000000000682121026329696178436279296875'), 'order_uid': 'a3b7cdbc3d3a4181999ed65fde06d844', 'response': {'orderID': 'de386a3a-389c-c000-1e31-b46f48b84011', 'clOrdID': 'a3b7cdbc3d3a4181999ed65fde06d844', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 268, 'price': 388.8, 'displayQty': None, 'stopPx': 388.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': 268, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 5, 7, 0, 20, 816000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 5, 7, 0, 20, 816000, tzinfo=tzutc())}} 2020-09-05 10:00:20 INFO: init new order end 2020-09-05 10:00:20 INFO: 2020-09-05 10:00:20 INFO: 2020-09-05 10:00:20 INFO: 2020-09-05 10:00:20 INFO: 2020-09-05 10:00:20 INFO: process event {'orderID': 'de386a3a-389c-c000-1e31-b46f48b84011', 'clOrdID': 'a3b7cdbc3d3a4181999ed65fde06d844', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 268, 'price': 388.8, 'displayQty': None, 'stopPx': 388.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': 268, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-09-05T07:00:20.816Z', 'timestamp': '2020-09-05T07:00:20.816Z'} 2020-09-05 10:00:20 INFO: skip event a3b7cdbc3d3a4181999ed65fde06d844 New 2020-09-05 10:02:00 INFO: 2020-09-05 10:02:00 INFO: 2020-09-05 10:02:00 INFO: 2020-09-05 10:02:00 INFO: 2020-09-05 10:02:00 INFO: clearing start 2020-09-05 10:02:01 INFO: fetch_orders_for_clearing test order {'orderID': 'de386a3a-389c-c000-1e31-b46f48b84011', 'clOrdID': 'a3b7cdbc3d3a4181999ed65fde06d844', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 268, 'price': 388.8, 'displayQty': None, 'stopPx': 388.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': 268, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 5, 7, 0, 20, 816000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 5, 7, 0, 20, 816000, tzinfo=tzutc())} 2020-09-05 10:02:01 INFO: order time=2020-09-05 07:00:20.816000+00:00; delta from now UTC=0:01:40.209257 time_delta.total_seconds()=100.209257; time_diff_offset='3600' 2020-09-05 10:02:01 INFO: skip by time diff 2020-09-05 07:00:20.816000+00:00 2020-09-05 10:02:01 INFO: clearing end 2020-09-05 10:02:01 INFO: 2020-09-05 10:02:01 INFO: 2020-09-05 10:02:01 INFO: 2020-09-05 10:02:01 INFO: 2020-09-05 11:00:20 INFO: 2020-09-05 11:00:20 INFO: 2020-09-05 11:00:20 INFO: 2020-09-05 11:00:20 INFO: 2020-09-05 11:00:20 INFO: init new order start 2020-09-05 11:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 5, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.6, 'high': 386.55, 'low': 378.8, 'close': 381.3, 'trades': 4918, 'volume': 3436911, 'vwap': 381.9, 'lastSize': 1, 'turnover': 131253632495, 'homeNotional': 35823.03975482216, 'foreignNotional': 13680839.28183438}, {'timestamp': datetime.datetime(2020, 9, 5, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.35, 'high': 388.7, 'low': 381.65, 'close': 386.6, 'trades': 3906, 'volume': 2708213, 'vwap': 385.99, 'lastSize': 10, 'turnover': 104533533520, 'homeNotional': 28323.031667603907, 'foreignNotional': 10932493.002708161}, {'timestamp': datetime.datetime(2020, 9, 5, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.45, 'high': 386.4, 'low': 381.5, 'close': 382.35, 'trades': 4556, 'volume': 3142291, 'vwap': 384.04, 'lastSize': 3000, 'turnover': 120675776430, 'homeNotional': 32773.33142581618, 'foreignNotional': 12586221.242885035}] 2020-09-05 11:00:20 INFO: prepare candles [CandleItem(low=378.8, high=386.55, open=386.6, close=381.3, color='RED'), CandleItem(low=381.65, high=388.7, open=382.35, close=386.6, color='GREEN'), CandleItem(low=381.5, high=386.4, open=385.45, close=382.35, color='RED')] 2020-09-05 11:00:20 INFO: skip by colors first_candle=CandleItem(low=381.5, high=386.4, open=385.45, close=382.35, color='RED') second_candle=CandleItem(low=381.65, high=388.7, open=382.35, close=386.6, color='GREEN') last_candle=CandleItem(low=378.8, high=386.55, open=386.6, close=381.3, color='RED') 2020-09-05 11:00:20 INFO: check need new order None 2020-09-05 11:00:20 INFO: init new order end 2020-09-05 11:00:20 INFO: 2020-09-05 11:00:20 INFO: 2020-09-05 11:00:20 INFO: 2020-09-05 11:00:20 INFO: 2020-09-05 11:02:00 INFO: 2020-09-05 11:02:00 INFO: 2020-09-05 11:02:00 INFO: 2020-09-05 11:02:00 INFO: 2020-09-05 11:02:00 INFO: clearing start 2020-09-05 11:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'de386a3a-389c-c000-1e31-b46f48b84011', 'clOrdID': 'a3b7cdbc3d3a4181999ed65fde06d844', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 268, 'price': 388.8, 'displayQty': None, 'stopPx': 388.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': 268, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 5, 7, 0, 20, 816000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 5, 7, 0, 20, 816000, tzinfo=tzutc())} 2020-09-05 11:02:00 INFO: order time=2020-09-05 07:00:20.816000+00:00; delta from now UTC=1:01:39.901839 time_delta.total_seconds()=3699.901839; time_diff_offset='3600' 2020-09-05 11:02:00 INFO: clear order a3b7cdbc3d3a4181999ed65fde06d844 2020-09-05 11:02:00 INFO: cancel order resp=[{'orderID': 'de386a3a-389c-c000-1e31-b46f48b84011', 'clOrdID': 'a3b7cdbc3d3a4181999ed65fde06d844', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 268, 'price': 388.8, 'displayQty': None, 'stopPx': 388.75, '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, 5, 7, 0, 20, 816000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 5, 8, 2, 0, 800000, tzinfo=tzutc())}] 2020-09-05 11:02:00 INFO: clearing end 2020-09-05 11:02:00 INFO: 2020-09-05 11:02:00 INFO: 2020-09-05 11:02:00 INFO: 2020-09-05 11:02:00 INFO: 2020-09-05 11:02:01 INFO: process event {'orderID': 'de386a3a-389c-c000-1e31-b46f48b84011', 'ordStatus': 'Canceled', 'leavesQty': 0, 'text': 'Canceled: cancelled by clearing\nInit order by supervisor.py', 'timestamp': '2020-09-05T08:02:00.800Z', 'clOrdID': 'a3b7cdbc3d3a4181999ed65fde06d844', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-05 11:02:01 INFO: skip event a3b7cdbc3d3a4181999ed65fde06d844 Canceled 2020-09-05 12:00:20 INFO: 2020-09-05 12:00:20 INFO: 2020-09-05 12:00:20 INFO: 2020-09-05 12:00:20 INFO: 2020-09-05 12:00:20 INFO: init new order start 2020-09-05 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 5, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 381.3, 'high': 381.3, 'low': 373.25, 'close': 373.4, 'trades': 6744, 'volume': 6321352, 'vwap': 377.15, 'lastSize': 4398, 'turnover': 238404592770, 'homeNotional': 65549.15009976063, 'foreignNotional': 24721491.285666015}, {'timestamp': datetime.datetime(2020, 9, 5, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.6, 'high': 386.55, 'low': 378.8, 'close': 381.3, 'trades': 4918, 'volume': 3436911, 'vwap': 381.9, 'lastSize': 1, 'turnover': 131253632495, 'homeNotional': 35823.03975482216, 'foreignNotional': 13680839.28183438}, {'timestamp': datetime.datetime(2020, 9, 5, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.35, 'high': 388.7, 'low': 381.65, 'close': 386.6, 'trades': 3906, 'volume': 2708213, 'vwap': 385.99, 'lastSize': 10, 'turnover': 104533533520, 'homeNotional': 28323.031667603907, 'foreignNotional': 10932493.002708161}] 2020-09-05 12:00:20 INFO: prepare candles [CandleItem(low=373.25, high=381.3, open=381.3, close=373.4, color='RED'), CandleItem(low=378.8, high=386.55, open=386.6, close=381.3, color='RED'), CandleItem(low=381.65, high=388.7, open=382.35, close=386.6, color='GREEN')] 2020-09-05 12:00:20 INFO: skip by colors first_candle=CandleItem(low=381.65, high=388.7, open=382.35, close=386.6, color='GREEN') second_candle=CandleItem(low=378.8, high=386.55, open=386.6, close=381.3, color='RED') last_candle=CandleItem(low=373.25, high=381.3, open=381.3, close=373.4, color='RED') 2020-09-05 12:00:20 INFO: check need new order None 2020-09-05 12:00:20 INFO: init new order end 2020-09-05 12:00:20 INFO: 2020-09-05 12:00:20 INFO: 2020-09-05 12:00:20 INFO: 2020-09-05 12:00:20 INFO: 2020-09-05 12:02:00 INFO: 2020-09-05 12:02:00 INFO: 2020-09-05 12:02:00 INFO: 2020-09-05 12:02:00 INFO: 2020-09-05 12:02:00 INFO: clearing start 2020-09-05 12:02:00 INFO: clearing end 2020-09-05 12:02:00 INFO: 2020-09-05 12:02:00 INFO: 2020-09-05 12:02:00 INFO: 2020-09-05 12:02:00 INFO: 2020-09-05 13:00:20 INFO: 2020-09-05 13:00:20 INFO: 2020-09-05 13:00:20 INFO: 2020-09-05 13:00:20 INFO: 2020-09-05 13:00:20 INFO: init new order start 2020-09-05 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 5, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 373.4, 'high': 376.4, 'low': 366.7, 'close': 367.6, 'trades': 11680, 'volume': 9601056, 'vwap': 372.02, 'lastSize': 724, 'turnover': 357176812075, 'homeNotional': 99184.2952838102, 'foreignNotional': 36898950.70446838}, {'timestamp': datetime.datetime(2020, 9, 5, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 381.3, 'high': 381.3, 'low': 373.25, 'close': 373.4, 'trades': 6744, 'volume': 6321352, 'vwap': 377.15, 'lastSize': 4398, 'turnover': 238404592770, 'homeNotional': 65549.15009976063, 'foreignNotional': 24721491.285666015}, {'timestamp': datetime.datetime(2020, 9, 5, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.6, 'high': 386.55, 'low': 378.8, 'close': 381.3, 'trades': 4918, 'volume': 3436911, 'vwap': 381.9, 'lastSize': 1, 'turnover': 131253632495, 'homeNotional': 35823.03975482216, 'foreignNotional': 13680839.28183438}] 2020-09-05 13:00:20 INFO: prepare candles [CandleItem(low=366.7, high=376.4, open=373.4, close=367.6, color='RED'), CandleItem(low=373.25, high=381.3, open=381.3, close=373.4, color='RED'), CandleItem(low=378.8, high=386.55, open=386.6, close=381.3, color='RED')] 2020-09-05 13:00:20 INFO: skip by colors first_candle=CandleItem(low=378.8, high=386.55, open=386.6, close=381.3, color='RED') second_candle=CandleItem(low=373.25, high=381.3, open=381.3, close=373.4, color='RED') last_candle=CandleItem(low=366.7, high=376.4, open=373.4, close=367.6, color='RED') 2020-09-05 13:00:20 INFO: check need new order None 2020-09-05 13:00:20 INFO: init new order end 2020-09-05 13:00:20 INFO: 2020-09-05 13:00:20 INFO: 2020-09-05 13:00:20 INFO: 2020-09-05 13:00:20 INFO: 2020-09-05 13:02:00 INFO: 2020-09-05 13:02:00 INFO: 2020-09-05 13:02:00 INFO: 2020-09-05 13:02:00 INFO: 2020-09-05 13:02:00 INFO: clearing start 2020-09-05 13:02:00 INFO: clearing end 2020-09-05 13:02:00 INFO: 2020-09-05 13:02:00 INFO: 2020-09-05 13:02:00 INFO: 2020-09-05 13:02:00 INFO: 2020-09-05 14:00:20 INFO: 2020-09-05 14:00:20 INFO: 2020-09-05 14:00:20 INFO: 2020-09-05 14:00:20 INFO: 2020-09-05 14:00:20 INFO: init new order start 2020-09-05 14:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 5, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.6, 'high': 371.5, 'low': 362.2, 'close': 363.0, 'trades': 12051, 'volume': 9042567, 'vwap': 366.94, 'lastSize': 260, 'turnover': 331804174460, 'homeNotional': 93139.4393181751, 'foreignNotional': 34176426.103596635}, {'timestamp': datetime.datetime(2020, 9, 5, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 373.4, 'high': 376.4, 'low': 366.7, 'close': 367.6, 'trades': 11680, 'volume': 9601056, 'vwap': 372.02, 'lastSize': 724, 'turnover': 357176812075, 'homeNotional': 99184.2952838102, 'foreignNotional': 36898950.70446838}, {'timestamp': datetime.datetime(2020, 9, 5, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 381.3, 'high': 381.3, 'low': 373.25, 'close': 373.4, 'trades': 6744, 'volume': 6321352, 'vwap': 377.15, 'lastSize': 4398, 'turnover': 238404592770, 'homeNotional': 65549.15009976063, 'foreignNotional': 24721491.285666015}] 2020-09-05 14:00:21 INFO: prepare candles [CandleItem(low=362.2, high=371.5, open=367.6, close=363.0, color='RED'), CandleItem(low=366.7, high=376.4, open=373.4, close=367.6, color='RED'), CandleItem(low=373.25, high=381.3, open=381.3, close=373.4, color='RED')] 2020-09-05 14:00:21 INFO: skip by colors first_candle=CandleItem(low=373.25, high=381.3, open=381.3, close=373.4, color='RED') second_candle=CandleItem(low=366.7, high=376.4, open=373.4, close=367.6, color='RED') last_candle=CandleItem(low=362.2, high=371.5, open=367.6, close=363.0, color='RED') 2020-09-05 14:00:21 INFO: check need new order None 2020-09-05 14:00:21 INFO: init new order end 2020-09-05 14:00:21 INFO: 2020-09-05 14:00:21 INFO: 2020-09-05 14:00:21 INFO: 2020-09-05 14:00:21 INFO: 2020-09-05 14:02:00 INFO: 2020-09-05 14:02:00 INFO: 2020-09-05 14:02:00 INFO: 2020-09-05 14:02:00 INFO: 2020-09-05 14:02:00 INFO: clearing start 2020-09-05 14:02:00 INFO: clearing end 2020-09-05 14:02:00 INFO: 2020-09-05 14:02:00 INFO: 2020-09-05 14:02:00 INFO: 2020-09-05 14:02:00 INFO: 2020-09-05 15:00:20 INFO: 2020-09-05 15:00:20 INFO: 2020-09-05 15:00:20 INFO: 2020-09-05 15:00:20 INFO: 2020-09-05 15:00:20 INFO: init new order start 2020-09-05 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 5, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.0, 'high': 366.65, 'low': 347.75, 'close': 356.9, 'trades': 20674, 'volume': 19955728, 'vwap': 356.35, 'lastSize': 5042, 'turnover': 711115532270, 'homeNotional': 203918.21485503498, 'foreignNotional': 72668863.35147546}, {'timestamp': datetime.datetime(2020, 9, 5, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.6, 'high': 371.5, 'low': 362.2, 'close': 363.0, 'trades': 12051, 'volume': 9042567, 'vwap': 366.94, 'lastSize': 260, 'turnover': 331804174460, 'homeNotional': 93139.4393181751, 'foreignNotional': 34176426.103596635}, {'timestamp': datetime.datetime(2020, 9, 5, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 373.4, 'high': 376.4, 'low': 366.7, 'close': 367.6, 'trades': 11680, 'volume': 9601056, 'vwap': 372.02, 'lastSize': 724, 'turnover': 357176812075, 'homeNotional': 99184.2952838102, 'foreignNotional': 36898950.70446838}] 2020-09-05 15:00:20 INFO: prepare candles [CandleItem(low=347.75, high=366.65, open=363.0, close=356.9, color='RED'), CandleItem(low=362.2, high=371.5, open=367.6, close=363.0, color='RED'), CandleItem(low=366.7, high=376.4, open=373.4, close=367.6, color='RED')] 2020-09-05 15:00:20 INFO: skip by colors first_candle=CandleItem(low=366.7, high=376.4, open=373.4, close=367.6, color='RED') second_candle=CandleItem(low=362.2, high=371.5, open=367.6, close=363.0, color='RED') last_candle=CandleItem(low=347.75, high=366.65, open=363.0, close=356.9, color='RED') 2020-09-05 15:00:20 INFO: check need new order None 2020-09-05 15:00:20 INFO: init new order end 2020-09-05 15:00:20 INFO: 2020-09-05 15:00:20 INFO: 2020-09-05 15:00:20 INFO: 2020-09-05 15:00:20 INFO: 2020-09-05 15:02:00 INFO: 2020-09-05 15:02:00 INFO: 2020-09-05 15:02:00 INFO: 2020-09-05 15:02:00 INFO: 2020-09-05 15:02:00 INFO: clearing start 2020-09-05 15:02:00 INFO: clearing end 2020-09-05 15:02:00 INFO: 2020-09-05 15:02:00 INFO: 2020-09-05 15:02:00 INFO: 2020-09-05 15:02:00 INFO: 2020-09-05 16:00:20 INFO: 2020-09-05 16:00:20 INFO: 2020-09-05 16:00:20 INFO: 2020-09-05 16:00:20 INFO: 2020-09-05 16:00:20 INFO: init new order start 2020-09-05 16:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 5, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.9, 'high': 361.1, 'low': 334.5, 'close': 336.55, 'trades': 25693, 'volume': 22155971, 'vwap': 344.68, 'lastSize': 100, 'turnover': 763660101625, 'homeNotional': 223211.06152442435, 'foreignNotional': 76945385.80688427}, {'timestamp': datetime.datetime(2020, 9, 5, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.0, 'high': 366.65, 'low': 347.75, 'close': 356.9, 'trades': 20674, 'volume': 19955728, 'vwap': 356.35, 'lastSize': 5042, 'turnover': 711115532270, 'homeNotional': 203918.21485503498, 'foreignNotional': 72668863.35147546}, {'timestamp': datetime.datetime(2020, 9, 5, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 367.6, 'high': 371.5, 'low': 362.2, 'close': 363.0, 'trades': 12051, 'volume': 9042567, 'vwap': 366.94, 'lastSize': 260, 'turnover': 331804174460, 'homeNotional': 93139.4393181751, 'foreignNotional': 34176426.103596635}] 2020-09-05 16:00:20 INFO: prepare candles [CandleItem(low=334.5, high=361.1, open=356.9, close=336.55, color='RED'), CandleItem(low=347.75, high=366.65, open=363.0, close=356.9, color='RED'), CandleItem(low=362.2, high=371.5, open=367.6, close=363.0, color='RED')] 2020-09-05 16:00:20 INFO: skip by colors first_candle=CandleItem(low=362.2, high=371.5, open=367.6, close=363.0, color='RED') second_candle=CandleItem(low=347.75, high=366.65, open=363.0, close=356.9, color='RED') last_candle=CandleItem(low=334.5, high=361.1, open=356.9, close=336.55, color='RED') 2020-09-05 16:00:20 INFO: check need new order None 2020-09-05 16:00:20 INFO: init new order end 2020-09-05 16:00:20 INFO: 2020-09-05 16:00:20 INFO: 2020-09-05 16:00:20 INFO: 2020-09-05 16:00:20 INFO: 2020-09-05 16:02:00 INFO: 2020-09-05 16:02:00 INFO: 2020-09-05 16:02:00 INFO: 2020-09-05 16:02:00 INFO: 2020-09-05 16:02:00 INFO: clearing start 2020-09-05 16:02:00 INFO: clearing end 2020-09-05 16:02:00 INFO: 2020-09-05 16:02:00 INFO: 2020-09-05 16:02:00 INFO: 2020-09-05 16:02:00 INFO: 2020-09-05 17:00:20 INFO: 2020-09-05 17:00:20 INFO: 2020-09-05 17:00:20 INFO: 2020-09-05 17:00:20 INFO: 2020-09-05 17:00:20 INFO: init new order start 2020-09-05 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 5, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 336.55, 'high': 357.0, 'low': 336.15, 'close': 357.0, 'trades': 15995, 'volume': 13288747, 'vwap': 348.42, 'lastSize': 339, 'turnover': 462999805130, 'homeNotional': 135147.84859682238, 'foreignNotional': 47093173.55369482}, {'timestamp': datetime.datetime(2020, 9, 5, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.9, 'high': 361.1, 'low': 334.5, 'close': 336.55, 'trades': 25693, 'volume': 22155971, 'vwap': 344.68, 'lastSize': 100, 'turnover': 763660101625, 'homeNotional': 223211.06152442435, 'foreignNotional': 76945385.80688427}, {'timestamp': datetime.datetime(2020, 9, 5, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 363.0, 'high': 366.65, 'low': 347.75, 'close': 356.9, 'trades': 20674, 'volume': 19955728, 'vwap': 356.35, 'lastSize': 5042, 'turnover': 711115532270, 'homeNotional': 203918.21485503498, 'foreignNotional': 72668863.35147546}] 2020-09-05 17:00:20 INFO: prepare candles [CandleItem(low=336.15, high=357.0, open=336.55, close=357.0, color='GREEN'), CandleItem(low=334.5, high=361.1, open=356.9, close=336.55, color='RED'), CandleItem(low=347.75, high=366.65, open=363.0, close=356.9, color='RED')] 2020-09-05 17:00:20 INFO: last_candle=CandleItem(low=336.15, high=357.0, open=336.55, close=357.0, color='GREEN') 2020-09-05 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-05 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=336.15, high=357.0, open=336.55, close=357.0, color='GREEN') 2020-09-05 17:00:20 INFO: skip by CandleItem(low=336.15, high=357.0, open=336.55, close=357.0, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-05 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-05 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=336.15, high=357.0, open=336.55, close=357.0, color='GREEN') 2020-09-05 17:00:20 INFO: skip by CandleItem(low=336.15, high=357.0, open=336.55, close=357.0, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-05 17:00:20 INFO: not found applicable config for candle 2020-09-05 17:00:20 INFO: check need new order None 2020-09-05 17:00:20 INFO: init new order end 2020-09-05 17:00:20 INFO: 2020-09-05 17:00:20 INFO: 2020-09-05 17:00:20 INFO: 2020-09-05 17:00:20 INFO: 2020-09-05 17:02:00 INFO: 2020-09-05 17:02:00 INFO: 2020-09-05 17:02:00 INFO: 2020-09-05 17:02:00 INFO: 2020-09-05 17:02:00 INFO: clearing start 2020-09-05 17:02:00 INFO: clearing end 2020-09-05 17:02:00 INFO: 2020-09-05 17:02:00 INFO: 2020-09-05 17:02:00 INFO: 2020-09-05 17:02:00 INFO: 2020-09-05 18:00:20 INFO: 2020-09-05 18:00:20 INFO: 2020-09-05 18:00:20 INFO: 2020-09-05 18:00:20 INFO: 2020-09-05 18:00:20 INFO: init new order start 2020-09-05 18:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 5, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.0, 'high': 359.25, 'low': 352.2, 'close': 357.6, 'trades': 7973, 'volume': 5714589, 'vwap': 355.73, 'lastSize': 5, 'turnover': 203283016125, 'homeNotional': 58810.42015596584, 'foreignNotional': 20920658.254383467}, {'timestamp': datetime.datetime(2020, 9, 5, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 336.55, 'high': 357.0, 'low': 336.15, 'close': 357.0, 'trades': 15995, 'volume': 13288747, 'vwap': 348.42, 'lastSize': 339, 'turnover': 462999805130, 'homeNotional': 135147.84859682238, 'foreignNotional': 47093173.55369482}, {'timestamp': datetime.datetime(2020, 9, 5, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.9, 'high': 361.1, 'low': 334.5, 'close': 336.55, 'trades': 25693, 'volume': 22155971, 'vwap': 344.68, 'lastSize': 100, 'turnover': 763660101625, 'homeNotional': 223211.06152442435, 'foreignNotional': 76945385.80688427}] 2020-09-05 18:00:20 INFO: prepare candles [CandleItem(low=352.2, high=359.25, open=357.0, close=357.6, color='GREEN'), CandleItem(low=336.15, high=357.0, open=336.55, close=357.0, color='GREEN'), CandleItem(low=334.5, high=361.1, open=356.9, close=336.55, color='RED')] 2020-09-05 18:00:20 INFO: skip by colors first_candle=CandleItem(low=334.5, high=361.1, open=356.9, close=336.55, color='RED') second_candle=CandleItem(low=336.15, high=357.0, open=336.55, close=357.0, color='GREEN') last_candle=CandleItem(low=352.2, high=359.25, open=357.0, close=357.6, color='GREEN') 2020-09-05 18:00:20 INFO: check need new order None 2020-09-05 18:00:20 INFO: init new order end 2020-09-05 18:00:20 INFO: 2020-09-05 18:00:20 INFO: 2020-09-05 18:00:20 INFO: 2020-09-05 18:00:20 INFO: 2020-09-05 18:02:00 INFO: 2020-09-05 18:02:00 INFO: 2020-09-05 18:02:00 INFO: 2020-09-05 18:02:00 INFO: 2020-09-05 18:02:00 INFO: clearing start 2020-09-05 18:02:00 INFO: clearing end 2020-09-05 18:02:00 INFO: 2020-09-05 18:02:00 INFO: 2020-09-05 18:02:00 INFO: 2020-09-05 18:02:00 INFO: 2020-09-05 19:00:20 INFO: 2020-09-05 19:00:20 INFO: 2020-09-05 19:00:20 INFO: 2020-09-05 19:00:20 INFO: 2020-09-05 19:00:20 INFO: init new order start 2020-09-05 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 5, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.6, 'high': 360.8, 'low': 354.15, 'close': 357.6, 'trades': 5709, 'volume': 3818079, 'vwap': 357.32, 'lastSize': 360, 'turnover': 136427597375, 'homeNotional': 39331.832702429136, 'foreignNotional': 14054152.906389084}, {'timestamp': datetime.datetime(2020, 9, 5, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.0, 'high': 359.25, 'low': 352.2, 'close': 357.6, 'trades': 7973, 'volume': 5714589, 'vwap': 355.73, 'lastSize': 5, 'turnover': 203283016125, 'homeNotional': 58810.42015596584, 'foreignNotional': 20920658.254383467}, {'timestamp': datetime.datetime(2020, 9, 5, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 336.55, 'high': 357.0, 'low': 336.15, 'close': 357.0, 'trades': 15995, 'volume': 13288747, 'vwap': 348.42, 'lastSize': 339, 'turnover': 462999805130, 'homeNotional': 135147.84859682238, 'foreignNotional': 47093173.55369482}] 2020-09-05 19:00:20 INFO: skip by found empty buckets 2020-09-05 19:00:20 INFO: check need new order None 2020-09-05 19:00:20 INFO: init new order end 2020-09-05 19:00:20 INFO: 2020-09-05 19:00:20 INFO: 2020-09-05 19:00:20 INFO: 2020-09-05 19:00:20 INFO: 2020-09-05 19:02:00 INFO: 2020-09-05 19:02:00 INFO: 2020-09-05 19:02:00 INFO: 2020-09-05 19:02:00 INFO: 2020-09-05 19:02:00 INFO: clearing start 2020-09-05 19:02:00 INFO: clearing end 2020-09-05 19:02:00 INFO: 2020-09-05 19:02:00 INFO: 2020-09-05 19:02:00 INFO: 2020-09-05 19:02:00 INFO: 2020-09-05 20:00:20 INFO: 2020-09-05 20:00:20 INFO: 2020-09-05 20:00:20 INFO: 2020-09-05 20:00:20 INFO: 2020-09-05 20:00:20 INFO: init new order start 2020-09-05 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 5, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.6, 'high': 359.75, 'low': 338.95, 'close': 352.65, 'trades': 12601, 'volume': 9362755, 'vwap': 348.84, 'lastSize': 1000, 'turnover': 326605499155, 'homeNotional': 95443.61605450902, 'foreignNotional': 33296362.48165232}, {'timestamp': datetime.datetime(2020, 9, 5, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.6, 'high': 360.8, 'low': 354.15, 'close': 357.6, 'trades': 5709, 'volume': 3818079, 'vwap': 357.32, 'lastSize': 360, 'turnover': 136427597375, 'homeNotional': 39331.832702429136, 'foreignNotional': 14054152.906389084}, {'timestamp': datetime.datetime(2020, 9, 5, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.0, 'high': 359.25, 'low': 352.2, 'close': 357.6, 'trades': 7973, 'volume': 5714589, 'vwap': 355.73, 'lastSize': 5, 'turnover': 203283016125, 'homeNotional': 58810.42015596584, 'foreignNotional': 20920658.254383467}] 2020-09-05 20:00:20 INFO: skip by found empty buckets 2020-09-05 20:00:20 INFO: check need new order None 2020-09-05 20:00:20 INFO: init new order end 2020-09-05 20:00:20 INFO: 2020-09-05 20:00:20 INFO: 2020-09-05 20:00:20 INFO: 2020-09-05 20:00:20 INFO: 2020-09-05 20:02:00 INFO: 2020-09-05 20:02:00 INFO: 2020-09-05 20:02:00 INFO: 2020-09-05 20:02:00 INFO: 2020-09-05 20:02:00 INFO: clearing start 2020-09-05 20:02:00 INFO: clearing end 2020-09-05 20:02:00 INFO: 2020-09-05 20:02:00 INFO: 2020-09-05 20:02:00 INFO: 2020-09-05 20:02:00 INFO: 2020-09-05 21:00:20 INFO: 2020-09-05 21:00:20 INFO: 2020-09-05 21:00:20 INFO: 2020-09-05 21:00:20 INFO: 2020-09-05 21:00:20 INFO: init new order start 2020-09-05 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 5, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.65, 'high': 354.9, 'low': 335.1, 'close': 340.6, 'trades': 16943, 'volume': 10055220, 'vwap': 344.33, 'lastSize': 10, 'turnover': 346229054035, 'homeNotional': 102048.28252307735, 'foreignNotional': 35140888.87137322}, {'timestamp': datetime.datetime(2020, 9, 5, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.6, 'high': 359.75, 'low': 338.95, 'close': 352.65, 'trades': 12601, 'volume': 9362755, 'vwap': 348.84, 'lastSize': 1000, 'turnover': 326605499155, 'homeNotional': 95443.61605450902, 'foreignNotional': 33296362.48165232}, {'timestamp': datetime.datetime(2020, 9, 5, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.6, 'high': 360.8, 'low': 354.15, 'close': 357.6, 'trades': 5709, 'volume': 3818079, 'vwap': 357.32, 'lastSize': 360, 'turnover': 136427597375, 'homeNotional': 39331.832702429136, 'foreignNotional': 14054152.906389084}] 2020-09-05 21:00:20 INFO: skip by found empty buckets 2020-09-05 21:00:20 INFO: check need new order None 2020-09-05 21:00:20 INFO: init new order end 2020-09-05 21:00:20 INFO: 2020-09-05 21:00:20 INFO: 2020-09-05 21:00:20 INFO: 2020-09-05 21:00:20 INFO: 2020-09-05 21:02:00 INFO: 2020-09-05 21:02:00 INFO: 2020-09-05 21:02:00 INFO: 2020-09-05 21:02:00 INFO: 2020-09-05 21:02:00 INFO: clearing start 2020-09-05 21:02:00 INFO: clearing end 2020-09-05 21:02:00 INFO: 2020-09-05 21:02:00 INFO: 2020-09-05 21:02:00 INFO: 2020-09-05 21:02:00 INFO: 2020-09-05 22:00:20 INFO: 2020-09-05 22:00:20 INFO: 2020-09-05 22:00:20 INFO: 2020-09-05 22:00:20 INFO: 2020-09-05 22:00:20 INFO: init new order start 2020-09-05 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 5, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 340.6, 'high': 345.4, 'low': 309.0, 'close': 325.45, 'trades': 24959, 'volume': 22992521, 'vwap': 326.01, 'lastSize': 700, 'turnover': 749556811765, 'homeNotional': 230778.06928680613, 'foreignNotional': 75246452.52407332}, {'timestamp': datetime.datetime(2020, 9, 5, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.65, 'high': 354.9, 'low': 335.1, 'close': 340.6, 'trades': 16943, 'volume': 10055220, 'vwap': 344.33, 'lastSize': 10, 'turnover': 346229054035, 'homeNotional': 102048.28252307735, 'foreignNotional': 35140888.87137322}, {'timestamp': datetime.datetime(2020, 9, 5, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.6, 'high': 359.75, 'low': 338.95, 'close': 352.65, 'trades': 12601, 'volume': 9362755, 'vwap': 348.84, 'lastSize': 1000, 'turnover': 326605499155, 'homeNotional': 95443.61605450902, 'foreignNotional': 33296362.48165232}] 2020-09-05 22:00:20 INFO: prepare candles [CandleItem(low=309.0, high=345.4, open=340.6, close=325.45, color='RED'), CandleItem(low=335.1, high=354.9, open=352.65, close=340.6, color='RED'), CandleItem(low=338.95, high=359.75, open=357.6, close=352.65, color='RED')] 2020-09-05 22:00:20 INFO: skip by colors first_candle=CandleItem(low=338.95, high=359.75, open=357.6, close=352.65, color='RED') second_candle=CandleItem(low=335.1, high=354.9, open=352.65, close=340.6, color='RED') last_candle=CandleItem(low=309.0, high=345.4, open=340.6, close=325.45, color='RED') 2020-09-05 22:00:20 INFO: check need new order None 2020-09-05 22:00:20 INFO: init new order end 2020-09-05 22:00:20 INFO: 2020-09-05 22:00:20 INFO: 2020-09-05 22:00:20 INFO: 2020-09-05 22:00:20 INFO: 2020-09-05 22:02:00 INFO: 2020-09-05 22:02:00 INFO: 2020-09-05 22:02:00 INFO: 2020-09-05 22:02:00 INFO: 2020-09-05 22:02:00 INFO: clearing start 2020-09-05 22:02:00 INFO: clearing end 2020-09-05 22:02:00 INFO: 2020-09-05 22:02:00 INFO: 2020-09-05 22:02:00 INFO: 2020-09-05 22:02:00 INFO: 2020-09-05 23:00:20 INFO: 2020-09-05 23:00:20 INFO: 2020-09-05 23:00:20 INFO: 2020-09-05 23:00:20 INFO: 2020-09-05 23:00:20 INFO: init new order start 2020-09-05 23:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 5, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 325.45, 'high': 334.9, 'low': 311.35, 'close': 322.9, 'trades': 23544, 'volume': 16259968, 'vwap': 321.64, 'lastSize': 500, 'turnover': 522976315825, 'homeNotional': 162740.045646843, 'foreignNotional': 52349191.542732395}, {'timestamp': datetime.datetime(2020, 9, 5, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 340.6, 'high': 345.4, 'low': 309.0, 'close': 325.45, 'trades': 24959, 'volume': 22992521, 'vwap': 326.01, 'lastSize': 700, 'turnover': 749556811765, 'homeNotional': 230778.06928680613, 'foreignNotional': 75246452.52407332}, {'timestamp': datetime.datetime(2020, 9, 5, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.65, 'high': 354.9, 'low': 335.1, 'close': 340.6, 'trades': 16943, 'volume': 10055220, 'vwap': 344.33, 'lastSize': 10, 'turnover': 346229054035, 'homeNotional': 102048.28252307735, 'foreignNotional': 35140888.87137322}] 2020-09-05 23:00:20 INFO: prepare candles [CandleItem(low=311.35, high=334.9, open=325.45, close=322.9, color='RED'), CandleItem(low=309.0, high=345.4, open=340.6, close=325.45, color='RED'), CandleItem(low=335.1, high=354.9, open=352.65, close=340.6, color='RED')] 2020-09-05 23:00:20 INFO: skip by colors first_candle=CandleItem(low=335.1, high=354.9, open=352.65, close=340.6, color='RED') second_candle=CandleItem(low=309.0, high=345.4, open=340.6, close=325.45, color='RED') last_candle=CandleItem(low=311.35, high=334.9, open=325.45, close=322.9, color='RED') 2020-09-05 23:00:20 INFO: check need new order None 2020-09-05 23:00:20 INFO: init new order end 2020-09-05 23:00:20 INFO: 2020-09-05 23:00:20 INFO: 2020-09-05 23:00:20 INFO: 2020-09-05 23:00:20 INFO: 2020-09-05 23:02:00 INFO: 2020-09-05 23:02:00 INFO: 2020-09-05 23:02:00 INFO: 2020-09-05 23:02:00 INFO: 2020-09-05 23:02:00 INFO: clearing start 2020-09-05 23:02:00 INFO: clearing end 2020-09-05 23:02:00 INFO: 2020-09-05 23:02:00 INFO: 2020-09-05 23:02:00 INFO: 2020-09-05 23:02:00 INFO: 2020-09-06 00:00:20 INFO: 2020-09-06 00:00:20 INFO: 2020-09-06 00:00:20 INFO: 2020-09-06 00:00:20 INFO: 2020-09-06 00:00:20 INFO: init new order start 2020-09-06 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 5, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 322.9, 'high': 335.2, 'low': 316.5, 'close': 332.45, 'trades': 13932, 'volume': 8044534, 'vwap': 327.16, 'lastSize': 400, 'turnover': 263182802495, 'homeNotional': 80549.35528345016, 'foreignNotional': 26354563.40043268}, {'timestamp': datetime.datetime(2020, 9, 5, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 325.45, 'high': 334.9, 'low': 311.35, 'close': 322.9, 'trades': 23544, 'volume': 16259968, 'vwap': 321.64, 'lastSize': 500, 'turnover': 522976315825, 'homeNotional': 162740.045646843, 'foreignNotional': 52349191.542732395}, {'timestamp': datetime.datetime(2020, 9, 5, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 340.6, 'high': 345.4, 'low': 309.0, 'close': 325.45, 'trades': 24959, 'volume': 22992521, 'vwap': 326.01, 'lastSize': 700, 'turnover': 749556811765, 'homeNotional': 230778.06928680613, 'foreignNotional': 75246452.52407332}] 2020-09-06 00:00:20 INFO: prepare candles [CandleItem(low=316.5, high=335.2, open=322.9, close=332.45, color='GREEN'), CandleItem(low=311.35, high=334.9, open=325.45, close=322.9, color='RED'), CandleItem(low=309.0, high=345.4, open=340.6, close=325.45, color='RED')] 2020-09-06 00:00:20 INFO: last_candle=CandleItem(low=316.5, high=335.2, open=322.9, close=332.45, color='GREEN') 2020-09-06 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-06 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=316.5, high=335.2, open=322.9, close=332.45, color='GREEN') 2020-09-06 00:00:20 INFO: skip by CandleItem(low=316.5, high=335.2, open=322.9, close=332.45, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-06 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-06 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=316.5, high=335.2, open=322.9, close=332.45, color='GREEN') 2020-09-06 00:00:20 INFO: skip by CandleItem(low=316.5, high=335.2, open=322.9, close=332.45, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-06 00:00:20 INFO: not found applicable config for candle 2020-09-06 00:00:20 INFO: check need new order None 2020-09-06 00:00:20 INFO: init new order end 2020-09-06 00:00:20 INFO: 2020-09-06 00:00:20 INFO: 2020-09-06 00:00:20 INFO: 2020-09-06 00:00:20 INFO: 2020-09-06 00:02:00 INFO: 2020-09-06 00:02:00 INFO: 2020-09-06 00:02:00 INFO: 2020-09-06 00:02:00 INFO: 2020-09-06 00:02:00 INFO: clearing start 2020-09-06 00:02:00 INFO: clearing end 2020-09-06 00:02:00 INFO: 2020-09-06 00:02:00 INFO: 2020-09-06 00:02:00 INFO: 2020-09-06 00:02:00 INFO: 2020-09-06 01:00:20 INFO: 2020-09-06 01:00:20 INFO: 2020-09-06 01:00:20 INFO: 2020-09-06 01:00:20 INFO: 2020-09-06 01:00:20 INFO: init new order start 2020-09-06 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 5, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 332.45, 'high': 334.7, 'low': 326.0, 'close': 331.05, 'trades': 7147, 'volume': 3939269, 'vwap': 329.95, 'lastSize': 2, 'turnover': 129972612655, 'homeNotional': 39642.6649167448, 'foreignNotional': 13079888.689219425}, {'timestamp': datetime.datetime(2020, 9, 5, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 322.9, 'high': 335.2, 'low': 316.5, 'close': 332.45, 'trades': 13932, 'volume': 8044534, 'vwap': 327.16, 'lastSize': 400, 'turnover': 263182802495, 'homeNotional': 80549.35528345016, 'foreignNotional': 26354563.40043268}, {'timestamp': datetime.datetime(2020, 9, 5, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 325.45, 'high': 334.9, 'low': 311.35, 'close': 322.9, 'trades': 23544, 'volume': 16259968, 'vwap': 321.64, 'lastSize': 500, 'turnover': 522976315825, 'homeNotional': 162740.045646843, 'foreignNotional': 52349191.542732395}] 2020-09-06 01:00:20 INFO: prepare candles [CandleItem(low=326.0, high=334.7, open=332.45, close=331.05, color='RED'), CandleItem(low=316.5, high=335.2, open=322.9, close=332.45, color='GREEN'), CandleItem(low=311.35, high=334.9, open=325.45, close=322.9, color='RED')] 2020-09-06 01:00:20 INFO: skip by colors first_candle=CandleItem(low=311.35, high=334.9, open=325.45, close=322.9, color='RED') second_candle=CandleItem(low=316.5, high=335.2, open=322.9, close=332.45, color='GREEN') last_candle=CandleItem(low=326.0, high=334.7, open=332.45, close=331.05, color='RED') 2020-09-06 01:00:20 INFO: check need new order None 2020-09-06 01:00:20 INFO: init new order end 2020-09-06 01:00:20 INFO: 2020-09-06 01:00:20 INFO: 2020-09-06 01:00:20 INFO: 2020-09-06 01:00:20 INFO: 2020-09-06 01:02:00 INFO: 2020-09-06 01:02:00 INFO: 2020-09-06 01:02:00 INFO: 2020-09-06 01:02:00 INFO: 2020-09-06 01:02:00 INFO: clearing start 2020-09-06 01:02:01 INFO: clearing end 2020-09-06 01:02:01 INFO: 2020-09-06 01:02:01 INFO: 2020-09-06 01:02:01 INFO: 2020-09-06 01:02:01 INFO: 2020-09-06 02:00:20 INFO: 2020-09-06 02:00:20 INFO: 2020-09-06 02:00:20 INFO: 2020-09-06 02:00:20 INFO: 2020-09-06 02:00:20 INFO: init new order start 2020-09-06 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 5, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 331.05, 'high': 336.35, 'low': 320.15, 'close': 320.55, 'trades': 10700, 'volume': 5912363, 'vwap': 329.58, 'lastSize': 50, 'turnover': 194855446455, 'homeNotional': 59508.670666899656, 'foreignNotional': 19613678.479757745}, {'timestamp': datetime.datetime(2020, 9, 5, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 332.45, 'high': 334.7, 'low': 326.0, 'close': 331.05, 'trades': 7147, 'volume': 3939269, 'vwap': 329.95, 'lastSize': 2, 'turnover': 129972612655, 'homeNotional': 39642.6649167448, 'foreignNotional': 13079888.689219425}, {'timestamp': datetime.datetime(2020, 9, 5, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 322.9, 'high': 335.2, 'low': 316.5, 'close': 332.45, 'trades': 13932, 'volume': 8044534, 'vwap': 327.16, 'lastSize': 400, 'turnover': 263182802495, 'homeNotional': 80549.35528345016, 'foreignNotional': 26354563.40043268}] 2020-09-06 02:00:20 INFO: prepare candles [CandleItem(low=320.15, high=336.35, open=331.05, close=320.55, color='RED'), CandleItem(low=326.0, high=334.7, open=332.45, close=331.05, color='RED'), CandleItem(low=316.5, high=335.2, open=322.9, close=332.45, color='GREEN')] 2020-09-06 02:00:20 INFO: skip by colors first_candle=CandleItem(low=316.5, high=335.2, open=322.9, close=332.45, color='GREEN') second_candle=CandleItem(low=326.0, high=334.7, open=332.45, close=331.05, color='RED') last_candle=CandleItem(low=320.15, high=336.35, open=331.05, close=320.55, color='RED') 2020-09-06 02:00:20 INFO: check need new order None 2020-09-06 02:00:20 INFO: init new order end 2020-09-06 02:00:20 INFO: 2020-09-06 02:00:20 INFO: 2020-09-06 02:00:20 INFO: 2020-09-06 02:00:20 INFO: 2020-09-06 02:02:00 INFO: 2020-09-06 02:02:00 INFO: 2020-09-06 02:02:00 INFO: 2020-09-06 02:02:00 INFO: 2020-09-06 02:02:00 INFO: clearing start 2020-09-06 02:02:00 INFO: clearing end 2020-09-06 02:02:00 INFO: 2020-09-06 02:02:00 INFO: 2020-09-06 02:02:00 INFO: 2020-09-06 02:02:00 INFO: 2020-09-06 03:00:20 INFO: 2020-09-06 03:00:20 INFO: 2020-09-06 03:00:20 INFO: 2020-09-06 03:00:20 INFO: 2020-09-06 03:00:20 INFO: init new order start 2020-09-06 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 6, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 320.55, 'high': 337.9, 'low': 316.7, 'close': 335.25, 'trades': 8957, 'volume': 6335881, 'vwap': 329.04, 'lastSize': 243, 'turnover': 208472184310, 'homeNotional': 63976.714231738864, 'foreignNotional': 21052793.364810925}, {'timestamp': datetime.datetime(2020, 9, 5, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 331.05, 'high': 336.35, 'low': 320.15, 'close': 320.55, 'trades': 10700, 'volume': 5912363, 'vwap': 329.58, 'lastSize': 50, 'turnover': 194855446455, 'homeNotional': 59508.670666899656, 'foreignNotional': 19613678.479757745}, {'timestamp': datetime.datetime(2020, 9, 5, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 332.45, 'high': 334.7, 'low': 326.0, 'close': 331.05, 'trades': 7147, 'volume': 3939269, 'vwap': 329.95, 'lastSize': 2, 'turnover': 129972612655, 'homeNotional': 39642.6649167448, 'foreignNotional': 13079888.689219425}] 2020-09-06 03:00:20 INFO: prepare candles [CandleItem(low=316.7, high=337.9, open=320.55, close=335.25, color='GREEN'), CandleItem(low=320.15, high=336.35, open=331.05, close=320.55, color='RED'), CandleItem(low=326.0, high=334.7, open=332.45, close=331.05, color='RED')] 2020-09-06 03:00:20 INFO: last_candle=CandleItem(low=316.7, high=337.9, open=320.55, close=335.25, color='GREEN') 2020-09-06 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-06 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=316.7, high=337.9, open=320.55, close=335.25, color='GREEN') 2020-09-06 03:00:20 INFO: skip by CandleItem(low=316.7, high=337.9, open=320.55, close=335.25, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-06 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-06 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=316.7, high=337.9, open=320.55, close=335.25, color='GREEN') 2020-09-06 03:00:20 INFO: skip by CandleItem(low=316.7, high=337.9, open=320.55, close=335.25, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-06 03:00:20 INFO: not found applicable config for candle 2020-09-06 03:00:20 INFO: check need new order None 2020-09-06 03:00:20 INFO: init new order end 2020-09-06 03:00:20 INFO: 2020-09-06 03:00:20 INFO: 2020-09-06 03:00:20 INFO: 2020-09-06 03:00:20 INFO: 2020-09-06 03:02:00 INFO: 2020-09-06 03:02:00 INFO: 2020-09-06 03:02:00 INFO: 2020-09-06 03:02:00 INFO: 2020-09-06 03:02:00 INFO: clearing start 2020-09-06 03:02:00 INFO: clearing end 2020-09-06 03:02:00 INFO: 2020-09-06 03:02:00 INFO: 2020-09-06 03:02:00 INFO: 2020-09-06 03:02:00 INFO: 2020-09-06 04:00:20 INFO: 2020-09-06 04:00:20 INFO: 2020-09-06 04:00:20 INFO: 2020-09-06 04:00:20 INFO: 2020-09-06 04:00:20 INFO: init new order start 2020-09-06 04:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 6, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 335.25, 'high': 342.95, 'low': 330.35, 'close': 339.6, 'trades': 10543, 'volume': 7009229, 'vwap': 337.68, 'lastSize': 1, 'turnover': 236680891135, 'homeNotional': 71408.9603136786, 'foreignNotional': 24113192.22045531}, {'timestamp': datetime.datetime(2020, 9, 6, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 320.55, 'high': 337.9, 'low': 316.7, 'close': 335.25, 'trades': 8957, 'volume': 6335881, 'vwap': 329.04, 'lastSize': 243, 'turnover': 208472184310, 'homeNotional': 63976.714231738864, 'foreignNotional': 21052793.364810925}, {'timestamp': datetime.datetime(2020, 9, 5, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 331.05, 'high': 336.35, 'low': 320.15, 'close': 320.55, 'trades': 10700, 'volume': 5912363, 'vwap': 329.58, 'lastSize': 50, 'turnover': 194855446455, 'homeNotional': 59508.670666899656, 'foreignNotional': 19613678.479757745}] 2020-09-06 04:00:20 INFO: prepare candles [CandleItem(low=330.35, high=342.95, open=335.25, close=339.6, color='GREEN'), CandleItem(low=316.7, high=337.9, open=320.55, close=335.25, color='GREEN'), CandleItem(low=320.15, high=336.35, open=331.05, close=320.55, color='RED')] 2020-09-06 04:00:20 INFO: skip by colors first_candle=CandleItem(low=320.15, high=336.35, open=331.05, close=320.55, color='RED') second_candle=CandleItem(low=316.7, high=337.9, open=320.55, close=335.25, color='GREEN') last_candle=CandleItem(low=330.35, high=342.95, open=335.25, close=339.6, color='GREEN') 2020-09-06 04:00:20 INFO: check need new order None 2020-09-06 04:00:20 INFO: init new order end 2020-09-06 04:00:20 INFO: 2020-09-06 04:00:20 INFO: 2020-09-06 04:00:20 INFO: 2020-09-06 04:00:20 INFO: 2020-09-06 04:02:00 INFO: 2020-09-06 04:02:00 INFO: 2020-09-06 04:02:00 INFO: 2020-09-06 04:02:00 INFO: 2020-09-06 04:02:00 INFO: clearing start 2020-09-06 04:02:01 INFO: clearing end 2020-09-06 04:02:01 INFO: 2020-09-06 04:02:01 INFO: 2020-09-06 04:02:01 INFO: 2020-09-06 04:02:01 INFO: 2020-09-06 05:00:23 INFO: 2020-09-06 05:00:23 INFO: 2020-09-06 05:00:23 INFO: 2020-09-06 05:00:23 INFO: 2020-09-06 05:00:23 INFO: init new order start 2020-09-06 05:00:23 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 6, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.6, 'high': 340.4, 'low': 329.0, 'close': 330.6, 'trades': 5753, 'volume': 3540643, 'vwap': 334.46, 'lastSize': 341, 'turnover': 118419332300, 'homeNotional': 36013.698012997454, 'foreignNotional': 12045337.387450833}, {'timestamp': datetime.datetime(2020, 9, 6, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 335.25, 'high': 342.95, 'low': 330.35, 'close': 339.6, 'trades': 10543, 'volume': 7009229, 'vwap': 337.68, 'lastSize': 1, 'turnover': 236680891135, 'homeNotional': 71408.9603136786, 'foreignNotional': 24113192.22045531}, {'timestamp': datetime.datetime(2020, 9, 6, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 320.55, 'high': 337.9, 'low': 316.7, 'close': 335.25, 'trades': 8957, 'volume': 6335881, 'vwap': 329.04, 'lastSize': 243, 'turnover': 208472184310, 'homeNotional': 63976.714231738864, 'foreignNotional': 21052793.364810925}] 2020-09-06 05:00:23 INFO: prepare candles [CandleItem(low=329.0, high=340.4, open=339.6, close=330.6, color='RED'), CandleItem(low=330.35, high=342.95, open=335.25, close=339.6, color='GREEN'), CandleItem(low=316.7, high=337.9, open=320.55, close=335.25, color='GREEN')] 2020-09-06 05:00:23 INFO: last_candle=CandleItem(low=329.0, high=340.4, open=339.6, close=330.6, color='RED') 2020-09-06 05:00:23 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-06 05:00:23 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=329.0, high=340.4, open=339.6, close=330.6, color='RED') 2020-09-06 05:00:23 INFO: skip by CandleItem(low=329.0, high=340.4, open=339.6, close=330.6, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-06 05:00:23 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-06 05:00:23 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=329.0, high=340.4, open=339.6, close=330.6, color='RED') 2020-09-06 05:00:23 INFO: skip by CandleItem(low=329.0, high=340.4, open=339.6, close=330.6, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-06 05:00:23 INFO: not found applicable config for candle 2020-09-06 05:00:23 INFO: check need new order None 2020-09-06 05:00:23 INFO: init new order end 2020-09-06 05:00:23 INFO: 2020-09-06 05:00:23 INFO: 2020-09-06 05:00:23 INFO: 2020-09-06 05:00:23 INFO: 2020-09-06 05:02:00 INFO: 2020-09-06 05:02:00 INFO: 2020-09-06 05:02:00 INFO: 2020-09-06 05:02:00 INFO: 2020-09-06 05:02:00 INFO: clearing start 2020-09-06 05:02:00 INFO: clearing end 2020-09-06 05:02:00 INFO: 2020-09-06 05:02:00 INFO: 2020-09-06 05:02:00 INFO: 2020-09-06 05:02:00 INFO: 2020-09-06 06:00:20 INFO: 2020-09-06 06:00:20 INFO: 2020-09-06 06:00:20 INFO: 2020-09-06 06:00:20 INFO: 2020-09-06 06:00:20 INFO: init new order start 2020-09-06 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 6, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 330.6, 'high': 333.55, 'low': 322.8, 'close': 331.5, 'trades': 7679, 'volume': 5269412, 'vwap': 328.18, 'lastSize': 96, 'turnover': 172931400590, 'homeNotional': 53283.141963540256, 'foreignNotional': 17486852.528981183}, {'timestamp': datetime.datetime(2020, 9, 6, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.6, 'high': 340.4, 'low': 329.0, 'close': 330.6, 'trades': 5753, 'volume': 3540643, 'vwap': 334.46, 'lastSize': 341, 'turnover': 118419332300, 'homeNotional': 36013.698012997454, 'foreignNotional': 12045337.387450833}, {'timestamp': datetime.datetime(2020, 9, 6, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 335.25, 'high': 342.95, 'low': 330.35, 'close': 339.6, 'trades': 10543, 'volume': 7009229, 'vwap': 337.68, 'lastSize': 1, 'turnover': 236680891135, 'homeNotional': 71408.9603136786, 'foreignNotional': 24113192.22045531}] 2020-09-06 06:00:20 INFO: prepare candles [CandleItem(low=322.8, high=333.55, open=330.6, close=331.5, color='GREEN'), CandleItem(low=329.0, high=340.4, open=339.6, close=330.6, color='RED'), CandleItem(low=330.35, high=342.95, open=335.25, close=339.6, color='GREEN')] 2020-09-06 06:00:20 INFO: skip by colors first_candle=CandleItem(low=330.35, high=342.95, open=335.25, close=339.6, color='GREEN') second_candle=CandleItem(low=329.0, high=340.4, open=339.6, close=330.6, color='RED') last_candle=CandleItem(low=322.8, high=333.55, open=330.6, close=331.5, color='GREEN') 2020-09-06 06:00:20 INFO: check need new order None 2020-09-06 06:00:20 INFO: init new order end 2020-09-06 06:00:20 INFO: 2020-09-06 06:00:20 INFO: 2020-09-06 06:00:20 INFO: 2020-09-06 06:00:20 INFO: 2020-09-06 06:02:01 INFO: 2020-09-06 06:02:01 INFO: 2020-09-06 06:02:01 INFO: 2020-09-06 06:02:01 INFO: 2020-09-06 06:02:01 INFO: clearing start 2020-09-06 06:02:01 INFO: clearing end 2020-09-06 06:02:01 INFO: 2020-09-06 06:02:01 INFO: 2020-09-06 06:02:01 INFO: 2020-09-06 06:02:01 INFO: 2020-09-06 07:00:20 INFO: 2020-09-06 07:00:20 INFO: 2020-09-06 07:00:20 INFO: 2020-09-06 07:00:20 INFO: 2020-09-06 07:00:20 INFO: init new order start 2020-09-06 07:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 6, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 331.5, 'high': 333.5, 'low': 326.4, 'close': 328.55, 'trades': 5823, 'volume': 5890450, 'vwap': 329.63, 'lastSize': 302, 'turnover': 194165321220, 'homeNotional': 59833.69898757385, 'foreignNotional': 19722966.802890755}, {'timestamp': datetime.datetime(2020, 9, 6, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 330.6, 'high': 333.55, 'low': 322.8, 'close': 331.5, 'trades': 7679, 'volume': 5269412, 'vwap': 328.18, 'lastSize': 96, 'turnover': 172931400590, 'homeNotional': 53283.141963540256, 'foreignNotional': 17486852.528981183}, {'timestamp': datetime.datetime(2020, 9, 6, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 339.6, 'high': 340.4, 'low': 329.0, 'close': 330.6, 'trades': 5753, 'volume': 3540643, 'vwap': 334.46, 'lastSize': 341, 'turnover': 118419332300, 'homeNotional': 36013.698012997454, 'foreignNotional': 12045337.387450833}] 2020-09-06 07:00:20 INFO: prepare candles [CandleItem(low=326.4, high=333.5, open=331.5, close=328.55, color='RED'), CandleItem(low=322.8, high=333.55, open=330.6, close=331.5, color='GREEN'), CandleItem(low=329.0, high=340.4, open=339.6, close=330.6, color='RED')] 2020-09-06 07:00:20 INFO: skip by colors first_candle=CandleItem(low=329.0, high=340.4, open=339.6, close=330.6, color='RED') second_candle=CandleItem(low=322.8, high=333.55, open=330.6, close=331.5, color='GREEN') last_candle=CandleItem(low=326.4, high=333.5, open=331.5, close=328.55, color='RED') 2020-09-06 07:00:20 INFO: check need new order None 2020-09-06 07:00:20 INFO: init new order end 2020-09-06 07:00:20 INFO: 2020-09-06 07:00:20 INFO: 2020-09-06 07:00:20 INFO: 2020-09-06 07:00:20 INFO: 2020-09-06 07:02:00 INFO: 2020-09-06 07:02:00 INFO: 2020-09-06 07:02:00 INFO: 2020-09-06 07:02:00 INFO: 2020-09-06 07:02:00 INFO: clearing start 2020-09-06 07:02:00 INFO: clearing end 2020-09-06 07:02:00 INFO: 2020-09-06 07:02:00 INFO: 2020-09-06 07:02:00 INFO: 2020-09-06 07:02:00 INFO: 2020-09-06 08:00:20 INFO: 2020-09-06 08:00:20 INFO: 2020-09-06 08:00:20 INFO: 2020-09-06 08:00:20 INFO: 2020-09-06 08:00:20 INFO: init new order start 2020-09-06 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 6, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 328.55, 'high': 332.35, 'low': 321.0, 'close': 321.4, 'trades': 7385, 'volume': 6667733, 'vwap': 326.28, 'lastSize': 100, 'turnover': 217552318960, 'homeNotional': 67501.6689777871, 'foreignNotional': 22025407.183803335}, {'timestamp': datetime.datetime(2020, 9, 6, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 331.5, 'high': 333.5, 'low': 326.4, 'close': 328.55, 'trades': 5823, 'volume': 5890450, 'vwap': 329.63, 'lastSize': 302, 'turnover': 194165321220, 'homeNotional': 59833.69898757385, 'foreignNotional': 19722966.802890755}, {'timestamp': datetime.datetime(2020, 9, 6, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 330.6, 'high': 333.55, 'low': 322.8, 'close': 331.5, 'trades': 7679, 'volume': 5269412, 'vwap': 328.18, 'lastSize': 96, 'turnover': 172931400590, 'homeNotional': 53283.141963540256, 'foreignNotional': 17486852.528981183}] 2020-09-06 08:00:20 INFO: prepare candles [CandleItem(low=321.0, high=332.35, open=328.55, close=321.4, color='RED'), CandleItem(low=326.4, high=333.5, open=331.5, close=328.55, color='RED'), CandleItem(low=322.8, high=333.55, open=330.6, close=331.5, color='GREEN')] 2020-09-06 08:00:20 INFO: skip by colors first_candle=CandleItem(low=322.8, high=333.55, open=330.6, close=331.5, color='GREEN') second_candle=CandleItem(low=326.4, high=333.5, open=331.5, close=328.55, color='RED') last_candle=CandleItem(low=321.0, high=332.35, open=328.55, close=321.4, color='RED') 2020-09-06 08:00:20 INFO: check need new order None 2020-09-06 08:00:20 INFO: init new order end 2020-09-06 08:00:20 INFO: 2020-09-06 08:00:20 INFO: 2020-09-06 08:00:20 INFO: 2020-09-06 08:00:20 INFO: 2020-09-06 08:02:00 INFO: 2020-09-06 08:02:00 INFO: 2020-09-06 08:02:00 INFO: 2020-09-06 08:02:00 INFO: 2020-09-06 08:02:00 INFO: clearing start 2020-09-06 08:02:00 INFO: clearing end 2020-09-06 08:02:00 INFO: 2020-09-06 08:02:00 INFO: 2020-09-06 08:02:00 INFO: 2020-09-06 08:02:00 INFO: 2020-09-06 09:00:20 INFO: 2020-09-06 09:00:20 INFO: 2020-09-06 09:00:20 INFO: 2020-09-06 09:00:20 INFO: 2020-09-06 09:00:20 INFO: init new order start 2020-09-06 09:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 6, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 321.4, 'high': 327.2, 'low': 317.0, 'close': 325.45, 'trades': 7119, 'volume': 5099239, 'vwap': 322.5, 'lastSize': 700, 'turnover': 164448392310, 'homeNotional': 51365.81612596947, 'foreignNotional': 16565794.02692244}, {'timestamp': datetime.datetime(2020, 9, 6, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 328.55, 'high': 332.35, 'low': 321.0, 'close': 321.4, 'trades': 7385, 'volume': 6667733, 'vwap': 326.28, 'lastSize': 100, 'turnover': 217552318960, 'homeNotional': 67501.6689777871, 'foreignNotional': 22025407.183803335}, {'timestamp': datetime.datetime(2020, 9, 6, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 331.5, 'high': 333.5, 'low': 326.4, 'close': 328.55, 'trades': 5823, 'volume': 5890450, 'vwap': 329.63, 'lastSize': 302, 'turnover': 194165321220, 'homeNotional': 59833.69898757385, 'foreignNotional': 19722966.802890755}] 2020-09-06 09:00:21 INFO: prepare candles [CandleItem(low=317.0, high=327.2, open=321.4, close=325.45, color='GREEN'), CandleItem(low=321.0, high=332.35, open=328.55, close=321.4, color='RED'), CandleItem(low=326.4, high=333.5, open=331.5, close=328.55, color='RED')] 2020-09-06 09:00:21 INFO: last_candle=CandleItem(low=317.0, high=327.2, open=321.4, close=325.45, color='GREEN') 2020-09-06 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-06 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=317.0, high=327.2, open=321.4, close=325.45, color='GREEN') 2020-09-06 09:00:21 INFO: skip by CandleItem(low=317.0, high=327.2, open=321.4, close=325.45, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-06 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-06 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=317.0, high=327.2, open=321.4, close=325.45, color='GREEN') 2020-09-06 09:00:21 INFO: skip by CandleItem(low=317.0, high=327.2, open=321.4, close=325.45, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-06 09:00:21 INFO: not found applicable config for candle 2020-09-06 09:00:21 INFO: check need new order None 2020-09-06 09:00:21 INFO: init new order end 2020-09-06 09:00:21 INFO: 2020-09-06 09:00:21 INFO: 2020-09-06 09:00:21 INFO: 2020-09-06 09:00:21 INFO: 2020-09-06 09:02:00 INFO: 2020-09-06 09:02:00 INFO: 2020-09-06 09:02:00 INFO: 2020-09-06 09:02:00 INFO: 2020-09-06 09:02:00 INFO: clearing start 2020-09-06 09:02:00 INFO: clearing end 2020-09-06 09:02:00 INFO: 2020-09-06 09:02:00 INFO: 2020-09-06 09:02:00 INFO: 2020-09-06 09:02:00 INFO: 2020-09-06 10:00:20 INFO: 2020-09-06 10:00:20 INFO: 2020-09-06 10:00:20 INFO: 2020-09-06 10:00:20 INFO: 2020-09-06 10:00:20 INFO: init new order start 2020-09-06 10:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 6, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 325.45, 'high': 332.85, 'low': 320.3, 'close': 331.45, 'trades': 5702, 'volume': 3172445, 'vwap': 325.51, 'lastSize': 200, 'turnover': 103264882280, 'homeNotional': 32080.715213590018, 'foreignNotional': 10442738.361056207}, {'timestamp': datetime.datetime(2020, 9, 6, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 321.4, 'high': 327.2, 'low': 317.0, 'close': 325.45, 'trades': 7119, 'volume': 5099239, 'vwap': 322.5, 'lastSize': 700, 'turnover': 164448392310, 'homeNotional': 51365.81612596947, 'foreignNotional': 16565794.02692244}, {'timestamp': datetime.datetime(2020, 9, 6, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 328.55, 'high': 332.35, 'low': 321.0, 'close': 321.4, 'trades': 7385, 'volume': 6667733, 'vwap': 326.28, 'lastSize': 100, 'turnover': 217552318960, 'homeNotional': 67501.6689777871, 'foreignNotional': 22025407.183803335}] 2020-09-06 10:00:20 INFO: prepare candles [CandleItem(low=320.3, high=332.85, open=325.45, close=331.45, color='GREEN'), CandleItem(low=317.0, high=327.2, open=321.4, close=325.45, color='GREEN'), CandleItem(low=321.0, high=332.35, open=328.55, close=321.4, color='RED')] 2020-09-06 10:00:20 INFO: skip by colors first_candle=CandleItem(low=321.0, high=332.35, open=328.55, close=321.4, color='RED') second_candle=CandleItem(low=317.0, high=327.2, open=321.4, close=325.45, color='GREEN') last_candle=CandleItem(low=320.3, high=332.85, open=325.45, close=331.45, color='GREEN') 2020-09-06 10:00:20 INFO: check need new order None 2020-09-06 10:00:20 INFO: init new order end 2020-09-06 10:00:20 INFO: 2020-09-06 10:00:20 INFO: 2020-09-06 10:00:20 INFO: 2020-09-06 10:00:20 INFO: 2020-09-06 10:02:00 INFO: 2020-09-06 10:02:00 INFO: 2020-09-06 10:02:00 INFO: 2020-09-06 10:02:00 INFO: 2020-09-06 10:02:00 INFO: clearing start 2020-09-06 10:02:00 INFO: clearing end 2020-09-06 10:02:00 INFO: 2020-09-06 10:02:00 INFO: 2020-09-06 10:02:00 INFO: 2020-09-06 10:02:00 INFO: 2020-09-06 11:00:20 INFO: 2020-09-06 11:00:20 INFO: 2020-09-06 11:00:20 INFO: 2020-09-06 11:00:20 INFO: 2020-09-06 11:00:20 INFO: init new order start 2020-09-06 11:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 6, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 331.45, 'high': 342.45, 'low': 328.1, 'close': 340.65, 'trades': 8917, 'volume': 5324506, 'vwap': 335.92, 'lastSize': 2, 'turnover': 178858262105, 'homeNotional': 54288.50085603449, 'foreignNotional': 18236939.985297192}, {'timestamp': datetime.datetime(2020, 9, 6, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 325.45, 'high': 332.85, 'low': 320.3, 'close': 331.45, 'trades': 5702, 'volume': 3172445, 'vwap': 325.51, 'lastSize': 200, 'turnover': 103264882280, 'homeNotional': 32080.715213590018, 'foreignNotional': 10442738.361056207}, {'timestamp': datetime.datetime(2020, 9, 6, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 321.4, 'high': 327.2, 'low': 317.0, 'close': 325.45, 'trades': 7119, 'volume': 5099239, 'vwap': 322.5, 'lastSize': 700, 'turnover': 164448392310, 'homeNotional': 51365.81612596947, 'foreignNotional': 16565794.02692244}] 2020-09-06 11:00:20 INFO: prepare candles [CandleItem(low=328.1, high=342.45, open=331.45, close=340.65, color='GREEN'), CandleItem(low=320.3, high=332.85, open=325.45, close=331.45, color='GREEN'), CandleItem(low=317.0, high=327.2, open=321.4, close=325.45, color='GREEN')] 2020-09-06 11:00:20 INFO: skip by colors first_candle=CandleItem(low=317.0, high=327.2, open=321.4, close=325.45, color='GREEN') second_candle=CandleItem(low=320.3, high=332.85, open=325.45, close=331.45, color='GREEN') last_candle=CandleItem(low=328.1, high=342.45, open=331.45, close=340.65, color='GREEN') 2020-09-06 11:00:20 INFO: check need new order None 2020-09-06 11:00:20 INFO: init new order end 2020-09-06 11:00:20 INFO: 2020-09-06 11:00:20 INFO: 2020-09-06 11:00:20 INFO: 2020-09-06 11:00:20 INFO: 2020-09-06 11:02:00 INFO: 2020-09-06 11:02:00 INFO: 2020-09-06 11:02:00 INFO: 2020-09-06 11:02:00 INFO: 2020-09-06 11:02:00 INFO: clearing start 2020-09-06 11:02:00 INFO: clearing end 2020-09-06 11:02:00 INFO: 2020-09-06 11:02:00 INFO: 2020-09-06 11:02:00 INFO: 2020-09-06 11:02:00 INFO: 2020-09-06 12:00:20 INFO: 2020-09-06 12:00:20 INFO: 2020-09-06 12:00:20 INFO: 2020-09-06 12:00:20 INFO: 2020-09-06 12:00:20 INFO: init new order start 2020-09-06 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 6, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 340.65, 'high': 352.35, 'low': 337.65, 'close': 349.45, 'trades': 13001, 'volume': 10473872, 'vwap': 345.47, 'lastSize': 1, 'turnover': 361833698485, 'homeNotional': 107145.11844918808, 'foreignNotional': 37015131.451174624}, {'timestamp': datetime.datetime(2020, 9, 6, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 331.45, 'high': 342.45, 'low': 328.1, 'close': 340.65, 'trades': 8917, 'volume': 5324506, 'vwap': 335.92, 'lastSize': 2, 'turnover': 178858262105, 'homeNotional': 54288.50085603449, 'foreignNotional': 18236939.985297192}, {'timestamp': datetime.datetime(2020, 9, 6, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 325.45, 'high': 332.85, 'low': 320.3, 'close': 331.45, 'trades': 5702, 'volume': 3172445, 'vwap': 325.51, 'lastSize': 200, 'turnover': 103264882280, 'homeNotional': 32080.715213590018, 'foreignNotional': 10442738.361056207}] 2020-09-06 12:00:20 INFO: prepare candles [CandleItem(low=337.65, high=352.35, open=340.65, close=349.45, color='GREEN'), CandleItem(low=328.1, high=342.45, open=331.45, close=340.65, color='GREEN'), CandleItem(low=320.3, high=332.85, open=325.45, close=331.45, color='GREEN')] 2020-09-06 12:00:20 INFO: skip by colors first_candle=CandleItem(low=320.3, high=332.85, open=325.45, close=331.45, color='GREEN') second_candle=CandleItem(low=328.1, high=342.45, open=331.45, close=340.65, color='GREEN') last_candle=CandleItem(low=337.65, high=352.35, open=340.65, close=349.45, color='GREEN') 2020-09-06 12:00:20 INFO: check need new order None 2020-09-06 12:00:20 INFO: init new order end 2020-09-06 12:00:20 INFO: 2020-09-06 12:00:20 INFO: 2020-09-06 12:00:20 INFO: 2020-09-06 12:00:20 INFO: 2020-09-06 12:02:00 INFO: 2020-09-06 12:02:00 INFO: 2020-09-06 12:02:00 INFO: 2020-09-06 12:02:00 INFO: 2020-09-06 12:02:00 INFO: clearing start 2020-09-06 12:02:00 INFO: clearing end 2020-09-06 12:02:00 INFO: 2020-09-06 12:02:00 INFO: 2020-09-06 12:02:00 INFO: 2020-09-06 12:02:00 INFO: 2020-09-06 13:00:20 INFO: 2020-09-06 13:00:20 INFO: 2020-09-06 13:00:20 INFO: 2020-09-06 13:00:20 INFO: 2020-09-06 13:00:20 INFO: init new order start 2020-09-06 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 6, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.45, 'high': 354.5, 'low': 342.65, 'close': 346.3, 'trades': 10429, 'volume': 7767592, 'vwap': 348.5, 'lastSize': 248, 'turnover': 270700374015, 'homeNotional': 79475.05788497104, 'foreignNotional': 27697765.889830295}, {'timestamp': datetime.datetime(2020, 9, 6, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 340.65, 'high': 352.35, 'low': 337.65, 'close': 349.45, 'trades': 13001, 'volume': 10473872, 'vwap': 345.47, 'lastSize': 1, 'turnover': 361833698485, 'homeNotional': 107145.11844918808, 'foreignNotional': 37015131.451174624}, {'timestamp': datetime.datetime(2020, 9, 6, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 331.45, 'high': 342.45, 'low': 328.1, 'close': 340.65, 'trades': 8917, 'volume': 5324506, 'vwap': 335.92, 'lastSize': 2, 'turnover': 178858262105, 'homeNotional': 54288.50085603449, 'foreignNotional': 18236939.985297192}] 2020-09-06 13:00:20 INFO: prepare candles [CandleItem(low=342.65, high=354.5, open=349.45, close=346.3, color='RED'), CandleItem(low=337.65, high=352.35, open=340.65, close=349.45, color='GREEN'), CandleItem(low=328.1, high=342.45, open=331.45, close=340.65, color='GREEN')] 2020-09-06 13:00:20 INFO: last_candle=CandleItem(low=342.65, high=354.5, open=349.45, close=346.3, color='RED') 2020-09-06 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-06 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=342.65, high=354.5, open=349.45, close=346.3, color='RED') 2020-09-06 13:00:20 INFO: skip by CandleItem(low=342.65, high=354.5, open=349.45, close=346.3, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-06 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-06 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=342.65, high=354.5, open=349.45, close=346.3, color='RED') 2020-09-06 13:00:20 INFO: skip by CandleItem(low=342.65, high=354.5, open=349.45, close=346.3, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-06 13:00:20 INFO: not found applicable config for candle 2020-09-06 13:00:20 INFO: check need new order None 2020-09-06 13:00:20 INFO: init new order end 2020-09-06 13:00:20 INFO: 2020-09-06 13:00:20 INFO: 2020-09-06 13:00:20 INFO: 2020-09-06 13:00:20 INFO: 2020-09-06 13:02:00 INFO: 2020-09-06 13:02:00 INFO: 2020-09-06 13:02:00 INFO: 2020-09-06 13:02:00 INFO: 2020-09-06 13:02:00 INFO: clearing start 2020-09-06 13:02:00 INFO: clearing end 2020-09-06 13:02:00 INFO: 2020-09-06 13:02:00 INFO: 2020-09-06 13:02:00 INFO: 2020-09-06 13:02:00 INFO: 2020-09-06 14:00:20 INFO: 2020-09-06 14:00:20 INFO: 2020-09-06 14:00:20 INFO: 2020-09-06 14:00:20 INFO: 2020-09-06 14:00:20 INFO: init new order start 2020-09-06 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 6, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.3, 'high': 351.4, 'low': 342.0, 'close': 350.15, 'trades': 6662, 'volume': 3753535, 'vwap': 346.24, 'lastSize': 3, 'turnover': 129961737005, 'homeNotional': 38303.65215263344, 'foreignNotional': 13262329.37751981}, {'timestamp': datetime.datetime(2020, 9, 6, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.45, 'high': 354.5, 'low': 342.65, 'close': 346.3, 'trades': 10429, 'volume': 7767592, 'vwap': 348.5, 'lastSize': 248, 'turnover': 270700374015, 'homeNotional': 79475.05788497104, 'foreignNotional': 27697765.889830295}, {'timestamp': datetime.datetime(2020, 9, 6, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 340.65, 'high': 352.35, 'low': 337.65, 'close': 349.45, 'trades': 13001, 'volume': 10473872, 'vwap': 345.47, 'lastSize': 1, 'turnover': 361833698485, 'homeNotional': 107145.11844918808, 'foreignNotional': 37015131.451174624}] 2020-09-06 14:00:20 INFO: prepare candles [CandleItem(low=342.0, high=351.4, open=346.3, close=350.15, color='GREEN'), CandleItem(low=342.65, high=354.5, open=349.45, close=346.3, color='RED'), CandleItem(low=337.65, high=352.35, open=340.65, close=349.45, color='GREEN')] 2020-09-06 14:00:20 INFO: skip by colors first_candle=CandleItem(low=337.65, high=352.35, open=340.65, close=349.45, color='GREEN') second_candle=CandleItem(low=342.65, high=354.5, open=349.45, close=346.3, color='RED') last_candle=CandleItem(low=342.0, high=351.4, open=346.3, close=350.15, color='GREEN') 2020-09-06 14:00:20 INFO: check need new order None 2020-09-06 14:00:20 INFO: init new order end 2020-09-06 14:00:20 INFO: 2020-09-06 14:00:20 INFO: 2020-09-06 14:00:20 INFO: 2020-09-06 14:00:20 INFO: 2020-09-06 14:02:00 INFO: 2020-09-06 14:02:00 INFO: 2020-09-06 14:02:00 INFO: 2020-09-06 14:02:00 INFO: 2020-09-06 14:02:00 INFO: clearing start 2020-09-06 14:02:00 INFO: clearing end 2020-09-06 14:02:00 INFO: 2020-09-06 14:02:00 INFO: 2020-09-06 14:02:00 INFO: 2020-09-06 14:02:00 INFO: 2020-09-06 15:00:20 INFO: 2020-09-06 15:00:20 INFO: 2020-09-06 15:00:20 INFO: 2020-09-06 15:00:20 INFO: 2020-09-06 15:00:20 INFO: init new order start 2020-09-06 15:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 6, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.15, 'high': 356.0, 'low': 346.4, 'close': 354.75, 'trades': 9074, 'volume': 6512523, 'vwap': 351.47, 'lastSize': 500, 'turnover': 228891406060, 'homeNotional': 66669.38861004321, 'foreignNotional': 23432084.73261275}, {'timestamp': datetime.datetime(2020, 9, 6, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.3, 'high': 351.4, 'low': 342.0, 'close': 350.15, 'trades': 6662, 'volume': 3753535, 'vwap': 346.24, 'lastSize': 3, 'turnover': 129961737005, 'homeNotional': 38303.65215263344, 'foreignNotional': 13262329.37751981}, {'timestamp': datetime.datetime(2020, 9, 6, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.45, 'high': 354.5, 'low': 342.65, 'close': 346.3, 'trades': 10429, 'volume': 7767592, 'vwap': 348.5, 'lastSize': 248, 'turnover': 270700374015, 'homeNotional': 79475.05788497104, 'foreignNotional': 27697765.889830295}] 2020-09-06 15:00:21 INFO: prepare candles [CandleItem(low=346.4, high=356.0, open=350.15, close=354.75, color='GREEN'), CandleItem(low=342.0, high=351.4, open=346.3, close=350.15, color='GREEN'), CandleItem(low=342.65, high=354.5, open=349.45, close=346.3, color='RED')] 2020-09-06 15:00:21 INFO: skip by colors first_candle=CandleItem(low=342.65, high=354.5, open=349.45, close=346.3, color='RED') second_candle=CandleItem(low=342.0, high=351.4, open=346.3, close=350.15, color='GREEN') last_candle=CandleItem(low=346.4, high=356.0, open=350.15, close=354.75, color='GREEN') 2020-09-06 15:00:21 INFO: check need new order None 2020-09-06 15:00:21 INFO: init new order end 2020-09-06 15:00:21 INFO: 2020-09-06 15:00:21 INFO: 2020-09-06 15:00:21 INFO: 2020-09-06 15:00:21 INFO: 2020-09-06 15:02:00 INFO: 2020-09-06 15:02:00 INFO: 2020-09-06 15:02:00 INFO: 2020-09-06 15:02:00 INFO: 2020-09-06 15:02:00 INFO: clearing start 2020-09-06 15:02:00 INFO: clearing end 2020-09-06 15:02:00 INFO: 2020-09-06 15:02:00 INFO: 2020-09-06 15:02:00 INFO: 2020-09-06 15:02:00 INFO: 2020-09-06 16:00:20 INFO: 2020-09-06 16:00:20 INFO: 2020-09-06 16:00:20 INFO: 2020-09-06 16:00:20 INFO: 2020-09-06 16:00:20 INFO: init new order start 2020-09-06 16:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 6, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.75, 'high': 358.75, 'low': 351.85, 'close': 353.6, 'trades': 9362, 'volume': 8090919, 'vwap': 355.62, 'lastSize': 41, 'turnover': 287725687310, 'homeNotional': 83109.00375350368, 'foreignNotional': 29554993.817562457}, {'timestamp': datetime.datetime(2020, 9, 6, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.15, 'high': 356.0, 'low': 346.4, 'close': 354.75, 'trades': 9074, 'volume': 6512523, 'vwap': 351.47, 'lastSize': 500, 'turnover': 228891406060, 'homeNotional': 66669.38861004321, 'foreignNotional': 23432084.73261275}, {'timestamp': datetime.datetime(2020, 9, 6, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.3, 'high': 351.4, 'low': 342.0, 'close': 350.15, 'trades': 6662, 'volume': 3753535, 'vwap': 346.24, 'lastSize': 3, 'turnover': 129961737005, 'homeNotional': 38303.65215263344, 'foreignNotional': 13262329.37751981}] 2020-09-06 16:00:20 INFO: prepare candles [CandleItem(low=351.85, high=358.75, open=354.75, close=353.6, color='RED'), CandleItem(low=346.4, high=356.0, open=350.15, close=354.75, color='GREEN'), CandleItem(low=342.0, high=351.4, open=346.3, close=350.15, color='GREEN')] 2020-09-06 16:00:20 INFO: last_candle=CandleItem(low=351.85, high=358.75, open=354.75, close=353.6, color='RED') 2020-09-06 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-06 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=351.85, high=358.75, open=354.75, close=353.6, color='RED') 2020-09-06 16:00:20 INFO: skip by CandleItem(low=351.85, high=358.75, open=354.75, close=353.6, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-06 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-06 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=351.85, high=358.75, open=354.75, close=353.6, color='RED') 2020-09-06 16:00:20 INFO: apply filter None to candle=CandleItem(low=346.4, high=356.0, open=350.15, close=354.75, color='GREEN') 2020-09-06 16:00:20 INFO: apply filter None to candle=CandleItem(low=342.0, high=351.4, open=346.3, close=350.15, color='GREEN') 2020-09-06 16:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=351.85, high=358.75, open=354.75, close=353.6, color='RED'), take_profit_factor=5.0, clearing_interval=3600) 2020-09-06 16:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=351.85, high=358.75, open=354.75, close=353.6, color='RED'), take_profit_factor=5.0, clearing_interval=3600) 2020-09-06 16:00:20 INFO: place order: start candle=CandleItem(low=351.85, high=358.75, open=354.75, close=353.6, color='RED') ticker='ETHUSD' price_offset=0.1 2020-09-06 16:00:20 INFO: place order: side_factor=1 init_trigger_price=351.8 init_order_price=351.75 stop_price_offset=0.0 candle.size=6.899999999999977 stop_price=358.75 take_price=317.2500000000001 2020-09-06 16:00:20 INFO: place order round: side_factor=1 init_trigger_price=Decimal('351.80000000000001136868377216160297393798828125') init_order_price=Decimal('351.75') stop_price_offset=0.0 candle.size=6.899999999999977 stop_price=Decimal('358.75') take_price=Decimal('317.2500000000001136868377216160297393798828125') 2020-09-06 16:00:20 INFO: place order: compute qty=-273 2020-09-06 16:00:20 INFO: place order: save order to db 5d492d76f6cd4764aa5623b7760ab870; response=True 2020-09-06 16:00:20 INFO: post order to exchange resp={'orderID': 'd35ac7f1-cd44-ea63-02a7-5d2385cf8209', 'clOrdID': '5d492d76f6cd4764aa5623b7760ab870', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 273, 'price': 351.75, 'displayQty': None, 'stopPx': 351.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': 273, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 6, 13, 0, 20, 776000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 6, 13, 0, 20, 776000, tzinfo=tzutc())} 2020-09-06 16:00:20 INFO: place new init order {'qty': -273, 'init_price': Decimal('351.80000000000001136868377216160297393798828125'), 'stop_price': Decimal('358.75'), 'take_price': Decimal('317.2500000000001136868377216160297393798828125'), 'order_uid': '5d492d76f6cd4764aa5623b7760ab870', 'response': {'orderID': 'd35ac7f1-cd44-ea63-02a7-5d2385cf8209', 'clOrdID': '5d492d76f6cd4764aa5623b7760ab870', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 273, 'price': 351.75, 'displayQty': None, 'stopPx': 351.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': 273, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 6, 13, 0, 20, 776000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 6, 13, 0, 20, 776000, tzinfo=tzutc())}} 2020-09-06 16:00:20 INFO: init new order end 2020-09-06 16:00:20 INFO: 2020-09-06 16:00:20 INFO: 2020-09-06 16:00:20 INFO: 2020-09-06 16:00:20 INFO: 2020-09-06 16:00:21 INFO: process event {'orderID': 'd35ac7f1-cd44-ea63-02a7-5d2385cf8209', 'clOrdID': '5d492d76f6cd4764aa5623b7760ab870', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 273, 'price': 351.75, 'displayQty': None, 'stopPx': 351.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': 273, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-09-06T13:00:20.776Z', 'timestamp': '2020-09-06T13:00:20.776Z'} 2020-09-06 16:00:21 INFO: skip event 5d492d76f6cd4764aa5623b7760ab870 New 2020-09-06 16:01:09 INFO: process event {'orderID': 'd35ac7f1-cd44-ea63-02a7-5d2385cf8209', 'triggered': 'StopOrderTriggered', 'workingIndicator': True, 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'transactTime': '2020-09-06T13:01:09.312Z', 'timestamp': '2020-09-06T13:01:09.312Z', 'clOrdID': '5d492d76f6cd4764aa5623b7760ab870', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-06 16:01:09 INFO: skip event 5d492d76f6cd4764aa5623b7760ab870 2020-09-06 16:01:09 INFO: process event {'orderID': 'd35ac7f1-cd44-ea63-02a7-5d2385cf8209', 'ordStatus': 'PartiallyFilled', 'leavesQty': 247, 'cumQty': 26, 'avgPx': 351.75, 'timestamp': '2020-09-06T13:01:09.562Z', 'clOrdID': '5d492d76f6cd4764aa5623b7760ab870', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-06 16:01:09 INFO: skip event 5d492d76f6cd4764aa5623b7760ab870 PartiallyFilled 2020-09-06 16:01:12 INFO: process event {'orderID': 'd35ac7f1-cd44-ea63-02a7-5d2385cf8209', 'leavesQty': 90, 'cumQty': 183, 'timestamp': '2020-09-06T13:01:12.725Z', 'clOrdID': '5d492d76f6cd4764aa5623b7760ab870', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-06 16:01:12 INFO: skip event 5d492d76f6cd4764aa5623b7760ab870 2020-09-06 16:01:13 INFO: process event {'orderID': 'd35ac7f1-cd44-ea63-02a7-5d2385cf8209', 'leavesQty': 63, 'cumQty': 210, 'timestamp': '2020-09-06T13:01:13.759Z', 'clOrdID': '5d492d76f6cd4764aa5623b7760ab870', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-06 16:01:13 INFO: skip event 5d492d76f6cd4764aa5623b7760ab870 2020-09-06 16:01:14 INFO: process event {'orderID': 'd35ac7f1-cd44-ea63-02a7-5d2385cf8209', 'ordStatus': 'Filled', 'workingIndicator': False, 'leavesQty': 0, 'cumQty': 273, 'timestamp': '2020-09-06T13:01:14.895Z', 'clOrdID': '5d492d76f6cd4764aa5623b7760ab870', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-06 16:01:14 INFO: add new event={'uid': '5d492d76f6cd4764aa5623b7760ab870', 'status': 'Filled'} 2020-09-06 16:01:15 INFO: 2020-09-06 16:01:15 INFO: 2020-09-06 16:01:15 INFO: 2020-09-06 16:01:15 INFO: 2020-09-06 16:01:15 INFO: process event start 2020-09-06 16:01:15 INFO: fetch new order event 5d492d76f6cd4764aa5623b7760ab870 2020-09-06 16:01:15 INFO: fetch orders by event init={'stop': '358.75', 'take': '317.2500000000001136868377216160297393798828125', 'qty': '273', 'color': 'RED', 'ticker': 'ETHUSD', 'clearing_offset': '3600'} profit_pair=None 2020-09-06 16:01:15 INFO: process init order filled 2020-09-06 16:01:15 INFO: save profit orders to storage stop=daaa9118df48445fbe10962232ccf28c take=bebde9672779457fbe6018e24dd9c124 2020-09-06 16:01:15 INFO: place profit orders take_price=317.2500000000001136868377216160297393798828125, stop_price=358.75, qty=273, color=RED, ticker=ETHUSD daaa9118df48445fbe10962232ccf28c bebde9672779457fbe6018e24dd9c124 2020-09-06 16:01:15 INFO: place stop order ETHUSD: qty=273, stop_price=358.75, stop_uid=daaa9118df48445fbe10962232ccf28c 2020-09-06 16:01:15 INFO: exchange resp for stop order={'orderID': '1cce434c-0b3b-5a61-0cae-efb8f7bbf180', 'clOrdID': 'daaa9118df48445fbe10962232ccf28c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 273, 'price': None, 'displayQty': None, 'stopPx': 358.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': 273, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 6, 13, 1, 15, 888000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 6, 13, 1, 15, 888000, tzinfo=tzutc())} 2020-09-06 16:01:15 INFO: place limit order ETHUSD: qty=273, price=317.2500000000001136868377216160297393798828125, take_uid=bebde9672779457fbe6018e24dd9c124 2020-09-06 16:01:15 INFO: exchange resp for take profit order={'orderID': 'df40033b-2b84-78fd-4121-81979d4ee442', 'clOrdID': 'bebde9672779457fbe6018e24dd9c124', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 273, 'price': 317.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 273, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 6, 13, 1, 15, 927000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 6, 13, 1, 15, 927000, tzinfo=tzutc())} 2020-09-06 16:01:15 INFO: place profit orders={'stop': {'response': {'orderID': '1cce434c-0b3b-5a61-0cae-efb8f7bbf180', 'clOrdID': 'daaa9118df48445fbe10962232ccf28c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 273, 'price': None, 'displayQty': None, 'stopPx': 358.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': 273, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 6, 13, 1, 15, 888000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 6, 13, 1, 15, 888000, tzinfo=tzutc())}, 'qty': Decimal('273'), 'uid': 'daaa9118df48445fbe10962232ccf28c', 'price': Decimal('358.75')}, 'take': {'response': {'orderID': 'df40033b-2b84-78fd-4121-81979d4ee442', 'clOrdID': 'bebde9672779457fbe6018e24dd9c124', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 273, 'price': 317.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 273, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 6, 13, 1, 15, 927000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 6, 13, 1, 15, 927000, tzinfo=tzutc())}, 'qty': Decimal('273'), 'uid': 'bebde9672779457fbe6018e24dd9c124', 'price': Decimal('317.2500000000001136868377216160297393798828125')}} 2020-09-06 16:01:15 INFO: rm init order from db 5d492d76f6cd4764aa5623b7760ab870 2020-09-06 16:01:15 INFO: end process event_processing_result='proceed init order' 2020-09-06 16:01:15 INFO: 2020-09-06 16:01:15 INFO: 2020-09-06 16:01:15 INFO: 2020-09-06 16:01:15 INFO: 2020-09-06 16:01:16 INFO: process event {'orderID': '1cce434c-0b3b-5a61-0cae-efb8f7bbf180', 'clOrdID': 'daaa9118df48445fbe10962232ccf28c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 273, 'price': None, 'displayQty': None, 'stopPx': 358.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': 273, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': '2020-09-06T13:01:15.888Z', 'timestamp': '2020-09-06T13:01:15.888Z'} 2020-09-06 16:01:16 INFO: skip event daaa9118df48445fbe10962232ccf28c New 2020-09-06 16:01:16 INFO: process event {'orderID': 'df40033b-2b84-78fd-4121-81979d4ee442', 'clOrdID': 'bebde9672779457fbe6018e24dd9c124', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 273, 'price': 317.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 273, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': '2020-09-06T13:01:15.927Z', 'timestamp': '2020-09-06T13:01:15.927Z'} 2020-09-06 16:01:16 INFO: skip event bebde9672779457fbe6018e24dd9c124 New 2020-09-06 16:02:00 INFO: 2020-09-06 16:02:00 INFO: 2020-09-06 16:02:00 INFO: 2020-09-06 16:02:00 INFO: 2020-09-06 16:02:00 INFO: clearing start 2020-09-06 16:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '1cce434c-0b3b-5a61-0cae-efb8f7bbf180', 'clOrdID': 'daaa9118df48445fbe10962232ccf28c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 273, 'price': None, 'displayQty': None, 'stopPx': 358.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': 273, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 6, 13, 1, 15, 888000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 6, 13, 1, 15, 888000, tzinfo=tzutc())} 2020-09-06 16:02:01 INFO: skip by not found init order into storage 2020-09-06 16:02:01 INFO: fetch_orders_for_clearing test order {'orderID': 'df40033b-2b84-78fd-4121-81979d4ee442', 'clOrdID': 'bebde9672779457fbe6018e24dd9c124', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 273, 'price': 317.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 273, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 6, 13, 1, 15, 927000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 6, 13, 1, 15, 927000, tzinfo=tzutc())} 2020-09-06 16:02:01 INFO: skip by not found init order into storage 2020-09-06 16:02:01 INFO: clearing end 2020-09-06 16:02:01 INFO: 2020-09-06 16:02:01 INFO: 2020-09-06 16:02:01 INFO: 2020-09-06 16:02:01 INFO: 2020-09-06 17:00:20 INFO: 2020-09-06 17:00:20 INFO: 2020-09-06 17:00:20 INFO: 2020-09-06 17:00:20 INFO: 2020-09-06 17:00:20 INFO: init new order start 2020-09-06 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 6, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.6, 'high': 353.65, 'low': 347.3, 'close': 349.3, 'trades': 6493, 'volume': 5362174, 'vwap': 349.69, 'lastSize': 160, 'turnover': 187509859855, 'homeNotional': 54787.65010770654, 'foreignNotional': 19158745.81395437}, {'timestamp': datetime.datetime(2020, 9, 6, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.75, 'high': 358.75, 'low': 351.85, 'close': 353.6, 'trades': 9362, 'volume': 8090919, 'vwap': 355.62, 'lastSize': 41, 'turnover': 287725687310, 'homeNotional': 83109.00375350368, 'foreignNotional': 29554993.817562457}, {'timestamp': datetime.datetime(2020, 9, 6, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 350.15, 'high': 356.0, 'low': 346.4, 'close': 354.75, 'trades': 9074, 'volume': 6512523, 'vwap': 351.47, 'lastSize': 500, 'turnover': 228891406060, 'homeNotional': 66669.38861004321, 'foreignNotional': 23432084.73261275}] 2020-09-06 17:00:20 INFO: prepare candles [CandleItem(low=347.3, high=353.65, open=353.6, close=349.3, color='RED'), CandleItem(low=351.85, high=358.75, open=354.75, close=353.6, color='RED'), CandleItem(low=346.4, high=356.0, open=350.15, close=354.75, color='GREEN')] 2020-09-06 17:00:20 INFO: skip by colors first_candle=CandleItem(low=346.4, high=356.0, open=350.15, close=354.75, color='GREEN') second_candle=CandleItem(low=351.85, high=358.75, open=354.75, close=353.6, color='RED') last_candle=CandleItem(low=347.3, high=353.65, open=353.6, close=349.3, color='RED') 2020-09-06 17:00:20 INFO: check need new order None 2020-09-06 17:00:20 INFO: init new order end 2020-09-06 17:00:20 INFO: 2020-09-06 17:00:20 INFO: 2020-09-06 17:00:20 INFO: 2020-09-06 17:00:20 INFO: 2020-09-06 17:02:00 INFO: 2020-09-06 17:02:00 INFO: 2020-09-06 17:02:00 INFO: 2020-09-06 17:02:00 INFO: 2020-09-06 17:02:00 INFO: clearing start 2020-09-06 17:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '1cce434c-0b3b-5a61-0cae-efb8f7bbf180', 'clOrdID': 'daaa9118df48445fbe10962232ccf28c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 273, 'price': None, 'displayQty': None, 'stopPx': 358.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': 273, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 6, 13, 1, 15, 888000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 6, 13, 1, 15, 888000, tzinfo=tzutc())} 2020-09-06 17:02:00 INFO: skip by not found init order into storage 2020-09-06 17:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'df40033b-2b84-78fd-4121-81979d4ee442', 'clOrdID': 'bebde9672779457fbe6018e24dd9c124', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 273, 'price': 317.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 273, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 6, 13, 1, 15, 927000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 6, 13, 1, 15, 927000, tzinfo=tzutc())} 2020-09-06 17:02:00 INFO: skip by not found init order into storage 2020-09-06 17:02:00 INFO: clearing end 2020-09-06 17:02:00 INFO: 2020-09-06 17:02:00 INFO: 2020-09-06 17:02:00 INFO: 2020-09-06 17:02:00 INFO: 2020-09-06 18:00:20 INFO: 2020-09-06 18:00:20 INFO: 2020-09-06 18:00:20 INFO: 2020-09-06 18:00:20 INFO: 2020-09-06 18:00:20 INFO: init new order start 2020-09-06 18:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 6, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.3, 'high': 353.8, 'low': 344.0, 'close': 347.9, 'trades': 7110, 'volume': 5052566, 'vwap': 347.86, 'lastSize': 221, 'turnover': 175755632300, 'homeNotional': 51588.66801030239, 'foreignNotional': 17945641.31546747}, {'timestamp': datetime.datetime(2020, 9, 6, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.6, 'high': 353.65, 'low': 347.3, 'close': 349.3, 'trades': 6493, 'volume': 5362174, 'vwap': 349.69, 'lastSize': 160, 'turnover': 187509859855, 'homeNotional': 54787.65010770654, 'foreignNotional': 19158745.81395437}, {'timestamp': datetime.datetime(2020, 9, 6, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.75, 'high': 358.75, 'low': 351.85, 'close': 353.6, 'trades': 9362, 'volume': 8090919, 'vwap': 355.62, 'lastSize': 41, 'turnover': 287725687310, 'homeNotional': 83109.00375350368, 'foreignNotional': 29554993.817562457}] 2020-09-06 18:00:21 INFO: prepare candles [CandleItem(low=344.0, high=353.8, open=349.3, close=347.9, color='RED'), CandleItem(low=347.3, high=353.65, open=353.6, close=349.3, color='RED'), CandleItem(low=351.85, high=358.75, open=354.75, close=353.6, color='RED')] 2020-09-06 18:00:21 INFO: skip by colors first_candle=CandleItem(low=351.85, high=358.75, open=354.75, close=353.6, color='RED') second_candle=CandleItem(low=347.3, high=353.65, open=353.6, close=349.3, color='RED') last_candle=CandleItem(low=344.0, high=353.8, open=349.3, close=347.9, color='RED') 2020-09-06 18:00:21 INFO: check need new order None 2020-09-06 18:00:21 INFO: init new order end 2020-09-06 18:00:21 INFO: 2020-09-06 18:00:21 INFO: 2020-09-06 18:00:21 INFO: 2020-09-06 18:00:21 INFO: 2020-09-06 18:02:00 INFO: 2020-09-06 18:02:00 INFO: 2020-09-06 18:02:00 INFO: 2020-09-06 18:02:00 INFO: 2020-09-06 18:02:00 INFO: clearing start 2020-09-06 18:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '1cce434c-0b3b-5a61-0cae-efb8f7bbf180', 'clOrdID': 'daaa9118df48445fbe10962232ccf28c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 273, 'price': None, 'displayQty': None, 'stopPx': 358.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': 273, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 6, 13, 1, 15, 888000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 6, 13, 1, 15, 888000, tzinfo=tzutc())} 2020-09-06 18:02:00 INFO: skip by not found init order into storage 2020-09-06 18:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'df40033b-2b84-78fd-4121-81979d4ee442', 'clOrdID': 'bebde9672779457fbe6018e24dd9c124', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 273, 'price': 317.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 273, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 6, 13, 1, 15, 927000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 6, 13, 1, 15, 927000, tzinfo=tzutc())} 2020-09-06 18:02:00 INFO: skip by not found init order into storage 2020-09-06 18:02:00 INFO: clearing end 2020-09-06 18:02:00 INFO: 2020-09-06 18:02:00 INFO: 2020-09-06 18:02:00 INFO: 2020-09-06 18:02:00 INFO: 2020-09-06 19:00:20 INFO: 2020-09-06 19:00:20 INFO: 2020-09-06 19:00:20 INFO: 2020-09-06 19:00:20 INFO: 2020-09-06 19:00:20 INFO: init new order start 2020-09-06 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 6, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.9, 'high': 348.95, 'low': 338.5, 'close': 345.35, 'trades': 7867, 'volume': 6105461, 'vwap': 342.52, 'lastSize': 13, 'turnover': 209122011910, 'homeNotional': 62094.331632742054, 'foreignNotional': 21268616.25803298}, {'timestamp': datetime.datetime(2020, 9, 6, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.3, 'high': 353.8, 'low': 344.0, 'close': 347.9, 'trades': 7110, 'volume': 5052566, 'vwap': 347.86, 'lastSize': 221, 'turnover': 175755632300, 'homeNotional': 51588.66801030239, 'foreignNotional': 17945641.31546747}, {'timestamp': datetime.datetime(2020, 9, 6, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.6, 'high': 353.65, 'low': 347.3, 'close': 349.3, 'trades': 6493, 'volume': 5362174, 'vwap': 349.69, 'lastSize': 160, 'turnover': 187509859855, 'homeNotional': 54787.65010770654, 'foreignNotional': 19158745.81395437}] 2020-09-06 19:00:20 INFO: prepare candles [CandleItem(low=338.5, high=348.95, open=347.9, close=345.35, color='RED'), CandleItem(low=344.0, high=353.8, open=349.3, close=347.9, color='RED'), CandleItem(low=347.3, high=353.65, open=353.6, close=349.3, color='RED')] 2020-09-06 19:00:20 INFO: skip by colors first_candle=CandleItem(low=347.3, high=353.65, open=353.6, close=349.3, color='RED') second_candle=CandleItem(low=344.0, high=353.8, open=349.3, close=347.9, color='RED') last_candle=CandleItem(low=338.5, high=348.95, open=347.9, close=345.35, color='RED') 2020-09-06 19:00:20 INFO: check need new order None 2020-09-06 19:00:20 INFO: init new order end 2020-09-06 19:00:20 INFO: 2020-09-06 19:00:20 INFO: 2020-09-06 19:00:20 INFO: 2020-09-06 19:00:20 INFO: 2020-09-06 19:02:00 INFO: 2020-09-06 19:02:00 INFO: 2020-09-06 19:02:00 INFO: 2020-09-06 19:02:00 INFO: 2020-09-06 19:02:00 INFO: clearing start 2020-09-06 19:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '1cce434c-0b3b-5a61-0cae-efb8f7bbf180', 'clOrdID': 'daaa9118df48445fbe10962232ccf28c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 273, 'price': None, 'displayQty': None, 'stopPx': 358.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': 273, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 6, 13, 1, 15, 888000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 6, 13, 1, 15, 888000, tzinfo=tzutc())} 2020-09-06 19:02:00 INFO: skip by not found init order into storage 2020-09-06 19:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'df40033b-2b84-78fd-4121-81979d4ee442', 'clOrdID': 'bebde9672779457fbe6018e24dd9c124', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 273, 'price': 317.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 273, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 6, 13, 1, 15, 927000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 6, 13, 1, 15, 927000, tzinfo=tzutc())} 2020-09-06 19:02:00 INFO: skip by not found init order into storage 2020-09-06 19:02:00 INFO: clearing end 2020-09-06 19:02:00 INFO: 2020-09-06 19:02:00 INFO: 2020-09-06 19:02:00 INFO: 2020-09-06 19:02:00 INFO: 2020-09-06 20:00:20 INFO: 2020-09-06 20:00:20 INFO: 2020-09-06 20:00:20 INFO: 2020-09-06 20:00:20 INFO: 2020-09-06 20:00:20 INFO: init new order start 2020-09-06 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 6, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 345.35, 'high': 356.4, 'low': 341.35, 'close': 354.5, 'trades': 8359, 'volume': 4996892, 'vwap': 350.68, 'lastSize': 1320, 'turnover': 175227817215, 'homeNotional': 51048.183748753654, 'foreignNotional': 17901791.21748679}, {'timestamp': datetime.datetime(2020, 9, 6, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.9, 'high': 348.95, 'low': 338.5, 'close': 345.35, 'trades': 7867, 'volume': 6105461, 'vwap': 342.52, 'lastSize': 13, 'turnover': 209122011910, 'homeNotional': 62094.331632742054, 'foreignNotional': 21268616.25803298}, {'timestamp': datetime.datetime(2020, 9, 6, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.3, 'high': 353.8, 'low': 344.0, 'close': 347.9, 'trades': 7110, 'volume': 5052566, 'vwap': 347.86, 'lastSize': 221, 'turnover': 175755632300, 'homeNotional': 51588.66801030239, 'foreignNotional': 17945641.31546747}] 2020-09-06 20:00:20 INFO: prepare candles [CandleItem(low=341.35, high=356.4, open=345.35, close=354.5, color='GREEN'), CandleItem(low=338.5, high=348.95, open=347.9, close=345.35, color='RED'), CandleItem(low=344.0, high=353.8, open=349.3, close=347.9, color='RED')] 2020-09-06 20:00:20 INFO: last_candle=CandleItem(low=341.35, high=356.4, open=345.35, close=354.5, color='GREEN') 2020-09-06 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-06 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=341.35, high=356.4, open=345.35, close=354.5, color='GREEN') 2020-09-06 20:00:20 INFO: skip by CandleItem(low=341.35, high=356.4, open=345.35, close=354.5, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-06 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-06 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=341.35, high=356.4, open=345.35, close=354.5, color='GREEN') 2020-09-06 20:00:20 INFO: skip by CandleItem(low=341.35, high=356.4, open=345.35, close=354.5, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-06 20:00:20 INFO: not found applicable config for candle 2020-09-06 20:00:20 INFO: check need new order None 2020-09-06 20:00:20 INFO: init new order end 2020-09-06 20:00:20 INFO: 2020-09-06 20:00:20 INFO: 2020-09-06 20:00:20 INFO: 2020-09-06 20:00:20 INFO: 2020-09-06 20:02:00 INFO: 2020-09-06 20:02:00 INFO: 2020-09-06 20:02:00 INFO: 2020-09-06 20:02:00 INFO: 2020-09-06 20:02:00 INFO: clearing start 2020-09-06 20:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '1cce434c-0b3b-5a61-0cae-efb8f7bbf180', 'clOrdID': 'daaa9118df48445fbe10962232ccf28c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 273, 'price': None, 'displayQty': None, 'stopPx': 358.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': 273, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 6, 13, 1, 15, 888000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 6, 13, 1, 15, 888000, tzinfo=tzutc())} 2020-09-06 20:02:00 INFO: skip by not found init order into storage 2020-09-06 20:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'df40033b-2b84-78fd-4121-81979d4ee442', 'clOrdID': 'bebde9672779457fbe6018e24dd9c124', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 273, 'price': 317.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 273, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 6, 13, 1, 15, 927000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 6, 13, 1, 15, 927000, tzinfo=tzutc())} 2020-09-06 20:02:00 INFO: skip by not found init order into storage 2020-09-06 20:02:00 INFO: clearing end 2020-09-06 20:02:00 INFO: 2020-09-06 20:02:00 INFO: 2020-09-06 20:02:00 INFO: 2020-09-06 20:02:00 INFO: 2020-09-06 21:00:20 INFO: 2020-09-06 21:00:20 INFO: 2020-09-06 21:00:20 INFO: 2020-09-06 21:00:20 INFO: 2020-09-06 21:00:20 INFO: init new order start 2020-09-06 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 6, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.5, 'high': 354.75, 'low': 348.3, 'close': 349.7, 'trades': 4485, 'volume': 2818930, 'vwap': 350.7, 'lastSize': 47, 'turnover': 98858877910, 'homeNotional': 28792.727339844358, 'foreignNotional': 10097542.07713721}, {'timestamp': datetime.datetime(2020, 9, 6, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 345.35, 'high': 356.4, 'low': 341.35, 'close': 354.5, 'trades': 8359, 'volume': 4996892, 'vwap': 350.68, 'lastSize': 1320, 'turnover': 175227817215, 'homeNotional': 51048.183748753654, 'foreignNotional': 17901791.21748679}, {'timestamp': datetime.datetime(2020, 9, 6, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 347.9, 'high': 348.95, 'low': 338.5, 'close': 345.35, 'trades': 7867, 'volume': 6105461, 'vwap': 342.52, 'lastSize': 13, 'turnover': 209122011910, 'homeNotional': 62094.331632742054, 'foreignNotional': 21268616.25803298}] 2020-09-06 21:00:20 INFO: prepare candles [CandleItem(low=348.3, high=354.75, open=354.5, close=349.7, color='RED'), CandleItem(low=341.35, high=356.4, open=345.35, close=354.5, color='GREEN'), CandleItem(low=338.5, high=348.95, open=347.9, close=345.35, color='RED')] 2020-09-06 21:00:20 INFO: skip by colors first_candle=CandleItem(low=338.5, high=348.95, open=347.9, close=345.35, color='RED') second_candle=CandleItem(low=341.35, high=356.4, open=345.35, close=354.5, color='GREEN') last_candle=CandleItem(low=348.3, high=354.75, open=354.5, close=349.7, color='RED') 2020-09-06 21:00:20 INFO: check need new order None 2020-09-06 21:00:20 INFO: init new order end 2020-09-06 21:00:20 INFO: 2020-09-06 21:00:20 INFO: 2020-09-06 21:00:20 INFO: 2020-09-06 21:00:20 INFO: 2020-09-06 21:02:00 INFO: 2020-09-06 21:02:00 INFO: 2020-09-06 21:02:00 INFO: 2020-09-06 21:02:00 INFO: 2020-09-06 21:02:00 INFO: clearing start 2020-09-06 21:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '1cce434c-0b3b-5a61-0cae-efb8f7bbf180', 'clOrdID': 'daaa9118df48445fbe10962232ccf28c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 273, 'price': None, 'displayQty': None, 'stopPx': 358.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': 273, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 6, 13, 1, 15, 888000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 6, 13, 1, 15, 888000, tzinfo=tzutc())} 2020-09-06 21:02:00 INFO: skip by not found init order into storage 2020-09-06 21:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'df40033b-2b84-78fd-4121-81979d4ee442', 'clOrdID': 'bebde9672779457fbe6018e24dd9c124', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 273, 'price': 317.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 273, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 6, 13, 1, 15, 927000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 6, 13, 1, 15, 927000, tzinfo=tzutc())} 2020-09-06 21:02:00 INFO: skip by not found init order into storage 2020-09-06 21:02:00 INFO: clearing end 2020-09-06 21:02:00 INFO: 2020-09-06 21:02:00 INFO: 2020-09-06 21:02:00 INFO: 2020-09-06 21:02:00 INFO: 2020-09-06 22:00:20 INFO: 2020-09-06 22:00:20 INFO: 2020-09-06 22:00:20 INFO: 2020-09-06 22:00:20 INFO: 2020-09-06 22:00:20 INFO: init new order start 2020-09-06 22:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 6, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.7, 'high': 354.0, 'low': 346.05, 'close': 351.4, 'trades': 4675, 'volume': 3616353, 'vwap': 350.6, 'lastSize': 50, 'turnover': 126786531240, 'homeNotional': 36970.77756318969, 'foreignNotional': 12961792.777924562}, {'timestamp': datetime.datetime(2020, 9, 6, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.5, 'high': 354.75, 'low': 348.3, 'close': 349.7, 'trades': 4485, 'volume': 2818930, 'vwap': 350.7, 'lastSize': 47, 'turnover': 98858877910, 'homeNotional': 28792.727339844358, 'foreignNotional': 10097542.07713721}, {'timestamp': datetime.datetime(2020, 9, 6, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 345.35, 'high': 356.4, 'low': 341.35, 'close': 354.5, 'trades': 8359, 'volume': 4996892, 'vwap': 350.68, 'lastSize': 1320, 'turnover': 175227817215, 'homeNotional': 51048.183748753654, 'foreignNotional': 17901791.21748679}] 2020-09-06 22:00:21 INFO: prepare candles [CandleItem(low=346.05, high=354.0, open=349.7, close=351.4, color='GREEN'), CandleItem(low=348.3, high=354.75, open=354.5, close=349.7, color='RED'), CandleItem(low=341.35, high=356.4, open=345.35, close=354.5, color='GREEN')] 2020-09-06 22:00:21 INFO: skip by colors first_candle=CandleItem(low=341.35, high=356.4, open=345.35, close=354.5, color='GREEN') second_candle=CandleItem(low=348.3, high=354.75, open=354.5, close=349.7, color='RED') last_candle=CandleItem(low=346.05, high=354.0, open=349.7, close=351.4, color='GREEN') 2020-09-06 22:00:21 INFO: check need new order None 2020-09-06 22:00:21 INFO: init new order end 2020-09-06 22:00:21 INFO: 2020-09-06 22:00:21 INFO: 2020-09-06 22:00:21 INFO: 2020-09-06 22:00:21 INFO: 2020-09-06 22:02:00 INFO: 2020-09-06 22:02:00 INFO: 2020-09-06 22:02:00 INFO: 2020-09-06 22:02:00 INFO: 2020-09-06 22:02:00 INFO: clearing start 2020-09-06 22:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '1cce434c-0b3b-5a61-0cae-efb8f7bbf180', 'clOrdID': 'daaa9118df48445fbe10962232ccf28c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 273, 'price': None, 'displayQty': None, 'stopPx': 358.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': 273, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 6, 13, 1, 15, 888000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 6, 13, 1, 15, 888000, tzinfo=tzutc())} 2020-09-06 22:02:00 INFO: skip by not found init order into storage 2020-09-06 22:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'df40033b-2b84-78fd-4121-81979d4ee442', 'clOrdID': 'bebde9672779457fbe6018e24dd9c124', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 273, 'price': 317.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 273, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 6, 13, 1, 15, 927000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 6, 13, 1, 15, 927000, tzinfo=tzutc())} 2020-09-06 22:02:00 INFO: skip by not found init order into storage 2020-09-06 22:02:00 INFO: clearing end 2020-09-06 22:02:00 INFO: 2020-09-06 22:02:00 INFO: 2020-09-06 22:02:00 INFO: 2020-09-06 22:02:00 INFO: 2020-09-06 23:00:20 INFO: 2020-09-06 23:00:20 INFO: 2020-09-06 23:00:20 INFO: 2020-09-06 23:00:20 INFO: 2020-09-06 23:00:20 INFO: init new order start 2020-09-06 23:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 6, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.4, 'high': 355.55, 'low': 349.75, 'close': 353.45, 'trades': 4055, 'volume': 2398399, 'vwap': 352.9, 'lastSize': 522, 'turnover': 84638325565, 'homeNotional': 24589.251531426427, 'foreignNotional': 8677493.520058725}, {'timestamp': datetime.datetime(2020, 9, 6, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.7, 'high': 354.0, 'low': 346.05, 'close': 351.4, 'trades': 4675, 'volume': 3616353, 'vwap': 350.6, 'lastSize': 50, 'turnover': 126786531240, 'homeNotional': 36970.77756318969, 'foreignNotional': 12961792.777924562}, {'timestamp': datetime.datetime(2020, 9, 6, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 354.5, 'high': 354.75, 'low': 348.3, 'close': 349.7, 'trades': 4485, 'volume': 2818930, 'vwap': 350.7, 'lastSize': 47, 'turnover': 98858877910, 'homeNotional': 28792.727339844358, 'foreignNotional': 10097542.07713721}] 2020-09-06 23:00:21 INFO: prepare candles [CandleItem(low=349.75, high=355.55, open=351.4, close=353.45, color='GREEN'), CandleItem(low=346.05, high=354.0, open=349.7, close=351.4, color='GREEN'), CandleItem(low=348.3, high=354.75, open=354.5, close=349.7, color='RED')] 2020-09-06 23:00:21 INFO: skip by colors first_candle=CandleItem(low=348.3, high=354.75, open=354.5, close=349.7, color='RED') second_candle=CandleItem(low=346.05, high=354.0, open=349.7, close=351.4, color='GREEN') last_candle=CandleItem(low=349.75, high=355.55, open=351.4, close=353.45, color='GREEN') 2020-09-06 23:00:21 INFO: check need new order None 2020-09-06 23:00:21 INFO: init new order end 2020-09-06 23:00:21 INFO: 2020-09-06 23:00:21 INFO: 2020-09-06 23:00:21 INFO: 2020-09-06 23:00:21 INFO: 2020-09-06 23:02:00 INFO: 2020-09-06 23:02:00 INFO: 2020-09-06 23:02:00 INFO: 2020-09-06 23:02:00 INFO: 2020-09-06 23:02:00 INFO: clearing start 2020-09-06 23:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '1cce434c-0b3b-5a61-0cae-efb8f7bbf180', 'clOrdID': 'daaa9118df48445fbe10962232ccf28c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 273, 'price': None, 'displayQty': None, 'stopPx': 358.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': 273, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 6, 13, 1, 15, 888000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 6, 13, 1, 15, 888000, tzinfo=tzutc())} 2020-09-06 23:02:00 INFO: skip by not found init order into storage 2020-09-06 23:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'df40033b-2b84-78fd-4121-81979d4ee442', 'clOrdID': 'bebde9672779457fbe6018e24dd9c124', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 273, 'price': 317.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 273, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 6, 13, 1, 15, 927000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 6, 13, 1, 15, 927000, tzinfo=tzutc())} 2020-09-06 23:02:00 INFO: skip by not found init order into storage 2020-09-06 23:02:00 INFO: clearing end 2020-09-06 23:02:00 INFO: 2020-09-06 23:02:00 INFO: 2020-09-06 23:02:00 INFO: 2020-09-06 23:02:00 INFO: 2020-09-07 00:00:20 INFO: 2020-09-07 00:00:20 INFO: 2020-09-07 00:00:20 INFO: 2020-09-07 00:00:20 INFO: 2020-09-07 00:00:20 INFO: init new order start 2020-09-07 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 6, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.45, 'high': 356.1, 'low': 351.0, 'close': 352.0, 'trades': 3961, 'volume': 2108741, 'vwap': 353.19, 'lastSize': 147, 'turnover': 74476584245, 'homeNotional': 21603.44326284665, 'foreignNotional': 7629929.64887349}, {'timestamp': datetime.datetime(2020, 9, 6, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.4, 'high': 355.55, 'low': 349.75, 'close': 353.45, 'trades': 4055, 'volume': 2398399, 'vwap': 352.9, 'lastSize': 522, 'turnover': 84638325565, 'homeNotional': 24589.251531426427, 'foreignNotional': 8677493.520058725}, {'timestamp': datetime.datetime(2020, 9, 6, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.7, 'high': 354.0, 'low': 346.05, 'close': 351.4, 'trades': 4675, 'volume': 3616353, 'vwap': 350.6, 'lastSize': 50, 'turnover': 126786531240, 'homeNotional': 36970.77756318969, 'foreignNotional': 12961792.777924562}] 2020-09-07 00:00:20 INFO: prepare candles [CandleItem(low=351.0, high=356.1, open=353.45, close=352.0, color='RED'), CandleItem(low=349.75, high=355.55, open=351.4, close=353.45, color='GREEN'), CandleItem(low=346.05, high=354.0, open=349.7, close=351.4, color='GREEN')] 2020-09-07 00:00:20 INFO: last_candle=CandleItem(low=351.0, high=356.1, open=353.45, close=352.0, color='RED') 2020-09-07 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-07 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=351.0, high=356.1, open=353.45, close=352.0, color='RED') 2020-09-07 00:00:20 INFO: skip by CandleItem(low=351.0, high=356.1, open=353.45, close=352.0, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-07 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-07 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=351.0, high=356.1, open=353.45, close=352.0, color='RED') 2020-09-07 00:00:20 INFO: skip by CandleItem(low=351.0, high=356.1, open=353.45, close=352.0, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-07 00:00:20 INFO: not found applicable config for candle 2020-09-07 00:00:20 INFO: check need new order None 2020-09-07 00:00:20 INFO: init new order end 2020-09-07 00:00:20 INFO: 2020-09-07 00:00:20 INFO: 2020-09-07 00:00:20 INFO: 2020-09-07 00:00:20 INFO: 2020-09-07 00:02:00 INFO: 2020-09-07 00:02:00 INFO: 2020-09-07 00:02:00 INFO: 2020-09-07 00:02:00 INFO: 2020-09-07 00:02:00 INFO: clearing start 2020-09-07 00:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '1cce434c-0b3b-5a61-0cae-efb8f7bbf180', 'clOrdID': 'daaa9118df48445fbe10962232ccf28c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 273, 'price': None, 'displayQty': None, 'stopPx': 358.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': 273, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 9, 6, 13, 1, 15, 888000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 6, 13, 1, 15, 888000, tzinfo=tzutc())} 2020-09-07 00:02:00 INFO: skip by not found init order into storage 2020-09-07 00:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'df40033b-2b84-78fd-4121-81979d4ee442', 'clOrdID': 'bebde9672779457fbe6018e24dd9c124', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 273, 'price': 317.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 273, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 6, 13, 1, 15, 927000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 6, 13, 1, 15, 927000, tzinfo=tzutc())} 2020-09-07 00:02:00 INFO: skip by not found init order into storage 2020-09-07 00:02:00 INFO: clearing end 2020-09-07 00:02:00 INFO: 2020-09-07 00:02:00 INFO: 2020-09-07 00:02:00 INFO: 2020-09-07 00:02:00 INFO: 2020-09-07 00:19:22 INFO: process event {'orderID': '1cce434c-0b3b-5a61-0cae-efb8f7bbf180', 'price': 358.85, 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 273, 'avgPx': 358.85, 'text': 'Triggered: Order stop price reached\nStop order by trader.py', 'transactTime': '2020-09-06T21:19:22.826Z', 'timestamp': '2020-09-06T21:19:22.826Z', 'clOrdID': 'daaa9118df48445fbe10962232ccf28c', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-07 00:19:22 INFO: add new event={'uid': 'daaa9118df48445fbe10962232ccf28c', 'status': 'Filled'} 2020-09-07 00:19:23 INFO: 2020-09-07 00:19:23 INFO: 2020-09-07 00:19:23 INFO: 2020-09-07 00:19:23 INFO: 2020-09-07 00:19:23 INFO: process event start 2020-09-07 00:19:23 INFO: fetch new order event daaa9118df48445fbe10962232ccf28c 2020-09-07 00:19:23 INFO: fetch orders by event init=None profit_pair=bebde9672779457fbe6018e24dd9c124 2020-09-07 00:19:23 INFO: process profit order filled 2020-09-07 00:19:23 INFO: process event {'orderID': 'df40033b-2b84-78fd-4121-81979d4ee442', 'ordStatus': 'Canceled', 'workingIndicator': False, 'leavesQty': 0, 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'timestamp': '2020-09-06T21:19:23.532Z', 'clOrdID': 'bebde9672779457fbe6018e24dd9c124', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-07 00:19:23 INFO: skip event bebde9672779457fbe6018e24dd9c124 Canceled 2020-09-07 00:19:23 INFO: cancel order=bebde9672779457fbe6018e24dd9c124 [{'orderID': 'df40033b-2b84-78fd-4121-81979d4ee442', 'clOrdID': 'bebde9672779457fbe6018e24dd9c124', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 273, 'price': 317.25, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'Canceled', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 0, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'transactTime': datetime.datetime(2020, 9, 6, 13, 1, 15, 927000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 6, 21, 19, 23, 532000, tzinfo=tzutc())}] 2020-09-07 00:19:23 INFO: end process event_processing_result='proceed profit order' 2020-09-07 00:19:23 INFO: 2020-09-07 00:19:23 INFO: 2020-09-07 00:19:23 INFO: 2020-09-07 00:19:23 INFO: 2020-09-07 01:00:20 INFO: 2020-09-07 01:00:20 INFO: 2020-09-07 01:00:20 INFO: 2020-09-07 01:00:20 INFO: 2020-09-07 01:00:20 INFO: init new order start 2020-09-07 01:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 6, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.0, 'high': 360.6, 'low': 351.7, 'close': 357.55, 'trades': 6144, 'volume': 4818399, 'vwap': 357.46, 'lastSize': 30, 'turnover': 172235560325, 'homeNotional': 49642.94315510562, 'foreignNotional': 17745241.208485354}, {'timestamp': datetime.datetime(2020, 9, 6, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.45, 'high': 356.1, 'low': 351.0, 'close': 352.0, 'trades': 3961, 'volume': 2108741, 'vwap': 353.19, 'lastSize': 147, 'turnover': 74476584245, 'homeNotional': 21603.44326284665, 'foreignNotional': 7629929.64887349}, {'timestamp': datetime.datetime(2020, 9, 6, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.4, 'high': 355.55, 'low': 349.75, 'close': 353.45, 'trades': 4055, 'volume': 2398399, 'vwap': 352.9, 'lastSize': 522, 'turnover': 84638325565, 'homeNotional': 24589.251531426427, 'foreignNotional': 8677493.520058725}] 2020-09-07 01:00:21 INFO: prepare candles [CandleItem(low=351.7, high=360.6, open=352.0, close=357.55, color='GREEN'), CandleItem(low=351.0, high=356.1, open=353.45, close=352.0, color='RED'), CandleItem(low=349.75, high=355.55, open=351.4, close=353.45, color='GREEN')] 2020-09-07 01:00:21 INFO: skip by colors first_candle=CandleItem(low=349.75, high=355.55, open=351.4, close=353.45, color='GREEN') second_candle=CandleItem(low=351.0, high=356.1, open=353.45, close=352.0, color='RED') last_candle=CandleItem(low=351.7, high=360.6, open=352.0, close=357.55, color='GREEN') 2020-09-07 01:00:21 INFO: check need new order None 2020-09-07 01:00:21 INFO: init new order end 2020-09-07 01:00:21 INFO: 2020-09-07 01:00:21 INFO: 2020-09-07 01:00:21 INFO: 2020-09-07 01:00:21 INFO: 2020-09-07 01:02:00 INFO: 2020-09-07 01:02:00 INFO: 2020-09-07 01:02:00 INFO: 2020-09-07 01:02:00 INFO: 2020-09-07 01:02:00 INFO: clearing start 2020-09-07 01:02:00 INFO: clearing end 2020-09-07 01:02:00 INFO: 2020-09-07 01:02:00 INFO: 2020-09-07 01:02:00 INFO: 2020-09-07 01:02:00 INFO: 2020-09-07 02:00:20 INFO: 2020-09-07 02:00:20 INFO: 2020-09-07 02:00:20 INFO: 2020-09-07 02:00:20 INFO: 2020-09-07 02:00:20 INFO: init new order start 2020-09-07 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 6, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.55, 'high': 359.2, 'low': 347.5, 'close': 351.75, 'trades': 9735, 'volume': 8406906, 'vwap': 352.24, 'lastSize': 1, 'turnover': 296122336385, 'homeNotional': 86157.93697559104, 'foreignNotional': 30349117.002274267}, {'timestamp': datetime.datetime(2020, 9, 6, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.0, 'high': 360.6, 'low': 351.7, 'close': 357.55, 'trades': 6144, 'volume': 4818399, 'vwap': 357.46, 'lastSize': 30, 'turnover': 172235560325, 'homeNotional': 49642.94315510562, 'foreignNotional': 17745241.208485354}, {'timestamp': datetime.datetime(2020, 9, 6, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.45, 'high': 356.1, 'low': 351.0, 'close': 352.0, 'trades': 3961, 'volume': 2108741, 'vwap': 353.19, 'lastSize': 147, 'turnover': 74476584245, 'homeNotional': 21603.44326284665, 'foreignNotional': 7629929.64887349}] 2020-09-07 02:00:20 INFO: prepare candles [CandleItem(low=347.5, high=359.2, open=357.55, close=351.75, color='RED'), CandleItem(low=351.7, high=360.6, open=352.0, close=357.55, color='GREEN'), CandleItem(low=351.0, high=356.1, open=353.45, close=352.0, color='RED')] 2020-09-07 02:00:20 INFO: skip by colors first_candle=CandleItem(low=351.0, high=356.1, open=353.45, close=352.0, color='RED') second_candle=CandleItem(low=351.7, high=360.6, open=352.0, close=357.55, color='GREEN') last_candle=CandleItem(low=347.5, high=359.2, open=357.55, close=351.75, color='RED') 2020-09-07 02:00:20 INFO: check need new order None 2020-09-07 02:00:20 INFO: init new order end 2020-09-07 02:00:20 INFO: 2020-09-07 02:00:20 INFO: 2020-09-07 02:00:20 INFO: 2020-09-07 02:00:20 INFO: 2020-09-07 02:02:00 INFO: 2020-09-07 02:02:00 INFO: 2020-09-07 02:02:00 INFO: 2020-09-07 02:02:00 INFO: 2020-09-07 02:02:00 INFO: clearing start 2020-09-07 02:02:00 INFO: clearing end 2020-09-07 02:02:00 INFO: 2020-09-07 02:02:00 INFO: 2020-09-07 02:02:00 INFO: 2020-09-07 02:02:00 INFO: 2020-09-07 03:00:20 INFO: 2020-09-07 03:00:20 INFO: 2020-09-07 03:00:20 INFO: 2020-09-07 03:00:20 INFO: 2020-09-07 03:00:20 INFO: init new order start 2020-09-07 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 7, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.75, 'high': 356.6, 'low': 350.4, 'close': 353.05, 'trades': 4999, 'volume': 3522020, 'vwap': 353.36, 'lastSize': 200, 'turnover': 124453903215, 'homeNotional': 36073.58239688977, 'foreignNotional': 12747112.091135222}, {'timestamp': datetime.datetime(2020, 9, 6, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.55, 'high': 359.2, 'low': 347.5, 'close': 351.75, 'trades': 9735, 'volume': 8406906, 'vwap': 352.24, 'lastSize': 1, 'turnover': 296122336385, 'homeNotional': 86157.93697559104, 'foreignNotional': 30349117.002274267}, {'timestamp': datetime.datetime(2020, 9, 6, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 352.0, 'high': 360.6, 'low': 351.7, 'close': 357.55, 'trades': 6144, 'volume': 4818399, 'vwap': 357.46, 'lastSize': 30, 'turnover': 172235560325, 'homeNotional': 49642.94315510562, 'foreignNotional': 17745241.208485354}] 2020-09-07 03:00:20 INFO: prepare candles [CandleItem(low=350.4, high=356.6, open=351.75, close=353.05, color='GREEN'), CandleItem(low=347.5, high=359.2, open=357.55, close=351.75, color='RED'), CandleItem(low=351.7, high=360.6, open=352.0, close=357.55, color='GREEN')] 2020-09-07 03:00:20 INFO: skip by colors first_candle=CandleItem(low=351.7, high=360.6, open=352.0, close=357.55, color='GREEN') second_candle=CandleItem(low=347.5, high=359.2, open=357.55, close=351.75, color='RED') last_candle=CandleItem(low=350.4, high=356.6, open=351.75, close=353.05, color='GREEN') 2020-09-07 03:00:20 INFO: check need new order None 2020-09-07 03:00:20 INFO: init new order end 2020-09-07 03:00:20 INFO: 2020-09-07 03:00:20 INFO: 2020-09-07 03:00:20 INFO: 2020-09-07 03:00:20 INFO: 2020-09-07 03:02:00 INFO: 2020-09-07 03:02:00 INFO: 2020-09-07 03:02:00 INFO: 2020-09-07 03:02:00 INFO: 2020-09-07 03:02:00 INFO: clearing start 2020-09-07 03:02:00 INFO: clearing end 2020-09-07 03:02:00 INFO: 2020-09-07 03:02:00 INFO: 2020-09-07 03:02:00 INFO: 2020-09-07 03:02:00 INFO: 2020-09-07 04:00:20 INFO: 2020-09-07 04:00:20 INFO: 2020-09-07 04:00:20 INFO: 2020-09-07 04:00:20 INFO: 2020-09-07 04:00:20 INFO: init new order start 2020-09-07 04:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 7, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.05, 'high': 358.45, 'low': 352.25, 'close': 356.45, 'trades': 4056, 'volume': 3029872, 'vwap': 355.47, 'lastSize': 297, 'turnover': 107702027650, 'homeNotional': 31135.535382962382, 'foreignNotional': 11067728.332741132}, {'timestamp': datetime.datetime(2020, 9, 7, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.75, 'high': 356.6, 'low': 350.4, 'close': 353.05, 'trades': 4999, 'volume': 3522020, 'vwap': 353.36, 'lastSize': 200, 'turnover': 124453903215, 'homeNotional': 36073.58239688977, 'foreignNotional': 12747112.091135222}, {'timestamp': datetime.datetime(2020, 9, 6, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 357.55, 'high': 359.2, 'low': 347.5, 'close': 351.75, 'trades': 9735, 'volume': 8406906, 'vwap': 352.24, 'lastSize': 1, 'turnover': 296122336385, 'homeNotional': 86157.93697559104, 'foreignNotional': 30349117.002274267}] 2020-09-07 04:00:20 INFO: prepare candles [CandleItem(low=352.25, high=358.45, open=353.05, close=356.45, color='GREEN'), CandleItem(low=350.4, high=356.6, open=351.75, close=353.05, color='GREEN'), CandleItem(low=347.5, high=359.2, open=357.55, close=351.75, color='RED')] 2020-09-07 04:00:20 INFO: skip by colors first_candle=CandleItem(low=347.5, high=359.2, open=357.55, close=351.75, color='RED') second_candle=CandleItem(low=350.4, high=356.6, open=351.75, close=353.05, color='GREEN') last_candle=CandleItem(low=352.25, high=358.45, open=353.05, close=356.45, color='GREEN') 2020-09-07 04:00:20 INFO: check need new order None 2020-09-07 04:00:20 INFO: init new order end 2020-09-07 04:00:20 INFO: 2020-09-07 04:00:20 INFO: 2020-09-07 04:00:20 INFO: 2020-09-07 04:00:20 INFO: 2020-09-07 04:02:00 INFO: 2020-09-07 04:02:00 INFO: 2020-09-07 04:02:00 INFO: 2020-09-07 04:02:00 INFO: 2020-09-07 04:02:00 INFO: clearing start 2020-09-07 04:02:00 INFO: clearing end 2020-09-07 04:02:00 INFO: 2020-09-07 04:02:00 INFO: 2020-09-07 04:02:00 INFO: 2020-09-07 04:02:00 INFO: 2020-09-07 05:00:20 INFO: 2020-09-07 05:00:20 INFO: 2020-09-07 05:00:20 INFO: 2020-09-07 05:00:20 INFO: 2020-09-07 05:00:20 INFO: init new order start 2020-09-07 05:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 7, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.45, 'high': 357.0, 'low': 353.1, 'close': 356.95, 'trades': 3070, 'volume': 2063430, 'vwap': 354.91, 'lastSize': 71, 'turnover': 73232158570, 'homeNotional': 21186.18671169007, 'foreignNotional': 7519099.249963172}, {'timestamp': datetime.datetime(2020, 9, 7, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.05, 'high': 358.45, 'low': 352.25, 'close': 356.45, 'trades': 4056, 'volume': 3029872, 'vwap': 355.47, 'lastSize': 297, 'turnover': 107702027650, 'homeNotional': 31135.535382962382, 'foreignNotional': 11067728.332741132}, {'timestamp': datetime.datetime(2020, 9, 7, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 351.75, 'high': 356.6, 'low': 350.4, 'close': 353.05, 'trades': 4999, 'volume': 3522020, 'vwap': 353.36, 'lastSize': 200, 'turnover': 124453903215, 'homeNotional': 36073.58239688977, 'foreignNotional': 12747112.091135222}] 2020-09-07 05:00:21 INFO: prepare candles [CandleItem(low=353.1, high=357.0, open=356.45, close=356.95, color='GREEN'), CandleItem(low=352.25, high=358.45, open=353.05, close=356.45, color='GREEN'), CandleItem(low=350.4, high=356.6, open=351.75, close=353.05, color='GREEN')] 2020-09-07 05:00:21 INFO: skip by colors first_candle=CandleItem(low=350.4, high=356.6, open=351.75, close=353.05, color='GREEN') second_candle=CandleItem(low=352.25, high=358.45, open=353.05, close=356.45, color='GREEN') last_candle=CandleItem(low=353.1, high=357.0, open=356.45, close=356.95, color='GREEN') 2020-09-07 05:00:21 INFO: check need new order None 2020-09-07 05:00:21 INFO: init new order end 2020-09-07 05:00:21 INFO: 2020-09-07 05:00:21 INFO: 2020-09-07 05:00:21 INFO: 2020-09-07 05:00:21 INFO: 2020-09-07 05:02:00 INFO: 2020-09-07 05:02:00 INFO: 2020-09-07 05:02:00 INFO: 2020-09-07 05:02:00 INFO: 2020-09-07 05:02:00 INFO: clearing start 2020-09-07 05:02:00 INFO: clearing end 2020-09-07 05:02:00 INFO: 2020-09-07 05:02:00 INFO: 2020-09-07 05:02:00 INFO: 2020-09-07 05:02:00 INFO: 2020-09-07 06:00:20 INFO: 2020-09-07 06:00:20 INFO: 2020-09-07 06:00:20 INFO: 2020-09-07 06:00:20 INFO: 2020-09-07 06:00:20 INFO: init new order start 2020-09-07 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 7, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.95, 'high': 357.05, 'low': 348.7, 'close': 349.45, 'trades': 4614, 'volume': 3320734, 'vwap': 351.97, 'lastSize': 78, 'turnover': 116878478830, 'homeNotional': 34001.94980406117, 'foreignNotional': 11967645.27636965}, {'timestamp': datetime.datetime(2020, 9, 7, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.45, 'high': 357.0, 'low': 353.1, 'close': 356.95, 'trades': 3070, 'volume': 2063430, 'vwap': 354.91, 'lastSize': 71, 'turnover': 73232158570, 'homeNotional': 21186.18671169007, 'foreignNotional': 7519099.249963172}, {'timestamp': datetime.datetime(2020, 9, 7, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 353.05, 'high': 358.45, 'low': 352.25, 'close': 356.45, 'trades': 4056, 'volume': 3029872, 'vwap': 355.47, 'lastSize': 297, 'turnover': 107702027650, 'homeNotional': 31135.535382962382, 'foreignNotional': 11067728.332741132}] 2020-09-07 06:00:20 INFO: prepare candles [CandleItem(low=348.7, high=357.05, open=356.95, close=349.45, color='RED'), CandleItem(low=353.1, high=357.0, open=356.45, close=356.95, color='GREEN'), CandleItem(low=352.25, high=358.45, open=353.05, close=356.45, color='GREEN')] 2020-09-07 06:00:20 INFO: last_candle=CandleItem(low=348.7, high=357.05, open=356.95, close=349.45, color='RED') 2020-09-07 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-07 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=348.7, high=357.05, open=356.95, close=349.45, color='RED') 2020-09-07 06:00:20 INFO: skip by CandleItem(low=348.7, high=357.05, open=356.95, close=349.45, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-07 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-07 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=348.7, high=357.05, open=356.95, close=349.45, color='RED') 2020-09-07 06:00:20 INFO: skip by CandleItem(low=348.7, high=357.05, open=356.95, close=349.45, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-07 06:00:20 INFO: not found applicable config for candle 2020-09-07 06:00:20 INFO: check need new order None 2020-09-07 06:00:20 INFO: init new order end 2020-09-07 06:00:20 INFO: 2020-09-07 06:00:20 INFO: 2020-09-07 06:00:20 INFO: 2020-09-07 06:00:20 INFO: 2020-09-07 06:02:00 INFO: 2020-09-07 06:02:00 INFO: 2020-09-07 06:02:00 INFO: 2020-09-07 06:02:00 INFO: 2020-09-07 06:02:00 INFO: clearing start 2020-09-07 06:02:00 INFO: clearing end 2020-09-07 06:02:00 INFO: 2020-09-07 06:02:00 INFO: 2020-09-07 06:02:00 INFO: 2020-09-07 06:02:00 INFO: 2020-09-07 07:00:20 INFO: 2020-09-07 07:00:20 INFO: 2020-09-07 07:00:20 INFO: 2020-09-07 07:00:20 INFO: 2020-09-07 07:00:20 INFO: init new order start 2020-09-07 07:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 7, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.45, 'high': 350.75, 'low': 344.6, 'close': 348.2, 'trades': 4278, 'volume': 3661995, 'vwap': 347.69, 'lastSize': 30, 'turnover': 127322761685, 'homeNotional': 37367.30067497137, 'foreignNotional': 12992164.285131088}, {'timestamp': datetime.datetime(2020, 9, 7, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.95, 'high': 357.05, 'low': 348.7, 'close': 349.45, 'trades': 4614, 'volume': 3320734, 'vwap': 351.97, 'lastSize': 78, 'turnover': 116878478830, 'homeNotional': 34001.94980406117, 'foreignNotional': 11967645.27636965}, {'timestamp': datetime.datetime(2020, 9, 7, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.45, 'high': 357.0, 'low': 353.1, 'close': 356.95, 'trades': 3070, 'volume': 2063430, 'vwap': 354.91, 'lastSize': 71, 'turnover': 73232158570, 'homeNotional': 21186.18671169007, 'foreignNotional': 7519099.249963172}] 2020-09-07 07:00:21 INFO: prepare candles [CandleItem(low=344.6, high=350.75, open=349.45, close=348.2, color='RED'), CandleItem(low=348.7, high=357.05, open=356.95, close=349.45, color='RED'), CandleItem(low=353.1, high=357.0, open=356.45, close=356.95, color='GREEN')] 2020-09-07 07:00:21 INFO: skip by colors first_candle=CandleItem(low=353.1, high=357.0, open=356.45, close=356.95, color='GREEN') second_candle=CandleItem(low=348.7, high=357.05, open=356.95, close=349.45, color='RED') last_candle=CandleItem(low=344.6, high=350.75, open=349.45, close=348.2, color='RED') 2020-09-07 07:00:21 INFO: check need new order None 2020-09-07 07:00:21 INFO: init new order end 2020-09-07 07:00:21 INFO: 2020-09-07 07:00:21 INFO: 2020-09-07 07:00:21 INFO: 2020-09-07 07:00:21 INFO: 2020-09-07 07:02:00 INFO: 2020-09-07 07:02:00 INFO: 2020-09-07 07:02:00 INFO: 2020-09-07 07:02:00 INFO: 2020-09-07 07:02:00 INFO: clearing start 2020-09-07 07:02:00 INFO: clearing end 2020-09-07 07:02:00 INFO: 2020-09-07 07:02:00 INFO: 2020-09-07 07:02:00 INFO: 2020-09-07 07:02:00 INFO: 2020-09-07 08:00:20 INFO: 2020-09-07 08:00:20 INFO: 2020-09-07 08:00:20 INFO: 2020-09-07 08:00:20 INFO: 2020-09-07 08:00:20 INFO: init new order start 2020-09-07 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 7, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.2, 'high': 351.6, 'low': 345.85, 'close': 346.75, 'trades': 4031, 'volume': 3311409, 'vwap': 348.36, 'lastSize': 517, 'turnover': 115355301110, 'homeNotional': 33799.428180882445, 'foreignNotional': 11774350.30461512}, {'timestamp': datetime.datetime(2020, 9, 7, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.45, 'high': 350.75, 'low': 344.6, 'close': 348.2, 'trades': 4278, 'volume': 3661995, 'vwap': 347.69, 'lastSize': 30, 'turnover': 127322761685, 'homeNotional': 37367.30067497137, 'foreignNotional': 12992164.285131088}, {'timestamp': datetime.datetime(2020, 9, 7, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 356.95, 'high': 357.05, 'low': 348.7, 'close': 349.45, 'trades': 4614, 'volume': 3320734, 'vwap': 351.97, 'lastSize': 78, 'turnover': 116878478830, 'homeNotional': 34001.94980406117, 'foreignNotional': 11967645.27636965}] 2020-09-07 08:00:20 INFO: prepare candles [CandleItem(low=345.85, high=351.6, open=348.2, close=346.75, color='RED'), CandleItem(low=344.6, high=350.75, open=349.45, close=348.2, color='RED'), CandleItem(low=348.7, high=357.05, open=356.95, close=349.45, color='RED')] 2020-09-07 08:00:20 INFO: skip by colors first_candle=CandleItem(low=348.7, high=357.05, open=356.95, close=349.45, color='RED') second_candle=CandleItem(low=344.6, high=350.75, open=349.45, close=348.2, color='RED') last_candle=CandleItem(low=345.85, high=351.6, open=348.2, close=346.75, color='RED') 2020-09-07 08:00:20 INFO: check need new order None 2020-09-07 08:00:20 INFO: init new order end 2020-09-07 08:00:20 INFO: 2020-09-07 08:00:20 INFO: 2020-09-07 08:00:20 INFO: 2020-09-07 08:00:20 INFO: 2020-09-07 08:02:00 INFO: 2020-09-07 08:02:00 INFO: 2020-09-07 08:02:00 INFO: 2020-09-07 08:02:00 INFO: 2020-09-07 08:02:00 INFO: clearing start 2020-09-07 08:02:00 INFO: clearing end 2020-09-07 08:02:00 INFO: 2020-09-07 08:02:00 INFO: 2020-09-07 08:02:00 INFO: 2020-09-07 08:02:00 INFO: 2020-09-07 09:00:20 INFO: 2020-09-07 09:00:20 INFO: 2020-09-07 09:00:20 INFO: 2020-09-07 09:00:20 INFO: 2020-09-07 09:00:20 INFO: init new order start 2020-09-07 09:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 7, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.75, 'high': 347.4, 'low': 340.6, 'close': 342.05, 'trades': 5410, 'volume': 5068960, 'vwap': 344.4, 'lastSize': 30, 'turnover': 174574866225, 'homeNotional': 51441.52277126116, 'foreignNotional': 17716647.185307927}, {'timestamp': datetime.datetime(2020, 9, 7, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.2, 'high': 351.6, 'low': 345.85, 'close': 346.75, 'trades': 4031, 'volume': 3311409, 'vwap': 348.36, 'lastSize': 517, 'turnover': 115355301110, 'homeNotional': 33799.428180882445, 'foreignNotional': 11774350.30461512}, {'timestamp': datetime.datetime(2020, 9, 7, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 349.45, 'high': 350.75, 'low': 344.6, 'close': 348.2, 'trades': 4278, 'volume': 3661995, 'vwap': 347.69, 'lastSize': 30, 'turnover': 127322761685, 'homeNotional': 37367.30067497137, 'foreignNotional': 12992164.285131088}] 2020-09-07 09:00:20 INFO: prepare candles [CandleItem(low=340.6, high=347.4, open=346.75, close=342.05, color='RED'), CandleItem(low=345.85, high=351.6, open=348.2, close=346.75, color='RED'), CandleItem(low=344.6, high=350.75, open=349.45, close=348.2, color='RED')] 2020-09-07 09:00:20 INFO: skip by colors first_candle=CandleItem(low=344.6, high=350.75, open=349.45, close=348.2, color='RED') second_candle=CandleItem(low=345.85, high=351.6, open=348.2, close=346.75, color='RED') last_candle=CandleItem(low=340.6, high=347.4, open=346.75, close=342.05, color='RED') 2020-09-07 09:00:20 INFO: check need new order None 2020-09-07 09:00:20 INFO: init new order end 2020-09-07 09:00:20 INFO: 2020-09-07 09:00:20 INFO: 2020-09-07 09:00:20 INFO: 2020-09-07 09:00:20 INFO: 2020-09-07 09:02:00 INFO: 2020-09-07 09:02:00 INFO: 2020-09-07 09:02:00 INFO: 2020-09-07 09:02:00 INFO: 2020-09-07 09:02:00 INFO: clearing start 2020-09-07 09:02:00 INFO: clearing end 2020-09-07 09:02:00 INFO: 2020-09-07 09:02:00 INFO: 2020-09-07 09:02:00 INFO: 2020-09-07 09:02:00 INFO: 2020-09-07 10:00:20 INFO: 2020-09-07 10:00:20 INFO: 2020-09-07 10:00:20 INFO: 2020-09-07 10:00:20 INFO: 2020-09-07 10:00:20 INFO: init new order start 2020-09-07 10:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 7, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 342.05, 'high': 344.3, 'low': 339.3, 'close': 340.85, 'trades': 5444, 'volume': 5666339, 'vwap': 341.9, 'lastSize': 3, 'turnover': 193730727835, 'homeNotional': 57243.5989052729, 'foreignNotional': 19571519.950432416}, {'timestamp': datetime.datetime(2020, 9, 7, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.75, 'high': 347.4, 'low': 340.6, 'close': 342.05, 'trades': 5410, 'volume': 5068960, 'vwap': 344.4, 'lastSize': 30, 'turnover': 174574866225, 'homeNotional': 51441.52277126116, 'foreignNotional': 17716647.185307927}, {'timestamp': datetime.datetime(2020, 9, 7, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 348.2, 'high': 351.6, 'low': 345.85, 'close': 346.75, 'trades': 4031, 'volume': 3311409, 'vwap': 348.36, 'lastSize': 517, 'turnover': 115355301110, 'homeNotional': 33799.428180882445, 'foreignNotional': 11774350.30461512}] 2020-09-07 10:00:20 INFO: prepare candles [CandleItem(low=339.3, high=344.3, open=342.05, close=340.85, color='RED'), CandleItem(low=340.6, high=347.4, open=346.75, close=342.05, color='RED'), CandleItem(low=345.85, high=351.6, open=348.2, close=346.75, color='RED')] 2020-09-07 10:00:20 INFO: skip by colors first_candle=CandleItem(low=345.85, high=351.6, open=348.2, close=346.75, color='RED') second_candle=CandleItem(low=340.6, high=347.4, open=346.75, close=342.05, color='RED') last_candle=CandleItem(low=339.3, high=344.3, open=342.05, close=340.85, color='RED') 2020-09-07 10:00:20 INFO: check need new order None 2020-09-07 10:00:20 INFO: init new order end 2020-09-07 10:00:20 INFO: 2020-09-07 10:00:20 INFO: 2020-09-07 10:00:20 INFO: 2020-09-07 10:00:20 INFO: 2020-09-07 10:02:00 INFO: 2020-09-07 10:02:00 INFO: 2020-09-07 10:02:00 INFO: 2020-09-07 10:02:00 INFO: 2020-09-07 10:02:00 INFO: clearing start 2020-09-07 10:02:00 INFO: clearing end 2020-09-07 10:02:00 INFO: 2020-09-07 10:02:00 INFO: 2020-09-07 10:02:00 INFO: 2020-09-07 10:02:00 INFO: 2020-09-07 11:00:20 INFO: 2020-09-07 11:00:20 INFO: 2020-09-07 11:00:20 INFO: 2020-09-07 11:00:20 INFO: 2020-09-07 11:00:20 INFO: init new order start 2020-09-07 11:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 7, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 340.85, 'high': 347.5, 'low': 338.2, 'close': 343.7, 'trades': 5407, 'volume': 4196865, 'vwap': 344.05, 'lastSize': 3000, 'turnover': 144389150645, 'homeNotional': 42467.772189026786, 'foreignNotional': 14610885.34466548}, {'timestamp': datetime.datetime(2020, 9, 7, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 342.05, 'high': 344.3, 'low': 339.3, 'close': 340.85, 'trades': 5444, 'volume': 5666339, 'vwap': 341.9, 'lastSize': 3, 'turnover': 193730727835, 'homeNotional': 57243.5989052729, 'foreignNotional': 19571519.950432416}, {'timestamp': datetime.datetime(2020, 9, 7, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.75, 'high': 347.4, 'low': 340.6, 'close': 342.05, 'trades': 5410, 'volume': 5068960, 'vwap': 344.4, 'lastSize': 30, 'turnover': 174574866225, 'homeNotional': 51441.52277126116, 'foreignNotional': 17716647.185307927}] 2020-09-07 11:00:20 INFO: prepare candles [CandleItem(low=338.2, high=347.5, open=340.85, close=343.7, color='GREEN'), CandleItem(low=339.3, high=344.3, open=342.05, close=340.85, color='RED'), CandleItem(low=340.6, high=347.4, open=346.75, close=342.05, color='RED')] 2020-09-07 11:00:20 INFO: last_candle=CandleItem(low=338.2, high=347.5, open=340.85, close=343.7, color='GREEN') 2020-09-07 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-07 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=338.2, high=347.5, open=340.85, close=343.7, color='GREEN') 2020-09-07 11:00:20 INFO: skip by CandleItem(low=338.2, high=347.5, open=340.85, close=343.7, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-07 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-07 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=338.2, high=347.5, open=340.85, close=343.7, color='GREEN') 2020-09-07 11:00:20 INFO: skip by CandleItem(low=338.2, high=347.5, open=340.85, close=343.7, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-07 11:00:20 INFO: not found applicable config for candle 2020-09-07 11:00:20 INFO: check need new order None 2020-09-07 11:00:20 INFO: init new order end 2020-09-07 11:00:20 INFO: 2020-09-07 11:00:20 INFO: 2020-09-07 11:00:20 INFO: 2020-09-07 11:00:20 INFO: 2020-09-07 11:02:00 INFO: 2020-09-07 11:02:00 INFO: 2020-09-07 11:02:00 INFO: 2020-09-07 11:02:00 INFO: 2020-09-07 11:02:00 INFO: clearing start 2020-09-07 11:02:00 INFO: clearing end 2020-09-07 11:02:00 INFO: 2020-09-07 11:02:00 INFO: 2020-09-07 11:02:00 INFO: 2020-09-07 11:02:00 INFO: 2020-09-07 12:00:20 INFO: 2020-09-07 12:00:20 INFO: 2020-09-07 12:00:20 INFO: 2020-09-07 12:00:20 INFO: 2020-09-07 12:00:20 INFO: init new order start 2020-09-07 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 7, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 343.7, 'high': 350.15, 'low': 342.6, 'close': 346.1, 'trades': 6128, 'volume': 6231839, 'vwap': 347.7, 'lastSize': 30, 'turnover': 216679061700, 'homeNotional': 63328.425078046486, 'foreignNotional': 22019247.576112963}, {'timestamp': datetime.datetime(2020, 9, 7, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 340.85, 'high': 347.5, 'low': 338.2, 'close': 343.7, 'trades': 5407, 'volume': 4196865, 'vwap': 344.05, 'lastSize': 3000, 'turnover': 144389150645, 'homeNotional': 42467.772189026786, 'foreignNotional': 14610885.34466548}, {'timestamp': datetime.datetime(2020, 9, 7, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 342.05, 'high': 344.3, 'low': 339.3, 'close': 340.85, 'trades': 5444, 'volume': 5666339, 'vwap': 341.9, 'lastSize': 3, 'turnover': 193730727835, 'homeNotional': 57243.5989052729, 'foreignNotional': 19571519.950432416}] 2020-09-07 12:00:20 INFO: prepare candles [CandleItem(low=342.6, high=350.15, open=343.7, close=346.1, color='GREEN'), CandleItem(low=338.2, high=347.5, open=340.85, close=343.7, color='GREEN'), CandleItem(low=339.3, high=344.3, open=342.05, close=340.85, color='RED')] 2020-09-07 12:00:20 INFO: skip by colors first_candle=CandleItem(low=339.3, high=344.3, open=342.05, close=340.85, color='RED') second_candle=CandleItem(low=338.2, high=347.5, open=340.85, close=343.7, color='GREEN') last_candle=CandleItem(low=342.6, high=350.15, open=343.7, close=346.1, color='GREEN') 2020-09-07 12:00:20 INFO: check need new order None 2020-09-07 12:00:20 INFO: init new order end 2020-09-07 12:00:20 INFO: 2020-09-07 12:00:20 INFO: 2020-09-07 12:00:20 INFO: 2020-09-07 12:00:20 INFO: 2020-09-07 12:02:00 INFO: 2020-09-07 12:02:00 INFO: 2020-09-07 12:02:00 INFO: 2020-09-07 12:02:00 INFO: 2020-09-07 12:02:00 INFO: clearing start 2020-09-07 12:02:00 INFO: clearing end 2020-09-07 12:02:00 INFO: 2020-09-07 12:02:00 INFO: 2020-09-07 12:02:00 INFO: 2020-09-07 12:02:00 INFO: 2020-09-07 13:00:20 INFO: 2020-09-07 13:00:20 INFO: 2020-09-07 13:00:20 INFO: 2020-09-07 13:00:20 INFO: 2020-09-07 13:00:20 INFO: init new order start 2020-09-07 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 7, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.1, 'high': 348.9, 'low': 343.2, 'close': 344.25, 'trades': 3923, 'volume': 2348289, 'vwap': 345.97, 'lastSize': 300, 'turnover': 81243075490, 'homeNotional': 23824.272754805028, 'foreignNotional': 8242471.912689641}, {'timestamp': datetime.datetime(2020, 9, 7, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 343.7, 'high': 350.15, 'low': 342.6, 'close': 346.1, 'trades': 6128, 'volume': 6231839, 'vwap': 347.7, 'lastSize': 30, 'turnover': 216679061700, 'homeNotional': 63328.425078046486, 'foreignNotional': 22019247.576112963}, {'timestamp': datetime.datetime(2020, 9, 7, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 340.85, 'high': 347.5, 'low': 338.2, 'close': 343.7, 'trades': 5407, 'volume': 4196865, 'vwap': 344.05, 'lastSize': 3000, 'turnover': 144389150645, 'homeNotional': 42467.772189026786, 'foreignNotional': 14610885.34466548}] 2020-09-07 13:00:20 INFO: prepare candles [CandleItem(low=343.2, high=348.9, open=346.1, close=344.25, color='RED'), CandleItem(low=342.6, high=350.15, open=343.7, close=346.1, color='GREEN'), CandleItem(low=338.2, high=347.5, open=340.85, close=343.7, color='GREEN')] 2020-09-07 13:00:20 INFO: last_candle=CandleItem(low=343.2, high=348.9, open=346.1, close=344.25, color='RED') 2020-09-07 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-07 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=343.2, high=348.9, open=346.1, close=344.25, color='RED') 2020-09-07 13:00:20 INFO: skip by CandleItem(low=343.2, high=348.9, open=346.1, close=344.25, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-09-07 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-07 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=343.2, high=348.9, open=346.1, close=344.25, color='RED') 2020-09-07 13:00:20 INFO: apply filter None to candle=CandleItem(low=342.6, high=350.15, open=343.7, close=346.1, color='GREEN') 2020-09-07 13:00:20 INFO: apply filter None to candle=CandleItem(low=338.2, high=347.5, open=340.85, close=343.7, color='GREEN') 2020-09-07 13:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=343.2, high=348.9, open=346.1, close=344.25, color='RED'), take_profit_factor=5.0, clearing_interval=3600) 2020-09-07 13:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=343.2, high=348.9, open=346.1, close=344.25, color='RED'), take_profit_factor=5.0, clearing_interval=3600) 2020-09-07 13:00:20 INFO: place order: start candle=CandleItem(low=343.2, high=348.9, open=346.1, close=344.25, color='RED') ticker='ETHUSD' price_offset=0.1 2020-09-07 13:00:20 INFO: place order: side_factor=1 init_trigger_price=343.15 init_order_price=343.09999999999997 stop_price_offset=0.0 candle.size=5.699999999999989 stop_price=348.9 take_price=314.6 2020-09-07 13:00:20 INFO: place order round: side_factor=1 init_trigger_price=Decimal('343.1499999999999772626324556767940521240234375') init_order_price=Decimal('343.09999999999996589394868351519107818603515625') stop_price_offset=0.0 candle.size=5.699999999999989 stop_price=Decimal('348.8999999999999772626324556767940521240234375') take_price=Decimal('314.6000000000000227373675443232059478759765625') 2020-09-07 13:00:20 INFO: place order: compute qty=-330 2020-09-07 13:00:20 INFO: place order: save order to db 9ecf1d14961c4f4090116bda6e5464e1; response=True 2020-09-07 13:00:20 INFO: post order to exchange resp={'orderID': '70439e31-84ed-c27e-c563-8f39cc4c2853', 'clOrdID': '9ecf1d14961c4f4090116bda6e5464e1', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 330, 'price': 343.1, 'displayQty': None, 'stopPx': 343.15, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 330, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 7, 10, 0, 20, 673000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 7, 10, 0, 20, 673000, tzinfo=tzutc())} 2020-09-07 13:00:20 INFO: place new init order {'qty': -330, 'init_price': Decimal('343.1499999999999772626324556767940521240234375'), 'stop_price': Decimal('348.8999999999999772626324556767940521240234375'), 'take_price': Decimal('314.6000000000000227373675443232059478759765625'), 'order_uid': '9ecf1d14961c4f4090116bda6e5464e1', 'response': {'orderID': '70439e31-84ed-c27e-c563-8f39cc4c2853', 'clOrdID': '9ecf1d14961c4f4090116bda6e5464e1', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 330, 'price': 343.1, 'displayQty': None, 'stopPx': 343.15, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 330, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 7, 10, 0, 20, 673000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 7, 10, 0, 20, 673000, tzinfo=tzutc())}} 2020-09-07 13:00:20 INFO: init new order end 2020-09-07 13:00:20 INFO: 2020-09-07 13:00:20 INFO: 2020-09-07 13:00:20 INFO: 2020-09-07 13:00:20 INFO: 2020-09-07 13:00:20 INFO: process event {'orderID': '70439e31-84ed-c27e-c563-8f39cc4c2853', 'clOrdID': '9ecf1d14961c4f4090116bda6e5464e1', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 330, 'price': 343.1, 'displayQty': None, 'stopPx': 343.15, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 330, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-09-07T10:00:20.673Z', 'timestamp': '2020-09-07T10:00:20.673Z'} 2020-09-07 13:00:20 INFO: skip event 9ecf1d14961c4f4090116bda6e5464e1 New 2020-09-07 13:02:00 INFO: 2020-09-07 13:02:00 INFO: 2020-09-07 13:02:00 INFO: 2020-09-07 13:02:00 INFO: 2020-09-07 13:02:00 INFO: clearing start 2020-09-07 13:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '70439e31-84ed-c27e-c563-8f39cc4c2853', 'clOrdID': '9ecf1d14961c4f4090116bda6e5464e1', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 330, 'price': 343.1, 'displayQty': None, 'stopPx': 343.15, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 330, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 9, 7, 10, 0, 20, 673000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 9, 7, 10, 0, 20, 673000, tzinfo=tzutc())} 2020-09-07 13:02:00 INFO: order time=2020-09-07 10:00:20.673000+00:00; delta from now UTC=0:01:40.162738 time_delta.total_seconds()=100.162738; time_diff_offset='3600' 2020-09-07 13:02:00 INFO: skip by time diff 2020-09-07 10:00:20.673000+00:00 2020-09-07 13:02:00 INFO: clearing end 2020-09-07 13:02:00 INFO: 2020-09-07 13:02:00 INFO: 2020-09-07 13:02:00 INFO: 2020-09-07 13:02:00 INFO: 2020-09-07 13:03:50 INFO: process event {'orderID': '70439e31-84ed-c27e-c563-8f39cc4c2853', 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 330, 'avgPx': 343.1, 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'transactTime': '2020-09-07T10:03:50.771Z', 'timestamp': '2020-09-07T10:03:50.771Z', 'clOrdID': '9ecf1d14961c4f4090116bda6e5464e1', 'account': 605536, 'symbol': 'ETHUSD'} 2020-09-07 13:03:50 INFO: add new event={'uid': '9ecf1d14961c4f4090116bda6e5464e1', 'status': 'Filled'} 2020-09-07 13:03:51 INFO: 2020-09-07 13:03:51 INFO: 2020-09-07 13:03:51 INFO: 2020-09-07 13:03:51 INFO: 2020-09-07 13:03:51 INFO: process event start 2020-09-07 13:03:51 INFO: fetch new order event 9ecf1d14961c4f4090116bda6e5464e1 2020-09-07 13:03:51 INFO: fetch orders by event init={'stop': '348.8999999999999772626324556767940521240234375', 'take': '314.6000000000000227373675443232059478759765625', 'qty': '330', 'color': 'RED', 'ticker': 'ETHUSD', 'clearing_offset': '3600'} profit_pair=None 2020-09-07 13:03:51 INFO: process init order filled 2020-09-07 13:03:51 INFO: save profit orders to storage stop=8ed86a87fd4047ac952775b7b0f806bc take=1b006538f0a14835aa04ecd92477a585 2020-09-07 13:03:51 INFO: place profit orders take_price=314.6000000000000227373675443232059478759765625, stop_price=348.8999999999999772626324556767940521240234375, qty=330, color=RED, ticker=ETHUSD 8ed86a87fd4047ac952775b7b0f806bc 1b006538f0a14835aa04ecd92477a585 2020-09-07 13:03:51 INFO: place stop order ETHUSD: qty=330, stop_price=348.8999999999999772626324556767940521240234375, stop_uid=8ed86a87fd4047ac952775b7b0f806bc 2020-09-07 13:03:52 INFO: exchange resp for stop 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 13:03:52 INFO: place limit order ETHUSD: qty=330, price=314.6000000000000227373675443232059478759765625, take_uid=1b006538f0a14835aa04ecd92477a585 2020-09-07 13:03:52 INFO: process event {'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': '2020-09-07T10:03:52.014Z', 'timestamp': '2020-09-07T10:03:52.014Z'} 2020-09-07 13:03:52 INFO: skip event 8ed86a87fd4047ac952775b7b0f806bc New 2020-09-07 13:03:52 INFO: exchange resp for take profit 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 13:03:52 INFO: place profit orders={'stop': {'response': {'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())}, 'qty': Decimal('330'), 'uid': '8ed86a87fd4047ac952775b7b0f806bc', 'price': Decimal('348.8999999999999772626324556767940521240234375')}, 'take': {'response': {'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())}, 'qty': Decimal('330'), 'uid': '1b006538f0a14835aa04ecd92477a585', 'price': Decimal('314.6000000000000227373675443232059478759765625')}} 2020-09-07 13:03:52 INFO: process event {'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': '2020-09-07T10:03:52.058Z', 'timestamp': '2020-09-07T10:03:52.058Z'} 2020-09-07 13:03:52 INFO: skip event 1b006538f0a14835aa04ecd92477a585 New 2020-09-07 13:03:52 INFO: rm init order from db 9ecf1d14961c4f4090116bda6e5464e1 2020-09-07 13:03:52 INFO: end process event_processing_result='proceed init order' 2020-09-07 13:03:52 INFO: 2020-09-07 13:03:52 INFO: 2020-09-07 13:03:52 INFO: 2020-09-07 13:03:52 INFO: 2020-09-07 14:00:20 INFO: 2020-09-07 14:00:20 INFO: 2020-09-07 14:00:20 INFO: 2020-09-07 14:00:20 INFO: 2020-09-07 14:00:20 INFO: init new order start 2020-09-07 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 9, 7, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 344.25, 'high': 346.3, 'low': 339.25, 'close': 339.85, 'trades': 4505, 'volume': 4166233, 'vwap': 342.48, 'lastSize': 800, 'turnover': 142683057395, 'homeNotional': 42093.51782613268, 'foreignNotional': 14416097.989142733}, {'timestamp': datetime.datetime(2020, 9, 7, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.1, 'high': 348.9, 'low': 343.2, 'close': 344.25, 'trades': 3923, 'volume': 2348289, 'vwap': 345.97, 'lastSize': 300, 'turnover': 81243075490, 'homeNotional': 23824.272754805028, 'foreignNotional': 8242471.912689641}, {'timestamp': datetime.datetime(2020, 9, 7, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 343.7, 'high': 350.15, 'low': 342.6, 'close': 346.1, 'trades': 6128, 'volume': 6231839, 'vwap': 347.7, 'lastSize': 30, 'turnover': 216679061700, 'homeNotional': 63328.425078046486, 'foreignNotional': 22019247.576112963}] 2020-09-07 14:00:20 INFO: prepare candles [CandleItem(low=339.25, high=346.3, open=344.25, close=339.85, color='RED'), CandleItem(low=343.2, high=348.9, open=346.1, close=344.25, color='RED'), CandleItem(low=342.6, high=350.15, open=343.7, close=346.1, color='GREEN')] 2020-09-07 14:00:20 INFO: skip by colors first_candle=CandleItem(low=342.6, high=350.15, open=343.7, close=346.1, color='GREEN') second_candle=CandleItem(low=343.2, high=348.9, open=346.1, close=344.25, color='RED') last_candle=CandleItem(low=339.25, high=346.3, open=344.25, close=339.85, color='RED') 2020-09-07 14:00:20 INFO: check need new order None 2020-09-07 14:00:20 INFO: init new order end 2020-09-07 14:00:20 INFO: 2020-09-07 14:00:20 INFO: 2020-09-07 14:00:20 INFO: 2020-09-07 14:00:20 INFO: 2020-09-07 14:02:00 INFO: 2020-09-07 14:02:00 INFO: 2020-09-07 14:02:00 INFO: 2020-09-07 14:02:00 INFO: 2020-09-07 14:02:00 INFO: clearing start 2020-09-07 14: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 14:02:00 INFO: skip by not found init order into storage 2020-09-07 14: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 14:02:00 INFO: skip by not found init order into storage 2020-09-07 14:02:00 INFO: clearing end 2020-09-07 14:02:00 INFO: 2020-09-07 14:02:00 INFO: 2020-09-07 14:02:00 INFO: 2020-09-07 14:02:00 INFO: 2020-09-07 15:00:20 INFO: 2020-09-07 15:00:20 INFO: 2020-09-07 15:00:20 INFO: 2020-09-07 15:00:20 INFO: 2020-09-07 15:00:20 INFO: init new order start 2020-09-07 15:00:20 INFO: fetch buckets [{'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}, {'timestamp': datetime.datetime(2020, 9, 7, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 344.25, 'high': 346.3, 'low': 339.25, 'close': 339.85, 'trades': 4505, 'volume': 4166233, 'vwap': 342.48, 'lastSize': 800, 'turnover': 142683057395, 'homeNotional': 42093.51782613268, 'foreignNotional': 14416097.989142733}, {'timestamp': datetime.datetime(2020, 9, 7, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 346.1, 'high': 348.9, 'low': 343.2, 'close': 344.25, 'trades': 3923, 'volume': 2348289, 'vwap': 345.97, 'lastSize': 300, 'turnover': 81243075490, 'homeNotional': 23824.272754805028, 'foreignNotional': 8242471.912689641}] 2020-09-07 15:00:20 INFO: prepare candles [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'), CandleItem(low=343.2, high=348.9, open=346.1, close=344.25, color='RED')] 2020-09-07 15:00:20 INFO: skip by colors first_candle=CandleItem(low=343.2, high=348.9, open=346.1, close=344.25, color='RED') second_candle=CandleItem(low=339.25, high=346.3, open=344.25, close=339.85, color='RED') last_candle=CandleItem(low=332.25, high=344.6, open=339.85, close=336.2, color='RED') 2020-09-07 15:00:20 INFO: check need new order None 2020-09-07 15:00:20 INFO: init new order end 2020-09-07 15:00:20 INFO: 2020-09-07 15:00:20 INFO: 2020-09-07 15:00:20 INFO: 2020-09-07 15:00:20 INFO: 2020-09-07 15:02:00 INFO: 2020-09-07 15:02:00 INFO: 2020-09-07 15:02:00 INFO: 2020-09-07 15:02:00 INFO: 2020-09-07 15:02:00 INFO: clearing start 2020-09-07 15: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 15:02:01 INFO: skip by not found init order into storage 2020-09-07 15: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 15:02:01 INFO: skip by not found init order into storage 2020-09-07 15:02:01 INFO: clearing end 2020-09-07 15:02:01 INFO: 2020-09-07 15:02:01 INFO: 2020-09-07 15:02:01 INFO: 2020-09-07 15:02:01 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:00:20 INFO: 2020-09-07 16:00:20 INFO: init new order start 2020-09-07 16:00:20 INFO: fetch buckets [{'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}, {'timestamp': datetime.datetime(2020, 9, 7, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 344.25, 'high': 346.3, 'low': 339.25, 'close': 339.85, 'trades': 4505, 'volume': 4166233, 'vwap': 342.48, 'lastSize': 800