Resetting utils subtree.

This commit is contained in:
2024-12-25 19:48:57 +05:30
parent dd9568723a
commit e5c16f8931
172 changed files with 418 additions and 136993 deletions
+14 -1
View File
@@ -152,10 +152,23 @@ def main():
kite.set_access_token(access_token)
# Get a list of instruments to work with:
instruments = kite.instruments(exchange = "MCX")
instruments = kite.instruments(exchange = "NSE")
instruments = instruments[:100]
instruments = [TradingSymbol.from_zerodha_kite(i) for i in instruments]
instruments_csv = []
instruments_csv += kite.instruments(exchange = "NSE")
instruments_csv += kite.instruments(exchange = "NFO")
instruments_csv += kite.instruments(exchange = "BSE")
instruments_csv += kite.instruments(exchange = "BFO")
instruments_csv += kite.instruments(exchange = "MCX")
instruments_csv += kite.instruments(exchange = "CDS")
instruments_csv += kite.instruments(exchange = "BCD")
print("INSTRUMENTS:", len(instruments_csv))
json.to_file(r"/home/developer/Downloads/zerodha_kite_instruments.json", instruments_csv, default = str)
while True: pass
# Create the lookup:
for i in instruments:
INSTRUMENT_TOKENS.append(i.brokerToken)