webull-openapi-python-sdk 2.0.19__py3-none-any.whl → 3.0.0__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/screener/screener_client.py +55 -2
- webull/__init__.py +1 -1
- webull/core/__init__.py +1 -1
- webull/core/http/initializer/config/bean/query_config_request.py +1 -1
- webull/core/http/initializer/token/bean/check_token_request.py +1 -1
- webull/core/http/initializer/token/bean/create_token_request.py +1 -1
- webull/core/http/initializer/token/bean/refresh_token_request.py +1 -1
- webull/data/__init__.py +1 -1
- webull/data/quotes/fundamentals.py +19 -0
- webull/data/quotes/instrument.py +148 -1
- webull/data/quotes/screener.py +179 -0
- webull/data/request/get_analyst_rating_request.py +2 -1
- webull/data/request/get_analyst_target_price_request.py +2 -1
- webull/data/request/get_batch_historical_bars_request.py +1 -1
- webull/data/request/get_capital_flow_request.py +1 -1
- webull/data/request/get_company_profile_request.py +2 -1
- webull/data/request/get_corp_action_request.py +1 -1
- webull/data/request/get_crypto_historical_bars_request.py +1 -1
- webull/data/request/get_crypto_instruments_request.py +5 -1
- webull/data/request/get_crypto_instruments_request_v2.py +41 -0
- webull/data/request/get_crypto_snapshot_request.py +1 -1
- webull/data/request/get_dividend_calendar_request.py +1 -1
- webull/data/request/get_earnings_calendar_request.py +1 -1
- webull/data/request/get_eod_bars_request.py +1 -1
- webull/data/request/get_event_bars_request.py +1 -1
- webull/data/request/get_event_depth_request.py +2 -1
- webull/data/request/get_event_events_request.py +2 -1
- webull/data/request/get_event_instrument_request.py +5 -1
- webull/data/request/get_event_instrument_request_v2.py +45 -0
- webull/data/request/get_event_series_categories.py +2 -1
- webull/data/request/get_event_series_request.py +5 -1
- webull/data/request/get_event_series_request_v2.py +37 -0
- webull/data/request/get_event_snapshot_request.py +2 -1
- webull/data/request/get_event_tick_request.py +2 -1
- webull/data/request/get_financials_alert_request.py +1 -1
- webull/data/request/get_financials_balance_sheet_request.py +1 -1
- webull/data/request/get_financials_cashflow_request.py +1 -1
- webull/data/request/get_financials_income_request.py +1 -1
- webull/data/request/get_financials_indicators_request.py +1 -1
- webull/data/request/get_footprint_request.py +1 -1
- webull/data/request/get_forecast_eps_request.py +1 -1
- webull/data/request/get_fund_allocation_request.py +1 -1
- webull/data/request/get_fund_brief_request.py +1 -1
- webull/data/request/get_fund_dividends_request.py +5 -1
- webull/data/request/get_fund_dividends_request_v2.py +35 -0
- webull/data/request/get_fund_files_request.py +1 -1
- webull/data/request/get_fund_holdings_request.py +1 -1
- webull/data/request/get_fund_net_value_request.py +1 -1
- webull/data/request/get_fund_performance_request.py +1 -1
- webull/data/request/get_fund_rating_request.py +1 -1
- webull/data/request/get_fund_splits_request.py +1 -1
- webull/data/request/get_futures_depth_request.py +1 -1
- webull/data/request/get_futures_footprint_request.py +1 -1
- webull/data/request/get_futures_historical_bars_request.py +1 -1
- webull/data/request/get_futures_instruments_by_code_request.py +1 -1
- webull/data/request/get_futures_instruments_request.py +2 -1
- webull/data/request/get_futures_product_class.py +2 -1
- webull/data/request/get_futures_products_request.py +2 -1
- webull/data/request/get_futures_snapshot_request.py +1 -1
- webull/data/request/get_futures_tick_request.py +1 -1
- webull/data/request/get_historical_bars_request.py +1 -1
- webull/data/request/get_industry_comparison_request.py +1 -1
- webull/data/request/get_instruments_request.py +5 -1
- webull/data/request/get_instruments_request_v2.py +44 -0
- webull/data/request/get_noii_bars_request.py +1 -1
- webull/data/request/get_noii_snapshot_request.py +2 -1
- webull/data/request/get_option_bars_request.py +1 -1
- webull/data/request/get_option_contracts_request.py +5 -1
- webull/data/request/get_option_contracts_request_v2.py +78 -0
- webull/data/request/get_option_snapshot_request.py +1 -1
- webull/data/request/get_option_tick_request.py +1 -1
- webull/data/request/get_quotes_request.py +1 -1
- webull/data/request/get_sec_filings_request.py +1 -1
- webull/data/request/get_snapshot_request.py +1 -1
- webull/data/request/get_tick_request.py +1 -1
- webull/data/request/screener/get_52whl_request.py +4 -0
- webull/data/request/screener/get_52whl_request_v2.py +45 -0
- webull/data/request/screener/get_gainers_losers_request.py +5 -1
- webull/data/request/screener/get_gainers_losers_request_v2.py +94 -0
- webull/data/request/screener/get_high_dividend_request.py +4 -0
- webull/data/request/screener/get_high_dividend_request_v2.py +41 -0
- webull/data/request/screener/get_market_sectors_detail_request.py +4 -0
- webull/data/request/screener/get_market_sectors_detail_request_v2.py +47 -0
- webull/data/request/screener/get_market_sectors_request.py +5 -1
- webull/data/request/screener/get_market_sectors_request_v2.py +43 -0
- webull/data/request/screener/get_most_active_request.py +5 -1
- webull/data/request/screener/get_most_active_request_v2.py +92 -0
- webull/data/request/subscribe_request.py +1 -1
- webull/data/request/unsubscribe_request.py +1 -1
- webull/data/request/watchlist/add_watchlist_instruments_request.py +2 -1
- webull/data/request/watchlist/create_watchlist_request.py +1 -1
- webull/data/request/watchlist/delete_watchlist_request.py +1 -1
- webull/data/request/watchlist/get_watchlist_instruments_request.py +2 -1
- webull/data/request/watchlist/get_watchlist_request.py +1 -1
- webull/data/request/watchlist/remove_watchlist_instruments_request.py +2 -1
- webull/data/request/watchlist/update_watchlist_instruments_request.py +2 -1
- webull/data/request/watchlist/update_watchlist_request.py +1 -1
- webull/trade/__init__.py +1 -1
- webull/trade/request/cancel_order_request.py +1 -1
- webull/trade/request/get_account_balance_request.py +1 -1
- webull/trade/request/get_account_positions_request.py +1 -1
- webull/trade/request/get_account_profile_request.py +1 -1
- webull/trade/request/get_activities_request.py +4 -0
- webull/trade/request/get_activities_request_v2.py +41 -0
- webull/trade/request/get_app_subscriptions.py +1 -1
- webull/trade/request/get_open_orders_request.py +1 -1
- webull/trade/request/get_order_detail_request.py +1 -1
- webull/trade/request/get_today_orders_request.py +1 -1
- webull/trade/request/get_trade_calendar_request.py +1 -1
- webull/trade/request/get_trade_instrument_detail_request.py +1 -1
- webull/trade/request/get_trade_security_detail_request.py +1 -1
- webull/trade/request/get_tradeable_instruments_request.py +1 -1
- webull/trade/request/palce_order_request.py +1 -1
- webull/trade/request/place_order_request.py +1 -1
- webull/trade/request/place_order_request_v2.py +1 -1
- webull/trade/request/replace_order_request.py +1 -1
- webull/trade/request/replace_order_request_v2.py +1 -1
- webull/trade/request/v2/cancel_option_request.py +1 -1
- webull/trade/request/v2/cancel_order_request.py +1 -1
- webull/trade/request/v2/get_account_balance_request.py +1 -1
- webull/trade/request/v2/get_account_list.py +1 -3
- webull/trade/request/v2/get_account_list_request.py +1 -3
- webull/trade/request/v2/get_account_position_details_request.py +4 -0
- webull/trade/request/v2/get_account_position_details_request_v2.py +31 -0
- webull/trade/request/v2/get_account_positions_request.py +1 -1
- webull/trade/request/v2/get_order_detail_request.py +1 -1
- webull/trade/request/v2/get_order_executions_request.py +5 -0
- webull/trade/request/v2/get_order_executions_request_v2.py +35 -0
- webull/trade/request/v2/get_order_history_request.py +1 -1
- webull/trade/request/v2/get_order_open_request.py +1 -1
- webull/trade/request/v2/palce_order_request.py +1 -1
- webull/trade/request/v2/place_option_request.py +1 -1
- webull/trade/request/v2/place_order_request.py +1 -1
- webull/trade/request/v2/preview_option_request.py +1 -1
- webull/trade/request/v2/preview_order_request.py +1 -1
- webull/trade/request/v2/replace_option_request.py +1 -1
- webull/trade/request/v2/replace_order_request.py +1 -1
- webull/trade/request/v3/batch_place_order_request.py +1 -1
- webull/trade/request/v3/cancel_order_request.py +1 -1
- webull/trade/request/v3/get_order_detail_request.py +1 -1
- webull/trade/request/v3/get_order_history_request.py +5 -1
- webull/trade/request/v3/get_order_history_request_v2.py +35 -0
- webull/trade/request/v3/get_order_open_request.py +5 -1
- webull/trade/request/v3/get_order_open_request_v2.py +27 -0
- webull/trade/request/v3/place_order_request.py +1 -1
- webull/trade/request/v3/preview_order_request.py +1 -1
- webull/trade/request/v3/replace_order_request.py +1 -1
- webull/trade/trade/activity.py +33 -0
- webull/trade/trade/v2/account_info_v2.py +24 -0
- webull/trade/trade/v3/{order_opration_v3.py → order_operation_v3.py} +94 -1
- webull/trade/trade_client.py +1 -1
- {webull_openapi_python_sdk-2.0.19.dist-info → webull_openapi_python_sdk-3.0.0.dist-info}/METADATA +1 -1
- {webull_openapi_python_sdk-2.0.19.dist-info → webull_openapi_python_sdk-3.0.0.dist-info}/RECORD +157 -140
- {webull_openapi_python_sdk-2.0.19.dist-info → webull_openapi_python_sdk-3.0.0.dist-info}/WHEEL +0 -0
- {webull_openapi_python_sdk-2.0.19.dist-info → webull_openapi_python_sdk-3.0.0.dist-info}/licenses/LICENSE +0 -0
- {webull_openapi_python_sdk-2.0.19.dist-info → webull_openapi_python_sdk-3.0.0.dist-info}/licenses/NOTICE +0 -0
- {webull_openapi_python_sdk-2.0.19.dist-info → webull_openapi_python_sdk-3.0.0.dist-info}/top_level.txt +0 -0
|
@@ -19,7 +19,7 @@ from webull.core.request import ApiRequest
|
|
|
19
19
|
|
|
20
20
|
class GetCapitalFlowRequest(ApiRequest):
|
|
21
21
|
def __init__(self):
|
|
22
|
-
ApiRequest.__init__(self, "/
|
|
22
|
+
ApiRequest.__init__(self, "/market-data/fundamentals/capital-flows/get", version='v3', method="GET",
|
|
23
23
|
query_params={})
|
|
24
24
|
|
|
25
25
|
def set_symbol(self, symbol):
|
|
@@ -19,7 +19,8 @@ from webull.core.request import ApiRequest
|
|
|
19
19
|
|
|
20
20
|
class GetCompanyProfileRequest(ApiRequest):
|
|
21
21
|
def __init__(self):
|
|
22
|
-
ApiRequest.__init__(self, "/
|
|
22
|
+
ApiRequest.__init__(self, "/market-data/fundamentals/company-profiles/get", version="v3", method="GET",
|
|
23
|
+
query_params={})
|
|
23
24
|
|
|
24
25
|
def set_symbol(self, symbol):
|
|
25
26
|
"""
|
|
@@ -17,7 +17,7 @@ from webull.core.request import ApiRequest
|
|
|
17
17
|
|
|
18
18
|
class GetCorpActionRequest(ApiRequest):
|
|
19
19
|
def __init__(self):
|
|
20
|
-
ApiRequest.__init__(self, "/instrument/corp-action", version='
|
|
20
|
+
ApiRequest.__init__(self, "/instrument/corp-action", version='v3', method="GET", query_params={})
|
|
21
21
|
|
|
22
22
|
def set_instrument_ids(self, instrument_ids):
|
|
23
23
|
if isinstance(instrument_ids, str):
|
|
@@ -18,7 +18,7 @@ from webull.core.request import ApiRequest
|
|
|
18
18
|
|
|
19
19
|
class GetCryptoHistoricalBarsRequest(ApiRequest):
|
|
20
20
|
def __init__(self):
|
|
21
|
-
ApiRequest.__init__(self, "/
|
|
21
|
+
ApiRequest.__init__(self, "/market-data/crypto/bars/list", version='v3', method="GET", query_params={})
|
|
22
22
|
|
|
23
23
|
def set_symbols(self, symbols):
|
|
24
24
|
if isinstance(symbols, str):
|
|
@@ -18,8 +18,12 @@ from webull.core.request import ApiRequest
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
class GetCryptoInstrumentsRequest(ApiRequest):
|
|
21
|
+
"""
|
|
22
|
+
.. deprecated::
|
|
23
|
+
Use :class:`GetCryptoInstrumentsRequestV2` instead.
|
|
24
|
+
"""
|
|
21
25
|
def __init__(self):
|
|
22
|
-
ApiRequest.__init__(self, "/openapi/instrument/crypto/list", version='
|
|
26
|
+
ApiRequest.__init__(self, "/openapi/instrument/crypto/list", version='v3', method="GET", query_params={})
|
|
23
27
|
|
|
24
28
|
def set_symbols(self, symbols):
|
|
25
29
|
if isinstance(symbols, str):
|
|
@@ -0,0 +1,41 @@
|
|
|
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 GetCryptoInstrumentsRequestV2(ApiRequest):
|
|
21
|
+
def __init__(self):
|
|
22
|
+
ApiRequest.__init__(self, "/trading/instruments/crypto/profiles/list", version='v3', method="GET",
|
|
23
|
+
query_params={})
|
|
24
|
+
|
|
25
|
+
def set_symbols(self, symbols):
|
|
26
|
+
if isinstance(symbols, str):
|
|
27
|
+
self.add_query_param("symbols", symbols)
|
|
28
|
+
elif isinstance(symbols, list):
|
|
29
|
+
self.add_query_param("symbols", ",".join(symbols))
|
|
30
|
+
|
|
31
|
+
def set_category(self, category):
|
|
32
|
+
if category:
|
|
33
|
+
self.add_query_param("category", category)
|
|
34
|
+
|
|
35
|
+
def set_status(self, status):
|
|
36
|
+
if status:
|
|
37
|
+
self.add_query_param("status", status)
|
|
38
|
+
|
|
39
|
+
def set_pagination_key(self, pagination_key):
|
|
40
|
+
if pagination_key:
|
|
41
|
+
self.add_query_param("pagination_key", pagination_key)
|
|
@@ -19,7 +19,7 @@ from webull.core.request import ApiRequest
|
|
|
19
19
|
|
|
20
20
|
class GetCryptoSnapshotRequest(ApiRequest):
|
|
21
21
|
def __init__(self):
|
|
22
|
-
ApiRequest.__init__(self, "/
|
|
22
|
+
ApiRequest.__init__(self, "/market-data/crypto/snapshots/list", version='v3', method="GET", query_params={})
|
|
23
23
|
|
|
24
24
|
def set_symbols(self, symbols):
|
|
25
25
|
if isinstance(symbols, str):
|
|
@@ -19,7 +19,7 @@ from webull.core.request import ApiRequest
|
|
|
19
19
|
|
|
20
20
|
class GetDividendCalendarRequest(ApiRequest):
|
|
21
21
|
def __init__(self):
|
|
22
|
-
ApiRequest.__init__(self, "/
|
|
22
|
+
ApiRequest.__init__(self, "/market-data/fundamentals/dividend-calendars/list", version='v3', method="GET",
|
|
23
23
|
query_params={})
|
|
24
24
|
|
|
25
25
|
def set_symbol(self, symbol):
|
|
@@ -19,7 +19,7 @@ from webull.core.request import ApiRequest
|
|
|
19
19
|
|
|
20
20
|
class GetEarningsCalendarRequest(ApiRequest):
|
|
21
21
|
def __init__(self):
|
|
22
|
-
ApiRequest.__init__(self, "/
|
|
22
|
+
ApiRequest.__init__(self, "/market-data/fundamentals/earnings-calendars/list", version='v3', method="GET",
|
|
23
23
|
query_params={})
|
|
24
24
|
|
|
25
25
|
def set_symbol(self, symbol):
|
|
@@ -17,7 +17,7 @@ from webull.core.request import ApiRequest
|
|
|
17
17
|
|
|
18
18
|
class GetEodBarsRequest(ApiRequest):
|
|
19
19
|
def __init__(self):
|
|
20
|
-
ApiRequest.__init__(self, "/market-data/eod-bars", version='
|
|
20
|
+
ApiRequest.__init__(self, "/market-data/eod-bars", version='v3', method="GET", query_params={})
|
|
21
21
|
|
|
22
22
|
def set_instrument_ids(self, instrument_ids):
|
|
23
23
|
if isinstance(instrument_ids, str):
|
|
@@ -19,7 +19,7 @@ from webull.core.request import ApiRequest
|
|
|
19
19
|
|
|
20
20
|
class GetEventBarsRequest(ApiRequest):
|
|
21
21
|
def __init__(self):
|
|
22
|
-
ApiRequest.__init__(self, "/
|
|
22
|
+
ApiRequest.__init__(self, "/market-data/event-contracts/bars/list", version='v3', method="GET", query_params={})
|
|
23
23
|
|
|
24
24
|
def set_symbols(self, symbols):
|
|
25
25
|
if isinstance(symbols, str):
|
|
@@ -19,7 +19,8 @@ from webull.core.request import ApiRequest
|
|
|
19
19
|
|
|
20
20
|
class GetEventDepthRequest(ApiRequest):
|
|
21
21
|
def __init__(self):
|
|
22
|
-
ApiRequest.__init__(self, "/
|
|
22
|
+
ApiRequest.__init__(self, "/market-data/event-contracts/depths/list", version='v3', method="GET",
|
|
23
|
+
query_params={})
|
|
23
24
|
|
|
24
25
|
def set_symbol(self, symbol):
|
|
25
26
|
self.add_query_param("symbol", symbol)
|
|
@@ -18,7 +18,8 @@ from webull.core.request import ApiRequest
|
|
|
18
18
|
|
|
19
19
|
class GetEventEventsRequest(ApiRequest):
|
|
20
20
|
def __init__(self):
|
|
21
|
-
ApiRequest.__init__(self, "/
|
|
21
|
+
ApiRequest.__init__(self, "/trading/instruments/event-contracts/events/list", version='v3', method="GET",
|
|
22
|
+
query_params={})
|
|
22
23
|
|
|
23
24
|
def set_series_symbol(self, series_symbol):
|
|
24
25
|
self.add_query_param("series_symbol", series_symbol)
|
|
@@ -17,8 +17,12 @@
|
|
|
17
17
|
from webull.core.request import ApiRequest
|
|
18
18
|
|
|
19
19
|
class GetEventInstrumentRequest(ApiRequest):
|
|
20
|
+
"""
|
|
21
|
+
.. deprecated::
|
|
22
|
+
Use :class:`GetEventInstrumentRequestV2` instead.
|
|
23
|
+
"""
|
|
20
24
|
def __init__(self):
|
|
21
|
-
ApiRequest.__init__(self, "/openapi/instrument/event/market/list", version='
|
|
25
|
+
ApiRequest.__init__(self, "/openapi/instrument/event/market/list", version='v3', method="GET", query_params={})
|
|
22
26
|
|
|
23
27
|
def set_series_symbol(self, series_symbol):
|
|
24
28
|
self.add_query_param("series_symbol", series_symbol)
|
|
@@ -0,0 +1,45 @@
|
|
|
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 GetEventInstrumentRequestV2(ApiRequest):
|
|
21
|
+
def __init__(self):
|
|
22
|
+
ApiRequest.__init__(self, "/trading/instruments/event-contracts/markets/list", version='v3', method="GET",
|
|
23
|
+
query_params={})
|
|
24
|
+
|
|
25
|
+
def set_series_symbol(self, series_symbol):
|
|
26
|
+
if series_symbol:
|
|
27
|
+
self.add_query_param("series_symbol", series_symbol)
|
|
28
|
+
|
|
29
|
+
def set_event_symbol(self, event_symbol):
|
|
30
|
+
if event_symbol:
|
|
31
|
+
self.add_query_param("event_symbol", event_symbol)
|
|
32
|
+
|
|
33
|
+
def set_symbols(self, symbols):
|
|
34
|
+
if isinstance(symbols, str):
|
|
35
|
+
self.add_query_param("symbols", symbols)
|
|
36
|
+
elif isinstance(symbols, list):
|
|
37
|
+
self.add_query_param("symbols", ",".join(symbols))
|
|
38
|
+
|
|
39
|
+
def set_expiration_date_after(self, expiration_date_after):
|
|
40
|
+
if expiration_date_after:
|
|
41
|
+
self.add_query_param("expiration_date_after", expiration_date_after)
|
|
42
|
+
|
|
43
|
+
def set_pagination_key(self, pagination_key):
|
|
44
|
+
if pagination_key:
|
|
45
|
+
self.add_query_param("pagination_key", pagination_key)
|
|
@@ -18,4 +18,5 @@ from webull.core.request import ApiRequest
|
|
|
18
18
|
|
|
19
19
|
class GetEventCategoriesRequest(ApiRequest):
|
|
20
20
|
def __init__(self):
|
|
21
|
-
ApiRequest.__init__(self, "/
|
|
21
|
+
ApiRequest.__init__(self, "/trading/instruments/event-contracts/categories/list", version='v3', method="GET",
|
|
22
|
+
query_params={})
|
|
@@ -17,8 +17,12 @@
|
|
|
17
17
|
from webull.core.request import ApiRequest
|
|
18
18
|
|
|
19
19
|
class GetEventSeriesRequest(ApiRequest):
|
|
20
|
+
"""
|
|
21
|
+
.. deprecated::
|
|
22
|
+
Use :class:`GetEventSeriesRequestV2` instead.
|
|
23
|
+
"""
|
|
20
24
|
def __init__(self):
|
|
21
|
-
ApiRequest.__init__(self, "/openapi/instrument/event/series/list", version='
|
|
25
|
+
ApiRequest.__init__(self, "/openapi/instrument/event/series/list", version='v3', method="GET", query_params={})
|
|
22
26
|
|
|
23
27
|
def set_category(self, category):
|
|
24
28
|
self.add_query_param("category", category)
|
|
@@ -0,0 +1,37 @@
|
|
|
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 GetEventSeriesRequestV2(ApiRequest):
|
|
21
|
+
def __init__(self):
|
|
22
|
+
ApiRequest.__init__(self, "/trading/instruments/event-contracts/series/list", version='v3', method="GET",
|
|
23
|
+
query_params={})
|
|
24
|
+
|
|
25
|
+
def set_category(self, category):
|
|
26
|
+
if category:
|
|
27
|
+
self.add_query_param("category", category)
|
|
28
|
+
|
|
29
|
+
def set_symbols(self, symbols):
|
|
30
|
+
if isinstance(symbols, str):
|
|
31
|
+
self.add_query_param("symbols", symbols)
|
|
32
|
+
elif isinstance(symbols, list):
|
|
33
|
+
self.add_query_param("symbols", ",".join(symbols))
|
|
34
|
+
|
|
35
|
+
def set_pagination_key(self, pagination_key):
|
|
36
|
+
if pagination_key:
|
|
37
|
+
self.add_query_param("pagination_key", pagination_key)
|
|
@@ -19,7 +19,8 @@ from webull.core.request import ApiRequest
|
|
|
19
19
|
|
|
20
20
|
class GetEventSnapshotRequest(ApiRequest):
|
|
21
21
|
def __init__(self):
|
|
22
|
-
ApiRequest.__init__(self, "/
|
|
22
|
+
ApiRequest.__init__(self, "/market-data/event-contracts/snapshots/list", version='v3', method="GET",
|
|
23
|
+
query_params={})
|
|
23
24
|
|
|
24
25
|
def set_symbols(self, symbols):
|
|
25
26
|
if isinstance(symbols, str):
|
|
@@ -19,7 +19,8 @@ from webull.core.request import ApiRequest
|
|
|
19
19
|
|
|
20
20
|
class GetEventTickRequest(ApiRequest):
|
|
21
21
|
def __init__(self):
|
|
22
|
-
ApiRequest.__init__(self, "/
|
|
22
|
+
ApiRequest.__init__(self, "/market-data/event-contracts/ticks/list", version='v3', method="GET",
|
|
23
|
+
query_params={})
|
|
23
24
|
|
|
24
25
|
def set_symbol(self, symbol):
|
|
25
26
|
self.add_query_param("symbol", symbol)
|
|
@@ -19,7 +19,7 @@ from webull.core.request import ApiRequest
|
|
|
19
19
|
|
|
20
20
|
class GetFinancialsAlertRequest(ApiRequest):
|
|
21
21
|
def __init__(self):
|
|
22
|
-
ApiRequest.__init__(self, "/
|
|
22
|
+
ApiRequest.__init__(self, "/market-data/fundamentals/financial-alerts/get", version='v3', method="GET",
|
|
23
23
|
query_params={})
|
|
24
24
|
|
|
25
25
|
def set_symbol(self, symbol):
|
|
@@ -19,7 +19,7 @@ from webull.core.request import ApiRequest
|
|
|
19
19
|
|
|
20
20
|
class GetFinancialsBalanceSheetRequest(ApiRequest):
|
|
21
21
|
def __init__(self):
|
|
22
|
-
ApiRequest.__init__(self, "/
|
|
22
|
+
ApiRequest.__init__(self, "/market-data/fundamentals/balance-sheets/get", version='v3', method="GET",
|
|
23
23
|
query_params={})
|
|
24
24
|
|
|
25
25
|
def set_symbol(self, symbol):
|
|
@@ -19,7 +19,7 @@ from webull.core.request import ApiRequest
|
|
|
19
19
|
|
|
20
20
|
class GetFinancialsCashflowRequest(ApiRequest):
|
|
21
21
|
def __init__(self):
|
|
22
|
-
ApiRequest.__init__(self, "/
|
|
22
|
+
ApiRequest.__init__(self, "/market-data/fundamentals/cash-flows/get", version='v3', method="GET",
|
|
23
23
|
query_params={})
|
|
24
24
|
|
|
25
25
|
def set_symbol(self, symbol):
|
|
@@ -19,7 +19,7 @@ from webull.core.request import ApiRequest
|
|
|
19
19
|
|
|
20
20
|
class GetFinancialsIncomeRequest(ApiRequest):
|
|
21
21
|
def __init__(self):
|
|
22
|
-
ApiRequest.__init__(self, "/
|
|
22
|
+
ApiRequest.__init__(self, "/market-data/fundamentals/income-statements/get", version='v3', method="GET",
|
|
23
23
|
query_params={})
|
|
24
24
|
|
|
25
25
|
def set_symbol(self, symbol):
|
|
@@ -19,7 +19,7 @@ from webull.core.request import ApiRequest
|
|
|
19
19
|
|
|
20
20
|
class GetFinancialsIndicatorsRequest(ApiRequest):
|
|
21
21
|
def __init__(self):
|
|
22
|
-
ApiRequest.__init__(self, "/
|
|
22
|
+
ApiRequest.__init__(self, "/market-data/fundamentals/indicators/get", version='v3', method="GET",
|
|
23
23
|
query_params={})
|
|
24
24
|
|
|
25
25
|
def set_symbol(self, symbol):
|
|
@@ -17,7 +17,7 @@ from webull.core.request import ApiRequest
|
|
|
17
17
|
|
|
18
18
|
class GetFootprintRequest(ApiRequest):
|
|
19
19
|
def __init__(self):
|
|
20
|
-
ApiRequest.__init__(self, "/
|
|
20
|
+
ApiRequest.__init__(self, "/market-data/stocks/footprints/list", version='v3', method="GET", query_params={})
|
|
21
21
|
|
|
22
22
|
def set_symbols(self, symbols):
|
|
23
23
|
if isinstance(symbols, str):
|
|
@@ -19,7 +19,7 @@ from webull.core.request import ApiRequest
|
|
|
19
19
|
|
|
20
20
|
class GetForecastEpsRequest(ApiRequest):
|
|
21
21
|
def __init__(self):
|
|
22
|
-
ApiRequest.__init__(self, "/
|
|
22
|
+
ApiRequest.__init__(self, "/market-data/fundamentals/forecast-eps/get", version='v3', method="GET",
|
|
23
23
|
query_params={})
|
|
24
24
|
|
|
25
25
|
def set_symbol(self, symbol):
|
|
@@ -19,7 +19,7 @@ from webull.core.request import ApiRequest
|
|
|
19
19
|
|
|
20
20
|
class GetFundAllocationRequest(ApiRequest):
|
|
21
21
|
def __init__(self):
|
|
22
|
-
ApiRequest.__init__(self, "/
|
|
22
|
+
ApiRequest.__init__(self, "/market-data/fundamentals/fund-allocations/get", version='v3', method="GET",
|
|
23
23
|
query_params={})
|
|
24
24
|
|
|
25
25
|
def set_symbol(self, symbol):
|
|
@@ -19,7 +19,7 @@ from webull.core.request import ApiRequest
|
|
|
19
19
|
|
|
20
20
|
class GetFundBriefRequest(ApiRequest):
|
|
21
21
|
def __init__(self):
|
|
22
|
-
ApiRequest.__init__(self, "/
|
|
22
|
+
ApiRequest.__init__(self, "/market-data/fundamentals/fund-brief/get", version='v3', method="GET",
|
|
23
23
|
query_params={})
|
|
24
24
|
|
|
25
25
|
def set_symbol(self, symbol):
|
|
@@ -18,8 +18,12 @@ from webull.core.request import ApiRequest
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
class GetFundDividendsRequest(ApiRequest):
|
|
21
|
+
"""
|
|
22
|
+
.. deprecated::
|
|
23
|
+
Use :class:`GetFundDividendsRequestV2` instead.
|
|
24
|
+
"""
|
|
21
25
|
def __init__(self):
|
|
22
|
-
ApiRequest.__init__(self, "/openapi/fundamentals/fund/dividends", version='
|
|
26
|
+
ApiRequest.__init__(self, "/openapi/fundamentals/fund/dividends", version='v3', method="GET",
|
|
23
27
|
query_params={})
|
|
24
28
|
|
|
25
29
|
def set_symbol(self, symbol):
|
|
@@ -0,0 +1,35 @@
|
|
|
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 GetFundDividendsRequestV2(ApiRequest):
|
|
21
|
+
def __init__(self):
|
|
22
|
+
ApiRequest.__init__(self, "/market-data/fundamentals/fund-dividends/get", version='v3', method="GET",
|
|
23
|
+
query_params={})
|
|
24
|
+
|
|
25
|
+
def set_symbol(self, symbol):
|
|
26
|
+
if symbol:
|
|
27
|
+
self.add_query_param("symbol", symbol)
|
|
28
|
+
|
|
29
|
+
def set_category(self, category):
|
|
30
|
+
if category:
|
|
31
|
+
self.add_query_param("category", category)
|
|
32
|
+
|
|
33
|
+
def set_pagination_key(self, pagination_key):
|
|
34
|
+
if pagination_key:
|
|
35
|
+
self.add_query_param("pagination_key", pagination_key)
|
|
@@ -19,7 +19,7 @@ from webull.core.request import ApiRequest
|
|
|
19
19
|
|
|
20
20
|
class GetFundFilesRequest(ApiRequest):
|
|
21
21
|
def __init__(self):
|
|
22
|
-
ApiRequest.__init__(self, "/
|
|
22
|
+
ApiRequest.__init__(self, "/market-data/fundamentals/fund-files/get", version='v3', method="GET",
|
|
23
23
|
query_params={})
|
|
24
24
|
|
|
25
25
|
def set_symbol(self, symbol):
|
|
@@ -19,7 +19,7 @@ from webull.core.request import ApiRequest
|
|
|
19
19
|
|
|
20
20
|
class GetFundHoldingsRequest(ApiRequest):
|
|
21
21
|
def __init__(self):
|
|
22
|
-
ApiRequest.__init__(self, "/
|
|
22
|
+
ApiRequest.__init__(self, "/market-data/fundamentals/fund-holdings/get", version='v3', method="GET",
|
|
23
23
|
query_params={})
|
|
24
24
|
|
|
25
25
|
def set_symbol(self, symbol):
|
|
@@ -19,7 +19,7 @@ from webull.core.request import ApiRequest
|
|
|
19
19
|
|
|
20
20
|
class GetFundNetValueRequest(ApiRequest):
|
|
21
21
|
def __init__(self):
|
|
22
|
-
ApiRequest.__init__(self, "/
|
|
22
|
+
ApiRequest.__init__(self, "/market-data/fundamentals/fund-net-values/get", version='v3', method="GET",
|
|
23
23
|
query_params={})
|
|
24
24
|
|
|
25
25
|
def set_symbol(self, symbol):
|
|
@@ -19,7 +19,7 @@ from webull.core.request import ApiRequest
|
|
|
19
19
|
|
|
20
20
|
class GetFundPerformanceRequest(ApiRequest):
|
|
21
21
|
def __init__(self):
|
|
22
|
-
ApiRequest.__init__(self, "/
|
|
22
|
+
ApiRequest.__init__(self, "/market-data/fundamentals/fund-performances/get", version='v3', method="GET",
|
|
23
23
|
query_params={})
|
|
24
24
|
|
|
25
25
|
def set_symbol(self, symbol):
|
|
@@ -19,7 +19,7 @@ from webull.core.request import ApiRequest
|
|
|
19
19
|
|
|
20
20
|
class GetFundRatingRequest(ApiRequest):
|
|
21
21
|
def __init__(self):
|
|
22
|
-
ApiRequest.__init__(self, "/
|
|
22
|
+
ApiRequest.__init__(self, "/market-data/fundamentals/fund-ratings/get", version='v3', method="GET",
|
|
23
23
|
query_params={})
|
|
24
24
|
|
|
25
25
|
def set_symbol(self, symbol):
|
|
@@ -19,7 +19,7 @@ from webull.core.request import ApiRequest
|
|
|
19
19
|
|
|
20
20
|
class GetFundSplitsRequest(ApiRequest):
|
|
21
21
|
def __init__(self):
|
|
22
|
-
ApiRequest.__init__(self, "/
|
|
22
|
+
ApiRequest.__init__(self, "/market-data/fundamentals/fund-splits/get", version='v3', method="GET",
|
|
23
23
|
query_params={})
|
|
24
24
|
|
|
25
25
|
def set_symbol(self, symbol):
|
|
@@ -19,7 +19,7 @@ from webull.core.request import ApiRequest
|
|
|
19
19
|
|
|
20
20
|
class GetFuturesDepthRequest(ApiRequest):
|
|
21
21
|
def __init__(self):
|
|
22
|
-
ApiRequest.__init__(self, "/
|
|
22
|
+
ApiRequest.__init__(self, "/market-data/futures/depths/list", version='v3', method="GET", query_params={})
|
|
23
23
|
|
|
24
24
|
def set_symbol(self, symbol):
|
|
25
25
|
self.add_query_param("symbol", symbol)
|
|
@@ -17,7 +17,7 @@ from webull.core.request import ApiRequest
|
|
|
17
17
|
|
|
18
18
|
class GetFuturesFootprintRequest(ApiRequest):
|
|
19
19
|
def __init__(self):
|
|
20
|
-
ApiRequest.__init__(self, "/
|
|
20
|
+
ApiRequest.__init__(self, "/market-data/futures/footprints/list", version='v3', method="GET", query_params={})
|
|
21
21
|
|
|
22
22
|
def set_symbols(self, symbols):
|
|
23
23
|
if isinstance(symbols, str):
|
|
@@ -17,7 +17,7 @@ from webull.core.request import ApiRequest
|
|
|
17
17
|
|
|
18
18
|
class GetFuturesHistoricalBarsRequest(ApiRequest):
|
|
19
19
|
def __init__(self):
|
|
20
|
-
ApiRequest.__init__(self, "/
|
|
20
|
+
ApiRequest.__init__(self, "/market-data/futures/bars/list", version='v3', method="GET", query_params={})
|
|
21
21
|
|
|
22
22
|
def set_symbols(self, symbol):
|
|
23
23
|
self.add_query_param("symbols", symbol)
|
|
@@ -18,7 +18,7 @@ from webull.core.request import ApiRequest
|
|
|
18
18
|
|
|
19
19
|
class GetFuturesInstrumentsByCodeRequest(ApiRequest):
|
|
20
20
|
def __init__(self):
|
|
21
|
-
ApiRequest.__init__(self, "/openapi/instrument/futures/by-code", version='
|
|
21
|
+
ApiRequest.__init__(self, "/openapi/instrument/futures/by-code", version='v3', method="GET", query_params={})
|
|
22
22
|
|
|
23
23
|
def set_codes(self, code):
|
|
24
24
|
self.add_query_param("code", code)
|
|
@@ -19,7 +19,8 @@ from webull.core.request import ApiRequest
|
|
|
19
19
|
|
|
20
20
|
class GetFuturesInstrumentsRequest(ApiRequest):
|
|
21
21
|
def __init__(self):
|
|
22
|
-
ApiRequest.__init__(self, "/
|
|
22
|
+
ApiRequest.__init__(self, "/trading/instruments/futures/contracts/list", version='v3', method="GET",
|
|
23
|
+
query_params={})
|
|
23
24
|
|
|
24
25
|
def set_symbols(self, symbols):
|
|
25
26
|
if isinstance(symbols, str):
|
|
@@ -18,7 +18,8 @@ from webull.core.request import ApiRequest
|
|
|
18
18
|
|
|
19
19
|
class GetFuturesProductClassRequest(ApiRequest):
|
|
20
20
|
def __init__(self):
|
|
21
|
-
ApiRequest.__init__(self, "/
|
|
21
|
+
ApiRequest.__init__(self, "/trading/instruments/futures/product-classes/list", version='v3', method="GET",
|
|
22
|
+
query_params={})
|
|
22
23
|
|
|
23
24
|
def set_category(self, category):
|
|
24
25
|
self.add_query_param("category", category)
|
|
@@ -19,7 +19,8 @@ from webull.core.request import ApiRequest
|
|
|
19
19
|
|
|
20
20
|
class GetFuturesProductsRequest(ApiRequest):
|
|
21
21
|
def __init__(self):
|
|
22
|
-
ApiRequest.__init__(self, "/
|
|
22
|
+
ApiRequest.__init__(self, "/trading/instruments/futures/product-codes/list", version='v3', method="GET",
|
|
23
|
+
query_params={})
|
|
23
24
|
|
|
24
25
|
def set_category(self, category):
|
|
25
26
|
self.add_query_param("category", category)
|
|
@@ -19,7 +19,7 @@ from webull.core.request import ApiRequest
|
|
|
19
19
|
|
|
20
20
|
class GetFuturesSnapshotRequest(ApiRequest):
|
|
21
21
|
def __init__(self):
|
|
22
|
-
ApiRequest.__init__(self, "/
|
|
22
|
+
ApiRequest.__init__(self, "/market-data/futures/snapshots/list", version='v3', method="GET", query_params={})
|
|
23
23
|
|
|
24
24
|
def set_symbols(self, symbols):
|
|
25
25
|
if isinstance(symbols, str):
|
|
@@ -19,7 +19,7 @@ from webull.core.request import ApiRequest
|
|
|
19
19
|
|
|
20
20
|
class GetFuturesTickRequest(ApiRequest):
|
|
21
21
|
def __init__(self):
|
|
22
|
-
ApiRequest.__init__(self, "/
|
|
22
|
+
ApiRequest.__init__(self, "/market-data/futures/ticks/list", version='v3', method="GET", query_params={})
|
|
23
23
|
|
|
24
24
|
def set_symbol(self, symbol):
|
|
25
25
|
self.add_query_param("symbol", symbol)
|