webull-openapi-python-sdk 2.0.10__py3-none-any.whl → 2.0.12__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 (46) hide show
  1. samples/__init__.py +1 -1
  2. samples/data/data_client.py +120 -0
  3. samples/trade/trade_client_v3.py +4 -2
  4. webull/__init__.py +1 -1
  5. webull/core/__init__.py +1 -1
  6. webull/core/common/region.py +2 -0
  7. webull/core/data/endpoints.json +11 -1
  8. webull/core/http/initializer/client_initializer.py +2 -28
  9. webull/data/__init__.py +1 -1
  10. webull/data/data_client.py +2 -0
  11. webull/data/quotes/fundamentals.py +335 -0
  12. webull/data/quotes/screener.py +88 -0
  13. webull/data/request/get_capital_flow_request.py +35 -0
  14. webull/data/request/get_dividend_calendar_request.py +31 -0
  15. webull/data/request/get_earnings_calendar_request.py +31 -0
  16. webull/data/request/get_financials_alert_request.py +31 -0
  17. webull/data/request/get_financials_balance_sheet_request.py +39 -0
  18. webull/data/request/get_financials_cashflow_request.py +39 -0
  19. webull/data/request/get_financials_income_request.py +39 -0
  20. webull/data/request/get_financials_indicators_request.py +39 -0
  21. webull/data/request/get_forecast_eps_request.py +31 -0
  22. webull/data/request/get_fund_allocation_request.py +31 -0
  23. webull/data/request/get_fund_brief_request.py +31 -0
  24. webull/data/request/get_fund_dividends_request.py +39 -0
  25. webull/data/request/get_fund_files_request.py +31 -0
  26. webull/data/request/get_fund_holdings_request.py +31 -0
  27. webull/data/request/get_fund_net_value_request.py +39 -0
  28. webull/data/request/get_fund_performance_request.py +31 -0
  29. webull/data/request/get_fund_rating_request.py +31 -0
  30. webull/data/request/get_fund_splits_request.py +31 -0
  31. webull/data/request/get_industry_comparison_request.py +35 -0
  32. webull/data/request/get_sec_filings_request.py +31 -0
  33. webull/data/request/screener/get_52whl_request.py +47 -0
  34. webull/data/request/screener/get_high_dividend_request.py +43 -0
  35. webull/data/request/screener/get_market_sectors_detail_request.py +51 -0
  36. webull/data/request/screener/get_market_sectors_request.py +47 -0
  37. webull/data/request/screener/get_most_active_request.py +2 -2
  38. webull/trade/__init__.py +1 -1
  39. webull/trade/trade/v2/account_info_v2.py +3 -3
  40. webull/trade/trade/v3/order_opration_v3.py +7 -7
  41. {webull_openapi_python_sdk-2.0.10.dist-info → webull_openapi_python_sdk-2.0.12.dist-info}/METADATA +1 -1
  42. {webull_openapi_python_sdk-2.0.10.dist-info → webull_openapi_python_sdk-2.0.12.dist-info}/RECORD +46 -21
  43. {webull_openapi_python_sdk-2.0.10.dist-info → webull_openapi_python_sdk-2.0.12.dist-info}/WHEEL +0 -0
  44. {webull_openapi_python_sdk-2.0.10.dist-info → webull_openapi_python_sdk-2.0.12.dist-info}/licenses/LICENSE +0 -0
  45. {webull_openapi_python_sdk-2.0.10.dist-info → webull_openapi_python_sdk-2.0.12.dist-info}/licenses/NOTICE +0 -0
  46. {webull_openapi_python_sdk-2.0.10.dist-info → webull_openapi_python_sdk-2.0.12.dist-info}/top_level.txt +0 -0
samples/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '2.0.10'
1
+ __version__ = '2.0.12'
@@ -164,3 +164,123 @@ if __name__ == '__main__':
164
164
  res = data_client.option_market_data.get_option_snapshot("AAPL260522C00300000", Category.US_OPTION.name)
165
165
  if res.status_code == 200:
166
166
  print('get_option_snapshot:', res.json())
