-
Notifications
You must be signed in to change notification settings - Fork 74
Enhanced the Ubuntu installer script #122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: production
Are you sure you want to change the base?
Conversation
cryptoeax
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
Firstly the installer script is going away with the dockerization branch, so this PR is soon to be obsolete... And there are a few mistakes in the code below. I think it's generally a bad idea to give users advice like this which may be incomplete and inaccurate. For example, it's not really true that 0.39BTC isn't enough to take advantage of arbitrage opportunities, there is a lot that can be done in the bot by tuning it carefully that isn't dependent of your portfolio size.
I have been thinking of a better way to organize information about the various configurations that have worked for various users, as I think it would be valuable if we can organize that into a set of easily browsable config settings and information associated with them so that people can study them and pick their own settings. I have been thinking of using the Github wikis for this purpose.
What do you think?
| echo "Important note:" | ||
| echo "In order to realize profit, it is highly recommended that a minimum of 0.4 BTC be used for this bot." | ||
| echo "For example, with 0.4 BTC, you can assign 0.2 BTC to the 'autobuy_funds' while still keeping at least 0.1 - 0.2 BTC at the exchange so that the bot has enough 'buffer' for trades." | ||
| echo "The higher the amount, the more coins can be bought, and the more arbitrage-opportunities can be taken." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious where these values are coming from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From #30
|
|
||
| read -p "Please enter the TOTAL amount of BTC you plan to use: " -e BTC | ||
| if [[ $(echo "$BTC>=0.4" | bc -l) -gt 0 ]]; then | ||
| read -p "Please enter the amount of 'buffer' BTC to keep at the exchanges for trades: " -e EXCH_BUFFER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'buffer' BTC?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I could use a better word here? Buffer: having enough BTC available for autobuy
contrib/Ubuntu16/installer
Outdated
| fi | ||
| read -n 1 -p "Setting Autobuy to ${AUTOBUY} BTC, ok to proceed? (y/n)? " yesno | ||
| if [[ "${yesno}" == "y" ]]; then | ||
| mysql -u root -p"${ROOTPASS}" arbitrage -e "UPDATE stats SET value = '0.2' WHERE keyy = 'autobuy_funds'" > /dev/null 2>&1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are setting the autobuy_funds to 0.2 no matter what the user has entered!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops. ty!
| if [[ "${yesno}" == "y" ]]; then | ||
| mysql -u root -p"${ROOTPASS}" arbitrage -e "UPDATE stats SET value = '0.2' WHERE keyy = 'autobuy_funds'" > /dev/null 2>&1 | ||
| echo | ||
| grep -q 'profit-limit = 1.0' config.ini && perl -i -pe "s/profit-limit = 1\.0/profit-limit = ${BTC}/" config.ini |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You haven't accounted for 1.001, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'profit-limit = 1.0' is an exact match. So the perl replace would only change it if it's that exact string. (I don't want to overwrite if someone else changed it already).
| echo "!!! Change '0.n' to your desired amount, such as '0.2'" | ||
| fi | ||
| else | ||
| echo "$BTC BTC is not enough to really take advantage of arbitrage opportunities" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some users seem to have other experiences, FWIW.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'm just using what I found in both tickets here and comments on gitter.
|
@cryptoeax - it's worth noting that not everyone will want to run docker, so there is still a good reason to keep this script :) |
That won't be an option after #113 I'm afraid. |
|
Think about it. As @claytondukes says. Docker is no option for everyone. |
Added more error checking as well as some minor "auto-configure" based on the user input of initial BTC investment.