mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 06:53:52 +00:00
update installer script
This commit is contained in:
parent
7dd67a8725
commit
b89f05603f
|
@ -1,11 +1,14 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
osf=$(uname | tr '[:upper:]' '[:lower:]')
|
osf=$(uname | tr '[:upper:]' '[:lower:]')
|
||||||
version=v1.6.0
|
version=v1.13.0
|
||||||
|
dist_file=bbgo-$version-$osf-amd64.tar.gz
|
||||||
|
|
||||||
echo "Downloading bbgo"
|
echo "downloading..."
|
||||||
curl -L -o bbgo https://github.com/c9s/bbgo/releases/download/$version/bbgo-$osf
|
curl -L https://github.com/c9s/bbgo/releases/download/$version/$dist_file
|
||||||
|
tar xzf $dist_file
|
||||||
|
mv bbgo-darwin bbgo
|
||||||
chmod +x bbgo
|
chmod +x bbgo
|
||||||
echo "Binary downloaded"
|
echo "downloaded"
|
||||||
|
|
||||||
function gen_dotenv()
|
function gen_dotenv()
|
||||||
{
|
{
|
||||||
|
@ -13,8 +16,8 @@ function gen_dotenv()
|
||||||
read -p "Enter your MAX API secret: " api_secret
|
read -p "Enter your MAX API secret: " api_secret
|
||||||
echo "Generating your .env.local file..."
|
echo "Generating your .env.local file..."
|
||||||
cat <<END > .env.local
|
cat <<END > .env.local
|
||||||
export MAX_API_KEY=$api_key
|
MAX_API_KEY=$api_key
|
||||||
export MAX_API_SECRET=$api_secret
|
MAX_API_SECRET=$api_secret
|
||||||
END
|
END
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -57,11 +60,13 @@ exchangeStrategies:
|
||||||
- on: max
|
- on: max
|
||||||
grid:
|
grid:
|
||||||
symbol: BTCUSDT
|
symbol: BTCUSDT
|
||||||
quantity: 0.002
|
quantity: 0.001
|
||||||
gridNumber: 100
|
gridNumber: 100
|
||||||
profitSpread: 50.0
|
profitSpread: 100.0
|
||||||
upperPrice: 14000.0
|
upperPrice: 50_000.0
|
||||||
lowerPrice: 11000.0
|
lowerPrice: 10_000.0
|
||||||
|
long: true
|
||||||
|
|
||||||
END
|
END
|
||||||
|
|
||||||
echo "Config file is generated"
|
echo "Config file is generated"
|
||||||
|
@ -77,7 +82,7 @@ fi
|
||||||
|
|
||||||
echo "To run bbgo just type: "
|
echo "To run bbgo just type: "
|
||||||
echo ""
|
echo ""
|
||||||
echo " source .env.local && ./bbgo run --config bbgo.yaml"
|
echo " ./bbgo run"
|
||||||
echo ""
|
echo ""
|
||||||
echo "To stop bbgo, just hit CTRL-C"
|
echo "To stop bbgo, just hit CTRL-C"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user