change the access token to be cached
This commit is contained in:
@@ -2,9 +2,7 @@
|
||||
#set -x
|
||||
mkdir -p temp
|
||||
|
||||
./getNewAccessToken.sh
|
||||
|
||||
tempFile=temp/accountPositions.tmp.$$.json
|
||||
curl -s -X GET "https://api.schwabapi.com/trader/v1/accounts/?fields=positions" -H "Authorization: Bearer $(<access_token.dat)" > ${tempFile}
|
||||
curl -s -X GET "https://api.schwabapi.com/trader/v1/accounts/?fields=positions" -H "Authorization: Bearer $(./getNewAccessToken.sh)" > ${tempFile}
|
||||
jq -e '{ accountNumber:.[].securitiesAccount.accountNumber, positions:.[].securitiesAccount.positions}' < ${tempFile}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user