diff --git a/README.md b/README.md index b7a66c8..2e16cf2 100644 --- a/README.md +++ b/README.md @@ -1,33 +1,10 @@ -## Tastyworks Symbology -This is a demo javascript app to demonstrate how to parse Tastyworks equity and equity option symbols and open a websocket connection with our quote provider. +## Tastyworks Streaming Data +This is a demo javascript app to demonstrate 2 things: +1. How to parse Tastyworks equity and equity option symbols and open a websocket connection with our quote provider. +2. How to open a websocket connection with Tastyworks to receive live account updates (trades, balances, etc) This code shall not be used in production applications. This is for learning purposes only. -### Equities -Equity symbols contain only alphanumeric characters (A-Z, 0-9) with an occasional `/`. A few examples: -`AAPL` -`BRK/A` - -### Equity Options -Tastyworks uses the same conventions as the OCC for equity option symbols. You can read more about OCC symbology [here](https://en.wikipedia.org/wiki/Option_symbol). - -In short, there are 4 pieces that make up an equity option symbol: -1. Root symbol - 6 alphanumeric digits with whitespace padding. - - AAPL   - - FB     - - BRK/A  -2. Expiration date - 6 numeric digits with format `yymmdd`. -3. Option type - `P` or `C` -4. Strike price - 8 numeric digits front-padded with 0s. No decimals. Multiply strike by 1000. - - 64.0 strike: `00064000` - - 1050.55 strike: `01050550` - - 0.50 strike: `00000500` - -Example equity option symbols: -AAPL June 17, 2022 150 Put: `AAPL 220617P00150000` -SPY Nov 18, 2022 400 Call: `SPY 221118C00400000` -SPX May 20, 2022 4025 Call: `SPXW 220520C04025000` - ## Running Locally Replace the demo `token` and `wsUrl` in `quote-streamer.tsx` with a tastyworks account streamer token and url.