5paisa Demat Data API
5paisa: Demat, Stocks & IPO is the Android trading client of 5paisa Capital, the listed Indian discount broker that spun out of IIFL. Retail investors and active traders open a 3-in-1 demat-plus-trading account, then watch NSE/BSE/MCX scrips, place regular, cover, basket, VTT and stock-SIP orders, track holdings and F&O positions, browse mutual funds and live IPOs, add or withdraw rupees over UPI and netbanking, and pledge holdings or turn on Margin Plus / MTF for extra buying power. Charts (ChartIQ and TradingView), Sensibull option chains, smallcase collections, CDSL eDIS/TPIN, nominee and segment-activation flows sit around that order pad. The app is India-only — a SEBI-regulated brokerage competing with Groww, Zerodha Kite, Upstox and Angel One for the same cash-equity and derivatives crowd.
Demat lots on the holdings card revalue with LTP against NetQty and AvgRate, carrying ISIN, ScripCode, CurrentValue and Haircut for every NSE/BSE line. RMS headroom next to that book is AvailableMargin, SpanMargin, ExposureMargin and LedgerBalance; F&O nets arrive as NetQty / PnL on the positions tab, while working tickets expose OrderID, ExchOrderID, PendingQty and OrderStatus.
Primary-market rows add LotSize, BidPrice, VPA and ApplicationNo; rupee ops reuse PayoutAmount, IFSC and AccountNo. Portfolio reconcilers, pre-trade RMS gates, IPO desks and funds ops consume those fields — openData Studio turns them into callable open data.
Screenshots
API surface
The endpoints and request/response examples below are reconstructed from the app's interface — illustrative, not a live capture.
Request login OTP
POST
/v1/session/otp/requestopenbankingStarts the first-factor login: Head/Body envelope with ClientCode and MobileNo, returning Status/Message once the SMS OTP is dispatched.
Auth: None. A request code plus ClientCode / MobileNo identify the client before a session exists.
- ClientCode
- MobileNo
- EmailId
- RequestCode
- AppSource
- Status
- Message
- TimeStamp
POST /v1/session/otp/request HTTP/1.1 Content-Type: application/json { "Head": { "RequestCode": "otp.request", "AppSource": "ANDROID", "AppName": "5paisa" }, "Body": { "ClientCode": "51123456", "MobileNo": "9876543210", "EmailId": "[email protected]" } }{ "Head": { "Status": 0, "Message": "OTP sent", "TimeStamp": "2026-10-19T09:14:02+05:30" }, "Body": { "ClientCode": "51123456", "MobileNo": "9876543210", "Status": 0, "Message": "OTP sent to registered mobile" } }Login via OTP
POST
/v1/session/otp/verifyopenbankingExchanges the SMS OTP for ClientName plus JwtToken / AccessToken used as the trade session on later portfolio and order calls.
Auth: One-time password delivered by SMS in the previous step; a cookie-less variant exists for embedded web views.
- ClientCode
- OTP
- ClientName
- EmailId
- MobileNo
- JwtToken
- AccessToken
- Status
- Message
POST /v1/session/otp/verify HTTP/1.1 Content-Type: application/json { "Head": { "RequestCode": "otp.verify", "AppSource": "ANDROID" }, "Body": { "ClientCode": "51123456", "OTP": "482193", "MobileNo": "9876543210" } }{ "Head": { "Status": 0, "Message": "SUCCESS" }, "Body": { "ClientCode": "51123456", "ClientName": "PRIYA SHARMA", "EmailId": "[email protected]", "MobileNo": "9876543210", "JwtToken": "<JwtToken>", "AccessToken": "<AccessToken>", "Status": 0 } }Verify PIN and mint token
POST
/v1/session/pin/verifyopenbankingSecond factor for returning users: Pin plus ClientCode mint a fresh JwtToken for the trading session.
Auth: ClientCode plus the 4-digit Pin the user set earlier; the JwtToken from OTP login may already be attached to the session.
- ClientCode
- Pin
- JwtToken
- AccessToken
- Status
- Message
- RequestCode
POST /v1/session/pin/verify HTTP/1.1 Content-Type: application/json { "Head": { "RequestCode": "pin.verify", "AppSource": "ANDROID" }, "Body": { "ClientCode": "51123456", "Pin": "2580" } }{ "Head": { "Status": 0, "Message": "SUCCESS" }, "Body": { "ClientCode": "51123456", "JwtToken": "<JwtToken>", "AccessToken": "<AccessToken>", "Status": 0, "Message": "PIN verified" } }Margin snapshot
POST
/v1/account/margin/summaryopenbankingReads RMS headroom for the funds tab: cash versus SPAN/exposure, ledger, collateral and net available margin.
Auth: Bearer JwtToken from the PIN or OTP login, repeated in the request envelope key.
- ClientCode
- AvailableMargin
- NetAvailableMargin
- LedgerBalance
- CashMargin
- AvlbMarginCash
- SpanMargin
- ExposureMargin
- AdhocMargin
- CollateralValue
- AvlbCollateral
POST /v1/account/margin/summary HTTP/1.1 Authorization: Bearer <JwtToken> Content-Type: application/json { "Head": { "RequestCode": "margin.summary", "Key": "<JwtToken>" }, "Body": { "ClientCode": "51123456" } }{ "Head": { "Status": 0, "Message": "SUCCESS" }, "Body": { "ClientCode": "51123456", "AvailableMargin": 173000.5, "NetAvailableMargin": 152410.25, "LedgerBalance": 125000.0, "CashMargin": 125000.0, "AvlbMarginCash": 118500.0, "SpanMargin": 18400.0, "ExposureMargin": 6200.5, "AdhocMargin": 0.0, "CollateralValue": 48000.5, "AvlbCollateral": 43200.0 } }Real-time demat holdings
POST
/v1/portfolio/holdings/liveopenfinanceMarks the demat book to market for the holdings card: quantity, average, LTP, invested versus current value and haircut.
Auth: Bearer JwtToken from the PIN or OTP login.
- ScripCode
- ScripName
- Exch
- ExchType
- ISIN
- NetQty
- AvgRate
- LTP
- CurrentValue
- InvestedValue
- PnL
- Haircut
POST /v1/portfolio/holdings/live HTTP/1.1 Authorization: Bearer <JwtToken> Content-Type: application/json { "Head": { "RequestCode": "holdings.live", "Key": "<JwtToken>" }, "Body": { "ClientCode": "51123456" } }{ "Head": { "Status": 0, "Message": "SUCCESS" }, "Body": { "Holdings": [ { "ScripCode": 2885, "ScripName": "RELIANCE", "Exch": "N", "ExchType": "C", "ISIN": "INE002A01018", "NetQty": 50, "AvgRate": 2460.25, "LTP": 2512.4, "CurrentValue": 125620.0, "InvestedValue": 123012.5, "PnL": 2607.5, "Haircut": 12.5 } ] } }Order book
POST
/v1/orders/bookopenfinancePages today's working and executed orders with exchange id, remaining quantity and OrderStatus for the order-book tab.
Auth: Bearer JwtToken from the PIN or OTP login.
- OrderID
- RemoteOrderID
- ExchOrderID
- ScripCode
- ScripName
- Exch
- ExchType
- BuySell
- Qty
- TradedQty
- PendingQty
- Rate
- AtMarket
- OrderStatus
- OrderType
- ProductType
POST /v1/orders/book HTTP/1.1 Authorization: Bearer <JwtToken> Content-Type: application/json { "Head": { "RequestCode": "orders.book", "Key": "<JwtToken>" }, "Body": { "ClientCode": "51123456" } }{ "Head": { "Status": 0, "Message": "SUCCESS" }, "Body": { "OrderBookDetails": [ { "OrderID": 88451209, "RemoteOrderID": "ORD-AND-88451209", "ExchOrderID": "1100000012345678", "ScripCode": 2885, "ScripName": "RELIANCE", "Exch": "N", "ExchType": "C", "BuySell": "B", "Qty": 10, "TradedQty": 10, "PendingQty": 0, "Rate": 2510.0, "AtMarket": false, "OrderStatus": "Fully Executed", "OrderType": "LIMIT", "ProductType": "D" } ] } }Place order
POST
/v1/orders/placeopenfinanceSubmits a cash or F&O ticket from the order pad; returns broker OrderID and exchange ExchOrderID.
Auth: Bearer JwtToken from the PIN or OTP login; a separate pre-trade margin check runs before the ticket is sent.
- ClientCode
- ScripCode
- Exch
- ExchType
- BuySell
- Qty
- Rate
- AtMarket
- IsIntraday
- DisQty
- AHPlaced
- StopLossPrice
- TargetPrice
- RemoteOrderID
- OrderID
- ExchOrderID
- OrderStatus
POST /v1/orders/place HTTP/1.1 Authorization: Bearer <JwtToken> Content-Type: application/json { "Head": { "RequestCode": "orders.place", "Key": "<JwtToken>", "AppSource": "ANDROID" }, "Body": { "ClientCode": "51123456", "ScripCode": 2885, "Exch": "N", "ExchType": "C", "BuySell": "B", "Qty": 10, "Rate": 2510.0, "AtMarket": false, "IsIntraday": false, "DisQty": 0, "AHPlaced": "N", "StopLossPrice": 0, "TargetPrice": 0, "RemoteOrderID": "ORD-AND-88451210" } }{ "Head": { "Status": 0, "Message": "SUCCESS" }, "Body": { "ClientCode": "51123456", "OrderID": 88451210, "RemoteOrderID": "ORD-AND-88451210", "ExchOrderID": "1100000012345690", "OrderStatus": "Pending", "Message": "Order placed" } }Net positions
POST
/v1/portfolio/positions/netopenfinanceNets F&O and cash positions for the positions tab (net-wise), with average, LTP and mark-to-market PnL.
Auth: Bearer JwtToken from the PIN or OTP login.
- ScripCode
- ScripName
- Exch
- ExchType
- BuySell
- NetQty
- AvgRate
- LTP
- PnL
- ProductType
POST /v1/portfolio/positions/net HTTP/1.1 Authorization: Bearer <JwtToken> Content-Type: application/json { "Head": { "RequestCode": "positions.net", "Key": "<JwtToken>" }, "Body": { "ClientCode": "51123456" } }{ "Head": { "Status": 0, "Message": "SUCCESS" }, "Body": { "NetPositionDetails": [ { "ScripCode": 35001, "ScripName": "NIFTY 30OCT24 25000 CE", "Exch": "N", "ExchType": "D", "BuySell": "B", "NetQty": 75, "AvgRate": 142.5, "LTP": 156.0, "PnL": 1012.5, "ProductType": "M" } ] } }Ledger details
POST
/v1/account/ledger/entriesopenbankingReturns the rupee ledger behind Funds & Ledger: running LedgerBalance, equity split and dated credit/debit rows.
Auth: Bearer JwtToken from the PIN or OTP login.
- ClientCode
- LedgerBalance
- EQLedgerBalance
- Narration
- Amount
- TimeStamp
- FromDate
- ToDate
POST /v1/account/ledger/entries HTTP/1.1 Authorization: Bearer <JwtToken> Content-Type: application/json { "Head": { "RequestCode": "ledger.entries", "Key": "<JwtToken>" }, "Body": { "ClientCode": "51123456", "FromDate": "2026-10-01", "ToDate": "2026-10-19" } }{ "Head": { "Status": 0, "Message": "SUCCESS" }, "Body": { "ClientCode": "51123456", "LedgerBalance": 125000.0, "EQLedgerBalance": 118500.0, "LedgerDetails": [ { "Narration": "Payin UPI", "Amount": 25000.0, "LedgerBalance": 125000.0, "TimeStamp": "2026-10-18T11:02:14+05:30" } ] } }Open IPO issues
POST
/v1/ipo/issues/openopenfinanceLists live IPO / FPO issues for the IPO tab: lot size, bid band, category and cutoff flag before a UPI mandate.
Auth: Bearer JwtToken from the PIN or OTP login (guest browsing may omit it on some IPO cards).
- ScripName
- Category
- BidPrice
- LotSize
- CutOff
- ISIN
- ApplicationNo
- Status
- Message
POST /v1/ipo/issues/open HTTP/1.1 Authorization: Bearer <JwtToken> Content-Type: application/json { "ClientCode": "51123456", "Category": "INDIVIDUAL" }{ "Status": 0, "Message": "SUCCESS", "Issues": [ { "ScripName": "NEXUS SELECT TRUST", "Category": "INDIVIDUAL", "BidPrice": 100.0, "LotSize": 150, "CutOff": true, "ISIN": "INE0NDH01011", "ApplicationNo": null } ] }Submit IPO bid
POST
/v1/ipo/bidsopenfinancePlaces a UPI-blocked IPO bid and returns ApplicationNo for the live-IPO / past-bids screens.
Auth: Bearer JwtToken from the PIN or OTP login; the UPI VPA is validated in a separate step first.
- ClientCode
- ScripName
- Category
- BidPrice
- Qty
- LotSize
- CutOff
- VPA
- ApplicationNo
- Status
- Message
POST /v1/ipo/bids HTTP/1.1 Authorization: Bearer <JwtToken> Content-Type: application/json { "ClientCode": "51123456", "ScripName": "NEXUS SELECT TRUST", "Category": "INDIVIDUAL", "BidPrice": 100.0, "Qty": 150, "LotSize": 150, "CutOff": true, "VPA": "priya@okaxis" }{ "Status": 0, "Message": "Bid submitted", "ApplicationNo": "NXT8812345", "ScripName": "NEXUS SELECT TRUST", "BidPrice": 100.0, "Qty": 150, "VPA": "priya@okaxis" }Funds payout
POST
/v1/funds/withdrawalsopenbankingWithdraws withdrawable rupees to the mapped bank account from the add/withdraw-funds flow.
Auth: Bearer JwtToken from the PIN or OTP login; the destination bank row comes from the mapped-bank lookup.
- ClientCode
- PayoutAmount
- BankName
- AccountNo
- IFSC
- Status
- Message
POST /v1/funds/withdrawals HTTP/1.1 Authorization: Bearer <JwtToken> Content-Type: application/json { "Head": { "RequestCode": "funds.withdraw", "Key": "<JwtToken>" }, "Body": { "ClientCode": "51123456", "PayoutAmount": 25000.0, "BankName": "HDFC BANK", "AccountNo": "50100012345678", "IFSC": "HDFC0000123" } }{ "Head": { "Status": 0, "Message": "SUCCESS" }, "Body": { "ClientCode": "51123456", "PayoutAmount": 25000.0, "BankName": "HDFC BANK", "AccountNo": "50100012345678", "IFSC": "HDFC0000123", "Status": 0, "Message": "Payout requested" } }Pay-in details
POST
/v1/funds/deposit-instructionsopenbankingReturns the UPI VPA and mapped bank coordinates used to fund the trading ledger.
Auth: Bearer JwtToken from the PIN or OTP login.
- ClientCode
- VPA
- BankName
- AccountNo
- IFSC
- Status
- Message
POST /v1/funds/deposit-instructions HTTP/1.1 Authorization: Bearer <JwtToken> Content-Type: application/json { "Head": { "RequestCode": "funds.deposit", "Key": "<JwtToken>" }, "Body": { "ClientCode": "51123456" } }{ "Head": { "Status": 0, "Message": "SUCCESS" }, "Body": { "ClientCode": "51123456", "VPA": "51123456@fivepaisa", "BankName": "HDFC BANK", "AccountNo": "50100012345678", "IFSC": "HDFC0000123", "Status": 0 } }Market depth
POST
/v1/quotes/depthopendataReturns the 20-depth ladder and last trade for a scrip on the quote sheet.
Auth: Bearer JwtToken or a short-lived chart token issued by the app's market-data session.
- ScripCode
- Exch
- ExchType
- LTP
- Qty
- Rate
- BuySell
- Status
POST /v1/quotes/depth HTTP/1.1 Authorization: Bearer <JwtToken> Content-Type: application/json { "ClientCode": "51123456", "ScripCode": 2885, "Exch": "N", "ExchType": "C" }{ "Status": 0, "ScripCode": 2885, "Exch": "N", "ExchType": "C", "LTP": 2512.4, "Qty": 18420, "BuySell": [ { "Rate": 2512.0, "Qty": 120 }, { "Rate": 2511.5, "Qty": 340 } ] }
Data categories
- holdings
- positions
- orders
- margins
- ledger
- ipo
- funds
- quotes
Where teams use this data
Nightly demat reconciliation
A family-office book maps ScripCode / ISIN / NetQty / AvgRate / CurrentValue from the holdings call onto the custodian file and flags Haircut or PnL drift before the cash market open.
Pre-trade RMS gate
An execution bot reads AvailableMargin, SpanMargin and ExposureMargin, then posts OrderRequest only when NetAvailableMargin covers Qty times Rate for the chosen ProductType.
IPO bid desk
A primary-market workflow lists open issues (LotSize, BidPrice, CutOff), submits a UPI VPA bid, and stores ApplicationNo against the client ledger.
Funds ops on the rupee rail
Ops pulls LedgerBalance plus pay-in VPA/IFSC and drives FundsPayout PayoutAmount to the mapped AccountNo, matching each row back to the ledger narration.
Frequently asked questions
How does 5paisa authenticate trading calls?
Login starts with ClientCode plus MobileNo on the OTP request call, then the OTP verification call returns JwtToken and AccessToken. Returning users confirm a four-digit Pin to mint a fresh JwtToken. Later portfolio, order and payment calls attach that JwtToken as a Bearer credential.
Which fields describe holdings and margin?
The live holdings call returns ScripCode, ISIN, NetQty, AvgRate, LTP, CurrentValue, InvestedValue, PnL and Haircut. The margin snapshot splits AvailableMargin, NetAvailableMargin, LedgerBalance, CashMargin, SpanMargin, ExposureMargin, AdhocMargin and collateral.
Can I read orders and positions, not just balances?
Yes. The order book pages OrderID, ExchOrderID, BuySell, Qty, TradedQty, PendingQty and OrderStatus. The net positions call nets F&O and cash with NetQty, AvgRate, LTP and PnL. The place-order call is the write that creates those tickets.
Where do IPO bids and rupee payouts live?
Open issues come from the IPO issues call (LotSize, BidPrice, CutOff). The bid call posts VPA and returns ApplicationNo. The withdrawal call sends PayoutAmount to BankName / AccountNo / IFSC; the deposit-instructions call returns the inbound VPA for UPI add-funds.
Apps similar to 5paisa: Demat, Stocks & IPO
- Groww — Groww is an Indian stock broker whose app opens a paperless demat-and-trading account and covers NSE/BSE stocks, ETFs, IPOs, futures and options, commodities and direct mutual funds.
- Zerodha Kite — Zerodha is an Indian online broker whose Kite app trades stocks, IPOs, derivatives, commodities and ETFs, with commission-free direct mutual funds through Coin.
- Upstox Stocks IPO Mutual Funds — Upstox is an Indian online broker (RKSV Securities) whose app covers stocks, mutual funds, IPOs, futures and options, commodities and currency trading on NSE, BSE and MCX.
- Angel One: Stocks, Mutual Fund — Angel One is a SEBI-registered Indian broker whose app places NSE/BSE/MCX equity, F&O, commodity and currency orders and also covers mutual funds and IPOs.
- IIFL : Stocks, Demat & IPOs — IIFL Capital (formerly IIFL Securities) is a SEBI-registered Indian full-service broker whose Markets app covers NSE/BSE/MCX stocks, F&O, IPOs, mutual funds and a demat account.
- INDmoney: US Stocks, F&O, IPO — INDmoney is a Gurugram SEBI-registered broker whose app trades NSE/BSE stocks, F&O, commodities and IPOs and also buys US stocks, ETFs, mutual funds and NPS from one account.
- Paytm Money — Paytm Money is a SEBI-registered Indian broker whose wealth app covers equities, futures and options, direct mutual funds, ETFs, IPOs and the National Pension System.
- Dhan — Dhan is an Indian SEBI-regulated broker (Raise Securities) whose app trades stocks, F&O, commodities, ETFs and mutual funds and lets clients apply for IPOs.
Topics
- 5paisa API
- 5paisa holdings
- 5paisa margin
- demat NetQty
- SPAN AvailableMargin
- 5paisa order book
- 5paisa IPO bid
- JwtToken ClientCode
Need this app's data API integrated?
We deliver scoped integrations for any named app — from USD 500 with source-code handoff, or hosted access billed per call. Tell us the data you need.
- NDA + SOW on every engagement
- Delivery in 3–7 days
- Payment only after acceptance
- Work scoped to authorized use