Introduce mnemonic account name resolution in getAccountNumbers

This commit is contained in:
2024-08-26 21:44:43 -05:00
parent 5535bdae7f
commit d8891ec75f
8 changed files with 42 additions and 21 deletions

View File

@@ -9,7 +9,7 @@ if [[ ${marketOpen} == false ]]; then
errMsg="The market is closed, exiting."
systemd-cat -t "`basename $0` $1" -p info <<< ${errMsg}
>&2 echo "${errMsg}"
# exit 2
exit 2
fi
inputFile="$1"
@@ -152,9 +152,9 @@ fi
curl -s -X POST \
'https://api.schwabapi.com/trader/v1/accounts/C819AC820A502BA92E55D775B22BDF0E1BC91D86C62685714347734A5827CCB3/orders' \
-H "Authorization: Bearer $(<access_token.dat)" \
"https://api.schwabapi.com/trader/v1/accounts/$(./getAccountNumbers.sh Regular)/orders" \
-H "Authorization: Bearer $(<access_token.dat)" \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-d "${orderJson}"
-d "${orderJson}"