Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
dmoss18 committed Nov 14, 2022
1 parent da09372 commit 2f77634
Showing 1 changed file with 4 additions and 27 deletions.
31 changes: 4 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
- <code>AAPL&nbsp;&nbsp;</code>
- <code>FB&nbsp;&nbsp;&nbsp;&nbsp;</code>
- <code>BRK/A&nbsp;</code>
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.
Expand Down

0 comments on commit 2f77634

Please sign in to comment.