amit44
February 16, 2025, 8:23am
1
Hi Team
As you have mentioned that v2 api will get shut down around March 3rd.
Currently I am using python sdk for the market data stream fot the candle data.
My question is - by when we can have the python sdk for market data feed using v3.
Or we have to use the non sdk version to get the market data using v3.
Thanks
Yes, i have this same query as well. @MohitGolecha
amit44
February 16, 2025, 9:06am
3
from .market_data_feeder_v3 import MarketDataFeederV3
from .streamer import Streamer
from .proto import MarketDataFeedV3_pb2
from google.protobuf import json_format
class MarketDataStreamerV3(Streamer):
Mode = {
"LTPC": "ltpc",
"FULL": "full",
"OPTION": "option_greeks"
}
def __init__(self, api_client=None, instrumentKeys=[], mode="ltpc"):
super().__init__(api_client)
self.protobufRoot = MarketDataFeedV3_pb2
self.api_client = api_client
self.instrumentKeys = instrumentKeys
self.mode = mode
self.subscriptions = {
self.Mode["LTPC"]: set(),
This file has been truncated. show original
I can see that there is
class MarketDataStreamerV3(Streamer) in the git repo (above)
I am assuming that we have to import MarketDataStreamerV3 instead of MarketDataStreamer and that should take care of everything.
But if upstox team can confirm, would be quite helpful.
Ketan
February 17, 2025, 6:25am
4
Hi @amit44
If you upgrade to the latest Python SDK version (v2.12.0
) and use the MarketDataStreamerV3
class instead of MarketDataStreamer
, you will be automatically transitioned to the v3 WebSocket.
Thanks!
1 Like