A paid data API that Claude and ChatGPT can plug into.
The ask. Developers and AI assistants wanted programmatic, pay-per-use access to Iranian market and filings data that until then lived only behind the website.
- MCP tools live
- 35
- core endpoints
- 26
- tests (14 MCP, 26 OAuth)
- 349
- days, first commit to launch
- 2
- Product impact
- Existing data became a self-serve, pay-per-use product that AI assistants can call directly, launched two days after the first commit.
- Engineering impact
- One implementation serves both REST and MCP, so billing, limits and logs can't drift; standard OAuth 2.1 flows that Claude and ChatGPT accept.
01Understand
The data and its views already existed. The real questions were access, pricing and trust, so the API started superuser-only.
02Propose
Key-authenticated /api/data/v1, a credit wallet charged per endpoint and only on success, an admin dataset catalogue, and an MCP endpoint.
03Prove small
Sandbox keys return the documented sample, never charge and have their own small limits, so a customer's CI can test without burning credit.
04Iterate
Pricing reworked four times in three days; then order book and live streams, OAuth sign-in for MCP clients, fixes for Claude's client metadata, and 36 calls in flight at once.
05Ship
OAuth 2.1 (RFC 9728/8414/7591, PKCE, one-time refresh tokens), Redis rate limits that grow with spend, and an idempotent credit ledger so a retry never charges twice.
06Measure
Live as a Claude and ChatGPT connector with 35 tools; clients' requests and low-credit notices land in the staff panel.