36 lines
987 B
Bash
Executable File
36 lines
987 B
Bash
Executable File
#!/bin/bash
|
|
#set -x
|
|
|
|
systemd-cat -t "$0" -p info <<< "Started"
|
|
|
|
./getNewAccessToken.sh
|
|
|
|
jq -r '.[].Symbol' allSymbols.json | sort | while read theSymbol; do
|
|
# I am not interested in detail quotes at the moment
|
|
#./recordQuoteSingleSymbolSingleRun.sh ${theSymbol}
|
|
#if [[ $? -ne 0 ]]; then
|
|
# touch temp/hadErrors.$$.tmp
|
|
#fi
|
|
|
|
if [[ '$XSP' = ${theSymbol} ]]; then
|
|
./recordOptionChainSingleSymbolSpecialRun.sh ${theSymbol}
|
|
else
|
|
./recordOptionChainSingleSymbolSingleRun.sh ${theSymbol}
|
|
if [[ $? -ne 0 ]]; then
|
|
touch temp/hadErrors.$$.tmp
|
|
|
|
# Working around error in $XSP with special handling
|
|
# if [[ '$XSP' != ${theSymbol} ]]; then
|
|
# touch temp/hadErrors.$$.tmp
|
|
# fi
|
|
fi
|
|
fi
|
|
done
|
|
|
|
if [[ -e temp/hadErrors.$$.tmp ]]; then
|
|
rm temp/hadErrors.$$.tmp
|
|
curl -d "" -X POST "https://deadswitch.kawomi.com/api/v1?topic=trade.schwab.error.recordAllSymbolsSingleRun&secs=1&email=joe@kawomi.com"
|
|
fi
|
|
|
|
systemd-cat -t "$0" -p info <<< "Finished"
|