Search content
Sort by

Showing 17 of 17 results by HowardF3
Post
Topic
Board Project Development
Re: [ANN] MarginBot - A Bitfinex Margin Lending Management Bot
by
HowardF3
on 19/09/2017, 17:21:22 UTC
I have a question, how do I find View Overall Returns for other currencies besides USD?


Just posted an update to github, v1.08.  This is a small update that primarily addresses the "View Overall Returns" page.  It is now tabbed to show all available Crypto returns.  I also added a function (at the bottom of this dropdown menu) to import older return History, in case you want to import your older return history from Bitfinex for tracking / stats reasons.

http://therovegroup.com/MBot/MarginBotUpdate1.08.PNG


For the new Import function, just go to View Overall Returns -> Grab Return History From Bitfinex.  Then select the currency you want to import and select the date you want to use as the start date for your historical data.  Make sure to enter the start date in the format of YYYY-MM-DD EXACTLY (ex: 2017-09-19 for the date I'm posting this).  If you enter a long period of time, be prepared for this to take several minutes to run.  While its running, it will probably look like its stuck, but its not.  I ran mine from 2014-01-01 to stress test it and it took about 2 minutes to run, but this could vary a lot base on your server, how busy Bitfinex is, etc.  I'd suggest not going back too much earlier than that, as it may time out the script, but honestly Bitfinex isn't too much older than that, so it shouldn't be an issue...

http://therovegroup.com/MBot/MarginBotUpdate108-2.jpg

To install this update, just back up your /inc/config.php, download the latest version from github, unzip and overwrite the existing files.  Then copy back your /inc/config.php and everything should work.  If you're updating from a version older than 1.07, you should be directed to an update process when you access the site.  If you were already on 1.07d+ you shouldn't need to go through the update process.
Post
Topic
Board Project Development
Re: [ANN] MarginBot - A Bitfinex Margin Lending Management Bot
by
HowardF3
on 19/09/2017, 16:47:06 UTC

I think of it as being akin to selling picks and shovels during a gold rush. Apart from the currency risk (if USD is not your home currency), the only volatility is in the daily interest rate.

You don't lose money, you just make it at different rates.

Exactly.  I've always said don't be the gold miner, be the store that supplies the gold miner.  Let others take the big risks.  Some will make a fortune, lots more will lose their asses.  But either way, the suppliers (or in this case margin providers) make money.
Post
Topic
Board Project Development
Re: [ANN] MarginBot - A Bitfinex Margin Lending Management Bot
by
HowardF3
on 11/09/2017, 17:31:15 UTC
Update on my setup Smiley I have started with small amounts and my earnings below so far

The earnings are slow, but they add up over time.  Better than just about any other investment you'll find...  Grin


I have a question, how do I find View Overall Returns for other currencies besides USD?

I haven't put it in yet.  Making those charts is a bit of a pain, but I'm working to get it into the next build, and clean up the charts overall...
Post
Topic
Board Project Development
Re: [ANN] MarginBot - A Bitfinex Margin Lending Management Bot
by
HowardF3
on 07/09/2017, 18:40:07 UTC
Also, if Bitfinex starts supporting margin for a new currency in the future, and you don't want to wait for me to add support to it, all you'd need to do is add it to the CurPairs table.  Just need to add the currency code to curSym, the name of the coin to the curName row, and set status to 1 (leave the id blank and it will auto increment).  After that is should be an option in the dropdown menu.  Its also possible to hide currency that you don't care about, just set the status to 0 on any you want to hide.
Post
Topic
Board Project Development
Re: [ANN] MarginBot - A Bitfinex Margin Lending Management Bot
by
HowardF3
on 07/09/2017, 18:02:38 UTC
Any chance of adding Litecoin (LTC)?

It's fantastic that you've generalised to more currencies.

I was seriously thinking about hacking your bot myself to get multi-currency support in.

Well that's awkward... Not sure how I managed to miss that one...  I added it to to the newest build, just uploaded to github.  However, for anyone who already has v1.07b or higher, you'll need to manually run a sql query to add it to your database:

Code:
INSERT INTO `[YOURDBPREFIX]CurPairs` VALUES ('13', 'LTC', 'Litecoin', '1');

make sure to change [YOURDBPREFIX] to the correct prefix ( BFXLendBot_ if you used the default setting ).

I also made a few other updates to the newest version just uploaded (1.07e).  Mainly it allows pausing lending for a single coin or currency, rather than pausing the entire account....
Post
Topic
Board Project Development
Re: [ANN] MarginBot - A Bitfinex Margin Lending Management Bot
by
HowardF3
on 07/09/2017, 17:50:24 UTC
I solved the lack of updates problem.

I put in a print_r statement that told me my nonce was too small.

That made me think maybe I was reusing some keys (1 iMac, 2 android devices, two BFX accounts).

I was right!

Yeah, the way the bitfinex API enforces nonce is strange.  I usually just use microtime on just about every other API in the world and it works fine, but on really busy BFX keys, there seems to always be lots of conflicts.  Easiest way around it is to generate a new API key for every device / bot / app.
Post
Topic
Board Project Development
Re: [ANN] MarginBot - A Bitfinex Margin Lending Management Bot
by
HowardF3
on 03/09/2017, 18:52:21 UTC
Just updated github to 1.07c.  Fixed the above update.php issue (i used decimal(18,8), which should cover even the largest of investors), and made a quick fix to balances updating after loans are canceled ( Thanks jbhuang ! ).

The only 3 files that changed from v1.07b are:
/update.php
/inc/version_info.php
/inc/ExchangeAPIs/bitfinex.php

if updating from that version, you should only need to copy over those three files.  If updating from an older version, or doing a new install, follow the standard procedures.
Post
Topic
Board Project Development
Re: [ANN] MarginBot - A Bitfinex Margin Lending Management Bot
by
HowardF3
on 03/09/2017, 18:35:49 UTC
Ok, its ready!  MarginBot v0.1.07 is now live on github!  Full Crypto Margin lending!  Currently it supports all currencies that Bitfinex supports for margin.
For a few weeks now, my marginbot setup has not been picking up account history, nor unused funding, but the cron job runs were being added to the BFXLendBot_CronRuns table.

I spent some time on it yesterday, and didn't get any ideas as to what might be wrong. Not least because my php binary will not execute a .php file.

But the problem shows up as a lack of history on http://.../marginbot/index.php

and a lack of entries in the table BFXLendBot_Tracking. The last entry was 2017-08-19.

So I noticed this morning 1.07b was available on the master branch.

I followed the update instructions, and the following occurred:

A new table BFXLendBot_CurPairs is created, and the 4 existing tables are backed up to copies with the suffix _BACKUP_v17

But I get this error on the screen http://.../marginbot/update.php?doUpdate=2

Quote
THERE HAS BEEN A DATABASE ERROR
Please Contact Support If this error persists.
1264 - Out of range value for column 'dep_balance' at row 7

I am using

5.7.16
MySQL Community Server (GPL)


Poking around the MySQL tables, it seems the table definitions are still the same: decimal(12,2). But I can see some ALTER TABLE statements in update.php, that switch to decimal(12,8).
When I paste the ALTER TABLE for the Tracking table into MySQLWorkbench it thinks there is a syntax error in both MODIFY COLUMN parts of the SQL statement.


I am also wondering it it makes more sense to use decimal(16,8), as that way you can still support numbers up to 999,999,999. decimal(12,8) only goes up to 9,999.

Aye, good catch, that should definitely be at least decimal(16,8).   I was building the updater on a relatively new install that didn't have much data in it, and 12,8 worked for me (only a few thousand $ in the test account), but it will fail for anyone with > $9,999 in their account.  I will update this in github.
Post
Topic
Board Project Development
Re: [ANN] MarginBot - A Bitfinex Margin Lending Management Bot
by
HowardF3
on 25/08/2017, 17:27:20 UTC
Right, when I try to run from the browser the page appears messy like the previous screenshot, i am not sure if you can see that?

http://imgur.com/a/umbny

Hmm.  something is seriously not right with your server setup.  From that screenshot it looks like its dumping raw code rather than executing it, which shouldn't even be possible, unless its not actually being parsed by PHP.  have you been able to correctly run any other PHP code on the server?
Post
Topic
Board Project Development
Re: [ANN] MarginBot - A Bitfinex Margin Lending Management Bot
by
HowardF3
on 22/08/2017, 14:26:22 UTC
Tired the quickfix, here is the output


@bot:/var/www/html/MarginBot-master$ php -f install.php
error_reporting(E_ALL&~E_NOTICE);
PHP Warning:  session_start(): Cannot send session cookie - headers already sent by (output started at /var/www/html/MarginBot-master/install.php:1) in /var/www/html/MarginBot-master/inc/config.php on line 4
PHP Warning:  session_start(): Cannot send session cache limiter - headers already sent (output started at /var/www/html/MarginBot-master/install.php:1) in /var/www/html/MarginBot-master/inc/config.php on line 4
PHP Notice:  Undefined index: doInstall in /var/www/html/MarginBot-master/install.php on line 10
PHP Notice:  Undefined index: doInstall in /var/www/html/MarginBot-master/install.php on line 168

You have been trying to run this from a web browser, not just the terminal, right?  It is a form you'll need to put information into.  Running it from a browser, it should ignore those warnings and notices and show the page without a problem.
Post
Topic
Board Project Development
Re: [ANN] MarginBot - A Bitfinex Margin Lending Management Bot
by
HowardF3
on 21/08/2017, 15:05:39 UTC
Downloaded the fix but this time the installer.php prints the script and some error to the console

/var/www/html/MarginBot-master$ php -f install.php

PHP Notice:  Undefined index: doInstall in /var/www/html/MarginBot-master/install.php on line 9

PHP Notice:  Undefined index: doInstall in /var/www/html/MarginBot-master/install.php on line 167


http://www.w3.org/1999/xhtml">



PHP Notice:  Undefined variable: config in /var/www/html/MarginBot-master/inc/General.php on line 536

PHP Notice:  Undefined variable: config in /var/www/html/MarginBot-master/inc/General.php on line 536

PHP Notice:  Undefined variable: config in /var/www/html/MarginBot-master/inc/General.php on line 536

PHP Notice:  Undefined variable: config in /var/www/html/MarginBot-master/inc/General.php on line 541






PHP Notice:  Undefined index: doInstall in /var/www/html/MarginBot-master/install.php on line 334

PHP Notice:  Undefined index: installDBHost in /var/www/html/MarginBot-master/install.php on line 336

PHP Notice:  Undefined index: installDBPrefix in /var/www/html/MarginBot-master/install.php on line 337

PHP Notice:  Undefined index: installDBName in /var/www/html/MarginBot-master/install.php on line 395

PHP Notice:  Undefined index: installDBUser in /var/www/html/MarginBot-master/install.php on line 398

PHP Notice:  Undefined index: installDBPassword in /var/www/html/MarginBot-master/install.php on line 401

PHP Notice:  Undefined index: installEmail in /var/www/html/MarginBot-master/install.php on line 427

Background on my setup, it is a new VM with Ubuntu 16.04 LAMP stack



Do you have error settings particularly high on your php setup?  These are all notices, and shouldn't cause the script to stop executing.  There's no actual errors in this list.

A quick fix would be to add this to the top line of install.php:

error_reporting(E_ALL & ~E_NOTICE);

Post
Topic
Board Project Development
Re: [ANN] MarginBot - A Bitfinex Margin Lending Management Bot
by
HowardF3
on 20/08/2017, 18:05:55 UTC
Thanks for replying but I must be doing something wrong

http://imgur.com/a/Eq4IQ

from console

/var/www/html$ php -f install.php
PHP Notice:  Undefined index: doInstall in /var/www/html/install.php on line 9
PHP Notice:  Undefined index: doInstall in /var/www/html/install.php on line 151
PHP Notice:  Undefined index: SCRIPT_URL in /var/www/html/inc/General.php on line 14
PHP Notice:  Undefined index: SCRIPT_URL in /var/www/html/inc/General.php on line 14
PHP Fatal error:  Uncaught Error: Call to a member function query() on null in /var/www/html/inc/General.php:15
Stack trace:
#0 /var/www/html/install.php(246): General->__construct()
#1 {main}
  thrown in /var/www/html/inc/General.php on line 15

2 things:
1. I just uploaded another quick hotfix because I forgot to add something to the installer for the new version.  The hotfix isn't your issue though (but you will want to download it). 

2.  For some reason your server isn't correctly loading $_SERVER['SCRIPT_URL'] (PHP Notice:  Undefined index: SCRIPT_URL in /var/www/html/inc/General.php on line 14).
This is strange.  Never run into that issue before, but I changed it to $_SERVER['PHP_SELF'] which is a little more universal in the latest update.  If that still isn't working for you, I'll need to figure out another way to trap for what script is running.
Post
Topic
Board Project Development
Re: [ANN] MarginBot - A Bitfinex Margin Lending Management Bot
by
HowardF3
on 19/08/2017, 17:48:17 UTC
Hi,

First time trying to set up this, is it possible to create how to for beginners?

I am stuck at "failed to connect to MYSQL"

Any help would be much appreciated.


Oops, actually it looks like 1.07 broke the installer.  I just uploaded a quick fix that should address the issue.  Just download the newest version, 1.07a and try running it again.  It should correctly redirect you to the installer and allow you to set up the mysql database this time.  Sorry about that.  

*EDIT* If you have any more issues installing just post here and I'll be happy to help however I can.
Post
Topic
Board Project Development
Re: [ANN] MarginBot - A Bitfinex Margin Lending Management Bot
by
HowardF3
on 17/08/2017, 21:17:28 UTC
Ok, its ready!  MarginBot v0.1.07 is now live on github!  Full Crypto Margin lending!  Currently it supports all currencies that Bitfinex supports for margin.

You can get it here:
https://github.com/HFenter/MarginBot


Full install instructions are there, but here's a quick Update instruction:


Update from an older Version

Important - Make sure to backup your existing inc/config.php file FIRST

To update, make a backup of your inc/config.php file, then download the most current version. Unzip the files and overwrite your existing install.

Then overwrite the default config.php file with your backed up version.
Visit the site, and you'll be redirected to an update system.
If you are not correctly redirected, just visit /MarginBot/update.php

If there are any issues feel free to contact me here or via the built in contact email.

(I'm wondering if I should start a new thread on this, since I can't update the original post anymore....  What do you guys think?)

Post
Topic
Board Project Development
Re: [ANN] MarginBot - A Bitfinex Margin Lending Management Bot
by
HowardF3
on 17/08/2017, 21:09:33 UTC
1. First, let me get this out of the way.  I am HowardF, the original creator of MarginBot.  While I was away from this forum, it apparently got hacked, and they locked down all the accounts and sent out a change password thing.  Well, that change password thing isn't working, I can't request a new password from my old account, and I can't figure out any way around it.  So, I created this new account to use from now on.  If there's any concern whether its really me or not, I'm happy to prove it by changing either the old website at fuckedgox.com or I can make a little change in the Github repo or whatever (just tell me what you guys want, and I'll do it).  Also, if anyone has a better contact for an admin here that could reset the HowardF account for me so I can get back in, that would be awesome as well.  I'd love to get access back to that account, would save some trouble.

