Initial checkin

This commit is contained in:
Joe Tretter
2024-05-09 15:29:45 -05:00
commit 3addfb992e
9 changed files with 368 additions and 0 deletions

35
recordAllSymbolsSingleRun.sh Executable file
View File

@@ -0,0 +1,35 @@
#!/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"