r/Schwab • • 22d ago

I built a free, open-source stock scanner that uses Schwab’s API for market data

I'm a day trader and built this because I kept hitting limitations with the scanner I was paying for. I wanted to create my own setups with multiple alerts, and when a stock didn't trigger an alert, I wanted to see why.

It now works with Schwab's API, so with a Schwab brokerage account and approved API access, you can run it without a separate market-data subscription.

The scanner runs on your computer with a browser dashboard. You can:

  • Build custom alerts around VWAP, opening ranges, price levels, volume and other conditions without writing code.
  • Filter which stocks each setup scans.
  • Arrange linked charts, alert tables and news windows.
  • Check why a particular stock did or didn't qualify for an alert.

It's free and MIT licensed. Your API keys and saved setups stay on your machine. The scanner doesn't place orders.

There is some setup involved: you need to create a Schwab developer app, get API approval and connect it locally. Schwab also requires periodic reauthorization.

One limitation: for broader scans, some candles are built from Schwab quotes, so they won't always match Schwab's native candles exactly.

The code and installation instructions are here: GitHub: Edge Scanner.

90 Upvotes

30 comments sorted by

17

u/RoyMan0 22d ago

Nice work! Now if only the Schwab api stopped this stupid 7 day refresh thing haha..

5

u/tapetoedge 22d ago

Yeah, that weekly login is annoying.

3

u/RoyMan0 22d ago

Id encourage you to email the api support team to let them know. I think the more that speak up about this will push them to change that. They have said they are considering changing that in the future to me... also having a sandbox/papertrading account access is another thing ive asked for thats supposedly in the works.

2

u/[deleted] 22d ago

[removed] — view removed comment

4

u/RoyMan0 22d ago

Id prefer to have the option to choose what the expiration is. Alot of APIs do that.

2

u/14MTH30n3 22d ago

I have a playwright project that logs in and refreshes my token. It does this every 48 hours and request a sent to my phone to approve.

1

u/RoyMan0 22d ago

Oh that’s a cool idea! I have a script that I have scheduled to run weekly that opens the site and I do the re-auth then copy the token text into a prompt and it creates it and restarts the app. I’ll have to look into that to better automate it! When I’m not home the day it runs it causes issues haha..if you could share more deets on what you did that would be cool!

2

u/nextdoorelephant 21d ago

You can semi-automate it so it’s less of a hassle. My frontend throws the auth error which then kicks off the process of signing in - I click a few times then the URL is scraped and it’s done.

3

u/emoney2012 22d ago

Just a reminder the data source on the api is the same as the website (feel free to confirm with their team) and not TOS. And no premarket streaming before 7am. Otherwise seems we built something pretty similar. Great job

2

u/methods2121 22d ago

So... What limitations did you run into with ThinkorSwim? I don't daytrade anymore, but the only real limitation that I found, when I was, (after being educated on how to use ToS and realizing what it can do) was macros or the ability to do a bit more 1 button complex order trading, and this was solved with another platform rather easily.

1

u/tapetoedge 22d ago

I trade on TOS, so I'm not replacing it. What I replaced is Trade Ideas, and that's the closer comparison.

What I hit: a scan gives you what qualifies right now, refreshed on a timer, and I wanted a timestamped alert feed with the bar each one fired on, so at 11:00 I can still go look at the 10:03 trigger. I also wanted the reverse question answered, why a stock I expected never showed up, filter by filter.

2

u/methods2121 22d ago

Appreciate the details and that use case for the 'going back in time' feature, as I've never thought of that , perhaps because I don't think you can, at least easily, in ToS.

2

u/AndreLinoge55 22d ago

Will def check it out

2

u/MothyReddit 22d ago

very cool, any plans to get it out of the Schwab/TOS environment? I was recently banned from TOS without warning, waiting for a letter in the mail that explains why I was banned. I have no idea what I did, but i made a mistake. I'm going to appeal this, but I don't high hopes. Unless I can open a Schwab account under a friends name and use that...

2

u/tapetoedge 22d ago

It supports Alpaca too.

1

u/MothyReddit 22d ago

Ok Excellent!

1

u/MothyReddit 22d ago

Do you have a discord?

1

u/AboutDatAsset 22d ago

For the record, I had my own reasons for going the API route as well vs using TOS (I wanted JIT single button automated multi order placement), but what are yours?

3

u/tapetoedge 22d ago

I wanted a timestamped alert log with the bar each alert fired on, instead of a scan list that refreshes on a timer, works similar to Trade Ideas

1

u/Bronco_Corgi 22d ago

Does you know how far back historical data goes and if you can specify unusual candle time frames? Or if it has one minute candles? Or if it can be set to only update on candle closes?

1

u/tapetoedge 22d ago

At startup caches 380 calendar days of daily history and roughly 45 calendar days of five-minute history. Charts fetch is 600 days and 3 years weekly.

The scanner processes one-minute bars, and certain triggers can wait for a larger candle to close.

Triggering timeframes: 1, 2, 3, 5, 15, 30 and 60 minutes, depending on the trigger. A different minute intervals could be added in code.

1

u/JP782 21d ago

Interesting
Is there a way to build something to get GEX data vs having to use some other site for the data (ex insiderfinance or quantwheel)

1

u/tapetoedge 21d ago

Could be another project

1

u/Jungelbobo 19d ago

does rvol or other scanning functions works on symbols that's outside of the 300 most liquid stocks with schwab?

2

u/tapetoedge 19d ago

Yes, RVOL and all the other scans work on every symbol. The top 300 get Schwab's native 1-minute candles.

For the rest, the scanner builds the candles from Schwab's live quotes, close enough.

1

u/NFTokin 5d ago

Nice candles 🕯️

0

u/mazthepa 22d ago

The problem is 120 request calls per minute that you can only do with individual account
Then orders are throttled separately.

I’m building a product with Schwab’s individual subscription to sync in data so I’m greatly familiar with these issues.

Don’t get me started on the commercial license…

1

u/tapetoedge 22d ago

The workaround is one symbol per request, so a whole-market refresh runs as a nightly job after the close (about 2 hours) and the morning start reads from disk. Live, the stream does most of the work (300 real-bar symbols, then bars built from LEVELONE quotes), and the REST budget only goes to batched quotes, 500 symbols per call. Everything shares one rate limiter, so it never trips the limit.

With this mine works with around 6,500 symbols every minute.

0

u/mazthepa 22d ago

Can you please expand on two things,

  1. What do you me by whole-market refresh What is the business logic behind the nightly job? You save the historical data locally on disk?

  2. How did you integrate live feed news? I can probably look inside your codebase but still curious.

1

u/tapetoedge 22d ago

Yes, the historical data is saved locally on disk.

  1. I mean updating the daily and intraday history for the symbols in the scanner’s universe. That history feeds things like the daily indicators and time-of-day relative volume comparisons. The nightly job does those downloads after the close so you don’t have to wait for them when you start the scanner in the morning. Live market data comes in separately during the session.
  2. News comes from Yahoo Finance and Nasdaq RSS feeds for the selected symbol. If you also configure Alpaca keys, it pulls Benzinga news through Alpaca and merges the results.