diff --git a/autoTradeQQQLongCall.sh b/autoTradeQQQLongCall.sh index 8c4012c..37a21dc 100755 --- a/autoTradeQQQLongCall.sh +++ b/autoTradeQQQLongCall.sh @@ -44,7 +44,7 @@ longSymbol=$(jq -r '.symbol' < temp/longLeg.json) log "Long Symbol: _${longSymbol}_ Strike: _${longStrike}_ Bid: _${longBid}_ Ask: _${longAsk}_" info #Check if this order has already been submitted. -./getOrders.sh | grep '\(WORKING\|FILLED\),'${longSymbolC:0:12} > temp/existingOrders.$$ +./getOrders.sh | grep '\(WORKING\|FILLED\),'"${longSymbol:0:12}" > temp/existingOrders.$$ if [[ $(wc -l < temp/existingOrders.$$) -eq 0 ]];then log "Not Yet traded, continuing" info else diff --git a/autoTradeSPX_IB_1DTE.sh b/autoTradeSPX_IB_1DTE.sh index eee3dad..adb2b5e 100755 --- a/autoTradeSPX_IB_1DTE.sh +++ b/autoTradeSPX_IB_1DTE.sh @@ -74,7 +74,7 @@ priceOffset=0.00 # try to get a little better price # 2) Round to the Coloses full number # 3) Divide by 20 priceOpen=$(echo "scale=2; exact=((${shortBidC}+${shortAskC})/2) + ((${shortBidP}+${shortAskP})/2) - ((${longBidC}+${longAskC})/2) - ((${longBidP}+${longAskP})/2) + ${priceOffset}; scale=0; round5=exact*20/1; scale=2; round5/20" | bc) -priceOpen=4.80 # All nice calculating a price, but I want those to be filled and reasonably, they will (hopefully) be filled at 475 +priceOpen=4.75 # All nice calculating a price, but I want those to be filled and reasonably, they will (hopefully) be filled at 475 orderJson=$(jq -c <<-EOM { diff --git a/autoTradeSPYLongCall.sh b/autoTradeSPYLongCall.sh index 106c7a3..eff92a7 100755 --- a/autoTradeSPYLongCall.sh +++ b/autoTradeSPYLongCall.sh @@ -49,7 +49,7 @@ longSymbol=$(jq -r '.symbol' < temp/longLeg.json) log "Long Symbol: _${longSymbol}_ Strike: _${longStrike}_ Bid: _${longBid}_ Ask: _${longAsk}_" info #Check if this order has already been submitted. -./getOrders.sh | grep '\(WORKING\|FILLED\),'${longSymbolC:0:12} > temp/existingOrders.$$ +./getOrders.sh | grep '\(WORKING\|FILLED\),'"${longSymbol:0:12}" > temp/existingOrders.$$ if [[ $(wc -l < temp/existingOrders.$$) -eq 0 ]];then log "Not Yet traded, continuing" info else diff --git a/getNewAccessToken.sh b/getNewAccessToken.sh index d07d236..8ba2e47 100755 --- a/getNewAccessToken.sh +++ b/getNewAccessToken.sh @@ -12,7 +12,7 @@ if [[ ${ageInSec} -gt 600 ]]; then -d "grant_type=refresh_token&refresh_token=$( temp/accessTokenReqResp.$$.json jq -e -r .access_token temp/accessTokenReqResp.$$.json > access_token.dat if [[ $? -ne 0 ]]; then - curl -d "" -X POST "https://deadswitch.kawomi.com/api/v1?topic=trade.schwab.error.getNewAccessToken&secs=1&email=joe@kawomi.com" + curl -s -d "" -X POST "https://deadswitch.kawomi.com/api/v1?topic=trade.schwab.error.getNewAccessToken&secs=1&email=joerg.tretter@gmail.com" throw "ERROR: GETTING THE ACCESS TOKEN FAILED! $(