|
| 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 | +from webull.core.request import ApiRequest |
| 17 | +from webull.core.utils import validation |
| 18 | + |
| 19 | + |
| 20 | +class TransferActivitiesRequest(ApiRequest): |
| 21 | + def __init__(self): |
| 22 | + ApiRequest.__init__(self, "/trading/activities/transfer-activities/list", version='v3', method="GET", |
| 23 | + query_params={}) |
| 24 | + |
| 25 | + def set_account_id(self, account_id): |
| 26 | + validation.assert_string_not_empty(account_id, "account_id") |
| 27 | + self.add_query_param("account_id", account_id) |
| 28 | + |
| 29 | + def set_transfer_method(self, transfer_method): |
| 30 | + if transfer_method is not None: |
| 31 | + self.add_query_param("transfer_method", transfer_method) |
| 32 | + |
| 33 | + def set_direction(self, direction): |
| 34 | + if direction is not None: |
| 35 | + self.add_query_param("direction", direction) |
| 36 | + |
| 37 | + def set_status(self, status): |
| 38 | + if status is not None: |
| 39 | + self.add_query_param("status", status) |
| 40 | + |
| 41 | + def set_acats_transfer_types(self, acats_transfer_types): |
| 42 | + if acats_transfer_types is not None: |
| 43 | + self.add_query_param("acats_transfer_types", acats_transfer_types) |
| 44 | + |
| 45 | + def set_start_time(self, start_time): |
| 46 | + if start_time is not None: |
| 47 | + self.add_query_param("start_time", start_time) |
| 48 | + |
| 49 | + def set_end_time(self, end_time): |
| 50 | + if end_time is not None: |
| 51 | + self.add_query_param("end_time", end_time) |
| 52 | + |
| 53 | + def set_pagination_key(self, pagination_key): |
| 54 | + if pagination_key: |
| 55 | + self.add_query_param("pagination_key", pagination_key) |
0 commit comments