> ## Documentation Index
> Fetch the complete documentation index at: https://docs.darvas.app/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> These docs cover the Darvas financial data API, its MCP server, data API and Darvas Pro+ webhooks, and Pine Script custom indicators for Darvas charts.
> https://docs.darvas.app/llms.txt lists every indexed page with a summary, and https://docs.darvas.app/llms-full.txt holds them in one file. Add .md to any page URL to read that page as Markdown. The lookup lists of tickers, types and series are named at https://docs.darvas.app/ai-agents.
> The docs MCP server https://docs.darvas.app/mcp searches and reads these docs. It needs no key.
> Call the REST API at https://api.darvas.app/v1. Send the API key, which starts with dvk_, in the X-API-KEY header or as Authorization: Bearer. The OpenAPI 3.1 spec of all 168 operations is https://docs.darvas.app/openapi.yaml.
> Name a company by ticker or cik. A share class takes a dot or a dash, so BRK.B and BRK-B name the same shares. Dates are YYYY-MM-DD.
> A list answer holds one page. Request its next_page_url as it is until the answer has none. limit counts rows across all pages.
> Errors are JSON with a stable error code and a message: 400 VALIDATION_ERROR, 401 UNAUTHORIZED, 403 PLAN_REQUIRED, 404 NOT_FOUND, 429 RATE_LIMITED or QUOTA_EXCEEDED, 500 INTERNAL_ERROR and 503 UNAVAILABLE. On a 429, wait the seconds in Retry-After. 1 credit = 1 successful call: a 2xx answer with data costs one credit however many rows it holds (at most 1,000 a page), and empty answers, errors and FINRA /short-volume cost 0 credits.
> The Financial Data MCP server is https://api.darvas.app/mcp (Streamable HTTP, protocol 2025-11-25, the same API key in X-API-KEY or as a Bearer token). tools/list answers 8 flagship tools plus search_data_tools and call_data_tool by default; ?mode=full lists all 164 tools and ?toolsets=sec,crypto,macro lists domains. Every tool is callable by name, takes response_format (json, compact or tsv) and fields, and a list answer's cursor value goes in the cursor argument. The darvas://catalog/* resources cost 0 credits. Setup for each client is at https://docs.darvas.app/mcp-server.
> The data API covers SEC filers and their filings, statements, XBRL facts, debt maturities, ownership and earnings, US stock prices, technicals and FINRA short volume, macro series and a global economic calendar.
> Its crypto data covers prices, indices, order books, order flow, volume profiles, derivatives, options, liquidations, spot ETF flows and a screener across 9 exchanges. It also covers DeFi protocols, stablecoins, yields and DEX pairs, and Polymarket, Kalshi and OKX prediction markets. https://docs.darvas.app/market-coverage gives the history and update time of each dataset.
> https://docs.darvas.app/ai-agents names the endpoint and the MCP tool that answer each kind of question about these datasets.
> Custom indicators for Darvas charts are Pine Script v5 or v6 indicator() or strategy() scripts. Darvas rewrites Pine v1 to v4 to v5 and runs no other indicator language. Start at https://docs.darvas.app/pine-script/introduction.
> https://docs.darvas.app/pine-script/support lists the Pine Script that Darvas runs. https://docs.darvas.app/pine-script/request-security covers request.security() and request.financial(), and https://docs.darvas.app/pine-script/limits lists the run limits.
> Darvas Pro+ webhooks send a signed POST for alarm fires and pauses, scheduled answers, economic calendar alerts, ETF flow updates, ended connections and the data API events. https://docs.darvas.app/pro/webhooks lists every event, its object and how to verify the Darvas-Signature header.

# Financial Data API, MCP Server & Pine Script

> Darvas docs for the financial data API, MCP server, SEC EDGAR filings, stock, macro, crypto order flow, DeFi, prediction markets and Pine Script.

Darvas collects financial data from the institutions that publish it: SEC EDGAR, FINRA, the US Treasury, the Bureau of Labor Statistics, the Bureau of Economic Analysis, the Department of Labor and the Bank for International Settlements. The same data powers the Darvas app and the data API documented here: 168 REST operations at `https://api.darvas.app/v1`, 164 of them also tools on the MCP server, with crypto market data from 9 exchanges. These docs also cover the Pine Script custom indicators that run on Darvas charts.

