Skip to content
samjtro edited this page Jan 3, 2025 · 4 revisions

0.0.1

go to https://developer.schwab.com, create an account, create an app, get app credentials from https://developer.schwab.com/dashboard/apps

0.0.2

  1. create any file with the .env extension in your project directory (can also have multiple, if necessary), formatted as such:
APPKEY=KEY0 // App Key
SECRET=KEY1 // App Secret
CBURL=https://127.0.0.1 // App Callback URL

0.0.3: optional (mac & windows ONLY)

run the following command in your cwd to generate ssl certs for secure tls transmission of your bearer token:

openssl req -x509 -out localhost.crt -keyout localhost.key   -newkey rsa:2048 -nodes -sha256   -subj '/CN=localhost' -extensions EXT -config <( \
printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS.1:localhost,IP:127.0.0.1\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")

0.0.4

go get github.com/go-schwab/[email protected]