Fix account in autotrader; prevent writing warning to stderr.

This commit is contained in:
2024-08-21 14:57:02 -05:00
parent ef28aa59e5
commit 7f3e1d74bb
2 changed files with 4 additions and 2 deletions

View File

@@ -94,7 +94,7 @@ read
./getNewAccessToken.sh
curl -s -X POST \
'https://api.schwabapi.com/trader/v1/accounts/5A5B921917D97B89FDA53E1E1D13D2EB11E488ADA20A20B3C787477DE59A770E/orders' \
'https://api.schwabapi.com/trader/v1/accounts/CEF970366D4CC9553B5E8846E35FD92A1867F3E73C1082A52647256F42E4746B/orders' \
-H "Authorization: Bearer $(<access_token.dat)" \
-H 'accept: */*' \
-H 'Content-Type: application/json' \

View File

@@ -34,7 +34,9 @@ symbolCheck=$(jq -r ${jqQuery} < temp/optionChain.${symbol}.tmp.$$.json)
if [[ "${symbol}" != "${symbolCheck}" ]]; then
errMsg="ERROR: THE RESPONSE IS INCORRECT! Symbol: _${symbol}_ Check: _${symbolCheck}_ check file _temp/optionChain.${symbol}.tmp.$$.json_"
systemd-cat -t "`basename $0` $1" -p ${ErrorLogLevel} <<< ${errMsg}
>&2 echo "${errMsg}"
if [[ "${ErrorLogLevel}" == "err" ]]; then
>&2 echo "${errMsg}"
fi
exit 2
else
optionChainFileName=$(date "+%Y-%m-%d %H_%M_%S")_optionChain.${symbol}.json