5paisa-ts-sdk 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +299 -0
- package/dist/client/FivePaisaClient.d.ts +20 -0
- package/dist/client/FivePaisaClient.js +23 -0
- package/dist/client/auth.service.d.ts +12 -0
- package/dist/client/auth.service.js +42 -0
- package/dist/client/httpClient.d.ts +6 -0
- package/dist/client/httpClient.js +32 -0
- package/dist/client/market.service.d.ts +8 -0
- package/dist/client/market.service.js +27 -0
- package/dist/client/order.service.d.ts +15 -0
- package/dist/client/order.service.js +25 -0
- package/dist/client/routes.d.ts +0 -0
- package/dist/client/routes.js +1 -0
- package/dist/constants/defaults.d.ts +11 -0
- package/dist/constants/defaults.js +12 -0
- package/dist/constants/enums.d.ts +8 -0
- package/dist/constants/enums.js +12 -0
- package/dist/constants/payloads.d.ts +129 -0
- package/dist/constants/payloads.js +141 -0
- package/dist/constants/urls.d.ts +10 -0
- package/dist/constants/urls.js +13 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +7 -0
- package/dist/types/auth.d.ts +0 -0
- package/dist/types/auth.js +1 -0
- package/dist/types/fivepaisa.d.ts +10 -0
- package/dist/types/fivepaisa.js +2 -0
- package/dist/types/market.d.ts +0 -0
- package/dist/types/market.js +1 -0
- package/dist/types/orders.d.ts +0 -0
- package/dist/types/orders.js +1 -0
- package/dist/utils/crypto.constants.d.ts +6 -0
- package/dist/utils/crypto.constants.js +12 -0
- package/dist/utils/crypto.d.ts +8 -0
- package/dist/utils/crypto.js +31 -0
- package/dist/utils/date.d.ts +3 -0
- package/dist/utils/date.js +16 -0
- package/package.json +38 -0
package/README.md
ADDED
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
# 5paisa TypeScript SDK
|
|
2
|
+
|
|
3
|
+
A **modern, lightweight, TypeScript-first SDK** for interacting with **5paisa Trading APIs**.
|
|
4
|
+
Designed for **Node.js 18+**, with strong typing, modular services, and zero deprecated dependencies.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## ✨ Features
|
|
9
|
+
|
|
10
|
+
- ✅ TypeScript-first with `.d.ts` support
|
|
11
|
+
- ✅ No deprecated libraries (`axios`, `request`, `node-pandas` removed)
|
|
12
|
+
- ✅ Clean service-based API (`auth`, `orders`, `market`)
|
|
13
|
+
- ✅ Native `fetch` (Node.js 18+)
|
|
14
|
+
- ✅ Safe payload builders (no shared mutable state)
|
|
15
|
+
- ✅ GitHub & npm install support
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## 📦 Installation
|
|
20
|
+
|
|
21
|
+
### From GitHub (recommended during development)
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install git+https://github.com/AmitManna99/5paisa-ts-sdk.git
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### From npm (once published)
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm install 5paisa-ts-sdk
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## ⚙️ Requirements
|
|
36
|
+
|
|
37
|
+
- **Node.js >= 18**
|
|
38
|
+
- 5paisa API credentials
|
|
39
|
+
(Get them from: [https://tradestation.5paisa.com/apidoc](https://tradestation.5paisa.com/apidoc))
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## 🚀 Quick Start
|
|
44
|
+
|
|
45
|
+
### 1️⃣ Create Client
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
import { FivePaisaClient } from "5paisa-ts-sdk";
|
|
49
|
+
|
|
50
|
+
const client = new FivePaisaClient({
|
|
51
|
+
appName: "my-app",
|
|
52
|
+
userId: "YOUR_USER_ID",
|
|
53
|
+
password: "YOUR_PASSWORD",
|
|
54
|
+
userKey: "YOUR_VENDOR_KEY",
|
|
55
|
+
encryptionKey: "YOUR_ENCRYPTION_KEY",
|
|
56
|
+
clientCode: "YOUR_CLIENT_CODE",
|
|
57
|
+
appSource: 1234,
|
|
58
|
+
});
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## 🔐 Authentication
|
|
64
|
+
|
|
65
|
+
### Option 1: Login using TOTP + PIN
|
|
66
|
+
|
|
67
|
+
```ts
|
|
68
|
+
const requestToken = await client.auth.getRequestToken("TOTP_CODE", "PIN");
|
|
69
|
+
|
|
70
|
+
await client.auth.getAccessToken(requestToken);
|
|
71
|
+
|
|
72
|
+
// Client is now authenticated
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
### Option 2: Login using Access Token (recommended for automation)
|
|
78
|
+
|
|
79
|
+
```ts
|
|
80
|
+
await client.auth.setAccessToken("EXISTING_ACCESS_TOKEN");
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
### Option 3: OAuth Login (Browser Flow)
|
|
86
|
+
|
|
87
|
+
1. Redirect user to:
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
https://dev-openapi.5paisa.com/WebVendorLogin/VLogin/Index
|
|
91
|
+
?VendorKey=<YOUR_USER_KEY>
|
|
92
|
+
&ResponseURL=<YOUR_REDIRECT_URL>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
2. Extract `RequestToken` from redirect URL
|
|
96
|
+
3. Exchange it for access token:
|
|
97
|
+
|
|
98
|
+
```ts
|
|
99
|
+
await client.auth.getAccessToken(requestToken);
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## 📊 Holdings & Positions
|
|
105
|
+
|
|
106
|
+
### Fetch Holdings
|
|
107
|
+
|
|
108
|
+
```ts
|
|
109
|
+
const holdings = await client.orders.getHoldings();
|
|
110
|
+
console.log(holdings);
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
### Fetch Positions
|
|
116
|
+
|
|
117
|
+
```ts
|
|
118
|
+
const positions = await client.orders.getPositions();
|
|
119
|
+
console.log(positions);
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## 🧾 Orders
|
|
125
|
+
|
|
126
|
+
### Place Order
|
|
127
|
+
|
|
128
|
+
```ts
|
|
129
|
+
await client.orders.placeOrder({
|
|
130
|
+
scripCode: 1660,
|
|
131
|
+
qty: 1,
|
|
132
|
+
orderType: "BUY",
|
|
133
|
+
exchange: "N",
|
|
134
|
+
price: 208,
|
|
135
|
+
});
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
### Modify Order
|
|
141
|
+
|
|
142
|
+
```ts
|
|
143
|
+
await client.orders.modifyOrder({
|
|
144
|
+
exchangeOrderID: "1100000007628729",
|
|
145
|
+
qty: 1,
|
|
146
|
+
price: 210,
|
|
147
|
+
exchange: "N",
|
|
148
|
+
exchangeType: "C",
|
|
149
|
+
isIntraday: false,
|
|
150
|
+
});
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
### Cancel Order
|
|
156
|
+
|
|
157
|
+
```ts
|
|
158
|
+
await client.orders.cancelOrder("1100000007973827");
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## 🧠 BO / CO Orders
|
|
164
|
+
|
|
165
|
+
### Place BO-CO Order
|
|
166
|
+
|
|
167
|
+
```ts
|
|
168
|
+
await client.orders.placeBOCOOrder({
|
|
169
|
+
scripCode: 1660,
|
|
170
|
+
qty: 1,
|
|
171
|
+
limitPrice: 205,
|
|
172
|
+
triggerPrice: 0,
|
|
173
|
+
targetPrice: 217,
|
|
174
|
+
side: "BUY",
|
|
175
|
+
exchange: "N",
|
|
176
|
+
exchangeType: "C",
|
|
177
|
+
});
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
### Modify BO-CO Order (Profit / SL Leg)
|
|
183
|
+
|
|
184
|
+
```ts
|
|
185
|
+
await client.orders.modifyBOCOOrder({
|
|
186
|
+
exchOrderId: "1100000008697274",
|
|
187
|
+
price: 215,
|
|
188
|
+
});
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## 📈 Market Data
|
|
194
|
+
|
|
195
|
+
### Market Feed
|
|
196
|
+
|
|
197
|
+
```ts
|
|
198
|
+
const feed = await client.market.getMarketFeed([
|
|
199
|
+
{
|
|
200
|
+
Exch: "N",
|
|
201
|
+
ExchType: "D",
|
|
202
|
+
Symbol: "NIFTY 27 MAY 2021 CE 14500.00",
|
|
203
|
+
Expiry: "20210527",
|
|
204
|
+
StrikePrice: "14500",
|
|
205
|
+
OptionType: "CE",
|
|
206
|
+
},
|
|
207
|
+
]);
|
|
208
|
+
|
|
209
|
+
console.log(feed);
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
### Market Feed by Scrip
|
|
215
|
+
|
|
216
|
+
```ts
|
|
217
|
+
const feed = await client.market.getMarketFeedByScrip([
|
|
218
|
+
{
|
|
219
|
+
Exch: "N",
|
|
220
|
+
ExchType: "C",
|
|
221
|
+
ScripCode: 1660,
|
|
222
|
+
ScripData: "RELIANCE_EQ",
|
|
223
|
+
},
|
|
224
|
+
]);
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
### Market Depth
|
|
230
|
+
|
|
231
|
+
```ts
|
|
232
|
+
const depth = await client.market.getMarketDepth([
|
|
233
|
+
{ Exchange: "N", ExchangeType: "C", ScripCode: 1660 },
|
|
234
|
+
]);
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
## ⏱ Historical Data
|
|
240
|
+
|
|
241
|
+
```ts
|
|
242
|
+
const candles = await client.market.getHistoricalData({
|
|
243
|
+
exchange: "N",
|
|
244
|
+
exchangeType: "C",
|
|
245
|
+
scripCode: 1660,
|
|
246
|
+
timeframe: "1m",
|
|
247
|
+
from: "2021-05-31",
|
|
248
|
+
to: "2021-06-01",
|
|
249
|
+
});
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
Supported timeframes:
|
|
253
|
+
|
|
254
|
+
```
|
|
255
|
+
['1m', '5m', '10m', '15m', '30m', '60m', '1d']
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
## 📚 API Structure Overview
|
|
261
|
+
|
|
262
|
+
```ts
|
|
263
|
+
client.auth; // authentication & tokens
|
|
264
|
+
client.orders; // holdings, orders, positions
|
|
265
|
+
client.market; // market feed, depth, historical data
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
## 🛡️ Notes & Best Practices
|
|
271
|
+
|
|
272
|
+
- Always **store access tokens securely**
|
|
273
|
+
- Prefer **access-token login** for long-running services
|
|
274
|
+
- SDK expects **Node.js 18+**
|
|
275
|
+
- This SDK does **not manage retries / rate limits** yet
|
|
276
|
+
|
|
277
|
+
---
|
|
278
|
+
|
|
279
|
+
## 🧪 Development
|
|
280
|
+
|
|
281
|
+
```bash
|
|
282
|
+
npm run dev
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
## 📄 License
|
|
288
|
+
|
|
289
|
+
MIT
|
|
290
|
+
|
|
291
|
+
---
|
|
292
|
+
|
|
293
|
+
## 🚧 Roadmap
|
|
294
|
+
|
|
295
|
+
- Typed API responses
|
|
296
|
+
- Runtime validation (Zod)
|
|
297
|
+
- Retry & rate-limit handling
|
|
298
|
+
- WebSocket feed support
|
|
299
|
+
- npm public release
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AuthService } from "./auth.service";
|
|
2
|
+
import { OrderService } from "./order.service";
|
|
3
|
+
import { MarketService } from "./market.service";
|
|
4
|
+
export interface FivePaisaConfig {
|
|
5
|
+
appName: string;
|
|
6
|
+
userId: string;
|
|
7
|
+
password: string;
|
|
8
|
+
userKey: string;
|
|
9
|
+
encryptionKey: string;
|
|
10
|
+
appSource?: string;
|
|
11
|
+
clientCode?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare class FivePaisaClient {
|
|
14
|
+
private readonly config;
|
|
15
|
+
private readonly http;
|
|
16
|
+
readonly auth: AuthService;
|
|
17
|
+
readonly orders: OrderService;
|
|
18
|
+
readonly market: MarketService;
|
|
19
|
+
constructor(config: FivePaisaConfig);
|
|
20
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FivePaisaClient = void 0;
|
|
4
|
+
const httpClient_1 = require("./httpClient");
|
|
5
|
+
const auth_service_1 = require("./auth.service");
|
|
6
|
+
const order_service_1 = require("./order.service");
|
|
7
|
+
const market_service_1 = require("./market.service");
|
|
8
|
+
const urls_1 = require("../constants/urls");
|
|
9
|
+
class FivePaisaClient {
|
|
10
|
+
config;
|
|
11
|
+
http;
|
|
12
|
+
auth;
|
|
13
|
+
orders;
|
|
14
|
+
market;
|
|
15
|
+
constructor(config) {
|
|
16
|
+
this.config = config;
|
|
17
|
+
this.http = new httpClient_1.HttpClient(urls_1.FIVEPAISA_BASE_URL);
|
|
18
|
+
this.auth = new auth_service_1.AuthService(this.http, config);
|
|
19
|
+
this.orders = new order_service_1.OrderService(this.http, this.auth, config);
|
|
20
|
+
this.market = new market_service_1.MarketService(this.http, this.auth, config);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.FivePaisaClient = FivePaisaClient;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { HttpClient } from "./httpClient";
|
|
2
|
+
export declare class AuthService {
|
|
3
|
+
private readonly http;
|
|
4
|
+
private readonly config;
|
|
5
|
+
private jwt;
|
|
6
|
+
private clientCode?;
|
|
7
|
+
constructor(http: HttpClient, config: any);
|
|
8
|
+
get token(): string;
|
|
9
|
+
getRequestToken(totp: string, pin: string): Promise<any>;
|
|
10
|
+
getAccessToken(requestToken: string): Promise<string>;
|
|
11
|
+
setAccessToken(token: string, clientCode: string): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuthService = void 0;
|
|
4
|
+
const payloads_1 = require("../constants/payloads");
|
|
5
|
+
class AuthService {
|
|
6
|
+
http;
|
|
7
|
+
config;
|
|
8
|
+
jwt = "";
|
|
9
|
+
clientCode;
|
|
10
|
+
constructor(http, config) {
|
|
11
|
+
this.http = http;
|
|
12
|
+
this.config = config;
|
|
13
|
+
}
|
|
14
|
+
get token() {
|
|
15
|
+
return this.jwt;
|
|
16
|
+
}
|
|
17
|
+
async getRequestToken(totp, pin) {
|
|
18
|
+
const payload = (0, payloads_1.createTotpPayload)();
|
|
19
|
+
payload.head.Key = this.config.userKey;
|
|
20
|
+
payload.body.Email_ID = this.config.clientCode;
|
|
21
|
+
payload.body.TOTP = totp;
|
|
22
|
+
payload.body.PIN = pin;
|
|
23
|
+
const res = await this.http.post("/TOTPLogin", payload);
|
|
24
|
+
return res.body.RequestToken;
|
|
25
|
+
}
|
|
26
|
+
async getAccessToken(requestToken) {
|
|
27
|
+
const payload = (0, payloads_1.createAccessTokenPayload)();
|
|
28
|
+
payload.head.Key = this.config.userKey;
|
|
29
|
+
payload.body.RequestToken = requestToken;
|
|
30
|
+
payload.body.EncryKey = this.config.encryptionKey;
|
|
31
|
+
payload.body.UserId = this.config.userId;
|
|
32
|
+
const res = await this.http.post("/GetAccessToken", payload);
|
|
33
|
+
this.jwt = res.body.AccessToken;
|
|
34
|
+
this.clientCode = res.body.ClientCode;
|
|
35
|
+
return this.jwt;
|
|
36
|
+
}
|
|
37
|
+
setAccessToken(token, clientCode) {
|
|
38
|
+
this.jwt = token;
|
|
39
|
+
this.clientCode = clientCode;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.AuthService = AuthService;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HttpClient = void 0;
|
|
4
|
+
class HttpClient {
|
|
5
|
+
baseUrl;
|
|
6
|
+
constructor(baseUrl) {
|
|
7
|
+
this.baseUrl = baseUrl;
|
|
8
|
+
}
|
|
9
|
+
async post(path, body, token) {
|
|
10
|
+
const url = `${this.baseUrl}${path}`;
|
|
11
|
+
const res = await fetch(url, {
|
|
12
|
+
method: "POST",
|
|
13
|
+
headers: {
|
|
14
|
+
"Content-Type": "application/json",
|
|
15
|
+
...(token && { Authorization: `Bearer ${token}` }),
|
|
16
|
+
},
|
|
17
|
+
body: JSON.stringify(body),
|
|
18
|
+
});
|
|
19
|
+
if (!res.ok) {
|
|
20
|
+
throw new Error(`HTTP ${res.status}`);
|
|
21
|
+
}
|
|
22
|
+
return res.json();
|
|
23
|
+
}
|
|
24
|
+
async get(path, headers) {
|
|
25
|
+
const url = `${this.baseUrl}${path}`;
|
|
26
|
+
const res = await fetch(url, { headers });
|
|
27
|
+
if (!res.ok)
|
|
28
|
+
throw new Error(`HTTP ${res.status}`);
|
|
29
|
+
return res.json();
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.HttpClient = HttpClient;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MarketService = void 0;
|
|
4
|
+
const payloads_1 = require("../constants/payloads");
|
|
5
|
+
class MarketService {
|
|
6
|
+
http;
|
|
7
|
+
auth;
|
|
8
|
+
config;
|
|
9
|
+
constructor(http, auth, config) {
|
|
10
|
+
this.http = http;
|
|
11
|
+
this.auth = auth;
|
|
12
|
+
this.config = config;
|
|
13
|
+
}
|
|
14
|
+
async getMarketFeed(list) {
|
|
15
|
+
const payload = (0, payloads_1.createMarketPayload)(this.config);
|
|
16
|
+
payload.body.MarketFeedData = list;
|
|
17
|
+
const res = await this.http.post("/MarketFeed", payload, this.auth.token);
|
|
18
|
+
return res.body.Data;
|
|
19
|
+
}
|
|
20
|
+
async getMarketSnapshot(list) {
|
|
21
|
+
const payload = (0, payloads_1.createMarketSnapshotPayload)(this.config);
|
|
22
|
+
payload.body.MarketFeedData = list;
|
|
23
|
+
const res = await this.http.post("/V1/MarketFeed", payload, this.auth.token);
|
|
24
|
+
return res.body.Data;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.MarketService = MarketService;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AuthService } from "./auth.service";
|
|
2
|
+
import { HttpClient } from "./httpClient";
|
|
3
|
+
export declare class OrderService {
|
|
4
|
+
private readonly http;
|
|
5
|
+
private readonly auth;
|
|
6
|
+
private readonly config;
|
|
7
|
+
constructor(http: HttpClient, auth: AuthService, config: any);
|
|
8
|
+
placeOrder(params: {
|
|
9
|
+
orderType: "BUY" | "SELL";
|
|
10
|
+
qty: number;
|
|
11
|
+
exchange: "N" | "B";
|
|
12
|
+
price?: number;
|
|
13
|
+
scripCode: number;
|
|
14
|
+
}): Promise<unknown>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OrderService = void 0;
|
|
4
|
+
const payloads_1 = require("../constants/payloads");
|
|
5
|
+
class OrderService {
|
|
6
|
+
http;
|
|
7
|
+
auth;
|
|
8
|
+
config;
|
|
9
|
+
constructor(http, auth, config) {
|
|
10
|
+
this.http = http;
|
|
11
|
+
this.auth = auth;
|
|
12
|
+
this.config = config;
|
|
13
|
+
}
|
|
14
|
+
async placeOrder(params) {
|
|
15
|
+
const payload = (0, payloads_1.createOrderPayload)();
|
|
16
|
+
payload.body.ClientCode = this.config.clientCode;
|
|
17
|
+
payload.body.OrderType = params.orderType;
|
|
18
|
+
payload.body.Qty = params.qty;
|
|
19
|
+
payload.body.Price = params.price ?? 0;
|
|
20
|
+
payload.body.ScripCode = params.scripCode;
|
|
21
|
+
payload.body.Exchange = params.exchange;
|
|
22
|
+
return this.http.post("/V1/PlaceOrderRequest", payload, this.auth.token);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.OrderService = OrderService;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const DEFAULT_HEAD: {
|
|
2
|
+
readonly appName: "";
|
|
3
|
+
readonly appVer: "1.0";
|
|
4
|
+
readonly osName: "WEB";
|
|
5
|
+
};
|
|
6
|
+
export declare const DEFAULT_MARKET_HEAD: {
|
|
7
|
+
readonly requestCode: "5PMF";
|
|
8
|
+
readonly appName: "";
|
|
9
|
+
readonly appVer: "1.0";
|
|
10
|
+
readonly osName: "WEB";
|
|
11
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEFAULT_MARKET_HEAD = exports.DEFAULT_HEAD = void 0;
|
|
4
|
+
exports.DEFAULT_HEAD = {
|
|
5
|
+
appName: '',
|
|
6
|
+
appVer: '1.0',
|
|
7
|
+
osName: 'WEB',
|
|
8
|
+
};
|
|
9
|
+
exports.DEFAULT_MARKET_HEAD = {
|
|
10
|
+
...exports.DEFAULT_HEAD,
|
|
11
|
+
requestCode: '5PMF',
|
|
12
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OrderValidity = void 0;
|
|
4
|
+
var OrderValidity;
|
|
5
|
+
(function (OrderValidity) {
|
|
6
|
+
OrderValidity[OrderValidity["Day"] = 0] = "Day";
|
|
7
|
+
OrderValidity[OrderValidity["GTD"] = 1] = "GTD";
|
|
8
|
+
OrderValidity[OrderValidity["GTC"] = 2] = "GTC";
|
|
9
|
+
OrderValidity[OrderValidity["IOC"] = 3] = "IOC";
|
|
10
|
+
OrderValidity[OrderValidity["EOS"] = 4] = "EOS";
|
|
11
|
+
OrderValidity[OrderValidity["FOK"] = 6] = "FOK";
|
|
12
|
+
})(OrderValidity || (exports.OrderValidity = OrderValidity = {}));
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
export declare const createGenericPayload: () => {
|
|
2
|
+
head: {
|
|
3
|
+
key: string;
|
|
4
|
+
requestCode: string;
|
|
5
|
+
userId: string;
|
|
6
|
+
password: string;
|
|
7
|
+
appName: "";
|
|
8
|
+
appVer: "1.0";
|
|
9
|
+
osName: "WEB";
|
|
10
|
+
};
|
|
11
|
+
body: {
|
|
12
|
+
ClientCode: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export declare const createLoginPayload: () => {
|
|
16
|
+
head: {
|
|
17
|
+
key: string;
|
|
18
|
+
requestCode: string;
|
|
19
|
+
userId: string;
|
|
20
|
+
password: string;
|
|
21
|
+
appName: "";
|
|
22
|
+
appVer: "1.0";
|
|
23
|
+
osName: "WEB";
|
|
24
|
+
};
|
|
25
|
+
body: {
|
|
26
|
+
Email_id: string;
|
|
27
|
+
Password: string;
|
|
28
|
+
LocalIP: string;
|
|
29
|
+
PublicIP: string;
|
|
30
|
+
HDSerailNumber: string;
|
|
31
|
+
MACAddress: string;
|
|
32
|
+
MachineID: string;
|
|
33
|
+
VersionNo: string;
|
|
34
|
+
RequestNo: string;
|
|
35
|
+
My2PIN: string;
|
|
36
|
+
ConnectionType: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export declare const createTotpPayload: () => {
|
|
40
|
+
head: {
|
|
41
|
+
Key: string;
|
|
42
|
+
};
|
|
43
|
+
body: {
|
|
44
|
+
Email_ID: string;
|
|
45
|
+
TOTP: string;
|
|
46
|
+
PIN: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export declare const createAccessTokenPayload: () => {
|
|
50
|
+
head: {
|
|
51
|
+
Key: string;
|
|
52
|
+
};
|
|
53
|
+
body: {
|
|
54
|
+
RequestToken: string;
|
|
55
|
+
EncryKey: string;
|
|
56
|
+
UserId: string;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
export declare const createMarketPayload: (config: any) => {
|
|
60
|
+
head: {
|
|
61
|
+
key: any;
|
|
62
|
+
userId: string;
|
|
63
|
+
password: string;
|
|
64
|
+
requestCode: "5PMF";
|
|
65
|
+
appName: "";
|
|
66
|
+
appVer: "1.0";
|
|
67
|
+
osName: "WEB";
|
|
68
|
+
};
|
|
69
|
+
body: {
|
|
70
|
+
Count: string;
|
|
71
|
+
ClientCode: any;
|
|
72
|
+
MarketFeedData: unknown[];
|
|
73
|
+
ClientLoginType: number;
|
|
74
|
+
LastRequestTime: string;
|
|
75
|
+
RefreshRate: string;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
export declare const createMarketSnapshotPayload: (config: any) => {
|
|
79
|
+
head: {
|
|
80
|
+
key: any;
|
|
81
|
+
};
|
|
82
|
+
body: {
|
|
83
|
+
ClientCode: any;
|
|
84
|
+
MarketFeedData: unknown[];
|
|
85
|
+
LastRequestTime: string;
|
|
86
|
+
RefreshRate: string;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
export declare const createMarketScripPayload: () => {
|
|
90
|
+
head: {
|
|
91
|
+
key: string;
|
|
92
|
+
};
|
|
93
|
+
body: {
|
|
94
|
+
MarketFeedData: unknown[];
|
|
95
|
+
LastRequestTime: string;
|
|
96
|
+
RefreshRate: string;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
export declare const createOrderPayload: () => {
|
|
100
|
+
head: {
|
|
101
|
+
key: string;
|
|
102
|
+
requestCode: string;
|
|
103
|
+
userId: string;
|
|
104
|
+
password: string;
|
|
105
|
+
appName: "";
|
|
106
|
+
appVer: "1.0";
|
|
107
|
+
osName: "WEB";
|
|
108
|
+
};
|
|
109
|
+
body: {
|
|
110
|
+
ClientCode: string;
|
|
111
|
+
Exchange: string;
|
|
112
|
+
ExchangeType: string;
|
|
113
|
+
ScripCode: number;
|
|
114
|
+
Price: number;
|
|
115
|
+
OrderID: number;
|
|
116
|
+
OrderType: "BUY" | "SELL";
|
|
117
|
+
Qty: number;
|
|
118
|
+
UniqueOrderID: string;
|
|
119
|
+
DisQty: number;
|
|
120
|
+
IsStopLossOrder: boolean;
|
|
121
|
+
StopLossPrice: number;
|
|
122
|
+
IsIOCOrder: boolean;
|
|
123
|
+
IsIntraday: boolean;
|
|
124
|
+
IsAHOrder: string;
|
|
125
|
+
ValidTillDate: string;
|
|
126
|
+
AppSource: number;
|
|
127
|
+
RemoteOrderID: string;
|
|
128
|
+
};
|
|
129
|
+
};
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createOrderPayload = exports.createMarketScripPayload = exports.createMarketSnapshotPayload = exports.createMarketPayload = exports.createAccessTokenPayload = exports.createTotpPayload = exports.createLoginPayload = exports.createGenericPayload = void 0;
|
|
4
|
+
const date_1 = require("../utils/date");
|
|
5
|
+
const defaults_1 = require("./defaults");
|
|
6
|
+
/* ---------- Generic ---------- */
|
|
7
|
+
const createGenericPayload = () => ({
|
|
8
|
+
head: {
|
|
9
|
+
...defaults_1.DEFAULT_HEAD,
|
|
10
|
+
key: "",
|
|
11
|
+
requestCode: "",
|
|
12
|
+
userId: "",
|
|
13
|
+
password: "",
|
|
14
|
+
},
|
|
15
|
+
body: {
|
|
16
|
+
ClientCode: "",
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
exports.createGenericPayload = createGenericPayload;
|
|
20
|
+
/* ---------- Login ---------- */
|
|
21
|
+
const createLoginPayload = () => ({
|
|
22
|
+
head: {
|
|
23
|
+
...defaults_1.DEFAULT_HEAD,
|
|
24
|
+
key: "",
|
|
25
|
+
requestCode: "5PLoginV2",
|
|
26
|
+
userId: "",
|
|
27
|
+
password: "",
|
|
28
|
+
},
|
|
29
|
+
body: {
|
|
30
|
+
Email_id: "",
|
|
31
|
+
Password: "",
|
|
32
|
+
LocalIP: "192.168.1.1",
|
|
33
|
+
PublicIP: "192.168.1.1",
|
|
34
|
+
HDSerailNumber: "",
|
|
35
|
+
MACAddress: "",
|
|
36
|
+
MachineID: "039377",
|
|
37
|
+
VersionNo: "1.7",
|
|
38
|
+
RequestNo: "1",
|
|
39
|
+
My2PIN: "",
|
|
40
|
+
ConnectionType: "1",
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
exports.createLoginPayload = createLoginPayload;
|
|
44
|
+
/* ---------- TOTP ---------- */
|
|
45
|
+
const createTotpPayload = () => ({
|
|
46
|
+
head: {
|
|
47
|
+
Key: "",
|
|
48
|
+
},
|
|
49
|
+
body: {
|
|
50
|
+
Email_ID: "",
|
|
51
|
+
TOTP: "",
|
|
52
|
+
PIN: "",
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
exports.createTotpPayload = createTotpPayload;
|
|
56
|
+
/* ---------- Access Token ---------- */
|
|
57
|
+
const createAccessTokenPayload = () => ({
|
|
58
|
+
head: {
|
|
59
|
+
Key: "",
|
|
60
|
+
},
|
|
61
|
+
body: {
|
|
62
|
+
RequestToken: "",
|
|
63
|
+
EncryKey: "",
|
|
64
|
+
UserId: "",
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
exports.createAccessTokenPayload = createAccessTokenPayload;
|
|
68
|
+
/* ---------- Market ---------- */
|
|
69
|
+
const createMarketPayload = (config) => ({
|
|
70
|
+
head: {
|
|
71
|
+
...defaults_1.DEFAULT_MARKET_HEAD,
|
|
72
|
+
key: config.userKey,
|
|
73
|
+
userId: "",
|
|
74
|
+
password: "",
|
|
75
|
+
},
|
|
76
|
+
body: {
|
|
77
|
+
Count: "",
|
|
78
|
+
ClientCode: config.clientCode,
|
|
79
|
+
MarketFeedData: [],
|
|
80
|
+
ClientLoginType: 0,
|
|
81
|
+
LastRequestTime: (0, date_1.formatFivePaisaDate)(0),
|
|
82
|
+
RefreshRate: "H",
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
exports.createMarketPayload = createMarketPayload;
|
|
86
|
+
/* ---------- Market ---------- */
|
|
87
|
+
const createMarketSnapshotPayload = (config) => ({
|
|
88
|
+
head: {
|
|
89
|
+
key: config.userKey,
|
|
90
|
+
},
|
|
91
|
+
body: {
|
|
92
|
+
ClientCode: config.clientCode,
|
|
93
|
+
MarketFeedData: [],
|
|
94
|
+
LastRequestTime: `/Date(0)/`,
|
|
95
|
+
RefreshRate: "H",
|
|
96
|
+
},
|
|
97
|
+
});
|
|
98
|
+
exports.createMarketSnapshotPayload = createMarketSnapshotPayload;
|
|
99
|
+
/* ---------- Market Scrip ---------- */
|
|
100
|
+
const createMarketScripPayload = () => ({
|
|
101
|
+
head: {
|
|
102
|
+
key: "",
|
|
103
|
+
},
|
|
104
|
+
body: {
|
|
105
|
+
MarketFeedData: [],
|
|
106
|
+
LastRequestTime: (0, date_1.formatFivePaisaDate)(0),
|
|
107
|
+
RefreshRate: "H",
|
|
108
|
+
},
|
|
109
|
+
});
|
|
110
|
+
exports.createMarketScripPayload = createMarketScripPayload;
|
|
111
|
+
/* ---------- Order Placement ---------- */
|
|
112
|
+
const createOrderPayload = () => ({
|
|
113
|
+
head: {
|
|
114
|
+
...defaults_1.DEFAULT_HEAD,
|
|
115
|
+
key: "",
|
|
116
|
+
requestCode: "",
|
|
117
|
+
userId: "",
|
|
118
|
+
password: "",
|
|
119
|
+
},
|
|
120
|
+
body: {
|
|
121
|
+
ClientCode: "",
|
|
122
|
+
Exchange: "B",
|
|
123
|
+
ExchangeType: "C",
|
|
124
|
+
ScripCode: 0,
|
|
125
|
+
Price: 0,
|
|
126
|
+
OrderID: 0,
|
|
127
|
+
OrderType: "BUY",
|
|
128
|
+
Qty: 0,
|
|
129
|
+
UniqueOrderID: "1",
|
|
130
|
+
DisQty: 0,
|
|
131
|
+
IsStopLossOrder: false,
|
|
132
|
+
StopLossPrice: 0,
|
|
133
|
+
IsIOCOrder: false,
|
|
134
|
+
IsIntraday: false,
|
|
135
|
+
IsAHOrder: "N",
|
|
136
|
+
ValidTillDate: (0, date_1.formatFivePaisaDate)((0, date_1.getNextDayEpoch)()),
|
|
137
|
+
AppSource: 0,
|
|
138
|
+
RemoteOrderID: "",
|
|
139
|
+
},
|
|
140
|
+
});
|
|
141
|
+
exports.createOrderPayload = createOrderPayload;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const FIVEPAISA_BASE_URL = "https://Openapi.5paisa.com/VendorsAPI/Service1.svc";
|
|
2
|
+
export declare const FIVEPAISA_ROUTES: {
|
|
3
|
+
TOTP_LOGIN: string;
|
|
4
|
+
ACCESS_TOKEN: string;
|
|
5
|
+
LOGIN: string;
|
|
6
|
+
MARKET_FEED: string;
|
|
7
|
+
ORDER_BOOK: string;
|
|
8
|
+
HOLDINGS: string;
|
|
9
|
+
POSITIONS: string;
|
|
10
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FIVEPAISA_ROUTES = exports.FIVEPAISA_BASE_URL = void 0;
|
|
4
|
+
exports.FIVEPAISA_BASE_URL = "https://Openapi.5paisa.com/VendorsAPI/Service1.svc";
|
|
5
|
+
exports.FIVEPAISA_ROUTES = {
|
|
6
|
+
TOTP_LOGIN: "/TOTPLogin",
|
|
7
|
+
ACCESS_TOKEN: "/GetAccessToken",
|
|
8
|
+
LOGIN: "/V4/Login",
|
|
9
|
+
MARKET_FEED: "/MarketFeed",
|
|
10
|
+
ORDER_BOOK: "/V2/OrderBook",
|
|
11
|
+
HOLDINGS: "/V3/Holding",
|
|
12
|
+
POSITIONS: "/V1/NetPositionNetWise",
|
|
13
|
+
};
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OrderValidity = exports.FivePaisaClient = void 0;
|
|
4
|
+
var FivePaisaClient_1 = require("./client/FivePaisaClient");
|
|
5
|
+
Object.defineProperty(exports, "FivePaisaClient", { enumerable: true, get: function () { return FivePaisaClient_1.FivePaisaClient; } });
|
|
6
|
+
var enums_1 = require("./constants/enums");
|
|
7
|
+
Object.defineProperty(exports, "OrderValidity", { enumerable: true, get: function () { return enums_1.OrderValidity; } });
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const PBKDF2_ITERATIONS = 1000;
|
|
2
|
+
export declare const KEY_LENGTH_BITS = 256;
|
|
3
|
+
export declare const IV_LENGTH_BITS = 128;
|
|
4
|
+
export declare const AES_KEY_SIZE = 32;
|
|
5
|
+
export declare const AES_IV_SIZE = 16;
|
|
6
|
+
export declare const FIXED_IV: Buffer<ArrayBuffer>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FIXED_IV = exports.AES_IV_SIZE = exports.AES_KEY_SIZE = exports.IV_LENGTH_BITS = exports.KEY_LENGTH_BITS = exports.PBKDF2_ITERATIONS = void 0;
|
|
4
|
+
exports.PBKDF2_ITERATIONS = 1000;
|
|
5
|
+
exports.KEY_LENGTH_BITS = 256;
|
|
6
|
+
exports.IV_LENGTH_BITS = 128;
|
|
7
|
+
exports.AES_KEY_SIZE = 32; // bytes
|
|
8
|
+
exports.AES_IV_SIZE = 16; // bytes
|
|
9
|
+
exports.FIXED_IV = Buffer.from([
|
|
10
|
+
83, 71, 26, 58, 54, 35, 22, 11,
|
|
11
|
+
83, 71, 26, 58, 54, 35, 22, 11,
|
|
12
|
+
]);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Encrypts text using AES-256-CBC (5paisa compatible)
|
|
3
|
+
*
|
|
4
|
+
* @param key - Encryption secret key
|
|
5
|
+
* @param plainText - UTF-8 string to encrypt
|
|
6
|
+
* @returns Base64 encoded encrypted string
|
|
7
|
+
*/
|
|
8
|
+
export declare function aes256Encrypt(key: string, plainText: string): string;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.aes256Encrypt = aes256Encrypt;
|
|
7
|
+
const crypto_1 = __importDefault(require("crypto"));
|
|
8
|
+
const crypto_constants_1 = require("./crypto.constants");
|
|
9
|
+
/**
|
|
10
|
+
* Encrypts text using AES-256-CBC (5paisa compatible)
|
|
11
|
+
*
|
|
12
|
+
* @param key - Encryption secret key
|
|
13
|
+
* @param plainText - UTF-8 string to encrypt
|
|
14
|
+
* @returns Base64 encoded encrypted string
|
|
15
|
+
*/
|
|
16
|
+
function aes256Encrypt(key, plainText) {
|
|
17
|
+
try {
|
|
18
|
+
const derivedKey = crypto_1.default.pbkdf2Sync(Buffer.from(key, 'utf8'), crypto_constants_1.FIXED_IV, crypto_constants_1.PBKDF2_ITERATIONS, (crypto_constants_1.KEY_LENGTH_BITS + crypto_constants_1.IV_LENGTH_BITS) / 8, 'sha1');
|
|
19
|
+
const aesIV = Buffer.allocUnsafe(crypto_constants_1.AES_IV_SIZE);
|
|
20
|
+
const aesKey = Buffer.allocUnsafe(crypto_constants_1.AES_KEY_SIZE);
|
|
21
|
+
derivedKey.copy(aesIV, 0, 0, crypto_constants_1.AES_IV_SIZE);
|
|
22
|
+
derivedKey.copy(aesKey, 0, crypto_constants_1.AES_IV_SIZE);
|
|
23
|
+
const cipher = crypto_1.default.createCipheriv('aes-256-cbc', aesKey, aesIV);
|
|
24
|
+
let encrypted = cipher.update(plainText, 'utf8', 'base64');
|
|
25
|
+
encrypted += cipher.final('base64');
|
|
26
|
+
return encrypted;
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
throw new Error(`AES256 encryption failed: ${error.message}`);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getEpochTime = getEpochTime;
|
|
4
|
+
exports.getNextDayEpoch = getNextDayEpoch;
|
|
5
|
+
exports.formatFivePaisaDate = formatFivePaisaDate;
|
|
6
|
+
function getEpochTime() {
|
|
7
|
+
return Date.now();
|
|
8
|
+
}
|
|
9
|
+
function getNextDayEpoch() {
|
|
10
|
+
const date = new Date();
|
|
11
|
+
date.setDate(date.getDate() + 1);
|
|
12
|
+
return date.getTime();
|
|
13
|
+
}
|
|
14
|
+
function formatFivePaisaDate(epoch) {
|
|
15
|
+
return `/Date(${epoch})/`;
|
|
16
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "5paisa-ts-sdk",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Modern TypeScript SDK for 5paisa Trading APIs",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "tsc",
|
|
13
|
+
"prepare": "npm run build"
|
|
14
|
+
},
|
|
15
|
+
"engines": {
|
|
16
|
+
"node": ">=18"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"papaparse": "^5.5.3"
|
|
20
|
+
},
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"@types/node": "^20.11.30",
|
|
23
|
+
"typescript": "^5.9.3",
|
|
24
|
+
"ts-node": "^10.9.2"
|
|
25
|
+
},
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "https://github.com/AmitManna99/5paisa-ts-sdk.git"
|
|
29
|
+
},
|
|
30
|
+
"keywords": [
|
|
31
|
+
"5paisa",
|
|
32
|
+
"trading-api",
|
|
33
|
+
"broker-sdk",
|
|
34
|
+
"algo-trading",
|
|
35
|
+
"typescript",
|
|
36
|
+
"nodejs"
|
|
37
|
+
]
|
|
38
|
+
}
|