shoonya-sdk 0.4.9 → 0.5.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/shoonya-sdk.cjs +6 -9
- package/dist/shoonya-sdk.js +6 -9
- package/package.json +1 -1
package/dist/shoonya-sdk.cjs
CHANGED
|
@@ -563,9 +563,10 @@ var Shoonya = class extends RetryManager {
|
|
|
563
563
|
const optionType = params.optionType.at(0);
|
|
564
564
|
const symbol = params.symbol.toUpperCase();
|
|
565
565
|
let c = 0;
|
|
566
|
-
for await (const [
|
|
567
|
-
|
|
568
|
-
|
|
566
|
+
for await (const [
|
|
567
|
+
expiry,
|
|
568
|
+
unformattedDate
|
|
569
|
+
] of this.getNextFormattedDates()) {
|
|
569
570
|
const optionToPick = `${symbol}${expiry}${optionType}${strikePrice}`;
|
|
570
571
|
const optionChain = await this.getOptionChain({
|
|
571
572
|
count,
|
|
@@ -604,12 +605,8 @@ var Shoonya = class extends RetryManager {
|
|
|
604
605
|
const newYear = year.slice(2);
|
|
605
606
|
return `${day}${newMonth}${newYear}`;
|
|
606
607
|
}
|
|
607
|
-
getNextFormattedDates(
|
|
608
|
-
|
|
609
|
-
if (["next", "more-than-1-day", "more-than-3-day"].includes(expiry))
|
|
610
|
-
multiplier = 2;
|
|
611
|
-
if (["next-next", "more-than-10-day"].includes(expiry))
|
|
612
|
-
multiplier = 3;
|
|
608
|
+
getNextFormattedDates() {
|
|
609
|
+
const multiplier = 3;
|
|
613
610
|
let currentDate = /* @__PURE__ */ new Date();
|
|
614
611
|
let dates = [];
|
|
615
612
|
for (let i = 0; i <= 7 * multiplier; i++) {
|
package/dist/shoonya-sdk.js
CHANGED
|
@@ -537,9 +537,10 @@ var Shoonya = class extends RetryManager {
|
|
|
537
537
|
const optionType = params.optionType.at(0);
|
|
538
538
|
const symbol = params.symbol.toUpperCase();
|
|
539
539
|
let c = 0;
|
|
540
|
-
for await (const [
|
|
541
|
-
|
|
542
|
-
|
|
540
|
+
for await (const [
|
|
541
|
+
expiry,
|
|
542
|
+
unformattedDate
|
|
543
|
+
] of this.getNextFormattedDates()) {
|
|
543
544
|
const optionToPick = `${symbol}${expiry}${optionType}${strikePrice}`;
|
|
544
545
|
const optionChain = await this.getOptionChain({
|
|
545
546
|
count,
|
|
@@ -578,12 +579,8 @@ var Shoonya = class extends RetryManager {
|
|
|
578
579
|
const newYear = year.slice(2);
|
|
579
580
|
return `${day}${newMonth}${newYear}`;
|
|
580
581
|
}
|
|
581
|
-
getNextFormattedDates(
|
|
582
|
-
|
|
583
|
-
if (["next", "more-than-1-day", "more-than-3-day"].includes(expiry))
|
|
584
|
-
multiplier = 2;
|
|
585
|
-
if (["next-next", "more-than-10-day"].includes(expiry))
|
|
586
|
-
multiplier = 3;
|
|
582
|
+
getNextFormattedDates() {
|
|
583
|
+
const multiplier = 3;
|
|
587
584
|
let currentDate = /* @__PURE__ */ new Date();
|
|
588
585
|
let dates = [];
|
|
589
586
|
for (let i = 0; i <= 7 * multiplier; i++) {
|