BenjiLee / PoloniexAnalyzer

Trade history and balance analyzer for Poloniex
MIT License
78 stars 22 forks source link

Threshold #29

Closed criptonauta closed 7 years ago

criptonauta commented 7 years ago

Hi Benji

It seems 260 is the lowest threshold possible to be run.

Lower than this, the program returns the following:

Currency: BTC_STR, Volume: 486.11279107
Traceback (most recent call last):
  File "poloniex.py", line 64, in <module>
    main()
  File "poloniex.py", line 56, in main
    actions[args.action]['function']()
  File "D:\POLO\ash\new\analyzer.py", line 166, in get_change_over_time
    _to_percent_change(history[-1]['close']/history[-(604800/period-1)]['close']),
IndexError: list index out of range

Isn't really possible to use a lower value?

Best regards

BenjiLee commented 7 years ago

The smallest segment of time for this script is 5 minutes for poloniex which is what I am using to measure the percent change. It's the same as their smallest candlestick. Anything smaller than that will return an empty list. I'm leaving this ticket open to handle this error (and to look into this further)

Another possibility is that a coin is new, and doesn't go back 2 weeks so it never get's that information.

BenjiLee commented 7 years ago

Error is now handled where a new coin doesn't have data.

https://github.com/BenjiLee/PoloniexAnalyzer/pull/33