mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
update setup grid script
This commit is contained in:
parent
82fe20fbba
commit
0b5f1a99b3
|
@ -25,6 +25,14 @@ osf=$(uname | tr '[:upper:]' '[:lower:]')
|
|||
arch=amd64
|
||||
version=v1.21.1
|
||||
dist_file=bbgo-$version-$osf-$arch.tar.gz
|
||||
exchange=max
|
||||
|
||||
if [[ -n $1 ]] ; then
|
||||
exchange=$1
|
||||
fi
|
||||
|
||||
exchange_upper=$(echo -n $exchange | tr 'a-z' 'A-Z')
|
||||
|
||||
|
||||
info "downloading..."
|
||||
curl -O -L https://github.com/c9s/bbgo/releases/download/$version/$dist_file
|
||||
|
@ -35,12 +43,12 @@ info "downloaded successfully"
|
|||
|
||||
function gen_dotenv()
|
||||
{
|
||||
read -p "Enter your MAX API key: " api_key
|
||||
read -p "Enter your MAX API secret: " api_secret
|
||||
read -p "Enter your $exchange_upper API key: " api_key
|
||||
read -p "Enter your $exchange_upper API secret: " api_secret
|
||||
info "generating your .env.local file..."
|
||||
cat <<END > .env.local
|
||||
MAX_API_KEY=$api_key
|
||||
MAX_API_SECRET=$api_secret
|
||||
${exchange_upper}_API_KEY=$api_key
|
||||
${exchange_upper}_API_SECRET=$api_secret
|
||||
END
|
||||
|
||||
info "dotenv is configured successfully"
|
||||
|
@ -68,7 +76,7 @@ fi
|
|||
cat <<END > bbgo.yaml
|
||||
---
|
||||
exchangeStrategies:
|
||||
- on: max
|
||||
- on: ${exchange}
|
||||
grid:
|
||||
symbol: BTCUSDT
|
||||
quantity: 0.001
|
||||
|
|
Loading…
Reference in New Issue
Block a user