> ## 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.

# API Keys, Credits, Rate Limits & Error Codes

> Authenticate with X-API-KEY or Bearer token, compare unified Darvas Pro, Max and Ultra call quotas, concurrency limits, Retry-After and error codes.

## API keys

Send the key in the `X-API-KEY` header, or as a Bearer token:

```bash theme={null}
curl "https://api.darvas.app/v1/filings?ticker=AAPL" -H "X-API-KEY: dvk_..."
curl "https://api.darvas.app/v1/filings?ticker=AAPL" -H "Authorization: Bearer dvk_..."
```

The earlier base URL, `https://darvas.app/api/data/v1`, still answers every request with the same key, and its `next_page_url` links stay on that host.

Create keys in Darvas under **Settings → Data API**. Live key limits follow your plan (`3` on Darvas Pro, `10` on Max, and `25` on Ultra); each key's secret is shown once, when it is made. Rename or revoke a key on the same page, and a revoked key stops working at once.

Keep keys on servers. A key in browser code or a public repository can be read by anyone: revoke it and create a new one. A key Darvas issued to you by email keeps the limits agreed with it, and [support@darvas.app](mailto:support@darvas.app) revokes it.

## Plans and credits

Darvas uses one unified 4-plan ladder covering the workspace, automation, webhooks, and the Data API (there is no separate Data API subscription). Every key you create shares your account's plan and monthly call quota.

Pricing is strictly call-based: **1 credit = 1 successful call** (up to `1,000` rows per page, with no endpoint multipliers). Empty responses, `4xx` refusals, `5xx` errors, FINRA [`/short-volume`](https://docs.darvas.app/stocks/short-volume), MCP metadata (`tools/list`, `search_data_tools`, resources, prompts), and own-account MCP at `https://darvas.app/mcp` cost **0 credits**.

| Plan | Price | Data API & MCP calls/mo | RPM | Concurrent | Live keys | Webhooks | Account MCP (`0` credits) |
| - | - | - | - | - | - | - | - |
| Darvas Free | `$0` | `0` | `0` | `0` | `0` | `0` | `15` RPM |
| Darvas Pro | `$20/mo` or `$200/yr` (or Free via OKX affiliate) | `250,000` | `1,200` | `4` | `3` | `5` | `60` RPM |
| Darvas Max | `$100/mo` or `$1,000/yr` | `2,000,000` | `3,600` | `10` | `10` | `25` | `180` RPM |
| Darvas Ultra | `$200/mo` or `$2,000/yr` | `5,000,000` | `6,000` | `20` | `25` | `100` | `360` RPM (internal commercial rights) |

**OKX affiliate full Pro parity:** Any OKX account opened or transferred through Darvas that generates any positive trading commission (`> $0`) in the trailing 180 days keeps 100% full Darvas Pro parity for free, including all `250,000` monthly Data API calls, `1,200` RPM, `4` concurrent requests, `3` keys, `5` webhooks, `50` never-expiring alerts, and `5` scheduled AI briefings. A KYC2 invitee with a new OKX account, or one claiming Pro through OKX for the first time, starts with Pro right away (Data API unlocks after a qualifying trade). Accounts inactive for 180 days automatically downgrade to Free and automatically restore full Pro parity when trading resumes.

**Monthly resets and top-ups:** Monthly plan credits reset at `00:00 UTC` on the first day of each calendar month. Optional non-expiring top-up packs cost **`$10` per `100,000` calls** and spend automatically once your monthly plan allowance runs out. Apify Store Actors keep their own per-record pricing.

## Rate limits, concurrency and headers

Every answer carries the account's per-minute limit in `X-RateLimit-Limit`. The per-minute limit and concurrent request limit cover all keys of an account, and each Data MCP message counts as one request.

* Exceeding your per-minute rate limit answers HTTP `429` with `RATE_LIMITED` and `Retry-After` (seconds to wait).
* Exceeding your in-flight concurrency limit (`4` on Pro, `10` on Max, `20` on Ultra) answers HTTP `429` with `CONCURRENCY_LIMIT` and `Retry-After: 1`.
* Temporary platform-wide concurrency pressure answers HTTP `503` with `BUSY` and `Retry-After: 1`.

Answers to API keys also carry quota headers:

| Header | Meaning |
| - | - |
| `X-Quota-Unit` | Always `credits`. |
| `X-Credits-Used` | The credits this answer cost: `1` for a successful non-empty call, `0` for an empty answer, an error, or FINRA `/short-volume`. |
| `X-Quota-Limit` | Your monthly plan call allowance plus your non-expiring top-up credit balance when the request came in. |
| `X-Quota-Remaining` | The credits left after this answer. |
| `X-Quota-Reset` | When the monthly plan credits reset (first day of the next calendar month at `00:00 UTC`), in Unix seconds. |

Once both your monthly allowance and top-up balance reach `0`, further billable calls answer HTTP `429` with `QUOTA_EXCEEDED` until the monthly reset or a top-up pack is added.

## Errors

Errors are JSON with a stable `error` code and an English `message`.

| Status | `error` | Meaning |
| - | - | - |
| 400 | `VALIDATION_ERROR` | A parameter is missing or malformed. The message names it. |
| 400 | `FILING_COMPANY_MISMATCH` | The accession number belongs to another company. The message names the `ticker` or `cik` to retry with. |
| 400 | `FILING_TYPE_MISMATCH` | The accession number is a different form from `filing_type`. The message names the form to retry with. |
| 400 | `LIMIT_REACHED` | Every webhook destination or API key the plan allows is active. Delete or revoke one first. |
| 401 | `UNAUTHORIZED` | The key is missing, unknown or revoked. |
| 403 | `PLAN_REQUIRED` | The account is on Darvas Free (or an OKX KYC2 grace period awaiting a first qualifying trade) and has no active Data API plan. |
| 404 | `NOT_FOUND` | No company has this ticker or CIK, or the filing or record does not exist. The message says which. |
| 404 | `ITEMS_NOT_FOUND` | A requested item is not in the filing. The message lists the items the filing has. |
| 429 | `RATE_LIMITED` | Too many requests this minute. Retry after `Retry-After`. |
| 429 | `CONCURRENCY_LIMIT` | Too many in-flight requests for your plan's concurrency cap (`4` Pro, `10` Max, `20` Ultra). Retry after `Retry-After` (`1` second). |
| 429 | `QUOTA_EXCEEDED` | Your monthly plan credits and top-up balance are used up. |
| 500 | `INTERNAL_ERROR` | Darvas failed. The error is reported to the team. |
| 503 | `BUSY` | Temporary upstream concurrency saturation. Retry after `Retry-After` (`1` second). |
| 503 | `UNAVAILABLE` | The data store is down. Retry later. |

```json theme={null}
{ "error": "NOT_FOUND", "message": "No company has this ticker or CIK" }
```


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