This commit is contained in:
2024-12-30 18:17:33 +05:30
parent de46a55353
commit fcc3d4b2e8
10 changed files with 6626 additions and 5765 deletions
@@ -243,12 +243,12 @@ class NSEIndexConstituents(AsyncNSEBase):
"totTradedVol": symbol["totalTradedVolume"],
"totTradedVal": symbol["totalTradedValue"],
"prevClose": symbol["previousClose"],
"change": symbol["change"],
"pctChange": symbol["pChange"],
"chg": symbol["change"],
"pChg": symbol["pChange"],
"yearHigh": symbol["yearHigh"],
"yearLow": symbol["yearLow"],
"pctChange30d": symbol["perChange30d"],
"pctChange365d": symbol["perChange365d"],
"pChg30d": symbol["perChange30d"],
"pChg365d": symbol["perChange365d"],
"ffmc": symbol["ffmc"]
} for symbol in raw_json["data"] if symbol["priority"] == 0
]
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -182,14 +182,14 @@ class NSEIndexMaster(AsyncNSEBase):
"low": idx["low"],
"close": idx["last"],
"prevClose": idx["previousClose"],
"pctChange": idx["percentChange"],
"pChg": idx["percentChange"],
"yearHigh": idx["yearHigh"],
"yearLow": idx["yearLow"],
"advances": idx.get("advances"),
"declines": idx.get("declines"),
"unchanged": idx.get("unchanged"),
"pctChange30d": idx["perChange30d"],
"pctChange365d": idx["perChange365d"]
"pChg30d": idx["perChange30d"],
"pChg365d": idx["perChange365d"]
} for idx in raw_json["data"]
]
File diff suppressed because it is too large Load Diff
@@ -207,14 +207,14 @@ class NSEPreMarket(AsyncNSEBase):
raw_symbol_detail = raw_symbol_data["detail"]["preOpenMarket"]
formatted_data["data"].append({
"symbol": raw_symbol_metadata["symbol"],
"marketCap": raw_symbol_metadata["marketCap"],
"ffmc": raw_symbol_metadata["marketCap"],
"trigger": raw_symbol_metadata["purpose"],
"yearHigh": raw_symbol_metadata["yearHigh"],
"yearLow": raw_symbol_metadata["yearLow"],
"prevClose": raw_symbol_metadata["previousClose"],
"premarketPrice": raw_symbol_metadata["iep"],
"chg": raw_symbol_metadata["change"],
"pctChg": raw_symbol_metadata["pChange"],
"pChg": raw_symbol_metadata["pChange"],
"totalTradedVolume": raw_symbol_detail["totalTradedVolume"],
"totalBuyVolume": raw_symbol_detail["totalBuyQuantity"],
"totalSellVolume": raw_symbol_detail["totalSellQuantity"],
@@ -223,7 +223,7 @@ class NSEPreMarket(AsyncNSEBase):
# Data sorting (descending order of percent change):
formatted_data["data"] = sorted(
formatted_data["data"],
key = lambda x: x["pctChg"],
key = lambda x: x["pChg"],
reverse = True
)