change the access token to be cached
This commit is contained in:
@@ -4,7 +4,7 @@ mkdir -p temp
|
||||
|
||||
tempFile=temp/accountNumbers.tmp.$$.json
|
||||
tempFlatFile=temp/accountNumbers.flat.$$.tsv
|
||||
curl -s -X GET "https://api.schwabapi.com/trader/v1/accounts/accountNumbers" -H "Authorization: Bearer $(<access_token.dat)" > ${tempFile}
|
||||
curl -s -X GET "https://api.schwabapi.com/trader/v1/accounts/accountNumbers" -H "Authorization: Bearer $(./getNewAccessToken.sh)" > ${tempFile}
|
||||
(jq -r '.[] | [.accountNumber, .hashValue ] | @tsv' < ${tempFile} | while read accNo accHash; do
|
||||
read accInfo <<< $(grep ${accNo} accountNumberNameMapping.dat; echo ${accNo})
|
||||
echo ${accInfo} ${accHash}
|
||||
|
||||
Reference in New Issue
Block a user