selective_dca_bot icon indicating copy to clipboard operation
selective_dca_bot copied to clipboard

Error in timestamp

Open altcnews opened this issue 5 years ago • 6 comments

Hi,

I got this error when running:

File "/home/ubuntu/bindca/src/selective_dca_bot/exchanges/abstract_exchange.py", line 65, in calculate_latest_metrics self.ingest_latest_candles(market, interval, last_candle.timestamp, num_candles) AttributeError: 'NoneType' object has no attribute 'timestamp'

could you please help? thanks & regards.

altcnews avatar May 17 '19 19:05 altcnews

Ah, my bad. Just committed a fix. Give that a try and let me know how it goes!

kdmukai avatar May 17 '19 22:05 kdmukai

Hi dev, thanks for the update.

Anyway, how to alter the command to run? For the testing, i'm using 0.015 at base_amount and only ATOM as my portfolio with BTC as base_pair.

And this is the result

~/dca/src$ ./run.sh


  • 2019-05-18 04:27:41 Traceback (most recent call last): File "main.py", line 368, in if Decimal(num_positions[crypto] / total_positions) >= max_crypto_holdings_percentage: ZeroDivisionError: division by zero

thanks & regards.

altcnews avatar May 18 '19 04:05 altcnews

Sorry, I haven't run it from a brand new state in a while so I ended up introducing some new bugs along the way. Just committed a new update that should fix this. Grab a new copy of the *.py files and give it a try.

kdmukai avatar May 18 '19 17:05 kdmukai

That's great.

How do you add the base_amount and base_pair to get this running? It might be my mistake to input the wrong parameter on those.

I got this on the latest update:


  • 2019-05-19 00:05:49 XLM: price-to-MA: 1.1670 | positions: 0

candidate: XLMBTC | 0 entries Traceback (most recent call last): File "main.py", line 407, in lottery_weights.append(float(candidate['entries'] / total_entries)) decimal.InvalidOperation: [<class 'decimal.DivisionUndefined'>]

thanks & regards.

altcnews avatar May 19 '19 00:05 altcnews

Hi. How do you start with the bot? I got decimal error:

prada:src thorjeus$ python3 main.py -e binance -c config.conf -p portfolio.conf -u -r buy_amount= "0.05" base_pair= "BTC"


  • 2019-05-19 16:08:57 Traceback (most recent call last): File "main.py", line 74, in args = parser.parse_args() File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/argparse.py", line 1749, in parse_args args, argv = self.parse_known_args(args, namespace) File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/argparse.py", line 1781, in parse_known_args namespace, args = self._parse_known_args(args, namespace) File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/argparse.py", line 1990, in _parse_known_args stop_index = consume_positionals(start_index) File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/argparse.py", line 1946, in consume_positionals take_action(action, args) File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/argparse.py", line 1839, in take_action argument_values = self._get_values(action, argument_strings) File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/argparse.py", line 2369, in _get_values value = self._get_value(action, arg_string) File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/argparse.py", line 2402, in _get_value result = type_func(arg_string) decimal.InvalidOperation: [<class 'decimal.ConversionSyntax'>]

thank you.

thorjeus avatar May 19 '19 08:05 thorjeus

Hi, I got this error when trying the latest code

  • 2019-06-20 00:28:53 Traceback (most recent call last): File "main.py", line 380, in max_price_to_ma = max(metrics, key=lambda m:m['price_to_ma'])['price_to_ma'] ValueError: max() arg is an empty sequence

thanks.

thorjeus avatar Jun 20 '19 00:06 thorjeus