Fix account in autotrader; prevent writing warning to stderr.
This commit is contained in:
@@ -94,7 +94,7 @@ read
|
|||||||
./getNewAccessToken.sh
|
./getNewAccessToken.sh
|
||||||
|
|
||||||
curl -s -X POST \
|
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 "Authorization: Bearer $(<access_token.dat)" \
|
||||||
-H 'accept: */*' \
|
-H 'accept: */*' \
|
||||||
-H 'Content-Type: application/json' \
|
-H 'Content-Type: application/json' \
|
||||||
|
|||||||
@@ -34,7 +34,9 @@ symbolCheck=$(jq -r ${jqQuery} < temp/optionChain.${symbol}.tmp.$$.json)
|
|||||||
if [[ "${symbol}" != "${symbolCheck}" ]]; then
|
if [[ "${symbol}" != "${symbolCheck}" ]]; then
|
||||||
errMsg="ERROR: THE RESPONSE IS INCORRECT! Symbol: _${symbol}_ Check: _${symbolCheck}_ check file _temp/optionChain.${symbol}.tmp.$$.json_"
|
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}
|
systemd-cat -t "`basename $0` $1" -p ${ErrorLogLevel} <<< ${errMsg}
|
||||||
>&2 echo "${errMsg}"
|
if [[ "${ErrorLogLevel}" == "err" ]]; then
|
||||||
|
>&2 echo "${errMsg}"
|
||||||
|
fi
|
||||||
exit 2
|
exit 2
|
||||||
else
|
else
|
||||||
optionChainFileName=$(date "+%Y-%m-%d %H_%M_%S")_optionChain.${symbol}.json
|
optionChainFileName=$(date "+%Y-%m-%d %H_%M_%S")_optionChain.${symbol}.json
|
||||||
|
|||||||
Reference in New Issue
Block a user