type: decision
status: active
timestamp: 2026-06-21
tags: [decision, architecture, api, market-data, github-actions, github-pages, india, free-tier]

Market-data APIs — FII/DII Activity + Tickertape MMI as standalone repos (GH Actions + GH Pages)

Two India-market data APIs, each in own GitHub repo oriz-flow-fii-dii-activity-api (NSE/Moneycontrol FII/DII net activity) + oriz-mmi-tickertape-mmi-api (Tickertape Market Mood Index). GH Actions cron scrapes; GH Pages + raw.githubusercontent.com serve. The earlier CF Worker design (and the briefly-tried oriz-market-data aggregator) were both reverted on 2026-06-22; this file is now active again under the per-repo + GH-Pages shape.'

Reactivated 2026-06-22 under a different mechanism. The original body below described two Cloudflare Workers (flow-fii-dii.api.oriz.in, mmi.api.oriz.in) backed by KV. That design was first replaced by an aggregator repo (oriz-market-data, see ), then reverted same-day to the current shape: each API stays in its own repo, scraped by GH Actions, served via GitHub Pages + raw.githubusercontent.com. See market-data-per-repo for the current canonical decision. The CF Worker body below is preserved for audit trail and as the historical alternative — the repo slugs and product surfaces it locked are unchanged.

Market-data APIs — FII/DII Activity + Tickertape MMI

Decision

Two new India-market data APIs land as standalone Cloudflare Workers (not folded into the api.oriz.in umbrella) — each per its own subdomain, each with its own KV cache binding, each serving public JSON with CORS *:

APISubdomainUpstreamCache TTL
FII/DII net activityflow-fii-dii.api.oriz.inNSE India (primary) + Moneycontrol (fallback)24h per date / range
Market Mood Index mirrormmi.api.oriz.inTickertape (api.tickertape.in/mmi/now)1h on /current, 24h on /history

Both use Hono router, single CACHE KV binding, Linux-only CI, wrangler deploy on push to main via CLOUDFLARE_API_TOKEN + CLOUDFLARE_ACCOUNT_ID org secrets. No auth, 60 req/min/IP via Cloudflare built-in rate-limit.

Why standalone Workers, not folded into api.oriz.in

Each gets its own 100K req/day free envelope per cf-worker-quota-mitigation step 4 (“split Workers by domain”) — adding these to the umbrella Worker would burn a single shared envelope on third-party-data routes that aren’t directly tied to oriz product code. Separate subdomain keeps them addressable, separately rate-limitable, and independently redeployable. KV gets its own namespace per Worker — clean blast radius if one upstream changes shape.

Implications

Cross-refs


Edit on GitHub · Back to index