Skip to content

Commit 47ceffc

Browse files
authored
Merge pull request #70 from upstox/ssl-issue
set ssl context to false
2 parents d657c4f + 1a6d70e commit 47ceffc

File tree

4 files changed

+7
-12
lines changed

4 files changed

+7
-12
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The official Python client for communicating with the <a href="https://upstox.co
99
Upstox API is a set of rest APIs that provide data required to build a complete investment and trading platform. Execute orders in real time, manage user portfolio, stream live market data (using Websocket), and more, with the easy to understand API collection.
1010

1111
- API version: v2
12-
- Package version: 2.4.0
12+
- Package version: 2.4.1
1313
- Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen
1414

1515
This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project.
@@ -60,7 +60,7 @@ import upstox_client
6060

6161
## Documentation for API Endpoints
6262

63-
All URIs are relative to *https://api-v2.upstox.com*
63+
All URIs are relative to *https://api.upstox.com/v2/*
6464

6565
Class | Method | HTTP request | Description
6666
------------ | ------------- | ------------- | -------------

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.0"
21+
VERSION = "2.4.1"
2222
# To install the library, run the following
2323
#
2424
# python setup.py install

upstox_client/feeder/market_data_feeder.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,10 @@ def connect(self):
3434
if self.ws and self.ws.sock:
3535
return
3636

37-
ssl_context = ssl.create_default_context()
38-
ssl_context.load_default_certs() # Load default CA certificates
3937
sslopt = {
40-
"cert_reqs": ssl.CERT_REQUIRED, # Require a valid certificate
41-
"check_hostname": True, # Verify the server's hostname
38+
"cert_reqs": ssl.CERT_NONE,
39+
"check_hostname": False,
4240
}
43-
4441
ws_url = "wss://api.upstox.com/v2/feed/market-data-feed"
4542
headers = {'Authorization': self.api_client.configuration.auth_settings().get("OAUTH2")[
4643
"value"]}

upstox_client/feeder/portfolio_data_feeder.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,9 @@ def connect(self):
2020
if self.ws and self.ws.sock:
2121
return
2222

23-
ssl_context = ssl.create_default_context()
24-
ssl_context.load_default_certs() # Load default CA certificates
2523
sslopt = {
26-
"cert_reqs": ssl.CERT_REQUIRED, # Require a valid certificate
27-
"check_hostname": True, # Verify the server's hostname
24+
"cert_reqs": ssl.CERT_NONE,
25+
"check_hostname": False,
2826
}
2927

3028
ws_url = "wss://api.upstox.com/v2/feed/portfolio-stream-feed"

0 commit comments

Comments
 (0)