change the access token to be cached

This commit is contained in:
2024-09-03 10:32:56 -05:00
parent 1b94d1d8dc
commit bd682f670f
15 changed files with 29 additions and 40 deletions

View File

@@ -4,9 +4,7 @@ IFS=$'\0'
. helpers.sh
./getNewAccessToken.sh
daysOutMin=90
daysOutMin=87
daysOutMax=91
deltaMin=0.35
deltaMax=0.40
@@ -88,7 +86,7 @@ fi
curl -s -X POST \
"https://api.schwabapi.com/trader/v1/accounts/$(./getAccountNumbers.sh IRA)/orders" \
-H "Authorization: Bearer $(<access_token.dat)" \
-H "Authorization: Bearer $(./getNewAccessToken.sh)" \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-d "${orderJson}"