Skip to content

Latest commit

 

History

History
43 lines (33 loc) · 1.56 KB

README.md

File metadata and controls

43 lines (33 loc) · 1.56 KB

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.

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.

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.

To run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.