Current collected state Current
Observed since 20 Oct, 20:38 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Modern TypeScript SDK for 5paisa Trading APIs
A modern, lightweight, TypeScript-first SDK for interacting with 5paisa Trading APIs. Designed for Node.js 18+, with strong typing, modular services, and zero deprecated dependencies.
.d.ts supportaxios, request, node-pandas removed)auth, orders, market)fetch (Node.js 18+)npm install git+https://github.com/AmitManna99/5paisa-ts-sdk.git
npm install 5paisa-ts-sdk
import { FivePaisaClient } from "5paisa-ts-sdk";
const client = new FivePaisaClient({
appName: "my-app",
userId: "YOUR_USER_ID",
password: "YOUR_PASSWORD",
userKey: "YOUR_VENDOR_KEY",
encryptionKey: "YOUR_ENCRYPTION_KEY",
clientCode: "YOUR_CLIENT_CODE",
appSource: 1234,
});
const requestToken = await client.auth.getRequestToken("TOTP_CODE", "PIN");
await client.auth.getAccessToken(requestToken);
// Client is now authenticated
await client.auth.setAccessToken("EXISTING_ACCESS_TOKEN");
https://dev-openapi.5paisa.com/WebVendorLogin/VLogin/Index
?VendorKey=<YOUR_USER_KEY>
&ResponseURL=<YOUR_REDIRECT_URL>
RequestToken from redirect URLawait client.auth.getAccessToken(requestToken);
const holdings = await client.orders.getHoldings();
console.log(holdings);
const positions = await client.orders.getPositions();
console.log(positions);
await client.orders.placeOrder({
scripCode: 1660,
qty: 1,
orderType: "BUY",
exchange: "N",
price: 208,
});
await client.orders.modifyOrder({
exchangeOrderID: "1100000007628729",
qty: 1,
price: 210,
exchange: "N",
exchangeType: "C",
isIntraday: false,
});
await client.orders.cancelOrder("1100000007973827");
await client.orders.placeBOCOOrder({
scripCode: 1660,
qty: 1,
limitPrice: 205,
triggerPrice: 0,
targetPrice: 217,
side: "BUY",
exchange: "N",
exchangeType: "C",
});
await client.orders.modifyBOCOOrder({
exchOrderId: "1100000008697274",
price: 215,
});
const feed = await client.market.getMarketFeed([
{
Exch: "N",
ExchType: "D",
Symbol: "NIFTY 27 MAY 2021 CE 14500.00",
Expiry: "20210527",
StrikePrice: "14500",
OptionType: "CE",
},
]);
console.log(feed);
const feed = await client.market.getMarketFeedByScrip([
{
Exch: "N",
ExchType: "C",
ScripCode: 1660,
ScripData: "RELIANCE_EQ",
},
]);
const depth = await client.market.getMarketDepth([
{ Exchange: "N", ExchangeType: "C", ScripCode: 1660 },
]);
const candles = await client.market.getHistoricalData({
exchange: "N",
exchangeType: "C",
scripCode: 1660,
timeframe: "1m",
from: "2021-05-31",
to: "2021-06-01",
});
Supported timeframes:
['1m', '5m', '10m', '15m', '30m', '60m', '1d']
client.auth; // authentication & tokens
client.orders; // holdings, orders, positions
client.market; // market feed, depth, historical data
npm run dev
MIT
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 1.0.0Registry latest | 24 Jan 2026 | 4 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 20:38 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:15544fbefc577b34f65c8c0ea69a1e8a3278af6a0b1a90667b5d175473fe333e