Skip to content

Conversation

@claytondukes
Copy link

Added more error checking as well as some minor "auto-configure" based on the user input of initial BTC investment.

Copy link
Owner

@cryptoeax cryptoeax left a 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."
Copy link
Owner

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?

Copy link
Author

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
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'buffer' BTC?

Copy link
Author

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

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
Copy link
Owner

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!

Copy link
Author

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
Copy link
Owner

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.

Copy link
Author

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"
Copy link
Owner

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.

Copy link
Author

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.

@claytondukes
Copy link
Author

@cryptoeax - it's worth noting that not everyone will want to run docker, so there is still a good reason to keep this script :)

@cryptoeax
Copy link
Owner

@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.

@scysys
Copy link

scysys commented Feb 22, 2018

Think about it. As @claytondukes says. Docker is no option for everyone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants