Upstox Data API: Holdings and Margin
Upstox Stocks IPO Mutual Funds is the Android trading client of Upstox (RKSV Securities India Private Limited), the Indian discount broker. Retail investors and active traders open a demat-plus-trading account, then watch NSE/BSE/MCX scrips, place regular, basket and GTT-style orders, track holdings and F&O positions, run stock SIPs, browse mutual funds and live IPOs, add or withdraw rupees over UPI, Google Pay and netbanking, and pledge holdings for extra margin. Charts, option chains, MTF, eDIS CDSL flows, UpLearn sessions and a funds wallet sit around that order pad. The app is India-only — SEBI-regulated brokerage competing with Groww, Zerodha Kite, Angel One and 5paisa.
SEC and COM cash buckets pin availableToTrade.total against spanExposure, cashMargin and availableToWithdraw on the funds card. Demat lines then stamp instrumentKey, netAvgPrice, cncUsedQty and collateralQty with a haircut that pledge tickets read.
Net-worth rows split internalValue from externalInvestedValue; mutual-fund lots add xirr, currNav and units; live IPO cards carry ipoRefId, isin and totalSubscription; UPI credits land as txnid / customerRefId / status, while NEFT withdrawals keep withdrawalId and paymentMode. Back-office recon, capital-gains worksheets and IPO-allotment monitors 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.
Funds and trading limits
POST
/v1/account/funds/snapshotopenbankingReads the funds card split into SEC (securities) and COM (commodity) buckets: cash available to trade, SPAN/cash/MTF margin used, opening cash with pay-in/payout, and rupees available to withdraw.
Auth: Bearer access token issued after the OTP + PIN sign-in.
- SEC
- COM
- cash
- collateral
- availableToWithdraw
- availableToTrade
- openingCash
- marginUsed
- spanExposure
- cashMargin
- premiumPresent
- fnoSettlement
- mtf
- openingBalance
- payinAmount
- payoutAmount
- deliveryCredit
- unpaidCharges
- totalCash
- unavailableToWithdraw
- isSuccess
- isCache
POST /v1/account/funds/snapshot HTTP/1.1 Authorization: Bearer <access_token> Content-Type: application/json {}{ "data": { "SEC": { "cash": { "total": 125000.0, "availableToTrade": { "total": 118500.0, "openingCash": { "total": 125000.0, "openingBalance": 110000.0, "payinAmount": 20000.0, "payoutAmount": 5000.0, "deliveryCredit": 0.0, "unpaidCharges": 0.0 }, "marginUsed": { "total": 24600.5, "spanExposure": 18400.0, "cashMargin": 6200.5, "premiumPresent": 0.0, "fnoSettlement": 0.0, "mtf": 0.0 } } }, "availableToWithdraw": { "total": 118500.0, "totalCash": 125000.0, "unavailableToWithdraw": 6500.0 } }, "COM": { "cash": { "total": 0.0, "availableToTrade": { "total": 0.0 } } } }, "isSuccess": true, "isCache": false }Demat holdings
GET
/v1/account/positions/dematopenfinanceLists active and inactive demat lots for the holdings card: instrumentKey, buy/sell qty and value, net average, CNC used qty, pledged collateral qty and haircut.
Auth: Bearer access token issued after the OTP + PIN sign-in.
- active
- inactive
- hasInactiveHoldings
- instrumentKey
- usedQty
- status
- exchange
- token
- symbol
- buyQty
- buyValue
- sellQty
- sellValue
- netAvgPrice
- netAmt
- cncUsedQty
- collateralQty
- haircut
GET /v1/account/positions/demat?metadata=true HTTP/1.1 Authorization: Bearer <access_token>{ "data": { "active": [ { "instrumentKey": "NSE_EQ|INE002A01018", "usedQty": 50, "status": "ACTIVE", "instruments": [ { "exchange": "NSE", "token": "2885", "symbol": "RELIANCE", "instrumentKey": "NSE_EQ|INE002A01018" } ], "netInfo": { "buyQty": 50, "buyValue": 123012.5, "sellQty": 0, "sellValue": 0.0, "netAvgPrice": 2460.25, "netAmt": 123012.5 }, "additionalInfo": { "cncUsedQty": 50, "collateralQty": 10, "haircut": 12.5 } } ], "inactive": [], "hasInactiveHoldings": false }, "isSuccess": true }Portfolio net worth
GET
/v1/account/wealth/overviewopenfinanceReturns overall net worth split into in-app (internal) versus linked external holdings, with yesterday's values for the home-screen day change.
Auth: Bearer access token issued after the OTP + PIN sign-in.
- assets
- netWorth
- internalValue
- internalValue1DayAgo
- internalInvestedValue
- externalValue
- externalValue1DayAgo
- externalInvestedValue
GET /v1/account/wealth/overview HTTP/1.1 Authorization: Bearer <access_token>{ "data": { "assets": {}, "netWorth": { "internalValue": 268910.5, "internalValue1DayAgo": 265200.0, "internalInvestedValue": 251240.0, "externalValue": 42000.0, "externalValue1DayAgo": 41250.0, "externalInvestedValue": 40000.0 } }, "isSuccess": true }Mutual-fund portfolio summary
GET
/v1/funds/portfolio/overviewopenfinanceSummarises the mutual-fund book: invested versus current value, total and today's P&L, last update time and whether a first order is still in flight.
Auth: Bearer access token issued after the OTP + PIN sign-in.
- invested
- currentValue
- pnl
- totalPL
- todayReturns
- lastUpdatedAt
- breakdown
- isFirstOrderInProgress
- amount
- percentage
GET /v1/funds/portfolio/overview HTTP/1.1 Authorization: Bearer <access_token>{ "data": { "invested": 80000.0, "currentValue": 86420.5, "pnl": 6420.5, "totalPL": 6420.5, "todayReturns": { "amount": 210.0, "percentage": 0.24 }, "lastUpdatedAt": "2026-10-20T15:30:00+05:30", "isFirstOrderInProgress": false }, "isSuccess": true }Mutual-fund holdings
GET
/v1/funds/portfolio/schemesopenfinanceLists per-scheme mutual-fund lots with units, current versus average NAV, XIRR, internal/external flags and today versus total returns.
Auth: Bearer access token issued after the OTP + PIN sign-in.
- investedValue
- currentValue
- xirr
- currNav
- avgInvestedNav
- units
- hasInternal
- hasExternal
- todayReturns
- totalReturns
- folios
- holdingBreakdowns
- transactionHistory
GET /v1/funds/portfolio/schemes HTTP/1.1 Authorization: Bearer <access_token>{ "data": [ { "investedValue": 25000.0, "currentValue": 27120.0, "xirr": "12.4", "currNav": 54.24, "avgInvestedNav": 50.0, "units": 500.0, "hasInternal": true, "hasExternal": false, "todayReturns": { "amount": 80.0, "percentage": 0.3 }, "totalReturns": { "amount": 2120.0, "percentage": 8.48 }, "folios": [], "holdingBreakdowns": [] } ], "isSuccess": true }Live IPO list
GET
/v1/offerings/openopenfinanceLists live and upcoming IPOs with ISIN, industry, daily bid window, application timeline and current subscription multiple.
Auth: Bearer access token issued after the OTP + PIN sign-in.
- ipoRefId
- isin
- name
- industry
- dailyStartTime
- dailyEndTime
- timeline
- preApplyStartDate
- applicationStartDate
- applicationEndDate
- applications
- totalSubscription
GET /v1/offerings/open HTTP/1.1 Authorization: Bearer <access_token>{ "data": [ { "ipoRefId": "IPO20261020REL", "isin": "INE002A01018", "name": "Sample Industries Ltd", "industry": "Energy", "dailyStartTime": "10:00", "dailyEndTime": "17:00", "timeline": { "preApplyStartDate": "2026-10-18", "applicationStartDate": "2026-10-20", "applicationEndDate": "2026-10-22" }, "applications": [], "totalSubscription": 2.4 } ], "isSuccess": true }Client profile
GET
/v1/account/clientopenbankingReturns the signed-in client's UCC, PAN, enabled exchanges/products, DDPI flag and linked bank accounts (account number, IFSC, primary-trading flag).
Auth: Bearer access token issued after the OTP + PIN sign-in.
- exchangesEnabled
- productsEnabled
- userBankEntityList
- userInfoEntity
- userSegments
- userVpaInfoList
- associatedAccounts
- firstName
- lastName
- mobile
- panNumber
- ucc
- boId
- customerStatus
- isDDPIEnabled
- accountNumber
- bankName
- isPrimaryTrading
- ifscCode
GET /v1/account/client HTTP/1.1 Authorization: Bearer <access_token>{ "data": { "exchangesEnabled": ["NSE", "BSE", "NFO", "MCX"], "productsEnabled": ["CNC", "MIS", "NRML", "MTF"], "userInfoEntity": { "firstName": "Priya", "lastName": "Sharma", "email": "[email protected]", "mobile": "9876543210", "panNumber": "ABCDE1234F", "ucc": "UP123456", "boId": "1208160000000001", "customerStatus": "ACTIVE", "isDDPIEnabled": true, "isPriorityPackEnabled": false, "type": "INDIVIDUAL", "subAccountType": "" }, "userBankEntityList": [ { "accountNumber": "XXXX4521", "bankName": "HDFC Bank", "isPrimaryTrading": true, "bankCode": "HDFC", "ifscCode": "HDFC0000123" } ], "userSegments": [], "userVpaInfoList": [], "associatedAccounts": [] }, "isSuccess": true }Order book
GET
/v1/trading/ordersopenfinanceReturns working and completed tickets for the orders tab: instrument, order/product type, AMO flag, validity, plus nested stop-loss and target child orders.
Auth: Bearer access token issued after the OTP + PIN sign-in.
- category
- amo
- instrumentKey
- orderType
- productType
- cta
- validity
- expiry
- rules
- additionalInfo
- details
- stopLossOrders
- targetOrders
GET /v1/trading/orders?includePending=true HTTP/1.1 Authorization: Bearer <access_token>{ "data": [ { "category": "REGULAR", "amo": false, "instrumentKey": "NSE_EQ|INE002A01018", "orderType": "LIMIT", "productType": "D", "cta": [], "validity": "DAY", "expiry": 0, "rules": [], "stopLossOrders": [], "targetOrders": [] } ], "isSuccess": true }Place order
POST
/v1/trading/orders/submitopenfinanceSubmits a new order from the ticket pad and returns responseId plus the broker orderNumber used on the order book.
Auth: Bearer access token issued after the OTP + PIN sign-in.
- responseId
- orderNumber
- instrumentKey
POST /v1/trading/orders/submit HTTP/1.1 Authorization: Bearer <access_token> Content-Type: application/json { "instrumentKey": "NSE_EQ|INE002A01018" }{ "data": { "responseId": "resp-9f3a12", "orderNumber": "240200012345" }, "isSuccess": true }UPI pay-in status
GET
/v1/transfers/deposit-statusopenbankingPolls an add-funds UPI (or Google Pay / netbanking) credit: txnid, customerRefId, status and failure reason for the funds history screen.
Auth: Bearer access token issued after the OTP + PIN sign-in.
- customerRefId
- reason
- status
- txnid
GET /v1/transfers/deposit-status?txnid=UPI2402000999 HTTP/1.1 Authorization: Bearer <access_token>{ "data": { "customerRefId": "CR-778812", "reason": "", "status": "SUCCESS", "txnid": "UPI2402000999" }, "isSuccess": true }Withdraw funds
POST
/v1/transfers/withdrawal-requestsopenbankingRequests a rupee payout (default paymentMode NEFT) and returns withdrawalId, status, timestamps, completion date and transaction fee.
Auth: Bearer access token issued after the OTP + PIN sign-in.
- amount
- value
- withdrawalId
- status
- paymentMode
- message
- createdAt
- updatedAt
- dateOfCompletion
- transactionFee
POST /v1/transfers/withdrawal-requests HTTP/1.1 Authorization: Bearer <access_token> Content-Type: application/json { "amount": { "value": 25000.0 }, "paymentMode": "NEFT" }{ "data": { "amount": { "value": 25000.0 }, "withdrawalId": "WD-24020077", "status": "SUBMITTED", "paymentMode": "NEFT", "message": "Withdrawal requested", "createdAt": "2026-10-20T16:02:11+05:30", "updatedAt": "2026-10-20T16:02:11+05:30", "dateOfCompletion": null, "transactionFee": "0" }, "isSuccess": true }
Data categories
- SEC/COM funds and margin
- demat holdings
- portfolio net worth
- mutual-fund lots
- live IPOs
- client profile and banks
- order book
- UPI pay-in
- NEFT withdrawals
Where teams use this data
Nightly SEC vs COM recon
A back-office bot pulls SEC and COM cash.availableToTrade.total, spanExposure, cashMargin and availableToWithdraw.total and matches them to the day's payinAmount / payoutAmount so excess rupees can be withdrawn the same evening.
Holdings pledge worksheet
A margin desk joins instrumentKey lots — netAvgPrice, cncUsedQty, collateralQty and haircut — so pledged quantity stays in sync with the demat position before the cash market opens.
MF versus equity net-worth overlay
A wealth view stacks internalValue / externalInvestedValue against mutual-fund investedValue, currentValue and xirr so in-app equity and MF books do not double-count linked external folios.
IPO window monitor
An allotment bot lists ipoRefId rows with applicationStartDate, applicationEndDate and totalSubscription so every live issue is bid before dailyEndTime.
Frequently asked questions
What brokerage data does the Upstox app expose?
After OTP and PIN sign-in the signed-in app works with SEC/COM funds (availableToTrade, spanExposure, availableToWithdraw), demat holdings with instrumentKey and haircut, portfolio net worth, mutual-fund lots (xirr, currNav, units), live IPOs, the order book, UPI pay-in status and NEFT withdrawals.
How does Upstox authenticate API calls?
The client completes a two-step sign-in, an OTP followed by a PIN, and then attaches a Bearer access token to later funds, holdings and payout calls. The session token is renewed in the background while the user stays signed in.
Does the funds snapshot split securities and commodities?
Yes. The funds payload returns separate SEC and COM buckets, each with cash, collateral and availableToWithdraw, and the securities side also carries SPAN, cash and MTF margin used.
Are the endpoint paths on this page Upstox's own?
No. The paths shown are an illustrative, generalized sketch of the data the signed-in Android app works with, not Upstox's published developer API. The fields, auth style and request shapes show what a callable openData Studio integration for this data looks like.
Apps similar to Upstox Stocks IPO Mutual Funds
- Groww — Groww is a SEBI-registered Indian stock broker and mutual-fund distributor where users open a paperless demat and trading account to trade NSE/BSE stocks, ETFs and IPOs, run direct-fund SIPs, and trade F&O and commodities.
- Zerodha Kite — Zerodha is an Indian discount brokerage whose Kite platform is used to invest in stocks, IPOs, derivatives, mutual funds, ETFs and bonds, with Coin handling commission-free direct mutual funds.
- Angel One: Stocks, Mutual Fund — Angel One Limited is a Mumbai-listed Indian stockbroker and CDSL depository participant whose app lets users trade NSE/BSE/MCX stocks, F&O and commodities, apply for IPOs, and invest in mutual funds.
- 5paisa: Demat, Stocks & IPO — 5paisa Capital is a SEBI-registered Indian discount broker whose app opens a demat account and offers NSE/BSE stocks, margin trading, IPO applications and direct mutual funds.
- INDmoney: US Stocks, F&O, IPO — INDmoney is a SEBI-registered Indian broker (INDstocks) that combines Indian cash and F&O, IPO applications, mutual-fund SIPs and US stocks in one app.
- IIFL : Stocks, Demat & IPOs — IIFL Capital (India Infoline) is an Indian full-service broker whose Markets app pairs a demat account with NSE/BSE equities, F&O, mutual funds and IPO bids.
Topics
- Upstox API
- Upstox holdings API
- Upstox funds margin
- Upstox IPO data
- Upstox mutual funds
- Upstox UPI pay-in
- Indian brokerage data API
- demat holdings fields
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