Get access token before execute auto-trading.
This commit is contained in:
@@ -4,6 +4,8 @@ IFS=$'\0'
|
||||
|
||||
. helpers.sh
|
||||
|
||||
./getNewAccessToken.sh
|
||||
|
||||
daysOutMin=90
|
||||
daysOutMax=91
|
||||
deltaMin=0.35
|
||||
@@ -84,8 +86,6 @@ if [[ "${noconfirm}" != "true" ]]; then
|
||||
read
|
||||
fi
|
||||
|
||||
./getNewAccessToken.sh
|
||||
|
||||
curl -s -X POST \
|
||||
"https://api.schwabapi.com/trader/v1/accounts/$(./getAccountNumbers.sh IRA)/orders" \
|
||||
-H "Authorization: Bearer $(<access_token.dat)" \
|
||||
|
||||
Reference in New Issue
Block a user