Just checking that account, it had made 2 posts in a thread in May of this year. Doesn't seem characteristic. I'd look into that.

Yeah, I'd noticed.  Already reported it.  Those 2 posts were not me.  At this point I'm pretty much considering that account gone.
Post
Topic
Board Project Development
Re: [ANN] MarginBot - A Bitfinex Margin Lending Management Bot
by
HowardF3
on 15/08/2017, 17:24:13 UTC
Hi,

Since Bitfinex now supports Bitcoin Cash Lending

Can or will your bot support it?

I am currently working on adding back in Crypto Margin Lending.  I hope to have a new build up in the next day or so with this built in.  It should allow all types of crypto bitfinx supports for margin.
Post
Topic
Board Project Development
Re: [ANN] MarginBot - A Bitfinex Margin Lending Management Bot
by
HowardF3
on 18/07/2017, 18:11:42 UTC
Hello everyone,

I've been away from this forum and MarginBot for a bit, and am finally available to come back and start working on the project again.  Looks like things were busy here while I was gone!

1. First, let me get this out of the way.  I am HowardF, the original creator of MarginBot.  While I was away from this forum, it apparently got hacked, and they locked down all the accounts and sent out a change password thing.  Well, that change password thing isn't working, I can't request a new password from my old account, and I can't figure out any way around it.  So, I created this new account to use from now on.  If there's any concern whether its really me or not, I'm happy to prove it by changing either the old website at fuckedgox.com or I can make a little change in the Github repo or whatever (just tell me what you guys want, and I'll do it).  Also, if anyone has a better contact for an admin here that could reset the HowardF account for me so I can get back in, that would be awesome as well.  I'd love to get access back to that account, would save some trouble.

