firstock 1.0.6 → 1.0.8

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 CHANGED
@@ -5,7 +5,7 @@ To communicate with the Firstock Developer API using Nodejs, you can use the off
5
5
  Licensed under the MIT License.
6
6
 
7
7
 
8
- [Version - 1.0.5](https://www.npmjs.com/package/firstock)
8
+ [Version - 1.0.7](https://www.npmjs.com/package/firstock)
9
9
 
10
10
 
11
11
  ## Documentation
@@ -0,0 +1,233 @@
1
+ interface Response {
2
+ data: {
3
+ [key: string]: any;
4
+ };
5
+ }
6
+ interface LoginParams {
7
+ userId: string;
8
+ password: string;
9
+ TOTP: string;
10
+ vendorCode: string;
11
+ apiKey: string;
12
+ [key: string]: any;
13
+ }
14
+ interface PlaceOrderParams {
15
+ userId: string;
16
+ exchange: string;
17
+ tradingSymbol: string;
18
+ quantity: string | number;
19
+ price: string | number;
20
+ product: string;
21
+ transactionType: string;
22
+ priceType: string;
23
+ retention: string;
24
+ remarks: string;
25
+ triggerPrice: string;
26
+ [key: string]: any;
27
+ }
28
+ interface CancelOrderParams {
29
+ userId: string;
30
+ orderNumber: string;
31
+ [key: string]: any;
32
+ }
33
+ interface ModifyOrderParams {
34
+ userId: string;
35
+ orderNumber: string;
36
+ price: string | number;
37
+ quantity: string | number;
38
+ triggerPrice: string | number;
39
+ tradingSymbol: string;
40
+ exchange: string;
41
+ priceType: string;
42
+ product: string;
43
+ retention: string;
44
+ [key: string]: any;
45
+ }
46
+ interface BasketItem {
47
+ exchange: string;
48
+ transactionType: string;
49
+ product: string;
50
+ tradingSymbol: string;
51
+ quantity: string | number;
52
+ priceType: string;
53
+ price: string | number;
54
+ [key: string]: any;
55
+ }
56
+ interface BasketMarginParams {
57
+ userId: string;
58
+ BasketList_Params: BasketItem[];
59
+ [key: string]: any;
60
+ }
61
+ interface SingleOrderHistoryParams {
62
+ userId: string;
63
+ orderNumber: string;
64
+ [key: string]: any;
65
+ }
66
+ interface UserDetailsParams {
67
+ userId: string;
68
+ [key: string]: any;
69
+ }
70
+ interface OrderMarginParams {
71
+ userId: string;
72
+ exchange: string;
73
+ tradingSymbol: string;
74
+ quantity: string | number;
75
+ price: string | number;
76
+ product: string;
77
+ transactionType: string;
78
+ priceType: string;
79
+ [key: string]: any;
80
+ }
81
+ interface ProductConversionParams {
82
+ userId: string;
83
+ exchange: string;
84
+ tradingSymbol: string;
85
+ quantity: string | number;
86
+ product: string;
87
+ previousProduct: string;
88
+ transactionType?: string;
89
+ positionType?: string;
90
+ msgFlag?: string;
91
+ [key: string]: any;
92
+ }
93
+ interface OrderBookParams {
94
+ userId: string;
95
+ [key: string]: any;
96
+ }
97
+ interface TradeBookParams {
98
+ userId: string;
99
+ [key: string]: any;
100
+ }
101
+ interface PositionsBookParams {
102
+ userId: string;
103
+ [key: string]: any;
104
+ }
105
+ interface MultiQuoteItem {
106
+ exchange: string;
107
+ tradingSymbol: string;
108
+ [key: string]: any;
109
+ }
110
+ interface GetMultiQuotesParams {
111
+ userId: string;
112
+ data: MultiQuoteItem[];
113
+ [key: string]: any;
114
+ }
115
+ interface GetQuoteLTPParams {
116
+ userId: string;
117
+ exchange: string;
118
+ tradingSymbol: string;
119
+ [key: string]: any;
120
+ }
121
+ interface GetMultiQuotesLTPParams {
122
+ userId: string;
123
+ data: MultiQuoteItem[];
124
+ [key: string]: any;
125
+ }
126
+ interface SearchScriptsParams {
127
+ userId: string;
128
+ stext: string;
129
+ [key: string]: any;
130
+ }
131
+ interface GetSecurityInfoParams {
132
+ userId: string;
133
+ exchange: string;
134
+ tradingSymbol: string;
135
+ [key: string]: any;
136
+ }
137
+ interface HoldingsParams {
138
+ userId: string;
139
+ product?: string;
140
+ [key: string]: any;
141
+ }
142
+ interface LimitsParams {
143
+ userId: string;
144
+ [key: string]: any;
145
+ }
146
+ interface GetQuotesParams {
147
+ userId: string;
148
+ exchange: string;
149
+ tradingSymbol: string;
150
+ [key: string]: any;
151
+ }
152
+ interface GetIndexListParams {
153
+ userId: string;
154
+ exchange: string;
155
+ [key: string]: any;
156
+ }
157
+ interface GetOptionChainParams {
158
+ userId: string;
159
+ exchange: string;
160
+ symbol: string;
161
+ strikePrice: string | number;
162
+ count: string | number;
163
+ expiry?: string;
164
+ [key: string]: any;
165
+ }
166
+ interface TimePriceSeriesParams {
167
+ userId: string;
168
+ exchange: string;
169
+ tradingSymbol: string;
170
+ endTime: string;
171
+ startTime: string;
172
+ interval: string | number;
173
+ [key: string]: any;
174
+ }
175
+ interface BrokerageCalculatorParams {
176
+ userId: string;
177
+ exchange: string;
178
+ tradingSymbol: string;
179
+ transactionType: string;
180
+ Product: string;
181
+ quantity: string | number;
182
+ price: string | number;
183
+ strike_price: string | number;
184
+ inst_name: string;
185
+ lot_size: string | number;
186
+ [key: string]: any;
187
+ }
188
+ interface GetExpiryParams {
189
+ userId: string;
190
+ exchange: string;
191
+ tradingSymbol: string;
192
+ [key: string]: any;
193
+ }
194
+ interface GetHoldingsParams {
195
+ userId: string;
196
+ [key: string]: any;
197
+ }
198
+ declare abstract class AFirstock {
199
+ constructor();
200
+ abstract getPosts(): Promise<any>;
201
+ abstract getUsers(): any;
202
+ abstract getPostByUserId(): any;
203
+ abstract login(params: LoginParams, callBack: (error: Error | null, result: Response | null) => void): void;
204
+ abstract logout(params: {
205
+ userId: string;
206
+ }, callBack: (error: Error | string | null, result: Response | null) => void): void;
207
+ abstract userDetails(params: UserDetailsParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
208
+ abstract placeOrder(params: PlaceOrderParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
209
+ abstract orderMargin(params: OrderMarginParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
210
+ abstract cancelOrder(params: CancelOrderParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
211
+ abstract modifyOrder(params: ModifyOrderParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
212
+ abstract singleOrderHistory(params: SingleOrderHistoryParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
213
+ abstract orderBook(params: OrderBookParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
214
+ abstract tradeBook(params: TradeBookParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
215
+ abstract positionBook(params: PositionsBookParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
216
+ abstract productConversion(params: ProductConversionParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
217
+ abstract holdings(params: HoldingsParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
218
+ abstract limit(params: LimitsParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
219
+ abstract basketMargin(params: BasketMarginParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
220
+ abstract getQuote(params: GetQuotesParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
221
+ abstract getQuoteltp(params: GetQuoteLTPParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
222
+ abstract getMultiQuotesltp(params: GetMultiQuotesLTPParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
223
+ abstract getMultiQuotes(params: GetMultiQuotesParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
224
+ abstract searchScrips(params: SearchScriptsParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
225
+ abstract securityInfo(params: GetSecurityInfoParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
226
+ abstract indexList(params: GetIndexListParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
227
+ abstract optionChain(params: GetOptionChainParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
228
+ abstract timePriceSeries(params: TimePriceSeriesParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
229
+ abstract getExpiry(params: GetExpiryParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
230
+ abstract brokerageCalculator(params: BrokerageCalculatorParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
231
+ abstract getHoldingsDetails(params: GetHoldingsParams, callBack: (error: Error | null, result: Response | null) => void): void;
232
+ }
233
+ export default AFirstock;