webull-openapi-python-sdk 1.0.0__py3-none-any.whl → 1.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- webull/__init__.py +1 -1
- webull/core/__init__.py +1 -1
- webull/core/http/initializer/token/token_manager.py +12 -8
- webull/data/__init__.py +1 -1
- webull/trade/__init__.py +1 -1
- {webull_openapi_python_sdk-1.0.0.dist-info → webull_openapi_python_sdk-1.0.1.dist-info}/METADATA +1 -1
- {webull_openapi_python_sdk-1.0.0.dist-info → webull_openapi_python_sdk-1.0.1.dist-info}/RECORD +11 -11
- {webull_openapi_python_sdk-1.0.0.dist-info → webull_openapi_python_sdk-1.0.1.dist-info}/WHEEL +0 -0
- {webull_openapi_python_sdk-1.0.0.dist-info → webull_openapi_python_sdk-1.0.1.dist-info}/licenses/LICENSE +0 -0
- {webull_openapi_python_sdk-1.0.0.dist-info → webull_openapi_python_sdk-1.0.1.dist-info}/licenses/NOTICE +0 -0
- {webull_openapi_python_sdk-1.0.0.dist-info → webull_openapi_python_sdk-1.0.1.dist-info}/top_level.txt +0 -0
webull/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "1.0.
|
|
1
|
+
__version__ = "1.0.1"
|
webull/core/__init__.py
CHANGED
|
@@ -61,7 +61,7 @@ class TokenManager:
|
|
|
61
61
|
server_access_token = self.fetch_token_from_server(api_client, local_token)
|
|
62
62
|
self.save_token_to_local(server_access_token)
|
|
63
63
|
|
|
64
|
-
if server_access_token.get("status") !=
|
|
64
|
+
if server_access_token.get("status") != "NORMAL":
|
|
65
65
|
msg = ("init_token status not verified error. token:%s expires:%s status:%s" %
|
|
66
66
|
(desensitize.desensitize_token(server_access_token.get("token")), server_access_token.get("expires"), server_access_token.get("status")))
|
|
67
67
|
logger.error(msg)
|
|
@@ -88,11 +88,7 @@ class TokenManager:
|
|
|
88
88
|
else:
|
|
89
89
|
expires = 0
|
|
90
90
|
|
|
91
|
-
|
|
92
|
-
if str_status and str_status.isdigit():
|
|
93
|
-
status = int(str_status)
|
|
94
|
-
else:
|
|
95
|
-
status = 0
|
|
91
|
+
status = f.readline().strip()
|
|
96
92
|
|
|
97
93
|
logger.info("load_token_from_local read local token result. token:%s expires:%s status:%s",
|
|
98
94
|
desensitize.desensitize_token(token), expires, status)
|
|
@@ -119,7 +115,7 @@ class TokenManager:
|
|
|
119
115
|
token_operation = TokenOperation(api_client)
|
|
120
116
|
|
|
121
117
|
create_access_token = self.create_token(token_operation, local_token)
|
|
122
|
-
if create_access_token.get("status") ==
|
|
118
|
+
if create_access_token.get("status") == "NORMAL":
|
|
123
119
|
logger.info("fetch_token_from_server create_token status is verified, no further check required, returning directly. token:%s expires:%s status:%s",
|
|
124
120
|
desensitize.desensitize_token(create_access_token.get("token")), create_access_token.get("expires"), create_access_token.get("status"))
|
|
125
121
|
return create_access_token
|
|
@@ -185,8 +181,16 @@ class TokenManager:
|
|
|
185
181
|
check_access_token.get("expires"), check_access_token.get("status")))
|
|
186
182
|
logger.error(msg)
|
|
187
183
|
raise ClientException("ERROR_CHECK_TOKEN", msg)
|
|
184
|
+
# PENDING -> 0
|
|
185
|
+
# NORMAL -> 1
|
|
186
|
+
# INVALID -> 2
|
|
187
|
+
# EXPIRED -> 3
|
|
188
|
+
if check_access_token.get("status") == "INVALID" or check_access_token.get("status") == "EXPIRED" :
|
|
189
|
+
msg = "fetch_token_from_server check_token status invalidate. status:%s" % check_access_token.get("status")
|
|
190
|
+
logger.error(msg)
|
|
191
|
+
raise ClientException("ERROR_CHECK_TOKEN", msg)
|
|
188
192
|
|
|
189
|
-
if check_access_token.get("status") ==
|
|
193
|
+
if check_access_token.get("status") == "NORMAL":
|
|
190
194
|
logger.info(
|
|
191
195
|
"fetch_token_from_server check_token status is verified, no further check required, returning directly. token:%s expires:%s status:%s",
|
|
192
196
|
desensitize.desensitize_token(create_access_token.get("token")), create_access_token.get("expires"),
|
webull/data/__init__.py
CHANGED
webull/trade/__init__.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
__version__ = "1.0.
|
|
1
|
+
__version__ = "1.0.1"
|
|
2
2
|
|
{webull_openapi_python_sdk-1.0.0.dist-info → webull_openapi_python_sdk-1.0.1.dist-info}/RECORD
RENAMED
|
@@ -7,8 +7,8 @@ samples/trade/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
7
7
|
samples/trade/trade_client.py,sha256=bXX3onGK6aRFpopeE3yDQAx4Xo9dDc-k9gGbwB9El0A,5678
|
|
8
8
|
samples/trade/trade_client_v2.py,sha256=h_PZCTjdu9rHVUwnbp_mtVtuuDmwDaTTb0hS8WKNys8,6545
|
|
9
9
|
samples/trade/trade_event_client.py,sha256=5OJR886d0pxJeYtfthYyFGgEy_CFk3jbjLrhPapqybc,2085
|
|
10
|
-
webull/__init__.py,sha256=
|
|
11
|
-
webull/core/__init__.py,sha256=
|
|
10
|
+
webull/__init__.py,sha256=x7SWnx8ho-VaDHLtK75ItIuboJ9SpcR_vy2GvXNmU4A,21
|
|
11
|
+
webull/core/__init__.py,sha256=GdisG6FgLbwBiaOzLM6QdKmaSwo_Ry3KKAw1uRPgFQ8,225
|
|
12
12
|
webull/core/client.py,sha256=1xH9XS92AKdUiVUPJYtzeaIl88bwa_ChDALJAxrXWQ0,16229
|
|
13
13
|
webull/core/compat.py,sha256=HDis0D271oQ6OCpA7ViX10NJdhfXdoBfzx6nuV3vrnI,3114
|
|
14
14
|
webull/core/headers.py,sha256=7aMt3_YtaL9Yhqj2T1g7ESQgkI78SAXIk7hMX5U5FgE,2019
|
|
@@ -51,7 +51,7 @@ webull/core/http/response.py,sha256=Q4W2azXn9hqYuR1NVt8NlHmIaFAi0lmD3ejXRygk2KA,
|
|
|
51
51
|
webull/core/http/initializer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
52
52
|
webull/core/http/initializer/client_initializer.py,sha256=5ywAPHN7JGQOspxBpEBQLxG_IkNxec6OIPS9ZQVodTk,2751
|
|
53
53
|
webull/core/http/initializer/token/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
54
|
-
webull/core/http/initializer/token/token_manager.py,sha256=
|
|
54
|
+
webull/core/http/initializer/token/token_manager.py,sha256=nc9F14uJ5iwqi2MK9R7QvhU9SqBIlWr8wr2jYrmtxRM,11197
|
|
55
55
|
webull/core/http/initializer/token/token_operation.py,sha256=91WpdFvxYJFD92iKraKMsRlxAI6GhXW1x0lrqDXna7E,2593
|
|
56
56
|
webull/core/http/initializer/token/bean/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
57
57
|
webull/core/http/initializer/token/bean/access_token.py,sha256=wK5UrTnAMacO_vkhym-BcmbJdkHJcYHIpFcXJrQp1r8,1529
|
|
@@ -173,7 +173,7 @@ webull/core/vendored/requests/packages/urllib3/util/ssl_.py,sha256=aRUKc1WIyS-sU
|
|
|
173
173
|
webull/core/vendored/requests/packages/urllib3/util/timeout.py,sha256=sAyiBBds7eOk1oM3ulvVMWZiqx1B743puHqK92XwBcY,10325
|
|
174
174
|
webull/core/vendored/requests/packages/urllib3/util/url.py,sha256=_CgqbyNrQWubrv_y5aWhuutz3mnbj1cvTUe4VYbGYWA,7367
|
|
175
175
|
webull/core/vendored/requests/packages/urllib3/util/wait.py,sha256=0FHS8R3OrMU-97XWt8AxuUStkSGXTct9CfOwY_fWn7U,5971
|
|
176
|
-
webull/data/__init__.py,sha256=
|
|
176
|
+
webull/data/__init__.py,sha256=pj9y3BSdxnFgGSWYUQ8uiy9aj15LqGAL6YYIeK6MMJ4,37
|
|
177
177
|
webull/data/data_client.py,sha256=MVVVUFp0m0O0olCiy1LBWDxCgtrxxsv9NBPvetwoOB0,1590
|
|
178
178
|
webull/data/data_streaming_client.py,sha256=hYqrdKTeIB3Xmp7LMjMwN1XE6Y7bKXX0y-lGX1ty6W4,3870
|
|
179
179
|
webull/data/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -222,7 +222,7 @@ webull/data/request/get_snapshot_request.py,sha256=L5PZXYMkmUre_ZyzbDcAYYwokBYM2
|
|
|
222
222
|
webull/data/request/get_tick_request.py,sha256=qXSknYTm1ePFZbGB6Sw4WRGj-I2DVBfJTSURRTCaruc,1352
|
|
223
223
|
webull/data/request/subscribe_request.py,sha256=dm93Q5Q4gigAMqAobolaYYSs3wM6QddPUZOjEtJsX-8,1471
|
|
224
224
|
webull/data/request/unsubscribe_request.py,sha256=hQA4mYM64PgmQEA2otl47-3nCXqjsSY_weFA3_wNbMM,1446
|
|
225
|
-
webull/trade/__init__.py,sha256=
|
|
225
|
+
webull/trade/__init__.py,sha256=JTfSBhPsRIOJK94xsud0GqFqJH1DdQkxu8wEGXIsrLo,23
|
|
226
226
|
webull/trade/trade_client.py,sha256=btEbAFjR6pipJIeNv_vQGBz94_cqZmLOIvSMTvMe4w8,2062
|
|
227
227
|
webull/trade/trade_events_client.py,sha256=4a7qupeT3dKJRKBQqXNhCai6ENzX6PA4yjTDHHxPR0w,8892
|
|
228
228
|
webull/trade/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -287,9 +287,9 @@ webull/trade/trade/trade_instrument.py,sha256=293IaiLnhw0mAc1IuF3LSgwgve_XZ1Dyf1
|
|
|
287
287
|
webull/trade/trade/v2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
288
288
|
webull/trade/trade/v2/account_info_v2.py,sha256=neI3taHZKQK0pqNFh1H3FgBCCQ-mdDx_X_GUJ3sjqpo,2543
|
|
289
289
|
webull/trade/trade/v2/order_operation_v2.py,sha256=v_In-u0DUlodl_mlWDM5-XGzGBAK7hAkf_CrkVCNd9g,10580
|
|
290
|
-
webull_openapi_python_sdk-1.0.
|
|
291
|
-
webull_openapi_python_sdk-1.0.
|
|
292
|
-
webull_openapi_python_sdk-1.0.
|
|
293
|
-
webull_openapi_python_sdk-1.0.
|
|
294
|
-
webull_openapi_python_sdk-1.0.
|
|
295
|
-
webull_openapi_python_sdk-1.0.
|
|
290
|
+
webull_openapi_python_sdk-1.0.1.dist-info/licenses/LICENSE,sha256=ALOnsLtb1aHxmDJg3-oMi0BO-i-cjfyZaOBfnnavKMc,11359
|
|
291
|
+
webull_openapi_python_sdk-1.0.1.dist-info/licenses/NOTICE,sha256=X5TApte6CPV10b96Cb70IRLusXmiRmK_R-dB-1tQM_I,2018
|
|
292
|
+
webull_openapi_python_sdk-1.0.1.dist-info/METADATA,sha256=1mGFNDRnPfslKVhLJEdMC4c_qCD1OF9NuG0pZ_fdeic,702
|
|
293
|
+
webull_openapi_python_sdk-1.0.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
294
|
+
webull_openapi_python_sdk-1.0.1.dist-info/top_level.txt,sha256=h8pEjNDGWS2ZUZ2vYFpUShoMQT0ZRIQaD57QJWD8_aI,15
|
|
295
|
+
webull_openapi_python_sdk-1.0.1.dist-info/RECORD,,
|
{webull_openapi_python_sdk-1.0.0.dist-info → webull_openapi_python_sdk-1.0.1.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|