167
+
168
+ # Fundamentals - Capital Flow
169
+ res = data_client.fundamentals.get_capital_flow("AAPL", Category.US_STOCK.name)
170
+ if res.status_code == 200:
171
+ print('get_capital_flow:', res.json())
172
+
173
+ # Fundamentals - Industry Comparison
174
+ res = data_client.fundamentals.get_industry_comparison("AAPL", Category.US_STOCK.name)
175
+ if res.status_code == 200:
176
+ print('get_industry_comparison:', res.json())
177
+
178
+ # Fundamentals - SEC Filings
179
+ res = data_client.fundamentals.get_sec_filings("AAPL", Category.US_STOCK.name)
180
+ if res.status_code == 200:
181
+ print('get_sec_filings:', res.json())
182
+
183
+ # Fundamentals - Earnings Calendar
184
+ res = data_client.fundamentals.get_earnings_calendar("AAPL", Category.US_STOCK.name)
185
+ if res.status_code == 200:
186
+ print('get_earnings_calendar:', res.json())
187
+
188
+ # Fundamentals - Dividend Calendar
189
+ res = data_client.fundamentals.get_dividend_calendar("TSLA", Category.US_STOCK.name)
190
+ if res.status_code == 200:
191
+ print('get_dividend_calendar:', res.json())
192
+
193
+ # Fundamentals - Fund Splits
194
+ res = data_client.fundamentals.get_fund_splits("QQQ", Category.US_STOCK.name)
195
+ if res.status_code == 200:
196
+ print('get_fund_splits:', res.json())
197
+
198
+ # Fundamentals - Fund Rating
199
+ res = data_client.fundamentals.get_fund_rating("QQQ", Category.US_STOCK.name)
200
+ if res.status_code == 200:
201
+ print('get_fund_rating:', res.json())
202
+
203
+ # Fundamentals - Fund Performance
204
+ res = data_client.fundamentals.get_fund_performance("QQQ", Category.US_STOCK.name)
205
+ if res.status_code == 200:
206
+ print('get_fund_performance:', res.json())
207
+
208
+ # Fundamentals - Fund Net Value
209
+ res = data_client.fundamentals.get_fund_net_value("QQQ", Category.US_STOCK.name)
210
+ if res.status_code == 200:
211
+ print('get_fund_net_value:', res.json())
212
+
213
+ # Fundamentals - Fund Holdings
214
+ res = data_client.fundamentals.get_fund_holdings("QQQ", Category.US_STOCK.name)
215
+ if res.status_code == 200:
216
+ print('get_fund_holdings:', res.json())
217
+
218
+ # Fundamentals - Fund Files
219
+ res = data_client.fundamentals.get_fund_files("QQQ", Category.US_STOCK.name)
220
+ if res.status_code == 200:
221
+ print('get_fund_files:', res.json())
222
+
223
+ # Fundamentals - Fund Dividends
224
+ res = data_client.fundamentals.get_fund_dividends("QQQ", Category.US_STOCK.name)
225
+ if res.status_code == 200:
226
+ print('get_fund_dividends:', res.json())
227
+
228
+ # Fundamentals - Fund Brief
229
+ res = data_client.fundamentals.get_fund_brief("QQQ", Category.US_STOCK.name)
230
+ if res.status_code == 200:
231
+ print('get_fund_brief:', res.json())
232
+
233
+ # Fundamentals - Fund Allocation
234
+ res = data_client.fundamentals.get_fund_allocation("QQQ", Category.US_STOCK.name)
235
+ if res.status_code == 200:
236
+ print('get_fund_allocation:', res.json())
237
+
238
+ # Fundamentals - Financials Indicators
239
+ res = data_client.fundamentals.get_financials_indicators("TSLA", Category.US_STOCK.name)
240
+ if res.status_code == 200:
241
+ print('get_financials_indicators:', res.json())
242
+
243
+ # Fundamentals - Financials Income
244
+ res = data_client.fundamentals.get_financials_income("TSLA", Category.US_STOCK.name)
245
+ if res.status_code == 200:
246
+ print('get_financials_income:', res.json())
247
+
248
+ # Fundamentals - Financials Cashflow
249
+ res = data_client.fundamentals.get_financials_cashflow("TSLA", Category.US_STOCK.name)
250
+ if res.status_code == 200:
251
+ print('get_financials_cashflow:', res.json())
252
+
253
+ # Fundamentals - Financials Balance Sheet
254
+ res = data_client.fundamentals.get_financials_balance_sheet("TSLA", Category.US_STOCK.name)
255
+ if res.status_code == 200:
256
+ print('get_financials_balance_sheet:', res.json())
257
+
258
+ # Fundamentals - Financials Alert
259
+ res = data_client.fundamentals.get_financials_alert("AAPL", Category.US_STOCK.name)
260
+ if res.status_code == 200:
261
+ print('get_financials_alert:', res.json())
262
+
263
+ # Fundamentals - Forecast EPS
264
+ res = data_client.fundamentals.get_forecast_eps("AAPL", Category.US_STOCK.name)
265
+ if res.status_code == 200:
266
+ print('get_forecast_eps:', res.json())
267
+
268
+ # Screener - Market Sectors
269
+ res = data_client.screener.get_market_sectors(Category.US_STOCK.name)
270
+ if res.status_code == 200:
271
+ print('get_market_sectors:', res.json())
272
+
273
+ # Screener - Market Sectors Detail
274
+ res = data_client.screener.get_market_sectors_detail("6391", Category.US_STOCK.name)
275
+ if res.status_code == 200:
276
+ print('get_market_sectors_detail:', res.json())
277
+
278
+ # Screener - High Dividend Rank
279
+ res = data_client.screener.get_high_dividend(Category.US_STOCK.name)
280
+ if res.status_code == 200:
281
+ print('get_high_dividend:', res.json())
282
+
283
+ # Screener - 52 Week High/Low
284
+ res = data_client.screener.get_52whl(Category.US_STOCK.name, rank_type="NEW_HIGH")
285
+ if res.status_code == 200:
286
+ print('get_52whl:', res.json())
@@ -815,7 +815,8 @@ if __name__ == '__main__':
815
815
  "order_type": "TRAILING_STOP_LOSS_LIMIT",
