- Fix SPX auto trading by differntiation of SPX and SPWX
- Prevent destruciton of the refresh token when things go wrong - add auto trading wip code for order getting, and long trading - add recording of 90 days out expiration tracking - Add TSLA
This commit is contained in:
13
getOrders.sh
Executable file
13
getOrders.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
set -x
|
||||
mkdir -p temp
|
||||
|
||||
./getNewAccessToken.sh
|
||||
|
||||
tempFile=temp/accountOrders.tmp.$$.json
|
||||
#fromEnteredTime=$(date -u "+%Y-%m-%dT%H:%M:%S.000Z" -d "-5 days")
|
||||
fromEnteredTime=$(date -u "+%Y-%m-%dT%H:%M:%S.000Z" -d "-1000 minutes")
|
||||
toEnteredTime=$(date -u "+%Y-%m-%dT%H:%M:%S.000Z" -d "-10 minutes")
|
||||
curl -s -X GET "https://api.schwabapi.com/trader/v1/orders?fromEnteredTime=${fromEnteredTime}&toEnteredTime=${toEnteredTime}" -H "Authorization: Bearer $(<access_token.dat)" > ${tempFile}
|
||||
cat ${tempFile} | jq -r 'map(.enteredTime)[]'
|
||||
|
||||
Reference in New Issue
Block a user