Pages:
Author

Topic: [ANN] MarginBot - A Bitfinex Margin Lending Management Bot - page 11. (Read 45953 times)

full member
Activity: 145
Merit: 100
I do Stuff, and stuff.....
Just released a new version of the bot, v0.1.05.

This is an important update for everyone to install, as it fixes a bug that was allowing the bot to put in loan offers under your "Minimum Lend Rate" setting at times.

To update, just save a copy of your existing inc/config.php file, download the latest version and overwrite everything on the server, then upload your saved inc/config.php file.  Everything should be ready to go.

New features include:

v0.1.05

  • If only 1 user account is set up, stats page only shows 1 chart
          (instead of "Global" and that user, which would always be identical)
  • Lots of small fixes for WAMP servers
  • Added a pause feature to disable lending



legendary
Activity: 2618
Merit: 1007
The Bitfinex FRR monster is pushing interest rates below .065%
And your bot is helping that by automatically undercutting it, forcing it down further... Wink

I agree that everybody should set their minimal rate they are comfortable with and then also stick to that. That way interest rates will sort themselves out, no matter the FRR or not.
full member
Activity: 145
Merit: 100
I do Stuff, and stuff.....

Just a warning for everyone running MarginBot on default settings.  The Bitfinex FRR monster is pushing interest rates below .065%, which is the default "Minimum Lend Rate" setting.  Embarrassed  If you want to insure your money stays lent out, make sure to change this to a lower number, or alternatively, move your money into other investments while waiting for the Bitfinex rate to increase.  For reference, 0.065% is about 23% / year after fees, and .05% which is the lowest I will take before moving to other investments ends up being about 17% / year after fees...

full member
Activity: 145
Merit: 100
I do Stuff, and stuff.....
What is the reasoning behind using a Gap Top? With a Gap Top the money will not always be lent out, and during this "lost time", the rates can go either higher or lower - if they go lower you are facing a double loss (lost time and lower rates). Do the higher rates you catch with a Gap Top make this risk worthwhile? Why not just set the "Spread Available Lends" to 1, so all offers go $25,000 deep?

The way it tends to play out in my testing (and on my year old live account) is like this:

After a few weeks, my loans will split into 100's of small chunks.   Since each chuck is typically on a 2 day loan, dozens end up closing each hour.  Every 10 minutes the bot will check that balance and split it into 4 offers.  The lowest offer, set at the $25k mark is almost always taken quickly.  During slightly above average movement periods, the next chunk at the second highest rate will be taken in that 10 minute period as well (this is usually only a few .001's of a % higher, but since it was taken in the same hour, it was worth the effort).  The next 2 splits likely won't get taken during that 10 minute period unless the market is going crazy.  So, the 10 minute bot will run, split what's left of those 2 higher points into 4 loans again, and start all over with the lowest 2 likely to get taken, and the highest 2 not.  This will continue to happen until my available balance gets too low too split more than 2 times (under $150, since the smallest loan is $50).  Then it will put that final balance up at the lowest rate, where it will promptly get taken.  Generally, all of this takes less than an hour, maybe 2, so I've effectively lost no interest payments while gambling on a possible mini run that gets a little cash out at a higher rate. The other benefit is the constant splitting of loans into smaller chunks.   This keeps my balance split across many small loans, which creates a constant stream of closing loans, and available balance, which in turn keeps me in a good position to catch any sudden rise in rates when the FRR wall is broken. In general, downward trends are slow and methodical, but the FRR wall breaks are fast and short lived,  and there is nothing in the world more annoying than seeing the wall break and interest hit .75%, but having no available balance to take advantage of it.  In average to good market conditions this has always worked well for me, eaking out a few extra % on my loans.  In particularly slow markets,  i tend to adjust these settings to make sure the money always lends out in an hour or less.  While this is a bot, for best results, it does need occasional tweaking due to market conditions...   Wink


However, the high gap of $125,000 may be a bit high, depending on how much you have in the account.

Why should the Gap Top be lower if you have less money?

Thanks Smiley

