这是indexloc提供的服务,不要输入任何密码
Skip to content

NVentimiglia/schwab-market-depth

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Market Depth Visualization

This project visualizes level 2 options data from the Schwab streaming API using a bookmap style visualization.

This is a rough v1. Improvements coming.

schwab_md_vid.mp4

Historical View

grid_historical

To create a new chart

1. Enter a stock symbol
2. Select date
3. Select Call or Put
4. Enter a strike 
5. Click "Create Chart"

Add more charts

Click the "+" to add more charts. Click the red "x" to delete the chart.

Add as many charts as you want.

Auto vs Mode1

Click "Auto" in the bottom right corner to switch to Manual mode.

The default "Auto" mode locks the y-axis to +-10% of the last price.

Features

  • Real-time visualization of order book data
  • Historical view of price levels over time
  • Heatmap showing order density
  • Futures and Index options coming soon....

Requirements

  • Python 3.11+
  • Node.js 14+
  • Schwab API credentials

Setup

  1. Clone this repository
  2. Install Python dependencies:
    pip install -r requirements.txt
    
  3. Create a .env file with your Schwab API credentials:
    SCHWAB_APP_KEY=your_app_key
    SCHWAB_APP_SECRET=your_app_secret
    
  4. Install frontend dependencies:
    cd frontend
    npm install
    

Running the Application

  1. Start the API and data stream:

    python api.py
    
  2. Start the frontend development server:

    cd frontend
    
    npm run dev
    
  3. Open your browser and navigate to:

    http://localhost:8081
    

API Endpoints

  • localhost:8080/symbols - Get all available symbols in your db
  • localhost:8080/depth/{symbol} - Get the latest market depth for a symbol
  • localhost:8080/historical_full/{symbol} - Get historical market depth snapshots

Credit

@2187Nick

Discord Come checkout the other builders and projects.

Schwab API wrapper: https://github.com/tylerebowers/Schwabdev

About

Visualize market depth

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 60.5%
  • Python 35.9%
  • CSS 2.3%
  • HTML 1.3%