@ganaka/sdk 1.4.1 → 1.6.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 +176 -0
- package/dist/index.js +255 -160
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +255 -160
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -99,6 +99,20 @@ declare const fetchNiftyQuote: ({ developerToken, apiDomain, runId, currentTimes
|
|
|
99
99
|
|
|
100
100
|
export declare type FetchNiftyQuoteResponse = Awaited<ReturnType<ReturnType<typeof fetchNiftyQuote>>>;
|
|
101
101
|
|
|
102
|
+
declare const fetchNiftyQuoteTimeline: ({ developerToken, apiDomain, runId, currentTimestamp, currentTimezone, }: {
|
|
103
|
+
developerToken: string;
|
|
104
|
+
apiDomain: string;
|
|
105
|
+
runId: string | null;
|
|
106
|
+
currentTimestamp: string;
|
|
107
|
+
currentTimezone?: string;
|
|
108
|
+
}) => (
|
|
109
|
+
/**
|
|
110
|
+
* End datetime in IST string format (YYYY-MM-DDTHH:mm:ss)
|
|
111
|
+
*/
|
|
112
|
+
end_datetime: string) => Promise<default_2.infer<typeof v1_developer_groww_schemas.getGrowwNiftyQuoteTimeline.response>["data"]["niftyTimeline"]>;
|
|
113
|
+
|
|
114
|
+
export declare type FetchNiftyQuoteTimelineResponse = Awaited<ReturnType<ReturnType<typeof fetchNiftyQuoteTimeline>>>;
|
|
115
|
+
|
|
102
116
|
declare const fetchQuote: ({ developerToken, apiDomain, runId, currentTimestamp, currentTimezone, }: {
|
|
103
117
|
developerToken: string;
|
|
104
118
|
apiDomain: string;
|
|
@@ -365,6 +379,74 @@ declare const getGrowwNiftyQuote: {
|
|
|
365
379
|
}, z.core.$strip>;
|
|
366
380
|
};
|
|
367
381
|
|
|
382
|
+
declare const getGrowwNiftyQuoteTimeline: {
|
|
383
|
+
query: z.ZodObject<{
|
|
384
|
+
end_datetime: z.ZodString;
|
|
385
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
386
|
+
}, z.core.$strip>;
|
|
387
|
+
response: z.ZodObject<{
|
|
388
|
+
statusCode: z.ZodNumber;
|
|
389
|
+
message: z.ZodString;
|
|
390
|
+
data: z.ZodObject<{
|
|
391
|
+
niftyTimeline: z.ZodArray<z.ZodObject<{
|
|
392
|
+
id: z.ZodString;
|
|
393
|
+
timestamp: z.ZodString;
|
|
394
|
+
quoteData: z.ZodObject<{
|
|
395
|
+
status: z.ZodEnum<{
|
|
396
|
+
SUCCESS: "SUCCESS";
|
|
397
|
+
FAILURE: "FAILURE";
|
|
398
|
+
}>;
|
|
399
|
+
payload: z.ZodObject<{
|
|
400
|
+
average_price: z.ZodNullable<z.ZodNumber>;
|
|
401
|
+
bid_quantity: z.ZodNullable<z.ZodNumber>;
|
|
402
|
+
bid_price: z.ZodNullable<z.ZodNumber>;
|
|
403
|
+
day_change: z.ZodNullable<z.ZodNumber>;
|
|
404
|
+
day_change_perc: z.ZodNullable<z.ZodNumber>;
|
|
405
|
+
upper_circuit_limit: z.ZodNullable<z.ZodNumber>;
|
|
406
|
+
lower_circuit_limit: z.ZodNullable<z.ZodNumber>;
|
|
407
|
+
ohlc: z.ZodNullable<z.ZodObject<{
|
|
408
|
+
open: z.ZodNullable<z.ZodNumber>;
|
|
409
|
+
high: z.ZodNullable<z.ZodNumber>;
|
|
410
|
+
low: z.ZodNullable<z.ZodNumber>;
|
|
411
|
+
close: z.ZodNullable<z.ZodNumber>;
|
|
412
|
+
}, z.core.$strip>>;
|
|
413
|
+
depth: z.ZodNullable<z.ZodObject<{
|
|
414
|
+
buy: z.ZodArray<z.ZodObject<{
|
|
415
|
+
price: z.ZodNullable<z.ZodNumber>;
|
|
416
|
+
quantity: z.ZodNullable<z.ZodNumber>;
|
|
417
|
+
}, z.core.$strip>>;
|
|
418
|
+
sell: z.ZodArray<z.ZodObject<{
|
|
419
|
+
price: z.ZodNullable<z.ZodNumber>;
|
|
420
|
+
quantity: z.ZodNullable<z.ZodNumber>;
|
|
421
|
+
}, z.core.$strip>>;
|
|
422
|
+
}, z.core.$strip>>;
|
|
423
|
+
high_trade_range: z.ZodNullable<z.ZodNull>;
|
|
424
|
+
implied_volatility: z.ZodNullable<z.ZodNull>;
|
|
425
|
+
last_trade_quantity: z.ZodNullable<z.ZodNumber>;
|
|
426
|
+
last_trade_time: z.ZodNullable<z.ZodNumber>;
|
|
427
|
+
low_trade_range: z.ZodNullable<z.ZodNull>;
|
|
428
|
+
last_price: z.ZodNullable<z.ZodNumber>;
|
|
429
|
+
market_cap: z.ZodNullable<z.ZodNumber>;
|
|
430
|
+
offer_price: z.ZodNullable<z.ZodNumber>;
|
|
431
|
+
offer_quantity: z.ZodNullable<z.ZodNumber>;
|
|
432
|
+
oi_day_change: z.ZodNullable<z.ZodNumber>;
|
|
433
|
+
oi_day_change_percentage: z.ZodNullable<z.ZodNumber>;
|
|
434
|
+
open_interest: z.ZodNullable<z.ZodNumber>;
|
|
435
|
+
previous_open_interest: z.ZodNullable<z.ZodNull>;
|
|
436
|
+
total_buy_quantity: z.ZodNullable<z.ZodNumber>;
|
|
437
|
+
total_sell_quantity: z.ZodNullable<z.ZodNumber>;
|
|
438
|
+
volume: z.ZodNullable<z.ZodNumber>;
|
|
439
|
+
week_52_high: z.ZodNullable<z.ZodNumber>;
|
|
440
|
+
week_52_low: z.ZodNullable<z.ZodNumber>;
|
|
441
|
+
}, z.core.$strip>;
|
|
442
|
+
}, z.core.$strip>;
|
|
443
|
+
createdAt: z.ZodString;
|
|
444
|
+
updatedAt: z.ZodString;
|
|
445
|
+
}, z.core.$strip>>;
|
|
446
|
+
}, z.core.$strip>;
|
|
447
|
+
}, z.core.$strip>;
|
|
448
|
+
};
|
|
449
|
+
|
|
368
450
|
declare const getGrowwQuote: {
|
|
369
451
|
query: z.ZodObject<{
|
|
370
452
|
symbol: z.ZodString;
|
|
@@ -519,6 +601,10 @@ declare const getLists: {
|
|
|
519
601
|
}>;
|
|
520
602
|
datetime: z.ZodOptional<z.ZodString>;
|
|
521
603
|
timezone: z.ZodOptional<z.ZodString>;
|
|
604
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
605
|
+
FULL: "FULL";
|
|
606
|
+
TOP_5: "TOP_5";
|
|
607
|
+
}>>;
|
|
522
608
|
}, z.core.$strip>;
|
|
523
609
|
response: z.ZodObject<{
|
|
524
610
|
statusCode: z.ZodNumber;
|
|
@@ -664,6 +750,10 @@ declare const getShortlistPersistence: {
|
|
|
664
750
|
start_datetime: z.ZodString;
|
|
665
751
|
end_datetime: z.ZodString;
|
|
666
752
|
timezone: z.ZodOptional<z.ZodString>;
|
|
753
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
754
|
+
FULL: "FULL";
|
|
755
|
+
TOP_5: "TOP_5";
|
|
756
|
+
}>>;
|
|
667
757
|
}, z.core.$strip>;
|
|
668
758
|
response: z.ZodObject<{
|
|
669
759
|
statusCode: z.ZodNumber;
|
|
@@ -695,6 +785,12 @@ declare const getShortlists: {
|
|
|
695
785
|
TOP_GAINERS: "TOP_GAINERS";
|
|
696
786
|
VOLUME_SHOCKERS: "VOLUME_SHOCKERS";
|
|
697
787
|
}>;
|
|
788
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
789
|
+
FULL: "FULL";
|
|
790
|
+
TOP_5: "TOP_5";
|
|
791
|
+
}>>;
|
|
792
|
+
takeProfitPercentage: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
793
|
+
stopLossPercentage: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
698
794
|
}, z.core.$strip>;
|
|
699
795
|
response: z.ZodObject<{
|
|
700
796
|
statusCode: z.ZodNumber;
|
|
@@ -760,6 +856,14 @@ declare const getShortlists: {
|
|
|
760
856
|
week_52_low: z.ZodNullable<z.ZodNumber>;
|
|
761
857
|
}, z.core.$strip>;
|
|
762
858
|
}, z.core.$strip>>>;
|
|
859
|
+
targetPrice: z.ZodOptional<z.ZodNumber>;
|
|
860
|
+
stopLossPrice: z.ZodOptional<z.ZodNumber>;
|
|
861
|
+
targetAchieved: z.ZodOptional<z.ZodBoolean>;
|
|
862
|
+
stopLossHit: z.ZodOptional<z.ZodBoolean>;
|
|
863
|
+
timeToTargetMinutes: z.ZodOptional<z.ZodNumber>;
|
|
864
|
+
timeToStopLossMinutes: z.ZodOptional<z.ZodNumber>;
|
|
865
|
+
targetTimestamp: z.ZodOptional<z.ZodString>;
|
|
866
|
+
stopLossTimestamp: z.ZodOptional<z.ZodString>;
|
|
763
867
|
}, z.core.$strip>>;
|
|
764
868
|
}, z.core.$strip>>;
|
|
765
869
|
}, z.core.$strip>;
|
|
@@ -890,6 +994,13 @@ export declare interface RunContext {
|
|
|
890
994
|
fetchCandles: ReturnType<typeof fetchCandles>;
|
|
891
995
|
fetchQuote: ReturnType<typeof fetchQuote>;
|
|
892
996
|
fetchNiftyQuote: ReturnType<typeof fetchNiftyQuote>;
|
|
997
|
+
/**
|
|
998
|
+
* Given an end_datetime, returns the NIFTY quote timeline for the given date
|
|
999
|
+
*
|
|
1000
|
+
* @param end_datetime - The end datetime in IST string format (YYYY-MM-DDTHH:mm:ss)
|
|
1001
|
+
* @returns The NIFTY quote timeline for the given date
|
|
1002
|
+
*/
|
|
1003
|
+
fetchNiftyQuoteTimeline: ReturnType<typeof fetchNiftyQuoteTimeline>;
|
|
893
1004
|
/**
|
|
894
1005
|
* Given a symbol and a end_datetime, returns the quote timeline for the given date
|
|
895
1006
|
*/
|
|
@@ -911,6 +1022,69 @@ export declare interface RunContext {
|
|
|
911
1022
|
currentTimestamp: string;
|
|
912
1023
|
}
|
|
913
1024
|
|
|
1025
|
+
declare const shortlistEntryWithMetricsSchema: z.ZodObject<{
|
|
1026
|
+
nseSymbol: z.ZodString;
|
|
1027
|
+
name: z.ZodString;
|
|
1028
|
+
price: z.ZodNumber;
|
|
1029
|
+
quoteData: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1030
|
+
status: z.ZodEnum<{
|
|
1031
|
+
SUCCESS: "SUCCESS";
|
|
1032
|
+
FAILURE: "FAILURE";
|
|
1033
|
+
}>;
|
|
1034
|
+
payload: z.ZodObject<{
|
|
1035
|
+
average_price: z.ZodNullable<z.ZodNumber>;
|
|
1036
|
+
bid_quantity: z.ZodNullable<z.ZodNumber>;
|
|
1037
|
+
bid_price: z.ZodNullable<z.ZodNumber>;
|
|
1038
|
+
day_change: z.ZodNullable<z.ZodNumber>;
|
|
1039
|
+
day_change_perc: z.ZodNullable<z.ZodNumber>;
|
|
1040
|
+
upper_circuit_limit: z.ZodNullable<z.ZodNumber>;
|
|
1041
|
+
lower_circuit_limit: z.ZodNullable<z.ZodNumber>;
|
|
1042
|
+
ohlc: z.ZodNullable<z.ZodObject<{
|
|
1043
|
+
open: z.ZodNullable<z.ZodNumber>;
|
|
1044
|
+
high: z.ZodNullable<z.ZodNumber>;
|
|
1045
|
+
low: z.ZodNullable<z.ZodNumber>;
|
|
1046
|
+
close: z.ZodNullable<z.ZodNumber>;
|
|
1047
|
+
}, z.core.$strip>>;
|
|
1048
|
+
depth: z.ZodNullable<z.ZodObject<{
|
|
1049
|
+
buy: z.ZodArray<z.ZodObject<{
|
|
1050
|
+
price: z.ZodNullable<z.ZodNumber>;
|
|
1051
|
+
quantity: z.ZodNullable<z.ZodNumber>;
|
|
1052
|
+
}, z.core.$strip>>;
|
|
1053
|
+
sell: z.ZodArray<z.ZodObject<{
|
|
1054
|
+
price: z.ZodNullable<z.ZodNumber>;
|
|
1055
|
+
quantity: z.ZodNullable<z.ZodNumber>;
|
|
1056
|
+
}, z.core.$strip>>;
|
|
1057
|
+
}, z.core.$strip>>;
|
|
1058
|
+
high_trade_range: z.ZodNullable<z.ZodNull>;
|
|
1059
|
+
implied_volatility: z.ZodNullable<z.ZodNull>;
|
|
1060
|
+
last_trade_quantity: z.ZodNullable<z.ZodNumber>;
|
|
1061
|
+
last_trade_time: z.ZodNullable<z.ZodNumber>;
|
|
1062
|
+
low_trade_range: z.ZodNullable<z.ZodNull>;
|
|
1063
|
+
last_price: z.ZodNullable<z.ZodNumber>;
|
|
1064
|
+
market_cap: z.ZodNullable<z.ZodNumber>;
|
|
1065
|
+
offer_price: z.ZodNullable<z.ZodNumber>;
|
|
1066
|
+
offer_quantity: z.ZodNullable<z.ZodNumber>;
|
|
1067
|
+
oi_day_change: z.ZodNullable<z.ZodNumber>;
|
|
1068
|
+
oi_day_change_percentage: z.ZodNullable<z.ZodNumber>;
|
|
1069
|
+
open_interest: z.ZodNullable<z.ZodNumber>;
|
|
1070
|
+
previous_open_interest: z.ZodNullable<z.ZodNull>;
|
|
1071
|
+
total_buy_quantity: z.ZodNullable<z.ZodNumber>;
|
|
1072
|
+
total_sell_quantity: z.ZodNullable<z.ZodNumber>;
|
|
1073
|
+
volume: z.ZodNullable<z.ZodNumber>;
|
|
1074
|
+
week_52_high: z.ZodNullable<z.ZodNumber>;
|
|
1075
|
+
week_52_low: z.ZodNullable<z.ZodNumber>;
|
|
1076
|
+
}, z.core.$strip>;
|
|
1077
|
+
}, z.core.$strip>>>;
|
|
1078
|
+
targetPrice: z.ZodOptional<z.ZodNumber>;
|
|
1079
|
+
stopLossPrice: z.ZodOptional<z.ZodNumber>;
|
|
1080
|
+
targetAchieved: z.ZodOptional<z.ZodBoolean>;
|
|
1081
|
+
stopLossHit: z.ZodOptional<z.ZodBoolean>;
|
|
1082
|
+
timeToTargetMinutes: z.ZodOptional<z.ZodNumber>;
|
|
1083
|
+
timeToStopLossMinutes: z.ZodOptional<z.ZodNumber>;
|
|
1084
|
+
targetTimestamp: z.ZodOptional<z.ZodString>;
|
|
1085
|
+
stopLossTimestamp: z.ZodOptional<z.ZodString>;
|
|
1086
|
+
}, z.core.$strip>;
|
|
1087
|
+
|
|
914
1088
|
declare const signIn: {
|
|
915
1089
|
body: z.ZodObject<{
|
|
916
1090
|
developerToken: z.ZodString;
|
|
@@ -1011,6 +1185,7 @@ declare namespace v1_dashboard_schemas {
|
|
|
1011
1185
|
|
|
1012
1186
|
declare namespace v1_dashboard_shortlists_schemas {
|
|
1013
1187
|
export {
|
|
1188
|
+
shortlistEntryWithMetricsSchema,
|
|
1014
1189
|
getShortlists
|
|
1015
1190
|
}
|
|
1016
1191
|
}
|
|
@@ -1022,6 +1197,7 @@ declare namespace v1_developer_groww_schemas {
|
|
|
1022
1197
|
getGrowwQuote,
|
|
1023
1198
|
getGrowwToken,
|
|
1024
1199
|
getGrowwQuoteTimeline,
|
|
1200
|
+
getGrowwNiftyQuoteTimeline,
|
|
1025
1201
|
getGrowwNiftyQuote
|
|
1026
1202
|
}
|
|
1027
1203
|
}
|