BenjiLee/PoloniexAnalyzer

IndexError: list index out of range

Closed this issue · 2 comments

python3 poloniex.py -a GetOverview
-----Deposit/Withdrawal History-----

--Currency=Deposit-Withdrawal=Total-
XMR=0.001
BTC=0.001
Traceback (most recent call last):
File "poloniex.py", line 73, in
main()
File "poloniex.py", line 65, in main
actions[args.action]'function'
File "/home/stitrace/PoloniexAnalyzer/analyzer.py", line 29, in get_overview
balance = dw_history.get_btc_balance(TickerData())
File "/home/stitrace/PoloniexAnalyzer/poloniex_apis/api_models/deposit_withdrawal_history.py", line 29, in get_btc_balance
balance += amount * ticker.get_price(deposit_ticker)
File "/home/stitrace/PoloniexAnalyzer/poloniex_apis/api_models/ticker_price.py", line 9, in get_price
transaction, settlement = pair.split("")[0], pair.split("")[1]
IndexError: list index out of range

This is a more complicated bug that I seemed to have introduced a while back which didn't get caught. Thanks for the issue report. I'll be looking into this right away.

could you try this branch in #56?

python3 poloniex.py -a GetOverview
-----Deposit/Withdrawal History-----

--Currency=Deposit-Withdrawal=Total-
BTC=0.1
XMR=0.1
----------Current Balances----------
Total BTC=0.1

Note: Get Overview currently does not take the margin account into account.
---Earnings/Losses Against Balance--
0.003318333864000017 BTC/$8.05
Still worse than an index.
102.3%

It seems like fixed, but i am buy some ETH today, may be it affected.

Thank you.