Skip to main content
Banana Farmer logo
Banana Farmer
Developer Guide

Stock Scanner API: Build Trading Bots with Real-Time Data.

Most stock scanner APIs give you raw price data and make you build the screening logic yourself. That's hundreds of hours of work before your bot makes its first decision. A scanner API that returns pre-scored, pre-ranked signals cuts straight to the part that matters: which assets are showing momentum right now, and why.

What a Scanner API Enables

A stock scanner API turns manual scanning into programmable infrastructure. Instead of opening a website every morning, your code queries an endpoint and receives structured data: ranked tickers, scores, badge states, and plain-English reasons. From there, you can build anything from a Telegram alert bot to a fully automated trading system.

The typical stock data API (Alpha Vantage, Polygon, Tiingo) gives you prices, volume, and maybe fundamentals. That's the raw ingredient. You still need to write the screening logic, calculate technical indicators, aggregate social sentiment, and rank the results. A scanner API skips that entire layer. You get the finished product: “Here are the top 20 assets right now, scored and ranked, with the reasoning attached.”

The difference matters most for solo developers and small teams. A hedge fund can afford to build a custom scanning pipeline. An indie developer building a trading bot on weekends can't. A scanner API turns a six-month project into a weekend project.

Endpoints Overview

Banana Farmer's API exposes three core endpoints. Each returns JSON. All requests require an API key in the Authorization header. The full reference is on the developer portal, but here's the quick overview.

GET /api/v1/signals/top

Top ranked signals, scored and sorted

Returns the current top-ranked assets by Ripeness Score. Each result includes the ticker, score, badge (Ripening, Ripe, Overripe), and a plain-English summary of why it scored high. Accepts optional query parameters for market (stocks, crypto, all), limit (default 20, max 50), and minimum score threshold. This is the endpoint most bots call on a 15-minute loop.

GET /api/v1/asset/:symbol

Individual asset detail

Returns the full scoring breakdown for a single asset. Includes the composite score, individual factor scores (technical, volume, social, coil), current badge, badge history for the last 30 days, and the AI-generated methodology summary. Use this when your bot identifies a candidate and needs the full picture before deciding to trade.

GET /api/v1/signals/history

Historical badge transitions

Returns historical signal data for backtesting. Filter by date range, badge type, market cap range, and sector. Each record includes the signal date, ticker, badge at signal time, score, and (if the holding period has elapsed) the actual return at 1-day, 5-day, and 1-month horizons. Over 12,450 historical Ripe signals are available going back to January 2024.

Authentication

Every request requires a Bearer token in the Authorization header. You get an API key from the developer portal. Trial keys are available instantly with no account required. Pro keys are generated from your account settings after subscribing.

curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://bananafarmer.app/api/v1/signals/top?limit=5

Invalid or expired keys return a 401 status with a JSON error body. Trial keys expire after 7 days. Pro keys don't expire but can be rotated from account settings. Never expose your API key in client-side code, public repositories, or browser-accessible JavaScript. Treat it like a password.

Rate Limits

Rate limits protect the API from abuse and keep response times fast for everyone. Trial keys get 100 requests per day. Pro keys get 1,000 requests per day. Both tiers have a burst limit of 10 requests per second. These limits are generous for typical use cases.

TierDaily LimitBurstCost
Trial100/day10/secFree
Pro1,000/day10/sec$49/mo

A bot polling the top signals endpoint every 15 minutes uses 96 requests per day. That leaves 904 requests for individual asset lookups, history queries, and testing. If you're building a dashboard that refreshes for multiple users, cache the API responses on your server rather than making a request per pageview.

Example: Fetch Top Signals in Python

Here's a minimal Python script that fetches today's top 5 momentum signals and prints them. This is the starting point for most bots. From here, you'd add your broker integration, position sizing logic, and error handling.

import requests

API_KEY = "your_api_key_here"
BASE_URL = "https://bananafarmer.app/api/v1"

response = requests.get(
    f"{BASE_URL}/signals/top",
    headers={"Authorization": f"Bearer {API_KEY}"},
    params={"limit": 5, "market": "stocks"}
)

signals = response.json()["data"]

for signal in signals:
    print(f"{signal['ticker']:>6}  "
          f"Score: {signal['score']:>3}  "
          f"Badge: {signal['badge']:<10}  "
          f"{signal['reason']}")

Output looks like: NVDA Score: 87 Badge: Ripe Volume breakout + social velocity surge + bullish MACD crossover

JavaScript/TypeScript version

const API_KEY = "your_api_key_here";

const res = await fetch(
  "https://bananafarmer.app/api/v1/signals/top?limit=5&market=stocks",
  { headers: { Authorization: `Bearer ${API_KEY}` } }
);

const { data: signals } = await res.json();

signals.forEach((s) => {
  console.log(`${s.ticker} | Score: ${s.score} | ${s.badge} | ${s.reason}`);
});

What Developers Build With Scanner APIs

A scanner API is the data layer for anything that needs to react to stock momentum programmatically. Here are the most common use cases we see from developers using the Banana Farmer API. Each one replaces hours of manual work with a few lines of code.

Trading Bots

Poll top signals every 15 minutes. When a new Ripe signal appears, check against your position sizing rules and send an order to your broker's API. Most Python bots use the Alpaca or Interactive Brokers API for execution. The scanner API provides the “what to buy” part.

Custom Dashboards