2. Why have I been gone for so long?  Basically, I got hired to build some software for a company, and as part of the deal I couldn't really work on any competing crypto based applications.  The company was really cool, and I probably could have gotten around this to work on MarginBot a bit, but honestly it was just easier to focus there at the time.  That project is done now though, and I'm ready to get back into working on MarginBot.  Plus that project gave me a ton of ideas for improvements / new features for MarginBot.

3. What's the future for MarginBot?  Well, in the current environment, MarginBot has been performing exceedingly well, and this seems like a particularly good time to come back to work on it.  Honestly, MarginBot has always been a simple tool, and it always will be.  So to that end, there's not really all that much that needs to be added to the tool.  But there are a ton of small bug fixes, performance improvements, minor features, enhancements, etc. that I would really like to make.  Plus, I've been running MarginBot for more than 3 years now, so I have a LOT of data that I've been able to run things against to see what is working well and what isn't.  Hopefully I'll be able to use some of that information to make some minor tweaks to the overall algorithms I use (while still keeping things simple, it is after all primarily a tool to beat FRR).

4. I have questions, need support, or want something custom.  Get in touch with me at marginbot@fuckedgox.com, or send me a message here.  I'll try to check in a lot more often.  Also, I'm on reddit a lot: https://www.reddit.com/user/FuckedGox/