2020-08-15 20:00:20 INFO: prepare candles [CandleItem(low=433.7, high=439.75, open=436.25, close=435.6, color='RED'), CandleItem(low=432.25, high=438.35, open=433.35, close=436.25, color='GREEN'), CandleItem(low=429.0, high=434.45, open=432.8, close=433.35, color='GREEN')] 2020-08-15 20:00:20 INFO: last_candle=CandleItem(low=433.7, high=439.75, open=436.25, close=435.6, color='RED') 2020-08-15 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-15 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=433.7, high=439.75, open=436.25, close=435.6, color='RED') 2020-08-15 20:00:20 INFO: skip by CandleItem(low=433.7, high=439.75, open=436.25, close=435.6, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-15 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-15 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=433.7, high=439.75, open=436.25, close=435.6, color='RED') 2020-08-15 20:00:20 INFO: skip by CandleItem(low=433.7, high=439.75, open=436.25, close=435.6, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-15 20:00:20 INFO: not found applicable config for candle 2020-08-15 20:00:20 INFO: check need new order None 2020-08-15 20:00:20 INFO: init new order end 2020-08-15 20:00:20 INFO: 2020-08-15 20:00:20 INFO: 2020-08-15 20:00:20 INFO: 2020-08-15 20:00:20 INFO: 2020-08-15 20:02:00 INFO: 2020-08-15 20:02:00 INFO: 2020-08-15 20:02:00 INFO: 2020-08-15 20:02:00 INFO: 2020-08-15 20:02:00 INFO: clearing start 2020-08-15 20:02:01 INFO: clearing end 2020-08-15 20:02:01 INFO: 2020-08-15 20:02:01 INFO: 2020-08-15 20:02:01 INFO: 2020-08-15 20:02:01 INFO: 2020-08-15 21:00:20 INFO: 2020-08-15 21:00:20 INFO: 2020-08-15 21:00:20 INFO: 2020-08-15 21:00:20 INFO: 2020-08-15 21:00:20 INFO: init new order start 2020-08-15 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 15, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 435.6, 'high': 437.2, 'low': 435.25, 'close': 435.6, 'trades': 1950, 'volume': 1015502, 'vwap': 436.31, 'lastSize': 25, 'turnover': 44306557045, 'homeNotional': 12057.784164876392, 'foreignNotional': 5260837.722989639}, {'timestamp': datetime.datetime(2020, 8, 15, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 436.25, 'high': 439.75, 'low': 433.7, 'close': 435.6, 'trades': 5572, 'volume': 2804603, 'vwap': 437.17, 'lastSize': 842, 'turnover': 122606142215, 'homeNotional': 33298.69257237, 'foreignNotional': 14556933.2708962}, {'timestamp': datetime.datetime(2020, 8, 15, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 433.35, 'high': 438.35, 'low': 432.25, 'close': 436.25, 'trades': 6985, 'volume': 4378143, 'vwap': 435.87, 'lastSize': 1, 'turnover': 190826343425, 'homeNotional': 51898.8234461872, 'foreignNotional': 22620887.29137322}] 2020-08-15 21:00:20 INFO: skip by found empty buckets 2020-08-15 21:00:20 INFO: check need new order None 2020-08-15 21:00:20 INFO: init new order end 2020-08-15 21:00:20 INFO: 2020-08-15 21:00:20 INFO: 2020-08-15 21:00:20 INFO: 2020-08-15 21:00:20 INFO: 2020-08-15 21:02:00 INFO: 2020-08-15 21:02:00 INFO: 2020-08-15 21:02:00 INFO: 2020-08-15 21:02:00 INFO: 2020-08-15 21:02:00 INFO: clearing start 2020-08-15 21:02:00 INFO: clearing end 2020-08-15 21:02:00 INFO: 2020-08-15 21:02:00 INFO: 2020-08-15 21:02:00 INFO: 2020-08-15 21:02:00 INFO: 2020-08-15 22:00:20 INFO: 2020-08-15 22:00:20 INFO: 2020-08-15 22:00:20 INFO: 2020-08-15 22:00:20 INFO: 2020-08-15 22:00:20 INFO: init new order start 2020-08-15 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 15, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 435.6, 'high': 436.55, 'low': 434.2, 'close': 436.45, 'trades': 2188, 'volume': 760950, 'vwap': 435.44, 'lastSize': 20, 'turnover': 33134776070, 'homeNotional': 9037.957181042791, 'foreignNotional': 3935486.2108752597}, {'timestamp': datetime.datetime(2020, 8, 15, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 435.6, 'high': 437.2, 'low': 435.25, 'close': 435.6, 'trades': 1950, 'volume': 1015502, 'vwap': 436.31, 'lastSize': 25, 'turnover': 44306557045, 'homeNotional': 12057.784164876392, 'foreignNotional': 5260837.722989639}, {'timestamp': datetime.datetime(2020, 8, 15, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 436.25, 'high': 439.75, 'low': 433.7, 'close': 435.6, 'trades': 5572, 'volume': 2804603, 'vwap': 437.17, 'lastSize': 842, 'turnover': 122606142215, 'homeNotional': 33298.69257237, 'foreignNotional': 14556933.2708962}] 2020-08-15 22:00:20 INFO: skip by found empty buckets 2020-08-15 22:00:20 INFO: check need new order None 2020-08-15 22:00:20 INFO: init new order end 2020-08-15 22:00:20 INFO: 2020-08-15 22:00:20 INFO: 2020-08-15 22:00:20 INFO: 2020-08-15 22:00:20 INFO: 2020-08-15 22:02:00 INFO: 2020-08-15 22:02:00 INFO: 2020-08-15 22:02:00 INFO: 2020-08-15 22:02:00 INFO: 2020-08-15 22:02:00 INFO: clearing start 2020-08-15 22:02:00 INFO: clearing end 2020-08-15 22:02:00 INFO: 2020-08-15 22:02:00 INFO: 2020-08-15 22:02:00 INFO: 2020-08-15 22:02:00 INFO: 2020-08-15 23:00:20 INFO: 2020-08-15 23:00:20 INFO: 2020-08-15 23:00:20 INFO: 2020-08-15 23:00:20 INFO: 2020-08-15 23:00:20 INFO: init new order start 2020-08-15 23:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 15, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 436.45, 'high': 436.9, 'low': 432.2, 'close': 432.4, 'trades': 3423, 'volume': 2305769, 'vwap': 433.52, 'lastSize': 320, 'turnover': 99958281900, 'homeNotional': 27333.225404059423, 'foreignNotional': 11849362.676635077}, {'timestamp': datetime.datetime(2020, 8, 15, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 435.6, 'high': 436.55, 'low': 434.2, 'close': 436.45, 'trades': 2188, 'volume': 760950, 'vwap': 435.44, 'lastSize': 20, 'turnover': 33134776070, 'homeNotional': 9037.957181042791, 'foreignNotional': 3935486.2108752597}, {'timestamp': datetime.datetime(2020, 8, 15, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 435.6, 'high': 437.2, 'low': 435.25, 'close': 435.6, 'trades': 1950, 'volume': 1015502, 'vwap': 436.31, 'lastSize': 25, 'turnover': 44306557045, 'homeNotional': 12057.784164876392, 'foreignNotional': 5260837.722989639}] 2020-08-15 23:00:20 INFO: skip by found empty buckets 2020-08-15 23:00:20 INFO: check need new order None 2020-08-15 23:00:20 INFO: init new order end 2020-08-15 23:00:20 INFO: 2020-08-15 23:00:20 INFO: 2020-08-15 23:00:20 INFO: 2020-08-15 23:00:20 INFO: 2020-08-15 23:02:00 INFO: 2020-08-15 23:02:00 INFO: 2020-08-15 23:02:00 INFO: 2020-08-15 23:02:00 INFO: 2020-08-15 23:02:00 INFO: clearing start 2020-08-15 23:02:00 INFO: clearing end 2020-08-15 23:02:00 INFO: 2020-08-15 23:02:00 INFO: 2020-08-15 23:02:00 INFO: 2020-08-15 23:02:00 INFO: 2020-08-16 00:00:20 INFO: 2020-08-16 00:00:20 INFO: 2020-08-16 00:00:20 INFO: 2020-08-16 00:00:20 INFO: 2020-08-16 00:00:20 INFO: init new order start 2020-08-16 00:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 15, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 432.4, 'high': 435.45, 'low': 432.2, 'close': 433.3, 'trades': 3309, 'volume': 1933106, 'vwap': 433.55, 'lastSize': 100, 'turnover': 83809016270, 'homeNotional': 22928.724526329544, 'foreignNotional': 9940661.186607074}, {'timestamp': datetime.datetime(2020, 8, 15, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 436.45, 'high': 436.9, 'low': 432.2, 'close': 432.4, 'trades': 3423, 'volume': 2305769, 'vwap': 433.52, 'lastSize': 320, 'turnover': 99958281900, 'homeNotional': 27333.225404059423, 'foreignNotional': 11849362.676635077}, {'timestamp': datetime.datetime(2020, 8, 15, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 435.6, 'high': 436.55, 'low': 434.2, 'close': 436.45, 'trades': 2188, 'volume': 760950, 'vwap': 435.44, 'lastSize': 20, 'turnover': 33134776070, 'homeNotional': 9037.957181042791, 'foreignNotional': 3935486.2108752597}] 2020-08-16 00:00:21 INFO: prepare candles [CandleItem(low=432.2, high=435.45, open=432.4, close=433.3, color='GREEN'), CandleItem(low=432.2, high=436.9, open=436.45, close=432.4, color='RED'), CandleItem(low=434.2, high=436.55, open=435.6, close=436.45, color='GREEN')] 2020-08-16 00:00:21 INFO: skip by colors first_candle=CandleItem(low=434.2, high=436.55, open=435.6, close=436.45, color='GREEN') second_candle=CandleItem(low=432.2, high=436.9, open=436.45, close=432.4, color='RED') last_candle=CandleItem(low=432.2, high=435.45, open=432.4, close=433.3, color='GREEN') 2020-08-16 00:00:21 INFO: check need new order None 2020-08-16 00:00:21 INFO: init new order end 2020-08-16 00:00:21 INFO: 2020-08-16 00:00:21 INFO: 2020-08-16 00:00:21 INFO: 2020-08-16 00:00:21 INFO: 2020-08-16 00:02:00 INFO: 2020-08-16 00:02:00 INFO: 2020-08-16 00:02:00 INFO: 2020-08-16 00:02:00 INFO: 2020-08-16 00:02:00 INFO: clearing start 2020-08-16 00:02:00 INFO: clearing end 2020-08-16 00:02:00 INFO: 2020-08-16 00:02:00 INFO: 2020-08-16 00:02:00 INFO: 2020-08-16 00:02:00 INFO: 2020-08-16 01:00:20 INFO: 2020-08-16 01:00:20 INFO: 2020-08-16 01:00:20 INFO: 2020-08-16 01:00:20 INFO: 2020-08-16 01:00:20 INFO: init new order start 2020-08-16 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 15, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 433.3, 'high': 435.2, 'low': 429.2, 'close': 433.75, 'trades': 7015, 'volume': 4872060, 'vwap': 432.43, 'lastSize': 100, 'turnover': 210678484500, 'homeNotional': 58140.146507143654, 'foreignNotional': 25141060.166017056}, {'timestamp': datetime.datetime(2020, 8, 15, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 432.4, 'high': 435.45, 'low': 432.2, 'close': 433.3, 'trades': 3309, 'volume': 1933106, 'vwap': 433.55, 'lastSize': 100, 'turnover': 83809016270, 'homeNotional': 22928.724526329544, 'foreignNotional': 9940661.186607074}, {'timestamp': datetime.datetime(2020, 8, 15, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 436.45, 'high': 436.9, 'low': 432.2, 'close': 432.4, 'trades': 3423, 'volume': 2305769, 'vwap': 433.52, 'lastSize': 320, 'turnover': 99958281900, 'homeNotional': 27333.225404059423, 'foreignNotional': 11849362.676635077}] 2020-08-16 01:00:20 INFO: prepare candles [CandleItem(low=429.2, high=435.2, open=433.3, close=433.75, color='GREEN'), CandleItem(low=432.2, high=435.45, open=432.4, close=433.3, color='GREEN'), CandleItem(low=432.2, high=436.9, open=436.45, close=432.4, color='RED')] 2020-08-16 01:00:20 INFO: skip by colors first_candle=CandleItem(low=432.2, high=436.9, open=436.45, close=432.4, color='RED') second_candle=CandleItem(low=432.2, high=435.45, open=432.4, close=433.3, color='GREEN') last_candle=CandleItem(low=429.2, high=435.2, open=433.3, close=433.75, color='GREEN') 2020-08-16 01:00:20 INFO: check need new order None 2020-08-16 01:00:20 INFO: init new order end 2020-08-16 01:00:20 INFO: 2020-08-16 01:00:20 INFO: 2020-08-16 01:00:20 INFO: 2020-08-16 01:00:20 INFO: 2020-08-16 01:02:00 INFO: 2020-08-16 01:02:00 INFO: 2020-08-16 01:02:00 INFO: 2020-08-16 01:02:00 INFO: 2020-08-16 01:02:00 INFO: clearing start 2020-08-16 01:02:00 INFO: clearing end 2020-08-16 01:02:00 INFO: 2020-08-16 01:02:00 INFO: 2020-08-16 01:02:00 INFO: 2020-08-16 01:02:00 INFO: 2020-08-16 02:00:20 INFO: 2020-08-16 02:00:20 INFO: 2020-08-16 02:00:20 INFO: 2020-08-16 02:00:20 INFO: 2020-08-16 02:00:20 INFO: init new order start 2020-08-16 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 15, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 433.75, 'high': 437.0, 'low': 432.05, 'close': 432.55, 'trades': 7147, 'volume': 4923536, 'vwap': 434.74, 'lastSize': 915, 'turnover': 214043711935, 'homeNotional': 58741.52109197529, 'foreignNotional': 25537236.515986238}, {'timestamp': datetime.datetime(2020, 8, 15, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 433.3, 'high': 435.2, 'low': 429.2, 'close': 433.75, 'trades': 7015, 'volume': 4872060, 'vwap': 432.43, 'lastSize': 100, 'turnover': 210678484500, 'homeNotional': 58140.146507143654, 'foreignNotional': 25141060.166017056}, {'timestamp': datetime.datetime(2020, 8, 15, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 432.4, 'high': 435.45, 'low': 432.2, 'close': 433.3, 'trades': 3309, 'volume': 1933106, 'vwap': 433.55, 'lastSize': 100, 'turnover': 83809016270, 'homeNotional': 22928.724526329544, 'foreignNotional': 9940661.186607074}] 2020-08-16 02:00:20 INFO: prepare candles [CandleItem(low=432.05, high=437.0, open=433.75, close=432.55, color='RED'), CandleItem(low=429.2, high=435.2, open=433.3, close=433.75, color='GREEN'), CandleItem(low=432.2, high=435.45, open=432.4, close=433.3, color='GREEN')] 2020-08-16 02:00:20 INFO: last_candle=CandleItem(low=432.05, high=437.0, open=433.75, close=432.55, color='RED') 2020-08-16 02:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-08-16 02:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=432.05, high=437.0, open=433.75, close=432.55, color='RED') 2020-08-16 02:00:20 INFO: skip by CandleItem(low=432.05, high=437.0, open=433.75, close=432.55, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-16 02:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-08-16 02:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=432.05, high=437.0, open=433.75, close=432.55, color='RED') 2020-08-16 02:00:20 INFO: skip by CandleItem(low=432.05, high=437.0, open=433.75, close=432.55, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-16 02:00:20 INFO: not found applicable config for candle 2020-08-16 02:00:20 INFO: check need new order None 2020-08-16 02:00:20 INFO: init new order end 2020-08-16 02:00:20 INFO: 2020-08-16 02:00:20 INFO: 2020-08-16 02:00:20 INFO: 2020-08-16 02:00:20 INFO: 2020-08-16 02:02:00 INFO: 2020-08-16 02:02:00 INFO: 2020-08-16 02:02:00 INFO: 2020-08-16 02:02:00 INFO: 2020-08-16 02:02:00 INFO: clearing start 2020-08-16 02:02:00 INFO: clearing end 2020-08-16 02:02:00 INFO: 2020-08-16 02:02:00 INFO: 2020-08-16 02:02:00 INFO: 2020-08-16 02:02:00 INFO: 2020-08-16 03:00:20 INFO: 2020-08-16 03:00:20 INFO: 2020-08-16 03:00:20 INFO: 2020-08-16 03:00:20 INFO: 2020-08-16 03:00:20 INFO: init new order start 2020-08-16 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 16, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 432.55, 'high': 434.1, 'low': 429.95, 'close': 432.95, 'trades': 4014, 'volume': 1568851, 'vwap': 432.35, 'lastSize': 754, 'turnover': 67827732655, 'homeNotional': 18601.26642157567, 'foreignNotional': 8042108.250136749}, {'timestamp': datetime.datetime(2020, 8, 15, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 433.75, 'high': 437.0, 'low': 432.05, 'close': 432.55, 'trades': 7147, 'volume': 4923536, 'vwap': 434.74, 'lastSize': 915, 'turnover': 214043711935, 'homeNotional': 58741.52109197529, 'foreignNotional': 25537236.515986238}, {'timestamp': datetime.datetime(2020, 8, 15, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 433.3, 'high': 435.2, 'low': 429.2, 'close': 433.75, 'trades': 7015, 'volume': 4872060, 'vwap': 432.43, 'lastSize': 100, 'turnover': 210678484500, 'homeNotional': 58140.146507143654, 'foreignNotional': 25141060.166017056}] 2020-08-16 03:00:20 INFO: prepare candles [CandleItem(low=429.95, high=434.1, open=432.55, close=432.95, color='GREEN'), CandleItem(low=432.05, high=437.0, open=433.75, close=432.55, color='RED'), CandleItem(low=429.2, high=435.2, open=433.3, close=433.75, color='GREEN')] 2020-08-16 03:00:20 INFO: skip by colors first_candle=CandleItem(low=429.2, high=435.2, open=433.3, close=433.75, color='GREEN') second_candle=CandleItem(low=432.05, high=437.0, open=433.75, close=432.55, color='RED') last_candle=CandleItem(low=429.95, high=434.1, open=432.55, close=432.95, color='GREEN') 2020-08-16 03:00:20 INFO: check need new order None 2020-08-16 03:00:20 INFO: init new order end 2020-08-16 03:00:20 INFO: 2020-08-16 03:00:20 INFO: 2020-08-16 03:00:20 INFO: 2020-08-16 03:00:20 INFO: 2020-08-16 03:02:00 INFO: 2020-08-16 03:02:00 INFO: 2020-08-16 03:02:00 INFO: 2020-08-16 03:02:00 INFO: 2020-08-16 03:02:00 INFO: clearing start 2020-08-16 03:02:00 INFO: clearing end 2020-08-16 03:02:00 INFO: 2020-08-16 03:02:00 INFO: 2020-08-16 03:02:00 INFO: 2020-08-16 03:02:00 INFO: 2020-08-16 04:00:20 INFO: 2020-08-16 04:00:20 INFO: 2020-08-16 04:00:20 INFO: 2020-08-16 04:00:20 INFO: 2020-08-16 04:00:20 INFO: init new order start 2020-08-16 04:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 16, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 432.95, 'high': 434.0, 'low': 427.4, 'close': 427.5, 'trades': 5216, 'volume': 2532543, 'vwap': 430.25, 'lastSize': 2000, 'turnover': 108962637890, 'homeNotional': 29963.739797463404, 'foreignNotional': 12891930.292823583}, {'timestamp': datetime.datetime(2020, 8, 16, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 432.55, 'high': 434.1, 'low': 429.95, 'close': 432.95, 'trades': 4014, 'volume': 1568851, 'vwap': 432.35, 'lastSize': 754, 'turnover': 67827732655, 'homeNotional': 18601.26642157567, 'foreignNotional': 8042108.250136749}, {'timestamp': datetime.datetime(2020, 8, 15, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 433.75, 'high': 437.0, 'low': 432.05, 'close': 432.55, 'trades': 7147, 'volume': 4923536, 'vwap': 434.74, 'lastSize': 915, 'turnover': 214043711935, 'homeNotional': 58741.52109197529, 'foreignNotional': 25537236.515986238}] 2020-08-16 04:00:20 INFO: prepare candles [CandleItem(low=427.4, high=434.0, open=432.95, close=427.5, color='RED'), CandleItem(low=429.95, high=434.1, open=432.55, close=432.95, color='GREEN'), CandleItem(low=432.05, high=437.0, open=433.75, close=432.55, color='RED')] 2020-08-16 04:00:20 INFO: skip by colors first_candle=CandleItem(low=432.05, high=437.0, open=433.75, close=432.55, color='RED') second_candle=CandleItem(low=429.95, high=434.1, open=432.55, close=432.95, color='GREEN') last_candle=CandleItem(low=427.4, high=434.0, open=432.95, close=427.5, color='RED') 2020-08-16 04:00:20 INFO: check need new order None 2020-08-16 04:00:20 INFO: init new order end 2020-08-16 04:00:20 INFO: 2020-08-16 04:00:20 INFO: 2020-08-16 04:00:20 INFO: 2020-08-16 04:00:20 INFO: 2020-08-16 04:02:00 INFO: 2020-08-16 04:02:00 INFO: 2020-08-16 04:02:00 INFO: 2020-08-16 04:02:00 INFO: 2020-08-16 04:02:00 INFO: clearing start 2020-08-16 04:02:00 INFO: clearing end 2020-08-16 04:02:00 INFO: 2020-08-16 04:02:00 INFO: 2020-08-16 04:02:00 INFO: 2020-08-16 04:02:00 INFO: 2020-08-16 05:00:20 INFO: 2020-08-16 05:00:20 INFO: 2020-08-16 05:00:20 INFO: 2020-08-16 05:00:20 INFO: 2020-08-16 05:00:20 INFO: init new order start 2020-08-16 05:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 16, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 427.5, 'high': 430.95, 'low': 422.05, 'close': 430.75, 'trades': 7504, 'volume': 5776056, 'vwap': 426.88, 'lastSize': 2398, 'turnover': 246566821340, 'homeNotional': 68354.03125567814, 'foreignNotional': 29179106.72805048}, {'timestamp': datetime.datetime(2020, 8, 16, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 432.95, 'high': 434.0, 'low': 427.4, 'close': 427.5, 'trades': 5216, 'volume': 2532543, 'vwap': 430.25, 'lastSize': 2000, 'turnover': 108962637890, 'homeNotional': 29963.739797463404, 'foreignNotional': 12891930.292823583}, {'timestamp': datetime.datetime(2020, 8, 16, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 432.55, 'high': 434.1, 'low': 429.95, 'close': 432.95, 'trades': 4014, 'volume': 1568851, 'vwap': 432.35, 'lastSize': 754, 'turnover': 67827732655, 'homeNotional': 18601.26642157567, 'foreignNotional': 8042108.250136749}] 2020-08-16 05:00:20 INFO: prepare candles [CandleItem(low=422.05, high=430.95, open=427.5, close=430.75, color='GREEN'), CandleItem(low=427.4, high=434.0, open=432.95, close=427.5, color='RED'), CandleItem(low=429.95, high=434.1, open=432.55, close=432.95, color='GREEN')] 2020-08-16 05:00:20 INFO: skip by colors first_candle=CandleItem(low=429.95, high=434.1, open=432.55, close=432.95, color='GREEN') second_candle=CandleItem(low=427.4, high=434.0, open=432.95, close=427.5, color='RED') last_candle=CandleItem(low=422.05, high=430.95, open=427.5, close=430.75, color='GREEN') 2020-08-16 05:00:20 INFO: check need new order None 2020-08-16 05:00:20 INFO: init new order end 2020-08-16 05:00:20 INFO: 2020-08-16 05:00:20 INFO: 2020-08-16 05:00:20 INFO: 2020-08-16 05:00:20 INFO: 2020-08-16 05:02:00 INFO: 2020-08-16 05:02:00 INFO: 2020-08-16 05:02:00 INFO: 2020-08-16 05:02:00 INFO: 2020-08-16 05:02:00 INFO: clearing start 2020-08-16 05:02:00 INFO: clearing end 2020-08-16 05:02:00 INFO: 2020-08-16 05:02:00 INFO: 2020-08-16 05:02:00 INFO: 2020-08-16 05:02:00 INFO: 2020-08-16 06:00:20 INFO: 2020-08-16 06:00:20 INFO: 2020-08-16 06:00:20 INFO: 2020-08-16 06:00:20 INFO: 2020-08-16 06:00:20 INFO: init new order start 2020-08-16 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 16, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 430.75, 'high': 430.8, 'low': 427.05, 'close': 427.45, 'trades': 3294, 'volume': 1911059, 'vwap': 428.5, 'lastSize': 10, 'turnover': 81888522325, 'homeNotional': 22685.528837667378, 'foreignNotional': 9720716.9850439}, {'timestamp': datetime.datetime(2020, 8, 16, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 427.5, 'high': 430.95, 'low': 422.05, 'close': 430.75, 'trades': 7504, 'volume': 5776056, 'vwap': 426.88, 'lastSize': 2398, 'turnover': 246566821340, 'homeNotional': 68354.03125567814, 'foreignNotional': 29179106.72805048}, {'timestamp': datetime.datetime(2020, 8, 16, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 432.95, 'high': 434.0, 'low': 427.4, 'close': 427.5, 'trades': 5216, 'volume': 2532543, 'vwap': 430.25, 'lastSize': 2000, 'turnover': 108962637890, 'homeNotional': 29963.739797463404, 'foreignNotional': 12891930.292823583}] 2020-08-16 06:00:20 INFO: prepare candles [CandleItem(low=427.05, high=430.8, open=430.75, close=427.45, color='RED'), CandleItem(low=422.05, high=430.95, open=427.5, close=430.75, color='GREEN'), CandleItem(low=427.4, high=434.0, open=432.95, close=427.5, color='RED')] 2020-08-16 06:00:20 INFO: skip by colors first_candle=CandleItem(low=427.4, high=434.0, open=432.95, close=427.5, color='RED') second_candle=CandleItem(low=422.05, high=430.95, open=427.5, close=430.75, color='GREEN') last_candle=CandleItem(low=427.05, high=430.8, open=430.75, close=427.45, color='RED') 2020-08-16 06:00:20 INFO: check need new order None 2020-08-16 06:00:20 INFO: init new order end 2020-08-16 06:00:20 INFO: 2020-08-16 06:00:20 INFO: 2020-08-16 06:00:20 INFO: 2020-08-16 06:00:20 INFO: 2020-08-16 06:02:00 INFO: 2020-08-16 06:02:00 INFO: 2020-08-16 06:02:00 INFO: 2020-08-16 06:02:00 INFO: 2020-08-16 06:02:00 INFO: clearing start 2020-08-16 06:02:00 INFO: clearing end 2020-08-16 06:02:00 INFO: 2020-08-16 06:02:00 INFO: 2020-08-16 06:02:00 INFO: 2020-08-16 06:02:00 INFO: 2020-08-16 07:00:20 INFO: 2020-08-16 07:00:20 INFO: 2020-08-16 07:00:20 INFO: 2020-08-16 07:00:20 INFO: 2020-08-16 07:00:20 INFO: init new order start 2020-08-16 07:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 16, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 427.45, 'high': 429.7, 'low': 427.1, 'close': 427.5, 'trades': 2624, 'volume': 1491494, 'vwap': 428.83, 'lastSize': 835, 'turnover': 63958382925, 'homeNotional': 17750.279195909046, 'foreignNotional': 7611686.990477821}, {'timestamp': datetime.datetime(2020, 8, 16, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 430.75, 'high': 430.8, 'low': 427.05, 'close': 427.45, 'trades': 3294, 'volume': 1911059, 'vwap': 428.5, 'lastSize': 10, 'turnover': 81888522325, 'homeNotional': 22685.528837667378, 'foreignNotional': 9720716.9850439}, {'timestamp': datetime.datetime(2020, 8, 16, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 427.5, 'high': 430.95, 'low': 422.05, 'close': 430.75, 'trades': 7504, 'volume': 5776056, 'vwap': 426.88, 'lastSize': 2398, 'turnover': 246566821340, 'homeNotional': 68354.03125567814, 'foreignNotional': 29179106.72805048}] 2020-08-16 07:00:20 INFO: prepare candles [CandleItem(low=427.1, high=429.7, open=427.45, close=427.5, color='GREEN'), CandleItem(low=427.05, high=430.8, open=430.75, close=427.45, color='RED'), CandleItem(low=422.05, high=430.95, open=427.5, close=430.75, color='GREEN')] 2020-08-16 07:00:20 INFO: skip by colors first_candle=CandleItem(low=422.05, high=430.95, open=427.5, close=430.75, color='GREEN') second_candle=CandleItem(low=427.05, high=430.8, open=430.75, close=427.45, color='RED') last_candle=CandleItem(low=427.1, high=429.7, open=427.45, close=427.5, color='GREEN') 2020-08-16 07:00:20 INFO: check need new order None 2020-08-16 07:00:20 INFO: init new order end 2020-08-16 07:00:20 INFO: 2020-08-16 07:00:20 INFO: 2020-08-16 07:00:20 INFO: 2020-08-16 07:00:20 INFO: 2020-08-16 07:02:00 INFO: 2020-08-16 07:02:00 INFO: 2020-08-16 07:02:00 INFO: 2020-08-16 07:02:00 INFO: 2020-08-16 07:02:00 INFO: clearing start 2020-08-16 07:02:00 INFO: clearing end 2020-08-16 07:02:00 INFO: 2020-08-16 07:02:00 INFO: 2020-08-16 07:02:00 INFO: 2020-08-16 07:02:00 INFO: 2020-08-16 08:00:35 INFO: 2020-08-16 08:00:35 INFO: 2020-08-16 08:00:35 INFO: 2020-08-16 08:00:35 INFO: 2020-08-16 08:00:35 INFO: init new order start 2020-08-16 08:00:35 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 16, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 427.5, 'high': 429.4, 'low': 426.9, 'close': 428.95, 'trades': 2086, 'volume': 1272340, 'vwap': 428.12, 'lastSize': 208, 'turnover': 54471380960, 'homeNotional': 15162.9456693128, 'foreignNotional': 6491542.471988139}, {'timestamp': datetime.datetime(2020, 8, 16, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 427.45, 'high': 429.7, 'low': 427.1, 'close': 427.5, 'trades': 2624, 'volume': 1491494, 'vwap': 428.83, 'lastSize': 835, 'turnover': 63958382925, 'homeNotional': 17750.279195909046, 'foreignNotional': 7611686.990477821}, {'timestamp': datetime.datetime(2020, 8, 16, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 430.75, 'high': 430.8, 'low': 427.05, 'close': 427.45, 'trades': 3294, 'volume': 1911059, 'vwap': 428.5, 'lastSize': 10, 'turnover': 81888522325, 'homeNotional': 22685.528837667378, 'foreignNotional': 9720716.9850439}] 2020-08-16 08:00:35 INFO: prepare candles [CandleItem(low=426.9, high=429.4, open=427.5, close=428.95, color='GREEN'), CandleItem(low=427.1, high=429.7, open=427.45, close=427.5, color='GREEN'), CandleItem(low=427.05, high=430.8, open=430.75, close=427.45, color='RED')] 2020-08-16 08:00:35 INFO: skip by colors first_candle=CandleItem(low=427.05, high=430.8, open=430.75, close=427.45, color='RED') second_candle=CandleItem(low=427.1, high=429.7, open=427.45, close=427.5, color='GREEN') last_candle=CandleItem(low=426.9, high=429.4, open=427.5, close=428.95, color='GREEN') 2020-08-16 08:00:35 INFO: check need new order None 2020-08-16 08:00:35 INFO: init new order end 2020-08-16 08:00:35 INFO: 2020-08-16 08:00:35 INFO: 2020-08-16 08:00:35 INFO: 2020-08-16 08:00:35 INFO: 2020-08-16 08:02:00 INFO: 2020-08-16 08:02:00 INFO: 2020-08-16 08:02:00 INFO: 2020-08-16 08:02:00 INFO: 2020-08-16 08:02:00 INFO: clearing start 2020-08-16 08:02:00 INFO: clearing end 2020-08-16 08:02:00 INFO: 2020-08-16 08:02:00 INFO: 2020-08-16 08:02:00 INFO: 2020-08-16 08:02:00 INFO: 2020-08-16 09:00:20 INFO: 2020-08-16 09:00:20 INFO: 2020-08-16 09:00:20 INFO: 2020-08-16 09:00:20 INFO: 2020-08-16 09:00:20 INFO: init new order start 2020-08-16 09:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 16, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 428.95, 'high': 430.0, 'low': 428.15, 'close': 429.4, 'trades': 1465, 'volume': 1643325, 'vwap': 429.4, 'lastSize': 322, 'turnover': 70563715730, 'homeNotional': 19554.07985160656, 'foreignNotional': 8396444.704036484}, {'timestamp': datetime.datetime(2020, 8, 16, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 427.5, 'high': 429.4, 'low': 426.9, 'close': 428.95, 'trades': 2086, 'volume': 1272340, 'vwap': 428.12, 'lastSize': 208, 'turnover': 54471380960, 'homeNotional': 15162.9456693128, 'foreignNotional': 6491542.471988139}, {'timestamp': datetime.datetime(2020, 8, 16, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 427.45, 'high': 429.7, 'low': 427.1, 'close': 427.5, 'trades': 2624, 'volume': 1491494, 'vwap': 428.83, 'lastSize': 835, 'turnover': 63958382925, 'homeNotional': 17750.279195909046, 'foreignNotional': 7611686.990477821}] 2020-08-16 09:00:20 INFO: prepare candles [CandleItem(low=428.15, high=430.0, open=428.95, close=429.4, color='GREEN'), CandleItem(low=426.9, high=429.4, open=427.5, close=428.95, color='GREEN'), CandleItem(low=427.1, high=429.7, open=427.45, close=427.5, color='GREEN')] 2020-08-16 09:00:20 INFO: skip by colors first_candle=CandleItem(low=427.1, high=429.7, open=427.45, close=427.5, color='GREEN') second_candle=CandleItem(low=426.9, high=429.4, open=427.5, close=428.95, color='GREEN') last_candle=CandleItem(low=428.15, high=430.0, open=428.95, close=429.4, color='GREEN') 2020-08-16 09:00:20 INFO: check need new order None 2020-08-16 09:00:20 INFO: init new order end 2020-08-16 09:00:20 INFO: 2020-08-16 09:00:20 INFO: 2020-08-16 09:00:20 INFO: 2020-08-16 09:00:20 INFO: 2020-08-16 09:02:00 INFO: 2020-08-16 09:02:00 INFO: 2020-08-16 09:02:00 INFO: 2020-08-16 09:02:00 INFO: 2020-08-16 09:02:00 INFO: clearing start 2020-08-16 09:02:00 INFO: clearing end 2020-08-16 09:02:00 INFO: 2020-08-16 09:02:00 INFO: 2020-08-16 09:02:00 INFO: 2020-08-16 09:02:00 INFO: 2020-08-16 10:00:20 INFO: 2020-08-16 10:00:20 INFO: 2020-08-16 10:00:20 INFO: 2020-08-16 10:00:20 INFO: 2020-08-16 10:00:20 INFO: init new order start 2020-08-16 10:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 16, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 429.4, 'high': 429.95, 'low': 427.25, 'close': 429.4, 'trades': 2208, 'volume': 1188769, 'vwap': 428.78, 'lastSize': 101, 'turnover': 50971611980, 'homeNotional': 14137.292453129065, 'foreignNotional': 6061748.879162248}, {'timestamp': datetime.datetime(2020, 8, 16, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 428.95, 'high': 430.0, 'low': 428.15, 'close': 429.4, 'trades': 1465, 'volume': 1643325, 'vwap': 429.4, 'lastSize': 322, 'turnover': 70563715730, 'homeNotional': 19554.07985160656, 'foreignNotional': 8396444.704036484}, {'timestamp': datetime.datetime(2020, 8, 16, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 427.5, 'high': 429.4, 'low': 426.9, 'close': 428.95, 'trades': 2086, 'volume': 1272340, 'vwap': 428.12, 'lastSize': 208, 'turnover': 54471380960, 'homeNotional': 15162.9456693128, 'foreignNotional': 6491542.471988139}] 2020-08-16 10:00:20 INFO: skip by found empty buckets 2020-08-16 10:00:20 INFO: check need new order None 2020-08-16 10:00:20 INFO: init new order end 2020-08-16 10:00:20 INFO: 2020-08-16 10:00:20 INFO: 2020-08-16 10:00:20 INFO: 2020-08-16 10:00:20 INFO: 2020-08-16 10:02:00 INFO: 2020-08-16 10:02:00 INFO: 2020-08-16 10:02:00 INFO: 2020-08-16 10:02:00 INFO: 2020-08-16 10:02:00 INFO: clearing start 2020-08-16 10:02:01 INFO: clearing end 2020-08-16 10:02:01 INFO: 2020-08-16 10:02:01 INFO: 2020-08-16 10:02:01 INFO: 2020-08-16 10:02:01 INFO: 2020-08-16 11:00:20 INFO: 2020-08-16 11:00:20 INFO: 2020-08-16 11:00:20 INFO: 2020-08-16 11:00:20 INFO: 2020-08-16 11:00:20 INFO: init new order start 2020-08-16 11:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 16, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 429.4, 'high': 429.8, 'low': 427.05, 'close': 427.6, 'trades': 2649, 'volume': 2166204, 'vwap': 428.78, 'lastSize': 10, 'turnover': 92881602890, 'homeNotional': 25748.699784018194, 'foreignNotional': 11040435.778032554}, {'timestamp': datetime.datetime(2020, 8, 16, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 429.4, 'high': 429.95, 'low': 427.25, 'close': 429.4, 'trades': 2208, 'volume': 1188769, 'vwap': 428.78, 'lastSize': 101, 'turnover': 50971611980, 'homeNotional': 14137.292453129065, 'foreignNotional': 6061748.879162248}, {'timestamp': datetime.datetime(2020, 8, 16, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 428.95, 'high': 430.0, 'low': 428.15, 'close': 429.4, 'trades': 1465, 'volume': 1643325, 'vwap': 429.4, 'lastSize': 322, 'turnover': 70563715730, 'homeNotional': 19554.07985160656, 'foreignNotional': 8396444.704036484}] 2020-08-16 11:00:20 INFO: skip by found empty buckets 2020-08-16 11:00:20 INFO: check need new order None 2020-08-16 11:00:20 INFO: init new order end 2020-08-16 11:00:20 INFO: 2020-08-16 11:00:20 INFO: 2020-08-16 11:00:20 INFO: 2020-08-16 11:00:20 INFO: 2020-08-16 11:02:00 INFO: 2020-08-16 11:02:00 INFO: 2020-08-16 11:02:00 INFO: 2020-08-16 11:02:00 INFO: 2020-08-16 11:02:00 INFO: clearing start 2020-08-16 11:02:00 INFO: clearing end 2020-08-16 11:02:00 INFO: 2020-08-16 11:02:00 INFO: 2020-08-16 11:02:00 INFO: 2020-08-16 11:02:00 INFO: 2020-08-16 12:00:20 INFO: 2020-08-16 12:00:20 INFO: 2020-08-16 12:00:20 INFO: 2020-08-16 12:00:20 INFO: 2020-08-16 12:00:20 INFO: init new order start 2020-08-16 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 16, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 427.6, 'high': 429.05, 'low': 425.55, 'close': 427.65, 'trades': 3637, 'volume': 2592813, 'vwap': 427.72, 'lastSize': 1000, 'turnover': 110898381260, 'homeNotional': 30745.717902601173, 'foreignNotional': 13150414.719863895}, {'timestamp': datetime.datetime(2020, 8, 16, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 429.4, 'high': 429.8, 'low': 427.05, 'close': 427.6, 'trades': 2649, 'volume': 2166204, 'vwap': 428.78, 'lastSize': 10, 'turnover': 92881602890, 'homeNotional': 25748.699784018194, 'foreignNotional': 11040435.778032554}, {'timestamp': datetime.datetime(2020, 8, 16, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 429.4, 'high': 429.95, 'low': 427.25, 'close': 429.4, 'trades': 2208, 'volume': 1188769, 'vwap': 428.78, 'lastSize': 101, 'turnover': 50971611980, 'homeNotional': 14137.292453129065, 'foreignNotional': 6061748.879162248}] 2020-08-16 12:00:20 INFO: skip by found empty buckets 2020-08-16 12:00:20 INFO: check need new order None 2020-08-16 12:00:20 INFO: init new order end 2020-08-16 12:00:20 INFO: 2020-08-16 12:00:20 INFO: 2020-08-16 12:00:20 INFO: 2020-08-16 12:00:20 INFO: 2020-08-16 12:02:00 INFO: 2020-08-16 12:02:00 INFO: 2020-08-16 12:02:00 INFO: 2020-08-16 12:02:00 INFO: 2020-08-16 12:02:00 INFO: clearing start 2020-08-16 12:02:00 INFO: clearing end 2020-08-16 12:02:00 INFO: 2020-08-16 12:02:00 INFO: 2020-08-16 12:02:00 INFO: 2020-08-16 12:02:00 INFO: 2020-08-16 13:00:20 INFO: 2020-08-16 13:00:20 INFO: 2020-08-16 13:00:20 INFO: 2020-08-16 13:00:20 INFO: 2020-08-16 13:00:20 INFO: init new order start 2020-08-16 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 16, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 427.65, 'high': 428.5, 'low': 425.2, 'close': 427.9, 'trades': 3104, 'volume': 1972496, 'vwap': 427.27, 'lastSize': 1, 'turnover': 84277416540, 'homeNotional': 23385.393187516718, 'foreignNotional': 9991734.883210944}, {'timestamp': datetime.datetime(2020, 8, 16, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 427.6, 'high': 429.05, 'low': 425.55, 'close': 427.65, 'trades': 3637, 'volume': 2592813, 'vwap': 427.72, 'lastSize': 1000, 'turnover': 110898381260, 'homeNotional': 30745.717902601173, 'foreignNotional': 13150414.719863895}, {'timestamp': datetime.datetime(2020, 8, 16, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 429.4, 'high': 429.8, 'low': 427.05, 'close': 427.6, 'trades': 2649, 'volume': 2166204, 'vwap': 428.78, 'lastSize': 10, 'turnover': 92881602890, 'homeNotional': 25748.699784018194, 'foreignNotional': 11040435.778032554}] 2020-08-16 13:00:20 INFO: prepare candles [CandleItem(low=425.2, high=428.5, open=427.65, close=427.9, color='GREEN'), CandleItem(low=425.55, high=429.05, open=427.6, close=427.65, color='GREEN'), CandleItem(low=427.05, high=429.8, open=429.4, close=427.6, color='RED')] 2020-08-16 13:00:20 INFO: skip by colors first_candle=CandleItem(low=427.05, high=429.8, open=429.4, close=427.6, color='RED') second_candle=CandleItem(low=425.55, high=429.05, open=427.6, close=427.65, color='GREEN') last_candle=CandleItem(low=425.2, high=428.5, open=427.65, close=427.9, color='GREEN') 2020-08-16 13:00:20 INFO: check need new order None 2020-08-16 13:00:20 INFO: init new order end 2020-08-16 13:00:20 INFO: 2020-08-16 13:00:20 INFO: 2020-08-16 13:00:20 INFO: 2020-08-16 13:00:20 INFO: 2020-08-16 13:02:00 INFO: 2020-08-16 13:02:00 INFO: 2020-08-16 13:02:00 INFO: 2020-08-16 13:02:00 INFO: 2020-08-16 13:02:00 INFO: clearing start 2020-08-16 13:02:00 INFO: clearing end 2020-08-16 13:02:00 INFO: 2020-08-16 13:02:00 INFO: 2020-08-16 13:02:00 INFO: 2020-08-16 13:02:00 INFO: 2020-08-16 14:00:20 INFO: 2020-08-16 14:00:20 INFO: 2020-08-16 14:00:20 INFO: 2020-08-16 14:00:20 INFO: 2020-08-16 14:00:20 INFO: init new order start 2020-08-16 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 16, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 427.9, 'high': 428.1, 'low': 422.55, 'close': 423.8, 'trades': 6714, 'volume': 3355372, 'vwap': 424.75, 'lastSize': 10, 'turnover': 142517597595, 'homeNotional': 39631.590096824555, 'foreignNotional': 16833399.878730588}, {'timestamp': datetime.datetime(2020, 8, 16, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 427.65, 'high': 428.5, 'low': 425.2, 'close': 427.9, 'trades': 3104, 'volume': 1972496, 'vwap': 427.27, 'lastSize': 1, 'turnover': 84277416540, 'homeNotional': 23385.393187516718, 'foreignNotional': 9991734.883210944}, {'timestamp': datetime.datetime(2020, 8, 16, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 427.6, 'high': 429.05, 'low': 425.55, 'close': 427.65, 'trades': 3637, 'volume': 2592813, 'vwap': 427.72, 'lastSize': 1000, 'turnover': 110898381260, 'homeNotional': 30745.717902601173, 'foreignNotional': 13150414.719863895}] 2020-08-16 14:00:20 INFO: prepare candles [CandleItem(low=422.55, high=428.1, open=427.9, close=423.8, color='RED'), CandleItem(low=425.2, high=428.5, open=427.65, close=427.9, color='GREEN'), CandleItem(low=425.55, high=429.05, open=427.6, close=427.65, color='GREEN')] 2020-08-16 14:00:20 INFO: last_candle=CandleItem(low=422.55, high=428.1, open=427.9, close=423.8, color='RED') 2020-08-16 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-16 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=422.55, high=428.1, open=427.9, close=423.8, color='RED') 2020-08-16 14:00:20 INFO: skip by CandleItem(low=422.55, high=428.1, open=427.9, close=423.8, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-16 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-16 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=422.55, high=428.1, open=427.9, close=423.8, color='RED') 2020-08-16 14:00:20 INFO: skip by CandleItem(low=422.55, high=428.1, open=427.9, close=423.8, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-16 14:00:20 INFO: not found applicable config for candle 2020-08-16 14:00:20 INFO: check need new order None 2020-08-16 14:00:20 INFO: init new order end 2020-08-16 14:00:20 INFO: 2020-08-16 14:00:20 INFO: 2020-08-16 14:00:20 INFO: 2020-08-16 14:00:20 INFO: 2020-08-16 14:02:00 INFO: 2020-08-16 14:02:00 INFO: 2020-08-16 14:02:00 INFO: 2020-08-16 14:02:00 INFO: 2020-08-16 14:02:00 INFO: clearing start 2020-08-16 14:02:00 INFO: clearing end 2020-08-16 14:02:00 INFO: 2020-08-16 14:02:00 INFO: 2020-08-16 14:02:00 INFO: 2020-08-16 14:02:00 INFO: 2020-08-16 15:00:20 INFO: 2020-08-16 15:00:20 INFO: 2020-08-16 15:00:20 INFO: 2020-08-16 15:00:20 INFO: 2020-08-16 15:00:20 INFO: init new order start 2020-08-16 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 16, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 423.8, 'high': 424.0, 'low': 416.05, 'close': 418.6, 'trades': 11474, 'volume': 8310096, 'vwap': 420.16, 'lastSize': 300, 'turnover': 349150957760, 'homeNotional': 97775.77182738384, 'foreignNotional': 41080925.964177124}, {'timestamp': datetime.datetime(2020, 8, 16, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 427.9, 'high': 428.1, 'low': 422.55, 'close': 423.8, 'trades': 6714, 'volume': 3355372, 'vwap': 424.75, 'lastSize': 10, 'turnover': 142517597595, 'homeNotional': 39631.590096824555, 'foreignNotional': 16833399.878730588}, {'timestamp': datetime.datetime(2020, 8, 16, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 427.65, 'high': 428.5, 'low': 425.2, 'close': 427.9, 'trades': 3104, 'volume': 1972496, 'vwap': 427.27, 'lastSize': 1, 'turnover': 84277416540, 'homeNotional': 23385.393187516718, 'foreignNotional': 9991734.883210944}] 2020-08-16 15:00:20 INFO: prepare candles [CandleItem(low=416.05, high=424.0, open=423.8, close=418.6, color='RED'), CandleItem(low=422.55, high=428.1, open=427.9, close=423.8, color='RED'), CandleItem(low=425.2, high=428.5, open=427.65, close=427.9, color='GREEN')] 2020-08-16 15:00:20 INFO: skip by colors first_candle=CandleItem(low=425.2, high=428.5, open=427.65, close=427.9, color='GREEN') second_candle=CandleItem(low=422.55, high=428.1, open=427.9, close=423.8, color='RED') last_candle=CandleItem(low=416.05, high=424.0, open=423.8, close=418.6, color='RED') 2020-08-16 15:00:20 INFO: check need new order None 2020-08-16 15:00:20 INFO: init new order end 2020-08-16 15:00:20 INFO: 2020-08-16 15:00:20 INFO: 2020-08-16 15:00:20 INFO: 2020-08-16 15:00:20 INFO: 2020-08-16 15:02:00 INFO: 2020-08-16 15:02:00 INFO: 2020-08-16 15:02:00 INFO: 2020-08-16 15:02:00 INFO: 2020-08-16 15:02:00 INFO: clearing start 2020-08-16 15:02:00 INFO: clearing end 2020-08-16 15:02:00 INFO: 2020-08-16 15:02:00 INFO: 2020-08-16 15:02:00 INFO: 2020-08-16 15:02:00 INFO: 2020-08-16 16:00:20 INFO: 2020-08-16 16:00:20 INFO: 2020-08-16 16:00:20 INFO: 2020-08-16 16:00:20 INFO: 2020-08-16 16:00:20 INFO: init new order start 2020-08-16 16:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 16, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 418.6, 'high': 420.7, 'low': 413.15, 'close': 420.1, 'trades': 13497, 'volume': 7732718, 'vwap': 416.53, 'lastSize': 4914, 'turnover': 322088719865, 'homeNotional': 90783.19502423707, 'foreignNotional': 37813985.342689805}, {'timestamp': datetime.datetime(2020, 8, 16, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 423.8, 'high': 424.0, 'low': 416.05, 'close': 418.6, 'trades': 11474, 'volume': 8310096, 'vwap': 420.16, 'lastSize': 300, 'turnover': 349150957760, 'homeNotional': 97775.77182738384, 'foreignNotional': 41080925.964177124}, {'timestamp': datetime.datetime(2020, 8, 16, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 427.9, 'high': 428.1, 'low': 422.55, 'close': 423.8, 'trades': 6714, 'volume': 3355372, 'vwap': 424.75, 'lastSize': 10, 'turnover': 142517597595, 'homeNotional': 39631.590096824555, 'foreignNotional': 16833399.878730588}] 2020-08-16 16:00:20 INFO: prepare candles [CandleItem(low=413.15, high=420.7, open=418.6, close=420.1, color='GREEN'), CandleItem(low=416.05, high=424.0, open=423.8, close=418.6, color='RED'), CandleItem(low=422.55, high=428.1, open=427.9, close=423.8, color='RED')] 2020-08-16 16:00:20 INFO: last_candle=CandleItem(low=413.15, high=420.7, open=418.6, close=420.1, color='GREEN') 2020-08-16 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-08-16 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=413.15, high=420.7, open=418.6, close=420.1, color='GREEN') 2020-08-16 16:00:20 INFO: skip by CandleItem(low=413.15, high=420.7, open=418.6, close=420.1, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-16 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-08-16 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=413.15, high=420.7, open=418.6, close=420.1, color='GREEN') 2020-08-16 16:00:20 INFO: apply filter None to candle=CandleItem(low=416.05, high=424.0, open=423.8, close=418.6, color='RED') 2020-08-16 16:00:20 INFO: apply filter None to candle=CandleItem(low=422.55, high=428.1, open=427.9, close=423.8, color='RED') 2020-08-16 16:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=413.15, high=420.7, open=418.6, close=420.1, color='GREEN'), take_profit_factor=5.0, clearing_interval=3600) 2020-08-16 16:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=413.15, high=420.7, open=418.6, close=420.1, color='GREEN'), take_profit_factor=5.0, clearing_interval=3600) 2020-08-16 16:00:20 INFO: place order: start candle=CandleItem(low=413.15, high=420.7, open=418.6, close=420.1, color='GREEN') ticker='ETHUSD' price_offset=0.1 2020-08-16 16:00:20 INFO: place order: side_factor=-1 init_trigger_price=420.75 init_order_price=420.8 stop_price_offset=0.0 candle.size=7.550000000000011 stop_price=413.15 take_price=458.55000000000007 2020-08-16 16:00:20 INFO: place order round: side_factor=-1 init_trigger_price=Decimal('420.75') init_order_price=Decimal('420.80000000000001136868377216160297393798828125') stop_price_offset=0.0 candle.size=7.550000000000011 stop_price=Decimal('413.1499999999999772626324556767940521240234375') take_price=Decimal('458.5500000000000682121026329696178436279296875') 2020-08-16 16:00:20 INFO: place order: compute qty=250 2020-08-16 16:00:20 INFO: place order: save order to db e4e2e5abcaee40c7a1a7c559bd70c5a3; response=True 2020-08-16 16:00:20 INFO: post order to exchange resp={'orderID': '9f57a327-3dea-2a54-20f9-963b55da0000', 'clOrdID': 'e4e2e5abcaee40c7a1a7c559bd70c5a3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 250, 'price': 420.8, 'displayQty': None, 'stopPx': 420.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 0, 20, 964000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 0, 20, 964000, tzinfo=tzutc())} 2020-08-16 16:00:20 INFO: place new init order {'qty': 250, 'init_price': Decimal('420.75'), 'stop_price': Decimal('413.1499999999999772626324556767940521240234375'), 'take_price': Decimal('458.5500000000000682121026329696178436279296875'), 'order_uid': 'e4e2e5abcaee40c7a1a7c559bd70c5a3', 'response': {'orderID': '9f57a327-3dea-2a54-20f9-963b55da0000', 'clOrdID': 'e4e2e5abcaee40c7a1a7c559bd70c5a3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 250, 'price': 420.8, 'displayQty': None, 'stopPx': 420.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 0, 20, 964000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 0, 20, 964000, tzinfo=tzutc())}} 2020-08-16 16:00:20 INFO: init new order end 2020-08-16 16:00:20 INFO: 2020-08-16 16:00:20 INFO: 2020-08-16 16:00:20 INFO: 2020-08-16 16:00:20 INFO: 2020-08-16 16:00:21 INFO: process event {'orderID': '9f57a327-3dea-2a54-20f9-963b55da0000', 'clOrdID': 'e4e2e5abcaee40c7a1a7c559bd70c5a3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 250, 'price': 420.8, 'displayQty': None, 'stopPx': 420.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-08-16T13:00:20.964Z', 'timestamp': '2020-08-16T13:00:20.964Z'} 2020-08-16 16:00:21 INFO: skip event e4e2e5abcaee40c7a1a7c559bd70c5a3 New 2020-08-16 16:02:00 INFO: 2020-08-16 16:02:00 INFO: 2020-08-16 16:02:00 INFO: 2020-08-16 16:02:00 INFO: 2020-08-16 16:02:00 INFO: clearing start 2020-08-16 16:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '9f57a327-3dea-2a54-20f9-963b55da0000', 'clOrdID': 'e4e2e5abcaee40c7a1a7c559bd70c5a3', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 250, 'price': 420.8, 'displayQty': None, 'stopPx': 420.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 0, 20, 964000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 0, 20, 964000, tzinfo=tzutc())} 2020-08-16 16:02:00 INFO: order time=2020-08-16 13:00:20.964000+00:00; delta from now UTC=0:01:39.199223 time_delta.total_seconds()=99.199223; time_diff_offset='3600' 2020-08-16 16:02:00 INFO: skip by time diff 2020-08-16 13:00:20.964000+00:00 2020-08-16 16:02:00 INFO: clearing end 2020-08-16 16:02:00 INFO: 2020-08-16 16:02:00 INFO: 2020-08-16 16:02:00 INFO: 2020-08-16 16:02:00 INFO: 2020-08-16 16:08:10 INFO: process event {'orderID': '9f57a327-3dea-2a54-20f9-963b55da0000', 'triggered': 'StopOrderTriggered', 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'timestamp': '2020-08-16T13:08:10.267Z', 'clOrdID': 'e4e2e5abcaee40c7a1a7c559bd70c5a3', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-16 16:08:10 INFO: skip event e4e2e5abcaee40c7a1a7c559bd70c5a3 2020-08-16 16:08:10 INFO: process event {'orderID': '9f57a327-3dea-2a54-20f9-963b55da0000', 'ordStatus': 'Filled', 'leavesQty': 0, 'cumQty': 250, 'avgPx': 420.75, 'transactTime': '2020-08-16T13:08:10.267Z', 'clOrdID': 'e4e2e5abcaee40c7a1a7c559bd70c5a3', 'account': 605536, 'symbol': 'ETHUSD', 'timestamp': '2020-08-16T13:08:10.267Z'} 2020-08-16 16:08:10 INFO: add new event={'uid': 'e4e2e5abcaee40c7a1a7c559bd70c5a3', 'status': 'Filled'} 2020-08-16 16:08:10 INFO: 2020-08-16 16:08:10 INFO: 2020-08-16 16:08:10 INFO: 2020-08-16 16:08:10 INFO: 2020-08-16 16:08:10 INFO: process event start 2020-08-16 16:08:10 INFO: fetch new order event e4e2e5abcaee40c7a1a7c559bd70c5a3 2020-08-16 16:08:10 INFO: fetch orders by event init={'stop': '413.1499999999999772626324556767940521240234375', 'take': '458.5500000000000682121026329696178436279296875', 'qty': '250', 'color': 'GREEN', 'ticker': 'ETHUSD', 'clearing_offset': '3600'} profit_pair=None 2020-08-16 16:08:10 INFO: process init order filled 2020-08-16 16:08:10 INFO: save profit orders to storage stop=f1009cdf07fb4fc89622a32c9a521c18 take=aba77a429f13473a9efe6f2e07555853 2020-08-16 16:08:10 INFO: place profit orders take_price=458.5500000000000682121026329696178436279296875, stop_price=413.1499999999999772626324556767940521240234375, qty=250, color=GREEN, ticker=ETHUSD f1009cdf07fb4fc89622a32c9a521c18 aba77a429f13473a9efe6f2e07555853 2020-08-16 16:08:10 INFO: place stop order ETHUSD: qty=-250, stop_price=413.1499999999999772626324556767940521240234375, stop_uid=f1009cdf07fb4fc89622a32c9a521c18 2020-08-16 16:08:10 INFO: exchange resp for stop order={'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-16 16:08:10 INFO: place limit order ETHUSD: qty=-250, price=458.5500000000000682121026329696178436279296875, take_uid=aba77a429f13473a9efe6f2e07555853 2020-08-16 16:08:10 INFO: exchange resp for take profit order={'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-16 16:08:10 INFO: place profit orders={'stop': {'response': {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())}, 'qty': Decimal('-250'), 'uid': 'f1009cdf07fb4fc89622a32c9a521c18', 'price': Decimal('413.1499999999999772626324556767940521240234375')}, 'take': {'response': {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())}, 'qty': Decimal('-250'), 'uid': 'aba77a429f13473a9efe6f2e07555853', 'price': Decimal('458.5500000000000682121026329696178436279296875')}} 2020-08-16 16:08:10 INFO: rm init order from db e4e2e5abcaee40c7a1a7c559bd70c5a3 2020-08-16 16:08:10 INFO: end process event_processing_result='proceed init order' 2020-08-16 16:08:10 INFO: 2020-08-16 16:08:10 INFO: 2020-08-16 16:08:10 INFO: 2020-08-16 16:08:10 INFO: 2020-08-16 16:08:10 INFO: process event {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': '2020-08-16T13:08:10.759Z', 'timestamp': '2020-08-16T13:08:10.759Z'} 2020-08-16 16:08:10 INFO: skip event f1009cdf07fb4fc89622a32c9a521c18 New 2020-08-16 16:08:10 INFO: process event {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': '2020-08-16T13:08:10.801Z', 'timestamp': '2020-08-16T13:08:10.801Z'} 2020-08-16 16:08:10 INFO: skip event aba77a429f13473a9efe6f2e07555853 New 2020-08-16 16:08:10 INFO: process event {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'workingIndicator': True, 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'account': 605536, 'symbol': 'ETHUSD', 'timestamp': '2020-08-16T13:08:10.801Z'} 2020-08-16 16:08:10 INFO: skip event aba77a429f13473a9efe6f2e07555853 2020-08-16 17:00:20 INFO: 2020-08-16 17:00:20 INFO: 2020-08-16 17:00:20 INFO: 2020-08-16 17:00:20 INFO: 2020-08-16 17:00:20 INFO: init new order start 2020-08-16 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 16, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 420.1, 'high': 423.6, 'low': 418.7, 'close': 423.1, 'trades': 4751, 'volume': 2444446, 'vwap': 421.72, 'lastSize': 10, 'turnover': 103087007570, 'homeNotional': 28828.940702973898, 'foreignNotional': 12157754.136901237}, {'timestamp': datetime.datetime(2020, 8, 16, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 418.6, 'high': 420.7, 'low': 413.15, 'close': 420.1, 'trades': 13497, 'volume': 7732718, 'vwap': 416.53, 'lastSize': 4914, 'turnover': 322088719865, 'homeNotional': 90783.19502423707, 'foreignNotional': 37813985.342689805}, {'timestamp': datetime.datetime(2020, 8, 16, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 423.8, 'high': 424.0, 'low': 416.05, 'close': 418.6, 'trades': 11474, 'volume': 8310096, 'vwap': 420.16, 'lastSize': 300, 'turnover': 349150957760, 'homeNotional': 97775.77182738384, 'foreignNotional': 41080925.964177124}] 2020-08-16 17:00:20 INFO: prepare candles [CandleItem(low=418.7, high=423.6, open=420.1, close=423.1, color='GREEN'), CandleItem(low=413.15, high=420.7, open=418.6, close=420.1, color='GREEN'), CandleItem(low=416.05, high=424.0, open=423.8, close=418.6, color='RED')] 2020-08-16 17:00:20 INFO: skip by colors first_candle=CandleItem(low=416.05, high=424.0, open=423.8, close=418.6, color='RED') second_candle=CandleItem(low=413.15, high=420.7, open=418.6, close=420.1, color='GREEN') last_candle=CandleItem(low=418.7, high=423.6, open=420.1, close=423.1, color='GREEN') 2020-08-16 17:00:20 INFO: check need new order None 2020-08-16 17:00:20 INFO: init new order end 2020-08-16 17:00:20 INFO: 2020-08-16 17:00:20 INFO: 2020-08-16 17:00:20 INFO: 2020-08-16 17:00:20 INFO: 2020-08-16 17:02:00 INFO: 2020-08-16 17:02:00 INFO: 2020-08-16 17:02:00 INFO: 2020-08-16 17:02:00 INFO: 2020-08-16 17:02:00 INFO: clearing start 2020-08-16 17:02:01 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-16 17:02:01 INFO: skip by not found init order into storage 2020-08-16 17:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-16 17:02:01 INFO: skip by not found init order into storage 2020-08-16 17:02:01 INFO: clearing end 2020-08-16 17:02:01 INFO: 2020-08-16 17:02:01 INFO: 2020-08-16 17:02:01 INFO: 2020-08-16 17:02:01 INFO: 2020-08-16 18:00:20 INFO: 2020-08-16 18:00:20 INFO: 2020-08-16 18:00:20 INFO: 2020-08-16 18:00:20 INFO: 2020-08-16 18:00:20 INFO: init new order start 2020-08-16 18:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 16, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 423.1, 'high': 425.2, 'low': 422.7, 'close': 424.2, 'trades': 4051, 'volume': 2481662, 'vwap': 423.92, 'lastSize': 23, 'turnover': 105202134415, 'homeNotional': 29325.939882318224, 'foreignNotional': 12431809.265458988}, {'timestamp': datetime.datetime(2020, 8, 16, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 420.1, 'high': 423.6, 'low': 418.7, 'close': 423.1, 'trades': 4751, 'volume': 2444446, 'vwap': 421.72, 'lastSize': 10, 'turnover': 103087007570, 'homeNotional': 28828.940702973898, 'foreignNotional': 12157754.136901237}, {'timestamp': datetime.datetime(2020, 8, 16, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 418.6, 'high': 420.7, 'low': 413.15, 'close': 420.1, 'trades': 13497, 'volume': 7732718, 'vwap': 416.53, 'lastSize': 4914, 'turnover': 322088719865, 'homeNotional': 90783.19502423707, 'foreignNotional': 37813985.342689805}] 2020-08-16 18:00:20 INFO: prepare candles [CandleItem(low=422.7, high=425.2, open=423.1, close=424.2, color='GREEN'), CandleItem(low=418.7, high=423.6, open=420.1, close=423.1, color='GREEN'), CandleItem(low=413.15, high=420.7, open=418.6, close=420.1, color='GREEN')] 2020-08-16 18:00:20 INFO: skip by colors first_candle=CandleItem(low=413.15, high=420.7, open=418.6, close=420.1, color='GREEN') second_candle=CandleItem(low=418.7, high=423.6, open=420.1, close=423.1, color='GREEN') last_candle=CandleItem(low=422.7, high=425.2, open=423.1, close=424.2, color='GREEN') 2020-08-16 18:00:20 INFO: check need new order None 2020-08-16 18:00:20 INFO: init new order end 2020-08-16 18:00:20 INFO: 2020-08-16 18:00:20 INFO: 2020-08-16 18:00:20 INFO: 2020-08-16 18:00:20 INFO: 2020-08-16 18:02:00 INFO: 2020-08-16 18:02:00 INFO: 2020-08-16 18:02:00 INFO: 2020-08-16 18:02:00 INFO: 2020-08-16 18:02:00 INFO: clearing start 2020-08-16 18:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-16 18:02:00 INFO: skip by not found init order into storage 2020-08-16 18:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-16 18:02:00 INFO: skip by not found init order into storage 2020-08-16 18:02:00 INFO: clearing end 2020-08-16 18:02:00 INFO: 2020-08-16 18:02:00 INFO: 2020-08-16 18:02:00 INFO: 2020-08-16 18:02:00 INFO: 2020-08-16 19:00:20 INFO: 2020-08-16 19:00:20 INFO: 2020-08-16 19:00:20 INFO: 2020-08-16 19:00:20 INFO: 2020-08-16 19:00:20 INFO: init new order start 2020-08-16 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 16, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 424.2, 'high': 432.4, 'low': 422.95, 'close': 431.1, 'trades': 6823, 'volume': 3694941, 'vwap': 428.58, 'lastSize': 10, 'turnover': 158354221110, 'homeNotional': 43772.27690324383, 'foreignNotional': 18759660.294212796}, {'timestamp': datetime.datetime(2020, 8, 16, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 423.1, 'high': 425.2, 'low': 422.7, 'close': 424.2, 'trades': 4051, 'volume': 2481662, 'vwap': 423.92, 'lastSize': 23, 'turnover': 105202134415, 'homeNotional': 29325.939882318224, 'foreignNotional': 12431809.265458988}, {'timestamp': datetime.datetime(2020, 8, 16, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 420.1, 'high': 423.6, 'low': 418.7, 'close': 423.1, 'trades': 4751, 'volume': 2444446, 'vwap': 421.72, 'lastSize': 10, 'turnover': 103087007570, 'homeNotional': 28828.940702973898, 'foreignNotional': 12157754.136901237}] 2020-08-16 19:00:20 INFO: prepare candles [CandleItem(low=422.95, high=432.4, open=424.2, close=431.1, color='GREEN'), CandleItem(low=422.7, high=425.2, open=423.1, close=424.2, color='GREEN'), CandleItem(low=418.7, high=423.6, open=420.1, close=423.1, color='GREEN')] 2020-08-16 19:00:20 INFO: skip by colors first_candle=CandleItem(low=418.7, high=423.6, open=420.1, close=423.1, color='GREEN') second_candle=CandleItem(low=422.7, high=425.2, open=423.1, close=424.2, color='GREEN') last_candle=CandleItem(low=422.95, high=432.4, open=424.2, close=431.1, color='GREEN') 2020-08-16 19:00:20 INFO: check need new order None 2020-08-16 19:00:20 INFO: init new order end 2020-08-16 19:00:20 INFO: 2020-08-16 19:00:20 INFO: 2020-08-16 19:00:20 INFO: 2020-08-16 19:00:20 INFO: 2020-08-16 19:02:00 INFO: 2020-08-16 19:02:00 INFO: 2020-08-16 19:02:00 INFO: 2020-08-16 19:02:00 INFO: 2020-08-16 19:02:00 INFO: clearing start 2020-08-16 19:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-16 19:02:00 INFO: skip by not found init order into storage 2020-08-16 19:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-16 19:02:00 INFO: skip by not found init order into storage 2020-08-16 19:02:00 INFO: clearing end 2020-08-16 19:02:00 INFO: 2020-08-16 19:02:00 INFO: 2020-08-16 19:02:00 INFO: 2020-08-16 19:02:00 INFO: 2020-08-16 20:00:20 INFO: 2020-08-16 20:00:20 INFO: 2020-08-16 20:00:20 INFO: 2020-08-16 20:00:20 INFO: 2020-08-16 20:00:20 INFO: init new order start 2020-08-16 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 16, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 431.1, 'high': 438.0, 'low': 430.75, 'close': 434.85, 'trades': 10727, 'volume': 8307463, 'vwap': 434.9, 'lastSize': 11, 'turnover': 361286889990, 'homeNotional': 98704.43128389807, 'foreignNotional': 42926028.98680766}, {'timestamp': datetime.datetime(2020, 8, 16, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 424.2, 'high': 432.4, 'low': 422.95, 'close': 431.1, 'trades': 6823, 'volume': 3694941, 'vwap': 428.58, 'lastSize': 10, 'turnover': 158354221110, 'homeNotional': 43772.27690324383, 'foreignNotional': 18759660.294212796}, {'timestamp': datetime.datetime(2020, 8, 16, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 423.1, 'high': 425.2, 'low': 422.7, 'close': 424.2, 'trades': 4051, 'volume': 2481662, 'vwap': 423.92, 'lastSize': 23, 'turnover': 105202134415, 'homeNotional': 29325.939882318224, 'foreignNotional': 12431809.265458988}] 2020-08-16 20:00:20 INFO: prepare candles [CandleItem(low=430.75, high=438.0, open=431.1, close=434.85, color='GREEN'), CandleItem(low=422.95, high=432.4, open=424.2, close=431.1, color='GREEN'), CandleItem(low=422.7, high=425.2, open=423.1, close=424.2, color='GREEN')] 2020-08-16 20:00:20 INFO: skip by colors first_candle=CandleItem(low=422.7, high=425.2, open=423.1, close=424.2, color='GREEN') second_candle=CandleItem(low=422.95, high=432.4, open=424.2, close=431.1, color='GREEN') last_candle=CandleItem(low=430.75, high=438.0, open=431.1, close=434.85, color='GREEN') 2020-08-16 20:00:20 INFO: check need new order None 2020-08-16 20:00:20 INFO: init new order end 2020-08-16 20:00:20 INFO: 2020-08-16 20:00:20 INFO: 2020-08-16 20:00:20 INFO: 2020-08-16 20:00:20 INFO: 2020-08-16 20:02:00 INFO: 2020-08-16 20:02:00 INFO: 2020-08-16 20:02:00 INFO: 2020-08-16 20:02:00 INFO: 2020-08-16 20:02:00 INFO: clearing start 2020-08-16 20:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-16 20:02:00 INFO: skip by not found init order into storage 2020-08-16 20:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-16 20:02:00 INFO: skip by not found init order into storage 2020-08-16 20:02:00 INFO: clearing end 2020-08-16 20:02:00 INFO: 2020-08-16 20:02:00 INFO: 2020-08-16 20:02:00 INFO: 2020-08-16 20:02:00 INFO: 2020-08-16 21:00:20 INFO: 2020-08-16 21:00:20 INFO: 2020-08-16 21:00:20 INFO: 2020-08-16 21:00:20 INFO: 2020-08-16 21:00:20 INFO: init new order start 2020-08-16 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 16, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 434.85, 'high': 436.3, 'low': 429.65, 'close': 430.9, 'trades': 6681, 'volume': 3640817, 'vwap': 432.19, 'lastSize': 6, 'turnover': 157350702045, 'homeNotional': 43128.70363114765, 'foreignNotional': 18639624.874210164}, {'timestamp': datetime.datetime(2020, 8, 16, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 431.1, 'high': 438.0, 'low': 430.75, 'close': 434.85, 'trades': 10727, 'volume': 8307463, 'vwap': 434.9, 'lastSize': 11, 'turnover': 361286889990, 'homeNotional': 98704.43128389807, 'foreignNotional': 42926028.98680766}, {'timestamp': datetime.datetime(2020, 8, 16, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 424.2, 'high': 432.4, 'low': 422.95, 'close': 431.1, 'trades': 6823, 'volume': 3694941, 'vwap': 428.58, 'lastSize': 10, 'turnover': 158354221110, 'homeNotional': 43772.27690324383, 'foreignNotional': 18759660.294212796}] 2020-08-16 21:00:20 INFO: prepare candles [CandleItem(low=429.65, high=436.3, open=434.85, close=430.9, color='RED'), CandleItem(low=430.75, high=438.0, open=431.1, close=434.85, color='GREEN'), CandleItem(low=422.95, high=432.4, open=424.2, close=431.1, color='GREEN')] 2020-08-16 21:00:20 INFO: last_candle=CandleItem(low=429.65, high=436.3, open=434.85, close=430.9, color='RED') 2020-08-16 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-16 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=429.65, high=436.3, open=434.85, close=430.9, color='RED') 2020-08-16 21:00:20 INFO: skip by CandleItem(low=429.65, high=436.3, open=434.85, close=430.9, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-16 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-16 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=429.65, high=436.3, open=434.85, close=430.9, color='RED') 2020-08-16 21:00:20 INFO: skip by CandleItem(low=429.65, high=436.3, open=434.85, close=430.9, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-16 21:00:20 INFO: not found applicable config for candle 2020-08-16 21:00:20 INFO: check need new order None 2020-08-16 21:00:20 INFO: init new order end 2020-08-16 21:00:20 INFO: 2020-08-16 21:00:20 INFO: 2020-08-16 21:00:20 INFO: 2020-08-16 21:00:20 INFO: 2020-08-16 21:02:00 INFO: 2020-08-16 21:02:00 INFO: 2020-08-16 21:02:00 INFO: 2020-08-16 21:02:00 INFO: 2020-08-16 21:02:00 INFO: clearing start 2020-08-16 21:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-16 21:02:01 INFO: skip by not found init order into storage 2020-08-16 21:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-16 21:02:01 INFO: skip by not found init order into storage 2020-08-16 21:02:01 INFO: clearing end 2020-08-16 21:02:01 INFO: 2020-08-16 21:02:01 INFO: 2020-08-16 21:02:01 INFO: 2020-08-16 21:02:01 INFO: 2020-08-16 22:00:20 INFO: 2020-08-16 22:00:20 INFO: 2020-08-16 22:00:20 INFO: 2020-08-16 22:00:20 INFO: 2020-08-16 22:00:20 INFO: init new order start 2020-08-16 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 16, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 430.9, 'high': 432.45, 'low': 429.7, 'close': 431.1, 'trades': 2772, 'volume': 1993963, 'vwap': 431.13, 'lastSize': 500, 'turnover': 85965302555, 'homeNotional': 23586.27302240621, 'foreignNotional': 10168705.964809867}, {'timestamp': datetime.datetime(2020, 8, 16, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 434.85, 'high': 436.3, 'low': 429.65, 'close': 430.9, 'trades': 6681, 'volume': 3640817, 'vwap': 432.19, 'lastSize': 6, 'turnover': 157350702045, 'homeNotional': 43128.70363114765, 'foreignNotional': 18639624.874210164}, {'timestamp': datetime.datetime(2020, 8, 16, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 431.1, 'high': 438.0, 'low': 430.75, 'close': 434.85, 'trades': 10727, 'volume': 8307463, 'vwap': 434.9, 'lastSize': 11, 'turnover': 361286889990, 'homeNotional': 98704.43128389807, 'foreignNotional': 42926028.98680766}] 2020-08-16 22:00:20 INFO: prepare candles [CandleItem(low=429.7, high=432.45, open=430.9, close=431.1, color='GREEN'), CandleItem(low=429.65, high=436.3, open=434.85, close=430.9, color='RED'), CandleItem(low=430.75, high=438.0, open=431.1, close=434.85, color='GREEN')] 2020-08-16 22:00:20 INFO: skip by colors first_candle=CandleItem(low=430.75, high=438.0, open=431.1, close=434.85, color='GREEN') second_candle=CandleItem(low=429.65, high=436.3, open=434.85, close=430.9, color='RED') last_candle=CandleItem(low=429.7, high=432.45, open=430.9, close=431.1, color='GREEN') 2020-08-16 22:00:20 INFO: check need new order None 2020-08-16 22:00:20 INFO: init new order end 2020-08-16 22:00:20 INFO: 2020-08-16 22:00:20 INFO: 2020-08-16 22:00:20 INFO: 2020-08-16 22:00:20 INFO: 2020-08-16 22:02:00 INFO: 2020-08-16 22:02:00 INFO: 2020-08-16 22:02:00 INFO: 2020-08-16 22:02:00 INFO: 2020-08-16 22:02:00 INFO: clearing start 2020-08-16 22:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-16 22:02:00 INFO: skip by not found init order into storage 2020-08-16 22:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-16 22:02:00 INFO: skip by not found init order into storage 2020-08-16 22:02:00 INFO: clearing end 2020-08-16 22:02:00 INFO: 2020-08-16 22:02:00 INFO: 2020-08-16 22:02:00 INFO: 2020-08-16 22:02:00 INFO: 2020-08-16 23:00:20 INFO: 2020-08-16 23:00:20 INFO: 2020-08-16 23:00:20 INFO: 2020-08-16 23:00:20 INFO: 2020-08-16 23:00:20 INFO: init new order start 2020-08-16 23:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 16, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 431.1, 'high': 431.9, 'low': 429.1, 'close': 429.75, 'trades': 3527, 'volume': 1362479, 'vwap': 430.31, 'lastSize': 12, 'turnover': 58627882350, 'homeNotional': 16135.16113187172, 'foreignNotional': 6943017.136937756}, {'timestamp': datetime.datetime(2020, 8, 16, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 430.9, 'high': 432.45, 'low': 429.7, 'close': 431.1, 'trades': 2772, 'volume': 1993963, 'vwap': 431.13, 'lastSize': 500, 'turnover': 85965302555, 'homeNotional': 23586.27302240621, 'foreignNotional': 10168705.964809867}, {'timestamp': datetime.datetime(2020, 8, 16, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 434.85, 'high': 436.3, 'low': 429.65, 'close': 430.9, 'trades': 6681, 'volume': 3640817, 'vwap': 432.19, 'lastSize': 6, 'turnover': 157350702045, 'homeNotional': 43128.70363114765, 'foreignNotional': 18639624.874210164}] 2020-08-16 23:00:20 INFO: prepare candles [CandleItem(low=429.1, high=431.9, open=431.1, close=429.75, color='RED'), CandleItem(low=429.7, high=432.45, open=430.9, close=431.1, color='GREEN'), CandleItem(low=429.65, high=436.3, open=434.85, close=430.9, color='RED')] 2020-08-16 23:00:20 INFO: skip by colors first_candle=CandleItem(low=429.65, high=436.3, open=434.85, close=430.9, color='RED') second_candle=CandleItem(low=429.7, high=432.45, open=430.9, close=431.1, color='GREEN') last_candle=CandleItem(low=429.1, high=431.9, open=431.1, close=429.75, color='RED') 2020-08-16 23:00:20 INFO: check need new order None 2020-08-16 23:00:20 INFO: init new order end 2020-08-16 23:00:20 INFO: 2020-08-16 23:00:20 INFO: 2020-08-16 23:00:20 INFO: 2020-08-16 23:00:20 INFO: 2020-08-16 23:02:00 INFO: 2020-08-16 23:02:00 INFO: 2020-08-16 23:02:00 INFO: 2020-08-16 23:02:00 INFO: 2020-08-16 23:02:00 INFO: clearing start 2020-08-16 23:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-16 23:02:00 INFO: skip by not found init order into storage 2020-08-16 23:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-16 23:02:00 INFO: skip by not found init order into storage 2020-08-16 23:02:00 INFO: clearing end 2020-08-16 23:02:00 INFO: 2020-08-16 23:02:00 INFO: 2020-08-16 23:02:00 INFO: 2020-08-16 23:02:00 INFO: 2020-08-17 00:00:20 INFO: 2020-08-17 00:00:20 INFO: 2020-08-17 00:00:20 INFO: 2020-08-17 00:00:20 INFO: 2020-08-17 00:00:20 INFO: init new order start 2020-08-17 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 16, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 429.75, 'high': 431.75, 'low': 427.55, 'close': 430.9, 'trades': 3477, 'volume': 2700873, 'vwap': 429.67, 'lastSize': 500, 'turnover': 116046692305, 'homeNotional': 31939.74810279128, 'foreignNotional': 13723375.1570933}, {'timestamp': datetime.datetime(2020, 8, 16, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 431.1, 'high': 431.9, 'low': 429.1, 'close': 429.75, 'trades': 3527, 'volume': 1362479, 'vwap': 430.31, 'lastSize': 12, 'turnover': 58627882350, 'homeNotional': 16135.16113187172, 'foreignNotional': 6943017.136937756}, {'timestamp': datetime.datetime(2020, 8, 16, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 430.9, 'high': 432.45, 'low': 429.7, 'close': 431.1, 'trades': 2772, 'volume': 1993963, 'vwap': 431.13, 'lastSize': 500, 'turnover': 85965302555, 'homeNotional': 23586.27302240621, 'foreignNotional': 10168705.964809867}] 2020-08-17 00:00:20 INFO: prepare candles [CandleItem(low=427.55, high=431.75, open=429.75, close=430.9, color='GREEN'), CandleItem(low=429.1, high=431.9, open=431.1, close=429.75, color='RED'), CandleItem(low=429.7, high=432.45, open=430.9, close=431.1, color='GREEN')] 2020-08-17 00:00:20 INFO: skip by colors first_candle=CandleItem(low=429.7, high=432.45, open=430.9, close=431.1, color='GREEN') second_candle=CandleItem(low=429.1, high=431.9, open=431.1, close=429.75, color='RED') last_candle=CandleItem(low=427.55, high=431.75, open=429.75, close=430.9, color='GREEN') 2020-08-17 00:00:20 INFO: check need new order None 2020-08-17 00:00:20 INFO: init new order end 2020-08-17 00:00:20 INFO: 2020-08-17 00:00:20 INFO: 2020-08-17 00:00:20 INFO: 2020-08-17 00:00:20 INFO: 2020-08-17 00:02:00 INFO: 2020-08-17 00:02:00 INFO: 2020-08-17 00:02:00 INFO: 2020-08-17 00:02:00 INFO: 2020-08-17 00:02:00 INFO: clearing start 2020-08-17 00:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-17 00:02:00 INFO: skip by not found init order into storage 2020-08-17 00:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-17 00:02:00 INFO: skip by not found init order into storage 2020-08-17 00:02:00 INFO: clearing end 2020-08-17 00:02:00 INFO: 2020-08-17 00:02:00 INFO: 2020-08-17 00:02:00 INFO: 2020-08-17 00:02:00 INFO: 2020-08-17 01:00:20 INFO: 2020-08-17 01:00:20 INFO: 2020-08-17 01:00:20 INFO: 2020-08-17 01:00:20 INFO: 2020-08-17 01:00:20 INFO: init new order start 2020-08-17 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 16, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 430.9, 'high': 434.2, 'low': 430.15, 'close': 431.9, 'trades': 6157, 'volume': 4885359, 'vwap': 432.45, 'lastSize': 796, 'turnover': 211265491120, 'homeNotional': 57985.615690161554, 'foreignNotional': 25075694.003085084}, {'timestamp': datetime.datetime(2020, 8, 16, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 429.75, 'high': 431.75, 'low': 427.55, 'close': 430.9, 'trades': 3477, 'volume': 2700873, 'vwap': 429.67, 'lastSize': 500, 'turnover': 116046692305, 'homeNotional': 31939.74810279128, 'foreignNotional': 13723375.1570933}, {'timestamp': datetime.datetime(2020, 8, 16, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 431.1, 'high': 431.9, 'low': 429.1, 'close': 429.75, 'trades': 3527, 'volume': 1362479, 'vwap': 430.31, 'lastSize': 12, 'turnover': 58627882350, 'homeNotional': 16135.16113187172, 'foreignNotional': 6943017.136937756}] 2020-08-17 01:00:20 INFO: prepare candles [CandleItem(low=430.15, high=434.2, open=430.9, close=431.9, color='GREEN'), CandleItem(low=427.55, high=431.75, open=429.75, close=430.9, color='GREEN'), CandleItem(low=429.1, high=431.9, open=431.1, close=429.75, color='RED')] 2020-08-17 01:00:20 INFO: skip by colors first_candle=CandleItem(low=429.1, high=431.9, open=431.1, close=429.75, color='RED') second_candle=CandleItem(low=427.55, high=431.75, open=429.75, close=430.9, color='GREEN') last_candle=CandleItem(low=430.15, high=434.2, open=430.9, close=431.9, color='GREEN') 2020-08-17 01:00:20 INFO: check need new order None 2020-08-17 01:00:20 INFO: init new order end 2020-08-17 01:00:20 INFO: 2020-08-17 01:00:20 INFO: 2020-08-17 01:00:20 INFO: 2020-08-17 01:00:20 INFO: 2020-08-17 01:02:00 INFO: 2020-08-17 01:02:00 INFO: 2020-08-17 01:02:00 INFO: 2020-08-17 01:02:00 INFO: 2020-08-17 01:02:00 INFO: clearing start 2020-08-17 01:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-17 01:02:00 INFO: skip by not found init order into storage 2020-08-17 01:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-17 01:02:00 INFO: skip by not found init order into storage 2020-08-17 01:02:00 INFO: clearing end 2020-08-17 01:02:00 INFO: 2020-08-17 01:02:00 INFO: 2020-08-17 01:02:00 INFO: 2020-08-17 01:02:00 INFO: 2020-08-17 02:00:20 INFO: 2020-08-17 02:00:20 INFO: 2020-08-17 02:00:20 INFO: 2020-08-17 02:00:20 INFO: 2020-08-17 02:00:20 INFO: init new order start 2020-08-17 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 16, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 431.9, 'high': 434.95, 'low': 430.9, 'close': 434.2, 'trades': 3944, 'volume': 2664020, 'vwap': 433.16, 'lastSize': 1000, 'turnover': 115394219560, 'homeNotional': 31664.044348969514, 'foreignNotional': 13715589.265219823}, {'timestamp': datetime.datetime(2020, 8, 16, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 430.9, 'high': 434.2, 'low': 430.15, 'close': 431.9, 'trades': 6157, 'volume': 4885359, 'vwap': 432.45, 'lastSize': 796, 'turnover': 211265491120, 'homeNotional': 57985.615690161554, 'foreignNotional': 25075694.003085084}, {'timestamp': datetime.datetime(2020, 8, 16, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 429.75, 'high': 431.75, 'low': 427.55, 'close': 430.9, 'trades': 3477, 'volume': 2700873, 'vwap': 429.67, 'lastSize': 500, 'turnover': 116046692305, 'homeNotional': 31939.74810279128, 'foreignNotional': 13723375.1570933}] 2020-08-17 02:00:20 INFO: prepare candles [CandleItem(low=430.9, high=434.95, open=431.9, close=434.2, color='GREEN'), CandleItem(low=430.15, high=434.2, open=430.9, close=431.9, color='GREEN'), CandleItem(low=427.55, high=431.75, open=429.75, close=430.9, color='GREEN')] 2020-08-17 02:00:20 INFO: skip by colors first_candle=CandleItem(low=427.55, high=431.75, open=429.75, close=430.9, color='GREEN') second_candle=CandleItem(low=430.15, high=434.2, open=430.9, close=431.9, color='GREEN') last_candle=CandleItem(low=430.9, high=434.95, open=431.9, close=434.2, color='GREEN') 2020-08-17 02:00:20 INFO: check need new order None 2020-08-17 02:00:20 INFO: init new order end 2020-08-17 02:00:20 INFO: 2020-08-17 02:00:20 INFO: 2020-08-17 02:00:20 INFO: 2020-08-17 02:00:20 INFO: 2020-08-17 02:02:00 INFO: 2020-08-17 02:02:00 INFO: 2020-08-17 02:02:00 INFO: 2020-08-17 02:02:00 INFO: 2020-08-17 02:02:00 INFO: clearing start 2020-08-17 02:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-17 02:02:00 INFO: skip by not found init order into storage 2020-08-17 02:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-17 02:02:00 INFO: skip by not found init order into storage 2020-08-17 02:02:00 INFO: clearing end 2020-08-17 02:02:00 INFO: 2020-08-17 02:02:00 INFO: 2020-08-17 02:02:00 INFO: 2020-08-17 02:02:00 INFO: 2020-08-17 03:00:20 INFO: 2020-08-17 03:00:20 INFO: 2020-08-17 03:00:20 INFO: 2020-08-17 03:00:20 INFO: 2020-08-17 03:00:20 INFO: init new order start 2020-08-17 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 17, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 434.2, 'high': 435.7, 'low': 431.5, 'close': 434.8, 'trades': 4312, 'volume': 3542996, 'vwap': 434.14, 'lastSize': 13, 'turnover': 153814983075, 'homeNotional': 42168.20410109234, 'foreignNotional': 18306853.072003365}, {'timestamp': datetime.datetime(2020, 8, 16, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 431.9, 'high': 434.95, 'low': 430.9, 'close': 434.2, 'trades': 3944, 'volume': 2664020, 'vwap': 433.16, 'lastSize': 1000, 'turnover': 115394219560, 'homeNotional': 31664.044348969514, 'foreignNotional': 13715589.265219823}, {'timestamp': datetime.datetime(2020, 8, 16, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 430.9, 'high': 434.2, 'low': 430.15, 'close': 431.9, 'trades': 6157, 'volume': 4885359, 'vwap': 432.45, 'lastSize': 796, 'turnover': 211265491120, 'homeNotional': 57985.615690161554, 'foreignNotional': 25075694.003085084}] 2020-08-17 03:00:20 INFO: prepare candles [CandleItem(low=431.5, high=435.7, open=434.2, close=434.8, color='GREEN'), CandleItem(low=430.9, high=434.95, open=431.9, close=434.2, color='GREEN'), CandleItem(low=430.15, high=434.2, open=430.9, close=431.9, color='GREEN')] 2020-08-17 03:00:20 INFO: skip by colors first_candle=CandleItem(low=430.15, high=434.2, open=430.9, close=431.9, color='GREEN') second_candle=CandleItem(low=430.9, high=434.95, open=431.9, close=434.2, color='GREEN') last_candle=CandleItem(low=431.5, high=435.7, open=434.2, close=434.8, color='GREEN') 2020-08-17 03:00:20 INFO: check need new order None 2020-08-17 03:00:20 INFO: init new order end 2020-08-17 03:00:20 INFO: 2020-08-17 03:00:20 INFO: 2020-08-17 03:00:20 INFO: 2020-08-17 03:00:20 INFO: 2020-08-17 03:02:00 INFO: 2020-08-17 03:02:00 INFO: 2020-08-17 03:02:00 INFO: 2020-08-17 03:02:00 INFO: 2020-08-17 03:02:00 INFO: clearing start 2020-08-17 03:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-17 03:02:00 INFO: skip by not found init order into storage 2020-08-17 03:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-17 03:02:00 INFO: skip by not found init order into storage 2020-08-17 03:02:00 INFO: clearing end 2020-08-17 03:02:00 INFO: 2020-08-17 03:02:00 INFO: 2020-08-17 03:02:00 INFO: 2020-08-17 03:02:00 INFO: 2020-08-17 04:00:20 INFO: 2020-08-17 04:00:20 INFO: 2020-08-17 04:00:20 INFO: 2020-08-17 04:00:20 INFO: 2020-08-17 04:00:20 INFO: init new order start 2020-08-17 04:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 17, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 434.8, 'high': 436.15, 'low': 430.1, 'close': 431.45, 'trades': 5301, 'volume': 5027130, 'vwap': 432.93, 'lastSize': 205, 'turnover': 217637738845, 'homeNotional': 59694.31737519669, 'foreignNotional': 25843505.40690002}, {'timestamp': datetime.datetime(2020, 8, 17, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 434.2, 'high': 435.7, 'low': 431.5, 'close': 434.8, 'trades': 4312, 'volume': 3542996, 'vwap': 434.14, 'lastSize': 13, 'turnover': 153814983075, 'homeNotional': 42168.20410109234, 'foreignNotional': 18306853.072003365}, {'timestamp': datetime.datetime(2020, 8, 16, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 431.9, 'high': 434.95, 'low': 430.9, 'close': 434.2, 'trades': 3944, 'volume': 2664020, 'vwap': 433.16, 'lastSize': 1000, 'turnover': 115394219560, 'homeNotional': 31664.044348969514, 'foreignNotional': 13715589.265219823}] 2020-08-17 04:00:20 INFO: prepare candles [CandleItem(low=430.1, high=436.15, open=434.8, close=431.45, color='RED'), CandleItem(low=431.5, high=435.7, open=434.2, close=434.8, color='GREEN'), CandleItem(low=430.9, high=434.95, open=431.9, close=434.2, color='GREEN')] 2020-08-17 04:00:20 INFO: last_candle=CandleItem(low=430.1, high=436.15, open=434.8, close=431.45, color='RED') 2020-08-17 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-17 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=430.1, high=436.15, open=434.8, close=431.45, color='RED') 2020-08-17 04:00:20 INFO: skip by CandleItem(low=430.1, high=436.15, open=434.8, close=431.45, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-17 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-17 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=430.1, high=436.15, open=434.8, close=431.45, color='RED') 2020-08-17 04:00:20 INFO: skip by CandleItem(low=430.1, high=436.15, open=434.8, close=431.45, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-17 04:00:20 INFO: not found applicable config for candle 2020-08-17 04:00:20 INFO: check need new order None 2020-08-17 04:00:20 INFO: init new order end 2020-08-17 04:00:20 INFO: 2020-08-17 04:00:20 INFO: 2020-08-17 04:00:20 INFO: 2020-08-17 04:00:20 INFO: 2020-08-17 04:02:00 INFO: 2020-08-17 04:02:00 INFO: 2020-08-17 04:02:00 INFO: 2020-08-17 04:02:00 INFO: 2020-08-17 04:02:00 INFO: clearing start 2020-08-17 04:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-17 04:02:00 INFO: skip by not found init order into storage 2020-08-17 04:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-17 04:02:00 INFO: skip by not found init order into storage 2020-08-17 04:02:00 INFO: clearing end 2020-08-17 04:02:00 INFO: 2020-08-17 04:02:00 INFO: 2020-08-17 04:02:00 INFO: 2020-08-17 04:02:00 INFO: 2020-08-17 05:00:20 INFO: 2020-08-17 05:00:20 INFO: 2020-08-17 05:00:20 INFO: 2020-08-17 05:00:20 INFO: 2020-08-17 05:00:20 INFO: init new order start 2020-08-17 05:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 17, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 431.45, 'high': 431.4, 'low': 426.1, 'close': 428.4, 'trades': 5670, 'volume': 3862843, 'vwap': 428.42, 'lastSize': 11, 'turnover': 165488411430, 'homeNotional': 45673.25636468725, 'foreignNotional': 19566966.374687433}, {'timestamp': datetime.datetime(2020, 8, 17, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 434.8, 'high': 436.15, 'low': 430.1, 'close': 431.45, 'trades': 5301, 'volume': 5027130, 'vwap': 432.93, 'lastSize': 205, 'turnover': 217637738845, 'homeNotional': 59694.31737519669, 'foreignNotional': 25843505.40690002}, {'timestamp': datetime.datetime(2020, 8, 17, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 434.2, 'high': 435.7, 'low': 431.5, 'close': 434.8, 'trades': 4312, 'volume': 3542996, 'vwap': 434.14, 'lastSize': 13, 'turnover': 153814983075, 'homeNotional': 42168.20410109234, 'foreignNotional': 18306853.072003365}] 2020-08-17 05:00:20 INFO: prepare candles [CandleItem(low=426.1, high=431.4, open=431.45, close=428.4, color='RED'), CandleItem(low=430.1, high=436.15, open=434.8, close=431.45, color='RED'), CandleItem(low=431.5, high=435.7, open=434.2, close=434.8, color='GREEN')] 2020-08-17 05:00:20 INFO: skip by colors first_candle=CandleItem(low=431.5, high=435.7, open=434.2, close=434.8, color='GREEN') second_candle=CandleItem(low=430.1, high=436.15, open=434.8, close=431.45, color='RED') last_candle=CandleItem(low=426.1, high=431.4, open=431.45, close=428.4, color='RED') 2020-08-17 05:00:20 INFO: check need new order None 2020-08-17 05:00:20 INFO: init new order end 2020-08-17 05:00:20 INFO: 2020-08-17 05:00:20 INFO: 2020-08-17 05:00:20 INFO: 2020-08-17 05:00:20 INFO: 2020-08-17 05:02:00 INFO: 2020-08-17 05:02:00 INFO: 2020-08-17 05:02:00 INFO: 2020-08-17 05:02:00 INFO: 2020-08-17 05:02:00 INFO: clearing start 2020-08-17 05:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-17 05:02:00 INFO: skip by not found init order into storage 2020-08-17 05:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-17 05:02:00 INFO: skip by not found init order into storage 2020-08-17 05:02:00 INFO: clearing end 2020-08-17 05:02:00 INFO: 2020-08-17 05:02:00 INFO: 2020-08-17 05:02:00 INFO: 2020-08-17 05:02:00 INFO: 2020-08-17 06:00:20 INFO: 2020-08-17 06:00:20 INFO: 2020-08-17 06:00:20 INFO: 2020-08-17 06:00:20 INFO: 2020-08-17 06:00:20 INFO: init new order start 2020-08-17 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 17, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 428.4, 'high': 429.15, 'low': 421.85, 'close': 426.35, 'trades': 6860, 'volume': 7958656, 'vwap': 424.57, 'lastSize': 1, 'turnover': 337895708175, 'homeNotional': 94063.40704573214, 'foreignNotional': 39936159.59705758}, {'timestamp': datetime.datetime(2020, 8, 17, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 431.45, 'high': 431.4, 'low': 426.1, 'close': 428.4, 'trades': 5670, 'volume': 3862843, 'vwap': 428.42, 'lastSize': 11, 'turnover': 165488411430, 'homeNotional': 45673.25636468725, 'foreignNotional': 19566966.374687433}, {'timestamp': datetime.datetime(2020, 8, 17, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 434.8, 'high': 436.15, 'low': 430.1, 'close': 431.45, 'trades': 5301, 'volume': 5027130, 'vwap': 432.93, 'lastSize': 205, 'turnover': 217637738845, 'homeNotional': 59694.31737519669, 'foreignNotional': 25843505.40690002}] 2020-08-17 06:00:20 INFO: prepare candles [CandleItem(low=421.85, high=429.15, open=428.4, close=426.35, color='RED'), CandleItem(low=426.1, high=431.4, open=431.45, close=428.4, color='RED'), CandleItem(low=430.1, high=436.15, open=434.8, close=431.45, color='RED')] 2020-08-17 06:00:20 INFO: skip by colors first_candle=CandleItem(low=430.1, high=436.15, open=434.8, close=431.45, color='RED') second_candle=CandleItem(low=426.1, high=431.4, open=431.45, close=428.4, color='RED') last_candle=CandleItem(low=421.85, high=429.15, open=428.4, close=426.35, color='RED') 2020-08-17 06:00:20 INFO: check need new order None 2020-08-17 06:00:20 INFO: init new order end 2020-08-17 06:00:20 INFO: 2020-08-17 06:00:20 INFO: 2020-08-17 06:00:20 INFO: 2020-08-17 06:00:20 INFO: 2020-08-17 06:02:00 INFO: 2020-08-17 06:02:00 INFO: 2020-08-17 06:02:00 INFO: 2020-08-17 06:02:00 INFO: 2020-08-17 06:02:00 INFO: clearing start 2020-08-17 06:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-17 06:02:00 INFO: skip by not found init order into storage 2020-08-17 06:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-17 06:02:00 INFO: skip by not found init order into storage 2020-08-17 06:02:00 INFO: clearing end 2020-08-17 06:02:00 INFO: 2020-08-17 06:02:00 INFO: 2020-08-17 06:02:00 INFO: 2020-08-17 06:02:00 INFO: 2020-08-17 07:00:20 INFO: 2020-08-17 07:00:20 INFO: 2020-08-17 07:00:20 INFO: 2020-08-17 07:00:20 INFO: 2020-08-17 07:00:20 INFO: init new order start 2020-08-17 07:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 17, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 426.35, 'high': 427.85, 'low': 423.45, 'close': 425.95, 'trades': 3370, 'volume': 2174886, 'vwap': 425.67, 'lastSize': 546, 'turnover': 92577812650, 'homeNotional': 25790.05848320834, 'foreignNotional': 10978003.069037052}, {'timestamp': datetime.datetime(2020, 8, 17, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 428.4, 'high': 429.15, 'low': 421.85, 'close': 426.35, 'trades': 6860, 'volume': 7958656, 'vwap': 424.57, 'lastSize': 1, 'turnover': 337895708175, 'homeNotional': 94063.40704573214, 'foreignNotional': 39936159.59705758}, {'timestamp': datetime.datetime(2020, 8, 17, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 431.45, 'high': 431.4, 'low': 426.1, 'close': 428.4, 'trades': 5670, 'volume': 3862843, 'vwap': 428.42, 'lastSize': 11, 'turnover': 165488411430, 'homeNotional': 45673.25636468725, 'foreignNotional': 19566966.374687433}] 2020-08-17 07:00:20 INFO: prepare candles [CandleItem(low=423.45, high=427.85, open=426.35, close=425.95, color='RED'), CandleItem(low=421.85, high=429.15, open=428.4, close=426.35, color='RED'), CandleItem(low=426.1, high=431.4, open=431.45, close=428.4, color='RED')] 2020-08-17 07:00:20 INFO: skip by colors first_candle=CandleItem(low=426.1, high=431.4, open=431.45, close=428.4, color='RED') second_candle=CandleItem(low=421.85, high=429.15, open=428.4, close=426.35, color='RED') last_candle=CandleItem(low=423.45, high=427.85, open=426.35, close=425.95, color='RED') 2020-08-17 07:00:20 INFO: check need new order None 2020-08-17 07:00:20 INFO: init new order end 2020-08-17 07:00:20 INFO: 2020-08-17 07:00:20 INFO: 2020-08-17 07:00:20 INFO: 2020-08-17 07:00:20 INFO: 2020-08-17 07:02:00 INFO: 2020-08-17 07:02:00 INFO: 2020-08-17 07:02:00 INFO: 2020-08-17 07:02:00 INFO: 2020-08-17 07:02:00 INFO: clearing start 2020-08-17 07:02:01 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-17 07:02:01 INFO: skip by not found init order into storage 2020-08-17 07:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-17 07:02:01 INFO: skip by not found init order into storage 2020-08-17 07:02:01 INFO: clearing end 2020-08-17 07:02:01 INFO: 2020-08-17 07:02:01 INFO: 2020-08-17 07:02:01 INFO: 2020-08-17 07:02:01 INFO: 2020-08-17 08:00:20 INFO: 2020-08-17 08:00:20 INFO: 2020-08-17 08:00:20 INFO: 2020-08-17 08:00:20 INFO: 2020-08-17 08:00:20 INFO: init new order start 2020-08-17 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 17, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 425.95, 'high': 426.15, 'low': 422.6, 'close': 422.8, 'trades': 4172, 'volume': 1846878, 'vwap': 424.16, 'lastSize': 13, 'turnover': 78336821905, 'homeNotional': 21851.52749612905, 'foreignNotional': 9268518.19908368}, {'timestamp': datetime.datetime(2020, 8, 17, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 426.35, 'high': 427.85, 'low': 423.45, 'close': 425.95, 'trades': 3370, 'volume': 2174886, 'vwap': 425.67, 'lastSize': 546, 'turnover': 92577812650, 'homeNotional': 25790.05848320834, 'foreignNotional': 10978003.069037052}, {'timestamp': datetime.datetime(2020, 8, 17, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 428.4, 'high': 429.15, 'low': 421.85, 'close': 426.35, 'trades': 6860, 'volume': 7958656, 'vwap': 424.57, 'lastSize': 1, 'turnover': 337895708175, 'homeNotional': 94063.40704573214, 'foreignNotional': 39936159.59705758}] 2020-08-17 08:00:20 INFO: prepare candles [CandleItem(low=422.6, high=426.15, open=425.95, close=422.8, color='RED'), CandleItem(low=423.45, high=427.85, open=426.35, close=425.95, color='RED'), CandleItem(low=421.85, high=429.15, open=428.4, close=426.35, color='RED')] 2020-08-17 08:00:20 INFO: skip by colors first_candle=CandleItem(low=421.85, high=429.15, open=428.4, close=426.35, color='RED') second_candle=CandleItem(low=423.45, high=427.85, open=426.35, close=425.95, color='RED') last_candle=CandleItem(low=422.6, high=426.15, open=425.95, close=422.8, color='RED') 2020-08-17 08:00:20 INFO: check need new order None 2020-08-17 08:00:20 INFO: init new order end 2020-08-17 08:00:20 INFO: 2020-08-17 08:00:20 INFO: 2020-08-17 08:00:20 INFO: 2020-08-17 08:00:20 INFO: 2020-08-17 08:02:00 INFO: 2020-08-17 08:02:00 INFO: 2020-08-17 08:02:00 INFO: 2020-08-17 08:02:00 INFO: 2020-08-17 08:02:00 INFO: clearing start 2020-08-17 08:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-17 08:02:00 INFO: skip by not found init order into storage 2020-08-17 08:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-17 08:02:00 INFO: skip by not found init order into storage 2020-08-17 08:02:00 INFO: clearing end 2020-08-17 08:02:00 INFO: 2020-08-17 08:02:00 INFO: 2020-08-17 08:02:00 INFO: 2020-08-17 08:02:00 INFO: 2020-08-17 09:00:20 INFO: 2020-08-17 09:00:20 INFO: 2020-08-17 09:00:20 INFO: 2020-08-17 09:00:20 INFO: 2020-08-17 09:00:20 INFO: init new order start 2020-08-17 09:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 17, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 422.8, 'high': 426.4, 'low': 422.0, 'close': 422.4, 'trades': 3232, 'volume': 1310393, 'vwap': 424.07, 'lastSize': 319, 'turnover': 55569704060, 'homeNotional': 15486.588271535848, 'foreignNotional': 6567396.581508539}, {'timestamp': datetime.datetime(2020, 8, 17, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 425.95, 'high': 426.15, 'low': 422.6, 'close': 422.8, 'trades': 4172, 'volume': 1846878, 'vwap': 424.16, 'lastSize': 13, 'turnover': 78336821905, 'homeNotional': 21851.52749612905, 'foreignNotional': 9268518.19908368}, {'timestamp': datetime.datetime(2020, 8, 17, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 426.35, 'high': 427.85, 'low': 423.45, 'close': 425.95, 'trades': 3370, 'volume': 2174886, 'vwap': 425.67, 'lastSize': 546, 'turnover': 92577812650, 'homeNotional': 25790.05848320834, 'foreignNotional': 10978003.069037052}] 2020-08-17 09:00:21 INFO: prepare candles [CandleItem(low=422.0, high=426.4, open=422.8, close=422.4, color='RED'), CandleItem(low=422.6, high=426.15, open=425.95, close=422.8, color='RED'), CandleItem(low=423.45, high=427.85, open=426.35, close=425.95, color='RED')] 2020-08-17 09:00:21 INFO: skip by colors first_candle=CandleItem(low=423.45, high=427.85, open=426.35, close=425.95, color='RED') second_candle=CandleItem(low=422.6, high=426.15, open=425.95, close=422.8, color='RED') last_candle=CandleItem(low=422.0, high=426.4, open=422.8, close=422.4, color='RED') 2020-08-17 09:00:21 INFO: check need new order None 2020-08-17 09:00:21 INFO: init new order end 2020-08-17 09:00:21 INFO: 2020-08-17 09:00:21 INFO: 2020-08-17 09:00:21 INFO: 2020-08-17 09:00:21 INFO: 2020-08-17 09:02:00 INFO: 2020-08-17 09:02:00 INFO: 2020-08-17 09:02:00 INFO: 2020-08-17 09:02:00 INFO: 2020-08-17 09:02:00 INFO: clearing start 2020-08-17 09:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-17 09:02:00 INFO: skip by not found init order into storage 2020-08-17 09:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-17 09:02:00 INFO: skip by not found init order into storage 2020-08-17 09:02:00 INFO: clearing end 2020-08-17 09:02:00 INFO: 2020-08-17 09:02:00 INFO: 2020-08-17 09:02:00 INFO: 2020-08-17 09:02:00 INFO: 2020-08-17 10:00:20 INFO: 2020-08-17 10:00:20 INFO: 2020-08-17 10:00:20 INFO: 2020-08-17 10:00:20 INFO: 2020-08-17 10:00:20 INFO: init new order start 2020-08-17 10:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 17, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 422.4, 'high': 426.55, 'low': 420.8, 'close': 424.35, 'trades': 4848, 'volume': 3050942, 'vwap': 423.9, 'lastSize': 12, 'turnover': 129326512355, 'homeNotional': 36046.13193454949, 'foreignNotional': 15279687.773828056}, {'timestamp': datetime.datetime(2020, 8, 17, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 422.8, 'high': 426.4, 'low': 422.0, 'close': 422.4, 'trades': 3232, 'volume': 1310393, 'vwap': 424.07, 'lastSize': 319, 'turnover': 55569704060, 'homeNotional': 15486.588271535848, 'foreignNotional': 6567396.581508539}, {'timestamp': datetime.datetime(2020, 8, 17, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 425.95, 'high': 426.15, 'low': 422.6, 'close': 422.8, 'trades': 4172, 'volume': 1846878, 'vwap': 424.16, 'lastSize': 13, 'turnover': 78336821905, 'homeNotional': 21851.52749612905, 'foreignNotional': 9268518.19908368}] 2020-08-17 10:00:20 INFO: prepare candles [CandleItem(low=420.8, high=426.55, open=422.4, close=424.35, color='GREEN'), CandleItem(low=422.0, high=426.4, open=422.8, close=422.4, color='RED'), CandleItem(low=422.6, high=426.15, open=425.95, close=422.8, color='RED')] 2020-08-17 10:00:20 INFO: last_candle=CandleItem(low=420.8, high=426.55, open=422.4, close=424.35, color='GREEN') 2020-08-17 10:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-08-17 10:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=420.8, high=426.55, open=422.4, close=424.35, color='GREEN') 2020-08-17 10:00:20 INFO: skip by CandleItem(low=420.8, high=426.55, open=422.4, close=424.35, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-17 10:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-08-17 10:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=420.8, high=426.55, open=422.4, close=424.35, color='GREEN') 2020-08-17 10:00:20 INFO: skip by CandleItem(low=420.8, high=426.55, open=422.4, close=424.35, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-17 10:00:20 INFO: not found applicable config for candle 2020-08-17 10:00:20 INFO: check need new order None 2020-08-17 10:00:20 INFO: init new order end 2020-08-17 10:00:20 INFO: 2020-08-17 10:00:20 INFO: 2020-08-17 10:00:20 INFO: 2020-08-17 10:00:20 INFO: 2020-08-17 10:02:00 INFO: 2020-08-17 10:02:00 INFO: 2020-08-17 10:02:00 INFO: 2020-08-17 10:02:00 INFO: 2020-08-17 10:02:00 INFO: clearing start 2020-08-17 10:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-17 10:02:00 INFO: skip by not found init order into storage 2020-08-17 10:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-17 10:02:00 INFO: skip by not found init order into storage 2020-08-17 10:02:00 INFO: clearing end 2020-08-17 10:02:00 INFO: 2020-08-17 10:02:00 INFO: 2020-08-17 10:02:00 INFO: 2020-08-17 10:02:00 INFO: 2020-08-17 11:00:20 INFO: 2020-08-17 11:00:20 INFO: 2020-08-17 11:00:20 INFO: 2020-08-17 11:00:20 INFO: 2020-08-17 11:00:20 INFO: init new order start 2020-08-17 11:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 17, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 424.35, 'high': 426.3, 'low': 422.55, 'close': 423.75, 'trades': 3423, 'volume': 1838807, 'vwap': 424.48, 'lastSize': 66, 'turnover': 78052351485, 'homeNotional': 21734.116264070995, 'foreignNotional': 9225558.822200874}, {'timestamp': datetime.datetime(2020, 8, 17, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 422.4, 'high': 426.55, 'low': 420.8, 'close': 424.35, 'trades': 4848, 'volume': 3050942, 'vwap': 423.9, 'lastSize': 12, 'turnover': 129326512355, 'homeNotional': 36046.13193454949, 'foreignNotional': 15279687.773828056}, {'timestamp': datetime.datetime(2020, 8, 17, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 422.8, 'high': 426.4, 'low': 422.0, 'close': 422.4, 'trades': 3232, 'volume': 1310393, 'vwap': 424.07, 'lastSize': 319, 'turnover': 55569704060, 'homeNotional': 15486.588271535848, 'foreignNotional': 6567396.581508539}] 2020-08-17 11:00:21 INFO: prepare candles [CandleItem(low=422.55, high=426.3, open=424.35, close=423.75, color='RED'), CandleItem(low=420.8, high=426.55, open=422.4, close=424.35, color='GREEN'), CandleItem(low=422.0, high=426.4, open=422.8, close=422.4, color='RED')] 2020-08-17 11:00:21 INFO: skip by colors first_candle=CandleItem(low=422.0, high=426.4, open=422.8, close=422.4, color='RED') second_candle=CandleItem(low=420.8, high=426.55, open=422.4, close=424.35, color='GREEN') last_candle=CandleItem(low=422.55, high=426.3, open=424.35, close=423.75, color='RED') 2020-08-17 11:00:21 INFO: check need new order None 2020-08-17 11:00:21 INFO: init new order end 2020-08-17 11:00:21 INFO: 2020-08-17 11:00:21 INFO: 2020-08-17 11:00:21 INFO: 2020-08-17 11:00:21 INFO: 2020-08-17 11:02:00 INFO: 2020-08-17 11:02:00 INFO: 2020-08-17 11:02:00 INFO: 2020-08-17 11:02:00 INFO: 2020-08-17 11:02:00 INFO: clearing start 2020-08-17 11:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-17 11:02:00 INFO: skip by not found init order into storage 2020-08-17 11:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-17 11:02:00 INFO: skip by not found init order into storage 2020-08-17 11:02:00 INFO: clearing end 2020-08-17 11:02:00 INFO: 2020-08-17 11:02:00 INFO: 2020-08-17 11:02:00 INFO: 2020-08-17 11:02:00 INFO: 2020-08-17 12:00:20 INFO: 2020-08-17 12:00:20 INFO: 2020-08-17 12:00:20 INFO: 2020-08-17 12:00:20 INFO: 2020-08-17 12:00:20 INFO: init new order start 2020-08-17 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 17, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 423.75, 'high': 430.8, 'low': 423.55, 'close': 429.6, 'trades': 5357, 'volume': 3827974, 'vwap': 428.25, 'lastSize': 30, 'turnover': 163931348945, 'homeNotional': 45417.52668991894, 'foreignNotional': 19449920.064783987}, {'timestamp': datetime.datetime(2020, 8, 17, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 424.35, 'high': 426.3, 'low': 422.55, 'close': 423.75, 'trades': 3423, 'volume': 1838807, 'vwap': 424.48, 'lastSize': 66, 'turnover': 78052351485, 'homeNotional': 21734.116264070995, 'foreignNotional': 9225558.822200874}, {'timestamp': datetime.datetime(2020, 8, 17, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 422.4, 'high': 426.55, 'low': 420.8, 'close': 424.35, 'trades': 4848, 'volume': 3050942, 'vwap': 423.9, 'lastSize': 12, 'turnover': 129326512355, 'homeNotional': 36046.13193454949, 'foreignNotional': 15279687.773828056}] 2020-08-17 12:00:20 INFO: prepare candles [CandleItem(low=423.55, high=430.8, open=423.75, close=429.6, color='GREEN'), CandleItem(low=422.55, high=426.3, open=424.35, close=423.75, color='RED'), CandleItem(low=420.8, high=426.55, open=422.4, close=424.35, color='GREEN')] 2020-08-17 12:00:20 INFO: skip by colors first_candle=CandleItem(low=420.8, high=426.55, open=422.4, close=424.35, color='GREEN') second_candle=CandleItem(low=422.55, high=426.3, open=424.35, close=423.75, color='RED') last_candle=CandleItem(low=423.55, high=430.8, open=423.75, close=429.6, color='GREEN') 2020-08-17 12:00:20 INFO: check need new order None 2020-08-17 12:00:20 INFO: init new order end 2020-08-17 12:00:20 INFO: 2020-08-17 12:00:20 INFO: 2020-08-17 12:00:20 INFO: 2020-08-17 12:00:20 INFO: 2020-08-17 12:02:00 INFO: 2020-08-17 12:02:00 INFO: 2020-08-17 12:02:00 INFO: 2020-08-17 12:02:00 INFO: 2020-08-17 12:02:00 INFO: clearing start 2020-08-17 12:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-17 12:02:00 INFO: skip by not found init order into storage 2020-08-17 12:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-17 12:02:00 INFO: skip by not found init order into storage 2020-08-17 12:02:00 INFO: clearing end 2020-08-17 12:02:00 INFO: 2020-08-17 12:02:00 INFO: 2020-08-17 12:02:00 INFO: 2020-08-17 12:02:00 INFO: 2020-08-17 13:00:20 INFO: 2020-08-17 13:00:20 INFO: 2020-08-17 13:00:20 INFO: 2020-08-17 13:00:20 INFO: 2020-08-17 13:00:20 INFO: init new order start 2020-08-17 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 17, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 429.6, 'high': 430.35, 'low': 426.45, 'close': 426.45, 'trades': 4662, 'volume': 1771406, 'vwap': 428.44, 'lastSize': 241, 'turnover': 75893199110, 'homeNotional': 21029.931104275172, 'foreignNotional': 9009966.642677585}, {'timestamp': datetime.datetime(2020, 8, 17, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 423.75, 'high': 430.8, 'low': 423.55, 'close': 429.6, 'trades': 5357, 'volume': 3827974, 'vwap': 428.25, 'lastSize': 30, 'turnover': 163931348945, 'homeNotional': 45417.52668991894, 'foreignNotional': 19449920.064783987}, {'timestamp': datetime.datetime(2020, 8, 17, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 424.35, 'high': 426.3, 'low': 422.55, 'close': 423.75, 'trades': 3423, 'volume': 1838807, 'vwap': 424.48, 'lastSize': 66, 'turnover': 78052351485, 'homeNotional': 21734.116264070995, 'foreignNotional': 9225558.822200874}] 2020-08-17 13:00:20 INFO: prepare candles [CandleItem(low=426.45, high=430.35, open=429.6, close=426.45, color='RED'), CandleItem(low=423.55, high=430.8, open=423.75, close=429.6, color='GREEN'), CandleItem(low=422.55, high=426.3, open=424.35, close=423.75, color='RED')] 2020-08-17 13:00:20 INFO: skip by colors first_candle=CandleItem(low=422.55, high=426.3, open=424.35, close=423.75, color='RED') second_candle=CandleItem(low=423.55, high=430.8, open=423.75, close=429.6, color='GREEN') last_candle=CandleItem(low=426.45, high=430.35, open=429.6, close=426.45, color='RED') 2020-08-17 13:00:20 INFO: check need new order None 2020-08-17 13:00:20 INFO: init new order end 2020-08-17 13:00:20 INFO: 2020-08-17 13:00:20 INFO: 2020-08-17 13:00:20 INFO: 2020-08-17 13:00:20 INFO: 2020-08-17 13:02:00 INFO: 2020-08-17 13:02:00 INFO: 2020-08-17 13:02:00 INFO: 2020-08-17 13:02:00 INFO: 2020-08-17 13:02:00 INFO: clearing start 2020-08-17 13:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-17 13:02:00 INFO: skip by not found init order into storage 2020-08-17 13:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-17 13:02:00 INFO: skip by not found init order into storage 2020-08-17 13:02:00 INFO: clearing end 2020-08-17 13:02:00 INFO: 2020-08-17 13:02:00 INFO: 2020-08-17 13:02:00 INFO: 2020-08-17 13:02:00 INFO: 2020-08-17 14:00:20 INFO: 2020-08-17 14:00:20 INFO: 2020-08-17 14:00:20 INFO: 2020-08-17 14:00:20 INFO: 2020-08-17 14:00:20 INFO: init new order start 2020-08-17 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 17, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 426.45, 'high': 429.4, 'low': 425.0, 'close': 426.45, 'trades': 4340, 'volume': 2234880, 'vwap': 427.46, 'lastSize': 130, 'turnover': 95531317520, 'homeNotional': 26548.640097010204, 'foreignNotional': 11348407.00792761}, {'timestamp': datetime.datetime(2020, 8, 17, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 429.6, 'high': 430.35, 'low': 426.45, 'close': 426.45, 'trades': 4662, 'volume': 1771406, 'vwap': 428.44, 'lastSize': 241, 'turnover': 75893199110, 'homeNotional': 21029.931104275172, 'foreignNotional': 9009966.642677585}, {'timestamp': datetime.datetime(2020, 8, 17, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 423.75, 'high': 430.8, 'low': 423.55, 'close': 429.6, 'trades': 5357, 'volume': 3827974, 'vwap': 428.25, 'lastSize': 30, 'turnover': 163931348945, 'homeNotional': 45417.52668991894, 'foreignNotional': 19449920.064783987}] 2020-08-17 14:00:20 INFO: skip by found empty buckets 2020-08-17 14:00:20 INFO: check need new order None 2020-08-17 14:00:20 INFO: init new order end 2020-08-17 14:00:20 INFO: 2020-08-17 14:00:20 INFO: 2020-08-17 14:00:20 INFO: 2020-08-17 14:00:20 INFO: 2020-08-17 14:02:00 INFO: 2020-08-17 14:02:00 INFO: 2020-08-17 14:02:00 INFO: 2020-08-17 14:02:00 INFO: 2020-08-17 14:02:00 INFO: clearing start 2020-08-17 14:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-17 14:02:00 INFO: skip by not found init order into storage 2020-08-17 14:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-17 14:02:00 INFO: skip by not found init order into storage 2020-08-17 14:02:00 INFO: clearing end 2020-08-17 14:02:00 INFO: 2020-08-17 14:02:00 INFO: 2020-08-17 14:02:00 INFO: 2020-08-17 14:02:00 INFO: 2020-08-17 15:00:20 INFO: 2020-08-17 15:00:20 INFO: 2020-08-17 15:00:20 INFO: 2020-08-17 15:00:20 INFO: 2020-08-17 15:00:20 INFO: init new order start 2020-08-17 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 17, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 426.45, 'high': 429.3, 'low': 426.0, 'close': 429.25, 'trades': 3006, 'volume': 1536487, 'vwap': 427.56, 'lastSize': 5, 'turnover': 65692617265, 'homeNotional': 18269.575596795705, 'foreignNotional': 7811189.60052223}, {'timestamp': datetime.datetime(2020, 8, 17, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 426.45, 'high': 429.4, 'low': 425.0, 'close': 426.45, 'trades': 4340, 'volume': 2234880, 'vwap': 427.46, 'lastSize': 130, 'turnover': 95531317520, 'homeNotional': 26548.640097010204, 'foreignNotional': 11348407.00792761}, {'timestamp': datetime.datetime(2020, 8, 17, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 429.6, 'high': 430.35, 'low': 426.45, 'close': 426.45, 'trades': 4662, 'volume': 1771406, 'vwap': 428.44, 'lastSize': 241, 'turnover': 75893199110, 'homeNotional': 21029.931104275172, 'foreignNotional': 9009966.642677585}] 2020-08-17 15:00:20 INFO: skip by found empty buckets 2020-08-17 15:00:20 INFO: check need new order None 2020-08-17 15:00:20 INFO: init new order end 2020-08-17 15:00:20 INFO: 2020-08-17 15:00:20 INFO: 2020-08-17 15:00:20 INFO: 2020-08-17 15:00:20 INFO: 2020-08-17 15:02:00 INFO: 2020-08-17 15:02:00 INFO: 2020-08-17 15:02:00 INFO: 2020-08-17 15:02:00 INFO: 2020-08-17 15:02:00 INFO: clearing start 2020-08-17 15:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-17 15:02:00 INFO: skip by not found init order into storage 2020-08-17 15:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-17 15:02:00 INFO: skip by not found init order into storage 2020-08-17 15:02:00 INFO: clearing end 2020-08-17 15:02:00 INFO: 2020-08-17 15:02:00 INFO: 2020-08-17 15:02:00 INFO: 2020-08-17 15:02:00 INFO: 2020-08-17 16:00:20 INFO: 2020-08-17 16:00:20 INFO: 2020-08-17 16:00:20 INFO: 2020-08-17 16:00:20 INFO: 2020-08-17 16:00:20 INFO: init new order start 2020-08-17 16:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 17, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 429.25, 'high': 431.75, 'low': 424.35, 'close': 427.0, 'trades': 7354, 'volume': 4180638, 'vwap': 428.31, 'lastSize': 4, 'turnover': 179059155270, 'homeNotional': 49749.75924278295, 'foreignNotional': 21308132.848313604}, {'timestamp': datetime.datetime(2020, 8, 17, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 426.45, 'high': 429.3, 'low': 426.0, 'close': 429.25, 'trades': 3006, 'volume': 1536487, 'vwap': 427.56, 'lastSize': 5, 'turnover': 65692617265, 'homeNotional': 18269.575596795705, 'foreignNotional': 7811189.60052223}, {'timestamp': datetime.datetime(2020, 8, 17, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 426.45, 'high': 429.4, 'low': 425.0, 'close': 426.45, 'trades': 4340, 'volume': 2234880, 'vwap': 427.46, 'lastSize': 130, 'turnover': 95531317520, 'homeNotional': 26548.640097010204, 'foreignNotional': 11348407.00792761}] 2020-08-17 16:00:20 INFO: skip by found empty buckets 2020-08-17 16:00:20 INFO: check need new order None 2020-08-17 16:00:20 INFO: init new order end 2020-08-17 16:00:20 INFO: 2020-08-17 16:00:20 INFO: 2020-08-17 16:00:20 INFO: 2020-08-17 16:00:20 INFO: 2020-08-17 16:02:00 INFO: 2020-08-17 16:02:00 INFO: 2020-08-17 16:02:00 INFO: 2020-08-17 16:02:00 INFO: 2020-08-17 16:02:00 INFO: clearing start 2020-08-17 16:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-17 16:02:00 INFO: skip by not found init order into storage 2020-08-17 16:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-17 16:02:00 INFO: skip by not found init order into storage 2020-08-17 16:02:00 INFO: clearing end 2020-08-17 16:02:00 INFO: 2020-08-17 16:02:00 INFO: 2020-08-17 16:02:00 INFO: 2020-08-17 16:02:00 INFO: 2020-08-17 17:00:20 INFO: 2020-08-17 17:00:20 INFO: 2020-08-17 17:00:20 INFO: 2020-08-17 17:00:20 INFO: 2020-08-17 17:00:20 INFO: init new order start 2020-08-17 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 17, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 427.0, 'high': 433.3, 'low': 420.0, 'close': 430.95, 'trades': 13031, 'volume': 11361131, 'vwap': 428.36, 'lastSize': 32, 'turnover': 486656971040, 'homeNotional': 136504.7468138471, 'foreignNotional': 58475181.36459285}, {'timestamp': datetime.datetime(2020, 8, 17, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 429.25, 'high': 431.75, 'low': 424.35, 'close': 427.0, 'trades': 7354, 'volume': 4180638, 'vwap': 428.31, 'lastSize': 4, 'turnover': 179059155270, 'homeNotional': 49749.75924278295, 'foreignNotional': 21308132.848313604}, {'timestamp': datetime.datetime(2020, 8, 17, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 426.45, 'high': 429.3, 'low': 426.0, 'close': 429.25, 'trades': 3006, 'volume': 1536487, 'vwap': 427.56, 'lastSize': 5, 'turnover': 65692617265, 'homeNotional': 18269.575596795705, 'foreignNotional': 7811189.60052223}] 2020-08-17 17:00:20 INFO: prepare candles [CandleItem(low=420.0, high=433.3, open=427.0, close=430.95, color='GREEN'), CandleItem(low=424.35, high=431.75, open=429.25, close=427.0, color='RED'), CandleItem(low=426.0, high=429.3, open=426.45, close=429.25, color='GREEN')] 2020-08-17 17:00:20 INFO: skip by colors first_candle=CandleItem(low=426.0, high=429.3, open=426.45, close=429.25, color='GREEN') second_candle=CandleItem(low=424.35, high=431.75, open=429.25, close=427.0, color='RED') last_candle=CandleItem(low=420.0, high=433.3, open=427.0, close=430.95, color='GREEN') 2020-08-17 17:00:20 INFO: check need new order None 2020-08-17 17:00:20 INFO: init new order end 2020-08-17 17:00:20 INFO: 2020-08-17 17:00:20 INFO: 2020-08-17 17:00:20 INFO: 2020-08-17 17:00:20 INFO: 2020-08-17 17:02:00 INFO: 2020-08-17 17:02:00 INFO: 2020-08-17 17:02:00 INFO: 2020-08-17 17:02:00 INFO: 2020-08-17 17:02:00 INFO: clearing start 2020-08-17 17:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-17 17:02:00 INFO: skip by not found init order into storage 2020-08-17 17:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-17 17:02:00 INFO: skip by not found init order into storage 2020-08-17 17:02:00 INFO: clearing end 2020-08-17 17:02:00 INFO: 2020-08-17 17:02:00 INFO: 2020-08-17 17:02:00 INFO: 2020-08-17 17:02:00 INFO: 2020-08-17 18:00:20 INFO: 2020-08-17 18:00:20 INFO: 2020-08-17 18:00:20 INFO: 2020-08-17 18:00:20 INFO: 2020-08-17 18:00:20 INFO: init new order start 2020-08-17 18:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 17, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 430.95, 'high': 433.55, 'low': 428.0, 'close': 432.5, 'trades': 6108, 'volume': 4519287, 'vwap': 431.11, 'lastSize': 12, 'turnover': 194830017085, 'homeNotional': 54952.47796412696, 'foreignNotional': 23690550.792285107}, {'timestamp': datetime.datetime(2020, 8, 17, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 427.0, 'high': 433.3, 'low': 420.0, 'close': 430.95, 'trades': 13031, 'volume': 11361131, 'vwap': 428.36, 'lastSize': 32, 'turnover': 486656971040, 'homeNotional': 136504.7468138471, 'foreignNotional': 58475181.36459285}, {'timestamp': datetime.datetime(2020, 8, 17, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 429.25, 'high': 431.75, 'low': 424.35, 'close': 427.0, 'trades': 7354, 'volume': 4180638, 'vwap': 428.31, 'lastSize': 4, 'turnover': 179059155270, 'homeNotional': 49749.75924278295, 'foreignNotional': 21308132.848313604}] 2020-08-17 18:00:20 INFO: prepare candles [CandleItem(low=428.0, high=433.55, open=430.95, close=432.5, color='GREEN'), CandleItem(low=420.0, high=433.3, open=427.0, close=430.95, color='GREEN'), CandleItem(low=424.35, high=431.75, open=429.25, close=427.0, color='RED')] 2020-08-17 18:00:20 INFO: skip by colors first_candle=CandleItem(low=424.35, high=431.75, open=429.25, close=427.0, color='RED') second_candle=CandleItem(low=420.0, high=433.3, open=427.0, close=430.95, color='GREEN') last_candle=CandleItem(low=428.0, high=433.55, open=430.95, close=432.5, color='GREEN') 2020-08-17 18:00:20 INFO: check need new order None 2020-08-17 18:00:20 INFO: init new order end 2020-08-17 18:00:20 INFO: 2020-08-17 18:00:20 INFO: 2020-08-17 18:00:20 INFO: 2020-08-17 18:00:20 INFO: 2020-08-17 18:02:00 INFO: 2020-08-17 18:02:00 INFO: 2020-08-17 18:02:00 INFO: 2020-08-17 18:02:00 INFO: 2020-08-17 18:02:00 INFO: clearing start 2020-08-17 18:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-17 18:02:00 INFO: skip by not found init order into storage 2020-08-17 18:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-17 18:02:00 INFO: skip by not found init order into storage 2020-08-17 18:02:00 INFO: clearing end 2020-08-17 18:02:00 INFO: 2020-08-17 18:02:00 INFO: 2020-08-17 18:02:00 INFO: 2020-08-17 18:02:00 INFO: 2020-08-17 19:00:20 INFO: 2020-08-17 19:00:20 INFO: 2020-08-17 19:00:20 INFO: 2020-08-17 19:00:20 INFO: 2020-08-17 19:00:20 INFO: init new order start 2020-08-17 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 17, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 432.5, 'high': 443.85, 'low': 430.0, 'close': 443.65, 'trades': 14655, 'volume': 11807547, 'vwap': 436.36, 'lastSize': 11, 'turnover': 515223820835, 'homeNotional': 145599.62751101592, 'foreignNotional': 63537338.880933315}, {'timestamp': datetime.datetime(2020, 8, 17, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 430.95, 'high': 433.55, 'low': 428.0, 'close': 432.5, 'trades': 6108, 'volume': 4519287, 'vwap': 431.11, 'lastSize': 12, 'turnover': 194830017085, 'homeNotional': 54952.47796412696, 'foreignNotional': 23690550.792285107}, {'timestamp': datetime.datetime(2020, 8, 17, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 427.0, 'high': 433.3, 'low': 420.0, 'close': 430.95, 'trades': 13031, 'volume': 11361131, 'vwap': 428.36, 'lastSize': 32, 'turnover': 486656971040, 'homeNotional': 136504.7468138471, 'foreignNotional': 58475181.36459285}] 2020-08-17 19:00:20 INFO: prepare candles [CandleItem(low=430.0, high=443.85, open=432.5, close=443.65, color='GREEN'), CandleItem(low=428.0, high=433.55, open=430.95, close=432.5, color='GREEN'), CandleItem(low=420.0, high=433.3, open=427.0, close=430.95, color='GREEN')] 2020-08-17 19:00:20 INFO: skip by colors first_candle=CandleItem(low=420.0, high=433.3, open=427.0, close=430.95, color='GREEN') second_candle=CandleItem(low=428.0, high=433.55, open=430.95, close=432.5, color='GREEN') last_candle=CandleItem(low=430.0, high=443.85, open=432.5, close=443.65, color='GREEN') 2020-08-17 19:00:20 INFO: check need new order None 2020-08-17 19:00:20 INFO: init new order end 2020-08-17 19:00:20 INFO: 2020-08-17 19:00:20 INFO: 2020-08-17 19:00:20 INFO: 2020-08-17 19:00:20 INFO: 2020-08-17 19:02:00 INFO: 2020-08-17 19:02:00 INFO: 2020-08-17 19:02:00 INFO: 2020-08-17 19:02:00 INFO: 2020-08-17 19:02:00 INFO: clearing start 2020-08-17 19:02:01 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-17 19:02:01 INFO: skip by not found init order into storage 2020-08-17 19:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-17 19:02:01 INFO: skip by not found init order into storage 2020-08-17 19:02:01 INFO: clearing end 2020-08-17 19:02:01 INFO: 2020-08-17 19:02:01 INFO: 2020-08-17 19:02:01 INFO: 2020-08-17 19:02:01 INFO: 2020-08-17 20:00:20 INFO: 2020-08-17 20:00:20 INFO: 2020-08-17 20:00:20 INFO: 2020-08-17 20:00:20 INFO: 2020-08-17 20:00:20 INFO: init new order start 2020-08-17 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 17, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 443.65, 'high': 449.85, 'low': 439.85, 'close': 441.5, 'trades': 14273, 'volume': 11494476, 'vwap': 444.23, 'lastSize': 56, 'turnover': 510615833375, 'homeNotional': 142653.17353709877, 'foreignNotional': 63371544.13109373}, {'timestamp': datetime.datetime(2020, 8, 17, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 432.5, 'high': 443.85, 'low': 430.0, 'close': 443.65, 'trades': 14655, 'volume': 11807547, 'vwap': 436.36, 'lastSize': 11, 'turnover': 515223820835, 'homeNotional': 145599.62751101592, 'foreignNotional': 63537338.880933315}, {'timestamp': datetime.datetime(2020, 8, 17, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 430.95, 'high': 433.55, 'low': 428.0, 'close': 432.5, 'trades': 6108, 'volume': 4519287, 'vwap': 431.11, 'lastSize': 12, 'turnover': 194830017085, 'homeNotional': 54952.47796412696, 'foreignNotional': 23690550.792285107}] 2020-08-17 20:00:20 INFO: prepare candles [CandleItem(low=439.85, high=449.85, open=443.65, close=441.5, color='RED'), CandleItem(low=430.0, high=443.85, open=432.5, close=443.65, color='GREEN'), CandleItem(low=428.0, high=433.55, open=430.95, close=432.5, color='GREEN')] 2020-08-17 20:00:20 INFO: last_candle=CandleItem(low=439.85, high=449.85, open=443.65, close=441.5, color='RED') 2020-08-17 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-17 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=439.85, high=449.85, open=443.65, close=441.5, color='RED') 2020-08-17 20:00:20 INFO: skip by CandleItem(low=439.85, high=449.85, open=443.65, close=441.5, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-17 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-17 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=439.85, high=449.85, open=443.65, close=441.5, color='RED') 2020-08-17 20:00:20 INFO: skip by CandleItem(low=439.85, high=449.85, open=443.65, close=441.5, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-17 20:00:20 INFO: not found applicable config for candle 2020-08-17 20:00:20 INFO: check need new order None 2020-08-17 20:00:20 INFO: init new order end 2020-08-17 20:00:20 INFO: 2020-08-17 20:00:20 INFO: 2020-08-17 20:00:20 INFO: 2020-08-17 20:00:20 INFO: 2020-08-17 20:02:00 INFO: 2020-08-17 20:02:00 INFO: 2020-08-17 20:02:00 INFO: 2020-08-17 20:02:00 INFO: 2020-08-17 20:02:00 INFO: clearing start 2020-08-17 20:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-17 20:02:00 INFO: skip by not found init order into storage 2020-08-17 20:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-17 20:02:00 INFO: skip by not found init order into storage 2020-08-17 20:02:00 INFO: clearing end 2020-08-17 20:02:00 INFO: 2020-08-17 20:02:00 INFO: 2020-08-17 20:02:00 INFO: 2020-08-17 20:02:00 INFO: 2020-08-17 21:00:20 INFO: 2020-08-17 21:00:20 INFO: 2020-08-17 21:00:20 INFO: 2020-08-17 21:00:20 INFO: 2020-08-17 21:00:20 INFO: init new order start 2020-08-17 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 17, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 441.5, 'high': 444.2, 'low': 441.25, 'close': 443.15, 'trades': 5401, 'volume': 3253830, 'vwap': 442.81, 'lastSize': 60, 'turnover': 144081742180, 'homeNotional': 40343.00336129968, 'foreignNotional': 17864162.86241054}, {'timestamp': datetime.datetime(2020, 8, 17, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 443.65, 'high': 449.85, 'low': 439.85, 'close': 441.5, 'trades': 14273, 'volume': 11494476, 'vwap': 444.23, 'lastSize': 56, 'turnover': 510615833375, 'homeNotional': 142653.17353709877, 'foreignNotional': 63371544.13109373}, {'timestamp': datetime.datetime(2020, 8, 17, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 432.5, 'high': 443.85, 'low': 430.0, 'close': 443.65, 'trades': 14655, 'volume': 11807547, 'vwap': 436.36, 'lastSize': 11, 'turnover': 515223820835, 'homeNotional': 145599.62751101592, 'foreignNotional': 63537338.880933315}] 2020-08-17 21:00:20 INFO: prepare candles [CandleItem(low=441.25, high=444.2, open=441.5, close=443.15, color='GREEN'), CandleItem(low=439.85, high=449.85, open=443.65, close=441.5, color='RED'), CandleItem(low=430.0, high=443.85, open=432.5, close=443.65, color='GREEN')] 2020-08-17 21:00:20 INFO: skip by colors first_candle=CandleItem(low=430.0, high=443.85, open=432.5, close=443.65, color='GREEN') second_candle=CandleItem(low=439.85, high=449.85, open=443.65, close=441.5, color='RED') last_candle=CandleItem(low=441.25, high=444.2, open=441.5, close=443.15, color='GREEN') 2020-08-17 21:00:20 INFO: check need new order None 2020-08-17 21:00:20 INFO: init new order end 2020-08-17 21:00:20 INFO: 2020-08-17 21:00:20 INFO: 2020-08-17 21:00:20 INFO: 2020-08-17 21:00:20 INFO: 2020-08-17 21:02:00 INFO: 2020-08-17 21:02:00 INFO: 2020-08-17 21:02:00 INFO: 2020-08-17 21:02:00 INFO: 2020-08-17 21:02:00 INFO: clearing start 2020-08-17 21:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-17 21:02:00 INFO: skip by not found init order into storage 2020-08-17 21:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-17 21:02:00 INFO: skip by not found init order into storage 2020-08-17 21:02:00 INFO: clearing end 2020-08-17 21:02:00 INFO: 2020-08-17 21:02:00 INFO: 2020-08-17 21:02:00 INFO: 2020-08-17 21:02:00 INFO: 2020-08-17 22:00:20 INFO: 2020-08-17 22:00:20 INFO: 2020-08-17 22:00:20 INFO: 2020-08-17 22:00:20 INFO: 2020-08-17 22:00:20 INFO: init new order start 2020-08-17 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 17, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 443.15, 'high': 444.2, 'low': 437.4, 'close': 438.1, 'trades': 6373, 'volume': 5205751, 'vwap': 440.97, 'lastSize': 365, 'turnover': 229553400760, 'homeNotional': 64336.66901268956, 'foreignNotional': 28370154.76784678}, {'timestamp': datetime.datetime(2020, 8, 17, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 441.5, 'high': 444.2, 'low': 441.25, 'close': 443.15, 'trades': 5401, 'volume': 3253830, 'vwap': 442.81, 'lastSize': 60, 'turnover': 144081742180, 'homeNotional': 40343.00336129968, 'foreignNotional': 17864162.86241054}, {'timestamp': datetime.datetime(2020, 8, 17, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 443.65, 'high': 449.85, 'low': 439.85, 'close': 441.5, 'trades': 14273, 'volume': 11494476, 'vwap': 444.23, 'lastSize': 56, 'turnover': 510615833375, 'homeNotional': 142653.17353709877, 'foreignNotional': 63371544.13109373}] 2020-08-17 22:00:20 INFO: prepare candles [CandleItem(low=437.4, high=444.2, open=443.15, close=438.1, color='RED'), CandleItem(low=441.25, high=444.2, open=441.5, close=443.15, color='GREEN'), CandleItem(low=439.85, high=449.85, open=443.65, close=441.5, color='RED')] 2020-08-17 22:00:20 INFO: skip by colors first_candle=CandleItem(low=439.85, high=449.85, open=443.65, close=441.5, color='RED') second_candle=CandleItem(low=441.25, high=444.2, open=441.5, close=443.15, color='GREEN') last_candle=CandleItem(low=437.4, high=444.2, open=443.15, close=438.1, color='RED') 2020-08-17 22:00:20 INFO: check need new order None 2020-08-17 22:00:20 INFO: init new order end 2020-08-17 22:00:20 INFO: 2020-08-17 22:00:20 INFO: 2020-08-17 22:00:20 INFO: 2020-08-17 22:00:20 INFO: 2020-08-17 22:02:00 INFO: 2020-08-17 22:02:00 INFO: 2020-08-17 22:02:00 INFO: 2020-08-17 22:02:00 INFO: 2020-08-17 22:02:00 INFO: clearing start 2020-08-17 22:02:01 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-17 22:02:01 INFO: skip by not found init order into storage 2020-08-17 22:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-17 22:02:01 INFO: skip by not found init order into storage 2020-08-17 22:02:01 INFO: clearing end 2020-08-17 22:02:01 INFO: 2020-08-17 22:02:01 INFO: 2020-08-17 22:02:01 INFO: 2020-08-17 22:02:01 INFO: 2020-08-17 23:00:20 INFO: 2020-08-17 23:00:20 INFO: 2020-08-17 23:00:20 INFO: 2020-08-17 23:00:20 INFO: 2020-08-17 23:00:20 INFO: init new order start 2020-08-17 23:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 17, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 438.1, 'high': 439.9, 'low': 436.75, 'close': 438.55, 'trades': 3557, 'volume': 2480574, 'vwap': 438.57, 'lastSize': 9424, 'turnover': 108790382275, 'homeNotional': 30583.422107895996, 'foreignNotional': 13412969.97846493}, {'timestamp': datetime.datetime(2020, 8, 17, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 443.15, 'high': 444.2, 'low': 437.4, 'close': 438.1, 'trades': 6373, 'volume': 5205751, 'vwap': 440.97, 'lastSize': 365, 'turnover': 229553400760, 'homeNotional': 64336.66901268956, 'foreignNotional': 28370154.76784678}, {'timestamp': datetime.datetime(2020, 8, 17, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 441.5, 'high': 444.2, 'low': 441.25, 'close': 443.15, 'trades': 5401, 'volume': 3253830, 'vwap': 442.81, 'lastSize': 60, 'turnover': 144081742180, 'homeNotional': 40343.00336129968, 'foreignNotional': 17864162.86241054}] 2020-08-17 23:00:20 INFO: prepare candles [CandleItem(low=436.75, high=439.9, open=438.1, close=438.55, color='GREEN'), CandleItem(low=437.4, high=444.2, open=443.15, close=438.1, color='RED'), CandleItem(low=441.25, high=444.2, open=441.5, close=443.15, color='GREEN')] 2020-08-17 23:00:20 INFO: skip by colors first_candle=CandleItem(low=441.25, high=444.2, open=441.5, close=443.15, color='GREEN') second_candle=CandleItem(low=437.4, high=444.2, open=443.15, close=438.1, color='RED') last_candle=CandleItem(low=436.75, high=439.9, open=438.1, close=438.55, color='GREEN') 2020-08-17 23:00:20 INFO: check need new order None 2020-08-17 23:00:20 INFO: init new order end 2020-08-17 23:00:20 INFO: 2020-08-17 23:00:20 INFO: 2020-08-17 23:00:20 INFO: 2020-08-17 23:00:20 INFO: 2020-08-17 23:02:00 INFO: 2020-08-17 23:02:00 INFO: 2020-08-17 23:02:00 INFO: 2020-08-17 23:02:00 INFO: 2020-08-17 23:02:00 INFO: clearing start 2020-08-17 23:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-17 23:02:00 INFO: skip by not found init order into storage 2020-08-17 23:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-17 23:02:00 INFO: skip by not found init order into storage 2020-08-17 23:02:00 INFO: clearing end 2020-08-17 23:02:00 INFO: 2020-08-17 23:02:00 INFO: 2020-08-17 23:02:00 INFO: 2020-08-17 23:02:00 INFO: 2020-08-18 00:00:20 INFO: 2020-08-18 00:00:20 INFO: 2020-08-18 00:00:20 INFO: 2020-08-18 00:00:20 INFO: 2020-08-18 00:00:20 INFO: init new order start 2020-08-18 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 17, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 438.55, 'high': 440.8, 'low': 438.15, 'close': 438.9, 'trades': 3268, 'volume': 1950269, 'vwap': 439.51, 'lastSize': 13, 'turnover': 85715886930, 'homeNotional': 24063.762315728643, 'foreignNotional': 10576237.191050414}, {'timestamp': datetime.datetime(2020, 8, 17, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 438.1, 'high': 439.9, 'low': 436.75, 'close': 438.55, 'trades': 3557, 'volume': 2480574, 'vwap': 438.57, 'lastSize': 9424, 'turnover': 108790382275, 'homeNotional': 30583.422107895996, 'foreignNotional': 13412969.97846493}, {'timestamp': datetime.datetime(2020, 8, 17, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 443.15, 'high': 444.2, 'low': 437.4, 'close': 438.1, 'trades': 6373, 'volume': 5205751, 'vwap': 440.97, 'lastSize': 365, 'turnover': 229553400760, 'homeNotional': 64336.66901268956, 'foreignNotional': 28370154.76784678}] 2020-08-18 00:00:20 INFO: prepare candles [CandleItem(low=438.15, high=440.8, open=438.55, close=438.9, color='GREEN'), CandleItem(low=436.75, high=439.9, open=438.1, close=438.55, color='GREEN'), CandleItem(low=437.4, high=444.2, open=443.15, close=438.1, color='RED')] 2020-08-18 00:00:20 INFO: skip by colors first_candle=CandleItem(low=437.4, high=444.2, open=443.15, close=438.1, color='RED') second_candle=CandleItem(low=436.75, high=439.9, open=438.1, close=438.55, color='GREEN') last_candle=CandleItem(low=438.15, high=440.8, open=438.55, close=438.9, color='GREEN') 2020-08-18 00:00:20 INFO: check need new order None 2020-08-18 00:00:20 INFO: init new order end 2020-08-18 00:00:20 INFO: 2020-08-18 00:00:20 INFO: 2020-08-18 00:00:20 INFO: 2020-08-18 00:00:20 INFO: 2020-08-18 00:02:00 INFO: 2020-08-18 00:02:00 INFO: 2020-08-18 00:02:00 INFO: 2020-08-18 00:02:00 INFO: 2020-08-18 00:02:00 INFO: clearing start 2020-08-18 00:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-18 00:02:00 INFO: skip by not found init order into storage 2020-08-18 00:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-18 00:02:00 INFO: skip by not found init order into storage 2020-08-18 00:02:00 INFO: clearing end 2020-08-18 00:02:00 INFO: 2020-08-18 00:02:00 INFO: 2020-08-18 00:02:00 INFO: 2020-08-18 00:02:00 INFO: 2020-08-18 01:00:20 INFO: 2020-08-18 01:00:20 INFO: 2020-08-18 01:00:20 INFO: 2020-08-18 01:00:20 INFO: 2020-08-18 01:00:20 INFO: init new order start 2020-08-18 01:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 17, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 438.9, 'high': 440.6, 'low': 436.6, 'close': 439.9, 'trades': 2912, 'volume': 1254997, 'vwap': 438.52, 'lastSize': 84, 'turnover': 55032902500, 'homeNotional': 15470.494346784923, 'foreignNotional': 6783985.619296339}, {'timestamp': datetime.datetime(2020, 8, 17, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 438.55, 'high': 440.8, 'low': 438.15, 'close': 438.9, 'trades': 3268, 'volume': 1950269, 'vwap': 439.51, 'lastSize': 13, 'turnover': 85715886930, 'homeNotional': 24063.762315728643, 'foreignNotional': 10576237.191050414}, {'timestamp': datetime.datetime(2020, 8, 17, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 438.1, 'high': 439.9, 'low': 436.75, 'close': 438.55, 'trades': 3557, 'volume': 2480574, 'vwap': 438.57, 'lastSize': 9424, 'turnover': 108790382275, 'homeNotional': 30583.422107895996, 'foreignNotional': 13412969.97846493}] 2020-08-18 01:00:21 INFO: prepare candles [CandleItem(low=436.6, high=440.6, open=438.9, close=439.9, color='GREEN'), CandleItem(low=438.15, high=440.8, open=438.55, close=438.9, color='GREEN'), CandleItem(low=436.75, high=439.9, open=438.1, close=438.55, color='GREEN')] 2020-08-18 01:00:21 INFO: skip by colors first_candle=CandleItem(low=436.75, high=439.9, open=438.1, close=438.55, color='GREEN') second_candle=CandleItem(low=438.15, high=440.8, open=438.55, close=438.9, color='GREEN') last_candle=CandleItem(low=436.6, high=440.6, open=438.9, close=439.9, color='GREEN') 2020-08-18 01:00:21 INFO: check need new order None 2020-08-18 01:00:21 INFO: init new order end 2020-08-18 01:00:21 INFO: 2020-08-18 01:00:21 INFO: 2020-08-18 01:00:21 INFO: 2020-08-18 01:00:21 INFO: 2020-08-18 01:02:00 INFO: 2020-08-18 01:02:00 INFO: 2020-08-18 01:02:00 INFO: 2020-08-18 01:02:00 INFO: 2020-08-18 01:02:00 INFO: clearing start 2020-08-18 01:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-18 01:02:00 INFO: skip by not found init order into storage 2020-08-18 01:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-18 01:02:00 INFO: skip by not found init order into storage 2020-08-18 01:02:00 INFO: clearing end 2020-08-18 01:02:00 INFO: 2020-08-18 01:02:00 INFO: 2020-08-18 01:02:00 INFO: 2020-08-18 01:02:00 INFO: 2020-08-18 02:00:20 INFO: 2020-08-18 02:00:20 INFO: 2020-08-18 02:00:20 INFO: 2020-08-18 02:00:20 INFO: 2020-08-18 02:00:20 INFO: init new order start 2020-08-18 02:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 17, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 439.9, 'high': 441.0, 'low': 438.55, 'close': 439.2, 'trades': 2551, 'volume': 1486247, 'vwap': 439.81, 'lastSize': 1, 'turnover': 65366479720, 'homeNotional': 18371.45178000853, 'foreignNotional': 8079928.967188339}, {'timestamp': datetime.datetime(2020, 8, 17, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 438.9, 'high': 440.6, 'low': 436.6, 'close': 439.9, 'trades': 2912, 'volume': 1254997, 'vwap': 438.52, 'lastSize': 84, 'turnover': 55032902500, 'homeNotional': 15470.494346784923, 'foreignNotional': 6783985.619296339}, {'timestamp': datetime.datetime(2020, 8, 17, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 438.55, 'high': 440.8, 'low': 438.15, 'close': 438.9, 'trades': 3268, 'volume': 1950269, 'vwap': 439.51, 'lastSize': 13, 'turnover': 85715886930, 'homeNotional': 24063.762315728643, 'foreignNotional': 10576237.191050414}] 2020-08-18 02:00:21 INFO: prepare candles [CandleItem(low=438.55, high=441.0, open=439.9, close=439.2, color='RED'), CandleItem(low=436.6, high=440.6, open=438.9, close=439.9, color='GREEN'), CandleItem(low=438.15, high=440.8, open=438.55, close=438.9, color='GREEN')] 2020-08-18 02:00:21 INFO: last_candle=CandleItem(low=438.55, high=441.0, open=439.9, close=439.2, color='RED') 2020-08-18 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-18 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=438.55, high=441.0, open=439.9, close=439.2, color='RED') 2020-08-18 02:00:21 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=436.6, high=440.6, open=438.9, close=439.9, color='GREEN') 2020-08-18 02:00:21 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=438.15, high=440.8, open=438.55, close=438.9, color='GREEN') 2020-08-18 02:00:21 INFO: hit candle order=OrderProperties(candle=CandleItem(low=438.55, high=441.0, open=439.9, close=439.2, color='RED'), take_profit_factor=6.0, clearing_interval=3600) 2020-08-18 02:00:21 INFO: check need new order OrderProperties(candle=CandleItem(low=438.55, high=441.0, open=439.9, close=439.2, color='RED'), take_profit_factor=6.0, clearing_interval=3600) 2020-08-18 02:00:21 INFO: place order: start candle=CandleItem(low=438.55, high=441.0, open=439.9, close=439.2, color='RED') ticker='ETHUSD' price_offset=0.1 2020-08-18 02:00:21 INFO: place order: side_factor=1 init_trigger_price=438.5 init_order_price=438.45 stop_price_offset=0.0 candle.size=2.4499999999999886 stop_price=441.0 take_price=423.75000000000006 2020-08-18 02:00:21 INFO: place order round: side_factor=1 init_trigger_price=Decimal('438.5') init_order_price=Decimal('438.44999999999998863131622783839702606201171875') stop_price_offset=0.0 candle.size=2.4499999999999886 stop_price=Decimal('441') take_price=Decimal('423.75000000000005684341886080801486968994140625') 2020-08-18 02:00:21 INFO: place order: compute qty=-760 2020-08-18 02:00:21 INFO: place order: save order to db 4feb810943524d91a80037749d7c0456; response=True 2020-08-18 02:00:21 INFO: process event {'orderID': '8c8a740e-b1b9-5db0-5d93-4cae10aea8a0', 'clOrdID': '4feb810943524d91a80037749d7c0456', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 760, 'price': 438.45, 'displayQty': None, 'stopPx': 438.5, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 760, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-08-17T23:00:21.385Z', 'timestamp': '2020-08-17T23:00:21.385Z'} 2020-08-18 02:00:21 INFO: skip event 4feb810943524d91a80037749d7c0456 New 2020-08-18 02:00:21 INFO: post order to exchange resp={'orderID': '8c8a740e-b1b9-5db0-5d93-4cae10aea8a0', 'clOrdID': '4feb810943524d91a80037749d7c0456', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 760, 'price': 438.45, 'displayQty': None, 'stopPx': 438.5, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 760, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 17, 23, 0, 21, 385000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 17, 23, 0, 21, 385000, tzinfo=tzutc())} 2020-08-18 02:00:21 INFO: place new init order {'qty': -760, 'init_price': Decimal('438.5'), 'stop_price': Decimal('441'), 'take_price': Decimal('423.75000000000005684341886080801486968994140625'), 'order_uid': '4feb810943524d91a80037749d7c0456', 'response': {'orderID': '8c8a740e-b1b9-5db0-5d93-4cae10aea8a0', 'clOrdID': '4feb810943524d91a80037749d7c0456', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 760, 'price': 438.45, 'displayQty': None, 'stopPx': 438.5, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 760, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 17, 23, 0, 21, 385000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 17, 23, 0, 21, 385000, tzinfo=tzutc())}} 2020-08-18 02:00:21 INFO: init new order end 2020-08-18 02:00:21 INFO: 2020-08-18 02:00:21 INFO: 2020-08-18 02:00:21 INFO: 2020-08-18 02:00:21 INFO: 2020-08-18 02:02:00 INFO: 2020-08-18 02:02:00 INFO: 2020-08-18 02:02:00 INFO: 2020-08-18 02:02:00 INFO: 2020-08-18 02:02:00 INFO: clearing start 2020-08-18 02:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-18 02:02:00 INFO: skip by not found init order into storage 2020-08-18 02:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-18 02:02:00 INFO: skip by not found init order into storage 2020-08-18 02:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '8c8a740e-b1b9-5db0-5d93-4cae10aea8a0', 'clOrdID': '4feb810943524d91a80037749d7c0456', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 760, 'price': 438.45, 'displayQty': None, 'stopPx': 438.5, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 760, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 17, 23, 0, 21, 385000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 17, 23, 0, 21, 385000, tzinfo=tzutc())} 2020-08-18 02:02:00 INFO: order time=2020-08-17 23:00:21.385000+00:00; delta from now UTC=0:01:39.186097 time_delta.total_seconds()=99.186097; time_diff_offset='3600' 2020-08-18 02:02:00 INFO: skip by time diff 2020-08-17 23:00:21.385000+00:00 2020-08-18 02:02:00 INFO: clearing end 2020-08-18 02:02:00 INFO: 2020-08-18 02:02:00 INFO: 2020-08-18 02:02:00 INFO: 2020-08-18 02:02:00 INFO: 2020-08-18 02:10:03 INFO: process event {'orderID': '8c8a740e-b1b9-5db0-5d93-4cae10aea8a0', 'triggered': 'StopOrderTriggered', 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'timestamp': '2020-08-17T23:10:03.519Z', 'clOrdID': '4feb810943524d91a80037749d7c0456', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-18 02:10:03 INFO: skip event 4feb810943524d91a80037749d7c0456 2020-08-18 02:10:03 INFO: process event {'orderID': '8c8a740e-b1b9-5db0-5d93-4cae10aea8a0', 'ordStatus': 'Filled', 'leavesQty': 0, 'cumQty': 760, 'avgPx': 438.48, 'transactTime': '2020-08-17T23:10:03.519Z', 'clOrdID': '4feb810943524d91a80037749d7c0456', 'account': 605536, 'symbol': 'ETHUSD', 'timestamp': '2020-08-17T23:10:03.519Z'} 2020-08-18 02:10:03 INFO: add new event={'uid': '4feb810943524d91a80037749d7c0456', 'status': 'Filled'} 2020-08-18 02:10:04 INFO: 2020-08-18 02:10:04 INFO: 2020-08-18 02:10:04 INFO: 2020-08-18 02:10:04 INFO: 2020-08-18 02:10:04 INFO: process event start 2020-08-18 02:10:04 INFO: fetch new order event 4feb810943524d91a80037749d7c0456 2020-08-18 02:10:04 INFO: fetch orders by event init={'stop': '441', 'take': '423.75000000000005684341886080801486968994140625', 'qty': '760', 'color': 'RED', 'ticker': 'ETHUSD', 'clearing_offset': '3600'} profit_pair=None 2020-08-18 02:10:04 INFO: process init order filled 2020-08-18 02:10:04 INFO: save profit orders to storage stop=d335bc46c0fa46d7bee5647b975aaea5 take=54c8ab45bb07493d9feddaaf21c5f30c 2020-08-18 02:10:04 INFO: place profit orders take_price=423.75000000000005684341886080801486968994140625, stop_price=441, qty=760, color=RED, ticker=ETHUSD d335bc46c0fa46d7bee5647b975aaea5 54c8ab45bb07493d9feddaaf21c5f30c 2020-08-18 02:10:04 INFO: place stop order ETHUSD: qty=760, stop_price=441, stop_uid=d335bc46c0fa46d7bee5647b975aaea5 2020-08-18 02:10:05 INFO: process event {'orderID': 'a8082ef2-32d8-699c-003e-aebf619b99d6', 'clOrdID': 'd335bc46c0fa46d7bee5647b975aaea5', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 760, 'price': None, 'displayQty': None, 'stopPx': 441, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 760, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': '2020-08-17T23:10:05.220Z', 'timestamp': '2020-08-17T23:10:05.220Z'} 2020-08-18 02:10:05 INFO: skip event d335bc46c0fa46d7bee5647b975aaea5 New 2020-08-18 02:10:05 INFO: exchange resp for stop order={'orderID': 'a8082ef2-32d8-699c-003e-aebf619b99d6', 'clOrdID': 'd335bc46c0fa46d7bee5647b975aaea5', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 760, 'price': None, 'displayQty': None, 'stopPx': 441.0, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 760, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 17, 23, 10, 5, 220000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 17, 23, 10, 5, 220000, tzinfo=tzutc())} 2020-08-18 02:10:05 INFO: place limit order ETHUSD: qty=760, price=423.75000000000005684341886080801486968994140625, take_uid=54c8ab45bb07493d9feddaaf21c5f30c 2020-08-18 02:10:06 INFO: exchange resp for take profit order={'orderID': '12e41506-f637-87a4-84ff-cd6e9e00e41e', 'clOrdID': '54c8ab45bb07493d9feddaaf21c5f30c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 760, 'price': 423.75, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 760, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 17, 23, 10, 6, 83000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 17, 23, 10, 6, 83000, tzinfo=tzutc())} 2020-08-18 02:10:06 INFO: place profit orders={'stop': {'response': {'orderID': 'a8082ef2-32d8-699c-003e-aebf619b99d6', 'clOrdID': 'd335bc46c0fa46d7bee5647b975aaea5', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 760, 'price': None, 'displayQty': None, 'stopPx': 441.0, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 760, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 17, 23, 10, 5, 220000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 17, 23, 10, 5, 220000, tzinfo=tzutc())}, 'qty': Decimal('760'), 'uid': 'd335bc46c0fa46d7bee5647b975aaea5', 'price': Decimal('441')}, 'take': {'response': {'orderID': '12e41506-f637-87a4-84ff-cd6e9e00e41e', 'clOrdID': '54c8ab45bb07493d9feddaaf21c5f30c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 760, 'price': 423.75, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 760, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 17, 23, 10, 6, 83000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 17, 23, 10, 6, 83000, tzinfo=tzutc())}, 'qty': Decimal('760'), 'uid': '54c8ab45bb07493d9feddaaf21c5f30c', 'price': Decimal('423.75000000000005684341886080801486968994140625')}} 2020-08-18 02:10:06 INFO: rm init order from db 4feb810943524d91a80037749d7c0456 2020-08-18 02:10:06 INFO: end process event_processing_result='proceed init order' 2020-08-18 02:10:06 INFO: 2020-08-18 02:10:06 INFO: 2020-08-18 02:10:06 INFO: 2020-08-18 02:10:06 INFO: 2020-08-18 02:10:06 INFO: process event {'orderID': '12e41506-f637-87a4-84ff-cd6e9e00e41e', 'clOrdID': '54c8ab45bb07493d9feddaaf21c5f30c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 760, 'price': 423.75, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 760, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': '2020-08-17T23:10:06.083Z', 'timestamp': '2020-08-17T23:10:06.083Z'} 2020-08-18 02:10:06 INFO: skip event 54c8ab45bb07493d9feddaaf21c5f30c New 2020-08-18 02:10:06 INFO: process event {'orderID': '12e41506-f637-87a4-84ff-cd6e9e00e41e', 'workingIndicator': True, 'clOrdID': '54c8ab45bb07493d9feddaaf21c5f30c', 'account': 605536, 'symbol': 'ETHUSD', 'timestamp': '2020-08-17T23:10:06.083Z'} 2020-08-18 02:10:06 INFO: skip event 54c8ab45bb07493d9feddaaf21c5f30c 2020-08-18 03:00:20 INFO: 2020-08-18 03:00:20 INFO: 2020-08-18 03:00:20 INFO: 2020-08-18 03:00:20 INFO: 2020-08-18 03:00:20 INFO: init new order start 2020-08-18 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 18, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 439.2, 'high': 440.45, 'low': 429.2, 'close': 432.1, 'trades': 10183, 'volume': 7037471, 'vwap': 433.34, 'lastSize': 2489, 'turnover': 304960070265, 'homeNotional': 86668.97810963348, 'foreignNotional': 37557508.57490745}, {'timestamp': datetime.datetime(2020, 8, 17, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 439.9, 'high': 441.0, 'low': 438.55, 'close': 439.2, 'trades': 2551, 'volume': 1486247, 'vwap': 439.81, 'lastSize': 1, 'turnover': 65366479720, 'homeNotional': 18371.45178000853, 'foreignNotional': 8079928.967188339}, {'timestamp': datetime.datetime(2020, 8, 17, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 438.9, 'high': 440.6, 'low': 436.6, 'close': 439.9, 'trades': 2912, 'volume': 1254997, 'vwap': 438.52, 'lastSize': 84, 'turnover': 55032902500, 'homeNotional': 15470.494346784923, 'foreignNotional': 6783985.619296339}] 2020-08-18 03:00:20 INFO: prepare candles [CandleItem(low=429.2, high=440.45, open=439.2, close=432.1, color='RED'), CandleItem(low=438.55, high=441.0, open=439.9, close=439.2, color='RED'), CandleItem(low=436.6, high=440.6, open=438.9, close=439.9, color='GREEN')] 2020-08-18 03:00:20 INFO: skip by colors first_candle=CandleItem(low=436.6, high=440.6, open=438.9, close=439.9, color='GREEN') second_candle=CandleItem(low=438.55, high=441.0, open=439.9, close=439.2, color='RED') last_candle=CandleItem(low=429.2, high=440.45, open=439.2, close=432.1, color='RED') 2020-08-18 03:00:20 INFO: check need new order None 2020-08-18 03:00:20 INFO: init new order end 2020-08-18 03:00:20 INFO: 2020-08-18 03:00:20 INFO: 2020-08-18 03:00:20 INFO: 2020-08-18 03:00:20 INFO: 2020-08-18 03:02:00 INFO: 2020-08-18 03:02:00 INFO: 2020-08-18 03:02:00 INFO: 2020-08-18 03:02:00 INFO: 2020-08-18 03:02:00 INFO: clearing start 2020-08-18 03:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-18 03:02:00 INFO: skip by not found init order into storage 2020-08-18 03:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-18 03:02:00 INFO: skip by not found init order into storage 2020-08-18 03:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'a8082ef2-32d8-699c-003e-aebf619b99d6', 'clOrdID': 'd335bc46c0fa46d7bee5647b975aaea5', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 760, 'price': None, 'displayQty': None, 'stopPx': 441.0, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 760, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 17, 23, 10, 5, 220000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 17, 23, 10, 5, 220000, tzinfo=tzutc())} 2020-08-18 03:02:00 INFO: skip by not found init order into storage 2020-08-18 03:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '12e41506-f637-87a4-84ff-cd6e9e00e41e', 'clOrdID': '54c8ab45bb07493d9feddaaf21c5f30c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 760, 'price': 423.75, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 760, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 17, 23, 10, 6, 83000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 17, 23, 10, 6, 83000, tzinfo=tzutc())} 2020-08-18 03:02:00 INFO: skip by not found init order into storage 2020-08-18 03:02:00 INFO: clearing end 2020-08-18 03:02:00 INFO: 2020-08-18 03:02:00 INFO: 2020-08-18 03:02:00 INFO: 2020-08-18 03:02:00 INFO: 2020-08-18 04:00:20 INFO: 2020-08-18 04:00:20 INFO: 2020-08-18 04:00:20 INFO: 2020-08-18 04:00:20 INFO: 2020-08-18 04:00:20 INFO: init new order start 2020-08-18 04:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 18, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 432.1, 'high': 434.55, 'low': 431.45, 'close': 433.8, 'trades': 2942, 'volume': 2423733, 'vwap': 433.13, 'lastSize': 52, 'turnover': 104978760825, 'homeNotional': 29883.06687543417, 'foreignNotional': 12943211.627992636}, {'timestamp': datetime.datetime(2020, 8, 18, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 439.2, 'high': 440.45, 'low': 429.2, 'close': 432.1, 'trades': 10183, 'volume': 7037471, 'vwap': 433.34, 'lastSize': 2489, 'turnover': 304960070265, 'homeNotional': 86668.97810963348, 'foreignNotional': 37557508.57490745}, {'timestamp': datetime.datetime(2020, 8, 17, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 439.9, 'high': 441.0, 'low': 438.55, 'close': 439.2, 'trades': 2551, 'volume': 1486247, 'vwap': 439.81, 'lastSize': 1, 'turnover': 65366479720, 'homeNotional': 18371.45178000853, 'foreignNotional': 8079928.967188339}] 2020-08-18 04:00:20 INFO: prepare candles [CandleItem(low=431.45, high=434.55, open=432.1, close=433.8, color='GREEN'), CandleItem(low=429.2, high=440.45, open=439.2, close=432.1, color='RED'), CandleItem(low=438.55, high=441.0, open=439.9, close=439.2, color='RED')] 2020-08-18 04:00:20 INFO: last_candle=CandleItem(low=431.45, high=434.55, open=432.1, close=433.8, color='GREEN') 2020-08-18 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-18 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=431.45, high=434.55, open=432.1, close=433.8, color='GREEN') 2020-08-18 04:00:20 INFO: skip by CandleItem(low=431.45, high=434.55, open=432.1, close=433.8, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-18 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-18 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=431.45, high=434.55, open=432.1, close=433.8, color='GREEN') 2020-08-18 04:00:20 INFO: skip by CandleItem(low=431.45, high=434.55, open=432.1, close=433.8, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-18 04:00:20 INFO: not found applicable config for candle 2020-08-18 04:00:20 INFO: check need new order None 2020-08-18 04:00:20 INFO: init new order end 2020-08-18 04:00:20 INFO: 2020-08-18 04:00:20 INFO: 2020-08-18 04:00:20 INFO: 2020-08-18 04:00:20 INFO: 2020-08-18 04:02:00 INFO: 2020-08-18 04:02:00 INFO: 2020-08-18 04:02:00 INFO: 2020-08-18 04:02:00 INFO: 2020-08-18 04:02:00 INFO: clearing start 2020-08-18 04:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-18 04:02:00 INFO: skip by not found init order into storage 2020-08-18 04:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-18 04:02:00 INFO: skip by not found init order into storage 2020-08-18 04:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'a8082ef2-32d8-699c-003e-aebf619b99d6', 'clOrdID': 'd335bc46c0fa46d7bee5647b975aaea5', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 760, 'price': None, 'displayQty': None, 'stopPx': 441.0, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 760, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 17, 23, 10, 5, 220000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 17, 23, 10, 5, 220000, tzinfo=tzutc())} 2020-08-18 04:02:00 INFO: skip by not found init order into storage 2020-08-18 04:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '12e41506-f637-87a4-84ff-cd6e9e00e41e', 'clOrdID': '54c8ab45bb07493d9feddaaf21c5f30c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 760, 'price': 423.75, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 760, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 17, 23, 10, 6, 83000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 17, 23, 10, 6, 83000, tzinfo=tzutc())} 2020-08-18 04:02:00 INFO: skip by not found init order into storage 2020-08-18 04:02:00 INFO: clearing end 2020-08-18 04:02:00 INFO: 2020-08-18 04:02:00 INFO: 2020-08-18 04:02:00 INFO: 2020-08-18 04:02:00 INFO: 2020-08-18 05:00:20 INFO: 2020-08-18 05:00:20 INFO: 2020-08-18 05:00:20 INFO: 2020-08-18 05:00:20 INFO: 2020-08-18 05:00:20 INFO: init new order start 2020-08-18 05:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 18, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 433.8, 'high': 433.85, 'low': 429.45, 'close': 430.0, 'trades': 4195, 'volume': 3062858, 'vwap': 431.57, 'lastSize': 93, 'turnover': 132181542740, 'homeNotional': 37841.97290627622, 'foreignNotional': 16331228.25586408}, {'timestamp': datetime.datetime(2020, 8, 18, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 432.1, 'high': 434.55, 'low': 431.45, 'close': 433.8, 'trades': 2942, 'volume': 2423733, 'vwap': 433.13, 'lastSize': 52, 'turnover': 104978760825, 'homeNotional': 29883.06687543417, 'foreignNotional': 12943211.627992636}, {'timestamp': datetime.datetime(2020, 8, 18, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 439.2, 'high': 440.45, 'low': 429.2, 'close': 432.1, 'trades': 10183, 'volume': 7037471, 'vwap': 433.34, 'lastSize': 2489, 'turnover': 304960070265, 'homeNotional': 86668.97810963348, 'foreignNotional': 37557508.57490745}] 2020-08-18 05:00:20 INFO: prepare candles [CandleItem(low=429.45, high=433.85, open=433.8, close=430.0, color='RED'), CandleItem(low=431.45, high=434.55, open=432.1, close=433.8, color='GREEN'), CandleItem(low=429.2, high=440.45, open=439.2, close=432.1, color='RED')] 2020-08-18 05:00:20 INFO: skip by colors first_candle=CandleItem(low=429.2, high=440.45, open=439.2, close=432.1, color='RED') second_candle=CandleItem(low=431.45, high=434.55, open=432.1, close=433.8, color='GREEN') last_candle=CandleItem(low=429.45, high=433.85, open=433.8, close=430.0, color='RED') 2020-08-18 05:00:20 INFO: check need new order None 2020-08-18 05:00:20 INFO: init new order end 2020-08-18 05:00:20 INFO: 2020-08-18 05:00:20 INFO: 2020-08-18 05:00:20 INFO: 2020-08-18 05:00:20 INFO: 2020-08-18 05:02:00 INFO: 2020-08-18 05:02:00 INFO: 2020-08-18 05:02:00 INFO: 2020-08-18 05:02:00 INFO: 2020-08-18 05:02:00 INFO: clearing start 2020-08-18 05:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-18 05:02:00 INFO: skip by not found init order into storage 2020-08-18 05:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-18 05:02:00 INFO: skip by not found init order into storage 2020-08-18 05:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'a8082ef2-32d8-699c-003e-aebf619b99d6', 'clOrdID': 'd335bc46c0fa46d7bee5647b975aaea5', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 760, 'price': None, 'displayQty': None, 'stopPx': 441.0, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 760, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 17, 23, 10, 5, 220000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 17, 23, 10, 5, 220000, tzinfo=tzutc())} 2020-08-18 05:02:00 INFO: skip by not found init order into storage 2020-08-18 05:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '12e41506-f637-87a4-84ff-cd6e9e00e41e', 'clOrdID': '54c8ab45bb07493d9feddaaf21c5f30c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 760, 'price': 423.75, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 760, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 17, 23, 10, 6, 83000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 17, 23, 10, 6, 83000, tzinfo=tzutc())} 2020-08-18 05:02:00 INFO: skip by not found init order into storage 2020-08-18 05:02:00 INFO: clearing end 2020-08-18 05:02:00 INFO: 2020-08-18 05:02:00 INFO: 2020-08-18 05:02:00 INFO: 2020-08-18 05:02:00 INFO: 2020-08-18 06:00:20 INFO: 2020-08-18 06:00:20 INFO: 2020-08-18 06:00:20 INFO: 2020-08-18 06:00:20 INFO: 2020-08-18 06:00:20 INFO: init new order start 2020-08-18 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 18, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 430.0, 'high': 433.35, 'low': 428.6, 'close': 433.35, 'trades': 3498, 'volume': 2116719, 'vwap': 430.98, 'lastSize': 125, 'turnover': 91226162220, 'homeNotional': 26119.674454470227, 'foreignNotional': 11257060.496058088}, {'timestamp': datetime.datetime(2020, 8, 18, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 433.8, 'high': 433.85, 'low': 429.45, 'close': 430.0, 'trades': 4195, 'volume': 3062858, 'vwap': 431.57, 'lastSize': 93, 'turnover': 132181542740, 'homeNotional': 37841.97290627622, 'foreignNotional': 16331228.25586408}, {'timestamp': datetime.datetime(2020, 8, 18, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 432.1, 'high': 434.55, 'low': 431.45, 'close': 433.8, 'trades': 2942, 'volume': 2423733, 'vwap': 433.13, 'lastSize': 52, 'turnover': 104978760825, 'homeNotional': 29883.06687543417, 'foreignNotional': 12943211.627992636}] 2020-08-18 06:00:20 INFO: prepare candles [CandleItem(low=428.6, high=433.35, open=430.0, close=433.35, color='GREEN'), CandleItem(low=429.45, high=433.85, open=433.8, close=430.0, color='RED'), CandleItem(low=431.45, high=434.55, open=432.1, close=433.8, color='GREEN')] 2020-08-18 06:00:20 INFO: skip by colors first_candle=CandleItem(low=431.45, high=434.55, open=432.1, close=433.8, color='GREEN') second_candle=CandleItem(low=429.45, high=433.85, open=433.8, close=430.0, color='RED') last_candle=CandleItem(low=428.6, high=433.35, open=430.0, close=433.35, color='GREEN') 2020-08-18 06:00:20 INFO: check need new order None 2020-08-18 06:00:20 INFO: init new order end 2020-08-18 06:00:20 INFO: 2020-08-18 06:00:20 INFO: 2020-08-18 06:00:20 INFO: 2020-08-18 06:00:20 INFO: 2020-08-18 06:02:00 INFO: 2020-08-18 06:02:00 INFO: 2020-08-18 06:02:00 INFO: 2020-08-18 06:02:00 INFO: 2020-08-18 06:02:00 INFO: clearing start 2020-08-18 06:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-18 06:02:00 INFO: skip by not found init order into storage 2020-08-18 06:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-18 06:02:00 INFO: skip by not found init order into storage 2020-08-18 06:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'a8082ef2-32d8-699c-003e-aebf619b99d6', 'clOrdID': 'd335bc46c0fa46d7bee5647b975aaea5', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 760, 'price': None, 'displayQty': None, 'stopPx': 441.0, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 760, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 17, 23, 10, 5, 220000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 17, 23, 10, 5, 220000, tzinfo=tzutc())} 2020-08-18 06:02:00 INFO: skip by not found init order into storage 2020-08-18 06:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '12e41506-f637-87a4-84ff-cd6e9e00e41e', 'clOrdID': '54c8ab45bb07493d9feddaaf21c5f30c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 760, 'price': 423.75, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 760, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 17, 23, 10, 6, 83000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 17, 23, 10, 6, 83000, tzinfo=tzutc())} 2020-08-18 06:02:00 INFO: skip by not found init order into storage 2020-08-18 06:02:00 INFO: clearing end 2020-08-18 06:02:00 INFO: 2020-08-18 06:02:00 INFO: 2020-08-18 06:02:00 INFO: 2020-08-18 06:02:00 INFO: 2020-08-18 07:00:20 INFO: 2020-08-18 07:00:20 INFO: 2020-08-18 07:00:20 INFO: 2020-08-18 07:00:20 INFO: 2020-08-18 07:00:20 INFO: init new order start 2020-08-18 07:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 18, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 433.35, 'high': 433.35, 'low': 429.15, 'close': 430.65, 'trades': 2936, 'volume': 1908361, 'vwap': 430.69, 'lastSize': 5, 'turnover': 82189792740, 'homeNotional': 23510.43743113683, 'foreignNotional': 10125571.566024914}, {'timestamp': datetime.datetime(2020, 8, 18, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 430.0, 'high': 433.35, 'low': 428.6, 'close': 433.35, 'trades': 3498, 'volume': 2116719, 'vwap': 430.98, 'lastSize': 125, 'turnover': 91226162220, 'homeNotional': 26119.674454470227, 'foreignNotional': 11257060.496058088}, {'timestamp': datetime.datetime(2020, 8, 18, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 433.8, 'high': 433.85, 'low': 429.45, 'close': 430.0, 'trades': 4195, 'volume': 3062858, 'vwap': 431.57, 'lastSize': 93, 'turnover': 132181542740, 'homeNotional': 37841.97290627622, 'foreignNotional': 16331228.25586408}] 2020-08-18 07:00:20 INFO: prepare candles [CandleItem(low=429.15, high=433.35, open=433.35, close=430.65, color='RED'), CandleItem(low=428.6, high=433.35, open=430.0, close=433.35, color='GREEN'), CandleItem(low=429.45, high=433.85, open=433.8, close=430.0, color='RED')] 2020-08-18 07:00:20 INFO: skip by colors first_candle=CandleItem(low=429.45, high=433.85, open=433.8, close=430.0, color='RED') second_candle=CandleItem(low=428.6, high=433.35, open=430.0, close=433.35, color='GREEN') last_candle=CandleItem(low=429.15, high=433.35, open=433.35, close=430.65, color='RED') 2020-08-18 07:00:20 INFO: check need new order None 2020-08-18 07:00:20 INFO: init new order end 2020-08-18 07:00:20 INFO: 2020-08-18 07:00:20 INFO: 2020-08-18 07:00:20 INFO: 2020-08-18 07:00:20 INFO: 2020-08-18 07:02:00 INFO: 2020-08-18 07:02:00 INFO: 2020-08-18 07:02:00 INFO: 2020-08-18 07:02:00 INFO: 2020-08-18 07:02:00 INFO: clearing start 2020-08-18 07:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-18 07:02:00 INFO: skip by not found init order into storage 2020-08-18 07:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-18 07:02:00 INFO: skip by not found init order into storage 2020-08-18 07:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'a8082ef2-32d8-699c-003e-aebf619b99d6', 'clOrdID': 'd335bc46c0fa46d7bee5647b975aaea5', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 760, 'price': None, 'displayQty': None, 'stopPx': 441.0, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 760, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 17, 23, 10, 5, 220000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 17, 23, 10, 5, 220000, tzinfo=tzutc())} 2020-08-18 07:02:00 INFO: skip by not found init order into storage 2020-08-18 07:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '12e41506-f637-87a4-84ff-cd6e9e00e41e', 'clOrdID': '54c8ab45bb07493d9feddaaf21c5f30c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 760, 'price': 423.75, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 760, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 17, 23, 10, 6, 83000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 17, 23, 10, 6, 83000, tzinfo=tzutc())} 2020-08-18 07:02:00 INFO: skip by not found init order into storage 2020-08-18 07:02:00 INFO: clearing end 2020-08-18 07:02:00 INFO: 2020-08-18 07:02:00 INFO: 2020-08-18 07:02:00 INFO: 2020-08-18 07:02:00 INFO: 2020-08-18 08:00:20 INFO: 2020-08-18 08:00:20 INFO: 2020-08-18 08:00:20 INFO: 2020-08-18 08:00:20 INFO: 2020-08-18 08:00:20 INFO: init new order start 2020-08-18 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 18, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 430.65, 'high': 431.2, 'low': 427.45, 'close': 429.0, 'trades': 4793, 'volume': 4446393, 'vwap': 429.15, 'lastSize': 12, 'turnover': 190815253655, 'homeNotional': 54613.15685069167, 'foreignNotional': 23437083.576770466}, {'timestamp': datetime.datetime(2020, 8, 18, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 433.35, 'high': 433.35, 'low': 429.15, 'close': 430.65, 'trades': 2936, 'volume': 1908361, 'vwap': 430.69, 'lastSize': 5, 'turnover': 82189792740, 'homeNotional': 23510.43743113683, 'foreignNotional': 10125571.566024914}, {'timestamp': datetime.datetime(2020, 8, 18, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 430.0, 'high': 433.35, 'low': 428.6, 'close': 433.35, 'trades': 3498, 'volume': 2116719, 'vwap': 430.98, 'lastSize': 125, 'turnover': 91226162220, 'homeNotional': 26119.674454470227, 'foreignNotional': 11257060.496058088}] 2020-08-18 08:00:20 INFO: prepare candles [CandleItem(low=427.45, high=431.2, open=430.65, close=429.0, color='RED'), CandleItem(low=429.15, high=433.35, open=433.35, close=430.65, color='RED'), CandleItem(low=428.6, high=433.35, open=430.0, close=433.35, color='GREEN')] 2020-08-18 08:00:20 INFO: skip by colors first_candle=CandleItem(low=428.6, high=433.35, open=430.0, close=433.35, color='GREEN') second_candle=CandleItem(low=429.15, high=433.35, open=433.35, close=430.65, color='RED') last_candle=CandleItem(low=427.45, high=431.2, open=430.65, close=429.0, color='RED') 2020-08-18 08:00:20 INFO: check need new order None 2020-08-18 08:00:20 INFO: init new order end 2020-08-18 08:00:20 INFO: 2020-08-18 08:00:20 INFO: 2020-08-18 08:00:20 INFO: 2020-08-18 08:00:20 INFO: 2020-08-18 08:02:00 INFO: 2020-08-18 08:02:00 INFO: 2020-08-18 08:02:00 INFO: 2020-08-18 08:02:00 INFO: 2020-08-18 08:02:00 INFO: clearing start 2020-08-18 08:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-18 08:02:00 INFO: skip by not found init order into storage 2020-08-18 08:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-18 08:02:00 INFO: skip by not found init order into storage 2020-08-18 08:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'a8082ef2-32d8-699c-003e-aebf619b99d6', 'clOrdID': 'd335bc46c0fa46d7bee5647b975aaea5', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 760, 'price': None, 'displayQty': None, 'stopPx': 441.0, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 760, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 17, 23, 10, 5, 220000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 17, 23, 10, 5, 220000, tzinfo=tzutc())} 2020-08-18 08:02:00 INFO: skip by not found init order into storage 2020-08-18 08:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '12e41506-f637-87a4-84ff-cd6e9e00e41e', 'clOrdID': '54c8ab45bb07493d9feddaaf21c5f30c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 760, 'price': 423.75, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 760, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 17, 23, 10, 6, 83000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 17, 23, 10, 6, 83000, tzinfo=tzutc())} 2020-08-18 08:02:00 INFO: skip by not found init order into storage 2020-08-18 08:02:00 INFO: clearing end 2020-08-18 08:02:00 INFO: 2020-08-18 08:02:00 INFO: 2020-08-18 08:02:00 INFO: 2020-08-18 08:02:00 INFO: 2020-08-18 09:00:20 INFO: 2020-08-18 09:00:20 INFO: 2020-08-18 09:00:20 INFO: 2020-08-18 09:00:20 INFO: 2020-08-18 09:00:20 INFO: init new order start 2020-08-18 09:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 18, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 429.0, 'high': 430.05, 'low': 427.05, 'close': 429.1, 'trades': 3356, 'volume': 2003932, 'vwap': 428.64, 'lastSize': 4000, 'turnover': 85896469240, 'homeNotional': 24558.577997469947, 'foreignNotional': 10526796.365331536}, {'timestamp': datetime.datetime(2020, 8, 18, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 430.65, 'high': 431.2, 'low': 427.45, 'close': 429.0, 'trades': 4793, 'volume': 4446393, 'vwap': 429.15, 'lastSize': 12, 'turnover': 190815253655, 'homeNotional': 54613.15685069167, 'foreignNotional': 23437083.576770466}, {'timestamp': datetime.datetime(2020, 8, 18, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 433.35, 'high': 433.35, 'low': 429.15, 'close': 430.65, 'trades': 2936, 'volume': 1908361, 'vwap': 430.69, 'lastSize': 5, 'turnover': 82189792740, 'homeNotional': 23510.43743113683, 'foreignNotional': 10125571.566024914}] 2020-08-18 09:00:21 INFO: prepare candles [CandleItem(low=427.05, high=430.05, open=429.0, close=429.1, color='GREEN'), CandleItem(low=427.45, high=431.2, open=430.65, close=429.0, color='RED'), CandleItem(low=429.15, high=433.35, open=433.35, close=430.65, color='RED')] 2020-08-18 09:00:21 INFO: last_candle=CandleItem(low=427.05, high=430.05, open=429.0, close=429.1, color='GREEN') 2020-08-18 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-08-18 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=427.05, high=430.05, open=429.0, close=429.1, color='GREEN') 2020-08-18 09:00:21 INFO: skip by CandleItem(low=427.05, high=430.05, open=429.0, close=429.1, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-18 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-08-18 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=427.05, high=430.05, open=429.0, close=429.1, color='GREEN') 2020-08-18 09:00:21 INFO: skip by CandleItem(low=427.05, high=430.05, open=429.0, close=429.1, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-18 09:00:21 INFO: not found applicable config for candle 2020-08-18 09:00:21 INFO: check need new order None 2020-08-18 09:00:21 INFO: init new order end 2020-08-18 09:00:21 INFO: 2020-08-18 09:00:21 INFO: 2020-08-18 09:00:21 INFO: 2020-08-18 09:00:21 INFO: 2020-08-18 09:02:00 INFO: 2020-08-18 09:02:00 INFO: 2020-08-18 09:02:00 INFO: 2020-08-18 09:02:00 INFO: 2020-08-18 09:02:00 INFO: clearing start 2020-08-18 09:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-18 09:02:00 INFO: skip by not found init order into storage 2020-08-18 09:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-18 09:02:00 INFO: skip by not found init order into storage 2020-08-18 09:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'a8082ef2-32d8-699c-003e-aebf619b99d6', 'clOrdID': 'd335bc46c0fa46d7bee5647b975aaea5', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 760, 'price': None, 'displayQty': None, 'stopPx': 441.0, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 760, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 17, 23, 10, 5, 220000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 17, 23, 10, 5, 220000, tzinfo=tzutc())} 2020-08-18 09:02:00 INFO: skip by not found init order into storage 2020-08-18 09:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '12e41506-f637-87a4-84ff-cd6e9e00e41e', 'clOrdID': '54c8ab45bb07493d9feddaaf21c5f30c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 760, 'price': 423.75, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 760, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 17, 23, 10, 6, 83000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 17, 23, 10, 6, 83000, tzinfo=tzutc())} 2020-08-18 09:02:00 INFO: skip by not found init order into storage 2020-08-18 09:02:00 INFO: clearing end 2020-08-18 09:02:00 INFO: 2020-08-18 09:02:00 INFO: 2020-08-18 09:02:00 INFO: 2020-08-18 09:02:00 INFO: 2020-08-18 10:00:20 INFO: 2020-08-18 10:00:20 INFO: 2020-08-18 10:00:20 INFO: 2020-08-18 10:00:20 INFO: 2020-08-18 10:00:20 INFO: init new order start 2020-08-18 10:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 18, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 429.1, 'high': 431.05, 'low': 427.4, 'close': 431.0, 'trades': 2931, 'volume': 2635682, 'vwap': 428.84, 'lastSize': 11820, 'turnover': 113026224975, 'homeNotional': 32244.574929782062, 'foreignNotional': 13827517.025518918}, {'timestamp': datetime.datetime(2020, 8, 18, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 429.0, 'high': 430.05, 'low': 427.05, 'close': 429.1, 'trades': 3356, 'volume': 2003932, 'vwap': 428.64, 'lastSize': 4000, 'turnover': 85896469240, 'homeNotional': 24558.577997469947, 'foreignNotional': 10526796.365331536}, {'timestamp': datetime.datetime(2020, 8, 18, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 430.65, 'high': 431.2, 'low': 427.45, 'close': 429.0, 'trades': 4793, 'volume': 4446393, 'vwap': 429.15, 'lastSize': 12, 'turnover': 190815253655, 'homeNotional': 54613.15685069167, 'foreignNotional': 23437083.576770466}] 2020-08-18 10:00:20 INFO: prepare candles [CandleItem(low=427.4, high=431.05, open=429.1, close=431.0, color='GREEN'), CandleItem(low=427.05, high=430.05, open=429.0, close=429.1, color='GREEN'), CandleItem(low=427.45, high=431.2, open=430.65, close=429.0, color='RED')] 2020-08-18 10:00:20 INFO: skip by colors first_candle=CandleItem(low=427.45, high=431.2, open=430.65, close=429.0, color='RED') second_candle=CandleItem(low=427.05, high=430.05, open=429.0, close=429.1, color='GREEN') last_candle=CandleItem(low=427.4, high=431.05, open=429.1, close=431.0, color='GREEN') 2020-08-18 10:00:20 INFO: check need new order None 2020-08-18 10:00:20 INFO: init new order end 2020-08-18 10:00:20 INFO: 2020-08-18 10:00:20 INFO: 2020-08-18 10:00:20 INFO: 2020-08-18 10:00:20 INFO: 2020-08-18 10:02:00 INFO: 2020-08-18 10:02:00 INFO: 2020-08-18 10:02:00 INFO: 2020-08-18 10:02:00 INFO: 2020-08-18 10:02:00 INFO: clearing start 2020-08-18 10:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-18 10:02:00 INFO: skip by not found init order into storage 2020-08-18 10:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-18 10:02:00 INFO: skip by not found init order into storage 2020-08-18 10:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'a8082ef2-32d8-699c-003e-aebf619b99d6', 'clOrdID': 'd335bc46c0fa46d7bee5647b975aaea5', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 760, 'price': None, 'displayQty': None, 'stopPx': 441.0, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 760, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 17, 23, 10, 5, 220000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 17, 23, 10, 5, 220000, tzinfo=tzutc())} 2020-08-18 10:02:00 INFO: skip by not found init order into storage 2020-08-18 10:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '12e41506-f637-87a4-84ff-cd6e9e00e41e', 'clOrdID': '54c8ab45bb07493d9feddaaf21c5f30c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 760, 'price': 423.75, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 760, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 17, 23, 10, 6, 83000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 17, 23, 10, 6, 83000, tzinfo=tzutc())} 2020-08-18 10:02:00 INFO: skip by not found init order into storage 2020-08-18 10:02:00 INFO: clearing end 2020-08-18 10:02:00 INFO: 2020-08-18 10:02:00 INFO: 2020-08-18 10:02:00 INFO: 2020-08-18 10:02:00 INFO: 2020-08-18 11:00:20 INFO: 2020-08-18 11:00:20 INFO: 2020-08-18 11:00:20 INFO: 2020-08-18 11:00:20 INFO: 2020-08-18 11:00:20 INFO: init new order start 2020-08-18 11:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 18, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 431.0, 'high': 431.0, 'low': 429.35, 'close': 430.1, 'trades': 1914, 'volume': 1152217, 'vwap': 430.16, 'lastSize': 179, 'turnover': 49563238395, 'homeNotional': 14119.60412251045, 'foreignNotional': 6073627.866675661}, {'timestamp': datetime.datetime(2020, 8, 18, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 429.1, 'high': 431.05, 'low': 427.4, 'close': 431.0, 'trades': 2931, 'volume': 2635682, 'vwap': 428.84, 'lastSize': 11820, 'turnover': 113026224975, 'homeNotional': 32244.574929782062, 'foreignNotional': 13827517.025518918}, {'timestamp': datetime.datetime(2020, 8, 18, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 429.0, 'high': 430.05, 'low': 427.05, 'close': 429.1, 'trades': 3356, 'volume': 2003932, 'vwap': 428.64, 'lastSize': 4000, 'turnover': 85896469240, 'homeNotional': 24558.577997469947, 'foreignNotional': 10526796.365331536}] 2020-08-18 11:00:21 INFO: prepare candles [CandleItem(low=429.35, high=431.0, open=431.0, close=430.1, color='RED'), CandleItem(low=427.4, high=431.05, open=429.1, close=431.0, color='GREEN'), CandleItem(low=427.05, high=430.05, open=429.0, close=429.1, color='GREEN')] 2020-08-18 11:00:21 INFO: last_candle=CandleItem(low=429.35, high=431.0, open=431.0, close=430.1, color='RED') 2020-08-18 11:00:21 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-08-18 11:00:21 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=429.35, high=431.0, open=431.0, close=430.1, color='RED') 2020-08-18 11:00:21 INFO: skip by CandleItem(low=429.35, high=431.0, open=431.0, close=430.1, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-18 11:00:21 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-08-18 11:00:21 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=429.35, high=431.0, open=431.0, close=430.1, color='RED') 2020-08-18 11:00:21 INFO: skip by CandleItem(low=429.35, high=431.0, open=431.0, close=430.1, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-18 11:00:21 INFO: not found applicable config for candle 2020-08-18 11:00:21 INFO: check need new order None 2020-08-18 11:00:21 INFO: init new order end 2020-08-18 11:00:21 INFO: 2020-08-18 11:00:21 INFO: 2020-08-18 11:00:21 INFO: 2020-08-18 11:00:21 INFO: 2020-08-18 11:02:00 INFO: 2020-08-18 11:02:00 INFO: 2020-08-18 11:02:00 INFO: 2020-08-18 11:02:00 INFO: 2020-08-18 11:02:00 INFO: clearing start 2020-08-18 11:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-18 11:02:00 INFO: skip by not found init order into storage 2020-08-18 11:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-18 11:02:00 INFO: skip by not found init order into storage 2020-08-18 11:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'a8082ef2-32d8-699c-003e-aebf619b99d6', 'clOrdID': 'd335bc46c0fa46d7bee5647b975aaea5', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 760, 'price': None, 'displayQty': None, 'stopPx': 441.0, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 760, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 17, 23, 10, 5, 220000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 17, 23, 10, 5, 220000, tzinfo=tzutc())} 2020-08-18 11:02:00 INFO: skip by not found init order into storage 2020-08-18 11:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '12e41506-f637-87a4-84ff-cd6e9e00e41e', 'clOrdID': '54c8ab45bb07493d9feddaaf21c5f30c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 760, 'price': 423.75, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 760, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 17, 23, 10, 6, 83000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 17, 23, 10, 6, 83000, tzinfo=tzutc())} 2020-08-18 11:02:00 INFO: skip by not found init order into storage 2020-08-18 11:02:00 INFO: clearing end 2020-08-18 11:02:00 INFO: 2020-08-18 11:02:00 INFO: 2020-08-18 11:02:00 INFO: 2020-08-18 11:02:00 INFO: 2020-08-18 12:00:20 INFO: 2020-08-18 12:00:20 INFO: 2020-08-18 12:00:20 INFO: 2020-08-18 12:00:20 INFO: 2020-08-18 12:00:20 INFO: init new order start 2020-08-18 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 18, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 430.1, 'high': 431.25, 'low': 429.75, 'close': 430.8, 'trades': 1867, 'volume': 1309649, 'vwap': 430.53, 'lastSize': 189, 'turnover': 56383553215, 'homeNotional': 16065.19620696802, 'foreignNotional': 6916457.0659520095}, {'timestamp': datetime.datetime(2020, 8, 18, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 431.0, 'high': 431.0, 'low': 429.35, 'close': 430.1, 'trades': 1914, 'volume': 1152217, 'vwap': 430.16, 'lastSize': 179, 'turnover': 49563238395, 'homeNotional': 14119.60412251045, 'foreignNotional': 6073627.866675661}, {'timestamp': datetime.datetime(2020, 8, 18, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 429.1, 'high': 431.05, 'low': 427.4, 'close': 431.0, 'trades': 2931, 'volume': 2635682, 'vwap': 428.84, 'lastSize': 11820, 'turnover': 113026224975, 'homeNotional': 32244.574929782062, 'foreignNotional': 13827517.025518918}] 2020-08-18 12:00:20 INFO: prepare candles [CandleItem(low=429.75, high=431.25, open=430.1, close=430.8, color='GREEN'), CandleItem(low=429.35, high=431.0, open=431.0, close=430.1, color='RED'), CandleItem(low=427.4, high=431.05, open=429.1, close=431.0, color='GREEN')] 2020-08-18 12:00:20 INFO: skip by colors first_candle=CandleItem(low=427.4, high=431.05, open=429.1, close=431.0, color='GREEN') second_candle=CandleItem(low=429.35, high=431.0, open=431.0, close=430.1, color='RED') last_candle=CandleItem(low=429.75, high=431.25, open=430.1, close=430.8, color='GREEN') 2020-08-18 12:00:20 INFO: check need new order None 2020-08-18 12:00:20 INFO: init new order end 2020-08-18 12:00:20 INFO: 2020-08-18 12:00:20 INFO: 2020-08-18 12:00:20 INFO: 2020-08-18 12:00:20 INFO: 2020-08-18 12:02:00 INFO: 2020-08-18 12:02:00 INFO: 2020-08-18 12:02:00 INFO: 2020-08-18 12:02:00 INFO: 2020-08-18 12:02:00 INFO: clearing start 2020-08-18 12:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-18 12:02:00 INFO: skip by not found init order into storage 2020-08-18 12:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-18 12:02:00 INFO: skip by not found init order into storage 2020-08-18 12:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'a8082ef2-32d8-699c-003e-aebf619b99d6', 'clOrdID': 'd335bc46c0fa46d7bee5647b975aaea5', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 760, 'price': None, 'displayQty': None, 'stopPx': 441.0, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 760, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 17, 23, 10, 5, 220000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 17, 23, 10, 5, 220000, tzinfo=tzutc())} 2020-08-18 12:02:00 INFO: skip by not found init order into storage 2020-08-18 12:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '12e41506-f637-87a4-84ff-cd6e9e00e41e', 'clOrdID': '54c8ab45bb07493d9feddaaf21c5f30c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 760, 'price': 423.75, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 760, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 17, 23, 10, 6, 83000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 17, 23, 10, 6, 83000, tzinfo=tzutc())} 2020-08-18 12:02:00 INFO: skip by not found init order into storage 2020-08-18 12:02:00 INFO: clearing end 2020-08-18 12:02:00 INFO: 2020-08-18 12:02:00 INFO: 2020-08-18 12:02:00 INFO: 2020-08-18 12:02:00 INFO: 2020-08-18 13:00:20 INFO: 2020-08-18 13:00:20 INFO: 2020-08-18 13:00:20 INFO: 2020-08-18 13:00:20 INFO: 2020-08-18 13:00:20 INFO: init new order start 2020-08-18 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 18, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 430.8, 'high': 430.8, 'low': 428.65, 'close': 428.95, 'trades': 2187, 'volume': 1493451, 'vwap': 429.71, 'lastSize': 382, 'turnover': 64174571685, 'homeNotional': 18282.830002914878, 'foreignNotional': 7856260.09476584}, {'timestamp': datetime.datetime(2020, 8, 18, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 430.1, 'high': 431.25, 'low': 429.75, 'close': 430.8, 'trades': 1867, 'volume': 1309649, 'vwap': 430.53, 'lastSize': 189, 'turnover': 56383553215, 'homeNotional': 16065.19620696802, 'foreignNotional': 6916457.0659520095}, {'timestamp': datetime.datetime(2020, 8, 18, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 431.0, 'high': 431.0, 'low': 429.35, 'close': 430.1, 'trades': 1914, 'volume': 1152217, 'vwap': 430.16, 'lastSize': 179, 'turnover': 49563238395, 'homeNotional': 14119.60412251045, 'foreignNotional': 6073627.866675661}] 2020-08-18 13:00:20 INFO: prepare candles [CandleItem(low=428.65, high=430.8, open=430.8, close=428.95, color='RED'), CandleItem(low=429.75, high=431.25, open=430.1, close=430.8, color='GREEN'), CandleItem(low=429.35, high=431.0, open=431.0, close=430.1, color='RED')] 2020-08-18 13:00:20 INFO: skip by colors first_candle=CandleItem(low=429.35, high=431.0, open=431.0, close=430.1, color='RED') second_candle=CandleItem(low=429.75, high=431.25, open=430.1, close=430.8, color='GREEN') last_candle=CandleItem(low=428.65, high=430.8, open=430.8, close=428.95, color='RED') 2020-08-18 13:00:20 INFO: check need new order None 2020-08-18 13:00:20 INFO: init new order end 2020-08-18 13:00:20 INFO: 2020-08-18 13:00:20 INFO: 2020-08-18 13:00:20 INFO: 2020-08-18 13:00:20 INFO: 2020-08-18 13:02:00 INFO: 2020-08-18 13:02:00 INFO: 2020-08-18 13:02:00 INFO: 2020-08-18 13:02:00 INFO: 2020-08-18 13:02:00 INFO: clearing start 2020-08-18 13:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-18 13:02:00 INFO: skip by not found init order into storage 2020-08-18 13:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-18 13:02:00 INFO: skip by not found init order into storage 2020-08-18 13:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'a8082ef2-32d8-699c-003e-aebf619b99d6', 'clOrdID': 'd335bc46c0fa46d7bee5647b975aaea5', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 760, 'price': None, 'displayQty': None, 'stopPx': 441.0, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 760, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 17, 23, 10, 5, 220000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 17, 23, 10, 5, 220000, tzinfo=tzutc())} 2020-08-18 13:02:00 INFO: skip by not found init order into storage 2020-08-18 13:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '12e41506-f637-87a4-84ff-cd6e9e00e41e', 'clOrdID': '54c8ab45bb07493d9feddaaf21c5f30c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 760, 'price': 423.75, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 760, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 17, 23, 10, 6, 83000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 17, 23, 10, 6, 83000, tzinfo=tzutc())} 2020-08-18 13:02:00 INFO: skip by not found init order into storage 2020-08-18 13:02:00 INFO: clearing end 2020-08-18 13:02:00 INFO: 2020-08-18 13:02:00 INFO: 2020-08-18 13:02:00 INFO: 2020-08-18 13:02:00 INFO: 2020-08-18 14:00:20 INFO: 2020-08-18 14:00:20 INFO: 2020-08-18 14:00:20 INFO: 2020-08-18 14:00:20 INFO: 2020-08-18 14:00:20 INFO: init new order start 2020-08-18 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 18, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 428.95, 'high': 431.95, 'low': 428.75, 'close': 431.5, 'trades': 2924, 'volume': 2640996, 'vwap': 430.33, 'lastSize': 250, 'turnover': 113648443760, 'homeNotional': 32340.87700301462, 'foreignNotional': 13917121.494723799}, {'timestamp': datetime.datetime(2020, 8, 18, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 430.8, 'high': 430.8, 'low': 428.65, 'close': 428.95, 'trades': 2187, 'volume': 1493451, 'vwap': 429.71, 'lastSize': 382, 'turnover': 64174571685, 'homeNotional': 18282.830002914878, 'foreignNotional': 7856260.09476584}, {'timestamp': datetime.datetime(2020, 8, 18, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 430.1, 'high': 431.25, 'low': 429.75, 'close': 430.8, 'trades': 1867, 'volume': 1309649, 'vwap': 430.53, 'lastSize': 189, 'turnover': 56383553215, 'homeNotional': 16065.19620696802, 'foreignNotional': 6916457.0659520095}] 2020-08-18 14:00:20 INFO: prepare candles [CandleItem(low=428.75, high=431.95, open=428.95, close=431.5, color='GREEN'), CandleItem(low=428.65, high=430.8, open=430.8, close=428.95, color='RED'), CandleItem(low=429.75, high=431.25, open=430.1, close=430.8, color='GREEN')] 2020-08-18 14:00:20 INFO: skip by colors first_candle=CandleItem(low=429.75, high=431.25, open=430.1, close=430.8, color='GREEN') second_candle=CandleItem(low=428.65, high=430.8, open=430.8, close=428.95, color='RED') last_candle=CandleItem(low=428.75, high=431.95, open=428.95, close=431.5, color='GREEN') 2020-08-18 14:00:20 INFO: check need new order None 2020-08-18 14:00:20 INFO: init new order end 2020-08-18 14:00:20 INFO: 2020-08-18 14:00:20 INFO: 2020-08-18 14:00:20 INFO: 2020-08-18 14:00:20 INFO: 2020-08-18 14:02:00 INFO: 2020-08-18 14:02:00 INFO: 2020-08-18 14:02:00 INFO: 2020-08-18 14:02:00 INFO: 2020-08-18 14:02:00 INFO: clearing start 2020-08-18 14:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-18 14:02:00 INFO: skip by not found init order into storage 2020-08-18 14:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-18 14:02:00 INFO: skip by not found init order into storage 2020-08-18 14:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'a8082ef2-32d8-699c-003e-aebf619b99d6', 'clOrdID': 'd335bc46c0fa46d7bee5647b975aaea5', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 760, 'price': None, 'displayQty': None, 'stopPx': 441.0, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 760, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 17, 23, 10, 5, 220000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 17, 23, 10, 5, 220000, tzinfo=tzutc())} 2020-08-18 14:02:00 INFO: skip by not found init order into storage 2020-08-18 14:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '12e41506-f637-87a4-84ff-cd6e9e00e41e', 'clOrdID': '54c8ab45bb07493d9feddaaf21c5f30c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 760, 'price': 423.75, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 760, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 17, 23, 10, 6, 83000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 17, 23, 10, 6, 83000, tzinfo=tzutc())} 2020-08-18 14:02:00 INFO: skip by not found init order into storage 2020-08-18 14:02:00 INFO: clearing end 2020-08-18 14:02:00 INFO: 2020-08-18 14:02:00 INFO: 2020-08-18 14:02:00 INFO: 2020-08-18 14:02:00 INFO: 2020-08-18 15:00:20 INFO: 2020-08-18 15:00:20 INFO: 2020-08-18 15:00:20 INFO: 2020-08-18 15:00:20 INFO: 2020-08-18 15:00:20 INFO: init new order start 2020-08-18 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 18, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 431.5, 'high': 431.7, 'low': 426.45, 'close': 427.0, 'trades': 3476, 'volume': 2479298, 'vwap': 429.26, 'lastSize': 92, 'turnover': 106425080395, 'homeNotional': 30312.50534231185, 'foreignNotional': 13011874.264369814}, {'timestamp': datetime.datetime(2020, 8, 18, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 428.95, 'high': 431.95, 'low': 428.75, 'close': 431.5, 'trades': 2924, 'volume': 2640996, 'vwap': 430.33, 'lastSize': 250, 'turnover': 113648443760, 'homeNotional': 32340.87700301462, 'foreignNotional': 13917121.494723799}, {'timestamp': datetime.datetime(2020, 8, 18, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 430.8, 'high': 430.8, 'low': 428.65, 'close': 428.95, 'trades': 2187, 'volume': 1493451, 'vwap': 429.71, 'lastSize': 382, 'turnover': 64174571685, 'homeNotional': 18282.830002914878, 'foreignNotional': 7856260.09476584}] 2020-08-18 15:00:20 INFO: prepare candles [CandleItem(low=426.45, high=431.7, open=431.5, close=427.0, color='RED'), CandleItem(low=428.75, high=431.95, open=428.95, close=431.5, color='GREEN'), CandleItem(low=428.65, high=430.8, open=430.8, close=428.95, color='RED')] 2020-08-18 15:00:20 INFO: skip by colors first_candle=CandleItem(low=428.65, high=430.8, open=430.8, close=428.95, color='RED') second_candle=CandleItem(low=428.75, high=431.95, open=428.95, close=431.5, color='GREEN') last_candle=CandleItem(low=426.45, high=431.7, open=431.5, close=427.0, color='RED') 2020-08-18 15:00:20 INFO: check need new order None 2020-08-18 15:00:20 INFO: init new order end 2020-08-18 15:00:20 INFO: 2020-08-18 15:00:20 INFO: 2020-08-18 15:00:20 INFO: 2020-08-18 15:00:20 INFO: 2020-08-18 15:02:00 INFO: 2020-08-18 15:02:00 INFO: 2020-08-18 15:02:00 INFO: 2020-08-18 15:02:00 INFO: 2020-08-18 15:02:00 INFO: clearing start 2020-08-18 15:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-18 15:02:00 INFO: skip by not found init order into storage 2020-08-18 15:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-18 15:02:00 INFO: skip by not found init order into storage 2020-08-18 15:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'a8082ef2-32d8-699c-003e-aebf619b99d6', 'clOrdID': 'd335bc46c0fa46d7bee5647b975aaea5', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 760, 'price': None, 'displayQty': None, 'stopPx': 441.0, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 760, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 17, 23, 10, 5, 220000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 17, 23, 10, 5, 220000, tzinfo=tzutc())} 2020-08-18 15:02:00 INFO: skip by not found init order into storage 2020-08-18 15:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '12e41506-f637-87a4-84ff-cd6e9e00e41e', 'clOrdID': '54c8ab45bb07493d9feddaaf21c5f30c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 760, 'price': 423.75, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 760, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 17, 23, 10, 6, 83000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 17, 23, 10, 6, 83000, tzinfo=tzutc())} 2020-08-18 15:02:00 INFO: skip by not found init order into storage 2020-08-18 15:02:00 INFO: clearing end 2020-08-18 15:02:00 INFO: 2020-08-18 15:02:00 INFO: 2020-08-18 15:02:00 INFO: 2020-08-18 15:02:00 INFO: 2020-08-18 16:00:20 INFO: 2020-08-18 16:00:20 INFO: 2020-08-18 16:00:20 INFO: 2020-08-18 16:00:20 INFO: 2020-08-18 16:00:20 INFO: init new order start 2020-08-18 16:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 18, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 427.0, 'high': 430.9, 'low': 427.0, 'close': 430.0, 'trades': 4009, 'volume': 3129225, 'vwap': 429.27, 'lastSize': 20, 'turnover': 134325182450, 'homeNotional': 38211.35044284215, 'foreignNotional': 16402659.24183389}, {'timestamp': datetime.datetime(2020, 8, 18, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 431.5, 'high': 431.7, 'low': 426.45, 'close': 427.0, 'trades': 3476, 'volume': 2479298, 'vwap': 429.26, 'lastSize': 92, 'turnover': 106425080395, 'homeNotional': 30312.50534231185, 'foreignNotional': 13011874.264369814}, {'timestamp': datetime.datetime(2020, 8, 18, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 428.95, 'high': 431.95, 'low': 428.75, 'close': 431.5, 'trades': 2924, 'volume': 2640996, 'vwap': 430.33, 'lastSize': 250, 'turnover': 113648443760, 'homeNotional': 32340.87700301462, 'foreignNotional': 13917121.494723799}] 2020-08-18 16:00:20 INFO: prepare candles [CandleItem(low=427.0, high=430.9, open=427.0, close=430.0, color='GREEN'), CandleItem(low=426.45, high=431.7, open=431.5, close=427.0, color='RED'), CandleItem(low=428.75, high=431.95, open=428.95, close=431.5, color='GREEN')] 2020-08-18 16:00:20 INFO: skip by colors first_candle=CandleItem(low=428.75, high=431.95, open=428.95, close=431.5, color='GREEN') second_candle=CandleItem(low=426.45, high=431.7, open=431.5, close=427.0, color='RED') last_candle=CandleItem(low=427.0, high=430.9, open=427.0, close=430.0, color='GREEN') 2020-08-18 16:00:20 INFO: check need new order None 2020-08-18 16:00:20 INFO: init new order end 2020-08-18 16:00:20 INFO: 2020-08-18 16:00:20 INFO: 2020-08-18 16:00:20 INFO: 2020-08-18 16:00:20 INFO: 2020-08-18 16:02:00 INFO: 2020-08-18 16:02:00 INFO: 2020-08-18 16:02:00 INFO: 2020-08-18 16:02:00 INFO: 2020-08-18 16:02:00 INFO: clearing start 2020-08-18 16:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-18 16:02:00 INFO: skip by not found init order into storage 2020-08-18 16:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-18 16:02:00 INFO: skip by not found init order into storage 2020-08-18 16:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'a8082ef2-32d8-699c-003e-aebf619b99d6', 'clOrdID': 'd335bc46c0fa46d7bee5647b975aaea5', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 760, 'price': None, 'displayQty': None, 'stopPx': 441.0, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 760, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 17, 23, 10, 5, 220000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 17, 23, 10, 5, 220000, tzinfo=tzutc())} 2020-08-18 16:02:00 INFO: skip by not found init order into storage 2020-08-18 16:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '12e41506-f637-87a4-84ff-cd6e9e00e41e', 'clOrdID': '54c8ab45bb07493d9feddaaf21c5f30c', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 760, 'price': 423.75, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 760, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 17, 23, 10, 6, 83000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 17, 23, 10, 6, 83000, tzinfo=tzutc())} 2020-08-18 16:02:00 INFO: skip by not found init order into storage 2020-08-18 16:02:00 INFO: clearing end 2020-08-18 16:02:00 INFO: 2020-08-18 16:02:00 INFO: 2020-08-18 16:02:00 INFO: 2020-08-18 16:02:00 INFO: 2020-08-18 16:55:27 INFO: process event {'orderID': '12e41506-f637-87a4-84ff-cd6e9e00e41e', 'ordStatus': 'Filled', 'workingIndicator': False, 'leavesQty': 0, 'cumQty': 760, 'avgPx': 423.75, 'timestamp': '2020-08-18T13:55:25.970Z', 'clOrdID': '54c8ab45bb07493d9feddaaf21c5f30c', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-18 16:55:27 INFO: add new event={'uid': '54c8ab45bb07493d9feddaaf21c5f30c', 'status': 'Filled'} 2020-08-18 16:55:28 INFO: 2020-08-18 16:55:28 INFO: 2020-08-18 16:55:28 INFO: 2020-08-18 16:55:28 INFO: 2020-08-18 16:55:28 INFO: process event start 2020-08-18 16:55:28 INFO: fetch new order event 54c8ab45bb07493d9feddaaf21c5f30c 2020-08-18 16:55:28 INFO: fetch orders by event init=None profit_pair=d335bc46c0fa46d7bee5647b975aaea5 2020-08-18 16:55:28 INFO: process profit order filled 2020-08-18 16:55:31 INFO: cancel order=d335bc46c0fa46d7bee5647b975aaea5 [{'orderID': 'a8082ef2-32d8-699c-003e-aebf619b99d6', 'clOrdID': 'd335bc46c0fa46d7bee5647b975aaea5', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 760, 'price': None, 'displayQty': None, 'stopPx': 441.0, '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, 17, 23, 10, 5, 220000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 13, 55, 31, 591000, tzinfo=tzutc())}] 2020-08-18 16:55:31 INFO: end process event_processing_result='proceed profit order' 2020-08-18 16:55:31 INFO: 2020-08-18 16:55:31 INFO: 2020-08-18 16:55:31 INFO: 2020-08-18 16:55:31 INFO: 2020-08-18 16:55:31 INFO: process event {'orderID': 'a8082ef2-32d8-699c-003e-aebf619b99d6', 'ordStatus': 'Canceled', 'leavesQty': 0, 'text': 'Canceled: Cancel order by trader.py\nStop order by trader.py', 'timestamp': '2020-08-18T13:55:31.591Z', 'clOrdID': 'd335bc46c0fa46d7bee5647b975aaea5', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-18 16:55:31 INFO: skip event d335bc46c0fa46d7bee5647b975aaea5 Canceled 2020-08-18 17:00:20 INFO: 2020-08-18 17:00:20 INFO: 2020-08-18 17:00:20 INFO: 2020-08-18 17:00:20 INFO: 2020-08-18 17:00:20 INFO: init new order start 2020-08-18 17:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 18, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 430.0, 'high': 430.75, 'low': 422.05, 'close': 426.65, 'trades': 7345, 'volume': 6253495, 'vwap': 426.54, 'lastSize': 1200, 'turnover': 266735068165, 'homeNotional': 76180.89369403875, 'foreignNotional': 32494531.546316247}, {'timestamp': datetime.datetime(2020, 8, 18, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 427.0, 'high': 430.9, 'low': 427.0, 'close': 430.0, 'trades': 4009, 'volume': 3129225, 'vwap': 429.27, 'lastSize': 20, 'turnover': 134325182450, 'homeNotional': 38211.35044284215, 'foreignNotional': 16402659.24183389}, {'timestamp': datetime.datetime(2020, 8, 18, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 431.5, 'high': 431.7, 'low': 426.45, 'close': 427.0, 'trades': 3476, 'volume': 2479298, 'vwap': 429.26, 'lastSize': 92, 'turnover': 106425080395, 'homeNotional': 30312.50534231185, 'foreignNotional': 13011874.264369814}] 2020-08-18 17:00:21 INFO: prepare candles [CandleItem(low=422.05, high=430.75, open=430.0, close=426.65, color='RED'), CandleItem(low=427.0, high=430.9, open=427.0, close=430.0, color='GREEN'), CandleItem(low=426.45, high=431.7, open=431.5, close=427.0, color='RED')] 2020-08-18 17:00:21 INFO: skip by colors first_candle=CandleItem(low=426.45, high=431.7, open=431.5, close=427.0, color='RED') second_candle=CandleItem(low=427.0, high=430.9, open=427.0, close=430.0, color='GREEN') last_candle=CandleItem(low=422.05, high=430.75, open=430.0, close=426.65, color='RED') 2020-08-18 17:00:21 INFO: check need new order None 2020-08-18 17:00:21 INFO: init new order end 2020-08-18 17:00:21 INFO: 2020-08-18 17:00:21 INFO: 2020-08-18 17:00:21 INFO: 2020-08-18 17:00:21 INFO: 2020-08-18 17:02:00 INFO: 2020-08-18 17:02:00 INFO: 2020-08-18 17:02:00 INFO: 2020-08-18 17:02:00 INFO: 2020-08-18 17:02:00 INFO: clearing start 2020-08-18 17:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-18 17:02:00 INFO: skip by not found init order into storage 2020-08-18 17:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-18 17:02:00 INFO: skip by not found init order into storage 2020-08-18 17:02:00 INFO: clearing end 2020-08-18 17:02:00 INFO: 2020-08-18 17:02:00 INFO: 2020-08-18 17:02:00 INFO: 2020-08-18 17:02:00 INFO: 2020-08-18 18:00:20 INFO: 2020-08-18 18:00:20 INFO: 2020-08-18 18:00:20 INFO: 2020-08-18 18:00:20 INFO: 2020-08-18 18:00:20 INFO: init new order start 2020-08-18 18:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 18, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 426.65, 'high': 427.9, 'low': 413.8, 'close': 422.55, 'trades': 17871, 'volume': 14135695, 'vwap': 420.58, 'lastSize': 13, 'turnover': 594507904885, 'homeNotional': 169219.22340946924, 'foreignNotional': 71171881.15752085}, {'timestamp': datetime.datetime(2020, 8, 18, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 430.0, 'high': 430.75, 'low': 422.05, 'close': 426.65, 'trades': 7345, 'volume': 6253495, 'vwap': 426.54, 'lastSize': 1200, 'turnover': 266735068165, 'homeNotional': 76180.89369403875, 'foreignNotional': 32494531.546316247}, {'timestamp': datetime.datetime(2020, 8, 18, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 427.0, 'high': 430.9, 'low': 427.0, 'close': 430.0, 'trades': 4009, 'volume': 3129225, 'vwap': 429.27, 'lastSize': 20, 'turnover': 134325182450, 'homeNotional': 38211.35044284215, 'foreignNotional': 16402659.24183389}] 2020-08-18 18:00:20 INFO: prepare candles [CandleItem(low=413.8, high=427.9, open=426.65, close=422.55, color='RED'), CandleItem(low=422.05, high=430.75, open=430.0, close=426.65, color='RED'), CandleItem(low=427.0, high=430.9, open=427.0, close=430.0, color='GREEN')] 2020-08-18 18:00:20 INFO: skip by colors first_candle=CandleItem(low=427.0, high=430.9, open=427.0, close=430.0, color='GREEN') second_candle=CandleItem(low=422.05, high=430.75, open=430.0, close=426.65, color='RED') last_candle=CandleItem(low=413.8, high=427.9, open=426.65, close=422.55, color='RED') 2020-08-18 18:00:20 INFO: check need new order None 2020-08-18 18:00:20 INFO: init new order end 2020-08-18 18:00:20 INFO: 2020-08-18 18:00:20 INFO: 2020-08-18 18:00:20 INFO: 2020-08-18 18:00:20 INFO: 2020-08-18 18:02:00 INFO: 2020-08-18 18:02:00 INFO: 2020-08-18 18:02:00 INFO: 2020-08-18 18:02:00 INFO: 2020-08-18 18:02:00 INFO: clearing start 2020-08-18 18:02:01 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-18 18:02:01 INFO: skip by not found init order into storage 2020-08-18 18:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-18 18:02:01 INFO: skip by not found init order into storage 2020-08-18 18:02:01 INFO: clearing end 2020-08-18 18:02:01 INFO: 2020-08-18 18:02:01 INFO: 2020-08-18 18:02:01 INFO: 2020-08-18 18:02:01 INFO: 2020-08-18 19:00:20 INFO: 2020-08-18 19:00:20 INFO: 2020-08-18 19:00:20 INFO: 2020-08-18 19:00:20 INFO: 2020-08-18 19:00:20 INFO: init new order start 2020-08-18 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 18, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 422.55, 'high': 425.4, 'low': 420.25, 'close': 420.55, 'trades': 6625, 'volume': 5123594, 'vwap': 423.02, 'lastSize': 152, 'turnover': 216738038120, 'homeNotional': 61336.42925366939, 'foreignNotional': 25946681.368096355}, {'timestamp': datetime.datetime(2020, 8, 18, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 426.65, 'high': 427.9, 'low': 413.8, 'close': 422.55, 'trades': 17871, 'volume': 14135695, 'vwap': 420.58, 'lastSize': 13, 'turnover': 594507904885, 'homeNotional': 169219.22340946924, 'foreignNotional': 71171881.15752085}, {'timestamp': datetime.datetime(2020, 8, 18, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 430.0, 'high': 430.75, 'low': 422.05, 'close': 426.65, 'trades': 7345, 'volume': 6253495, 'vwap': 426.54, 'lastSize': 1200, 'turnover': 266735068165, 'homeNotional': 76180.89369403875, 'foreignNotional': 32494531.546316247}] 2020-08-18 19:00:20 INFO: prepare candles [CandleItem(low=420.25, high=425.4, open=422.55, close=420.55, color='RED'), CandleItem(low=413.8, high=427.9, open=426.65, close=422.55, color='RED'), CandleItem(low=422.05, high=430.75, open=430.0, close=426.65, color='RED')] 2020-08-18 19:00:20 INFO: skip by colors first_candle=CandleItem(low=422.05, high=430.75, open=430.0, close=426.65, color='RED') second_candle=CandleItem(low=413.8, high=427.9, open=426.65, close=422.55, color='RED') last_candle=CandleItem(low=420.25, high=425.4, open=422.55, close=420.55, color='RED') 2020-08-18 19:00:20 INFO: check need new order None 2020-08-18 19:00:20 INFO: init new order end 2020-08-18 19:00:20 INFO: 2020-08-18 19:00:20 INFO: 2020-08-18 19:00:20 INFO: 2020-08-18 19:00:20 INFO: 2020-08-18 19:02:00 INFO: 2020-08-18 19:02:00 INFO: 2020-08-18 19:02:00 INFO: 2020-08-18 19:02:00 INFO: 2020-08-18 19:02:00 INFO: clearing start 2020-08-18 19:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-18 19:02:00 INFO: skip by not found init order into storage 2020-08-18 19:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-18 19:02:00 INFO: skip by not found init order into storage 2020-08-18 19:02:00 INFO: clearing end 2020-08-18 19:02:00 INFO: 2020-08-18 19:02:00 INFO: 2020-08-18 19:02:00 INFO: 2020-08-18 19:02:00 INFO: 2020-08-18 20:00:20 INFO: 2020-08-18 20:00:20 INFO: 2020-08-18 20:00:20 INFO: 2020-08-18 20:00:20 INFO: 2020-08-18 20:00:20 INFO: init new order start 2020-08-18 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 18, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 420.55, 'high': 424.65, 'low': 416.5, 'close': 423.95, 'trades': 7736, 'volume': 6832076, 'vwap': 420.29, 'lastSize': 174, 'turnover': 287143674230, 'homeNotional': 81548.92158897003, 'foreignNotional': 34274466.63184889}, {'timestamp': datetime.datetime(2020, 8, 18, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 422.55, 'high': 425.4, 'low': 420.25, 'close': 420.55, 'trades': 6625, 'volume': 5123594, 'vwap': 423.02, 'lastSize': 152, 'turnover': 216738038120, 'homeNotional': 61336.42925366939, 'foreignNotional': 25946681.368096355}, {'timestamp': datetime.datetime(2020, 8, 18, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 426.65, 'high': 427.9, 'low': 413.8, 'close': 422.55, 'trades': 17871, 'volume': 14135695, 'vwap': 420.58, 'lastSize': 13, 'turnover': 594507904885, 'homeNotional': 169219.22340946924, 'foreignNotional': 71171881.15752085}] 2020-08-18 20:00:20 INFO: prepare candles [CandleItem(low=416.5, high=424.65, open=420.55, close=423.95, color='GREEN'), CandleItem(low=420.25, high=425.4, open=422.55, close=420.55, color='RED'), CandleItem(low=413.8, high=427.9, open=426.65, close=422.55, color='RED')] 2020-08-18 20:00:20 INFO: last_candle=CandleItem(low=416.5, high=424.65, open=420.55, close=423.95, color='GREEN') 2020-08-18 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-18 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=416.5, high=424.65, open=420.55, close=423.95, color='GREEN') 2020-08-18 20:00:20 INFO: skip by CandleItem(low=416.5, high=424.65, open=420.55, close=423.95, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-18 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-18 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=416.5, high=424.65, open=420.55, close=423.95, color='GREEN') 2020-08-18 20:00:20 INFO: apply filter None to candle=CandleItem(low=420.25, high=425.4, open=422.55, close=420.55, color='RED') 2020-08-18 20:00:20 INFO: apply filter None to candle=CandleItem(low=413.8, high=427.9, open=426.65, close=422.55, color='RED') 2020-08-18 20:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=416.5, high=424.65, open=420.55, close=423.95, color='GREEN'), take_profit_factor=5.0, clearing_interval=3600) 2020-08-18 20:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=416.5, high=424.65, open=420.55, close=423.95, color='GREEN'), take_profit_factor=5.0, clearing_interval=3600) 2020-08-18 20:00:20 INFO: place order: start candle=CandleItem(low=416.5, high=424.65, open=420.55, close=423.95, color='GREEN') ticker='ETHUSD' price_offset=0.1 2020-08-18 20:00:20 INFO: place order: side_factor=-1 init_trigger_price=424.7 init_order_price=424.75 stop_price_offset=0.0 candle.size=8.149999999999977 stop_price=416.5 take_price=465.4999999999999 2020-08-18 20:00:20 INFO: place order round: side_factor=-1 init_trigger_price=Decimal('424.69999999999998863131622783839702606201171875') init_order_price=Decimal('424.75') stop_price_offset=0.0 candle.size=8.149999999999977 stop_price=Decimal('416.5') take_price=Decimal('465.4999999999998863131622783839702606201171875') 2020-08-18 20:00:20 INFO: place order: compute qty=232 2020-08-18 20:00:20 INFO: place order: save order to db 4cdcfaac983d46ce8ae9cf34fb0251ff; response=True 2020-08-18 20:00:20 INFO: process event {'orderID': 'a56739af-79c4-fdf8-4798-9cd2263670ae', 'clOrdID': '4cdcfaac983d46ce8ae9cf34fb0251ff', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 232, 'price': 424.75, 'displayQty': None, 'stopPx': 424.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-08-18T17:00:20.262Z', 'timestamp': '2020-08-18T17:00:20.262Z'} 2020-08-18 20:00:20 INFO: skip event 4cdcfaac983d46ce8ae9cf34fb0251ff New 2020-08-18 20:00:20 INFO: post order to exchange resp={'orderID': 'a56739af-79c4-fdf8-4798-9cd2263670ae', 'clOrdID': '4cdcfaac983d46ce8ae9cf34fb0251ff', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 232, 'price': 424.75, 'displayQty': None, 'stopPx': 424.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 18, 17, 0, 20, 262000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 17, 0, 20, 262000, tzinfo=tzutc())} 2020-08-18 20:00:20 INFO: place new init order {'qty': 232, 'init_price': Decimal('424.69999999999998863131622783839702606201171875'), 'stop_price': Decimal('416.5'), 'take_price': Decimal('465.4999999999998863131622783839702606201171875'), 'order_uid': '4cdcfaac983d46ce8ae9cf34fb0251ff', 'response': {'orderID': 'a56739af-79c4-fdf8-4798-9cd2263670ae', 'clOrdID': '4cdcfaac983d46ce8ae9cf34fb0251ff', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 232, 'price': 424.75, 'displayQty': None, 'stopPx': 424.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 18, 17, 0, 20, 262000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 17, 0, 20, 262000, tzinfo=tzutc())}} 2020-08-18 20:00:20 INFO: init new order end 2020-08-18 20:00:20 INFO: 2020-08-18 20:00:20 INFO: 2020-08-18 20:00:20 INFO: 2020-08-18 20:00:20 INFO: 2020-08-18 20:02:00 INFO: 2020-08-18 20:02:00 INFO: 2020-08-18 20:02:00 INFO: 2020-08-18 20:02:00 INFO: 2020-08-18 20:02:00 INFO: clearing start 2020-08-18 20:02:01 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-18 20:02:01 INFO: skip by not found init order into storage 2020-08-18 20:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-18 20:02:01 INFO: skip by not found init order into storage 2020-08-18 20:02:01 INFO: fetch_orders_for_clearing test order {'orderID': 'a56739af-79c4-fdf8-4798-9cd2263670ae', 'clOrdID': '4cdcfaac983d46ce8ae9cf34fb0251ff', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 232, 'price': 424.75, 'displayQty': None, 'stopPx': 424.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 18, 17, 0, 20, 262000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 17, 0, 20, 262000, tzinfo=tzutc())} 2020-08-18 20:02:01 INFO: order time=2020-08-18 17:00:20.262000+00:00; delta from now UTC=0:01:40.816313 time_delta.total_seconds()=100.816313; time_diff_offset='3600' 2020-08-18 20:02:01 INFO: skip by time diff 2020-08-18 17:00:20.262000+00:00 2020-08-18 20:02:01 INFO: clearing end 2020-08-18 20:02:01 INFO: 2020-08-18 20:02:01 INFO: 2020-08-18 20:02:01 INFO: 2020-08-18 20:02:01 INFO: 2020-08-18 20:10:01 INFO: process event {'orderID': 'a56739af-79c4-fdf8-4798-9cd2263670ae', 'triggered': 'StopOrderTriggered', 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'timestamp': '2020-08-18T17:10:01.576Z', 'clOrdID': '4cdcfaac983d46ce8ae9cf34fb0251ff', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-18 20:10:01 INFO: skip event 4cdcfaac983d46ce8ae9cf34fb0251ff 2020-08-18 20:10:01 INFO: process event {'orderID': 'a56739af-79c4-fdf8-4798-9cd2263670ae', 'ordStatus': 'Filled', 'leavesQty': 0, 'cumQty': 232, 'avgPx': 424.7, 'transactTime': '2020-08-18T17:10:01.576Z', 'clOrdID': '4cdcfaac983d46ce8ae9cf34fb0251ff', 'account': 605536, 'symbol': 'ETHUSD', 'timestamp': '2020-08-18T17:10:01.576Z'} 2020-08-18 20:10:01 INFO: add new event={'uid': '4cdcfaac983d46ce8ae9cf34fb0251ff', 'status': 'Filled'} 2020-08-18 20:10:01 INFO: 2020-08-18 20:10:01 INFO: 2020-08-18 20:10:01 INFO: 2020-08-18 20:10:01 INFO: 2020-08-18 20:10:01 INFO: process event start 2020-08-18 20:10:01 INFO: fetch new order event 4cdcfaac983d46ce8ae9cf34fb0251ff 2020-08-18 20:10:01 INFO: fetch orders by event init={'stop': '416.5', 'take': '465.4999999999998863131622783839702606201171875', 'qty': '232', 'color': 'GREEN', 'ticker': 'ETHUSD', 'clearing_offset': '3600'} profit_pair=None 2020-08-18 20:10:01 INFO: process init order filled 2020-08-18 20:10:01 INFO: save profit orders to storage stop=7765c75107f8470983eb6d01c3cf125e take=312a919427914511a225e24287cbd8ce 2020-08-18 20:10:01 INFO: place profit orders take_price=465.4999999999998863131622783839702606201171875, stop_price=416.5, qty=232, color=GREEN, ticker=ETHUSD 7765c75107f8470983eb6d01c3cf125e 312a919427914511a225e24287cbd8ce 2020-08-18 20:10:01 INFO: place stop order ETHUSD: qty=-232, stop_price=416.5, stop_uid=7765c75107f8470983eb6d01c3cf125e 2020-08-18 20:10:01 INFO: process event {'orderID': '29dca35f-8f05-1e43-2813-419d07ee8535', 'clOrdID': '7765c75107f8470983eb6d01c3cf125e', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 232, 'price': None, 'displayQty': None, 'stopPx': 416.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': '2020-08-18T17:10:01.824Z', 'timestamp': '2020-08-18T17:10:01.824Z'} 2020-08-18 20:10:01 INFO: skip event 7765c75107f8470983eb6d01c3cf125e New 2020-08-18 20:10:01 INFO: exchange resp for stop order={'orderID': '29dca35f-8f05-1e43-2813-419d07ee8535', 'clOrdID': '7765c75107f8470983eb6d01c3cf125e', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 232, 'price': None, 'displayQty': None, 'stopPx': 416.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 17, 10, 1, 824000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 17, 10, 1, 824000, tzinfo=tzutc())} 2020-08-18 20:10:01 INFO: place limit order ETHUSD: qty=-232, price=465.4999999999998863131622783839702606201171875, take_uid=312a919427914511a225e24287cbd8ce 2020-08-18 20:10:01 INFO: process event {'orderID': '26a12c69-08c2-0301-c2fe-8f55eadd3988', 'clOrdID': '312a919427914511a225e24287cbd8ce', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 232, 'price': 465.5, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': '2020-08-18T17:10:01.866Z', 'timestamp': '2020-08-18T17:10:01.866Z'} 2020-08-18 20:10:01 INFO: skip event 312a919427914511a225e24287cbd8ce New 2020-08-18 20:10:01 INFO: process event {'orderID': '26a12c69-08c2-0301-c2fe-8f55eadd3988', 'workingIndicator': True, 'clOrdID': '312a919427914511a225e24287cbd8ce', 'account': 605536, 'symbol': 'ETHUSD', 'timestamp': '2020-08-18T17:10:01.866Z'} 2020-08-18 20:10:01 INFO: skip event 312a919427914511a225e24287cbd8ce 2020-08-18 20:10:01 INFO: exchange resp for take profit order={'orderID': '26a12c69-08c2-0301-c2fe-8f55eadd3988', 'clOrdID': '312a919427914511a225e24287cbd8ce', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 232, 'price': 465.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 17, 10, 1, 866000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 17, 10, 1, 866000, tzinfo=tzutc())} 2020-08-18 20:10:01 INFO: place profit orders={'stop': {'response': {'orderID': '29dca35f-8f05-1e43-2813-419d07ee8535', 'clOrdID': '7765c75107f8470983eb6d01c3cf125e', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 232, 'price': None, 'displayQty': None, 'stopPx': 416.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 17, 10, 1, 824000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 17, 10, 1, 824000, tzinfo=tzutc())}, 'qty': Decimal('-232'), 'uid': '7765c75107f8470983eb6d01c3cf125e', 'price': Decimal('416.5')}, 'take': {'response': {'orderID': '26a12c69-08c2-0301-c2fe-8f55eadd3988', 'clOrdID': '312a919427914511a225e24287cbd8ce', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 232, 'price': 465.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 17, 10, 1, 866000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 17, 10, 1, 866000, tzinfo=tzutc())}, 'qty': Decimal('-232'), 'uid': '312a919427914511a225e24287cbd8ce', 'price': Decimal('465.4999999999998863131622783839702606201171875')}} 2020-08-18 20:10:01 INFO: rm init order from db 4cdcfaac983d46ce8ae9cf34fb0251ff 2020-08-18 20:10:01 INFO: end process event_processing_result='proceed init order' 2020-08-18 20:10:01 INFO: 2020-08-18 20:10:01 INFO: 2020-08-18 20:10:01 INFO: 2020-08-18 20:10:01 INFO: 2020-08-18 21:00:20 INFO: 2020-08-18 21:00:20 INFO: 2020-08-18 21:00:20 INFO: 2020-08-18 21:00:20 INFO: 2020-08-18 21:00:20 INFO: init new order start 2020-08-18 21:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 18, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 423.95, 'high': 425.2, 'low': 422.25, 'close': 423.45, 'trades': 2976, 'volume': 1676176, 'vwap': 423.78, 'lastSize': 1, 'turnover': 71031417775, 'homeNotional': 20126.851808344327, 'foreignNotional': 8529184.299375277}, {'timestamp': datetime.datetime(2020, 8, 18, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 420.55, 'high': 424.65, 'low': 416.5, 'close': 423.95, 'trades': 7736, 'volume': 6832076, 'vwap': 420.29, 'lastSize': 174, 'turnover': 287143674230, 'homeNotional': 81548.92158897003, 'foreignNotional': 34274466.63184889}, {'timestamp': datetime.datetime(2020, 8, 18, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 422.55, 'high': 425.4, 'low': 420.25, 'close': 420.55, 'trades': 6625, 'volume': 5123594, 'vwap': 423.02, 'lastSize': 152, 'turnover': 216738038120, 'homeNotional': 61336.42925366939, 'foreignNotional': 25946681.368096355}] 2020-08-18 21:00:21 INFO: prepare candles [CandleItem(low=422.25, high=425.2, open=423.95, close=423.45, color='RED'), CandleItem(low=416.5, high=424.65, open=420.55, close=423.95, color='GREEN'), CandleItem(low=420.25, high=425.4, open=422.55, close=420.55, color='RED')] 2020-08-18 21:00:21 INFO: skip by colors first_candle=CandleItem(low=420.25, high=425.4, open=422.55, close=420.55, color='RED') second_candle=CandleItem(low=416.5, high=424.65, open=420.55, close=423.95, color='GREEN') last_candle=CandleItem(low=422.25, high=425.2, open=423.95, close=423.45, color='RED') 2020-08-18 21:00:21 INFO: check need new order None 2020-08-18 21:00:21 INFO: init new order end 2020-08-18 21:00:21 INFO: 2020-08-18 21:00:21 INFO: 2020-08-18 21:00:21 INFO: 2020-08-18 21:00:21 INFO: 2020-08-18 21:02:00 INFO: 2020-08-18 21:02:00 INFO: 2020-08-18 21:02:00 INFO: 2020-08-18 21:02:00 INFO: 2020-08-18 21:02:00 INFO: clearing start 2020-08-18 21:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-18 21:02:00 INFO: skip by not found init order into storage 2020-08-18 21:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-18 21:02:00 INFO: skip by not found init order into storage 2020-08-18 21:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '29dca35f-8f05-1e43-2813-419d07ee8535', 'clOrdID': '7765c75107f8470983eb6d01c3cf125e', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 232, 'price': None, 'displayQty': None, 'stopPx': 416.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 17, 10, 1, 824000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 17, 10, 1, 824000, tzinfo=tzutc())} 2020-08-18 21:02:00 INFO: skip by not found init order into storage 2020-08-18 21:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '26a12c69-08c2-0301-c2fe-8f55eadd3988', 'clOrdID': '312a919427914511a225e24287cbd8ce', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 232, 'price': 465.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 17, 10, 1, 866000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 17, 10, 1, 866000, tzinfo=tzutc())} 2020-08-18 21:02:00 INFO: skip by not found init order into storage 2020-08-18 21:02:00 INFO: clearing end 2020-08-18 21:02:00 INFO: 2020-08-18 21:02:00 INFO: 2020-08-18 21:02:00 INFO: 2020-08-18 21:02:00 INFO: 2020-08-18 22:00:20 INFO: 2020-08-18 22:00:20 INFO: 2020-08-18 22:00:20 INFO: 2020-08-18 22:00:20 INFO: 2020-08-18 22:00:20 INFO: init new order start 2020-08-18 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 18, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 423.45, 'high': 425.0, 'low': 422.5, 'close': 423.3, 'trades': 2267, 'volume': 1807449, 'vwap': 423.86, 'lastSize': 46, 'turnover': 76608985310, 'homeNotional': 21673.737861164296, 'foreignNotional': 9186454.190136656}, {'timestamp': datetime.datetime(2020, 8, 18, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 423.95, 'high': 425.2, 'low': 422.25, 'close': 423.45, 'trades': 2976, 'volume': 1676176, 'vwap': 423.78, 'lastSize': 1, 'turnover': 71031417775, 'homeNotional': 20126.851808344327, 'foreignNotional': 8529184.299375277}, {'timestamp': datetime.datetime(2020, 8, 18, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 420.55, 'high': 424.65, 'low': 416.5, 'close': 423.95, 'trades': 7736, 'volume': 6832076, 'vwap': 420.29, 'lastSize': 174, 'turnover': 287143674230, 'homeNotional': 81548.92158897003, 'foreignNotional': 34274466.63184889}] 2020-08-18 22:00:20 INFO: prepare candles [CandleItem(low=422.5, high=425.0, open=423.45, close=423.3, color='RED'), CandleItem(low=422.25, high=425.2, open=423.95, close=423.45, color='RED'), CandleItem(low=416.5, high=424.65, open=420.55, close=423.95, color='GREEN')] 2020-08-18 22:00:20 INFO: skip by colors first_candle=CandleItem(low=416.5, high=424.65, open=420.55, close=423.95, color='GREEN') second_candle=CandleItem(low=422.25, high=425.2, open=423.95, close=423.45, color='RED') last_candle=CandleItem(low=422.5, high=425.0, open=423.45, close=423.3, color='RED') 2020-08-18 22:00:20 INFO: check need new order None 2020-08-18 22:00:20 INFO: init new order end 2020-08-18 22:00:20 INFO: 2020-08-18 22:00:20 INFO: 2020-08-18 22:00:20 INFO: 2020-08-18 22:00:20 INFO: 2020-08-18 22:02:00 INFO: 2020-08-18 22:02:00 INFO: 2020-08-18 22:02:00 INFO: 2020-08-18 22:02:00 INFO: 2020-08-18 22:02:00 INFO: clearing start 2020-08-18 22:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-18 22:02:00 INFO: skip by not found init order into storage 2020-08-18 22:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-18 22:02:00 INFO: skip by not found init order into storage 2020-08-18 22:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '29dca35f-8f05-1e43-2813-419d07ee8535', 'clOrdID': '7765c75107f8470983eb6d01c3cf125e', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 232, 'price': None, 'displayQty': None, 'stopPx': 416.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 17, 10, 1, 824000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 17, 10, 1, 824000, tzinfo=tzutc())} 2020-08-18 22:02:00 INFO: skip by not found init order into storage 2020-08-18 22:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '26a12c69-08c2-0301-c2fe-8f55eadd3988', 'clOrdID': '312a919427914511a225e24287cbd8ce', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 232, 'price': 465.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 17, 10, 1, 866000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 17, 10, 1, 866000, tzinfo=tzutc())} 2020-08-18 22:02:00 INFO: skip by not found init order into storage 2020-08-18 22:02:00 INFO: clearing end 2020-08-18 22:02:00 INFO: 2020-08-18 22:02:00 INFO: 2020-08-18 22:02:00 INFO: 2020-08-18 22:02:00 INFO: 2020-08-18 23:00:20 INFO: 2020-08-18 23:00:20 INFO: 2020-08-18 23:00:20 INFO: 2020-08-18 23:00:20 INFO: 2020-08-18 23:00:20 INFO: init new order start 2020-08-18 23:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 18, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 423.3, 'high': 426.5, 'low': 423.25, 'close': 423.8, 'trades': 3121, 'volume': 2123658, 'vwap': 425.14, 'lastSize': 4444, 'turnover': 90283553235, 'homeNotional': 25490.012346173036, 'foreignNotional': 10836641.162408993}, {'timestamp': datetime.datetime(2020, 8, 18, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 423.45, 'high': 425.0, 'low': 422.5, 'close': 423.3, 'trades': 2267, 'volume': 1807449, 'vwap': 423.86, 'lastSize': 46, 'turnover': 76608985310, 'homeNotional': 21673.737861164296, 'foreignNotional': 9186454.190136656}, {'timestamp': datetime.datetime(2020, 8, 18, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 423.95, 'high': 425.2, 'low': 422.25, 'close': 423.45, 'trades': 2976, 'volume': 1676176, 'vwap': 423.78, 'lastSize': 1, 'turnover': 71031417775, 'homeNotional': 20126.851808344327, 'foreignNotional': 8529184.299375277}] 2020-08-18 23:00:20 INFO: prepare candles [CandleItem(low=423.25, high=426.5, open=423.3, close=423.8, color='GREEN'), CandleItem(low=422.5, high=425.0, open=423.45, close=423.3, color='RED'), CandleItem(low=422.25, high=425.2, open=423.95, close=423.45, color='RED')] 2020-08-18 23:00:20 INFO: last_candle=CandleItem(low=423.25, high=426.5, open=423.3, close=423.8, color='GREEN') 2020-08-18 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-18 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=423.25, high=426.5, open=423.3, close=423.8, color='GREEN') 2020-08-18 23:00:20 INFO: skip by CandleItem(low=423.25, high=426.5, open=423.3, close=423.8, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-18 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-18 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=423.25, high=426.5, open=423.3, close=423.8, color='GREEN') 2020-08-18 23:00:20 INFO: skip by CandleItem(low=423.25, high=426.5, open=423.3, close=423.8, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-18 23:00:20 INFO: not found applicable config for candle 2020-08-18 23:00:20 INFO: check need new order None 2020-08-18 23:00:20 INFO: init new order end 2020-08-18 23:00:20 INFO: 2020-08-18 23:00:20 INFO: 2020-08-18 23:00:20 INFO: 2020-08-18 23:00:20 INFO: 2020-08-18 23:02:00 INFO: 2020-08-18 23:02:00 INFO: 2020-08-18 23:02:00 INFO: 2020-08-18 23:02:00 INFO: 2020-08-18 23:02:00 INFO: clearing start 2020-08-18 23:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-18 23:02:00 INFO: skip by not found init order into storage 2020-08-18 23:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-18 23:02:00 INFO: skip by not found init order into storage 2020-08-18 23:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '29dca35f-8f05-1e43-2813-419d07ee8535', 'clOrdID': '7765c75107f8470983eb6d01c3cf125e', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 232, 'price': None, 'displayQty': None, 'stopPx': 416.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 17, 10, 1, 824000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 17, 10, 1, 824000, tzinfo=tzutc())} 2020-08-18 23:02:00 INFO: skip by not found init order into storage 2020-08-18 23:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '26a12c69-08c2-0301-c2fe-8f55eadd3988', 'clOrdID': '312a919427914511a225e24287cbd8ce', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 232, 'price': 465.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 17, 10, 1, 866000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 17, 10, 1, 866000, tzinfo=tzutc())} 2020-08-18 23:02:00 INFO: skip by not found init order into storage 2020-08-18 23:02:00 INFO: clearing end 2020-08-18 23:02:00 INFO: 2020-08-18 23:02:00 INFO: 2020-08-18 23:02:00 INFO: 2020-08-18 23:02:00 INFO: 2020-08-19 00:00:20 INFO: 2020-08-19 00:00:20 INFO: 2020-08-19 00:00:20 INFO: 2020-08-19 00:00:20 INFO: 2020-08-19 00:00:20 INFO: init new order start 2020-08-19 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 18, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 423.8, 'high': 429.35, 'low': 423.8, 'close': 427.55, 'trades': 4469, 'volume': 3265191, 'vwap': 427.36, 'lastSize': 100, 'turnover': 139539016585, 'homeNotional': 39250.200311363325, 'foreignNotional': 16773757.912225181}, {'timestamp': datetime.datetime(2020, 8, 18, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 423.3, 'high': 426.5, 'low': 423.25, 'close': 423.8, 'trades': 3121, 'volume': 2123658, 'vwap': 425.14, 'lastSize': 4444, 'turnover': 90283553235, 'homeNotional': 25490.012346173036, 'foreignNotional': 10836641.162408993}, {'timestamp': datetime.datetime(2020, 8, 18, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 423.45, 'high': 425.0, 'low': 422.5, 'close': 423.3, 'trades': 2267, 'volume': 1807449, 'vwap': 423.86, 'lastSize': 46, 'turnover': 76608985310, 'homeNotional': 21673.737861164296, 'foreignNotional': 9186454.190136656}] 2020-08-19 00:00:20 INFO: prepare candles [CandleItem(low=423.8, high=429.35, open=423.8, close=427.55, color='GREEN'), CandleItem(low=423.25, high=426.5, open=423.3, close=423.8, color='GREEN'), CandleItem(low=422.5, high=425.0, open=423.45, close=423.3, color='RED')] 2020-08-19 00:00:20 INFO: skip by colors first_candle=CandleItem(low=422.5, high=425.0, open=423.45, close=423.3, color='RED') second_candle=CandleItem(low=423.25, high=426.5, open=423.3, close=423.8, color='GREEN') last_candle=CandleItem(low=423.8, high=429.35, open=423.8, close=427.55, color='GREEN') 2020-08-19 00:00:20 INFO: check need new order None 2020-08-19 00:00:20 INFO: init new order end 2020-08-19 00:00:20 INFO: 2020-08-19 00:00:20 INFO: 2020-08-19 00:00:20 INFO: 2020-08-19 00:00:20 INFO: 2020-08-19 00:02:00 INFO: 2020-08-19 00:02:00 INFO: 2020-08-19 00:02:00 INFO: 2020-08-19 00:02:00 INFO: 2020-08-19 00:02:00 INFO: clearing start 2020-08-19 00:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-19 00:02:00 INFO: skip by not found init order into storage 2020-08-19 00:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-19 00:02:00 INFO: skip by not found init order into storage 2020-08-19 00:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '29dca35f-8f05-1e43-2813-419d07ee8535', 'clOrdID': '7765c75107f8470983eb6d01c3cf125e', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 232, 'price': None, 'displayQty': None, 'stopPx': 416.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 17, 10, 1, 824000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 17, 10, 1, 824000, tzinfo=tzutc())} 2020-08-19 00:02:00 INFO: skip by not found init order into storage 2020-08-19 00:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '26a12c69-08c2-0301-c2fe-8f55eadd3988', 'clOrdID': '312a919427914511a225e24287cbd8ce', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 232, 'price': 465.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 17, 10, 1, 866000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 17, 10, 1, 866000, tzinfo=tzutc())} 2020-08-19 00:02:00 INFO: skip by not found init order into storage 2020-08-19 00:02:00 INFO: clearing end 2020-08-19 00:02:00 INFO: 2020-08-19 00:02:00 INFO: 2020-08-19 00:02:00 INFO: 2020-08-19 00:02:00 INFO: 2020-08-19 01:00:20 INFO: 2020-08-19 01:00:20 INFO: 2020-08-19 01:00:20 INFO: 2020-08-19 01:00:20 INFO: 2020-08-19 01:00:20 INFO: init new order start 2020-08-19 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 18, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 427.55, 'high': 429.5, 'low': 427.1, 'close': 427.5, 'trades': 2967, 'volume': 1782576, 'vwap': 428.28, 'lastSize': 71, 'turnover': 76343378275, 'homeNotional': 21507.335210602854, 'foreignNotional': 9211082.389104348}, {'timestamp': datetime.datetime(2020, 8, 18, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 423.8, 'high': 429.35, 'low': 423.8, 'close': 427.55, 'trades': 4469, 'volume': 3265191, 'vwap': 427.36, 'lastSize': 100, 'turnover': 139539016585, 'homeNotional': 39250.200311363325, 'foreignNotional': 16773757.912225181}, {'timestamp': datetime.datetime(2020, 8, 18, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 423.3, 'high': 426.5, 'low': 423.25, 'close': 423.8, 'trades': 3121, 'volume': 2123658, 'vwap': 425.14, 'lastSize': 4444, 'turnover': 90283553235, 'homeNotional': 25490.012346173036, 'foreignNotional': 10836641.162408993}] 2020-08-19 01:00:20 INFO: prepare candles [CandleItem(low=427.1, high=429.5, open=427.55, close=427.5, color='RED'), CandleItem(low=423.8, high=429.35, open=423.8, close=427.55, color='GREEN'), CandleItem(low=423.25, high=426.5, open=423.3, close=423.8, color='GREEN')] 2020-08-19 01:00:20 INFO: last_candle=CandleItem(low=427.1, high=429.5, open=427.55, close=427.5, color='RED') 2020-08-19 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-08-19 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=427.1, high=429.5, open=427.55, close=427.5, color='RED') 2020-08-19 01:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=423.8, high=429.35, open=423.8, close=427.55, color='GREEN') 2020-08-19 01:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=423.25, high=426.5, open=423.3, close=423.8, color='GREEN') 2020-08-19 01:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=427.1, high=429.5, open=427.55, close=427.5, color='RED'), take_profit_factor=6.0, clearing_interval=3600) 2020-08-19 01:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=427.1, high=429.5, open=427.55, close=427.5, color='RED'), take_profit_factor=6.0, clearing_interval=3600) 2020-08-19 01:00:20 INFO: place order: start candle=CandleItem(low=427.1, high=429.5, open=427.55, close=427.5, color='RED') ticker='ETHUSD' price_offset=0.1 2020-08-19 01:00:20 INFO: place order: side_factor=1 init_trigger_price=427.05 init_order_price=427.0 stop_price_offset=0.0 candle.size=2.3999999999999773 stop_price=429.5 take_price=412.60000000000014 2020-08-19 01:00:20 INFO: place order round: side_factor=1 init_trigger_price=Decimal('427.05000000000001136868377216160297393798828125') init_order_price=Decimal('427') stop_price_offset=0.0 candle.size=2.3999999999999773 stop_price=Decimal('429.5') take_price=Decimal('412.600000000000136424205265939235687255859375') 2020-08-19 01:00:20 INFO: place order: compute qty=-776 2020-08-19 01:00:20 INFO: place order: save order to db 5eb662a42af84fb7af2f47bec2d2e357; response=True 2020-08-19 01:00:21 INFO: post order to exchange resp={'orderID': '2594f8f3-4f6d-7cac-60eb-7b0805ecc00b', 'clOrdID': '5eb662a42af84fb7af2f47bec2d2e357', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 776, 'price': 427.0, 'displayQty': None, 'stopPx': 427.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': 776, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 18, 22, 0, 20, 992000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 22, 0, 20, 992000, tzinfo=tzutc())} 2020-08-19 01:00:21 INFO: place new init order {'qty': -776, 'init_price': Decimal('427.05000000000001136868377216160297393798828125'), 'stop_price': Decimal('429.5'), 'take_price': Decimal('412.600000000000136424205265939235687255859375'), 'order_uid': '5eb662a42af84fb7af2f47bec2d2e357', 'response': {'orderID': '2594f8f3-4f6d-7cac-60eb-7b0805ecc00b', 'clOrdID': '5eb662a42af84fb7af2f47bec2d2e357', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 776, 'price': 427.0, 'displayQty': None, 'stopPx': 427.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': 776, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 18, 22, 0, 20, 992000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 22, 0, 20, 992000, tzinfo=tzutc())}} 2020-08-19 01:00:21 INFO: init new order end 2020-08-19 01:00:21 INFO: 2020-08-19 01:00:21 INFO: 2020-08-19 01:00:21 INFO: 2020-08-19 01:00:21 INFO: 2020-08-19 01:00:21 INFO: process event {'orderID': '2594f8f3-4f6d-7cac-60eb-7b0805ecc00b', 'clOrdID': '5eb662a42af84fb7af2f47bec2d2e357', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 776, 'price': 427, 'displayQty': None, 'stopPx': 427.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': 776, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-08-18T22:00:20.992Z', 'timestamp': '2020-08-18T22:00:20.992Z'} 2020-08-19 01:00:21 INFO: skip event 5eb662a42af84fb7af2f47bec2d2e357 New 2020-08-19 01:02:00 INFO: 2020-08-19 01:02:00 INFO: 2020-08-19 01:02:00 INFO: 2020-08-19 01:02:00 INFO: 2020-08-19 01:02:00 INFO: clearing start 2020-08-19 01:02:01 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-19 01:02:01 INFO: skip by not found init order into storage 2020-08-19 01:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-19 01:02:01 INFO: skip by not found init order into storage 2020-08-19 01:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '29dca35f-8f05-1e43-2813-419d07ee8535', 'clOrdID': '7765c75107f8470983eb6d01c3cf125e', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 232, 'price': None, 'displayQty': None, 'stopPx': 416.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 17, 10, 1, 824000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 17, 10, 1, 824000, tzinfo=tzutc())} 2020-08-19 01:02:01 INFO: skip by not found init order into storage 2020-08-19 01:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '26a12c69-08c2-0301-c2fe-8f55eadd3988', 'clOrdID': '312a919427914511a225e24287cbd8ce', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 232, 'price': 465.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 17, 10, 1, 866000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 17, 10, 1, 866000, tzinfo=tzutc())} 2020-08-19 01:02:01 INFO: skip by not found init order into storage 2020-08-19 01:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '2594f8f3-4f6d-7cac-60eb-7b0805ecc00b', 'clOrdID': '5eb662a42af84fb7af2f47bec2d2e357', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 776, 'price': 427.0, 'displayQty': None, 'stopPx': 427.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': 776, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 18, 22, 0, 20, 992000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 22, 0, 20, 992000, tzinfo=tzutc())} 2020-08-19 01:02:01 INFO: order time=2020-08-18 22:00:20.992000+00:00; delta from now UTC=0:01:40.018995 time_delta.total_seconds()=100.018995; time_diff_offset='3600' 2020-08-19 01:02:01 INFO: skip by time diff 2020-08-18 22:00:20.992000+00:00 2020-08-19 01:02:01 INFO: clearing end 2020-08-19 01:02:01 INFO: 2020-08-19 01:02:01 INFO: 2020-08-19 01:02:01 INFO: 2020-08-19 01:02:01 INFO: 2020-08-19 01:07:10 INFO: process event {'orderID': '2594f8f3-4f6d-7cac-60eb-7b0805ecc00b', 'triggered': 'StopOrderTriggered', 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'timestamp': '2020-08-18T22:07:10.163Z', 'clOrdID': '5eb662a42af84fb7af2f47bec2d2e357', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-19 01:07:10 INFO: skip event 5eb662a42af84fb7af2f47bec2d2e357 2020-08-19 01:07:10 INFO: process event {'orderID': '2594f8f3-4f6d-7cac-60eb-7b0805ecc00b', 'ordStatus': 'Filled', 'leavesQty': 0, 'cumQty': 776, 'avgPx': 427.05, 'transactTime': '2020-08-18T22:07:10.163Z', 'clOrdID': '5eb662a42af84fb7af2f47bec2d2e357', 'account': 605536, 'symbol': 'ETHUSD', 'timestamp': '2020-08-18T22:07:10.163Z'} 2020-08-19 01:07:10 INFO: add new event={'uid': '5eb662a42af84fb7af2f47bec2d2e357', 'status': 'Filled'} 2020-08-19 01:07:10 INFO: 2020-08-19 01:07:10 INFO: 2020-08-19 01:07:10 INFO: 2020-08-19 01:07:10 INFO: 2020-08-19 01:07:10 INFO: process event start 2020-08-19 01:07:10 INFO: fetch new order event 5eb662a42af84fb7af2f47bec2d2e357 2020-08-19 01:07:10 INFO: fetch orders by event init={'stop': '429.5', 'take': '412.600000000000136424205265939235687255859375', 'qty': '776', 'color': 'RED', 'ticker': 'ETHUSD', 'clearing_offset': '3600'} profit_pair=None 2020-08-19 01:07:10 INFO: process init order filled 2020-08-19 01:07:10 INFO: save profit orders to storage stop=55c58d17399e4e76b804940ac48672ee take=db118e5f9adf470eb82743f7d97772fd 2020-08-19 01:07:10 INFO: place profit orders take_price=412.600000000000136424205265939235687255859375, stop_price=429.5, qty=776, color=RED, ticker=ETHUSD 55c58d17399e4e76b804940ac48672ee db118e5f9adf470eb82743f7d97772fd 2020-08-19 01:07:10 INFO: place stop order ETHUSD: qty=776, stop_price=429.5, stop_uid=55c58d17399e4e76b804940ac48672ee 2020-08-19 01:07:10 INFO: exchange resp for stop order={'orderID': '9825ef44-a190-3337-a342-ce7aa98ca15d', 'clOrdID': '55c58d17399e4e76b804940ac48672ee', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 776, 'price': None, 'displayQty': None, 'stopPx': 429.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': 776, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 22, 7, 10, 670000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 22, 7, 10, 670000, tzinfo=tzutc())} 2020-08-19 01:07:10 INFO: place limit order ETHUSD: qty=776, price=412.600000000000136424205265939235687255859375, take_uid=db118e5f9adf470eb82743f7d97772fd 2020-08-19 01:07:10 INFO: exchange resp for take profit order={'orderID': 'e109dd97-e9ca-3cc7-8621-46cd9b551902', 'clOrdID': 'db118e5f9adf470eb82743f7d97772fd', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 776, 'price': 412.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': 776, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 22, 7, 10, 711000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 22, 7, 10, 711000, tzinfo=tzutc())} 2020-08-19 01:07:10 INFO: place profit orders={'stop': {'response': {'orderID': '9825ef44-a190-3337-a342-ce7aa98ca15d', 'clOrdID': '55c58d17399e4e76b804940ac48672ee', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 776, 'price': None, 'displayQty': None, 'stopPx': 429.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': 776, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 22, 7, 10, 670000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 22, 7, 10, 670000, tzinfo=tzutc())}, 'qty': Decimal('776'), 'uid': '55c58d17399e4e76b804940ac48672ee', 'price': Decimal('429.5')}, 'take': {'response': {'orderID': 'e109dd97-e9ca-3cc7-8621-46cd9b551902', 'clOrdID': 'db118e5f9adf470eb82743f7d97772fd', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 776, 'price': 412.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': 776, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 22, 7, 10, 711000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 22, 7, 10, 711000, tzinfo=tzutc())}, 'qty': Decimal('776'), 'uid': 'db118e5f9adf470eb82743f7d97772fd', 'price': Decimal('412.600000000000136424205265939235687255859375')}} 2020-08-19 01:07:10 INFO: rm init order from db 5eb662a42af84fb7af2f47bec2d2e357 2020-08-19 01:07:10 INFO: end process event_processing_result='proceed init order' 2020-08-19 01:07:10 INFO: 2020-08-19 01:07:10 INFO: 2020-08-19 01:07:10 INFO: 2020-08-19 01:07:10 INFO: 2020-08-19 01:07:10 INFO: process event {'orderID': '9825ef44-a190-3337-a342-ce7aa98ca15d', 'clOrdID': '55c58d17399e4e76b804940ac48672ee', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 776, 'price': None, 'displayQty': None, 'stopPx': 429.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': 776, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': '2020-08-18T22:07:10.670Z', 'timestamp': '2020-08-18T22:07:10.670Z'} 2020-08-19 01:07:10 INFO: skip event 55c58d17399e4e76b804940ac48672ee New 2020-08-19 01:07:10 INFO: process event {'orderID': 'e109dd97-e9ca-3cc7-8621-46cd9b551902', 'clOrdID': 'db118e5f9adf470eb82743f7d97772fd', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 776, 'price': 412.6, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 776, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': '2020-08-18T22:07:10.711Z', 'timestamp': '2020-08-18T22:07:10.711Z'} 2020-08-19 01:07:10 INFO: skip event db118e5f9adf470eb82743f7d97772fd New 2020-08-19 01:07:10 INFO: process event {'orderID': 'e109dd97-e9ca-3cc7-8621-46cd9b551902', 'workingIndicator': True, 'clOrdID': 'db118e5f9adf470eb82743f7d97772fd', 'account': 605536, 'symbol': 'ETHUSD', 'timestamp': '2020-08-18T22:07:10.711Z'} 2020-08-19 01:07:10 INFO: skip event db118e5f9adf470eb82743f7d97772fd 2020-08-19 02:00:20 INFO: 2020-08-19 02:00:20 INFO: 2020-08-19 02:00:20 INFO: 2020-08-19 02:00:20 INFO: 2020-08-19 02:00:20 INFO: init new order start 2020-08-19 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 18, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 427.5, 'high': 428.4, 'low': 425.2, 'close': 426.0, 'trades': 2855, 'volume': 1639690, 'vwap': 426.55, 'lastSize': 11, 'turnover': 69940050010, 'homeNotional': 19769.704830790473, 'foreignNotional': 8432667.93728418}, {'timestamp': datetime.datetime(2020, 8, 18, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 427.55, 'high': 429.5, 'low': 427.1, 'close': 427.5, 'trades': 2967, 'volume': 1782576, 'vwap': 428.28, 'lastSize': 71, 'turnover': 76343378275, 'homeNotional': 21507.335210602854, 'foreignNotional': 9211082.389104348}, {'timestamp': datetime.datetime(2020, 8, 18, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 423.8, 'high': 429.35, 'low': 423.8, 'close': 427.55, 'trades': 4469, 'volume': 3265191, 'vwap': 427.36, 'lastSize': 100, 'turnover': 139539016585, 'homeNotional': 39250.200311363325, 'foreignNotional': 16773757.912225181}] 2020-08-19 02:00:20 INFO: prepare candles [CandleItem(low=425.2, high=428.4, open=427.5, close=426.0, color='RED'), CandleItem(low=427.1, high=429.5, open=427.55, close=427.5, color='RED'), CandleItem(low=423.8, high=429.35, open=423.8, close=427.55, color='GREEN')] 2020-08-19 02:00:20 INFO: skip by colors first_candle=CandleItem(low=423.8, high=429.35, open=423.8, close=427.55, color='GREEN') second_candle=CandleItem(low=427.1, high=429.5, open=427.55, close=427.5, color='RED') last_candle=CandleItem(low=425.2, high=428.4, open=427.5, close=426.0, color='RED') 2020-08-19 02:00:20 INFO: check need new order None 2020-08-19 02:00:20 INFO: init new order end 2020-08-19 02:00:20 INFO: 2020-08-19 02:00:20 INFO: 2020-08-19 02:00:20 INFO: 2020-08-19 02:00:20 INFO: 2020-08-19 02:02:00 INFO: 2020-08-19 02:02:00 INFO: 2020-08-19 02:02:00 INFO: 2020-08-19 02:02:00 INFO: 2020-08-19 02:02:00 INFO: clearing start 2020-08-19 02:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-19 02:02:00 INFO: skip by not found init order into storage 2020-08-19 02:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-19 02:02:00 INFO: skip by not found init order into storage 2020-08-19 02:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '29dca35f-8f05-1e43-2813-419d07ee8535', 'clOrdID': '7765c75107f8470983eb6d01c3cf125e', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 232, 'price': None, 'displayQty': None, 'stopPx': 416.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 17, 10, 1, 824000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 17, 10, 1, 824000, tzinfo=tzutc())} 2020-08-19 02:02:00 INFO: skip by not found init order into storage 2020-08-19 02:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '26a12c69-08c2-0301-c2fe-8f55eadd3988', 'clOrdID': '312a919427914511a225e24287cbd8ce', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 232, 'price': 465.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 17, 10, 1, 866000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 17, 10, 1, 866000, tzinfo=tzutc())} 2020-08-19 02:02:00 INFO: skip by not found init order into storage 2020-08-19 02:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '9825ef44-a190-3337-a342-ce7aa98ca15d', 'clOrdID': '55c58d17399e4e76b804940ac48672ee', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 776, 'price': None, 'displayQty': None, 'stopPx': 429.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': 776, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 22, 7, 10, 670000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 22, 7, 10, 670000, tzinfo=tzutc())} 2020-08-19 02:02:00 INFO: skip by not found init order into storage 2020-08-19 02:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'e109dd97-e9ca-3cc7-8621-46cd9b551902', 'clOrdID': 'db118e5f9adf470eb82743f7d97772fd', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 776, 'price': 412.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': 776, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 22, 7, 10, 711000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 22, 7, 10, 711000, tzinfo=tzutc())} 2020-08-19 02:02:00 INFO: skip by not found init order into storage 2020-08-19 02:02:00 INFO: clearing end 2020-08-19 02:02:00 INFO: 2020-08-19 02:02:00 INFO: 2020-08-19 02:02:00 INFO: 2020-08-19 02:02:00 INFO: 2020-08-19 03:00:20 INFO: 2020-08-19 03:00:20 INFO: 2020-08-19 03:00:20 INFO: 2020-08-19 03:00:20 INFO: 2020-08-19 03:00:20 INFO: init new order start 2020-08-19 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 19, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 426.0, 'high': 426.0, 'low': 422.5, 'close': 422.85, 'trades': 3634, 'volume': 2546191, 'vwap': 423.84, 'lastSize': 100, 'turnover': 107916750500, 'homeNotional': 30579.447541531998, 'foreignNotional': 12960720.25783557}, {'timestamp': datetime.datetime(2020, 8, 18, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 427.5, 'high': 428.4, 'low': 425.2, 'close': 426.0, 'trades': 2855, 'volume': 1639690, 'vwap': 426.55, 'lastSize': 11, 'turnover': 69940050010, 'homeNotional': 19769.704830790473, 'foreignNotional': 8432667.93728418}, {'timestamp': datetime.datetime(2020, 8, 18, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 427.55, 'high': 429.5, 'low': 427.1, 'close': 427.5, 'trades': 2967, 'volume': 1782576, 'vwap': 428.28, 'lastSize': 71, 'turnover': 76343378275, 'homeNotional': 21507.335210602854, 'foreignNotional': 9211082.389104348}] 2020-08-19 03:00:20 INFO: prepare candles [CandleItem(low=422.5, high=426.0, open=426.0, close=422.85, color='RED'), CandleItem(low=425.2, high=428.4, open=427.5, close=426.0, color='RED'), CandleItem(low=427.1, high=429.5, open=427.55, close=427.5, color='RED')] 2020-08-19 03:00:20 INFO: skip by colors first_candle=CandleItem(low=427.1, high=429.5, open=427.55, close=427.5, color='RED') second_candle=CandleItem(low=425.2, high=428.4, open=427.5, close=426.0, color='RED') last_candle=CandleItem(low=422.5, high=426.0, open=426.0, close=422.85, color='RED') 2020-08-19 03:00:20 INFO: check need new order None 2020-08-19 03:00:20 INFO: init new order end 2020-08-19 03:00:20 INFO: 2020-08-19 03:00:20 INFO: 2020-08-19 03:00:20 INFO: 2020-08-19 03:00:20 INFO: 2020-08-19 03:02:00 INFO: 2020-08-19 03:02:00 INFO: 2020-08-19 03:02:00 INFO: 2020-08-19 03:02:00 INFO: 2020-08-19 03:02:00 INFO: clearing start 2020-08-19 03:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-19 03:02:00 INFO: skip by not found init order into storage 2020-08-19 03:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-19 03:02:00 INFO: skip by not found init order into storage 2020-08-19 03:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '29dca35f-8f05-1e43-2813-419d07ee8535', 'clOrdID': '7765c75107f8470983eb6d01c3cf125e', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 232, 'price': None, 'displayQty': None, 'stopPx': 416.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 17, 10, 1, 824000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 17, 10, 1, 824000, tzinfo=tzutc())} 2020-08-19 03:02:00 INFO: skip by not found init order into storage 2020-08-19 03:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '26a12c69-08c2-0301-c2fe-8f55eadd3988', 'clOrdID': '312a919427914511a225e24287cbd8ce', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 232, 'price': 465.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 17, 10, 1, 866000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 17, 10, 1, 866000, tzinfo=tzutc())} 2020-08-19 03:02:00 INFO: skip by not found init order into storage 2020-08-19 03:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '9825ef44-a190-3337-a342-ce7aa98ca15d', 'clOrdID': '55c58d17399e4e76b804940ac48672ee', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 776, 'price': None, 'displayQty': None, 'stopPx': 429.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': 776, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 22, 7, 10, 670000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 22, 7, 10, 670000, tzinfo=tzutc())} 2020-08-19 03:02:00 INFO: skip by not found init order into storage 2020-08-19 03:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'e109dd97-e9ca-3cc7-8621-46cd9b551902', 'clOrdID': 'db118e5f9adf470eb82743f7d97772fd', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 776, 'price': 412.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': 776, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 22, 7, 10, 711000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 22, 7, 10, 711000, tzinfo=tzutc())} 2020-08-19 03:02:00 INFO: skip by not found init order into storage 2020-08-19 03:02:00 INFO: clearing end 2020-08-19 03:02:00 INFO: 2020-08-19 03:02:00 INFO: 2020-08-19 03:02:00 INFO: 2020-08-19 03:02:00 INFO: 2020-08-19 04:00:20 INFO: 2020-08-19 04:00:20 INFO: 2020-08-19 04:00:20 INFO: 2020-08-19 04:00:20 INFO: 2020-08-19 04:00:20 INFO: init new order start 2020-08-19 04:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 19, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 422.85, 'high': 425.1, 'low': 421.05, 'close': 424.85, 'trades': 4855, 'volume': 3390103, 'vwap': 423.2, 'lastSize': 100, 'turnover': 143465984370, 'homeNotional': 40570.51342860335, 'foreignNotional': 17169100.435106713}, {'timestamp': datetime.datetime(2020, 8, 19, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 426.0, 'high': 426.0, 'low': 422.5, 'close': 422.85, 'trades': 3634, 'volume': 2546191, 'vwap': 423.84, 'lastSize': 100, 'turnover': 107916750500, 'homeNotional': 30579.447541531998, 'foreignNotional': 12960720.25783557}, {'timestamp': datetime.datetime(2020, 8, 18, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 427.5, 'high': 428.4, 'low': 425.2, 'close': 426.0, 'trades': 2855, 'volume': 1639690, 'vwap': 426.55, 'lastSize': 11, 'turnover': 69940050010, 'homeNotional': 19769.704830790473, 'foreignNotional': 8432667.93728418}] 2020-08-19 04:00:20 INFO: prepare candles [CandleItem(low=421.05, high=425.1, open=422.85, close=424.85, color='GREEN'), CandleItem(low=422.5, high=426.0, open=426.0, close=422.85, color='RED'), CandleItem(low=425.2, high=428.4, open=427.5, close=426.0, color='RED')] 2020-08-19 04:00:20 INFO: last_candle=CandleItem(low=421.05, high=425.1, open=422.85, close=424.85, color='GREEN') 2020-08-19 04:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-08-19 04:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=421.05, high=425.1, open=422.85, close=424.85, color='GREEN') 2020-08-19 04:00:20 INFO: skip by CandleItem(low=421.05, high=425.1, open=422.85, close=424.85, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-19 04:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-08-19 04:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=421.05, high=425.1, open=422.85, close=424.85, color='GREEN') 2020-08-19 04:00:20 INFO: skip by CandleItem(low=421.05, high=425.1, open=422.85, close=424.85, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-19 04:00:20 INFO: not found applicable config for candle 2020-08-19 04:00:20 INFO: check need new order None 2020-08-19 04:00:20 INFO: init new order end 2020-08-19 04:00:20 INFO: 2020-08-19 04:00:20 INFO: 2020-08-19 04:00:20 INFO: 2020-08-19 04:00:20 INFO: 2020-08-19 04:02:00 INFO: 2020-08-19 04:02:00 INFO: 2020-08-19 04:02:00 INFO: 2020-08-19 04:02:00 INFO: 2020-08-19 04:02:00 INFO: clearing start 2020-08-19 04:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-19 04:02:00 INFO: skip by not found init order into storage 2020-08-19 04:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-19 04:02:00 INFO: skip by not found init order into storage 2020-08-19 04:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '29dca35f-8f05-1e43-2813-419d07ee8535', 'clOrdID': '7765c75107f8470983eb6d01c3cf125e', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 232, 'price': None, 'displayQty': None, 'stopPx': 416.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 17, 10, 1, 824000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 17, 10, 1, 824000, tzinfo=tzutc())} 2020-08-19 04:02:00 INFO: skip by not found init order into storage 2020-08-19 04:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '26a12c69-08c2-0301-c2fe-8f55eadd3988', 'clOrdID': '312a919427914511a225e24287cbd8ce', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 232, 'price': 465.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 17, 10, 1, 866000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 17, 10, 1, 866000, tzinfo=tzutc())} 2020-08-19 04:02:00 INFO: skip by not found init order into storage 2020-08-19 04:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '9825ef44-a190-3337-a342-ce7aa98ca15d', 'clOrdID': '55c58d17399e4e76b804940ac48672ee', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 776, 'price': None, 'displayQty': None, 'stopPx': 429.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': 776, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 22, 7, 10, 670000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 22, 7, 10, 670000, tzinfo=tzutc())} 2020-08-19 04:02:00 INFO: skip by not found init order into storage 2020-08-19 04:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'e109dd97-e9ca-3cc7-8621-46cd9b551902', 'clOrdID': 'db118e5f9adf470eb82743f7d97772fd', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 776, 'price': 412.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': 776, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 22, 7, 10, 711000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 22, 7, 10, 711000, tzinfo=tzutc())} 2020-08-19 04:02:00 INFO: skip by not found init order into storage 2020-08-19 04:02:00 INFO: clearing end 2020-08-19 04:02:00 INFO: 2020-08-19 04:02:00 INFO: 2020-08-19 04:02:00 INFO: 2020-08-19 04:02:00 INFO: 2020-08-19 05:00:20 INFO: 2020-08-19 05:00:20 INFO: 2020-08-19 05:00:20 INFO: 2020-08-19 05:00:20 INFO: 2020-08-19 05:00:20 INFO: init new order start 2020-08-19 05:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 19, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 424.85, 'high': 427.25, 'low': 423.6, 'close': 423.8, 'trades': 2817, 'volume': 2338381, 'vwap': 425.48, 'lastSize': 704, 'turnover': 99492145535, 'homeNotional': 28055.4605299446, 'foreignNotional': 11936908.756961964}, {'timestamp': datetime.datetime(2020, 8, 19, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 422.85, 'high': 425.1, 'low': 421.05, 'close': 424.85, 'trades': 4855, 'volume': 3390103, 'vwap': 423.2, 'lastSize': 100, 'turnover': 143465984370, 'homeNotional': 40570.51342860335, 'foreignNotional': 17169100.435106713}, {'timestamp': datetime.datetime(2020, 8, 19, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 426.0, 'high': 426.0, 'low': 422.5, 'close': 422.85, 'trades': 3634, 'volume': 2546191, 'vwap': 423.84, 'lastSize': 100, 'turnover': 107916750500, 'homeNotional': 30579.447541531998, 'foreignNotional': 12960720.25783557}] 2020-08-19 05:00:20 INFO: prepare candles [CandleItem(low=423.6, high=427.25, open=424.85, close=423.8, color='RED'), CandleItem(low=421.05, high=425.1, open=422.85, close=424.85, color='GREEN'), CandleItem(low=422.5, high=426.0, open=426.0, close=422.85, color='RED')] 2020-08-19 05:00:20 INFO: skip by colors first_candle=CandleItem(low=422.5, high=426.0, open=426.0, close=422.85, color='RED') second_candle=CandleItem(low=421.05, high=425.1, open=422.85, close=424.85, color='GREEN') last_candle=CandleItem(low=423.6, high=427.25, open=424.85, close=423.8, color='RED') 2020-08-19 05:00:20 INFO: check need new order None 2020-08-19 05:00:20 INFO: init new order end 2020-08-19 05:00:20 INFO: 2020-08-19 05:00:20 INFO: 2020-08-19 05:00:20 INFO: 2020-08-19 05:00:20 INFO: 2020-08-19 05:02:00 INFO: 2020-08-19 05:02:00 INFO: 2020-08-19 05:02:00 INFO: 2020-08-19 05:02:00 INFO: 2020-08-19 05:02:00 INFO: clearing start 2020-08-19 05:02:01 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-19 05:02:01 INFO: skip by not found init order into storage 2020-08-19 05:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-19 05:02:01 INFO: skip by not found init order into storage 2020-08-19 05:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '29dca35f-8f05-1e43-2813-419d07ee8535', 'clOrdID': '7765c75107f8470983eb6d01c3cf125e', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 232, 'price': None, 'displayQty': None, 'stopPx': 416.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 17, 10, 1, 824000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 17, 10, 1, 824000, tzinfo=tzutc())} 2020-08-19 05:02:01 INFO: skip by not found init order into storage 2020-08-19 05:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '26a12c69-08c2-0301-c2fe-8f55eadd3988', 'clOrdID': '312a919427914511a225e24287cbd8ce', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 232, 'price': 465.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 17, 10, 1, 866000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 17, 10, 1, 866000, tzinfo=tzutc())} 2020-08-19 05:02:01 INFO: skip by not found init order into storage 2020-08-19 05:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '9825ef44-a190-3337-a342-ce7aa98ca15d', 'clOrdID': '55c58d17399e4e76b804940ac48672ee', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 776, 'price': None, 'displayQty': None, 'stopPx': 429.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': 776, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 22, 7, 10, 670000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 22, 7, 10, 670000, tzinfo=tzutc())} 2020-08-19 05:02:01 INFO: skip by not found init order into storage 2020-08-19 05:02:01 INFO: fetch_orders_for_clearing test order {'orderID': 'e109dd97-e9ca-3cc7-8621-46cd9b551902', 'clOrdID': 'db118e5f9adf470eb82743f7d97772fd', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 776, 'price': 412.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': 776, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 22, 7, 10, 711000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 22, 7, 10, 711000, tzinfo=tzutc())} 2020-08-19 05:02:01 INFO: skip by not found init order into storage 2020-08-19 05:02:01 INFO: clearing end 2020-08-19 05:02:01 INFO: 2020-08-19 05:02:01 INFO: 2020-08-19 05:02:01 INFO: 2020-08-19 05:02:01 INFO: 2020-08-19 06:00:20 INFO: 2020-08-19 06:00:20 INFO: 2020-08-19 06:00:20 INFO: 2020-08-19 06:00:20 INFO: 2020-08-19 06:00:20 INFO: init new order start 2020-08-19 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 19, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 423.8, 'high': 424.45, 'low': 420.0, 'close': 421.25, 'trades': 4621, 'volume': 2272976, 'vwap': 421.97, 'lastSize': 3, 'turnover': 95911078750, 'homeNotional': 27113.14025256032, 'foreignNotional': 11440765.895887297}, {'timestamp': datetime.datetime(2020, 8, 19, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 424.85, 'high': 427.25, 'low': 423.6, 'close': 423.8, 'trades': 2817, 'volume': 2338381, 'vwap': 425.48, 'lastSize': 704, 'turnover': 99492145535, 'homeNotional': 28055.4605299446, 'foreignNotional': 11936908.756961964}, {'timestamp': datetime.datetime(2020, 8, 19, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 422.85, 'high': 425.1, 'low': 421.05, 'close': 424.85, 'trades': 4855, 'volume': 3390103, 'vwap': 423.2, 'lastSize': 100, 'turnover': 143465984370, 'homeNotional': 40570.51342860335, 'foreignNotional': 17169100.435106713}] 2020-08-19 06:00:20 INFO: prepare candles [CandleItem(low=420.0, high=424.45, open=423.8, close=421.25, color='RED'), CandleItem(low=423.6, high=427.25, open=424.85, close=423.8, color='RED'), CandleItem(low=421.05, high=425.1, open=422.85, close=424.85, color='GREEN')] 2020-08-19 06:00:20 INFO: skip by colors first_candle=CandleItem(low=421.05, high=425.1, open=422.85, close=424.85, color='GREEN') second_candle=CandleItem(low=423.6, high=427.25, open=424.85, close=423.8, color='RED') last_candle=CandleItem(low=420.0, high=424.45, open=423.8, close=421.25, color='RED') 2020-08-19 06:00:20 INFO: check need new order None 2020-08-19 06:00:20 INFO: init new order end 2020-08-19 06:00:20 INFO: 2020-08-19 06:00:20 INFO: 2020-08-19 06:00:20 INFO: 2020-08-19 06:00:20 INFO: 2020-08-19 06:02:00 INFO: 2020-08-19 06:02:00 INFO: 2020-08-19 06:02:00 INFO: 2020-08-19 06:02:00 INFO: 2020-08-19 06:02:00 INFO: clearing start 2020-08-19 06:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-19 06:02:00 INFO: skip by not found init order into storage 2020-08-19 06:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-19 06:02:00 INFO: skip by not found init order into storage 2020-08-19 06:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '29dca35f-8f05-1e43-2813-419d07ee8535', 'clOrdID': '7765c75107f8470983eb6d01c3cf125e', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 232, 'price': None, 'displayQty': None, 'stopPx': 416.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 17, 10, 1, 824000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 17, 10, 1, 824000, tzinfo=tzutc())} 2020-08-19 06:02:00 INFO: skip by not found init order into storage 2020-08-19 06:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '26a12c69-08c2-0301-c2fe-8f55eadd3988', 'clOrdID': '312a919427914511a225e24287cbd8ce', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 232, 'price': 465.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': 232, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 17, 10, 1, 866000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 17, 10, 1, 866000, tzinfo=tzutc())} 2020-08-19 06:02:00 INFO: skip by not found init order into storage 2020-08-19 06:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '9825ef44-a190-3337-a342-ce7aa98ca15d', 'clOrdID': '55c58d17399e4e76b804940ac48672ee', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 776, 'price': None, 'displayQty': None, 'stopPx': 429.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': 776, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 22, 7, 10, 670000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 22, 7, 10, 670000, tzinfo=tzutc())} 2020-08-19 06:02:00 INFO: skip by not found init order into storage 2020-08-19 06:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'e109dd97-e9ca-3cc7-8621-46cd9b551902', 'clOrdID': 'db118e5f9adf470eb82743f7d97772fd', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 776, 'price': 412.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': 776, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 22, 7, 10, 711000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 22, 7, 10, 711000, tzinfo=tzutc())} 2020-08-19 06:02:00 INFO: skip by not found init order into storage 2020-08-19 06:02:00 INFO: clearing end 2020-08-19 06:02:00 INFO: 2020-08-19 06:02:00 INFO: 2020-08-19 06:02:00 INFO: 2020-08-19 06:02:00 INFO: 2020-08-19 06:48:44 INFO: process event {'orderID': '29dca35f-8f05-1e43-2813-419d07ee8535', 'triggered': 'StopOrderTriggered', 'text': 'Triggered: Order stop price reached\nStop order by trader.py', 'timestamp': '2020-08-19T03:48:44.670Z', 'clOrdID': '7765c75107f8470983eb6d01c3cf125e', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-19 06:48:44 INFO: skip event 7765c75107f8470983eb6d01c3cf125e 2020-08-19 06:48:44 INFO: process event {'orderID': '29dca35f-8f05-1e43-2813-419d07ee8535', 'price': 416.5, 'ordStatus': 'Filled', 'leavesQty': 0, 'cumQty': 232, 'avgPx': 416.5, 'transactTime': '2020-08-19T03:48:44.670Z', 'clOrdID': '7765c75107f8470983eb6d01c3cf125e', 'account': 605536, 'symbol': 'ETHUSD', 'timestamp': '2020-08-19T03:48:44.670Z'} 2020-08-19 06:48:44 INFO: add new event={'uid': '7765c75107f8470983eb6d01c3cf125e', 'status': 'Filled'} 2020-08-19 06:48:45 INFO: 2020-08-19 06:48:45 INFO: 2020-08-19 06:48:45 INFO: 2020-08-19 06:48:45 INFO: 2020-08-19 06:48:45 INFO: process event start 2020-08-19 06:48:45 INFO: fetch new order event 7765c75107f8470983eb6d01c3cf125e 2020-08-19 06:48:45 INFO: fetch orders by event init=None profit_pair=312a919427914511a225e24287cbd8ce 2020-08-19 06:48:45 INFO: process profit order filled 2020-08-19 06:48:45 INFO: process event {'orderID': '26a12c69-08c2-0301-c2fe-8f55eadd3988', 'ordStatus': 'Canceled', 'workingIndicator': False, 'leavesQty': 0, 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'timestamp': '2020-08-19T03:48:45.155Z', 'clOrdID': '312a919427914511a225e24287cbd8ce', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-19 06:48:45 INFO: skip event 312a919427914511a225e24287cbd8ce Canceled 2020-08-19 06:48:45 INFO: cancel order=312a919427914511a225e24287cbd8ce [{'orderID': '26a12c69-08c2-0301-c2fe-8f55eadd3988', 'clOrdID': '312a919427914511a225e24287cbd8ce', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 232, 'price': 465.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, 8, 18, 17, 10, 1, 866000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 19, 3, 48, 45, 155000, tzinfo=tzutc())}] 2020-08-19 06:48:45 INFO: end process event_processing_result='proceed profit order' 2020-08-19 06:48:45 INFO: 2020-08-19 06:48:45 INFO: 2020-08-19 06:48:45 INFO: 2020-08-19 06:48:45 INFO: 2020-08-19 07:00:20 INFO: 2020-08-19 07:00:20 INFO: 2020-08-19 07:00:20 INFO: 2020-08-19 07:00:20 INFO: 2020-08-19 07:00:20 INFO: init new order start 2020-08-19 07:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 19, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 421.25, 'high': 422.9, 'low': 415.35, 'close': 415.8, 'trades': 6136, 'volume': 4535377, 'vwap': 418.89, 'lastSize': 2, 'turnover': 189980425940, 'homeNotional': 53925.301447769845, 'foreignNotional': 22588766.29561803}, {'timestamp': datetime.datetime(2020, 8, 19, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 423.8, 'high': 424.45, 'low': 420.0, 'close': 421.25, 'trades': 4621, 'volume': 2272976, 'vwap': 421.97, 'lastSize': 3, 'turnover': 95911078750, 'homeNotional': 27113.14025256032, 'foreignNotional': 11440765.895887297}, {'timestamp': datetime.datetime(2020, 8, 19, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 424.85, 'high': 427.25, 'low': 423.6, 'close': 423.8, 'trades': 2817, 'volume': 2338381, 'vwap': 425.48, 'lastSize': 704, 'turnover': 99492145535, 'homeNotional': 28055.4605299446, 'foreignNotional': 11936908.756961964}] 2020-08-19 07:00:21 INFO: prepare candles [CandleItem(low=415.35, high=422.9, open=421.25, close=415.8, color='RED'), CandleItem(low=420.0, high=424.45, open=423.8, close=421.25, color='RED'), CandleItem(low=423.6, high=427.25, open=424.85, close=423.8, color='RED')] 2020-08-19 07:00:21 INFO: skip by colors first_candle=CandleItem(low=423.6, high=427.25, open=424.85, close=423.8, color='RED') second_candle=CandleItem(low=420.0, high=424.45, open=423.8, close=421.25, color='RED') last_candle=CandleItem(low=415.35, high=422.9, open=421.25, close=415.8, color='RED') 2020-08-19 07:00:21 INFO: check need new order None 2020-08-19 07:00:21 INFO: init new order end 2020-08-19 07:00:21 INFO: 2020-08-19 07:00:21 INFO: 2020-08-19 07:00:21 INFO: 2020-08-19 07:00:21 INFO: 2020-08-19 07:02:00 INFO: 2020-08-19 07:02:00 INFO: 2020-08-19 07:02:00 INFO: 2020-08-19 07:02:00 INFO: 2020-08-19 07:02:00 INFO: clearing start 2020-08-19 07:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': None, 'displayQty': None, 'stopPx': 413.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': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 759000, tzinfo=tzutc())} 2020-08-19 07:02:00 INFO: skip by not found init order into storage 2020-08-19 07:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 250, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc())} 2020-08-19 07:02:00 INFO: skip by not found init order into storage 2020-08-19 07:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '9825ef44-a190-3337-a342-ce7aa98ca15d', 'clOrdID': '55c58d17399e4e76b804940ac48672ee', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 776, 'price': None, 'displayQty': None, 'stopPx': 429.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': 776, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 22, 7, 10, 670000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 22, 7, 10, 670000, tzinfo=tzutc())} 2020-08-19 07:02:00 INFO: skip by not found init order into storage 2020-08-19 07:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'e109dd97-e9ca-3cc7-8621-46cd9b551902', 'clOrdID': 'db118e5f9adf470eb82743f7d97772fd', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 776, 'price': 412.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': 776, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 18, 22, 7, 10, 711000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 18, 22, 7, 10, 711000, tzinfo=tzutc())} 2020-08-19 07:02:00 INFO: skip by not found init order into storage 2020-08-19 07:02:00 INFO: clearing end 2020-08-19 07:02:00 INFO: 2020-08-19 07:02:00 INFO: 2020-08-19 07:02:00 INFO: 2020-08-19 07:02:00 INFO: 2020-08-19 07:16:47 INFO: process event {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'triggered': 'StopOrderTriggered', 'text': 'Triggered: Order stop price reached\nStop order by trader.py', 'timestamp': '2020-08-19T04:16:47.878Z', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-19 07:16:47 INFO: skip event f1009cdf07fb4fc89622a32c9a521c18 2020-08-19 07:16:47 INFO: process event {'orderID': 'd6bb3f56-3163-1859-e798-7f3b6e0d5909', 'price': 413.1, 'ordStatus': 'Filled', 'leavesQty': 0, 'cumQty': 250, 'avgPx': 413.1, 'transactTime': '2020-08-19T04:16:47.878Z', 'clOrdID': 'f1009cdf07fb4fc89622a32c9a521c18', 'account': 605536, 'symbol': 'ETHUSD', 'timestamp': '2020-08-19T04:16:47.878Z'} 2020-08-19 07:16:47 INFO: add new event={'uid': 'f1009cdf07fb4fc89622a32c9a521c18', 'status': 'Filled'} 2020-08-19 07:16:48 INFO: 2020-08-19 07:16:48 INFO: 2020-08-19 07:16:48 INFO: 2020-08-19 07:16:48 INFO: 2020-08-19 07:16:48 INFO: process event start 2020-08-19 07:16:48 INFO: fetch new order event f1009cdf07fb4fc89622a32c9a521c18 2020-08-19 07:16:48 INFO: fetch orders by event init=None profit_pair=aba77a429f13473a9efe6f2e07555853 2020-08-19 07:16:48 INFO: process profit order filled 2020-08-19 07:16:49 INFO: process event {'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'ordStatus': 'Canceled', 'workingIndicator': False, 'leavesQty': 0, 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'timestamp': '2020-08-19T04:16:49.845Z', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-19 07:16:49 INFO: skip event aba77a429f13473a9efe6f2e07555853 Canceled 2020-08-19 07:16:49 INFO: cancel order=aba77a429f13473a9efe6f2e07555853 [{'orderID': '5452103e-8eee-e801-fc76-2b6b4558b625', 'clOrdID': 'aba77a429f13473a9efe6f2e07555853', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 250, 'price': 458.55, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'Canceled', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 0, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 16, 13, 8, 10, 801000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 19, 4, 16, 49, 845000, tzinfo=tzutc())}] 2020-08-19 07:16:49 INFO: end process event_processing_result='proceed profit order' 2020-08-19 07:16:49 INFO: 2020-08-19 07:16:49 INFO: 2020-08-19 07:16:49 INFO: 2020-08-19 07:16:49 INFO: 2020-08-19 07:17:04 INFO: process event {'orderID': 'e109dd97-e9ca-3cc7-8621-46cd9b551902', 'ordStatus': 'Filled', 'workingIndicator': False, 'leavesQty': 0, 'cumQty': 776, 'avgPx': 412.6, 'timestamp': '2020-08-19T04:17:04.557Z', 'clOrdID': 'db118e5f9adf470eb82743f7d97772fd', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-19 07:17:04 INFO: add new event={'uid': 'db118e5f9adf470eb82743f7d97772fd', 'status': 'Filled'} 2020-08-19 07:17:04 INFO: 2020-08-19 07:17:04 INFO: 2020-08-19 07:17:04 INFO: 2020-08-19 07:17:04 INFO: 2020-08-19 07:17:04 INFO: process event start 2020-08-19 07:17:04 INFO: fetch new order event db118e5f9adf470eb82743f7d97772fd 2020-08-19 07:17:04 INFO: fetch orders by event init=None profit_pair=55c58d17399e4e76b804940ac48672ee 2020-08-19 07:17:04 INFO: process profit order filled 2020-08-19 07:17:05 INFO: cancel order=55c58d17399e4e76b804940ac48672ee [{'orderID': '9825ef44-a190-3337-a342-ce7aa98ca15d', 'clOrdID': '55c58d17399e4e76b804940ac48672ee', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 776, 'price': None, 'displayQty': None, 'stopPx': 429.5, '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, 18, 22, 7, 10, 670000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 19, 4, 17, 5, 308000, tzinfo=tzutc())}] 2020-08-19 07:17:05 INFO: end process event_processing_result='proceed profit order' 2020-08-19 07:17:05 INFO: 2020-08-19 07:17:05 INFO: 2020-08-19 07:17:05 INFO: 2020-08-19 07:17:05 INFO: 2020-08-19 07:17:05 INFO: process event {'orderID': '9825ef44-a190-3337-a342-ce7aa98ca15d', 'ordStatus': 'Canceled', 'leavesQty': 0, 'text': 'Canceled: Cancel order by trader.py\nStop order by trader.py', 'timestamp': '2020-08-19T04:17:05.308Z', 'clOrdID': '55c58d17399e4e76b804940ac48672ee', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-19 07:17:05 INFO: skip event 55c58d17399e4e76b804940ac48672ee Canceled 2020-08-19 08:00:20 INFO: 2020-08-19 08:00:20 INFO: 2020-08-19 08:00:20 INFO: 2020-08-19 08:00:20 INFO: 2020-08-19 08:00:20 INFO: init new order start 2020-08-19 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 19, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 415.8, 'high': 417.3, 'low': 406.25, 'close': 412.7, 'trades': 14202, 'volume': 11988018, 'vwap': 412.0, 'lastSize': 5000, 'turnover': 493894691030, 'homeNotional': 141078.6412828597, 'foreignNotional': 58124413.020208925}, {'timestamp': datetime.datetime(2020, 8, 19, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 421.25, 'high': 422.9, 'low': 415.35, 'close': 415.8, 'trades': 6136, 'volume': 4535377, 'vwap': 418.89, 'lastSize': 2, 'turnover': 189980425940, 'homeNotional': 53925.301447769845, 'foreignNotional': 22588766.29561803}, {'timestamp': datetime.datetime(2020, 8, 19, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 423.8, 'high': 424.45, 'low': 420.0, 'close': 421.25, 'trades': 4621, 'volume': 2272976, 'vwap': 421.97, 'lastSize': 3, 'turnover': 95911078750, 'homeNotional': 27113.14025256032, 'foreignNotional': 11440765.895887297}] 2020-08-19 08:00:20 INFO: prepare candles [CandleItem(low=406.25, high=417.3, open=415.8, close=412.7, color='RED'), CandleItem(low=415.35, high=422.9, open=421.25, close=415.8, color='RED'), CandleItem(low=420.0, high=424.45, open=423.8, close=421.25, color='RED')] 2020-08-19 08:00:20 INFO: skip by colors first_candle=CandleItem(low=420.0, high=424.45, open=423.8, close=421.25, color='RED') second_candle=CandleItem(low=415.35, high=422.9, open=421.25, close=415.8, color='RED') last_candle=CandleItem(low=406.25, high=417.3, open=415.8, close=412.7, color='RED') 2020-08-19 08:00:20 INFO: check need new order None 2020-08-19 08:00:20 INFO: init new order end 2020-08-19 08:00:20 INFO: 2020-08-19 08:00:20 INFO: 2020-08-19 08:00:20 INFO: 2020-08-19 08:00:20 INFO: 2020-08-19 08:02:00 INFO: 2020-08-19 08:02:00 INFO: 2020-08-19 08:02:00 INFO: 2020-08-19 08:02:00 INFO: 2020-08-19 08:02:00 INFO: clearing start 2020-08-19 08:02:00 INFO: clearing end 2020-08-19 08:02:00 INFO: 2020-08-19 08:02:00 INFO: 2020-08-19 08:02:00 INFO: 2020-08-19 08:02:00 INFO: 2020-08-19 09:00:20 INFO: 2020-08-19 09:00:20 INFO: 2020-08-19 09:00:20 INFO: 2020-08-19 09:00:20 INFO: 2020-08-19 09:00:20 INFO: init new order start 2020-08-19 09:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 19, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 412.7, 'high': 413.65, 'low': 407.65, 'close': 409.2, 'trades': 5806, 'volume': 3978130, 'vwap': 410.73, 'lastSize': 854, 'turnover': 163391525840, 'homeNotional': 46705.55316043275, 'foreignNotional': 19183217.340603556}, {'timestamp': datetime.datetime(2020, 8, 19, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 415.8, 'high': 417.3, 'low': 406.25, 'close': 412.7, 'trades': 14202, 'volume': 11988018, 'vwap': 412.0, 'lastSize': 5000, 'turnover': 493894691030, 'homeNotional': 141078.6412828597, 'foreignNotional': 58124413.020208925}, {'timestamp': datetime.datetime(2020, 8, 19, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 421.25, 'high': 422.9, 'low': 415.35, 'close': 415.8, 'trades': 6136, 'volume': 4535377, 'vwap': 418.89, 'lastSize': 2, 'turnover': 189980425940, 'homeNotional': 53925.301447769845, 'foreignNotional': 22588766.29561803}] 2020-08-19 09:00:20 INFO: prepare candles [CandleItem(low=407.65, high=413.65, open=412.7, close=409.2, color='RED'), CandleItem(low=406.25, high=417.3, open=415.8, close=412.7, color='RED'), CandleItem(low=415.35, high=422.9, open=421.25, close=415.8, color='RED')] 2020-08-19 09:00:20 INFO: skip by colors first_candle=CandleItem(low=415.35, high=422.9, open=421.25, close=415.8, color='RED') second_candle=CandleItem(low=406.25, high=417.3, open=415.8, close=412.7, color='RED') last_candle=CandleItem(low=407.65, high=413.65, open=412.7, close=409.2, color='RED') 2020-08-19 09:00:20 INFO: check need new order None 2020-08-19 09:00:20 INFO: init new order end 2020-08-19 09:00:20 INFO: 2020-08-19 09:00:20 INFO: 2020-08-19 09:00:20 INFO: 2020-08-19 09:00:20 INFO: 2020-08-19 09:02:00 INFO: 2020-08-19 09:02:00 INFO: 2020-08-19 09:02:00 INFO: 2020-08-19 09:02:00 INFO: 2020-08-19 09:02:00 INFO: clearing start 2020-08-19 09:02:00 INFO: clearing end 2020-08-19 09:02:00 INFO: 2020-08-19 09:02:00 INFO: 2020-08-19 09:02:00 INFO: 2020-08-19 09:02:00 INFO: 2020-08-19 10:00:20 INFO: 2020-08-19 10:00:20 INFO: 2020-08-19 10:00:20 INFO: 2020-08-19 10:00:20 INFO: 2020-08-19 10:00:20 INFO: init new order start 2020-08-19 10:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 19, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 409.2, 'high': 410.5, 'low': 402.1, 'close': 408.9, 'trades': 13260, 'volume': 12774270, 'vwap': 406.65, 'lastSize': 3, 'turnover': 519459417415, 'homeNotional': 149366.39160255832, 'foreignNotional': 60739661.45587314}, {'timestamp': datetime.datetime(2020, 8, 19, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 412.7, 'high': 413.65, 'low': 407.65, 'close': 409.2, 'trades': 5806, 'volume': 3978130, 'vwap': 410.73, 'lastSize': 854, 'turnover': 163391525840, 'homeNotional': 46705.55316043275, 'foreignNotional': 19183217.340603556}, {'timestamp': datetime.datetime(2020, 8, 19, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 415.8, 'high': 417.3, 'low': 406.25, 'close': 412.7, 'trades': 14202, 'volume': 11988018, 'vwap': 412.0, 'lastSize': 5000, 'turnover': 493894691030, 'homeNotional': 141078.6412828597, 'foreignNotional': 58124413.020208925}] 2020-08-19 10:00:20 INFO: prepare candles [CandleItem(low=402.1, high=410.5, open=409.2, close=408.9, color='RED'), CandleItem(low=407.65, high=413.65, open=412.7, close=409.2, color='RED'), CandleItem(low=406.25, high=417.3, open=415.8, close=412.7, color='RED')] 2020-08-19 10:00:20 INFO: skip by colors first_candle=CandleItem(low=406.25, high=417.3, open=415.8, close=412.7, color='RED') second_candle=CandleItem(low=407.65, high=413.65, open=412.7, close=409.2, color='RED') last_candle=CandleItem(low=402.1, high=410.5, open=409.2, close=408.9, color='RED') 2020-08-19 10:00:20 INFO: check need new order None 2020-08-19 10:00:20 INFO: init new order end 2020-08-19 10:00:20 INFO: 2020-08-19 10:00:20 INFO: 2020-08-19 10:00:20 INFO: 2020-08-19 10:00:20 INFO: 2020-08-19 10:02:00 INFO: 2020-08-19 10:02:00 INFO: 2020-08-19 10:02:00 INFO: 2020-08-19 10:02:00 INFO: 2020-08-19 10:02:00 INFO: clearing start 2020-08-19 10:02:00 INFO: clearing end 2020-08-19 10:02:00 INFO: 2020-08-19 10:02:00 INFO: 2020-08-19 10:02:00 INFO: 2020-08-19 10:02:00 INFO: 2020-08-19 11:00:20 INFO: 2020-08-19 11:00:20 INFO: 2020-08-19 11:00:20 INFO: 2020-08-19 11:00:20 INFO: 2020-08-19 11:00:20 INFO: init new order start 2020-08-19 11:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 19, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 408.9, 'high': 413.45, 'low': 407.75, 'close': 413.4, 'trades': 4352, 'volume': 3823654, 'vwap': 410.81, 'lastSize': 40, 'turnover': 157076626200, 'homeNotional': 45005.08083210634, 'foreignNotional': 18488281.372218676}, {'timestamp': datetime.datetime(2020, 8, 19, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 409.2, 'high': 410.5, 'low': 402.1, 'close': 408.9, 'trades': 13260, 'volume': 12774270, 'vwap': 406.65, 'lastSize': 3, 'turnover': 519459417415, 'homeNotional': 149366.39160255832, 'foreignNotional': 60739661.45587314}, {'timestamp': datetime.datetime(2020, 8, 19, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 412.7, 'high': 413.65, 'low': 407.65, 'close': 409.2, 'trades': 5806, 'volume': 3978130, 'vwap': 410.73, 'lastSize': 854, 'turnover': 163391525840, 'homeNotional': 46705.55316043275, 'foreignNotional': 19183217.340603556}] 2020-08-19 11:00:20 INFO: prepare candles [CandleItem(low=407.75, high=413.45, open=408.9, close=413.4, color='GREEN'), CandleItem(low=402.1, high=410.5, open=409.2, close=408.9, color='RED'), CandleItem(low=407.65, high=413.65, open=412.7, close=409.2, color='RED')] 2020-08-19 11:00:20 INFO: last_candle=CandleItem(low=407.75, high=413.45, open=408.9, close=413.4, color='GREEN') 2020-08-19 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-19 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=407.75, high=413.45, open=408.9, close=413.4, color='GREEN') 2020-08-19 11:00:20 INFO: skip by CandleItem(low=407.75, high=413.45, open=408.9, close=413.4, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-19 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-19 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=407.75, high=413.45, open=408.9, close=413.4, color='GREEN') 2020-08-19 11:00:20 INFO: skip by CandleItem(low=407.75, high=413.45, open=408.9, close=413.4, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-19 11:00:20 INFO: not found applicable config for candle 2020-08-19 11:00:20 INFO: check need new order None 2020-08-19 11:00:20 INFO: init new order end 2020-08-19 11:00:20 INFO: 2020-08-19 11:00:20 INFO: 2020-08-19 11:00:20 INFO: 2020-08-19 11:00:20 INFO: 2020-08-19 11:02:00 INFO: 2020-08-19 11:02:00 INFO: 2020-08-19 11:02:00 INFO: 2020-08-19 11:02:00 INFO: 2020-08-19 11:02:00 INFO: clearing start 2020-08-19 11:02:00 INFO: clearing end 2020-08-19 11:02:00 INFO: 2020-08-19 11:02:00 INFO: 2020-08-19 11:02:00 INFO: 2020-08-19 11:02:00 INFO: 2020-08-19 12:00:20 INFO: 2020-08-19 12:00:20 INFO: 2020-08-19 12:00:20 INFO: 2020-08-19 12:00:20 INFO: 2020-08-19 12:00:20 INFO: init new order start 2020-08-19 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 19, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 413.4, 'high': 414.8, 'low': 412.0, 'close': 413.15, 'trades': 4186, 'volume': 3037143, 'vwap': 413.16, 'lastSize': 76, 'turnover': 125481091515, 'homeNotional': 35871.85448785971, 'foreignNotional': 14820668.289470827}, {'timestamp': datetime.datetime(2020, 8, 19, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 408.9, 'high': 413.45, 'low': 407.75, 'close': 413.4, 'trades': 4352, 'volume': 3823654, 'vwap': 410.81, 'lastSize': 40, 'turnover': 157076626200, 'homeNotional': 45005.08083210634, 'foreignNotional': 18488281.372218676}, {'timestamp': datetime.datetime(2020, 8, 19, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 409.2, 'high': 410.5, 'low': 402.1, 'close': 408.9, 'trades': 13260, 'volume': 12774270, 'vwap': 406.65, 'lastSize': 3, 'turnover': 519459417415, 'homeNotional': 149366.39160255832, 'foreignNotional': 60739661.45587314}] 2020-08-19 12:00:20 INFO: prepare candles [CandleItem(low=412.0, high=414.8, open=413.4, close=413.15, color='RED'), CandleItem(low=407.75, high=413.45, open=408.9, close=413.4, color='GREEN'), CandleItem(low=402.1, high=410.5, open=409.2, close=408.9, color='RED')] 2020-08-19 12:00:20 INFO: skip by colors first_candle=CandleItem(low=402.1, high=410.5, open=409.2, close=408.9, color='RED') second_candle=CandleItem(low=407.75, high=413.45, open=408.9, close=413.4, color='GREEN') last_candle=CandleItem(low=412.0, high=414.8, open=413.4, close=413.15, color='RED') 2020-08-19 12:00:20 INFO: check need new order None 2020-08-19 12:00:20 INFO: init new order end 2020-08-19 12:00:20 INFO: 2020-08-19 12:00:20 INFO: 2020-08-19 12:00:20 INFO: 2020-08-19 12:00:20 INFO: 2020-08-19 12:02:00 INFO: 2020-08-19 12:02:00 INFO: 2020-08-19 12:02:00 INFO: 2020-08-19 12:02:00 INFO: 2020-08-19 12:02:00 INFO: clearing start 2020-08-19 12:02:00 INFO: clearing end 2020-08-19 12:02:00 INFO: 2020-08-19 12:02:00 INFO: 2020-08-19 12:02:00 INFO: 2020-08-19 12:02:00 INFO: 2020-08-19 13:00:20 INFO: 2020-08-19 13:00:20 INFO: 2020-08-19 13:00:20 INFO: 2020-08-19 13:00:20 INFO: 2020-08-19 13:00:20 INFO: init new order start 2020-08-19 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 19, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 413.15, 'high': 416.45, 'low': 413.15, 'close': 413.95, 'trades': 3641, 'volume': 2574991, 'vwap': 415.03, 'lastSize': 500, 'turnover': 106868564675, 'homeNotional': 30442.19093743376, 'foreignNotional': 12634291.749887122}, {'timestamp': datetime.datetime(2020, 8, 19, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 413.4, 'high': 414.8, 'low': 412.0, 'close': 413.15, 'trades': 4186, 'volume': 3037143, 'vwap': 413.16, 'lastSize': 76, 'turnover': 125481091515, 'homeNotional': 35871.85448785971, 'foreignNotional': 14820668.289470827}, {'timestamp': datetime.datetime(2020, 8, 19, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 408.9, 'high': 413.45, 'low': 407.75, 'close': 413.4, 'trades': 4352, 'volume': 3823654, 'vwap': 410.81, 'lastSize': 40, 'turnover': 157076626200, 'homeNotional': 45005.08083210634, 'foreignNotional': 18488281.372218676}] 2020-08-19 13:00:20 INFO: prepare candles [CandleItem(low=413.15, high=416.45, open=413.15, close=413.95, color='GREEN'), CandleItem(low=412.0, high=414.8, open=413.4, close=413.15, color='RED'), CandleItem(low=407.75, high=413.45, open=408.9, close=413.4, color='GREEN')] 2020-08-19 13:00:20 INFO: skip by colors first_candle=CandleItem(low=407.75, high=413.45, open=408.9, close=413.4, color='GREEN') second_candle=CandleItem(low=412.0, high=414.8, open=413.4, close=413.15, color='RED') last_candle=CandleItem(low=413.15, high=416.45, open=413.15, close=413.95, color='GREEN') 2020-08-19 13:00:20 INFO: check need new order None 2020-08-19 13:00:20 INFO: init new order end 2020-08-19 13:00:20 INFO: 2020-08-19 13:00:20 INFO: 2020-08-19 13:00:20 INFO: 2020-08-19 13:00:20 INFO: 2020-08-19 13:02:00 INFO: 2020-08-19 13:02:00 INFO: 2020-08-19 13:02:00 INFO: 2020-08-19 13:02:00 INFO: 2020-08-19 13:02:00 INFO: clearing start 2020-08-19 13:02:01 INFO: clearing end 2020-08-19 13:02:01 INFO: 2020-08-19 13:02:01 INFO: 2020-08-19 13:02:01 INFO: 2020-08-19 13:02:01 INFO: 2020-08-19 14:00:20 INFO: 2020-08-19 14:00:20 INFO: 2020-08-19 14:00:20 INFO: 2020-08-19 14:00:20 INFO: 2020-08-19 14:00:20 INFO: init new order start 2020-08-19 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 19, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 413.95, 'high': 414.1, 'low': 409.45, 'close': 412.6, 'trades': 4316, 'volume': 2346961, 'vwap': 411.72, 'lastSize': 500, 'turnover': 96626844150, 'homeNotional': 27626.21991680995, 'foreignNotional': 11374035.879784124}, {'timestamp': datetime.datetime(2020, 8, 19, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 413.15, 'high': 416.45, 'low': 413.15, 'close': 413.95, 'trades': 3641, 'volume': 2574991, 'vwap': 415.03, 'lastSize': 500, 'turnover': 106868564675, 'homeNotional': 30442.19093743376, 'foreignNotional': 12634291.749887122}, {'timestamp': datetime.datetime(2020, 8, 19, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 413.4, 'high': 414.8, 'low': 412.0, 'close': 413.15, 'trades': 4186, 'volume': 3037143, 'vwap': 413.16, 'lastSize': 76, 'turnover': 125481091515, 'homeNotional': 35871.85448785971, 'foreignNotional': 14820668.289470827}] 2020-08-19 14:00:20 INFO: prepare candles [CandleItem(low=409.45, high=414.1, open=413.95, close=412.6, color='RED'), CandleItem(low=413.15, high=416.45, open=413.15, close=413.95, color='GREEN'), CandleItem(low=412.0, high=414.8, open=413.4, close=413.15, color='RED')] 2020-08-19 14:00:20 INFO: skip by colors first_candle=CandleItem(low=412.0, high=414.8, open=413.4, close=413.15, color='RED') second_candle=CandleItem(low=413.15, high=416.45, open=413.15, close=413.95, color='GREEN') last_candle=CandleItem(low=409.45, high=414.1, open=413.95, close=412.6, color='RED') 2020-08-19 14:00:20 INFO: check need new order None 2020-08-19 14:00:20 INFO: init new order end 2020-08-19 14:00:20 INFO: 2020-08-19 14:00:20 INFO: 2020-08-19 14:00:20 INFO: 2020-08-19 14:00:20 INFO: 2020-08-19 14:02:00 INFO: 2020-08-19 14:02:00 INFO: 2020-08-19 14:02:00 INFO: 2020-08-19 14:02:00 INFO: 2020-08-19 14:02:00 INFO: clearing start 2020-08-19 14:02:00 INFO: clearing end 2020-08-19 14:02:00 INFO: 2020-08-19 14:02:00 INFO: 2020-08-19 14:02:00 INFO: 2020-08-19 14:02:00 INFO: 2020-08-19 15:00:20 INFO: 2020-08-19 15:00:20 INFO: 2020-08-19 15:00:20 INFO: 2020-08-19 15:00:20 INFO: 2020-08-19 15:00:20 INFO: init new order start 2020-08-19 15:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 19, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 412.6, 'high': 416.3, 'low': 411.4, 'close': 413.35, 'trades': 4139, 'volume': 2780776, 'vwap': 413.94, 'lastSize': 20, 'turnover': 115104838265, 'homeNotional': 32921.68940587825, 'foreignNotional': 13627351.157335639}, {'timestamp': datetime.datetime(2020, 8, 19, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 413.95, 'high': 414.1, 'low': 409.45, 'close': 412.6, 'trades': 4316, 'volume': 2346961, 'vwap': 411.72, 'lastSize': 500, 'turnover': 96626844150, 'homeNotional': 27626.21991680995, 'foreignNotional': 11374035.879784124}, {'timestamp': datetime.datetime(2020, 8, 19, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 413.15, 'high': 416.45, 'low': 413.15, 'close': 413.95, 'trades': 3641, 'volume': 2574991, 'vwap': 415.03, 'lastSize': 500, 'turnover': 106868564675, 'homeNotional': 30442.19093743376, 'foreignNotional': 12634291.749887122}] 2020-08-19 15:00:21 INFO: prepare candles [CandleItem(low=411.4, high=416.3, open=412.6, close=413.35, color='GREEN'), CandleItem(low=409.45, high=414.1, open=413.95, close=412.6, color='RED'), CandleItem(low=413.15, high=416.45, open=413.15, close=413.95, color='GREEN')] 2020-08-19 15:00:21 INFO: skip by colors first_candle=CandleItem(low=413.15, high=416.45, open=413.15, close=413.95, color='GREEN') second_candle=CandleItem(low=409.45, high=414.1, open=413.95, close=412.6, color='RED') last_candle=CandleItem(low=411.4, high=416.3, open=412.6, close=413.35, color='GREEN') 2020-08-19 15:00:21 INFO: check need new order None 2020-08-19 15:00:21 INFO: init new order end 2020-08-19 15:00:21 INFO: 2020-08-19 15:00:21 INFO: 2020-08-19 15:00:21 INFO: 2020-08-19 15:00:21 INFO: 2020-08-19 15:02:00 INFO: 2020-08-19 15:02:00 INFO: 2020-08-19 15:02:00 INFO: 2020-08-19 15:02:00 INFO: 2020-08-19 15:02:00 INFO: clearing start 2020-08-19 15:02:00 INFO: clearing end 2020-08-19 15:02:00 INFO: 2020-08-19 15:02:00 INFO: 2020-08-19 15:02:00 INFO: 2020-08-19 15:02:00 INFO: 2020-08-19 16:00:20 INFO: 2020-08-19 16:00:20 INFO: 2020-08-19 16:00:20 INFO: 2020-08-19 16:00:20 INFO: 2020-08-19 16:00:20 INFO: init new order start 2020-08-19 16:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 19, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 413.35, 'high': 414.75, 'low': 411.7, 'close': 412.9, 'trades': 3891, 'volume': 1575699, 'vwap': 413.06, 'lastSize': 25, 'turnover': 65084777950, 'homeNotional': 18655.19984288832, 'foreignNotional': 7705602.155529439}, {'timestamp': datetime.datetime(2020, 8, 19, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 412.6, 'high': 416.3, 'low': 411.4, 'close': 413.35, 'trades': 4139, 'volume': 2780776, 'vwap': 413.94, 'lastSize': 20, 'turnover': 115104838265, 'homeNotional': 32921.68940587825, 'foreignNotional': 13627351.157335639}, {'timestamp': datetime.datetime(2020, 8, 19, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 413.95, 'high': 414.1, 'low': 409.45, 'close': 412.6, 'trades': 4316, 'volume': 2346961, 'vwap': 411.72, 'lastSize': 500, 'turnover': 96626844150, 'homeNotional': 27626.21991680995, 'foreignNotional': 11374035.879784124}] 2020-08-19 16:00:20 INFO: prepare candles [CandleItem(low=411.7, high=414.75, open=413.35, close=412.9, color='RED'), CandleItem(low=411.4, high=416.3, open=412.6, close=413.35, color='GREEN'), CandleItem(low=409.45, high=414.1, open=413.95, close=412.6, color='RED')] 2020-08-19 16:00:20 INFO: skip by colors first_candle=CandleItem(low=409.45, high=414.1, open=413.95, close=412.6, color='RED') second_candle=CandleItem(low=411.4, high=416.3, open=412.6, close=413.35, color='GREEN') last_candle=CandleItem(low=411.7, high=414.75, open=413.35, close=412.9, color='RED') 2020-08-19 16:00:20 INFO: check need new order None 2020-08-19 16:00:20 INFO: init new order end 2020-08-19 16:00:20 INFO: 2020-08-19 16:00:20 INFO: 2020-08-19 16:00:20 INFO: 2020-08-19 16:00:20 INFO: 2020-08-19 16:02:00 INFO: 2020-08-19 16:02:00 INFO: 2020-08-19 16:02:00 INFO: 2020-08-19 16:02:00 INFO: 2020-08-19 16:02:00 INFO: clearing start 2020-08-19 16:02:00 INFO: clearing end 2020-08-19 16:02:00 INFO: 2020-08-19 16:02:00 INFO: 2020-08-19 16:02:00 INFO: 2020-08-19 16:02:00 INFO: 2020-08-19 17:00:20 INFO: 2020-08-19 17:00:20 INFO: 2020-08-19 17:00:20 INFO: 2020-08-19 17:00:20 INFO: 2020-08-19 17:00:20 INFO: init new order start 2020-08-19 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 19, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 412.9, 'high': 415.95, 'low': 410.15, 'close': 412.75, 'trades': 4985, 'volume': 2790836, 'vwap': 413.1, 'lastSize': 13, 'turnover': 115287596375, 'homeNotional': 33109.23951754708, 'foreignNotional': 13677304.061908543}, {'timestamp': datetime.datetime(2020, 8, 19, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 413.35, 'high': 414.75, 'low': 411.7, 'close': 412.9, 'trades': 3891, 'volume': 1575699, 'vwap': 413.06, 'lastSize': 25, 'turnover': 65084777950, 'homeNotional': 18655.19984288832, 'foreignNotional': 7705602.155529439}, {'timestamp': datetime.datetime(2020, 8, 19, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 412.6, 'high': 416.3, 'low': 411.4, 'close': 413.35, 'trades': 4139, 'volume': 2780776, 'vwap': 413.94, 'lastSize': 20, 'turnover': 115104838265, 'homeNotional': 32921.68940587825, 'foreignNotional': 13627351.157335639}] 2020-08-19 17:00:20 INFO: prepare candles [CandleItem(low=410.15, high=415.95, open=412.9, close=412.75, color='RED'), CandleItem(low=411.7, high=414.75, open=413.35, close=412.9, color='RED'), CandleItem(low=411.4, high=416.3, open=412.6, close=413.35, color='GREEN')] 2020-08-19 17:00:20 INFO: skip by colors first_candle=CandleItem(low=411.4, high=416.3, open=412.6, close=413.35, color='GREEN') second_candle=CandleItem(low=411.7, high=414.75, open=413.35, close=412.9, color='RED') last_candle=CandleItem(low=410.15, high=415.95, open=412.9, close=412.75, color='RED') 2020-08-19 17:00:20 INFO: check need new order None 2020-08-19 17:00:20 INFO: init new order end 2020-08-19 17:00:20 INFO: 2020-08-19 17:00:20 INFO: 2020-08-19 17:00:20 INFO: 2020-08-19 17:00:20 INFO: 2020-08-19 17:02:00 INFO: 2020-08-19 17:02:00 INFO: 2020-08-19 17:02:00 INFO: 2020-08-19 17:02:00 INFO: 2020-08-19 17:02:00 INFO: clearing start 2020-08-19 17:02:00 INFO: clearing end 2020-08-19 17:02:00 INFO: 2020-08-19 17:02:00 INFO: 2020-08-19 17:02:00 INFO: 2020-08-19 17:02:00 INFO: 2020-08-19 18:00:20 INFO: 2020-08-19 18:00:20 INFO: 2020-08-19 18:00:20 INFO: 2020-08-19 18:00:20 INFO: 2020-08-19 18:00:20 INFO: init new order start 2020-08-19 18:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 19, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 412.75, 'high': 414.65, 'low': 408.2, 'close': 409.2, 'trades': 5361, 'volume': 3152310, 'vwap': 412.22, 'lastSize': 1, 'turnover': 129941522655, 'homeNotional': 37297.079358931136, 'foreignNotional': 15374470.88118855}, {'timestamp': datetime.datetime(2020, 8, 19, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 412.9, 'high': 415.95, 'low': 410.15, 'close': 412.75, 'trades': 4985, 'volume': 2790836, 'vwap': 413.1, 'lastSize': 13, 'turnover': 115287596375, 'homeNotional': 33109.23951754708, 'foreignNotional': 13677304.061908543}, {'timestamp': datetime.datetime(2020, 8, 19, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 413.35, 'high': 414.75, 'low': 411.7, 'close': 412.9, 'trades': 3891, 'volume': 1575699, 'vwap': 413.06, 'lastSize': 25, 'turnover': 65084777950, 'homeNotional': 18655.19984288832, 'foreignNotional': 7705602.155529439}] 2020-08-19 18:00:21 INFO: prepare candles [CandleItem(low=408.2, high=414.65, open=412.75, close=409.2, color='RED'), CandleItem(low=410.15, high=415.95, open=412.9, close=412.75, color='RED'), CandleItem(low=411.7, high=414.75, open=413.35, close=412.9, color='RED')] 2020-08-19 18:00:21 INFO: skip by colors first_candle=CandleItem(low=411.7, high=414.75, open=413.35, close=412.9, color='RED') second_candle=CandleItem(low=410.15, high=415.95, open=412.9, close=412.75, color='RED') last_candle=CandleItem(low=408.2, high=414.65, open=412.75, close=409.2, color='RED') 2020-08-19 18:00:21 INFO: check need new order None 2020-08-19 18:00:21 INFO: init new order end 2020-08-19 18:00:21 INFO: 2020-08-19 18:00:21 INFO: 2020-08-19 18:00:21 INFO: 2020-08-19 18:00:21 INFO: 2020-08-19 18:02:00 INFO: 2020-08-19 18:02:00 INFO: 2020-08-19 18:02:00 INFO: 2020-08-19 18:02:00 INFO: 2020-08-19 18:02:00 INFO: clearing start 2020-08-19 18:02:00 INFO: clearing end 2020-08-19 18:02:00 INFO: 2020-08-19 18:02:00 INFO: 2020-08-19 18:02:00 INFO: 2020-08-19 18:02:00 INFO: 2020-08-19 19:00:20 INFO: 2020-08-19 19:00:20 INFO: 2020-08-19 19:00:20 INFO: 2020-08-19 19:00:20 INFO: 2020-08-19 19:00:20 INFO: init new order start 2020-08-19 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 19, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 409.2, 'high': 412.15, 'low': 406.75, 'close': 410.35, 'trades': 6576, 'volume': 4088122, 'vwap': 409.09, 'lastSize': 779, 'turnover': 167237519020, 'homeNotional': 48001.12866572929, 'foreignNotional': 19636427.40590056}, {'timestamp': datetime.datetime(2020, 8, 19, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 412.75, 'high': 414.65, 'low': 408.2, 'close': 409.2, 'trades': 5361, 'volume': 3152310, 'vwap': 412.22, 'lastSize': 1, 'turnover': 129941522655, 'homeNotional': 37297.079358931136, 'foreignNotional': 15374470.88118855}, {'timestamp': datetime.datetime(2020, 8, 19, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 412.9, 'high': 415.95, 'low': 410.15, 'close': 412.75, 'trades': 4985, 'volume': 2790836, 'vwap': 413.1, 'lastSize': 13, 'turnover': 115287596375, 'homeNotional': 33109.23951754708, 'foreignNotional': 13677304.061908543}] 2020-08-19 19:00:20 INFO: prepare candles [CandleItem(low=406.75, high=412.15, open=409.2, close=410.35, color='GREEN'), CandleItem(low=408.2, high=414.65, open=412.75, close=409.2, color='RED'), CandleItem(low=410.15, high=415.95, open=412.9, close=412.75, color='RED')] 2020-08-19 19:00:20 INFO: last_candle=CandleItem(low=406.75, high=412.15, open=409.2, close=410.35, color='GREEN') 2020-08-19 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-08-19 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=406.75, high=412.15, open=409.2, close=410.35, color='GREEN') 2020-08-19 19:00:20 INFO: skip by CandleItem(low=406.75, high=412.15, open=409.2, close=410.35, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-19 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-08-19 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=406.75, high=412.15, open=409.2, close=410.35, color='GREEN') 2020-08-19 19:00:20 INFO: skip by CandleItem(low=406.75, high=412.15, open=409.2, close=410.35, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-19 19:00:20 INFO: not found applicable config for candle 2020-08-19 19:00:20 INFO: check need new order None 2020-08-19 19:00:20 INFO: init new order end 2020-08-19 19:00:20 INFO: 2020-08-19 19:00:20 INFO: 2020-08-19 19:00:20 INFO: 2020-08-19 19:00:20 INFO: 2020-08-19 19:02:00 INFO: 2020-08-19 19:02:00 INFO: 2020-08-19 19:02:00 INFO: 2020-08-19 19:02:00 INFO: 2020-08-19 19:02:00 INFO: clearing start 2020-08-19 19:02:01 INFO: clearing end 2020-08-19 19:02:01 INFO: 2020-08-19 19:02:01 INFO: 2020-08-19 19:02:01 INFO: 2020-08-19 19:02:01 INFO: 2020-08-19 20:00:20 INFO: 2020-08-19 20:00:20 INFO: 2020-08-19 20:00:20 INFO: 2020-08-19 20:00:20 INFO: 2020-08-19 20:00:20 INFO: init new order start 2020-08-19 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 19, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 410.35, 'high': 412.55, 'low': 402.0, 'close': 408.1, 'trades': 9823, 'volume': 6211573, 'vwap': 406.94, 'lastSize': 64, 'turnover': 252769140170, 'homeNotional': 72740.5816150455, 'foreignNotional': 29600995.35026548}, {'timestamp': datetime.datetime(2020, 8, 19, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 409.2, 'high': 412.15, 'low': 406.75, 'close': 410.35, 'trades': 6576, 'volume': 4088122, 'vwap': 409.09, 'lastSize': 779, 'turnover': 167237519020, 'homeNotional': 48001.12866572929, 'foreignNotional': 19636427.40590056}, {'timestamp': datetime.datetime(2020, 8, 19, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 412.75, 'high': 414.65, 'low': 408.2, 'close': 409.2, 'trades': 5361, 'volume': 3152310, 'vwap': 412.22, 'lastSize': 1, 'turnover': 129941522655, 'homeNotional': 37297.079358931136, 'foreignNotional': 15374470.88118855}] 2020-08-19 20:00:20 INFO: prepare candles [CandleItem(low=402.0, high=412.55, open=410.35, close=408.1, color='RED'), CandleItem(low=406.75, high=412.15, open=409.2, close=410.35, color='GREEN'), CandleItem(low=408.2, high=414.65, open=412.75, close=409.2, color='RED')] 2020-08-19 20:00:20 INFO: skip by colors first_candle=CandleItem(low=408.2, high=414.65, open=412.75, close=409.2, color='RED') second_candle=CandleItem(low=406.75, high=412.15, open=409.2, close=410.35, color='GREEN') last_candle=CandleItem(low=402.0, high=412.55, open=410.35, close=408.1, color='RED') 2020-08-19 20:00:20 INFO: check need new order None 2020-08-19 20:00:20 INFO: init new order end 2020-08-19 20:00:20 INFO: 2020-08-19 20:00:20 INFO: 2020-08-19 20:00:20 INFO: 2020-08-19 20:00:20 INFO: 2020-08-19 20:02:00 INFO: 2020-08-19 20:02:00 INFO: 2020-08-19 20:02:00 INFO: 2020-08-19 20:02:00 INFO: 2020-08-19 20:02:00 INFO: clearing start 2020-08-19 20:02:00 INFO: clearing end 2020-08-19 20:02:00 INFO: 2020-08-19 20:02:00 INFO: 2020-08-19 20:02:00 INFO: 2020-08-19 20:02:00 INFO: 2020-08-19 21:00:20 INFO: 2020-08-19 21:00:20 INFO: 2020-08-19 21:00:20 INFO: 2020-08-19 21:00:20 INFO: 2020-08-19 21:00:20 INFO: init new order start 2020-08-19 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 19, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 408.1, 'high': 409.0, 'low': 405.15, 'close': 408.75, 'trades': 3574, 'volume': 2131075, 'vwap': 407.48, 'lastSize': 5000, 'turnover': 86836677610, 'homeNotional': 25040.95537269271, 'foreignNotional': 10203675.746121876}, {'timestamp': datetime.datetime(2020, 8, 19, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 410.35, 'high': 412.55, 'low': 402.0, 'close': 408.1, 'trades': 9823, 'volume': 6211573, 'vwap': 406.94, 'lastSize': 64, 'turnover': 252769140170, 'homeNotional': 72740.5816150455, 'foreignNotional': 29600995.35026548}, {'timestamp': datetime.datetime(2020, 8, 19, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 409.2, 'high': 412.15, 'low': 406.75, 'close': 410.35, 'trades': 6576, 'volume': 4088122, 'vwap': 409.09, 'lastSize': 779, 'turnover': 167237519020, 'homeNotional': 48001.12866572929, 'foreignNotional': 19636427.40590056}] 2020-08-19 21:00:20 INFO: prepare candles [CandleItem(low=405.15, high=409.0, open=408.1, close=408.75, color='GREEN'), CandleItem(low=402.0, high=412.55, open=410.35, close=408.1, color='RED'), CandleItem(low=406.75, high=412.15, open=409.2, close=410.35, color='GREEN')] 2020-08-19 21:00:20 INFO: skip by colors first_candle=CandleItem(low=406.75, high=412.15, open=409.2, close=410.35, color='GREEN') second_candle=CandleItem(low=402.0, high=412.55, open=410.35, close=408.1, color='RED') last_candle=CandleItem(low=405.15, high=409.0, open=408.1, close=408.75, color='GREEN') 2020-08-19 21:00:20 INFO: check need new order None 2020-08-19 21:00:20 INFO: init new order end 2020-08-19 21:00:20 INFO: 2020-08-19 21:00:20 INFO: 2020-08-19 21:00:20 INFO: 2020-08-19 21:00:20 INFO: 2020-08-19 21:02:00 INFO: 2020-08-19 21:02:00 INFO: 2020-08-19 21:02:00 INFO: 2020-08-19 21:02:00 INFO: 2020-08-19 21:02:00 INFO: clearing start 2020-08-19 21:02:00 INFO: clearing end 2020-08-19 21:02:00 INFO: 2020-08-19 21:02:00 INFO: 2020-08-19 21:02:00 INFO: 2020-08-19 21:02:00 INFO: 2020-08-19 22:00:20 INFO: 2020-08-19 22:00:20 INFO: 2020-08-19 22:00:20 INFO: 2020-08-19 22:00:20 INFO: 2020-08-19 22:00:20 INFO: init new order start 2020-08-19 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 19, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 408.75, 'high': 408.8, 'low': 400.35, 'close': 405.0, 'trades': 8137, 'volume': 5918666, 'vwap': 403.82, 'lastSize': 13, 'turnover': 239005306910, 'homeNotional': 69290.12722794006, 'foreignNotional': 27980768.25343342}, {'timestamp': datetime.datetime(2020, 8, 19, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 408.1, 'high': 409.0, 'low': 405.15, 'close': 408.75, 'trades': 3574, 'volume': 2131075, 'vwap': 407.48, 'lastSize': 5000, 'turnover': 86836677610, 'homeNotional': 25040.95537269271, 'foreignNotional': 10203675.746121876}, {'timestamp': datetime.datetime(2020, 8, 19, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 410.35, 'high': 412.55, 'low': 402.0, 'close': 408.1, 'trades': 9823, 'volume': 6211573, 'vwap': 406.94, 'lastSize': 64, 'turnover': 252769140170, 'homeNotional': 72740.5816150455, 'foreignNotional': 29600995.35026548}] 2020-08-19 22:00:20 INFO: prepare candles [CandleItem(low=400.35, high=408.8, open=408.75, close=405.0, color='RED'), CandleItem(low=405.15, high=409.0, open=408.1, close=408.75, color='GREEN'), CandleItem(low=402.0, high=412.55, open=410.35, close=408.1, color='RED')] 2020-08-19 22:00:20 INFO: skip by colors first_candle=CandleItem(low=402.0, high=412.55, open=410.35, close=408.1, color='RED') second_candle=CandleItem(low=405.15, high=409.0, open=408.1, close=408.75, color='GREEN') last_candle=CandleItem(low=400.35, high=408.8, open=408.75, close=405.0, color='RED') 2020-08-19 22:00:20 INFO: check need new order None 2020-08-19 22:00:20 INFO: init new order end 2020-08-19 22:00:20 INFO: 2020-08-19 22:00:20 INFO: 2020-08-19 22:00:20 INFO: 2020-08-19 22:00:20 INFO: 2020-08-19 22:02:00 INFO: 2020-08-19 22:02:00 INFO: 2020-08-19 22:02:00 INFO: 2020-08-19 22:02:00 INFO: 2020-08-19 22:02:00 INFO: clearing start 2020-08-19 22:02:00 INFO: clearing end 2020-08-19 22:02:00 INFO: 2020-08-19 22:02:00 INFO: 2020-08-19 22:02:00 INFO: 2020-08-19 22:02:00 INFO: 2020-08-19 23:00:20 INFO: 2020-08-19 23:00:20 INFO: 2020-08-19 23:00:20 INFO: 2020-08-19 23:00:20 INFO: 2020-08-19 23:00:20 INFO: init new order start 2020-08-19 23:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 19, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.0, 'high': 405.75, 'low': 395.85, 'close': 396.45, 'trades': 11803, 'volume': 11346084, 'vwap': 399.96, 'lastSize': 250, 'turnover': 453796373305, 'homeNotional': 132710.20847038837, 'foreignNotional': 53079095.9497162}, {'timestamp': datetime.datetime(2020, 8, 19, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 408.75, 'high': 408.8, 'low': 400.35, 'close': 405.0, 'trades': 8137, 'volume': 5918666, 'vwap': 403.82, 'lastSize': 13, 'turnover': 239005306910, 'homeNotional': 69290.12722794006, 'foreignNotional': 27980768.25343342}, {'timestamp': datetime.datetime(2020, 8, 19, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 408.1, 'high': 409.0, 'low': 405.15, 'close': 408.75, 'trades': 3574, 'volume': 2131075, 'vwap': 407.48, 'lastSize': 5000, 'turnover': 86836677610, 'homeNotional': 25040.95537269271, 'foreignNotional': 10203675.746121876}] 2020-08-19 23:00:20 INFO: prepare candles [CandleItem(low=395.85, high=405.75, open=405.0, close=396.45, color='RED'), CandleItem(low=400.35, high=408.8, open=408.75, close=405.0, color='RED'), CandleItem(low=405.15, high=409.0, open=408.1, close=408.75, color='GREEN')] 2020-08-19 23:00:20 INFO: skip by colors first_candle=CandleItem(low=405.15, high=409.0, open=408.1, close=408.75, color='GREEN') second_candle=CandleItem(low=400.35, high=408.8, open=408.75, close=405.0, color='RED') last_candle=CandleItem(low=395.85, high=405.75, open=405.0, close=396.45, color='RED') 2020-08-19 23:00:20 INFO: check need new order None 2020-08-19 23:00:20 INFO: init new order end 2020-08-19 23:00:20 INFO: 2020-08-19 23:00:20 INFO: 2020-08-19 23:00:20 INFO: 2020-08-19 23:00:20 INFO: 2020-08-19 23:02:00 INFO: 2020-08-19 23:02:00 INFO: 2020-08-19 23:02:00 INFO: 2020-08-19 23:02:00 INFO: 2020-08-19 23:02:00 INFO: clearing start 2020-08-19 23:02:00 INFO: clearing end 2020-08-19 23:02:00 INFO: 2020-08-19 23:02:00 INFO: 2020-08-19 23:02:00 INFO: 2020-08-19 23:02:00 INFO: 2020-08-20 00:00:20 INFO: 2020-08-20 00:00:20 INFO: 2020-08-20 00:00:20 INFO: 2020-08-20 00:00:20 INFO: 2020-08-20 00:00:20 INFO: init new order start 2020-08-20 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 19, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 396.45, 'high': 404.95, 'low': 391.8, 'close': 404.9, 'trades': 11965, 'volume': 12630113, 'vwap': 398.34, 'lastSize': 100, 'turnover': 503107658595, 'homeNotional': 147332.22560120188, 'foreignNotional': 58689348.33939247}, {'timestamp': datetime.datetime(2020, 8, 19, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.0, 'high': 405.75, 'low': 395.85, 'close': 396.45, 'trades': 11803, 'volume': 11346084, 'vwap': 399.96, 'lastSize': 250, 'turnover': 453796373305, 'homeNotional': 132710.20847038837, 'foreignNotional': 53079095.9497162}, {'timestamp': datetime.datetime(2020, 8, 19, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 408.75, 'high': 408.8, 'low': 400.35, 'close': 405.0, 'trades': 8137, 'volume': 5918666, 'vwap': 403.82, 'lastSize': 13, 'turnover': 239005306910, 'homeNotional': 69290.12722794006, 'foreignNotional': 27980768.25343342}] 2020-08-20 00:00:20 INFO: prepare candles [CandleItem(low=391.8, high=404.95, open=396.45, close=404.9, color='GREEN'), CandleItem(low=395.85, high=405.75, open=405.0, close=396.45, color='RED'), CandleItem(low=400.35, high=408.8, open=408.75, close=405.0, color='RED')] 2020-08-20 00:00:20 INFO: last_candle=CandleItem(low=391.8, high=404.95, open=396.45, close=404.9, color='GREEN') 2020-08-20 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-08-20 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=391.8, high=404.95, open=396.45, close=404.9, color='GREEN') 2020-08-20 00:00:20 INFO: skip by CandleItem(low=391.8, high=404.95, open=396.45, close=404.9, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-20 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-08-20 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=391.8, high=404.95, open=396.45, close=404.9, color='GREEN') 2020-08-20 00:00:20 INFO: skip by CandleItem(low=391.8, high=404.95, open=396.45, close=404.9, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-20 00:00:20 INFO: not found applicable config for candle 2020-08-20 00:00:20 INFO: check need new order None 2020-08-20 00:00:20 INFO: init new order end 2020-08-20 00:00:20 INFO: 2020-08-20 00:00:20 INFO: 2020-08-20 00:00:20 INFO: 2020-08-20 00:00:20 INFO: 2020-08-20 00:02:00 INFO: 2020-08-20 00:02:00 INFO: 2020-08-20 00:02:00 INFO: 2020-08-20 00:02:00 INFO: 2020-08-20 00:02:00 INFO: clearing start 2020-08-20 00:02:00 INFO: clearing end 2020-08-20 00:02:00 INFO: 2020-08-20 00:02:00 INFO: 2020-08-20 00:02:00 INFO: 2020-08-20 00:02:00 INFO: 2020-08-20 01:00:20 INFO: 2020-08-20 01:00:20 INFO: 2020-08-20 01:00:20 INFO: 2020-08-20 01:00:20 INFO: 2020-08-20 01:00:20 INFO: init new order start 2020-08-20 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 19, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 404.9, 'high': 409.1, 'low': 403.55, 'close': 405.45, 'trades': 6339, 'volume': 4317345, 'vwap': 406.49, 'lastSize': 10, 'turnover': 175492675735, 'homeNotional': 50687.09469736128, 'foreignNotional': 20603498.651002504}, {'timestamp': datetime.datetime(2020, 8, 19, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 396.45, 'high': 404.95, 'low': 391.8, 'close': 404.9, 'trades': 11965, 'volume': 12630113, 'vwap': 398.34, 'lastSize': 100, 'turnover': 503107658595, 'homeNotional': 147332.22560120188, 'foreignNotional': 58689348.33939247}, {'timestamp': datetime.datetime(2020, 8, 19, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.0, 'high': 405.75, 'low': 395.85, 'close': 396.45, 'trades': 11803, 'volume': 11346084, 'vwap': 399.96, 'lastSize': 250, 'turnover': 453796373305, 'homeNotional': 132710.20847038837, 'foreignNotional': 53079095.9497162}] 2020-08-20 01:00:20 INFO: prepare candles [CandleItem(low=403.55, high=409.1, open=404.9, close=405.45, color='GREEN'), CandleItem(low=391.8, high=404.95, open=396.45, close=404.9, color='GREEN'), CandleItem(low=395.85, high=405.75, open=405.0, close=396.45, color='RED')] 2020-08-20 01:00:20 INFO: skip by colors first_candle=CandleItem(low=395.85, high=405.75, open=405.0, close=396.45, color='RED') second_candle=CandleItem(low=391.8, high=404.95, open=396.45, close=404.9, color='GREEN') last_candle=CandleItem(low=403.55, high=409.1, open=404.9, close=405.45, color='GREEN') 2020-08-20 01:00:20 INFO: check need new order None 2020-08-20 01:00:20 INFO: init new order end 2020-08-20 01:00:20 INFO: 2020-08-20 01:00:20 INFO: 2020-08-20 01:00:20 INFO: 2020-08-20 01:00:20 INFO: 2020-08-20 01:02:00 INFO: 2020-08-20 01:02:00 INFO: 2020-08-20 01:02:00 INFO: 2020-08-20 01:02:00 INFO: 2020-08-20 01:02:00 INFO: clearing start 2020-08-20 01:02:00 INFO: clearing end 2020-08-20 01:02:00 INFO: 2020-08-20 01:02:00 INFO: 2020-08-20 01:02:00 INFO: 2020-08-20 01:02:00 INFO: 2020-08-20 02:00:20 INFO: 2020-08-20 02:00:20 INFO: 2020-08-20 02:00:20 INFO: 2020-08-20 02:00:20 INFO: 2020-08-20 02:00:20 INFO: init new order start 2020-08-20 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 19, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.45, 'high': 409.5, 'low': 405.2, 'close': 407.7, 'trades': 4208, 'volume': 2556418, 'vwap': 408.07, 'lastSize': 50, 'turnover': 104317784795, 'homeNotional': 30052.197060095372, 'foreignNotional': 12263205.806087935}, {'timestamp': datetime.datetime(2020, 8, 19, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 404.9, 'high': 409.1, 'low': 403.55, 'close': 405.45, 'trades': 6339, 'volume': 4317345, 'vwap': 406.49, 'lastSize': 10, 'turnover': 175492675735, 'homeNotional': 50687.09469736128, 'foreignNotional': 20603498.651002504}, {'timestamp': datetime.datetime(2020, 8, 19, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 396.45, 'high': 404.95, 'low': 391.8, 'close': 404.9, 'trades': 11965, 'volume': 12630113, 'vwap': 398.34, 'lastSize': 100, 'turnover': 503107658595, 'homeNotional': 147332.22560120188, 'foreignNotional': 58689348.33939247}] 2020-08-20 02:00:20 INFO: prepare candles [CandleItem(low=405.2, high=409.5, open=405.45, close=407.7, color='GREEN'), CandleItem(low=403.55, high=409.1, open=404.9, close=405.45, color='GREEN'), CandleItem(low=391.8, high=404.95, open=396.45, close=404.9, color='GREEN')] 2020-08-20 02:00:20 INFO: skip by colors first_candle=CandleItem(low=391.8, high=404.95, open=396.45, close=404.9, color='GREEN') second_candle=CandleItem(low=403.55, high=409.1, open=404.9, close=405.45, color='GREEN') last_candle=CandleItem(low=405.2, high=409.5, open=405.45, close=407.7, color='GREEN') 2020-08-20 02:00:20 INFO: check need new order None 2020-08-20 02:00:20 INFO: init new order end 2020-08-20 02:00:20 INFO: 2020-08-20 02:00:20 INFO: 2020-08-20 02:00:20 INFO: 2020-08-20 02:00:20 INFO: 2020-08-20 02:02:00 INFO: 2020-08-20 02:02:00 INFO: 2020-08-20 02:02:00 INFO: 2020-08-20 02:02:00 INFO: 2020-08-20 02:02:00 INFO: clearing start 2020-08-20 02:02:00 INFO: clearing end 2020-08-20 02:02:00 INFO: 2020-08-20 02:02:00 INFO: 2020-08-20 02:02:00 INFO: 2020-08-20 02:02:00 INFO: 2020-08-20 02:06:09 INFO: Websocket Closed 2020-08-20 02:06:10 WARNING: reconnect to socket 2020-08-20 02:06:10 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-08-20 02:06:10 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-08-20 02:06:10 INFO: Authenticating with API Key. 2020-08-20 02:06:11 INFO: Connected to WS. 2020-08-20 02:14:56 INFO: Websocket Closed 2020-08-20 02:14:56 WARNING: reconnect to socket 2020-08-20 02:14:56 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-08-20 02:14:56 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-08-20 02:14:56 INFO: Authenticating with API Key. 2020-08-20 02:14:57 INFO: Connected to WS. 2020-08-20 02:15:04 ERROR: Error : Connection is already closed. 2020-08-20 02:15:04 ERROR: error from callback >: Connection is already closed. 2020-08-20 02:15:04 INFO: Websocket Closed 2020-08-20 02:15:05 WARNING: reconnect to socket 2020-08-20 02:15:05 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-08-20 02:15:05 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-08-20 02:15:05 INFO: Authenticating with API Key. 2020-08-20 02:15:06 INFO: Connected to WS. 2020-08-20 03:00:20 INFO: 2020-08-20 03:00:20 INFO: 2020-08-20 03:00:20 INFO: 2020-08-20 03:00:20 INFO: 2020-08-20 03:00:20 INFO: init new order start 2020-08-20 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 20, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 407.7, 'high': 409.3, 'low': 405.95, 'close': 408.3, 'trades': 3407, 'volume': 2697265, 'vwap': 407.37, 'lastSize': 62, 'turnover': 109877453815, 'homeNotional': 31651.08541949213, 'foreignNotional': 12893592.607284408}, {'timestamp': datetime.datetime(2020, 8, 19, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.45, 'high': 409.5, 'low': 405.2, 'close': 407.7, 'trades': 4208, 'volume': 2556418, 'vwap': 408.07, 'lastSize': 50, 'turnover': 104317784795, 'homeNotional': 30052.197060095372, 'foreignNotional': 12263205.806087935}, {'timestamp': datetime.datetime(2020, 8, 19, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 404.9, 'high': 409.1, 'low': 403.55, 'close': 405.45, 'trades': 6339, 'volume': 4317345, 'vwap': 406.49, 'lastSize': 10, 'turnover': 175492675735, 'homeNotional': 50687.09469736128, 'foreignNotional': 20603498.651002504}] 2020-08-20 03:00:20 INFO: prepare candles [CandleItem(low=405.95, high=409.3, open=407.7, close=408.3, color='GREEN'), CandleItem(low=405.2, high=409.5, open=405.45, close=407.7, color='GREEN'), CandleItem(low=403.55, high=409.1, open=404.9, close=405.45, color='GREEN')] 2020-08-20 03:00:20 INFO: skip by colors first_candle=CandleItem(low=403.55, high=409.1, open=404.9, close=405.45, color='GREEN') second_candle=CandleItem(low=405.2, high=409.5, open=405.45, close=407.7, color='GREEN') last_candle=CandleItem(low=405.95, high=409.3, open=407.7, close=408.3, color='GREEN') 2020-08-20 03:00:20 INFO: check need new order None 2020-08-20 03:00:20 INFO: init new order end 2020-08-20 03:00:20 INFO: 2020-08-20 03:00:20 INFO: 2020-08-20 03:00:20 INFO: 2020-08-20 03:00:20 INFO: 2020-08-20 03:02:00 INFO: 2020-08-20 03:02:00 INFO: 2020-08-20 03:02:00 INFO: 2020-08-20 03:02:00 INFO: 2020-08-20 03:02:00 INFO: clearing start 2020-08-20 03:02:00 INFO: clearing end 2020-08-20 03:02:00 INFO: 2020-08-20 03:02:00 INFO: 2020-08-20 03:02:00 INFO: 2020-08-20 03:02:00 INFO: 2020-08-20 04:00:20 INFO: 2020-08-20 04:00:20 INFO: 2020-08-20 04:00:20 INFO: 2020-08-20 04:00:20 INFO: 2020-08-20 04:00:20 INFO: init new order start 2020-08-20 04:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 20, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 408.3, 'high': 415.75, 'low': 408.25, 'close': 412.15, 'trades': 7423, 'volume': 4981971, 'vwap': 412.67, 'lastSize': 8913, 'turnover': 205587943090, 'homeNotional': 58751.63098753851, 'foreignNotional': 24244802.215599496}, {'timestamp': datetime.datetime(2020, 8, 20, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 407.7, 'high': 409.3, 'low': 405.95, 'close': 408.3, 'trades': 3407, 'volume': 2697265, 'vwap': 407.37, 'lastSize': 62, 'turnover': 109877453815, 'homeNotional': 31651.08541949213, 'foreignNotional': 12893592.607284408}, {'timestamp': datetime.datetime(2020, 8, 19, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.45, 'high': 409.5, 'low': 405.2, 'close': 407.7, 'trades': 4208, 'volume': 2556418, 'vwap': 408.07, 'lastSize': 50, 'turnover': 104317784795, 'homeNotional': 30052.197060095372, 'foreignNotional': 12263205.806087935}] 2020-08-20 04:00:20 INFO: prepare candles [CandleItem(low=408.25, high=415.75, open=408.3, close=412.15, color='GREEN'), CandleItem(low=405.95, high=409.3, open=407.7, close=408.3, color='GREEN'), CandleItem(low=405.2, high=409.5, open=405.45, close=407.7, color='GREEN')] 2020-08-20 04:00:20 INFO: skip by colors first_candle=CandleItem(low=405.2, high=409.5, open=405.45, close=407.7, color='GREEN') second_candle=CandleItem(low=405.95, high=409.3, open=407.7, close=408.3, color='GREEN') last_candle=CandleItem(low=408.25, high=415.75, open=408.3, close=412.15, color='GREEN') 2020-08-20 04:00:20 INFO: check need new order None 2020-08-20 04:00:20 INFO: init new order end 2020-08-20 04:00:20 INFO: 2020-08-20 04:00:20 INFO: 2020-08-20 04:00:20 INFO: 2020-08-20 04:00:20 INFO: 2020-08-20 04:02:00 INFO: 2020-08-20 04:02:00 INFO: 2020-08-20 04:02:00 INFO: 2020-08-20 04:02:00 INFO: 2020-08-20 04:02:00 INFO: clearing start 2020-08-20 04:02:00 INFO: clearing end 2020-08-20 04:02:00 INFO: 2020-08-20 04:02:00 INFO: 2020-08-20 04:02:00 INFO: 2020-08-20 04:02:00 INFO: 2020-08-20 05:00:20 INFO: 2020-08-20 05:00:20 INFO: 2020-08-20 05:00:20 INFO: 2020-08-20 05:00:20 INFO: 2020-08-20 05:00:20 INFO: init new order start 2020-08-20 05:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 20, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 412.15, 'high': 414.2, 'low': 410.8, 'close': 410.8, 'trades': 3358, 'volume': 2197922, 'vwap': 412.45, 'lastSize': 2418, 'turnover': 90651943125, 'homeNotional': 25905.431791788928, 'foreignNotional': 10684559.957270665}, {'timestamp': datetime.datetime(2020, 8, 20, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 408.3, 'high': 415.75, 'low': 408.25, 'close': 412.15, 'trades': 7423, 'volume': 4981971, 'vwap': 412.67, 'lastSize': 8913, 'turnover': 205587943090, 'homeNotional': 58751.63098753851, 'foreignNotional': 24244802.215599496}, {'timestamp': datetime.datetime(2020, 8, 20, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 407.7, 'high': 409.3, 'low': 405.95, 'close': 408.3, 'trades': 3407, 'volume': 2697265, 'vwap': 407.37, 'lastSize': 62, 'turnover': 109877453815, 'homeNotional': 31651.08541949213, 'foreignNotional': 12893592.607284408}] 2020-08-20 05:00:21 INFO: prepare candles [CandleItem(low=410.8, high=414.2, open=412.15, close=410.8, color='RED'), CandleItem(low=408.25, high=415.75, open=408.3, close=412.15, color='GREEN'), CandleItem(low=405.95, high=409.3, open=407.7, close=408.3, color='GREEN')] 2020-08-20 05:00:21 INFO: last_candle=CandleItem(low=410.8, high=414.2, open=412.15, close=410.8, color='RED') 2020-08-20 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-08-20 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=410.8, high=414.2, open=412.15, close=410.8, color='RED') 2020-08-20 05:00:21 INFO: skip by CandleItem(low=410.8, high=414.2, open=412.15, close=410.8, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-20 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-08-20 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=410.8, high=414.2, open=412.15, close=410.8, color='RED') 2020-08-20 05:00:21 INFO: skip by CandleItem(low=410.8, high=414.2, open=412.15, close=410.8, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-20 05:00:21 INFO: not found applicable config for candle 2020-08-20 05:00:21 INFO: check need new order None 2020-08-20 05:00:21 INFO: init new order end 2020-08-20 05:00:21 INFO: 2020-08-20 05:00:21 INFO: 2020-08-20 05:00:21 INFO: 2020-08-20 05:00:21 INFO: 2020-08-20 05:02:00 INFO: 2020-08-20 05:02:00 INFO: 2020-08-20 05:02:00 INFO: 2020-08-20 05:02:00 INFO: 2020-08-20 05:02:00 INFO: clearing start 2020-08-20 05:02:00 INFO: clearing end 2020-08-20 05:02:00 INFO: 2020-08-20 05:02:00 INFO: 2020-08-20 05:02:00 INFO: 2020-08-20 05:02:00 INFO: 2020-08-20 06:00:20 INFO: 2020-08-20 06:00:20 INFO: 2020-08-20 06:00:20 INFO: 2020-08-20 06:00:20 INFO: 2020-08-20 06:00:20 INFO: init new order start 2020-08-20 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 20, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 410.8, 'high': 411.75, 'low': 407.45, 'close': 408.5, 'trades': 3013, 'volume': 2675198, 'vwap': 409.54, 'lastSize': 31, 'turnover': 109557582150, 'homeNotional': 31410.833711221025, 'foreignNotional': 12863762.366607301}, {'timestamp': datetime.datetime(2020, 8, 20, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 412.15, 'high': 414.2, 'low': 410.8, 'close': 410.8, 'trades': 3358, 'volume': 2197922, 'vwap': 412.45, 'lastSize': 2418, 'turnover': 90651943125, 'homeNotional': 25905.431791788928, 'foreignNotional': 10684559.957270665}, {'timestamp': datetime.datetime(2020, 8, 20, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 408.3, 'high': 415.75, 'low': 408.25, 'close': 412.15, 'trades': 7423, 'volume': 4981971, 'vwap': 412.67, 'lastSize': 8913, 'turnover': 205587943090, 'homeNotional': 58751.63098753851, 'foreignNotional': 24244802.215599496}] 2020-08-20 06:00:20 INFO: prepare candles [CandleItem(low=407.45, high=411.75, open=410.8, close=408.5, color='RED'), CandleItem(low=410.8, high=414.2, open=412.15, close=410.8, color='RED'), CandleItem(low=408.25, high=415.75, open=408.3, close=412.15, color='GREEN')] 2020-08-20 06:00:20 INFO: skip by colors first_candle=CandleItem(low=408.25, high=415.75, open=408.3, close=412.15, color='GREEN') second_candle=CandleItem(low=410.8, high=414.2, open=412.15, close=410.8, color='RED') last_candle=CandleItem(low=407.45, high=411.75, open=410.8, close=408.5, color='RED') 2020-08-20 06:00:20 INFO: check need new order None 2020-08-20 06:00:20 INFO: init new order end 2020-08-20 06:00:20 INFO: 2020-08-20 06:00:20 INFO: 2020-08-20 06:00:20 INFO: 2020-08-20 06:00:20 INFO: 2020-08-20 06:02:00 INFO: 2020-08-20 06:02:00 INFO: 2020-08-20 06:02:00 INFO: 2020-08-20 06:02:00 INFO: 2020-08-20 06:02:00 INFO: clearing start 2020-08-20 06:02:00 INFO: clearing end 2020-08-20 06:02:00 INFO: 2020-08-20 06:02:00 INFO: 2020-08-20 06:02:00 INFO: 2020-08-20 06:02:00 INFO: 2020-08-20 07:00:20 INFO: 2020-08-20 07:00:20 INFO: 2020-08-20 07:00:20 INFO: 2020-08-20 07:00:20 INFO: 2020-08-20 07:00:20 INFO: init new order start 2020-08-20 07:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 20, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 408.5, 'high': 409.95, 'low': 407.05, 'close': 407.5, 'trades': 2135, 'volume': 1482800, 'vwap': 408.18, 'lastSize': 2000, 'turnover': 60524630970, 'homeNotional': 17390.66896384009, 'foreignNotional': 7098503.147090767}, {'timestamp': datetime.datetime(2020, 8, 20, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 410.8, 'high': 411.75, 'low': 407.45, 'close': 408.5, 'trades': 3013, 'volume': 2675198, 'vwap': 409.54, 'lastSize': 31, 'turnover': 109557582150, 'homeNotional': 31410.833711221025, 'foreignNotional': 12863762.366607301}, {'timestamp': datetime.datetime(2020, 8, 20, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 412.15, 'high': 414.2, 'low': 410.8, 'close': 410.8, 'trades': 3358, 'volume': 2197922, 'vwap': 412.45, 'lastSize': 2418, 'turnover': 90651943125, 'homeNotional': 25905.431791788928, 'foreignNotional': 10684559.957270665}] 2020-08-20 07:00:20 INFO: prepare candles [CandleItem(low=407.05, high=409.95, open=408.5, close=407.5, color='RED'), CandleItem(low=407.45, high=411.75, open=410.8, close=408.5, color='RED'), CandleItem(low=410.8, high=414.2, open=412.15, close=410.8, color='RED')] 2020-08-20 07:00:20 INFO: skip by colors first_candle=CandleItem(low=410.8, high=414.2, open=412.15, close=410.8, color='RED') second_candle=CandleItem(low=407.45, high=411.75, open=410.8, close=408.5, color='RED') last_candle=CandleItem(low=407.05, high=409.95, open=408.5, close=407.5, color='RED') 2020-08-20 07:00:20 INFO: check need new order None 2020-08-20 07:00:20 INFO: init new order end 2020-08-20 07:00:20 INFO: 2020-08-20 07:00:20 INFO: 2020-08-20 07:00:20 INFO: 2020-08-20 07:00:20 INFO: 2020-08-20 07:02:00 INFO: 2020-08-20 07:02:00 INFO: 2020-08-20 07:02:00 INFO: 2020-08-20 07:02:00 INFO: 2020-08-20 07:02:00 INFO: clearing start 2020-08-20 07:02:00 INFO: clearing end 2020-08-20 07:02:00 INFO: 2020-08-20 07:02:00 INFO: 2020-08-20 07:02:00 INFO: 2020-08-20 07:02:00 INFO: 2020-08-20 08:00:20 INFO: 2020-08-20 08:00:20 INFO: 2020-08-20 08:00:20 INFO: 2020-08-20 08:00:20 INFO: 2020-08-20 08:00:20 INFO: init new order start 2020-08-20 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 20, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 407.5, 'high': 408.9, 'low': 404.95, 'close': 405.7, 'trades': 3883, 'volume': 2864253, 'vwap': 406.73, 'lastSize': 1, 'turnover': 116495450695, 'homeNotional': 33557.48166505259, 'foreignNotional': 13648581.220997373}, {'timestamp': datetime.datetime(2020, 8, 20, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 408.5, 'high': 409.95, 'low': 407.05, 'close': 407.5, 'trades': 2135, 'volume': 1482800, 'vwap': 408.18, 'lastSize': 2000, 'turnover': 60524630970, 'homeNotional': 17390.66896384009, 'foreignNotional': 7098503.147090767}, {'timestamp': datetime.datetime(2020, 8, 20, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 410.8, 'high': 411.75, 'low': 407.45, 'close': 408.5, 'trades': 3013, 'volume': 2675198, 'vwap': 409.54, 'lastSize': 31, 'turnover': 109557582150, 'homeNotional': 31410.833711221025, 'foreignNotional': 12863762.366607301}] 2020-08-20 08:00:20 INFO: prepare candles [CandleItem(low=404.95, high=408.9, open=407.5, close=405.7, color='RED'), CandleItem(low=407.05, high=409.95, open=408.5, close=407.5, color='RED'), CandleItem(low=407.45, high=411.75, open=410.8, close=408.5, color='RED')] 2020-08-20 08:00:20 INFO: skip by colors first_candle=CandleItem(low=407.45, high=411.75, open=410.8, close=408.5, color='RED') second_candle=CandleItem(low=407.05, high=409.95, open=408.5, close=407.5, color='RED') last_candle=CandleItem(low=404.95, high=408.9, open=407.5, close=405.7, color='RED') 2020-08-20 08:00:20 INFO: check need new order None 2020-08-20 08:00:20 INFO: init new order end 2020-08-20 08:00:20 INFO: 2020-08-20 08:00:20 INFO: 2020-08-20 08:00:20 INFO: 2020-08-20 08:00:20 INFO: 2020-08-20 08:02:00 INFO: 2020-08-20 08:02:00 INFO: 2020-08-20 08:02:00 INFO: 2020-08-20 08:02:00 INFO: 2020-08-20 08:02:00 INFO: clearing start 2020-08-20 08:02:00 INFO: clearing end 2020-08-20 08:02:00 INFO: 2020-08-20 08:02:00 INFO: 2020-08-20 08:02:00 INFO: 2020-08-20 08:02:00 INFO: 2020-08-20 09:00:20 INFO: 2020-08-20 09:00:20 INFO: 2020-08-20 09:00:20 INFO: 2020-08-20 09:00:20 INFO: 2020-08-20 09:00:20 INFO: init new order start 2020-08-20 09:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 20, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.7, 'high': 405.95, 'low': 403.5, 'close': 405.2, 'trades': 3129, 'volume': 2513714, 'vwap': 404.95, 'lastSize': 100, 'turnover': 101790527705, 'homeNotional': 29424.262277827907, 'foreignNotional': 11915091.358267885}, {'timestamp': datetime.datetime(2020, 8, 20, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 407.5, 'high': 408.9, 'low': 404.95, 'close': 405.7, 'trades': 3883, 'volume': 2864253, 'vwap': 406.73, 'lastSize': 1, 'turnover': 116495450695, 'homeNotional': 33557.48166505259, 'foreignNotional': 13648581.220997373}, {'timestamp': datetime.datetime(2020, 8, 20, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 408.5, 'high': 409.95, 'low': 407.05, 'close': 407.5, 'trades': 2135, 'volume': 1482800, 'vwap': 408.18, 'lastSize': 2000, 'turnover': 60524630970, 'homeNotional': 17390.66896384009, 'foreignNotional': 7098503.147090767}] 2020-08-20 09:00:20 INFO: prepare candles [CandleItem(low=403.5, high=405.95, open=405.7, close=405.2, color='RED'), CandleItem(low=404.95, high=408.9, open=407.5, close=405.7, color='RED'), CandleItem(low=407.05, high=409.95, open=408.5, close=407.5, color='RED')] 2020-08-20 09:00:20 INFO: skip by colors first_candle=CandleItem(low=407.05, high=409.95, open=408.5, close=407.5, color='RED') second_candle=CandleItem(low=404.95, high=408.9, open=407.5, close=405.7, color='RED') last_candle=CandleItem(low=403.5, high=405.95, open=405.7, close=405.2, color='RED') 2020-08-20 09:00:20 INFO: check need new order None 2020-08-20 09:00:20 INFO: init new order end 2020-08-20 09:00:20 INFO: 2020-08-20 09:00:20 INFO: 2020-08-20 09:00:20 INFO: 2020-08-20 09:00:20 INFO: 2020-08-20 09:02:00 INFO: 2020-08-20 09:02:00 INFO: 2020-08-20 09:02:00 INFO: 2020-08-20 09:02:00 INFO: 2020-08-20 09:02:00 INFO: clearing start 2020-08-20 09:02:00 INFO: clearing end 2020-08-20 09:02:00 INFO: 2020-08-20 09:02:00 INFO: 2020-08-20 09:02:00 INFO: 2020-08-20 09:02:00 INFO: 2020-08-20 10:00:20 INFO: 2020-08-20 10:00:20 INFO: 2020-08-20 10:00:20 INFO: 2020-08-20 10:00:20 INFO: 2020-08-20 10:00:20 INFO: init new order start 2020-08-20 10:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 20, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.2, 'high': 409.6, 'low': 402.95, 'close': 408.15, 'trades': 5036, 'volume': 3854824, 'vwap': 406.3, 'lastSize': 135, 'turnover': 156620172960, 'homeNotional': 45216.99875615459, 'foreignNotional': 18371803.49504059}, {'timestamp': datetime.datetime(2020, 8, 20, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.7, 'high': 405.95, 'low': 403.5, 'close': 405.2, 'trades': 3129, 'volume': 2513714, 'vwap': 404.95, 'lastSize': 100, 'turnover': 101790527705, 'homeNotional': 29424.262277827907, 'foreignNotional': 11915091.358267885}, {'timestamp': datetime.datetime(2020, 8, 20, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 407.5, 'high': 408.9, 'low': 404.95, 'close': 405.7, 'trades': 3883, 'volume': 2864253, 'vwap': 406.73, 'lastSize': 1, 'turnover': 116495450695, 'homeNotional': 33557.48166505259, 'foreignNotional': 13648581.220997373}] 2020-08-20 10:00:20 INFO: prepare candles [CandleItem(low=402.95, high=409.6, open=405.2, close=408.15, color='GREEN'), CandleItem(low=403.5, high=405.95, open=405.7, close=405.2, color='RED'), CandleItem(low=404.95, high=408.9, open=407.5, close=405.7, color='RED')] 2020-08-20 10:00:20 INFO: last_candle=CandleItem(low=402.95, high=409.6, open=405.2, close=408.15, color='GREEN') 2020-08-20 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-20 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=402.95, high=409.6, open=405.2, close=408.15, color='GREEN') 2020-08-20 10:00:20 INFO: skip by CandleItem(low=402.95, high=409.6, open=405.2, close=408.15, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-20 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-08-20 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=402.95, high=409.6, open=405.2, close=408.15, color='GREEN') 2020-08-20 10:00:20 INFO: apply filter None to candle=CandleItem(low=403.5, high=405.95, open=405.7, close=405.2, color='RED') 2020-08-20 10:00:20 INFO: apply filter None to candle=CandleItem(low=404.95, high=408.9, open=407.5, close=405.7, color='RED') 2020-08-20 10:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=402.95, high=409.6, open=405.2, close=408.15, color='GREEN'), take_profit_factor=5.0, clearing_interval=3600) 2020-08-20 10:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=402.95, high=409.6, open=405.2, close=408.15, color='GREEN'), take_profit_factor=5.0, clearing_interval=3600) 2020-08-20 10:00:20 INFO: place order: start candle=CandleItem(low=402.95, high=409.6, open=405.2, close=408.15, color='GREEN') ticker='ETHUSD' price_offset=0.1 2020-08-20 10:00:20 INFO: place order: side_factor=-1 init_trigger_price=409.65000000000003 init_order_price=409.70000000000005 stop_price_offset=0.0 candle.size=6.650000000000034 stop_price=402.95 take_price=442.9500000000002 2020-08-20 10:00:20 INFO: place order round: side_factor=-1 init_trigger_price=Decimal('409.65000000000003410605131648480892181396484375') init_order_price=Decimal('409.700000000000045474735088646411895751953125') stop_price_offset=0.0 candle.size=6.650000000000034 stop_price=Decimal('402.94999999999998863131622783839702606201171875') take_price=Decimal('442.95000000000021600499167107045650482177734375') 2020-08-20 10:00:20 INFO: place order: compute qty=284 2020-08-20 10:00:20 INFO: place order: save order to db 0d81284da372424f9b8d467e8652697b; response=True 2020-08-20 10:00:20 INFO: post order to exchange resp={'orderID': '9abd8214-8c65-85ba-d337-1e5cd43f8511', 'clOrdID': '0d81284da372424f9b8d467e8652697b', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 284, 'price': 409.7, 'displayQty': None, 'stopPx': 409.65, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 284, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 20, 7, 0, 20, 656000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 20, 7, 0, 20, 656000, tzinfo=tzutc())} 2020-08-20 10:00:20 INFO: place new init order {'qty': 284, 'init_price': Decimal('409.65000000000003410605131648480892181396484375'), 'stop_price': Decimal('402.94999999999998863131622783839702606201171875'), 'take_price': Decimal('442.95000000000021600499167107045650482177734375'), 'order_uid': '0d81284da372424f9b8d467e8652697b', 'response': {'orderID': '9abd8214-8c65-85ba-d337-1e5cd43f8511', 'clOrdID': '0d81284da372424f9b8d467e8652697b', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 284, 'price': 409.7, 'displayQty': None, 'stopPx': 409.65, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 284, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 20, 7, 0, 20, 656000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 20, 7, 0, 20, 656000, tzinfo=tzutc())}} 2020-08-20 10:00:20 INFO: init new order end 2020-08-20 10:00:20 INFO: 2020-08-20 10:00:20 INFO: 2020-08-20 10:00:20 INFO: 2020-08-20 10:00:20 INFO: 2020-08-20 10:00:20 INFO: process event {'orderID': '9abd8214-8c65-85ba-d337-1e5cd43f8511', 'clOrdID': '0d81284da372424f9b8d467e8652697b', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 284, 'price': 409.7, 'displayQty': None, 'stopPx': 409.65, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 284, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-08-20T07:00:20.656Z', 'timestamp': '2020-08-20T07:00:20.656Z'} 2020-08-20 10:00:20 INFO: skip event 0d81284da372424f9b8d467e8652697b New 2020-08-20 10:02:00 INFO: 2020-08-20 10:02:00 INFO: 2020-08-20 10:02:00 INFO: 2020-08-20 10:02:00 INFO: 2020-08-20 10:02:00 INFO: clearing start 2020-08-20 10:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '9abd8214-8c65-85ba-d337-1e5cd43f8511', 'clOrdID': '0d81284da372424f9b8d467e8652697b', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 284, 'price': 409.7, 'displayQty': None, 'stopPx': 409.65, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 284, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 20, 7, 0, 20, 656000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 20, 7, 0, 20, 656000, tzinfo=tzutc())} 2020-08-20 10:02:00 INFO: order time=2020-08-20 07:00:20.656000+00:00; delta from now UTC=0:01:40.194102 time_delta.total_seconds()=100.194102; time_diff_offset='3600' 2020-08-20 10:02:00 INFO: skip by time diff 2020-08-20 07:00:20.656000+00:00 2020-08-20 10:02:00 INFO: clearing end 2020-08-20 10:02:00 INFO: 2020-08-20 10:02:00 INFO: 2020-08-20 10:02:00 INFO: 2020-08-20 10:02:00 INFO: 2020-08-20 11:00:20 INFO: 2020-08-20 11:00:20 INFO: 2020-08-20 11:00:20 INFO: 2020-08-20 11:00:20 INFO: 2020-08-20 11:00:20 INFO: init new order start 2020-08-20 11:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 20, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 408.15, 'high': 408.35, 'low': 403.7, 'close': 404.55, 'trades': 3181, 'volume': 1900748, 'vwap': 406.27, 'lastSize': 10, 'turnover': 77220073260, 'homeNotional': 22317.0732262529, 'foreignNotional': 9066597.399802266}, {'timestamp': datetime.datetime(2020, 8, 20, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.2, 'high': 409.6, 'low': 402.95, 'close': 408.15, 'trades': 5036, 'volume': 3854824, 'vwap': 406.3, 'lastSize': 135, 'turnover': 156620172960, 'homeNotional': 45216.99875615459, 'foreignNotional': 18371803.49504059}, {'timestamp': datetime.datetime(2020, 8, 20, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.7, 'high': 405.95, 'low': 403.5, 'close': 405.2, 'trades': 3129, 'volume': 2513714, 'vwap': 404.95, 'lastSize': 100, 'turnover': 101790527705, 'homeNotional': 29424.262277827907, 'foreignNotional': 11915091.358267885}] 2020-08-20 11:00:20 INFO: prepare candles [CandleItem(low=403.7, high=408.35, open=408.15, close=404.55, color='RED'), CandleItem(low=402.95, high=409.6, open=405.2, close=408.15, color='GREEN'), CandleItem(low=403.5, high=405.95, open=405.7, close=405.2, color='RED')] 2020-08-20 11:00:20 INFO: skip by colors first_candle=CandleItem(low=403.5, high=405.95, open=405.7, close=405.2, color='RED') second_candle=CandleItem(low=402.95, high=409.6, open=405.2, close=408.15, color='GREEN') last_candle=CandleItem(low=403.7, high=408.35, open=408.15, close=404.55, color='RED') 2020-08-20 11:00:20 INFO: check need new order None 2020-08-20 11:00:20 INFO: init new order end 2020-08-20 11:00:20 INFO: 2020-08-20 11:00:20 INFO: 2020-08-20 11:00:20 INFO: 2020-08-20 11:00:20 INFO: 2020-08-20 11:02:00 INFO: 2020-08-20 11:02:00 INFO: 2020-08-20 11:02:00 INFO: 2020-08-20 11:02:00 INFO: 2020-08-20 11:02:00 INFO: clearing start 2020-08-20 11:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '9abd8214-8c65-85ba-d337-1e5cd43f8511', 'clOrdID': '0d81284da372424f9b8d467e8652697b', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 284, 'price': 409.7, 'displayQty': None, 'stopPx': 409.65, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 284, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 20, 7, 0, 20, 656000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 20, 7, 0, 20, 656000, tzinfo=tzutc())} 2020-08-20 11:02:00 INFO: order time=2020-08-20 07:00:20.656000+00:00; delta from now UTC=1:01:39.733163 time_delta.total_seconds()=3699.733163; time_diff_offset='3600' 2020-08-20 11:02:00 INFO: clear order 0d81284da372424f9b8d467e8652697b 2020-08-20 11:02:00 INFO: cancel order resp=[{'orderID': '9abd8214-8c65-85ba-d337-1e5cd43f8511', 'clOrdID': '0d81284da372424f9b8d467e8652697b', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 284, 'price': 409.7, 'displayQty': None, 'stopPx': 409.65, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'Canceled', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 0, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Canceled: cancelled by clearing\nInit order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 20, 7, 0, 20, 656000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 20, 8, 2, 0, 668000, tzinfo=tzutc())}] 2020-08-20 11:02:00 INFO: clearing end 2020-08-20 11:02:00 INFO: 2020-08-20 11:02:00 INFO: 2020-08-20 11:02:00 INFO: 2020-08-20 11:02:00 INFO: 2020-08-20 11:02:00 INFO: process event {'orderID': '9abd8214-8c65-85ba-d337-1e5cd43f8511', 'ordStatus': 'Canceled', 'leavesQty': 0, 'text': 'Canceled: cancelled by clearing\nInit order by supervisor.py', 'timestamp': '2020-08-20T08:02:00.668Z', 'clOrdID': '0d81284da372424f9b8d467e8652697b', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-20 11:02:00 INFO: skip event 0d81284da372424f9b8d467e8652697b Canceled 2020-08-20 12:00:20 INFO: 2020-08-20 12:00:20 INFO: 2020-08-20 12:00:20 INFO: 2020-08-20 12:00:20 INFO: 2020-08-20 12:00:20 INFO: init new order start 2020-08-20 12:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 20, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 404.55, 'high': 407.7, 'low': 404.1, 'close': 407.65, 'trades': 3377, 'volume': 2054187, 'vwap': 406.02, 'lastSize': 12, 'turnover': 83404093435, 'homeNotional': 24098.04906304906, 'foreignNotional': 9784325.71916459}, {'timestamp': datetime.datetime(2020, 8, 20, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 408.15, 'high': 408.35, 'low': 403.7, 'close': 404.55, 'trades': 3181, 'volume': 1900748, 'vwap': 406.27, 'lastSize': 10, 'turnover': 77220073260, 'homeNotional': 22317.0732262529, 'foreignNotional': 9066597.399802266}, {'timestamp': datetime.datetime(2020, 8, 20, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.2, 'high': 409.6, 'low': 402.95, 'close': 408.15, 'trades': 5036, 'volume': 3854824, 'vwap': 406.3, 'lastSize': 135, 'turnover': 156620172960, 'homeNotional': 45216.99875615459, 'foreignNotional': 18371803.49504059}] 2020-08-20 12:00:21 INFO: prepare candles [CandleItem(low=404.1, high=407.7, open=404.55, close=407.65, color='GREEN'), CandleItem(low=403.7, high=408.35, open=408.15, close=404.55, color='RED'), CandleItem(low=402.95, high=409.6, open=405.2, close=408.15, color='GREEN')] 2020-08-20 12:00:21 INFO: skip by colors first_candle=CandleItem(low=402.95, high=409.6, open=405.2, close=408.15, color='GREEN') second_candle=CandleItem(low=403.7, high=408.35, open=408.15, close=404.55, color='RED') last_candle=CandleItem(low=404.1, high=407.7, open=404.55, close=407.65, color='GREEN') 2020-08-20 12:00:21 INFO: check need new order None 2020-08-20 12:00:21 INFO: init new order end 2020-08-20 12:00:21 INFO: 2020-08-20 12:00:21 INFO: 2020-08-20 12:00:21 INFO: 2020-08-20 12:00:21 INFO: 2020-08-20 12:02:00 INFO: 2020-08-20 12:02:00 INFO: 2020-08-20 12:02:00 INFO: 2020-08-20 12:02:00 INFO: 2020-08-20 12:02:00 INFO: clearing start 2020-08-20 12:02:00 INFO: clearing end 2020-08-20 12:02:00 INFO: 2020-08-20 12:02:00 INFO: 2020-08-20 12:02:00 INFO: 2020-08-20 12:02:00 INFO: 2020-08-20 13:00:20 INFO: 2020-08-20 13:00:20 INFO: 2020-08-20 13:00:20 INFO: 2020-08-20 13:00:20 INFO: 2020-08-20 13:00:20 INFO: init new order start 2020-08-20 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 20, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 407.65, 'high': 411.95, 'low': 407.1, 'close': 410.2, 'trades': 4009, 'volume': 2474197, 'vwap': 409.69, 'lastSize': 13397, 'turnover': 101363251100, 'homeNotional': 29154.846897318737, 'foreignNotional': 11944248.739635196}, {'timestamp': datetime.datetime(2020, 8, 20, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 404.55, 'high': 407.7, 'low': 404.1, 'close': 407.65, 'trades': 3377, 'volume': 2054187, 'vwap': 406.02, 'lastSize': 12, 'turnover': 83404093435, 'homeNotional': 24098.04906304906, 'foreignNotional': 9784325.71916459}, {'timestamp': datetime.datetime(2020, 8, 20, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 408.15, 'high': 408.35, 'low': 403.7, 'close': 404.55, 'trades': 3181, 'volume': 1900748, 'vwap': 406.27, 'lastSize': 10, 'turnover': 77220073260, 'homeNotional': 22317.0732262529, 'foreignNotional': 9066597.399802266}] 2020-08-20 13:00:20 INFO: prepare candles [CandleItem(low=407.1, high=411.95, open=407.65, close=410.2, color='GREEN'), CandleItem(low=404.1, high=407.7, open=404.55, close=407.65, color='GREEN'), CandleItem(low=403.7, high=408.35, open=408.15, close=404.55, color='RED')] 2020-08-20 13:00:20 INFO: skip by colors first_candle=CandleItem(low=403.7, high=408.35, open=408.15, close=404.55, color='RED') second_candle=CandleItem(low=404.1, high=407.7, open=404.55, close=407.65, color='GREEN') last_candle=CandleItem(low=407.1, high=411.95, open=407.65, close=410.2, color='GREEN') 2020-08-20 13:00:20 INFO: check need new order None 2020-08-20 13:00:20 INFO: init new order end 2020-08-20 13:00:20 INFO: 2020-08-20 13:00:20 INFO: 2020-08-20 13:00:20 INFO: 2020-08-20 13:00:20 INFO: 2020-08-20 13:02:00 INFO: 2020-08-20 13:02:00 INFO: 2020-08-20 13:02:00 INFO: 2020-08-20 13:02:00 INFO: 2020-08-20 13:02:00 INFO: clearing start 2020-08-20 13:02:00 INFO: clearing end 2020-08-20 13:02:00 INFO: 2020-08-20 13:02:00 INFO: 2020-08-20 13:02:00 INFO: 2020-08-20 13:02:00 INFO: 2020-08-20 14:00:20 INFO: 2020-08-20 14:00:20 INFO: 2020-08-20 14:00:20 INFO: 2020-08-20 14:00:20 INFO: 2020-08-20 14:00:20 INFO: init new order start 2020-08-20 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 20, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 410.2, 'high': 410.9, 'low': 408.05, 'close': 409.85, 'trades': 2893, 'volume': 1824660, 'vwap': 409.38, 'lastSize': 2, 'turnover': 74697258290, 'homeNotional': 21486.452955462588, 'foreignNotional': 8796054.974284817}, {'timestamp': datetime.datetime(2020, 8, 20, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 407.65, 'high': 411.95, 'low': 407.1, 'close': 410.2, 'trades': 4009, 'volume': 2474197, 'vwap': 409.69, 'lastSize': 13397, 'turnover': 101363251100, 'homeNotional': 29154.846897318737, 'foreignNotional': 11944248.739635196}, {'timestamp': datetime.datetime(2020, 8, 20, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 404.55, 'high': 407.7, 'low': 404.1, 'close': 407.65, 'trades': 3377, 'volume': 2054187, 'vwap': 406.02, 'lastSize': 12, 'turnover': 83404093435, 'homeNotional': 24098.04906304906, 'foreignNotional': 9784325.71916459}] 2020-08-20 14:00:20 INFO: prepare candles [CandleItem(low=408.05, high=410.9, open=410.2, close=409.85, color='RED'), CandleItem(low=407.1, high=411.95, open=407.65, close=410.2, color='GREEN'), CandleItem(low=404.1, high=407.7, open=404.55, close=407.65, color='GREEN')] 2020-08-20 14:00:20 INFO: last_candle=CandleItem(low=408.05, high=410.9, open=410.2, close=409.85, color='RED') 2020-08-20 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-20 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=408.05, high=410.9, open=410.2, close=409.85, color='RED') 2020-08-20 14:00:20 INFO: skip by CandleItem(low=408.05, high=410.9, open=410.2, close=409.85, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-20 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-20 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=408.05, high=410.9, open=410.2, close=409.85, color='RED') 2020-08-20 14:00:20 INFO: skip by CandleItem(low=408.05, high=410.9, open=410.2, close=409.85, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-20 14:00:20 INFO: not found applicable config for candle 2020-08-20 14:00:20 INFO: check need new order None 2020-08-20 14:00:20 INFO: init new order end 2020-08-20 14:00:20 INFO: 2020-08-20 14:00:20 INFO: 2020-08-20 14:00:20 INFO: 2020-08-20 14:00:20 INFO: 2020-08-20 14:02:00 INFO: 2020-08-20 14:02:00 INFO: 2020-08-20 14:02:00 INFO: 2020-08-20 14:02:00 INFO: 2020-08-20 14:02:00 INFO: clearing start 2020-08-20 14:02:00 INFO: clearing end 2020-08-20 14:02:00 INFO: 2020-08-20 14:02:00 INFO: 2020-08-20 14:02:00 INFO: 2020-08-20 14:02:00 INFO: 2020-08-20 15:00:20 INFO: 2020-08-20 15:00:20 INFO: 2020-08-20 15:00:20 INFO: 2020-08-20 15:00:20 INFO: 2020-08-20 15:00:20 INFO: init new order start 2020-08-20 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 20, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 409.85, 'high': 412.45, 'low': 407.15, 'close': 411.75, 'trades': 3731, 'volume': 2292708, 'vwap': 409.64, 'lastSize': 20, 'turnover': 93918209565, 'homeNotional': 27012.71306733248, 'foreignNotional': 11065533.727145748}, {'timestamp': datetime.datetime(2020, 8, 20, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 410.2, 'high': 410.9, 'low': 408.05, 'close': 409.85, 'trades': 2893, 'volume': 1824660, 'vwap': 409.38, 'lastSize': 2, 'turnover': 74697258290, 'homeNotional': 21486.452955462588, 'foreignNotional': 8796054.974284817}, {'timestamp': datetime.datetime(2020, 8, 20, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 407.65, 'high': 411.95, 'low': 407.1, 'close': 410.2, 'trades': 4009, 'volume': 2474197, 'vwap': 409.69, 'lastSize': 13397, 'turnover': 101363251100, 'homeNotional': 29154.846897318737, 'foreignNotional': 11944248.739635196}] 2020-08-20 15:00:20 INFO: prepare candles [CandleItem(low=407.15, high=412.45, open=409.85, close=411.75, color='GREEN'), CandleItem(low=408.05, high=410.9, open=410.2, close=409.85, color='RED'), CandleItem(low=407.1, high=411.95, open=407.65, close=410.2, color='GREEN')] 2020-08-20 15:00:20 INFO: skip by colors first_candle=CandleItem(low=407.1, high=411.95, open=407.65, close=410.2, color='GREEN') second_candle=CandleItem(low=408.05, high=410.9, open=410.2, close=409.85, color='RED') last_candle=CandleItem(low=407.15, high=412.45, open=409.85, close=411.75, color='GREEN') 2020-08-20 15:00:20 INFO: check need new order None 2020-08-20 15:00:20 INFO: init new order end 2020-08-20 15:00:20 INFO: 2020-08-20 15:00:20 INFO: 2020-08-20 15:00:20 INFO: 2020-08-20 15:00:20 INFO: 2020-08-20 15:02:00 INFO: 2020-08-20 15:02:00 INFO: 2020-08-20 15:02:00 INFO: 2020-08-20 15:02:00 INFO: 2020-08-20 15:02:00 INFO: clearing start 2020-08-20 15:02:00 INFO: clearing end 2020-08-20 15:02:00 INFO: 2020-08-20 15:02:00 INFO: 2020-08-20 15:02:00 INFO: 2020-08-20 15:02:00 INFO: 2020-08-20 16:00:20 INFO: 2020-08-20 16:00:20 INFO: 2020-08-20 16:00:20 INFO: 2020-08-20 16:00:20 INFO: 2020-08-20 16:00:20 INFO: init new order start 2020-08-20 16:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 20, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 411.75, 'high': 412.9, 'low': 409.7, 'close': 409.75, 'trades': 2717, 'volume': 1781849, 'vwap': 411.04, 'lastSize': 11, 'turnover': 73240786680, 'homeNotional': 21046.34726872831, 'foreignNotional': 8650871.776210064}, {'timestamp': datetime.datetime(2020, 8, 20, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 409.85, 'high': 412.45, 'low': 407.15, 'close': 411.75, 'trades': 3731, 'volume': 2292708, 'vwap': 409.64, 'lastSize': 20, 'turnover': 93918209565, 'homeNotional': 27012.71306733248, 'foreignNotional': 11065533.727145748}, {'timestamp': datetime.datetime(2020, 8, 20, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 410.2, 'high': 410.9, 'low': 408.05, 'close': 409.85, 'trades': 2893, 'volume': 1824660, 'vwap': 409.38, 'lastSize': 2, 'turnover': 74697258290, 'homeNotional': 21486.452955462588, 'foreignNotional': 8796054.974284817}] 2020-08-20 16:00:20 INFO: prepare candles [CandleItem(low=409.7, high=412.9, open=411.75, close=409.75, color='RED'), CandleItem(low=407.15, high=412.45, open=409.85, close=411.75, color='GREEN'), CandleItem(low=408.05, high=410.9, open=410.2, close=409.85, color='RED')] 2020-08-20 16:00:20 INFO: skip by colors first_candle=CandleItem(low=408.05, high=410.9, open=410.2, close=409.85, color='RED') second_candle=CandleItem(low=407.15, high=412.45, open=409.85, close=411.75, color='GREEN') last_candle=CandleItem(low=409.7, high=412.9, open=411.75, close=409.75, color='RED') 2020-08-20 16:00:20 INFO: check need new order None 2020-08-20 16:00:20 INFO: init new order end 2020-08-20 16:00:20 INFO: 2020-08-20 16:00:20 INFO: 2020-08-20 16:00:20 INFO: 2020-08-20 16:00:20 INFO: 2020-08-20 16:02:00 INFO: 2020-08-20 16:02:00 INFO: 2020-08-20 16:02:00 INFO: 2020-08-20 16:02:00 INFO: 2020-08-20 16:02:00 INFO: clearing start 2020-08-20 16:02:00 INFO: clearing end 2020-08-20 16:02:00 INFO: 2020-08-20 16:02:00 INFO: 2020-08-20 16:02:00 INFO: 2020-08-20 16:02:00 INFO: 2020-08-20 17:00:20 INFO: 2020-08-20 17:00:20 INFO: 2020-08-20 17:00:20 INFO: 2020-08-20 17:00:20 INFO: 2020-08-20 17:00:20 INFO: init new order start 2020-08-20 17:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 20, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 409.75, 'high': 413.4, 'low': 409.1, 'close': 413.25, 'trades': 3351, 'volume': 3515001, 'vwap': 411.48, 'lastSize': 11, 'turnover': 144635030255, 'homeNotional': 41471.56773527173, 'foreignNotional': 17064776.463456195}, {'timestamp': datetime.datetime(2020, 8, 20, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 411.75, 'high': 412.9, 'low': 409.7, 'close': 409.75, 'trades': 2717, 'volume': 1781849, 'vwap': 411.04, 'lastSize': 11, 'turnover': 73240786680, 'homeNotional': 21046.34726872831, 'foreignNotional': 8650871.776210064}, {'timestamp': datetime.datetime(2020, 8, 20, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 409.85, 'high': 412.45, 'low': 407.15, 'close': 411.75, 'trades': 3731, 'volume': 2292708, 'vwap': 409.64, 'lastSize': 20, 'turnover': 93918209565, 'homeNotional': 27012.71306733248, 'foreignNotional': 11065533.727145748}] 2020-08-20 17:00:21 INFO: prepare candles [CandleItem(low=409.1, high=413.4, open=409.75, close=413.25, color='GREEN'), CandleItem(low=409.7, high=412.9, open=411.75, close=409.75, color='RED'), CandleItem(low=407.15, high=412.45, open=409.85, close=411.75, color='GREEN')] 2020-08-20 17:00:21 INFO: skip by colors first_candle=CandleItem(low=407.15, high=412.45, open=409.85, close=411.75, color='GREEN') second_candle=CandleItem(low=409.7, high=412.9, open=411.75, close=409.75, color='RED') last_candle=CandleItem(low=409.1, high=413.4, open=409.75, close=413.25, color='GREEN') 2020-08-20 17:00:21 INFO: check need new order None 2020-08-20 17:00:21 INFO: init new order end 2020-08-20 17:00:21 INFO: 2020-08-20 17:00:21 INFO: 2020-08-20 17:00:21 INFO: 2020-08-20 17:00:21 INFO: 2020-08-20 17:02:00 INFO: 2020-08-20 17:02:00 INFO: 2020-08-20 17:02:00 INFO: 2020-08-20 17:02:00 INFO: 2020-08-20 17:02:00 INFO: clearing start 2020-08-20 17:02:00 INFO: clearing end 2020-08-20 17:02:00 INFO: 2020-08-20 17:02:00 INFO: 2020-08-20 17:02:00 INFO: 2020-08-20 17:02:00 INFO: 2020-08-20 18:00:20 INFO: 2020-08-20 18:00:20 INFO: 2020-08-20 18:00:20 INFO: 2020-08-20 18:00:20 INFO: 2020-08-20 18:00:20 INFO: init new order start 2020-08-20 18:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 20, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 413.25, 'high': 415.4, 'low': 411.55, 'close': 415.1, 'trades': 3783, 'volume': 2947706, 'vwap': 413.57, 'lastSize': 1790, 'turnover': 121906995620, 'homeNotional': 34872.43196868329, 'foreignNotional': 14422080.985916078}, {'timestamp': datetime.datetime(2020, 8, 20, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 409.75, 'high': 413.4, 'low': 409.1, 'close': 413.25, 'trades': 3351, 'volume': 3515001, 'vwap': 411.48, 'lastSize': 11, 'turnover': 144635030255, 'homeNotional': 41471.56773527173, 'foreignNotional': 17064776.463456195}, {'timestamp': datetime.datetime(2020, 8, 20, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 411.75, 'high': 412.9, 'low': 409.7, 'close': 409.75, 'trades': 2717, 'volume': 1781849, 'vwap': 411.04, 'lastSize': 11, 'turnover': 73240786680, 'homeNotional': 21046.34726872831, 'foreignNotional': 8650871.776210064}] 2020-08-20 18:00:20 INFO: prepare candles [CandleItem(low=411.55, high=415.4, open=413.25, close=415.1, color='GREEN'), CandleItem(low=409.1, high=413.4, open=409.75, close=413.25, color='GREEN'), CandleItem(low=409.7, high=412.9, open=411.75, close=409.75, color='RED')] 2020-08-20 18:00:20 INFO: skip by colors first_candle=CandleItem(low=409.7, high=412.9, open=411.75, close=409.75, color='RED') second_candle=CandleItem(low=409.1, high=413.4, open=409.75, close=413.25, color='GREEN') last_candle=CandleItem(low=411.55, high=415.4, open=413.25, close=415.1, color='GREEN') 2020-08-20 18:00:20 INFO: check need new order None 2020-08-20 18:00:20 INFO: init new order end 2020-08-20 18:00:20 INFO: 2020-08-20 18:00:20 INFO: 2020-08-20 18:00:20 INFO: 2020-08-20 18:00:20 INFO: 2020-08-20 18:02:00 INFO: 2020-08-20 18:02:00 INFO: 2020-08-20 18:02:00 INFO: 2020-08-20 18:02:00 INFO: 2020-08-20 18:02:00 INFO: clearing start 2020-08-20 18:02:01 INFO: clearing end 2020-08-20 18:02:01 INFO: 2020-08-20 18:02:01 INFO: 2020-08-20 18:02:01 INFO: 2020-08-20 18:02:01 INFO: 2020-08-20 19:00:20 INFO: 2020-08-20 19:00:20 INFO: 2020-08-20 19:00:20 INFO: 2020-08-20 19:00:20 INFO: 2020-08-20 19:00:20 INFO: init new order start 2020-08-20 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 20, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 415.1, 'high': 416.55, 'low': 413.25, 'close': 416.0, 'trades': 4698, 'volume': 3638921, 'vwap': 415.16, 'lastSize': 126, 'turnover': 151072984955, 'homeNotional': 43132.33535935125, 'foreignNotional': 17906803.383823216}, {'timestamp': datetime.datetime(2020, 8, 20, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 413.25, 'high': 415.4, 'low': 411.55, 'close': 415.1, 'trades': 3783, 'volume': 2947706, 'vwap': 413.57, 'lastSize': 1790, 'turnover': 121906995620, 'homeNotional': 34872.43196868329, 'foreignNotional': 14422080.985916078}, {'timestamp': datetime.datetime(2020, 8, 20, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 409.75, 'high': 413.4, 'low': 409.1, 'close': 413.25, 'trades': 3351, 'volume': 3515001, 'vwap': 411.48, 'lastSize': 11, 'turnover': 144635030255, 'homeNotional': 41471.56773527173, 'foreignNotional': 17064776.463456195}] 2020-08-20 19:00:20 INFO: prepare candles [CandleItem(low=413.25, high=416.55, open=415.1, close=416.0, color='GREEN'), CandleItem(low=411.55, high=415.4, open=413.25, close=415.1, color='GREEN'), CandleItem(low=409.1, high=413.4, open=409.75, close=413.25, color='GREEN')] 2020-08-20 19:00:20 INFO: skip by colors first_candle=CandleItem(low=409.1, high=413.4, open=409.75, close=413.25, color='GREEN') second_candle=CandleItem(low=411.55, high=415.4, open=413.25, close=415.1, color='GREEN') last_candle=CandleItem(low=413.25, high=416.55, open=415.1, close=416.0, color='GREEN') 2020-08-20 19:00:20 INFO: check need new order None 2020-08-20 19:00:20 INFO: init new order end 2020-08-20 19:00:20 INFO: 2020-08-20 19:00:20 INFO: 2020-08-20 19:00:20 INFO: 2020-08-20 19:00:20 INFO: 2020-08-20 19:02:00 INFO: 2020-08-20 19:02:00 INFO: 2020-08-20 19:02:00 INFO: 2020-08-20 19:02:00 INFO: 2020-08-20 19:02:00 INFO: clearing start 2020-08-20 19:02:00 INFO: clearing end 2020-08-20 19:02:00 INFO: 2020-08-20 19:02:00 INFO: 2020-08-20 19:02:00 INFO: 2020-08-20 19:02:00 INFO: 2020-08-20 20:00:20 INFO: 2020-08-20 20:00:20 INFO: 2020-08-20 20:00:20 INFO: 2020-08-20 20:00:20 INFO: 2020-08-20 20:00:20 INFO: init new order start 2020-08-20 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 20, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 416.0, 'high': 418.65, 'low': 414.5, 'close': 416.55, 'trades': 6552, 'volume': 5288436, 'vwap': 416.88, 'lastSize': 1500, 'turnover': 220460486655, 'homeNotional': 62743.965581915516, 'foreignNotional': 26156301.790232643}, {'timestamp': datetime.datetime(2020, 8, 20, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 415.1, 'high': 416.55, 'low': 413.25, 'close': 416.0, 'trades': 4698, 'volume': 3638921, 'vwap': 415.16, 'lastSize': 126, 'turnover': 151072984955, 'homeNotional': 43132.33535935125, 'foreignNotional': 17906803.383823216}, {'timestamp': datetime.datetime(2020, 8, 20, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 413.25, 'high': 415.4, 'low': 411.55, 'close': 415.1, 'trades': 3783, 'volume': 2947706, 'vwap': 413.57, 'lastSize': 1790, 'turnover': 121906995620, 'homeNotional': 34872.43196868329, 'foreignNotional': 14422080.985916078}] 2020-08-20 20:00:20 INFO: prepare candles [CandleItem(low=414.5, high=418.65, open=416.0, close=416.55, color='GREEN'), CandleItem(low=413.25, high=416.55, open=415.1, close=416.0, color='GREEN'), CandleItem(low=411.55, high=415.4, open=413.25, close=415.1, color='GREEN')] 2020-08-20 20:00:20 INFO: skip by colors first_candle=CandleItem(low=411.55, high=415.4, open=413.25, close=415.1, color='GREEN') second_candle=CandleItem(low=413.25, high=416.55, open=415.1, close=416.0, color='GREEN') last_candle=CandleItem(low=414.5, high=418.65, open=416.0, close=416.55, color='GREEN') 2020-08-20 20:00:20 INFO: check need new order None 2020-08-20 20:00:20 INFO: init new order end 2020-08-20 20:00:20 INFO: 2020-08-20 20:00:20 INFO: 2020-08-20 20:00:20 INFO: 2020-08-20 20:00:20 INFO: 2020-08-20 20:02:00 INFO: 2020-08-20 20:02:00 INFO: 2020-08-20 20:02:00 INFO: 2020-08-20 20:02:00 INFO: 2020-08-20 20:02:00 INFO: clearing start 2020-08-20 20:02:00 INFO: clearing end 2020-08-20 20:02:00 INFO: 2020-08-20 20:02:00 INFO: 2020-08-20 20:02:00 INFO: 2020-08-20 20:02:00 INFO: 2020-08-20 21:00:20 INFO: 2020-08-20 21:00:20 INFO: 2020-08-20 21:00:20 INFO: 2020-08-20 21:00:20 INFO: 2020-08-20 21:00:20 INFO: init new order start 2020-08-20 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 20, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 416.55, 'high': 417.9, 'low': 414.25, 'close': 414.25, 'trades': 3341, 'volume': 2760609, 'vwap': 416.04, 'lastSize': 1, 'turnover': 114851215745, 'homeNotional': 32701.772660827253, 'foreignNotional': 13605135.096685244}, {'timestamp': datetime.datetime(2020, 8, 20, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 416.0, 'high': 418.65, 'low': 414.5, 'close': 416.55, 'trades': 6552, 'volume': 5288436, 'vwap': 416.88, 'lastSize': 1500, 'turnover': 220460486655, 'homeNotional': 62743.965581915516, 'foreignNotional': 26156301.790232643}, {'timestamp': datetime.datetime(2020, 8, 20, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 415.1, 'high': 416.55, 'low': 413.25, 'close': 416.0, 'trades': 4698, 'volume': 3638921, 'vwap': 415.16, 'lastSize': 126, 'turnover': 151072984955, 'homeNotional': 43132.33535935125, 'foreignNotional': 17906803.383823216}] 2020-08-20 21:00:20 INFO: prepare candles [CandleItem(low=414.25, high=417.9, open=416.55, close=414.25, color='RED'), CandleItem(low=414.5, high=418.65, open=416.0, close=416.55, color='GREEN'), CandleItem(low=413.25, high=416.55, open=415.1, close=416.0, color='GREEN')] 2020-08-20 21:00:20 INFO: last_candle=CandleItem(low=414.25, high=417.9, open=416.55, close=414.25, color='RED') 2020-08-20 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-20 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=414.25, high=417.9, open=416.55, close=414.25, color='RED') 2020-08-20 21:00:20 INFO: skip by CandleItem(low=414.25, high=417.9, open=416.55, close=414.25, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-20 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-20 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=414.25, high=417.9, open=416.55, close=414.25, color='RED') 2020-08-20 21:00:20 INFO: skip by CandleItem(low=414.25, high=417.9, open=416.55, close=414.25, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-20 21:00:20 INFO: not found applicable config for candle 2020-08-20 21:00:20 INFO: check need new order None 2020-08-20 21:00:20 INFO: init new order end 2020-08-20 21:00:20 INFO: 2020-08-20 21:00:20 INFO: 2020-08-20 21:00:20 INFO: 2020-08-20 21:00:20 INFO: 2020-08-20 21:02:00 INFO: 2020-08-20 21:02:00 INFO: 2020-08-20 21:02:00 INFO: 2020-08-20 21:02:00 INFO: 2020-08-20 21:02:00 INFO: clearing start 2020-08-20 21:02:00 INFO: clearing end 2020-08-20 21:02:00 INFO: 2020-08-20 21:02:00 INFO: 2020-08-20 21:02:00 INFO: 2020-08-20 21:02:00 INFO: 2020-08-20 22:00:20 INFO: 2020-08-20 22:00:20 INFO: 2020-08-20 22:00:20 INFO: 2020-08-20 22:00:20 INFO: 2020-08-20 22:00:20 INFO: init new order start 2020-08-20 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 20, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 414.25, 'high': 417.3, 'low': 414.25, 'close': 416.85, 'trades': 2487, 'volume': 2011297, 'vwap': 415.67, 'lastSize': 1942, 'turnover': 83603005345, 'homeNotional': 23855.38764193101, 'foreignNotional': 9915919.191685934}, {'timestamp': datetime.datetime(2020, 8, 20, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 416.55, 'high': 417.9, 'low': 414.25, 'close': 414.25, 'trades': 3341, 'volume': 2760609, 'vwap': 416.04, 'lastSize': 1, 'turnover': 114851215745, 'homeNotional': 32701.772660827253, 'foreignNotional': 13605135.096685244}, {'timestamp': datetime.datetime(2020, 8, 20, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 416.0, 'high': 418.65, 'low': 414.5, 'close': 416.55, 'trades': 6552, 'volume': 5288436, 'vwap': 416.88, 'lastSize': 1500, 'turnover': 220460486655, 'homeNotional': 62743.965581915516, 'foreignNotional': 26156301.790232643}] 2020-08-20 22:00:20 INFO: prepare candles [CandleItem(low=414.25, high=417.3, open=414.25, close=416.85, color='GREEN'), CandleItem(low=414.25, high=417.9, open=416.55, close=414.25, color='RED'), CandleItem(low=414.5, high=418.65, open=416.0, close=416.55, color='GREEN')] 2020-08-20 22:00:20 INFO: skip by colors first_candle=CandleItem(low=414.5, high=418.65, open=416.0, close=416.55, color='GREEN') second_candle=CandleItem(low=414.25, high=417.9, open=416.55, close=414.25, color='RED') last_candle=CandleItem(low=414.25, high=417.3, open=414.25, close=416.85, color='GREEN') 2020-08-20 22:00:20 INFO: check need new order None 2020-08-20 22:00:20 INFO: init new order end 2020-08-20 22:00:20 INFO: 2020-08-20 22:00:20 INFO: 2020-08-20 22:00:20 INFO: 2020-08-20 22:00:20 INFO: 2020-08-20 22:02:00 INFO: 2020-08-20 22:02:00 INFO: 2020-08-20 22:02:00 INFO: 2020-08-20 22:02:00 INFO: 2020-08-20 22:02:00 INFO: clearing start 2020-08-20 22:02:00 INFO: clearing end 2020-08-20 22:02:00 INFO: 2020-08-20 22:02:00 INFO: 2020-08-20 22:02:00 INFO: 2020-08-20 22:02:00 INFO: 2020-08-20 23:00:20 INFO: 2020-08-20 23:00:20 INFO: 2020-08-20 23:00:20 INFO: 2020-08-20 23:00:20 INFO: 2020-08-20 23:00:20 INFO: init new order start 2020-08-20 23:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 20, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 416.85, 'high': 417.7, 'low': 414.4, 'close': 414.65, 'trades': 1962, 'volume': 1352072, 'vwap': 415.86, 'lastSize': 12, 'turnover': 56227262415, 'homeNotional': 16046.992716691484, 'foreignNotional': 6673310.90831931}, {'timestamp': datetime.datetime(2020, 8, 20, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 414.25, 'high': 417.3, 'low': 414.25, 'close': 416.85, 'trades': 2487, 'volume': 2011297, 'vwap': 415.67, 'lastSize': 1942, 'turnover': 83603005345, 'homeNotional': 23855.38764193101, 'foreignNotional': 9915919.191685934}, {'timestamp': datetime.datetime(2020, 8, 20, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 416.55, 'high': 417.9, 'low': 414.25, 'close': 414.25, 'trades': 3341, 'volume': 2760609, 'vwap': 416.04, 'lastSize': 1, 'turnover': 114851215745, 'homeNotional': 32701.772660827253, 'foreignNotional': 13605135.096685244}] 2020-08-20 23:00:20 INFO: prepare candles [CandleItem(low=414.4, high=417.7, open=416.85, close=414.65, color='RED'), CandleItem(low=414.25, high=417.3, open=414.25, close=416.85, color='GREEN'), CandleItem(low=414.25, high=417.9, open=416.55, close=414.25, color='RED')] 2020-08-20 23:00:20 INFO: skip by colors first_candle=CandleItem(low=414.25, high=417.9, open=416.55, close=414.25, color='RED') second_candle=CandleItem(low=414.25, high=417.3, open=414.25, close=416.85, color='GREEN') last_candle=CandleItem(low=414.4, high=417.7, open=416.85, close=414.65, color='RED') 2020-08-20 23:00:20 INFO: check need new order None 2020-08-20 23:00:20 INFO: init new order end 2020-08-20 23:00:20 INFO: 2020-08-20 23:00:20 INFO: 2020-08-20 23:00:20 INFO: 2020-08-20 23:00:20 INFO: 2020-08-20 23:02:00 INFO: 2020-08-20 23:02:00 INFO: 2020-08-20 23:02:00 INFO: 2020-08-20 23:02:00 INFO: 2020-08-20 23:02:00 INFO: clearing start 2020-08-20 23:02:00 INFO: clearing end 2020-08-20 23:02:00 INFO: 2020-08-20 23:02:00 INFO: 2020-08-20 23:02:00 INFO: 2020-08-20 23:02:00 INFO: 2020-08-21 00:00:20 INFO: 2020-08-21 00:00:20 INFO: 2020-08-21 00:00:20 INFO: 2020-08-21 00:00:20 INFO: 2020-08-21 00:00:20 INFO: init new order start 2020-08-21 00:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 20, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 414.65, 'high': 417.8, 'low': 414.6, 'close': 416.35, 'trades': 2234, 'volume': 1931229, 'vwap': 416.36, 'lastSize': 10, 'turnover': 80406774960, 'homeNotional': 22927.075339548363, 'foreignNotional': 9545705.042314937}, {'timestamp': datetime.datetime(2020, 8, 20, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 416.85, 'high': 417.7, 'low': 414.4, 'close': 414.65, 'trades': 1962, 'volume': 1352072, 'vwap': 415.86, 'lastSize': 12, 'turnover': 56227262415, 'homeNotional': 16046.992716691484, 'foreignNotional': 6673310.90831931}, {'timestamp': datetime.datetime(2020, 8, 20, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 414.25, 'high': 417.3, 'low': 414.25, 'close': 416.85, 'trades': 2487, 'volume': 2011297, 'vwap': 415.67, 'lastSize': 1942, 'turnover': 83603005345, 'homeNotional': 23855.38764193101, 'foreignNotional': 9915919.191685934}] 2020-08-21 00:00:21 INFO: prepare candles [CandleItem(low=414.6, high=417.8, open=414.65, close=416.35, color='GREEN'), CandleItem(low=414.4, high=417.7, open=416.85, close=414.65, color='RED'), CandleItem(low=414.25, high=417.3, open=414.25, close=416.85, color='GREEN')] 2020-08-21 00:00:21 INFO: skip by colors first_candle=CandleItem(low=414.25, high=417.3, open=414.25, close=416.85, color='GREEN') second_candle=CandleItem(low=414.4, high=417.7, open=416.85, close=414.65, color='RED') last_candle=CandleItem(low=414.6, high=417.8, open=414.65, close=416.35, color='GREEN') 2020-08-21 00:00:21 INFO: check need new order None 2020-08-21 00:00:21 INFO: init new order end 2020-08-21 00:00:21 INFO: 2020-08-21 00:00:21 INFO: 2020-08-21 00:00:21 INFO: 2020-08-21 00:00:21 INFO: 2020-08-21 00:02:00 INFO: 2020-08-21 00:02:00 INFO: 2020-08-21 00:02:00 INFO: 2020-08-21 00:02:00 INFO: 2020-08-21 00:02:00 INFO: clearing start 2020-08-21 00:02:00 INFO: clearing end 2020-08-21 00:02:00 INFO: 2020-08-21 00:02:00 INFO: 2020-08-21 00:02:00 INFO: 2020-08-21 00:02:00 INFO: 2020-08-21 01:00:20 INFO: 2020-08-21 01:00:20 INFO: 2020-08-21 01:00:20 INFO: 2020-08-21 01:00:20 INFO: 2020-08-21 01:00:20 INFO: init new order start 2020-08-21 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 20, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 416.35, 'high': 419.95, 'low': 416.35, 'close': 416.75, 'trades': 3395, 'volume': 2706846, 'vwap': 418.24, 'lastSize': 482, 'turnover': 113208855345, 'homeNotional': 32133.39869081103, 'foreignNotional': 13439234.440232158}, {'timestamp': datetime.datetime(2020, 8, 20, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 414.65, 'high': 417.8, 'low': 414.6, 'close': 416.35, 'trades': 2234, 'volume': 1931229, 'vwap': 416.36, 'lastSize': 10, 'turnover': 80406774960, 'homeNotional': 22927.075339548363, 'foreignNotional': 9545705.042314937}, {'timestamp': datetime.datetime(2020, 8, 20, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 416.85, 'high': 417.7, 'low': 414.4, 'close': 414.65, 'trades': 1962, 'volume': 1352072, 'vwap': 415.86, 'lastSize': 12, 'turnover': 56227262415, 'homeNotional': 16046.992716691484, 'foreignNotional': 6673310.90831931}] 2020-08-21 01:00:20 INFO: prepare candles [CandleItem(low=416.35, high=419.95, open=416.35, close=416.75, color='GREEN'), CandleItem(low=414.6, high=417.8, open=414.65, close=416.35, color='GREEN'), CandleItem(low=414.4, high=417.7, open=416.85, close=414.65, color='RED')] 2020-08-21 01:00:20 INFO: skip by colors first_candle=CandleItem(low=414.4, high=417.7, open=416.85, close=414.65, color='RED') second_candle=CandleItem(low=414.6, high=417.8, open=414.65, close=416.35, color='GREEN') last_candle=CandleItem(low=416.35, high=419.95, open=416.35, close=416.75, color='GREEN') 2020-08-21 01:00:20 INFO: check need new order None 2020-08-21 01:00:20 INFO: init new order end 2020-08-21 01:00:20 INFO: 2020-08-21 01:00:20 INFO: 2020-08-21 01:00:20 INFO: 2020-08-21 01:00:20 INFO: 2020-08-21 01:02:00 INFO: 2020-08-21 01:02:00 INFO: 2020-08-21 01:02:00 INFO: 2020-08-21 01:02:00 INFO: 2020-08-21 01:02:00 INFO: clearing start 2020-08-21 01:02:00 INFO: clearing end 2020-08-21 01:02:00 INFO: 2020-08-21 01:02:00 INFO: 2020-08-21 01:02:00 INFO: 2020-08-21 01:02:00 INFO: 2020-08-21 02:00:20 INFO: 2020-08-21 02:00:20 INFO: 2020-08-21 02:00:20 INFO: 2020-08-21 02:00:20 INFO: 2020-08-21 02:00:20 INFO: init new order start 2020-08-21 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 20, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 416.75, 'high': 417.95, 'low': 414.5, 'close': 415.0, 'trades': 2205, 'volume': 1388445, 'vwap': 416.16, 'lastSize': 2950, 'turnover': 57780422045, 'homeNotional': 16432.292837084653, 'foreignNotional': 6838339.621043374}, {'timestamp': datetime.datetime(2020, 8, 20, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 416.35, 'high': 419.95, 'low': 416.35, 'close': 416.75, 'trades': 3395, 'volume': 2706846, 'vwap': 418.24, 'lastSize': 482, 'turnover': 113208855345, 'homeNotional': 32133.39869081103, 'foreignNotional': 13439234.440232158}, {'timestamp': datetime.datetime(2020, 8, 20, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 414.65, 'high': 417.8, 'low': 414.6, 'close': 416.35, 'trades': 2234, 'volume': 1931229, 'vwap': 416.36, 'lastSize': 10, 'turnover': 80406774960, 'homeNotional': 22927.075339548363, 'foreignNotional': 9545705.042314937}] 2020-08-21 02:00:20 INFO: prepare candles [CandleItem(low=414.5, high=417.95, open=416.75, close=415.0, color='RED'), CandleItem(low=416.35, high=419.95, open=416.35, close=416.75, color='GREEN'), CandleItem(low=414.6, high=417.8, open=414.65, close=416.35, color='GREEN')] 2020-08-21 02:00:20 INFO: last_candle=CandleItem(low=414.5, high=417.95, open=416.75, close=415.0, color='RED') 2020-08-21 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-21 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=414.5, high=417.95, open=416.75, close=415.0, color='RED') 2020-08-21 02:00:20 INFO: skip by CandleItem(low=414.5, high=417.95, open=416.75, close=415.0, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-21 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-21 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=414.5, high=417.95, open=416.75, close=415.0, color='RED') 2020-08-21 02:00:20 INFO: skip by CandleItem(low=414.5, high=417.95, open=416.75, close=415.0, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-21 02:00:20 INFO: not found applicable config for candle 2020-08-21 02:00:20 INFO: check need new order None 2020-08-21 02:00:20 INFO: init new order end 2020-08-21 02:00:20 INFO: 2020-08-21 02:00:20 INFO: 2020-08-21 02:00:20 INFO: 2020-08-21 02:00:20 INFO: 2020-08-21 02:02:00 INFO: 2020-08-21 02:02:00 INFO: 2020-08-21 02:02:00 INFO: 2020-08-21 02:02:00 INFO: 2020-08-21 02:02:00 INFO: clearing start 2020-08-21 02:02:00 INFO: clearing end 2020-08-21 02:02:00 INFO: 2020-08-21 02:02:00 INFO: 2020-08-21 02:02:00 INFO: 2020-08-21 02:02:00 INFO: 2020-08-21 03:00:20 INFO: 2020-08-21 03:00:20 INFO: 2020-08-21 03:00:20 INFO: 2020-08-21 03:00:20 INFO: 2020-08-21 03:00:20 INFO: init new order start 2020-08-21 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 21, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 415.0, 'high': 417.7, 'low': 414.6, 'close': 416.7, 'trades': 1805, 'volume': 1166726, 'vwap': 416.61, 'lastSize': 11, 'turnover': 48606122680, 'homeNotional': 13842.584366612573, 'foreignNotional': 5766871.317483609}, {'timestamp': datetime.datetime(2020, 8, 20, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 416.75, 'high': 417.95, 'low': 414.5, 'close': 415.0, 'trades': 2205, 'volume': 1388445, 'vwap': 416.16, 'lastSize': 2950, 'turnover': 57780422045, 'homeNotional': 16432.292837084653, 'foreignNotional': 6838339.621043374}, {'timestamp': datetime.datetime(2020, 8, 20, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 416.35, 'high': 419.95, 'low': 416.35, 'close': 416.75, 'trades': 3395, 'volume': 2706846, 'vwap': 418.24, 'lastSize': 482, 'turnover': 113208855345, 'homeNotional': 32133.39869081103, 'foreignNotional': 13439234.440232158}] 2020-08-21 03:00:20 INFO: prepare candles [CandleItem(low=414.6, high=417.7, open=415.0, close=416.7, color='GREEN'), CandleItem(low=414.5, high=417.95, open=416.75, close=415.0, color='RED'), CandleItem(low=416.35, high=419.95, open=416.35, close=416.75, color='GREEN')] 2020-08-21 03:00:20 INFO: skip by colors first_candle=CandleItem(low=416.35, high=419.95, open=416.35, close=416.75, color='GREEN') second_candle=CandleItem(low=414.5, high=417.95, open=416.75, close=415.0, color='RED') last_candle=CandleItem(low=414.6, high=417.7, open=415.0, close=416.7, color='GREEN') 2020-08-21 03:00:20 INFO: check need new order None 2020-08-21 03:00:20 INFO: init new order end 2020-08-21 03:00:20 INFO: 2020-08-21 03:00:20 INFO: 2020-08-21 03:00:20 INFO: 2020-08-21 03:00:20 INFO: 2020-08-21 03:02:00 INFO: 2020-08-21 03:02:00 INFO: 2020-08-21 03:02:00 INFO: 2020-08-21 03:02:00 INFO: 2020-08-21 03:02:00 INFO: clearing start 2020-08-21 03:02:00 INFO: clearing end 2020-08-21 03:02:00 INFO: 2020-08-21 03:02:00 INFO: 2020-08-21 03:02:00 INFO: 2020-08-21 03:02:00 INFO: 2020-08-21 03:19:53 INFO: Websocket Closed 2020-08-21 03:19:53 WARNING: reconnect to socket 2020-08-21 03:19:53 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-08-21 03:19:53 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-08-21 03:19:53 INFO: Authenticating with API Key. 2020-08-21 03:19:54 INFO: Connected to WS. 2020-08-21 04:00:20 INFO: 2020-08-21 04:00:20 INFO: 2020-08-21 04:00:20 INFO: 2020-08-21 04:00:20 INFO: 2020-08-21 04:00:20 INFO: init new order start 2020-08-21 04:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 21, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 416.7, 'high': 419.3, 'low': 415.3, 'close': 416.15, 'trades': 3086, 'volume': 1974376, 'vwap': 417.28, 'lastSize': 11, 'turnover': 82385380410, 'homeNotional': 23413.171167338987, 'foreignNotional': 9769710.137858536}, {'timestamp': datetime.datetime(2020, 8, 21, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 415.0, 'high': 417.7, 'low': 414.6, 'close': 416.7, 'trades': 1805, 'volume': 1166726, 'vwap': 416.61, 'lastSize': 11, 'turnover': 48606122680, 'homeNotional': 13842.584366612573, 'foreignNotional': 5766871.317483609}, {'timestamp': datetime.datetime(2020, 8, 20, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 416.75, 'high': 417.95, 'low': 414.5, 'close': 415.0, 'trades': 2205, 'volume': 1388445, 'vwap': 416.16, 'lastSize': 2950, 'turnover': 57780422045, 'homeNotional': 16432.292837084653, 'foreignNotional': 6838339.621043374}] 2020-08-21 04:00:20 INFO: prepare candles [CandleItem(low=415.3, high=419.3, open=416.7, close=416.15, color='RED'), CandleItem(low=414.6, high=417.7, open=415.0, close=416.7, color='GREEN'), CandleItem(low=414.5, high=417.95, open=416.75, close=415.0, color='RED')] 2020-08-21 04:00:20 INFO: skip by colors first_candle=CandleItem(low=414.5, high=417.95, open=416.75, close=415.0, color='RED') second_candle=CandleItem(low=414.6, high=417.7, open=415.0, close=416.7, color='GREEN') last_candle=CandleItem(low=415.3, high=419.3, open=416.7, close=416.15, color='RED') 2020-08-21 04:00:20 INFO: check need new order None 2020-08-21 04:00:20 INFO: init new order end 2020-08-21 04:00:20 INFO: 2020-08-21 04:00:20 INFO: 2020-08-21 04:00:20 INFO: 2020-08-21 04:00:20 INFO: 2020-08-21 04:02:00 INFO: 2020-08-21 04:02:00 INFO: 2020-08-21 04:02:00 INFO: 2020-08-21 04:02:00 INFO: 2020-08-21 04:02:00 INFO: clearing start 2020-08-21 04:02:00 INFO: clearing end 2020-08-21 04:02:00 INFO: 2020-08-21 04:02:00 INFO: 2020-08-21 04:02:00 INFO: 2020-08-21 04:02:00 INFO: 2020-08-21 05:00:20 INFO: 2020-08-21 05:00:20 INFO: 2020-08-21 05:00:20 INFO: 2020-08-21 05:00:20 INFO: 2020-08-21 05:00:20 INFO: init new order start 2020-08-21 05:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 21, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 416.15, 'high': 416.1, 'low': 410.8, 'close': 412.35, 'trades': 4169, 'volume': 3336295, 'vwap': 413.1, 'lastSize': 135, 'turnover': 137820488600, 'homeNotional': 39429.338772661, 'foreignNotional': 16288081.54433742}, {'timestamp': datetime.datetime(2020, 8, 21, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 416.7, 'high': 419.3, 'low': 415.3, 'close': 416.15, 'trades': 3086, 'volume': 1974376, 'vwap': 417.28, 'lastSize': 11, 'turnover': 82385380410, 'homeNotional': 23413.171167338987, 'foreignNotional': 9769710.137858536}, {'timestamp': datetime.datetime(2020, 8, 21, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 415.0, 'high': 417.7, 'low': 414.6, 'close': 416.7, 'trades': 1805, 'volume': 1166726, 'vwap': 416.61, 'lastSize': 11, 'turnover': 48606122680, 'homeNotional': 13842.584366612573, 'foreignNotional': 5766871.317483609}] 2020-08-21 05:00:21 INFO: prepare candles [CandleItem(low=410.8, high=416.1, open=416.15, close=412.35, color='RED'), CandleItem(low=415.3, high=419.3, open=416.7, close=416.15, color='RED'), CandleItem(low=414.6, high=417.7, open=415.0, close=416.7, color='GREEN')] 2020-08-21 05:00:21 INFO: skip by colors first_candle=CandleItem(low=414.6, high=417.7, open=415.0, close=416.7, color='GREEN') second_candle=CandleItem(low=415.3, high=419.3, open=416.7, close=416.15, color='RED') last_candle=CandleItem(low=410.8, high=416.1, open=416.15, close=412.35, color='RED') 2020-08-21 05:00:21 INFO: check need new order None 2020-08-21 05:00:21 INFO: init new order end 2020-08-21 05:00:21 INFO: 2020-08-21 05:00:21 INFO: 2020-08-21 05:00:21 INFO: 2020-08-21 05:00:21 INFO: 2020-08-21 05:02:00 INFO: 2020-08-21 05:02:00 INFO: 2020-08-21 05:02:00 INFO: 2020-08-21 05:02:00 INFO: 2020-08-21 05:02:00 INFO: clearing start 2020-08-21 05:02:00 INFO: clearing end 2020-08-21 05:02:00 INFO: 2020-08-21 05:02:00 INFO: 2020-08-21 05:02:00 INFO: 2020-08-21 05:02:00 INFO: 2020-08-21 06:00:20 INFO: 2020-08-21 06:00:20 INFO: 2020-08-21 06:00:20 INFO: 2020-08-21 06:00:20 INFO: 2020-08-21 06:00:20 INFO: init new order start 2020-08-21 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 21, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 412.35, 'high': 413.9, 'low': 411.05, 'close': 411.3, 'trades': 2891, 'volume': 1861850, 'vwap': 412.7, 'lastSize': 12, 'turnover': 76838243520, 'homeNotional': 22008.151379950636, 'foreignNotional': 9082737.664467715}, {'timestamp': datetime.datetime(2020, 8, 21, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 416.15, 'high': 416.1, 'low': 410.8, 'close': 412.35, 'trades': 4169, 'volume': 3336295, 'vwap': 413.1, 'lastSize': 135, 'turnover': 137820488600, 'homeNotional': 39429.338772661, 'foreignNotional': 16288081.54433742}, {'timestamp': datetime.datetime(2020, 8, 21, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 416.7, 'high': 419.3, 'low': 415.3, 'close': 416.15, 'trades': 3086, 'volume': 1974376, 'vwap': 417.28, 'lastSize': 11, 'turnover': 82385380410, 'homeNotional': 23413.171167338987, 'foreignNotional': 9769710.137858536}] 2020-08-21 06:00:20 INFO: prepare candles [CandleItem(low=411.05, high=413.9, open=412.35, close=411.3, color='RED'), CandleItem(low=410.8, high=416.1, open=416.15, close=412.35, color='RED'), CandleItem(low=415.3, high=419.3, open=416.7, close=416.15, color='RED')] 2020-08-21 06:00:20 INFO: skip by colors first_candle=CandleItem(low=415.3, high=419.3, open=416.7, close=416.15, color='RED') second_candle=CandleItem(low=410.8, high=416.1, open=416.15, close=412.35, color='RED') last_candle=CandleItem(low=411.05, high=413.9, open=412.35, close=411.3, color='RED') 2020-08-21 06:00:20 INFO: check need new order None 2020-08-21 06:00:20 INFO: init new order end 2020-08-21 06:00:20 INFO: 2020-08-21 06:00:20 INFO: 2020-08-21 06:00:20 INFO: 2020-08-21 06:00:20 INFO: 2020-08-21 06:02:00 INFO: 2020-08-21 06:02:00 INFO: 2020-08-21 06:02:00 INFO: 2020-08-21 06:02:00 INFO: 2020-08-21 06:02:00 INFO: clearing start 2020-08-21 06:02:00 INFO: clearing end 2020-08-21 06:02:00 INFO: 2020-08-21 06:02:00 INFO: 2020-08-21 06:02:00 INFO: 2020-08-21 06:02:00 INFO: 2020-08-21 07:00:20 INFO: 2020-08-21 07:00:20 INFO: 2020-08-21 07:00:20 INFO: 2020-08-21 07:00:20 INFO: 2020-08-21 07:00:20 INFO: init new order start 2020-08-21 07:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 21, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 411.3, 'high': 417.0, 'low': 410.35, 'close': 416.8, 'trades': 3336, 'volume': 2356917, 'vwap': 413.97, 'lastSize': 135, 'turnover': 97567787630, 'homeNotional': 27893.808520425235, 'foreignNotional': 11547135.527810983}, {'timestamp': datetime.datetime(2020, 8, 21, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 412.35, 'high': 413.9, 'low': 411.05, 'close': 411.3, 'trades': 2891, 'volume': 1861850, 'vwap': 412.7, 'lastSize': 12, 'turnover': 76838243520, 'homeNotional': 22008.151379950636, 'foreignNotional': 9082737.664467715}, {'timestamp': datetime.datetime(2020, 8, 21, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 416.15, 'high': 416.1, 'low': 410.8, 'close': 412.35, 'trades': 4169, 'volume': 3336295, 'vwap': 413.1, 'lastSize': 135, 'turnover': 137820488600, 'homeNotional': 39429.338772661, 'foreignNotional': 16288081.54433742}] 2020-08-21 07:00:20 INFO: prepare candles [CandleItem(low=410.35, high=417.0, open=411.3, close=416.8, color='GREEN'), CandleItem(low=411.05, high=413.9, open=412.35, close=411.3, color='RED'), CandleItem(low=410.8, high=416.1, open=416.15, close=412.35, color='RED')] 2020-08-21 07:00:20 INFO: last_candle=CandleItem(low=410.35, high=417.0, open=411.3, close=416.8, color='GREEN') 2020-08-21 07:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-08-21 07:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=410.35, high=417.0, open=411.3, close=416.8, color='GREEN') 2020-08-21 07:00:20 INFO: skip by CandleItem(low=410.35, high=417.0, open=411.3, close=416.8, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-21 07:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-08-21 07:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=410.35, high=417.0, open=411.3, close=416.8, color='GREEN') 2020-08-21 07:00:20 INFO: skip by CandleItem(low=410.35, high=417.0, open=411.3, close=416.8, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-21 07:00:20 INFO: not found applicable config for candle 2020-08-21 07:00:20 INFO: check need new order None 2020-08-21 07:00:20 INFO: init new order end 2020-08-21 07:00:20 INFO: 2020-08-21 07:00:20 INFO: 2020-08-21 07:00:20 INFO: 2020-08-21 07:00:20 INFO: 2020-08-21 07:02:00 INFO: 2020-08-21 07:02:00 INFO: 2020-08-21 07:02:00 INFO: 2020-08-21 07:02:00 INFO: 2020-08-21 07:02:00 INFO: clearing start 2020-08-21 07:02:00 INFO: clearing end 2020-08-21 07:02:00 INFO: 2020-08-21 07:02:00 INFO: 2020-08-21 07:02:00 INFO: 2020-08-21 07:02:00 INFO: 2020-08-21 08:00:20 INFO: 2020-08-21 08:00:20 INFO: 2020-08-21 08:00:20 INFO: 2020-08-21 08:00:20 INFO: 2020-08-21 08:00:20 INFO: init new order start 2020-08-21 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 21, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 416.8, 'high': 417.45, 'low': 414.6, 'close': 415.75, 'trades': 2181, 'volume': 1457571, 'vwap': 415.78, 'lastSize': 6900, 'turnover': 60602177390, 'homeNotional': 17281.509911108846, 'foreignNotional': 7185228.231635213}, {'timestamp': datetime.datetime(2020, 8, 21, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 411.3, 'high': 417.0, 'low': 410.35, 'close': 416.8, 'trades': 3336, 'volume': 2356917, 'vwap': 413.97, 'lastSize': 135, 'turnover': 97567787630, 'homeNotional': 27893.808520425235, 'foreignNotional': 11547135.527810983}, {'timestamp': datetime.datetime(2020, 8, 21, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 412.35, 'high': 413.9, 'low': 411.05, 'close': 411.3, 'trades': 2891, 'volume': 1861850, 'vwap': 412.7, 'lastSize': 12, 'turnover': 76838243520, 'homeNotional': 22008.151379950636, 'foreignNotional': 9082737.664467715}] 2020-08-21 08:00:20 INFO: prepare candles [CandleItem(low=414.6, high=417.45, open=416.8, close=415.75, color='RED'), CandleItem(low=410.35, high=417.0, open=411.3, close=416.8, color='GREEN'), CandleItem(low=411.05, high=413.9, open=412.35, close=411.3, color='RED')] 2020-08-21 08:00:20 INFO: skip by colors first_candle=CandleItem(low=411.05, high=413.9, open=412.35, close=411.3, color='RED') second_candle=CandleItem(low=410.35, high=417.0, open=411.3, close=416.8, color='GREEN') last_candle=CandleItem(low=414.6, high=417.45, open=416.8, close=415.75, color='RED') 2020-08-21 08:00:20 INFO: check need new order None 2020-08-21 08:00:20 INFO: init new order end 2020-08-21 08:00:20 INFO: 2020-08-21 08:00:20 INFO: 2020-08-21 08:00:20 INFO: 2020-08-21 08:00:20 INFO: 2020-08-21 08:02:00 INFO: 2020-08-21 08:02:00 INFO: 2020-08-21 08:02:00 INFO: 2020-08-21 08:02:00 INFO: 2020-08-21 08:02:00 INFO: clearing start 2020-08-21 08:02:00 INFO: clearing end 2020-08-21 08:02:00 INFO: 2020-08-21 08:02:00 INFO: 2020-08-21 08:02:00 INFO: 2020-08-21 08:02:00 INFO: 2020-08-21 09:00:20 INFO: 2020-08-21 09:00:20 INFO: 2020-08-21 09:00:20 INFO: 2020-08-21 09:00:20 INFO: 2020-08-21 09:00:20 INFO: init new order start 2020-08-21 09:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 21, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 415.75, 'high': 416.75, 'low': 414.0, 'close': 414.65, 'trades': 1847, 'volume': 1106123, 'vwap': 415.24, 'lastSize': 130, 'turnover': 45929941985, 'homeNotional': 13114.72399980452, 'foreignNotional': 5445679.891098957}, {'timestamp': datetime.datetime(2020, 8, 21, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 416.8, 'high': 417.45, 'low': 414.6, 'close': 415.75, 'trades': 2181, 'volume': 1457571, 'vwap': 415.78, 'lastSize': 6900, 'turnover': 60602177390, 'homeNotional': 17281.509911108846, 'foreignNotional': 7185228.231635213}, {'timestamp': datetime.datetime(2020, 8, 21, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 411.3, 'high': 417.0, 'low': 410.35, 'close': 416.8, 'trades': 3336, 'volume': 2356917, 'vwap': 413.97, 'lastSize': 135, 'turnover': 97567787630, 'homeNotional': 27893.808520425235, 'foreignNotional': 11547135.527810983}] 2020-08-21 09:00:20 INFO: prepare candles [CandleItem(low=414.0, high=416.75, open=415.75, close=414.65, color='RED'), CandleItem(low=414.6, high=417.45, open=416.8, close=415.75, color='RED'), CandleItem(low=410.35, high=417.0, open=411.3, close=416.8, color='GREEN')] 2020-08-21 09:00:20 INFO: skip by colors first_candle=CandleItem(low=410.35, high=417.0, open=411.3, close=416.8, color='GREEN') second_candle=CandleItem(low=414.6, high=417.45, open=416.8, close=415.75, color='RED') last_candle=CandleItem(low=414.0, high=416.75, open=415.75, close=414.65, color='RED') 2020-08-21 09:00:20 INFO: check need new order None 2020-08-21 09:00:20 INFO: init new order end 2020-08-21 09:00:20 INFO: 2020-08-21 09:00:20 INFO: 2020-08-21 09:00:20 INFO: 2020-08-21 09:00:20 INFO: 2020-08-21 09:02:00 INFO: 2020-08-21 09:02:00 INFO: 2020-08-21 09:02:00 INFO: 2020-08-21 09:02:00 INFO: 2020-08-21 09:02:00 INFO: clearing start 2020-08-21 09:02:00 INFO: clearing end 2020-08-21 09:02:00 INFO: 2020-08-21 09:02:00 INFO: 2020-08-21 09:02:00 INFO: 2020-08-21 09:02:00 INFO: 2020-08-21 10:00:20 INFO: 2020-08-21 10:00:20 INFO: 2020-08-21 10:00:20 INFO: 2020-08-21 10:00:20 INFO: 2020-08-21 10:00:20 INFO: init new order start 2020-08-21 10:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 21, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 414.65, 'high': 414.65, 'low': 413.25, 'close': 413.5, 'trades': 1493, 'volume': 751196, 'vwap': 413.95, 'lastSize': 12, 'turnover': 31095687725, 'homeNotional': 8888.408064531981, 'foreignNotional': 3679350.834360935}, {'timestamp': datetime.datetime(2020, 8, 21, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 415.75, 'high': 416.75, 'low': 414.0, 'close': 414.65, 'trades': 1847, 'volume': 1106123, 'vwap': 415.24, 'lastSize': 130, 'turnover': 45929941985, 'homeNotional': 13114.72399980452, 'foreignNotional': 5445679.891098957}, {'timestamp': datetime.datetime(2020, 8, 21, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 416.8, 'high': 417.45, 'low': 414.6, 'close': 415.75, 'trades': 2181, 'volume': 1457571, 'vwap': 415.78, 'lastSize': 6900, 'turnover': 60602177390, 'homeNotional': 17281.509911108846, 'foreignNotional': 7185228.231635213}] 2020-08-21 10:00:20 INFO: prepare candles [CandleItem(low=413.25, high=414.65, open=414.65, close=413.5, color='RED'), CandleItem(low=414.0, high=416.75, open=415.75, close=414.65, color='RED'), CandleItem(low=414.6, high=417.45, open=416.8, close=415.75, color='RED')] 2020-08-21 10:00:20 INFO: skip by colors first_candle=CandleItem(low=414.6, high=417.45, open=416.8, close=415.75, color='RED') second_candle=CandleItem(low=414.0, high=416.75, open=415.75, close=414.65, color='RED') last_candle=CandleItem(low=413.25, high=414.65, open=414.65, close=413.5, color='RED') 2020-08-21 10:00:20 INFO: check need new order None 2020-08-21 10:00:20 INFO: init new order end 2020-08-21 10:00:20 INFO: 2020-08-21 10:00:20 INFO: 2020-08-21 10:00:20 INFO: 2020-08-21 10:00:20 INFO: 2020-08-21 10:02:00 INFO: 2020-08-21 10:02:00 INFO: 2020-08-21 10:02:00 INFO: 2020-08-21 10:02:00 INFO: 2020-08-21 10:02:00 INFO: clearing start 2020-08-21 10:02:00 INFO: clearing end 2020-08-21 10:02:00 INFO: 2020-08-21 10:02:00 INFO: 2020-08-21 10:02:00 INFO: 2020-08-21 10:02:00 INFO: 2020-08-21 11:00:20 INFO: 2020-08-21 11:00:20 INFO: 2020-08-21 11:00:20 INFO: 2020-08-21 11:00:20 INFO: 2020-08-21 11:00:20 INFO: init new order start 2020-08-21 11:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 21, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 413.5, 'high': 415.0, 'low': 412.2, 'close': 413.15, 'trades': 2618, 'volume': 1783152, 'vwap': 413.6, 'lastSize': 1050, 'turnover': 73750956350, 'homeNotional': 21106.47353149362, 'foreignNotional': 8729621.909413116}, {'timestamp': datetime.datetime(2020, 8, 21, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 414.65, 'high': 414.65, 'low': 413.25, 'close': 413.5, 'trades': 1493, 'volume': 751196, 'vwap': 413.95, 'lastSize': 12, 'turnover': 31095687725, 'homeNotional': 8888.408064531981, 'foreignNotional': 3679350.834360935}, {'timestamp': datetime.datetime(2020, 8, 21, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 415.75, 'high': 416.75, 'low': 414.0, 'close': 414.65, 'trades': 1847, 'volume': 1106123, 'vwap': 415.24, 'lastSize': 130, 'turnover': 45929941985, 'homeNotional': 13114.72399980452, 'foreignNotional': 5445679.891098957}] 2020-08-21 11:00:20 INFO: prepare candles [CandleItem(low=412.2, high=415.0, open=413.5, close=413.15, color='RED'), CandleItem(low=413.25, high=414.65, open=414.65, close=413.5, color='RED'), CandleItem(low=414.0, high=416.75, open=415.75, close=414.65, color='RED')] 2020-08-21 11:00:20 INFO: skip by colors first_candle=CandleItem(low=414.0, high=416.75, open=415.75, close=414.65, color='RED') second_candle=CandleItem(low=413.25, high=414.65, open=414.65, close=413.5, color='RED') last_candle=CandleItem(low=412.2, high=415.0, open=413.5, close=413.15, color='RED') 2020-08-21 11:00:20 INFO: check need new order None 2020-08-21 11:00:20 INFO: init new order end 2020-08-21 11:00:20 INFO: 2020-08-21 11:00:20 INFO: 2020-08-21 11:00:20 INFO: 2020-08-21 11:00:20 INFO: 2020-08-21 11:02:00 INFO: 2020-08-21 11:02:00 INFO: 2020-08-21 11:02:00 INFO: 2020-08-21 11:02:00 INFO: 2020-08-21 11:02:00 INFO: clearing start 2020-08-21 11:02:00 INFO: clearing end 2020-08-21 11:02:00 INFO: 2020-08-21 11:02:00 INFO: 2020-08-21 11:02:00 INFO: 2020-08-21 11:02:00 INFO: 2020-08-21 12:00:20 INFO: 2020-08-21 12:00:20 INFO: 2020-08-21 12:00:20 INFO: 2020-08-21 12:00:20 INFO: 2020-08-21 12:00:20 INFO: init new order start 2020-08-21 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 21, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 413.15, 'high': 413.35, 'low': 408.8, 'close': 411.75, 'trades': 6262, 'volume': 4310028, 'vwap': 411.3, 'lastSize': 10, 'turnover': 177271316530, 'homeNotional': 50936.169116351375, 'foreignNotional': 20950071.519987635}, {'timestamp': datetime.datetime(2020, 8, 21, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 413.5, 'high': 415.0, 'low': 412.2, 'close': 413.15, 'trades': 2618, 'volume': 1783152, 'vwap': 413.6, 'lastSize': 1050, 'turnover': 73750956350, 'homeNotional': 21106.47353149362, 'foreignNotional': 8729621.909413116}, {'timestamp': datetime.datetime(2020, 8, 21, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 414.65, 'high': 414.65, 'low': 413.25, 'close': 413.5, 'trades': 1493, 'volume': 751196, 'vwap': 413.95, 'lastSize': 12, 'turnover': 31095687725, 'homeNotional': 8888.408064531981, 'foreignNotional': 3679350.834360935}] 2020-08-21 12:00:20 INFO: prepare candles [CandleItem(low=408.8, high=413.35, open=413.15, close=411.75, color='RED'), CandleItem(low=412.2, high=415.0, open=413.5, close=413.15, color='RED'), CandleItem(low=413.25, high=414.65, open=414.65, close=413.5, color='RED')] 2020-08-21 12:00:20 INFO: skip by colors first_candle=CandleItem(low=413.25, high=414.65, open=414.65, close=413.5, color='RED') second_candle=CandleItem(low=412.2, high=415.0, open=413.5, close=413.15, color='RED') last_candle=CandleItem(low=408.8, high=413.35, open=413.15, close=411.75, color='RED') 2020-08-21 12:00:20 INFO: check need new order None 2020-08-21 12:00:20 INFO: init new order end 2020-08-21 12:00:20 INFO: 2020-08-21 12:00:20 INFO: 2020-08-21 12:00:20 INFO: 2020-08-21 12:00:20 INFO: 2020-08-21 12:02:00 INFO: 2020-08-21 12:02:00 INFO: 2020-08-21 12:02:00 INFO: 2020-08-21 12:02:00 INFO: 2020-08-21 12:02:00 INFO: clearing start 2020-08-21 12:02:00 INFO: clearing end 2020-08-21 12:02:00 INFO: 2020-08-21 12:02:00 INFO: 2020-08-21 12:02:00 INFO: 2020-08-21 12:02:00 INFO: 2020-08-21 13:00:20 INFO: 2020-08-21 13:00:20 INFO: 2020-08-21 13:00:20 INFO: 2020-08-21 13:00:20 INFO: 2020-08-21 13:00:20 INFO: init new order start 2020-08-21 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 21, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 411.75, 'high': 412.6, 'low': 408.6, 'close': 408.75, 'trades': 3064, 'volume': 2013537, 'vwap': 410.46, 'lastSize': 430, 'turnover': 82646654340, 'homeNotional': 23779.38466670898, 'foreignNotional': 9760400.951216964}, {'timestamp': datetime.datetime(2020, 8, 21, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 413.15, 'high': 413.35, 'low': 408.8, 'close': 411.75, 'trades': 6262, 'volume': 4310028, 'vwap': 411.3, 'lastSize': 10, 'turnover': 177271316530, 'homeNotional': 50936.169116351375, 'foreignNotional': 20950071.519987635}, {'timestamp': datetime.datetime(2020, 8, 21, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 413.5, 'high': 415.0, 'low': 412.2, 'close': 413.15, 'trades': 2618, 'volume': 1783152, 'vwap': 413.6, 'lastSize': 1050, 'turnover': 73750956350, 'homeNotional': 21106.47353149362, 'foreignNotional': 8729621.909413116}] 2020-08-21 13:00:20 INFO: prepare candles [CandleItem(low=408.6, high=412.6, open=411.75, close=408.75, color='RED'), CandleItem(low=408.8, high=413.35, open=413.15, close=411.75, color='RED'), CandleItem(low=412.2, high=415.0, open=413.5, close=413.15, color='RED')] 2020-08-21 13:00:20 INFO: skip by colors first_candle=CandleItem(low=412.2, high=415.0, open=413.5, close=413.15, color='RED') second_candle=CandleItem(low=408.8, high=413.35, open=413.15, close=411.75, color='RED') last_candle=CandleItem(low=408.6, high=412.6, open=411.75, close=408.75, color='RED') 2020-08-21 13:00:20 INFO: check need new order None 2020-08-21 13:00:20 INFO: init new order end 2020-08-21 13:00:20 INFO: 2020-08-21 13:00:20 INFO: 2020-08-21 13:00:20 INFO: 2020-08-21 13:00:20 INFO: 2020-08-21 13:02:00 INFO: 2020-08-21 13:02:00 INFO: 2020-08-21 13:02:00 INFO: 2020-08-21 13:02:00 INFO: 2020-08-21 13:02:00 INFO: clearing start 2020-08-21 13:02:00 INFO: clearing end 2020-08-21 13:02:00 INFO: 2020-08-21 13:02:00 INFO: 2020-08-21 13:02:00 INFO: 2020-08-21 13:02:00 INFO: 2020-08-21 14:00:20 INFO: 2020-08-21 14:00:20 INFO: 2020-08-21 14:00:20 INFO: 2020-08-21 14:00:20 INFO: 2020-08-21 14:00:20 INFO: init new order start 2020-08-21 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 21, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 408.75, 'high': 409.25, 'low': 405.05, 'close': 408.5, 'trades': 7758, 'volume': 7829925, 'vwap': 407.11, 'lastSize': 10, 'turnover': 318763243205, 'homeNotional': 92066.87076178993, 'foreignNotional': 37481333.724597864}, {'timestamp': datetime.datetime(2020, 8, 21, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 411.75, 'high': 412.6, 'low': 408.6, 'close': 408.75, 'trades': 3064, 'volume': 2013537, 'vwap': 410.46, 'lastSize': 430, 'turnover': 82646654340, 'homeNotional': 23779.38466670898, 'foreignNotional': 9760400.951216964}, {'timestamp': datetime.datetime(2020, 8, 21, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 413.15, 'high': 413.35, 'low': 408.8, 'close': 411.75, 'trades': 6262, 'volume': 4310028, 'vwap': 411.3, 'lastSize': 10, 'turnover': 177271316530, 'homeNotional': 50936.169116351375, 'foreignNotional': 20950071.519987635}] 2020-08-21 14:00:20 INFO: prepare candles [CandleItem(low=405.05, high=409.25, open=408.75, close=408.5, color='RED'), CandleItem(low=408.6, high=412.6, open=411.75, close=408.75, color='RED'), CandleItem(low=408.8, high=413.35, open=413.15, close=411.75, color='RED')] 2020-08-21 14:00:20 INFO: skip by colors first_candle=CandleItem(low=408.8, high=413.35, open=413.15, close=411.75, color='RED') second_candle=CandleItem(low=408.6, high=412.6, open=411.75, close=408.75, color='RED') last_candle=CandleItem(low=405.05, high=409.25, open=408.75, close=408.5, color='RED') 2020-08-21 14:00:20 INFO: check need new order None 2020-08-21 14:00:20 INFO: init new order end 2020-08-21 14:00:20 INFO: 2020-08-21 14:00:20 INFO: 2020-08-21 14:00:20 INFO: 2020-08-21 14:00:20 INFO: 2020-08-21 14:02:00 INFO: 2020-08-21 14:02:00 INFO: 2020-08-21 14:02:00 INFO: 2020-08-21 14:02:00 INFO: 2020-08-21 14:02:00 INFO: clearing start 2020-08-21 14:02:00 INFO: clearing end 2020-08-21 14:02:00 INFO: 2020-08-21 14:02:00 INFO: 2020-08-21 14:02:00 INFO: 2020-08-21 14:02:00 INFO: 2020-08-21 15:00:20 INFO: 2020-08-21 15:00:20 INFO: 2020-08-21 15:00:20 INFO: 2020-08-21 15:00:20 INFO: 2020-08-21 15:00:20 INFO: init new order start 2020-08-21 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 21, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 408.5, 'high': 409.25, 'low': 404.1, 'close': 405.7, 'trades': 5186, 'volume': 4846519, 'vwap': 406.36, 'lastSize': 13, 'turnover': 196938835215, 'homeNotional': 56836.27644012189, 'foreignNotional': 23095651.510443848}, {'timestamp': datetime.datetime(2020, 8, 21, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 408.75, 'high': 409.25, 'low': 405.05, 'close': 408.5, 'trades': 7758, 'volume': 7829925, 'vwap': 407.11, 'lastSize': 10, 'turnover': 318763243205, 'homeNotional': 92066.87076178993, 'foreignNotional': 37481333.724597864}, {'timestamp': datetime.datetime(2020, 8, 21, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 411.75, 'high': 412.6, 'low': 408.6, 'close': 408.75, 'trades': 3064, 'volume': 2013537, 'vwap': 410.46, 'lastSize': 430, 'turnover': 82646654340, 'homeNotional': 23779.38466670898, 'foreignNotional': 9760400.951216964}] 2020-08-21 15:00:20 INFO: prepare candles [CandleItem(low=404.1, high=409.25, open=408.5, close=405.7, color='RED'), CandleItem(low=405.05, high=409.25, open=408.75, close=408.5, color='RED'), CandleItem(low=408.6, high=412.6, open=411.75, close=408.75, color='RED')] 2020-08-21 15:00:20 INFO: skip by colors first_candle=CandleItem(low=408.6, high=412.6, open=411.75, close=408.75, color='RED') second_candle=CandleItem(low=405.05, high=409.25, open=408.75, close=408.5, color='RED') last_candle=CandleItem(low=404.1, high=409.25, open=408.5, close=405.7, color='RED') 2020-08-21 15:00:20 INFO: check need new order None 2020-08-21 15:00:20 INFO: init new order end 2020-08-21 15:00:20 INFO: 2020-08-21 15:00:20 INFO: 2020-08-21 15:00:20 INFO: 2020-08-21 15:00:20 INFO: 2020-08-21 15:02:00 INFO: 2020-08-21 15:02:00 INFO: 2020-08-21 15:02:00 INFO: 2020-08-21 15:02:00 INFO: 2020-08-21 15:02:00 INFO: clearing start 2020-08-21 15:02:00 INFO: clearing end 2020-08-21 15:02:00 INFO: 2020-08-21 15:02:00 INFO: 2020-08-21 15:02:00 INFO: 2020-08-21 15:02:00 INFO: 2020-08-21 16:00:20 INFO: 2020-08-21 16:00:20 INFO: 2020-08-21 16:00:20 INFO: 2020-08-21 16:00:20 INFO: 2020-08-21 16:00:20 INFO: init new order start 2020-08-21 16:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 21, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.7, 'high': 408.4, 'low': 400.0, 'close': 407.45, 'trades': 11274, 'volume': 11249728, 'vwap': 403.57, 'lastSize': 100, 'turnover': 453999269835, 'homeNotional': 131519.24134096596, 'foreignNotional': 53077278.22161224}, {'timestamp': datetime.datetime(2020, 8, 21, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 408.5, 'high': 409.25, 'low': 404.1, 'close': 405.7, 'trades': 5186, 'volume': 4846519, 'vwap': 406.36, 'lastSize': 13, 'turnover': 196938835215, 'homeNotional': 56836.27644012189, 'foreignNotional': 23095651.510443848}, {'timestamp': datetime.datetime(2020, 8, 21, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 408.75, 'high': 409.25, 'low': 405.05, 'close': 408.5, 'trades': 7758, 'volume': 7829925, 'vwap': 407.11, 'lastSize': 10, 'turnover': 318763243205, 'homeNotional': 92066.87076178993, 'foreignNotional': 37481333.724597864}] 2020-08-21 16:00:20 INFO: prepare candles [CandleItem(low=400.0, high=408.4, open=405.7, close=407.45, color='GREEN'), CandleItem(low=404.1, high=409.25, open=408.5, close=405.7, color='RED'), CandleItem(low=405.05, high=409.25, open=408.75, close=408.5, color='RED')] 2020-08-21 16:00:20 INFO: last_candle=CandleItem(low=400.0, high=408.4, open=405.7, close=407.45, color='GREEN') 2020-08-21 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-08-21 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=400.0, high=408.4, open=405.7, close=407.45, color='GREEN') 2020-08-21 16:00:20 INFO: skip by CandleItem(low=400.0, high=408.4, open=405.7, close=407.45, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-21 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-08-21 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=400.0, high=408.4, open=405.7, close=407.45, color='GREEN') 2020-08-21 16:00:20 INFO: skip by CandleItem(low=400.0, high=408.4, open=405.7, close=407.45, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-21 16:00:20 INFO: not found applicable config for candle 2020-08-21 16:00:20 INFO: check need new order None 2020-08-21 16:00:20 INFO: init new order end 2020-08-21 16:00:20 INFO: 2020-08-21 16:00:20 INFO: 2020-08-21 16:00:20 INFO: 2020-08-21 16:00:20 INFO: 2020-08-21 16:02:00 INFO: 2020-08-21 16:02:00 INFO: 2020-08-21 16:02:00 INFO: 2020-08-21 16:02:00 INFO: 2020-08-21 16:02:00 INFO: clearing start 2020-08-21 16:02:00 INFO: clearing end 2020-08-21 16:02:00 INFO: 2020-08-21 16:02:00 INFO: 2020-08-21 16:02:00 INFO: 2020-08-21 16:02:00 INFO: 2020-08-21 17:00:20 INFO: 2020-08-21 17:00:20 INFO: 2020-08-21 17:00:20 INFO: 2020-08-21 17:00:20 INFO: 2020-08-21 17:00:20 INFO: init new order start 2020-08-21 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 21, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 407.45, 'high': 408.6, 'low': 402.55, 'close': 402.8, 'trades': 4983, 'volume': 4865194, 'vwap': 406.11, 'lastSize': 3000, 'turnover': 197578814495, 'homeNotional': 57088.99501950595, 'foreignNotional': 23184442.127897076}, {'timestamp': datetime.datetime(2020, 8, 21, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.7, 'high': 408.4, 'low': 400.0, 'close': 407.45, 'trades': 11274, 'volume': 11249728, 'vwap': 403.57, 'lastSize': 100, 'turnover': 453999269835, 'homeNotional': 131519.24134096596, 'foreignNotional': 53077278.22161224}, {'timestamp': datetime.datetime(2020, 8, 21, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 408.5, 'high': 409.25, 'low': 404.1, 'close': 405.7, 'trades': 5186, 'volume': 4846519, 'vwap': 406.36, 'lastSize': 13, 'turnover': 196938835215, 'homeNotional': 56836.27644012189, 'foreignNotional': 23095651.510443848}] 2020-08-21 17:00:20 INFO: prepare candles [CandleItem(low=402.55, high=408.6, open=407.45, close=402.8, color='RED'), CandleItem(low=400.0, high=408.4, open=405.7, close=407.45, color='GREEN'), CandleItem(low=404.1, high=409.25, open=408.5, close=405.7, color='RED')] 2020-08-21 17:00:20 INFO: skip by colors first_candle=CandleItem(low=404.1, high=409.25, open=408.5, close=405.7, color='RED') second_candle=CandleItem(low=400.0, high=408.4, open=405.7, close=407.45, color='GREEN') last_candle=CandleItem(low=402.55, high=408.6, open=407.45, close=402.8, color='RED') 2020-08-21 17:00:20 INFO: check need new order None 2020-08-21 17:00:20 INFO: init new order end 2020-08-21 17:00:20 INFO: 2020-08-21 17:00:20 INFO: 2020-08-21 17:00:20 INFO: 2020-08-21 17:00:20 INFO: 2020-08-21 17:02:00 INFO: 2020-08-21 17:02:00 INFO: 2020-08-21 17:02:00 INFO: 2020-08-21 17:02:00 INFO: 2020-08-21 17:02:00 INFO: clearing start 2020-08-21 17:02:00 INFO: clearing end 2020-08-21 17:02:00 INFO: 2020-08-21 17:02:00 INFO: 2020-08-21 17:02:00 INFO: 2020-08-21 17:02:00 INFO: 2020-08-21 18:00:20 INFO: 2020-08-21 18:00:20 INFO: 2020-08-21 18:00:20 INFO: 2020-08-21 18:00:20 INFO: 2020-08-21 18:00:20 INFO: init new order start 2020-08-21 18:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 21, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 402.8, 'high': 407.3, 'low': 401.7, 'close': 405.8, 'trades': 5578, 'volume': 5793448, 'vwap': 404.24, 'lastSize': 10, 'turnover': 234192797110, 'homeNotional': 67852.76516162306, 'foreignNotional': 27428796.797453325}, {'timestamp': datetime.datetime(2020, 8, 21, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 407.45, 'high': 408.6, 'low': 402.55, 'close': 402.8, 'trades': 4983, 'volume': 4865194, 'vwap': 406.11, 'lastSize': 3000, 'turnover': 197578814495, 'homeNotional': 57088.99501950595, 'foreignNotional': 23184442.127897076}, {'timestamp': datetime.datetime(2020, 8, 21, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.7, 'high': 408.4, 'low': 400.0, 'close': 407.45, 'trades': 11274, 'volume': 11249728, 'vwap': 403.57, 'lastSize': 100, 'turnover': 453999269835, 'homeNotional': 131519.24134096596, 'foreignNotional': 53077278.22161224}] 2020-08-21 18:00:20 INFO: prepare candles [CandleItem(low=401.7, high=407.3, open=402.8, close=405.8, color='GREEN'), CandleItem(low=402.55, high=408.6, open=407.45, close=402.8, color='RED'), CandleItem(low=400.0, high=408.4, open=405.7, close=407.45, color='GREEN')] 2020-08-21 18:00:20 INFO: skip by colors first_candle=CandleItem(low=400.0, high=408.4, open=405.7, close=407.45, color='GREEN') second_candle=CandleItem(low=402.55, high=408.6, open=407.45, close=402.8, color='RED') last_candle=CandleItem(low=401.7, high=407.3, open=402.8, close=405.8, color='GREEN') 2020-08-21 18:00:20 INFO: check need new order None 2020-08-21 18:00:20 INFO: init new order end 2020-08-21 18:00:20 INFO: 2020-08-21 18:00:20 INFO: 2020-08-21 18:00:20 INFO: 2020-08-21 18:00:20 INFO: 2020-08-21 18:02:00 INFO: 2020-08-21 18:02:00 INFO: 2020-08-21 18:02:00 INFO: 2020-08-21 18:02:00 INFO: 2020-08-21 18:02:00 INFO: clearing start 2020-08-21 18:02:00 INFO: clearing end 2020-08-21 18:02:00 INFO: 2020-08-21 18:02:00 INFO: 2020-08-21 18:02:00 INFO: 2020-08-21 18:02:00 INFO: 2020-08-21 19:00:20 INFO: 2020-08-21 19:00:20 INFO: 2020-08-21 19:00:20 INFO: 2020-08-21 19:00:20 INFO: 2020-08-21 19:00:20 INFO: init new order start 2020-08-21 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 21, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.8, 'high': 407.55, 'low': 403.5, 'close': 405.0, 'trades': 3314, 'volume': 2336188, 'vwap': 405.91, 'lastSize': 1, 'turnover': 94825892325, 'homeNotional': 27431.59941605618, 'foreignNotional': 11134517.240699168}, {'timestamp': datetime.datetime(2020, 8, 21, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 402.8, 'high': 407.3, 'low': 401.7, 'close': 405.8, 'trades': 5578, 'volume': 5793448, 'vwap': 404.24, 'lastSize': 10, 'turnover': 234192797110, 'homeNotional': 67852.76516162306, 'foreignNotional': 27428796.797453325}, {'timestamp': datetime.datetime(2020, 8, 21, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 407.45, 'high': 408.6, 'low': 402.55, 'close': 402.8, 'trades': 4983, 'volume': 4865194, 'vwap': 406.11, 'lastSize': 3000, 'turnover': 197578814495, 'homeNotional': 57088.99501950595, 'foreignNotional': 23184442.127897076}] 2020-08-21 19:00:20 INFO: prepare candles [CandleItem(low=403.5, high=407.55, open=405.8, close=405.0, color='RED'), CandleItem(low=401.7, high=407.3, open=402.8, close=405.8, color='GREEN'), CandleItem(low=402.55, high=408.6, open=407.45, close=402.8, color='RED')] 2020-08-21 19:00:20 INFO: skip by colors first_candle=CandleItem(low=402.55, high=408.6, open=407.45, close=402.8, color='RED') second_candle=CandleItem(low=401.7, high=407.3, open=402.8, close=405.8, color='GREEN') last_candle=CandleItem(low=403.5, high=407.55, open=405.8, close=405.0, color='RED') 2020-08-21 19:00:20 INFO: check need new order None 2020-08-21 19:00:20 INFO: init new order end 2020-08-21 19:00:20 INFO: 2020-08-21 19:00:20 INFO: 2020-08-21 19:00:20 INFO: 2020-08-21 19:00:20 INFO: 2020-08-21 19:02:00 INFO: 2020-08-21 19:02:00 INFO: 2020-08-21 19:02:00 INFO: 2020-08-21 19:02:00 INFO: 2020-08-21 19:02:00 INFO: clearing start 2020-08-21 19:02:00 INFO: clearing end 2020-08-21 19:02:00 INFO: 2020-08-21 19:02:00 INFO: 2020-08-21 19:02:00 INFO: 2020-08-21 19:02:00 INFO: 2020-08-21 20:00:20 INFO: 2020-08-21 20:00:20 INFO: 2020-08-21 20:00:20 INFO: 2020-08-21 20:00:20 INFO: 2020-08-21 20:00:20 INFO: init new order start 2020-08-21 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 21, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.0, 'high': 406.95, 'low': 401.3, 'close': 401.35, 'trades': 4068, 'volume': 3350139, 'vwap': 404.08, 'lastSize': 11, 'turnover': 135369185380, 'homeNotional': 39239.220068695366, 'foreignNotional': 15855508.323929071}, {'timestamp': datetime.datetime(2020, 8, 21, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.8, 'high': 407.55, 'low': 403.5, 'close': 405.0, 'trades': 3314, 'volume': 2336188, 'vwap': 405.91, 'lastSize': 1, 'turnover': 94825892325, 'homeNotional': 27431.59941605618, 'foreignNotional': 11134517.240699168}, {'timestamp': datetime.datetime(2020, 8, 21, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 402.8, 'high': 407.3, 'low': 401.7, 'close': 405.8, 'trades': 5578, 'volume': 5793448, 'vwap': 404.24, 'lastSize': 10, 'turnover': 234192797110, 'homeNotional': 67852.76516162306, 'foreignNotional': 27428796.797453325}] 2020-08-21 20:00:20 INFO: prepare candles [CandleItem(low=401.3, high=406.95, open=405.0, close=401.35, color='RED'), CandleItem(low=403.5, high=407.55, open=405.8, close=405.0, color='RED'), CandleItem(low=401.7, high=407.3, open=402.8, close=405.8, color='GREEN')] 2020-08-21 20:00:20 INFO: skip by colors first_candle=CandleItem(low=401.7, high=407.3, open=402.8, close=405.8, color='GREEN') second_candle=CandleItem(low=403.5, high=407.55, open=405.8, close=405.0, color='RED') last_candle=CandleItem(low=401.3, high=406.95, open=405.0, close=401.35, color='RED') 2020-08-21 20:00:20 INFO: check need new order None 2020-08-21 20:00:20 INFO: init new order end 2020-08-21 20:00:20 INFO: 2020-08-21 20:00:20 INFO: 2020-08-21 20:00:20 INFO: 2020-08-21 20:00:20 INFO: 2020-08-21 20:02:00 INFO: 2020-08-21 20:02:00 INFO: 2020-08-21 20:02:00 INFO: 2020-08-21 20:02:00 INFO: 2020-08-21 20:02:00 INFO: clearing start 2020-08-21 20:02:00 INFO: clearing end 2020-08-21 20:02:00 INFO: 2020-08-21 20:02:00 INFO: 2020-08-21 20:02:00 INFO: 2020-08-21 20:02:00 INFO: 2020-08-21 21:00:20 INFO: 2020-08-21 21:00:20 INFO: 2020-08-21 21:00:20 INFO: 2020-08-21 21:00:20 INFO: 2020-08-21 21:00:20 INFO: init new order start 2020-08-21 21:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 21, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 401.35, 'high': 407.2, 'low': 399.45, 'close': 403.3, 'trades': 7695, 'volume': 8000941, 'vwap': 403.54, 'lastSize': 400, 'turnover': 322865630340, 'homeNotional': 93541.81983443032, 'foreignNotional': 37747860.90156138}, {'timestamp': datetime.datetime(2020, 8, 21, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.0, 'high': 406.95, 'low': 401.3, 'close': 401.35, 'trades': 4068, 'volume': 3350139, 'vwap': 404.08, 'lastSize': 11, 'turnover': 135369185380, 'homeNotional': 39239.220068695366, 'foreignNotional': 15855508.323929071}, {'timestamp': datetime.datetime(2020, 8, 21, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.8, 'high': 407.55, 'low': 403.5, 'close': 405.0, 'trades': 3314, 'volume': 2336188, 'vwap': 405.91, 'lastSize': 1, 'turnover': 94825892325, 'homeNotional': 27431.59941605618, 'foreignNotional': 11134517.240699168}] 2020-08-21 21:00:21 INFO: prepare candles [CandleItem(low=399.45, high=407.2, open=401.35, close=403.3, color='GREEN'), CandleItem(low=401.3, high=406.95, open=405.0, close=401.35, color='RED'), CandleItem(low=403.5, high=407.55, open=405.8, close=405.0, color='RED')] 2020-08-21 21:00:21 INFO: last_candle=CandleItem(low=399.45, high=407.2, open=401.35, close=403.3, color='GREEN') 2020-08-21 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-08-21 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=399.45, high=407.2, open=401.35, close=403.3, color='GREEN') 2020-08-21 21:00:21 INFO: skip by CandleItem(low=399.45, high=407.2, open=401.35, close=403.3, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-21 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-08-21 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=399.45, high=407.2, open=401.35, close=403.3, color='GREEN') 2020-08-21 21:00:21 INFO: apply filter None to candle=CandleItem(low=401.3, high=406.95, open=405.0, close=401.35, color='RED') 2020-08-21 21:00:21 INFO: apply filter None to candle=CandleItem(low=403.5, high=407.55, open=405.8, close=405.0, color='RED') 2020-08-21 21:00:21 INFO: hit candle order=OrderProperties(candle=CandleItem(low=399.45, high=407.2, open=401.35, close=403.3, color='GREEN'), take_profit_factor=5.0, clearing_interval=3600) 2020-08-21 21:00:21 INFO: check need new order OrderProperties(candle=CandleItem(low=399.45, high=407.2, open=401.35, close=403.3, color='GREEN'), take_profit_factor=5.0, clearing_interval=3600) 2020-08-21 21:00:21 INFO: place order: start candle=CandleItem(low=399.45, high=407.2, open=401.35, close=403.3, color='GREEN') ticker='ETHUSD' price_offset=0.1 2020-08-21 21:00:21 INFO: place order: side_factor=-1 init_trigger_price=407.25 init_order_price=407.3 stop_price_offset=0.0 candle.size=7.75 stop_price=399.45 take_price=446.05 2020-08-21 21:00:21 INFO: place order round: side_factor=-1 init_trigger_price=Decimal('407.25') init_order_price=Decimal('407.30000000000001136868377216160297393798828125') stop_price_offset=0.0 candle.size=7.75 stop_price=Decimal('399.44999999999998863131622783839702606201171875') take_price=Decimal('446.05000000000001136868377216160297393798828125') 2020-08-21 21:00:21 INFO: place order: compute qty=244 2020-08-21 21:00:21 INFO: place order: save order to db 568267609a5b45b280b9d408cf94ea50; response=True 2020-08-21 21:00:21 INFO: post order to exchange resp={'orderID': '87577538-947b-9448-4a2e-8d2411d5c676', 'clOrdID': '568267609a5b45b280b9d408cf94ea50', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 244, 'price': 407.3, 'displayQty': None, 'stopPx': 407.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': 244, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 21, 18, 0, 21, 342000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 21, 18, 0, 21, 342000, tzinfo=tzutc())} 2020-08-21 21:00:21 INFO: place new init order {'qty': 244, 'init_price': Decimal('407.25'), 'stop_price': Decimal('399.44999999999998863131622783839702606201171875'), 'take_price': Decimal('446.05000000000001136868377216160297393798828125'), 'order_uid': '568267609a5b45b280b9d408cf94ea50', 'response': {'orderID': '87577538-947b-9448-4a2e-8d2411d5c676', 'clOrdID': '568267609a5b45b280b9d408cf94ea50', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 244, 'price': 407.3, 'displayQty': None, 'stopPx': 407.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': 244, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 21, 18, 0, 21, 342000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 21, 18, 0, 21, 342000, tzinfo=tzutc())}} 2020-08-21 21:00:21 INFO: init new order end 2020-08-21 21:00:21 INFO: 2020-08-21 21:00:21 INFO: 2020-08-21 21:00:21 INFO: 2020-08-21 21:00:21 INFO: 2020-08-21 21:00:21 INFO: process event {'orderID': '87577538-947b-9448-4a2e-8d2411d5c676', 'clOrdID': '568267609a5b45b280b9d408cf94ea50', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 244, 'price': 407.3, 'displayQty': None, 'stopPx': 407.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': 244, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-08-21T18:00:21.342Z', 'timestamp': '2020-08-21T18:00:21.342Z'} 2020-08-21 21:00:21 INFO: skip event 568267609a5b45b280b9d408cf94ea50 New 2020-08-21 21:02:00 INFO: 2020-08-21 21:02:00 INFO: 2020-08-21 21:02:00 INFO: 2020-08-21 21:02:00 INFO: 2020-08-21 21:02:00 INFO: clearing start 2020-08-21 21:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '87577538-947b-9448-4a2e-8d2411d5c676', 'clOrdID': '568267609a5b45b280b9d408cf94ea50', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 244, 'price': 407.3, 'displayQty': None, 'stopPx': 407.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': 244, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 21, 18, 0, 21, 342000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 21, 18, 0, 21, 342000, tzinfo=tzutc())} 2020-08-21 21:02:00 INFO: order time=2020-08-21 18:00:21.342000+00:00; delta from now UTC=0:01:39.247122 time_delta.total_seconds()=99.247122; time_diff_offset='3600' 2020-08-21 21:02:00 INFO: skip by time diff 2020-08-21 18:00:21.342000+00:00 2020-08-21 21:02:00 INFO: clearing end 2020-08-21 21:02:00 INFO: 2020-08-21 21:02:00 INFO: 2020-08-21 21:02:00 INFO: 2020-08-21 21:02:00 INFO: 2020-08-21 22:00:20 INFO: 2020-08-21 22:00:20 INFO: 2020-08-21 22:00:20 INFO: 2020-08-21 22:00:20 INFO: 2020-08-21 22:00:20 INFO: init new order start 2020-08-21 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 21, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 403.3, 'high': 403.7, 'low': 394.3, 'close': 398.05, 'trades': 12025, 'volume': 12852133, 'vwap': 397.79, 'lastSize': 1, 'turnover': 511242200115, 'homeNotional': 149639.82424721503, 'foreignNotional': 59525305.81294136}, {'timestamp': datetime.datetime(2020, 8, 21, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 401.35, 'high': 407.2, 'low': 399.45, 'close': 403.3, 'trades': 7695, 'volume': 8000941, 'vwap': 403.54, 'lastSize': 400, 'turnover': 322865630340, 'homeNotional': 93541.81983443032, 'foreignNotional': 37747860.90156138}, {'timestamp': datetime.datetime(2020, 8, 21, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.0, 'high': 406.95, 'low': 401.3, 'close': 401.35, 'trades': 4068, 'volume': 3350139, 'vwap': 404.08, 'lastSize': 11, 'turnover': 135369185380, 'homeNotional': 39239.220068695366, 'foreignNotional': 15855508.323929071}] 2020-08-21 22:00:20 INFO: prepare candles [CandleItem(low=394.3, high=403.7, open=403.3, close=398.05, color='RED'), CandleItem(low=399.45, high=407.2, open=401.35, close=403.3, color='GREEN'), CandleItem(low=401.3, high=406.95, open=405.0, close=401.35, color='RED')] 2020-08-21 22:00:20 INFO: skip by colors first_candle=CandleItem(low=401.3, high=406.95, open=405.0, close=401.35, color='RED') second_candle=CandleItem(low=399.45, high=407.2, open=401.35, close=403.3, color='GREEN') last_candle=CandleItem(low=394.3, high=403.7, open=403.3, close=398.05, color='RED') 2020-08-21 22:00:20 INFO: check need new order None 2020-08-21 22:00:20 INFO: init new order end 2020-08-21 22:00:20 INFO: 2020-08-21 22:00:20 INFO: 2020-08-21 22:00:20 INFO: 2020-08-21 22:00:20 INFO: 2020-08-21 22:02:00 INFO: 2020-08-21 22:02:00 INFO: 2020-08-21 22:02:00 INFO: 2020-08-21 22:02:00 INFO: 2020-08-21 22:02:00 INFO: clearing start 2020-08-21 22:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '87577538-947b-9448-4a2e-8d2411d5c676', 'clOrdID': '568267609a5b45b280b9d408cf94ea50', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 244, 'price': 407.3, 'displayQty': None, 'stopPx': 407.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': 244, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 21, 18, 0, 21, 342000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 21, 18, 0, 21, 342000, tzinfo=tzutc())} 2020-08-21 22:02:00 INFO: order time=2020-08-21 18:00:21.342000+00:00; delta from now UTC=1:01:39.059980 time_delta.total_seconds()=3699.05998; time_diff_offset='3600' 2020-08-21 22:02:00 INFO: clear order 568267609a5b45b280b9d408cf94ea50 2020-08-21 22:02:00 INFO: cancel order resp=[{'orderID': '87577538-947b-9448-4a2e-8d2411d5c676', 'clOrdID': '568267609a5b45b280b9d408cf94ea50', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 244, 'price': 407.3, 'displayQty': None, 'stopPx': 407.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, 8, 21, 18, 0, 21, 342000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 21, 19, 2, 0, 767000, tzinfo=tzutc())}] 2020-08-21 22:02:00 INFO: clearing end 2020-08-21 22:02:00 INFO: 2020-08-21 22:02:00 INFO: 2020-08-21 22:02:00 INFO: 2020-08-21 22:02:00 INFO: 2020-08-21 22:02:01 INFO: process event {'orderID': '87577538-947b-9448-4a2e-8d2411d5c676', 'ordStatus': 'Canceled', 'leavesQty': 0, 'text': 'Canceled: cancelled by clearing\nInit order by supervisor.py', 'timestamp': '2020-08-21T19:02:00.767Z', 'clOrdID': '568267609a5b45b280b9d408cf94ea50', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-21 22:02:01 INFO: skip event 568267609a5b45b280b9d408cf94ea50 Canceled 2020-08-21 23:00:20 INFO: 2020-08-21 23:00:20 INFO: 2020-08-21 23:00:20 INFO: 2020-08-21 23:00:20 INFO: 2020-08-21 23:00:20 INFO: init new order start 2020-08-21 23:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 21, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 398.05, 'high': 401.65, 'low': 397.9, 'close': 398.05, 'trades': 4297, 'volume': 3511417, 'vwap': 399.66, 'lastSize': 4, 'turnover': 140335755950, 'homeNotional': 41080.32800678952, 'foreignNotional': 16418019.689657025}, {'timestamp': datetime.datetime(2020, 8, 21, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 403.3, 'high': 403.7, 'low': 394.3, 'close': 398.05, 'trades': 12025, 'volume': 12852133, 'vwap': 397.79, 'lastSize': 1, 'turnover': 511242200115, 'homeNotional': 149639.82424721503, 'foreignNotional': 59525305.81294136}, {'timestamp': datetime.datetime(2020, 8, 21, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 401.35, 'high': 407.2, 'low': 399.45, 'close': 403.3, 'trades': 7695, 'volume': 8000941, 'vwap': 403.54, 'lastSize': 400, 'turnover': 322865630340, 'homeNotional': 93541.81983443032, 'foreignNotional': 37747860.90156138}] 2020-08-21 23:00:20 INFO: skip by found empty buckets 2020-08-21 23:00:20 INFO: check need new order None 2020-08-21 23:00:20 INFO: init new order end 2020-08-21 23:00:20 INFO: 2020-08-21 23:00:20 INFO: 2020-08-21 23:00:20 INFO: 2020-08-21 23:00:20 INFO: 2020-08-21 23:02:00 INFO: 2020-08-21 23:02:00 INFO: 2020-08-21 23:02:00 INFO: 2020-08-21 23:02:00 INFO: 2020-08-21 23:02:00 INFO: clearing start 2020-08-21 23:02:00 INFO: clearing end 2020-08-21 23:02:00 INFO: 2020-08-21 23:02:00 INFO: 2020-08-21 23:02:00 INFO: 2020-08-21 23:02:00 INFO: 2020-08-22 00:00:20 INFO: 2020-08-22 00:00:20 INFO: 2020-08-22 00:00:20 INFO: 2020-08-22 00:00:20 INFO: 2020-08-22 00:00:20 INFO: init new order start 2020-08-22 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 21, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 398.05, 'high': 401.75, 'low': 395.1, 'close': 395.25, 'trades': 4566, 'volume': 3093876, 'vwap': 398.32, 'lastSize': 10, 'turnover': 123232543170, 'homeNotional': 36115.517781225746, 'foreignNotional': 14385335.96759908}, {'timestamp': datetime.datetime(2020, 8, 21, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 398.05, 'high': 401.65, 'low': 397.9, 'close': 398.05, 'trades': 4297, 'volume': 3511417, 'vwap': 399.66, 'lastSize': 4, 'turnover': 140335755950, 'homeNotional': 41080.32800678952, 'foreignNotional': 16418019.689657025}, {'timestamp': datetime.datetime(2020, 8, 21, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 403.3, 'high': 403.7, 'low': 394.3, 'close': 398.05, 'trades': 12025, 'volume': 12852133, 'vwap': 397.79, 'lastSize': 1, 'turnover': 511242200115, 'homeNotional': 149639.82424721503, 'foreignNotional': 59525305.81294136}] 2020-08-22 00:00:20 INFO: skip by found empty buckets 2020-08-22 00:00:20 INFO: check need new order None 2020-08-22 00:00:20 INFO: init new order end 2020-08-22 00:00:20 INFO: 2020-08-22 00:00:20 INFO: 2020-08-22 00:00:20 INFO: 2020-08-22 00:00:20 INFO: 2020-08-22 00:02:00 INFO: 2020-08-22 00:02:00 INFO: 2020-08-22 00:02:00 INFO: 2020-08-22 00:02:00 INFO: 2020-08-22 00:02:00 INFO: clearing start 2020-08-22 00:02:00 INFO: clearing end 2020-08-22 00:02:00 INFO: 2020-08-22 00:02:00 INFO: 2020-08-22 00:02:00 INFO: 2020-08-22 00:02:00 INFO: 2020-08-22 01:00:20 INFO: 2020-08-22 01:00:20 INFO: 2020-08-22 01:00:20 INFO: 2020-08-22 01:00:20 INFO: 2020-08-22 01:00:20 INFO: init new order start 2020-08-22 01:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 21, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 395.25, 'high': 396.5, 'low': 384.6, 'close': 388.4, 'trades': 16602, 'volume': 14974837, 'vwap': 389.23, 'lastSize': 5, 'turnover': 582865403990, 'homeNotional': 173252.20082480038, 'foreignNotional': 67436344.97776292}, {'timestamp': datetime.datetime(2020, 8, 21, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 398.05, 'high': 401.75, 'low': 395.1, 'close': 395.25, 'trades': 4566, 'volume': 3093876, 'vwap': 398.32, 'lastSize': 10, 'turnover': 123232543170, 'homeNotional': 36115.517781225746, 'foreignNotional': 14385335.96759908}, {'timestamp': datetime.datetime(2020, 8, 21, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 398.05, 'high': 401.65, 'low': 397.9, 'close': 398.05, 'trades': 4297, 'volume': 3511417, 'vwap': 399.66, 'lastSize': 4, 'turnover': 140335755950, 'homeNotional': 41080.32800678952, 'foreignNotional': 16418019.689657025}] 2020-08-22 01:00:21 INFO: skip by found empty buckets 2020-08-22 01:00:21 INFO: check need new order None 2020-08-22 01:00:21 INFO: init new order end 2020-08-22 01:00:21 INFO: 2020-08-22 01:00:21 INFO: 2020-08-22 01:00:21 INFO: 2020-08-22 01:00:21 INFO: 2020-08-22 01:02:00 INFO: 2020-08-22 01:02:00 INFO: 2020-08-22 01:02:00 INFO: 2020-08-22 01:02:00 INFO: 2020-08-22 01:02:00 INFO: clearing start 2020-08-22 01:02:00 INFO: clearing end 2020-08-22 01:02:00 INFO: 2020-08-22 01:02:00 INFO: 2020-08-22 01:02:00 INFO: 2020-08-22 01:02:00 INFO: 2020-08-22 02:00:20 INFO: 2020-08-22 02:00:20 INFO: 2020-08-22 02:00:20 INFO: 2020-08-22 02:00:20 INFO: 2020-08-22 02:00:20 INFO: init new order start 2020-08-22 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 21, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.4, 'high': 394.15, 'low': 387.2, 'close': 389.3, 'trades': 7669, 'volume': 4836486, 'vwap': 391.7, 'lastSize': 5, 'turnover': 189441593970, 'homeNotional': 55957.80156488212, 'foreignNotional': 21918361.547167853}, {'timestamp': datetime.datetime(2020, 8, 21, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 395.25, 'high': 396.5, 'low': 384.6, 'close': 388.4, 'trades': 16602, 'volume': 14974837, 'vwap': 389.23, 'lastSize': 5, 'turnover': 582865403990, 'homeNotional': 173252.20082480038, 'foreignNotional': 67436344.97776292}, {'timestamp': datetime.datetime(2020, 8, 21, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 398.05, 'high': 401.75, 'low': 395.1, 'close': 395.25, 'trades': 4566, 'volume': 3093876, 'vwap': 398.32, 'lastSize': 10, 'turnover': 123232543170, 'homeNotional': 36115.517781225746, 'foreignNotional': 14385335.96759908}] 2020-08-22 02:00:20 INFO: prepare candles [CandleItem(low=387.2, high=394.15, open=388.4, close=389.3, color='GREEN'), CandleItem(low=384.6, high=396.5, open=395.25, close=388.4, color='RED'), CandleItem(low=395.1, high=401.75, open=398.05, close=395.25, color='RED')] 2020-08-22 02:00:20 INFO: last_candle=CandleItem(low=387.2, high=394.15, open=388.4, close=389.3, color='GREEN') 2020-08-22 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-22 02:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=387.2, high=394.15, open=388.4, close=389.3, color='GREEN') 2020-08-22 02:00:20 INFO: skip by CandleItem(low=387.2, high=394.15, open=388.4, close=389.3, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-22 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-22 02:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=387.2, high=394.15, open=388.4, close=389.3, color='GREEN') 2020-08-22 02:00:20 INFO: apply filter None to candle=CandleItem(low=384.6, high=396.5, open=395.25, close=388.4, color='RED') 2020-08-22 02:00:20 INFO: apply filter None to candle=CandleItem(low=395.1, high=401.75, open=398.05, close=395.25, color='RED') 2020-08-22 02:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=387.2, high=394.15, open=388.4, close=389.3, color='GREEN'), take_profit_factor=5.0, clearing_interval=3600) 2020-08-22 02:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=387.2, high=394.15, open=388.4, close=389.3, color='GREEN'), take_profit_factor=5.0, clearing_interval=3600) 2020-08-22 02:00:20 INFO: place order: start candle=CandleItem(low=387.2, high=394.15, open=388.4, close=389.3, color='GREEN') ticker='ETHUSD' price_offset=0.1 2020-08-22 02:00:20 INFO: place order: side_factor=-1 init_trigger_price=394.2 init_order_price=394.25 stop_price_offset=0.0 candle.size=6.949999999999989 stop_price=387.2 take_price=428.99999999999994 2020-08-22 02:00:20 INFO: place order round: side_factor=-1 init_trigger_price=Decimal('394.19999999999998863131622783839702606201171875') init_order_price=Decimal('394.25') stop_price_offset=0.0 candle.size=6.949999999999989 stop_price=Decimal('387.19999999999998863131622783839702606201171875') take_price=Decimal('428.99999999999994315658113919198513031005859375') 2020-08-22 02:00:20 INFO: place order: compute qty=271 2020-08-22 02:00:20 INFO: place order: save order to db 86da726b04df45d696f69929b9039d19; response=True 2020-08-22 02:00:20 INFO: post order to exchange resp={'orderID': 'ed910390-929f-2aef-b4f1-760913ec50c8', 'clOrdID': '86da726b04df45d696f69929b9039d19', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 271, 'price': 394.25, 'displayQty': None, 'stopPx': 394.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': 271, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 21, 23, 0, 20, 183000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 21, 23, 0, 20, 183000, tzinfo=tzutc())} 2020-08-22 02:00:20 INFO: place new init order {'qty': 271, 'init_price': Decimal('394.19999999999998863131622783839702606201171875'), 'stop_price': Decimal('387.19999999999998863131622783839702606201171875'), 'take_price': Decimal('428.99999999999994315658113919198513031005859375'), 'order_uid': '86da726b04df45d696f69929b9039d19', 'response': {'orderID': 'ed910390-929f-2aef-b4f1-760913ec50c8', 'clOrdID': '86da726b04df45d696f69929b9039d19', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 271, 'price': 394.25, 'displayQty': None, 'stopPx': 394.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': 271, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 21, 23, 0, 20, 183000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 21, 23, 0, 20, 183000, tzinfo=tzutc())}} 2020-08-22 02:00:20 INFO: init new order end 2020-08-22 02:00:20 INFO: 2020-08-22 02:00:20 INFO: 2020-08-22 02:00:20 INFO: 2020-08-22 02:00:20 INFO: 2020-08-22 02:00:20 INFO: process event {'orderID': 'ed910390-929f-2aef-b4f1-760913ec50c8', 'clOrdID': '86da726b04df45d696f69929b9039d19', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 271, 'price': 394.25, 'displayQty': None, 'stopPx': 394.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': 271, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-08-21T23:00:20.183Z', 'timestamp': '2020-08-21T23:00:20.183Z'} 2020-08-22 02:00:20 INFO: skip event 86da726b04df45d696f69929b9039d19 New 2020-08-22 02:02:00 INFO: 2020-08-22 02:02:00 INFO: 2020-08-22 02:02:00 INFO: 2020-08-22 02:02:00 INFO: 2020-08-22 02:02:00 INFO: clearing start 2020-08-22 02:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'ed910390-929f-2aef-b4f1-760913ec50c8', 'clOrdID': '86da726b04df45d696f69929b9039d19', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 271, 'price': 394.25, 'displayQty': None, 'stopPx': 394.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': 271, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 21, 23, 0, 20, 183000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 21, 23, 0, 20, 183000, tzinfo=tzutc())} 2020-08-22 02:02:00 INFO: order time=2020-08-21 23:00:20.183000+00:00; delta from now UTC=0:01:40.167894 time_delta.total_seconds()=100.167894; time_diff_offset='3600' 2020-08-22 02:02:00 INFO: skip by time diff 2020-08-21 23:00:20.183000+00:00 2020-08-22 02:02:00 INFO: clearing end 2020-08-22 02:02:00 INFO: 2020-08-22 02:02:00 INFO: 2020-08-22 02:02:00 INFO: 2020-08-22 02:02:00 INFO: 2020-08-22 03:00:20 INFO: 2020-08-22 03:00:20 INFO: 2020-08-22 03:00:20 INFO: 2020-08-22 03:00:20 INFO: 2020-08-22 03:00:20 INFO: init new order start 2020-08-22 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 22, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.3, 'high': 391.75, 'low': 384.75, 'close': 387.8, 'trades': 7293, 'volume': 3922641, 'vwap': 387.51, 'lastSize': 4267, 'turnover': 152004171760, 'homeNotional': 45227.18968160743, 'foreignNotional': 17525846.866713874}, {'timestamp': datetime.datetime(2020, 8, 21, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.4, 'high': 394.15, 'low': 387.2, 'close': 389.3, 'trades': 7669, 'volume': 4836486, 'vwap': 391.7, 'lastSize': 5, 'turnover': 189441593970, 'homeNotional': 55957.80156488212, 'foreignNotional': 21918361.547167853}, {'timestamp': datetime.datetime(2020, 8, 21, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 395.25, 'high': 396.5, 'low': 384.6, 'close': 388.4, 'trades': 16602, 'volume': 14974837, 'vwap': 389.23, 'lastSize': 5, 'turnover': 582865403990, 'homeNotional': 173252.20082480038, 'foreignNotional': 67436344.97776292}] 2020-08-22 03:00:20 INFO: prepare candles [CandleItem(low=384.75, high=391.75, open=389.3, close=387.8, color='RED'), CandleItem(low=387.2, high=394.15, open=388.4, close=389.3, color='GREEN'), CandleItem(low=384.6, high=396.5, open=395.25, close=388.4, color='RED')] 2020-08-22 03:00:20 INFO: skip by colors first_candle=CandleItem(low=384.6, high=396.5, open=395.25, close=388.4, color='RED') second_candle=CandleItem(low=387.2, high=394.15, open=388.4, close=389.3, color='GREEN') last_candle=CandleItem(low=384.75, high=391.75, open=389.3, close=387.8, color='RED') 2020-08-22 03:00:20 INFO: check need new order None 2020-08-22 03:00:20 INFO: init new order end 2020-08-22 03:00:20 INFO: 2020-08-22 03:00:20 INFO: 2020-08-22 03:00:20 INFO: 2020-08-22 03:00:20 INFO: 2020-08-22 03:02:00 INFO: 2020-08-22 03:02:00 INFO: 2020-08-22 03:02:00 INFO: 2020-08-22 03:02:00 INFO: 2020-08-22 03:02:00 INFO: clearing start 2020-08-22 03:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'ed910390-929f-2aef-b4f1-760913ec50c8', 'clOrdID': '86da726b04df45d696f69929b9039d19', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 271, 'price': 394.25, 'displayQty': None, 'stopPx': 394.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': 271, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 21, 23, 0, 20, 183000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 21, 23, 0, 20, 183000, tzinfo=tzutc())} 2020-08-22 03:02:00 INFO: order time=2020-08-21 23:00:20.183000+00:00; delta from now UTC=1:01:40.452305 time_delta.total_seconds()=3700.452305; time_diff_offset='3600' 2020-08-22 03:02:00 INFO: clear order 86da726b04df45d696f69929b9039d19 2020-08-22 03:02:01 INFO: cancel order resp=[{'orderID': 'ed910390-929f-2aef-b4f1-760913ec50c8', 'clOrdID': '86da726b04df45d696f69929b9039d19', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 271, 'price': 394.25, 'displayQty': None, 'stopPx': 394.2, '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, 8, 21, 23, 0, 20, 183000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 22, 0, 2, 1, 57000, tzinfo=tzutc())}] 2020-08-22 03:02:01 INFO: clearing end 2020-08-22 03:02:01 INFO: 2020-08-22 03:02:01 INFO: 2020-08-22 03:02:01 INFO: 2020-08-22 03:02:01 INFO: 2020-08-22 03:02:01 INFO: process event {'orderID': 'ed910390-929f-2aef-b4f1-760913ec50c8', 'ordStatus': 'Canceled', 'leavesQty': 0, 'text': 'Canceled: cancelled by clearing\nInit order by supervisor.py', 'timestamp': '2020-08-22T00:02:01.057Z', 'clOrdID': '86da726b04df45d696f69929b9039d19', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-22 03:02:01 INFO: skip event 86da726b04df45d696f69929b9039d19 Canceled 2020-08-22 04:00:20 INFO: 2020-08-22 04:00:20 INFO: 2020-08-22 04:00:20 INFO: 2020-08-22 04:00:20 INFO: 2020-08-22 04:00:20 INFO: init new order start 2020-08-22 04:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 22, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.8, 'high': 388.1, 'low': 380.2, 'close': 381.6, 'trades': 8900, 'volume': 6960897, 'vwap': 383.4, 'lastSize': 13, 'turnover': 266875462770, 'homeNotional': 79722.48670587078, 'foreignNotional': 30565353.08272737}, {'timestamp': datetime.datetime(2020, 8, 22, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.3, 'high': 391.75, 'low': 384.75, 'close': 387.8, 'trades': 7293, 'volume': 3922641, 'vwap': 387.51, 'lastSize': 4267, 'turnover': 152004171760, 'homeNotional': 45227.18968160743, 'foreignNotional': 17525846.866713874}, {'timestamp': datetime.datetime(2020, 8, 21, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.4, 'high': 394.15, 'low': 387.2, 'close': 389.3, 'trades': 7669, 'volume': 4836486, 'vwap': 391.7, 'lastSize': 5, 'turnover': 189441593970, 'homeNotional': 55957.80156488212, 'foreignNotional': 21918361.547167853}] 2020-08-22 04:00:20 INFO: prepare candles [CandleItem(low=380.2, high=388.1, open=387.8, close=381.6, color='RED'), CandleItem(low=384.75, high=391.75, open=389.3, close=387.8, color='RED'), CandleItem(low=387.2, high=394.15, open=388.4, close=389.3, color='GREEN')] 2020-08-22 04:00:20 INFO: skip by colors first_candle=CandleItem(low=387.2, high=394.15, open=388.4, close=389.3, color='GREEN') second_candle=CandleItem(low=384.75, high=391.75, open=389.3, close=387.8, color='RED') last_candle=CandleItem(low=380.2, high=388.1, open=387.8, close=381.6, color='RED') 2020-08-22 04:00:20 INFO: check need new order None 2020-08-22 04:00:20 INFO: init new order end 2020-08-22 04:00:20 INFO: 2020-08-22 04:00:20 INFO: 2020-08-22 04:00:20 INFO: 2020-08-22 04:00:20 INFO: 2020-08-22 04:02:00 INFO: 2020-08-22 04:02:00 INFO: 2020-08-22 04:02:00 INFO: 2020-08-22 04:02:00 INFO: 2020-08-22 04:02:00 INFO: clearing start 2020-08-22 04:02:00 INFO: clearing end 2020-08-22 04:02:00 INFO: 2020-08-22 04:02:00 INFO: 2020-08-22 04:02:00 INFO: 2020-08-22 04:02:00 INFO: 2020-08-22 05:00:20 INFO: 2020-08-22 05:00:20 INFO: 2020-08-22 05:00:20 INFO: 2020-08-22 05:00:20 INFO: 2020-08-22 05:00:20 INFO: init new order start 2020-08-22 05:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 22, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 381.6, 'high': 385.85, 'low': 380.05, 'close': 384.95, 'trades': 4597, 'volume': 3307323, 'vwap': 383.1, 'lastSize': 30, 'turnover': 126702182840, 'homeNotional': 37768.23320186726, 'foreignNotional': 14468976.064644095}, {'timestamp': datetime.datetime(2020, 8, 22, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.8, 'high': 388.1, 'low': 380.2, 'close': 381.6, 'trades': 8900, 'volume': 6960897, 'vwap': 383.4, 'lastSize': 13, 'turnover': 266875462770, 'homeNotional': 79722.48670587078, 'foreignNotional': 30565353.08272737}, {'timestamp': datetime.datetime(2020, 8, 22, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.3, 'high': 391.75, 'low': 384.75, 'close': 387.8, 'trades': 7293, 'volume': 3922641, 'vwap': 387.51, 'lastSize': 4267, 'turnover': 152004171760, 'homeNotional': 45227.18968160743, 'foreignNotional': 17525846.866713874}] 2020-08-22 05:00:20 INFO: prepare candles [CandleItem(low=380.05, high=385.85, open=381.6, close=384.95, color='GREEN'), CandleItem(low=380.2, high=388.1, open=387.8, close=381.6, color='RED'), CandleItem(low=384.75, high=391.75, open=389.3, close=387.8, color='RED')] 2020-08-22 05:00:20 INFO: last_candle=CandleItem(low=380.05, high=385.85, open=381.6, close=384.95, color='GREEN') 2020-08-22 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-08-22 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=380.05, high=385.85, open=381.6, close=384.95, color='GREEN') 2020-08-22 05:00:20 INFO: skip by CandleItem(low=380.05, high=385.85, open=381.6, close=384.95, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-22 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-08-22 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=380.05, high=385.85, open=381.6, close=384.95, color='GREEN') 2020-08-22 05:00:20 INFO: skip by CandleItem(low=380.05, high=385.85, open=381.6, close=384.95, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-22 05:00:20 INFO: not found applicable config for candle 2020-08-22 05:00:20 INFO: check need new order None 2020-08-22 05:00:20 INFO: init new order end 2020-08-22 05:00:20 INFO: 2020-08-22 05:00:20 INFO: 2020-08-22 05:00:20 INFO: 2020-08-22 05:00:20 INFO: 2020-08-22 05:02:00 INFO: 2020-08-22 05:02:00 INFO: 2020-08-22 05:02:00 INFO: 2020-08-22 05:02:00 INFO: 2020-08-22 05:02:00 INFO: clearing start 2020-08-22 05:02:00 INFO: clearing end 2020-08-22 05:02:00 INFO: 2020-08-22 05:02:00 INFO: 2020-08-22 05:02:00 INFO: 2020-08-22 05:02:00 INFO: 2020-08-22 06:00:20 INFO: 2020-08-22 06:00:20 INFO: 2020-08-22 06:00:20 INFO: 2020-08-22 06:00:20 INFO: 2020-08-22 06:00:20 INFO: init new order start 2020-08-22 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 22, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.95, 'high': 387.0, 'low': 383.2, 'close': 385.1, 'trades': 3762, 'volume': 3131873, 'vwap': 385.61, 'lastSize': 75, 'turnover': 120767360150, 'homeNotional': 35853.838211674556, 'foreignNotional': 13825533.08091202}, {'timestamp': datetime.datetime(2020, 8, 22, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 381.6, 'high': 385.85, 'low': 380.05, 'close': 384.95, 'trades': 4597, 'volume': 3307323, 'vwap': 383.1, 'lastSize': 30, 'turnover': 126702182840, 'homeNotional': 37768.23320186726, 'foreignNotional': 14468976.064644095}, {'timestamp': datetime.datetime(2020, 8, 22, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.8, 'high': 388.1, 'low': 380.2, 'close': 381.6, 'trades': 8900, 'volume': 6960897, 'vwap': 383.4, 'lastSize': 13, 'turnover': 266875462770, 'homeNotional': 79722.48670587078, 'foreignNotional': 30565353.08272737}] 2020-08-22 06:00:20 INFO: prepare candles [CandleItem(low=383.2, high=387.0, open=384.95, close=385.1, color='GREEN'), CandleItem(low=380.05, high=385.85, open=381.6, close=384.95, color='GREEN'), CandleItem(low=380.2, high=388.1, open=387.8, close=381.6, color='RED')] 2020-08-22 06:00:20 INFO: skip by colors first_candle=CandleItem(low=380.2, high=388.1, open=387.8, close=381.6, color='RED') second_candle=CandleItem(low=380.05, high=385.85, open=381.6, close=384.95, color='GREEN') last_candle=CandleItem(low=383.2, high=387.0, open=384.95, close=385.1, color='GREEN') 2020-08-22 06:00:20 INFO: check need new order None 2020-08-22 06:00:20 INFO: init new order end 2020-08-22 06:00:20 INFO: 2020-08-22 06:00:20 INFO: 2020-08-22 06:00:20 INFO: 2020-08-22 06:00:20 INFO: 2020-08-22 06:02:00 INFO: 2020-08-22 06:02:00 INFO: 2020-08-22 06:02:00 INFO: 2020-08-22 06:02:00 INFO: 2020-08-22 06:02:00 INFO: clearing start 2020-08-22 06:02:00 INFO: clearing end 2020-08-22 06:02:00 INFO: 2020-08-22 06:02:00 INFO: 2020-08-22 06:02:00 INFO: 2020-08-22 06:02:00 INFO: 2020-08-22 07:00:20 INFO: 2020-08-22 07:00:20 INFO: 2020-08-22 07:00:20 INFO: 2020-08-22 07:00:20 INFO: 2020-08-22 07:00:20 INFO: init new order start 2020-08-22 07:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 22, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.1, 'high': 386.65, 'low': 383.5, 'close': 385.5, 'trades': 2482, 'volume': 2548412, 'vwap': 385.01, 'lastSize': 315, 'turnover': 98115944755, 'homeNotional': 29205.03402437274, 'foreignNotional': 11244192.225290157}, {'timestamp': datetime.datetime(2020, 8, 22, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.95, 'high': 387.0, 'low': 383.2, 'close': 385.1, 'trades': 3762, 'volume': 3131873, 'vwap': 385.61, 'lastSize': 75, 'turnover': 120767360150, 'homeNotional': 35853.838211674556, 'foreignNotional': 13825533.08091202}, {'timestamp': datetime.datetime(2020, 8, 22, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 381.6, 'high': 385.85, 'low': 380.05, 'close': 384.95, 'trades': 4597, 'volume': 3307323, 'vwap': 383.1, 'lastSize': 30, 'turnover': 126702182840, 'homeNotional': 37768.23320186726, 'foreignNotional': 14468976.064644095}] 2020-08-22 07:00:21 INFO: prepare candles [CandleItem(low=383.5, high=386.65, open=385.1, close=385.5, color='GREEN'), CandleItem(low=383.2, high=387.0, open=384.95, close=385.1, color='GREEN'), CandleItem(low=380.05, high=385.85, open=381.6, close=384.95, color='GREEN')] 2020-08-22 07:00:21 INFO: skip by colors first_candle=CandleItem(low=380.05, high=385.85, open=381.6, close=384.95, color='GREEN') second_candle=CandleItem(low=383.2, high=387.0, open=384.95, close=385.1, color='GREEN') last_candle=CandleItem(low=383.5, high=386.65, open=385.1, close=385.5, color='GREEN') 2020-08-22 07:00:21 INFO: check need new order None 2020-08-22 07:00:21 INFO: init new order end 2020-08-22 07:00:21 INFO: 2020-08-22 07:00:21 INFO: 2020-08-22 07:00:21 INFO: 2020-08-22 07:00:21 INFO: 2020-08-22 07:02:00 INFO: 2020-08-22 07:02:00 INFO: 2020-08-22 07:02:00 INFO: 2020-08-22 07:02:00 INFO: 2020-08-22 07:02:00 INFO: clearing start 2020-08-22 07:02:00 INFO: clearing end 2020-08-22 07:02:00 INFO: 2020-08-22 07:02:00 INFO: 2020-08-22 07:02:00 INFO: 2020-08-22 07:02:00 INFO: 2020-08-22 08:00:20 INFO: 2020-08-22 08:00:20 INFO: 2020-08-22 08:00:20 INFO: 2020-08-22 08:00:20 INFO: 2020-08-22 08:00:20 INFO: init new order start 2020-08-22 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 22, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.5, 'high': 385.35, 'low': 381.9, 'close': 382.3, 'trades': 3515, 'volume': 2239358, 'vwap': 383.45, 'lastSize': 74, 'turnover': 85867481795, 'homeNotional': 25626.778247250826, 'foreignNotional': 9826535.500838548}, {'timestamp': datetime.datetime(2020, 8, 22, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.1, 'high': 386.65, 'low': 383.5, 'close': 385.5, 'trades': 2482, 'volume': 2548412, 'vwap': 385.01, 'lastSize': 315, 'turnover': 98115944755, 'homeNotional': 29205.03402437274, 'foreignNotional': 11244192.225290157}, {'timestamp': datetime.datetime(2020, 8, 22, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.95, 'high': 387.0, 'low': 383.2, 'close': 385.1, 'trades': 3762, 'volume': 3131873, 'vwap': 385.61, 'lastSize': 75, 'turnover': 120767360150, 'homeNotional': 35853.838211674556, 'foreignNotional': 13825533.08091202}] 2020-08-22 08:00:20 INFO: prepare candles [CandleItem(low=381.9, high=385.35, open=385.5, close=382.3, color='RED'), CandleItem(low=383.5, high=386.65, open=385.1, close=385.5, color='GREEN'), CandleItem(low=383.2, high=387.0, open=384.95, close=385.1, color='GREEN')] 2020-08-22 08:00:20 INFO: last_candle=CandleItem(low=381.9, high=385.35, open=385.5, close=382.3, color='RED') 2020-08-22 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-08-22 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=381.9, high=385.35, open=385.5, close=382.3, color='RED') 2020-08-22 08:00:20 INFO: skip by CandleItem(low=381.9, high=385.35, open=385.5, close=382.3, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-22 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-08-22 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=381.9, high=385.35, open=385.5, close=382.3, color='RED') 2020-08-22 08:00:20 INFO: skip by CandleItem(low=381.9, high=385.35, open=385.5, close=382.3, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-22 08:00:20 INFO: not found applicable config for candle 2020-08-22 08:00:20 INFO: check need new order None 2020-08-22 08:00:20 INFO: init new order end 2020-08-22 08:00:20 INFO: 2020-08-22 08:00:20 INFO: 2020-08-22 08:00:20 INFO: 2020-08-22 08:00:20 INFO: 2020-08-22 08:02:00 INFO: 2020-08-22 08:02:00 INFO: 2020-08-22 08:02:00 INFO: 2020-08-22 08:02:00 INFO: 2020-08-22 08:02:00 INFO: clearing start 2020-08-22 08:02:00 INFO: clearing end 2020-08-22 08:02:00 INFO: 2020-08-22 08:02:00 INFO: 2020-08-22 08:02:00 INFO: 2020-08-22 08:02:00 INFO: 2020-08-22 09:00:20 INFO: 2020-08-22 09:00:20 INFO: 2020-08-22 09:00:20 INFO: 2020-08-22 09:00:20 INFO: 2020-08-22 09:00:20 INFO: init new order start 2020-08-22 09:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 22, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.3, 'high': 386.4, 'low': 382.25, 'close': 386.15, 'trades': 2605, 'volume': 2485290, 'vwap': 385.02, 'lastSize': 117, 'turnover': 95688318985, 'homeNotional': 28476.639882239255, 'foreignNotional': 10964075.257859208}, {'timestamp': datetime.datetime(2020, 8, 22, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.5, 'high': 385.35, 'low': 381.9, 'close': 382.3, 'trades': 3515, 'volume': 2239358, 'vwap': 383.45, 'lastSize': 74, 'turnover': 85867481795, 'homeNotional': 25626.778247250826, 'foreignNotional': 9826535.500838548}, {'timestamp': datetime.datetime(2020, 8, 22, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.1, 'high': 386.65, 'low': 383.5, 'close': 385.5, 'trades': 2482, 'volume': 2548412, 'vwap': 385.01, 'lastSize': 315, 'turnover': 98115944755, 'homeNotional': 29205.03402437274, 'foreignNotional': 11244192.225290157}] 2020-08-22 09:00:20 INFO: prepare candles [CandleItem(low=382.25, high=386.4, open=382.3, close=386.15, color='GREEN'), CandleItem(low=381.9, high=385.35, open=385.5, close=382.3, color='RED'), CandleItem(low=383.5, high=386.65, open=385.1, close=385.5, color='GREEN')] 2020-08-22 09:00:20 INFO: skip by colors first_candle=CandleItem(low=383.5, high=386.65, open=385.1, close=385.5, color='GREEN') second_candle=CandleItem(low=381.9, high=385.35, open=385.5, close=382.3, color='RED') last_candle=CandleItem(low=382.25, high=386.4, open=382.3, close=386.15, color='GREEN') 2020-08-22 09:00:20 INFO: check need new order None 2020-08-22 09:00:20 INFO: init new order end 2020-08-22 09:00:20 INFO: 2020-08-22 09:00:20 INFO: 2020-08-22 09:00:20 INFO: 2020-08-22 09:00:20 INFO: 2020-08-22 09:02:00 INFO: 2020-08-22 09:02:00 INFO: 2020-08-22 09:02:00 INFO: 2020-08-22 09:02:00 INFO: 2020-08-22 09:02:00 INFO: clearing start 2020-08-22 09:02:00 INFO: clearing end 2020-08-22 09:02:00 INFO: 2020-08-22 09:02:00 INFO: 2020-08-22 09:02:00 INFO: 2020-08-22 09:02:00 INFO: 2020-08-22 10:00:20 INFO: 2020-08-22 10:00:20 INFO: 2020-08-22 10:00:20 INFO: 2020-08-22 10:00:20 INFO: 2020-08-22 10:00:20 INFO: init new order start 2020-08-22 10:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 22, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.15, 'high': 392.3, 'low': 386.15, 'close': 391.85, 'trades': 6932, 'volume': 6859471, 'vwap': 390.13, 'lastSize': 5000, 'turnover': 267602940410, 'homeNotional': 79170.05774698075, 'foreignNotional': 30886289.02558115}, {'timestamp': datetime.datetime(2020, 8, 22, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.3, 'high': 386.4, 'low': 382.25, 'close': 386.15, 'trades': 2605, 'volume': 2485290, 'vwap': 385.02, 'lastSize': 117, 'turnover': 95688318985, 'homeNotional': 28476.639882239255, 'foreignNotional': 10964075.257859208}, {'timestamp': datetime.datetime(2020, 8, 22, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.5, 'high': 385.35, 'low': 381.9, 'close': 382.3, 'trades': 3515, 'volume': 2239358, 'vwap': 383.45, 'lastSize': 74, 'turnover': 85867481795, 'homeNotional': 25626.778247250826, 'foreignNotional': 9826535.500838548}] 2020-08-22 10:00:20 INFO: prepare candles [CandleItem(low=386.15, high=392.3, open=386.15, close=391.85, color='GREEN'), CandleItem(low=382.25, high=386.4, open=382.3, close=386.15, color='GREEN'), CandleItem(low=381.9, high=385.35, open=385.5, close=382.3, color='RED')] 2020-08-22 10:00:20 INFO: skip by colors first_candle=CandleItem(low=381.9, high=385.35, open=385.5, close=382.3, color='RED') second_candle=CandleItem(low=382.25, high=386.4, open=382.3, close=386.15, color='GREEN') last_candle=CandleItem(low=386.15, high=392.3, open=386.15, close=391.85, color='GREEN') 2020-08-22 10:00:20 INFO: check need new order None 2020-08-22 10:00:20 INFO: init new order end 2020-08-22 10:00:20 INFO: 2020-08-22 10:00:20 INFO: 2020-08-22 10:00:20 INFO: 2020-08-22 10:00:20 INFO: 2020-08-22 10:02:00 INFO: 2020-08-22 10:02:00 INFO: 2020-08-22 10:02:00 INFO: 2020-08-22 10:02:00 INFO: 2020-08-22 10:02:00 INFO: clearing start 2020-08-22 10:02:00 INFO: clearing end 2020-08-22 10:02:00 INFO: 2020-08-22 10:02:00 INFO: 2020-08-22 10:02:00 INFO: 2020-08-22 10:02:00 INFO: 2020-08-22 11:00:20 INFO: 2020-08-22 11:00:20 INFO: 2020-08-22 11:00:20 INFO: 2020-08-22 11:00:20 INFO: 2020-08-22 11:00:20 INFO: init new order start 2020-08-22 11:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 22, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.85, 'high': 391.9, 'low': 389.65, 'close': 391.05, 'trades': 2605, 'volume': 1591865, 'vwap': 390.72, 'lastSize': 105, 'turnover': 62195993695, 'homeNotional': 18405.178414527443, 'foreignNotional': 7191118.667241518}, {'timestamp': datetime.datetime(2020, 8, 22, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.15, 'high': 392.3, 'low': 386.15, 'close': 391.85, 'trades': 6932, 'volume': 6859471, 'vwap': 390.13, 'lastSize': 5000, 'turnover': 267602940410, 'homeNotional': 79170.05774698075, 'foreignNotional': 30886289.02558115}, {'timestamp': datetime.datetime(2020, 8, 22, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.3, 'high': 386.4, 'low': 382.25, 'close': 386.15, 'trades': 2605, 'volume': 2485290, 'vwap': 385.02, 'lastSize': 117, 'turnover': 95688318985, 'homeNotional': 28476.639882239255, 'foreignNotional': 10964075.257859208}] 2020-08-22 11:00:20 INFO: prepare candles [CandleItem(low=389.65, high=391.9, open=391.85, close=391.05, color='RED'), CandleItem(low=386.15, high=392.3, open=386.15, close=391.85, color='GREEN'), CandleItem(low=382.25, high=386.4, open=382.3, close=386.15, color='GREEN')] 2020-08-22 11:00:20 INFO: last_candle=CandleItem(low=389.65, high=391.9, open=391.85, close=391.05, color='RED') 2020-08-22 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-22 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=389.65, high=391.9, open=391.85, close=391.05, color='RED') 2020-08-22 11:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=386.15, high=392.3, open=386.15, close=391.85, color='GREEN') 2020-08-22 11:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=382.25, high=386.4, open=382.3, close=386.15, color='GREEN') 2020-08-22 11:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=389.65, high=391.9, open=391.85, close=391.05, color='RED'), take_profit_factor=6.0, clearing_interval=3600) 2020-08-22 11:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=389.65, high=391.9, open=391.85, close=391.05, color='RED'), take_profit_factor=6.0, clearing_interval=3600) 2020-08-22 11:00:20 INFO: place order: start candle=CandleItem(low=389.65, high=391.9, open=391.85, close=391.05, color='RED') ticker='ETHUSD' price_offset=0.1 2020-08-22 11:00:20 INFO: place order: side_factor=1 init_trigger_price=389.59999999999997 init_order_price=389.54999999999995 stop_price_offset=0.0 candle.size=2.25 stop_price=391.9 take_price=376.04999999999995 2020-08-22 11:00:20 INFO: place order round: side_factor=1 init_trigger_price=Decimal('389.59999999999996589394868351519107818603515625') init_order_price=Decimal('389.549999999999954525264911353588104248046875') stop_price_offset=0.0 candle.size=2.25 stop_price=Decimal('391.8999999999999772626324556767940521240234375') take_price=Decimal('376.049999999999954525264911353588104248046875') 2020-08-22 11:00:20 INFO: place order: compute qty=-826 2020-08-22 11:00:20 INFO: place order: save order to db 5ef58da068dc4382b34d36c549f90b3e; response=True 2020-08-22 11:00:20 INFO: post order to exchange resp={'orderID': '6e8934ad-1d07-336e-cf4c-9f44a49c61d3', 'clOrdID': '5ef58da068dc4382b34d36c549f90b3e', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 826, 'price': 389.55, 'displayQty': None, 'stopPx': 389.6, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 826, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 22, 8, 0, 20, 954000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 22, 8, 0, 20, 954000, tzinfo=tzutc())} 2020-08-22 11:00:20 INFO: place new init order {'qty': -826, 'init_price': Decimal('389.59999999999996589394868351519107818603515625'), 'stop_price': Decimal('391.8999999999999772626324556767940521240234375'), 'take_price': Decimal('376.049999999999954525264911353588104248046875'), 'order_uid': '5ef58da068dc4382b34d36c549f90b3e', 'response': {'orderID': '6e8934ad-1d07-336e-cf4c-9f44a49c61d3', 'clOrdID': '5ef58da068dc4382b34d36c549f90b3e', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 826, 'price': 389.55, 'displayQty': None, 'stopPx': 389.6, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 826, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 22, 8, 0, 20, 954000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 22, 8, 0, 20, 954000, tzinfo=tzutc())}} 2020-08-22 11:00:20 INFO: init new order end 2020-08-22 11:00:20 INFO: 2020-08-22 11:00:20 INFO: 2020-08-22 11:00:20 INFO: 2020-08-22 11:00:20 INFO: 2020-08-22 11:00:21 INFO: process event {'orderID': '6e8934ad-1d07-336e-cf4c-9f44a49c61d3', 'clOrdID': '5ef58da068dc4382b34d36c549f90b3e', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 826, 'price': 389.55, 'displayQty': None, 'stopPx': 389.6, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 826, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-08-22T08:00:20.954Z', 'timestamp': '2020-08-22T08:00:20.954Z'} 2020-08-22 11:00:21 INFO: skip event 5ef58da068dc4382b34d36c549f90b3e New 2020-08-22 11:02:00 INFO: 2020-08-22 11:02:00 INFO: 2020-08-22 11:02:00 INFO: 2020-08-22 11:02:00 INFO: 2020-08-22 11:02:00 INFO: clearing start 2020-08-22 11:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '6e8934ad-1d07-336e-cf4c-9f44a49c61d3', 'clOrdID': '5ef58da068dc4382b34d36c549f90b3e', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 826, 'price': 389.55, 'displayQty': None, 'stopPx': 389.6, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 826, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 22, 8, 0, 20, 954000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 22, 8, 0, 20, 954000, tzinfo=tzutc())} 2020-08-22 11:02:00 INFO: order time=2020-08-22 08:00:20.954000+00:00; delta from now UTC=0:01:39.172586 time_delta.total_seconds()=99.172586; time_diff_offset='3600' 2020-08-22 11:02:00 INFO: skip by time diff 2020-08-22 08:00:20.954000+00:00 2020-08-22 11:02:00 INFO: clearing end 2020-08-22 11:02:00 INFO: 2020-08-22 11:02:00 INFO: 2020-08-22 11:02:00 INFO: 2020-08-22 11:02:00 INFO: 2020-08-22 12:00:20 INFO: 2020-08-22 12:00:20 INFO: 2020-08-22 12:00:20 INFO: 2020-08-22 12:00:20 INFO: 2020-08-22 12:00:20 INFO: init new order start 2020-08-22 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 22, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.05, 'high': 394.75, 'low': 390.35, 'close': 392.65, 'trades': 4564, 'volume': 3998411, 'vwap': 392.57, 'lastSize': 451, 'turnover': 156965515095, 'homeNotional': 46337.63315308527, 'foreignNotional': 18190815.763892777}, {'timestamp': datetime.datetime(2020, 8, 22, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.85, 'high': 391.9, 'low': 389.65, 'close': 391.05, 'trades': 2605, 'volume': 1591865, 'vwap': 390.72, 'lastSize': 105, 'turnover': 62195993695, 'homeNotional': 18405.178414527443, 'foreignNotional': 7191118.667241518}, {'timestamp': datetime.datetime(2020, 8, 22, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.15, 'high': 392.3, 'low': 386.15, 'close': 391.85, 'trades': 6932, 'volume': 6859471, 'vwap': 390.13, 'lastSize': 5000, 'turnover': 267602940410, 'homeNotional': 79170.05774698075, 'foreignNotional': 30886289.02558115}] 2020-08-22 12:00:20 INFO: prepare candles [CandleItem(low=390.35, high=394.75, open=391.05, close=392.65, color='GREEN'), CandleItem(low=389.65, high=391.9, open=391.85, close=391.05, color='RED'), CandleItem(low=386.15, high=392.3, open=386.15, close=391.85, color='GREEN')] 2020-08-22 12:00:20 INFO: skip by colors first_candle=CandleItem(low=386.15, high=392.3, open=386.15, close=391.85, color='GREEN') second_candle=CandleItem(low=389.65, high=391.9, open=391.85, close=391.05, color='RED') last_candle=CandleItem(low=390.35, high=394.75, open=391.05, close=392.65, color='GREEN') 2020-08-22 12:00:20 INFO: check need new order None 2020-08-22 12:00:20 INFO: init new order end 2020-08-22 12:00:20 INFO: 2020-08-22 12:00:20 INFO: 2020-08-22 12:00:20 INFO: 2020-08-22 12:00:20 INFO: 2020-08-22 12:02:00 INFO: 2020-08-22 12:02:00 INFO: 2020-08-22 12:02:00 INFO: 2020-08-22 12:02:00 INFO: 2020-08-22 12:02:00 INFO: clearing start 2020-08-22 12:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '6e8934ad-1d07-336e-cf4c-9f44a49c61d3', 'clOrdID': '5ef58da068dc4382b34d36c549f90b3e', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 826, 'price': 389.55, 'displayQty': None, 'stopPx': 389.6, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 826, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 22, 8, 0, 20, 954000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 22, 8, 0, 20, 954000, tzinfo=tzutc())} 2020-08-22 12:02:00 INFO: order time=2020-08-22 08:00:20.954000+00:00; delta from now UTC=1:01:39.613540 time_delta.total_seconds()=3699.61354; time_diff_offset='3600' 2020-08-22 12:02:00 INFO: clear order 5ef58da068dc4382b34d36c549f90b3e 2020-08-22 12:02:00 INFO: cancel order resp=[{'orderID': '6e8934ad-1d07-336e-cf4c-9f44a49c61d3', 'clOrdID': '5ef58da068dc4382b34d36c549f90b3e', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 826, 'price': 389.55, 'displayQty': None, 'stopPx': 389.6, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'Canceled', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 0, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Canceled: cancelled by clearing\nInit order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 22, 8, 0, 20, 954000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 22, 9, 2, 0, 717000, tzinfo=tzutc())}] 2020-08-22 12:02:00 INFO: clearing end 2020-08-22 12:02:00 INFO: 2020-08-22 12:02:00 INFO: 2020-08-22 12:02:00 INFO: 2020-08-22 12:02:00 INFO: 2020-08-22 12:02:01 INFO: process event {'orderID': '6e8934ad-1d07-336e-cf4c-9f44a49c61d3', 'ordStatus': 'Canceled', 'leavesQty': 0, 'text': 'Canceled: cancelled by clearing\nInit order by supervisor.py', 'timestamp': '2020-08-22T09:02:00.717Z', 'clOrdID': '5ef58da068dc4382b34d36c549f90b3e', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-22 12:02:01 INFO: skip event 5ef58da068dc4382b34d36c549f90b3e Canceled 2020-08-22 13:00:20 INFO: 2020-08-22 13:00:20 INFO: 2020-08-22 13:00:20 INFO: 2020-08-22 13:00:20 INFO: 2020-08-22 13:00:20 INFO: init new order start 2020-08-22 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 22, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.65, 'high': 392.9, 'low': 390.6, 'close': 392.7, 'trades': 2239, 'volume': 1564771, 'vwap': 391.81, 'lastSize': 1480, 'turnover': 61307925695, 'homeNotional': 18106.066803147754, 'foreignNotional': 7093987.402571097}, {'timestamp': datetime.datetime(2020, 8, 22, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.05, 'high': 394.75, 'low': 390.35, 'close': 392.65, 'trades': 4564, 'volume': 3998411, 'vwap': 392.57, 'lastSize': 451, 'turnover': 156965515095, 'homeNotional': 46337.63315308527, 'foreignNotional': 18190815.763892777}, {'timestamp': datetime.datetime(2020, 8, 22, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.85, 'high': 391.9, 'low': 389.65, 'close': 391.05, 'trades': 2605, 'volume': 1591865, 'vwap': 390.72, 'lastSize': 105, 'turnover': 62195993695, 'homeNotional': 18405.178414527443, 'foreignNotional': 7191118.667241518}] 2020-08-22 13:00:20 INFO: prepare candles [CandleItem(low=390.6, high=392.9, open=392.65, close=392.7, color='GREEN'), CandleItem(low=390.35, high=394.75, open=391.05, close=392.65, color='GREEN'), CandleItem(low=389.65, high=391.9, open=391.85, close=391.05, color='RED')] 2020-08-22 13:00:20 INFO: skip by colors first_candle=CandleItem(low=389.65, high=391.9, open=391.85, close=391.05, color='RED') second_candle=CandleItem(low=390.35, high=394.75, open=391.05, close=392.65, color='GREEN') last_candle=CandleItem(low=390.6, high=392.9, open=392.65, close=392.7, color='GREEN') 2020-08-22 13:00:20 INFO: check need new order None 2020-08-22 13:00:20 INFO: init new order end 2020-08-22 13:00:20 INFO: 2020-08-22 13:00:20 INFO: 2020-08-22 13:00:20 INFO: 2020-08-22 13:00:20 INFO: 2020-08-22 13:02:00 INFO: 2020-08-22 13:02:00 INFO: 2020-08-22 13:02:00 INFO: 2020-08-22 13:02:00 INFO: 2020-08-22 13:02:00 INFO: clearing start 2020-08-22 13:02:00 INFO: clearing end 2020-08-22 13:02:00 INFO: 2020-08-22 13:02:00 INFO: 2020-08-22 13:02:00 INFO: 2020-08-22 13:02:00 INFO: 2020-08-22 14:00:20 INFO: 2020-08-22 14:00:20 INFO: 2020-08-22 14:00:20 INFO: 2020-08-22 14:00:20 INFO: 2020-08-22 14:00:20 INFO: init new order start 2020-08-22 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 22, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.7, 'high': 393.5, 'low': 391.0, 'close': 391.3, 'trades': 2397, 'volume': 1939129, 'vwap': 392.46, 'lastSize': 134, 'turnover': 76101209030, 'homeNotional': 22465.73912400708, 'foreignNotional': 8816697.558723565}, {'timestamp': datetime.datetime(2020, 8, 22, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.65, 'high': 392.9, 'low': 390.6, 'close': 392.7, 'trades': 2239, 'volume': 1564771, 'vwap': 391.81, 'lastSize': 1480, 'turnover': 61307925695, 'homeNotional': 18106.066803147754, 'foreignNotional': 7093987.402571097}, {'timestamp': datetime.datetime(2020, 8, 22, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.05, 'high': 394.75, 'low': 390.35, 'close': 392.65, 'trades': 4564, 'volume': 3998411, 'vwap': 392.57, 'lastSize': 451, 'turnover': 156965515095, 'homeNotional': 46337.63315308527, 'foreignNotional': 18190815.763892777}] 2020-08-22 14:00:20 INFO: prepare candles [CandleItem(low=391.0, high=393.5, open=392.7, close=391.3, color='RED'), CandleItem(low=390.6, high=392.9, open=392.65, close=392.7, color='GREEN'), CandleItem(low=390.35, high=394.75, open=391.05, close=392.65, color='GREEN')] 2020-08-22 14:00:20 INFO: last_candle=CandleItem(low=391.0, high=393.5, open=392.7, close=391.3, color='RED') 2020-08-22 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-22 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=391.0, high=393.5, open=392.7, close=391.3, color='RED') 2020-08-22 14:00:20 INFO: skip by CandleItem(low=391.0, high=393.5, open=392.7, close=391.3, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-22 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-22 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=391.0, high=393.5, open=392.7, close=391.3, color='RED') 2020-08-22 14:00:20 INFO: skip by CandleItem(low=391.0, high=393.5, open=392.7, close=391.3, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-22 14:00:20 INFO: not found applicable config for candle 2020-08-22 14:00:20 INFO: check need new order None 2020-08-22 14:00:20 INFO: init new order end 2020-08-22 14:00:20 INFO: 2020-08-22 14:00:20 INFO: 2020-08-22 14:00:20 INFO: 2020-08-22 14:00:20 INFO: 2020-08-22 14:02:00 INFO: 2020-08-22 14:02:00 INFO: 2020-08-22 14:02:00 INFO: 2020-08-22 14:02:00 INFO: 2020-08-22 14:02:00 INFO: clearing start 2020-08-22 14:02:00 INFO: clearing end 2020-08-22 14:02:00 INFO: 2020-08-22 14:02:00 INFO: 2020-08-22 14:02:00 INFO: 2020-08-22 14:02:00 INFO: 2020-08-22 15:00:20 INFO: 2020-08-22 15:00:20 INFO: 2020-08-22 15:00:20 INFO: 2020-08-22 15:00:20 INFO: 2020-08-22 15:00:20 INFO: init new order start 2020-08-22 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 22, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.3, 'high': 391.65, 'low': 388.8, 'close': 390.25, 'trades': 2597, 'volume': 1685487, 'vwap': 389.87, 'lastSize': 39, 'turnover': 65711738990, 'homeNotional': 19486.651395074707, 'foreignNotional': 7597226.425181667}, {'timestamp': datetime.datetime(2020, 8, 22, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.7, 'high': 393.5, 'low': 391.0, 'close': 391.3, 'trades': 2397, 'volume': 1939129, 'vwap': 392.46, 'lastSize': 134, 'turnover': 76101209030, 'homeNotional': 22465.73912400708, 'foreignNotional': 8816697.558723565}, {'timestamp': datetime.datetime(2020, 8, 22, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.65, 'high': 392.9, 'low': 390.6, 'close': 392.7, 'trades': 2239, 'volume': 1564771, 'vwap': 391.81, 'lastSize': 1480, 'turnover': 61307925695, 'homeNotional': 18106.066803147754, 'foreignNotional': 7093987.402571097}] 2020-08-22 15:00:20 INFO: prepare candles [CandleItem(low=388.8, high=391.65, open=391.3, close=390.25, color='RED'), CandleItem(low=391.0, high=393.5, open=392.7, close=391.3, color='RED'), CandleItem(low=390.6, high=392.9, open=392.65, close=392.7, color='GREEN')] 2020-08-22 15:00:20 INFO: skip by colors first_candle=CandleItem(low=390.6, high=392.9, open=392.65, close=392.7, color='GREEN') second_candle=CandleItem(low=391.0, high=393.5, open=392.7, close=391.3, color='RED') last_candle=CandleItem(low=388.8, high=391.65, open=391.3, close=390.25, color='RED') 2020-08-22 15:00:20 INFO: check need new order None 2020-08-22 15:00:20 INFO: init new order end 2020-08-22 15:00:20 INFO: 2020-08-22 15:00:20 INFO: 2020-08-22 15:00:20 INFO: 2020-08-22 15:00:20 INFO: 2020-08-22 15:02:00 INFO: 2020-08-22 15:02:00 INFO: 2020-08-22 15:02:00 INFO: 2020-08-22 15:02:00 INFO: 2020-08-22 15:02:00 INFO: clearing start 2020-08-22 15:02:00 INFO: clearing end 2020-08-22 15:02:00 INFO: 2020-08-22 15:02:00 INFO: 2020-08-22 15:02:00 INFO: 2020-08-22 15:02:00 INFO: 2020-08-22 16:00:20 INFO: 2020-08-22 16:00:20 INFO: 2020-08-22 16:00:20 INFO: 2020-08-22 16:00:20 INFO: 2020-08-22 16:00:20 INFO: init new order start 2020-08-22 16:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 22, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 390.25, 'high': 393.8, 'low': 390.25, 'close': 392.35, 'trades': 2627, 'volume': 2047610, 'vwap': 391.7, 'lastSize': 100, 'turnover': 80204407200, 'homeNotional': 23731.567186760698, 'foreignNotional': 9295615.921226893}, {'timestamp': datetime.datetime(2020, 8, 22, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.3, 'high': 391.65, 'low': 388.8, 'close': 390.25, 'trades': 2597, 'volume': 1685487, 'vwap': 389.87, 'lastSize': 39, 'turnover': 65711738990, 'homeNotional': 19486.651395074707, 'foreignNotional': 7597226.425181667}, {'timestamp': datetime.datetime(2020, 8, 22, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.7, 'high': 393.5, 'low': 391.0, 'close': 391.3, 'trades': 2397, 'volume': 1939129, 'vwap': 392.46, 'lastSize': 134, 'turnover': 76101209030, 'homeNotional': 22465.73912400708, 'foreignNotional': 8816697.558723565}] 2020-08-22 16:00:21 INFO: prepare candles [CandleItem(low=390.25, high=393.8, open=390.25, close=392.35, color='GREEN'), CandleItem(low=388.8, high=391.65, open=391.3, close=390.25, color='RED'), CandleItem(low=391.0, high=393.5, open=392.7, close=391.3, color='RED')] 2020-08-22 16:00:21 INFO: last_candle=CandleItem(low=390.25, high=393.8, open=390.25, close=392.35, color='GREEN') 2020-08-22 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-22 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=390.25, high=393.8, open=390.25, close=392.35, color='GREEN') 2020-08-22 16:00:21 INFO: skip by CandleItem(low=390.25, high=393.8, open=390.25, close=392.35, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-22 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-22 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=390.25, high=393.8, open=390.25, close=392.35, color='GREEN') 2020-08-22 16:00:21 INFO: skip by CandleItem(low=390.25, high=393.8, open=390.25, close=392.35, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-22 16:00:21 INFO: not found applicable config for candle 2020-08-22 16:00:21 INFO: check need new order None 2020-08-22 16:00:21 INFO: init new order end 2020-08-22 16:00:21 INFO: 2020-08-22 16:00:21 INFO: 2020-08-22 16:00:21 INFO: 2020-08-22 16:00:21 INFO: 2020-08-22 16:02:00 INFO: 2020-08-22 16:02:00 INFO: 2020-08-22 16:02:00 INFO: 2020-08-22 16:02:00 INFO: 2020-08-22 16:02:00 INFO: clearing start 2020-08-22 16:02:00 INFO: clearing end 2020-08-22 16:02:00 INFO: 2020-08-22 16:02:00 INFO: 2020-08-22 16:02:00 INFO: 2020-08-22 16:02:00 INFO: 2020-08-22 17:00:20 INFO: 2020-08-22 17:00:20 INFO: 2020-08-22 17:00:20 INFO: 2020-08-22 17:00:20 INFO: 2020-08-22 17:00:20 INFO: init new order start 2020-08-22 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 22, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.35, 'high': 393.0, 'low': 389.8, 'close': 391.8, 'trades': 2961, 'volume': 2265384, 'vwap': 391.1, 'lastSize': 13, 'turnover': 88597737600, 'homeNotional': 26245.50758822192, 'foreignNotional': 10264461.945756514}, {'timestamp': datetime.datetime(2020, 8, 22, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 390.25, 'high': 393.8, 'low': 390.25, 'close': 392.35, 'trades': 2627, 'volume': 2047610, 'vwap': 391.7, 'lastSize': 100, 'turnover': 80204407200, 'homeNotional': 23731.567186760698, 'foreignNotional': 9295615.921226893}, {'timestamp': datetime.datetime(2020, 8, 22, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.3, 'high': 391.65, 'low': 388.8, 'close': 390.25, 'trades': 2597, 'volume': 1685487, 'vwap': 389.87, 'lastSize': 39, 'turnover': 65711738990, 'homeNotional': 19486.651395074707, 'foreignNotional': 7597226.425181667}] 2020-08-22 17:00:20 INFO: prepare candles [CandleItem(low=389.8, high=393.0, open=392.35, close=391.8, color='RED'), CandleItem(low=390.25, high=393.8, open=390.25, close=392.35, color='GREEN'), CandleItem(low=388.8, high=391.65, open=391.3, close=390.25, color='RED')] 2020-08-22 17:00:20 INFO: skip by colors first_candle=CandleItem(low=388.8, high=391.65, open=391.3, close=390.25, color='RED') second_candle=CandleItem(low=390.25, high=393.8, open=390.25, close=392.35, color='GREEN') last_candle=CandleItem(low=389.8, high=393.0, open=392.35, close=391.8, color='RED') 2020-08-22 17:00:20 INFO: check need new order None 2020-08-22 17:00:20 INFO: init new order end 2020-08-22 17:00:20 INFO: 2020-08-22 17:00:20 INFO: 2020-08-22 17:00:20 INFO: 2020-08-22 17:00:20 INFO: 2020-08-22 17:02:00 INFO: 2020-08-22 17:02:00 INFO: 2020-08-22 17:02:00 INFO: 2020-08-22 17:02:00 INFO: 2020-08-22 17:02:00 INFO: clearing start 2020-08-22 17:02:01 INFO: clearing end 2020-08-22 17:02:01 INFO: 2020-08-22 17:02:01 INFO: 2020-08-22 17:02:01 INFO: 2020-08-22 17:02:01 INFO: 2020-08-22 18:00:20 INFO: 2020-08-22 18:00:20 INFO: 2020-08-22 18:00:20 INFO: 2020-08-22 18:00:20 INFO: 2020-08-22 18:00:20 INFO: init new order start 2020-08-22 18:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 22, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.8, 'high': 393.2, 'low': 389.3, 'close': 392.15, 'trades': 3200, 'volume': 2038061, 'vwap': 391.28, 'lastSize': 3150, 'turnover': 79745233615, 'homeNotional': 23642.72143569728, 'foreignNotional': 9250959.946943471}, {'timestamp': datetime.datetime(2020, 8, 22, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.35, 'high': 393.0, 'low': 389.8, 'close': 391.8, 'trades': 2961, 'volume': 2265384, 'vwap': 391.1, 'lastSize': 13, 'turnover': 88597737600, 'homeNotional': 26245.50758822192, 'foreignNotional': 10264461.945756514}, {'timestamp': datetime.datetime(2020, 8, 22, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 390.25, 'high': 393.8, 'low': 390.25, 'close': 392.35, 'trades': 2627, 'volume': 2047610, 'vwap': 391.7, 'lastSize': 100, 'turnover': 80204407200, 'homeNotional': 23731.567186760698, 'foreignNotional': 9295615.921226893}] 2020-08-22 18:00:20 INFO: prepare candles [CandleItem(low=389.3, high=393.2, open=391.8, close=392.15, color='GREEN'), CandleItem(low=389.8, high=393.0, open=392.35, close=391.8, color='RED'), CandleItem(low=390.25, high=393.8, open=390.25, close=392.35, color='GREEN')] 2020-08-22 18:00:20 INFO: skip by colors first_candle=CandleItem(low=390.25, high=393.8, open=390.25, close=392.35, color='GREEN') second_candle=CandleItem(low=389.8, high=393.0, open=392.35, close=391.8, color='RED') last_candle=CandleItem(low=389.3, high=393.2, open=391.8, close=392.15, color='GREEN') 2020-08-22 18:00:20 INFO: check need new order None 2020-08-22 18:00:20 INFO: init new order end 2020-08-22 18:00:20 INFO: 2020-08-22 18:00:20 INFO: 2020-08-22 18:00:20 INFO: 2020-08-22 18:00:20 INFO: 2020-08-22 18:02:00 INFO: 2020-08-22 18:02:00 INFO: 2020-08-22 18:02:00 INFO: 2020-08-22 18:02:00 INFO: 2020-08-22 18:02:00 INFO: clearing start 2020-08-22 18:02:00 INFO: clearing end 2020-08-22 18:02:00 INFO: 2020-08-22 18:02:00 INFO: 2020-08-22 18:02:00 INFO: 2020-08-22 18:02:00 INFO: 2020-08-22 19:00:20 INFO: 2020-08-22 19:00:20 INFO: 2020-08-22 19:00:20 INFO: 2020-08-22 19:00:20 INFO: 2020-08-22 19:00:20 INFO: init new order start 2020-08-22 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 22, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.15, 'high': 393.85, 'low': 390.9, 'close': 391.1, 'trades': 2886, 'volume': 1754832, 'vwap': 392.19, 'lastSize': 71, 'turnover': 68822650840, 'homeNotional': 20380.00327984298, 'foreignNotional': 7992841.95163431}, {'timestamp': datetime.datetime(2020, 8, 22, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.8, 'high': 393.2, 'low': 389.3, 'close': 392.15, 'trades': 3200, 'volume': 2038061, 'vwap': 391.28, 'lastSize': 3150, 'turnover': 79745233615, 'homeNotional': 23642.72143569728, 'foreignNotional': 9250959.946943471}, {'timestamp': datetime.datetime(2020, 8, 22, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.35, 'high': 393.0, 'low': 389.8, 'close': 391.8, 'trades': 2961, 'volume': 2265384, 'vwap': 391.1, 'lastSize': 13, 'turnover': 88597737600, 'homeNotional': 26245.50758822192, 'foreignNotional': 10264461.945756514}] 2020-08-22 19:00:20 INFO: prepare candles [CandleItem(low=390.9, high=393.85, open=392.15, close=391.1, color='RED'), CandleItem(low=389.3, high=393.2, open=391.8, close=392.15, color='GREEN'), CandleItem(low=389.8, high=393.0, open=392.35, close=391.8, color='RED')] 2020-08-22 19:00:20 INFO: skip by colors first_candle=CandleItem(low=389.8, high=393.0, open=392.35, close=391.8, color='RED') second_candle=CandleItem(low=389.3, high=393.2, open=391.8, close=392.15, color='GREEN') last_candle=CandleItem(low=390.9, high=393.85, open=392.15, close=391.1, color='RED') 2020-08-22 19:00:20 INFO: check need new order None 2020-08-22 19:00:20 INFO: init new order end 2020-08-22 19:00:20 INFO: 2020-08-22 19:00:20 INFO: 2020-08-22 19:00:20 INFO: 2020-08-22 19:00:20 INFO: 2020-08-22 19:02:00 INFO: 2020-08-22 19:02:00 INFO: 2020-08-22 19:02:00 INFO: 2020-08-22 19:02:00 INFO: 2020-08-22 19:02:00 INFO: clearing start 2020-08-22 19:02:00 INFO: clearing end 2020-08-22 19:02:00 INFO: 2020-08-22 19:02:00 INFO: 2020-08-22 19:02:00 INFO: 2020-08-22 19:02:00 INFO: 2020-08-22 20:00:20 INFO: 2020-08-22 20:00:20 INFO: 2020-08-22 20:00:20 INFO: 2020-08-22 20:00:20 INFO: 2020-08-22 20:00:20 INFO: init new order start 2020-08-22 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 22, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.1, 'high': 391.95, 'low': 389.3, 'close': 391.1, 'trades': 3336, 'volume': 1760026, 'vwap': 390.38, 'lastSize': 100, 'turnover': 68707808650, 'homeNotional': 20379.10453173193, 'foreignNotional': 7955592.583984957}, {'timestamp': datetime.datetime(2020, 8, 22, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.15, 'high': 393.85, 'low': 390.9, 'close': 391.1, 'trades': 2886, 'volume': 1754832, 'vwap': 392.19, 'lastSize': 71, 'turnover': 68822650840, 'homeNotional': 20380.00327984298, 'foreignNotional': 7992841.95163431}, {'timestamp': datetime.datetime(2020, 8, 22, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.8, 'high': 393.2, 'low': 389.3, 'close': 392.15, 'trades': 3200, 'volume': 2038061, 'vwap': 391.28, 'lastSize': 3150, 'turnover': 79745233615, 'homeNotional': 23642.72143569728, 'foreignNotional': 9250959.946943471}] 2020-08-22 20:00:20 INFO: skip by found empty buckets 2020-08-22 20:00:20 INFO: check need new order None 2020-08-22 20:00:20 INFO: init new order end 2020-08-22 20:00:20 INFO: 2020-08-22 20:00:20 INFO: 2020-08-22 20:00:20 INFO: 2020-08-22 20:00:20 INFO: 2020-08-22 20:02:00 INFO: 2020-08-22 20:02:00 INFO: 2020-08-22 20:02:00 INFO: 2020-08-22 20:02:00 INFO: 2020-08-22 20:02:00 INFO: clearing start 2020-08-22 20:02:00 INFO: clearing end 2020-08-22 20:02:00 INFO: 2020-08-22 20:02:00 INFO: 2020-08-22 20:02:00 INFO: 2020-08-22 20:02:00 INFO: 2020-08-22 21:00:20 INFO: 2020-08-22 21:00:20 INFO: 2020-08-22 21:00:20 INFO: 2020-08-22 21:00:20 INFO: 2020-08-22 21:00:20 INFO: init new order start 2020-08-22 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 22, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.1, 'high': 391.9, 'low': 389.35, 'close': 391.5, 'trades': 2463, 'volume': 1415021, 'vwap': 390.77, 'lastSize': 354, 'turnover': 55294394370, 'homeNotional': 16405.5468686896, 'foreignNotional': 6410762.344633159}, {'timestamp': datetime.datetime(2020, 8, 22, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.1, 'high': 391.95, 'low': 389.3, 'close': 391.1, 'trades': 3336, 'volume': 1760026, 'vwap': 390.38, 'lastSize': 100, 'turnover': 68707808650, 'homeNotional': 20379.10453173193, 'foreignNotional': 7955592.583984957}, {'timestamp': datetime.datetime(2020, 8, 22, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.15, 'high': 393.85, 'low': 390.9, 'close': 391.1, 'trades': 2886, 'volume': 1754832, 'vwap': 392.19, 'lastSize': 71, 'turnover': 68822650840, 'homeNotional': 20380.00327984298, 'foreignNotional': 7992841.95163431}] 2020-08-22 21:00:20 INFO: skip by found empty buckets 2020-08-22 21:00:20 INFO: check need new order None 2020-08-22 21:00:20 INFO: init new order end 2020-08-22 21:00:20 INFO: 2020-08-22 21:00:20 INFO: 2020-08-22 21:00:20 INFO: 2020-08-22 21:00:20 INFO: 2020-08-22 21:02:00 INFO: 2020-08-22 21:02:00 INFO: 2020-08-22 21:02:00 INFO: 2020-08-22 21:02:00 INFO: 2020-08-22 21:02:00 INFO: clearing start 2020-08-22 21:02:00 INFO: clearing end 2020-08-22 21:02:00 INFO: 2020-08-22 21:02:00 INFO: 2020-08-22 21:02:00 INFO: 2020-08-22 21:02:00 INFO: 2020-08-22 22:00:20 INFO: 2020-08-22 22:00:20 INFO: 2020-08-22 22:00:20 INFO: 2020-08-22 22:00:20 INFO: 2020-08-22 22:00:20 INFO: init new order start 2020-08-22 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 22, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.5, 'high': 392.05, 'low': 390.7, 'close': 391.0, 'trades': 1641, 'volume': 1260557, 'vwap': 391.54, 'lastSize': 302, 'turnover': 49354954885, 'homeNotional': 14636.636974225936, 'foreignNotional': 5730725.926954164}, {'timestamp': datetime.datetime(2020, 8, 22, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.1, 'high': 391.9, 'low': 389.35, 'close': 391.5, 'trades': 2463, 'volume': 1415021, 'vwap': 390.77, 'lastSize': 354, 'turnover': 55294394370, 'homeNotional': 16405.5468686896, 'foreignNotional': 6410762.344633159}, {'timestamp': datetime.datetime(2020, 8, 22, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.1, 'high': 391.95, 'low': 389.3, 'close': 391.1, 'trades': 3336, 'volume': 1760026, 'vwap': 390.38, 'lastSize': 100, 'turnover': 68707808650, 'homeNotional': 20379.10453173193, 'foreignNotional': 7955592.583984957}] 2020-08-22 22:00:20 INFO: skip by found empty buckets 2020-08-22 22:00:20 INFO: check need new order None 2020-08-22 22:00:20 INFO: init new order end 2020-08-22 22:00:20 INFO: 2020-08-22 22:00:20 INFO: 2020-08-22 22:00:20 INFO: 2020-08-22 22:00:20 INFO: 2020-08-22 22:02:00 INFO: 2020-08-22 22:02:00 INFO: 2020-08-22 22:02:00 INFO: 2020-08-22 22:02:00 INFO: 2020-08-22 22:02:00 INFO: clearing start 2020-08-22 22:02:00 INFO: clearing end 2020-08-22 22:02:00 INFO: 2020-08-22 22:02:00 INFO: 2020-08-22 22:02:00 INFO: 2020-08-22 22:02:00 INFO: 2020-08-22 23:00:20 INFO: 2020-08-22 23:00:20 INFO: 2020-08-22 23:00:20 INFO: 2020-08-22 23:00:20 INFO: 2020-08-22 23:00:20 INFO: init new order start 2020-08-22 23:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 22, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.0, 'high': 391.15, 'low': 389.4, 'close': 389.7, 'trades': 1572, 'volume': 963399, 'vwap': 390.36, 'lastSize': 5, 'turnover': 37606468580, 'homeNotional': 11174.056918242448, 'foreignNotional': 4361817.579295007}, {'timestamp': datetime.datetime(2020, 8, 22, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.5, 'high': 392.05, 'low': 390.7, 'close': 391.0, 'trades': 1641, 'volume': 1260557, 'vwap': 391.54, 'lastSize': 302, 'turnover': 49354954885, 'homeNotional': 14636.636974225936, 'foreignNotional': 5730725.926954164}, {'timestamp': datetime.datetime(2020, 8, 22, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.1, 'high': 391.9, 'low': 389.35, 'close': 391.5, 'trades': 2463, 'volume': 1415021, 'vwap': 390.77, 'lastSize': 354, 'turnover': 55294394370, 'homeNotional': 16405.5468686896, 'foreignNotional': 6410762.344633159}] 2020-08-22 23:00:21 INFO: prepare candles [CandleItem(low=389.4, high=391.15, open=391.0, close=389.7, color='RED'), CandleItem(low=390.7, high=392.05, open=391.5, close=391.0, color='RED'), CandleItem(low=389.35, high=391.9, open=391.1, close=391.5, color='GREEN')] 2020-08-22 23:00:21 INFO: skip by colors first_candle=CandleItem(low=389.35, high=391.9, open=391.1, close=391.5, color='GREEN') second_candle=CandleItem(low=390.7, high=392.05, open=391.5, close=391.0, color='RED') last_candle=CandleItem(low=389.4, high=391.15, open=391.0, close=389.7, color='RED') 2020-08-22 23:00:21 INFO: check need new order None 2020-08-22 23:00:21 INFO: init new order end 2020-08-22 23:00:21 INFO: 2020-08-22 23:00:21 INFO: 2020-08-22 23:00:21 INFO: 2020-08-22 23:00:21 INFO: 2020-08-22 23:02:00 INFO: 2020-08-22 23:02:00 INFO: 2020-08-22 23:02:00 INFO: 2020-08-22 23:02:00 INFO: 2020-08-22 23:02:00 INFO: clearing start 2020-08-22 23:02:00 INFO: clearing end 2020-08-22 23:02:00 INFO: 2020-08-22 23:02:00 INFO: 2020-08-22 23:02:00 INFO: 2020-08-22 23:02:00 INFO: 2020-08-23 00:00:20 INFO: 2020-08-23 00:00:20 INFO: 2020-08-23 00:00:20 INFO: 2020-08-23 00:00:20 INFO: 2020-08-23 00:00:20 INFO: init new order start 2020-08-23 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 22, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.7, 'high': 390.05, 'low': 387.65, 'close': 389.7, 'trades': 3124, 'volume': 2298336, 'vwap': 388.84, 'lastSize': 20, 'turnover': 89367609415, 'homeNotional': 26637.985060604144, 'foreignNotional': 10357823.911850879}, {'timestamp': datetime.datetime(2020, 8, 22, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.0, 'high': 391.15, 'low': 389.4, 'close': 389.7, 'trades': 1572, 'volume': 963399, 'vwap': 390.36, 'lastSize': 5, 'turnover': 37606468580, 'homeNotional': 11174.056918242448, 'foreignNotional': 4361817.579295007}, {'timestamp': datetime.datetime(2020, 8, 22, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.5, 'high': 392.05, 'low': 390.7, 'close': 391.0, 'trades': 1641, 'volume': 1260557, 'vwap': 391.54, 'lastSize': 302, 'turnover': 49354954885, 'homeNotional': 14636.636974225936, 'foreignNotional': 5730725.926954164}] 2020-08-23 00:00:20 INFO: skip by found empty buckets 2020-08-23 00:00:20 INFO: check need new order None 2020-08-23 00:00:20 INFO: init new order end 2020-08-23 00:00:20 INFO: 2020-08-23 00:00:20 INFO: 2020-08-23 00:00:20 INFO: 2020-08-23 00:00:20 INFO: 2020-08-23 00:02:00 INFO: 2020-08-23 00:02:00 INFO: 2020-08-23 00:02:00 INFO: 2020-08-23 00:02:00 INFO: 2020-08-23 00:02:00 INFO: clearing start 2020-08-23 00:02:00 INFO: clearing end 2020-08-23 00:02:00 INFO: 2020-08-23 00:02:00 INFO: 2020-08-23 00:02:00 INFO: 2020-08-23 00:02:00 INFO: 2020-08-23 01:00:20 INFO: 2020-08-23 01:00:20 INFO: 2020-08-23 01:00:20 INFO: 2020-08-23 01:00:20 INFO: 2020-08-23 01:00:20 INFO: init new order start 2020-08-23 01:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 22, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.7, 'high': 393.8, 'low': 389.15, 'close': 393.7, 'trades': 3213, 'volume': 1539894, 'vwap': 392.02, 'lastSize': 12, 'turnover': 60366092390, 'homeNotional': 17949.707229712418, 'foreignNotional': 7036592.735828548}, {'timestamp': datetime.datetime(2020, 8, 22, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.7, 'high': 390.05, 'low': 387.65, 'close': 389.7, 'trades': 3124, 'volume': 2298336, 'vwap': 388.84, 'lastSize': 20, 'turnover': 89367609415, 'homeNotional': 26637.985060604144, 'foreignNotional': 10357823.911850879}, {'timestamp': datetime.datetime(2020, 8, 22, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.0, 'high': 391.15, 'low': 389.4, 'close': 389.7, 'trades': 1572, 'volume': 963399, 'vwap': 390.36, 'lastSize': 5, 'turnover': 37606468580, 'homeNotional': 11174.056918242448, 'foreignNotional': 4361817.579295007}] 2020-08-23 01:00:21 INFO: skip by found empty buckets 2020-08-23 01:00:21 INFO: check need new order None 2020-08-23 01:00:21 INFO: init new order end 2020-08-23 01:00:21 INFO: 2020-08-23 01:00:21 INFO: 2020-08-23 01:00:21 INFO: 2020-08-23 01:00:21 INFO: 2020-08-23 01:02:00 INFO: 2020-08-23 01:02:00 INFO: 2020-08-23 01:02:00 INFO: 2020-08-23 01:02:00 INFO: 2020-08-23 01:02:00 INFO: clearing start 2020-08-23 01:02:00 INFO: clearing end 2020-08-23 01:02:00 INFO: 2020-08-23 01:02:00 INFO: 2020-08-23 01:02:00 INFO: 2020-08-23 01:02:00 INFO: 2020-08-23 02:00:20 INFO: 2020-08-23 02:00:20 INFO: 2020-08-23 02:00:20 INFO: 2020-08-23 02:00:20 INFO: 2020-08-23 02:00:20 INFO: init new order start 2020-08-23 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 22, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.7, 'high': 395.2, 'low': 392.4, 'close': 393.5, 'trades': 3759, 'volume': 2479367, 'vwap': 394.05, 'lastSize': 13, 'turnover': 97697901940, 'homeNotional': 28933.74942988279, 'foreignNotional': 11401173.943084512}, {'timestamp': datetime.datetime(2020, 8, 22, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.7, 'high': 393.8, 'low': 389.15, 'close': 393.7, 'trades': 3213, 'volume': 1539894, 'vwap': 392.02, 'lastSize': 12, 'turnover': 60366092390, 'homeNotional': 17949.707229712418, 'foreignNotional': 7036592.735828548}, {'timestamp': datetime.datetime(2020, 8, 22, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.7, 'high': 390.05, 'low': 387.65, 'close': 389.7, 'trades': 3124, 'volume': 2298336, 'vwap': 388.84, 'lastSize': 20, 'turnover': 89367609415, 'homeNotional': 26637.985060604144, 'foreignNotional': 10357823.911850879}] 2020-08-23 02:00:20 INFO: skip by found empty buckets 2020-08-23 02:00:20 INFO: check need new order None 2020-08-23 02:00:20 INFO: init new order end 2020-08-23 02:00:20 INFO: 2020-08-23 02:00:20 INFO: 2020-08-23 02:00:20 INFO: 2020-08-23 02:00:20 INFO: 2020-08-23 02:02:00 INFO: 2020-08-23 02:02:00 INFO: 2020-08-23 02:02:00 INFO: 2020-08-23 02:02:00 INFO: 2020-08-23 02:02:00 INFO: clearing start 2020-08-23 02:02:00 INFO: clearing end 2020-08-23 02:02:00 INFO: 2020-08-23 02:02:00 INFO: 2020-08-23 02:02:00 INFO: 2020-08-23 02:02:00 INFO: 2020-08-23 03:00:20 INFO: 2020-08-23 03:00:20 INFO: 2020-08-23 03:00:20 INFO: 2020-08-23 03:00:20 INFO: 2020-08-23 03:00:20 INFO: init new order start 2020-08-23 03:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 23, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.5, 'high': 397.4, 'low': 393.05, 'close': 395.85, 'trades': 3443, 'volume': 2284525, 'vwap': 395.9, 'lastSize': 1051, 'turnover': 90442868365, 'homeNotional': 26686.57746437645, 'foreignNotional': 10565048.053868458}, {'timestamp': datetime.datetime(2020, 8, 22, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.7, 'high': 395.2, 'low': 392.4, 'close': 393.5, 'trades': 3759, 'volume': 2479367, 'vwap': 394.05, 'lastSize': 13, 'turnover': 97697901940, 'homeNotional': 28933.74942988279, 'foreignNotional': 11401173.943084512}, {'timestamp': datetime.datetime(2020, 8, 22, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.7, 'high': 393.8, 'low': 389.15, 'close': 393.7, 'trades': 3213, 'volume': 1539894, 'vwap': 392.02, 'lastSize': 12, 'turnover': 60366092390, 'homeNotional': 17949.707229712418, 'foreignNotional': 7036592.735828548}] 2020-08-23 03:00:21 INFO: prepare candles [CandleItem(low=393.05, high=397.4, open=393.5, close=395.85, color='GREEN'), CandleItem(low=392.4, high=395.2, open=393.7, close=393.5, color='RED'), CandleItem(low=389.15, high=393.8, open=389.7, close=393.7, color='GREEN')] 2020-08-23 03:00:21 INFO: skip by colors first_candle=CandleItem(low=389.15, high=393.8, open=389.7, close=393.7, color='GREEN') second_candle=CandleItem(low=392.4, high=395.2, open=393.7, close=393.5, color='RED') last_candle=CandleItem(low=393.05, high=397.4, open=393.5, close=395.85, color='GREEN') 2020-08-23 03:00:21 INFO: check need new order None 2020-08-23 03:00:21 INFO: init new order end 2020-08-23 03:00:21 INFO: 2020-08-23 03:00:21 INFO: 2020-08-23 03:00:21 INFO: 2020-08-23 03:00:21 INFO: 2020-08-23 03:02:00 INFO: 2020-08-23 03:02:00 INFO: 2020-08-23 03:02:00 INFO: 2020-08-23 03:02:00 INFO: 2020-08-23 03:02:00 INFO: clearing start 2020-08-23 03:02:00 INFO: clearing end 2020-08-23 03:02:00 INFO: 2020-08-23 03:02:00 INFO: 2020-08-23 03:02:00 INFO: 2020-08-23 03:02:00 INFO: 2020-08-23 04:00:20 INFO: 2020-08-23 04:00:20 INFO: 2020-08-23 04:00:20 INFO: 2020-08-23 04:00:20 INFO: 2020-08-23 04:00:20 INFO: init new order start 2020-08-23 04:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 23, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 395.85, 'high': 397.5, 'low': 392.8, 'close': 393.9, 'trades': 3939, 'volume': 2377647, 'vwap': 394.8, 'lastSize': 12, 'turnover': 93869018590, 'homeNotional': 27724.68629469154, 'foreignNotional': 10945702.803833863}, {'timestamp': datetime.datetime(2020, 8, 23, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.5, 'high': 397.4, 'low': 393.05, 'close': 395.85, 'trades': 3443, 'volume': 2284525, 'vwap': 395.9, 'lastSize': 1051, 'turnover': 90442868365, 'homeNotional': 26686.57746437645, 'foreignNotional': 10565048.053868458}, {'timestamp': datetime.datetime(2020, 8, 22, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.7, 'high': 395.2, 'low': 392.4, 'close': 393.5, 'trades': 3759, 'volume': 2479367, 'vwap': 394.05, 'lastSize': 13, 'turnover': 97697901940, 'homeNotional': 28933.74942988279, 'foreignNotional': 11401173.943084512}] 2020-08-23 04:00:20 INFO: prepare candles [CandleItem(low=392.8, high=397.5, open=395.85, close=393.9, color='RED'), CandleItem(low=393.05, high=397.4, open=393.5, close=395.85, color='GREEN'), CandleItem(low=392.4, high=395.2, open=393.7, close=393.5, color='RED')] 2020-08-23 04:00:20 INFO: skip by colors first_candle=CandleItem(low=392.4, high=395.2, open=393.7, close=393.5, color='RED') second_candle=CandleItem(low=393.05, high=397.4, open=393.5, close=395.85, color='GREEN') last_candle=CandleItem(low=392.8, high=397.5, open=395.85, close=393.9, color='RED') 2020-08-23 04:00:20 INFO: check need new order None 2020-08-23 04:00:20 INFO: init new order end 2020-08-23 04:00:20 INFO: 2020-08-23 04:00:20 INFO: 2020-08-23 04:00:20 INFO: 2020-08-23 04:00:20 INFO: 2020-08-23 04:02:00 INFO: 2020-08-23 04:02:00 INFO: 2020-08-23 04:02:00 INFO: 2020-08-23 04:02:00 INFO: 2020-08-23 04:02:00 INFO: clearing start 2020-08-23 04:02:00 INFO: clearing end 2020-08-23 04:02:00 INFO: 2020-08-23 04:02:00 INFO: 2020-08-23 04:02:00 INFO: 2020-08-23 04:02:00 INFO: 2020-08-23 05:00:20 INFO: 2020-08-23 05:00:20 INFO: 2020-08-23 05:00:20 INFO: 2020-08-23 05:00:20 INFO: 2020-08-23 05:00:20 INFO: init new order start 2020-08-23 05:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 23, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.9, 'high': 394.25, 'low': 392.45, 'close': 393.9, 'trades': 1558, 'volume': 892493, 'vwap': 393.46, 'lastSize': 381, 'turnover': 35115203555, 'homeNotional': 10387.817714882409, 'foreignNotional': 4087097.2148759607}, {'timestamp': datetime.datetime(2020, 8, 23, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 395.85, 'high': 397.5, 'low': 392.8, 'close': 393.9, 'trades': 3939, 'volume': 2377647, 'vwap': 394.8, 'lastSize': 12, 'turnover': 93869018590, 'homeNotional': 27724.68629469154, 'foreignNotional': 10945702.803833863}, {'timestamp': datetime.datetime(2020, 8, 23, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.5, 'high': 397.4, 'low': 393.05, 'close': 395.85, 'trades': 3443, 'volume': 2284525, 'vwap': 395.9, 'lastSize': 1051, 'turnover': 90442868365, 'homeNotional': 26686.57746437645, 'foreignNotional': 10565048.053868458}] 2020-08-23 05:00:21 INFO: skip by found empty buckets 2020-08-23 05:00:21 INFO: check need new order None 2020-08-23 05:00:21 INFO: init new order end 2020-08-23 05:00:21 INFO: 2020-08-23 05:00:21 INFO: 2020-08-23 05:00:21 INFO: 2020-08-23 05:00:21 INFO: 2020-08-23 05:02:00 INFO: 2020-08-23 05:02:00 INFO: 2020-08-23 05:02:00 INFO: 2020-08-23 05:02:00 INFO: 2020-08-23 05:02:00 INFO: clearing start 2020-08-23 05:02:00 INFO: clearing end 2020-08-23 05:02:00 INFO: 2020-08-23 05:02:00 INFO: 2020-08-23 05:02:00 INFO: 2020-08-23 05:02:00 INFO: 2020-08-23 06:00:20 INFO: 2020-08-23 06:00:20 INFO: 2020-08-23 06:00:20 INFO: 2020-08-23 06:00:20 INFO: 2020-08-23 06:00:20 INFO: init new order start 2020-08-23 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 23, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.9, 'high': 394.1, 'low': 390.6, 'close': 391.5, 'trades': 2209, 'volume': 1280241, 'vwap': 392.18, 'lastSize': 499, 'turnover': 50208364090, 'homeNotional': 14886.867196751553, 'foreignNotional': 5838328.509352804}, {'timestamp': datetime.datetime(2020, 8, 23, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.9, 'high': 394.25, 'low': 392.45, 'close': 393.9, 'trades': 1558, 'volume': 892493, 'vwap': 393.46, 'lastSize': 381, 'turnover': 35115203555, 'homeNotional': 10387.817714882409, 'foreignNotional': 4087097.2148759607}, {'timestamp': datetime.datetime(2020, 8, 23, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 395.85, 'high': 397.5, 'low': 392.8, 'close': 393.9, 'trades': 3939, 'volume': 2377647, 'vwap': 394.8, 'lastSize': 12, 'turnover': 93869018590, 'homeNotional': 27724.68629469154, 'foreignNotional': 10945702.803833863}] 2020-08-23 06:00:20 INFO: skip by found empty buckets 2020-08-23 06:00:20 INFO: check need new order None 2020-08-23 06:00:20 INFO: init new order end 2020-08-23 06:00:20 INFO: 2020-08-23 06:00:20 INFO: 2020-08-23 06:00:20 INFO: 2020-08-23 06:00:20 INFO: 2020-08-23 06:02:00 INFO: 2020-08-23 06:02:00 INFO: 2020-08-23 06:02:00 INFO: 2020-08-23 06:02:00 INFO: 2020-08-23 06:02:00 INFO: clearing start 2020-08-23 06:02:00 INFO: clearing end 2020-08-23 06:02:00 INFO: 2020-08-23 06:02:00 INFO: 2020-08-23 06:02:00 INFO: 2020-08-23 06:02:00 INFO: 2020-08-23 07:00:20 INFO: 2020-08-23 07:00:20 INFO: 2020-08-23 07:00:20 INFO: 2020-08-23 07:00:20 INFO: 2020-08-23 07:00:20 INFO: init new order start 2020-08-23 07:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 23, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.5, 'high': 392.25, 'low': 389.3, 'close': 390.4, 'trades': 2269, 'volume': 1238904, 'vwap': 390.55, 'lastSize': 146, 'turnover': 48385226915, 'homeNotional': 14379.753968929452, 'foreignNotional': 5615999.5780921485}, {'timestamp': datetime.datetime(2020, 8, 23, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.9, 'high': 394.1, 'low': 390.6, 'close': 391.5, 'trades': 2209, 'volume': 1280241, 'vwap': 392.18, 'lastSize': 499, 'turnover': 50208364090, 'homeNotional': 14886.867196751553, 'foreignNotional': 5838328.509352804}, {'timestamp': datetime.datetime(2020, 8, 23, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.9, 'high': 394.25, 'low': 392.45, 'close': 393.9, 'trades': 1558, 'volume': 892493, 'vwap': 393.46, 'lastSize': 381, 'turnover': 35115203555, 'homeNotional': 10387.817714882409, 'foreignNotional': 4087097.2148759607}] 2020-08-23 07:00:20 INFO: skip by found empty buckets 2020-08-23 07:00:20 INFO: check need new order None 2020-08-23 07:00:20 INFO: init new order end 2020-08-23 07:00:20 INFO: 2020-08-23 07:00:20 INFO: 2020-08-23 07:00:20 INFO: 2020-08-23 07:00:20 INFO: 2020-08-23 07:02:00 INFO: 2020-08-23 07:02:00 INFO: 2020-08-23 07:02:00 INFO: 2020-08-23 07:02:00 INFO: 2020-08-23 07:02:00 INFO: clearing start 2020-08-23 07:02:00 INFO: clearing end 2020-08-23 07:02:00 INFO: 2020-08-23 07:02:00 INFO: 2020-08-23 07:02:00 INFO: 2020-08-23 07:02:00 INFO: 2020-08-23 08:00:20 INFO: 2020-08-23 08:00:20 INFO: 2020-08-23 08:00:20 INFO: 2020-08-23 08:00:20 INFO: 2020-08-23 08:00:20 INFO: init new order start 2020-08-23 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 23, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 390.4, 'high': 390.8, 'low': 388.8, 'close': 389.55, 'trades': 2111, 'volume': 1342524, 'vwap': 389.78, 'lastSize': 446, 'turnover': 52328814425, 'homeNotional': 15577.575823082441, 'foreignNotional': 6071819.442697511}, {'timestamp': datetime.datetime(2020, 8, 23, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.5, 'high': 392.25, 'low': 389.3, 'close': 390.4, 'trades': 2269, 'volume': 1238904, 'vwap': 390.55, 'lastSize': 146, 'turnover': 48385226915, 'homeNotional': 14379.753968929452, 'foreignNotional': 5615999.5780921485}, {'timestamp': datetime.datetime(2020, 8, 23, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.9, 'high': 394.1, 'low': 390.6, 'close': 391.5, 'trades': 2209, 'volume': 1280241, 'vwap': 392.18, 'lastSize': 499, 'turnover': 50208364090, 'homeNotional': 14886.867196751553, 'foreignNotional': 5838328.509352804}] 2020-08-23 08:00:20 INFO: prepare candles [CandleItem(low=388.8, high=390.8, open=390.4, close=389.55, color='RED'), CandleItem(low=389.3, high=392.25, open=391.5, close=390.4, color='RED'), CandleItem(low=390.6, high=394.1, open=393.9, close=391.5, color='RED')] 2020-08-23 08:00:20 INFO: skip by colors first_candle=CandleItem(low=390.6, high=394.1, open=393.9, close=391.5, color='RED') second_candle=CandleItem(low=389.3, high=392.25, open=391.5, close=390.4, color='RED') last_candle=CandleItem(low=388.8, high=390.8, open=390.4, close=389.55, color='RED') 2020-08-23 08:00:20 INFO: check need new order None 2020-08-23 08:00:20 INFO: init new order end 2020-08-23 08:00:20 INFO: 2020-08-23 08:00:20 INFO: 2020-08-23 08:00:20 INFO: 2020-08-23 08:00:20 INFO: 2020-08-23 08:02:00 INFO: 2020-08-23 08:02:00 INFO: 2020-08-23 08:02:00 INFO: 2020-08-23 08:02:00 INFO: 2020-08-23 08:02:00 INFO: clearing start 2020-08-23 08:02:00 INFO: clearing end 2020-08-23 08:02:00 INFO: 2020-08-23 08:02:00 INFO: 2020-08-23 08:02:00 INFO: 2020-08-23 08:02:00 INFO: 2020-08-23 09:00:20 INFO: 2020-08-23 09:00:20 INFO: 2020-08-23 09:00:20 INFO: 2020-08-23 09:00:20 INFO: 2020-08-23 09:00:20 INFO: init new order start 2020-08-23 09:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 23, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.55, 'high': 389.85, 'low': 387.8, 'close': 389.25, 'trades': 2563, 'volume': 1606906, 'vwap': 388.75, 'lastSize': 199, 'turnover': 62466954060, 'homeNotional': 18608.783257295956, 'foreignNotional': 7233994.341654292}, {'timestamp': datetime.datetime(2020, 8, 23, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 390.4, 'high': 390.8, 'low': 388.8, 'close': 389.55, 'trades': 2111, 'volume': 1342524, 'vwap': 389.78, 'lastSize': 446, 'turnover': 52328814425, 'homeNotional': 15577.575823082441, 'foreignNotional': 6071819.442697511}, {'timestamp': datetime.datetime(2020, 8, 23, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.5, 'high': 392.25, 'low': 389.3, 'close': 390.4, 'trades': 2269, 'volume': 1238904, 'vwap': 390.55, 'lastSize': 146, 'turnover': 48385226915, 'homeNotional': 14379.753968929452, 'foreignNotional': 5615999.5780921485}] 2020-08-23 09:00:20 INFO: prepare candles [CandleItem(low=387.8, high=389.85, open=389.55, close=389.25, color='RED'), CandleItem(low=388.8, high=390.8, open=390.4, close=389.55, color='RED'), CandleItem(low=389.3, high=392.25, open=391.5, close=390.4, color='RED')] 2020-08-23 09:00:20 INFO: skip by colors first_candle=CandleItem(low=389.3, high=392.25, open=391.5, close=390.4, color='RED') second_candle=CandleItem(low=388.8, high=390.8, open=390.4, close=389.55, color='RED') last_candle=CandleItem(low=387.8, high=389.85, open=389.55, close=389.25, color='RED') 2020-08-23 09:00:20 INFO: check need new order None 2020-08-23 09:00:20 INFO: init new order end 2020-08-23 09:00:20 INFO: 2020-08-23 09:00:20 INFO: 2020-08-23 09:00:20 INFO: 2020-08-23 09:00:20 INFO: 2020-08-23 09:02:00 INFO: 2020-08-23 09:02:00 INFO: 2020-08-23 09:02:00 INFO: 2020-08-23 09:02:00 INFO: 2020-08-23 09:02:00 INFO: clearing start 2020-08-23 09:02:00 INFO: clearing end 2020-08-23 09:02:00 INFO: 2020-08-23 09:02:00 INFO: 2020-08-23 09:02:00 INFO: 2020-08-23 09:02:00 INFO: 2020-08-23 10:00:20 INFO: 2020-08-23 10:00:20 INFO: 2020-08-23 10:00:20 INFO: 2020-08-23 10:00:20 INFO: 2020-08-23 10:00:20 INFO: init new order start 2020-08-23 10:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 23, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.25, 'high': 392.6, 'low': 388.9, 'close': 391.95, 'trades': 3113, 'volume': 1800483, 'vwap': 391.24, 'lastSize': 530, 'turnover': 70441789620, 'homeNotional': 20878.76542158368, 'foreignNotional': 8168586.7228601305}, {'timestamp': datetime.datetime(2020, 8, 23, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.55, 'high': 389.85, 'low': 387.8, 'close': 389.25, 'trades': 2563, 'volume': 1606906, 'vwap': 388.75, 'lastSize': 199, 'turnover': 62466954060, 'homeNotional': 18608.783257295956, 'foreignNotional': 7233994.341654292}, {'timestamp': datetime.datetime(2020, 8, 23, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 390.4, 'high': 390.8, 'low': 388.8, 'close': 389.55, 'trades': 2111, 'volume': 1342524, 'vwap': 389.78, 'lastSize': 446, 'turnover': 52328814425, 'homeNotional': 15577.575823082441, 'foreignNotional': 6071819.442697511}] 2020-08-23 10:00:20 INFO: prepare candles [CandleItem(low=388.9, high=392.6, open=389.25, close=391.95, color='GREEN'), CandleItem(low=387.8, high=389.85, open=389.55, close=389.25, color='RED'), CandleItem(low=388.8, high=390.8, open=390.4, close=389.55, color='RED')] 2020-08-23 10:00:20 INFO: last_candle=CandleItem(low=388.9, high=392.6, open=389.25, close=391.95, color='GREEN') 2020-08-23 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-23 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=388.9, high=392.6, open=389.25, close=391.95, color='GREEN') 2020-08-23 10:00:20 INFO: skip by CandleItem(low=388.9, high=392.6, open=389.25, close=391.95, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-23 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-08-23 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=388.9, high=392.6, open=389.25, close=391.95, color='GREEN') 2020-08-23 10:00:20 INFO: skip by CandleItem(low=388.9, high=392.6, open=389.25, close=391.95, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-23 10:00:20 INFO: not found applicable config for candle 2020-08-23 10:00:20 INFO: check need new order None 2020-08-23 10:00:20 INFO: init new order end 2020-08-23 10:00:20 INFO: 2020-08-23 10:00:20 INFO: 2020-08-23 10:00:20 INFO: 2020-08-23 10:00:20 INFO: 2020-08-23 10:02:00 INFO: 2020-08-23 10:02:00 INFO: 2020-08-23 10:02:00 INFO: 2020-08-23 10:02:00 INFO: 2020-08-23 10:02:00 INFO: clearing start 2020-08-23 10:02:00 INFO: clearing end 2020-08-23 10:02:00 INFO: 2020-08-23 10:02:00 INFO: 2020-08-23 10:02:00 INFO: 2020-08-23 10:02:00 INFO: 2020-08-23 11:00:20 INFO: 2020-08-23 11:00:20 INFO: 2020-08-23 11:00:20 INFO: 2020-08-23 11:00:20 INFO: 2020-08-23 11:00:20 INFO: init new order start 2020-08-23 11:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 23, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.95, 'high': 392.45, 'low': 390.9, 'close': 391.2, 'trades': 1676, 'volume': 848279, 'vwap': 391.71, 'lastSize': 10, 'turnover': 33227851080, 'homeNotional': 9853.356734501795, 'foreignNotional': 3859648.99306016}, {'timestamp': datetime.datetime(2020, 8, 23, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.25, 'high': 392.6, 'low': 388.9, 'close': 391.95, 'trades': 3113, 'volume': 1800483, 'vwap': 391.24, 'lastSize': 530, 'turnover': 70441789620, 'homeNotional': 20878.76542158368, 'foreignNotional': 8168586.7228601305}, {'timestamp': datetime.datetime(2020, 8, 23, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.55, 'high': 389.85, 'low': 387.8, 'close': 389.25, 'trades': 2563, 'volume': 1606906, 'vwap': 388.75, 'lastSize': 199, 'turnover': 62466954060, 'homeNotional': 18608.783257295956, 'foreignNotional': 7233994.341654292}] 2020-08-23 11:00:20 INFO: prepare candles [CandleItem(low=390.9, high=392.45, open=391.95, close=391.2, color='RED'), CandleItem(low=388.9, high=392.6, open=389.25, close=391.95, color='GREEN'), CandleItem(low=387.8, high=389.85, open=389.55, close=389.25, color='RED')] 2020-08-23 11:00:20 INFO: skip by colors first_candle=CandleItem(low=387.8, high=389.85, open=389.55, close=389.25, color='RED') second_candle=CandleItem(low=388.9, high=392.6, open=389.25, close=391.95, color='GREEN') last_candle=CandleItem(low=390.9, high=392.45, open=391.95, close=391.2, color='RED') 2020-08-23 11:00:20 INFO: check need new order None 2020-08-23 11:00:20 INFO: init new order end 2020-08-23 11:00:20 INFO: 2020-08-23 11:00:20 INFO: 2020-08-23 11:00:20 INFO: 2020-08-23 11:00:20 INFO: 2020-08-23 11:02:00 INFO: 2020-08-23 11:02:00 INFO: 2020-08-23 11:02:00 INFO: 2020-08-23 11:02:00 INFO: 2020-08-23 11:02:00 INFO: clearing start 2020-08-23 11:02:01 INFO: clearing end 2020-08-23 11:02:01 INFO: 2020-08-23 11:02:01 INFO: 2020-08-23 11:02:01 INFO: 2020-08-23 11:02:01 INFO: 2020-08-23 12:00:20 INFO: 2020-08-23 12:00:20 INFO: 2020-08-23 12:00:20 INFO: 2020-08-23 12:00:20 INFO: 2020-08-23 12:00:20 INFO: init new order start 2020-08-23 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 23, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.2, 'high': 391.6, 'low': 389.0, 'close': 389.35, 'trades': 2181, 'volume': 1502525, 'vwap': 389.75, 'lastSize': 322, 'turnover': 58560253955, 'homeNotional': 17413.68495516184, 'foreignNotional': 6786915.112165854}, {'timestamp': datetime.datetime(2020, 8, 23, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.95, 'high': 392.45, 'low': 390.9, 'close': 391.2, 'trades': 1676, 'volume': 848279, 'vwap': 391.71, 'lastSize': 10, 'turnover': 33227851080, 'homeNotional': 9853.356734501795, 'foreignNotional': 3859648.99306016}, {'timestamp': datetime.datetime(2020, 8, 23, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.25, 'high': 392.6, 'low': 388.9, 'close': 391.95, 'trades': 3113, 'volume': 1800483, 'vwap': 391.24, 'lastSize': 530, 'turnover': 70441789620, 'homeNotional': 20878.76542158368, 'foreignNotional': 8168586.7228601305}] 2020-08-23 12:00:20 INFO: prepare candles [CandleItem(low=389.0, high=391.6, open=391.2, close=389.35, color='RED'), CandleItem(low=390.9, high=392.45, open=391.95, close=391.2, color='RED'), CandleItem(low=388.9, high=392.6, open=389.25, close=391.95, color='GREEN')] 2020-08-23 12:00:20 INFO: skip by colors first_candle=CandleItem(low=388.9, high=392.6, open=389.25, close=391.95, color='GREEN') second_candle=CandleItem(low=390.9, high=392.45, open=391.95, close=391.2, color='RED') last_candle=CandleItem(low=389.0, high=391.6, open=391.2, close=389.35, color='RED') 2020-08-23 12:00:20 INFO: check need new order None 2020-08-23 12:00:20 INFO: init new order end 2020-08-23 12:00:20 INFO: 2020-08-23 12:00:20 INFO: 2020-08-23 12:00:20 INFO: 2020-08-23 12:00:20 INFO: 2020-08-23 12:02:00 INFO: 2020-08-23 12:02:00 INFO: 2020-08-23 12:02:00 INFO: 2020-08-23 12:02:00 INFO: 2020-08-23 12:02:00 INFO: clearing start 2020-08-23 12:02:00 INFO: clearing end 2020-08-23 12:02:00 INFO: 2020-08-23 12:02:00 INFO: 2020-08-23 12:02:00 INFO: 2020-08-23 12:02:00 INFO: 2020-08-23 13:00:20 INFO: 2020-08-23 13:00:20 INFO: 2020-08-23 13:00:20 INFO: 2020-08-23 13:00:20 INFO: 2020-08-23 13:00:20 INFO: init new order start 2020-08-23 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 23, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.35, 'high': 391.0, 'low': 388.9, 'close': 390.2, 'trades': 1785, 'volume': 1185884, 'vwap': 390.29, 'lastSize': 13, 'turnover': 46283634845, 'homeNotional': 13747.822868209241, 'foreignNotional': 5365615.743524275}, {'timestamp': datetime.datetime(2020, 8, 23, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.2, 'high': 391.6, 'low': 389.0, 'close': 389.35, 'trades': 2181, 'volume': 1502525, 'vwap': 389.75, 'lastSize': 322, 'turnover': 58560253955, 'homeNotional': 17413.68495516184, 'foreignNotional': 6786915.112165854}, {'timestamp': datetime.datetime(2020, 8, 23, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.95, 'high': 392.45, 'low': 390.9, 'close': 391.2, 'trades': 1676, 'volume': 848279, 'vwap': 391.71, 'lastSize': 10, 'turnover': 33227851080, 'homeNotional': 9853.356734501795, 'foreignNotional': 3859648.99306016}] 2020-08-23 13:00:20 INFO: prepare candles [CandleItem(low=388.9, high=391.0, open=389.35, close=390.2, color='GREEN'), CandleItem(low=389.0, high=391.6, open=391.2, close=389.35, color='RED'), CandleItem(low=390.9, high=392.45, open=391.95, close=391.2, color='RED')] 2020-08-23 13:00:20 INFO: last_candle=CandleItem(low=388.9, high=391.0, open=389.35, close=390.2, color='GREEN') 2020-08-23 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-23 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=388.9, high=391.0, open=389.35, close=390.2, color='GREEN') 2020-08-23 13:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=389.0, high=391.6, open=391.2, close=389.35, color='RED') 2020-08-23 13:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=390.9, high=392.45, open=391.95, close=391.2, color='RED') 2020-08-23 13:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=388.9, high=391.0, open=389.35, close=390.2, color='GREEN'), take_profit_factor=6.0, clearing_interval=3600) 2020-08-23 13:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=388.9, high=391.0, open=389.35, close=390.2, color='GREEN'), take_profit_factor=6.0, clearing_interval=3600) 2020-08-23 13:00:20 INFO: place order: start candle=CandleItem(low=388.9, high=391.0, open=389.35, close=390.2, color='GREEN') ticker='ETHUSD' price_offset=0.1 2020-08-23 13:00:20 INFO: place order: side_factor=-1 init_trigger_price=391.05 init_order_price=391.1 stop_price_offset=0.0 candle.size=2.1000000000000227 stop_price=388.9 take_price=403.70000000000016 2020-08-23 13:00:20 INFO: place order round: side_factor=-1 init_trigger_price=Decimal('391.05000000000001136868377216160297393798828125') init_order_price=Decimal('391.1000000000000227373675443232059478759765625') stop_price_offset=0.0 candle.size=2.1000000000000227 stop_price=Decimal('388.8999999999999772626324556767940521240234375') take_price=Decimal('403.7000000000001591615728102624416351318359375') 2020-08-23 13:00:20 INFO: place order: compute qty=884 2020-08-23 13:00:20 INFO: place order: save order to db 5bd8cdb3fbf54f808d564b114c60dae4; response=True 2020-08-23 13:00:20 INFO: post order to exchange resp={'orderID': 'f1e8294c-13c8-ee79-eaf7-940d13ac7c16', 'clOrdID': '5bd8cdb3fbf54f808d564b114c60dae4', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 884, 'price': 391.1, 'displayQty': None, 'stopPx': 391.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': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 23, 10, 0, 20, 948000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 23, 10, 0, 20, 948000, tzinfo=tzutc())} 2020-08-23 13:00:20 INFO: place new init order {'qty': 884, 'init_price': Decimal('391.05000000000001136868377216160297393798828125'), 'stop_price': Decimal('388.8999999999999772626324556767940521240234375'), 'take_price': Decimal('403.7000000000001591615728102624416351318359375'), 'order_uid': '5bd8cdb3fbf54f808d564b114c60dae4', 'response': {'orderID': 'f1e8294c-13c8-ee79-eaf7-940d13ac7c16', 'clOrdID': '5bd8cdb3fbf54f808d564b114c60dae4', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 884, 'price': 391.1, 'displayQty': None, 'stopPx': 391.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': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 23, 10, 0, 20, 948000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 23, 10, 0, 20, 948000, tzinfo=tzutc())}} 2020-08-23 13:00:20 INFO: init new order end 2020-08-23 13:00:20 INFO: 2020-08-23 13:00:20 INFO: 2020-08-23 13:00:20 INFO: 2020-08-23 13:00:20 INFO: 2020-08-23 13:00:21 INFO: process event {'orderID': 'f1e8294c-13c8-ee79-eaf7-940d13ac7c16', 'clOrdID': '5bd8cdb3fbf54f808d564b114c60dae4', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 884, 'price': 391.1, 'displayQty': None, 'stopPx': 391.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': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-08-23T10:00:20.948Z', 'timestamp': '2020-08-23T10:00:20.948Z'} 2020-08-23 13:00:21 INFO: skip event 5bd8cdb3fbf54f808d564b114c60dae4 New 2020-08-23 13:02:00 INFO: 2020-08-23 13:02:00 INFO: 2020-08-23 13:02:00 INFO: 2020-08-23 13:02:00 INFO: 2020-08-23 13:02:00 INFO: clearing start 2020-08-23 13:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f1e8294c-13c8-ee79-eaf7-940d13ac7c16', 'clOrdID': '5bd8cdb3fbf54f808d564b114c60dae4', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 884, 'price': 391.1, 'displayQty': None, 'stopPx': 391.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': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 23, 10, 0, 20, 948000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 23, 10, 0, 20, 948000, tzinfo=tzutc())} 2020-08-23 13:02:00 INFO: order time=2020-08-23 10:00:20.948000+00:00; delta from now UTC=0:01:39.219485 time_delta.total_seconds()=99.219485; time_diff_offset='3600' 2020-08-23 13:02:00 INFO: skip by time diff 2020-08-23 10:00:20.948000+00:00 2020-08-23 13:02:00 INFO: clearing end 2020-08-23 13:02:00 INFO: 2020-08-23 13:02:00 INFO: 2020-08-23 13:02:00 INFO: 2020-08-23 13:02:00 INFO: 2020-08-23 14:00:20 INFO: 2020-08-23 14:00:20 INFO: 2020-08-23 14:00:20 INFO: 2020-08-23 14:00:20 INFO: 2020-08-23 14:00:20 INFO: init new order start 2020-08-23 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 23, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 390.2, 'high': 390.15, 'low': 386.15, 'close': 386.85, 'trades': 3483, 'volume': 2641261, 'vwap': 387.96, 'lastSize': 3000, 'turnover': 102469712240, 'homeNotional': 30508.51151967164, 'foreignNotional': 11836048.549705572}, {'timestamp': datetime.datetime(2020, 8, 23, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.35, 'high': 391.0, 'low': 388.9, 'close': 390.2, 'trades': 1785, 'volume': 1185884, 'vwap': 390.29, 'lastSize': 13, 'turnover': 46283634845, 'homeNotional': 13747.822868209241, 'foreignNotional': 5365615.743524275}, {'timestamp': datetime.datetime(2020, 8, 23, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.2, 'high': 391.6, 'low': 389.0, 'close': 389.35, 'trades': 2181, 'volume': 1502525, 'vwap': 389.75, 'lastSize': 322, 'turnover': 58560253955, 'homeNotional': 17413.68495516184, 'foreignNotional': 6786915.112165854}] 2020-08-23 14:00:20 INFO: prepare candles [CandleItem(low=386.15, high=390.15, open=390.2, close=386.85, color='RED'), CandleItem(low=388.9, high=391.0, open=389.35, close=390.2, color='GREEN'), CandleItem(low=389.0, high=391.6, open=391.2, close=389.35, color='RED')] 2020-08-23 14:00:20 INFO: skip by colors first_candle=CandleItem(low=389.0, high=391.6, open=391.2, close=389.35, color='RED') second_candle=CandleItem(low=388.9, high=391.0, open=389.35, close=390.2, color='GREEN') last_candle=CandleItem(low=386.15, high=390.15, open=390.2, close=386.85, color='RED') 2020-08-23 14:00:20 INFO: check need new order None 2020-08-23 14:00:20 INFO: init new order end 2020-08-23 14:00:20 INFO: 2020-08-23 14:00:20 INFO: 2020-08-23 14:00:20 INFO: 2020-08-23 14:00:20 INFO: 2020-08-23 14:02:00 INFO: 2020-08-23 14:02:00 INFO: 2020-08-23 14:02:00 INFO: 2020-08-23 14:02:00 INFO: 2020-08-23 14:02:00 INFO: clearing start 2020-08-23 14:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'f1e8294c-13c8-ee79-eaf7-940d13ac7c16', 'clOrdID': '5bd8cdb3fbf54f808d564b114c60dae4', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 884, 'price': 391.1, 'displayQty': None, 'stopPx': 391.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': 884, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 23, 10, 0, 20, 948000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 23, 10, 0, 20, 948000, tzinfo=tzutc())} 2020-08-23 14:02:00 INFO: order time=2020-08-23 10:00:20.948000+00:00; delta from now UTC=1:01:39.857815 time_delta.total_seconds()=3699.857815; time_diff_offset='3600' 2020-08-23 14:02:00 INFO: clear order 5bd8cdb3fbf54f808d564b114c60dae4 2020-08-23 14:02:00 INFO: cancel order resp=[{'orderID': 'f1e8294c-13c8-ee79-eaf7-940d13ac7c16', 'clOrdID': '5bd8cdb3fbf54f808d564b114c60dae4', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 884, 'price': 391.1, 'displayQty': None, 'stopPx': 391.05, '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, 8, 23, 10, 0, 20, 948000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 23, 11, 2, 0, 834000, tzinfo=tzutc())}] 2020-08-23 14:02:00 INFO: clearing end 2020-08-23 14:02:00 INFO: 2020-08-23 14:02:00 INFO: 2020-08-23 14:02:00 INFO: 2020-08-23 14:02:00 INFO: 2020-08-23 14:02:01 INFO: process event {'orderID': 'f1e8294c-13c8-ee79-eaf7-940d13ac7c16', 'ordStatus': 'Canceled', 'leavesQty': 0, 'text': 'Canceled: cancelled by clearing\nInit order by supervisor.py', 'timestamp': '2020-08-23T11:02:00.834Z', 'clOrdID': '5bd8cdb3fbf54f808d564b114c60dae4', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-23 14:02:01 INFO: skip event 5bd8cdb3fbf54f808d564b114c60dae4 Canceled 2020-08-23 15:00:20 INFO: 2020-08-23 15:00:20 INFO: 2020-08-23 15:00:20 INFO: 2020-08-23 15:00:20 INFO: 2020-08-23 15:00:20 INFO: init new order start 2020-08-23 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 23, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.85, 'high': 388.65, 'low': 384.2, 'close': 384.8, 'trades': 4030, 'volume': 2711787, 'vwap': 386.57, 'lastSize': 13, 'turnover': 104828574145, 'homeNotional': 31296.19229833345, 'foreignNotional': 12098068.199951887}, {'timestamp': datetime.datetime(2020, 8, 23, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 390.2, 'high': 390.15, 'low': 386.15, 'close': 386.85, 'trades': 3483, 'volume': 2641261, 'vwap': 387.96, 'lastSize': 3000, 'turnover': 102469712240, 'homeNotional': 30508.51151967164, 'foreignNotional': 11836048.549705572}, {'timestamp': datetime.datetime(2020, 8, 23, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.35, 'high': 391.0, 'low': 388.9, 'close': 390.2, 'trades': 1785, 'volume': 1185884, 'vwap': 390.29, 'lastSize': 13, 'turnover': 46283634845, 'homeNotional': 13747.822868209241, 'foreignNotional': 5365615.743524275}] 2020-08-23 15:00:20 INFO: prepare candles [CandleItem(low=384.2, high=388.65, open=386.85, close=384.8, color='RED'), CandleItem(low=386.15, high=390.15, open=390.2, close=386.85, color='RED'), CandleItem(low=388.9, high=391.0, open=389.35, close=390.2, color='GREEN')] 2020-08-23 15:00:20 INFO: skip by colors first_candle=CandleItem(low=388.9, high=391.0, open=389.35, close=390.2, color='GREEN') second_candle=CandleItem(low=386.15, high=390.15, open=390.2, close=386.85, color='RED') last_candle=CandleItem(low=384.2, high=388.65, open=386.85, close=384.8, color='RED') 2020-08-23 15:00:20 INFO: check need new order None 2020-08-23 15:00:20 INFO: init new order end 2020-08-23 15:00:20 INFO: 2020-08-23 15:00:20 INFO: 2020-08-23 15:00:20 INFO: 2020-08-23 15:00:20 INFO: 2020-08-23 15:02:00 INFO: 2020-08-23 15:02:00 INFO: 2020-08-23 15:02:00 INFO: 2020-08-23 15:02:00 INFO: 2020-08-23 15:02:00 INFO: clearing start 2020-08-23 15:02:00 INFO: clearing end 2020-08-23 15:02:00 INFO: 2020-08-23 15:02:00 INFO: 2020-08-23 15:02:00 INFO: 2020-08-23 15:02:00 INFO: 2020-08-23 16:00:20 INFO: 2020-08-23 16:00:20 INFO: 2020-08-23 16:00:20 INFO: 2020-08-23 16:00:20 INFO: 2020-08-23 16:00:20 INFO: init new order start 2020-08-23 16:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 23, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.8, 'high': 387.55, 'low': 384.2, 'close': 387.45, 'trades': 3163, 'volume': 2050186, 'vwap': 385.96, 'lastSize': 12, 'turnover': 79127861535, 'homeNotional': 23682.846561702878, 'foreignNotional': 9140513.849468961}, {'timestamp': datetime.datetime(2020, 8, 23, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.85, 'high': 388.65, 'low': 384.2, 'close': 384.8, 'trades': 4030, 'volume': 2711787, 'vwap': 386.57, 'lastSize': 13, 'turnover': 104828574145, 'homeNotional': 31296.19229833345, 'foreignNotional': 12098068.199951887}, {'timestamp': datetime.datetime(2020, 8, 23, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 390.2, 'high': 390.15, 'low': 386.15, 'close': 386.85, 'trades': 3483, 'volume': 2641261, 'vwap': 387.96, 'lastSize': 3000, 'turnover': 102469712240, 'homeNotional': 30508.51151967164, 'foreignNotional': 11836048.549705572}] 2020-08-23 16:00:20 INFO: prepare candles [CandleItem(low=384.2, high=387.55, open=384.8, close=387.45, color='GREEN'), CandleItem(low=384.2, high=388.65, open=386.85, close=384.8, color='RED'), CandleItem(low=386.15, high=390.15, open=390.2, close=386.85, color='RED')] 2020-08-23 16:00:20 INFO: last_candle=CandleItem(low=384.2, high=387.55, open=384.8, close=387.45, color='GREEN') 2020-08-23 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-08-23 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=384.2, high=387.55, open=384.8, close=387.45, color='GREEN') 2020-08-23 16:00:20 INFO: skip by CandleItem(low=384.2, high=387.55, open=384.8, close=387.45, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-23 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-08-23 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=384.2, high=387.55, open=384.8, close=387.45, color='GREEN') 2020-08-23 16:00:20 INFO: skip by CandleItem(low=384.2, high=387.55, open=384.8, close=387.45, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-23 16:00:20 INFO: not found applicable config for candle 2020-08-23 16:00:20 INFO: check need new order None 2020-08-23 16:00:20 INFO: init new order end 2020-08-23 16:00:20 INFO: 2020-08-23 16:00:20 INFO: 2020-08-23 16:00:20 INFO: 2020-08-23 16:00:20 INFO: 2020-08-23 16:02:00 INFO: 2020-08-23 16:02:00 INFO: 2020-08-23 16:02:00 INFO: 2020-08-23 16:02:00 INFO: 2020-08-23 16:02:00 INFO: clearing start 2020-08-23 16:02:01 INFO: clearing end 2020-08-23 16:02:01 INFO: 2020-08-23 16:02:01 INFO: 2020-08-23 16:02:01 INFO: 2020-08-23 16:02:01 INFO: 2020-08-23 17:00:20 INFO: 2020-08-23 17:00:20 INFO: 2020-08-23 17:00:20 INFO: 2020-08-23 17:00:20 INFO: 2020-08-23 17:00:20 INFO: init new order start 2020-08-23 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 23, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.45, 'high': 392.85, 'low': 386.1, 'close': 389.35, 'trades': 6705, 'volume': 4429781, 'vwap': 389.73, 'lastSize': 600, 'turnover': 172638391235, 'homeNotional': 51417.27971227904, 'foreignNotional': 20038685.9113709}, {'timestamp': datetime.datetime(2020, 8, 23, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.8, 'high': 387.55, 'low': 384.2, 'close': 387.45, 'trades': 3163, 'volume': 2050186, 'vwap': 385.96, 'lastSize': 12, 'turnover': 79127861535, 'homeNotional': 23682.846561702878, 'foreignNotional': 9140513.849468961}, {'timestamp': datetime.datetime(2020, 8, 23, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.85, 'high': 388.65, 'low': 384.2, 'close': 384.8, 'trades': 4030, 'volume': 2711787, 'vwap': 386.57, 'lastSize': 13, 'turnover': 104828574145, 'homeNotional': 31296.19229833345, 'foreignNotional': 12098068.199951887}] 2020-08-23 17:00:20 INFO: prepare candles [CandleItem(low=386.1, high=392.85, open=387.45, close=389.35, color='GREEN'), CandleItem(low=384.2, high=387.55, open=384.8, close=387.45, color='GREEN'), CandleItem(low=384.2, high=388.65, open=386.85, close=384.8, color='RED')] 2020-08-23 17:00:20 INFO: skip by colors first_candle=CandleItem(low=384.2, high=388.65, open=386.85, close=384.8, color='RED') second_candle=CandleItem(low=384.2, high=387.55, open=384.8, close=387.45, color='GREEN') last_candle=CandleItem(low=386.1, high=392.85, open=387.45, close=389.35, color='GREEN') 2020-08-23 17:00:20 INFO: check need new order None 2020-08-23 17:00:20 INFO: init new order end 2020-08-23 17:00:20 INFO: 2020-08-23 17:00:20 INFO: 2020-08-23 17:00:20 INFO: 2020-08-23 17:00:20 INFO: 2020-08-23 17:02:00 INFO: 2020-08-23 17:02:00 INFO: 2020-08-23 17:02:00 INFO: 2020-08-23 17:02:00 INFO: 2020-08-23 17:02:00 INFO: clearing start 2020-08-23 17:02:00 INFO: clearing end 2020-08-23 17:02:00 INFO: 2020-08-23 17:02:00 INFO: 2020-08-23 17:02:00 INFO: 2020-08-23 17:02:00 INFO: 2020-08-23 18:00:20 INFO: 2020-08-23 18:00:20 INFO: 2020-08-23 18:00:20 INFO: 2020-08-23 18:00:20 INFO: 2020-08-23 18:00:20 INFO: init new order start 2020-08-23 18:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 23, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.35, 'high': 390.45, 'low': 388.7, 'close': 390.45, 'trades': 2217, 'volume': 1552572, 'vwap': 389.45, 'lastSize': 13, 'turnover': 60464392220, 'homeNotional': 18028.984371032842, 'foreignNotional': 7021329.166051132}, {'timestamp': datetime.datetime(2020, 8, 23, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.45, 'high': 392.85, 'low': 386.1, 'close': 389.35, 'trades': 6705, 'volume': 4429781, 'vwap': 389.73, 'lastSize': 600, 'turnover': 172638391235, 'homeNotional': 51417.27971227904, 'foreignNotional': 20038685.9113709}, {'timestamp': datetime.datetime(2020, 8, 23, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.8, 'high': 387.55, 'low': 384.2, 'close': 387.45, 'trades': 3163, 'volume': 2050186, 'vwap': 385.96, 'lastSize': 12, 'turnover': 79127861535, 'homeNotional': 23682.846561702878, 'foreignNotional': 9140513.849468961}] 2020-08-23 18:00:20 INFO: prepare candles [CandleItem(low=388.7, high=390.45, open=389.35, close=390.45, color='GREEN'), CandleItem(low=386.1, high=392.85, open=387.45, close=389.35, color='GREEN'), CandleItem(low=384.2, high=387.55, open=384.8, close=387.45, color='GREEN')] 2020-08-23 18:00:20 INFO: skip by colors first_candle=CandleItem(low=384.2, high=387.55, open=384.8, close=387.45, color='GREEN') second_candle=CandleItem(low=386.1, high=392.85, open=387.45, close=389.35, color='GREEN') last_candle=CandleItem(low=388.7, high=390.45, open=389.35, close=390.45, color='GREEN') 2020-08-23 18:00:20 INFO: check need new order None 2020-08-23 18:00:20 INFO: init new order end 2020-08-23 18:00:20 INFO: 2020-08-23 18:00:20 INFO: 2020-08-23 18:00:20 INFO: 2020-08-23 18:00:20 INFO: 2020-08-23 18:02:00 INFO: 2020-08-23 18:02:00 INFO: 2020-08-23 18:02:00 INFO: 2020-08-23 18:02:00 INFO: 2020-08-23 18:02:00 INFO: clearing start 2020-08-23 18:02:00 INFO: clearing end 2020-08-23 18:02:00 INFO: 2020-08-23 18:02:00 INFO: 2020-08-23 18:02:00 INFO: 2020-08-23 18:02:00 INFO: 2020-08-23 19:00:20 INFO: 2020-08-23 19:00:20 INFO: 2020-08-23 19:00:20 INFO: 2020-08-23 19:00:20 INFO: 2020-08-23 19:00:20 INFO: init new order start 2020-08-23 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 23, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 390.45, 'high': 393.45, 'low': 389.75, 'close': 393.0, 'trades': 3830, 'volume': 2212237, 'vwap': 391.7, 'lastSize': 12, 'turnover': 86653278735, 'homeNotional': 25748.463200435497, 'foreignNotional': 10085679.1484783}, {'timestamp': datetime.datetime(2020, 8, 23, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.35, 'high': 390.45, 'low': 388.7, 'close': 390.45, 'trades': 2217, 'volume': 1552572, 'vwap': 389.45, 'lastSize': 13, 'turnover': 60464392220, 'homeNotional': 18028.984371032842, 'foreignNotional': 7021329.166051132}, {'timestamp': datetime.datetime(2020, 8, 23, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.45, 'high': 392.85, 'low': 386.1, 'close': 389.35, 'trades': 6705, 'volume': 4429781, 'vwap': 389.73, 'lastSize': 600, 'turnover': 172638391235, 'homeNotional': 51417.27971227904, 'foreignNotional': 20038685.9113709}] 2020-08-23 19:00:20 INFO: prepare candles [CandleItem(low=389.75, high=393.45, open=390.45, close=393.0, color='GREEN'), CandleItem(low=388.7, high=390.45, open=389.35, close=390.45, color='GREEN'), CandleItem(low=386.1, high=392.85, open=387.45, close=389.35, color='GREEN')] 2020-08-23 19:00:20 INFO: skip by colors first_candle=CandleItem(low=386.1, high=392.85, open=387.45, close=389.35, color='GREEN') second_candle=CandleItem(low=388.7, high=390.45, open=389.35, close=390.45, color='GREEN') last_candle=CandleItem(low=389.75, high=393.45, open=390.45, close=393.0, color='GREEN') 2020-08-23 19:00:20 INFO: check need new order None 2020-08-23 19:00:20 INFO: init new order end 2020-08-23 19:00:20 INFO: 2020-08-23 19:00:20 INFO: 2020-08-23 19:00:20 INFO: 2020-08-23 19:00:20 INFO: 2020-08-23 19:02:00 INFO: 2020-08-23 19:02:00 INFO: 2020-08-23 19:02:00 INFO: 2020-08-23 19:02:00 INFO: 2020-08-23 19:02:00 INFO: clearing start 2020-08-23 19:02:00 INFO: clearing end 2020-08-23 19:02:00 INFO: 2020-08-23 19:02:00 INFO: 2020-08-23 19:02:00 INFO: 2020-08-23 19:02:00 INFO: 2020-08-23 20:00:20 INFO: 2020-08-23 20:00:20 INFO: 2020-08-23 20:00:20 INFO: 2020-08-23 20:00:20 INFO: 2020-08-23 20:00:20 INFO: init new order start 2020-08-23 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 23, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.0, 'high': 393.25, 'low': 389.9, 'close': 390.3, 'trades': 2739, 'volume': 1253057, 'vwap': 391.71, 'lastSize': 13, 'turnover': 49082651975, 'homeNotional': 14586.43070354684, 'foreignNotional': 5713560.515442096}, {'timestamp': datetime.datetime(2020, 8, 23, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 390.45, 'high': 393.45, 'low': 389.75, 'close': 393.0, 'trades': 3830, 'volume': 2212237, 'vwap': 391.7, 'lastSize': 12, 'turnover': 86653278735, 'homeNotional': 25748.463200435497, 'foreignNotional': 10085679.1484783}, {'timestamp': datetime.datetime(2020, 8, 23, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.35, 'high': 390.45, 'low': 388.7, 'close': 390.45, 'trades': 2217, 'volume': 1552572, 'vwap': 389.45, 'lastSize': 13, 'turnover': 60464392220, 'homeNotional': 18028.984371032842, 'foreignNotional': 7021329.166051132}] 2020-08-23 20:00:20 INFO: prepare candles [CandleItem(low=389.9, high=393.25, open=393.0, close=390.3, color='RED'), CandleItem(low=389.75, high=393.45, open=390.45, close=393.0, color='GREEN'), CandleItem(low=388.7, high=390.45, open=389.35, close=390.45, color='GREEN')] 2020-08-23 20:00:20 INFO: last_candle=CandleItem(low=389.9, high=393.25, open=393.0, close=390.3, color='RED') 2020-08-23 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-23 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=389.9, high=393.25, open=393.0, close=390.3, color='RED') 2020-08-23 20:00:20 INFO: skip by CandleItem(low=389.9, high=393.25, open=393.0, close=390.3, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-23 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-23 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=389.9, high=393.25, open=393.0, close=390.3, color='RED') 2020-08-23 20:00:20 INFO: skip by CandleItem(low=389.9, high=393.25, open=393.0, close=390.3, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-23 20:00:20 INFO: not found applicable config for candle 2020-08-23 20:00:20 INFO: check need new order None 2020-08-23 20:00:20 INFO: init new order end 2020-08-23 20:00:20 INFO: 2020-08-23 20:00:20 INFO: 2020-08-23 20:00:20 INFO: 2020-08-23 20:00:20 INFO: 2020-08-23 20:02:00 INFO: 2020-08-23 20:02:00 INFO: 2020-08-23 20:02:00 INFO: 2020-08-23 20:02:00 INFO: 2020-08-23 20:02:00 INFO: clearing start 2020-08-23 20:02:00 INFO: clearing end 2020-08-23 20:02:00 INFO: 2020-08-23 20:02:00 INFO: 2020-08-23 20:02:00 INFO: 2020-08-23 20:02:00 INFO: 2020-08-23 21:00:20 INFO: 2020-08-23 21:00:20 INFO: 2020-08-23 21:00:20 INFO: 2020-08-23 21:00:20 INFO: 2020-08-23 21:00:20 INFO: init new order start 2020-08-23 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 23, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 390.3, 'high': 391.45, 'low': 389.55, 'close': 390.2, 'trades': 1850, 'volume': 995114, 'vwap': 390.61, 'lastSize': 7, 'turnover': 38870122280, 'homeNotional': 11586.469159674869, 'foreignNotional': 4525790.990936341}, {'timestamp': datetime.datetime(2020, 8, 23, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.0, 'high': 393.25, 'low': 389.9, 'close': 390.3, 'trades': 2739, 'volume': 1253057, 'vwap': 391.71, 'lastSize': 13, 'turnover': 49082651975, 'homeNotional': 14586.43070354684, 'foreignNotional': 5713560.515442096}, {'timestamp': datetime.datetime(2020, 8, 23, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 390.45, 'high': 393.45, 'low': 389.75, 'close': 393.0, 'trades': 3830, 'volume': 2212237, 'vwap': 391.7, 'lastSize': 12, 'turnover': 86653278735, 'homeNotional': 25748.463200435497, 'foreignNotional': 10085679.1484783}] 2020-08-23 21:00:20 INFO: prepare candles [CandleItem(low=389.55, high=391.45, open=390.3, close=390.2, color='RED'), CandleItem(low=389.9, high=393.25, open=393.0, close=390.3, color='RED'), CandleItem(low=389.75, high=393.45, open=390.45, close=393.0, color='GREEN')] 2020-08-23 21:00:20 INFO: skip by colors first_candle=CandleItem(low=389.75, high=393.45, open=390.45, close=393.0, color='GREEN') second_candle=CandleItem(low=389.9, high=393.25, open=393.0, close=390.3, color='RED') last_candle=CandleItem(low=389.55, high=391.45, open=390.3, close=390.2, color='RED') 2020-08-23 21:00:20 INFO: check need new order None 2020-08-23 21:00:20 INFO: init new order end 2020-08-23 21:00:20 INFO: 2020-08-23 21:00:20 INFO: 2020-08-23 21:00:20 INFO: 2020-08-23 21:00:20 INFO: 2020-08-23 21:02:00 INFO: 2020-08-23 21:02:00 INFO: 2020-08-23 21:02:00 INFO: 2020-08-23 21:02:00 INFO: 2020-08-23 21:02:00 INFO: clearing start 2020-08-23 21:02:01 INFO: clearing end 2020-08-23 21:02:01 INFO: 2020-08-23 21:02:01 INFO: 2020-08-23 21:02:01 INFO: 2020-08-23 21:02:01 INFO: 2020-08-23 22:00:20 INFO: 2020-08-23 22:00:20 INFO: 2020-08-23 22:00:20 INFO: 2020-08-23 22:00:20 INFO: 2020-08-23 22:00:20 INFO: init new order start 2020-08-23 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 23, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 390.2, 'high': 393.0, 'low': 390.05, 'close': 392.15, 'trades': 2156, 'volume': 832080, 'vwap': 391.67, 'lastSize': 500, 'turnover': 32589845240, 'homeNotional': 9703.359427912981, 'foreignNotional': 3800497.169013183}, {'timestamp': datetime.datetime(2020, 8, 23, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 390.3, 'high': 391.45, 'low': 389.55, 'close': 390.2, 'trades': 1850, 'volume': 995114, 'vwap': 390.61, 'lastSize': 7, 'turnover': 38870122280, 'homeNotional': 11586.469159674869, 'foreignNotional': 4525790.990936341}, {'timestamp': datetime.datetime(2020, 8, 23, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.0, 'high': 393.25, 'low': 389.9, 'close': 390.3, 'trades': 2739, 'volume': 1253057, 'vwap': 391.71, 'lastSize': 13, 'turnover': 49082651975, 'homeNotional': 14586.43070354684, 'foreignNotional': 5713560.515442096}] 2020-08-23 22:00:20 INFO: prepare candles [CandleItem(low=390.05, high=393.0, open=390.2, close=392.15, color='GREEN'), CandleItem(low=389.55, high=391.45, open=390.3, close=390.2, color='RED'), CandleItem(low=389.9, high=393.25, open=393.0, close=390.3, color='RED')] 2020-08-23 22:00:20 INFO: last_candle=CandleItem(low=390.05, high=393.0, open=390.2, close=392.15, color='GREEN') 2020-08-23 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-23 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=390.05, high=393.0, open=390.2, close=392.15, color='GREEN') 2020-08-23 22:00:20 INFO: skip by CandleItem(low=390.05, high=393.0, open=390.2, close=392.15, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-23 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-23 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=390.05, high=393.0, open=390.2, close=392.15, color='GREEN') 2020-08-23 22:00:20 INFO: skip by CandleItem(low=390.05, high=393.0, open=390.2, close=392.15, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-23 22:00:20 INFO: not found applicable config for candle 2020-08-23 22:00:20 INFO: check need new order None 2020-08-23 22:00:20 INFO: init new order end 2020-08-23 22:00:20 INFO: 2020-08-23 22:00:20 INFO: 2020-08-23 22:00:20 INFO: 2020-08-23 22:00:20 INFO: 2020-08-23 22:02:00 INFO: 2020-08-23 22:02:00 INFO: 2020-08-23 22:02:00 INFO: 2020-08-23 22:02:00 INFO: 2020-08-23 22:02:00 INFO: clearing start 2020-08-23 22:02:00 INFO: clearing end 2020-08-23 22:02:00 INFO: 2020-08-23 22:02:00 INFO: 2020-08-23 22:02:00 INFO: 2020-08-23 22:02:00 INFO: 2020-08-23 23:00:20 INFO: 2020-08-23 23:00:20 INFO: 2020-08-23 23:00:20 INFO: 2020-08-23 23:00:20 INFO: 2020-08-23 23:00:20 INFO: init new order start 2020-08-23 23:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 23, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.15, 'high': 395.0, 'low': 391.1, 'close': 394.4, 'trades': 4143, 'volume': 2561140, 'vwap': 393.62, 'lastSize': 12, 'turnover': 100811536180, 'homeNotional': 29913.710984752965, 'foreignNotional': 11774642.856365187}, {'timestamp': datetime.datetime(2020, 8, 23, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 390.2, 'high': 393.0, 'low': 390.05, 'close': 392.15, 'trades': 2156, 'volume': 832080, 'vwap': 391.67, 'lastSize': 500, 'turnover': 32589845240, 'homeNotional': 9703.359427912981, 'foreignNotional': 3800497.169013183}, {'timestamp': datetime.datetime(2020, 8, 23, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 390.3, 'high': 391.45, 'low': 389.55, 'close': 390.2, 'trades': 1850, 'volume': 995114, 'vwap': 390.61, 'lastSize': 7, 'turnover': 38870122280, 'homeNotional': 11586.469159674869, 'foreignNotional': 4525790.990936341}] 2020-08-23 23:00:20 INFO: prepare candles [CandleItem(low=391.1, high=395.0, open=392.15, close=394.4, color='GREEN'), CandleItem(low=390.05, high=393.0, open=390.2, close=392.15, color='GREEN'), CandleItem(low=389.55, high=391.45, open=390.3, close=390.2, color='RED')] 2020-08-23 23:00:20 INFO: skip by colors first_candle=CandleItem(low=389.55, high=391.45, open=390.3, close=390.2, color='RED') second_candle=CandleItem(low=390.05, high=393.0, open=390.2, close=392.15, color='GREEN') last_candle=CandleItem(low=391.1, high=395.0, open=392.15, close=394.4, color='GREEN') 2020-08-23 23:00:20 INFO: check need new order None 2020-08-23 23:00:20 INFO: init new order end 2020-08-23 23:00:20 INFO: 2020-08-23 23:00:20 INFO: 2020-08-23 23:00:20 INFO: 2020-08-23 23:00:20 INFO: 2020-08-23 23:02:00 INFO: 2020-08-23 23:02:00 INFO: 2020-08-23 23:02:00 INFO: 2020-08-23 23:02:00 INFO: 2020-08-23 23:02:00 INFO: clearing start 2020-08-23 23:02:00 INFO: clearing end 2020-08-23 23:02:00 INFO: 2020-08-23 23:02:00 INFO: 2020-08-23 23:02:00 INFO: 2020-08-23 23:02:00 INFO: 2020-08-24 00:00:20 INFO: 2020-08-24 00:00:20 INFO: 2020-08-24 00:00:20 INFO: 2020-08-24 00:00:20 INFO: 2020-08-24 00:00:20 INFO: init new order start 2020-08-24 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 23, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 394.4, 'high': 395.9, 'low': 393.3, 'close': 393.45, 'trades': 3578, 'volume': 2271264, 'vwap': 394.95, 'lastSize': 1, 'turnover': 89702480795, 'homeNotional': 26573.875965840474, 'foreignNotional': 10495234.226730546}, {'timestamp': datetime.datetime(2020, 8, 23, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.15, 'high': 395.0, 'low': 391.1, 'close': 394.4, 'trades': 4143, 'volume': 2561140, 'vwap': 393.62, 'lastSize': 12, 'turnover': 100811536180, 'homeNotional': 29913.710984752965, 'foreignNotional': 11774642.856365187}, {'timestamp': datetime.datetime(2020, 8, 23, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 390.2, 'high': 393.0, 'low': 390.05, 'close': 392.15, 'trades': 2156, 'volume': 832080, 'vwap': 391.67, 'lastSize': 500, 'turnover': 32589845240, 'homeNotional': 9703.359427912981, 'foreignNotional': 3800497.169013183}] 2020-08-24 00:00:20 INFO: prepare candles [CandleItem(low=393.3, high=395.9, open=394.4, close=393.45, color='RED'), CandleItem(low=391.1, high=395.0, open=392.15, close=394.4, color='GREEN'), CandleItem(low=390.05, high=393.0, open=390.2, close=392.15, color='GREEN')] 2020-08-24 00:00:20 INFO: last_candle=CandleItem(low=393.3, high=395.9, open=394.4, close=393.45, color='RED') 2020-08-24 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-08-24 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=393.3, high=395.9, open=394.4, close=393.45, color='RED') 2020-08-24 00:00:20 INFO: skip by CandleItem(low=393.3, high=395.9, open=394.4, close=393.45, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-24 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-08-24 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=393.3, high=395.9, open=394.4, close=393.45, color='RED') 2020-08-24 00:00:20 INFO: skip by CandleItem(low=393.3, high=395.9, open=394.4, close=393.45, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-24 00:00:20 INFO: not found applicable config for candle 2020-08-24 00:00:20 INFO: check need new order None 2020-08-24 00:00:20 INFO: init new order end 2020-08-24 00:00:20 INFO: 2020-08-24 00:00:20 INFO: 2020-08-24 00:00:20 INFO: 2020-08-24 00:00:20 INFO: 2020-08-24 00:02:00 INFO: 2020-08-24 00:02:00 INFO: 2020-08-24 00:02:00 INFO: 2020-08-24 00:02:00 INFO: 2020-08-24 00:02:00 INFO: clearing start 2020-08-24 00:02:00 INFO: clearing end 2020-08-24 00:02:00 INFO: 2020-08-24 00:02:00 INFO: 2020-08-24 00:02:00 INFO: 2020-08-24 00:02:00 INFO: 2020-08-24 01:00:20 INFO: 2020-08-24 01:00:20 INFO: 2020-08-24 01:00:20 INFO: 2020-08-24 01:00:20 INFO: 2020-08-24 01:00:20 INFO: init new order start 2020-08-24 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 23, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.45, 'high': 393.9, 'low': 392.45, 'close': 393.85, 'trades': 1769, 'volume': 819043, 'vwap': 393.26, 'lastSize': 28, 'turnover': 32208872570, 'homeNotional': 9550.711165690675, 'foreignNotional': 3755819.7978338045}, {'timestamp': datetime.datetime(2020, 8, 23, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 394.4, 'high': 395.9, 'low': 393.3, 'close': 393.45, 'trades': 3578, 'volume': 2271264, 'vwap': 394.95, 'lastSize': 1, 'turnover': 89702480795, 'homeNotional': 26573.875965840474, 'foreignNotional': 10495234.226730546}, {'timestamp': datetime.datetime(2020, 8, 23, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.15, 'high': 395.0, 'low': 391.1, 'close': 394.4, 'trades': 4143, 'volume': 2561140, 'vwap': 393.62, 'lastSize': 12, 'turnover': 100811536180, 'homeNotional': 29913.710984752965, 'foreignNotional': 11774642.856365187}] 2020-08-24 01:00:20 INFO: prepare candles [CandleItem(low=392.45, high=393.9, open=393.45, close=393.85, color='GREEN'), CandleItem(low=393.3, high=395.9, open=394.4, close=393.45, color='RED'), CandleItem(low=391.1, high=395.0, open=392.15, close=394.4, color='GREEN')] 2020-08-24 01:00:20 INFO: skip by colors first_candle=CandleItem(low=391.1, high=395.0, open=392.15, close=394.4, color='GREEN') second_candle=CandleItem(low=393.3, high=395.9, open=394.4, close=393.45, color='RED') last_candle=CandleItem(low=392.45, high=393.9, open=393.45, close=393.85, color='GREEN') 2020-08-24 01:00:20 INFO: check need new order None 2020-08-24 01:00:20 INFO: init new order end 2020-08-24 01:00:20 INFO: 2020-08-24 01:00:20 INFO: 2020-08-24 01:00:20 INFO: 2020-08-24 01:00:20 INFO: 2020-08-24 01:02:00 INFO: 2020-08-24 01:02:00 INFO: 2020-08-24 01:02:00 INFO: 2020-08-24 01:02:00 INFO: 2020-08-24 01:02:00 INFO: clearing start 2020-08-24 01:02:00 INFO: clearing end 2020-08-24 01:02:00 INFO: 2020-08-24 01:02:00 INFO: 2020-08-24 01:02:00 INFO: 2020-08-24 01:02:00 INFO: 2020-08-24 02:00:20 INFO: 2020-08-24 02:00:20 INFO: 2020-08-24 02:00:20 INFO: 2020-08-24 02:00:20 INFO: 2020-08-24 02:00:20 INFO: init new order start 2020-08-24 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 23, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.85, 'high': 394.3, 'low': 391.4, 'close': 391.7, 'trades': 1919, 'volume': 997882, 'vwap': 392.79, 'lastSize': 30, 'turnover': 39195635795, 'homeNotional': 11638.190883773452, 'foreignNotional': 4571358.346259446}, {'timestamp': datetime.datetime(2020, 8, 23, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.45, 'high': 393.9, 'low': 392.45, 'close': 393.85, 'trades': 1769, 'volume': 819043, 'vwap': 393.26, 'lastSize': 28, 'turnover': 32208872570, 'homeNotional': 9550.711165690675, 'foreignNotional': 3755819.7978338045}, {'timestamp': datetime.datetime(2020, 8, 23, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 394.4, 'high': 395.9, 'low': 393.3, 'close': 393.45, 'trades': 3578, 'volume': 2271264, 'vwap': 394.95, 'lastSize': 1, 'turnover': 89702480795, 'homeNotional': 26573.875965840474, 'foreignNotional': 10495234.226730546}] 2020-08-24 02:00:20 INFO: prepare candles [CandleItem(low=391.4, high=394.3, open=393.85, close=391.7, color='RED'), CandleItem(low=392.45, high=393.9, open=393.45, close=393.85, color='GREEN'), CandleItem(low=393.3, high=395.9, open=394.4, close=393.45, color='RED')] 2020-08-24 02:00:20 INFO: skip by colors first_candle=CandleItem(low=393.3, high=395.9, open=394.4, close=393.45, color='RED') second_candle=CandleItem(low=392.45, high=393.9, open=393.45, close=393.85, color='GREEN') last_candle=CandleItem(low=391.4, high=394.3, open=393.85, close=391.7, color='RED') 2020-08-24 02:00:20 INFO: check need new order None 2020-08-24 02:00:20 INFO: init new order end 2020-08-24 02:00:20 INFO: 2020-08-24 02:00:20 INFO: 2020-08-24 02:00:20 INFO: 2020-08-24 02:00:20 INFO: 2020-08-24 02:02:00 INFO: 2020-08-24 02:02:00 INFO: 2020-08-24 02:02:00 INFO: 2020-08-24 02:02:00 INFO: 2020-08-24 02:02:00 INFO: clearing start 2020-08-24 02:02:00 INFO: clearing end 2020-08-24 02:02:00 INFO: 2020-08-24 02:02:00 INFO: 2020-08-24 02:02:00 INFO: 2020-08-24 02:02:00 INFO: 2020-08-24 03:00:20 INFO: 2020-08-24 03:00:20 INFO: 2020-08-24 03:00:20 INFO: 2020-08-24 03:00:20 INFO: 2020-08-24 03:00:20 INFO: init new order start 2020-08-24 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 24, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.7, 'high': 393.2, 'low': 390.9, 'close': 391.1, 'trades': 1800, 'volume': 1077926, 'vwap': 392.39, 'lastSize': 11, 'turnover': 42296720505, 'homeNotional': 12573.060643470246, 'foreignNotional': 4933546.2395862695}, {'timestamp': datetime.datetime(2020, 8, 23, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.85, 'high': 394.3, 'low': 391.4, 'close': 391.7, 'trades': 1919, 'volume': 997882, 'vwap': 392.79, 'lastSize': 30, 'turnover': 39195635795, 'homeNotional': 11638.190883773452, 'foreignNotional': 4571358.346259446}, {'timestamp': datetime.datetime(2020, 8, 23, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.45, 'high': 393.9, 'low': 392.45, 'close': 393.85, 'trades': 1769, 'volume': 819043, 'vwap': 393.26, 'lastSize': 28, 'turnover': 32208872570, 'homeNotional': 9550.711165690675, 'foreignNotional': 3755819.7978338045}] 2020-08-24 03:00:20 INFO: prepare candles [CandleItem(low=390.9, high=393.2, open=391.7, close=391.1, color='RED'), CandleItem(low=391.4, high=394.3, open=393.85, close=391.7, color='RED'), CandleItem(low=392.45, high=393.9, open=393.45, close=393.85, color='GREEN')] 2020-08-24 03:00:20 INFO: skip by colors first_candle=CandleItem(low=392.45, high=393.9, open=393.45, close=393.85, color='GREEN') second_candle=CandleItem(low=391.4, high=394.3, open=393.85, close=391.7, color='RED') last_candle=CandleItem(low=390.9, high=393.2, open=391.7, close=391.1, color='RED') 2020-08-24 03:00:20 INFO: check need new order None 2020-08-24 03:00:20 INFO: init new order end 2020-08-24 03:00:20 INFO: 2020-08-24 03:00:20 INFO: 2020-08-24 03:00:20 INFO: 2020-08-24 03:00:20 INFO: 2020-08-24 03:02:00 INFO: 2020-08-24 03:02:00 INFO: 2020-08-24 03:02:00 INFO: 2020-08-24 03:02:00 INFO: 2020-08-24 03:02:00 INFO: clearing start 2020-08-24 03:02:00 INFO: clearing end 2020-08-24 03:02:00 INFO: 2020-08-24 03:02:00 INFO: 2020-08-24 03:02:00 INFO: 2020-08-24 03:02:00 INFO: 2020-08-24 04:00:20 INFO: 2020-08-24 04:00:20 INFO: 2020-08-24 04:00:20 INFO: 2020-08-24 04:00:20 INFO: 2020-08-24 04:00:20 INFO: init new order start 2020-08-24 04:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 24, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.1, 'high': 391.45, 'low': 388.1, 'close': 390.45, 'trades': 3338, 'volume': 2807501, 'vwap': 389.54, 'lastSize': 960, 'turnover': 109361542525, 'homeNotional': 32634.716246261112, 'foreignNotional': 12712338.699802762}, {'timestamp': datetime.datetime(2020, 8, 24, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.7, 'high': 393.2, 'low': 390.9, 'close': 391.1, 'trades': 1800, 'volume': 1077926, 'vwap': 392.39, 'lastSize': 11, 'turnover': 42296720505, 'homeNotional': 12573.060643470246, 'foreignNotional': 4933546.2395862695}, {'timestamp': datetime.datetime(2020, 8, 23, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.85, 'high': 394.3, 'low': 391.4, 'close': 391.7, 'trades': 1919, 'volume': 997882, 'vwap': 392.79, 'lastSize': 30, 'turnover': 39195635795, 'homeNotional': 11638.190883773452, 'foreignNotional': 4571358.346259446}] 2020-08-24 04:00:21 INFO: prepare candles [CandleItem(low=388.1, high=391.45, open=391.1, close=390.45, color='RED'), CandleItem(low=390.9, high=393.2, open=391.7, close=391.1, color='RED'), CandleItem(low=391.4, high=394.3, open=393.85, close=391.7, color='RED')] 2020-08-24 04:00:21 INFO: skip by colors first_candle=CandleItem(low=391.4, high=394.3, open=393.85, close=391.7, color='RED') second_candle=CandleItem(low=390.9, high=393.2, open=391.7, close=391.1, color='RED') last_candle=CandleItem(low=388.1, high=391.45, open=391.1, close=390.45, color='RED') 2020-08-24 04:00:21 INFO: check need new order None 2020-08-24 04:00:21 INFO: init new order end 2020-08-24 04:00:21 INFO: 2020-08-24 04:00:21 INFO: 2020-08-24 04:00:21 INFO: 2020-08-24 04:00:21 INFO: 2020-08-24 04:02:00 INFO: 2020-08-24 04:02:00 INFO: 2020-08-24 04:02:00 INFO: 2020-08-24 04:02:00 INFO: 2020-08-24 04:02:00 INFO: clearing start 2020-08-24 04:02:00 INFO: clearing end 2020-08-24 04:02:00 INFO: 2020-08-24 04:02:00 INFO: 2020-08-24 04:02:00 INFO: 2020-08-24 04:02:00 INFO: 2020-08-24 05:00:20 INFO: 2020-08-24 05:00:20 INFO: 2020-08-24 05:00:20 INFO: 2020-08-24 05:00:20 INFO: 2020-08-24 05:00:20 INFO: init new order start 2020-08-24 05:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 24, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 390.45, 'high': 391.15, 'low': 389.05, 'close': 390.2, 'trades': 1723, 'volume': 1023974, 'vwap': 390.08, 'lastSize': 248, 'turnover': 39942395760, 'homeNotional': 11904.292430016822, 'foreignNotional': 4643539.342422274}, {'timestamp': datetime.datetime(2020, 8, 24, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.1, 'high': 391.45, 'low': 388.1, 'close': 390.45, 'trades': 3338, 'volume': 2807501, 'vwap': 389.54, 'lastSize': 960, 'turnover': 109361542525, 'homeNotional': 32634.716246261112, 'foreignNotional': 12712338.699802762}, {'timestamp': datetime.datetime(2020, 8, 24, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.7, 'high': 393.2, 'low': 390.9, 'close': 391.1, 'trades': 1800, 'volume': 1077926, 'vwap': 392.39, 'lastSize': 11, 'turnover': 42296720505, 'homeNotional': 12573.060643470246, 'foreignNotional': 4933546.2395862695}] 2020-08-24 05:00:20 INFO: prepare candles [CandleItem(low=389.05, high=391.15, open=390.45, close=390.2, color='RED'), CandleItem(low=388.1, high=391.45, open=391.1, close=390.45, color='RED'), CandleItem(low=390.9, high=393.2, open=391.7, close=391.1, color='RED')] 2020-08-24 05:00:20 INFO: skip by colors first_candle=CandleItem(low=390.9, high=393.2, open=391.7, close=391.1, color='RED') second_candle=CandleItem(low=388.1, high=391.45, open=391.1, close=390.45, color='RED') last_candle=CandleItem(low=389.05, high=391.15, open=390.45, close=390.2, color='RED') 2020-08-24 05:00:20 INFO: check need new order None 2020-08-24 05:00:20 INFO: init new order end 2020-08-24 05:00:20 INFO: 2020-08-24 05:00:20 INFO: 2020-08-24 05:00:20 INFO: 2020-08-24 05:00:20 INFO: 2020-08-24 05:02:00 INFO: 2020-08-24 05:02:00 INFO: 2020-08-24 05:02:00 INFO: 2020-08-24 05:02:00 INFO: 2020-08-24 05:02:00 INFO: clearing start 2020-08-24 05:02:00 INFO: clearing end 2020-08-24 05:02:00 INFO: 2020-08-24 05:02:00 INFO: 2020-08-24 05:02:00 INFO: 2020-08-24 05:02:00 INFO: 2020-08-24 06:00:20 INFO: 2020-08-24 06:00:20 INFO: 2020-08-24 06:00:20 INFO: 2020-08-24 06:00:20 INFO: 2020-08-24 06:00:20 INFO: init new order start 2020-08-24 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 24, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 390.2, 'high': 392.7, 'low': 390.1, 'close': 391.65, 'trades': 2015, 'volume': 1146563, 'vwap': 391.68, 'lastSize': 24, 'turnover': 44908337750, 'homeNotional': 13368.414948315649, 'foreignNotional': 5236117.086721084}, {'timestamp': datetime.datetime(2020, 8, 24, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 390.45, 'high': 391.15, 'low': 389.05, 'close': 390.2, 'trades': 1723, 'volume': 1023974, 'vwap': 390.08, 'lastSize': 248, 'turnover': 39942395760, 'homeNotional': 11904.292430016822, 'foreignNotional': 4643539.342422274}, {'timestamp': datetime.datetime(2020, 8, 24, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.1, 'high': 391.45, 'low': 388.1, 'close': 390.45, 'trades': 3338, 'volume': 2807501, 'vwap': 389.54, 'lastSize': 960, 'turnover': 109361542525, 'homeNotional': 32634.716246261112, 'foreignNotional': 12712338.699802762}] 2020-08-24 06:00:20 INFO: prepare candles [CandleItem(low=390.1, high=392.7, open=390.2, close=391.65, color='GREEN'), CandleItem(low=389.05, high=391.15, open=390.45, close=390.2, color='RED'), CandleItem(low=388.1, high=391.45, open=391.1, close=390.45, color='RED')] 2020-08-24 06:00:20 INFO: last_candle=CandleItem(low=390.1, high=392.7, open=390.2, close=391.65, color='GREEN') 2020-08-24 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-24 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=390.1, high=392.7, open=390.2, close=391.65, color='GREEN') 2020-08-24 06:00:20 INFO: skip by CandleItem(low=390.1, high=392.7, open=390.2, close=391.65, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-24 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-08-24 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=390.1, high=392.7, open=390.2, close=391.65, color='GREEN') 2020-08-24 06:00:20 INFO: skip by CandleItem(low=390.1, high=392.7, open=390.2, close=391.65, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-24 06:00:20 INFO: not found applicable config for candle 2020-08-24 06:00:20 INFO: check need new order None 2020-08-24 06:00:20 INFO: init new order end 2020-08-24 06:00:20 INFO: 2020-08-24 06:00:20 INFO: 2020-08-24 06:00:20 INFO: 2020-08-24 06:00:20 INFO: 2020-08-24 06:02:00 INFO: 2020-08-24 06:02:00 INFO: 2020-08-24 06:02:00 INFO: 2020-08-24 06:02:00 INFO: 2020-08-24 06:02:00 INFO: clearing start 2020-08-24 06:02:00 INFO: clearing end 2020-08-24 06:02:00 INFO: 2020-08-24 06:02:00 INFO: 2020-08-24 06:02:00 INFO: 2020-08-24 06:02:00 INFO: 2020-08-24 07:00:20 INFO: 2020-08-24 07:00:20 INFO: 2020-08-24 07:00:20 INFO: 2020-08-24 07:00:20 INFO: 2020-08-24 07:00:20 INFO: init new order start 2020-08-24 07:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 24, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.65, 'high': 394.25, 'low': 391.55, 'close': 393.25, 'trades': 1989, 'volume': 1593684, 'vwap': 393.29, 'lastSize': 157, 'turnover': 62677546540, 'homeNotional': 18610.363345745845, 'foreignNotional': 7319226.872004183}, {'timestamp': datetime.datetime(2020, 8, 24, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 390.2, 'high': 392.7, 'low': 390.1, 'close': 391.65, 'trades': 2015, 'volume': 1146563, 'vwap': 391.68, 'lastSize': 24, 'turnover': 44908337750, 'homeNotional': 13368.414948315649, 'foreignNotional': 5236117.086721084}, {'timestamp': datetime.datetime(2020, 8, 24, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 390.45, 'high': 391.15, 'low': 389.05, 'close': 390.2, 'trades': 1723, 'volume': 1023974, 'vwap': 390.08, 'lastSize': 248, 'turnover': 39942395760, 'homeNotional': 11904.292430016822, 'foreignNotional': 4643539.342422274}] 2020-08-24 07:00:20 INFO: prepare candles [CandleItem(low=391.55, high=394.25, open=391.65, close=393.25, color='GREEN'), CandleItem(low=390.1, high=392.7, open=390.2, close=391.65, color='GREEN'), CandleItem(low=389.05, high=391.15, open=390.45, close=390.2, color='RED')] 2020-08-24 07:00:20 INFO: skip by colors first_candle=CandleItem(low=389.05, high=391.15, open=390.45, close=390.2, color='RED') second_candle=CandleItem(low=390.1, high=392.7, open=390.2, close=391.65, color='GREEN') last_candle=CandleItem(low=391.55, high=394.25, open=391.65, close=393.25, color='GREEN') 2020-08-24 07:00:20 INFO: check need new order None 2020-08-24 07:00:20 INFO: init new order end 2020-08-24 07:00:20 INFO: 2020-08-24 07:00:20 INFO: 2020-08-24 07:00:20 INFO: 2020-08-24 07:00:20 INFO: 2020-08-24 07:02:00 INFO: 2020-08-24 07:02:00 INFO: 2020-08-24 07:02:00 INFO: 2020-08-24 07:02:00 INFO: 2020-08-24 07:02:00 INFO: clearing start 2020-08-24 07:02:00 INFO: clearing end 2020-08-24 07:02:00 INFO: 2020-08-24 07:02:00 INFO: 2020-08-24 07:02:00 INFO: 2020-08-24 07:02:00 INFO: 2020-08-24 08:00:20 INFO: 2020-08-24 08:00:20 INFO: 2020-08-24 08:00:20 INFO: 2020-08-24 08:00:20 INFO: 2020-08-24 08:00:20 INFO: init new order start 2020-08-24 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 24, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.25, 'high': 393.8, 'low': 392.05, 'close': 392.85, 'trades': 1719, 'volume': 1726181, 'vwap': 392.86, 'lastSize': 1, 'turnover': 67814470315, 'homeNotional': 20146.971690443916, 'foreignNotional': 7914909.18516862}, {'timestamp': datetime.datetime(2020, 8, 24, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.65, 'high': 394.25, 'low': 391.55, 'close': 393.25, 'trades': 1989, 'volume': 1593684, 'vwap': 393.29, 'lastSize': 157, 'turnover': 62677546540, 'homeNotional': 18610.363345745845, 'foreignNotional': 7319226.872004183}, {'timestamp': datetime.datetime(2020, 8, 24, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 390.2, 'high': 392.7, 'low': 390.1, 'close': 391.65, 'trades': 2015, 'volume': 1146563, 'vwap': 391.68, 'lastSize': 24, 'turnover': 44908337750, 'homeNotional': 13368.414948315649, 'foreignNotional': 5236117.086721084}] 2020-08-24 08:00:20 INFO: prepare candles [CandleItem(low=392.05, high=393.8, open=393.25, close=392.85, color='RED'), CandleItem(low=391.55, high=394.25, open=391.65, close=393.25, color='GREEN'), CandleItem(low=390.1, high=392.7, open=390.2, close=391.65, color='GREEN')] 2020-08-24 08:00:20 INFO: last_candle=CandleItem(low=392.05, high=393.8, open=393.25, close=392.85, color='RED') 2020-08-24 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-08-24 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=392.05, high=393.8, open=393.25, close=392.85, color='RED') 2020-08-24 08:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=391.55, high=394.25, open=391.65, close=393.25, color='GREEN') 2020-08-24 08:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=390.1, high=392.7, open=390.2, close=391.65, color='GREEN') 2020-08-24 08:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=392.05, high=393.8, open=393.25, close=392.85, color='RED'), take_profit_factor=6.0, clearing_interval=3600) 2020-08-24 08:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=392.05, high=393.8, open=393.25, close=392.85, color='RED'), take_profit_factor=6.0, clearing_interval=3600) 2020-08-24 08:00:20 INFO: place order: start candle=CandleItem(low=392.05, high=393.8, open=393.25, close=392.85, color='RED') ticker='ETHUSD' price_offset=0.1 2020-08-24 08:00:20 INFO: place order: side_factor=1 init_trigger_price=392.0 init_order_price=391.95 stop_price_offset=0.0 candle.size=1.75 stop_price=393.8 take_price=381.45 2020-08-24 08:00:20 INFO: place order round: side_factor=1 init_trigger_price=Decimal('392') init_order_price=Decimal('391.94999999999998863131622783839702606201171875') stop_price_offset=0.0 candle.size=1.75 stop_price=Decimal('393.80000000000001136868377216160297393798828125') take_price=Decimal('381.44999999999998863131622783839702606201171875') 2020-08-24 08:00:20 INFO: place order: compute qty=-1056 2020-08-24 08:00:20 INFO: place order: save order to db 88edd7dda8a44b3084b022dc76f26501; response=True 2020-08-24 08:00:20 INFO: post order to exchange resp={'orderID': '3091c48d-0780-e6da-1014-4e782ac879b3', 'clOrdID': '88edd7dda8a44b3084b022dc76f26501', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1056, 'price': 391.95, 'displayQty': None, 'stopPx': 392.0, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1056, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 24, 5, 0, 20, 674000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 24, 5, 0, 20, 674000, tzinfo=tzutc())} 2020-08-24 08:00:20 INFO: place new init order {'qty': -1056, 'init_price': Decimal('392'), 'stop_price': Decimal('393.80000000000001136868377216160297393798828125'), 'take_price': Decimal('381.44999999999998863131622783839702606201171875'), 'order_uid': '88edd7dda8a44b3084b022dc76f26501', 'response': {'orderID': '3091c48d-0780-e6da-1014-4e782ac879b3', 'clOrdID': '88edd7dda8a44b3084b022dc76f26501', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1056, 'price': 391.95, 'displayQty': None, 'stopPx': 392.0, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1056, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 24, 5, 0, 20, 674000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 24, 5, 0, 20, 674000, tzinfo=tzutc())}} 2020-08-24 08:00:20 INFO: init new order end 2020-08-24 08:00:20 INFO: 2020-08-24 08:00:20 INFO: 2020-08-24 08:00:20 INFO: 2020-08-24 08:00:20 INFO: 2020-08-24 08:00:21 INFO: process event {'orderID': '3091c48d-0780-e6da-1014-4e782ac879b3', 'clOrdID': '88edd7dda8a44b3084b022dc76f26501', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1056, 'price': 391.95, 'displayQty': None, 'stopPx': 392, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1056, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-08-24T05:00:20.674Z', 'timestamp': '2020-08-24T05:00:20.674Z'} 2020-08-24 08:00:21 INFO: skip event 88edd7dda8a44b3084b022dc76f26501 New 2020-08-24 08:02:00 INFO: 2020-08-24 08:02:00 INFO: 2020-08-24 08:02:00 INFO: 2020-08-24 08:02:00 INFO: 2020-08-24 08:02:00 INFO: clearing start 2020-08-24 08:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '3091c48d-0780-e6da-1014-4e782ac879b3', 'clOrdID': '88edd7dda8a44b3084b022dc76f26501', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1056, 'price': 391.95, 'displayQty': None, 'stopPx': 392.0, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1056, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 24, 5, 0, 20, 674000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 24, 5, 0, 20, 674000, tzinfo=tzutc())} 2020-08-24 08:02:00 INFO: order time=2020-08-24 05:00:20.674000+00:00; delta from now UTC=0:01:40.223277 time_delta.total_seconds()=100.223277; time_diff_offset='3600' 2020-08-24 08:02:00 INFO: skip by time diff 2020-08-24 05:00:20.674000+00:00 2020-08-24 08:02:00 INFO: clearing end 2020-08-24 08:02:00 INFO: 2020-08-24 08:02:00 INFO: 2020-08-24 08:02:00 INFO: 2020-08-24 08:02:00 INFO: 2020-08-24 09:00:20 INFO: 2020-08-24 09:00:20 INFO: 2020-08-24 09:00:20 INFO: 2020-08-24 09:00:20 INFO: 2020-08-24 09:00:20 INFO: init new order start 2020-08-24 09:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 24, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.85, 'high': 393.4, 'low': 392.45, 'close': 393.25, 'trades': 1296, 'volume': 987476, 'vwap': 392.9, 'lastSize': 10, 'turnover': 38797594575, 'homeNotional': 11520.715592545022, 'foreignNotional': 4526450.609487717}, {'timestamp': datetime.datetime(2020, 8, 24, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.25, 'high': 393.8, 'low': 392.05, 'close': 392.85, 'trades': 1719, 'volume': 1726181, 'vwap': 392.86, 'lastSize': 1, 'turnover': 67814470315, 'homeNotional': 20146.971690443916, 'foreignNotional': 7914909.18516862}, {'timestamp': datetime.datetime(2020, 8, 24, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 391.65, 'high': 394.25, 'low': 391.55, 'close': 393.25, 'trades': 1989, 'volume': 1593684, 'vwap': 393.29, 'lastSize': 157, 'turnover': 62677546540, 'homeNotional': 18610.363345745845, 'foreignNotional': 7319226.872004183}] 2020-08-24 09:00:20 INFO: prepare candles [CandleItem(low=392.45, high=393.4, open=392.85, close=393.25, color='GREEN'), CandleItem(low=392.05, high=393.8, open=393.25, close=392.85, color='RED'), CandleItem(low=391.55, high=394.25, open=391.65, close=393.25, color='GREEN')] 2020-08-24 09:00:20 INFO: skip by colors first_candle=CandleItem(low=391.55, high=394.25, open=391.65, close=393.25, color='GREEN') second_candle=CandleItem(low=392.05, high=393.8, open=393.25, close=392.85, color='RED') last_candle=CandleItem(low=392.45, high=393.4, open=392.85, close=393.25, color='GREEN') 2020-08-24 09:00:20 INFO: check need new order None 2020-08-24 09:00:20 INFO: init new order end 2020-08-24 09:00:20 INFO: 2020-08-24 09:00:20 INFO: 2020-08-24 09:00:20 INFO: 2020-08-24 09:00:20 INFO: 2020-08-24 09:02:00 INFO: 2020-08-24 09:02:00 INFO: 2020-08-24 09:02:00 INFO: 2020-08-24 09:02:00 INFO: 2020-08-24 09:02:00 INFO: clearing start 2020-08-24 09:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '3091c48d-0780-e6da-1014-4e782ac879b3', 'clOrdID': '88edd7dda8a44b3084b022dc76f26501', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1056, 'price': 391.95, 'displayQty': None, 'stopPx': 392.0, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1056, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 24, 5, 0, 20, 674000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 24, 5, 0, 20, 674000, tzinfo=tzutc())} 2020-08-24 09:02:00 INFO: order time=2020-08-24 05:00:20.674000+00:00; delta from now UTC=1:01:40.258876 time_delta.total_seconds()=3700.258876; time_diff_offset='3600' 2020-08-24 09:02:00 INFO: clear order 88edd7dda8a44b3084b022dc76f26501 2020-08-24 09:02:00 INFO: cancel order resp=[{'orderID': '3091c48d-0780-e6da-1014-4e782ac879b3', 'clOrdID': '88edd7dda8a44b3084b022dc76f26501', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1056, 'price': 391.95, 'displayQty': None, 'stopPx': 392.0, '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, 8, 24, 5, 0, 20, 674000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 24, 6, 2, 0, 957000, tzinfo=tzutc())}] 2020-08-24 09:02:00 INFO: clearing end 2020-08-24 09:02:00 INFO: 2020-08-24 09:02:00 INFO: 2020-08-24 09:02:00 INFO: 2020-08-24 09:02:00 INFO: 2020-08-24 09:02:01 INFO: process event {'orderID': '3091c48d-0780-e6da-1014-4e782ac879b3', 'ordStatus': 'Canceled', 'leavesQty': 0, 'text': 'Canceled: cancelled by clearing\nInit order by supervisor.py', 'timestamp': '2020-08-24T06:02:00.957Z', 'clOrdID': '88edd7dda8a44b3084b022dc76f26501', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-24 09:02:01 INFO: skip event 88edd7dda8a44b3084b022dc76f26501 Canceled 2020-08-24 10:00:20 INFO: 2020-08-24 10:00:20 INFO: 2020-08-24 10:00:20 INFO: 2020-08-24 10:00:20 INFO: 2020-08-24 10:00:20 INFO: init new order start 2020-08-24 10:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 24, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.25, 'high': 396.8, 'low': 392.55, 'close': 396.5, 'trades': 5755, 'volume': 4161600, 'vwap': 395.16, 'lastSize': 10, 'turnover': 164448528955, 'homeNotional': 48672.689769950775, 'foreignNotional': 19233421.80372407}, {'timestamp': datetime.datetime(2020, 8, 24, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.85, 'high': 393.4, 'low': 392.45, 'close': 393.25, 'trades': 1296, 'volume': 987476, 'vwap': 392.9, 'lastSize': 10, 'turnover': 38797594575, 'homeNotional': 11520.715592545022, 'foreignNotional': 4526450.609487717}, {'timestamp': datetime.datetime(2020, 8, 24, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.25, 'high': 393.8, 'low': 392.05, 'close': 392.85, 'trades': 1719, 'volume': 1726181, 'vwap': 392.86, 'lastSize': 1, 'turnover': 67814470315, 'homeNotional': 20146.971690443916, 'foreignNotional': 7914909.18516862}] 2020-08-24 10:00:21 INFO: prepare candles [CandleItem(low=392.55, high=396.8, open=393.25, close=396.5, color='GREEN'), CandleItem(low=392.45, high=393.4, open=392.85, close=393.25, color='GREEN'), CandleItem(low=392.05, high=393.8, open=393.25, close=392.85, color='RED')] 2020-08-24 10:00:21 INFO: skip by colors first_candle=CandleItem(low=392.05, high=393.8, open=393.25, close=392.85, color='RED') second_candle=CandleItem(low=392.45, high=393.4, open=392.85, close=393.25, color='GREEN') last_candle=CandleItem(low=392.55, high=396.8, open=393.25, close=396.5, color='GREEN') 2020-08-24 10:00:21 INFO: check need new order None 2020-08-24 10:00:21 INFO: init new order end 2020-08-24 10:00:21 INFO: 2020-08-24 10:00:21 INFO: 2020-08-24 10:00:21 INFO: 2020-08-24 10:00:21 INFO: 2020-08-24 10:02:00 INFO: 2020-08-24 10:02:00 INFO: 2020-08-24 10:02:00 INFO: 2020-08-24 10:02:00 INFO: 2020-08-24 10:02:00 INFO: clearing start 2020-08-24 10:02:00 INFO: clearing end 2020-08-24 10:02:00 INFO: 2020-08-24 10:02:00 INFO: 2020-08-24 10:02:00 INFO: 2020-08-24 10:02:00 INFO: 2020-08-24 11:00:20 INFO: 2020-08-24 11:00:20 INFO: 2020-08-24 11:00:20 INFO: 2020-08-24 11:00:20 INFO: 2020-08-24 11:00:20 INFO: init new order start 2020-08-24 11:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 24, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 396.5, 'high': 399.45, 'low': 396.55, 'close': 398.8, 'trades': 5059, 'volume': 3577812, 'vwap': 398.46, 'lastSize': 80, 'turnover': 142559138395, 'homeNotional': 42086.673425493376, 'foreignNotional': 16769588.023284247}, {'timestamp': datetime.datetime(2020, 8, 24, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.25, 'high': 396.8, 'low': 392.55, 'close': 396.5, 'trades': 5755, 'volume': 4161600, 'vwap': 395.16, 'lastSize': 10, 'turnover': 164448528955, 'homeNotional': 48672.689769950775, 'foreignNotional': 19233421.80372407}, {'timestamp': datetime.datetime(2020, 8, 24, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 392.85, 'high': 393.4, 'low': 392.45, 'close': 393.25, 'trades': 1296, 'volume': 987476, 'vwap': 392.9, 'lastSize': 10, 'turnover': 38797594575, 'homeNotional': 11520.715592545022, 'foreignNotional': 4526450.609487717}] 2020-08-24 11:00:20 INFO: prepare candles [CandleItem(low=396.55, high=399.45, open=396.5, close=398.8, color='GREEN'), CandleItem(low=392.55, high=396.8, open=393.25, close=396.5, color='GREEN'), CandleItem(low=392.45, high=393.4, open=392.85, close=393.25, color='GREEN')] 2020-08-24 11:00:20 INFO: skip by colors first_candle=CandleItem(low=392.45, high=393.4, open=392.85, close=393.25, color='GREEN') second_candle=CandleItem(low=392.55, high=396.8, open=393.25, close=396.5, color='GREEN') last_candle=CandleItem(low=396.55, high=399.45, open=396.5, close=398.8, color='GREEN') 2020-08-24 11:00:20 INFO: check need new order None 2020-08-24 11:00:20 INFO: init new order end 2020-08-24 11:00:20 INFO: 2020-08-24 11:00:20 INFO: 2020-08-24 11:00:20 INFO: 2020-08-24 11:00:20 INFO: 2020-08-24 11:02:00 INFO: 2020-08-24 11:02:00 INFO: 2020-08-24 11:02:00 INFO: 2020-08-24 11:02:00 INFO: 2020-08-24 11:02:00 INFO: clearing start 2020-08-24 11:02:00 INFO: clearing end 2020-08-24 11:02:00 INFO: 2020-08-24 11:02:00 INFO: 2020-08-24 11:02:00 INFO: 2020-08-24 11:02:00 INFO: 2020-08-24 12:00:20 INFO: 2020-08-24 12:00:20 INFO: 2020-08-24 12:00:20 INFO: 2020-08-24 12:00:20 INFO: 2020-08-24 12:00:20 INFO: init new order start 2020-08-24 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 24, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 398.8, 'high': 408.8, 'low': 398.75, 'close': 405.7, 'trades': 11458, 'volume': 10344756, 'vwap': 404.33, 'lastSize': 12, 'turnover': 418261812965, 'homeNotional': 121901.49377823749, 'foreignNotional': 49287664.831925206}, {'timestamp': datetime.datetime(2020, 8, 24, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 396.5, 'high': 399.45, 'low': 396.55, 'close': 398.8, 'trades': 5059, 'volume': 3577812, 'vwap': 398.46, 'lastSize': 80, 'turnover': 142559138395, 'homeNotional': 42086.673425493376, 'foreignNotional': 16769588.023284247}, {'timestamp': datetime.datetime(2020, 8, 24, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 393.25, 'high': 396.8, 'low': 392.55, 'close': 396.5, 'trades': 5755, 'volume': 4161600, 'vwap': 395.16, 'lastSize': 10, 'turnover': 164448528955, 'homeNotional': 48672.689769950775, 'foreignNotional': 19233421.80372407}] 2020-08-24 12:00:20 INFO: prepare candles [CandleItem(low=398.75, high=408.8, open=398.8, close=405.7, color='GREEN'), CandleItem(low=396.55, high=399.45, open=396.5, close=398.8, color='GREEN'), CandleItem(low=392.55, high=396.8, open=393.25, close=396.5, color='GREEN')] 2020-08-24 12:00:20 INFO: skip by colors first_candle=CandleItem(low=392.55, high=396.8, open=393.25, close=396.5, color='GREEN') second_candle=CandleItem(low=396.55, high=399.45, open=396.5, close=398.8, color='GREEN') last_candle=CandleItem(low=398.75, high=408.8, open=398.8, close=405.7, color='GREEN') 2020-08-24 12:00:20 INFO: check need new order None 2020-08-24 12:00:20 INFO: init new order end 2020-08-24 12:00:20 INFO: 2020-08-24 12:00:20 INFO: 2020-08-24 12:00:20 INFO: 2020-08-24 12:00:20 INFO: 2020-08-24 12:02:00 INFO: 2020-08-24 12:02:00 INFO: 2020-08-24 12:02:00 INFO: 2020-08-24 12:02:00 INFO: 2020-08-24 12:02:00 INFO: clearing start 2020-08-24 12:02:00 INFO: clearing end 2020-08-24 12:02:00 INFO: 2020-08-24 12:02:00 INFO: 2020-08-24 12:02:00 INFO: 2020-08-24 12:02:00 INFO: 2020-08-24 13:00:20 INFO: 2020-08-24 13:00:20 INFO: 2020-08-24 13:00:20 INFO: 2020-08-24 13:00:20 INFO: 2020-08-24 13:00:20 INFO: init new order start 2020-08-24 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 24, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.7, 'high': 406.5, 'low': 404.15, 'close': 405.9, 'trades': 3806, 'volume': 2153823, 'vwap': 405.39, 'lastSize': 57, 'turnover': 87311733890, 'homeNotional': 25373.933490515803, 'foreignNotional': 10286103.311113166}, {'timestamp': datetime.datetime(2020, 8, 24, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 398.8, 'high': 408.8, 'low': 398.75, 'close': 405.7, 'trades': 11458, 'volume': 10344756, 'vwap': 404.33, 'lastSize': 12, 'turnover': 418261812965, 'homeNotional': 121901.49377823749, 'foreignNotional': 49287664.831925206}, {'timestamp': datetime.datetime(2020, 8, 24, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 396.5, 'high': 399.45, 'low': 396.55, 'close': 398.8, 'trades': 5059, 'volume': 3577812, 'vwap': 398.46, 'lastSize': 80, 'turnover': 142559138395, 'homeNotional': 42086.673425493376, 'foreignNotional': 16769588.023284247}] 2020-08-24 13:00:20 INFO: prepare candles [CandleItem(low=404.15, high=406.5, open=405.7, close=405.9, color='GREEN'), CandleItem(low=398.75, high=408.8, open=398.8, close=405.7, color='GREEN'), CandleItem(low=396.55, high=399.45, open=396.5, close=398.8, color='GREEN')] 2020-08-24 13:00:20 INFO: skip by colors first_candle=CandleItem(low=396.55, high=399.45, open=396.5, close=398.8, color='GREEN') second_candle=CandleItem(low=398.75, high=408.8, open=398.8, close=405.7, color='GREEN') last_candle=CandleItem(low=404.15, high=406.5, open=405.7, close=405.9, color='GREEN') 2020-08-24 13:00:20 INFO: check need new order None 2020-08-24 13:00:20 INFO: init new order end 2020-08-24 13:00:20 INFO: 2020-08-24 13:00:20 INFO: 2020-08-24 13:00:20 INFO: 2020-08-24 13:00:20 INFO: 2020-08-24 13:02:00 INFO: 2020-08-24 13:02:00 INFO: 2020-08-24 13:02:00 INFO: 2020-08-24 13:02:00 INFO: 2020-08-24 13:02:00 INFO: clearing start 2020-08-24 13:02:00 INFO: clearing end 2020-08-24 13:02:00 INFO: 2020-08-24 13:02:00 INFO: 2020-08-24 13:02:00 INFO: 2020-08-24 13:02:00 INFO: 2020-08-24 14:00:20 INFO: 2020-08-24 14:00:20 INFO: 2020-08-24 14:00:20 INFO: 2020-08-24 14:00:20 INFO: 2020-08-24 14:00:20 INFO: init new order start 2020-08-24 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 24, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.9, 'high': 407.0, 'low': 404.8, 'close': 406.05, 'trades': 2619, 'volume': 2054352, 'vwap': 406.12, 'lastSize': 50, 'turnover': 83429664375, 'homeNotional': 24222.180971787166, 'foreignNotional': 9836921.859148629}, {'timestamp': datetime.datetime(2020, 8, 24, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.7, 'high': 406.5, 'low': 404.15, 'close': 405.9, 'trades': 3806, 'volume': 2153823, 'vwap': 405.39, 'lastSize': 57, 'turnover': 87311733890, 'homeNotional': 25373.933490515803, 'foreignNotional': 10286103.311113166}, {'timestamp': datetime.datetime(2020, 8, 24, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 398.8, 'high': 408.8, 'low': 398.75, 'close': 405.7, 'trades': 11458, 'volume': 10344756, 'vwap': 404.33, 'lastSize': 12, 'turnover': 418261812965, 'homeNotional': 121901.49377823749, 'foreignNotional': 49287664.831925206}] 2020-08-24 14:00:20 INFO: prepare candles [CandleItem(low=404.8, high=407.0, open=405.9, close=406.05, color='GREEN'), CandleItem(low=404.15, high=406.5, open=405.7, close=405.9, color='GREEN'), CandleItem(low=398.75, high=408.8, open=398.8, close=405.7, color='GREEN')] 2020-08-24 14:00:20 INFO: skip by colors first_candle=CandleItem(low=398.75, high=408.8, open=398.8, close=405.7, color='GREEN') second_candle=CandleItem(low=404.15, high=406.5, open=405.7, close=405.9, color='GREEN') last_candle=CandleItem(low=404.8, high=407.0, open=405.9, close=406.05, color='GREEN') 2020-08-24 14:00:20 INFO: check need new order None 2020-08-24 14:00:20 INFO: init new order end 2020-08-24 14:00:20 INFO: 2020-08-24 14:00:20 INFO: 2020-08-24 14:00:20 INFO: 2020-08-24 14:00:20 INFO: 2020-08-24 14:02:00 INFO: 2020-08-24 14:02:00 INFO: 2020-08-24 14:02:00 INFO: 2020-08-24 14:02:00 INFO: 2020-08-24 14:02:00 INFO: clearing start 2020-08-24 14:02:00 INFO: clearing end 2020-08-24 14:02:00 INFO: 2020-08-24 14:02:00 INFO: 2020-08-24 14:02:00 INFO: 2020-08-24 14:02:00 INFO: 2020-08-24 15:00:20 INFO: 2020-08-24 15:00:20 INFO: 2020-08-24 15:00:20 INFO: 2020-08-24 15:00:20 INFO: 2020-08-24 15:00:20 INFO: init new order start 2020-08-24 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 24, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 406.05, 'high': 409.0, 'low': 406.05, 'close': 407.25, 'trades': 3595, 'volume': 3163536, 'vwap': 407.76, 'lastSize': 122, 'turnover': 128994954460, 'homeNotional': 37341.76584807704, 'foreignNotional': 15226328.375386396}, {'timestamp': datetime.datetime(2020, 8, 24, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.9, 'high': 407.0, 'low': 404.8, 'close': 406.05, 'trades': 2619, 'volume': 2054352, 'vwap': 406.12, 'lastSize': 50, 'turnover': 83429664375, 'homeNotional': 24222.180971787166, 'foreignNotional': 9836921.859148629}, {'timestamp': datetime.datetime(2020, 8, 24, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.7, 'high': 406.5, 'low': 404.15, 'close': 405.9, 'trades': 3806, 'volume': 2153823, 'vwap': 405.39, 'lastSize': 57, 'turnover': 87311733890, 'homeNotional': 25373.933490515803, 'foreignNotional': 10286103.311113166}] 2020-08-24 15:00:20 INFO: prepare candles [CandleItem(low=406.05, high=409.0, open=406.05, close=407.25, color='GREEN'), CandleItem(low=404.8, high=407.0, open=405.9, close=406.05, color='GREEN'), CandleItem(low=404.15, high=406.5, open=405.7, close=405.9, color='GREEN')] 2020-08-24 15:00:20 INFO: skip by colors first_candle=CandleItem(low=404.15, high=406.5, open=405.7, close=405.9, color='GREEN') second_candle=CandleItem(low=404.8, high=407.0, open=405.9, close=406.05, color='GREEN') last_candle=CandleItem(low=406.05, high=409.0, open=406.05, close=407.25, color='GREEN') 2020-08-24 15:00:20 INFO: check need new order None 2020-08-24 15:00:20 INFO: init new order end 2020-08-24 15:00:20 INFO: 2020-08-24 15:00:20 INFO: 2020-08-24 15:00:20 INFO: 2020-08-24 15:00:20 INFO: 2020-08-24 15:02:00 INFO: 2020-08-24 15:02:00 INFO: 2020-08-24 15:02:00 INFO: 2020-08-24 15:02:00 INFO: 2020-08-24 15:02:00 INFO: clearing start 2020-08-24 15:02:00 INFO: clearing end 2020-08-24 15:02:00 INFO: 2020-08-24 15:02:00 INFO: 2020-08-24 15:02:00 INFO: 2020-08-24 15:02:00 INFO: 2020-08-24 16:00:20 INFO: 2020-08-24 16:00:20 INFO: 2020-08-24 16:00:20 INFO: 2020-08-24 16:00:20 INFO: 2020-08-24 16:00:20 INFO: init new order start 2020-08-24 16:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 24, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 407.25, 'high': 409.05, 'low': 406.35, 'close': 406.35, 'trades': 3213, 'volume': 2350212, 'vwap': 407.77, 'lastSize': 288, 'turnover': 95833999105, 'homeNotional': 27729.471187500054, 'foreignNotional': 11307190.408112166}, {'timestamp': datetime.datetime(2020, 8, 24, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 406.05, 'high': 409.0, 'low': 406.05, 'close': 407.25, 'trades': 3595, 'volume': 3163536, 'vwap': 407.76, 'lastSize': 122, 'turnover': 128994954460, 'homeNotional': 37341.76584807704, 'foreignNotional': 15226328.375386396}, {'timestamp': datetime.datetime(2020, 8, 24, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.9, 'high': 407.0, 'low': 404.8, 'close': 406.05, 'trades': 2619, 'volume': 2054352, 'vwap': 406.12, 'lastSize': 50, 'turnover': 83429664375, 'homeNotional': 24222.180971787166, 'foreignNotional': 9836921.859148629}] 2020-08-24 16:00:20 INFO: prepare candles [CandleItem(low=406.35, high=409.05, open=407.25, close=406.35, color='RED'), CandleItem(low=406.05, high=409.0, open=406.05, close=407.25, color='GREEN'), CandleItem(low=404.8, high=407.0, open=405.9, close=406.05, color='GREEN')] 2020-08-24 16:00:20 INFO: last_candle=CandleItem(low=406.35, high=409.05, open=407.25, close=406.35, color='RED') 2020-08-24 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-08-24 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=406.35, high=409.05, open=407.25, close=406.35, color='RED') 2020-08-24 16:00:20 INFO: skip by CandleItem(low=406.35, high=409.05, open=407.25, close=406.35, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-24 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-08-24 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=406.35, high=409.05, open=407.25, close=406.35, color='RED') 2020-08-24 16:00:20 INFO: skip by CandleItem(low=406.35, high=409.05, open=407.25, close=406.35, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-24 16:00:20 INFO: not found applicable config for candle 2020-08-24 16:00:20 INFO: check need new order None 2020-08-24 16:00:20 INFO: init new order end 2020-08-24 16:00:20 INFO: 2020-08-24 16:00:20 INFO: 2020-08-24 16:00:20 INFO: 2020-08-24 16:00:20 INFO: 2020-08-24 16:02:00 INFO: 2020-08-24 16:02:00 INFO: 2020-08-24 16:02:00 INFO: 2020-08-24 16:02:00 INFO: 2020-08-24 16:02:00 INFO: clearing start 2020-08-24 16:02:00 INFO: clearing end 2020-08-24 16:02:00 INFO: 2020-08-24 16:02:00 INFO: 2020-08-24 16:02:00 INFO: 2020-08-24 16:02:00 INFO: 2020-08-24 17:00:20 INFO: 2020-08-24 17:00:20 INFO: 2020-08-24 17:00:20 INFO: 2020-08-24 17:00:20 INFO: 2020-08-24 17:00:20 INFO: init new order start 2020-08-24 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 24, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 406.35, 'high': 408.25, 'low': 406.2, 'close': 406.2, 'trades': 2537, 'volume': 2005383, 'vwap': 407.11, 'lastSize': 400, 'turnover': 81639568605, 'homeNotional': 23622.657785119154, 'foreignNotional': 9616839.010913376}, {'timestamp': datetime.datetime(2020, 8, 24, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 407.25, 'high': 409.05, 'low': 406.35, 'close': 406.35, 'trades': 3213, 'volume': 2350212, 'vwap': 407.77, 'lastSize': 288, 'turnover': 95833999105, 'homeNotional': 27729.471187500054, 'foreignNotional': 11307190.408112166}, {'timestamp': datetime.datetime(2020, 8, 24, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 406.05, 'high': 409.0, 'low': 406.05, 'close': 407.25, 'trades': 3595, 'volume': 3163536, 'vwap': 407.76, 'lastSize': 122, 'turnover': 128994954460, 'homeNotional': 37341.76584807704, 'foreignNotional': 15226328.375386396}] 2020-08-24 17:00:20 INFO: prepare candles [CandleItem(low=406.2, high=408.25, open=406.35, close=406.2, color='RED'), CandleItem(low=406.35, high=409.05, open=407.25, close=406.35, color='RED'), CandleItem(low=406.05, high=409.0, open=406.05, close=407.25, color='GREEN')] 2020-08-24 17:00:20 INFO: skip by colors first_candle=CandleItem(low=406.05, high=409.0, open=406.05, close=407.25, color='GREEN') second_candle=CandleItem(low=406.35, high=409.05, open=407.25, close=406.35, color='RED') last_candle=CandleItem(low=406.2, high=408.25, open=406.35, close=406.2, color='RED') 2020-08-24 17:00:20 INFO: check need new order None 2020-08-24 17:00:20 INFO: init new order end 2020-08-24 17:00:20 INFO: 2020-08-24 17:00:20 INFO: 2020-08-24 17:00:20 INFO: 2020-08-24 17:00:20 INFO: 2020-08-24 17:02:00 INFO: 2020-08-24 17:02:00 INFO: 2020-08-24 17:02:00 INFO: 2020-08-24 17:02:00 INFO: 2020-08-24 17:02:00 INFO: clearing start 2020-08-24 17:02:00 INFO: clearing end 2020-08-24 17:02:00 INFO: 2020-08-24 17:02:00 INFO: 2020-08-24 17:02:00 INFO: 2020-08-24 17:02:00 INFO: 2020-08-24 18:00:20 INFO: 2020-08-24 18:00:20 INFO: 2020-08-24 18:00:20 INFO: 2020-08-24 18:00:20 INFO: 2020-08-24 18:00:20 INFO: init new order start 2020-08-24 18:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 24, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 406.2, 'high': 407.2, 'low': 402.35, 'close': 403.0, 'trades': 5591, 'volume': 4495451, 'vwap': 404.86, 'lastSize': 3540, 'turnover': 182000571475, 'homeNotional': 52872.88924206842, 'foreignNotional': 21405903.007420227}, {'timestamp': datetime.datetime(2020, 8, 24, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 406.35, 'high': 408.25, 'low': 406.2, 'close': 406.2, 'trades': 2537, 'volume': 2005383, 'vwap': 407.11, 'lastSize': 400, 'turnover': 81639568605, 'homeNotional': 23622.657785119154, 'foreignNotional': 9616839.010913376}, {'timestamp': datetime.datetime(2020, 8, 24, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 407.25, 'high': 409.05, 'low': 406.35, 'close': 406.35, 'trades': 3213, 'volume': 2350212, 'vwap': 407.77, 'lastSize': 288, 'turnover': 95833999105, 'homeNotional': 27729.471187500054, 'foreignNotional': 11307190.408112166}] 2020-08-24 18:00:20 INFO: prepare candles [CandleItem(low=402.35, high=407.2, open=406.2, close=403.0, color='RED'), CandleItem(low=406.2, high=408.25, open=406.35, close=406.2, color='RED'), CandleItem(low=406.35, high=409.05, open=407.25, close=406.35, color='RED')] 2020-08-24 18:00:20 INFO: skip by colors first_candle=CandleItem(low=406.35, high=409.05, open=407.25, close=406.35, color='RED') second_candle=CandleItem(low=406.2, high=408.25, open=406.35, close=406.2, color='RED') last_candle=CandleItem(low=402.35, high=407.2, open=406.2, close=403.0, color='RED') 2020-08-24 18:00:20 INFO: check need new order None 2020-08-24 18:00:20 INFO: init new order end 2020-08-24 18:00:20 INFO: 2020-08-24 18:00:20 INFO: 2020-08-24 18:00:20 INFO: 2020-08-24 18:00:20 INFO: 2020-08-24 18:02:00 INFO: 2020-08-24 18:02:00 INFO: 2020-08-24 18:02:00 INFO: 2020-08-24 18:02:00 INFO: 2020-08-24 18:02:00 INFO: clearing start 2020-08-24 18:02:00 INFO: clearing end 2020-08-24 18:02:00 INFO: 2020-08-24 18:02:00 INFO: 2020-08-24 18:02:00 INFO: 2020-08-24 18:02:00 INFO: 2020-08-24 19:00:20 INFO: 2020-08-24 19:00:20 INFO: 2020-08-24 19:00:20 INFO: 2020-08-24 19:00:20 INFO: 2020-08-24 19:00:20 INFO: init new order start 2020-08-24 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 24, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 403.0, 'high': 403.95, 'low': 401.75, 'close': 403.5, 'trades': 3590, 'volume': 3213300, 'vwap': 402.83, 'lastSize': 3000, 'turnover': 129440121155, 'homeNotional': 37736.992227392606, 'foreignNotional': 15201451.886222582}, {'timestamp': datetime.datetime(2020, 8, 24, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 406.2, 'high': 407.2, 'low': 402.35, 'close': 403.0, 'trades': 5591, 'volume': 4495451, 'vwap': 404.86, 'lastSize': 3540, 'turnover': 182000571475, 'homeNotional': 52872.88924206842, 'foreignNotional': 21405903.007420227}, {'timestamp': datetime.datetime(2020, 8, 24, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 406.35, 'high': 408.25, 'low': 406.2, 'close': 406.2, 'trades': 2537, 'volume': 2005383, 'vwap': 407.11, 'lastSize': 400, 'turnover': 81639568605, 'homeNotional': 23622.657785119154, 'foreignNotional': 9616839.010913376}] 2020-08-24 19:00:20 INFO: prepare candles [CandleItem(low=401.75, high=403.95, open=403.0, close=403.5, color='GREEN'), CandleItem(low=402.35, high=407.2, open=406.2, close=403.0, color='RED'), CandleItem(low=406.2, high=408.25, open=406.35, close=406.2, color='RED')] 2020-08-24 19:00:20 INFO: last_candle=CandleItem(low=401.75, high=403.95, open=403.0, close=403.5, color='GREEN') 2020-08-24 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-08-24 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=401.75, high=403.95, open=403.0, close=403.5, color='GREEN') 2020-08-24 19:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=402.35, high=407.2, open=406.2, close=403.0, color='RED') 2020-08-24 19:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=406.2, high=408.25, open=406.35, close=406.2, color='RED') 2020-08-24 19:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=401.75, high=403.95, open=403.0, close=403.5, color='GREEN'), take_profit_factor=6.0, clearing_interval=3600) 2020-08-24 19:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=401.75, high=403.95, open=403.0, close=403.5, color='GREEN'), take_profit_factor=6.0, clearing_interval=3600) 2020-08-24 19:00:20 INFO: place order: start candle=CandleItem(low=401.75, high=403.95, open=403.0, close=403.5, color='GREEN') ticker='ETHUSD' price_offset=0.1 2020-08-24 19:00:20 INFO: place order: side_factor=-1 init_trigger_price=404.0 init_order_price=404.05 stop_price_offset=0.0 candle.size=2.1999999999999886 stop_price=401.75 take_price=417.24999999999994 2020-08-24 19:00:20 INFO: place order round: side_factor=-1 init_trigger_price=Decimal('404') init_order_price=Decimal('404.05000000000001136868377216160297393798828125') stop_price_offset=0.0 candle.size=2.1999999999999886 stop_price=Decimal('401.75') take_price=Decimal('417.24999999999994315658113919198513031005859375') 2020-08-24 19:00:20 INFO: place order: compute qty=844 2020-08-24 19:00:20 INFO: place order: save order to db 3cda34fd24354c93a7f37dc9713b9335; response=True 2020-08-24 19:00:20 INFO: post order to exchange resp={'orderID': '00a93060-b1d2-ef89-ba6b-4939febfc0dc', 'clOrdID': '3cda34fd24354c93a7f37dc9713b9335', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 844, 'price': 404.05, 'displayQty': None, 'stopPx': 404.0, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 844, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 24, 16, 0, 20, 720000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 24, 16, 0, 20, 720000, tzinfo=tzutc())} 2020-08-24 19:00:20 INFO: place new init order {'qty': 844, 'init_price': Decimal('404'), 'stop_price': Decimal('401.75'), 'take_price': Decimal('417.24999999999994315658113919198513031005859375'), 'order_uid': '3cda34fd24354c93a7f37dc9713b9335', 'response': {'orderID': '00a93060-b1d2-ef89-ba6b-4939febfc0dc', 'clOrdID': '3cda34fd24354c93a7f37dc9713b9335', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 844, 'price': 404.05, 'displayQty': None, 'stopPx': 404.0, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 844, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 24, 16, 0, 20, 720000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 24, 16, 0, 20, 720000, tzinfo=tzutc())}} 2020-08-24 19:00:20 INFO: init new order end 2020-08-24 19:00:20 INFO: 2020-08-24 19:00:20 INFO: 2020-08-24 19:00:20 INFO: 2020-08-24 19:00:20 INFO: 2020-08-24 19:00:20 INFO: process event {'orderID': '00a93060-b1d2-ef89-ba6b-4939febfc0dc', 'clOrdID': '3cda34fd24354c93a7f37dc9713b9335', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 844, 'price': 404.05, 'displayQty': None, 'stopPx': 404, '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': 844, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-08-24T16:00:20.720Z', 'timestamp': '2020-08-24T16:00:20.720Z'} 2020-08-24 19:00:20 INFO: skip event 3cda34fd24354c93a7f37dc9713b9335 New 2020-08-24 19:02:00 INFO: 2020-08-24 19:02:00 INFO: 2020-08-24 19:02:00 INFO: 2020-08-24 19:02:00 INFO: 2020-08-24 19:02:00 INFO: clearing start 2020-08-24 19:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '00a93060-b1d2-ef89-ba6b-4939febfc0dc', 'clOrdID': '3cda34fd24354c93a7f37dc9713b9335', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 844, 'price': 404.05, 'displayQty': None, 'stopPx': 404.0, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'StopLimit', 'timeInForce': 'GoodTillCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 844, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 24, 16, 0, 20, 720000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 24, 16, 0, 20, 720000, tzinfo=tzutc())} 2020-08-24 19:02:00 INFO: order time=2020-08-24 16:00:20.720000+00:00; delta from now UTC=0:01:40.215589 time_delta.total_seconds()=100.215589; time_diff_offset='3600' 2020-08-24 19:02:00 INFO: skip by time diff 2020-08-24 16:00:20.720000+00:00 2020-08-24 19:02:00 INFO: clearing end 2020-08-24 19:02:00 INFO: 2020-08-24 19:02:00 INFO: 2020-08-24 19:02:00 INFO: 2020-08-24 19:02:00 INFO: 2020-08-24 19:19:59 INFO: process event {'orderID': '00a93060-b1d2-ef89-ba6b-4939febfc0dc', 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 844, 'avgPx': 404, 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'transactTime': '2020-08-24T16:19:59.898Z', 'timestamp': '2020-08-24T16:19:59.898Z', 'clOrdID': '3cda34fd24354c93a7f37dc9713b9335', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-24 19:19:59 INFO: add new event={'uid': '3cda34fd24354c93a7f37dc9713b9335', 'status': 'Filled'} 2020-08-24 19:20:00 INFO: 2020-08-24 19:20:00 INFO: 2020-08-24 19:20:00 INFO: 2020-08-24 19:20:00 INFO: 2020-08-24 19:20:00 INFO: process event start 2020-08-24 19:20:00 INFO: fetch new order event 3cda34fd24354c93a7f37dc9713b9335 2020-08-24 19:20:00 INFO: fetch orders by event init={'stop': '401.75', 'take': '417.24999999999994315658113919198513031005859375', 'qty': '844', 'color': 'GREEN', 'ticker': 'ETHUSD', 'clearing_offset': '3600'} profit_pair=None 2020-08-24 19:20:00 INFO: process init order filled 2020-08-24 19:20:00 INFO: save profit orders to storage stop=4ff1b9c0ec2b493ca2452d5429c4066d take=1ac2dd126095482190687030ffeb2241 2020-08-24 19:20:00 INFO: place profit orders take_price=417.24999999999994315658113919198513031005859375, stop_price=401.75, qty=844, color=GREEN, ticker=ETHUSD 4ff1b9c0ec2b493ca2452d5429c4066d 1ac2dd126095482190687030ffeb2241 2020-08-24 19:20:00 INFO: place stop order ETHUSD: qty=-844, stop_price=401.75, stop_uid=4ff1b9c0ec2b493ca2452d5429c4066d 2020-08-24 19:20:00 INFO: exchange resp for stop order={'orderID': 'cb1fc595-6582-618f-4b66-45b3409d2ea8', 'clOrdID': '4ff1b9c0ec2b493ca2452d5429c4066d', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 844, 'price': None, 'displayQty': None, 'stopPx': 401.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': 844, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 24, 16, 20, 0, 829000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 24, 16, 20, 0, 829000, tzinfo=tzutc())} 2020-08-24 19:20:00 INFO: place limit order ETHUSD: qty=-844, price=417.24999999999994315658113919198513031005859375, take_uid=1ac2dd126095482190687030ffeb2241 2020-08-24 19:20:00 INFO: exchange resp for take profit order={'orderID': '422541c0-8de4-dc6b-4b04-af6936189f05', 'clOrdID': '1ac2dd126095482190687030ffeb2241', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 844, 'price': 417.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': 844, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 24, 16, 20, 0, 868000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 24, 16, 20, 0, 868000, tzinfo=tzutc())} 2020-08-24 19:20:00 INFO: place profit orders={'stop': {'response': {'orderID': 'cb1fc595-6582-618f-4b66-45b3409d2ea8', 'clOrdID': '4ff1b9c0ec2b493ca2452d5429c4066d', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 844, 'price': None, 'displayQty': None, 'stopPx': 401.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': 844, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 24, 16, 20, 0, 829000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 24, 16, 20, 0, 829000, tzinfo=tzutc())}, 'qty': Decimal('-844'), 'uid': '4ff1b9c0ec2b493ca2452d5429c4066d', 'price': Decimal('401.75')}, 'take': {'response': {'orderID': '422541c0-8de4-dc6b-4b04-af6936189f05', 'clOrdID': '1ac2dd126095482190687030ffeb2241', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 844, 'price': 417.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': 844, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 24, 16, 20, 0, 868000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 24, 16, 20, 0, 868000, tzinfo=tzutc())}, 'qty': Decimal('-844'), 'uid': '1ac2dd126095482190687030ffeb2241', 'price': Decimal('417.24999999999994315658113919198513031005859375')}} 2020-08-24 19:20:00 INFO: rm init order from db 3cda34fd24354c93a7f37dc9713b9335 2020-08-24 19:20:00 INFO: end process event_processing_result='proceed init order' 2020-08-24 19:20:00 INFO: 2020-08-24 19:20:00 INFO: 2020-08-24 19:20:00 INFO: 2020-08-24 19:20:00 INFO: 2020-08-24 19:20:01 INFO: process event {'orderID': 'cb1fc595-6582-618f-4b66-45b3409d2ea8', 'clOrdID': '4ff1b9c0ec2b493ca2452d5429c4066d', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 844, 'price': None, 'displayQty': None, 'stopPx': 401.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': 844, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': '2020-08-24T16:20:00.829Z', 'timestamp': '2020-08-24T16:20:00.829Z'} 2020-08-24 19:20:01 INFO: skip event 4ff1b9c0ec2b493ca2452d5429c4066d New 2020-08-24 19:20:01 INFO: process event {'orderID': '422541c0-8de4-dc6b-4b04-af6936189f05', 'clOrdID': '1ac2dd126095482190687030ffeb2241', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 844, 'price': 417.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': 844, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': '2020-08-24T16:20:00.868Z', 'timestamp': '2020-08-24T16:20:00.868Z'} 2020-08-24 19:20:01 INFO: skip event 1ac2dd126095482190687030ffeb2241 New 2020-08-24 20:00:20 INFO: 2020-08-24 20:00:20 INFO: 2020-08-24 20:00:20 INFO: 2020-08-24 20:00:20 INFO: 2020-08-24 20:00:20 INFO: init new order start 2020-08-24 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 24, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 403.5, 'high': 405.65, 'low': 402.25, 'close': 404.6, 'trades': 3331, 'volume': 2494156, 'vwap': 403.94, 'lastSize': 50, 'turnover': 100747562245, 'homeNotional': 29343.524322941048, 'foreignNotional': 11852879.85959032}, {'timestamp': datetime.datetime(2020, 8, 24, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 403.0, 'high': 403.95, 'low': 401.75, 'close': 403.5, 'trades': 3590, 'volume': 3213300, 'vwap': 402.83, 'lastSize': 3000, 'turnover': 129440121155, 'homeNotional': 37736.992227392606, 'foreignNotional': 15201451.886222582}, {'timestamp': datetime.datetime(2020, 8, 24, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 406.2, 'high': 407.2, 'low': 402.35, 'close': 403.0, 'trades': 5591, 'volume': 4495451, 'vwap': 404.86, 'lastSize': 3540, 'turnover': 182000571475, 'homeNotional': 52872.88924206842, 'foreignNotional': 21405903.007420227}] 2020-08-24 20:00:20 INFO: prepare candles [CandleItem(low=402.25, high=405.65, open=403.5, close=404.6, color='GREEN'), CandleItem(low=401.75, high=403.95, open=403.0, close=403.5, color='GREEN'), CandleItem(low=402.35, high=407.2, open=406.2, close=403.0, color='RED')] 2020-08-24 20:00:20 INFO: skip by colors first_candle=CandleItem(low=402.35, high=407.2, open=406.2, close=403.0, color='RED') second_candle=CandleItem(low=401.75, high=403.95, open=403.0, close=403.5, color='GREEN') last_candle=CandleItem(low=402.25, high=405.65, open=403.5, close=404.6, color='GREEN') 2020-08-24 20:00:20 INFO: check need new order None 2020-08-24 20:00:20 INFO: init new order end 2020-08-24 20:00:20 INFO: 2020-08-24 20:00:20 INFO: 2020-08-24 20:00:20 INFO: 2020-08-24 20:00:20 INFO: 2020-08-24 20:02:00 INFO: 2020-08-24 20:02:00 INFO: 2020-08-24 20:02:00 INFO: 2020-08-24 20:02:00 INFO: 2020-08-24 20:02:00 INFO: clearing start 2020-08-24 20:02:01 INFO: fetch_orders_for_clearing test order {'orderID': 'cb1fc595-6582-618f-4b66-45b3409d2ea8', 'clOrdID': '4ff1b9c0ec2b493ca2452d5429c4066d', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 844, 'price': None, 'displayQty': None, 'stopPx': 401.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': 844, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 24, 16, 20, 0, 829000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 24, 16, 20, 0, 829000, tzinfo=tzutc())} 2020-08-24 20:02:01 INFO: skip by not found init order into storage 2020-08-24 20:02:01 INFO: fetch_orders_for_clearing test order {'orderID': '422541c0-8de4-dc6b-4b04-af6936189f05', 'clOrdID': '1ac2dd126095482190687030ffeb2241', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 844, 'price': 417.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': 844, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 24, 16, 20, 0, 868000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 24, 16, 20, 0, 868000, tzinfo=tzutc())} 2020-08-24 20:02:01 INFO: skip by not found init order into storage 2020-08-24 20:02:01 INFO: clearing end 2020-08-24 20:02:01 INFO: 2020-08-24 20:02:01 INFO: 2020-08-24 20:02:01 INFO: 2020-08-24 20:02:01 INFO: 2020-08-24 21:00:20 INFO: 2020-08-24 21:00:20 INFO: 2020-08-24 21:00:20 INFO: 2020-08-24 21:00:20 INFO: 2020-08-24 21:00:20 INFO: init new order start 2020-08-24 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 24, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 404.6, 'high': 404.9, 'low': 403.3, 'close': 403.65, 'trades': 1850, 'volume': 875203, 'vwap': 403.8, 'lastSize': 10, 'turnover': 35340576485, 'homeNotional': 10286.067063863255, 'foreignNotional': 4153500.6607250874}, {'timestamp': datetime.datetime(2020, 8, 24, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 403.5, 'high': 405.65, 'low': 402.25, 'close': 404.6, 'trades': 3331, 'volume': 2494156, 'vwap': 403.94, 'lastSize': 50, 'turnover': 100747562245, 'homeNotional': 29343.524322941048, 'foreignNotional': 11852879.85959032}, {'timestamp': datetime.datetime(2020, 8, 24, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 403.0, 'high': 403.95, 'low': 401.75, 'close': 403.5, 'trades': 3590, 'volume': 3213300, 'vwap': 402.83, 'lastSize': 3000, 'turnover': 129440121155, 'homeNotional': 37736.992227392606, 'foreignNotional': 15201451.886222582}] 2020-08-24 21:00:20 INFO: prepare candles [CandleItem(low=403.3, high=404.9, open=404.6, close=403.65, color='RED'), CandleItem(low=402.25, high=405.65, open=403.5, close=404.6, color='GREEN'), CandleItem(low=401.75, high=403.95, open=403.0, close=403.5, color='GREEN')] 2020-08-24 21:00:20 INFO: last_candle=CandleItem(low=403.3, high=404.9, open=404.6, close=403.65, color='RED') 2020-08-24 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-24 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=403.3, high=404.9, open=404.6, close=403.65, color='RED') 2020-08-24 21:00:20 INFO: skip by CandleItem(low=403.3, high=404.9, open=404.6, close=403.65, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-24 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-24 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=403.3, high=404.9, open=404.6, close=403.65, color='RED') 2020-08-24 21:00:20 INFO: skip by CandleItem(low=403.3, high=404.9, open=404.6, close=403.65, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-24 21:00:20 INFO: not found applicable config for candle 2020-08-24 21:00:20 INFO: check need new order None 2020-08-24 21:00:20 INFO: init new order end 2020-08-24 21:00:20 INFO: 2020-08-24 21:00:20 INFO: 2020-08-24 21:00:20 INFO: 2020-08-24 21:00:20 INFO: 2020-08-24 21:02:00 INFO: 2020-08-24 21:02:00 INFO: 2020-08-24 21:02:00 INFO: 2020-08-24 21:02:00 INFO: 2020-08-24 21:02:00 INFO: clearing start 2020-08-24 21:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'cb1fc595-6582-618f-4b66-45b3409d2ea8', 'clOrdID': '4ff1b9c0ec2b493ca2452d5429c4066d', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 844, 'price': None, 'displayQty': None, 'stopPx': 401.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': 844, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 24, 16, 20, 0, 829000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 24, 16, 20, 0, 829000, tzinfo=tzutc())} 2020-08-24 21:02:00 INFO: skip by not found init order into storage 2020-08-24 21:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '422541c0-8de4-dc6b-4b04-af6936189f05', 'clOrdID': '1ac2dd126095482190687030ffeb2241', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 844, 'price': 417.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': 844, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 24, 16, 20, 0, 868000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 24, 16, 20, 0, 868000, tzinfo=tzutc())} 2020-08-24 21:02:00 INFO: skip by not found init order into storage 2020-08-24 21:02:00 INFO: clearing end 2020-08-24 21:02:00 INFO: 2020-08-24 21:02:00 INFO: 2020-08-24 21:02:00 INFO: 2020-08-24 21:02:00 INFO: 2020-08-24 21:16:13 INFO: process event {'orderID': 'cb1fc595-6582-618f-4b66-45b3409d2ea8', 'price': 401.7, 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 844, 'avgPx': 401.7, 'text': 'Triggered: Order stop price reached\nStop order by trader.py', 'transactTime': '2020-08-24T18:16:13.429Z', 'timestamp': '2020-08-24T18:16:13.429Z', 'clOrdID': '4ff1b9c0ec2b493ca2452d5429c4066d', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-24 21:16:13 INFO: add new event={'uid': '4ff1b9c0ec2b493ca2452d5429c4066d', 'status': 'Filled'} 2020-08-24 21:16:13 INFO: 2020-08-24 21:16:13 INFO: 2020-08-24 21:16:13 INFO: 2020-08-24 21:16:13 INFO: 2020-08-24 21:16:13 INFO: process event start 2020-08-24 21:16:13 INFO: fetch new order event 4ff1b9c0ec2b493ca2452d5429c4066d 2020-08-24 21:16:13 INFO: fetch orders by event init=None profit_pair=1ac2dd126095482190687030ffeb2241 2020-08-24 21:16:13 INFO: process profit order filled 2020-08-24 21:16:13 INFO: process event {'orderID': '422541c0-8de4-dc6b-4b04-af6936189f05', 'ordStatus': 'Canceled', 'workingIndicator': False, 'leavesQty': 0, 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'timestamp': '2020-08-24T18:16:13.797Z', 'clOrdID': '1ac2dd126095482190687030ffeb2241', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-24 21:16:13 INFO: skip event 1ac2dd126095482190687030ffeb2241 Canceled 2020-08-24 21:16:13 INFO: cancel order=1ac2dd126095482190687030ffeb2241 [{'orderID': '422541c0-8de4-dc6b-4b04-af6936189f05', 'clOrdID': '1ac2dd126095482190687030ffeb2241', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 844, 'price': 417.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, 24, 16, 20, 0, 868000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 24, 18, 16, 13, 797000, tzinfo=tzutc())}] 2020-08-24 21:16:13 INFO: end process event_processing_result='proceed profit order' 2020-08-24 21:16:13 INFO: 2020-08-24 21:16:13 INFO: 2020-08-24 21:16:13 INFO: 2020-08-24 21:16:13 INFO: 2020-08-24 22:00:20 INFO: 2020-08-24 22:00:20 INFO: 2020-08-24 22:00:20 INFO: 2020-08-24 22:00:20 INFO: 2020-08-24 22:00:20 INFO: init new order start 2020-08-24 22:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 24, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 403.65, 'high': 404.15, 'low': 400.5, 'close': 401.9, 'trades': 3659, 'volume': 3053377, 'vwap': 401.88, 'lastSize': 200, 'turnover': 122707508015, 'homeNotional': 35839.17719848604, 'foreignNotional': 14402887.234590432}, {'timestamp': datetime.datetime(2020, 8, 24, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 404.6, 'high': 404.9, 'low': 403.3, 'close': 403.65, 'trades': 1850, 'volume': 875203, 'vwap': 403.8, 'lastSize': 10, 'turnover': 35340576485, 'homeNotional': 10286.067063863255, 'foreignNotional': 4153500.6607250874}, {'timestamp': datetime.datetime(2020, 8, 24, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 403.5, 'high': 405.65, 'low': 402.25, 'close': 404.6, 'trades': 3331, 'volume': 2494156, 'vwap': 403.94, 'lastSize': 50, 'turnover': 100747562245, 'homeNotional': 29343.524322941048, 'foreignNotional': 11852879.85959032}] 2020-08-24 22:00:21 INFO: prepare candles [CandleItem(low=400.5, high=404.15, open=403.65, close=401.9, color='RED'), CandleItem(low=403.3, high=404.9, open=404.6, close=403.65, color='RED'), CandleItem(low=402.25, high=405.65, open=403.5, close=404.6, color='GREEN')] 2020-08-24 22:00:21 INFO: skip by colors first_candle=CandleItem(low=402.25, high=405.65, open=403.5, close=404.6, color='GREEN') second_candle=CandleItem(low=403.3, high=404.9, open=404.6, close=403.65, color='RED') last_candle=CandleItem(low=400.5, high=404.15, open=403.65, close=401.9, color='RED') 2020-08-24 22:00:21 INFO: check need new order None 2020-08-24 22:00:21 INFO: init new order end 2020-08-24 22:00:21 INFO: 2020-08-24 22:00:21 INFO: 2020-08-24 22:00:21 INFO: 2020-08-24 22:00:21 INFO: 2020-08-24 22:02:00 INFO: 2020-08-24 22:02:00 INFO: 2020-08-24 22:02:00 INFO: 2020-08-24 22:02:00 INFO: 2020-08-24 22:02:00 INFO: clearing start 2020-08-24 22:02:00 INFO: clearing end 2020-08-24 22:02:00 INFO: 2020-08-24 22:02:00 INFO: 2020-08-24 22:02:00 INFO: 2020-08-24 22:02:00 INFO: 2020-08-24 23:00:20 INFO: 2020-08-24 23:00:20 INFO: 2020-08-24 23:00:20 INFO: 2020-08-24 23:00:20 INFO: 2020-08-24 23:00:20 INFO: init new order start 2020-08-24 23:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 24, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 401.9, 'high': 403.85, 'low': 398.85, 'close': 403.3, 'trades': 4477, 'volume': 2996905, 'vwap': 400.92, 'lastSize': 11, 'turnover': 120150095435, 'homeNotional': 35135.38029243365, 'foreignNotional': 14086311.688058227}, {'timestamp': datetime.datetime(2020, 8, 24, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 403.65, 'high': 404.15, 'low': 400.5, 'close': 401.9, 'trades': 3659, 'volume': 3053377, 'vwap': 401.88, 'lastSize': 200, 'turnover': 122707508015, 'homeNotional': 35839.17719848604, 'foreignNotional': 14402887.234590432}, {'timestamp': datetime.datetime(2020, 8, 24, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 404.6, 'high': 404.9, 'low': 403.3, 'close': 403.65, 'trades': 1850, 'volume': 875203, 'vwap': 403.8, 'lastSize': 10, 'turnover': 35340576485, 'homeNotional': 10286.067063863255, 'foreignNotional': 4153500.6607250874}] 2020-08-24 23:00:20 INFO: prepare candles [CandleItem(low=398.85, high=403.85, open=401.9, close=403.3, color='GREEN'), CandleItem(low=400.5, high=404.15, open=403.65, close=401.9, color='RED'), CandleItem(low=403.3, high=404.9, open=404.6, close=403.65, color='RED')] 2020-08-24 23:00:20 INFO: last_candle=CandleItem(low=398.85, high=403.85, open=401.9, close=403.3, color='GREEN') 2020-08-24 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-24 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=398.85, high=403.85, open=401.9, close=403.3, color='GREEN') 2020-08-24 23:00:20 INFO: skip by CandleItem(low=398.85, high=403.85, open=401.9, close=403.3, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-24 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-24 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=398.85, high=403.85, open=401.9, close=403.3, color='GREEN') 2020-08-24 23:00:20 INFO: skip by CandleItem(low=398.85, high=403.85, open=401.9, close=403.3, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-24 23:00:20 INFO: not found applicable config for candle 2020-08-24 23:00:20 INFO: check need new order None 2020-08-24 23:00:20 INFO: init new order end 2020-08-24 23:00:20 INFO: 2020-08-24 23:00:20 INFO: 2020-08-24 23:00:20 INFO: 2020-08-24 23:00:20 INFO: 2020-08-24 23:02:00 INFO: 2020-08-24 23:02:00 INFO: 2020-08-24 23:02:00 INFO: 2020-08-24 23:02:00 INFO: 2020-08-24 23:02:00 INFO: clearing start 2020-08-24 23:02:00 INFO: clearing end 2020-08-24 23:02:00 INFO: 2020-08-24 23:02:00 INFO: 2020-08-24 23:02:00 INFO: 2020-08-24 23:02:00 INFO: 2020-08-25 00:00:20 INFO: 2020-08-25 00:00:20 INFO: 2020-08-25 00:00:20 INFO: 2020-08-25 00:00:20 INFO: 2020-08-25 00:00:20 INFO: init new order start 2020-08-25 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 24, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 403.3, 'high': 404.0, 'low': 401.55, 'close': 401.85, 'trades': 3253, 'volume': 2208737, 'vwap': 402.69, 'lastSize': 80, 'turnover': 88941756530, 'homeNotional': 25912.587585864232, 'foreignNotional': 10434532.87833972}, {'timestamp': datetime.datetime(2020, 8, 24, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 401.9, 'high': 403.85, 'low': 398.85, 'close': 403.3, 'trades': 4477, 'volume': 2996905, 'vwap': 400.92, 'lastSize': 11, 'turnover': 120150095435, 'homeNotional': 35135.38029243365, 'foreignNotional': 14086311.688058227}, {'timestamp': datetime.datetime(2020, 8, 24, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 403.65, 'high': 404.15, 'low': 400.5, 'close': 401.9, 'trades': 3659, 'volume': 3053377, 'vwap': 401.88, 'lastSize': 200, 'turnover': 122707508015, 'homeNotional': 35839.17719848604, 'foreignNotional': 14402887.234590432}] 2020-08-25 00:00:20 INFO: prepare candles [CandleItem(low=401.55, high=404.0, open=403.3, close=401.85, color='RED'), CandleItem(low=398.85, high=403.85, open=401.9, close=403.3, color='GREEN'), CandleItem(low=400.5, high=404.15, open=403.65, close=401.9, color='RED')] 2020-08-25 00:00:20 INFO: skip by colors first_candle=CandleItem(low=400.5, high=404.15, open=403.65, close=401.9, color='RED') second_candle=CandleItem(low=398.85, high=403.85, open=401.9, close=403.3, color='GREEN') last_candle=CandleItem(low=401.55, high=404.0, open=403.3, close=401.85, color='RED') 2020-08-25 00:00:20 INFO: check need new order None 2020-08-25 00:00:20 INFO: init new order end 2020-08-25 00:00:20 INFO: 2020-08-25 00:00:20 INFO: 2020-08-25 00:00:20 INFO: 2020-08-25 00:00:20 INFO: 2020-08-25 00:02:00 INFO: 2020-08-25 00:02:00 INFO: 2020-08-25 00:02:00 INFO: 2020-08-25 00:02:00 INFO: 2020-08-25 00:02:00 INFO: clearing start 2020-08-25 00:02:00 INFO: clearing end 2020-08-25 00:02:00 INFO: 2020-08-25 00:02:00 INFO: 2020-08-25 00:02:00 INFO: 2020-08-25 00:02:00 INFO: 2020-08-25 01:00:20 INFO: 2020-08-25 01:00:20 INFO: 2020-08-25 01:00:20 INFO: 2020-08-25 01:00:20 INFO: 2020-08-25 01:00:20 INFO: init new order start 2020-08-25 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 24, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 401.85, 'high': 408.3, 'low': 401.3, 'close': 406.6, 'trades': 6901, 'volume': 3734963, 'vwap': 405.88, 'lastSize': 11, 'turnover': 151593299865, 'homeNotional': 43909.46819936331, 'foreignNotional': 17821887.404250994}, {'timestamp': datetime.datetime(2020, 8, 24, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 403.3, 'high': 404.0, 'low': 401.55, 'close': 401.85, 'trades': 3253, 'volume': 2208737, 'vwap': 402.69, 'lastSize': 80, 'turnover': 88941756530, 'homeNotional': 25912.587585864232, 'foreignNotional': 10434532.87833972}, {'timestamp': datetime.datetime(2020, 8, 24, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 401.9, 'high': 403.85, 'low': 398.85, 'close': 403.3, 'trades': 4477, 'volume': 2996905, 'vwap': 400.92, 'lastSize': 11, 'turnover': 120150095435, 'homeNotional': 35135.38029243365, 'foreignNotional': 14086311.688058227}] 2020-08-25 01:00:20 INFO: prepare candles [CandleItem(low=401.3, high=408.3, open=401.85, close=406.6, color='GREEN'), CandleItem(low=401.55, high=404.0, open=403.3, close=401.85, color='RED'), CandleItem(low=398.85, high=403.85, open=401.9, close=403.3, color='GREEN')] 2020-08-25 01:00:20 INFO: skip by colors first_candle=CandleItem(low=398.85, high=403.85, open=401.9, close=403.3, color='GREEN') second_candle=CandleItem(low=401.55, high=404.0, open=403.3, close=401.85, color='RED') last_candle=CandleItem(low=401.3, high=408.3, open=401.85, close=406.6, color='GREEN') 2020-08-25 01:00:20 INFO: check need new order None 2020-08-25 01:00:20 INFO: init new order end 2020-08-25 01:00:20 INFO: 2020-08-25 01:00:20 INFO: 2020-08-25 01:00:20 INFO: 2020-08-25 01:00:20 INFO: 2020-08-25 01:02:00 INFO: 2020-08-25 01:02:00 INFO: 2020-08-25 01:02:00 INFO: 2020-08-25 01:02:00 INFO: 2020-08-25 01:02:00 INFO: clearing start 2020-08-25 01:02:00 INFO: clearing end 2020-08-25 01:02:00 INFO: 2020-08-25 01:02:00 INFO: 2020-08-25 01:02:00 INFO: 2020-08-25 01:02:00 INFO: 2020-08-25 02:00:20 INFO: 2020-08-25 02:00:20 INFO: 2020-08-25 02:00:20 INFO: 2020-08-25 02:00:20 INFO: 2020-08-25 02:00:20 INFO: init new order start 2020-08-25 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 24, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 406.6, 'high': 407.95, 'low': 405.8, 'close': 406.95, 'trades': 3382, 'volume': 1876578, 'vwap': 406.72, 'lastSize': 13, 'turnover': 76323367130, 'homeNotional': 22052.551911342787, 'foreignNotional': 8969122.748978827}, {'timestamp': datetime.datetime(2020, 8, 24, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 401.85, 'high': 408.3, 'low': 401.3, 'close': 406.6, 'trades': 6901, 'volume': 3734963, 'vwap': 405.88, 'lastSize': 11, 'turnover': 151593299865, 'homeNotional': 43909.46819936331, 'foreignNotional': 17821887.404250994}, {'timestamp': datetime.datetime(2020, 8, 24, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 403.3, 'high': 404.0, 'low': 401.55, 'close': 401.85, 'trades': 3253, 'volume': 2208737, 'vwap': 402.69, 'lastSize': 80, 'turnover': 88941756530, 'homeNotional': 25912.587585864232, 'foreignNotional': 10434532.87833972}] 2020-08-25 02:00:20 INFO: prepare candles [CandleItem(low=405.8, high=407.95, open=406.6, close=406.95, color='GREEN'), CandleItem(low=401.3, high=408.3, open=401.85, close=406.6, color='GREEN'), CandleItem(low=401.55, high=404.0, open=403.3, close=401.85, color='RED')] 2020-08-25 02:00:20 INFO: skip by colors first_candle=CandleItem(low=401.55, high=404.0, open=403.3, close=401.85, color='RED') second_candle=CandleItem(low=401.3, high=408.3, open=401.85, close=406.6, color='GREEN') last_candle=CandleItem(low=405.8, high=407.95, open=406.6, close=406.95, color='GREEN') 2020-08-25 02:00:20 INFO: check need new order None 2020-08-25 02:00:20 INFO: init new order end 2020-08-25 02:00:20 INFO: 2020-08-25 02:00:20 INFO: 2020-08-25 02:00:20 INFO: 2020-08-25 02:00:20 INFO: 2020-08-25 02:02:00 INFO: 2020-08-25 02:02:00 INFO: 2020-08-25 02:02:00 INFO: 2020-08-25 02:02:00 INFO: 2020-08-25 02:02:00 INFO: clearing start 2020-08-25 02:02:00 INFO: clearing end 2020-08-25 02:02:00 INFO: 2020-08-25 02:02:00 INFO: 2020-08-25 02:02:00 INFO: 2020-08-25 02:02:00 INFO: 2020-08-25 03:00:20 INFO: 2020-08-25 03:00:20 INFO: 2020-08-25 03:00:20 INFO: 2020-08-25 03:00:20 INFO: 2020-08-25 03:00:20 INFO: init new order start 2020-08-25 03:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 25, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 406.95, 'high': 410.35, 'low': 406.1, 'close': 408.15, 'trades': 4149, 'volume': 3397077, 'vwap': 408.72, 'lastSize': 11, 'turnover': 138843966240, 'homeNotional': 39994.954467058924, 'foreignNotional': 16346601.97065499}, {'timestamp': datetime.datetime(2020, 8, 24, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 406.6, 'high': 407.95, 'low': 405.8, 'close': 406.95, 'trades': 3382, 'volume': 1876578, 'vwap': 406.72, 'lastSize': 13, 'turnover': 76323367130, 'homeNotional': 22052.551911342787, 'foreignNotional': 8969122.748978827}, {'timestamp': datetime.datetime(2020, 8, 24, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 401.85, 'high': 408.3, 'low': 401.3, 'close': 406.6, 'trades': 6901, 'volume': 3734963, 'vwap': 405.88, 'lastSize': 11, 'turnover': 151593299865, 'homeNotional': 43909.46819936331, 'foreignNotional': 17821887.404250994}] 2020-08-25 03:00:21 INFO: prepare candles [CandleItem(low=406.1, high=410.35, open=406.95, close=408.15, color='GREEN'), CandleItem(low=405.8, high=407.95, open=406.6, close=406.95, color='GREEN'), CandleItem(low=401.3, high=408.3, open=401.85, close=406.6, color='GREEN')] 2020-08-25 03:00:21 INFO: skip by colors first_candle=CandleItem(low=401.3, high=408.3, open=401.85, close=406.6, color='GREEN') second_candle=CandleItem(low=405.8, high=407.95, open=406.6, close=406.95, color='GREEN') last_candle=CandleItem(low=406.1, high=410.35, open=406.95, close=408.15, color='GREEN') 2020-08-25 03:00:21 INFO: check need new order None 2020-08-25 03:00:21 INFO: init new order end 2020-08-25 03:00:21 INFO: 2020-08-25 03:00:21 INFO: 2020-08-25 03:00:21 INFO: 2020-08-25 03:00:21 INFO: 2020-08-25 03:02:00 INFO: 2020-08-25 03:02:00 INFO: 2020-08-25 03:02:00 INFO: 2020-08-25 03:02:00 INFO: 2020-08-25 03:02:00 INFO: clearing start 2020-08-25 03:02:00 INFO: clearing end 2020-08-25 03:02:00 INFO: 2020-08-25 03:02:00 INFO: 2020-08-25 03:02:00 INFO: 2020-08-25 03:02:00 INFO: 2020-08-25 04:00:20 INFO: 2020-08-25 04:00:20 INFO: 2020-08-25 04:00:20 INFO: 2020-08-25 04:00:20 INFO: 2020-08-25 04:00:20 INFO: init new order start 2020-08-25 04:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 25, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 408.15, 'high': 409.15, 'low': 405.05, 'close': 405.65, 'trades': 3738, 'volume': 1905120, 'vwap': 406.98, 'lastSize': 11, 'turnover': 77533094820, 'homeNotional': 22390.88010014708, 'foreignNotional': 9112478.681592697}, {'timestamp': datetime.datetime(2020, 8, 25, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 406.95, 'high': 410.35, 'low': 406.1, 'close': 408.15, 'trades': 4149, 'volume': 3397077, 'vwap': 408.72, 'lastSize': 11, 'turnover': 138843966240, 'homeNotional': 39994.954467058924, 'foreignNotional': 16346601.97065499}, {'timestamp': datetime.datetime(2020, 8, 24, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 406.6, 'high': 407.95, 'low': 405.8, 'close': 406.95, 'trades': 3382, 'volume': 1876578, 'vwap': 406.72, 'lastSize': 13, 'turnover': 76323367130, 'homeNotional': 22052.551911342787, 'foreignNotional': 8969122.748978827}] 2020-08-25 04:00:20 INFO: prepare candles [CandleItem(low=405.05, high=409.15, open=408.15, close=405.65, color='RED'), CandleItem(low=406.1, high=410.35, open=406.95, close=408.15, color='GREEN'), CandleItem(low=405.8, high=407.95, open=406.6, close=406.95, color='GREEN')] 2020-08-25 04:00:20 INFO: last_candle=CandleItem(low=405.05, high=409.15, open=408.15, close=405.65, color='RED') 2020-08-25 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-25 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=405.05, high=409.15, open=408.15, close=405.65, color='RED') 2020-08-25 04:00:20 INFO: skip by CandleItem(low=405.05, high=409.15, open=408.15, close=405.65, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-25 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-25 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=405.05, high=409.15, open=408.15, close=405.65, color='RED') 2020-08-25 04:00:20 INFO: skip by CandleItem(low=405.05, high=409.15, open=408.15, close=405.65, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-25 04:00:20 INFO: not found applicable config for candle 2020-08-25 04:00:20 INFO: check need new order None 2020-08-25 04:00:20 INFO: init new order end 2020-08-25 04:00:20 INFO: 2020-08-25 04:00:20 INFO: 2020-08-25 04:00:20 INFO: 2020-08-25 04:00:20 INFO: 2020-08-25 04:02:00 INFO: 2020-08-25 04:02:00 INFO: 2020-08-25 04:02:00 INFO: 2020-08-25 04:02:00 INFO: 2020-08-25 04:02:00 INFO: clearing start 2020-08-25 04:02:00 INFO: clearing end 2020-08-25 04:02:00 INFO: 2020-08-25 04:02:00 INFO: 2020-08-25 04:02:00 INFO: 2020-08-25 04:02:00 INFO: 2020-08-25 05:00:39 INFO: 2020-08-25 05:00:39 INFO: 2020-08-25 05:00:39 INFO: 2020-08-25 05:00:39 INFO: 2020-08-25 05:00:39 INFO: init new order start 2020-08-25 05:00:39 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 25, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.65, 'high': 406.8, 'low': 405.25, 'close': 406.2, 'trades': 1722, 'volume': 1185746, 'vwap': 406.1, 'lastSize': 60, 'turnover': 48152708930, 'homeNotional': 13934.19943680248, 'foreignNotional': 5658630.732253229}, {'timestamp': datetime.datetime(2020, 8, 25, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 408.15, 'high': 409.15, 'low': 405.05, 'close': 405.65, 'trades': 3738, 'volume': 1905120, 'vwap': 406.98, 'lastSize': 11, 'turnover': 77533094820, 'homeNotional': 22390.88010014708, 'foreignNotional': 9112478.681592697}, {'timestamp': datetime.datetime(2020, 8, 25, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 406.95, 'high': 410.35, 'low': 406.1, 'close': 408.15, 'trades': 4149, 'volume': 3397077, 'vwap': 408.72, 'lastSize': 11, 'turnover': 138843966240, 'homeNotional': 39994.954467058924, 'foreignNotional': 16346601.97065499}] 2020-08-25 05:00:39 INFO: prepare candles [CandleItem(low=405.25, high=406.8, open=405.65, close=406.2, color='GREEN'), CandleItem(low=405.05, high=409.15, open=408.15, close=405.65, color='RED'), CandleItem(low=406.1, high=410.35, open=406.95, close=408.15, color='GREEN')] 2020-08-25 05:00:39 INFO: skip by colors first_candle=CandleItem(low=406.1, high=410.35, open=406.95, close=408.15, color='GREEN') second_candle=CandleItem(low=405.05, high=409.15, open=408.15, close=405.65, color='RED') last_candle=CandleItem(low=405.25, high=406.8, open=405.65, close=406.2, color='GREEN') 2020-08-25 05:00:39 INFO: check need new order None 2020-08-25 05:00:39 INFO: init new order end 2020-08-25 05:00:39 INFO: 2020-08-25 05:00:39 INFO: 2020-08-25 05:00:39 INFO: 2020-08-25 05:00:39 INFO: 2020-08-25 05:02:00 INFO: 2020-08-25 05:02:00 INFO: 2020-08-25 05:02:00 INFO: 2020-08-25 05:02:00 INFO: 2020-08-25 05:02:00 INFO: clearing start 2020-08-25 05:02:00 INFO: clearing end 2020-08-25 05:02:00 INFO: 2020-08-25 05:02:00 INFO: 2020-08-25 05:02:00 INFO: 2020-08-25 05:02:00 INFO: 2020-08-25 06:00:20 INFO: 2020-08-25 06:00:20 INFO: 2020-08-25 06:00:20 INFO: 2020-08-25 06:00:20 INFO: 2020-08-25 06:00:20 INFO: init new order start 2020-08-25 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 25, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 406.2, 'high': 406.25, 'low': 400.85, 'close': 401.5, 'trades': 4467, 'volume': 3396662, 'vwap': 403.13, 'lastSize': 1000, 'turnover': 136926750440, 'homeNotional': 39793.417127367116, 'foreignNotional': 16041674.9533378}, {'timestamp': datetime.datetime(2020, 8, 25, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.65, 'high': 406.8, 'low': 405.25, 'close': 406.2, 'trades': 1722, 'volume': 1185746, 'vwap': 406.1, 'lastSize': 60, 'turnover': 48152708930, 'homeNotional': 13934.19943680248, 'foreignNotional': 5658630.732253229}, {'timestamp': datetime.datetime(2020, 8, 25, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 408.15, 'high': 409.15, 'low': 405.05, 'close': 405.65, 'trades': 3738, 'volume': 1905120, 'vwap': 406.98, 'lastSize': 11, 'turnover': 77533094820, 'homeNotional': 22390.88010014708, 'foreignNotional': 9112478.681592697}] 2020-08-25 06:00:20 INFO: prepare candles [CandleItem(low=400.85, high=406.25, open=406.2, close=401.5, color='RED'), CandleItem(low=405.25, high=406.8, open=405.65, close=406.2, color='GREEN'), CandleItem(low=405.05, high=409.15, open=408.15, close=405.65, color='RED')] 2020-08-25 06:00:20 INFO: skip by colors first_candle=CandleItem(low=405.05, high=409.15, open=408.15, close=405.65, color='RED') second_candle=CandleItem(low=405.25, high=406.8, open=405.65, close=406.2, color='GREEN') last_candle=CandleItem(low=400.85, high=406.25, open=406.2, close=401.5, color='RED') 2020-08-25 06:00:20 INFO: check need new order None 2020-08-25 06:00:20 INFO: init new order end 2020-08-25 06:00:20 INFO: 2020-08-25 06:00:20 INFO: 2020-08-25 06:00:20 INFO: 2020-08-25 06:00:20 INFO: 2020-08-25 06:02:00 INFO: 2020-08-25 06:02:00 INFO: 2020-08-25 06:02:00 INFO: 2020-08-25 06:02:00 INFO: 2020-08-25 06:02:00 INFO: clearing start 2020-08-25 06:02:00 INFO: clearing end 2020-08-25 06:02:00 INFO: 2020-08-25 06:02:00 INFO: 2020-08-25 06:02:00 INFO: 2020-08-25 06:02:00 INFO: 2020-08-25 07:00:20 INFO: 2020-08-25 07:00:20 INFO: 2020-08-25 07:00:20 INFO: 2020-08-25 07:00:20 INFO: 2020-08-25 07:00:20 INFO: init new order start 2020-08-25 07:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 25, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 401.5, 'high': 402.45, 'low': 400.75, 'close': 401.4, 'trades': 2212, 'volume': 1714143, 'vwap': 401.46, 'lastSize': 3000, 'turnover': 68815494780, 'homeNotional': 20020.44741700201, 'foreignNotional': 8037354.7804200305}, {'timestamp': datetime.datetime(2020, 8, 25, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 406.2, 'high': 406.25, 'low': 400.85, 'close': 401.5, 'trades': 4467, 'volume': 3396662, 'vwap': 403.13, 'lastSize': 1000, 'turnover': 136926750440, 'homeNotional': 39793.417127367116, 'foreignNotional': 16041674.9533378}, {'timestamp': datetime.datetime(2020, 8, 25, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 405.65, 'high': 406.8, 'low': 405.25, 'close': 406.2, 'trades': 1722, 'volume': 1185746, 'vwap': 406.1, 'lastSize': 60, 'turnover': 48152708930, 'homeNotional': 13934.19943680248, 'foreignNotional': 5658630.732253229}] 2020-08-25 07:00:21 INFO: prepare candles [CandleItem(low=400.75, high=402.45, open=401.5, close=401.4, color='RED'), CandleItem(low=400.85, high=406.25, open=406.2, close=401.5, color='RED'), CandleItem(low=405.25, high=406.8, open=405.65, close=406.2, color='GREEN')] 2020-08-25 07:00:21 INFO: skip by colors first_candle=CandleItem(low=405.25, high=406.8, open=405.65, close=406.2, color='GREEN') second_candle=CandleItem(low=400.85, high=406.25, open=406.2, close=401.5, color='RED') last_candle=CandleItem(low=400.75, high=402.45, open=401.5, close=401.4, color='RED') 2020-08-25 07:00:21 INFO: check need new order None 2020-08-25 07:00:21 INFO: init new order end 2020-08-25 07:00:21 INFO: 2020-08-25 07:00:21 INFO: 2020-08-25 07:00:21 INFO: 2020-08-25 07:00:21 INFO: 2020-08-25 07:02:00 INFO: 2020-08-25 07:02:00 INFO: 2020-08-25 07:02:00 INFO: 2020-08-25 07:02:00 INFO: 2020-08-25 07:02:00 INFO: clearing start 2020-08-25 07:02:00 INFO: clearing end 2020-08-25 07:02:00 INFO: 2020-08-25 07:02:00 INFO: 2020-08-25 07:02:00 INFO: 2020-08-25 07:02:00 INFO: 2020-08-25 08:00:20 INFO: 2020-08-25 08:00:20 INFO: 2020-08-25 08:00:20 INFO: 2020-08-25 08:00:20 INFO: 2020-08-25 08:00:20 INFO: init new order start 2020-08-25 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 25, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 401.4, 'high': 402.85, 'low': 400.2, 'close': 402.45, 'trades': 2500, 'volume': 2213794, 'vwap': 401.65, 'lastSize': 11, 'turnover': 88915984530, 'homeNotional': 25836.023299918492, 'foreignNotional': 10376929.846364075}, {'timestamp': datetime.datetime(2020, 8, 25, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 401.5, 'high': 402.45, 'low': 400.75, 'close': 401.4, 'trades': 2212, 'volume': 1714143, 'vwap': 401.46, 'lastSize': 3000, 'turnover': 68815494780, 'homeNotional': 20020.44741700201, 'foreignNotional': 8037354.7804200305}, {'timestamp': datetime.datetime(2020, 8, 25, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 406.2, 'high': 406.25, 'low': 400.85, 'close': 401.5, 'trades': 4467, 'volume': 3396662, 'vwap': 403.13, 'lastSize': 1000, 'turnover': 136926750440, 'homeNotional': 39793.417127367116, 'foreignNotional': 16041674.9533378}] 2020-08-25 08:00:20 INFO: prepare candles [CandleItem(low=400.2, high=402.85, open=401.4, close=402.45, color='GREEN'), CandleItem(low=400.75, high=402.45, open=401.5, close=401.4, color='RED'), CandleItem(low=400.85, high=406.25, open=406.2, close=401.5, color='RED')] 2020-08-25 08:00:20 INFO: last_candle=CandleItem(low=400.2, high=402.85, open=401.4, close=402.45, color='GREEN') 2020-08-25 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-08-25 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=400.2, high=402.85, open=401.4, close=402.45, color='GREEN') 2020-08-25 08:00:20 INFO: skip by CandleItem(low=400.2, high=402.85, open=401.4, close=402.45, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-25 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-08-25 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=400.2, high=402.85, open=401.4, close=402.45, color='GREEN') 2020-08-25 08:00:20 INFO: skip by CandleItem(low=400.2, high=402.85, open=401.4, close=402.45, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-25 08:00:20 INFO: not found applicable config for candle 2020-08-25 08:00:20 INFO: check need new order None 2020-08-25 08:00:20 INFO: init new order end 2020-08-25 08:00:20 INFO: 2020-08-25 08:00:20 INFO: 2020-08-25 08:00:20 INFO: 2020-08-25 08:00:20 INFO: 2020-08-25 08:02:00 INFO: 2020-08-25 08:02:00 INFO: 2020-08-25 08:02:00 INFO: 2020-08-25 08:02:00 INFO: 2020-08-25 08:02:00 INFO: clearing start 2020-08-25 08:02:00 INFO: clearing end 2020-08-25 08:02:00 INFO: 2020-08-25 08:02:00 INFO: 2020-08-25 08:02:00 INFO: 2020-08-25 08:02:00 INFO: 2020-08-25 09:00:20 INFO: 2020-08-25 09:00:20 INFO: 2020-08-25 09:00:20 INFO: 2020-08-25 09:00:20 INFO: 2020-08-25 09:00:20 INFO: init new order start 2020-08-25 09:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 25, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 402.45, 'high': 403.2, 'low': 400.45, 'close': 400.7, 'trades': 2003, 'volume': 1722298, 'vwap': 401.78, 'lastSize': 4500, 'turnover': 69197132460, 'homeNotional': 20121.35097364635, 'foreignNotional': 8084205.876791507}, {'timestamp': datetime.datetime(2020, 8, 25, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 401.4, 'high': 402.85, 'low': 400.2, 'close': 402.45, 'trades': 2500, 'volume': 2213794, 'vwap': 401.65, 'lastSize': 11, 'turnover': 88915984530, 'homeNotional': 25836.023299918492, 'foreignNotional': 10376929.846364075}, {'timestamp': datetime.datetime(2020, 8, 25, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 401.5, 'high': 402.45, 'low': 400.75, 'close': 401.4, 'trades': 2212, 'volume': 1714143, 'vwap': 401.46, 'lastSize': 3000, 'turnover': 68815494780, 'homeNotional': 20020.44741700201, 'foreignNotional': 8037354.7804200305}] 2020-08-25 09:00:20 INFO: prepare candles [CandleItem(low=400.45, high=403.2, open=402.45, close=400.7, color='RED'), CandleItem(low=400.2, high=402.85, open=401.4, close=402.45, color='GREEN'), CandleItem(low=400.75, high=402.45, open=401.5, close=401.4, color='RED')] 2020-08-25 09:00:20 INFO: skip by colors first_candle=CandleItem(low=400.75, high=402.45, open=401.5, close=401.4, color='RED') second_candle=CandleItem(low=400.2, high=402.85, open=401.4, close=402.45, color='GREEN') last_candle=CandleItem(low=400.45, high=403.2, open=402.45, close=400.7, color='RED') 2020-08-25 09:00:20 INFO: check need new order None 2020-08-25 09:00:20 INFO: init new order end 2020-08-25 09:00:20 INFO: 2020-08-25 09:00:20 INFO: 2020-08-25 09:00:20 INFO: 2020-08-25 09:00:20 INFO: 2020-08-25 09:02:00 INFO: 2020-08-25 09:02:00 INFO: 2020-08-25 09:02:00 INFO: 2020-08-25 09:02:00 INFO: 2020-08-25 09:02:00 INFO: clearing start 2020-08-25 09:02:01 INFO: clearing end 2020-08-25 09:02:01 INFO: 2020-08-25 09:02:01 INFO: 2020-08-25 09:02:01 INFO: 2020-08-25 09:02:01 INFO: 2020-08-25 10:00:20 INFO: 2020-08-25 10:00:20 INFO: 2020-08-25 10:00:20 INFO: 2020-08-25 10:00:20 INFO: 2020-08-25 10:00:20 INFO: init new order start 2020-08-25 10:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 25, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 400.7, 'high': 400.8, 'low': 396.65, 'close': 397.45, 'trades': 5664, 'volume': 4535579, 'vwap': 398.58, 'lastSize': 1429, 'turnover': 180777915460, 'homeNotional': 52780.42547266606, 'foreignNotional': 21037187.927457333}, {'timestamp': datetime.datetime(2020, 8, 25, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 402.45, 'high': 403.2, 'low': 400.45, 'close': 400.7, 'trades': 2003, 'volume': 1722298, 'vwap': 401.78, 'lastSize': 4500, 'turnover': 69197132460, 'homeNotional': 20121.35097364635, 'foreignNotional': 8084205.876791507}, {'timestamp': datetime.datetime(2020, 8, 25, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 401.4, 'high': 402.85, 'low': 400.2, 'close': 402.45, 'trades': 2500, 'volume': 2213794, 'vwap': 401.65, 'lastSize': 11, 'turnover': 88915984530, 'homeNotional': 25836.023299918492, 'foreignNotional': 10376929.846364075}] 2020-08-25 10:00:20 INFO: prepare candles [CandleItem(low=396.65, high=400.8, open=400.7, close=397.45, color='RED'), CandleItem(low=400.45, high=403.2, open=402.45, close=400.7, color='RED'), CandleItem(low=400.2, high=402.85, open=401.4, close=402.45, color='GREEN')] 2020-08-25 10:00:20 INFO: skip by colors first_candle=CandleItem(low=400.2, high=402.85, open=401.4, close=402.45, color='GREEN') second_candle=CandleItem(low=400.45, high=403.2, open=402.45, close=400.7, color='RED') last_candle=CandleItem(low=396.65, high=400.8, open=400.7, close=397.45, color='RED') 2020-08-25 10:00:20 INFO: check need new order None 2020-08-25 10:00:20 INFO: init new order end 2020-08-25 10:00:20 INFO: 2020-08-25 10:00:20 INFO: 2020-08-25 10:00:20 INFO: 2020-08-25 10:00:20 INFO: 2020-08-25 10:02:00 INFO: 2020-08-25 10:02:00 INFO: 2020-08-25 10:02:00 INFO: 2020-08-25 10:02:00 INFO: 2020-08-25 10:02:00 INFO: clearing start 2020-08-25 10:02:00 INFO: clearing end 2020-08-25 10:02:00 INFO: 2020-08-25 10:02:00 INFO: 2020-08-25 10:02:00 INFO: 2020-08-25 10:02:00 INFO: 2020-08-25 11:00:20 INFO: 2020-08-25 11:00:20 INFO: 2020-08-25 11:00:20 INFO: 2020-08-25 11:00:20 INFO: 2020-08-25 11:00:20 INFO: init new order start 2020-08-25 11:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 25, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 397.45, 'high': 397.45, 'low': 392.5, 'close': 395.4, 'trades': 6322, 'volume': 5553434, 'vwap': 395.1, 'lastSize': 2910, 'turnover': 219414215920, 'homeNotional': 64288.50316642415, 'foreignNotional': 25400229.99539571}, {'timestamp': datetime.datetime(2020, 8, 25, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 400.7, 'high': 400.8, 'low': 396.65, 'close': 397.45, 'trades': 5664, 'volume': 4535579, 'vwap': 398.58, 'lastSize': 1429, 'turnover': 180777915460, 'homeNotional': 52780.42547266606, 'foreignNotional': 21037187.927457333}, {'timestamp': datetime.datetime(2020, 8, 25, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 402.45, 'high': 403.2, 'low': 400.45, 'close': 400.7, 'trades': 2003, 'volume': 1722298, 'vwap': 401.78, 'lastSize': 4500, 'turnover': 69197132460, 'homeNotional': 20121.35097364635, 'foreignNotional': 8084205.876791507}] 2020-08-25 11:00:20 INFO: prepare candles [CandleItem(low=392.5, high=397.45, open=397.45, close=395.4, color='RED'), CandleItem(low=396.65, high=400.8, open=400.7, close=397.45, color='RED'), CandleItem(low=400.45, high=403.2, open=402.45, close=400.7, color='RED')] 2020-08-25 11:00:20 INFO: skip by colors first_candle=CandleItem(low=400.45, high=403.2, open=402.45, close=400.7, color='RED') second_candle=CandleItem(low=396.65, high=400.8, open=400.7, close=397.45, color='RED') last_candle=CandleItem(low=392.5, high=397.45, open=397.45, close=395.4, color='RED') 2020-08-25 11:00:20 INFO: check need new order None 2020-08-25 11:00:20 INFO: init new order end 2020-08-25 11:00:20 INFO: 2020-08-25 11:00:20 INFO: 2020-08-25 11:00:20 INFO: 2020-08-25 11:00:20 INFO: 2020-08-25 11:02:00 INFO: 2020-08-25 11:02:00 INFO: 2020-08-25 11:02:00 INFO: 2020-08-25 11:02:00 INFO: 2020-08-25 11:02:00 INFO: clearing start 2020-08-25 11:02:00 INFO: clearing end 2020-08-25 11:02:00 INFO: 2020-08-25 11:02:00 INFO: 2020-08-25 11:02:00 INFO: 2020-08-25 11:02:00 INFO: 2020-08-25 12:00:20 INFO: 2020-08-25 12:00:20 INFO: 2020-08-25 12:00:20 INFO: 2020-08-25 12:00:20 INFO: 2020-08-25 12:00:20 INFO: init new order start 2020-08-25 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 25, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 395.4, 'high': 395.4, 'low': 389.8, 'close': 394.15, 'trades': 7200, 'volume': 7480887, 'vwap': 392.46, 'lastSize': 24, 'turnover': 293593531360, 'homeNotional': 86441.4466552746, 'foreignNotional': 33924828.47658897}, {'timestamp': datetime.datetime(2020, 8, 25, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 397.45, 'high': 397.45, 'low': 392.5, 'close': 395.4, 'trades': 6322, 'volume': 5553434, 'vwap': 395.1, 'lastSize': 2910, 'turnover': 219414215920, 'homeNotional': 64288.50316642415, 'foreignNotional': 25400229.99539571}, {'timestamp': datetime.datetime(2020, 8, 25, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 400.7, 'high': 400.8, 'low': 396.65, 'close': 397.45, 'trades': 5664, 'volume': 4535579, 'vwap': 398.58, 'lastSize': 1429, 'turnover': 180777915460, 'homeNotional': 52780.42547266606, 'foreignNotional': 21037187.927457333}] 2020-08-25 12:00:20 INFO: prepare candles [CandleItem(low=389.8, high=395.4, open=395.4, close=394.15, color='RED'), CandleItem(low=392.5, high=397.45, open=397.45, close=395.4, color='RED'), CandleItem(low=396.65, high=400.8, open=400.7, close=397.45, color='RED')] 2020-08-25 12:00:20 INFO: skip by colors first_candle=CandleItem(low=396.65, high=400.8, open=400.7, close=397.45, color='RED') second_candle=CandleItem(low=392.5, high=397.45, open=397.45, close=395.4, color='RED') last_candle=CandleItem(low=389.8, high=395.4, open=395.4, close=394.15, color='RED') 2020-08-25 12:00:20 INFO: check need new order None 2020-08-25 12:00:20 INFO: init new order end 2020-08-25 12:00:20 INFO: 2020-08-25 12:00:20 INFO: 2020-08-25 12:00:20 INFO: 2020-08-25 12:00:20 INFO: 2020-08-25 12:02:00 INFO: 2020-08-25 12:02:00 INFO: 2020-08-25 12:02:00 INFO: 2020-08-25 12:02:00 INFO: 2020-08-25 12:02:00 INFO: clearing start 2020-08-25 12:02:00 INFO: clearing end 2020-08-25 12:02:00 INFO: 2020-08-25 12:02:00 INFO: 2020-08-25 12:02:00 INFO: 2020-08-25 12:02:00 INFO: 2020-08-25 13:00:20 INFO: 2020-08-25 13:00:20 INFO: 2020-08-25 13:00:20 INFO: 2020-08-25 13:00:20 INFO: 2020-08-25 13:00:20 INFO: init new order start 2020-08-25 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 25, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 394.15, 'high': 395.8, 'low': 393.25, 'close': 395.6, 'trades': 3001, 'volume': 2128008, 'vwap': 394.92, 'lastSize': 1, 'turnover': 84039282955, 'homeNotional': 24645.126333603923, 'foreignNotional': 9732858.124201389}, {'timestamp': datetime.datetime(2020, 8, 25, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 395.4, 'high': 395.4, 'low': 389.8, 'close': 394.15, 'trades': 7200, 'volume': 7480887, 'vwap': 392.46, 'lastSize': 24, 'turnover': 293593531360, 'homeNotional': 86441.4466552746, 'foreignNotional': 33924828.47658897}, {'timestamp': datetime.datetime(2020, 8, 25, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 397.45, 'high': 397.45, 'low': 392.5, 'close': 395.4, 'trades': 6322, 'volume': 5553434, 'vwap': 395.1, 'lastSize': 2910, 'turnover': 219414215920, 'homeNotional': 64288.50316642415, 'foreignNotional': 25400229.99539571}] 2020-08-25 13:00:20 INFO: prepare candles [CandleItem(low=393.25, high=395.8, open=394.15, close=395.6, color='GREEN'), CandleItem(low=389.8, high=395.4, open=395.4, close=394.15, color='RED'), CandleItem(low=392.5, high=397.45, open=397.45, close=395.4, color='RED')] 2020-08-25 13:00:20 INFO: last_candle=CandleItem(low=393.25, high=395.8, open=394.15, close=395.6, color='GREEN') 2020-08-25 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-25 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=393.25, high=395.8, open=394.15, close=395.6, color='GREEN') 2020-08-25 13:00:20 INFO: skip by CandleItem(low=393.25, high=395.8, open=394.15, close=395.6, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-25 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-25 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=393.25, high=395.8, open=394.15, close=395.6, color='GREEN') 2020-08-25 13:00:20 INFO: skip by CandleItem(low=393.25, high=395.8, open=394.15, close=395.6, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-25 13:00:20 INFO: not found applicable config for candle 2020-08-25 13:00:20 INFO: check need new order None 2020-08-25 13:00:20 INFO: init new order end 2020-08-25 13:00:20 INFO: 2020-08-25 13:00:20 INFO: 2020-08-25 13:00:20 INFO: 2020-08-25 13:00:20 INFO: 2020-08-25 13:02:00 INFO: 2020-08-25 13:02:00 INFO: 2020-08-25 13:02:00 INFO: 2020-08-25 13:02:00 INFO: 2020-08-25 13:02:00 INFO: clearing start 2020-08-25 13:02:00 INFO: clearing end 2020-08-25 13:02:00 INFO: 2020-08-25 13:02:00 INFO: 2020-08-25 13:02:00 INFO: 2020-08-25 13:02:00 INFO: 2020-08-25 14:00:20 INFO: 2020-08-25 14:00:20 INFO: 2020-08-25 14:00:20 INFO: 2020-08-25 14:00:20 INFO: 2020-08-25 14:00:20 INFO: init new order start 2020-08-25 14:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 25, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 395.6, 'high': 398.7, 'low': 394.2, 'close': 398.0, 'trades': 3687, 'volume': 2993175, 'vwap': 396.2, 'lastSize': 17, 'turnover': 118589112850, 'homeNotional': 34742.99471903745, 'foreignNotional': 13765202.874089586}, {'timestamp': datetime.datetime(2020, 8, 25, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 394.15, 'high': 395.8, 'low': 393.25, 'close': 395.6, 'trades': 3001, 'volume': 2128008, 'vwap': 394.92, 'lastSize': 1, 'turnover': 84039282955, 'homeNotional': 24645.126333603923, 'foreignNotional': 9732858.124201389}, {'timestamp': datetime.datetime(2020, 8, 25, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 395.4, 'high': 395.4, 'low': 389.8, 'close': 394.15, 'trades': 7200, 'volume': 7480887, 'vwap': 392.46, 'lastSize': 24, 'turnover': 293593531360, 'homeNotional': 86441.4466552746, 'foreignNotional': 33924828.47658897}] 2020-08-25 14:00:20 INFO: prepare candles [CandleItem(low=394.2, high=398.7, open=395.6, close=398.0, color='GREEN'), CandleItem(low=393.25, high=395.8, open=394.15, close=395.6, color='GREEN'), CandleItem(low=389.8, high=395.4, open=395.4, close=394.15, color='RED')] 2020-08-25 14:00:20 INFO: skip by colors first_candle=CandleItem(low=389.8, high=395.4, open=395.4, close=394.15, color='RED') second_candle=CandleItem(low=393.25, high=395.8, open=394.15, close=395.6, color='GREEN') last_candle=CandleItem(low=394.2, high=398.7, open=395.6, close=398.0, color='GREEN') 2020-08-25 14:00:20 INFO: check need new order None 2020-08-25 14:00:20 INFO: init new order end 2020-08-25 14:00:20 INFO: 2020-08-25 14:00:20 INFO: 2020-08-25 14:00:20 INFO: 2020-08-25 14:00:20 INFO: 2020-08-25 14:02:00 INFO: 2020-08-25 14:02:00 INFO: 2020-08-25 14:02:00 INFO: 2020-08-25 14:02:00 INFO: 2020-08-25 14:02:00 INFO: clearing start 2020-08-25 14:02:00 INFO: clearing end 2020-08-25 14:02:00 INFO: 2020-08-25 14:02:00 INFO: 2020-08-25 14:02:00 INFO: 2020-08-25 14:02:00 INFO: 2020-08-25 15:00:20 INFO: 2020-08-25 15:00:20 INFO: 2020-08-25 15:00:20 INFO: 2020-08-25 15:00:20 INFO: 2020-08-25 15:00:20 INFO: init new order start 2020-08-25 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 25, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 398.0, 'high': 398.6, 'low': 395.35, 'close': 395.35, 'trades': 3093, 'volume': 1697987, 'vwap': 396.92, 'lastSize': 13, 'turnover': 67395571230, 'homeNotional': 19754.859734238635, 'foreignNotional': 7841009.684072955}, {'timestamp': datetime.datetime(2020, 8, 25, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 395.6, 'high': 398.7, 'low': 394.2, 'close': 398.0, 'trades': 3687, 'volume': 2993175, 'vwap': 396.2, 'lastSize': 17, 'turnover': 118589112850, 'homeNotional': 34742.99471903745, 'foreignNotional': 13765202.874089586}, {'timestamp': datetime.datetime(2020, 8, 25, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 394.15, 'high': 395.8, 'low': 393.25, 'close': 395.6, 'trades': 3001, 'volume': 2128008, 'vwap': 394.92, 'lastSize': 1, 'turnover': 84039282955, 'homeNotional': 24645.126333603923, 'foreignNotional': 9732858.124201389}] 2020-08-25 15:00:20 INFO: prepare candles [CandleItem(low=395.35, high=398.6, open=398.0, close=395.35, color='RED'), CandleItem(low=394.2, high=398.7, open=395.6, close=398.0, color='GREEN'), CandleItem(low=393.25, high=395.8, open=394.15, close=395.6, color='GREEN')] 2020-08-25 15:00:20 INFO: last_candle=CandleItem(low=395.35, high=398.6, open=398.0, close=395.35, color='RED') 2020-08-25 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-08-25 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=395.35, high=398.6, open=398.0, close=395.35, color='RED') 2020-08-25 15:00:20 INFO: skip by CandleItem(low=395.35, high=398.6, open=398.0, close=395.35, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-25 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-08-25 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=395.35, high=398.6, open=398.0, close=395.35, color='RED') 2020-08-25 15:00:20 INFO: skip by CandleItem(low=395.35, high=398.6, open=398.0, close=395.35, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-25 15:00:20 INFO: not found applicable config for candle 2020-08-25 15:00:20 INFO: check need new order None 2020-08-25 15:00:20 INFO: init new order end 2020-08-25 15:00:20 INFO: 2020-08-25 15:00:20 INFO: 2020-08-25 15:00:20 INFO: 2020-08-25 15:00:20 INFO: 2020-08-25 15:02:00 INFO: 2020-08-25 15:02:00 INFO: 2020-08-25 15:02:00 INFO: 2020-08-25 15:02:00 INFO: 2020-08-25 15:02:00 INFO: clearing start 2020-08-25 15:02:00 INFO: clearing end 2020-08-25 15:02:00 INFO: 2020-08-25 15:02:00 INFO: 2020-08-25 15:02:00 INFO: 2020-08-25 15:02:00 INFO: 2020-08-25 16:00:20 INFO: 2020-08-25 16:00:20 INFO: 2020-08-25 16:00:20 INFO: 2020-08-25 16:00:20 INFO: 2020-08-25 16:00:20 INFO: init new order start 2020-08-25 16:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 25, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 395.35, 'high': 395.45, 'low': 387.95, 'close': 389.7, 'trades': 11297, 'volume': 10395120, 'vwap': 390.44, 'lastSize': 25, 'turnover': 405866614760, 'homeNotional': 119580.79624122736, 'foreignNotional': 46689661.52100262}, {'timestamp': datetime.datetime(2020, 8, 25, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 398.0, 'high': 398.6, 'low': 395.35, 'close': 395.35, 'trades': 3093, 'volume': 1697987, 'vwap': 396.92, 'lastSize': 13, 'turnover': 67395571230, 'homeNotional': 19754.859734238635, 'foreignNotional': 7841009.684072955}, {'timestamp': datetime.datetime(2020, 8, 25, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 395.6, 'high': 398.7, 'low': 394.2, 'close': 398.0, 'trades': 3687, 'volume': 2993175, 'vwap': 396.2, 'lastSize': 17, 'turnover': 118589112850, 'homeNotional': 34742.99471903745, 'foreignNotional': 13765202.874089586}] 2020-08-25 16:00:21 INFO: prepare candles [CandleItem(low=387.95, high=395.45, open=395.35, close=389.7, color='RED'), CandleItem(low=395.35, high=398.6, open=398.0, close=395.35, color='RED'), CandleItem(low=394.2, high=398.7, open=395.6, close=398.0, color='GREEN')] 2020-08-25 16:00:21 INFO: skip by colors first_candle=CandleItem(low=394.2, high=398.7, open=395.6, close=398.0, color='GREEN') second_candle=CandleItem(low=395.35, high=398.6, open=398.0, close=395.35, color='RED') last_candle=CandleItem(low=387.95, high=395.45, open=395.35, close=389.7, color='RED') 2020-08-25 16:00:21 INFO: check need new order None 2020-08-25 16:00:21 INFO: init new order end 2020-08-25 16:00:21 INFO: 2020-08-25 16:00:21 INFO: 2020-08-25 16:00:21 INFO: 2020-08-25 16:00:21 INFO: 2020-08-25 16:02:00 INFO: 2020-08-25 16:02:00 INFO: 2020-08-25 16:02:00 INFO: 2020-08-25 16:02:00 INFO: 2020-08-25 16:02:00 INFO: clearing start 2020-08-25 16:02:00 INFO: clearing end 2020-08-25 16:02:00 INFO: 2020-08-25 16:02:00 INFO: 2020-08-25 16:02:00 INFO: 2020-08-25 16:02:00 INFO: 2020-08-25 17:00:20 INFO: 2020-08-25 17:00:20 INFO: 2020-08-25 17:00:20 INFO: 2020-08-25 17:00:20 INFO: 2020-08-25 17:00:20 INFO: init new order start 2020-08-25 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 25, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.7, 'high': 392.4, 'low': 387.8, 'close': 390.3, 'trades': 6491, 'volume': 6323257, 'vwap': 389.92, 'lastSize': 63, 'turnover': 246555967230, 'homeNotional': 72485.17116597891, 'foreignNotional': 28263576.22195661}, {'timestamp': datetime.datetime(2020, 8, 25, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 395.35, 'high': 395.45, 'low': 387.95, 'close': 389.7, 'trades': 11297, 'volume': 10395120, 'vwap': 390.44, 'lastSize': 25, 'turnover': 405866614760, 'homeNotional': 119580.79624122736, 'foreignNotional': 46689661.52100262}, {'timestamp': datetime.datetime(2020, 8, 25, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 398.0, 'high': 398.6, 'low': 395.35, 'close': 395.35, 'trades': 3093, 'volume': 1697987, 'vwap': 396.92, 'lastSize': 13, 'turnover': 67395571230, 'homeNotional': 19754.859734238635, 'foreignNotional': 7841009.684072955}] 2020-08-25 17:00:20 INFO: prepare candles [CandleItem(low=387.8, high=392.4, open=389.7, close=390.3, color='GREEN'), CandleItem(low=387.95, high=395.45, open=395.35, close=389.7, color='RED'), CandleItem(low=395.35, high=398.6, open=398.0, close=395.35, color='RED')] 2020-08-25 17:00:20 INFO: last_candle=CandleItem(low=387.8, high=392.4, open=389.7, close=390.3, color='GREEN') 2020-08-25 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-25 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=387.8, high=392.4, open=389.7, close=390.3, color='GREEN') 2020-08-25 17:00:20 INFO: skip by CandleItem(low=387.8, high=392.4, open=389.7, close=390.3, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-25 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-25 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=387.8, high=392.4, open=389.7, close=390.3, color='GREEN') 2020-08-25 17:00:20 INFO: skip by CandleItem(low=387.8, high=392.4, open=389.7, close=390.3, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-25 17:00:20 INFO: not found applicable config for candle 2020-08-25 17:00:20 INFO: check need new order None 2020-08-25 17:00:20 INFO: init new order end 2020-08-25 17:00:20 INFO: 2020-08-25 17:00:20 INFO: 2020-08-25 17:00:20 INFO: 2020-08-25 17:00:20 INFO: 2020-08-25 17:02:00 INFO: 2020-08-25 17:02:00 INFO: 2020-08-25 17:02:00 INFO: 2020-08-25 17:02:00 INFO: 2020-08-25 17:02:00 INFO: clearing start 2020-08-25 17:02:00 INFO: clearing end 2020-08-25 17:02:00 INFO: 2020-08-25 17:02:00 INFO: 2020-08-25 17:02:00 INFO: 2020-08-25 17:02:00 INFO: 2020-08-25 18:00:20 INFO: 2020-08-25 18:00:20 INFO: 2020-08-25 18:00:20 INFO: 2020-08-25 18:00:20 INFO: 2020-08-25 18:00:20 INFO: init new order start 2020-08-25 18:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 25, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 390.3, 'high': 390.25, 'low': 381.1, 'close': 384.3, 'trades': 15115, 'volume': 11660675, 'vwap': 385.2, 'lastSize': 49, 'turnover': 449164890045, 'homeNotional': 132892.952345847, 'foreignNotional': 51190366.194398105}, {'timestamp': datetime.datetime(2020, 8, 25, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.7, 'high': 392.4, 'low': 387.8, 'close': 390.3, 'trades': 6491, 'volume': 6323257, 'vwap': 389.92, 'lastSize': 63, 'turnover': 246555967230, 'homeNotional': 72485.17116597891, 'foreignNotional': 28263576.22195661}, {'timestamp': datetime.datetime(2020, 8, 25, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 395.35, 'high': 395.45, 'low': 387.95, 'close': 389.7, 'trades': 11297, 'volume': 10395120, 'vwap': 390.44, 'lastSize': 25, 'turnover': 405866614760, 'homeNotional': 119580.79624122736, 'foreignNotional': 46689661.52100262}] 2020-08-25 18:00:21 INFO: prepare candles [CandleItem(low=381.1, high=390.25, open=390.3, close=384.3, color='RED'), CandleItem(low=387.8, high=392.4, open=389.7, close=390.3, color='GREEN'), CandleItem(low=387.95, high=395.45, open=395.35, close=389.7, color='RED')] 2020-08-25 18:00:21 INFO: skip by colors first_candle=CandleItem(low=387.95, high=395.45, open=395.35, close=389.7, color='RED') second_candle=CandleItem(low=387.8, high=392.4, open=389.7, close=390.3, color='GREEN') last_candle=CandleItem(low=381.1, high=390.25, open=390.3, close=384.3, color='RED') 2020-08-25 18:00:21 INFO: check need new order None 2020-08-25 18:00:21 INFO: init new order end 2020-08-25 18:00:21 INFO: 2020-08-25 18:00:21 INFO: 2020-08-25 18:00:21 INFO: 2020-08-25 18:00:21 INFO: 2020-08-25 18:02:00 INFO: 2020-08-25 18:02:00 INFO: 2020-08-25 18:02:00 INFO: 2020-08-25 18:02:00 INFO: 2020-08-25 18:02:00 INFO: clearing start 2020-08-25 18:02:00 INFO: clearing end 2020-08-25 18:02:00 INFO: 2020-08-25 18:02:00 INFO: 2020-08-25 18:02:00 INFO: 2020-08-25 18:02:00 INFO: 2020-08-25 19:00:20 INFO: 2020-08-25 19:00:20 INFO: 2020-08-25 19:00:20 INFO: 2020-08-25 19:00:20 INFO: 2020-08-25 19:00:20 INFO: init new order start 2020-08-25 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 25, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.3, 'high': 386.35, 'low': 380.4, 'close': 385.8, 'trades': 6633, 'volume': 7746583, 'vwap': 383.47, 'lastSize': 1000, 'turnover': 297056633055, 'homeNotional': 88208.48417037014, 'foreignNotional': 33825364.35228178}, {'timestamp': datetime.datetime(2020, 8, 25, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 390.3, 'high': 390.25, 'low': 381.1, 'close': 384.3, 'trades': 15115, 'volume': 11660675, 'vwap': 385.2, 'lastSize': 49, 'turnover': 449164890045, 'homeNotional': 132892.952345847, 'foreignNotional': 51190366.194398105}, {'timestamp': datetime.datetime(2020, 8, 25, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.7, 'high': 392.4, 'low': 387.8, 'close': 390.3, 'trades': 6491, 'volume': 6323257, 'vwap': 389.92, 'lastSize': 63, 'turnover': 246555967230, 'homeNotional': 72485.17116597891, 'foreignNotional': 28263576.22195661}] 2020-08-25 19:00:21 INFO: prepare candles [CandleItem(low=380.4, high=386.35, open=384.3, close=385.8, color='GREEN'), CandleItem(low=381.1, high=390.25, open=390.3, close=384.3, color='RED'), CandleItem(low=387.8, high=392.4, open=389.7, close=390.3, color='GREEN')] 2020-08-25 19:00:21 INFO: skip by colors first_candle=CandleItem(low=387.8, high=392.4, open=389.7, close=390.3, color='GREEN') second_candle=CandleItem(low=381.1, high=390.25, open=390.3, close=384.3, color='RED') last_candle=CandleItem(low=380.4, high=386.35, open=384.3, close=385.8, color='GREEN') 2020-08-25 19:00:21 INFO: check need new order None 2020-08-25 19:00:21 INFO: init new order end 2020-08-25 19:00:21 INFO: 2020-08-25 19:00:21 INFO: 2020-08-25 19:00:21 INFO: 2020-08-25 19:00:21 INFO: 2020-08-25 19:02:00 INFO: 2020-08-25 19:02:00 INFO: 2020-08-25 19:02:00 INFO: 2020-08-25 19:02:00 INFO: 2020-08-25 19:02:00 INFO: clearing start 2020-08-25 19:02:00 INFO: clearing end 2020-08-25 19:02:00 INFO: 2020-08-25 19:02:00 INFO: 2020-08-25 19:02:00 INFO: 2020-08-25 19:02:00 INFO: 2020-08-25 20:00:20 INFO: 2020-08-25 20:00:20 INFO: 2020-08-25 20:00:20 INFO: 2020-08-25 20:00:20 INFO: 2020-08-25 20:00:20 INFO: init new order start 2020-08-25 20:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 25, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.8, 'high': 386.8, 'low': 372.1, 'close': 375.25, 'trades': 10837, 'volume': 10221077, 'vwap': 379.62, 'lastSize': 429, 'turnover': 388004162550, 'homeNotional': 116346.0621584742, 'foreignNotional': 44167757.332700714}, {'timestamp': datetime.datetime(2020, 8, 25, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.3, 'high': 386.35, 'low': 380.4, 'close': 385.8, 'trades': 6633, 'volume': 7746583, 'vwap': 383.47, 'lastSize': 1000, 'turnover': 297056633055, 'homeNotional': 88208.48417037014, 'foreignNotional': 33825364.35228178}, {'timestamp': datetime.datetime(2020, 8, 25, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 390.3, 'high': 390.25, 'low': 381.1, 'close': 384.3, 'trades': 15115, 'volume': 11660675, 'vwap': 385.2, 'lastSize': 49, 'turnover': 449164890045, 'homeNotional': 132892.952345847, 'foreignNotional': 51190366.194398105}] 2020-08-25 20:00:20 INFO: prepare candles [CandleItem(low=372.1, high=386.8, open=385.8, close=375.25, color='RED'), CandleItem(low=380.4, high=386.35, open=384.3, close=385.8, color='GREEN'), CandleItem(low=381.1, high=390.25, open=390.3, close=384.3, color='RED')] 2020-08-25 20:00:20 INFO: skip by colors first_candle=CandleItem(low=381.1, high=390.25, open=390.3, close=384.3, color='RED') second_candle=CandleItem(low=380.4, high=386.35, open=384.3, close=385.8, color='GREEN') last_candle=CandleItem(low=372.1, high=386.8, open=385.8, close=375.25, color='RED') 2020-08-25 20:00:20 INFO: check need new order None 2020-08-25 20:00:20 INFO: init new order end 2020-08-25 20:00:20 INFO: 2020-08-25 20:00:20 INFO: 2020-08-25 20:00:20 INFO: 2020-08-25 20:00:20 INFO: 2020-08-25 20:02:00 INFO: 2020-08-25 20:02:00 INFO: 2020-08-25 20:02:00 INFO: 2020-08-25 20:02:00 INFO: 2020-08-25 20:02:00 INFO: clearing start 2020-08-25 20:02:00 INFO: clearing end 2020-08-25 20:02:00 INFO: 2020-08-25 20:02:00 INFO: 2020-08-25 20:02:00 INFO: 2020-08-25 20:02:00 INFO: 2020-08-25 21:00:20 INFO: 2020-08-25 21:00:20 INFO: 2020-08-25 21:00:20 INFO: 2020-08-25 21:00:20 INFO: 2020-08-25 21:00:20 INFO: init new order start 2020-08-25 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 25, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 375.25, 'high': 376.5, 'low': 370.2, 'close': 373.85, 'trades': 10990, 'volume': 10522796, 'vwap': 373.38, 'lastSize': 600, 'turnover': 392896309980, 'homeNotional': 118820.99857314811, 'foreignNotional': 44365288.52026601}, {'timestamp': datetime.datetime(2020, 8, 25, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.8, 'high': 386.8, 'low': 372.1, 'close': 375.25, 'trades': 10837, 'volume': 10221077, 'vwap': 379.62, 'lastSize': 429, 'turnover': 388004162550, 'homeNotional': 116346.0621584742, 'foreignNotional': 44167757.332700714}, {'timestamp': datetime.datetime(2020, 8, 25, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.3, 'high': 386.35, 'low': 380.4, 'close': 385.8, 'trades': 6633, 'volume': 7746583, 'vwap': 383.47, 'lastSize': 1000, 'turnover': 297056633055, 'homeNotional': 88208.48417037014, 'foreignNotional': 33825364.35228178}] 2020-08-25 21:00:20 INFO: prepare candles [CandleItem(low=370.2, high=376.5, open=375.25, close=373.85, color='RED'), CandleItem(low=372.1, high=386.8, open=385.8, close=375.25, color='RED'), CandleItem(low=380.4, high=386.35, open=384.3, close=385.8, color='GREEN')] 2020-08-25 21:00:20 INFO: skip by colors first_candle=CandleItem(low=380.4, high=386.35, open=384.3, close=385.8, color='GREEN') second_candle=CandleItem(low=372.1, high=386.8, open=385.8, close=375.25, color='RED') last_candle=CandleItem(low=370.2, high=376.5, open=375.25, close=373.85, color='RED') 2020-08-25 21:00:20 INFO: check need new order None 2020-08-25 21:00:20 INFO: init new order end 2020-08-25 21:00:20 INFO: 2020-08-25 21:00:20 INFO: 2020-08-25 21:00:20 INFO: 2020-08-25 21:00:20 INFO: 2020-08-25 21:02:00 INFO: 2020-08-25 21:02:00 INFO: 2020-08-25 21:02:00 INFO: 2020-08-25 21:02:00 INFO: 2020-08-25 21:02:00 INFO: clearing start 2020-08-25 21:02:00 INFO: clearing end 2020-08-25 21:02:00 INFO: 2020-08-25 21:02:00 INFO: 2020-08-25 21:02:00 INFO: 2020-08-25 21:02:00 INFO: 2020-08-25 22:00:20 INFO: 2020-08-25 22:00:20 INFO: 2020-08-25 22:00:20 INFO: 2020-08-25 22:00:20 INFO: 2020-08-25 22:00:20 INFO: init new order start 2020-08-25 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 25, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 373.85, 'high': 381.55, 'low': 370.5, 'close': 379.95, 'trades': 10685, 'volume': 8913717, 'vwap': 376.47, 'lastSize': 11, 'turnover': 335566196795, 'homeNotional': 100126.36846255735, 'foreignNotional': 37694660.82289676}, {'timestamp': datetime.datetime(2020, 8, 25, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 375.25, 'high': 376.5, 'low': 370.2, 'close': 373.85, 'trades': 10990, 'volume': 10522796, 'vwap': 373.38, 'lastSize': 600, 'turnover': 392896309980, 'homeNotional': 118820.99857314811, 'foreignNotional': 44365288.52026601}, {'timestamp': datetime.datetime(2020, 8, 25, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.8, 'high': 386.8, 'low': 372.1, 'close': 375.25, 'trades': 10837, 'volume': 10221077, 'vwap': 379.62, 'lastSize': 429, 'turnover': 388004162550, 'homeNotional': 116346.0621584742, 'foreignNotional': 44167757.332700714}] 2020-08-25 22:00:20 INFO: prepare candles [CandleItem(low=370.5, high=381.55, open=373.85, close=379.95, color='GREEN'), CandleItem(low=370.2, high=376.5, open=375.25, close=373.85, color='RED'), CandleItem(low=372.1, high=386.8, open=385.8, close=375.25, color='RED')] 2020-08-25 22:00:20 INFO: last_candle=CandleItem(low=370.5, high=381.55, open=373.85, close=379.95, color='GREEN') 2020-08-25 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-25 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=370.5, high=381.55, open=373.85, close=379.95, color='GREEN') 2020-08-25 22:00:20 INFO: skip by CandleItem(low=370.5, high=381.55, open=373.85, close=379.95, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-25 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-25 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=370.5, high=381.55, open=373.85, close=379.95, color='GREEN') 2020-08-25 22:00:20 INFO: skip by CandleItem(low=370.5, high=381.55, open=373.85, close=379.95, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-25 22:00:20 INFO: not found applicable config for candle 2020-08-25 22:00:20 INFO: check need new order None 2020-08-25 22:00:20 INFO: init new order end 2020-08-25 22:00:20 INFO: 2020-08-25 22:00:20 INFO: 2020-08-25 22:00:20 INFO: 2020-08-25 22:00:20 INFO: 2020-08-25 22:02:00 INFO: 2020-08-25 22:02:00 INFO: 2020-08-25 22:02:00 INFO: 2020-08-25 22:02:00 INFO: 2020-08-25 22:02:00 INFO: clearing start 2020-08-25 22:02:01 INFO: clearing end 2020-08-25 22:02:01 INFO: 2020-08-25 22:02:01 INFO: 2020-08-25 22:02:01 INFO: 2020-08-25 22:02:01 INFO: 2020-08-25 23:00:20 INFO: 2020-08-25 23:00:20 INFO: 2020-08-25 23:00:20 INFO: 2020-08-25 23:00:20 INFO: 2020-08-25 23:00:20 INFO: init new order start 2020-08-25 23:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 25, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.95, 'high': 382.7, 'low': 378.0, 'close': 379.4, 'trades': 5272, 'volume': 4433493, 'vwap': 380.57, 'lastSize': 12, 'turnover': 168722121600, 'homeNotional': 50161.28256882559, 'foreignNotional': 19089550.815106846}, {'timestamp': datetime.datetime(2020, 8, 25, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 373.85, 'high': 381.55, 'low': 370.5, 'close': 379.95, 'trades': 10685, 'volume': 8913717, 'vwap': 376.47, 'lastSize': 11, 'turnover': 335566196795, 'homeNotional': 100126.36846255735, 'foreignNotional': 37694660.82289676}, {'timestamp': datetime.datetime(2020, 8, 25, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 375.25, 'high': 376.5, 'low': 370.2, 'close': 373.85, 'trades': 10990, 'volume': 10522796, 'vwap': 373.38, 'lastSize': 600, 'turnover': 392896309980, 'homeNotional': 118820.99857314811, 'foreignNotional': 44365288.52026601}] 2020-08-25 23:00:20 INFO: prepare candles [CandleItem(low=378.0, high=382.7, open=379.95, close=379.4, color='RED'), CandleItem(low=370.5, high=381.55, open=373.85, close=379.95, color='GREEN'), CandleItem(low=370.2, high=376.5, open=375.25, close=373.85, color='RED')] 2020-08-25 23:00:20 INFO: skip by colors first_candle=CandleItem(low=370.2, high=376.5, open=375.25, close=373.85, color='RED') second_candle=CandleItem(low=370.5, high=381.55, open=373.85, close=379.95, color='GREEN') last_candle=CandleItem(low=378.0, high=382.7, open=379.95, close=379.4, color='RED') 2020-08-25 23:00:20 INFO: check need new order None 2020-08-25 23:00:20 INFO: init new order end 2020-08-25 23:00:20 INFO: 2020-08-25 23:00:20 INFO: 2020-08-25 23:00:20 INFO: 2020-08-25 23:00:20 INFO: 2020-08-25 23:02:00 INFO: 2020-08-25 23:02:00 INFO: 2020-08-25 23:02:00 INFO: 2020-08-25 23:02:00 INFO: 2020-08-25 23:02:00 INFO: clearing start 2020-08-25 23:02:00 INFO: clearing end 2020-08-25 23:02:00 INFO: 2020-08-25 23:02:00 INFO: 2020-08-25 23:02:00 INFO: 2020-08-25 23:02:00 INFO: 2020-08-26 00:00:20 INFO: 2020-08-26 00:00:20 INFO: 2020-08-26 00:00:20 INFO: 2020-08-26 00:00:20 INFO: 2020-08-26 00:00:20 INFO: init new order start 2020-08-26 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 25, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.4, 'high': 381.5, 'low': 375.0, 'close': 377.6, 'trades': 5432, 'volume': 5833163, 'vwap': 378.66, 'lastSize': 130, 'turnover': 220875287675, 'homeNotional': 65827.72307575148, 'foreignNotional': 24926140.033910695}, {'timestamp': datetime.datetime(2020, 8, 25, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.95, 'high': 382.7, 'low': 378.0, 'close': 379.4, 'trades': 5272, 'volume': 4433493, 'vwap': 380.57, 'lastSize': 12, 'turnover': 168722121600, 'homeNotional': 50161.28256882559, 'foreignNotional': 19089550.815106846}, {'timestamp': datetime.datetime(2020, 8, 25, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 373.85, 'high': 381.55, 'low': 370.5, 'close': 379.95, 'trades': 10685, 'volume': 8913717, 'vwap': 376.47, 'lastSize': 11, 'turnover': 335566196795, 'homeNotional': 100126.36846255735, 'foreignNotional': 37694660.82289676}] 2020-08-26 00:00:20 INFO: prepare candles [CandleItem(low=375.0, high=381.5, open=379.4, close=377.6, color='RED'), CandleItem(low=378.0, high=382.7, open=379.95, close=379.4, color='RED'), CandleItem(low=370.5, high=381.55, open=373.85, close=379.95, color='GREEN')] 2020-08-26 00:00:20 INFO: skip by colors first_candle=CandleItem(low=370.5, high=381.55, open=373.85, close=379.95, color='GREEN') second_candle=CandleItem(low=378.0, high=382.7, open=379.95, close=379.4, color='RED') last_candle=CandleItem(low=375.0, high=381.5, open=379.4, close=377.6, color='RED') 2020-08-26 00:00:20 INFO: check need new order None 2020-08-26 00:00:20 INFO: init new order end 2020-08-26 00:00:20 INFO: 2020-08-26 00:00:20 INFO: 2020-08-26 00:00:20 INFO: 2020-08-26 00:00:20 INFO: 2020-08-26 00:02:00 INFO: 2020-08-26 00:02:00 INFO: 2020-08-26 00:02:00 INFO: 2020-08-26 00:02:00 INFO: 2020-08-26 00:02:00 INFO: clearing start 2020-08-26 00:02:00 INFO: clearing end 2020-08-26 00:02:00 INFO: 2020-08-26 00:02:00 INFO: 2020-08-26 00:02:00 INFO: 2020-08-26 00:02:00 INFO: 2020-08-26 01:00:20 INFO: 2020-08-26 01:00:20 INFO: 2020-08-26 01:00:20 INFO: 2020-08-26 01:00:20 INFO: 2020-08-26 01:00:20 INFO: init new order start 2020-08-26 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 25, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 377.6, 'high': 381.45, 'low': 377.6, 'close': 379.1, 'trades': 3247, 'volume': 2727398, 'vwap': 380.25, 'lastSize': 13, 'turnover': 103708897300, 'homeNotional': 30822.249323958422, 'foreignNotional': 11720135.03679003}, {'timestamp': datetime.datetime(2020, 8, 25, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.4, 'high': 381.5, 'low': 375.0, 'close': 377.6, 'trades': 5432, 'volume': 5833163, 'vwap': 378.66, 'lastSize': 130, 'turnover': 220875287675, 'homeNotional': 65827.72307575148, 'foreignNotional': 24926140.033910695}, {'timestamp': datetime.datetime(2020, 8, 25, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.95, 'high': 382.7, 'low': 378.0, 'close': 379.4, 'trades': 5272, 'volume': 4433493, 'vwap': 380.57, 'lastSize': 12, 'turnover': 168722121600, 'homeNotional': 50161.28256882559, 'foreignNotional': 19089550.815106846}] 2020-08-26 01:00:20 INFO: prepare candles [CandleItem(low=377.6, high=381.45, open=377.6, close=379.1, color='GREEN'), CandleItem(low=375.0, high=381.5, open=379.4, close=377.6, color='RED'), CandleItem(low=378.0, high=382.7, open=379.95, close=379.4, color='RED')] 2020-08-26 01:00:20 INFO: last_candle=CandleItem(low=377.6, high=381.45, open=377.6, close=379.1, color='GREEN') 2020-08-26 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-08-26 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=377.6, high=381.45, open=377.6, close=379.1, color='GREEN') 2020-08-26 01:00:20 INFO: skip by CandleItem(low=377.6, high=381.45, open=377.6, close=379.1, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-26 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-08-26 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=377.6, high=381.45, open=377.6, close=379.1, color='GREEN') 2020-08-26 01:00:20 INFO: skip by CandleItem(low=377.6, high=381.45, open=377.6, close=379.1, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-26 01:00:20 INFO: not found applicable config for candle 2020-08-26 01:00:20 INFO: check need new order None 2020-08-26 01:00:20 INFO: init new order end 2020-08-26 01:00:20 INFO: 2020-08-26 01:00:20 INFO: 2020-08-26 01:00:20 INFO: 2020-08-26 01:00:20 INFO: 2020-08-26 01:02:00 INFO: 2020-08-26 01:02:00 INFO: 2020-08-26 01:02:00 INFO: 2020-08-26 01:02:00 INFO: 2020-08-26 01:02:00 INFO: clearing start 2020-08-26 01:02:00 INFO: clearing end 2020-08-26 01:02:00 INFO: 2020-08-26 01:02:00 INFO: 2020-08-26 01:02:00 INFO: 2020-08-26 01:02:00 INFO: 2020-08-26 02:00:20 INFO: 2020-08-26 02:00:20 INFO: 2020-08-26 02:00:20 INFO: 2020-08-26 02:00:20 INFO: 2020-08-26 02:00:20 INFO: init new order start 2020-08-26 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 25, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.1, 'high': 384.2, 'low': 378.9, 'close': 383.2, 'trades': 4142, 'volume': 3048094, 'vwap': 382.77, 'lastSize': 26, 'turnover': 116668871770, 'homeNotional': 34635.438157421966, 'foreignNotional': 13257120.44793258}, {'timestamp': datetime.datetime(2020, 8, 25, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 377.6, 'high': 381.45, 'low': 377.6, 'close': 379.1, 'trades': 3247, 'volume': 2727398, 'vwap': 380.25, 'lastSize': 13, 'turnover': 103708897300, 'homeNotional': 30822.249323958422, 'foreignNotional': 11720135.03679003}, {'timestamp': datetime.datetime(2020, 8, 25, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.4, 'high': 381.5, 'low': 375.0, 'close': 377.6, 'trades': 5432, 'volume': 5833163, 'vwap': 378.66, 'lastSize': 130, 'turnover': 220875287675, 'homeNotional': 65827.72307575148, 'foreignNotional': 24926140.033910695}] 2020-08-26 02:00:20 INFO: prepare candles [CandleItem(low=378.9, high=384.2, open=379.1, close=383.2, color='GREEN'), CandleItem(low=377.6, high=381.45, open=377.6, close=379.1, color='GREEN'), CandleItem(low=375.0, high=381.5, open=379.4, close=377.6, color='RED')] 2020-08-26 02:00:20 INFO: skip by colors first_candle=CandleItem(low=375.0, high=381.5, open=379.4, close=377.6, color='RED') second_candle=CandleItem(low=377.6, high=381.45, open=377.6, close=379.1, color='GREEN') last_candle=CandleItem(low=378.9, high=384.2, open=379.1, close=383.2, color='GREEN') 2020-08-26 02:00:20 INFO: check need new order None 2020-08-26 02:00:20 INFO: init new order end 2020-08-26 02:00:20 INFO: 2020-08-26 02:00:20 INFO: 2020-08-26 02:00:20 INFO: 2020-08-26 02:00:20 INFO: 2020-08-26 02:02:00 INFO: 2020-08-26 02:02:00 INFO: 2020-08-26 02:02:00 INFO: 2020-08-26 02:02:00 INFO: 2020-08-26 02:02:00 INFO: clearing start 2020-08-26 02:02:00 INFO: clearing end 2020-08-26 02:02:00 INFO: 2020-08-26 02:02:00 INFO: 2020-08-26 02:02:00 INFO: 2020-08-26 02:02:00 INFO: 2020-08-26 03:00:20 INFO: 2020-08-26 03:00:20 INFO: 2020-08-26 03:00:20 INFO: 2020-08-26 03:00:20 INFO: 2020-08-26 03:00:20 INFO: init new order start 2020-08-26 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 26, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.2, 'high': 384.7, 'low': 381.8, 'close': 383.05, 'trades': 3022, 'volume': 2126590, 'vwap': 383.39, 'lastSize': 50, 'turnover': 81529811825, 'homeNotional': 24162.07641811849, 'foreignNotional': 9263332.68549814}, {'timestamp': datetime.datetime(2020, 8, 25, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.1, 'high': 384.2, 'low': 378.9, 'close': 383.2, 'trades': 4142, 'volume': 3048094, 'vwap': 382.77, 'lastSize': 26, 'turnover': 116668871770, 'homeNotional': 34635.438157421966, 'foreignNotional': 13257120.44793258}, {'timestamp': datetime.datetime(2020, 8, 25, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 377.6, 'high': 381.45, 'low': 377.6, 'close': 379.1, 'trades': 3247, 'volume': 2727398, 'vwap': 380.25, 'lastSize': 13, 'turnover': 103708897300, 'homeNotional': 30822.249323958422, 'foreignNotional': 11720135.03679003}] 2020-08-26 03:00:20 INFO: prepare candles [CandleItem(low=381.8, high=384.7, open=383.2, close=383.05, color='RED'), CandleItem(low=378.9, high=384.2, open=379.1, close=383.2, color='GREEN'), CandleItem(low=377.6, high=381.45, open=377.6, close=379.1, color='GREEN')] 2020-08-26 03:00:20 INFO: last_candle=CandleItem(low=381.8, high=384.7, open=383.2, close=383.05, color='RED') 2020-08-26 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-08-26 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=381.8, high=384.7, open=383.2, close=383.05, color='RED') 2020-08-26 03:00:20 INFO: skip by CandleItem(low=381.8, high=384.7, open=383.2, close=383.05, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-26 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-08-26 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=381.8, high=384.7, open=383.2, close=383.05, color='RED') 2020-08-26 03:00:20 INFO: skip by CandleItem(low=381.8, high=384.7, open=383.2, close=383.05, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-26 03:00:20 INFO: not found applicable config for candle 2020-08-26 03:00:20 INFO: check need new order None 2020-08-26 03:00:20 INFO: init new order end 2020-08-26 03:00:20 INFO: 2020-08-26 03:00:20 INFO: 2020-08-26 03:00:20 INFO: 2020-08-26 03:00:20 INFO: 2020-08-26 03:02:00 INFO: 2020-08-26 03:02:00 INFO: 2020-08-26 03:02:00 INFO: 2020-08-26 03:02:00 INFO: 2020-08-26 03:02:00 INFO: clearing start 2020-08-26 03:02:00 INFO: clearing end 2020-08-26 03:02:00 INFO: 2020-08-26 03:02:00 INFO: 2020-08-26 03:02:00 INFO: 2020-08-26 03:02:00 INFO: 2020-08-26 04:00:20 INFO: 2020-08-26 04:00:20 INFO: 2020-08-26 04:00:20 INFO: 2020-08-26 04:00:20 INFO: 2020-08-26 04:00:20 INFO: init new order start 2020-08-26 04:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 26, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.05, 'high': 383.1, 'low': 377.65, 'close': 379.3, 'trades': 5087, 'volume': 4360098, 'vwap': 380.33, 'lastSize': 8000, 'turnover': 165825316240, 'homeNotional': 49266.71954300248, 'foreignNotional': 18737446.037599698}, {'timestamp': datetime.datetime(2020, 8, 26, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.2, 'high': 384.7, 'low': 381.8, 'close': 383.05, 'trades': 3022, 'volume': 2126590, 'vwap': 383.39, 'lastSize': 50, 'turnover': 81529811825, 'homeNotional': 24162.07641811849, 'foreignNotional': 9263332.68549814}, {'timestamp': datetime.datetime(2020, 8, 25, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.1, 'high': 384.2, 'low': 378.9, 'close': 383.2, 'trades': 4142, 'volume': 3048094, 'vwap': 382.77, 'lastSize': 26, 'turnover': 116668871770, 'homeNotional': 34635.438157421966, 'foreignNotional': 13257120.44793258}] 2020-08-26 04:00:21 INFO: prepare candles [CandleItem(low=377.65, high=383.1, open=383.05, close=379.3, color='RED'), CandleItem(low=381.8, high=384.7, open=383.2, close=383.05, color='RED'), CandleItem(low=378.9, high=384.2, open=379.1, close=383.2, color='GREEN')] 2020-08-26 04:00:21 INFO: skip by colors first_candle=CandleItem(low=378.9, high=384.2, open=379.1, close=383.2, color='GREEN') second_candle=CandleItem(low=381.8, high=384.7, open=383.2, close=383.05, color='RED') last_candle=CandleItem(low=377.65, high=383.1, open=383.05, close=379.3, color='RED') 2020-08-26 04:00:21 INFO: check need new order None 2020-08-26 04:00:21 INFO: init new order end 2020-08-26 04:00:21 INFO: 2020-08-26 04:00:21 INFO: 2020-08-26 04:00:21 INFO: 2020-08-26 04:00:21 INFO: 2020-08-26 04:02:00 INFO: 2020-08-26 04:02:00 INFO: 2020-08-26 04:02:00 INFO: 2020-08-26 04:02:00 INFO: 2020-08-26 04:02:00 INFO: clearing start 2020-08-26 04:02:00 INFO: clearing end 2020-08-26 04:02:00 INFO: 2020-08-26 04:02:00 INFO: 2020-08-26 04:02:00 INFO: 2020-08-26 04:02:00 INFO: 2020-08-26 05:00:25 INFO: 2020-08-26 05:00:25 INFO: 2020-08-26 05:00:25 INFO: 2020-08-26 05:00:25 INFO: 2020-08-26 05:00:25 INFO: init new order start 2020-08-26 05:00:25 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 26, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.3, 'high': 384.4, 'low': 379.25, 'close': 382.75, 'trades': 3322, 'volume': 2652006, 'vwap': 382.35, 'lastSize': 3988, 'turnover': 101397307340, 'homeNotional': 30028.943063186693, 'foreignNotional': 11481373.608523576}, {'timestamp': datetime.datetime(2020, 8, 26, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.05, 'high': 383.1, 'low': 377.65, 'close': 379.3, 'trades': 5087, 'volume': 4360098, 'vwap': 380.33, 'lastSize': 8000, 'turnover': 165825316240, 'homeNotional': 49266.71954300248, 'foreignNotional': 18737446.037599698}, {'timestamp': datetime.datetime(2020, 8, 26, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.2, 'high': 384.7, 'low': 381.8, 'close': 383.05, 'trades': 3022, 'volume': 2126590, 'vwap': 383.39, 'lastSize': 50, 'turnover': 81529811825, 'homeNotional': 24162.07641811849, 'foreignNotional': 9263332.68549814}] 2020-08-26 05:00:25 INFO: prepare candles [CandleItem(low=379.25, high=384.4, open=379.3, close=382.75, color='GREEN'), CandleItem(low=377.65, high=383.1, open=383.05, close=379.3, color='RED'), CandleItem(low=381.8, high=384.7, open=383.2, close=383.05, color='RED')] 2020-08-26 05:00:25 INFO: last_candle=CandleItem(low=379.25, high=384.4, open=379.3, close=382.75, color='GREEN') 2020-08-26 05:00:25 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-26 05:00:25 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.25, high=384.4, open=379.3, close=382.75, color='GREEN') 2020-08-26 05:00:25 INFO: skip by CandleItem(low=379.25, high=384.4, open=379.3, close=382.75, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-26 05:00:25 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-26 05:00:25 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.25, high=384.4, open=379.3, close=382.75, color='GREEN') 2020-08-26 05:00:25 INFO: skip by CandleItem(low=379.25, high=384.4, open=379.3, close=382.75, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-26 05:00:25 INFO: not found applicable config for candle 2020-08-26 05:00:25 INFO: check need new order None 2020-08-26 05:00:25 INFO: init new order end 2020-08-26 05:00:25 INFO: 2020-08-26 05:00:25 INFO: 2020-08-26 05:00:25 INFO: 2020-08-26 05:00:25 INFO: 2020-08-26 05:02:00 INFO: 2020-08-26 05:02:00 INFO: 2020-08-26 05:02:00 INFO: 2020-08-26 05:02:00 INFO: 2020-08-26 05:02:00 INFO: clearing start 2020-08-26 05:02:00 INFO: clearing end 2020-08-26 05:02:00 INFO: 2020-08-26 05:02:00 INFO: 2020-08-26 05:02:00 INFO: 2020-08-26 05:02:00 INFO: 2020-08-26 06:00:20 INFO: 2020-08-26 06:00:20 INFO: 2020-08-26 06:00:20 INFO: 2020-08-26 06:00:20 INFO: 2020-08-26 06:00:20 INFO: init new order start 2020-08-26 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 26, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.75, 'high': 387.65, 'low': 382.7, 'close': 387.25, 'trades': 3737, 'volume': 2852366, 'vwap': 385.59, 'lastSize': 1000, 'turnover': 109981578465, 'homeNotional': 32461.31361847126, 'foreignNotional': 12516510.693906864}, {'timestamp': datetime.datetime(2020, 8, 26, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.3, 'high': 384.4, 'low': 379.25, 'close': 382.75, 'trades': 3322, 'volume': 2652006, 'vwap': 382.35, 'lastSize': 3988, 'turnover': 101397307340, 'homeNotional': 30028.943063186693, 'foreignNotional': 11481373.608523576}, {'timestamp': datetime.datetime(2020, 8, 26, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 383.05, 'high': 383.1, 'low': 377.65, 'close': 379.3, 'trades': 5087, 'volume': 4360098, 'vwap': 380.33, 'lastSize': 8000, 'turnover': 165825316240, 'homeNotional': 49266.71954300248, 'foreignNotional': 18737446.037599698}] 2020-08-26 06:00:20 INFO: prepare candles [CandleItem(low=382.7, high=387.65, open=382.75, close=387.25, color='GREEN'), CandleItem(low=379.25, high=384.4, open=379.3, close=382.75, color='GREEN'), CandleItem(low=377.65, high=383.1, open=383.05, close=379.3, color='RED')] 2020-08-26 06:00:20 INFO: skip by colors first_candle=CandleItem(low=377.65, high=383.1, open=383.05, close=379.3, color='RED') second_candle=CandleItem(low=379.25, high=384.4, open=379.3, close=382.75, color='GREEN') last_candle=CandleItem(low=382.7, high=387.65, open=382.75, close=387.25, color='GREEN') 2020-08-26 06:00:20 INFO: check need new order None 2020-08-26 06:00:20 INFO: init new order end 2020-08-26 06:00:20 INFO: 2020-08-26 06:00:20 INFO: 2020-08-26 06:00:20 INFO: 2020-08-26 06:00:20 INFO: 2020-08-26 06:02:00 INFO: 2020-08-26 06:02:00 INFO: 2020-08-26 06:02:00 INFO: 2020-08-26 06:02:00 INFO: 2020-08-26 06:02:00 INFO: clearing start 2020-08-26 06:02:00 INFO: clearing end 2020-08-26 06:02:00 INFO: 2020-08-26 06:02:00 INFO: 2020-08-26 06:02:00 INFO: 2020-08-26 06:02:00 INFO: 2020-08-26 07:00:20 INFO: 2020-08-26 07:00:20 INFO: 2020-08-26 07:00:20 INFO: 2020-08-26 07:00:20 INFO: 2020-08-26 07:00:20 INFO: init new order start 2020-08-26 07:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 26, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.25, 'high': 388.0, 'low': 384.0, 'close': 386.35, 'trades': 3023, 'volume': 2716025, 'vwap': 385.91, 'lastSize': 1, 'turnover': 104813197510, 'homeNotional': 30866.221128123354, 'foreignNotional': 11911525.543554729}, {'timestamp': datetime.datetime(2020, 8, 26, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.75, 'high': 387.65, 'low': 382.7, 'close': 387.25, 'trades': 3737, 'volume': 2852366, 'vwap': 385.59, 'lastSize': 1000, 'turnover': 109981578465, 'homeNotional': 32461.31361847126, 'foreignNotional': 12516510.693906864}, {'timestamp': datetime.datetime(2020, 8, 26, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 379.3, 'high': 384.4, 'low': 379.25, 'close': 382.75, 'trades': 3322, 'volume': 2652006, 'vwap': 382.35, 'lastSize': 3988, 'turnover': 101397307340, 'homeNotional': 30028.943063186693, 'foreignNotional': 11481373.608523576}] 2020-08-26 07:00:21 INFO: prepare candles [CandleItem(low=384.0, high=388.0, open=387.25, close=386.35, color='RED'), CandleItem(low=382.7, high=387.65, open=382.75, close=387.25, color='GREEN'), CandleItem(low=379.25, high=384.4, open=379.3, close=382.75, color='GREEN')] 2020-08-26 07:00:21 INFO: last_candle=CandleItem(low=384.0, high=388.0, open=387.25, close=386.35, color='RED') 2020-08-26 07: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-26 07: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=384.0, high=388.0, open=387.25, close=386.35, color='RED') 2020-08-26 07:00:21 INFO: skip by CandleItem(low=384.0, high=388.0, open=387.25, close=386.35, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-26 07: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-26 07: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=384.0, high=388.0, open=387.25, close=386.35, color='RED') 2020-08-26 07:00:21 INFO: skip by CandleItem(low=384.0, high=388.0, open=387.25, close=386.35, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-26 07:00:21 INFO: not found applicable config for candle 2020-08-26 07:00:21 INFO: check need new order None 2020-08-26 07:00:21 INFO: init new order end 2020-08-26 07:00:21 INFO: 2020-08-26 07:00:21 INFO: 2020-08-26 07:00:21 INFO: 2020-08-26 07:00:21 INFO: 2020-08-26 07:02:00 INFO: 2020-08-26 07:02:00 INFO: 2020-08-26 07:02:00 INFO: 2020-08-26 07:02:00 INFO: 2020-08-26 07:02:00 INFO: clearing start 2020-08-26 07:02:00 INFO: clearing end 2020-08-26 07:02:00 INFO: 2020-08-26 07:02:00 INFO: 2020-08-26 07:02:00 INFO: 2020-08-26 07:02:00 INFO: 2020-08-26 08:00:20 INFO: 2020-08-26 08:00:20 INFO: 2020-08-26 08:00:20 INFO: 2020-08-26 08:00:20 INFO: 2020-08-26 08:00:20 INFO: init new order start 2020-08-26 08:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 26, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.35, 'high': 388.0, 'low': 385.05, 'close': 385.35, 'trades': 2509, 'volume': 2413720, 'vwap': 386.54, 'lastSize': 1, 'turnover': 93299668060, 'homeNotional': 27462.32651347105, 'foreignNotional': 10615278.436945848}, {'timestamp': datetime.datetime(2020, 8, 26, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.25, 'high': 388.0, 'low': 384.0, 'close': 386.35, 'trades': 3023, 'volume': 2716025, 'vwap': 385.91, 'lastSize': 1, 'turnover': 104813197510, 'homeNotional': 30866.221128123354, 'foreignNotional': 11911525.543554729}, {'timestamp': datetime.datetime(2020, 8, 26, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.75, 'high': 387.65, 'low': 382.7, 'close': 387.25, 'trades': 3737, 'volume': 2852366, 'vwap': 385.59, 'lastSize': 1000, 'turnover': 109981578465, 'homeNotional': 32461.31361847126, 'foreignNotional': 12516510.693906864}] 2020-08-26 08:00:20 INFO: prepare candles [CandleItem(low=385.05, high=388.0, open=386.35, close=385.35, color='RED'), CandleItem(low=384.0, high=388.0, open=387.25, close=386.35, color='RED'), CandleItem(low=382.7, high=387.65, open=382.75, close=387.25, color='GREEN')] 2020-08-26 08:00:20 INFO: skip by colors first_candle=CandleItem(low=382.7, high=387.65, open=382.75, close=387.25, color='GREEN') second_candle=CandleItem(low=384.0, high=388.0, open=387.25, close=386.35, color='RED') last_candle=CandleItem(low=385.05, high=388.0, open=386.35, close=385.35, color='RED') 2020-08-26 08:00:20 INFO: check need new order None 2020-08-26 08:00:20 INFO: init new order end 2020-08-26 08:00:20 INFO: 2020-08-26 08:00:20 INFO: 2020-08-26 08:00:20 INFO: 2020-08-26 08:00:20 INFO: 2020-08-26 08:02:00 INFO: 2020-08-26 08:02:00 INFO: 2020-08-26 08:02:00 INFO: 2020-08-26 08:02:00 INFO: 2020-08-26 08:02:00 INFO: clearing start 2020-08-26 08:02:00 INFO: clearing end 2020-08-26 08:02:00 INFO: 2020-08-26 08:02:00 INFO: 2020-08-26 08:02:00 INFO: 2020-08-26 08:02:00 INFO: 2020-08-26 09:00:20 INFO: 2020-08-26 09:00:20 INFO: 2020-08-26 09:00:20 INFO: 2020-08-26 09:00:20 INFO: 2020-08-26 09:00:20 INFO: init new order start 2020-08-26 09:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 26, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.35, 'high': 387.65, 'low': 385.1, 'close': 385.5, 'trades': 2172, 'volume': 1911301, 'vwap': 386.34, 'lastSize': 1360, 'turnover': 73840922225, 'homeNotional': 21740.86344385726, 'foreignNotional': 8399344.022403155}, {'timestamp': datetime.datetime(2020, 8, 26, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.35, 'high': 388.0, 'low': 385.05, 'close': 385.35, 'trades': 2509, 'volume': 2413720, 'vwap': 386.54, 'lastSize': 1, 'turnover': 93299668060, 'homeNotional': 27462.32651347105, 'foreignNotional': 10615278.436945848}, {'timestamp': datetime.datetime(2020, 8, 26, 4, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.25, 'high': 388.0, 'low': 384.0, 'close': 386.35, 'trades': 3023, 'volume': 2716025, 'vwap': 385.91, 'lastSize': 1, 'turnover': 104813197510, 'homeNotional': 30866.221128123354, 'foreignNotional': 11911525.543554729}] 2020-08-26 09:00:20 INFO: prepare candles [CandleItem(low=385.1, high=387.65, open=385.35, close=385.5, color='GREEN'), CandleItem(low=385.05, high=388.0, open=386.35, close=385.35, color='RED'), CandleItem(low=384.0, high=388.0, open=387.25, close=386.35, color='RED')] 2020-08-26 09:00:20 INFO: last_candle=CandleItem(low=385.1, high=387.65, open=385.35, close=385.5, color='GREEN') 2020-08-26 09:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-08-26 09:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=385.1, high=387.65, open=385.35, close=385.5, color='GREEN') 2020-08-26 09:00:20 INFO: skip by CandleItem(low=385.1, high=387.65, open=385.35, close=385.5, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-26 09:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-08-26 09:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=385.1, high=387.65, open=385.35, close=385.5, color='GREEN') 2020-08-26 09:00:20 INFO: skip by CandleItem(low=385.1, high=387.65, open=385.35, close=385.5, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-26 09:00:20 INFO: not found applicable config for candle 2020-08-26 09:00:20 INFO: check need new order None 2020-08-26 09:00:20 INFO: init new order end 2020-08-26 09:00:20 INFO: 2020-08-26 09:00:20 INFO: 2020-08-26 09:00:20 INFO: 2020-08-26 09:00:20 INFO: 2020-08-26 09:02:00 INFO: 2020-08-26 09:02:00 INFO: 2020-08-26 09:02:00 INFO: 2020-08-26 09:02:00 INFO: 2020-08-26 09:02:00 INFO: clearing start 2020-08-26 09:02:01 INFO: clearing end 2020-08-26 09:02:01 INFO: 2020-08-26 09:02:01 INFO: 2020-08-26 09:02:01 INFO: 2020-08-26 09:02:01 INFO: 2020-08-26 10:00:20 INFO: 2020-08-26 10:00:20 INFO: 2020-08-26 10:00:20 INFO: 2020-08-26 10:00:20 INFO: 2020-08-26 10:00:20 INFO: init new order start 2020-08-26 10:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 26, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.5, 'high': 385.65, 'low': 380.45, 'close': 381.05, 'trades': 3787, 'volume': 3033408, 'vwap': 382.71, 'lastSize': 600, 'turnover': 116090540155, 'homeNotional': 34401.180880797016, 'foreignNotional': 13165620.066188825}, {'timestamp': datetime.datetime(2020, 8, 26, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.35, 'high': 387.65, 'low': 385.1, 'close': 385.5, 'trades': 2172, 'volume': 1911301, 'vwap': 386.34, 'lastSize': 1360, 'turnover': 73840922225, 'homeNotional': 21740.86344385726, 'foreignNotional': 8399344.022403155}, {'timestamp': datetime.datetime(2020, 8, 26, 5, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.35, 'high': 388.0, 'low': 385.05, 'close': 385.35, 'trades': 2509, 'volume': 2413720, 'vwap': 386.54, 'lastSize': 1, 'turnover': 93299668060, 'homeNotional': 27462.32651347105, 'foreignNotional': 10615278.436945848}] 2020-08-26 10:00:20 INFO: prepare candles [CandleItem(low=380.45, high=385.65, open=385.5, close=381.05, color='RED'), CandleItem(low=385.1, high=387.65, open=385.35, close=385.5, color='GREEN'), CandleItem(low=385.05, high=388.0, open=386.35, close=385.35, color='RED')] 2020-08-26 10:00:20 INFO: skip by colors first_candle=CandleItem(low=385.05, high=388.0, open=386.35, close=385.35, color='RED') second_candle=CandleItem(low=385.1, high=387.65, open=385.35, close=385.5, color='GREEN') last_candle=CandleItem(low=380.45, high=385.65, open=385.5, close=381.05, color='RED') 2020-08-26 10:00:20 INFO: check need new order None 2020-08-26 10:00:20 INFO: init new order end 2020-08-26 10:00:20 INFO: 2020-08-26 10:00:20 INFO: 2020-08-26 10:00:20 INFO: 2020-08-26 10:00:20 INFO: 2020-08-26 10:02:00 INFO: 2020-08-26 10:02:00 INFO: 2020-08-26 10:02:00 INFO: 2020-08-26 10:02:00 INFO: 2020-08-26 10:02:00 INFO: clearing start 2020-08-26 10:02:00 INFO: clearing end 2020-08-26 10:02:00 INFO: 2020-08-26 10:02:00 INFO: 2020-08-26 10:02:00 INFO: 2020-08-26 10:02:00 INFO: 2020-08-26 11:00:20 INFO: 2020-08-26 11:00:20 INFO: 2020-08-26 11:00:20 INFO: 2020-08-26 11:00:20 INFO: 2020-08-26 11:00:20 INFO: init new order start 2020-08-26 11:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 26, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 381.05, 'high': 383.35, 'low': 379.5, 'close': 381.7, 'trades': 3362, 'volume': 2661776, 'vwap': 381.6, 'lastSize': 100, 'turnover': 101570745940, 'homeNotional': 30179.096135307966, 'foreignNotional': 11516090.104680441}, {'timestamp': datetime.datetime(2020, 8, 26, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.5, 'high': 385.65, 'low': 380.45, 'close': 381.05, 'trades': 3787, 'volume': 3033408, 'vwap': 382.71, 'lastSize': 600, 'turnover': 116090540155, 'homeNotional': 34401.180880797016, 'foreignNotional': 13165620.066188825}, {'timestamp': datetime.datetime(2020, 8, 26, 6, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.35, 'high': 387.65, 'low': 385.1, 'close': 385.5, 'trades': 2172, 'volume': 1911301, 'vwap': 386.34, 'lastSize': 1360, 'turnover': 73840922225, 'homeNotional': 21740.86344385726, 'foreignNotional': 8399344.022403155}] 2020-08-26 11:00:21 INFO: prepare candles [CandleItem(low=379.5, high=383.35, open=381.05, close=381.7, color='GREEN'), CandleItem(low=380.45, high=385.65, open=385.5, close=381.05, color='RED'), CandleItem(low=385.1, high=387.65, open=385.35, close=385.5, color='GREEN')] 2020-08-26 11:00:21 INFO: skip by colors first_candle=CandleItem(low=385.1, high=387.65, open=385.35, close=385.5, color='GREEN') second_candle=CandleItem(low=380.45, high=385.65, open=385.5, close=381.05, color='RED') last_candle=CandleItem(low=379.5, high=383.35, open=381.05, close=381.7, color='GREEN') 2020-08-26 11:00:21 INFO: check need new order None 2020-08-26 11:00:21 INFO: init new order end 2020-08-26 11:00:21 INFO: 2020-08-26 11:00:21 INFO: 2020-08-26 11:00:21 INFO: 2020-08-26 11:00:21 INFO: 2020-08-26 11:02:00 INFO: 2020-08-26 11:02:00 INFO: 2020-08-26 11:02:00 INFO: 2020-08-26 11:02:00 INFO: 2020-08-26 11:02:00 INFO: clearing start 2020-08-26 11:02:00 INFO: clearing end 2020-08-26 11:02:00 INFO: 2020-08-26 11:02:00 INFO: 2020-08-26 11:02:00 INFO: 2020-08-26 11:02:00 INFO: 2020-08-26 12:00:20 INFO: 2020-08-26 12:00:20 INFO: 2020-08-26 12:00:20 INFO: 2020-08-26 12:00:20 INFO: 2020-08-26 12:00:20 INFO: init new order start 2020-08-26 12:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 26, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 381.7, 'high': 384.2, 'low': 380.6, 'close': 382.4, 'trades': 4043, 'volume': 2401810, 'vwap': 382.28, 'lastSize': 45, 'turnover': 91815155660, 'homeNotional': 27262.49800941524, 'foreignNotional': 10421795.01528625}, {'timestamp': datetime.datetime(2020, 8, 26, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 381.05, 'high': 383.35, 'low': 379.5, 'close': 381.7, 'trades': 3362, 'volume': 2661776, 'vwap': 381.6, 'lastSize': 100, 'turnover': 101570745940, 'homeNotional': 30179.096135307966, 'foreignNotional': 11516090.104680441}, {'timestamp': datetime.datetime(2020, 8, 26, 7, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.5, 'high': 385.65, 'low': 380.45, 'close': 381.05, 'trades': 3787, 'volume': 3033408, 'vwap': 382.71, 'lastSize': 600, 'turnover': 116090540155, 'homeNotional': 34401.180880797016, 'foreignNotional': 13165620.066188825}] 2020-08-26 12:00:20 INFO: prepare candles [CandleItem(low=380.6, high=384.2, open=381.7, close=382.4, color='GREEN'), CandleItem(low=379.5, high=383.35, open=381.05, close=381.7, color='GREEN'), CandleItem(low=380.45, high=385.65, open=385.5, close=381.05, color='RED')] 2020-08-26 12:00:20 INFO: skip by colors first_candle=CandleItem(low=380.45, high=385.65, open=385.5, close=381.05, color='RED') second_candle=CandleItem(low=379.5, high=383.35, open=381.05, close=381.7, color='GREEN') last_candle=CandleItem(low=380.6, high=384.2, open=381.7, close=382.4, color='GREEN') 2020-08-26 12:00:20 INFO: check need new order None 2020-08-26 12:00:20 INFO: init new order end 2020-08-26 12:00:20 INFO: 2020-08-26 12:00:20 INFO: 2020-08-26 12:00:20 INFO: 2020-08-26 12:00:20 INFO: 2020-08-26 12:02:00 INFO: 2020-08-26 12:02:00 INFO: 2020-08-26 12:02:00 INFO: 2020-08-26 12:02:00 INFO: 2020-08-26 12:02:00 INFO: clearing start 2020-08-26 12:02:00 INFO: clearing end 2020-08-26 12:02:00 INFO: 2020-08-26 12:02:00 INFO: 2020-08-26 12:02:00 INFO: 2020-08-26 12:02:00 INFO: 2020-08-26 13:00:20 INFO: 2020-08-26 13:00:20 INFO: 2020-08-26 13:00:20 INFO: 2020-08-26 13:00:20 INFO: 2020-08-26 13:00:20 INFO: init new order start 2020-08-26 13:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 26, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.4, 'high': 383.8, 'low': 381.2, 'close': 382.05, 'trades': 2789, 'volume': 1888759, 'vwap': 382.7, 'lastSize': 11, 'turnover': 72281603860, 'homeNotional': 21468.81532744032, 'foreignNotional': 8215981.668983517}, {'timestamp': datetime.datetime(2020, 8, 26, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 381.7, 'high': 384.2, 'low': 380.6, 'close': 382.4, 'trades': 4043, 'volume': 2401810, 'vwap': 382.28, 'lastSize': 45, 'turnover': 91815155660, 'homeNotional': 27262.49800941524, 'foreignNotional': 10421795.01528625}, {'timestamp': datetime.datetime(2020, 8, 26, 8, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 381.05, 'high': 383.35, 'low': 379.5, 'close': 381.7, 'trades': 3362, 'volume': 2661776, 'vwap': 381.6, 'lastSize': 100, 'turnover': 101570745940, 'homeNotional': 30179.096135307966, 'foreignNotional': 11516090.104680441}] 2020-08-26 13:00:20 INFO: prepare candles [CandleItem(low=381.2, high=383.8, open=382.4, close=382.05, color='RED'), CandleItem(low=380.6, high=384.2, open=381.7, close=382.4, color='GREEN'), CandleItem(low=379.5, high=383.35, open=381.05, close=381.7, color='GREEN')] 2020-08-26 13:00:20 INFO: last_candle=CandleItem(low=381.2, high=383.8, open=382.4, close=382.05, color='RED') 2020-08-26 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-26 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=381.2, high=383.8, open=382.4, close=382.05, color='RED') 2020-08-26 13:00:20 INFO: skip by CandleItem(low=381.2, high=383.8, open=382.4, close=382.05, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-26 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-26 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=381.2, high=383.8, open=382.4, close=382.05, color='RED') 2020-08-26 13:00:20 INFO: skip by CandleItem(low=381.2, high=383.8, open=382.4, close=382.05, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-26 13:00:20 INFO: not found applicable config for candle 2020-08-26 13:00:20 INFO: check need new order None 2020-08-26 13:00:20 INFO: init new order end 2020-08-26 13:00:20 INFO: 2020-08-26 13:00:20 INFO: 2020-08-26 13:00:20 INFO: 2020-08-26 13:00:20 INFO: 2020-08-26 13:02:00 INFO: 2020-08-26 13:02:00 INFO: 2020-08-26 13:02:00 INFO: 2020-08-26 13:02:00 INFO: 2020-08-26 13:02:00 INFO: clearing start 2020-08-26 13:02:00 INFO: clearing end 2020-08-26 13:02:00 INFO: 2020-08-26 13:02:00 INFO: 2020-08-26 13:02:00 INFO: 2020-08-26 13:02:00 INFO: 2020-08-26 14:00:20 INFO: 2020-08-26 14:00:20 INFO: 2020-08-26 14:00:20 INFO: 2020-08-26 14:00:20 INFO: 2020-08-26 14:00:20 INFO: init new order start 2020-08-26 14:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 26, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.05, 'high': 386.3, 'low': 382.0, 'close': 382.75, 'trades': 4476, 'volume': 2777365, 'vwap': 384.22, 'lastSize': 1067, 'turnover': 106709881300, 'homeNotional': 31672.32944457103, 'foreignNotional': 12168945.608501954}, {'timestamp': datetime.datetime(2020, 8, 26, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.4, 'high': 383.8, 'low': 381.2, 'close': 382.05, 'trades': 2789, 'volume': 1888759, 'vwap': 382.7, 'lastSize': 11, 'turnover': 72281603860, 'homeNotional': 21468.81532744032, 'foreignNotional': 8215981.668983517}, {'timestamp': datetime.datetime(2020, 8, 26, 9, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 381.7, 'high': 384.2, 'low': 380.6, 'close': 382.4, 'trades': 4043, 'volume': 2401810, 'vwap': 382.28, 'lastSize': 45, 'turnover': 91815155660, 'homeNotional': 27262.49800941524, 'foreignNotional': 10421795.01528625}] 2020-08-26 14:00:21 INFO: prepare candles [CandleItem(low=382.0, high=386.3, open=382.05, close=382.75, color='GREEN'), CandleItem(low=381.2, high=383.8, open=382.4, close=382.05, color='RED'), CandleItem(low=380.6, high=384.2, open=381.7, close=382.4, color='GREEN')] 2020-08-26 14:00:21 INFO: skip by colors first_candle=CandleItem(low=380.6, high=384.2, open=381.7, close=382.4, color='GREEN') second_candle=CandleItem(low=381.2, high=383.8, open=382.4, close=382.05, color='RED') last_candle=CandleItem(low=382.0, high=386.3, open=382.05, close=382.75, color='GREEN') 2020-08-26 14:00:21 INFO: check need new order None 2020-08-26 14:00:21 INFO: init new order end 2020-08-26 14:00:21 INFO: 2020-08-26 14:00:21 INFO: 2020-08-26 14:00:21 INFO: 2020-08-26 14:00:21 INFO: 2020-08-26 14:02:00 INFO: 2020-08-26 14:02:00 INFO: 2020-08-26 14:02:00 INFO: 2020-08-26 14:02:00 INFO: 2020-08-26 14:02:00 INFO: clearing start 2020-08-26 14:02:00 INFO: clearing end 2020-08-26 14:02:00 INFO: 2020-08-26 14:02:00 INFO: 2020-08-26 14:02:00 INFO: 2020-08-26 14:02:00 INFO: 2020-08-26 15:00:20 INFO: 2020-08-26 15:00:20 INFO: 2020-08-26 15:00:20 INFO: 2020-08-26 15:00:20 INFO: 2020-08-26 15:00:20 INFO: init new order start 2020-08-26 15:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 26, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.75, 'high': 385.65, 'low': 382.4, 'close': 382.6, 'trades': 2846, 'volume': 1738107, 'vwap': 383.95, 'lastSize': 30, 'turnover': 66733219085, 'homeNotional': 19824.230354545733, 'foreignNotional': 7611372.312264519}, {'timestamp': datetime.datetime(2020, 8, 26, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.05, 'high': 386.3, 'low': 382.0, 'close': 382.75, 'trades': 4476, 'volume': 2777365, 'vwap': 384.22, 'lastSize': 1067, 'turnover': 106709881300, 'homeNotional': 31672.32944457103, 'foreignNotional': 12168945.608501954}, {'timestamp': datetime.datetime(2020, 8, 26, 10, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.4, 'high': 383.8, 'low': 381.2, 'close': 382.05, 'trades': 2789, 'volume': 1888759, 'vwap': 382.7, 'lastSize': 11, 'turnover': 72281603860, 'homeNotional': 21468.81532744032, 'foreignNotional': 8215981.668983517}] 2020-08-26 15:00:20 INFO: prepare candles [CandleItem(low=382.4, high=385.65, open=382.75, close=382.6, color='RED'), CandleItem(low=382.0, high=386.3, open=382.05, close=382.75, color='GREEN'), CandleItem(low=381.2, high=383.8, open=382.4, close=382.05, color='RED')] 2020-08-26 15:00:20 INFO: skip by colors first_candle=CandleItem(low=381.2, high=383.8, open=382.4, close=382.05, color='RED') second_candle=CandleItem(low=382.0, high=386.3, open=382.05, close=382.75, color='GREEN') last_candle=CandleItem(low=382.4, high=385.65, open=382.75, close=382.6, color='RED') 2020-08-26 15:00:20 INFO: check need new order None 2020-08-26 15:00:20 INFO: init new order end 2020-08-26 15:00:20 INFO: 2020-08-26 15:00:20 INFO: 2020-08-26 15:00:20 INFO: 2020-08-26 15:00:20 INFO: 2020-08-26 15:02:00 INFO: 2020-08-26 15:02:00 INFO: 2020-08-26 15:02:00 INFO: 2020-08-26 15:02:00 INFO: 2020-08-26 15:02:00 INFO: clearing start 2020-08-26 15:02:00 INFO: clearing end 2020-08-26 15:02:00 INFO: 2020-08-26 15:02:00 INFO: 2020-08-26 15:02:00 INFO: 2020-08-26 15:02:00 INFO: 2020-08-26 16:00:20 INFO: 2020-08-26 16:00:20 INFO: 2020-08-26 16:00:20 INFO: 2020-08-26 16:00:20 INFO: 2020-08-26 16:00:20 INFO: init new order start 2020-08-26 16:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 26, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.6, 'high': 385.3, 'low': 378.2, 'close': 380.3, 'trades': 6704, 'volume': 4117855, 'vwap': 380.77, 'lastSize': 1940, 'turnover': 156791909885, 'homeNotional': 46666.67877476041, 'foreignNotional': 17769138.248757277}, {'timestamp': datetime.datetime(2020, 8, 26, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.75, 'high': 385.65, 'low': 382.4, 'close': 382.6, 'trades': 2846, 'volume': 1738107, 'vwap': 383.95, 'lastSize': 30, 'turnover': 66733219085, 'homeNotional': 19824.230354545733, 'foreignNotional': 7611372.312264519}, {'timestamp': datetime.datetime(2020, 8, 26, 11, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.05, 'high': 386.3, 'low': 382.0, 'close': 382.75, 'trades': 4476, 'volume': 2777365, 'vwap': 384.22, 'lastSize': 1067, 'turnover': 106709881300, 'homeNotional': 31672.32944457103, 'foreignNotional': 12168945.608501954}] 2020-08-26 16:00:20 INFO: prepare candles [CandleItem(low=378.2, high=385.3, open=382.6, close=380.3, color='RED'), CandleItem(low=382.4, high=385.65, open=382.75, close=382.6, color='RED'), CandleItem(low=382.0, high=386.3, open=382.05, close=382.75, color='GREEN')] 2020-08-26 16:00:20 INFO: skip by colors first_candle=CandleItem(low=382.0, high=386.3, open=382.05, close=382.75, color='GREEN') second_candle=CandleItem(low=382.4, high=385.65, open=382.75, close=382.6, color='RED') last_candle=CandleItem(low=378.2, high=385.3, open=382.6, close=380.3, color='RED') 2020-08-26 16:00:20 INFO: check need new order None 2020-08-26 16:00:20 INFO: init new order end 2020-08-26 16:00:20 INFO: 2020-08-26 16:00:20 INFO: 2020-08-26 16:00:20 INFO: 2020-08-26 16:00:20 INFO: 2020-08-26 16:02:00 INFO: 2020-08-26 16:02:00 INFO: 2020-08-26 16:02:00 INFO: 2020-08-26 16:02:00 INFO: 2020-08-26 16:02:00 INFO: clearing start 2020-08-26 16:02:00 INFO: clearing end 2020-08-26 16:02:00 INFO: 2020-08-26 16:02:00 INFO: 2020-08-26 16:02:00 INFO: 2020-08-26 16:02:00 INFO: 2020-08-26 17:00:20 INFO: 2020-08-26 17:00:20 INFO: 2020-08-26 17:00:20 INFO: 2020-08-26 17:00:20 INFO: 2020-08-26 17:00:20 INFO: init new order start 2020-08-26 17:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 26, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 380.3, 'high': 385.95, 'low': 377.05, 'close': 384.7, 'trades': 7228, 'volume': 6300296, 'vwap': 380.7, 'lastSize': 5, 'turnover': 239851931300, 'homeNotional': 71275.11969004382, 'foreignNotional': 27134878.713559486}, {'timestamp': datetime.datetime(2020, 8, 26, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.6, 'high': 385.3, 'low': 378.2, 'close': 380.3, 'trades': 6704, 'volume': 4117855, 'vwap': 380.77, 'lastSize': 1940, 'turnover': 156791909885, 'homeNotional': 46666.67877476041, 'foreignNotional': 17769138.248757277}, {'timestamp': datetime.datetime(2020, 8, 26, 12, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.75, 'high': 385.65, 'low': 382.4, 'close': 382.6, 'trades': 2846, 'volume': 1738107, 'vwap': 383.95, 'lastSize': 30, 'turnover': 66733219085, 'homeNotional': 19824.230354545733, 'foreignNotional': 7611372.312264519}] 2020-08-26 17:00:20 INFO: prepare candles [CandleItem(low=377.05, high=385.95, open=380.3, close=384.7, color='GREEN'), CandleItem(low=378.2, high=385.3, open=382.6, close=380.3, color='RED'), CandleItem(low=382.4, high=385.65, open=382.75, close=382.6, color='RED')] 2020-08-26 17:00:20 INFO: last_candle=CandleItem(low=377.05, high=385.95, open=380.3, close=384.7, color='GREEN') 2020-08-26 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-26 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=377.05, high=385.95, open=380.3, close=384.7, color='GREEN') 2020-08-26 17:00:20 INFO: skip by CandleItem(low=377.05, high=385.95, open=380.3, close=384.7, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-26 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-26 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=377.05, high=385.95, open=380.3, close=384.7, color='GREEN') 2020-08-26 17:00:20 INFO: skip by CandleItem(low=377.05, high=385.95, open=380.3, close=384.7, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-26 17:00:20 INFO: not found applicable config for candle 2020-08-26 17:00:20 INFO: check need new order None 2020-08-26 17:00:20 INFO: init new order end 2020-08-26 17:00:20 INFO: 2020-08-26 17:00:20 INFO: 2020-08-26 17:00:20 INFO: 2020-08-26 17:00:20 INFO: 2020-08-26 17:02:00 INFO: 2020-08-26 17:02:00 INFO: 2020-08-26 17:02:00 INFO: 2020-08-26 17:02:00 INFO: 2020-08-26 17:02:00 INFO: clearing start 2020-08-26 17:02:00 INFO: clearing end 2020-08-26 17:02:00 INFO: 2020-08-26 17:02:00 INFO: 2020-08-26 17:02:00 INFO: 2020-08-26 17:02:00 INFO: 2020-08-26 18:00:20 INFO: 2020-08-26 18:00:20 INFO: 2020-08-26 18:00:20 INFO: 2020-08-26 18:00:20 INFO: 2020-08-26 18:00:20 INFO: init new order start 2020-08-26 18:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 26, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.7, 'high': 389.85, 'low': 384.75, 'close': 386.9, 'trades': 9239, 'volume': 6746274, 'vwap': 388.28, 'lastSize': 2, 'turnover': 261940375290, 'homeNotional': 77334.13638956533, 'foreignNotional': 30026947.104763348}, {'timestamp': datetime.datetime(2020, 8, 26, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 380.3, 'high': 385.95, 'low': 377.05, 'close': 384.7, 'trades': 7228, 'volume': 6300296, 'vwap': 380.7, 'lastSize': 5, 'turnover': 239851931300, 'homeNotional': 71275.11969004382, 'foreignNotional': 27134878.713559486}, {'timestamp': datetime.datetime(2020, 8, 26, 13, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 382.6, 'high': 385.3, 'low': 378.2, 'close': 380.3, 'trades': 6704, 'volume': 4117855, 'vwap': 380.77, 'lastSize': 1940, 'turnover': 156791909885, 'homeNotional': 46666.67877476041, 'foreignNotional': 17769138.248757277}] 2020-08-26 18:00:20 INFO: prepare candles [CandleItem(low=384.75, high=389.85, open=384.7, close=386.9, color='GREEN'), CandleItem(low=377.05, high=385.95, open=380.3, close=384.7, color='GREEN'), CandleItem(low=378.2, high=385.3, open=382.6, close=380.3, color='RED')] 2020-08-26 18:00:20 INFO: skip by colors first_candle=CandleItem(low=378.2, high=385.3, open=382.6, close=380.3, color='RED') second_candle=CandleItem(low=377.05, high=385.95, open=380.3, close=384.7, color='GREEN') last_candle=CandleItem(low=384.75, high=389.85, open=384.7, close=386.9, color='GREEN') 2020-08-26 18:00:20 INFO: check need new order None 2020-08-26 18:00:20 INFO: init new order end 2020-08-26 18:00:20 INFO: 2020-08-26 18:00:20 INFO: 2020-08-26 18:00:20 INFO: 2020-08-26 18:00:20 INFO: 2020-08-26 18:02:00 INFO: 2020-08-26 18:02:00 INFO: 2020-08-26 18:02:00 INFO: 2020-08-26 18:02:00 INFO: 2020-08-26 18:02:00 INFO: clearing start 2020-08-26 18:02:00 INFO: clearing end 2020-08-26 18:02:00 INFO: 2020-08-26 18:02:00 INFO: 2020-08-26 18:02:00 INFO: 2020-08-26 18:02:00 INFO: 2020-08-26 19:00:20 INFO: 2020-08-26 19:00:20 INFO: 2020-08-26 19:00:20 INFO: 2020-08-26 19:00:20 INFO: 2020-08-26 19:00:20 INFO: init new order start 2020-08-26 19:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 26, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.9, 'high': 390.75, 'low': 386.9, 'close': 390.5, 'trades': 5323, 'volume': 2481992, 'vwap': 388.97, 'lastSize': 10, 'turnover': 96540118195, 'homeNotional': 28488.656024934055, 'foreignNotional': 11081035.916627258}, {'timestamp': datetime.datetime(2020, 8, 26, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.7, 'high': 389.85, 'low': 384.75, 'close': 386.9, 'trades': 9239, 'volume': 6746274, 'vwap': 388.28, 'lastSize': 2, 'turnover': 261940375290, 'homeNotional': 77334.13638956533, 'foreignNotional': 30026947.104763348}, {'timestamp': datetime.datetime(2020, 8, 26, 14, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 380.3, 'high': 385.95, 'low': 377.05, 'close': 384.7, 'trades': 7228, 'volume': 6300296, 'vwap': 380.7, 'lastSize': 5, 'turnover': 239851931300, 'homeNotional': 71275.11969004382, 'foreignNotional': 27134878.713559486}] 2020-08-26 19:00:20 INFO: prepare candles [CandleItem(low=386.9, high=390.75, open=386.9, close=390.5, color='GREEN'), CandleItem(low=384.75, high=389.85, open=384.7, close=386.9, color='GREEN'), CandleItem(low=377.05, high=385.95, open=380.3, close=384.7, color='GREEN')] 2020-08-26 19:00:20 INFO: skip by colors first_candle=CandleItem(low=377.05, high=385.95, open=380.3, close=384.7, color='GREEN') second_candle=CandleItem(low=384.75, high=389.85, open=384.7, close=386.9, color='GREEN') last_candle=CandleItem(low=386.9, high=390.75, open=386.9, close=390.5, color='GREEN') 2020-08-26 19:00:20 INFO: check need new order None 2020-08-26 19:00:20 INFO: init new order end 2020-08-26 19:00:20 INFO: 2020-08-26 19:00:20 INFO: 2020-08-26 19:00:20 INFO: 2020-08-26 19:00:20 INFO: 2020-08-26 19:02:00 INFO: 2020-08-26 19:02:00 INFO: 2020-08-26 19:02:00 INFO: 2020-08-26 19:02:00 INFO: 2020-08-26 19:02:00 INFO: clearing start 2020-08-26 19:02:00 INFO: clearing end 2020-08-26 19:02:00 INFO: 2020-08-26 19:02:00 INFO: 2020-08-26 19:02:00 INFO: 2020-08-26 19:02:00 INFO: 2020-08-26 20:00:20 INFO: 2020-08-26 20:00:20 INFO: 2020-08-26 20:00:20 INFO: 2020-08-26 20:00:20 INFO: 2020-08-26 20:00:20 INFO: init new order start 2020-08-26 20:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 26, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 390.5, 'high': 393.95, 'low': 389.05, 'close': 389.15, 'trades': 8612, 'volume': 5474987, 'vwap': 391.32, 'lastSize': 500, 'turnover': 214245721100, 'homeNotional': 62917.19332357685, 'foreignNotional': 24620664.774378523}, {'timestamp': datetime.datetime(2020, 8, 26, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.9, 'high': 390.75, 'low': 386.9, 'close': 390.5, 'trades': 5323, 'volume': 2481992, 'vwap': 388.97, 'lastSize': 10, 'turnover': 96540118195, 'homeNotional': 28488.656024934055, 'foreignNotional': 11081035.916627258}, {'timestamp': datetime.datetime(2020, 8, 26, 15, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 384.7, 'high': 389.85, 'low': 384.75, 'close': 386.9, 'trades': 9239, 'volume': 6746274, 'vwap': 388.28, 'lastSize': 2, 'turnover': 261940375290, 'homeNotional': 77334.13638956533, 'foreignNotional': 30026947.104763348}] 2020-08-26 20:00:21 INFO: prepare candles [CandleItem(low=389.05, high=393.95, open=390.5, close=389.15, color='RED'), CandleItem(low=386.9, high=390.75, open=386.9, close=390.5, color='GREEN'), CandleItem(low=384.75, high=389.85, open=384.7, close=386.9, color='GREEN')] 2020-08-26 20:00:21 INFO: last_candle=CandleItem(low=389.05, high=393.95, open=390.5, close=389.15, color='RED') 2020-08-26 20:00:21 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-08-26 20:00:21 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=389.05, high=393.95, open=390.5, close=389.15, color='RED') 2020-08-26 20:00:21 INFO: skip by CandleItem(low=389.05, high=393.95, open=390.5, close=389.15, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-26 20:00:21 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=5.0, clearing_interval=3600, first_candle=None, second_candle=None, last_candle=CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0))) 2020-08-26 20:00:21 INFO: apply filter CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=389.05, high=393.95, open=390.5, close=389.15, color='RED') 2020-08-26 20:00:21 INFO: skip by CandleItem(low=389.05, high=393.95, open=390.5, close=389.15, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-26 20:00:21 INFO: not found applicable config for candle 2020-08-26 20:00:21 INFO: check need new order None 2020-08-26 20:00:21 INFO: init new order end 2020-08-26 20:00:21 INFO: 2020-08-26 20:00:21 INFO: 2020-08-26 20:00:21 INFO: 2020-08-26 20:00:21 INFO: 2020-08-26 20:02:00 INFO: 2020-08-26 20:02:00 INFO: 2020-08-26 20:02:00 INFO: 2020-08-26 20:02:00 INFO: 2020-08-26 20:02:00 INFO: clearing start 2020-08-26 20:02:00 INFO: clearing end 2020-08-26 20:02:00 INFO: 2020-08-26 20:02:00 INFO: 2020-08-26 20:02:00 INFO: 2020-08-26 20:02:00 INFO: 2020-08-26 21:00:20 INFO: 2020-08-26 21:00:20 INFO: 2020-08-26 21:00:20 INFO: 2020-08-26 21:00:20 INFO: 2020-08-26 21:00:20 INFO: init new order start 2020-08-26 21:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 26, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.15, 'high': 390.2, 'low': 388.3, 'close': 388.65, 'trades': 2844, 'volume': 1932960, 'vwap': 389.22, 'lastSize': 2000, 'turnover': 75234484460, 'homeNotional': 22188.094665958462, 'foreignNotional': 8636039.571786815}, {'timestamp': datetime.datetime(2020, 8, 26, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 390.5, 'high': 393.95, 'low': 389.05, 'close': 389.15, 'trades': 8612, 'volume': 5474987, 'vwap': 391.32, 'lastSize': 500, 'turnover': 214245721100, 'homeNotional': 62917.19332357685, 'foreignNotional': 24620664.774378523}, {'timestamp': datetime.datetime(2020, 8, 26, 16, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.9, 'high': 390.75, 'low': 386.9, 'close': 390.5, 'trades': 5323, 'volume': 2481992, 'vwap': 388.97, 'lastSize': 10, 'turnover': 96540118195, 'homeNotional': 28488.656024934055, 'foreignNotional': 11081035.916627258}] 2020-08-26 21:00:20 INFO: prepare candles [CandleItem(low=388.3, high=390.2, open=389.15, close=388.65, color='RED'), CandleItem(low=389.05, high=393.95, open=390.5, close=389.15, color='RED'), CandleItem(low=386.9, high=390.75, open=386.9, close=390.5, color='GREEN')] 2020-08-26 21:00:20 INFO: skip by colors first_candle=CandleItem(low=386.9, high=390.75, open=386.9, close=390.5, color='GREEN') second_candle=CandleItem(low=389.05, high=393.95, open=390.5, close=389.15, color='RED') last_candle=CandleItem(low=388.3, high=390.2, open=389.15, close=388.65, color='RED') 2020-08-26 21:00:20 INFO: check need new order None 2020-08-26 21:00:20 INFO: init new order end 2020-08-26 21:00:20 INFO: 2020-08-26 21:00:20 INFO: 2020-08-26 21:00:20 INFO: 2020-08-26 21:00:20 INFO: 2020-08-26 21:02:00 INFO: 2020-08-26 21:02:00 INFO: 2020-08-26 21:02:00 INFO: 2020-08-26 21:02:00 INFO: 2020-08-26 21:02:00 INFO: clearing start 2020-08-26 21:02:00 INFO: clearing end 2020-08-26 21:02:00 INFO: 2020-08-26 21:02:00 INFO: 2020-08-26 21:02:00 INFO: 2020-08-26 21:02:00 INFO: 2020-08-26 22:00:20 INFO: 2020-08-26 22:00:20 INFO: 2020-08-26 22:00:20 INFO: 2020-08-26 22:00:20 INFO: 2020-08-26 22:00:20 INFO: init new order start 2020-08-26 22:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 26, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.65, 'high': 390.2, 'low': 387.85, 'close': 387.95, 'trades': 2547, 'volume': 2269786, 'vwap': 389.08, 'lastSize': 4, 'turnover': 88310967600, 'homeNotional': 26019.178725383415, 'foreignNotional': 10123347.009182237}, {'timestamp': datetime.datetime(2020, 8, 26, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.15, 'high': 390.2, 'low': 388.3, 'close': 388.65, 'trades': 2844, 'volume': 1932960, 'vwap': 389.22, 'lastSize': 2000, 'turnover': 75234484460, 'homeNotional': 22188.094665958462, 'foreignNotional': 8636039.571786815}, {'timestamp': datetime.datetime(2020, 8, 26, 17, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 390.5, 'high': 393.95, 'low': 389.05, 'close': 389.15, 'trades': 8612, 'volume': 5474987, 'vwap': 391.32, 'lastSize': 500, 'turnover': 214245721100, 'homeNotional': 62917.19332357685, 'foreignNotional': 24620664.774378523}] 2020-08-26 22:00:20 INFO: prepare candles [CandleItem(low=387.85, high=390.2, open=388.65, close=387.95, color='RED'), CandleItem(low=388.3, high=390.2, open=389.15, close=388.65, color='RED'), CandleItem(low=389.05, high=393.95, open=390.5, close=389.15, color='RED')] 2020-08-26 22:00:20 INFO: skip by colors first_candle=CandleItem(low=389.05, high=393.95, open=390.5, close=389.15, color='RED') second_candle=CandleItem(low=388.3, high=390.2, open=389.15, close=388.65, color='RED') last_candle=CandleItem(low=387.85, high=390.2, open=388.65, close=387.95, color='RED') 2020-08-26 22:00:20 INFO: check need new order None 2020-08-26 22:00:20 INFO: init new order end 2020-08-26 22:00:20 INFO: 2020-08-26 22:00:20 INFO: 2020-08-26 22:00:20 INFO: 2020-08-26 22:00:20 INFO: 2020-08-26 22:02:00 INFO: 2020-08-26 22:02:00 INFO: 2020-08-26 22:02:00 INFO: 2020-08-26 22:02:00 INFO: 2020-08-26 22:02:00 INFO: clearing start 2020-08-26 22:02:00 INFO: clearing end 2020-08-26 22:02:00 INFO: 2020-08-26 22:02:00 INFO: 2020-08-26 22:02:00 INFO: 2020-08-26 22:02:00 INFO: 2020-08-26 22:06:19 INFO: Websocket Closed 2020-08-26 22:06:19 WARNING: reconnect to socket 2020-08-26 22:06:19 INFO: connect to https://www.bitmex.com/api/v1 by 5Fys4FdLzNqgk7-_XfAnFOeA 2020-08-26 22:06:19 INFO: Connecting to wss://www.bitmex.com/realtime?subscribe=order,trade:ETHUSD 2020-08-26 22:06:19 INFO: Authenticating with API Key. 2020-08-26 22:06:20 INFO: Connected to WS. 2020-08-26 23:00:20 INFO: 2020-08-26 23:00:20 INFO: 2020-08-26 23:00:20 INFO: 2020-08-26 23:00:20 INFO: 2020-08-26 23:00:20 INFO: init new order start 2020-08-26 23:00:21 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 26, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.95, 'high': 389.05, 'low': 386.75, 'close': 387.6, 'trades': 2293, 'volume': 2136685, 'vwap': 388.05, 'lastSize': 250, 'turnover': 82913920060, 'homeNotional': 24507.49058697732, 'foreignNotional': 9510117.089674681}, {'timestamp': datetime.datetime(2020, 8, 26, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.65, 'high': 390.2, 'low': 387.85, 'close': 387.95, 'trades': 2547, 'volume': 2269786, 'vwap': 389.08, 'lastSize': 4, 'turnover': 88310967600, 'homeNotional': 26019.178725383415, 'foreignNotional': 10123347.009182237}, {'timestamp': datetime.datetime(2020, 8, 26, 18, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 389.15, 'high': 390.2, 'low': 388.3, 'close': 388.65, 'trades': 2844, 'volume': 1932960, 'vwap': 389.22, 'lastSize': 2000, 'turnover': 75234484460, 'homeNotional': 22188.094665958462, 'foreignNotional': 8636039.571786815}] 2020-08-26 23:00:21 INFO: prepare candles [CandleItem(low=386.75, high=389.05, open=387.95, close=387.6, color='RED'), CandleItem(low=387.85, high=390.2, open=388.65, close=387.95, color='RED'), CandleItem(low=388.3, high=390.2, open=389.15, close=388.65, color='RED')] 2020-08-26 23:00:21 INFO: skip by colors first_candle=CandleItem(low=388.3, high=390.2, open=389.15, close=388.65, color='RED') second_candle=CandleItem(low=387.85, high=390.2, open=388.65, close=387.95, color='RED') last_candle=CandleItem(low=386.75, high=389.05, open=387.95, close=387.6, color='RED') 2020-08-26 23:00:21 INFO: check need new order None 2020-08-26 23:00:21 INFO: init new order end 2020-08-26 23:00:21 INFO: 2020-08-26 23:00:21 INFO: 2020-08-26 23:00:21 INFO: 2020-08-26 23:00:21 INFO: 2020-08-26 23:02:00 INFO: 2020-08-26 23:02:00 INFO: 2020-08-26 23:02:00 INFO: 2020-08-26 23:02:00 INFO: 2020-08-26 23:02:00 INFO: clearing start 2020-08-26 23:02:00 INFO: clearing end 2020-08-26 23:02:00 INFO: 2020-08-26 23:02:00 INFO: 2020-08-26 23:02:00 INFO: 2020-08-26 23:02:00 INFO: 2020-08-27 00:00:20 INFO: 2020-08-27 00:00:20 INFO: 2020-08-27 00:00:20 INFO: 2020-08-27 00:00:20 INFO: 2020-08-27 00:00:20 INFO: init new order start 2020-08-27 00:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 26, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.6, 'high': 390.0, 'low': 387.45, 'close': 390.0, 'trades': 2418, 'volume': 2015971, 'vwap': 388.83, 'lastSize': 2452, 'turnover': 78386375460, 'homeNotional': 23161.96291209968, 'foreignNotional': 9006005.27665777}, {'timestamp': datetime.datetime(2020, 8, 26, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.95, 'high': 389.05, 'low': 386.75, 'close': 387.6, 'trades': 2293, 'volume': 2136685, 'vwap': 388.05, 'lastSize': 250, 'turnover': 82913920060, 'homeNotional': 24507.49058697732, 'foreignNotional': 9510117.089674681}, {'timestamp': datetime.datetime(2020, 8, 26, 19, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.65, 'high': 390.2, 'low': 387.85, 'close': 387.95, 'trades': 2547, 'volume': 2269786, 'vwap': 389.08, 'lastSize': 4, 'turnover': 88310967600, 'homeNotional': 26019.178725383415, 'foreignNotional': 10123347.009182237}] 2020-08-27 00:00:20 INFO: prepare candles [CandleItem(low=387.45, high=390.0, open=387.6, close=390.0, color='GREEN'), CandleItem(low=386.75, high=389.05, open=387.95, close=387.6, color='RED'), CandleItem(low=387.85, high=390.2, open=388.65, close=387.95, color='RED')] 2020-08-27 00:00:20 INFO: last_candle=CandleItem(low=387.45, high=390.0, open=387.6, close=390.0, color='GREEN') 2020-08-27 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-08-27 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=387.45, high=390.0, open=387.6, close=390.0, color='GREEN') 2020-08-27 00:00:20 INFO: skip by CandleItem(low=387.45, high=390.0, open=387.6, close=390.0, color='GREEN') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-27 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-08-27 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=387.45, high=390.0, open=387.6, close=390.0, color='GREEN') 2020-08-27 00:00:20 INFO: skip by CandleItem(low=387.45, high=390.0, open=387.6, close=390.0, color='GREEN') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-27 00:00:20 INFO: not found applicable config for candle 2020-08-27 00:00:20 INFO: check need new order None 2020-08-27 00:00:20 INFO: init new order end 2020-08-27 00:00:20 INFO: 2020-08-27 00:00:20 INFO: 2020-08-27 00:00:20 INFO: 2020-08-27 00:00:20 INFO: 2020-08-27 00:02:00 INFO: 2020-08-27 00:02:00 INFO: 2020-08-27 00:02:00 INFO: 2020-08-27 00:02:00 INFO: 2020-08-27 00:02:00 INFO: clearing start 2020-08-27 00:02:01 INFO: clearing end 2020-08-27 00:02:01 INFO: 2020-08-27 00:02:01 INFO: 2020-08-27 00:02:01 INFO: 2020-08-27 00:02:01 INFO: 2020-08-27 01:00:20 INFO: 2020-08-27 01:00:20 INFO: 2020-08-27 01:00:20 INFO: 2020-08-27 01:00:20 INFO: 2020-08-27 01:00:20 INFO: init new order start 2020-08-27 01:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 26, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 390.0, 'high': 390.85, 'low': 387.7, 'close': 388.4, 'trades': 2544, 'volume': 1259924, 'vwap': 389.21, 'lastSize': 20, 'turnover': 49037030770, 'homeNotional': 14474.844335614103, 'foreignNotional': 5633711.565898962}, {'timestamp': datetime.datetime(2020, 8, 26, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.6, 'high': 390.0, 'low': 387.45, 'close': 390.0, 'trades': 2418, 'volume': 2015971, 'vwap': 388.83, 'lastSize': 2452, 'turnover': 78386375460, 'homeNotional': 23161.96291209968, 'foreignNotional': 9006005.27665777}, {'timestamp': datetime.datetime(2020, 8, 26, 20, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.95, 'high': 389.05, 'low': 386.75, 'close': 387.6, 'trades': 2293, 'volume': 2136685, 'vwap': 388.05, 'lastSize': 250, 'turnover': 82913920060, 'homeNotional': 24507.49058697732, 'foreignNotional': 9510117.089674681}] 2020-08-27 01:00:20 INFO: prepare candles [CandleItem(low=387.7, high=390.85, open=390.0, close=388.4, color='RED'), CandleItem(low=387.45, high=390.0, open=387.6, close=390.0, color='GREEN'), CandleItem(low=386.75, high=389.05, open=387.95, close=387.6, color='RED')] 2020-08-27 01:00:20 INFO: skip by colors first_candle=CandleItem(low=386.75, high=389.05, open=387.95, close=387.6, color='RED') second_candle=CandleItem(low=387.45, high=390.0, open=387.6, close=390.0, color='GREEN') last_candle=CandleItem(low=387.7, high=390.85, open=390.0, close=388.4, color='RED') 2020-08-27 01:00:20 INFO: check need new order None 2020-08-27 01:00:20 INFO: init new order end 2020-08-27 01:00:20 INFO: 2020-08-27 01:00:20 INFO: 2020-08-27 01:00:20 INFO: 2020-08-27 01:00:20 INFO: 2020-08-27 01:02:00 INFO: 2020-08-27 01:02:00 INFO: 2020-08-27 01:02:00 INFO: 2020-08-27 01:02:00 INFO: 2020-08-27 01:02:00 INFO: clearing start 2020-08-27 01:02:00 INFO: clearing end 2020-08-27 01:02:00 INFO: 2020-08-27 01:02:00 INFO: 2020-08-27 01:02:00 INFO: 2020-08-27 01:02:00 INFO: 2020-08-27 02:00:20 INFO: 2020-08-27 02:00:20 INFO: 2020-08-27 02:00:20 INFO: 2020-08-27 02:00:20 INFO: 2020-08-27 02:00:20 INFO: init new order start 2020-08-27 02:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 26, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.4, 'high': 388.75, 'low': 385.65, 'close': 386.05, 'trades': 3277, 'volume': 2405589, 'vwap': 387.02, 'lastSize': 855, 'turnover': 93100582120, 'homeNotional': 27571.078569039208, 'foreignNotional': 10670511.11649852}, {'timestamp': datetime.datetime(2020, 8, 26, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 390.0, 'high': 390.85, 'low': 387.7, 'close': 388.4, 'trades': 2544, 'volume': 1259924, 'vwap': 389.21, 'lastSize': 20, 'turnover': 49037030770, 'homeNotional': 14474.844335614103, 'foreignNotional': 5633711.565898962}, {'timestamp': datetime.datetime(2020, 8, 26, 21, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 387.6, 'high': 390.0, 'low': 387.45, 'close': 390.0, 'trades': 2418, 'volume': 2015971, 'vwap': 388.83, 'lastSize': 2452, 'turnover': 78386375460, 'homeNotional': 23161.96291209968, 'foreignNotional': 9006005.27665777}] 2020-08-27 02:00:20 INFO: prepare candles [CandleItem(low=385.65, high=388.75, open=388.4, close=386.05, color='RED'), CandleItem(low=387.7, high=390.85, open=390.0, close=388.4, color='RED'), CandleItem(low=387.45, high=390.0, open=387.6, close=390.0, color='GREEN')] 2020-08-27 02:00:20 INFO: skip by colors first_candle=CandleItem(low=387.45, high=390.0, open=387.6, close=390.0, color='GREEN') second_candle=CandleItem(low=387.7, high=390.85, open=390.0, close=388.4, color='RED') last_candle=CandleItem(low=385.65, high=388.75, open=388.4, close=386.05, color='RED') 2020-08-27 02:00:20 INFO: check need new order None 2020-08-27 02:00:20 INFO: init new order end 2020-08-27 02:00:20 INFO: 2020-08-27 02:00:20 INFO: 2020-08-27 02:00:20 INFO: 2020-08-27 02:00:20 INFO: 2020-08-27 02:02:00 INFO: 2020-08-27 02:02:00 INFO: 2020-08-27 02:02:00 INFO: 2020-08-27 02:02:00 INFO: 2020-08-27 02:02:00 INFO: clearing start 2020-08-27 02:02:00 INFO: clearing end 2020-08-27 02:02:00 INFO: 2020-08-27 02:02:00 INFO: 2020-08-27 02:02:00 INFO: 2020-08-27 02:02:00 INFO: 2020-08-27 03:00:20 INFO: 2020-08-27 03:00:20 INFO: 2020-08-27 03:00:20 INFO: 2020-08-27 03:00:20 INFO: 2020-08-27 03:00:20 INFO: init new order start 2020-08-27 03:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 27, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.05, 'high': 387.5, 'low': 385.6, 'close': 386.1, 'trades': 3538, 'volume': 1269664, 'vwap': 386.55, 'lastSize': 100, 'turnover': 49078812685, 'homeNotional': 14561.391313510456, 'foreignNotional': 5628703.468728437}, {'timestamp': datetime.datetime(2020, 8, 26, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.4, 'high': 388.75, 'low': 385.65, 'close': 386.05, 'trades': 3277, 'volume': 2405589, 'vwap': 387.02, 'lastSize': 855, 'turnover': 93100582120, 'homeNotional': 27571.078569039208, 'foreignNotional': 10670511.11649852}, {'timestamp': datetime.datetime(2020, 8, 26, 22, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 390.0, 'high': 390.85, 'low': 387.7, 'close': 388.4, 'trades': 2544, 'volume': 1259924, 'vwap': 389.21, 'lastSize': 20, 'turnover': 49037030770, 'homeNotional': 14474.844335614103, 'foreignNotional': 5633711.565898962}] 2020-08-27 03:00:20 INFO: prepare candles [CandleItem(low=385.6, high=387.5, open=386.05, close=386.1, color='GREEN'), CandleItem(low=385.65, high=388.75, open=388.4, close=386.05, color='RED'), CandleItem(low=387.7, high=390.85, open=390.0, close=388.4, color='RED')] 2020-08-27 03:00:20 INFO: last_candle=CandleItem(low=385.6, high=387.5, open=386.05, close=386.1, color='GREEN') 2020-08-27 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-08-27 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=385.6, high=387.5, open=386.05, close=386.1, color='GREEN') 2020-08-27 03:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=385.65, high=388.75, open=388.4, close=386.05, color='RED') 2020-08-27 03:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=387.7, high=390.85, open=390.0, close=388.4, color='RED') 2020-08-27 03:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=385.6, high=387.5, open=386.05, close=386.1, color='GREEN'), take_profit_factor=6.0, clearing_interval=3600) 2020-08-27 03:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=385.6, high=387.5, open=386.05, close=386.1, color='GREEN'), take_profit_factor=6.0, clearing_interval=3600) 2020-08-27 03:00:20 INFO: place order: start candle=CandleItem(low=385.6, high=387.5, open=386.05, close=386.1, color='GREEN') ticker='ETHUSD' price_offset=0.1 2020-08-27 03:00:20 INFO: place order: side_factor=-1 init_trigger_price=387.55 init_order_price=387.6 stop_price_offset=0.0 candle.size=1.8999999999999773 stop_price=385.6 take_price=398.9999999999999 2020-08-27 03:00:20 INFO: place order round: side_factor=-1 init_trigger_price=Decimal('387.55000000000001136868377216160297393798828125') init_order_price=Decimal('387.6000000000000227373675443232059478759765625') stop_price_offset=0.0 candle.size=1.8999999999999773 stop_price=Decimal('385.6000000000000227373675443232059478759765625') take_price=Decimal('398.9999999999998863131622783839702606201171875') 2020-08-27 03:00:20 INFO: place order: compute qty=974 2020-08-27 03:00:20 INFO: place order: save order to db 8fc6a0e9a09a447cab41ea695011f5f5; response=True 2020-08-27 03:00:20 INFO: post order to exchange resp={'orderID': '218f7121-09e0-d795-1fa0-0c7838c17251', 'clOrdID': '8fc6a0e9a09a447cab41ea695011f5f5', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 974, 'price': 387.6, 'displayQty': None, 'stopPx': 387.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': 974, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 27, 0, 0, 20, 792000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 27, 0, 0, 20, 792000, tzinfo=tzutc())} 2020-08-27 03:00:20 INFO: place new init order {'qty': 974, 'init_price': Decimal('387.55000000000001136868377216160297393798828125'), 'stop_price': Decimal('385.6000000000000227373675443232059478759765625'), 'take_price': Decimal('398.9999999999998863131622783839702606201171875'), 'order_uid': '8fc6a0e9a09a447cab41ea695011f5f5', 'response': {'orderID': '218f7121-09e0-d795-1fa0-0c7838c17251', 'clOrdID': '8fc6a0e9a09a447cab41ea695011f5f5', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 974, 'price': 387.6, 'displayQty': None, 'stopPx': 387.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': 974, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 27, 0, 0, 20, 792000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 27, 0, 0, 20, 792000, tzinfo=tzutc())}} 2020-08-27 03:00:20 INFO: init new order end 2020-08-27 03:00:20 INFO: 2020-08-27 03:00:20 INFO: 2020-08-27 03:00:20 INFO: 2020-08-27 03:00:20 INFO: 2020-08-27 03:00:21 INFO: process event {'orderID': '218f7121-09e0-d795-1fa0-0c7838c17251', 'clOrdID': '8fc6a0e9a09a447cab41ea695011f5f5', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 974, 'price': 387.6, 'displayQty': None, 'stopPx': 387.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': 974, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-08-27T00:00:20.792Z', 'timestamp': '2020-08-27T00:00:20.792Z'} 2020-08-27 03:00:21 INFO: skip event 8fc6a0e9a09a447cab41ea695011f5f5 New 2020-08-27 03:02:00 INFO: 2020-08-27 03:02:00 INFO: 2020-08-27 03:02:00 INFO: 2020-08-27 03:02:00 INFO: 2020-08-27 03:02:00 INFO: clearing start 2020-08-27 03:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '218f7121-09e0-d795-1fa0-0c7838c17251', 'clOrdID': '8fc6a0e9a09a447cab41ea695011f5f5', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 974, 'price': 387.6, 'displayQty': None, 'stopPx': 387.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': 974, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 27, 0, 0, 20, 792000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 27, 0, 0, 20, 792000, tzinfo=tzutc())} 2020-08-27 03:02:00 INFO: order time=2020-08-27 00:00:20.792000+00:00; delta from now UTC=0:01:40.197453 time_delta.total_seconds()=100.197453; time_diff_offset='3600' 2020-08-27 03:02:00 INFO: skip by time diff 2020-08-27 00:00:20.792000+00:00 2020-08-27 03:02:00 INFO: clearing end 2020-08-27 03:02:00 INFO: 2020-08-27 03:02:00 INFO: 2020-08-27 03:02:00 INFO: 2020-08-27 03:02:00 INFO: 2020-08-27 03:15:41 INFO: process event {'orderID': '218f7121-09e0-d795-1fa0-0c7838c17251', 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 974, 'avgPx': 387.55, 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'transactTime': '2020-08-27T00:15:41.513Z', 'timestamp': '2020-08-27T00:15:41.513Z', 'clOrdID': '8fc6a0e9a09a447cab41ea695011f5f5', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-27 03:15:41 INFO: add new event={'uid': '8fc6a0e9a09a447cab41ea695011f5f5', 'status': 'Filled'} 2020-08-27 03:15:41 INFO: 2020-08-27 03:15:41 INFO: 2020-08-27 03:15:41 INFO: 2020-08-27 03:15:41 INFO: 2020-08-27 03:15:41 INFO: process event start 2020-08-27 03:15:41 INFO: fetch new order event 8fc6a0e9a09a447cab41ea695011f5f5 2020-08-27 03:15:41 INFO: fetch orders by event init={'stop': '385.6000000000000227373675443232059478759765625', 'take': '398.9999999999998863131622783839702606201171875', 'qty': '974', 'color': 'GREEN', 'ticker': 'ETHUSD', 'clearing_offset': '3600'} profit_pair=None 2020-08-27 03:15:41 INFO: process init order filled 2020-08-27 03:15:41 INFO: save profit orders to storage stop=dd183920160a46d5ae89f797ffdc368d take=d795bc84145e440aa5fd2fb8b9a3dcf1 2020-08-27 03:15:41 INFO: place profit orders take_price=398.9999999999998863131622783839702606201171875, stop_price=385.6000000000000227373675443232059478759765625, qty=974, color=GREEN, ticker=ETHUSD dd183920160a46d5ae89f797ffdc368d d795bc84145e440aa5fd2fb8b9a3dcf1 2020-08-27 03:15:41 INFO: place stop order ETHUSD: qty=-974, stop_price=385.6000000000000227373675443232059478759765625, stop_uid=dd183920160a46d5ae89f797ffdc368d 2020-08-27 03:15:42 INFO: process event {'orderID': '95970479-7057-0671-a21c-baffa4560bc3', 'clOrdID': 'dd183920160a46d5ae89f797ffdc368d', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 974, 'price': None, 'displayQty': None, 'stopPx': 385.6, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 974, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': '2020-08-27T00:15:42.936Z', 'timestamp': '2020-08-27T00:15:42.936Z'} 2020-08-27 03:15:42 INFO: skip event dd183920160a46d5ae89f797ffdc368d New 2020-08-27 03:15:42 INFO: exchange resp for stop order={'orderID': '95970479-7057-0671-a21c-baffa4560bc3', 'clOrdID': 'dd183920160a46d5ae89f797ffdc368d', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 974, 'price': None, 'displayQty': None, 'stopPx': 385.6, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 974, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 27, 0, 15, 42, 936000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 27, 0, 15, 42, 936000, tzinfo=tzutc())} 2020-08-27 03:15:42 INFO: place limit order ETHUSD: qty=-974, price=398.9999999999998863131622783839702606201171875, take_uid=d795bc84145e440aa5fd2fb8b9a3dcf1 2020-08-27 03:15:44 INFO: process event {'orderID': '2969b8b9-3f20-7bb5-926a-36087b428624', 'clOrdID': 'd795bc84145e440aa5fd2fb8b9a3dcf1', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 974, 'price': 399, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 974, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': '2020-08-27T00:15:44.041Z', 'timestamp': '2020-08-27T00:15:44.041Z'} 2020-08-27 03:15:44 INFO: skip event d795bc84145e440aa5fd2fb8b9a3dcf1 New 2020-08-27 03:15:44 INFO: exchange resp for take profit order={'orderID': '2969b8b9-3f20-7bb5-926a-36087b428624', 'clOrdID': 'd795bc84145e440aa5fd2fb8b9a3dcf1', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 974, 'price': 399.0, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 974, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 27, 0, 15, 44, 41000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 27, 0, 15, 44, 41000, tzinfo=tzutc())} 2020-08-27 03:15:44 INFO: place profit orders={'stop': {'response': {'orderID': '95970479-7057-0671-a21c-baffa4560bc3', 'clOrdID': 'dd183920160a46d5ae89f797ffdc368d', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 974, 'price': None, 'displayQty': None, 'stopPx': 385.6, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 974, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 27, 0, 15, 42, 936000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 27, 0, 15, 42, 936000, tzinfo=tzutc())}, 'qty': Decimal('-974'), 'uid': 'dd183920160a46d5ae89f797ffdc368d', 'price': Decimal('385.6000000000000227373675443232059478759765625')}, 'take': {'response': {'orderID': '2969b8b9-3f20-7bb5-926a-36087b428624', 'clOrdID': 'd795bc84145e440aa5fd2fb8b9a3dcf1', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 974, 'price': 399.0, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 974, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 27, 0, 15, 44, 41000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 27, 0, 15, 44, 41000, tzinfo=tzutc())}, 'qty': Decimal('-974'), 'uid': 'd795bc84145e440aa5fd2fb8b9a3dcf1', 'price': Decimal('398.9999999999998863131622783839702606201171875')}} 2020-08-27 03:15:44 INFO: rm init order from db 8fc6a0e9a09a447cab41ea695011f5f5 2020-08-27 03:15:44 INFO: end process event_processing_result='proceed init order' 2020-08-27 03:15:44 INFO: 2020-08-27 03:15:44 INFO: 2020-08-27 03:15:44 INFO: 2020-08-27 03:15:44 INFO: 2020-08-27 04:00:20 INFO: 2020-08-27 04:00:20 INFO: 2020-08-27 04:00:20 INFO: 2020-08-27 04:00:20 INFO: 2020-08-27 04:00:20 INFO: init new order start 2020-08-27 04:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 27, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.1, 'high': 389.2, 'low': 385.65, 'close': 388.35, 'trades': 3935, 'volume': 2463242, 'vwap': 388.11, 'lastSize': 11, 'turnover': 95600294695, 'homeNotional': 28245.600093265417, 'foreignNotional': 10962342.682194538}, {'timestamp': datetime.datetime(2020, 8, 27, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.05, 'high': 387.5, 'low': 385.6, 'close': 386.1, 'trades': 3538, 'volume': 1269664, 'vwap': 386.55, 'lastSize': 100, 'turnover': 49078812685, 'homeNotional': 14561.391313510456, 'foreignNotional': 5628703.468728437}, {'timestamp': datetime.datetime(2020, 8, 26, 23, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.4, 'high': 388.75, 'low': 385.65, 'close': 386.05, 'trades': 3277, 'volume': 2405589, 'vwap': 387.02, 'lastSize': 855, 'turnover': 93100582120, 'homeNotional': 27571.078569039208, 'foreignNotional': 10670511.11649852}] 2020-08-27 04:00:20 INFO: prepare candles [CandleItem(low=385.65, high=389.2, open=386.1, close=388.35, color='GREEN'), CandleItem(low=385.6, high=387.5, open=386.05, close=386.1, color='GREEN'), CandleItem(low=385.65, high=388.75, open=388.4, close=386.05, color='RED')] 2020-08-27 04:00:20 INFO: skip by colors first_candle=CandleItem(low=385.65, high=388.75, open=388.4, close=386.05, color='RED') second_candle=CandleItem(low=385.6, high=387.5, open=386.05, close=386.1, color='GREEN') last_candle=CandleItem(low=385.65, high=389.2, open=386.1, close=388.35, color='GREEN') 2020-08-27 04:00:20 INFO: check need new order None 2020-08-27 04:00:20 INFO: init new order end 2020-08-27 04:00:20 INFO: 2020-08-27 04:00:20 INFO: 2020-08-27 04:00:20 INFO: 2020-08-27 04:00:20 INFO: 2020-08-27 04:02:00 INFO: 2020-08-27 04:02:00 INFO: 2020-08-27 04:02:00 INFO: 2020-08-27 04:02:00 INFO: 2020-08-27 04:02:00 INFO: clearing start 2020-08-27 04:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '95970479-7057-0671-a21c-baffa4560bc3', 'clOrdID': 'dd183920160a46d5ae89f797ffdc368d', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 974, 'price': None, 'displayQty': None, 'stopPx': 385.6, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Stop', 'timeInForce': 'ImmediateOrCancel', 'execInst': 'LastPrice', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 974, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 27, 0, 15, 42, 936000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 27, 0, 15, 42, 936000, tzinfo=tzutc())} 2020-08-27 04:02:00 INFO: skip by not found init order into storage 2020-08-27 04:02:00 INFO: fetch_orders_for_clearing test order {'orderID': '2969b8b9-3f20-7bb5-926a-36087b428624', 'clOrdID': 'd795bc84145e440aa5fd2fb8b9a3dcf1', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 974, 'price': 399.0, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 974, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 27, 0, 15, 44, 41000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 27, 0, 15, 44, 41000, tzinfo=tzutc())} 2020-08-27 04:02:00 INFO: skip by not found init order into storage 2020-08-27 04:02:00 INFO: clearing end 2020-08-27 04:02:00 INFO: 2020-08-27 04:02:00 INFO: 2020-08-27 04:02:00 INFO: 2020-08-27 04:02:00 INFO: 2020-08-27 04:55:21 INFO: process event {'orderID': '95970479-7057-0671-a21c-baffa4560bc3', 'price': 385.55, 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 974, 'avgPx': 385.55, 'text': 'Triggered: Order stop price reached\nStop order by trader.py', 'transactTime': '2020-08-27T01:55:21.320Z', 'timestamp': '2020-08-27T01:55:21.320Z', 'clOrdID': 'dd183920160a46d5ae89f797ffdc368d', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-27 04:55:21 INFO: add new event={'uid': 'dd183920160a46d5ae89f797ffdc368d', 'status': 'Filled'} 2020-08-27 04:55:21 INFO: 2020-08-27 04:55:21 INFO: 2020-08-27 04:55:21 INFO: 2020-08-27 04:55:21 INFO: 2020-08-27 04:55:21 INFO: process event start 2020-08-27 04:55:21 INFO: fetch new order event dd183920160a46d5ae89f797ffdc368d 2020-08-27 04:55:21 INFO: fetch orders by event init=None profit_pair=d795bc84145e440aa5fd2fb8b9a3dcf1 2020-08-27 04:55:21 INFO: process profit order filled 2020-08-27 04:55:21 INFO: process event {'orderID': '2969b8b9-3f20-7bb5-926a-36087b428624', 'ordStatus': 'Canceled', 'workingIndicator': False, 'leavesQty': 0, 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'timestamp': '2020-08-27T01:55:21.802Z', 'clOrdID': 'd795bc84145e440aa5fd2fb8b9a3dcf1', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-27 04:55:21 INFO: skip event d795bc84145e440aa5fd2fb8b9a3dcf1 Canceled 2020-08-27 04:55:21 INFO: cancel order=d795bc84145e440aa5fd2fb8b9a3dcf1 [{'orderID': '2969b8b9-3f20-7bb5-926a-36087b428624', 'clOrdID': 'd795bc84145e440aa5fd2fb8b9a3dcf1', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 974, 'price': 399.0, '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, 0, 15, 44, 41000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 27, 1, 55, 21, 802000, tzinfo=tzutc())}] 2020-08-27 04:55:21 INFO: end process event_processing_result='proceed profit order' 2020-08-27 04:55:21 INFO: 2020-08-27 04:55:21 INFO: 2020-08-27 04:55:21 INFO: 2020-08-27 04:55:21 INFO: 2020-08-27 05:00:25 INFO: 2020-08-27 05:00:31 INFO: 2020-08-27 05:00:31 INFO: 2020-08-27 05:00:31 INFO: 2020-08-27 05:00:31 INFO: init new order start 2020-08-27 05:00:32 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 27, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.35, 'high': 388.75, 'low': 385.5, 'close': 385.75, 'trades': 2774, 'volume': 2218710, 'vwap': 386.95, 'lastSize': 90, 'turnover': 85850921380, 'homeNotional': 25365.426216600994, 'foreignNotional': 9814965.333293622}, {'timestamp': datetime.datetime(2020, 8, 27, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.1, 'high': 389.2, 'low': 385.65, 'close': 388.35, 'trades': 3935, 'volume': 2463242, 'vwap': 388.11, 'lastSize': 11, 'turnover': 95600294695, 'homeNotional': 28245.600093265417, 'foreignNotional': 10962342.682194538}, {'timestamp': datetime.datetime(2020, 8, 27, 0, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.05, 'high': 387.5, 'low': 385.6, 'close': 386.1, 'trades': 3538, 'volume': 1269664, 'vwap': 386.55, 'lastSize': 100, 'turnover': 49078812685, 'homeNotional': 14561.391313510456, 'foreignNotional': 5628703.468728437}] 2020-08-27 05:00:32 INFO: prepare candles [CandleItem(low=385.5, high=388.75, open=388.35, close=385.75, color='RED'), CandleItem(low=385.65, high=389.2, open=386.1, close=388.35, color='GREEN'), CandleItem(low=385.6, high=387.5, open=386.05, close=386.1, color='GREEN')] 2020-08-27 05:00:32 INFO: last_candle=CandleItem(low=385.5, high=388.75, open=388.35, close=385.75, color='RED') 2020-08-27 05:00:32 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 05:00:32 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=388.75, open=388.35, close=385.75, color='RED') 2020-08-27 05:00:32 INFO: skip by CandleItem(low=385.5, high=388.75, open=388.35, close=385.75, color='RED') and CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-27 05:00:32 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 05:00:32 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=388.75, open=388.35, close=385.75, color='RED') 2020-08-27 05:00:32 INFO: skip by CandleItem(low=385.5, high=388.75, open=388.35, close=385.75, color='RED') and CandleFilter(size=MinMaxFilter(min=1.6, max=1.99), body=MinMaxFilter(min=0.0, max=100.0)) 2020-08-27 05:00:32 INFO: not found applicable config for candle 2020-08-27 05:00:32 INFO: check need new order None 2020-08-27 05:00:32 INFO: init new order end 2020-08-27 05:00:32 INFO: 2020-08-27 05:00:32 INFO: 2020-08-27 05:00:32 INFO: 2020-08-27 05:00:32 INFO: 2020-08-27 05:02:00 INFO: 2020-08-27 05:02:00 INFO: 2020-08-27 05:02:00 INFO: 2020-08-27 05:02:00 INFO: 2020-08-27 05:02:00 INFO: clearing start 2020-08-27 05:02:00 INFO: clearing end 2020-08-27 05:02:00 INFO: 2020-08-27 05:02:00 INFO: 2020-08-27 05:02:00 INFO: 2020-08-27 05:02:00 INFO: 2020-08-27 06:00:20 INFO: 2020-08-27 06:00:20 INFO: 2020-08-27 06:00:20 INFO: 2020-08-27 06:00:20 INFO: 2020-08-27 06:00:20 INFO: init new order start 2020-08-27 06:00:20 INFO: fetch buckets [{'timestamp': datetime.datetime(2020, 8, 27, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.75, 'high': 386.0, 'low': 383.35, 'close': 383.85, 'trades': 4222, 'volume': 3392309, 'vwap': 384.64, 'lastSize': 13, 'turnover': 130478462030, 'homeNotional': 38627.30551840648, 'foreignNotional': 14857245.530962605}, {'timestamp': datetime.datetime(2020, 8, 27, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.35, 'high': 388.75, 'low': 385.5, 'close': 385.75, 'trades': 2774, 'volume': 2218710, 'vwap': 386.95, 'lastSize': 90, 'turnover': 85850921380, 'homeNotional': 25365.426216600994, 'foreignNotional': 9814965.333293622}, {'timestamp': datetime.datetime(2020, 8, 27, 1, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 386.1, 'high': 389.2, 'low': 385.65, 'close': 388.35, 'trades': 3935, 'volume': 2463242, 'vwap': 388.11, 'lastSize': 11, 'turnover': 95600294695, 'homeNotional': 28245.600093265417, 'foreignNotional': 10962342.682194538}] 2020-08-27 06:00:20 INFO: prepare candles [CandleItem(low=383.35, high=386.0, open=385.75, close=383.85, color='RED'), CandleItem(low=385.5, high=388.75, open=388.35, close=385.75, color='RED'), CandleItem(low=385.65, high=389.2, open=386.1, close=388.35, color='GREEN')] 2020-08-27 06:00:20 INFO: skip by colors first_candle=CandleItem(low=385.65, high=389.2, open=386.1, close=388.35, color='GREEN') second_candle=CandleItem(low=385.5, high=388.75, open=388.35, close=385.75, color='RED') last_candle=CandleItem(low=383.35, high=386.0, open=385.75, close=383.85, color='RED') 2020-08-27 06:00:20 INFO: check need new order None 2020-08-27 06:00:20 INFO: init new order end 2020-08-27 06:00:20 INFO: 2020-08-27 06:00:20 INFO: 2020-08-27 06:00:20 INFO: 2020-08-27 06:00:20 INFO: 2020-08-27 06:02:00 INFO: 2020-08-27 06:02:00 INFO: 2020-08-27 06:02:00 INFO: 2020-08-27 06:02:00 INFO: 2020-08-27 06:02:00 INFO: clearing start 2020-08-27 06:02:00 INFO: clearing end 2020-08-27 06:02:00 INFO: 2020-08-27 06:02:00 INFO: 2020-08-27 06:02:00 INFO: 2020-08-27 06:02:00 INFO: 2020-08-27 07:00:20 INFO: 2020-08-27 07:00:20 INFO: 2020-08-27 07:00:20 INFO: 2020-08-27 07:00:20 INFO: 2020-08-27 07:00:20 INFO: init new order start 2020-08-27 07:00:20 INFO: fetch buckets [{'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}, {'timestamp': datetime.datetime(2020, 8, 27, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.75, 'high': 386.0, 'low': 383.35, 'close': 383.85, 'trades': 4222, 'volume': 3392309, 'vwap': 384.64, 'lastSize': 13, 'turnover': 130478462030, 'homeNotional': 38627.30551840648, 'foreignNotional': 14857245.530962605}, {'timestamp': datetime.datetime(2020, 8, 27, 2, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 388.35, 'high': 388.75, 'low': 385.5, 'close': 385.75, 'trades': 2774, 'volume': 2218710, 'vwap': 386.95, 'lastSize': 90, 'turnover': 85850921380, 'homeNotional': 25365.426216600994, 'foreignNotional': 9814965.333293622}] 2020-08-27 07:00:20 INFO: prepare candles [CandleItem(low=383.8, high=385.4, open=383.85, close=384.65, color='GREEN'), CandleItem(low=383.35, high=386.0, open=385.75, close=383.85, color='RED'), CandleItem(low=385.5, high=388.75, open=388.35, close=385.75, color='RED')] 2020-08-27 07:00:20 INFO: last_candle=CandleItem(low=383.8, high=385.4, open=383.85, close=384.65, color='GREEN') 2020-08-27 07:00:20 INFO: apply filters to candles filter_config=InitOrderConfig(take_profit_factor=6.0, clearing_interval=3600, first_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), second_candle=CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)), last_candle=CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0))) 2020-08-27 07:00:20 INFO: apply filter CandleFilter(size=MinMaxFilter(min=0.4, max=0.59), body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=383.8, high=385.4, open=383.85, close=384.65, color='GREEN') 2020-08-27 07:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=383.35, high=386.0, open=385.75, close=383.85, color='RED') 2020-08-27 07:00:20 INFO: apply filter CandleFilter(size=None, body=MinMaxFilter(min=0.0, max=100.0)) to candle=CandleItem(low=385.5, high=388.75, open=388.35, close=385.75, color='RED') 2020-08-27 07:00:20 INFO: hit candle order=OrderProperties(candle=CandleItem(low=383.8, high=385.4, open=383.85, close=384.65, color='GREEN'), take_profit_factor=6.0, clearing_interval=3600) 2020-08-27 07:00:20 INFO: check need new order OrderProperties(candle=CandleItem(low=383.8, high=385.4, open=383.85, close=384.65, color='GREEN'), take_profit_factor=6.0, clearing_interval=3600) 2020-08-27 07:00:20 INFO: place order: start candle=CandleItem(low=383.8, high=385.4, open=383.85, close=384.65, color='GREEN') ticker='ETHUSD' price_offset=0.1 2020-08-27 07:00:20 INFO: place order: side_factor=-1 init_trigger_price=385.45 init_order_price=385.5 stop_price_offset=0.0 candle.size=1.599999999999966 stop_price=383.8 take_price=395.0999999999998 2020-08-27 07:00:20 INFO: place order round: side_factor=-1 init_trigger_price=Decimal('385.44999999999998863131622783839702606201171875') init_order_price=Decimal('385.5') stop_price_offset=0.0 candle.size=1.599999999999966 stop_price=Decimal('383.80000000000001136868377216160297393798828125') take_price=Decimal('395.0999999999997953636921010911464691162109375') 2020-08-27 07:00:20 INFO: place order: compute qty=1152 2020-08-27 07:00:20 INFO: place order: save order to db d80e3832904140988b824fdb98a92b66; response=True 2020-08-27 07:00:21 INFO: post order to exchange resp={'orderID': 'a748af57-4090-c0d1-f4a7-3639de5b784d', 'clOrdID': 'd80e3832904140988b824fdb98a92b66', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1152, 'price': 385.5, 'displayQty': None, 'stopPx': 385.45, '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': 1152, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 27, 4, 0, 21, 17000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 27, 4, 0, 21, 17000, tzinfo=tzutc())} 2020-08-27 07:00:21 INFO: place new init order {'qty': 1152, 'init_price': Decimal('385.44999999999998863131622783839702606201171875'), 'stop_price': Decimal('383.80000000000001136868377216160297393798828125'), 'take_price': Decimal('395.0999999999997953636921010911464691162109375'), 'order_uid': 'd80e3832904140988b824fdb98a92b66', 'response': {'orderID': 'a748af57-4090-c0d1-f4a7-3639de5b784d', 'clOrdID': 'd80e3832904140988b824fdb98a92b66', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1152, 'price': 385.5, 'displayQty': None, 'stopPx': 385.45, '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': 1152, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 27, 4, 0, 21, 17000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 27, 4, 0, 21, 17000, tzinfo=tzutc())}} 2020-08-27 07:00:21 INFO: init new order end 2020-08-27 07:00:21 INFO: 2020-08-27 07:00:21 INFO: 2020-08-27 07:00:21 INFO: 2020-08-27 07:00:21 INFO: 2020-08-27 07:00:21 INFO: process event {'orderID': 'a748af57-4090-c0d1-f4a7-3639de5b784d', 'clOrdID': 'd80e3832904140988b824fdb98a92b66', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1152, 'price': 385.5, 'displayQty': None, 'stopPx': 385.45, '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': 1152, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': '2020-08-27T04:00:21.017Z', 'timestamp': '2020-08-27T04:00:21.017Z'} 2020-08-27 07:00:21 INFO: skip event d80e3832904140988b824fdb98a92b66 New 2020-08-27 07:02:00 INFO: 2020-08-27 07:02:00 INFO: 2020-08-27 07:02:00 INFO: 2020-08-27 07:02:00 INFO: 2020-08-27 07:02:00 INFO: clearing start 2020-08-27 07:02:00 INFO: fetch_orders_for_clearing test order {'orderID': 'a748af57-4090-c0d1-f4a7-3639de5b784d', 'clOrdID': 'd80e3832904140988b824fdb98a92b66', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Buy', 'simpleOrderQty': None, 'orderQty': 1152, 'price': 385.5, 'displayQty': None, 'stopPx': 385.45, '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': 1152, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Init order by supervisor.py', 'transactTime': datetime.datetime(2020, 8, 27, 4, 0, 21, 17000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 27, 4, 0, 21, 17000, tzinfo=tzutc())} 2020-08-27 07:02:00 INFO: order time=2020-08-27 04:00:21.017000+00:00; delta from now UTC=0:01:39.186428 time_delta.total_seconds()=99.186428; time_diff_offset='3600' 2020-08-27 07:02:00 INFO: skip by time diff 2020-08-27 04:00:21.017000+00:00 2020-08-27 07:02:00 INFO: clearing end 2020-08-27 07:02:00 INFO: 2020-08-27 07:02:00 INFO: 2020-08-27 07:02:00 INFO: 2020-08-27 07:02:00 INFO: 2020-08-27 07:08:07 INFO: process event {'orderID': 'a748af57-4090-c0d1-f4a7-3639de5b784d', 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 1152, 'avgPx': 385.5, 'text': 'Triggered: Order stop price reached\nInit order by supervisor.py', 'transactTime': '2020-08-27T04:08:07.569Z', 'timestamp': '2020-08-27T04:08:07.569Z', 'clOrdID': 'd80e3832904140988b824fdb98a92b66', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-27 07:08:07 INFO: add new event={'uid': 'd80e3832904140988b824fdb98a92b66', 'status': 'Filled'} 2020-08-27 07:08:07 INFO: 2020-08-27 07:08:07 INFO: 2020-08-27 07:08:07 INFO: 2020-08-27 07:08:07 INFO: 2020-08-27 07:08:07 INFO: process event start 2020-08-27 07:08:07 INFO: fetch new order event d80e3832904140988b824fdb98a92b66 2020-08-27 07:08:07 INFO: fetch orders by event init={'stop': '383.80000000000001136868377216160297393798828125', 'take': '395.0999999999997953636921010911464691162109375', 'qty': '1152', 'color': 'GREEN', 'ticker': 'ETHUSD', 'clearing_offset': '3600'} profit_pair=None 2020-08-27 07:08:07 INFO: process init order filled 2020-08-27 07:08:07 INFO: save profit orders to storage stop=6d526b10ec0e4e08b154cb6fd3db0163 take=9744abc1dfd64e7995ed27da4f0fd196 2020-08-27 07:08:07 INFO: place profit orders take_price=395.0999999999997953636921010911464691162109375, stop_price=383.80000000000001136868377216160297393798828125, qty=1152, color=GREEN, ticker=ETHUSD 6d526b10ec0e4e08b154cb6fd3db0163 9744abc1dfd64e7995ed27da4f0fd196 2020-08-27 07:08:07 INFO: place stop order ETHUSD: qty=-1152, stop_price=383.80000000000001136868377216160297393798828125, stop_uid=6d526b10ec0e4e08b154cb6fd3db0163 2020-08-27 07:08:07 INFO: process event {'orderID': '25e15528-caa4-68a2-f6f8-6833223e45f1', 'clOrdID': '6d526b10ec0e4e08b154cb6fd3db0163', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1152, 'price': None, 'displayQty': None, 'stopPx': 383.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': 1152, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': '2020-08-27T04:08:07.729Z', 'timestamp': '2020-08-27T04:08:07.729Z'} 2020-08-27 07:08:07 INFO: skip event 6d526b10ec0e4e08b154cb6fd3db0163 New 2020-08-27 07:08:07 INFO: exchange resp for stop order={'orderID': '25e15528-caa4-68a2-f6f8-6833223e45f1', 'clOrdID': '6d526b10ec0e4e08b154cb6fd3db0163', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1152, 'price': None, 'displayQty': None, 'stopPx': 383.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': 1152, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 27, 4, 8, 7, 729000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 27, 4, 8, 7, 729000, tzinfo=tzutc())} 2020-08-27 07:08:07 INFO: place limit order ETHUSD: qty=-1152, price=395.0999999999997953636921010911464691162109375, take_uid=9744abc1dfd64e7995ed27da4f0fd196 2020-08-27 07:08:07 INFO: exchange resp for take profit order={'orderID': '88b62630-1942-9131-f2af-a2ffc7396715', 'clOrdID': '9744abc1dfd64e7995ed27da4f0fd196', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1152, 'price': 395.1, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1152, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 27, 4, 8, 7, 767000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 27, 4, 8, 7, 767000, tzinfo=tzutc())} 2020-08-27 07:08:07 INFO: place profit orders={'stop': {'response': {'orderID': '25e15528-caa4-68a2-f6f8-6833223e45f1', 'clOrdID': '6d526b10ec0e4e08b154cb6fd3db0163', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1152, 'price': None, 'displayQty': None, 'stopPx': 383.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': 1152, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Stop order by trader.py', 'transactTime': datetime.datetime(2020, 8, 27, 4, 8, 7, 729000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 27, 4, 8, 7, 729000, tzinfo=tzutc())}, 'qty': Decimal('-1152'), 'uid': '6d526b10ec0e4e08b154cb6fd3db0163', 'price': Decimal('383.80000000000001136868377216160297393798828125')}, 'take': {'response': {'orderID': '88b62630-1942-9131-f2af-a2ffc7396715', 'clOrdID': '9744abc1dfd64e7995ed27da4f0fd196', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1152, 'price': 395.1, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1152, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 27, 4, 8, 7, 767000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 27, 4, 8, 7, 767000, tzinfo=tzutc())}, 'qty': Decimal('-1152'), 'uid': '9744abc1dfd64e7995ed27da4f0fd196', 'price': Decimal('395.0999999999997953636921010911464691162109375')}} 2020-08-27 07:08:07 INFO: process event {'orderID': '88b62630-1942-9131-f2af-a2ffc7396715', 'clOrdID': '9744abc1dfd64e7995ed27da4f0fd196', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1152, 'price': 395.1, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'New', 'triggered': '', 'workingIndicator': True, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 1152, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Profit order by trader.py', 'transactTime': '2020-08-27T04:08:07.767Z', 'timestamp': '2020-08-27T04:08:07.767Z'} 2020-08-27 07:08:07 INFO: skip event 9744abc1dfd64e7995ed27da4f0fd196 New 2020-08-27 07:08:07 INFO: rm init order from db d80e3832904140988b824fdb98a92b66 2020-08-27 07:08:07 INFO: end process event_processing_result='proceed init order' 2020-08-27 07:08:07 INFO: 2020-08-27 07:08:07 INFO: 2020-08-27 07:08:07 INFO: 2020-08-27 07:08:07 INFO: 2020-08-27 07:59:05 INFO: process event {'orderID': '25e15528-caa4-68a2-f6f8-6833223e45f1', 'price': 383.8, 'ordStatus': 'Filled', 'triggered': 'StopOrderTriggered', 'leavesQty': 0, 'cumQty': 1152, 'avgPx': 383.8, 'text': 'Triggered: Order stop price reached\nStop order by trader.py', 'transactTime': '2020-08-27T04:59:05.719Z', 'timestamp': '2020-08-27T04:59:05.719Z', 'clOrdID': '6d526b10ec0e4e08b154cb6fd3db0163', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-27 07:59:05 INFO: add new event={'uid': '6d526b10ec0e4e08b154cb6fd3db0163', 'status': 'Filled'} 2020-08-27 07:59:06 INFO: 2020-08-27 07:59:06 INFO: 2020-08-27 07:59:06 INFO: 2020-08-27 07:59:06 INFO: 2020-08-27 07:59:06 INFO: process event start 2020-08-27 07:59:06 INFO: fetch new order event 6d526b10ec0e4e08b154cb6fd3db0163 2020-08-27 07:59:06 INFO: fetch orders by event init=None profit_pair=9744abc1dfd64e7995ed27da4f0fd196 2020-08-27 07:59:06 INFO: process profit order filled 2020-08-27 07:59:06 INFO: cancel order=9744abc1dfd64e7995ed27da4f0fd196 [{'orderID': '88b62630-1942-9131-f2af-a2ffc7396715', 'clOrdID': '9744abc1dfd64e7995ed27da4f0fd196', 'clOrdLinkID': '', 'account': 605536, 'symbol': 'ETHUSD', 'side': 'Sell', 'simpleOrderQty': None, 'orderQty': 1152, 'price': 395.1, 'displayQty': None, 'stopPx': None, 'pegOffsetValue': None, 'pegPriceType': '', 'currency': 'USD', 'settlCurrency': 'XBt', 'ordType': 'Limit', 'timeInForce': 'GoodTillCancel', 'execInst': '', 'contingencyType': '', 'exDestination': 'XBME', 'ordStatus': 'Canceled', 'triggered': '', 'workingIndicator': False, 'ordRejReason': '', 'simpleLeavesQty': None, 'leavesQty': 0, 'simpleCumQty': None, 'cumQty': 0, 'avgPx': None, 'multiLegReportingType': 'SingleSecurity', 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'transactTime': datetime.datetime(2020, 8, 27, 4, 8, 7, 767000, tzinfo=tzutc()), 'timestamp': datetime.datetime(2020, 8, 27, 4, 59, 6, 472000, tzinfo=tzutc())}] 2020-08-27 07:59:06 INFO: process event {'orderID': '88b62630-1942-9131-f2af-a2ffc7396715', 'ordStatus': 'Canceled', 'workingIndicator': False, 'leavesQty': 0, 'text': 'Canceled: Cancel order by trader.py\nProfit order by trader.py', 'timestamp': '2020-08-27T04:59:06.472Z', 'clOrdID': '9744abc1dfd64e7995ed27da4f0fd196', 'account': 605536, 'symbol': 'ETHUSD'} 2020-08-27 07:59:06 INFO: skip event 9744abc1dfd64e7995ed27da4f0fd196 Canceled 2020-08-27 07:59:06 INFO: end process event_processing_result='proceed profit order' 2020-08-27 07:59:06 INFO: 2020-08-27 07:59:06 INFO: 2020-08-27 07:59:06 INFO: 2020-08-27 07:59:06 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:00:20 INFO: 2020-08-27 08:00:20 INFO: init new order start 2020-08-27 08:00:20 INFO: fetch buckets [{'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}, {'timestamp': datetime.datetime(2020, 8, 27, 3, 0, tzinfo=tzutc()), 'symbol': 'ETHUSD', 'open': 385.75, 'high': 386.0, 'low': 383.35, 'close': 383.85, 'trades': 4222, 'volume': 3392309, 'vwap': 384.64, 'lastSize': 13, 'turnover': 130478462030, 'homeNotional': 38627.30551840648, 'foreignNotional': 14857245.530962605}] 2020-08-27 08:00:20 INFO: prepare candles [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'), CandleItem(low=383.35, high=386.0, open=385.75, close=383.85, color='RED')] 2020-08-27 08:00:20 INFO: skip by colors first_candle=CandleItem(low=383.35, high=386.0, open=385.75, close=383.85, color='RED') second_candle=CandleItem(low=383.8, high=385.4, open=383.85, close=384.65, color='GREEN') last_candle=CandleItem(low=383.55, high=386.05, open=384.65, close=383.55, color='RED') 2020-08-27 08:00:20 INFO: check need new order None