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

@@ -18,7 +18,5 @@ done
echo $fromEnteredTime
./getNewAccessToken.sh
curl -s -X GET "https://api.schwabapi.com/trader/v1/orders?fromEnteredTime=${fromEnteredTime}&toEnteredTime=${toEnteredTime}" -H "Authorization: Bearer $(<access_token.dat)" > ${tempFile}
curl -s -X GET "https://api.schwabapi.com/trader/v1/orders?fromEnteredTime=${fromEnteredTime}&toEnteredTime=${toEnteredTime}" -H "Authorization: Bearer $(./getNewAccessToken.sh)" > ${tempFile}
jq -r '.[] | [.orderId | tostring][0] + "," + .status + "," + .orderLegCollection[].instrument.symbol' < ${tempFile}