cabrini
US stock market data for AI agents. 23 years of intraday and daily bars, SEC fundamentals, filings, and insider data — every US equity from 2003 to present.
Pay per query with USDC on Base (x402). No API keys, no subscriptions, no signup.
Install
pip install cabrini
Quick start
from cabrini import Cabrini
c = Cabrini(private_key="0x...") # any Base wallet with USDC
# Intraday bars (pct from daily open) — $0.025
bars = c.query("AAPL", "2024-01-15")
# Daily OHLCV + VWAP (absolute prices) — $0.001/year
daily = c.daily("TSLA", "2024-01-01", "2024-03-31")
# SEC fundamentals — $0.02
fins = c.fundamentals("NVDA")
# Full research brief — $0.25
brief = c.brief("MSFT")
LangChain
from cabrini import get_langchain_tools
from langchain_openai import ChatOpenAI
from langgraph.prebuilt import create_react_agent
tools = get_langchain_tools(private_key="0x...")
agent = create_react_agent(ChatOpenAI(model="gpt-4o"), tools)
result = agent.invoke({"messages": [
{"role": "user", "content": "What was NVDA's trading volume on the day of their last earnings?"}
]})
CrewAI
from cabrini import get_crewai_tools
from crewai import Agent, Task, Crew
tools = get_crewai_tools(private_key="0x...")
analyst = Agent(
role="Financial Analyst",
goal="Analyze stock performance using real market data",
tools=tools,
)
task = Task(
description="Compare AAPL and MSFT intraday volatility on 2024-06-15",
agent=analyst,
)
Crew(agents=[analyst], tasks=[task]).kickoff()
MCP (Claude, Cursor, etc.)
Point any MCP client at https://cabrini.ai/mcp:
{
"mcpServers": {
"cabrini": {
"url": "https://cabrini.ai/mcp"
}
}
}
All endpoints
| Method | Price | Description |
|---|---|---|
query(ticker, date) |
$0.025 | Full trading day of intraday bars |
daily(ticker, start, end) |
$0.001/year | Daily OHLCV + VWAP — the absolute prices |
batch(tickers, date) |
$0.02/ticker | Several tickers, one date, no limit |
range(ticker, start, end) |
$0.01/trading day | Multi-day intraday, no limit |
bars(ticker, date, interval) |
$0.015/day | Resampled intraday, 3-240 min |
scan(date, **criteria) |
$0.10 | Screen every US stock; needs >= 1 criterion |
tickers(date) |
$0.005 | List traded tickers |
company(ticker) |
$0.005 | Company profile from SEC EDGAR |
fundamentals(ticker) |
$0.02 | SEC quarterly data |
filings(ticker) |
$0.01 / $0.05 | SEC filing index; +extracted section text |
insiders(ticker) |
$0.02 | Insider transactions (Form 4) |
brief(ticker) |
$0.25 | Joined research brief |
Prices are quoted live in each 402 response and the client pays whatever the server
asks — this table is documentation, not the source of truth.
Output format
Intraday methods (query, range, batch, bars) return fractional change from the
daily open, not price levels:
{"window_start": "2024-01-02T14:30:00", "timestamp": 1704204600000000000,
"pct_open": 0.0, "pct_high": 0.0012, "pct_low": -0.0003, "pct_close": 0.0008,
"volume": 47000, "transactions": 312}
pct_x = (bar_x - day_open) / day_open, so 0.0012 is +0.12%.
daily() carries the absolute levels — open, high, low, close, volume, transactions and
VWAP. Combine the two to reconstruct prices:
day = c.daily("AAPL", "2024-01-02", "2024-01-02")["data"][0]
bars = c.query("AAPL", "2024-01-02")["data"]
close_price = day["open"] * (1 + bars[-1]["pct_close"])
Use daily() rather than a third-party open: our reference is the first bar of the
session and includes pre-market, so an external 09:30 open will not reconcile exactly.
How payment works
Every paid request uses x402 — an open protocol for HTTP micropayments:
- Client sends request → server returns
402with aPAYMENT-REQUIREDheader - Client signs a USDC transfer authorization (EIP-3009)
- Client replays request with
X-PAYMENTheader containing the signed authorization - Cloudflare edge worker verifies signature, submits to Base, forwards to origin
- Origin returns data
The Cabrini client handles all of this automatically. You just need a wallet with USDC on Base.
Get USDC on Base
- Bridge from Ethereum: bridge.base.org
- Buy directly: Coinbase → send USDC to your wallet on Base network
- Faucet (testnet): not needed, mainnet USDC is cheap ($0.025/query)
Links
- Homepage: https://cabrini.ai
- API docs: https://cabrini.ai/docs
- Agent guide: https://cabrini.ai/agents
- MCP endpoint: https://cabrini.ai/mcp
Metadata
Release files for cabrini 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cabrini-0.2.0.tar.gz | 8.0 kB | Without provenance | Details for cabrini-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cabrini-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for cabrini-0.2.0-py3-none-any.whl |
Total release size: 17.6 kB
Release files / cabrini-0.2.0.tar.gz
| Download URL | cabrini-0.2.0.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b306ec4cf0b34870b151ef79d6010c3ef044696dc0e5676cc6a0cb7dc853de98
|
|
BLAKE2b-256 checksum How to use checksums |
e16290ce563101b07d5f289fbfbaf0bb36b291dd246f05436bcd0b22f6a2a4a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / cabrini-0.2.0-py3-none-any.whl
| Download URL | cabrini-0.2.0-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d99828d7d2390620e49e77bb7793ca3d1ebeb6c64fa5fa7ddcd751c0e53b6db4
|
|
BLAKE2b-256 checksum How to use checksums |
d9fa0ab9e9bf80c6e0c7744993707eb73c421a783728dda02a9492ec92c7c272
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for cabrini 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.