From b89f05603f0dba67950c2c1bd54d4dd71780f014 Mon Sep 17 00:00:00 2001 From: c9s Date: Sat, 13 Mar 2021 19:42:07 +0800 Subject: [PATCH] update installer script --- scripts/setup-grid.sh | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/scripts/setup-grid.sh b/scripts/setup-grid.sh index 2347f1f9a..e86628e48 100755 --- a/scripts/setup-grid.sh +++ b/scripts/setup-grid.sh @@ -1,11 +1,14 @@ #!/bin/bash osf=$(uname | tr '[:upper:]' '[:lower:]') -version=v1.6.0 +version=v1.13.0 +dist_file=bbgo-$version-$osf-amd64.tar.gz -echo "Downloading bbgo" -curl -L -o bbgo https://github.com/c9s/bbgo/releases/download/$version/bbgo-$osf +echo "downloading..." +curl -L https://github.com/c9s/bbgo/releases/download/$version/$dist_file +tar xzf $dist_file +mv bbgo-darwin bbgo chmod +x bbgo -echo "Binary downloaded" +echo "downloaded" function gen_dotenv() { @@ -13,8 +16,8 @@ function gen_dotenv() read -p "Enter your MAX API secret: " api_secret echo "Generating your .env.local file..." cat < .env.local -export MAX_API_KEY=$api_key -export MAX_API_SECRET=$api_secret +MAX_API_KEY=$api_key +MAX_API_SECRET=$api_secret END } @@ -57,11 +60,13 @@ exchangeStrategies: - on: max grid: symbol: BTCUSDT - quantity: 0.002 + quantity: 0.001 gridNumber: 100 - profitSpread: 50.0 - upperPrice: 14000.0 - lowerPrice: 11000.0 + profitSpread: 100.0 + upperPrice: 50_000.0 + lowerPrice: 10_000.0 + long: true + END echo "Config file is generated" @@ -77,7 +82,7 @@ fi echo "To run bbgo just type: " echo "" -echo " source .env.local && ./bbgo run --config bbgo.yaml" +echo " ./bbgo run" echo "" echo "To stop bbgo, just hit CTRL-C"