816
816
  "quantity": "200",
817
817
  "trailing_stop_step": "0.1",
818
- "trailing_limit_price": "580",
818
+ # also supports the legacy field name "trailing_limit_price"
819
+ "trailing_limit_price_offset": "580",
819
820
  "trailing_type": "PERCENTAGE",
820
821
  "support_trading_session": "CORE",
821
822
  "side": "BUY",
@@ -836,7 +837,8 @@ if __name__ == '__main__':
836
837
  "stop_price": "560.77",
837
838
  "quantity": "200",
838
839
  "trailing_stop_step": "0.15",
839
- "trailing_limit_price": "581",
840
+ # also supports the legacy field name "trailing_limit_price"
841
+ "trailing_limit_price_offset": "581",
840
842
  "trailing_type": "PERCENTAGE",
841
843
  "trigger_price_type": "PRICE"
842
844
  }
webull/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '2.0.10'
1
+ __version__ = '2.0.12'
webull/core/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
- __version__ = '2.0.10'
1
+ __version__ = '2.0.12'
2
2
 
3
3
  import logging
4
4
 
@@ -12,3 +12,5 @@ class Region(Enum):
12
12
  UK = 'uk'
13
13
  BR = 'br'
14
14
  MX = 'mx'
15
+ ZA = 'za'
16
+ EU = 'eu'
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "default_region": "us",
3
- "regions": ["us", "hk", "jp", "sg", "th", "au", "my", "uk", "br", "mx"],
3
+ "regions": ["us", "hk", "jp", "sg", "th", "au", "my", "uk", "br", "mx", "za", "eu"],
4
4
  "region_mapping": {
5
5
  "us": {
6
6
  "api": "api.webull.com",
@@ -51,6 +51,16 @@
51
51
  "api": "api.webull.com",
52
52
  "quotes-api": "data-api.webull.com",
53
53
  "events-api": "events-api.webull.com"
54
+ },
55
+ "za": {
56
+ "api": "api.webull.com.au",
57
+ "quotes-api": "data-api.webull.com.au",
58
+ "events-api": "events-api.webull.com.au"
59
+ },
60
+ "eu": {
61
+ "api": "api.webull.eu",
62
+ "quotes-api": "data-api.webull.eu",
63
+ "events-api": "events-api.webull.eu"
54
64
  }
55
65
  }
56
66
  }
@@ -54,38 +54,12 @@ class ClientInitializer:
54
54
  @staticmethod
55
55
  def init_token(api_client):
56
56
  """Initialize token"""
