Code Monkey home page Code Monkey logo

marginbot's People

Contributors

bartbroere avatar dargolf avatar dorque avatar hfenter avatar ultragtx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

marginbot's Issues

/Install.php does not work

I follow the installation, no issues with creating tables, when I proceed with creating local user account with BFX keys it results the next page as error 500, when I after go to login I get the following:

Your Session Has Expired, Please Log In Again
×CloseIt 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- http://XXX.XXX.XXX.XXX//crons/HourlyCron.php >/dev/null 2>&1
×CloseIt appears you have not set up the 10 minute cron, or it hasn't been running. Check to make sure your cronjob contains a job similar to:
01,11,21,31,41,51 * * * * wget -qO- http://XXX.XXX.XXX.XXX//crons/TenMinuteCron.php >/dev/null 2>&1

PHP parse error

I'm trying to do an install in Ubuntu 14.04 64bit and getting a whitescreen when I access install.php. This is the error that is being generated.

[:error] [pid 1436] [client 117.245.7.126:52984] PHP Parse error: syntax error, unexpected ''America/Los_Angeles');' (T_CONSTANT_ENCAPSED_STRING), expecting identifier (T_STRING) in /var/www/html/install.php on line 80

Any ideas?

Cancelled loans can take a while to show up in available funds

This occasionally causes the bot to avoid offering some funds for loan until the next cron run.

I mostly fixed this by removing the use of bitfinex_getDepositBalance in bitfinex_getMyLendRates and instead hoisting it + a sleep to bitfinex_updateMyLends.

//  Step 1 - Cancel Pending Loans to return cash to available pool
//  this will loop through all currency types
$this->bitfinex_cancelPendingLoans();

// since we just canceled some loans we need to update this. Give a few secs to let the cancellations go through... seen delays in the past!
sleep(10);
$this->bitfinex_getDepositBalance();

PHP 4 style constructors not compatible with PHP 7+

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Database has a deprecated constructor in /home3/.../inc/database.php on line 2

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; PasswordHash has a deprecated constructor in /home3/.../inc/PasswordHash.php on line 27

I humbly submit a patch for README.md

As I can't create branches/ pull requests, etc.

$ git diff README.md
diff --git a/README.md b/README.md
index 2102095..475930b 100644
--- a/README.md
+++ b/README.md
@@ -43,6 +43,10 @@ If you don't have a bitfinex account, please consider using my [affiliate code](

https://www.bitfinex.com/?refcode=vsAnxuo5bM.

+## Project Development Thread on Bitointalk
+
+MarginBot - A Bitfinex Margin Lending Management Bot
+

Donations

Developing this software, and testing the various strategies for lending that led to its development have taken significant time and effort. If you find this software useful, please send a small donation our way. All donations support the continued development of this software, and help to cover my distribution and support costs.

Trap better for low balance accounts

Accounts with less than $50 in them will not work, but won't show any error. I need to trap for this and let users know they need to put more in their account.

" PHP Notice: Undefined index: price" error causes an unaccesable webpage

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.