webull-openapi-python-sdk 2.0.13__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.
Files changed (30) hide show
  1. samples/__init__.py +1 -1
  2. samples/data/data_client.py +5 -0
  3. samples/trade/trade_event_client.py +3 -1
  4. webull/__init__.py +1 -1
  5. webull/core/__init__.py +1 -1
  6. webull/core/auth/composer/default_signature_composer.py +1 -4
  7. webull/core/utils/common.py +5 -18
  8. webull/core/utils/desensitize.py +0 -2
  9. webull/data/__init__.py +1 -1
  10. webull/data/quotes/instrument.py +43 -0
  11. webull/data/quotes/market_streaming_data.py +2 -2
  12. webull/data/quotes/subscribe/ask_bid_result.py +1 -1
  13. webull/data/quotes/subscribe/basic_result.py +2 -2
  14. webull/data/request/get_option_contracts_request.py +82 -0
  15. webull/trade/__init__.py +1 -1
  16. webull/trade/events/types.py +2 -0
  17. webull/trade/request/palce_order_request.py +1 -1
  18. webull/trade/request/place_order_request.py +3 -1
  19. webull/trade/request/replace_order_request.py +3 -0
  20. webull/trade/trade/account_info.py +3 -2
  21. webull/trade/trade/trade_instrument.py +1 -1
  22. webull/trade/trade/v2/order_operation_v2.py +3 -0
  23. webull/trade/trade_events_client.py +2 -9
  24. {webull_openapi_python_sdk-2.0.13.dist-info → webull_openapi_python_sdk-2.0.15.dist-info}/METADATA +6 -4
  25. {webull_openapi_python_sdk-2.0.13.dist-info → webull_openapi_python_sdk-2.0.15.dist-info}/RECORD +29 -29
  26. samples/trade/activities_client.py +0 -59
  27. {webull_openapi_python_sdk-2.0.13.dist-info → webull_openapi_python_sdk-2.0.15.dist-info}/WHEEL +0 -0
  28. {webull_openapi_python_sdk-2.0.13.dist-info → webull_openapi_python_sdk-2.0.15.dist-info}/licenses/LICENSE +0 -0
  29. {webull_openapi_python_sdk-2.0.13.dist-info → webull_openapi_python_sdk-2.0.15.dist-info}/licenses/NOTICE +0 -0
  30. {webull_openapi_python_sdk-2.0.13.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.13'
1
+ __version__ = '2.0.15'
@@ -265,6 +265,11 @@ if __name__ == '__main__':
265
265
  if res.status_code == 200:
266
266
  print('get_forecast_eps:', res.json())
267
267
 
268
+ # Option Instrument - Query option contracts by underlying symbol and filters
269
+ res = data_client.instrument.get_option_contracts(Category.US_OPTION.name,"AAPL")
270
+ if res.status_code == 200:
271
+ print('get_option_contracts:', res.json())
272
+
268
273
  # Screener - Market Sectors
269
274
  res = data_client.screener.get_market_sectors(Category.US_STOCK.name)
270
275
  if res.status_code == 200:
@@ -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.13'
1
+ __version__ = '2.0.15'
webull/core/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
- __version__ = '2.0.13'
1
+ __version__ = '2.0.15'
2
2
 
3
3
  import logging
4
4
 
@@ -59,10 +59,7 @@ def _refresh_sign_headers(host, headers, app_key_id, signer_spec):
59
59
  sign_headers[hd.APP_KEY] = app_key_id
60
60
  sign_headers[hd.TIMESTAMP] = common.get_iso_8601_date()
61
61
 
62
- if common.is_not_upgrade_api_host(host):
63
- signer_spec = sha_hmac256_new
64
- else:
65
- signer_spec = sha_hmac1
62
+ signer_spec = sha_hmac256_new
66
63
 
67
64
  sign_headers[hd.SIGN_VERSION] = signer_spec.get_signer_version()
68
65
  sign_headers[hd.SIGN_ALGORITHM] = signer_spec.get_signer_name()
@@ -16,7 +16,7 @@
16
16
  import base64
17
17
  import hashlib
18
18
  import socket
19
- from datetime import datetime
19
+ from datetime import datetime, timezone
20
20
  import uuid
21
21
  import json
22
22
  from webull.core.compat import ensure_bytes, ensure_string
@@ -33,21 +33,21 @@ def get_uuid():
33
33
  def get_iso_8601_date(dt_as_utc=None):
34
34
  if dt_as_utc:
35
35
  return dt_as_utc.strftime(FORMAT_ISO_8601)
36
- d = datetime.utcnow()
36
+ d = datetime.now(timezone.utc)
37
37
  return d.strftime(FORMAT_ISO_8601)
38
38
 
39
39
  def get_iso_8601_date_with_millis(dt_as_utc=None):
40
40
  if dt_as_utc:
41
41
  d = dt_as_utc
42
42
  else:
43
- d = datetime.utcnow()
43
+ d = datetime.now(timezone.utc)
44
44
  ret = d.strftime(FORMAT_ISO_8601_MILLIS)
45
45
  if len(ret) != 27:
46
46
  raise RuntimeError("failed to convent timestamp, result: %s" % ret)
47
47
  return ret[:-4] + ret[-1:]
48
48
 
49
49
  def parse_timestamp_to_dt(timestamp_of_millis):
50
- return datetime.utcfromtimestamp(timestamp_of_millis / 1000.0)
50
+ return datetime.fromtimestamp(timestamp_of_millis / 1000.0, tz=timezone.utc).replace(tzinfo=None)
51
51
 
52
52
  def md5_sum(content):
53
53
  content_bytes = ensure_bytes(content)
@@ -63,17 +63,4 @@ def sha256_hex(content):
63
63
  return hashlib.sha256(content_bytes).hexdigest()
64
64
 
65
65
  def json_dumps_compact(content):
66
- return json.dumps(content, ensure_ascii=False, separators=(',', ':'))
67
-
68
- def is_not_upgrade_api_host(host):
69
- upgrade_hosts = {
70
- "api.webull.com","events-api.webull.com",
71
- "api.webull.hk","events-api.webull.hk",
72
- "pre-openapi-us-alb.webullbroker.com","pre-openapi-us-events.webullbroker.com",
73
- "pre-openapi-alb.webullbroker.com","pre-openapi-events.webullbroker.com",
74
- "us-openapi-alb.uat.webullbroker.com","us-openapi-events.uat.webullbroker.com",
75
- "hk-openapi.uat.webullbroker.com", "hk-openapi-events-api.uat.webullbroker.com",
76
- "api.sandbox.webull.hk", "events-api.sandbox.webull.hk"
77
-
78
- }
79
- return host not in upgrade_hosts
66
+ return json.dumps(content, ensure_ascii=False, separators=(',', ':'))
@@ -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
@@ -1,3 +1,3 @@
1
1
  # coding=utf-8
2
2
 
3
- __version__ = '2.0.13'
3
+ __version__ = '2.0.15'
@@ -25,6 +25,7 @@ from webull.data.request.get_futures_instruments_request import GetFuturesInstru
25
25
  from webull.data.request.get_futures_products_request import GetFuturesProductsRequest
26
26
  from webull.data.request.get_futures_instruments_by_code_request import GetFuturesInstrumentsByCodeRequest
27
27
  from webull.data.request.get_futures_product_class import GetFuturesProductClassRequest
28
+ from webull.data.request.get_option_contracts_request import GetOptionContractsRequest
28
29
 
29
30
 
30
31
  class Instrument:
@@ -218,6 +219,48 @@ class Instrument:
218
219
  response = self.client.get_response(event_instrument_request)
219
220
  return response
220
221
 
222
+ def get_option_contracts(self, category=Category.US_OPTION.name, underlying_symbols=None, status=None,
223
+ start_date=None, end_date=None, root_symbol=None, option_symbol=None,
224
+ option_type=None, style=None, strike_price_gte=None, strike_price_lte=None,
225
+ ppind=None, show_deliverables=None, page_size=10, last_instrument_id=None):
226
+ """
227
+ Query option contracts list by conditions such as underlying_symbols, status, expiration date, etc.
228
+
229
+ :param category: Market category. Value: US_OPTION.
230
+ :param underlying_symbols: Underlying symbol(s), comma-separated for multiple, e.g. AAPL,MSFT.
231
+ :param status: Contract status: LISTING (default), DELISTING.
232
+ :param start_date: Exact expiration date, format YYYY-MM-DD.
233
+ :param end_date: Expiration date lower bound (inclusive), format YYYY-MM-DD.
234
+ :param root_symbol: Root symbol filter (series symbol, e.g. SPXW), mainly for index options and non-standard contracts after CA.
235
+ :param option_symbol: Option symbol, e.g. AAPL250620C00150000.
236
+ :param option_type: Contract type: CALL / PUT.
237
+ :param style: Exercise style: AMERICAN / EUROPEAN.
238
+ :param strike_price_gte: Strike price lower bound (inclusive).
239
+ :param strike_price_lte: Strike price upper bound (inclusive).
240
+ :param ppind: Penny Program Indicator: true = Penny Pilot, false = non-Penny Pilot.
241
+ :param show_deliverables: Whether to return deliverables array in response: true / false, default false.
242
+ :param page_size: Page size, default 10, max 1000.
243
+ :param last_instrument_id: Last instrument_id from previous page for pagination.
244
+ """
245
+ request = GetOptionContractsRequest()
246
+ request.set_category(category)
247
+ request.set_underlying_symbols(underlying_symbols)
248
+ request.set_status(status)
249
+ request.set_start_date(start_date)
250
+ request.set_end_date(end_date)
251
+ request.set_root_symbol(root_symbol)
252
+ request.set_option_symbol(option_symbol)
253
+ request.set_option_type(option_type)
254
+ request.set_style(style)
255
+ request.set_strike_price_gte(strike_price_gte)
256
+ request.set_strike_price_lte(strike_price_lte)
257
+ request.set_ppind(ppind)
258
+ request.set_show_deliverables(show_deliverables)
259
+ request.set_page_size(page_size)
260
+ request.set_last_instrument_id(last_instrument_id)
261
+ response = self.client.get_response(request)
262
+ return response
263
+
221
264
  def get_company_profile(self, symbol, category=Category.US_STOCK.name):
222
265
  """
223
266
  Get company profile for one instrument.
@@ -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]SubType Required when unsubscribe_all is empty
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]SubType Required when unsubscribe_all is empty
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)
@@ -44,7 +44,7 @@ class AskBidResult:
44
44
 
45
45
  def __repr__(self):
46
46
  result = f"price:{self.price},size:{self.size}"
47
- # 可选字段
47
+
48
48
  if self.order:
49
49
  result += f",order:{str(self.order)}"
50
50
  if self.broker:
@@ -13,7 +13,7 @@
13
13
  # limitations under the License.
14
14
 
15
15
  # coding=utf-8
16
- from datetime import datetime
16
+ from datetime import datetime, timezone
17
17
 
18
18
 
19
19
  class BasicResult:
@@ -33,7 +33,7 @@ class BasicResult:
33
33
  return self.timestamp
34
34
 
35
35
  def get_timestamp_as_utc(self):
36
- return datetime.utcfromtimestamp(self.timestamp / 1000.0)
36
+ return datetime.fromtimestamp(self.timestamp / 1000.0, tz=timezone.utc).replace(tzinfo=None)
37
37
 
38
38
  def get_trading_session(self):
39
39
  return self.trading_session
@@ -0,0 +1,82 @@
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.request import ApiRequest
18
+
19
+
20
+ class GetOptionContractsRequest(ApiRequest):
21
+ def __init__(self):
22
+ ApiRequest.__init__(self, "/openapi/instrument/option/contracts", version="v2", method="GET",
23
+ query_params={})
24
+
25
+ def set_category(self, category):
26
+ self.add_query_param("category", category)
27
+
28
+ def set_underlying_symbols(self, underlying_symbols):
29
+ if underlying_symbols:
30
+ self.add_query_param("underlying_symbols", underlying_symbols)
31
+
32
+ def set_status(self, status):
33
+ if status:
34
+ self.add_query_param("status", status)
35
+
36
+ def set_start_date(self, start_date):
37
+ if start_date:
38
+ self.add_query_param("start_date", start_date)
39
+
40
+ def set_end_date(self, end_date):
41
+ if end_date:
42
+ self.add_query_param("end_date", end_date)
43
+
44
+ def set_root_symbol(self, root_symbol):
45
+ if root_symbol:
46
+ self.add_query_param("root_symbol", root_symbol)
47
+
48
+ def set_option_symbol(self, option_symbol):
49
+ if option_symbol:
50
+ self.add_query_param("option_symbol", option_symbol)
51
+
52
+ def set_option_type(self, option_type):
53
+ if option_type:
54
+ self.add_query_param("option_type", option_type)
55
+
56
+ def set_style(self, style):
57
+ if style:
58
+ self.add_query_param("style", style)
59
+
60
+ def set_strike_price_gte(self, strike_price_gte):
61
+ if strike_price_gte is not None:
62
+ self.add_query_param("strike_price_gte", strike_price_gte)
63
+
64
+ def set_strike_price_lte(self, strike_price_lte):
65
+ if strike_price_lte is not None:
66
+ self.add_query_param("strike_price_lte", strike_price_lte)
67
+
68
+ def set_ppind(self, ppind):
69
+ if ppind is not None:
70
+ self.add_query_param("ppind", ppind)
71
+
72
+ def set_show_deliverables(self, show_deliverables):
73
+ if show_deliverables is not None:
74
+ self.add_query_param("show_deliverables", show_deliverables)
75
+
76
+ def set_page_size(self, page_size):
77
+ if page_size:
78
+ self.add_query_param("page_size", page_size)
79
+
80
+ def set_last_instrument_id(self, last_instrument_id):
81
+ if last_instrument_id:
82
+ self.add_query_param("last_instrument_id", last_instrument_id)
webull/trade/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '2.0.13'
1
+ __version__ = '2.0.15'
@@ -16,6 +16,8 @@
16
16
 
17
17
  EVENT_TYPE_ORDER = 1024
18
18
  EVENT_TYPE_POSITION = 1028
19
+ EVENT_TYPE_OPTION = 1032
19
20
 
20
21
  ORDER_STATUS_CHANGED = 1
21
22
  POSITION_STATUS_CHANGED = 2
23
+ OPTION_STATUS_CHANGED = 4
@@ -19,7 +19,7 @@ from webull.core.request import ApiRequest
19
19
 
20
20
  class PlaceOrderRequest(ApiRequest):
21
21
  """
22
- Deprecated. Use :func:`place_order_request` instead.
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 equityrequired when querying for options information (e.g., WARRANT, UNITS, ETF, CALL_OPTION, PUT_OPTION).
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
  """
@@ -26,6 +26,9 @@ from webull.trade.request.v2.replace_order_request import ReplaceOrderRequest
26
26
 
27
27
 
28
28
  class OrderOperationV2:
29
+ """
30
+ Deprecated. Use :class:`OrderOperationV3` instead.
31
+ """
29
32
  def __init__(self, api_client):
30
33
  self.client = api_client
31
34
 
@@ -71,19 +71,12 @@ 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= subscribeType, # 12、3 allowed now
75
+ subscribeType= 7, # 1 2 4 allowed now
80
76
  timestamp=int(time.time() * 1000), # millis
81
77
  accounts=accounts,
82
78
  )
83
- if common.is_not_upgrade_api_host(self._host):
84
- signer_spec = sha_hmac256_new
85
- else:
86
- signer_spec = sha_hmac1
79
+ signer_spec = sha_hmac256_new
87
80
 
88
81
  signature, metadata = calc_signature(app_key, app_secret, request, signer_spec)
89
82
 
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: webull-openapi-python-sdk
3
- Version: 2.0.13
3
+ Version: 2.0.15
4
4
  Summary: Webull Python SDK.
5
5
  Home-page:
6
6
  Author: Webull
7
7
  Author-email:
8
8
  License: Apache License 2.0
9
9
  Platform: any
10
- Requires-Python: >=3.8,<3.14
10
+ Requires-Python: >=3.8,<3.15
11
11
  Description-Content-Type: text/markdown
12
12
  License-File: LICENSE
13
13
  License-File: NOTICE
@@ -18,11 +18,13 @@ Requires-Dist: urllib3>=2.0
18
18
  Requires-Dist: requests>=2.31.0
19
19
  Requires-Dist: six>=1.16.0
20
20
  Requires-Dist: cryptography<42,>=3.4; python_version < "3.12"
21
- Requires-Dist: cryptography<43,>=41.0; python_version >= "3.12"
21
+ Requires-Dist: cryptography<43,>=41.0; python_version >= "3.12" and python_version < "3.14"
22
+ Requires-Dist: cryptography<55,>=43.0; python_version >= "3.14"
22
23
  Requires-Dist: protobuf<5,>=4.21.12; python_version < "3.12"
23
24
  Requires-Dist: protobuf<6,>=4.25.0; python_version >= "3.12"
24
25
  Requires-Dist: grpcio<1.60,>=1.51.1; python_version < "3.12"
25
- Requires-Dist: grpcio<1.70,>=1.60.0; python_version >= "3.12"
26
+ Requires-Dist: grpcio<1.70,>=1.60.0; python_version >= "3.12" and python_version < "3.14"
27
+ Requires-Dist: grpcio<2,>=1.75.1; python_version >= "3.14"
26
28
  Dynamic: author
27
29
  Dynamic: description-content-type
28
30
  Dynamic: license
@@ -1,10 +1,10 @@
1
- samples/__init__.py,sha256=F9oasgdSO040QuU150cChv-xopNDOmPbPvzmyDiEYjM,23
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
5
5
  samples/assets/assets_client.py,sha256=p9LS2Td3gbUMkHn4LD_9RMCFuaQRUbsKvG4PhZBGJDc,1974
6
6
  samples/data/__init__.py,sha256=eoZ6GfifbqhMLNzjlqRDVil-yyBkOmVN9ujSgJWNBlY,15
7
- samples/data/data_client.py,sha256=amhccRnIlpP9QDb5yB8vtvWKQgqPbEigABfjlSWON2I,12411
7
+ samples/data/data_client.py,sha256=6NLHqfXyxIIE6lLAAqU7wT-GaKAgw4h2-UdbIlKeyug,12662
8
8
  samples/data/data_client_event.py,sha256=u6Bebo2hTE0Ri1bQHa8nhFEe-fBbdxfNwLpTZh3E1WY,3046
9
9
  samples/data/data_streaming_client.py,sha256=2da21SE_Mneo7zbM_l1rkpdBBbI4avrpnSPMxsZIalw,4085
10
10
  samples/data/data_streaming_client_async.py,sha256=o_u1ch8JdbcYnLCvDCCUzO-Z1IG7BUKncu_GB_kCbOs,4443
@@ -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=BWdD1L41LXmDlaig6ku9T3t3fSCCZEdj5nxH1xI1AZA,2653
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=F9oasgdSO040QuU150cChv-xopNDOmPbPvzmyDiEYjM,23
27
- webull/core/__init__.py,sha256=Qhu2u_ECRyTmwLpFqEvg3uf4DNpsW3CQr6STtRrF6eo,226
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
@@ -36,7 +35,7 @@ webull/core/auth/algorithm/sha_hmac1.py,sha256=oYHpbwwOK2w9dtSnaOMwGLaw-opBwOxJW
36
35
  webull/core/auth/algorithm/sha_hmac256.py,sha256=jkkWDQOYuJI6nrKVx89KnLI4sTAFi_zmxNc5bPGX0cw,2638
37
36
  webull/core/auth/algorithm/sha_hmac256_new.py,sha256=t8s_YegLV5_qtLLp2CQHKY66OTu_eZyUbGjsHWuSpt8,2155
38
37
  webull/core/auth/composer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
39
- webull/core/auth/composer/default_signature_composer.py,sha256=QQrbdsCX50MHGJMhMnIOy_ox0LB7QYUsDeJAPc6XSBU,5323
38
+ webull/core/auth/composer/default_signature_composer.py,sha256=4MfiW5tU24glGwMwp0VpICHwqMPnNAWDcjk11I7AJ7k,5232
40
39
  webull/core/auth/signers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
41
40
  webull/core/auth/signers/app_key_signer.py,sha256=ojdG3yFefU7olqnQbRElCuJf9VD7UqueFE39-IP_Bfk,2841
42
41
  webull/core/auth/signers/signer.py,sha256=4fo94UqLcwUAYziAlCd9GAqNLM8PbLLVHChdjvcfvhY,1790
@@ -86,11 +85,11 @@ webull/core/retry/retry_condition.py,sha256=Hel380uhtcgmrK0NZiuY015vyBQWzM2dv4np
86
85
  webull/core/retry/retry_policy.py,sha256=y1Kwc7lw1N4sgvR71AcUbsv8cYYLAJRdDMx7VWO6ubs,2549
87
86
  webull/core/retry/retry_policy_context.py,sha256=rVAqF6NE6Aw-OUJY1TaxEhSLLCuYe8Kfs6Poqol0WOk,2036
88
87
  webull/core/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
89
- webull/core/utils/common.py,sha256=T5VVcYQVhA9fhiUHZN9gBuoh0uzVgbCM01o1qK08NAE,2725
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=f8_ps9BrG3WfXD8ZAw873-_YoGeke1Q55CeDwRmYkqA,1104
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=A1ewcdVQ2-bAKc0T1HpPB3BsNC-a_6o-DRL8CcYULZE,39
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
@@ -117,15 +116,15 @@ webull/data/quotes/crypto_market_data.py,sha256=UQlxUz0GntvwcRS-Vh_h7cXbhQ045MqP
117
116
  webull/data/quotes/event_market_data.py,sha256=lARSHqnVxRZZNOIi9uP-Rs5StMIUWtmwrw-p8droqtc,4650
118
117
  webull/data/quotes/fundamentals.py,sha256=Dod6lcTwPDvyOjFQxDwW6GrIoDAknIGZOL1M9VRRdX4,14597
119
118
  webull/data/quotes/futures_market_data.py,sha256=fc9giYNy1LcdLHOJV31zMbPBKtWDH8kBW5xRFgHzQUA,5596
120
- webull/data/quotes/instrument.py,sha256=BHQ4INg3ct2b0E22E6IHMtYz47q8hA3HIf1wzbw6Ns4,12665
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=cI9xxGpKV_KDS8cgh9azHifBji0yeSuKmH7Jxaqij38,3139
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=J6Ms_01a44IvzNcw9krwMM0CuA_-zh-5eBGqx2kQbv4,1759
128
- webull/data/quotes/subscribe/basic_result.py,sha256=l9pxGlt8HLHwE3plq_6J0OPZ_X4ZjjRfa1f9nExu2dE,1450
126
+ webull/data/quotes/subscribe/ask_bid_result.py,sha256=o-Wj2-l6aLkp9ENoIJlMRb4WTmVoZYlfy4OQpTQtPak,1737
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
131
130
  webull/data/quotes/subscribe/event_depth_result.py,sha256=30hUvNqQZNnwGNngmqPO3eFtCkJXd6OjjV8FadN7uXE,1510
@@ -194,6 +193,7 @@ webull/data/request/get_instruments_request.py,sha256=PmDXrv9hUTHNtwppjV6GMQqTcN
194
193
  webull/data/request/get_noii_bars_request.py,sha256=_ubNykIQCCDg9cRgeR49FVloF21s2REWlp_KTnUlYEg,1845
195
194
  webull/data/request/get_noii_snapshot_request.py,sha256=IQ2HrAyyO2GzC8HEsjz4S0Owc0Zk25d-1ULjTqThmZU,2057
196
195
  webull/data/request/get_option_bars_request.py,sha256=ObE4blYHZ_OcKG8Cp6St7ujDTIFIZyBP4MGhx8k9X6k,2556
196
+ webull/data/request/get_option_contracts_request.py,sha256=MzsJ4IZirTgbK0DHS7IPkSgzQNYF4uj3UCD9BMV3Ekw,2847
197
197
  webull/data/request/get_option_snapshot_request.py,sha256=XHmtHKN8fF6-rIWfstFr_bLFtgEIx-u61H6Y7WnOrlE,1816
198
198
  webull/data/request/get_option_tick_request.py,sha256=MuSFYnM8m1UwOJ2NjzhOJYlWhbYDyiqPbNkKoPQUupI,1648
199
199
  webull/data/request/get_quotes_request.py,sha256=g4J7lAQZBqoeM67Xm2E-Y2pwNxsqkrECf_r5DTTrS5M,1244
@@ -218,9 +218,9 @@ webull/data/request/watchlist/get_watchlist_request.py,sha256=XxzS4gxFbdQSajpFSm
218
218
  webull/data/request/watchlist/remove_watchlist_instruments_request.py,sha256=qOtQYDBp-PSawAgljnLmtfUce8dAblWI_zB0nnIv3G0,1451
219
219
  webull/data/request/watchlist/update_watchlist_instruments_request.py,sha256=KoihfB8MszsAooQGUUMjFmnid_a7xk4YSdEMDO1gh-k,1493
220
220
  webull/data/request/watchlist/update_watchlist_request.py,sha256=0s3ftkxiz9hjtXhLORrIUphyDIldRA8pJ4mP5zfbsyU,1466
221
- webull/trade/__init__.py,sha256=ETOzoBNhLSJycFTTlQ9F3NIdUYtPhNYYTm7erVExyfg,22
221
+ webull/trade/__init__.py,sha256=p2D-zgjkknmTvHuGvNpDvkb-XR4BZlFn9B2Wa14Wxak,22
222
222
  webull/trade/trade_client.py,sha256=ck8yRjm-aibv8LGOP0Gk5zg6bv4-bTVjULFpZlCAK2c,2278
223
- webull/trade/trade_events_client.py,sha256=G9ovuxrnQh8iA1so2Ar-41jWRzDCYQYSHTkQLGlwhhA,9983
223
+ webull/trade/trade_events_client.py,sha256=sHoKPKQQ2Ye_c9tt9MYxFeza3T5lLR5VosNro7H1gN4,9748
224
224
  webull/trade/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
225
225
  webull/trade/common/account_type.py,sha256=haVAB33MERN6XyPsbrfVQhK9_CpU90VltI6_KDkxzlE,715
226
226
  webull/trade/common/category.py,sha256=lrSKMO11wMpw9iWWeefTdWXedJAFfWRlJ76swfqVP0c,947
@@ -244,7 +244,7 @@ webull/trade/events/default_retry_policy.py,sha256=zWoaJFJSUTtHw_qLj9_AIPBzFW6UH
244
244
  webull/trade/events/events_pb2.py,sha256=NLolj5VOws1LJT5YIvnuZab9YYhR4lm2-iCkztaARPo,2440
245
245
  webull/trade/events/events_pb2_grpc.py,sha256=ebxp_VCJHBQFCKvxBKRUMhW67TZoUn6NwCBvKpiTEpg,2482
246
246
  webull/trade/events/signature_composer.py,sha256=GL7_lC3zHyyVy0IcxYdavtJNFWCnQZ6m5nLfC--_eG4,2639
247
- webull/trade/events/types.py,sha256=NkBeC3mQPflcg7NDTChVS-DAtDPX_G-od9YJt_FLZTc,689
247
+ webull/trade/events/types.py,sha256=3GlnmE7oaACsXBW5uy-S5BBdNLffFhsQwadICSAADSo,740
248
248
  webull/trade/request/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
249
249
  webull/trade/request/cancel_order_request.py,sha256=JbyeVNOVu9xvwzba7Ntw2Sh4BrNVUbBTkYLTKgXIU5U,1016
250
250
  webull/trade/request/get_account_balance_request.py,sha256=S9M1rz6HFlIwRpWfkQKVfRo996_DWF8Qe6bGirSnkV0,1042
@@ -259,10 +259,10 @@ webull/trade/request/get_trade_calendar_request.py,sha256=h70H27CWDeIYipxDINcjdQ
259
259
  webull/trade/request/get_trade_instrument_detail_request.py,sha256=pDQKeNC3v5hCWnt_lkQddoOdMlwZ6pK_hnysiDCXrOU,910
260
260
  webull/trade/request/get_trade_security_detail_request.py,sha256=X_8wBBPLTAJZf-l0e7t4R2T_W8XWRl-hgAuLztfAnWE,1534
261
261
  webull/trade/request/get_tradeable_instruments_request.py,sha256=7z57iT2Wqb43Kz-kdu09gkTGRPNzo4Aipq4VDbbqAMo,1030
262
- webull/trade/request/palce_order_request.py,sha256=vkxUb0H7Ias75IsE7e-vkViYsMWFhquAF1WEzb-_hNw,3322
263
- webull/trade/request/place_order_request.py,sha256=1wPtF0cTYTYWKh2NfLLYwiAn73ID6XNVXTNdYi4OHW4,3277
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
264
264
  webull/trade/request/place_order_request_v2.py,sha256=gUuIWLARiOCumnXKNkJDgWJ2eV7dz4U4pNH6GpWxS5s,2192
265
- webull/trade/request/replace_order_request.py,sha256=LGDynTVm0AXyfv3inpCa-KVanKMqxJ3N1G6x99eKqo8,2578
265
+ webull/trade/request/replace_order_request.py,sha256=aD94L2dsIekK6_6pezlzceKqay6KMKax_MHV9My6CAA,2654
266
266
  webull/trade/request/replace_order_request_v2.py,sha256=5R94VCYyStImQptcEMsTWRjNj7weYFCO6-2mLySmcj8,1612
267
267
  webull/trade/request/v2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
268
268
  webull/trade/request/v2/cancel_option_request.py,sha256=XfE_7YtaTwU0a1dPJ8nqGso4Knri5xfVACA3ZbxqU4M,1015
@@ -292,19 +292,19 @@ webull/trade/request/v3/place_order_request.py,sha256=kauvIDIcaBKU6gd7v9xvG8cJFT
292
292
  webull/trade/request/v3/preview_order_request.py,sha256=ZgzwrlAed8IJ8ORDRjJ7rIuF_w8ySZktLDBsf6F7FGo,1132
293
293
  webull/trade/request/v3/replace_order_request.py,sha256=Xsa-vKGTMAwv-dJuSm8cx8rHVoFhk-cFjnHOpsUaZwM,1212
294
294
  webull/trade/trade/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
295
- webull/trade/trade/account_info.py,sha256=C3YcBDZfYOe5QSJEbysblye-W90RbQ7xNing5gLsIng,3622
295
+ webull/trade/trade/account_info.py,sha256=M67jtCpbttp7tDCNNW99A1oLX-62c26yR1XXZ-xkK18,3609
296
296
  webull/trade/trade/activity.py,sha256=pyvsJcMhyKoKdxurJPgXexsoUy6EefwKneqqSJpdA0U,2154
297
297
  webull/trade/trade/order_operation.py,sha256=QrL4Da87RTOSupiAbuXtZigo9602Byp14DQGyR99hkI,12849
298
298
  webull/trade/trade/trade_calendar.py,sha256=rGSiR5GZggQnZOmmpbC-06trgPQgFTvdpUzGMpw2ycw,1415
299
- webull/trade/trade/trade_instrument.py,sha256=293IaiLnhw0mAc1IuF3LSgwgve_XZ1Dyf1VeFtmClc8,3474
299
+ webull/trade/trade/trade_instrument.py,sha256=AV-Y-x_hWBnF9T2g8SbYGKEGFmEQJi0QhtfTCoZicZo,3472
300
300
  webull/trade/trade/v2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
301
301
  webull/trade/trade/v2/account_info_v2.py,sha256=fs2-XaxklItuhaspzPkthXA5SgbnIffL6NTyKYR3bDw,3276
302
- webull/trade/trade/v2/order_operation_v2.py,sha256=m54RH2j45CBBWEnqe4KxrsltAF44XKtPMT4kv8t7djQ,12745
302
+ webull/trade/trade/v2/order_operation_v2.py,sha256=ZWH-6dp5rvokb5YX5HO2Op-KPLjGR4gpJ06Kc_IUilQ,12816
303
303
  webull/trade/trade/v3/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
304
304
  webull/trade/trade/v3/order_opration_v3.py,sha256=NsInXC5sPCW8y55jU71BnR0sQYhtWclqCmyK7V09MLc,8275
305
- webull_openapi_python_sdk-2.0.13.dist-info/licenses/LICENSE,sha256=ALOnsLtb1aHxmDJg3-oMi0BO-i-cjfyZaOBfnnavKMc,11359
306
- webull_openapi_python_sdk-2.0.13.dist-info/licenses/NOTICE,sha256=X5TApte6CPV10b96Cb70IRLusXmiRmK_R-dB-1tQM_I,2018
307
- webull_openapi_python_sdk-2.0.13.dist-info/METADATA,sha256=ax-GvRxzowuykj36heNhXVhnd8J9ttaF6Hg6lZmqj6M,1033
308
- webull_openapi_python_sdk-2.0.13.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
309
- webull_openapi_python_sdk-2.0.13.dist-info/top_level.txt,sha256=h8pEjNDGWS2ZUZ2vYFpUShoMQT0ZRIQaD57QJWD8_aI,15
310
- webull_openapi_python_sdk-2.0.13.dist-info/RECORD,,
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())