|
11 | 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 | 12 | # See the License for the specific language governing permissions and |
13 | 13 | # limitations under the License. |
| 14 | +from webull.data.common.category import Category |
14 | 15 | from webull.data.request.get_batch_historical_bars_request import BatchHistoricalBarsRequest |
15 | 16 | from webull.data.request.get_corp_action_request import GetCorpActionRequest |
16 | 17 | from webull.data.request.get_eod_bars_request import GetEodBarsRequest |
| 18 | +from webull.data.request.get_footprint_request import GetFootprintRequest |
17 | 19 | from webull.data.request.get_historical_bars_request import GetHistoricalBarsRequest |
18 | 20 | from webull.data.request.get_quotes_request import GetQuotesRequest |
19 | 21 | from webull.data.request.get_snapshot_request import GetSnapshotRequest |
@@ -183,3 +185,25 @@ def get_corp_action(self, instrument_ids, event_types, start_date=None, end_date |
183 | 185 | eod_corp_action_request.set_last_update_time(last_update_time) |
184 | 186 | response = self.client.get_response(eod_corp_action_request) |
185 | 187 | return response |
| 188 | + |
| 189 | + def get_footprint(self, symbols, category, timespan, count=None, |
| 190 | + real_time_required=None, trading_sessions=None): |
| 191 | + """ |
| 192 | + Search the footprint based on the list of security codes and security types. |
| 193 | +
|
| 194 | + :param symbols: Securities symbol, such as: 00700,00981. |
| 195 | + :param category: Security type, enumeration. |
| 196 | + :param timespan: Time granularity. |
| 197 | + :param count: Number of entries: 200 by default, maximum 1200. |
| 198 | + :param real_time_required: Whether to include the latest data or candlestick charts that are not yet finalized. The default is false, meaning they are not included. This option is only used for minute candlestick charts. |
| 199 | + :param trading_sessions: RTH: During trading hours, PRE: Before trading hours, ATH: After trading hours. Default: RTH. |
| 200 | + """ |
| 201 | + footprint_request = GetFootprintRequest() |
| 202 | + footprint_request.set_symbols(symbols) |
| 203 | + footprint_request.set_category(category) |
| 204 | + footprint_request.set_timespan(timespan) |
| 205 | + footprint_request.set_count(count) |
| 206 | + footprint_request.set_real_time_required(real_time_required) |
| 207 | + footprint_request.set_trading_sessions(trading_sessions) |
| 208 | + response = self.client.get_response(footprint_request) |
| 209 | + return response |
0 commit comments