Broker API Comparison: Positions

What each Indian broker API reports on an open position, based on the data we receive in live use.

Position dataBased on live data
In short

When you trade through an API you rely on the broker to tell you where you stand, and four numbers matter most on a position: total profit and loss, today's profit and loss, what you have already booked, and what is still open. Not every broker sends all four. A few send the full set, many send only one or two, and some send none at all, leaving every figure to be worked out from the price. A fifth field matters for commodity contracts: the contract multiplier. Without it a profit or loss can be wrong by ten or a hundred times. This page is based on the position data we actually receive from each API in live use, not on what the documentation claims, because on positions the two do not always agree.

When you trade through an API, you rely on the broker to tell you where you stand. Four numbers matter most on a position:

FieldWhat it tells you
PnLYour total profit or loss since you opened the position
M2MToday’s profit or loss, measured from yesterday’s closing price
RealisedProfit or loss you have already booked by closing part of the position
UnrealisedProfit or loss still open, on paper

A fifth field matters if you trade commodity contracts: the contract multiplier. Some commodity contracts are priced for a different unit than the one your quantity is counted in, so without the multiplier a profit or loss value can be out by ten or a hundred times.

See Why AT PnL is different from M2M for how PnL and M2M differ.

This page is based on the position data we actually receive from each API in live use, not on what the documentation claims. On positions the two do not always agree — some brokers send more fields than their documentation shows, and some send fewer.

✅ provided · ⚠️ provided with a limitation · ❌ not provided

What each broker API sends on a position

Ordered from the most complete to the least. The four profit-and-loss columns were re-checked against each API in July 2026.

BrokerPnLM2MRealisedUnrealisedMultiplierOvernight qtyDAY + NET
Zerodha
Nuvama
Sharekhan
Angel One⚠️
Fyers
Upstox
AliceBlue
Zebu
Finvasia (Shoonya)
Shared platform — Kambala
5paisa⚠️
Dhan
Mastertrust
IIFL
Motilal
Groww
SAS Online (Stocko)
Kotak
Shared platform — Symphony XTS
Choice

DAY + NET means the API returns the day’s trading activity and the overall net position as two separate sets. A ❌ means it does not — it either sends only the net set, or folds today’s and carried-forward figures into a single record — so a clean day-only view has to be worked out. Many ❌ brokers are still perfectly usable this way (see the note further down).

Ask your broker to send these numbers

If your broker leaves fields blank in the table above, you can ask them to fill the gap. The more account holders who ask, the sooner a broker adds the data. Below is a short email you can copy, fill in with your details, and send to your broker’s API or developer support team. It asks for all four profit and loss figures on every open position.

Subject: Please add profit & loss fields to the positions API

Hello,

I trade through your API using a third-party platform, and I track my open positions there. Your positions (or portfolio) API does not currently return the profit and loss figures for each position. Could you please add these four fields to the response, for every open position?

  1. Total P&L (pnl) — the overall profit or loss on the position since it was opened.
  2. M2M (mtm) — today’s profit or loss, measured from the previous day’s closing price.
  3. Realised P&L (realized_pnl) — profit or loss already booked by closing part of the position.
  4. Unrealised P&L (unrealized_pnl) — profit or loss still open on the remaining quantity.

For each figure, please also confirm what it is measured from — the entry price or the previous close — so it can be read correctly. If any of these already exist under a different name, or need a setting to be switched on, please let me know.

Getting these directly from your API means my profit and loss is accurate and matches what I see in your own platform, without having to be worked out again.

Thank you, [Your name] — client id [your account / client id]

Once your broker adds these fields, AutoTrader Web shows the broker’s own numbers automatically. Until then, AutoTrader Web calculates any figure your broker leaves out and shows it in the AT PnL column, so your positions screen is always complete.

Why your broker should send these numbers

Our system fills every gap — so why does it matter? Because the broker is the right place for these numbers to come from, and working them out from the outside is harder and less reliable than it looks.

  • The broker owns the rules. Profit and loss is not one fixed formula. It depends on your exact trades, the cost basis, the previous day’s close and each contract’s own rules — all of which the broker holds. The broker already works it out for its own app; sending it through the API is just sharing a number it already owns and is responsible for.
  • Overnight positions cannot be rebuilt from outside. For a position carried from an earlier day, today’s M2M is measured from yesterday’s close, not the price you first paid — and you need the carried quantity and value kept separate from today’s trades. Most APIs do not send those pieces, so the day figure cannot be rebuilt correctly.
  • Commodity contracts need the contract multiplier. Some contracts are priced for a different unit than the quantity is counted in. Without the exact multiplier the broker uses, a profit or loss can come out ten, a hundred or a thousand times wrong. The broker knows it for every contract; an outside calculation has to guess.
  • Booked versus open needs trade history. Splitting realised from unrealised correctly needs the full trade history and cost basis, which the broker has and an API user usually does not. From net quantities and average prices alone, the split cannot be reproduced exactly.
  • Without a formula, everyone guesses differently. Asking every API user to work profit and loss out from the last traded price, with no formula and no inputs, means each one rebuilds the broker’s own rules a little differently. One question with a single correct answer at the broker turns into many different answers.
  • One calculation, not thousands of copies. The broker computes this once, internally. Leaving it out pushes the same logic onto every API user to rebuild and maintain — duplicated work, and a duplicated chance to get it wrong. Good software keeps the calculation where the data and the rules live, and lets everyone read one trusted figure that matches the broker’s own app.

