Skip to content
beckitrue edited this page Dec 27, 2023 · 9 revisions

Welcome to the tasty-api wiki!

Notes

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

Setting the 1Password Secret Refs

  • 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

Setting the enviroment

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 or prod. That's because this code runs a new session each time it's called. The environment value will be reset on the tasty logout command and it defaults to sbx for safety reasons.
  • Switching to the prod environment is done on login tasty login --prod

Setting account

  • 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.
Clone this wiki locally