57
- disable_config_region_ids = ["hk"]
58
- if api_client.get_region_id() in disable_config_region_ids:
59
- if not ClientInitializer._check_region_token_enable(api_client):
60
- return
61
- else:
62
- if not ClientInitializer._check_token_enable(api_client):
63
- return
57
+ if not ClientInitializer._check_token_enable(api_client):
58
+ return
64
59
 
65
60
  token_manager = TokenManager(api_client.get_token_dir())
66
61
  token_manager.init_token(api_client)
67
62
 
68
- @staticmethod
69
- def _check_region_token_enable(api_client):
70
- """
71
- Check whether token checking is enabled in the specified region
72
- """
73
- if api_client is None:
74
- logger.warning("_check_region_token_enable api_client is null, return False")
75
- return False
76
-
77
- if not api_client.get_region_id():
78
- logger.warning("_check_region_token_enable region_id is null, return False")
79
- return False
80
-
81
- enable_region_ids = ["hk"]
82
- result = api_client.get_region_id() in enable_region_ids
83
- logger.info(
84
- "_check_region_token_enable result is %s, enable regionIds is %s.",
85
- result, enable_region_ids
86
- )
87
- return result
88
-
89
63
  @staticmethod
90
64
  def _check_token_enable(api_client):
91
65
  """
webull/data/__init__.py CHANGED
@@ -1,3 +1,3 @@
1
1
  # coding=utf-8
2
2
 
3
- __version__ = '2.0.10'
3
+ __version__ = '2.0.12'
@@ -24,6 +24,7 @@ from webull.data.quotes.futures_market_data import FuturesMarketData
24
24
  from webull.data.quotes.instrument import Instrument
25
25
  from webull.data.quotes.market_data import MarketData
26
26
  from webull.data.quotes.option_market_data import OptionMarketData
27
+ from webull.data.quotes.fundamentals import Fundamentals
27
28
  from webull.data.quotes.screener import Screener
28
29
  from webull.data.quotes.watchlist import Watchlist
29
30
 
@@ -38,6 +39,7 @@ class DataClient:
38
39
  self.futures_market_data = FuturesMarketData(api_client)
39
40
  self.option_market_data = OptionMarketData(api_client)
40
41
  self.event_market_data = EventMarketData(api_client)
42
+ self.fundamentals = Fundamentals(api_client)
41
43
  self.screener = Screener(api_client)
42
44
  self.watchlist = Watchlist(api_client)
43
45
 
@@ -0,0 +1,335 @@
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.data.common.category import Category
18
+ from webull.data.request.get_capital_flow_request import GetCapitalFlowRequest
19
+ from webull.data.request.get_industry_comparison_request import GetIndustryComparisonRequest
20
+ from webull.data.request.get_sec_filings_request import GetSecFilingsRequest
21
+ from webull.data.request.get_earnings_calendar_request import GetEarningsCalendarRequest
22
+ from webull.data.request.get_dividend_calendar_request import GetDividendCalendarRequest
23
+ from webull.data.request.get_fund_splits_request import GetFundSplitsRequest
24
+ from webull.data.request.get_fund_rating_request import GetFundRatingRequest
25
+ from webull.data.request.get_fund_performance_request import GetFundPerformanceRequest
26
+ from webull.data.request.get_fund_net_value_request import GetFundNetValueRequest
27
+ from webull.data.request.get_fund_holdings_request import GetFundHoldingsRequest
28
+ from webull.data.request.get_fund_files_request import GetFundFilesRequest
29
+ from webull.data.request.get_fund_dividends_request import GetFundDividendsRequest
30
+ from webull.data.request.get_fund_brief_request import GetFundBriefRequest
31
+ from webull.data.request.get_fund_allocation_request import GetFundAllocationRequest
32
+ from webull.data.request.get_financials_indicators_request import GetFinancialsIndicatorsRequest
33
+ from webull.data.request.get_financials_income_request import GetFinancialsIncomeRequest
34
+ from webull.data.request.get_financials_cashflow_request import GetFinancialsCashflowRequest
35
+ from webull.data.request.get_financials_balance_sheet_request import GetFinancialsBalanceSheetRequest
36
+ from webull.data.request.get_financials_alert_request import GetFinancialsAlertRequest
37
+ from webull.data.request.get_forecast_eps_request import GetForecastEpsRequest
38
+
39
+
40
+ class Fundamentals:
41
+ def __init__(self, api_client):
42
+ self.client = api_client
43
+
44
+ def get_capital_flow(self, symbol, category=Category.US_STOCK.name, count=None):
45
+ """
46
+ Query the capital flow distribution for a stock.
47
+
48
+ :param symbol: Security symbol, e.g. AAPL, TSLA.
49
+ :param category: Security type. Supported: US_STOCK, HK_STOCK, CN_STOCK, JP_STOCK.
50
+ :param count: Number of distribution records (default 5), range 1-5.
51
+ """
52
+ request = GetCapitalFlowRequest()
53
+ request.set_symbol(symbol)
54
+ request.set_category(category)
55
+ request.set_count(count)
56
+ response = self.client.get_response(request)
57
+ return response
58
+
59
+ def get_industry_comparison(self, symbol, category=Category.US_STOCK.name, sort_by=None):
60
+ """
61
+ Query industry comparison data for a stock. Shows up to 20 stocks in the same industry, including the target stock.
62
+
63
+ :param symbol: Security symbol, e.g. AAPL, TSLA.
64
+ :param category: Security type. Supported: US_STOCK, HK_STOCK, CN_STOCK.
65
+ :param sort_by: Sort by a certain type. Default: EPS_TTM. Options: EPS_TTM, NAPS, DPS_TTM, ROE, DEBT_TO_ASSETS, NET_MARGIN, DIV_YIELD_TTM, PE_TTM, PB_RATIO.
66
+ """
67
+ request = GetIndustryComparisonRequest()
68
+ request.set_symbol(symbol)
69
+ request.set_category(category)
70
+ request.set_sort_by(sort_by)
71
+ response = self.client.get_response(request)
72
+ return response
73
+
74
+ def get_sec_filings(self, symbol, category=Category.US_STOCK.name):
75
+ """
76
+ Query SEC filings for a stock. Only supports US stocks. Returns data within the last 3 years.
77
+
78
+ :param symbol: Security symbol, e.g. AAPL, TSLA.
79
+ :param category: Security type. Only supports US_STOCK.
80
+ """
81
+ request = GetSecFilingsRequest()
82
+ request.set_symbol(symbol)
83
+ request.set_category(category)
84
+ response = self.client.get_response(request)
85
+ return response
86
+
87
+ def get_earnings_calendar(self, symbol, category=Category.US_STOCK.name):
88
+ """
89
+ Query earnings calendar for a stock. Returns earnings reports within half a year before and after the current date.
90
+ Sorted by date in ascending order (oldest to newest).
91
+ Use eps_actual to distinguish published reports (has eps_actual value) from upcoming ones (no eps_actual value).
92
+
93
+ :param symbol: Security symbol, e.g. AAPL, TSLA.
94
+ :param category: Security type. Supported: US_STOCK, HK_STOCK, CN_STOCK, JP_STOCK.
95
+ """
96
+ request = GetEarningsCalendarRequest()
97
+ request.set_symbol(symbol)
98
+ request.set_category(category)
99
+ response = self.client.get_response(request)
100
+ return response
101
+
102
+ def get_dividend_calendar(self, symbol, category=Category.US_STOCK.name):
103
+ """
104
+ Query dividend calendar for a stock. Returns dividends within half a year before and after the current date.
105
+ Sorted by date in ascending order (oldest to newest).
106
+
107
+ :param symbol: Security symbol, e.g. AAPL, TSLA.
108
+ :param category: Security type. Supported: US_STOCK, HK_STOCK, CN_STOCK, JP_STOCK.
109
+ """
110
+ request = GetDividendCalendarRequest()
111
+ request.set_symbol(symbol)
112
+ request.set_category(category)
113
+ response = self.client.get_response(request)
114
+ return response
115
+
116
+ def get_fund_splits(self, symbol, category=Category.US_STOCK.name):
117
+ """
118
+ Query fund splits for a stock.
119
+
120
+ :param symbol: Security symbol, e.g. QQQ.
121
+ :param category: Security type. Category values are as shown in the enum.
122
+ """
123
+ request = GetFundSplitsRequest()
124
+ request.set_symbol(symbol)
125
+ request.set_category(category)
126
+ response = self.client.get_response(request)
127
+ return response
128
+
129
+ def get_fund_rating(self, symbol, category=Category.US_STOCK.name):
130
+ """
131
+ Query fund rating for a security.
132
+
133
+ :param symbol: Security symbol, e.g. QQQ.
134
+ :param category: Security type. Category values are as shown in the enum.
135
+ """
136
+ request = GetFundRatingRequest()
137
+ request.set_symbol(symbol)
138
+ request.set_category(category)
139
+ response = self.client.get_response(request)
140
+ return response
141
+
142
+ def get_fund_performance(self, symbol, category=Category.US_STOCK.name):
143
+ """
144
+ Query fund performance for a security.
145
+
146
+ :param symbol: Security symbol, e.g. QQQ.
147
+ :param category: Security type. Category values are as shown in the enum.
148
+ """
149
+ request = GetFundPerformanceRequest()
150
+ request.set_symbol(symbol)
151
+ request.set_category(category)
152
+ response = self.client.get_response(request)
153
+ return response
154
+
155
+ def get_fund_net_value(self, symbol, category=Category.US_STOCK.name, last_date=None, count=None):
156
+ """
157
+ Query fund net value for a security.
158
+
159
+ :param symbol: Security symbol, e.g. QQQ.
160
+ :param category: Security type. Category values are as shown in the enum.
161
+ :param last_date: Last query date, e.g. 2026-04-01.
162
+ :param count: The number of each query, default 5, maximum 20.
163
+ """
164
+ request = GetFundNetValueRequest()
165
+ request.set_symbol(symbol)
166
+ request.set_category(category)
167
+ request.set_last_date(last_date)
168
+ request.set_count(count)
169
+ response = self.client.get_response(request)
170
+ return response
171
+
172
+ def get_fund_holdings(self, symbol, category=Category.US_STOCK.name):
173
+ """
174
+ Query fund top 10 holdings.
175
+
176
+ :param symbol: Security symbol, e.g. QQQ.
177
+ :param category: Security type. Category values are as shown in the enum.
178
+ """
179
+ request = GetFundHoldingsRequest()
180
+ request.set_symbol(symbol)
181
+ request.set_category(category)
182
+ response = self.client.get_response(request)
183
+ return response
184
+
185
+ def get_fund_files(self, symbol, category=Category.US_STOCK.name):
186
+ """
187
+ Query fund files for a security.
188
+
189
+ :param symbol: Security symbol, e.g. QQQ.
190
+ :param category: Security type. Category values are as shown in the enum.
191
+ """
192
+ request = GetFundFilesRequest()
193
+ request.set_symbol(symbol)
194
+ request.set_category(category)
195
+ response = self.client.get_response(request)
196
+ return response
197
+
198
+ def get_fund_dividends(self, symbol, category=Category.US_STOCK.name, page_index=None, page_size=None):
199
+ """
200
+ Query fund dividends for a security.
201
+
202
+ :param symbol: Security symbol, e.g. QQQ.
203
+ :param category: Security type. Category values are as shown in the enum.
204
+ :param page_index: Page index, default 1. If not passed, the first page will be searched by default.
205
+ :param page_size: Number of entries per page, default 10, maximum 20.
206
+ """
207
+ request = GetFundDividendsRequest()
208
+ request.set_symbol(symbol)
209
+ request.set_category(category)
210
+ request.set_page_index(page_index)
211
+ request.set_page_size(page_size)
212
+ response = self.client.get_response(request)
213
+ return response
214
+
215
+ def get_fund_brief(self, symbol, category=Category.US_STOCK.name):
216
+ """
217
+ Query fund brief information.
218
+
219
+ :param symbol: Security symbol, e.g. QQQ.
220
+ :param category: Security type. Category values are as shown in the enum.
221
+ """
222
+ request = GetFundBriefRequest()
223
+ request.set_symbol(symbol)
224
+ request.set_category(category)
225
+ response = self.client.get_response(request)
226
+ return response
227
+
228
+ def get_fund_allocation(self, symbol, category=Category.US_STOCK.name):
229
+ """
230
+ Query fund asset allocation.
231
+
232
+ :param symbol: Security symbol, e.g. QQQ.
233
+ :param category: Security type. Category values are as shown in the enum.
234
+ """
235
+ request = GetFundAllocationRequest()
236
+ request.set_symbol(symbol)
237
+ request.set_category(category)
238
+ response = self.client.get_response(request)
239
+ return response
240
+
241
+ def get_financials_indicators(self, symbol, category=Category.US_STOCK.name, type=None, count=None):
242
+ """
243
+ Query financials indicators for a stock.
244
+
245
+ :param symbol: Security symbol, e.g. TSLA.
246
+ :param category: Security type. Category values are as shown in the enum.
247
+ :param type: Financial type, default QUARTERLY. Options: ANNUAL, QUARTERLY.
248
+ :param count: The number of each query, default 5, maximum 20.
249
+ """
250
+ request = GetFinancialsIndicatorsRequest()
251
+ request.set_symbol(symbol)
252
+ request.set_category(category)
253
+ request.set_type(type)
254
+ request.set_count(count)
255
+ response = self.client.get_response(request)
256
+ return response
257
+
258
+ def get_financials_income(self, symbol, category=Category.US_STOCK.name, type=None, count=None):
259
+ """
260
+ Query financials income statement for a stock.
261
+
262
+ :param symbol: Security symbol, e.g. TSLA.
263
+ :param category: Security type. Category values are as shown in the enum.
264
+ :param type: Financial type, default QUARTERLY. Options: ANNUAL, QUARTERLY.
265
+ :param count: The number of each query, default 5, maximum 20.
266
+ """
267
+ request = GetFinancialsIncomeRequest()
268
+ request.set_symbol(symbol)
269
+ request.set_category(category)
270
+ request.set_type(type)
271
+ request.set_count(count)
272
+ response = self.client.get_response(request)
273
+ return response
274
+
275
+ def get_financials_cashflow(self, symbol, category=Category.US_STOCK.name, type=None, count=None):
276
+ """
277
+ Query financials cashflow statement for a stock.
278
+
279
+ :param symbol: Security symbol, e.g. TSLA.
280
+ :param category: Security type. Category values are as shown in the enum.
281
+ :param type: Financial type, default QUARTERLY. Options: ANNUAL, QUARTERLY.
282
+ :param count: The number of each query, default 5, maximum 20.
283
+ """
284
+ request = GetFinancialsCashflowRequest()
285
+ request.set_symbol(symbol)
286
+ request.set_category(category)
287
+ request.set_type(type)
288
+ request.set_count(count)
289
+ response = self.client.get_response(request)
290
+ return response
291
+
292
+ def get_financials_balance_sheet(self, symbol, category=Category.US_STOCK.name, type=None, count=None):
293
+ """
294
+ Query financials balance sheet for a stock.
295
+
296
+ :param symbol: Security symbol, e.g. TSLA.
297
+ :param category: Security type. Category values are as shown in the enum.
298
+ :param type: Financial type, default QUARTERLY. Options: ANNUAL, QUARTERLY.
299
+ :param count: The number of each query, default 5, maximum 20.
300
+ """
301
+ request = GetFinancialsBalanceSheetRequest()
302
+ request.set_symbol(symbol)
303
+ request.set_category(category)
304
+ request.set_type(type)
305
+ request.set_count(count)
306
+ response = self.client.get_response(request)
307
+ return response
308
+
309
+ def get_financials_alert(self, symbol, category=Category.US_STOCK.name):
310
+ """
311
+ Query financials alert for a stock.
312
+
313
+ :param symbol: Security symbol, e.g. TSLA.
314
+ :param category: Security type. Category values are as shown in the enum.
315
+ """
316
+ request = GetFinancialsAlertRequest()
317
+ request.set_symbol(symbol)
318
+ request.set_category(category)
319
+ response = self.client.get_response(request)
320
+ return response
321
+
322
+ def get_forecast_eps(self, symbol, category=Category.US_STOCK.name):
323
+ """
324
+ Query forecast EPS for a stock. Returns the historical actual EPS of the most recent four disclosed
325
+ fiscal periods, plus the latest analyst consensus forecast EPS (if available).
326
+ Sorted by time in ascending order, returns up to 5 records.
327
+
328
+ :param symbol: Security symbol, e.g. AAPL. Only supports a single symbol.
329
+ :param category: Security type. Supported: US_STOCK, HK_STOCK, CN_STOCK.
330
+ """
331
+ request = GetForecastEpsRequest()
332
+ request.set_symbol(symbol)
333
+ request.set_category(category)
334
+ response = self.client.get_response(request)
335
+ return response