Get access token before execute auto-trading.

This commit is contained in:
2024-08-31 15:57:46 -05:00
parent e0be7c1889
commit 1b94d1d8dc
5 changed files with 10 additions and 12 deletions

View File

@@ -3,6 +3,8 @@ set -x
IFS=$'\0'
. helpers.sh
./getNewAccessToken.sh
daysOutMin=90
daysOutMax=95
@@ -89,8 +91,6 @@ if [[ "${noconfirm}" != "true" ]]; then
read
fi
./getNewAccessToken.sh
echo curl -s -X POST \
"https://api.schwabapi.com/trader/v1/accounts/$(./getAccountNumbers.sh Roth)/orders" \
-H "Authorization: Bearer $(<access_token.dat)" \