> [card] [Data API quickstart](https://docs.darvas.app/quickstart.md)
>
> Make your first request with an API key in two minutes.

> [card] [MCP server](https://docs.darvas.app/mcp-server.md)
>
> Call 164 data tools from Claude Code, Codex, Cursor, VS Code, Windsurf or your own agent.

> [card] [Docs for AI agents](https://docs.darvas.app/ai-agents.md)
>
> llms.txt, Markdown pages, the docs MCP server, and which tool answers which question.

> [card] [Market coverage](https://docs.darvas.app/market-coverage.md)
>
> The markets, companies and history each dataset covers, and how fast it updates.

> [card] [Insider trades](https://docs.darvas.app/ownership/insider-trading.md)
>
> Form 4 and 5 transactions since 2006, read about a minute after each filing.

> [card] [Custom indicators](https://docs.darvas.app/pine-script/introduction.md)
>
> Write Pine Script indicators for Darvas charts, or describe one to the Darvas assistant.

## Make a request

```bash theme={null}
curl "https://api.darvas.app/v1/financials/income-statements?ticker=NVDA&period=annual&limit=2" \
  -H "X-API-KEY: $DARVAS_API_KEY"
```

Every endpoint follows the same rules:

| Rule | Value |
| - | - |
| Base URL | `https://api.darvas.app/v1` |
| Authentication | The key in the `X-API-KEY` header, or `Authorization: Bearer`. See [Authentication and limits](https://docs.darvas.app/authentication.md). |
| Plans and credits | Included in Darvas Pro (`$20/mo` or free via active OKX affiliate, 250,000 calls/mo), Max (`$100/mo`, 2,000,000 calls/mo), and Ultra (`$200/mo`, 5,000,000 calls/mo). `1 credit = 1 successful call` (up to 1,000 rows per page); empty responses, errors, FINRA short volume, and own-account MCP cost `0` credits. |
| Companies | `ticker` or `cik`. UK and French companies take `ticker` and `market`, or `isin`. |
| Dates | `YYYY-MM-DD` |
| Pages | Follow `next_page_url` until the answer has none. See [Pagination](https://docs.darvas.app/pagination.md). |
| Errors | JSON with a stable `error` code and a `message`. A `429` carries `Retry-After`. |
| OpenAPI 3.1 spec | [`openapi.yaml`](https://docs.darvas.app/openapi.yaml) |
| Data MCP server | `https://api.darvas.app/mcp`, with the same key: 10 tools by default, all 164 with `?mode=full`. See [MCP server](https://docs.darvas.app/mcp-server.md). |
| Docs MCP server | `https://docs.darvas.app/mcp`, with no key. See [Docs for AI agents](https://docs.darvas.app/ai-agents.md). |

## What the API covers

| Dataset | Endpoints | Covers | History |
| - | - | - | - |
| Company profiles | [`/company/facts`](https://docs.darvas.app/companies/profile) | Every SEC filer, about 994,000 | Active and delisted filers |
| Company dossier | [`/company/dossier`](https://docs.darvas.app/companies/dossier) | A US stock's profile, price, technicals, valuation, earnings, insider trades, 13F holders and 8-K events in one call | The newest entries of each dataset |
| SEC filings | [`/filings`](https://docs.darvas.app/sec-edgar/filings), [`/filings/items`](https://docs.darvas.app/sec-edgar/filing-items), [`/filings/events`](https://docs.darvas.app/sec-edgar/8k-events), [`/search`](https://docs.darvas.app/sec-edgar/full-text-search) | Every form, 10-K, 10-Q and 8-K items, 8-K events and full-text search | Since 1994 |
| Financial statements | [`/financials/income-statements`](https://docs.darvas.app/financials/income-statements), [`/financials/balance-sheets`](https://docs.darvas.app/financials/balance-sheets), [`/financials/cash-flow-statements`](https://docs.darvas.app/financials/cash-flow-statements) | About 20,600 SEC filers, plus UK and French companies | Since 2009, and 10-Ks since 1993 |
| As-reported statements and segments | [`/financials/as-reported`](https://docs.darvas.app/financials/as-reported-statements), [`/financials/segments`](https://docs.darvas.app/financials/segments) | Each filing's own XBRL lines, and values by product, region and segment | Since June 2009 |
| XBRL facts and debt maturities | [`/financials/xbrl-facts`](https://docs.darvas.app/financials/xbrl-facts), [`/financials/debt-schedule`](https://docs.darvas.app/financials/debt-schedule) | Every non-dimensional `us-gaap`, `ifrs-full` and `dei` fact of a filer, and the debt due in each of the next five years | Every filing with XBRL data |
| Ratios and screener | [`/financial-metrics`](https://docs.darvas.app/financials/metrics), [`/financials/search/screener`](https://docs.darvas.app/financials/stock-screener) | Valuation, margins, returns, liquidity, leverage, growth and per share ratios | With the statements |
| Peer comparison | [`/financials/peer-comparison`](https://docs.darvas.app/financials/peer-comparison) | 2 to 20 US stocks side by side, with the peer group median of 12 metrics | The newest trailing twelve months |
| Earnings, KPIs and guidance | [`/earnings`](https://docs.darvas.app/earnings/releases), [`/kpi/metrics`](https://docs.darvas.app/earnings/kpis), [`/kpi/guidance`](https://docs.darvas.app/earnings/guidance), [`/kpi/non-gaap`](https://docs.darvas.app/earnings/non-gaap) | 8-K earnings releases and the 10-Q or 10-K that follows | Releases since January 2023 |
| Insider trades | [`/insider-trades`](https://docs.darvas.app/ownership/insider-trading) | Forms 4 and 5 | Since 2006 |
| Insider holdings | [`/insider-ownership`](https://docs.darvas.app/ownership/insider-holdings) | Forms 3 and 5 | Since 2006 |
| Insider sale notices | [`/insider-trades/sale-notices`](https://docs.darvas.app/ownership/form-144-sale-notices) | Form 144 | Every XML notice, since April 2023 |
| 5% owners | [`/beneficial-ownership`](https://docs.darvas.app/ownership/beneficial-13d-13g), [`/activist-ownership`](https://docs.darvas.app/ownership/activist-13d) | Schedules 13D and 13G | Since December 2024 |
| Institutional holdings | [`/institutional-holdings`](https://docs.darvas.app/ownership/13f-institutional-holdings) | Form 13F | Since 2013 |
| Fund holdings | [`/index-funds`](https://docs.darvas.app/ownership/etf-fund-holdings) | Form N-PORT of every registered fund and ETF | Since 2019 |
| IPOs | [`/ipos`](https://docs.darvas.app/sec-edgar/ipo-filings) | S-1, F-1, 424B4 | Since January 2025 |
| News | [`/news`](https://docs.darvas.app/stocks/financial-news) | A company's 8-Ks, and Federal Reserve, SEC, BEA and BLS releases | Agency releases since November 2026 |
| Stock prices | [`/prices`](https://docs.darvas.app/stocks/historical-prices), [`/prices/snapshot`](https://docs.darvas.app/stocks/price-snapshot), [`/dividends`](https://docs.darvas.app/stocks/dividends), [`/splits`](https://docs.darvas.app/stocks/splits) | About 10,000 Nasdaq, NYSE, Cboe and OTC stocks | Each stock's first session |
| Stock technicals | [`/prices/technicals`](https://docs.darvas.app/stocks/technical-indicators) | SMA, EMA, RSI-14, MACD, Bollinger Bands, ATR-14, the 52-week range and returns of a US stock | The newest 280 daily or weekly bars |
| Tokenized stocks | [`/tokenized-stocks`](https://docs.darvas.app/tokenized-stocks/markets), [`/tokenized-stocks/prices`](https://docs.darvas.app/tokenized-stocks/prices), [`/tokenized-stocks/trades`](https://docs.darvas.app/tokenized-stocks/trades) | OKX stock swaps, Bybit xStocks and Coinbase stock tokens on Base | Prices as they trade, and stored price and trade history |
| Fails to deliver | [`/fails-to-deliver`](https://docs.darvas.app/stocks/fails-to-deliver) | Every security with fails on a day | Since July 2009 |
| Short volume | [`/short-volume`](https://docs.darvas.app/stocks/short-volume) | FINRA daily short sale volume, short-exempt volume and short ratio of every NMS symbol | One trading day per request |
| Commitments of Traders | [`/cot`](https://docs.darvas.app/futures/commitment-of-traders) | About 960 futures markets | Legacy reports since 1986 |
| Economic calendar | [`/macro/economic-calendar`](https://docs.darvas.app/macro/economic-calendar) | Scheduled and published releases worldwide, with actual, forecast, previous and surprise | 7 days back to 14 days ahead by default |
| Policy rates | [`/macro/interest-rates`](https://docs.darvas.app/macro/interest-rates) | 31 central banks | The Fed since 1954 |
| Treasury yields | [`/macro/yield-curve`](https://docs.darvas.app/macro/treasury-yield-curve) | 14 tenors | Since 1990 |
| Inflation | [`/macro/inflation`](https://docs.darvas.app/macro/cpi-pce-inflation) | CPI and PCE prices | CPI since 1947, PCE since 1959 |
| Labor market | [`/macro/labor`](https://docs.darvas.app/macro/labor-market) | Payrolls, household survey, JOLTS and jobless claims | Payrolls since 1939 |
| Growth and income | [`/macro/gdp`](https://docs.darvas.app/macro/gdp-income) | GDP, profits, income and saving | GDP since 1947 |
| GPU rental prices | [`/macro/gpu-prices`](https://docs.darvas.app/macro/gpu-rental-prices) | NVIDIA H100, H200, GB200 and A100, AMD MI300X | Daily since 26 November 2026 |
| Crypto prices and snapshots | [`/crypto/prices`](https://docs.darvas.app/crypto/prices), [`/crypto/prices/snapshot`](https://docs.darvas.app/crypto/price-snapshot), [`/crypto/tickers`](https://docs.darvas.app/crypto/tickers) | Darvas aggregated feeds (`ALLUSD` included) across OKX, Binance, Bybit, Hyperliquid, Coinbase, Kraken, Bitstamp, Deribit and Bitfinex | Live candles every minute |
| Crypto footprint and order flow | [`/crypto/footprint`](https://docs.darvas.app/crypto/footprint-charts), [`/crypto/order-flow`](https://docs.darvas.app/crypto/order-flow), [`/crypto/trades`](https://docs.darvas.app/crypto/trades) | Darvas aggregated feeds and OKX, Binance, Bybit and Hyperliquid trades | Order flow for 13 months, raw trades for 90 days |
| Crypto technical indicators | [`/crypto/indicators`](https://docs.darvas.app/crypto/technical-indicators) | SMA, EMA, RSI, MACD, Bollinger Bands, ATR, relative volume and returns on Darvas aggregated or single-exchange candles | Live across minute to monthly frames |
| Crypto indices and market context | [`/crypto/index/prices`](https://docs.darvas.app/crypto/index-prices), [`/crypto/prices/snapshot/market`](https://docs.darvas.app/crypto/market-snapshot), [`/crypto/volume/aggregated`](https://docs.darvas.app/crypto/aggregated-volume), [`/crypto/context`](https://docs.darvas.app/crypto/market-context), [`/crypto/hyperliquid/markets`](https://docs.darvas.app/crypto/hyperliquid-markets) | Composite spot indices, every pair's 24-hour price and volume, perpetual volume across four exchanges, Hyperliquid perpetuals and a one-call market brief | Live |
| Crypto order book and large trades | [`/crypto/order-book`](https://docs.darvas.app/crypto/order-book), [`/crypto/order-book/heatmap`](https://docs.darvas.app/crypto/order-book-heatmap), [`/crypto/large-trades`](https://docs.darvas.app/crypto/large-trades), [`/crypto/large-trades/zones`](https://docs.darvas.app/crypto/whale-trade-zones) | L2 books merged across OKX, Binance, Bybit and Hyperliquid, book heatmaps from one-second samples, and whale trades with the price zones where they traded | Live books, whale trades up to 7 days back and zones up to 30 days |
| Crypto profiles and structure | [`/crypto/volume-profile`](https://docs.darvas.app/crypto/volume-profile), [`/crypto/volume-profile/fixed-range`](https://docs.darvas.app/crypto/fixed-range-volume-profile), [`/crypto/tpo`](https://docs.darvas.app/crypto/tpo-market-profile), [`/crypto/market-structure`](https://docs.darvas.app/crypto/market-structure) | Session and fixed range volume profiles, TPO market profiles, Smart Money Concepts, order blocks, fair value gaps and swings | Up to 30 sessions of profiles, and up to 500 candles of structure |
| Crypto derivatives and options | [`/crypto/derivatives`](https://docs.darvas.app/crypto/derivatives), [`/crypto/derivatives/snapshot`](https://docs.darvas.app/crypto/derivatives-snapshot), [`/crypto/derivatives/oi-scan`](https://docs.darvas.app/crypto/open-interest-scanner), [`/crypto/derivatives/option-chain`](https://docs.darvas.app/crypto/options-chain), [`/crypto/derivatives/iv-skew`](https://docs.darvas.app/crypto/options-iv-skew) | Funding, open interest, basis, long-short ratios and taker volume on OKX, Binance, Bybit and Hyperliquid, and OKX options with Greeks and IV skew | Series up to 30 days back, options live |
| Crypto liquidations | [`/crypto/liquidations`](https://docs.darvas.app/crypto/liquidations), [`/crypto/liquidations/heatmap`](https://docs.darvas.app/crypto/liquidation-heatmap) | Forced liquidation fills on OKX, Binance, Bybit and Hyperliquid, and estimated OKX perpetual liquidation levels | Fills up to 7 days back |
| Crypto screener | [`/crypto/screener`](https://docs.darvas.app/crypto/screener), [`/crypto/screener/metrics`](https://docs.darvas.app/crypto/screener-metrics) | OKX USDT spot, perpetual and futures markets, screened on 77 rating, technical, volume, performance and derivatives metrics, with ranges, crossovers and a timeframe per condition | Live |
| Spot crypto ETF flows | [`/crypto/etf-flows`](https://docs.darvas.app/crypto/etf-flows) | Daily, weekly and monthly net flows of US spot Bitcoin, Ethereum and Solana ETFs, by issuer | Up to 365 days per request |
| DeFi | [`/defi/protocols`](https://docs.darvas.app/defi/protocols-tvl), [`/defi/stablecoins`](https://docs.darvas.app/defi/stablecoins), [`/defi/yields`](https://docs.darvas.app/defi/yields), [`/defi/dex-tokens`](https://docs.darvas.app/defi/dex-tokens) | Protocol TVL, stablecoin supply, lending and pool yields, and DEX pair liquidity on Ethereum, Solana, Base, Arbitrum, BSC and other chains | Current snapshots every 5 minutes, DEX pairs every 30 seconds |
| Prediction markets | [`/prediction-markets`](https://docs.darvas.app/prediction-markets/markets), [`/prediction-markets/series`](https://docs.darvas.app/prediction-markets/series), [`/prediction-markets/arbitrage`](https://docs.darvas.app/prediction-markets/arbitrage) | Polymarket, Kalshi and OKX event contracts, their series, and price gaps between venues on the same question | Active contracts every 30 seconds |

Every value names its source: an SEC accession number, or a publisher and series code. Macro values keep the figure as it was first published next to the current, revised one. [Market coverage](https://docs.darvas.app/market-coverage.md) gives the counts and update times of each dataset.

## Connect an AI agent

* To let an agent answer with data, connect the data MCP server, `https://api.darvas.app/mcp`, with your key. [MCP server](https://docs.darvas.app/mcp-server.md) has the setup for Claude Code, Codex, Cursor, VS Code, Windsurf and Devin.
* To let an agent write code against the API, give it [`/llms.txt`](https://docs.darvas.app/llms.txt) or the docs MCP server, `https://docs.darvas.app/mcp`.
* To pick the right endpoint for a question, read the table in [Docs for AI agents](https://docs.darvas.app/ai-agents.md#which-endpoint-answers-which-question).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.