Lower balances mean less available money, which means you'll likely not have enough for multiple splits ($50 / split minimum), so if your available balance is only $120 and your account has a high gap of $125k, it will create 2 splits (instead of the 3 or 4 it would do with more balance), and it will put the second split at the top where it likely won't get hit.  With smaller balances your better off setting the split to 2 (or 1 if it's a really small balance, under $500 or so) and the top somewhere that's more likely to get hit in a 10 minute period.

Again though, this is just my philosophy, and I'm sure there are better ones out there.  That's why I designed the bot to let users set things their own way.

( sorry if this is a thick read or if any of it doesn't make sense, I just typed this all out on a tablet in bed and this forum and auto correct do not like each other....)
full member
Activity: 125
Merit: 101
They are based on testing I've done.  Setting a gap bottom of $5000 is very low in my opinion, and likely to have you catching lots of random very low loan offers.  For instance, right now there's an offer for $4001.83 at 0.055 then the next step is at %0.0675 .  While your $5000 bottom wouldn't trigger on that offer, it would come close, and I see random low offers like that on the books all the time.  I've found that around $25,000 is where the realistic bottom is, and misses the random low crap.  I've also found that even on a slow day, $25,000 tends to get taken very quickly.  However, the high gap of $125,000 may be a bit high, depending on how much you have in the account.


What is the reasoning behind using a Gap Top? With a Gap Top the money will not always be lent out, and during this "lost time", the rates can go either higher or lower - if they go lower you are facing a double loss (lost time and lower rates). Do the higher rates you catch with a Gap Top make this risk worthwhile? Why not just set the "Spread Available Lends" to 1, so all offers go $25,000 deep?

However, the high gap of $125,000 may be a bit high, depending on how much you have in the account.

Why should the Gap Top be lower if you have less money?

Thanks Smiley
full member
Activity: 145
Merit: 100
I do Stuff, and stuff.....
For anyone who may be interested in such things, I've set up an account running MarginBot with the Following settings:

Spread Available Lends    4
Minimum Lend Rate         0.0650%
Minimum for 30 Day        0.1250%
High Hold Amount           $0.00
Gap Bottom                      $25,000.00
Gap Top                        $125,000.00


Are these settings based on tests? I've been wondering which settings to use and the most intuitive solution for me would be to lend everything at Gap Bottom around $5000, to make sure it gets taken ASAP. Getting lucky and "catching" higher rates at the Gap Top seems just as probable as getting unlucky and the interest rates lowering during that time... Undecided

They are based on testing I've done.  Setting a gap bottom of $5000 is very low in my opinion, and likely to have you catching lots of random very low loan offers.  For instance, right now there's an offer for $4001.83 at 0.055 then the next step is at %0.0675 .  While your $5000 bottom wouldn't trigger on that offer, it would come close, and I see random low offers like that on the books all the time.  I've found that around $25,000 is where the realistic bottom is, and misses the random low crap.  I've also found that even on a slow day, $25,000 tends to get taken very quickly.  However, the high gap of $125,000 may be a bit high, depending on how much you have in the account.   On accounts with only a few $1,000 or less, a more aggressive and probably better overall setting would be:

Code:
Spread Available Lends    2
Minimum Lend Rate         0.0650%
Minimum for 30 Day        0.1250%
High Hold Amount          $0.00
Gap Bottom           $15,000.00
Gap Top                   $50,000.00



As with all things though, your own testing should trump my opinion.  I'm sure there are settings that would result in better returns than I get, and I'm sure account balance and other factors play a role.


full member
Activity: 125
Merit: 101
For anyone who may be interested in such things, I've set up an account running MarginBot with the Following settings:

Spread Available Lends    4
Minimum Lend Rate         0.0650%
Minimum for 30 Day        0.1250%
High Hold Amount           $0.00
Gap Bottom                      $25,000.00
Gap Top                        $125,000.00


Are these settings based on tests? I've been wondering which settings to use and the most intuitive solution for me would be to lend everything at Gap Bottom around $5000, to make sure it gets taken ASAP. Getting lucky and "catching" higher rates at the Gap Top seems just as probable as getting unlucky and the interest rates lowering during that time... Undecided
full member
Activity: 145
Merit: 100
I do Stuff, and stuff.....
with a more realistic FRR efficiency rate of 70%

Looking at the height of the FRR wall, and the low volume taken in the last 24hours, I've been assuming the efficiency would be drastically lower than that... I have no data either way, but I'd be quite interested if someone did have a firm idea of just how long the waiting time to get a swap taken at FRR is right now.


My assumption is that it is much lower than that too.  40% wouldn't surprise me at all.  I set it at 70% so that there would be no doubt my comparison is reasonable and fair, if not skewed against me...
full member
Activity: 136
Merit: 100
with a more realistic FRR efficiency rate of 70%

Looking at the height of the FRR wall, and the low volume taken in the last 24hours, I've been assuming the efficiency would be drastically lower than that... I have no data either way, but I'd be quite interested if someone did have a firm idea of just how long the waiting time to get a swap taken at FRR is right now.
full member
Activity: 145
Merit: 100
I do Stuff, and stuff.....
For anyone who may be interested in such things, I've set up an account running MarginBot with the Following settings:

Spread Available Lends    4
Minimum Lend Rate         0.0650%
Minimum for 30 Day        0.1250%
High Hold Amount           $0.00
Gap Bottom                      $25,000.00
Gap Top                        $125,000.00



And the results are automatically posted here daily:

http://fuckedgox.com/MBot/#mbRet


So Far I'm averaging pretty much on par with FRR after fees, but with a more realistic FRR efficiency rate of 70%, I'm getting about 28% higher returns.


full member
Activity: 145
Merit: 100
I do Stuff, and stuff.....
Great work! Testing it now..

What would be the easiest way to pause the bot? Stop the cron jobs?

Yeah, stopping the crons would be your best bet.  Right now there's no built in pause button per se, but sometimes when I want to keep some of my money available when it comes off loan, I'll use a High Hold set to a really high interest rate.  That way if something crazy happens and interest spikes to 1% or something the money will still go out, but in all likelihood it will be there waiting for me when I need it.

I have been asked for a pause feature a couple of times now though, so I may roll that into the next update.  I would be pretty easy to add.
newbie
Activity: 10
Merit: 0
Great work! Testing it now..

What would be the easiest way to pause the bot? Stop the cron jobs?
full member
Activity: 145
Merit: 100
I do Stuff, and stuff.....

My bad, it's my first time using a VPS. It's working like a charm now, thank you! Smiley

Glad to hear it.  I added CURL support to the requirements on the front page, so hopefully your experience will help others in the future.

If I got really ambitious some day I could actually have the installer check for all the required components when it runs, but that seems like a lot of work for such a limited scope product....   Roll Eyes
full member
Activity: 125
Merit: 101
You don't seem to have curl support enabled on your PHP install, which is typically standard.  CURL is required to use the bitfinex API.

See http://php.net/manual/en/curl.installation.php for help compiling with CURL

My bad, it's my first time using a VPS. It's working like a charm now, thank you! Smiley
full member
Activity: 145
Merit: 100
I do Stuff, and stuff.....

Code:
[Wed Dec 03 11:33:00 2014] [error] [client 123.123.123.123] PHP Fatal error:  Call to undefined function curl_init() in /var/www/mbot/inc/ExchangeAPIs/bitfinex.php on line 110, referer: http://123.123.123.123/mbot/install.php

Thanks! Smiley


You don't seem to have curl support enabled on your PHP install, which is typically standard.  CURL is required to use the bitfinex API.

See http://php.net/manual/en/curl.installation.php for help compiling with CURL
full member
Activity: 125
Merit: 101
I'm having trouble installing... Step 1 and 2 go through smoothly but after clicking "Complete Install", I just get a blank page.

I'm running Debian 7.

Hmm... can you tell if it correctly made the database tables?  Do you have any errors in your apache http error log?

Code:
mysql> show tables from mbot;
+---------------------+
| Tables_in_mbot      |
+---------------------+
| BFXLendBot_CronRuns |
| BFXLendBot_Tracking |
| BFXLendBot_Users    |
| BFXLendBot_Vars     |
+---------------------+
4 rows in set (0.01 sec)

The tables are made but are all empty.

error log:

Code:
[Wed Dec 03 11:30:25 2014] [error] [client 123.123.123.123] PHP Notice:  Undefined index: doInstall in /var/www/mbot/install.php on line 9
[Wed Dec 03 11:30:25 2014] [error] [client 123.123.123.123] PHP Notice:  Undefined index: doInstall in /var/www/mbot/install.php on line 135
[Wed Dec 03 11:30:25 2014] [error] [client 123.123.123.123] PHP Notice:  Undefined index: doInstall in /var/www/mbot/install.php on line 287
[Wed Dec 03 11:30:25 2014] [error] [client 123.123.123.123] PHP Notice:  Undefined index: installDBHost in /var/www/mbot/install.php on line 289
[Wed Dec 03 11:30:25 2014] [error] [client 123.123.123.123] PHP Notice:  Undefined index: installDBPrefix in /var/www/mbot/install.php on line 290
[Wed Dec 03 11:30:25 2014] [error] [client 123.123.123.123] PHP Notice:  Undefined index: installDBName in /var/www/mbot/install.php on line 348
[Wed Dec 03 11:30:25 2014] [error] [client 123.123.123.123] PHP Notice:  Undefined index: installDBUser in /var/www/mbot/install.php on line 351
[Wed Dec 03 11:30:25 2014] [error] [client 123.123.123.123] PHP Notice:  Undefined index: installDBPassword in /var/www/mbot/install.php on line 354
[Wed Dec 03 11:30:25 2014] [error] [client 123.123.123.123] PHP Notice:  Undefined index: installEmail in /var/www/mbot/install.php on line 380
[Wed Dec 03 11:31:39 2014] [error] [client 123.123.123.123] PHP Notice:  Undefined index: installAdminUser in /var/www/mbot/install.php on line 442, referer: http://123.123.123.123/mbot/install.php
[Wed Dec 03 11:31:39 2014] [error] [client 123.123.123.123] PHP Notice:  Undefined index: installAdminEmail in /var/www/mbot/install.php on line 445, referer: http://123.123.123.123/mbot/install.php
[Wed Dec 03 11:31:39 2014] [error] [client 123.123.123.123] PHP Notice:  Undefined index: installAdminPassword in /var/www/mbot/install.php on line 448, referer: http://123.123.123.123/mbot/install.php
[Wed Dec 03 11:31:39 2014] [error] [client 123.123.123.123] PHP Notice:  Undefined index: installAdminBFXKey in /var/www/mbot/install.php on line 451, referer: http://123.123.123.123/mbot/install.php
[Wed Dec 03 11:31:39 2014] [error] [client 123.123.123.123] PHP Notice:  Undefined index: installAdminBFXSec in /var/www/mbot/install.php on line 454, referer: http://123.123.123.123/mbot/install.php
[Wed Dec 03 11:33:00 2014] [error] [client 123.123.123.123] PHP Fatal error:  Call to undefined function curl_init() in /var/www/mbot/inc/ExchangeAPIs/bitfinex.php on line 110, referer: http://123.123.123.123/mbot/install.php

Thanks! Smiley
full member
Activity: 145
Merit: 100
I do Stuff, and stuff.....
I'm having trouble installing... Step 1 and 2 go through smoothly but after clicking "Complete Install", I just get a blank page.

I'm running Debian 7.

Hmm... can you tell if it correctly made the database tables?  Do you have any errors in your apache http error log?
full member
Activity: 125
Merit: 101
I'm having trouble installing... Step 1 and 2 go through smoothly but after clicking "Complete Install", I just get a blank page.

I'm running Debian 7.
full member
Activity: 145
Merit: 100
I do Stuff, and stuff.....
Just going to check you're aware; the shared spreadsheet only seems to have permissions granted for viewing, not for other users to add/edit. Not sure what your intentions were - can plausibly imagine that being how you want it (so that no-one can come along and mess with it maliciously), but equally I know I've intended to share something as group-editable before and instead not even managed to grant viewing permissions.

yeah, it was supposed to be editable, sorry about that.  Should be set right now.   I don't use google sheets much, thought i had it set right.

For anyone who wants to add their own returns, I would ask that you just create a new tab, so we can keep the existing info in place.
full member
Activity: 136
Merit: 100
Just going to check you're aware; the shared spreadsheet only seems to have permissions granted for viewing, not for other users to add/edit. Not sure what your intentions were - can plausibly imagine that being how you want it (so that no-one can come along and mess with it maliciously), but equally I know I've intended to share something as group-editable before and instead not even managed to grant viewing permissions.
Pages:
Jump to: