firstock 1.0.0 → 1.0.1

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.
@@ -1,227 +0,0 @@
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
- [key: string]: any;
91
- }
92
- interface OrderBookParams {
93
- userId: string;
94
- [key: string]: any;
95
- }
96
- interface TradeBookParams {
97
- userId: string;
98
- [key: string]: any;
99
- }
100
- interface PositionsBookParams {
101
- userId: string;
102
- [key: string]: any;
103
- }
104
- interface MultiQuoteItem {
105
- exchange: string;
106
- tradingSymbol: string;
107
- [key: string]: any;
108
- }
109
- interface GetMultiQuotesParams {
110
- userId: string;
111
- data: MultiQuoteItem[];
112
- [key: string]: any;
113
- }
114
- interface GetQuoteLTPParams {
115
- userId: string;
116
- exchange: string;
117
- tradingSymbol: string;
118
- [key: string]: any;
119
- }
120
- interface GetMultiQuotesLTPParams {
121
- userId: string;
122
- data: MultiQuoteItem[];
123
- [key: string]: any;
124
- }
125
- interface SearchScriptsParams {
126
- userId: string;
127
- stext: string;
128
- [key: string]: any;
129
- }
130
- interface GetSecurityInfoParams {
131
- userId: string;
132
- exchange: string;
133
- tradingSymbol: string;
134
- [key: string]: any;
135
- }
136
- interface HoldingsParams {
137
- userId: string;
138
- product?: string;
139
- [key: string]: any;
140
- }
141
- interface LimitsParams {
142
- userId: string;
143
- [key: string]: any;
144
- }
145
- interface GetQuotesParams {
146
- userId: string;
147
- exchange: string;
148
- tradingSymbol: string;
149
- [key: string]: any;
150
- }
151
- interface GetIndexListParams {
152
- userId: string;
153
- exchange: string;
154
- [key: string]: any;
155
- }
156
- interface GetOptionChainParams {
157
- userId: string;
158
- exchange: string;
159
- symbol: string;
160
- strikePrice: string | number;
161
- count: string | number;
162
- expiry?: string;
163
- [key: string]: any;
164
- }
165
- interface TimePriceSeriesParams {
166
- userId: string;
167
- exchange: string;
168
- tradingSymbol: string;
169
- endTime: string;
170
- startTime: string;
171
- interval: string | number;
172
- [key: string]: any;
173
- }
174
- interface BrokerageCalculatorParams {
175
- userId: string;
176
- exchange: string;
177
- tradingSymbol: string;
178
- transactionType: string;
179
- Product: string;
180
- quantity: string | number;
181
- price: string | number;
182
- strike_price: string | number;
183
- inst_name: string;
184
- lot_size: string | number;
185
- [key: string]: any;
186
- }
187
- interface GetExpiryParams {
188
- userId: string;
189
- exchange: string;
190
- tradingSymbol: string;
191
- [key: string]: any;
192
- }
193
- declare abstract class AFirstock {
194
- constructor();
195
- abstract getPosts(): Promise<any>;
196
- abstract getUsers(): any;
197
- abstract getPostByUserId(): any;
198
- abstract login(params: LoginParams, callBack: (error: Error | null, result: Response | null) => void): void;
199
- abstract logout(params: {
200
- userId: string;
201
- }, callBack: (error: Error | string | null, result: Response | null) => void): void;
202
- abstract userDetails(params: UserDetailsParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
203
- abstract placeOrder(params: PlaceOrderParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
204
- abstract orderMargin(params: OrderMarginParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
205
- abstract cancelOrder(params: CancelOrderParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
206
- abstract modifyOrder(params: ModifyOrderParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
207
- abstract singleOrderHistory(params: SingleOrderHistoryParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
208
- abstract orderBook(params: OrderBookParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
209
- abstract tradeBook(params: TradeBookParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
210
- abstract positionBook(params: PositionsBookParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
211
- abstract productConversion(params: ProductConversionParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
212
- abstract holdings(params: HoldingsParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
213
- abstract limit(params: LimitsParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
214
- abstract basketMargin(params: BasketMarginParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
215
- abstract getQuote(params: GetQuotesParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
216
- abstract getQuoteltp(params: GetQuoteLTPParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
217
- abstract getMultiQuotesltp(params: GetMultiQuotesLTPParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
218
- abstract getMultiQuotes(params: GetMultiQuotesParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
219
- abstract searchScrips(params: SearchScriptsParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
220
- abstract securityInfo(params: GetSecurityInfoParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
221
- abstract indexList(params: GetIndexListParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
222
- abstract optionChain(params: GetOptionChainParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
223
- abstract timePriceSeries(params: TimePriceSeriesParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
224
- abstract getExpiry(params: GetExpiryParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
225
- abstract brokerageCalculator(params: BrokerageCalculatorParams, callBack: (error: Error | string | null, result: Response | null) => void): void;
226
- }
227
- export default AFirstock;