Browse documentation
API reference

Portfolio summary API

Plain-language digests of what changed for a portfolio or watchlist over today or the last 7 days: portfolio digests, intraday move scans, or news-only briefings.

Scope

Use Portfolio Summary when an app needs a synthesized explanation of what changed for a set of stocks, not just raw market data. Pick exposure for portfolio digests, intraday_movements for "why is this moving?" scans, and news_context for news without price commentary.

What it does

Portfolio Summary turns a list of stocks into a short, readable markdown digest. You send the symbols, and you get back an explanation of what changed and why, so you don't have to fetch news, filings, events, and prices and stitch them together yourself.

There is one endpoint, POST /v1/daily-summary/. The path says "daily", but a summary can cover up to the last 7 days.

  1. You send symbols: a plain list of tickers, or holdings with portfolio weights, plus two optional settings.
  2. Drishti gathers context: news, corporate announcements, filings, and events for each symbol over the requested days, plus price moves when the mode uses them.
  3. Drishti writes the digest in plain language, following the rules of the mode you chose.
  4. You get back `summary` and `details`: render the markdown in an email, app screen, or chat.

Get your first summary

This takes about 2 minutes with cURL and costs 5 credits. Portfolio Summary is included on every plan, including the free Sandbox plan.

Before you start

  • An API key in the `DRISHTI_API_KEY` environment variable. If you don't have one yet, follow steps 1 and 2 of the Quickstart.
  • cURL on macOS or Linux (check with curl --version), or PowerShell on Windows.

1. Ask for a summary of three stocks

curl -sS "https://developers.manasija.in/v1/daily-summary/" \
  -H "X-API-Key: $DRISHTI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mode":"intraday_movements","symbols":["RELIANCE","TCS","HDFCBANK"]}'

The request sends three symbols and asks for intraday_movements mode. That mode reports price moves as well as news, so these large, actively traded stocks almost always produce a full summary. Keep the trailing slash in /v1/daily-summary/: without it, the API answers with an empty 307 redirect.

The call takes a few seconds, because the summary is written when you ask for it.

2. Check the response

You should get a JSON object like this one, shortened here. Your summary text will differ, because it's written from today's market:

json
{
  "status": "success",
  "summary": "TCS is trading higher, up 2.0%, following its announcement of acquiring Coastal Cloud for $700 million to enhance its data and AI capabilities. The stock closed yesterday at -0.1%.\n\nReliance is currently up 1.1%. ...\n\nHDFC Bank is trading at -0.1%. ...",
  "details": {
    "portfolio_size": 3,
    "submitted_symbol_count": 3,
    "symbols_processed": 3,
    "request_id": "req_202610211037225991",
    "mode": "intraday_movements",
    "input_type": "watchlist",
    "context_window_days": 1
  },
  "error": null
}

"status": "success" and a non-empty summary mean it worked. You've generated your first portfolio summary.

If it fails

cURL prints the error body; PowerShell shows the HTTP status and the same body.

You seeFix
unauthorized / Invalid API key (401)The key is mistyped, or DRISHTI_API_KEY isn't set in this terminal. Repeat step 2 of the Quickstart.
insufficient_credits (402)The account has fewer than 5 credits. Check usage in the platform console.
forbidden / Product 'daily-summary' is not enabled for this key (403)This key's product scope leaves out Portfolio Summary. Create a key with it enabled in the platform console.
validation_error (422)Your shell changed the JSON body. Copy the command again exactly as shown.
"status": "success_no_signal"The request worked, but nothing new was found for those symbols. It wasn't billed. Add more symbols, or add "context_window_days": 3 to the body.

Read the response

Every successful call returns the same four fields:

FieldWhat it meansWhat to do with it
statussuccess, success_no_news, or success_no_signal.Check it first. Only success is a real digest, and only success is billed.
summaryMarkdown text, usually one short paragraph per symbol, separated by blank lines (\n\n). For the two no-signal statuses, it's a one-sentence fallback such as "No significant news ... found for the selected symbols today."Render it as markdown. For no-signal statuses, show the fallback or your own "nothing new today" message.
detailsFacts about the request: how many symbols you sent, how many made it into the summary, the mode and window actually used, and a request_id.Log request_id for support. Use symbols_processed to tell how many of your symbols had something to report.
errorAlways null on a 200.Ignore it. Real errors use a non-200 status. See Errors.

Quiet symbols are left out of summary, so symbols_processed is often lower than submitted_symbol_count. That's expected. Field-by-field details are in Response statuses.

Build your own request

A request answers three questions. Only the first one needs an answer; the other two have defaults.

