Introducing the v1 API

Automators, market engineers, process nerds, this one's for you. Until now, the scan engine was only available through the browser UI: manual, interactive scanning only. Even for me, it felt like a chore. No matter how fast or easy it was, re-running the same scans at the same period boundaries made that lazy-ass that lives deep inside me come out. Which meant a lot of times I just wouldn't do it. No more.

· 3 min read

Introducing the v1 API

Automators, market engineers, process nerds, this one's for you.

Until now, the scan engine was only available through the browser UI: manual, interactive scanning only. Even for me, it felt like a chore. No matter how fast or easy it was, re-running the same scans at the same period boundaries made that lazy-ass that lives deep inside me come out. Which meant a lot of times I just wouldn't do it.

No more.

I'm stoked to announce that StocksFast now has a v1 API, so you can automate exactly your nightly, weekly, monthly, quarterly, yearly stock scanning workflow.

What it includes

The v1 API offers the core of what the browser UI scanner does:

  • The StonQL function catalog
  • Scan universe/symbol lookup
  • Execute ad-hoc StonQL expressions
  • Execute your saved scans
  • Read and write your server-side watchlists
  • Read/write/tag saved scans
  • Import/export from TradingView

A stock scanner for the agentic era

If you trade the markets and agents are your thing, then StocksFast needs to be in your toolkit.

You can mint an API key with specific read/write scoped permissions, empowering or sandboxing your LLM agent as appropriate.

Want an agent to experiment, saving scans as it hits paydirt? Give it write permissions.

Want a scan execution bot in charge of only running scans? Give it only execute permissions.

You're in control. Your workflow relies upon giving your agent very specific capabilities. That's what the StocksFast v1 API aims to deliver.

Example use cases

The simplest scan script that runs itself

Do you have a pre-market ritual? Do you run it faithfully every morning? Let's say every morning before market open you find the prior day's stocks that pierced the 21 EMA, but closed green and closed above the EMA.

The StonQL:

ema21 = ema(close, 21);
open > ema21;
low < ema21;
close > ema21;
close > open;

Save the scan once in the UI, then run this as a cron job:

30 08 * * 1-5  curl -sX POST https://stocksfast.io/api/v1/saved-scans/$SCAN_ID/execute \
                -H "Authorization: Bearer $SF_KEY" > ~/scans/$(date +%F).json

That's it. At 8:30 every single weekday morning you will have your scan delivered to this JSON file. Put this in place locally and you never have to remember to open a browser window again.

Build a more meaningful workflow based on this alone to:

  • deliver results to an email address
  • feed a custom dashboard
  • notify in Slack

An AI agent with the power to actually scan

Ask an AI agent to scan for you today, and it will ask you:

  • Where do I get the scan data from?
  • Which timeframes do we keep track of?
  • How do I organize that data to make it scannable?
  • How do I search for the scan criteria?
  • How do I craft a scan calculation engine for technicals?

And the unspoken maintenance burden:

  • How do I adjust for dividends and splits to keep historical data accurate?
  • How do I track new listings and delisted tickers to keep my stock universe accurate?

We've done all of that work for you. The data pipeline. The symbol filtering. Universe selection. Maintenance. Please, please, don't repeat this work. StocksFast is cheap.

All your agent has to concern itself with is the scan criteria.

Give it our API and off it goes:

  • catalog: learns the StonQL vocabulary
  • validate: compile expressions, fix, repeat until valid (free: no scan credit spent!)
  • execute: run a scan, get results (1 credit/scan, unmetered for Premium)
  • me: check balance (for scan credit accounts)
  • watchlist: read & manage your saved symbols/results

With these tools it has everything it needs to create complex scan criteria. Deterministic scan results based on real market data, not hallucinated.

Beta

This is a public beta. It may change without prior notice.

Getting started

First check out the API Guide. It contains all the routes reference documentation.

When you're ready, you can mint a key through our self-service portal.

Go build something awesome! Then tell us about it.

Written by Luis Gomez

Try it on your own scans. 14-day free trial, no card.

Start free trial