(20241228) Payments module revamped!
This commit is contained in:
@@ -130,6 +130,8 @@ def to_kafka(tick: TradingTick) -> bool:
|
||||
|
||||
success = False
|
||||
summary = tick.summary
|
||||
print(json.to_string(summary))
|
||||
print(json.to_string(tick.model_dump(), default=str))
|
||||
summary["messageType"] = "ticks"
|
||||
success = kafka_producer.produce(value = summary)
|
||||
if not success:
|
||||
@@ -203,8 +205,15 @@ def main():
|
||||
# instruments += kite.instruments(exchange = "BCD")
|
||||
|
||||
# # Pick the instruments of interest:
|
||||
instruments = [TradingSymbol.from_zerodha_kite(i) for i in instruments[:1000]]
|
||||
# instruments = [TradingSymbol.from_zerodha_kite(i) for i in instruments if i["tradingsymbol"] in symbols_of_interest]
|
||||
# instruments = [TradingSymbol.from_zerodha_kite(i) for i in instruments[:1000]]
|
||||
# instruments = [
|
||||
# TradingSymbol.from_zerodha_kite(i) for i in instruments
|
||||
# if i["tradingsymbol"] in symbols_of_interest or i["name"] in symbols_of_interest
|
||||
# ]
|
||||
instruments = [
|
||||
TradingSymbol.from_zerodha_kite(i) for i in instruments
|
||||
if i["instrument_token"] in [109760007]
|
||||
]
|
||||
|
||||
# Create the lookup:
|
||||
for i in instruments:
|
||||
|
||||
Reference in New Issue
Block a user