QuestionFieldYour options
Which stocks?symbols, items, or portfolio (send one)symbols: ["TCS", "INFY"] for a plain list. items or portfolio with { "symbol": "TCS", "exposure": 12.5 } objects when you know each stock's share of the portfolio (what exposure means). Use portfolio when the reader owns the stocks.
What should it focus on?mode (optional)exposure for an end-of-day portfolio digest, intraday_movements for "what is moving and why", news_context for news with no prices. See Modes.
How far back?context_window_days (optional)1 (today, the default) up to 7 (today plus the previous 6 calendar days, India time).

For example, a holdings digest after the market closes, with weights as percentages:

json
{
  "mode": "exposure",
  "portfolio": [
    { "symbol": "RELIANCE", "exposure": 18.5 },
    { "symbol": "TCS", "exposure": 12.0 },
    { "symbol": "HDFCBANK", "exposure": 9.5 }
  ]
}

And a news-only catch-up for the past week:

json
{
  "mode": "news_context",
  "symbols": ["HDFCBANK", "ICICIBANK", "KOTAKBANK"],
  "context_window_days": 7
}

The full field rules are in Input shapes.

What exposure means

exposure is how much of a portfolio's total value is held in one stock, written as a percentage. It's the number a broker app shows as a holding's allocation or weight.

To work it out: exposure = value of the holding ÷ total portfolio value × 100. For a portfolio worth ₹10,00,000 held in five stocks:

HoldingValueexposure to send
RELIANCE₹3,00,00030
TCS₹2,50,00025
INFY₹2,00,00020
ICICIBANK₹1,50,00015
HDFCBANK₹1,00,00010
Total₹10,00,000`100`
json
{
  "mode": "exposure",
  "portfolio": [
    { "symbol": "RELIANCE", "exposure": 30 },
    { "symbol": "TCS", "exposure": 25 },
    { "symbol": "INFY", "exposure": 20 },
    { "symbol": "ICICIBANK", "exposure": 15 },
    { "symbol": "HDFCBANK", "exposure": 10 }
  ]
}

When you send every holding, the weights add up to 100. They don't have to, though: you can send only the holdings you want summarised, such as just INFY and ICICIBANK at 20 and 15, and leave the rest of the portfolio out of the request.

What it changes. Exposure lets the summary say what a move means for the holder. Here's real output for INFY sent with "exposure": 20:

> Infosys closed down 2.7% today. Over the past 7 days, the stock has risen 11.1%, and over the past 30 days, it has risen 7.6%. … Given your 20.0% exposure, today's decrease represents a negative impact on your portfolio.

  • It only applies in `exposure` mode. intraday_movements and news_context ignore it and never use portfolio language.
  • Impact wording is mostly for big moves. Moves of 5% or more on the latest completed day are framed as portfolio impact. Smaller moves are mostly treated as background, though the summary may still mention your weight.
  • It doesn't choose which stocks appear or their order. A stock with no news is left out whatever its weight. When the INFY quote above was generated, the request also held ICICIBANK at 15; it had no news that day, so it didn't appear and symbols_processed was 1.
  • Send a percentage, not a fraction. 20 means 20%. 0.2 is read as 0.2%, and a move in that stock would be described as barely affecting the portfolio.
  • No weights? Leave it out. Send symbols, or items without exposure. In portfolio, a missing exposure counts as 0.

Billing: 5 credits per success response. No-signal responses and errors are free.

Modes

ModeWhat you getPick it when
exposureWhat changed for each holding, with the latest completed-day move and, when you send exposure, what the move means for the portfolio.The reader owns the stocks and wants an end-of-day portfolio digest.
intraday_movementsThe biggest live movers first, each explained by linked news when it exists. Moves without news are still reported.The question is "what is moving on my watchlist right now, and why?"
news_contextNews, filings, and events only, with no prices or percentage moves.You want a news briefing without price commentary.

If you omit mode, Drishti uses exposure for portfolio input or when any symbol has an exposure weight, and intraday_movements otherwise. See Choosing a mode for the full comparison.

Use cases

Use caseModeNotes
End-of-day portfolio email or pushexposureSend portfolio with exposure weights after market close.
Advisor client digestsexposureOne request per client portfolio, or a batch job for all clients overnight.
"Why is this stock moving?" featureintraday_movementsCall during market hours. Set context_window_days to 2 or 3 if the catalyst may be from an earlier day.
Watchlist alerts and trading-desk scansintraday_movementsSend symbols; the biggest movers are listed first.
Research notes and newslettersnews_contextNo price language, which suits research and compliance-sensitive content.
Weekly or Monday catch-upnews_contextSet context_window_days to 7 to cover the past week.

Portfolio Summary is a synthesized explanation, not a data feed. When you need the underlying records, use the News, Announcements, Earnings, or Alerts APIs directly.

Endpoints

MethodEndpointUse
POST`/v1/daily-summary/`Generate a written summary for a portfolio or watchlist, covering today or up to the last 7 days, in exposure, intraday, or news-only mode.

OpenAPI reference

The executable Scalar reference is available at https://developers.manasija.in/docs.