@ganaka/sdk 1.0.2 → 1.1.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/dist/index.d.ts +78 -2
- package/dist/index.js +272 -215
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +272 -215
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -85,6 +85,16 @@ declare const fetchCandles: ({ developerToken, apiDomain, runId, currentTimestam
|
|
|
85
85
|
|
|
86
86
|
export declare type FetchCandlesResponse = Awaited<ReturnType<ReturnType<typeof fetchCandles>>>;
|
|
87
87
|
|
|
88
|
+
declare const fetchNiftyQuote: ({ developerToken, apiDomain, runId, currentTimestamp, currentTimezone, }: {
|
|
89
|
+
developerToken: string;
|
|
90
|
+
apiDomain: string;
|
|
91
|
+
runId: string | null;
|
|
92
|
+
currentTimestamp: string;
|
|
93
|
+
currentTimezone?: string;
|
|
94
|
+
}) => (params: default_2.infer<typeof v1_developer_groww_schemas.getGrowwNiftyQuote.query>) => Promise<default_2.infer<typeof v1_developer_groww_schemas.getGrowwNiftyQuote.response>["data"] | null>;
|
|
95
|
+
|
|
96
|
+
export declare type FetchNiftyQuoteResponse = Awaited<ReturnType<ReturnType<typeof fetchNiftyQuote>>>;
|
|
97
|
+
|
|
88
98
|
declare const fetchQuote: ({ developerToken, apiDomain, runId, currentTimestamp, currentTimezone, }: {
|
|
89
99
|
developerToken: string;
|
|
90
100
|
apiDomain: string;
|
|
@@ -101,7 +111,11 @@ declare const fetchQuoteTimeline: ({ developerToken, apiDomain, runId, currentTi
|
|
|
101
111
|
runId: string | null;
|
|
102
112
|
currentTimestamp: string;
|
|
103
113
|
currentTimezone?: string;
|
|
104
|
-
}) => (symbol: string,
|
|
114
|
+
}) => (symbol: string,
|
|
115
|
+
/**
|
|
116
|
+
* Date in IST string format (YYYY-MM-DD)
|
|
117
|
+
*/
|
|
118
|
+
date: string) => Promise<default_2.infer<typeof v1_developer_groww_schemas.getGrowwQuoteTimeline.response>["data"]["quoteTimeline"]>;
|
|
105
119
|
|
|
106
120
|
export declare type FetchQuoteTimelineResponse = Awaited<ReturnType<ReturnType<typeof fetchQuoteTimeline>>>;
|
|
107
121
|
|
|
@@ -271,6 +285,66 @@ declare const getGrowwHistoricalCandles: {
|
|
|
271
285
|
}, z.core.$strip>;
|
|
272
286
|
};
|
|
273
287
|
|
|
288
|
+
declare const getGrowwNiftyQuote: {
|
|
289
|
+
query: z.ZodObject<{
|
|
290
|
+
datetime: z.ZodOptional<z.ZodString>;
|
|
291
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
292
|
+
}, z.core.$strip>;
|
|
293
|
+
response: z.ZodObject<{
|
|
294
|
+
statusCode: z.ZodNumber;
|
|
295
|
+
message: z.ZodString;
|
|
296
|
+
data: z.ZodNullable<z.ZodObject<{
|
|
297
|
+
status: z.ZodEnum<{
|
|
298
|
+
SUCCESS: "SUCCESS";
|
|
299
|
+
FAILURE: "FAILURE";
|
|
300
|
+
}>;
|
|
301
|
+
payload: z.ZodObject<{
|
|
302
|
+
average_price: z.ZodNullable<z.ZodNumber>;
|
|
303
|
+
bid_quantity: z.ZodNullable<z.ZodNumber>;
|
|
304
|
+
bid_price: z.ZodNullable<z.ZodNumber>;
|
|
305
|
+
day_change: z.ZodNullable<z.ZodNumber>;
|
|
306
|
+
day_change_perc: z.ZodNullable<z.ZodNumber>;
|
|
307
|
+
upper_circuit_limit: z.ZodNullable<z.ZodNumber>;
|
|
308
|
+
lower_circuit_limit: z.ZodNullable<z.ZodNumber>;
|
|
309
|
+
ohlc: z.ZodNullable<z.ZodObject<{
|
|
310
|
+
open: z.ZodNullable<z.ZodNumber>;
|
|
311
|
+
high: z.ZodNullable<z.ZodNumber>;
|
|
312
|
+
low: z.ZodNullable<z.ZodNumber>;
|
|
313
|
+
close: z.ZodNullable<z.ZodNumber>;
|
|
314
|
+
}, z.core.$strip>>;
|
|
315
|
+
depth: z.ZodNullable<z.ZodObject<{
|
|
316
|
+
buy: z.ZodArray<z.ZodObject<{
|
|
317
|
+
price: z.ZodNullable<z.ZodNumber>;
|
|
318
|
+
quantity: z.ZodNullable<z.ZodNumber>;
|
|
319
|
+
}, z.core.$strip>>;
|
|
320
|
+
sell: z.ZodArray<z.ZodObject<{
|
|
321
|
+
price: z.ZodNullable<z.ZodNumber>;
|
|
322
|
+
quantity: z.ZodNullable<z.ZodNumber>;
|
|
323
|
+
}, z.core.$strip>>;
|
|
324
|
+
}, z.core.$strip>>;
|
|
325
|
+
high_trade_range: z.ZodNullable<z.ZodNull>;
|
|
326
|
+
implied_volatility: z.ZodNullable<z.ZodNull>;
|
|
327
|
+
last_trade_quantity: z.ZodNullable<z.ZodNumber>;
|
|
328
|
+
last_trade_time: z.ZodNullable<z.ZodNumber>;
|
|
329
|
+
low_trade_range: z.ZodNullable<z.ZodNull>;
|
|
330
|
+
last_price: z.ZodNullable<z.ZodNumber>;
|
|
331
|
+
market_cap: z.ZodNullable<z.ZodNumber>;
|
|
332
|
+
offer_price: z.ZodNullable<z.ZodNumber>;
|
|
333
|
+
offer_quantity: z.ZodNullable<z.ZodNumber>;
|
|
334
|
+
oi_day_change: z.ZodNullable<z.ZodNumber>;
|
|
335
|
+
oi_day_change_percentage: z.ZodNullable<z.ZodNumber>;
|
|
336
|
+
open_interest: z.ZodNullable<z.ZodNumber>;
|
|
337
|
+
previous_open_interest: z.ZodNullable<z.ZodNull>;
|
|
338
|
+
total_buy_quantity: z.ZodNullable<z.ZodNumber>;
|
|
339
|
+
total_sell_quantity: z.ZodNullable<z.ZodNumber>;
|
|
340
|
+
volume: z.ZodNullable<z.ZodNumber>;
|
|
341
|
+
week_52_high: z.ZodNullable<z.ZodNumber>;
|
|
342
|
+
week_52_low: z.ZodNullable<z.ZodNumber>;
|
|
343
|
+
}, z.core.$strip>;
|
|
344
|
+
}, z.core.$strip>>;
|
|
345
|
+
}, z.core.$strip>;
|
|
346
|
+
};
|
|
347
|
+
|
|
274
348
|
declare const getGrowwQuote: {
|
|
275
349
|
query: z.ZodObject<{
|
|
276
350
|
symbol: z.ZodString;
|
|
@@ -752,6 +826,7 @@ export declare interface RunContext {
|
|
|
752
826
|
placeOrder: ReturnType<typeof placeOrder>;
|
|
753
827
|
fetchCandles: ReturnType<typeof fetchCandles>;
|
|
754
828
|
fetchQuote: ReturnType<typeof fetchQuote>;
|
|
829
|
+
fetchNiftyQuote: ReturnType<typeof fetchNiftyQuote>;
|
|
755
830
|
fetchQuoteTimeline: ReturnType<typeof fetchQuoteTimeline>;
|
|
756
831
|
fetchShortlist: ReturnType<typeof fetchShortlist>;
|
|
757
832
|
/**
|
|
@@ -866,7 +941,8 @@ declare namespace v1_developer_groww_schemas {
|
|
|
866
941
|
getGrowwHistoricalCandles,
|
|
867
942
|
getGrowwQuote,
|
|
868
943
|
getGrowwToken,
|
|
869
|
-
getGrowwQuoteTimeline
|
|
944
|
+
getGrowwQuoteTimeline,
|
|
945
|
+
getGrowwNiftyQuote
|
|
870
946
|
}
|
|
871
947
|
}
|
|
872
948
|
|