Skip to content

Data source: Historical chart pattern similarity via Chart Library API #7457

Description

@grahammccain

Summary

Chart Library provides historical chart pattern similarity search — given a ticker and date, it finds the 10 most similar historical chart patterns from a database of 24M+ embeddings across 19K symbols and returns what happened next (forward returns at 1/3/5/10 days). This seems like a natural data source for OpenBB's financial analysis platform.

How it would integrate

Chart Library exposes a REST API and an MCP server (pip install chartlibrary-mcp). For OpenBB, the REST API is the most relevant:

import requests

# Find historical patterns similar to NVDA on 2025-01-15
resp = requests.get("https://chartlibrary.io/api/v1/search", params={
    "symbol": "NVDA",
    "date": "2025-01-15",
    "timeframe": "RTH"
}, headers={"X-API-Key": "your-key"})

matches = resp.json()["matches"]
# Each match includes: symbol, date, distance score, 
# forward returns (1d, 3d, 5d, 10d), similarity rank

# Get AI-generated summary of what the pattern implies
summary = requests.get("https://chartlibrary.io/api/v1/summary", params={
    "symbol": "NVDA",
    "date": "2025-01-15"
}, headers={"X-API-Key": "your-key"})

Additional endpoints that could enrich OpenBB data:

  • /api/v1/volume-profile/{symbol} — intraday volume vs historical average
  • /api/v1/anomaly/{symbol} — pattern anomaly detection (how unusual is today's price action)
  • /api/v1/sector-rotation — sector ETF rankings by momentum
  • /api/v1/scenario — conditional forward returns ("what if SPY drops 3%?")
  • /api/v1/correlation-shift — stocks decorrelating from SPY

Potential integration point

This could work as an OpenBB data provider extension, adding a "pattern similarity" dimension to equity analysis alongside fundamentals and technicals. The API returns structured JSON that maps well to OpenBB's data model.

Details

  • Free tier: 200 API calls/day (no credit card)
  • Docs: https://chartlibrary.io/developers
  • MCP server: pip install chartlibrary-mcp (for agent workflows)
  • Coverage: 19K US equities, 10 years of data, 8 timeframes (RTH, premarket, 5min through 5-day)

Happy to help with implementation if there's interest.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions