Skip to content

Commit 856c43c

Browse files
committed
removed d30
1 parent ec69662 commit 856c43c

File tree

5 files changed

+28
-11
lines changed

5 files changed

+28
-11
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,11 @@ Feel free to adjust the access token placeholder and any other specifics to bett
156156

157157
#### Modes
158158
- **ltpc**: ltpc provides information solely about the most recent trade, encompassing details such as the last trade price, time of the last trade, quantity traded, and the closing price from the previous day.
159-
- **full**: The full option offers comprehensive information, including the latest trade prices, D5 depth, 1-minute, 30-minute, and daily candlestick data, along with some additional details.
160-
- **full_d30**: full_d30 includes Full mode data plus 30 market level quotes.
159+
- **full**: The full option offers comprehensive information, including the latest trade prices, D5 depth, 1-minute, 30-minute, and daily candlestick data, along with some additional details.
161160
- **option_greeks**: Contains only option greeks.
162161

163162
#### Functions
164-
1. **constructor MarketDataStreamerV3(apiClient, instrumentKeys, mode)**: Initializes the streamer with optional instrument keys and mode (`full`, `ltpc`, `option_greeks` or `full_d30`).
163+
1. **constructor MarketDataStreamerV3(apiClient, instrumentKeys, mode)**: Initializes the streamer with optional instrument keys and mode (`full`, `ltpc` or `option_greeks`).
165164
2. **connect()**: Establishes the WebSocket connection.
166165
3. **subscribe(instrumentKeys, mode)**: Subscribes to updates for given instrument keys in the specified mode. Both parameters are mandatory.
167166
4. **unsubscribe(instrumentKeys)**: Stops updates for the specified instrument keys.

test/sdk_tests/data_token.py

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,21 @@
1-
access_token = ""
1+
access_token = ""
2+
3+
4+
sample_instrument_key = [
5+
"NSE_EQ|INE528G01035", "NSE_EQ|INE399C01030", "BSE_EQ|INE055E01034", "NCD_FO|14245", "NSE_EQ|INE169A01031",
6+
"NSE_EQ|INE437A01024", "NSE_EQ|INE044A01036", "NSE_EQ|INE868B01028", "NSE_EQ|INE202E08219", "NSE_EQ|INE044A01036",
7+
"NSE_EQ|INE257A01026", "NSE_EQ|INE155A01022", "BSE_EQ|INE040A08575", "BSE_EQ|INE040A08567", "NSE_EQ|INE084A01016",
8+
"NSE_EQ|INE121A01024", "NSE_EQ|INE0OGZ15015", "BSE_EQ|INE0OGZ15015", "NSE_EQ|INE364U01010", "NSE_EQ|INE765G01017",
9+
"NSE_EQ|INE239A01024", "BSE_EQ|INE721A07SI5", "NSE_EQ|INE832A01018", "NSE_EQ|INE127D01025", "BCD_FO|2119087",
10+
"BSE_EQ|IN2920210480", "NSE_EQ|INE726G01019", "NSE_FO|114127", "NSE_EQ|INE340Z01019", "NSE_FO|114126",
11+
"NSE_FO|114125", "NSE_FO|114128", "NSE_EQ|IN2120230163", "NSE_FO|38516", "NSE_FO|114133", "NSE_FO|114132",
12+
"BSE_EQ|INE338I14GR3", "BSE_EQ|INE360L01017", "MCX_FO|431658", "MCX_FO|431657", "BSE_EQ|INE896W08020",
13+
"MCX_FO|431656", "BSE_EQ|INE214D01021", "NSE_EQ|IN4920240186", "NSE_EQ|INF789F01GW9", "NSE_EQ|INE0CJF01024",
14+
"NSE_EQ|IN2120230189", "BSE_EQ|INE896W08012", "MCX_FO|431668", "MCX_FO|431667", "MCX_FO|431666",
15+
"BSE_EQ|IN001129C021", "NSE_EQ|IN4920240194", "NSE_EQ|INE389Z07054", "BSE_EQ|INE748A01016", "BSE_EQ|IN000942C036",
16+
"BSE_EQ|INE148I07SM6", "NSE_EQ|INF789F01GV1", "NSE_EQ|INE128A01029", "NSE_EQ|IN2120230197", "NSE_FO|128727",
17+
"NSE_FO|128726", "NSE_FO|128729", "NSE_FO|128728", "BSE_EQ|INE03W107090", "BSE_EQ|INE148I07RY3",
18+
"BSE_EQ|INE651J07689", "BSE_FO|1172370", "BSE_FO|1172372", "BSE_FO|1172375", "NSE_EQ|IN2220230022",
19+
"NSE_EQ|INE508G01029", "NSE_FO|114077", "NSE_FO|114078", "NSE_FO|114079", "NSE_FO|114080", "NSE_FO|114081",
20+
"NSE_FO|38584", "NSE_FO|38585", "NSE_FO|38591", "NSE_FO|38592", "NSE_FO|38599"
21+
]

test/sdk_tests/market_basic_v3.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33

44
configuration = upstox_client.Configuration()
55
configuration.access_token = data_token.access_token
6+
instruments = data_token.sample_instrument_key
67
streamer = upstox_client.MarketDataStreamerV3(
7-
upstox_client.ApiClient(configuration), instrumentKeys=["NSE_EQ|INE528G01035"], mode="full")
8+
upstox_client.ApiClient(configuration), instrumentKeys=instruments[0:70], mode="option_greeks")
89

910
streamer.auto_reconnect(True, 5, 10)
1011

upstox_client/feeder/market_data_feeder_v3.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ class MarketDataFeederV3(Feeder):
1010
Mode = {
1111
"LTPC": "ltpc",
1212
"FULL": "full",
13-
"OPTION": "option_greeks",
14-
"D30": "full_d30"
13+
"OPTION": "option_greeks"
1514
}
1615

1716
Method = {

upstox_client/feeder/market_data_streamer_v3.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ class MarketDataStreamerV3(Streamer):
88
Mode = {
99
"LTPC": "ltpc",
1010
"FULL": "full",
11-
"OPTION": "option_greeks",
12-
"D30": "full_d30"
11+
"OPTION": "option_greeks"
1312
}
1413
def __init__(self, api_client=None, instrumentKeys=[], mode="ltpc"):
1514
super().__init__(api_client)
@@ -20,8 +19,7 @@ def __init__(self, api_client=None, instrumentKeys=[], mode="ltpc"):
2019
self.subscriptions = {
2120
self.Mode["LTPC"]: set(),
2221
self.Mode["FULL"]: set(),
23-
self.Mode["OPTION"]: set(),
24-
self.Mode["D30"]: set(),
22+
self.Mode["OPTION"]: set()
2523
}
2624
if mode not in self.Mode.values():
2725
raise Exception(f"Invalid mode provided {mode}")

0 commit comments

Comments
 (0)