Skip to content

Commit 08e0679

Browse files
authored
Merge pull request #72 from upstox/addingNewApis
Adding new apis
2 parents 05590e7 + 2a7ec38 commit 08e0679

38 files changed

+4350
-138
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def main():
122122
configuration.access_token = access_token
123123

124124
streamer = upstox_client.MarketDataStreamer(
125-
upstox_client.ApiClient(configuration), ["NSE_INDEX|Nifty 50", "NSE_INDEX|Bank Nifty"], "full")
125+
upstox_client.ApiClient(configuration), ["NSE_INDEX|Nifty 50", "NSE_INDEX|Nifty Bank"], "full")
126126

127127
streamer.on("message", on_message)
128128

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
long_description = (this_directory / "README.md").read_text()
1919

2020
NAME = "upstox-python-sdk"
21-
VERSION = "2.4.1"
21+
VERSION = "2.4.3"
2222
# To install the library, run the following
2323
#
2424
# python setup.py install

test/order/cancel_order.py

Lines changed: 0 additions & 15 deletions
This file was deleted.

test/order/modify_order.py

Lines changed: 0 additions & 16 deletions
This file was deleted.

test/order/place_order.py

Lines changed: 0 additions & 12 deletions
This file was deleted.

test/sdk_tests/data_token.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
access_token = "your_access_token"

test/websocket-tests/market-websocket/basic.py renamed to test/sdk_tests/market_basic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import upstox_client
2+
import data_token
23

34
configuration = upstox_client.Configuration()
4-
access_token = "your_access_token"
5-
configuration.access_token = access_token
5+
configuration.access_token = data_token.access_token
66
streamer = upstox_client.MarketDataStreamer(
77
upstox_client.ApiClient(configuration), instrumentKeys=["MCX_FO|426302", "NSE_EQ|INE528G01035"], mode="full")
88

test/sdk_tests/portfolio_basic.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import upstox_client
2+
import data_token
3+
4+
5+
def on_message(message):
6+
print(message)
7+
8+
9+
def on_open():
10+
print("connection opened")
11+
12+
13+
def main():
14+
configuration = upstox_client.Configuration()
15+
configuration.access_token = data_token.access_token
16+
17+
streamer = upstox_client.PortfolioDataStreamer(
18+
upstox_client.ApiClient(configuration))
19+
20+
streamer.on("message", on_message)
21+
streamer.on("open", on_open)
22+
streamer.connect()
23+
24+
25+
if __name__ == "__main__":
26+
main()

0 commit comments

Comments
 (0)