Bitcoin Forum
November 05, 2024, 06:15:06 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 [13] 14 »  All
  Print  
Author Topic: [ANN] MarginBot - A Bitfinex Margin Lending Management Bot  (Read 45929 times)
Jope
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
October 07, 2017, 04:12:12 AM
 #241

Hi HowardF,
I've run into some trouble when upgrading, as in the upgrade button didn't too anything that I could see, the page just refreshed quickly. It may be due to me coming from the deponzit fork (was usinh it for the last 2 years but it just mysteriously stopped working). Thus I decided a clean install from your repo was necessary. I deleted everything, started with new everything. I put in my DB info and on the next page and after I put in my API info and hit next I get:

THERE HAS BEEN A DATABASE ERROR
Please Contact Support If this error persists.
1054 - Unknown column 'currency' in 'field list'

I'm on PHP 7.0 and haven't the foggiest why this is coming up. Same thing happens after I try logging in normally. Any idea what I should do/it could be?

Bountymaker
Newbie
*
Offline Offline

Activity: 25
Merit: 0


View Profile
October 07, 2017, 01:39:35 PM
 #242

 Could you tell me, does it works? Is it safety to use it?
Jope
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
October 07, 2017, 09:28:17 PM
 #243

Could you tell me, does it works? Is it safety to use it?

Yes, I can tell you that is works. I've been using a previous version for 2 years and it has performed extremely well.
HowardF (OP)
Full Member
***
Offline Offline

Activity: 145
Merit: 100

I do Stuff, and stuff.....


View Profile
October 08, 2017, 04:54:43 PM
 #244

Hi HowardF,
I've run into some trouble when upgrading, as in the upgrade button didn't too anything that I could see, the page just refreshed quickly. It may be due to me coming from the deponzit fork (was usinh it for the last 2 years but it just mysteriously stopped working). Thus I decided a clean install from your repo was necessary. I deleted everything, started with new everything. I put in my DB info and on the next page and after I put in my API info and hit next I get:

THERE HAS BEEN A DATABASE ERROR
Please Contact Support If this error persists.
1054 - Unknown column 'currency' in 'field list'

I'm on PHP 7.0 and haven't the foggiest why this is coming up. Same thing happens after I try logging in normally. Any idea what I should do/it could be?



Hmm...  I'm definitely at a bit of a loss here.  I don't use the column 'currency' anywhere.   Are you installing over a build of the deponzit fork?  I know he used a 'currency' row, and leaving any code from that fork in the folder when you install the base MarginBot would definitely break things.  He made changes to the core database layout that would not be compatible.

Jope
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
October 09, 2017, 03:54:23 AM
 #245

Wow, just noticed that even though I replaced all the folders from your master, my bot folder files were the old deponzit ones, not yours! Sorry for the user error! Everything is all set up, thanks anyway for the reply!
SnelleGeld
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
October 13, 2017, 07:32:06 PM
 #246

Note/disclaimer: I have little experience with php programming

I have a domain hosted on which has one subdomain.
On this subdomain i installed MarginBot. When i got to the correct address i noticed the webpage just kept on loading. I checked the server logs and found out they where being flooded with the message:


[Fri Oct 13 20:26:06.405827 2017] [proxy_fcgi:error] [pid XXXXX:tid XXXXXXXXXXXXXXXXXX] [client xx:xx:xx:xx:XXXXXX] AH01071: Got error 'e/XXXX/domains/XXXXX.XX/public_html/marginbot/inc/ExchangeAPIs/bitfinex.php on line 78\nPHP message: PHP Notice: Undefined index: price in /home/XXXXX/domains/XXXXXX.XX/public_html/marginbot/inc/ExchangeAPIs/bitfinex.php on line 78\nPHP


I looked up the file bitfinex.php and went to line 78. Here below is the function that line 78 belongs to:

