Skip to content

Feat/interactive examples market information#152

Merged
PradeepJaiswar merged 4 commits into
masterfrom
feat/interactive-examples-market-information
May 18, 2026
Merged

Feat/interactive examples market information#152
PradeepJaiswar merged 4 commits into
masterfrom
feat/interactive-examples-market-information

Conversation

@elninad
Copy link
Copy Markdown
Contributor

@elninad elninad commented May 18, 2026

Summary

Adds two new categories to interactive_examples/Fundamentals Analysis and Market Information — mirroring the existing CLI + Streamlit pattern, so
every sub-page in the Upstox Fundamentals and Market Information docs has a runnable example.

Fundamentals Analysis (8 endpoints)

CLI scripts under interactive_examples/fundamentals/ + Streamlit branches:

  • Company Profile, Key Ratios, Balance Sheet, Income Statement, Cash Flow, Corporate Actions, Share Holdings, Competitors

Endpoints with optional query params are exposed as Streamlit filters with API defaults pre-selected:

  • Balance Sheet / Cash Flowtype (consolidated | standalone), fs (false | true)
  • Income Statementtype, time_period (yearly | quarterly), fs

When fs=true, an additional Full Statement (detailed line items) pivot table (Particular × Periods) is rendered below the summary view.

Corporate Actions now pivots event_details[] into separate columns per detail name instead of packing them into one string, so the table is readable.

Market Information (6 new + 3 existing)

New CLI scripts under interactive_examples/market_information/:

  • FII Data, DII Data, OI, Change in OI, Max Pain, PCR

Plus the existing Market Holidays / Market Timings / Exchange Status surfaced under the same Streamlit category. Each multi-param endpoint exposes every SDK
param as a filter (segment, interval, from, underlying, expiry, date, bucket, lookback) with sensible defaults — expiry/date use st.date_input (default =
today + 7 days for expiry, today for date).

Streamlit responses are flattened defensively (handles dict-of-segment shapes for FII/DII and decodes time_stamp epoch-ms → IST date) and any nested
list/dict columns are dropped before render to avoid [object] cells.

Other changes

  • test_runner.py: adds 14 new rows (6 Market Information, 8 Fundamentals) and a _next_thursday() helper for OI / Max Pain / PCR expiry defaults; category
    count bumped to 10.
  • README.md: new sections documenting both categories with sample commands.

@PradeepJaiswar PradeepJaiswar merged commit 8d0d9e4 into master May 18, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants