Pages:
Author

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

hero member
Activity: 644
Merit: 503
Thanks! After fiddling with it this morning, I discovered that I am getting an error in the database.php file.
Code:
Cannot instantiate non-existent class:  mysqli 

I'm not anywhere near a development box to test this, so it's possible this is a red herring, but...

There's a compile-time flag for mysqli - PHP needs to be compiled with the flag set. It's also version-dependent. My first assumption would be that the version of PHP you're running against doesn't have mysqli enabled (if you're running this on a hosted server your host's sys admin may be able to solve this for you. If you're running it on your own server it'll be very much OS-specific, but I might be able to help).
hero member
Activity: 826
Merit: 1000
Thanks! After fiddling with it this morning, I discovered that I am getting an error in the database.php file.
Code:
Cannot instantiate non-existent class:  mysqli 
legendary
Activity: 2674
Merit: 1083
Legendary Escrow Service - Tip Jar in Profile
I'm having issues setting up my crontabs. I've tried what the dashboard has suggested and the method my host recommends, but still not running. Can you provide any advice on how they should be coded?

If you don't manage to set it up on your hosting then there are free cron job websites on the internet. They simply request the url(s) you specify in the timeframes you specify. Works like normal cron jobs.

I'm not sure if this would mean any privacy issues since they know your url.

Only a headsup.
hero member
Activity: 826
Merit: 1000
I'm having issues setting up my crontabs. I've tried what the dashboard has suggested and the method my host recommends, but still not running. Can you provide any advice on how they should be coded?
legendary
Activity: 2674
Merit: 1083
Legendary Escrow Service - Tip Jar in Profile
Sebastian, I guess Sucrim was answering me.
Yes, I'm a developer of closed source, paid product for Windows. I thought that readers of this thread should be aware of this product, that's why I posted in this thread, too.
Sorry if that's disturbing Smiley
There are many people running Windows machine 24/7.
In any case, if you are comfortable with Windows, you are welcome to try the bot - should take couple of minutes to install and configure.
[no more advertising here, I promise:)]

Ah ok. Misunderstanding then. Though i somehow doubt that someone will pay for something that he can get for free too. Without the risk of hidden code that might steal funds or infect the computer. You know what i mean...
newbie
Activity: 6
Merit: 0
Sebastian, I guess Sucrim was answering me.
Yes, I'm a developer of closed source, paid product for Windows. I thought that readers of this thread should be aware of this product, that's why I posted in this thread, too.
Sorry if that's disturbing Smiley
There are many people running Windows machine 24/7.
In any case, if you are comfortable with Windows, you are welcome to try the bot - should take couple of minutes to install and configure.
[no more advertising here, I promise:)]
legendary
Activity: 2674
Merit: 1083
Legendary Escrow Service - Tip Jar in Profile
Yeah, closed source, paid subscription model and Windows only (do you expect me to run a Windows machine 24/7 for this?!) - also advertising in threads of other projects! Angry

I think I'll pass on that...

Are you sure you mean this bot here? This bot is free, open source, since php, and it can be run on any machine that can run a webhosting software.

And advertising makes no sense either.

You sure that you don't mix something?
legendary
Activity: 2618
Merit: 1007
Yeah, closed source, paid subscription model and Windows only (do you expect me to run a Windows machine 24/7 for this?!) - also advertising in threads of other projects! Angry

I think I'll pass on that...
newbie
Activity: 6
Merit: 0
If you are looking for a BitFinex margin lending bot, you should  consider BFX Swapmaster. http://www.bfxswapmaster.com
It's a windows application that runs in a background, supports all currencies and several strategies. More strategies will be added soon.
There is a free version to play with.
Disclaimer: I'm a developer
full member
Activity: 145
Merit: 100
I do Stuff, and stuff.....
I imagine the free webhost was probably running an older version of PHP that was causing the errors.  I generally don't worry about writing code to support anything before 5.3 anymore because of security issues with older versions.  I know I've helped a couple of people set up accounts on Godaddy that work fine.  Not my favorite host in the world, but I can confirm they do work.

As for updating my version of the bot, I may do it at some point in the future, but I don't have any time right now unfortunately.  If you're interested in lending BTC/LTC, I'd just use deponzits version at this point.  If I make any future updates to my version, I'll probably try to merge his updates back into mine, or somehow work to make them compatible.
legendary
Activity: 2800
Merit: 1012
Get Paid Crypto To Walk or Drive
Thanks for vouching for his copy, I hadn't tried it yet because I was nervous.  I just don't like risking these things.  I had tried to use the free webhosting from 000webhost like he had mentioned earlier, but it seems like it didn't have the correct version of PHP or something?  IDK what was going on.

Can you recommend a host to run this on?  Are you planning to add some of the features that deponzit made into your original bot?
full member
Activity: 145
Merit: 100
I do Stuff, and stuff.....
Wow, I go away a couple weeks and my old bot goes crazy...  Roll Eyes

Anyways, thanks deponzit for all the updates and tweaks.  A lot of these things are stuff I had been planning to work on, and in fact have in my private install, but never got around to rolling back into the core code.

I took a look at all the diffs in your branch and can vouch for anyone curious, he's not doing anything malicious, so his code is certainly safe to use.

I will mention, running on older versions of PHP is a BAD idea.  There are numerous reasons this is so, but for simplicity sake lets just say if you are running code that manages actual finances on anything older than PHP 5.3, just.... don't.  Upgrade... its easy, and its worth it.