`    /* Data posting query, for detailed API calls */
    function bitfinex_query($method, array $req = array()) {
        // API settings
      
        $req['request'] = '/v1/'.$method;
        $this->nonceInc += 1;
      $req['nonce'] = (string)$this->nonceInc;
      if($req['price']){$req['price'] = (string)$req['price'];}
      
        // generate the POST data string
        $reqData = base64_encode(json_encode($req, true));
      $post_data = http_build_query($req, '', '&');
      //print_r($post_data);
        $sign = hash_hmac('sha384', $reqData, $this->apiSec);
 
        // generate the extra headers
        $headers = array(
         'X-BFX-APIKEY: '.$this->apiKey,
         'X-BFX-PAYLOAD: '.$reqData,
         'X-BFX-SIGNATURE: '.$sign
        );`


Further information:
-When installed MarginBot i then configured my bitfenix account using the MarginBot webpage gui. (I could still access and use the webpage
-I made a second user account

After the things mentioned above the webpage became unaccesable. I'm guessing i'm making an obvious mistake here which i am sure one of you can assist me with.

Further more an other error popped up in the server logs:

[Fri Oct 13 20:26:23 2017] [proxy_fcgi:error] [pid XXXXX:tid XXXXXXXXXXXXXX] (70007)The timeout specified has expired: [client XX.XXX.XX.XXX:XXXXX] AH01075: Error dispatching request to : (polling)

However i'm betting this is merely the result of endless loading due to timeout

And after a long while it will display :


THERE HAS BEEN A DATABASE ERROR
Please Contact Support If this error persists.
1021 - Disk full (/tmp/#sql_16ed_0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
HowardF (OP)
Full Member
***
Offline Offline

Activity: 145
Merit: 100

I do Stuff, and stuff.....


View Profile
October 14, 2017, 05:14:44 PM
 #247


THERE HAS BEEN A DATABASE ERROR
Please Contact Support If this error persists.
1021 - Disk full (/tmp/#sql_16ed_0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")



Hmm.. this is making me think your sql server doesn't have enough space for queries to run correctly.  I can't imagine marginbot making any queries that would cause this though, all the marginbot tables are relatively tiny.   Are you running something else on this server that does a lot of work on your MySQL server?

HowardF (OP)
Full Member
***
Offline Offline

Activity: 145
Merit: 100

I do Stuff, and stuff.....


View Profile
October 16, 2017, 02:29:33 PM
 #248



[Fri Oct 13 20:26:06.405827 2017] [proxy_fcgi:error] [pid XXXXX:tid XXXXXXXXXXXXXXXXXX] [client xx:xx:xx:xx:XXXXXX] AH01071: Got error 'e/XXXX/domains/XXXXX.XX/public_html/marginbot/inc/ExchangeAPIs/bitfinex.php on line 78\nPHP message: PHP Notice: Undefined index: price in /home/XXXXX/domains/XXXXXX.XX/public_html/marginbot/inc/ExchangeAPIs/bitfinex.php on line 78\nPHP



One other thing, this is just a Notice, so it shouldn't prevent the script from continuing to run.  It actually should be suppressed from hitting the logs, but you probably have error reporting set pretty high in your php configuration.  Still shouldn't cause any issues, its just going to write a lot of notices to the logs.

( I will tweak that line in future builds so that it won't throw a notice even on high error settings. )

mt717
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
October 16, 2017, 08:20:26 PM
 #249

I'm a new user of the MarginBot. So far so good. Many Thanks to HowardF

I need help with some error messages.

I downloaded the latest and set it up again yesterday on 10/15. It shows version 1.08. I'm running on PHP5.6 and MySQL 5.5 on AWS Linux on an EC2 server. I did modify the DB to add NEO as my 14th currency pair and I only left USD, BTC, ETH and NEO as active. The rest I set to zero. Then I set my cron jobs and everything appears to be running. I saw it post two NEO orders, so it is working.

However, I see the following errors over and over in the httpd error_log. Should I be concerned? (not my real IP, obviously).

Every 10 Min Job:
[Mon Oct 16 14:01:08.357984 2017] [:error] [pid 3330] [client 53.2.210.52:34042] PHP Notice:  Undefined property: Bitfinex::$cryptoPendingVal in /var/www/html/bitbot/inc/ExchangeAPIs/bitfinex.php on line 481
[Mon Oct 16 14:01:10.847006 2017] [:error] [pid 3330] [client 53.2.210.52:34042] PHP Notice:  Undefined index: ETH in /var/www/html/bitbot/inc/ExchangeAPIs/bitfinex.php on line 445
[Mon Oct 16 14:01:10.847040 2017] [:error] [pid 3330] [client 53.2.210.52:34042] PHP Notice:  Undefined variable: intReturn in /var/www/html/bitbot/inc/ExchangeAPIs/bitfinex.php on line 446
[Mon Oct 16 14:01:10.847045 2017] [:error] [pid 3330] [client 53.2.210.52:34042] PHP Notice:  Undefined index: ETH in /var/www/html/bitbot/inc/ExchangeAPIs/bitfinex.php on line 446
[Mon Oct 16 14:01:10.847061 2017] [:error] [pid 3330] [client 53.2.210.52:34042] PHP Notice:  Undefined index: BTC in /var/www/html/bitbot/inc/ExchangeAPIs/bitfinex.php on line 445
[Mon Oct 16 14:01:10.847065 2017] [:error] [pid 3330] [client 53.2.210.52:34042] PHP Notice:  Undefined index: BTC in /var/www/html/bitbot/inc/ExchangeAPIs/bitfinex.php on line 446
[Mon Oct 16 14:01:10.847070 2017] [:error] [pid 3330] [client 53.2.210.52:34042] PHP Notice:  Undefined index: USD in /var/www/html/bitbot/inc/ExchangeAPIs/bitfinex.php on line 445
[Mon Oct 16 14:01:10.847073 2017] [:error] [pid 3330] [client 53.2.210.52:34042] PHP Notice:  Undefined index: USD in /var/www/html/bitbot/inc/ExchangeAPIs/bitfinex.php on line 446
[Mon Oct 16 14:01:10.847082 2017] [:error] [pid 3330] [client 53.2.210.52:34042] PHP Notice:  Undefined index: NEO in /var/www/html/bitbot/inc/ExchangeAPIs/bitfinex.php on line 445
[Mon Oct 16 14:01:10.847086 2017] [:error] [pid 3330] [client 53.2.210.52:34042] PHP Notice:  Undefined index: NEO in /var/www/html/bitbot/inc/ExchangeAPIs/bitfinex.php on line 446
[Mon Oct 16 14:01:10.847401 2017] [:error] [pid 3330] [client 53.2.210.52:34042] PHP Notice:  Undefined property: Bitfinex::$cryptoPendingIDS in /var/www/html/bitbot/inc/ExchangeAPIs/bitfinex.php on line 336

Every Hourly Job:
[Mon Oct 16 14:05:02.646020 2017] [:error] [pid 3194] [client 53.2.210.52:34056] PHP Notice:  Undefined property: Bitfinex::$cryptoPendingVal in /var/www/html/bitbot/inc/ExchangeAPIs/bitfinex.php on line 481
[Mon Oct 16 14:05:04.142334 2017] [:error] [pid 3194] [client 53.2.210.52:34056] PHP Notice:  Undefined index: ETH in /var/www/html/bitbot/inc/ExchangeAPIs/bitfinex.php on line 445
[Mon Oct 16 14:05:04.142368 2017] [:error] [pid 3194] [client 53.2.210.52:34056] PHP Notice:  Undefined variable: intReturn in /var/www/html/bitbot/inc/ExchangeAPIs/bitfinex.php on line 446
[Mon Oct 16 14:05:04.142373 2017] [:error] [pid 3194] [client 53.2.210.52:34056] PHP Notice:  Undefined index: ETH in /var/www/html/bitbot/inc/ExchangeAPIs/bitfinex.php on line 446
[Mon Oct 16 14:05:04.142378 2017] [:error] [pid 3194] [client 53.2.210.52:34056] PHP Notice:  Undefined index: BTC in /var/www/html/bitbot/inc/ExchangeAPIs/bitfinex.php on line 445
[Mon Oct 16 14:05:04.142383 2017] [:error] [pid 3194] [client 53.2.210.52:34056] PHP Notice:  Undefined index: BTC in /var/www/html/bitbot/inc/ExchangeAPIs/bitfinex.php on line 446
[Mon Oct 16 14:05:04.142387 2017] [:error] [pid 3194] [client 53.2.210.52:34056] PHP Notice:  Undefined index: USD in /var/www/html/bitbot/inc/ExchangeAPIs/bitfinex.php on line 445
[Mon Oct 16 14:05:04.142391 2017] [:error] [pid 3194] [client 53.2.210.52:34056] PHP Notice:  Undefined index: USD in /var/www/html/bitbot/inc/ExchangeAPIs/bitfinex.php on line 446
[Mon Oct 16 14:05:04.142401 2017] [:error] [pid 3194] [client 53.2.210.52:34056] PHP Notice:  Undefined index: NEO in /var/www/html/bitbot/inc/ExchangeAPIs/bitfinex.php on line 445
[Mon Oct 16 14:05:04.142405 2017] [:error] [pid 3194] [client 53.2.210.52:34056] PHP Notice:  Undefined index: NEO in /var/www/html/bitbot/inc/ExchangeAPIs/bitfinex.php on line 446
[Mon Oct 16 14:05:04.143075 2017] [:error] [pid 3194] [client 53.2.210.52:34056] PHP Notice:  Undefined index: id in /var/www/html/bitbot/inc/ExchangeAPIs/bitfinex.php on line 169
[Mon Oct 16 14:05:04.143163 2017] [:error] [pid 3194] [client 53.2.210.52:34056] PHP Notice:  Undefined index: price in /var/www/html/bitbot/inc/ExchangeAPIs/bitfinex.php on line 78
[Mon Oct 16 14:05:09.563742 2017] [:error] [pid 3194] [client 53.2.210.52:34056] PHP Notice:  Undefined index: price in /var/www/html/bitbot/inc/ExchangeAPIs/bitfinex.php on line 78
[Mon Oct 16 14:05:10.626413 2017] [:error] [pid 3194] [client 53.2.210.52:34056] PHP Notice:  Undefined index: price in /var/www/html/bitbot/inc/ExchangeAPIs/bitfinex.php on line 78
[Mon Oct 16 14:05:15.362886 2017] [:error] [pid 3194] [client 53.2.210.52:34056] PHP Notice:  Undefined index: price in /var/www/html/bitbot/inc/ExchangeAPIs/bitfinex.php on line 78

Thanks in advance for any advice. MT
HowardF (OP)
Full Member
***
Offline Offline

Activity: 145
Merit: 100

I do Stuff, and stuff.....


View Profile
October 17, 2017, 09:27:33 PM
 #250

However, I see the following errors over and over in the httpd error_log. Should I be concerned? (not my real IP, obviously).

Every 10 Min Job:
[Mon Oct 16 14:01:08.357984 2017] [:error] [pid 3330] [client 53.2.210.52:34042] PHP Notice:  Undefined property: Bitfinex::$cryptoPendingVal in /var/www/html/bitbot/inc/ExchangeAPIs/bitfinex.php on line 481
.............

Thanks in advance for any advice. MT


Nothing to be concerned about.  When I added back in Crypto Pairs, I check against a variable that doesn't always have all the possible pairs in an array.  In the next build I will update the check so that it makes sure the pair exists, and if it doesn't it'll fail silently (as it should do now) so that nothing gets logged.  Other than making your logs a bit longer than they should be though, this won't effect the bot at all as it is.

mt717
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
October 19, 2017, 01:41:34 AM
 #251

However, I see the following errors over and over in the httpd error_log. Should I be concerned? (not my real IP, obviously).

Every 10 Min Job:
[Mon Oct 16 14:01:08.357984 2017] [:error] [pid 3330] [client 53.2.210.52:34042] PHP Notice:  Undefined property: Bitfinex::$cryptoPendingVal in /var/www/html/bitbot/inc/ExchangeAPIs/bitfinex.php on line 481
.............

Thanks in advance for any advice. MT


Nothing to be concerned about.  When I added back in Crypto Pairs, I check against a variable that doesn't always have all the possible pairs in an array.  In the next build I will update the check so that it makes sure the pair exists, and if it doesn't it'll fail silently (as it should do now) so that nothing gets logged.  Other than making your logs a bit longer than they should be though, this won't effect the bot at all as it is.


Awesome. Thanks so much for the quick response.
mitao
Newbie
*
Offline Offline

Activity: 27
Merit: 0


View Profile
October 30, 2017, 01:17:42 AM
 #252

Thanks for the awsome bot, it forces me to learn web server and linux from almost 0. And after a few hours, I got my bot running! The only thing I am missing is that I can't get my hourly cron job working somehow. The 10-min cron is working well.

In my "crontab - e", I got one line for the 10-min cron job copied from installation, and next line for the 1-h cron job. But the web server kept giving me "It appears you have not set up the hourly cron, or it hasn't been running. Check to make sure your cronjob contains a job similar to:
5 * * * * wget -qO- xxxxxxxxx/bot/crons/HourlyCron.php >/dev/null 2>&1". xxxxx is my address. It seems all correctly copied as instructed. Any suggestion for a noob?

I think the 10-min cron is doing all the lending, and 1-h cron only for the statistics, right? I think I can live without it.

Thanks,
altOWL
Newbie
*
Offline Offline

Activity: 38
Merit: 0


View Profile
October 30, 2017, 02:45:47 AM
 #253

The altOWL Project
INVEST & WATCH
You can use your POLONIEX OR BITTREX API KEYS
to watch NEWS on BTC and altcoins
manage your Poloniex & Bittrex accounts
trade and see the analytics of your investment.
also you could have a look at our forum.
https://altowl.com
BeastOfBodmin
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
October 30, 2017, 04:48:16 AM
 #254

Any suggestion for a noob?

I think the 10-min cron is doing all the lending, and 1-h cron only for the statistics, right? I think I can live without it.

Thanks,

There is a trailing " on the end of the crontab entry you posted. Should it be there?

Try using the full path to the wget command. The $PATH used by cron can be different than the $PATH you have when logged in.

Look in /var/log/cron to check what is happening.

You should also try running the command on the command line.
mt717
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
October 31, 2017, 01:38:54 AM
 #255

I think the new coin BTG may have broken something. Starting on 10/24 my error logs on v1.08 filled up due to an infinite loop.

[Tue Oct 31 01:04:42.359979 2017] [:error] [pid 3349] [client 52.6.250.144:60840] PHP Warning:  Division by zero in /var/www/html/bitbot/inc/ExchangeAPIs/bitfinex.php on line 374
[Tue Oct 31 01:04:42.360010 2017] [:error] [pid 3349] [client 52.6.250.144:60840] PHP Warning:  Division by zero in /var/www/html/bitbot/inc/ExchangeAPIs/bitfinex.php on line 380

It seems to all start with this issue:
[Tue Oct 31 01:04:42.359667 2017] [:error] [pid 3349] [client 52.6.250.144:60840] PHP Warning:  file_get_contents(https://api.bitfinex.com/v1/lendbook/btg/?limit_asks=500&limit_bids=0): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request\r\n in /var/www/html/bitbot/inc/ExchangeAPIs/bitfinex.php on line 229


Notice the "BTG" in the URL.
https://api.bitfinex.com/v1/lendbook/btg/?limit_asks=500&limit_bids=0

This returns {"message":"Unknown currency"}

Change "btg" to any other coin code and it works fine. It seems the code is pulling back all coins and trying to get the lending book, so when BTG started coming back as a valid coin, it tries to get the ending info and fails.

Any suggestions on a quick fix or maybe a code update?
HowardF (OP)
Full Member
***
Offline Offline

Activity: 145
Merit: 100

I do Stuff, and stuff.....


View Profile
November 01, 2017, 02:46:12 PM
 #256

I think the new coin BTG may have broken something. Starting on 10/24 my error logs on v1.08 filled up due to an infinite loop.
Any suggestions on a quick fix or maybe a code update?

The problem is bitfinex isn't allowing Margin Funding for BitcoinGold yet, only exchange trading.  You can always check the "Funding" dropdown menu for available coins to lend on margin.

mt717
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
November 01, 2017, 03:40:36 PM
 #257

I think the new coin BTG may have broken something. Starting on 10/24 my error logs on v1.08 filled up due to an infinite loop.
Any suggestions on a quick fix or maybe a code update?

The problem is bitfinex isn't allowing Margin Funding for BitcoinGold yet, only exchange trading.  You can always check the "Funding" dropdown menu for available coins to lend on margin.

Thanks for the quick response. Based on your reply, I just realized that the code is trying to get the lendbook on BTG because I have a positive value in my Funding Wallet for BTG. This happened automatically as part of the bitcoin fork. Bitfinex put the BTG coins into the funding wallet automatically because that is where my BTC was I guess. I moved the BTG out of my BTG Funding Wallet to my BTG Exchange Wallet and that made the Bot code stop trying to get the lendbook data for BTG. It seems to be running correctly again. Hopefully this post will help anyone else that hits this problem. Thanks.
HowardF (OP)
Full Member
***
Offline Offline

Activity: 145
Merit: 100

I do Stuff, and stuff.....


View Profile
November 01, 2017, 03:43:36 PM
 #258

I think the new coin BTG may have broken something. Starting on 10/24 my error logs on v1.08 filled up due to an infinite loop.
Any suggestions on a quick fix or maybe a code update?

The problem is bitfinex isn't allowing Margin Funding for BitcoinGold yet, only exchange trading.  You can always check the "Funding" dropdown menu for available coins to lend on margin.

Thanks for the quick response. Based on your reply, I just realized that the code is trying to get the lendbook on BTG because I have a positive value in my Funding Wallet for BTG. This happened automatically as part of the bitcoin fork. Bitfinex put the BTG coins into the funding wallet automatically because that is where my BTC was I guess. I moved the BTG out of my BTG Funding Wallet to my BTG Exchange Wallet and that made the Bot code stop trying to get the lendbook data for BTG. It seems to be running correctly again. Hopefully this post will help anyone else that hits this problem. Thanks.

Ahh, yeah that would make sense.  Never considered the funding wallet would have a coin in it that can't be lent.  I'll try to trap for that better in a future build, but for now, just transferring those coins to another wallet will fix it.

cryptoassetmgmt
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
November 02, 2017, 01:18:07 PM
 #259

Hello, I just installed last version and I found a strange thing in the graphical view of USD return.
My USD balance is more than 10k ( in the funding settings page it shows correct amount) but in the graph it stop right axis to 10k.
is there a way to fix it?

thanks !



M.

link to screenshot :
https://ibb.co/iWEGYG

rxone
Member
**
Offline Offline

Activity: 98
Merit: 10


View Profile
November 02, 2017, 05:10:09 PM
 #260

Very interesting project!

Can you elaborate a bit on what algorithm the bot uses to determine the lending rate at which it will put the offer?
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 [13] 14 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!