Oracle3
Oracle3: 예측시장 거래 엔진·MCP 서버
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
A personal dashboard that recalculates each Indian mutual fund AMC's equity AUM in near-real-time by
repricing their disclosed holdings against live market data (DHAN API), instead of relying solely on
the once-a-month reported figure.README 전문 보기 ↗A personal dashboard that recalculates each Indian mutual fund AMC's equity AUM in near-real-time by repricing their disclosed holdings against live market data (DHAN API), instead of relying solely on the once-a-month reported figure.
2026-06).price × shares. US-listed holdings (ISIN starting US) are priced separately via Finnhub +
USD/INR conversion (see below). G-Secs, other-country foreign holdings, and anything neither source
can price fall back to their last reported value.Reported AUM − Σ(all disclosed holdings' value) and carried forward unchanged, since there's no
live feed for cash/receivables. In practice this dataset already itemizes cash-equivalents (Net
Current Asset, TREPS) as disclosed holdings, so the residual is usually ~₹0.DHAN access tokens expire every ~24 hours. Both the access token and the client ID it's paired
with are stored in the database (app_settings table), editable together from the /admin page
without a redeploy — the DHAN_CLIENT_ID env var is now only a fallback default used until something's
been saved there. Each day:
/admin on your deployed app and paste the new token into the DHAN credentials card. If you
generated it under a different DHAN account than the one already configured, update the Client ID
field too — a token only works with the client ID it was generated under, and saving a pair DHAN
rejects is blocked by a live test call before anything is persisted.If the token expires and isn't refreshed, the app keeps working — it just falls back to last-reported values for every holding and shows a banner saying pricing is unavailable.
Note on /admin: this page and its API routes (/api/admin/*) are gated behind a shared secret
(ADMIN_SECRET) — enter it once at /admin and it's remembered in this browser (localStorage)
across restarts until you explicitly log out or clear site data, so the daily token-refresh workflow
above stays just as quick as visiting the page directly. The Client ID is also encrypted at rest
(app_settings table) and only ever shown/returned masked (last 4 characters) — the DHAN access token
itself is never returned by any endpoint at all, only a "configured/updated" status.
~169 holdings across all AMCs are US-listed equities (Amazon, Microsoft, etc., held in global/feeder sleeves) — about 0.9% of total industry AUM. These are priced independently of DHAN:
npm run sync-foreign-instruments resolves each US ISIN to a Finnhub ticker symbol via their
symbol-search endpoint (it accepts ISIN directly, no manual ticker mapping needed) and stores the
mapping in foreign_instrument_map..github/workflows/refresh-foreign-prices.yml) runs
once a day, ~2h after US markets close, fetching each mapped symbol's latest quote from Finnhub and
the current USD/INR rate from ExchangeRate-API, caching both in Postgres. This runs in GitHub
Actions rather than Vercel Cron because refreshing ~169 symbols at Finnhub's free-tier rate limit
(60/min) takes a few minutes — longer than Vercel's serverless function timeout allows.Setup: get a free Finnhub API key at finnhub.io/register (no card
required) and set FINNHUB_API_KEY. For the GitHub Actions workflow to run, add DATABASE_URL and
FINNHUB_API_KEY as repository secrets (Settings → Secrets and variables → Actions).
Create a free Postgres database at neon.tech (or via Vercel's Storage tab → Create Database → Neon), and copy its connection string.
cp .env.example .env.local
# fill in DATABASE_URL, ADMIN_SECRET, SETTINGS_ENCRYPTION_KEY, DHAN_CLIENT_ID
npm install
npm run db:generate # generate SQL migration from src/lib/db/schema.ts
npm run db:migrate # apply it to your database
npm run import -- "/path/to/your/tracker.xlsx"
This parses the workbook and populates amcs, amc_periods, and holdings. Re-run this (or use the
Excel upload button on /admin) each month with the new file.
DHAN_CLIENT_ID in your env as a fallback default — optional once you've saved a client ID
from /admin, since the database value takes precedence from then on./admin (see above) — the token
rotates daily, the client ID rarely if ever.npm run sync-instruments
Re-run this weekly, or after each monthly import, to pick up newly listed/relisted stocks.
npm run dev
Visit http://localhost:3000 for the dashboard and http://localhost:3000/admin for settings.
This repo is connected to Vercel via GitHub — pushes to main deploy automatically. To set this up
from scratch on a new project:
.env.example (DATABASE_URL, ADMIN_SECRET,
SETTINGS_ENCRYPTION_KEY, DHAN_CLIENT_ID, CRON_SECRET) in the Vercel project settings.
DATABASE_URL is set automatically if you provision Postgres via Vercel's Neon marketplace
integration.vercel.json configures the daily-snapshot cron (/api/cron/daily-snapshot) to run twice
— 4:00 PM and 6:00 PM IST, both after the 3:30 PM market close — so a DHAN blip on the first run
(rate limit, transient error) gets corrected by the second instead of freezing that day's chart
point until the next manual audit. The route's overwrite-on-conflict write means either run can
safely follow the other. Vercel automatically sends CRON_SECRET as a bearer token to authenticate it.DATABASE_URL (or
use the /admin upload button once deployed) to seed data, then run the instrument sync.next-themes for dark mode,
recharts for the AUM trend charts.neon-http driver for fast read-heavy routes,
neon-serverless (pooled) driver for the one path that needs real transactions (import).xlsx (SheetJS), reading fixed row/column offsets verified against the real
workbook, with a fallback header-row scanner that throws loudly if a future export shifts rows.src/lib/dhan/ — instrument-master sync (ISIN → security ID, refreshed
manually), and a batched/chunked LTP client that degrades to fallback pricing on any failure rather
than breaking the whole computation.src/lib/finnhub/, src/lib/fx/, src/lib/aum/foreign-pricing.ts
— prices the ~169 US-listed holdings independently of DHAN, refreshed daily via GitHub Actions.src/lib/aum/compute-live-aum.ts — dedupes ISINs across all AMCs before
calling DHAN (a stock held by 40 funds is priced once, not 40 times), caches the result in-memory
for ~45s, and writes an idempotent daily snapshot as a side effect.src/lib/aum/backfill.ts used DHAN's historical EOD-close API to fill in
daily AUM for every trading day between the last report period and whenever live collection started,
so the "Avg AUM since last report" figure and trend charts aren't limited to just a few days of data.Deliberately deferred:
data/amc-name-map.json is a manually curated mapping between Overview names and sheet tab names
(they don't match 1:1, especially for SIF products). If a future export renames or adds/removes an
AMC, the importer will fail loudly rather than silently dropping data — update that file to match.