The brokers that already send all four fields show it is entirely doable. Sending profit and loss is not an extra — it is the broker completing the position data it is responsible for.

Which broker API is the most complete on positions

Zerodha, Nuvama and Sharekhan send all four profit and loss figures. Zerodha and Nuvama are the most complete overall: both send a genuinely separate M2M — a day value that actually differs from the total PnL on a position carried from an earlier day — plus the contract multiplier, and Nuvama also gives a break-even price. Sharekhan sends all four figures but not the contract multiplier.

Blind on profit and loss. Kotak, Choice and the Symphony XTS platform send none of the four figures — every number has to be worked out from the price.

Only the booked figure. Several APIs send just the realised figure and nothing else on the profit-and-loss side: Mastertrust, IIFL, Motilal, Groww and SAS Online.

The most common single gap is the total PnL. AliceBlue, Zebu, Finvasia, the whole Kambala group and 5paisa send today’s figure and the booked and open split, but not a single total profit and loss since the position was opened.

A common gap — the contract multiplier. Fyers, Upstox, Sharekhan, AliceBlue, Zebu, Motilal, Groww and the whole Kambala group do not send it. This only matters for commodity contracts, but when it matters it matters a lot.

A common gap — a separate M2M. Angel One, Fyers, Upstox, Kotak, Mastertrust and several others do not send a distinct day figure. AutoTrader Web computes a proper M2M for you and shows it in the AT PnL column.

Beyond the four core numbers

Some APIs go further than the table above. These extras are worth knowing if you compare positions across brokers.

Buy and sell values. Most APIs send the total value bought and sold, which lets an average price be checked rather than trusted. A few send only quantities and prices, leaving the value to be multiplied out.

Average prices. Nearly all APIs send a buy and sell average. Two things to watch: Kotak returns amounts and leaves the average to be derived, using a scaling formula the broker supplies rather than a simple division. And on AliceBlue the fields that look like buy and sell prices are the last traded prices, not averages — using them as averages would be wrong.

Break-even price. Only Nuvama and the Symphony XTS platform send one directly.

Day, carry-forward and net as separate columns. Several APIs that do not send separate DAY and NET sets instead break each row into today’s quantity and carried-forward quantity side by side. That carries the same information in one pass, which is why some brokers marked ❌ on DAY + NET are still perfectly usable.

Two multipliers, not one. The Kambala platform sends both a contract multiplier and a separate price factor, and both are needed for a correct figure on currency and commodity contracts. Using only one gives a wrong number.

What we do about the gaps

You should not have to care which fields your broker leaves out — especially if you run accounts across several brokers and want to compare them fairly.

So where a broker does not send a value, our system calculates it from your position data and live prices, and shows it in the AT PnL column alongside whatever the broker sent. That way the same columns are available for every account on one screen, whichever broker it belongs to.

You can see both side by side on the Positions screen and compare them yourself.

Frequently asked questions

Which Indian broker API gives the best position data?

Zerodha, Nuvama and Sharekhan send all four profit and loss figures — total PnL, M2M, realised and unrealised. Zerodha and Nuvama go furthest overall: both also send a genuinely separate M2M (a real day value, not a repeat of the total) and the contract multiplier, and Nuvama gives a break-even price too. Most other APIs send some of the four but not all, and a few send none, leaving every figure to be worked out from the price.

What is the contract multiplier and why does it matter?

Some commodity contracts are priced for a different unit than the one your quantity is counted in. The multiplier bridges the two. If an API does not send it and it is assumed to be one, a profit or loss figure can be wrong by ten or a hundred times. It only matters for commodity contracts, but when it matters it matters a lot. Several broker APIs do not send it.

Why does my M2M sometimes look the same as my total profit and loss?

On an intraday position the two are the same by definition — nothing was carried from a previous day, so today is the whole life of the position. They only differ on a position held from an earlier day, where M2M measures just today's move from yesterday's close. If your broker's API does not send a separate M2M, AutoTrader Web calculates a proper day figure for you and shows it in the AT PnL column.

Can I ask my broker to send the missing profit and loss fields?

Yes. If your broker's API leaves some fields blank, you can ask their API or developer support team to add them. This page has a short ready-to-send email you can copy, listing the four fields to request: total PnL, M2M, realised and unrealised. The more account holders who ask, the sooner a broker fills the gap. Until then, AutoTrader Web calculates any missing figure for you and shows it in the AT PnL column.

Next steps

Was this page helpful?

Last updated 24 July 2026