I would also mention that I actually originally had BTC and LTC working in marginbot, but I removed them a while ago, when doing an update.  The reasons are described better in a discussion earlier in this post ( as well as here: https://bitcointalksearch.org/topic/m.9739115 ), but basically, it wasn't worth my time to build the UI because the return rates on BTC /LTC are so terribly low in general that you would do better to cash them out and put the money in a low interest savings account.  The only reasonable way to lend on bitfinex is in USD (unless you really still believe BTC To the moon!!1 ┗(°0°)┛ o    ) .  Of course with USD rates dipping below .02, I guess the argument could be made there now too....
legendary
Activity: 1498
Merit: 1000
Anything like this for Poloniex?
member
Activity: 98
Merit: 10
Glanced at deponzit's code (diff) and didn't see any glaringly evil so I'm running that code now. Please don't consider this a full audit or anything. Overall it appears to be working, but it is a bit odd that you need multiple accounts to setup lending multiple currencies. Not a big deal, but a bit unintuitive.
newbie
Activity: 14
Merit: 0
Getting this error...
Warning: json_encode() expects exactly 1 parameter, 2 given in /home/a7180419/public_html/MarginBot/inc/ExchangeAPIs/bitfinex.php on line 98
on step 2 of the install.  Any ideas whats going on?

It's fixed in my version Wink
But if you want to fix it yourself, here's how:

Change the code "json_encode($req, true)" to "json_encode($req)" - This appears twice in bitfinex.php
And/or turn error reporting down, by replacing "error_reporting(E_ALL & ~E_NOTICE);" at the top of index.php with "error_reporting(E_ERROR);"

Explanation:
json_encode was changed to accept a second parameter in PHP 5.3, so you're likely using a version of PHP older than that which only supports the one. Editing out the "true" here won't break anything. The parameter is actually wrong, anyway, as that is supposed to be an integer.

As for the error reporting, unfortunately the original code actually has quite a few warnings and notices, so the change I listed will only stop execution on actual errors.
legendary
Activity: 2800
Merit: 1012
Get Paid Crypto To Walk or Drive
Getting this error...
Warning: json_encode() expects exactly 1 parameter, 2 given in /home/a7180419/public_html/MarginBot/inc/ExchangeAPIs/bitfinex.php on line 98
on step 2 of the install.  Any ideas whats going on?
newbie
Activity: 14
Merit: 0
It seems that when using 000webhost.com, the cronjobs are not exactly reliable. Not a big surprise for a free webhost. To counter this, I've pushed some changes that will allow you to run the cronjobs every 5 mins if you so choose. The bot will only run on accounts that were missed last attempt, so it still won't run more than once every 10 mins on any account.

Updating is only necessary if you've been seeing the 10 minute cronjob skipping any users that it shouldn't be. You can check this by looking at your CronRuns table.

Latest version can always be found at:
https://github.com/deponzit/MarginBot

000webhost.com, so you are using a free webhost? Oo I really don't think that is a good idea except you only have playmoney you use on bitfinex.

If your money is withdrawn then who was it? A hacker, an employee of simply someone on the same server who could access your webhosting with a simple trick?

Sounds way too risky for reasonable amounts.

I wanted to get it working on a free host. I am no longer using them. Regardless, if a hacker/employee/whatever snooped on my files, the worst they could do using the API is lend my money out at low rates. The API does not allow withdrawals, or even transferring balances between wallets (https://www.bitfinex.com/pages/api).
legendary
Activity: 1148
Merit: 1006
It seems that when using 000webhost.com, the cronjobs are not exactly reliable. Not a big surprise for a free webhost. To counter this, I've pushed some changes that will allow you to run the cronjobs every 5 mins if you so choose. The bot will only run on accounts that were missed last attempt, so it still won't run more than once every 10 mins on any account.

Updating is only necessary if you've been seeing the 10 minute cronjob skipping any users that it shouldn't be. You can check this by looking at your CronRuns table.

Latest version can always be found at:
https://github.com/deponzit/MarginBot

000webhost.com, so you are using a free webhost? Oo I really don't think that is a good idea except you only have playmoney you use on bitfinex.

If your money is withdrawn then who was it? A hacker, an employee of simply someone on the same server who could access your webhosting with a simple trick?

Sounds way too risky for reasonable amounts.
newbie
Activity: 14
Merit: 0
It seems that when using 000webhost.com, the cronjobs are not exactly reliable. Not a big surprise for a free webhost. To counter this, I've pushed some changes that will allow you to run the cronjobs every 5 mins if you so choose. The bot will only run on accounts that were missed last attempt, so it still won't run more than once every 10 mins on any account.

Updating is only necessary if you've been seeing the 10 minute cronjob skipping any users that it shouldn't be. You can check this by looking at your CronRuns table.

Latest version can always be found at:
https://github.com/deponzit/MarginBot
legendary
Activity: 2800
Merit: 1012
Get Paid Crypto To Walk or Drive
I've updated my fork to ignore the FRR offers on the offerbook. This will let it place offers above the FRR, as FRR offers are bypassed for fixed-rate loans. Result of this should mean taking advantage of higher loan rates when rates are climbing above the FRR.

Latest version can always be found at:
https://github.com/deponzit/MarginBot


Please note, I mean no disrespect and I could be completely off the mark here but, has anyone checked this code to make sure it isn't malicious?  Or is there really anything that could be stolen by only knowing my API code?

No disrespect taken, and thanks for the interest. That link goes straight to the source code, so feel free to scope it out yourself. The core of it is unchanged from the original version. If someone got ahold of your API keys, they could potentially make some bad trades, but they can't withdraw any of your funds. You can read about Bitfinex's API here: https://www.bitfinex.com/pages/api. I still keep my bot behind a password protected folder on my web server, though it's probably not necessary. If you decide to do the same I've included some code in the crons folder to get your cronjobs to authenticate.

I appreciate your reply, goes a long way to instilling confidence.
Pages:
Jump to: