fix the already traded detection in the long calls auto trading
This commit is contained in:
@@ -44,7 +44,7 @@ longSymbol=$(jq -r '.symbol' < temp/longLeg.json)
|
|||||||
log "Long Symbol: _${longSymbol}_ Strike: _${longStrike}_ Bid: _${longBid}_ Ask: _${longAsk}_" info
|
log "Long Symbol: _${longSymbol}_ Strike: _${longStrike}_ Bid: _${longBid}_ Ask: _${longAsk}_" info
|
||||||
|
|
||||||
#Check if this order has already been submitted.
|
#Check if this order has already been submitted.
|
||||||
./getOrders.sh | grep '\(WORKING\|FILLED\),'${longSymbol} > temp/existingOrders.$$
|
./getOrders.sh | grep '\(WORKING\|FILLED\),'${longSymbolC:0:12} > temp/existingOrders.$$
|
||||||
if [[ $(wc -l < temp/existingOrders.$$) -eq 0 ]];then
|
if [[ $(wc -l < temp/existingOrders.$$) -eq 0 ]];then
|
||||||
log "Not Yet traded, continuing" info
|
log "Not Yet traded, continuing" info
|
||||||
else
|
else
|
||||||
@@ -91,3 +91,4 @@ curl -s -X POST \
|
|||||||
-H 'Content-Type: application/json' \
|
-H 'Content-Type: application/json' \
|
||||||
-d "${orderJson}"
|
-d "${orderJson}"
|
||||||
|
|
||||||
|
log "Result: _$?_" debug
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ longSymbol=$(jq -r '.symbol' < temp/longLeg.json)
|
|||||||
log "Long Symbol: _${longSymbol}_ Strike: _${longStrike}_ Bid: _${longBid}_ Ask: _${longAsk}_" info
|
log "Long Symbol: _${longSymbol}_ Strike: _${longStrike}_ Bid: _${longBid}_ Ask: _${longAsk}_" info
|
||||||
|
|
||||||
#Check if this order has already been submitted.
|
#Check if this order has already been submitted.
|
||||||
./getOrders.sh | grep '\(WORKING\|FILLED\),'${longSymbol} > temp/existingOrders.$$
|
./getOrders.sh | grep '\(WORKING\|FILLED\),'${longSymbolC:0:12} > temp/existingOrders.$$
|
||||||
if [[ $(wc -l < temp/existingOrders.$$) -eq 0 ]];then
|
if [[ $(wc -l < temp/existingOrders.$$) -eq 0 ]];then
|
||||||
log "Not Yet traded, continuing" info
|
log "Not Yet traded, continuing" info
|
||||||
else
|
else
|
||||||
@@ -96,3 +96,4 @@ curl -s -X POST \
|
|||||||
-H 'Content-Type: application/json' \
|
-H 'Content-Type: application/json' \
|
||||||
-d "${orderJson}"
|
-d "${orderJson}"
|
||||||
|
|
||||||
|
log "Result: _$?_" debug
|
||||||
|
|||||||
Reference in New Issue
Block a user