webull-openapi-python-sdk 2.0.14__py3-none-any.whl → 2.0.15__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.
- samples/__init__.py +1 -1
- samples/trade/trade_event_client.py +3 -1
- webull/__init__.py +1 -1
- webull/core/__init__.py +1 -1
- webull/core/utils/desensitize.py +0 -2
- webull/data/__init__.py +1 -1
- webull/data/quotes/market_streaming_data.py +2 -2
- webull/data/quotes/subscribe/ask_bid_result.py +1 -1
- webull/trade/__init__.py +1 -1
- webull/trade/events/types.py +2 -0
- webull/trade/request/palce_order_request.py +1 -1
- webull/trade/request/place_order_request.py +3 -1
- webull/trade/request/replace_order_request.py +3 -0
- webull/trade/trade/account_info.py +3 -2
- webull/trade/trade/trade_instrument.py +1 -1
- webull/trade/trade/v2/order_operation_v2.py +3 -0
- webull/trade/trade_events_client.py +1 -5
- {webull_openapi_python_sdk-2.0.14.dist-info → webull_openapi_python_sdk-2.0.15.dist-info}/METADATA +1 -1
- {webull_openapi_python_sdk-2.0.14.dist-info → webull_openapi_python_sdk-2.0.15.dist-info}/RECORD +23 -24
- samples/trade/activities_client.py +0 -59
- {webull_openapi_python_sdk-2.0.14.dist-info → webull_openapi_python_sdk-2.0.15.dist-info}/WHEEL +0 -0
- {webull_openapi_python_sdk-2.0.14.dist-info → webull_openapi_python_sdk-2.0.15.dist-info}/licenses/LICENSE +0 -0
- {webull_openapi_python_sdk-2.0.14.dist-info → webull_openapi_python_sdk-2.0.15.dist-info}/licenses/NOTICE +0 -0
- {webull_openapi_python_sdk-2.0.14.dist-info → webull_openapi_python_sdk-2.0.15.dist-info}/top_level.txt +0 -0
samples/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = '2.0.
|
|
1
|
+
__version__ = '2.0.15'
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
import logging
|
|
16
16
|
|
|
17
17
|
from webull.trade.events.types import ORDER_STATUS_CHANGED, EVENT_TYPE_ORDER, EVENT_TYPE_POSITION, \
|
|
18
|
-
POSITION_STATUS_CHANGED
|
|
18
|
+
POSITION_STATUS_CHANGED, EVENT_TYPE_OPTION, OPTION_STATUS_CHANGED
|
|
19
19
|
from webull.trade.trade_events_client import TradeEventsClient
|
|
20
20
|
|
|
21
21
|
your_app_key = "<your_app_key>"
|
|
@@ -35,6 +35,8 @@ def my_on_events_message(event_type, subscribe_type, payload, raw_message):
|
|
|
35
35
|
print(payload)
|
|
36
36
|
if EVENT_TYPE_POSITION == event_type and POSITION_STATUS_CHANGED == subscribe_type:
|
|
37
37
|
print('event payload:%s' % payload)
|
|
38
|
+
if EVENT_TYPE_OPTION == event_type and OPTION_STATUS_CHANGED == subscribe_type:
|
|
39
|
+
print('option payload:%s' % payload)
|
|
38
40
|
|
|
39
41
|
if __name__ == '__main__':
|
|
40
42
|
|
webull/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = '2.0.
|
|
1
|
+
__version__ = '2.0.15'
|
webull/core/__init__.py
CHANGED
webull/core/utils/desensitize.py
CHANGED
|
@@ -21,11 +21,9 @@ def desensitize_token(token, keep_length=6, mask_length=6):
|
|
|
21
21
|
|
|
22
22
|
total_length = len(token)
|
|
23
23
|
|
|
24
|
-
# 如果字符串长度不足需要保留长度的两倍,则返回全部内容
|
|
25
24
|
if total_length <= keep_length * 2:
|
|
26
25
|
return token
|
|
27
26
|
|
|
28
|
-
# 提取前保留部分、后保留部分,并用星号连接
|
|
29
27
|
front_part = token[:keep_length]
|
|
30
28
|
rear_part = token[-keep_length:] if keep_length > 0 else ''
|
|
31
29
|
mask = '*' * mask_length
|
webull/data/__init__.py
CHANGED
|
@@ -27,7 +27,7 @@ class MarketDataStreaming:
|
|
|
27
27
|
:param session_id: Create the sessionId used for the connection
|
|
28
28
|
:param symbols: Such as: [AAPL,TSLA]
|
|
29
29
|
:param category: Security type, enumeration
|
|
30
|
-
:param sub_types: Unsubscribe data type, such as: [SNAPSHOT]
|
|
30
|
+
:param sub_types: Unsubscribe data type, such as: [SNAPSHOT] SubType Required when unsubscribe_all is empty
|
|
31
31
|
or not true
|
|
32
32
|
:param depth: Level 2 subscription levels.
|
|
33
33
|
10 levels by default, up to 50 levels for U.S. stocks.
|
|
@@ -51,7 +51,7 @@ class MarketDataStreaming:
|
|
|
51
51
|
:param session_id: Create the sessionId used for the connection
|
|
52
52
|
:param symbols: Such as: [AAPL,TSLA]
|
|
53
53
|
:param category: Security type, enumeration
|
|
54
|
-
:param sub_types: Unsubscribe data type, such as: [SNAPSHOT]
|
|
54
|
+
:param sub_types: Unsubscribe data type, such as: [SNAPSHOT] SubType Required when unsubscribe_all is empty
|
|
55
55
|
or not true
|
|
56
56
|
:param unsubscribe_all: boolean false (true means canceling all real-time market subscriptions.
|
|
57
57
|
When unsubscribe_all is true, symbols, category, sub_types can be empty)
|
webull/trade/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = '2.0.
|
|
1
|
+
__version__ = '2.0.15'
|
webull/trade/events/types.py
CHANGED
|
@@ -19,7 +19,7 @@ from webull.core.request import ApiRequest
|
|
|
19
19
|
|
|
20
20
|
class PlaceOrderRequest(ApiRequest):
|
|
21
21
|
"""
|
|
22
|
-
Deprecated. Use :
|
|
22
|
+
Deprecated. Use :class:`PlaceOrderRequestV2` instead.
|
|
23
23
|
"""
|
|
24
24
|
def __init__(self):
|
|
25
25
|
ApiRequest.__init__(self, "/trade/order/place", version='v2', method="POST", body_params={})
|
|
@@ -20,7 +20,9 @@ from webull.core.context.request_context_holder import RequestContextHolder
|
|
|
20
20
|
from webull.core.request import ApiRequest
|
|
21
21
|
|
|
22
22
|
class PlaceOrderRequest(ApiRequest):
|
|
23
|
-
|
|
23
|
+
"""
|
|
24
|
+
Deprecated. Use :class:`PlaceOrderRequestV2` instead.
|
|
25
|
+
"""
|
|
24
26
|
def __init__(self):
|
|
25
27
|
ApiRequest.__init__(self, "/trade/order/place", version='v2', method="POST", body_params={})
|
|
26
28
|
self._stock_order = {}
|
|
@@ -17,6 +17,9 @@ from webull.core.request import ApiRequest
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
class ReplaceOrderRequest(ApiRequest):
|
|
20
|
+
"""
|
|
21
|
+
Deprecated. Use :class:`ReplaceOrderRequestV2` instead.
|
|
22
|
+
"""
|
|
20
23
|
def __init__(self):
|
|
21
24
|
ApiRequest.__init__(self, "/trade/order/replace", version='v2', method="POST", body_params={})
|
|
22
25
|
self._stock_order = {}
|
|
@@ -14,8 +14,6 @@
|
|
|
14
14
|
|
|
15
15
|
# coding=utf-8
|
|
16
16
|
|
|
17
|
-
from json.tool import main
|
|
18
|
-
from webull.trade.common.currency import Currency
|
|
19
17
|
from webull.trade.request.get_account_balance_request import AccountBalanceRequest
|
|
20
18
|
from webull.trade.request.get_account_positions_request import AccountPositionsRequest
|
|
21
19
|
from webull.trade.request.get_account_profile_request import AccountProfileRequest
|
|
@@ -23,6 +21,9 @@ from webull.trade.request.get_app_subscriptions import GetAppSubscriptions
|
|
|
23
21
|
|
|
24
22
|
|
|
25
23
|
class Account:
|
|
24
|
+
"""
|
|
25
|
+
Deprecated. Use :class:`AccountV2` instead.
|
|
26
|
+
"""
|
|
26
27
|
def __init__(self, api_client):
|
|
27
28
|
self.client = api_client
|
|
28
29
|
|
|
@@ -39,7 +39,7 @@ class TradeInstrument:
|
|
|
39
39
|
:param symbol: The ticker symbol or code representing a specific financial instrument or security.
|
|
40
40
|
:param market: e.g. US, HK.
|
|
41
41
|
:param instrument_super_type: Asset Class (e.g. EQUITY, OPTION.)
|
|
42
|
-
:param instrument_type: Type of underlying equity
|
|
42
|
+
:param instrument_type: Type of underlying equity,required when querying for options information (e.g., WARRANT, UNITS, ETF, CALL_OPTION, PUT_OPTION).
|
|
43
43
|
:param strike_price: Option Strike Price, required when querying for options information.
|
|
44
44
|
:param init_exp_date: Option Expiration Date, Format: yyyy-MM-dd, required when querying for options information.
|
|
45
45
|
"""
|
|
@@ -71,12 +71,8 @@ class TradeEventsClient():
|
|
|
71
71
|
self._on_log = None
|
|
72
72
|
|
|
73
73
|
def _build_request(self, app_key, app_secret, accounts):
|
|
74
|
-
if self._region_id == 'us':
|
|
75
|
-
subscribeType = 3
|
|
76
|
-
else:
|
|
77
|
-
subscribeType = 1
|
|
78
74
|
request = pb.SubscribeRequest(
|
|
79
|
-
subscribeType=
|
|
75
|
+
subscribeType= 7, # 1 2 4 allowed now
|
|
80
76
|
timestamp=int(time.time() * 1000), # millis
|
|
81
77
|
accounts=accounts,
|
|
82
78
|
)
|
{webull_openapi_python_sdk-2.0.14.dist-info → webull_openapi_python_sdk-2.0.15.dist-info}/RECORD
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
samples/__init__.py,sha256=
|
|
1
|
+
samples/__init__.py,sha256=UbB6jFpQ8cK33UyDgk-QLaF9QUzpaGzEMM2RlCS1qJI,23
|
|
2
2
|
samples/account/__init__.py,sha256=eoZ6GfifbqhMLNzjlqRDVil-yyBkOmVN9ujSgJWNBlY,15
|
|
3
3
|
samples/account/account_client.py,sha256=vwh-nI_JnjwcIeOr1sQPMzG8pAqZwliUusE49ZmYE3s,1796
|
|
4
4
|
samples/assets/__init__.py,sha256=eoZ6GfifbqhMLNzjlqRDVil-yyBkOmVN9ujSgJWNBlY,15
|
|
@@ -15,16 +15,15 @@ samples/order/order_stock_client.py,sha256=hYwVwVFVERk-YS7gRcW-LuGfAvcF8VJHZs1qw
|
|
|
15
15
|
samples/screener/__init__.py,sha256=68et0-FOloDo6Yo6vqmHPM45z-8zorzbhrZmUrLApEQ,583
|
|
16
16
|
samples/screener/screener_client.py,sha256=NGwjY7YaG_3l9c-QePpmpPG4Gtk_BZaM7-jQbMb2kzw,3636
|
|
17
17
|
samples/trade/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
|
-
samples/trade/activities_client.py,sha256=HOF0-T_-v9Am3Raob-iq2IM4PetfhQWbRw2rkMaufzk,2093
|
|
19
18
|
samples/trade/trade_client.py,sha256=LyWSvZJH4ByCkRORqP9WdkXfx65A2b6fhc9_GzL8DOM,6258
|
|
20
19
|
samples/trade/trade_client_v2.py,sha256=IO-zmRiUnCmIetTdiYunPh8jVK2VaPrOR77Dwvz1auY,10771
|
|
21
20
|
samples/trade/trade_client_v3.py,sha256=yAkVwWhZBGD929oMmlUj4GvJVWWZiV8PLlv_BeXbDZ8,32069
|
|
22
21
|
samples/trade/trade_client_v3_event.py,sha256=91HlT04KlK8Q5gUnsB8F5ErCFdJRnpDABKkBfYRc-YE,3932
|
|
23
|
-
samples/trade/trade_event_client.py,sha256=
|
|
22
|
+
samples/trade/trade_event_client.py,sha256=ni7OEc4nnz2Hpbh0Kzl6DXB-FuDPc2UGBaLFnCrdFZ4,2824
|
|
24
23
|
samples/watchlist/__init__.py,sha256=rtV5s4_CJgDAT4DGEJa_pNLJU71Wdr5OLz_IQ1EajFQ,567
|
|
25
24
|
samples/watchlist/watchlist_client.py,sha256=lpzJs7SXuSka2KKkJ0u9s83A9iHta5qrjvIdkbfNcwg,3246
|
|
26
|
-
webull/__init__.py,sha256=
|
|
27
|
-
webull/core/__init__.py,sha256=
|
|
25
|
+
webull/__init__.py,sha256=UbB6jFpQ8cK33UyDgk-QLaF9QUzpaGzEMM2RlCS1qJI,23
|
|
26
|
+
webull/core/__init__.py,sha256=7GR8jJZUa8AP7XH_dYHIheIy2fjj-pt7LnRs1iqsUXI,226
|
|
28
27
|
webull/core/client.py,sha256=zxSBiII9KDxc5tHpTerJfV_PKPt8E9e3oTOpiakAtJw,16758
|
|
29
28
|
webull/core/compat.py,sha256=_r6Y_f3vTo_DoxOaCvLjnvOo1KRkD2Z9kXSh8OijEIA,3088
|
|
30
29
|
webull/core/headers.py,sha256=Wj2zev1XYyYsy2b9YKnoK3GqjVsXZO_o2WziMmuVBTw,2061
|
|
@@ -88,9 +87,9 @@ webull/core/retry/retry_policy_context.py,sha256=rVAqF6NE6Aw-OUJY1TaxEhSLLCuYe8K
|
|
|
88
87
|
webull/core/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
89
88
|
webull/core/utils/common.py,sha256=bb64grSP7PjaAIe8YYKDNzQ4qwgN7-qW0r24idTEqEY,2177
|
|
90
89
|
webull/core/utils/data.py,sha256=YUyoWY68_2RkKanh3jsDscgGx__FIPh5VNEGXr1Qotc,852
|
|
91
|
-
webull/core/utils/desensitize.py,sha256=
|
|
90
|
+
webull/core/utils/desensitize.py,sha256=186BKVDomhhKnIi_4-1bWJ7P5s01rStjeIwJkTEGoIA,952
|
|
92
91
|
webull/core/utils/validation.py,sha256=gJcIrHYtgo48yVJ0q6O-f5buTYWOcr6ShhDIBhTp-Yg,1957
|
|
93
|
-
webull/data/__init__.py,sha256=
|
|
92
|
+
webull/data/__init__.py,sha256=pTCqPwFkJNj2TmBwRatgvf1G2QKpmv_2KagYNi2acvU,39
|
|
94
93
|
webull/data/data_client.py,sha256=FzatKHXgu5xv-FKFaX-mFYdhLTdz7zpRUox9AGWrReQ,2429
|
|
95
94
|
webull/data/data_streaming_client.py,sha256=TQBAilvOLCbcMqacByrniXGr9VjSwjym-4-LUOiqKx8,4456
|
|
96
95
|
webull/data/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -119,12 +118,12 @@ webull/data/quotes/fundamentals.py,sha256=Dod6lcTwPDvyOjFQxDwW6GrIoDAknIGZOL1M9V
|
|
|
119
118
|
webull/data/quotes/futures_market_data.py,sha256=fc9giYNy1LcdLHOJV31zMbPBKtWDH8kBW5xRFgHzQUA,5596
|
|
120
119
|
webull/data/quotes/instrument.py,sha256=ZEm3PRIUOcDQQGjNGemwM1o0UceI_InRig0yxVhNmpw,15322
|
|
121
120
|
webull/data/quotes/market_data.py,sha256=L7f5V5tmG01lev9-IJU3w6up7EnX42WfI7GtW2mEcw8,14748
|
|
122
|
-
webull/data/quotes/market_streaming_data.py,sha256=
|
|
121
|
+
webull/data/quotes/market_streaming_data.py,sha256=khgTGqrPRiKkRVnG5Post5Vpu9lCAP288B_OE20_JM8,3135
|
|
123
122
|
webull/data/quotes/option_market_data.py,sha256=4fW_GI3u1T-5dluhLRQ60Gbb2bsnhWkSrILYJq-96pw,3305
|
|
124
123
|
webull/data/quotes/screener.py,sha256=h73YyhW6jBkJH1NvDOceR5lePRXGgtiWrLKQwbn9pAU,9831
|
|
125
124
|
webull/data/quotes/watchlist.py,sha256=RkuPV7OwC6e4NEpeldTUNWEsYAqGQbVqyOHs9edMuhE,6344
|
|
126
125
|
webull/data/quotes/subscribe/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
127
|
-
webull/data/quotes/subscribe/ask_bid_result.py,sha256=
|
|
126
|
+
webull/data/quotes/subscribe/ask_bid_result.py,sha256=o-Wj2-l6aLkp9ENoIJlMRb4WTmVoZYlfy4OQpTQtPak,1737
|
|
128
127
|
webull/data/quotes/subscribe/basic_result.py,sha256=8aF4wiPiREjWkTyNCyxhCgSU8sPknJUerXHmLBHVBOs,1495
|
|
129
128
|
webull/data/quotes/subscribe/broker_result.py,sha256=E6pM0Ydr6tU_bPSOeyu1KJf7oYgbO-lIXLIdJQANH4I,1013
|
|
130
129
|
webull/data/quotes/subscribe/event_depth_decoder.py,sha256=-2mOw4o32HWO1a7MuB3hgFoST0ct96Z3PrBFzfCNMJs,1061
|
|
@@ -219,9 +218,9 @@ webull/data/request/watchlist/get_watchlist_request.py,sha256=XxzS4gxFbdQSajpFSm
|
|
|
219
218
|
webull/data/request/watchlist/remove_watchlist_instruments_request.py,sha256=qOtQYDBp-PSawAgljnLmtfUce8dAblWI_zB0nnIv3G0,1451
|
|
220
219
|
webull/data/request/watchlist/update_watchlist_instruments_request.py,sha256=KoihfB8MszsAooQGUUMjFmnid_a7xk4YSdEMDO1gh-k,1493
|
|
221
220
|
webull/data/request/watchlist/update_watchlist_request.py,sha256=0s3ftkxiz9hjtXhLORrIUphyDIldRA8pJ4mP5zfbsyU,1466
|
|
222
|
-
webull/trade/__init__.py,sha256=
|
|
221
|
+
webull/trade/__init__.py,sha256=p2D-zgjkknmTvHuGvNpDvkb-XR4BZlFn9B2Wa14Wxak,22
|
|
223
222
|
webull/trade/trade_client.py,sha256=ck8yRjm-aibv8LGOP0Gk5zg6bv4-bTVjULFpZlCAK2c,2278
|
|
224
|
-
webull/trade/trade_events_client.py,sha256=
|
|
223
|
+
webull/trade/trade_events_client.py,sha256=sHoKPKQQ2Ye_c9tt9MYxFeza3T5lLR5VosNro7H1gN4,9748
|
|
225
224
|
webull/trade/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
226
225
|
webull/trade/common/account_type.py,sha256=haVAB33MERN6XyPsbrfVQhK9_CpU90VltI6_KDkxzlE,715
|
|
227
226
|
webull/trade/common/category.py,sha256=lrSKMO11wMpw9iWWeefTdWXedJAFfWRlJ76swfqVP0c,947
|
|
@@ -245,7 +244,7 @@ webull/trade/events/default_retry_policy.py,sha256=zWoaJFJSUTtHw_qLj9_AIPBzFW6UH
|
|
|
245
244
|
webull/trade/events/events_pb2.py,sha256=NLolj5VOws1LJT5YIvnuZab9YYhR4lm2-iCkztaARPo,2440
|
|
246
245
|
webull/trade/events/events_pb2_grpc.py,sha256=ebxp_VCJHBQFCKvxBKRUMhW67TZoUn6NwCBvKpiTEpg,2482
|
|
247
246
|
webull/trade/events/signature_composer.py,sha256=GL7_lC3zHyyVy0IcxYdavtJNFWCnQZ6m5nLfC--_eG4,2639
|
|
248
|
-
webull/trade/events/types.py,sha256=
|
|
247
|
+
webull/trade/events/types.py,sha256=3GlnmE7oaACsXBW5uy-S5BBdNLffFhsQwadICSAADSo,740
|
|
249
248
|
webull/trade/request/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
250
249
|
webull/trade/request/cancel_order_request.py,sha256=JbyeVNOVu9xvwzba7Ntw2Sh4BrNVUbBTkYLTKgXIU5U,1016
|
|
251
250
|
webull/trade/request/get_account_balance_request.py,sha256=S9M1rz6HFlIwRpWfkQKVfRo996_DWF8Qe6bGirSnkV0,1042
|
|
@@ -260,10 +259,10 @@ webull/trade/request/get_trade_calendar_request.py,sha256=h70H27CWDeIYipxDINcjdQ
|
|
|
260
259
|
webull/trade/request/get_trade_instrument_detail_request.py,sha256=pDQKeNC3v5hCWnt_lkQddoOdMlwZ6pK_hnysiDCXrOU,910
|
|
261
260
|
webull/trade/request/get_trade_security_detail_request.py,sha256=X_8wBBPLTAJZf-l0e7t4R2T_W8XWRl-hgAuLztfAnWE,1534
|
|
262
261
|
webull/trade/request/get_tradeable_instruments_request.py,sha256=7z57iT2Wqb43Kz-kdu09gkTGRPNzo4Aipq4VDbbqAMo,1030
|
|
263
|
-
webull/trade/request/palce_order_request.py,sha256=
|
|
264
|
-
webull/trade/request/place_order_request.py,sha256=
|
|
262
|
+
webull/trade/request/palce_order_request.py,sha256=Qa6jrrUEDbmEpjRiCP73zrh_4dPGgRr-98RAZE4yedw,3323
|
|
263
|
+
webull/trade/request/place_order_request.py,sha256=m4RTdUDnUZDcZ02lRbynRZQtPMfht-hjT8r37aMh6kQ,3350
|
|
265
264
|
webull/trade/request/place_order_request_v2.py,sha256=gUuIWLARiOCumnXKNkJDgWJ2eV7dz4U4pNH6GpWxS5s,2192
|
|
266
|
-
webull/trade/request/replace_order_request.py,sha256=
|
|
265
|
+
webull/trade/request/replace_order_request.py,sha256=aD94L2dsIekK6_6pezlzceKqay6KMKax_MHV9My6CAA,2654
|
|
267
266
|
webull/trade/request/replace_order_request_v2.py,sha256=5R94VCYyStImQptcEMsTWRjNj7weYFCO6-2mLySmcj8,1612
|
|
268
267
|
webull/trade/request/v2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
269
268
|
webull/trade/request/v2/cancel_option_request.py,sha256=XfE_7YtaTwU0a1dPJ8nqGso4Knri5xfVACA3ZbxqU4M,1015
|
|
@@ -293,19 +292,19 @@ webull/trade/request/v3/place_order_request.py,sha256=kauvIDIcaBKU6gd7v9xvG8cJFT
|
|
|
293
292
|
webull/trade/request/v3/preview_order_request.py,sha256=ZgzwrlAed8IJ8ORDRjJ7rIuF_w8ySZktLDBsf6F7FGo,1132
|
|
294
293
|
webull/trade/request/v3/replace_order_request.py,sha256=Xsa-vKGTMAwv-dJuSm8cx8rHVoFhk-cFjnHOpsUaZwM,1212
|
|
295
294
|
webull/trade/trade/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
296
|
-
webull/trade/trade/account_info.py,sha256=
|
|
295
|
+
webull/trade/trade/account_info.py,sha256=M67jtCpbttp7tDCNNW99A1oLX-62c26yR1XXZ-xkK18,3609
|
|
297
296
|
webull/trade/trade/activity.py,sha256=pyvsJcMhyKoKdxurJPgXexsoUy6EefwKneqqSJpdA0U,2154
|
|
298
297
|
webull/trade/trade/order_operation.py,sha256=QrL4Da87RTOSupiAbuXtZigo9602Byp14DQGyR99hkI,12849
|
|
299
298
|
webull/trade/trade/trade_calendar.py,sha256=rGSiR5GZggQnZOmmpbC-06trgPQgFTvdpUzGMpw2ycw,1415
|
|
300
|
-
webull/trade/trade/trade_instrument.py,sha256=
|
|
299
|
+
webull/trade/trade/trade_instrument.py,sha256=AV-Y-x_hWBnF9T2g8SbYGKEGFmEQJi0QhtfTCoZicZo,3472
|
|
301
300
|
webull/trade/trade/v2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
302
301
|
webull/trade/trade/v2/account_info_v2.py,sha256=fs2-XaxklItuhaspzPkthXA5SgbnIffL6NTyKYR3bDw,3276
|
|
303
|
-
webull/trade/trade/v2/order_operation_v2.py,sha256=
|
|
302
|
+
webull/trade/trade/v2/order_operation_v2.py,sha256=ZWH-6dp5rvokb5YX5HO2Op-KPLjGR4gpJ06Kc_IUilQ,12816
|
|
304
303
|
webull/trade/trade/v3/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
305
304
|
webull/trade/trade/v3/order_opration_v3.py,sha256=NsInXC5sPCW8y55jU71BnR0sQYhtWclqCmyK7V09MLc,8275
|
|
306
|
-
webull_openapi_python_sdk-2.0.
|
|
307
|
-
webull_openapi_python_sdk-2.0.
|
|
308
|
-
webull_openapi_python_sdk-2.0.
|
|
309
|
-
webull_openapi_python_sdk-2.0.
|
|
310
|
-
webull_openapi_python_sdk-2.0.
|
|
311
|
-
webull_openapi_python_sdk-2.0.
|
|
305
|
+
webull_openapi_python_sdk-2.0.15.dist-info/licenses/LICENSE,sha256=ALOnsLtb1aHxmDJg3-oMi0BO-i-cjfyZaOBfnnavKMc,11359
|
|
306
|
+
webull_openapi_python_sdk-2.0.15.dist-info/licenses/NOTICE,sha256=X5TApte6CPV10b96Cb70IRLusXmiRmK_R-dB-1tQM_I,2018
|
|
307
|
+
webull_openapi_python_sdk-2.0.15.dist-info/METADATA,sha256=03StTJM9Sw6Xf02mwbve8IfA2eb-zH3GcEtOgPbCgxA,1212
|
|
308
|
+
webull_openapi_python_sdk-2.0.15.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
|
|
309
|
+
webull_openapi_python_sdk-2.0.15.dist-info/top_level.txt,sha256=h8pEjNDGWS2ZUZ2vYFpUShoMQT0ZRIQaD57QJWD8_aI,15
|
|
310
|
+
webull_openapi_python_sdk-2.0.15.dist-info/RECORD,,
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
# Copyright 2022 Webull
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
14
|
-
|
|
15
|
-
# coding=utf-8
|
|
16
|
-
|
|
17
|
-
from webull.core.client import ApiClient
|
|
18
|
-
from webull.trade.trade_client import TradeClient
|
|
19
|
-
|
|
20
|
-
optional_api_endpoint = "<api_endpoint>"
|
|
21
|
-
your_app_key = "<your_app_key>"
|
|
22
|
-
your_app_secret = "<your_app_secret>"
|
|
23
|
-
region_id = "<region_id>"
|
|
24
|
-
account_id = "<your_account_id>"
|
|
25
|
-
|
|
26
|
-
api_client = ApiClient(your_app_key, your_app_secret, region_id)
|
|
27
|
-
api_client.add_endpoint(region_id, optional_api_endpoint)
|
|
28
|
-
|
|
29
|
-
if __name__ == '__main__':
|
|
30
|
-
trade_client = TradeClient(api_client)
|
|
31
|
-
|
|
32
|
-
# Query cash activities with default parameters
|
|
33
|
-
res = trade_client.activity.get_activities(account_id)
|
|
34
|
-
if res.status_code == 200:
|
|
35
|
-
print('get activities:', res.json())
|
|
36
|
-
|
|
37
|
-
# Query cash activities with activity type filter
|
|
38
|
-
res = trade_client.activity.get_activities(account_id, activity_types="TRADE,DEPOSIT")
|
|
39
|
-
if res.status_code == 200:
|
|
40
|
-
print('get activities by type:', res.json())
|
|
41
|
-
|
|
42
|
-
# Query cash activities with time range filter
|
|
43
|
-
res = trade_client.activity.get_activities(
|
|
44
|
-
account_id,
|
|
45
|
-
start_time="2026-06-30T12:00:00.000Z",
|
|
46
|
-
end_time="2026-07-03T12:00:00.000Z",
|
|
47
|
-
page_size=20
|
|
48
|
-
)
|
|
49
|
-
if res.status_code == 200:
|
|
50
|
-
print('get activities by time range:', res.json())
|
|
51
|
-
|
|
52
|
-
# Query cash activities with cursor-based pagination
|
|
53
|
-
res = trade_client.activity.get_activities(
|
|
54
|
-
account_id,
|
|
55
|
-
last_activity_id="<last_activity_id_from_previous_page>",
|
|
56
|
-
page_size=10
|
|
57
|
-
)
|
|
58
|
-
if res.status_code == 200:
|
|
59
|
-
print('get activities next page:', res.json())
|
{webull_openapi_python_sdk-2.0.14.dist-info → webull_openapi_python_sdk-2.0.15.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|