Build a personal dashboard that shows today's top signals alongside your portfolio, watchlist, and P&L. Most developers use React or Vue with a 15-minute polling interval. Cache responses on your backend to avoid hitting rate limits if multiple users share the dashboard.

Alert Systems

Push notifications to Telegram, Discord, Slack, or SMS when a new Ripe signal fires. A simple cron job compares the current top signals against the previous poll and sends a message for any new entries. Takes about 50 lines of code in Python.

AI Agents

Feed scanner data into an LLM agent that reasons about which signals match a particular trading strategy. The structured JSON response (scores, badges, reasons) is already in a format that language models parse easily. Combine with a broker API for end-to-end autonomous trading research.

Using a Scanner API vs Building Your Own Pipeline

Building a custom stock scanning pipeline from raw market data takes 3 to 6 months for a solo developer. You need a price data provider (Tiingo, Polygon, or Alpha Vantage), indicator calculation logic, a scoring algorithm, a database to store results, and infrastructure to run it on a schedule. The Banana Farmer API gives you the output of that entire pipeline for $49/month.

When to use a scanner API

Use a scanner API when you care about the signals, not the scanning methodology. If your project is a trading bot, dashboard, or alert system, the scanning layer is infrastructure, not your competitive advantage. The faster you get pre-scored data into your application, the sooner you can focus on the parts that differentiate your project: execution logic, risk management, and user experience.

When to build your own

Build your own if the scanning methodology IS your competitive advantage. If you're developing a proprietary scoring algorithm, need custom indicators that no existing API provides, or require sub-second latency for HFT strategies, you need your own pipeline. Also build your own if you need to scan markets that scanner APIs don't cover (options flow, futures spreads, forex pairs). The Tiingo API is a solid starting point for raw price data if you go this route.

FactorScanner APIBuild Your Own
Time to first signal5 minutes3-6 months
Monthly cost$49$50-200 (data + infra)
CustomizationLimited to API paramsUnlimited
MaintenanceZeroOngoing (data feeds, infra)
Coverage9,287 assetsAnything you build for

Builder's Perspective

ABM

Aaron Browne-Moore

Founder, Banana Farmer

I built the API because I wanted it myself. Before Banana Farmer had a web UI, it was a Python script that scored stocks and printed results to a terminal. The API came first. The website came second. That's why the endpoints return structured, machine-readable data with reasons attached: because I needed my own bot to understand why a signal fired, not just that it fired.

If you're building a trading bot, start with the trial key and the top signals endpoint. Get something working in an afternoon. Iterate from there. The developers I talk to who ship successful projects are the ones who start with 50 lines of code and a working prototype, not the ones who spend three months designing a perfect architecture before writing their first API call.

The full API reference, interactive examples, and trial key generator are on the developer portal. For methodology details, see the scoring methodology page. Over 12,450+ tracked signals, Ripe scores have maintained an 80% five-day win rate with a +4.51% average return.

Disclaimer: The API provides data for educational and informational purposes. It does not constitute financial advice or a recommendation to trade any security. Past performance does not guarantee future results. Automated trading involves substantial risk. See our full risk disclaimer.

Frequently Asked Questions

Common questions about stock scanner APIs and integration

What is a stock scanner API?

A stock scanner API is a programmatic interface that lets you query pre-screened, ranked stock data from your own code. Instead of manually checking a scanner website, your application sends an HTTP request and receives structured JSON with tickers, scores, badges, and reasons. This enables automated trading bots, custom dashboards, alert systems, and AI agents that react to momentum signals without human intervention.

How much does the Banana Farmer API cost?

The Banana Farmer API is included with a Pro subscription at $49/month. That covers unlimited reads against the scored leaderboard, individual asset lookups, and badge history. There's also a free trial key available on the developer portal that gives you limited access to test the endpoints before committing. No separate API pricing tier exists. If you have Pro, you have API access.

Can I build a trading bot with the Banana Farmer API?

Yes. The API returns structured JSON with scores, badges, and reasons for each asset. You can poll the top signals endpoint on a schedule (every 15 minutes matches the scoring cycle), filter for assets meeting your criteria, and pass the results to your broker's order API. The API doesn't execute trades directly. It provides the signal data your bot needs to make decisions.

What is the rate limit on the API?

Trial keys are limited to 100 requests per day. Pro API keys allow 1,000 requests per day, which is more than enough for a bot polling every 15 minutes (96 requests/day) with room for individual asset lookups. If you need higher limits for institutional use, contact support. Requests beyond the limit return a 429 status code with a Retry-After header.

Does the API include historical signal data?

Yes. The badge history endpoint returns past badge transitions for any asset, including the date each badge was assigned and the score at that time. This lets you backtest strategies against historical Ripe, Ripening, and Overripe signals. Historical data goes back to January 2024. Over 12,450 signals are available in the historical dataset.

What programming languages work with the API?

Any language that can make HTTP requests works. The API is a standard REST interface returning JSON. Python (with requests or httpx), JavaScript/TypeScript (with fetch or axios), Go, Rust, and Java all work fine. The developer portal includes copy-paste examples for Python and JavaScript. Most trading bot frameworks like Zipline, Backtrader, and CCXT can integrate with custom data sources like this.

About This Article

Aaron Browne-Moore

Founder, Banana Farmer

9,000+ Assets Analyzed Daily
2+ Years of Signal Data
Educational Only

Get Your API Key in 30 Seconds

The developer portal has a free trial key generator, interactive endpoint docs, and copy-paste code examples for Python and JavaScript.

Related Reading