(20241227) Payment auth fixed.
This commit is contained in:
@@ -182,6 +182,11 @@ def main():
|
||||
api_key = creds["apiKey"]
|
||||
access_token = creds["accessToken"]
|
||||
|
||||
# Get the instruments of interest:
|
||||
response = httpx.post(url = r"https://api.thecaoffice.com/markets/watchlist/distincts")
|
||||
instruments_of_interest = response.json()["data"]["rs0"]
|
||||
symbols_of_interest = [i["symbol"] for i in instruments_of_interest]
|
||||
|
||||
# Create an instance of Zerodha's Kite connection:
|
||||
kite = KiteConnect(api_key = api_key)
|
||||
kite.set_access_token(access_token)
|
||||
@@ -196,8 +201,7 @@ def main():
|
||||
instruments += kite.instruments(exchange = "BCD")
|
||||
|
||||
# Pick the instruments of interest:
|
||||
instruments = instruments[:1250]
|
||||
instruments = [TradingSymbol.from_zerodha_kite(i) for i in instruments]
|
||||
instruments = [TradingSymbol.from_zerodha_kite(i) for i in instruments if i["tradingsymbol"] in symbols_of_interest]
|
||||
|
||||
# Create the lookup:
|
||||
for i in instruments:
|
||||
|
||||
Reference in New Issue
Block a user