Trade, check margins, and review orders, portfolio, and fundamentals on Upstox — without leaving your agent. Retrieve user profile and fund/margin balances, estimate pre-trade margin across multiple instruments, look up order books and historical trades, review portfolio positions and holdings, pull company fundamentals by ISIN, and report trade-wise profit and loss by segment and financial year.
The official MCP SDK for TypeScript lets Node and edge services call MCP servers directly, with an API key for headless auth.
This guide connects Upstox to TypeScript through MewCP, so TypeScript can use Upstox's 11 tools, like get_profile, get_fund_and_margin_v3 and get_margin_details, without your Upstox credentials ever reaching the app.
Upstox signs in through managed OAuth. MewCP stores the token encrypted, refreshes it before it expires and injects it only at call time. Your agent never holds it, so it can never leak it.
More apps
Access cryptocurrency market data, portfolios and trading operations on Binance. Monitor assets, retrieve market information and automate crypto trading workflows.
Coinfuty provides cryptocurrency market intelligence for tracking digital asset prices, analyzing market trends, monitoring trading activity, and researching crypto opportunities to support data-driven investment decisions.
Access prediction market data, market positions and trading activity on Polymarket. Monitor markets, retrieve information and interact with forecasting-based financial products.
Coinversa Pulse provides real-time cryptocurrency market intelligence, enabling AI agents to track token prices, analyze market trends, monitor trading activity, and discover emerging opportunities across digital assets.
Other clients
Upstox works the same way in every client below. Pick yours for its own guide.
Free to start.
Scope access to the exact Upstox tools and accounts you allow, work and personal side by side. Anything outside that scope is refused at call time, even when the model asks for it.
Each call is logged: what ran, on which account, and whether it worked. Failures come back structured, so the agent knows whether to retry instead of guessing.
Every app sits behind one secure MCP URL, and there is no server for you to deploy or keep running. Add an integration in the dashboard and it is live on the next call, with no config to change and no new credentials to wire up. Tools load only when a task needs them, so your agent stays fast and focused however many apps you connect.
SDK clients sign in with an API key. Create one in your dashboard and replace API_KEY in the code below.
SDK clients run without a browser, so they sign in with your API key. Needs Node 18+ as an ES module (for example npx tsx script.ts).
Retrieves the authenticated user's account profile — email, exchanges, products, broker, user ID, order types, and account status flags. Does not include fund, margin, or balance data.
Retrieves the user's current cash and pledged margin balance, broken down into amounts available and unavailable to trade. Unavailable daily from 12:00 AM to 5:30 AM IST, when it returns a 423 error instead of data.
Computes and returns the estimated margin required for a proposed trade of up to 20 instruments. Does not place, modify, or persist any order.
Retrieves all orders placed during the current trading day, each with its latest status. Does not return orders from previous days — those are cleared at end of session.
Retrieves executed trade records for a given date range and optional segment, limited to at most the last 3 financial years.
Retrieves the positions currently held in the account and returns them as a list. Positions remain in this portfolio until sold or, for derivatives, until expiry (max three months); equity positions carried overnight are automatically shifted to the holdings portfolio the following trading day.
Retrieves the holdings currently held in the account and returns them as a list. A holding stays in place indefinitely — it's only removed when divested, delisted, or modified by exchange action.
Retrieves the company profile for a given ISIN — a business description, its sector, and the sector's total market capitalisation in both Indian Rupees and US Dollars.
Retrieves balance sheet statement data for a given ISIN — summary total assets and liabilities by reporting period, plus an optional detailed line-item breakdown when `fs=true`. All monetary values are in Indian Rupees (Crore).
Retrieves metadata for the trade-wise profit and loss report for a given segment and financial year, optionally narrowed to a date range. Returns the total trade count and the maximum page_size accepted by get_profit_loss_report.
Retrieves the trade-wise profit and loss report entries for a given segment and financial year, optionally narrowed to a date range, paginated by page_number and page_size. The maximum accepted page_size is returned as data.page_size_limit by get_report_meta_data.