בס״ד

MIS v2 — Setup & Keys (iPad-friendly, copy-paste)

docs/MIS_V2_SETUP_AND_KEYS.md · last changed (pre-VM history) · rendered from GitHub master

MIS v2 — Setup & Keys (iPad-friendly, copy-paste)

Two quick steps that (1) let Claude Code run the engine without you clicking Run/Deploy, and (2) unlock robust earnings + market-cap. Both doable from an iPad browser in ~2 minutes. Nothing goes in git or in a cell — keys live in Script Properties only.

✅ STEP 1 — Deploy the run-endpoint (one-time, ~1 min) → I run the engine over HTTP, no clicking

(clasp run needs a heavy Google Cloud setup, so we use a token-gated web endpoint instead — same as your bot. The doGet runner + webapp config are already pushed.)

  1. MIS v2 sheet → Extensions → Apps Script → ⚙ Project SettingsScript PropertiesAdd:
    - Property: RUN_TOKEN Value: mv2-run-7Kq9xP2Lz (or any value you pick)Save.
  2. Top-right Deploy → New deployment → select type Web appExecute as: Me · Who has access: AnyoneDeploycopy the Web app URL (ends in /exec).
  3. Paste me that URL (and the token if you changed it). Then I call …/exec?token=…&fn=all to run setup+FSE, &fn=verify to check, &fn=state to read — zero clicking, and I see the results.

✅ STEP 2 — Add your Finnhub key (unlocks robust earnings + market cap)

This is the same key already in your old MIS sheet's CONTROL tab as EARNINGS_API_KEY.

  1. Open the MIS v2 sheet → Extensions → Apps Script.
  2. Left rail → Project Settings (the ⚙ gear).
  3. Scroll to Script PropertiesAdd script property:
    - Property: FINNHUB_API_KEY
    - Value: (paste your Finnhub key)
  4. Save script properties. That's it — never put it in a cell or commit it.

(To find the key on the iPad: open the old MIS sheet → CONTROL tab → the EARNINGS_API_KEY row → copy the value.)

⏭ STEP 3 (later, not now) — Schwab (live positions, Phase 5)

When we wire live positions: SCHWAB_CLIENT_ID, SCHWAB_CLIENT_SECRET, SCHWAB_ACCOUNT_HASH → same Script Properties spot. Heads-up: Schwab's refresh token expires every 7 days (re-auth cadence). Not needed for the build; flagged so you know it's coming.

What each unlocks

You do I can then do
Step 1 (API toggle) Run setupMisV2, misV2BuildFSE, verifyMisV2, bot functions remotely — zero clicking from you
Step 2 (Finnhub key) Wire robust multi-source earnings + market-cap buckets into the engine
Step 3 (Schwab, later) Live broker positions feeding HOLDINGS_CLEAN + REDUCE/EXIT

Setup card · 2026-05-27 · Claude Code. Do Step 1 + 2 from the iPad; reply "API on" and I take it from there.

Source trail · docs/MIS_V2_SETUP_AND_KEYS.md @ master · rendered 2026-07-02 7:23 PM EDT by scripts/build-docs.py · the .md in the repo is the truth; this page is the phone-readable view