You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit dc127e1
Browse filesBrowse the repository at this point in the historyBrowse files
方佳
committed
Merge branch 'main_old_260129_merge' into 'main'
feat: Add event contracts and US OpenAPI algorithm orders
See merge request webull/webull-openapi-python-sdk!15
# 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
+
fromwebull.data.common.categoryimportCategory
18
+
fromwebull.core.clientimportApiClient
19
+
fromwebull.data.data_clientimportDataClient
20
+
21
+
optional_api_endpoint="<api_endpoint>"
22
+
your_app_key="<your_app_key>"
23
+
your_app_secret="<your_app_secret>"
24
+
region_id="<region_id>"
25
+
# The token_dir parameter can be used to specify the directory for storing the 2FA token. Both absolute and relative paths are supported and this option has the highest priority.
26
+
# Alternatively, the storage directory can be configured via an environment variable with the key WEBULL_OPENAPI_TOKEN_DIR, which also supports both absolute and relative paths.
27
+
# If neither is specified, the default configuration will be used, and the token will be stored at conf/token.txt under the current working directory.
# The token_dir parameter can be used to specify the directory for storing the 2FA token. Both absolute and relative paths are supported and this option has the highest priority.
31
+
# Alternatively, the storage directory can be configured via an environment variable with the key WEBULL_OPENAPI_TOKEN_DIR, which also supports both absolute and relative paths.
32
+
# If neither is specified, the default configuration will be used, and the token will be stored at conf/token.txt under the current working directory.
# 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
+
importjson
16
+
importuuid
17
+
fromtimeimportsleep
18
+
19
+
fromwebull.core.clientimportApiClient
20
+
fromwebull.trade.trade_clientimportTradeClient
21
+
22
+
optional_api_endpoint="<api_endpoint>"
23
+
your_app_key="<your_app_key>"
24
+
your_app_secret="<your_app_secret>"
25
+
region_id="<region_id>"
26
+
account_id="<your_account_id>"
27
+
# The token_dir parameter can be used to specify the directory for storing the 2FA token. Both absolute and relative paths are supported and this option has the highest priority.
28
+
# Alternatively, the storage directory can be configured via an environment variable with the key WEBULL_OPENAPI_TOKEN_DIR, which also supports both absolute and relative paths.
29
+
# If neither is specified, the default configuration will be used, and the token will be stored at conf/token.txt under the current working directory.
0 commit comments