-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the tasty-api wiki!
Making notes for myself...
GitHub Wiki uses master
as the default branch and it doesn't look like you can change it. That was a fun waste of time
-
During development and testing I'm going to hardcode the 1Password references in code. That could change to a config file later, but it's not worth the effort right now.
-
Create a vault in your 1Password account with the following items:
| Value | 1Password location | Purpose | | sbx login username | "op://SBX/Tasty_sbx/username" | initial login | | sbx login password | "op://SBX/Tasty_sbx/credential" | initial login| | sbx api username | "op://SBX/tastytrade-sbx-api/username" | api calls | | sbx api credential | "op://SBX/tastytrade-sbx-api/credential" | api calls |
- The initial login gets the session token that are used to authenticate the subsequent API calls
You'll start out with a sandbox account to interact with, and then at somepoint you'll work with your live account (prod
).
- I do need a place to hold the value for the environment:
sbx
orprod
. That's because this code runs a new session each time it's called. The environment value will be reset on thetasty logout
command and it defaults tosbx
for safety reasons. - Switching to the
prod
environment is done on logintasty login --prod
- Many of the API commands use the account number as an argument, so Iam making a command that you can use to set the account number once.
- The account number also needs to be stored outside the program for the same reason as the environment data.