Skip to content

Commit 03aaade

Browse files
committed
fix: Fix the problem that grpcio cannot be installed in python3.11
1 parent 31d8950 commit 03aaade

File tree

19 files changed

+184
-2099
lines changed

19 files changed

+184
-2099
lines changed

webull-python-sdk-core/webullsdkcore/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "0.1.3"
1+
__version__ = "0.1.4"
22

33
import logging
44

webull-python-sdk-demos/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
LONG_DESCRIPTION = fp.read()
1616

1717
requires = [
18-
"webull-python-sdk-mdata==0.1.3",
19-
"webull-python-sdk-trade==0.1.3"
18+
"webull-python-sdk-mdata==0.1.4",
19+
"webull-python-sdk-trade==0.1.4"
2020
]
2121

2222
setup_args = {

webull-python-sdk-demos/tests/events-core/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
from webullsdktradeeventscore.default_retry_policy import DefaultSubscribeRetryPolicy
2424
from unittest.mock import patch
2525

26-
PRE_HOST = "hk-openapi-events-api.uat.webullbroker.com"
26+
PRE_HOST = "</event_api_endpoint>"
2727

2828

2929
class TestClient(unittest.TestCase):

webull-python-sdk-demos/tests/events-core/test_subscribe.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,16 @@
2222
account_id = "<your_account_id>"
2323
region_id = "hk"
2424

25+
endpoint = "<event_api_endpoint>"
26+
2527

2628
class TestGrpcSubscribe(unittest.TestCase):
2729
def test_subscribe(self):
2830
# Create EventsClient instance
2931
events_client = EventsClient(your_app_key, your_app_secret, region_id)
3032
# For non production environment, you need to set the domain name of the subscription service through eventsclient. For example, the domain name of the UAT environment is set here
3133
events_client = EventsClient(your_app_key, your_app_secret, region_id,
32-
host="hk-openapi-events-api.uat.webullbroker.com")
34+
host=endpoint)
3335

3436
# Set the callback function when the event data is received.
3537
# The data of order status change is printed here

webull-python-sdk-demos/tests/mdata/mqtt/custom_client.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,16 @@ def unsubscribe(self, symbols, category, sub_types, unsubscribe_all=False):
9090

9191
your_app_key = "</your_app_key>"
9292
your_app_secret = "</your_app_secret>"
93-
optional_quotes_endpoint = "</optional_quotes_endpoint>"
93+
optional_quotes_endpoint = "</endpoint>"
94+
95+
# 'hk' or 'us'
96+
region_id = '<region_id>'
9497

9598
if __name__ == '__main__':
9699
custom_client = CustomClient(your_app_key,
97100
your_app_secret,
98101
optional_quotes_endpoint,
99-
"hk")
102+
region_id)
100103
custom_client.on_connect()
101104

102105
try:

webull-python-sdk-demos/tests/mdata/mqtt/test_default_client.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@
1818
from webullsdkmdata.common.subscribe_type import SubscribeType
1919
from webullsdkmdata.quotes.subscribe.default_client import DefaultQuotesClient
2020

21-
optional_quotes_grpc_endpoint = "<optional_quotes_grpc_endpoint>"
22-
your_app_key = "<your_app_key>"
23-
your_app_secret = "<your_app_secret>"
24-
optional_quotes_endpoint = "<optional_quotes_endpoint>"
21+
your_app_key = "</your_app_key>"
22+
your_app_secret = "</your_app_secret>"
23+
optional_quotes_endpoint = "</optional_quotes_endpoint>"
24+
25+
# 'hk' or 'us'
26+
region_id = '<region_id>'
2527

2628

2729
class TestDefaultQuotesClient(unittest.TestCase):
@@ -35,7 +37,7 @@ def on_message(client, userdata, message):
3537
print("Received message '" + str(message.payload) + "' on topic '"
3638
+ message.topic + "' with QoS " + str(message.qos))
3739

38-
client = DefaultQuotesClient(your_app_key, your_app_secret, 'hk', optional_quotes_grpc_endpoint)
40+
client = DefaultQuotesClient(your_app_key, your_app_secret, 'hk', optional_quotes_endpoint)
3941
client.init_default_settings('00700', Category.HK_STOCK.name, SubscribeType.SNAPSHOT.name)
4042
client.on_log = pt_logs
4143
client.on_message = on_message

webull-python-sdk-mdata/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
LONG_DESCRIPTION = fp.read()
1616

1717
requires = [
18-
"webull-python-sdk-core==0.1.3",
19-
"webull-python-sdk-quotes-core==0.1.3"
18+
"webull-python-sdk-core==0.1.4",
19+
"webull-python-sdk-quotes-core==0.1.4"
2020
]
2121

2222
setup_args = {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# coding=utf-8
22

3-
__version__ = '0.1.3'
3+
__version__ = '0.1.4'

0 commit comments

Comments
 (0)