MikaLendingBot icon indicating copy to clipboard operation
MikaLendingBot copied to clipboard

EUR lending not working in Bitfinex

Open tuberculo opened this issue 8 years ago • 8 comments

Bot fails to lend EUR in Bitfinex. It shows the following error in the log: Error USD_EUR.

I added EUR in the currencies list in default.cfg. I also modified line 33 in Bitfinex.py, as @rnevet sugested.

[BITFINEX]
# Full list of supported currencies
all_currencies = USD,BTC,BCH,ETH,XRP,IOT,XMR,LTC,OMG,ETC,EOS,DSH,ZEC,EUR
	self.baseCurrencies = ['USD', 'BTC', 'ETH', 'EUR']
Traceback (most recent call last):
  File "lendingbot.py", line 94, in <module>
    Lending.lend_all()
  File "/home/xxxx/bots/bitfinex/poloniexlendingbot/modules/Lending.py", line 247, in lend_all
    usable_currencies += lend_cur(cur, total_lent, lending_balances, ticker)
  File "/home/xxxx/bots/bitfinex/poloniexlendingbot/modules/Lending.py", line 444, in lend_cur
    raise msg
KeyError: u'USD_EUR'

v312
 Unhandled error, please open a Github issue so we can fix it!

tuberculo avatar Dec 05 '17 22:12 tuberculo

Lending EUR seems to be working now. But the message Error USD_EUR still shows up every time.

Edit: It is not working again.

tuberculo avatar Dec 10 '17 00:12 tuberculo

Maybe this would solve the issue: In Bitfinex.py, change from (lines 273 - 282)

        except Exception as e:
                msg = str(e)
                # "Invalid offer: incorrect amount, minimum is 50 dollar or equivalent in USD"
                if "Invalid offer: incorrect amount, minimum is 50" in msg:
                    usd_min = 50
                    cur_min = usd_min
                    if currency != 'USD':
                        cur_min = usd_min / float(self.return_ticker()['USD_' + currency]['lowestAsk'])

                    raise Exception("Error create_loan_offer: Amount must be at least " + str(cur_min) + " " + currency)

to

        except Exception as e:
                msg = str(e)
                # "Invalid offer: incorrect amount, minimum is 50 dollar or equivalent in USD"
                if "Invalid offer: incorrect amount, minimum is 50" in msg:
                    usd_min = 50
                    cur_min = usd_min
                    if currency != 'USD':
                        if currency = 'EUR':
                             cur_min = usd_min / float(self.return_ticker()['USD_' + 'BTC']['lowestAsk']) * float(self.return_ticker()['BTC_' + 'EUR']['lowestAsk'])
                       else:
                        cur_min = usd_min / float(self.return_ticker()['USD_' + currency]['lowestAsk'])

                    raise Exception("Error create_loan_offer: Amount must be at least " + str(cur_min) + " " + currency)

tuberculo avatar Dec 10 '17 15:12 tuberculo

Something is still wrong. It is lending euro most of the time, but sometimes it doesn't. And I get this error message now Error EUR_BTC. It also does not show how much an EUR worth in the webserver.

tuberculo avatar Dec 18 '17 23:12 tuberculo

Same issue here : image

marczeller avatar Jan 13 '18 12:01 marczeller

I have the same issue but EUR_BTC. Need the logic to name it the other way around?

2018-01-19 00:57:26 Error EUR_BTC Traceback (most recent call last): File "lendingbot.py", line 94, in Lending.lend_all() File "/poloniexlendingbot/modules/Lending.py", line 247, in lend_all usable_currencies += lend_cur(cur, total_lent, lending_balances, ticker) File "/poloniexlendingbot/modules/Lending.py", line 444, in lend_cur raise msg KeyError: 'EUR_BTC'

v315 Unhandled error, please open a Github issue so we can fix it!

JCBauza avatar Jan 19 '18 07:01 JCBauza

Same issue !

Sigri44 avatar Jul 01 '18 19:07 Sigri44

Workaround: Set in separate coin section

[EUR]
minloansize = 45 

tuberculo avatar Jul 07 '18 23:07 tuberculo

getJSON failed, status: parsererror, error: SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data

Only on Bitfinex, Poloniex work fine

Sigri44 avatar Jul 08 '18 09:07 Sigri44