MikaLendingBot icon indicating copy to clipboard operation
MikaLendingBot copied to clipboard

MACD on BitFinex

Open Grzesiek83 opened this issue 9 years ago • 6 comments

Welcome to Lending Bot on BITFINEX LTC : Need more data for analysis, still collecting. I have 28/270 records 2017-09-24 21:14:29 Error Traceback (most recent call last): File "lendingbot.py", line 94, in Lending.lend_all() File "/home/greg/lendingbotzibi/modules/Lending.py", line 246, in lend_all usable_currencies += lend_cur(cur, total_lent, lending_balances, ticker) File "/home/greg/lendingbotzibi/modules/Lending.py", line 401, in lend_cur cur_min_daily_rate = get_min_daily_rate(active_cur) File "/home/greg/lendingbotzibi/modules/Lending.py", line 265, in get_min_daily_rate recommended_min = Analysis.get_rate_suggestion(cur, method=analysis_method) File "/home/greg/lendingbotzibi/modules/MarketAnalysis.py", line 301, in get_rate_suggestion .format(cur, truncate(self.get_MACD_rate(cur, rates), 6), File "/home/greg/lendingbotzibi/modules/MarketAnalysis.py", line 370, in get_MACD_rate raise MarketDataException MarketDataException

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

MarketAnalysis@config PLEASE refer to the docs before attempting to use any of this. There are a lot of things here that will not work correctly unless you understand what you are doing. analyseCurrencies = BTC,LTC lendingStyle = 85 MACD_long_win_seconds = 1800 #MACD_short_win_seconds = 150 percentile_seconds = 86400 keep_history_seconds = 285120 #recorded_levels = 10 #data_tolerance = 15 #delete_thread_sleep = 60 ma_debug_log = True

[Daily_min] method = MACD multiplier = 1.05

Grzesiek83 avatar Sep 24 '17 19:09 Grzesiek83

Hey @Grzesiek83 Is this happening continuously?

Can you update to the latest version and try again? It think you are a few commits behind looking at the line numbers and there have been a few changes around that module.

laxdog avatar Sep 26 '17 13:09 laxdog

Nevermind, I was on the wrong branch. You probably are on the latest.

That's weird though. That exception should be handled. Was there any other output?

laxdog avatar Sep 26 '17 13:09 laxdog

Servus @laxdog!

Answering your 1st question - nope. This was 1st time when I started MACD. I'm using always latest version of bot coz i would love to have this MACD analyze :P Today i have done update via git pull and i have new output...

greg@greg-VirtualBox:~/lendingbotgreg$ git pull remote: Counting objects: 21, done. remote: Compressing objects: 100% (6/6), done. remote: Total 21 (delta 14), reused 21 (delta 14), pack-reused 0 Unpacking objects: 100% (21/21), done. From https://github.com/BitBotFactory/poloniexlendingbot df09cd0..cf021d3 python3 -> origin/python3

  • [new branch] transferCurrenciesBitfinex -> origin/transferCurrenciesBitfinex Already up-to-date. greg@greg-VirtualBox:~/lendingbotgreg$ python lendingbot.py Welcome to Lending Bot on BITFINEX 2017-09-26 20:57:05 ZEC's min_loan_size has been increased to the detected min: 0.215768351098 2017-09-26 20:57:17 USD's min_loan_size has been increased to the detected min: 50 BTC : Need more data for analysis, still collecting. I have 29/270 records Caught exception during MACD analysis, using percentile for now Lent: xxx Error in returning data from exchange, ignoring Error in returning data from exchange, ignoring like 20x more of this info.... Error in returning data from exchange, ignoring Error in returning data from exchange, ignoring Error in returning data from exchange, ignoring 2017-09-26 20:59:37 Error API Error 429: { "error": "ERR_RATE_LIMIT"} Requesting https://api.bitfinex.com/v1/lendbook/LTC?limit_asks=300&limit_bids=300 2017-09-26 20:59:37 Error IP has been banned due to many requests. Sleeping for 300.0 seconds

Grzesiek83 avatar Sep 26 '17 19:09 Grzesiek83

hello @laxdog, since today morning i was trying to launch MACD at BitFinex. I have made new account with only BTC (as was told in doc's point 3.4 to decrees number of coins for analyze) on it (on main I have 5 another currencies), new API, new installation of bot, all stuff requirements.txt list... I was trying at beginning with so-called "minimum MACD requirements" from doc's point 3.3.2. Error 429 aka ERR_RATE_LIMIT. Then i was changing settings in sleeptimeactive, sleeptimeinactive, timeout... nothing changed - same error.

Short higher: Cur:BTC, MACD:0.000198, Perc:0.000206, Best:0.000189 Lent: [0.4528 BTC @ 0.0182%] Short higher: Error in returning data from exchange: API Error 429: { "error": "ERR_RATE_LIMIT"} Requesting https://api.bitfinex.com/v1/lendbook/BTC?limit_asks=3&limit_bids=3 Traceback (most recent call last): File "/home/greg/lendingbotzibi/modules/MarketAnalysis.py", line 160, in update_market_thread raw_data = self.api.return_loan_orders(cur, levels)['offers'] File "/home/greg/lendingbotzibi/modules/Bitfinex.py", line 150, in return_loan_orders bfx_resp = self._get(command) File "/home/greg/lendingbotzibi/modules/Bitfinex.py", line 120, in _get return self._request('get', request) File "/home/greg/lendingbotzibi/modules/ExchangeApi.py", line 29, in new_method return method(self, *arg, **kws) File "/home/greg/lendingbotzibi/modules/Bitfinex.py", line 109, in _request raise ex ApiError: API Error 429: { "error": "ERR_RATE_LIMIT"}

Could you, please, tell me what i'm doing wrong?

config: [MarketAnalysis] analyseCurrencies = BTC lendingStyle = 95 MACD_long_win_seconds = 1800 #MACD_short_win_seconds = 150 percentile_seconds = 86400 keep_history_seconds = 285120 #recorded_levels = 10 #data_tolerance = 15 #delete_thread_sleep = 60 ma_debug_log = True

[Daily_min] method = MACD multiplier = 1.05

Grzesiek83 avatar Oct 01 '17 14:10 Grzesiek83

Sorry @Grzesiek83 I missed your previous two comments.

I take it this is working now since you've closed it.

laxdog avatar Oct 18 '17 08:10 laxdog

No problem @laxdog! You was involved in really nice update #549.. which fixed my issue with Error 429. Good job and thx!

Grzesiek83 avatar Oct 18 '17 09:10 Grzesiek83