crypticorn 2.11.6__py3-none-any.whl → 2.11.7__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.
- crypticorn/common/errors.py +3 -3
- crypticorn/trade/client/__init__.py +27 -9
- crypticorn/trade/client/api/__init__.py +1 -0
- crypticorn/trade/client/api/admin_api.py +1455 -0
- crypticorn/trade/client/api/api_keys_api.py +60 -58
- crypticorn/trade/client/api/bots_api.py +289 -48
- crypticorn/trade/client/api/exchanges_api.py +474 -17
- crypticorn/trade/client/api/futures_trading_panel_api.py +1 -1
- crypticorn/trade/client/api/notifications_api.py +80 -96
- crypticorn/trade/client/api/orders_api.py +7 -7
- crypticorn/trade/client/api/status_api.py +5 -232
- crypticorn/trade/client/api/strategies_api.py +49 -48
- crypticorn/trade/client/api/trading_actions_api.py +42 -38
- crypticorn/trade/client/api_client.py +1 -1
- crypticorn/trade/client/configuration.py +1 -1
- crypticorn/trade/client/exceptions.py +1 -1
- crypticorn/trade/client/models/__init__.py +26 -9
- crypticorn/trade/client/models/api_error_identifier.py +116 -0
- crypticorn/trade/client/models/api_error_level.py +37 -0
- crypticorn/trade/client/models/api_error_type.py +37 -0
- crypticorn/trade/client/models/{bot_model.py → bot.py} +59 -60
- crypticorn/trade/client/models/bot_create.py +104 -0
- crypticorn/trade/client/models/bot_status.py +1 -1
- crypticorn/trade/client/models/bot_update.py +107 -0
- crypticorn/trade/client/models/exception_detail.py +8 -5
- crypticorn/trade/client/models/exchange.py +36 -0
- crypticorn/trade/client/models/exchange_key.py +111 -0
- crypticorn/trade/client/models/exchange_key_create.py +107 -0
- crypticorn/trade/client/models/{exchange_key_model.py → exchange_key_update.py} +12 -47
- crypticorn/trade/client/models/execution_ids.py +1 -1
- crypticorn/trade/client/models/futures_balance.py +1 -1
- crypticorn/trade/client/models/futures_trading_action.py +24 -16
- crypticorn/trade/client/models/{spot_trading_action.py → futures_trading_action_create.py} +24 -28
- crypticorn/trade/client/models/log_level.py +38 -0
- crypticorn/trade/client/models/margin_mode.py +1 -1
- crypticorn/trade/client/models/market_type.py +35 -0
- crypticorn/trade/client/models/{notification_model.py → notification.py} +35 -40
- crypticorn/trade/client/models/notification_create.py +114 -0
- crypticorn/trade/client/models/notification_update.py +96 -0
- crypticorn/trade/client/models/{order_model.py → order.py} +36 -31
- crypticorn/trade/client/models/order_status.py +1 -1
- crypticorn/trade/client/models/post_futures_action.py +1 -1
- crypticorn/trade/client/models/{action_model.py → spot_trading_action_create.py} +7 -65
- crypticorn/trade/client/models/{strategy_model_input.py → strategy.py} +25 -33
- crypticorn/trade/client/models/{strategy_model_output.py → strategy_create.py} +16 -39
- crypticorn/trade/client/models/strategy_exchange_info.py +4 -3
- crypticorn/trade/client/models/strategy_update.py +147 -0
- crypticorn/trade/client/models/tpsl.py +1 -1
- crypticorn/trade/client/models/trading_action_type.py +1 -1
- crypticorn/trade/client/rest.py +1 -1
- {crypticorn-2.11.6.dist-info → crypticorn-2.11.7.dist-info}/METADATA +1 -1
- {crypticorn-2.11.6.dist-info → crypticorn-2.11.7.dist-info}/RECORD +56 -42
- {crypticorn-2.11.6.dist-info → crypticorn-2.11.7.dist-info}/WHEEL +0 -0
- {crypticorn-2.11.6.dist-info → crypticorn-2.11.7.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.11.6.dist-info → crypticorn-2.11.7.dist-info}/licenses/LICENSE +0 -0
- {crypticorn-2.11.6.dist-info → crypticorn-2.11.7.dist-info}/top_level.txt +0 -0
@@ -3,7 +3,7 @@
|
|
3
3
|
"""
|
4
4
|
Trading API
|
5
5
|
|
6
|
-
API for automated trading and exchange interface
|
6
|
+
API for automated trading and exchange interface. This API is used to trade on the exchange and manage bots, API keys, orders, and more.
|
7
7
|
|
8
8
|
The version of the OpenAPI document: 1.0.0
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
@@ -17,7 +17,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
17
|
from typing_extensions import Annotated
|
18
18
|
|
19
19
|
from pydantic import StrictStr, field_validator
|
20
|
-
from typing import
|
20
|
+
from typing import Optional
|
21
21
|
|
22
22
|
from crypticorn.trade.client.api_client import ApiClient, RequestSerialized
|
23
23
|
from crypticorn.trade.client.api_response import ApiResponse
|
@@ -36,233 +36,6 @@ class StatusApi:
|
|
36
36
|
api_client = ApiClient.get_default()
|
37
37
|
self.api_client = api_client
|
38
38
|
|
39
|
-
@validate_call
|
40
|
-
async def get_config(
|
41
|
-
self,
|
42
|
-
_request_timeout: Union[
|
43
|
-
None,
|
44
|
-
Annotated[StrictFloat, Field(gt=0)],
|
45
|
-
Tuple[
|
46
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
47
|
-
],
|
48
|
-
] = None,
|
49
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
50
|
-
_content_type: Optional[StrictStr] = None,
|
51
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
52
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
53
|
-
) -> Dict[str, object]:
|
54
|
-
"""Config
|
55
|
-
|
56
|
-
Returns the version of the crypticorn library and the environment.
|
57
|
-
|
58
|
-
:param _request_timeout: timeout setting for this request. If one
|
59
|
-
number provided, it will be total request
|
60
|
-
timeout. It can also be a pair (tuple) of
|
61
|
-
(connection, read) timeouts.
|
62
|
-
:type _request_timeout: int, tuple(int, int), optional
|
63
|
-
:param _request_auth: set to override the auth_settings for an a single
|
64
|
-
request; this effectively ignores the
|
65
|
-
authentication in the spec for a single request.
|
66
|
-
:type _request_auth: dict, optional
|
67
|
-
:param _content_type: force content-type for the request.
|
68
|
-
:type _content_type: str, Optional
|
69
|
-
:param _headers: set to override the headers for a single
|
70
|
-
request; this effectively ignores the headers
|
71
|
-
in the spec for a single request.
|
72
|
-
:type _headers: dict, optional
|
73
|
-
:param _host_index: set to override the host_index for a single
|
74
|
-
request; this effectively ignores the host_index
|
75
|
-
in the spec for a single request.
|
76
|
-
:type _host_index: int, optional
|
77
|
-
:return: Returns the result object.
|
78
|
-
""" # noqa: E501
|
79
|
-
|
80
|
-
_param = self._get_config_serialize(
|
81
|
-
_request_auth=_request_auth,
|
82
|
-
_content_type=_content_type,
|
83
|
-
_headers=_headers,
|
84
|
-
_host_index=_host_index,
|
85
|
-
)
|
86
|
-
|
87
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
88
|
-
"200": "Dict[str, object]",
|
89
|
-
}
|
90
|
-
response_data = await self.api_client.call_api(
|
91
|
-
*_param, _request_timeout=_request_timeout
|
92
|
-
)
|
93
|
-
await response_data.read()
|
94
|
-
return self.api_client.response_deserialize(
|
95
|
-
response_data=response_data,
|
96
|
-
response_types_map=_response_types_map,
|
97
|
-
).data
|
98
|
-
|
99
|
-
@validate_call
|
100
|
-
async def get_config_with_http_info(
|
101
|
-
self,
|
102
|
-
_request_timeout: Union[
|
103
|
-
None,
|
104
|
-
Annotated[StrictFloat, Field(gt=0)],
|
105
|
-
Tuple[
|
106
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
107
|
-
],
|
108
|
-
] = None,
|
109
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
110
|
-
_content_type: Optional[StrictStr] = None,
|
111
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
112
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
113
|
-
) -> ApiResponse[Dict[str, object]]:
|
114
|
-
"""Config
|
115
|
-
|
116
|
-
Returns the version of the crypticorn library and the environment.
|
117
|
-
|
118
|
-
:param _request_timeout: timeout setting for this request. If one
|
119
|
-
number provided, it will be total request
|
120
|
-
timeout. It can also be a pair (tuple) of
|
121
|
-
(connection, read) timeouts.
|
122
|
-
:type _request_timeout: int, tuple(int, int), optional
|
123
|
-
:param _request_auth: set to override the auth_settings for an a single
|
124
|
-
request; this effectively ignores the
|
125
|
-
authentication in the spec for a single request.
|
126
|
-
:type _request_auth: dict, optional
|
127
|
-
:param _content_type: force content-type for the request.
|
128
|
-
:type _content_type: str, Optional
|
129
|
-
:param _headers: set to override the headers for a single
|
130
|
-
request; this effectively ignores the headers
|
131
|
-
in the spec for a single request.
|
132
|
-
:type _headers: dict, optional
|
133
|
-
:param _host_index: set to override the host_index for a single
|
134
|
-
request; this effectively ignores the host_index
|
135
|
-
in the spec for a single request.
|
136
|
-
:type _host_index: int, optional
|
137
|
-
:return: Returns the result object.
|
138
|
-
""" # noqa: E501
|
139
|
-
|
140
|
-
_param = self._get_config_serialize(
|
141
|
-
_request_auth=_request_auth,
|
142
|
-
_content_type=_content_type,
|
143
|
-
_headers=_headers,
|
144
|
-
_host_index=_host_index,
|
145
|
-
)
|
146
|
-
|
147
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
148
|
-
"200": "Dict[str, object]",
|
149
|
-
}
|
150
|
-
response_data = await self.api_client.call_api(
|
151
|
-
*_param, _request_timeout=_request_timeout
|
152
|
-
)
|
153
|
-
await response_data.read()
|
154
|
-
return self.api_client.response_deserialize(
|
155
|
-
response_data=response_data,
|
156
|
-
response_types_map=_response_types_map,
|
157
|
-
)
|
158
|
-
|
159
|
-
@validate_call
|
160
|
-
async def get_config_without_preload_content(
|
161
|
-
self,
|
162
|
-
_request_timeout: Union[
|
163
|
-
None,
|
164
|
-
Annotated[StrictFloat, Field(gt=0)],
|
165
|
-
Tuple[
|
166
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
167
|
-
],
|
168
|
-
] = None,
|
169
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
170
|
-
_content_type: Optional[StrictStr] = None,
|
171
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
172
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
173
|
-
) -> RESTResponseType:
|
174
|
-
"""Config
|
175
|
-
|
176
|
-
Returns the version of the crypticorn library and the environment.
|
177
|
-
|
178
|
-
:param _request_timeout: timeout setting for this request. If one
|
179
|
-
number provided, it will be total request
|
180
|
-
timeout. It can also be a pair (tuple) of
|
181
|
-
(connection, read) timeouts.
|
182
|
-
:type _request_timeout: int, tuple(int, int), optional
|
183
|
-
:param _request_auth: set to override the auth_settings for an a single
|
184
|
-
request; this effectively ignores the
|
185
|
-
authentication in the spec for a single request.
|
186
|
-
:type _request_auth: dict, optional
|
187
|
-
:param _content_type: force content-type for the request.
|
188
|
-
:type _content_type: str, Optional
|
189
|
-
:param _headers: set to override the headers for a single
|
190
|
-
request; this effectively ignores the headers
|
191
|
-
in the spec for a single request.
|
192
|
-
:type _headers: dict, optional
|
193
|
-
:param _host_index: set to override the host_index for a single
|
194
|
-
request; this effectively ignores the host_index
|
195
|
-
in the spec for a single request.
|
196
|
-
:type _host_index: int, optional
|
197
|
-
:return: Returns the result object.
|
198
|
-
""" # noqa: E501
|
199
|
-
|
200
|
-
_param = self._get_config_serialize(
|
201
|
-
_request_auth=_request_auth,
|
202
|
-
_content_type=_content_type,
|
203
|
-
_headers=_headers,
|
204
|
-
_host_index=_host_index,
|
205
|
-
)
|
206
|
-
|
207
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
208
|
-
"200": "Dict[str, object]",
|
209
|
-
}
|
210
|
-
response_data = await self.api_client.call_api(
|
211
|
-
*_param, _request_timeout=_request_timeout
|
212
|
-
)
|
213
|
-
return response_data.response
|
214
|
-
|
215
|
-
def _get_config_serialize(
|
216
|
-
self,
|
217
|
-
_request_auth,
|
218
|
-
_content_type,
|
219
|
-
_headers,
|
220
|
-
_host_index,
|
221
|
-
) -> RequestSerialized:
|
222
|
-
|
223
|
-
_host = None
|
224
|
-
|
225
|
-
_collection_formats: Dict[str, str] = {}
|
226
|
-
|
227
|
-
_path_params: Dict[str, str] = {}
|
228
|
-
_query_params: List[Tuple[str, str]] = []
|
229
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
230
|
-
_form_params: List[Tuple[str, str]] = []
|
231
|
-
_files: Dict[
|
232
|
-
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
233
|
-
] = {}
|
234
|
-
_body_params: Optional[bytes] = None
|
235
|
-
|
236
|
-
# process the path parameters
|
237
|
-
# process the query parameters
|
238
|
-
# process the header parameters
|
239
|
-
# process the form parameters
|
240
|
-
# process the body parameter
|
241
|
-
|
242
|
-
# set the HTTP header `Accept`
|
243
|
-
if "Accept" not in _header_params:
|
244
|
-
_header_params["Accept"] = self.api_client.select_header_accept(
|
245
|
-
["application/json"]
|
246
|
-
)
|
247
|
-
|
248
|
-
# authentication setting
|
249
|
-
_auth_settings: List[str] = []
|
250
|
-
|
251
|
-
return self.api_client.param_serialize(
|
252
|
-
method="GET",
|
253
|
-
resource_path="/config",
|
254
|
-
path_params=_path_params,
|
255
|
-
query_params=_query_params,
|
256
|
-
header_params=_header_params,
|
257
|
-
body=_body_params,
|
258
|
-
post_params=_form_params,
|
259
|
-
files=_files,
|
260
|
-
auth_settings=_auth_settings,
|
261
|
-
collection_formats=_collection_formats,
|
262
|
-
_host=_host,
|
263
|
-
_request_auth=_request_auth,
|
264
|
-
)
|
265
|
-
|
266
39
|
@validate_call
|
267
40
|
async def get_time(
|
268
41
|
self,
|
@@ -281,7 +54,7 @@ class StatusApi:
|
|
281
54
|
) -> str:
|
282
55
|
"""Time
|
283
56
|
|
284
|
-
Returns the current time in
|
57
|
+
Returns the current time in either ISO or Unix timestamp (seconds) format.
|
285
58
|
|
286
59
|
:param type:
|
287
60
|
:type type: str
|
@@ -345,7 +118,7 @@ class StatusApi:
|
|
345
118
|
) -> ApiResponse[str]:
|
346
119
|
"""Time
|
347
120
|
|
348
|
-
Returns the current time in
|
121
|
+
Returns the current time in either ISO or Unix timestamp (seconds) format.
|
349
122
|
|
350
123
|
:param type:
|
351
124
|
:type type: str
|
@@ -409,7 +182,7 @@ class StatusApi:
|
|
409
182
|
) -> RESTResponseType:
|
410
183
|
"""Time
|
411
184
|
|
412
|
-
Returns the current time in
|
185
|
+
Returns the current time in either ISO or Unix timestamp (seconds) format.
|
413
186
|
|
414
187
|
:param type:
|
415
188
|
:type type: str
|
@@ -3,7 +3,7 @@
|
|
3
3
|
"""
|
4
4
|
Trading API
|
5
5
|
|
6
|
-
API for automated trading and exchange interface
|
6
|
+
API for automated trading and exchange interface. This API is used to trade on the exchange and manage bots, API keys, orders, and more.
|
7
7
|
|
8
8
|
The version of the OpenAPI document: 1.0.0
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
@@ -18,8 +18,9 @@ from typing_extensions import Annotated
|
|
18
18
|
|
19
19
|
from pydantic import StrictInt, StrictStr
|
20
20
|
from typing import Any, List, Optional
|
21
|
-
from crypticorn.trade.client.models.
|
22
|
-
from crypticorn.trade.client.models.
|
21
|
+
from crypticorn.trade.client.models.strategy import Strategy
|
22
|
+
from crypticorn.trade.client.models.strategy_create import StrategyCreate
|
23
|
+
from crypticorn.trade.client.models.strategy_update import StrategyUpdate
|
23
24
|
|
24
25
|
from crypticorn.trade.client.api_client import ApiClient, RequestSerialized
|
25
26
|
from crypticorn.trade.client.api_response import ApiResponse
|
@@ -41,7 +42,7 @@ class StrategiesApi:
|
|
41
42
|
@validate_call
|
42
43
|
async def create_strategy(
|
43
44
|
self,
|
44
|
-
|
45
|
+
strategy_create: StrategyCreate,
|
45
46
|
_request_timeout: Union[
|
46
47
|
None,
|
47
48
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -53,12 +54,12 @@ class StrategiesApi:
|
|
53
54
|
_content_type: Optional[StrictStr] = None,
|
54
55
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
55
56
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
56
|
-
) ->
|
57
|
+
) -> Strategy:
|
57
58
|
"""Create Strategy
|
58
59
|
|
59
60
|
|
60
|
-
:param
|
61
|
-
:type
|
61
|
+
:param strategy_create: (required)
|
62
|
+
:type strategy_create: StrategyCreate
|
62
63
|
:param _request_timeout: timeout setting for this request. If one
|
63
64
|
number provided, it will be total request
|
64
65
|
timeout. It can also be a pair (tuple) of
|
@@ -82,7 +83,7 @@ class StrategiesApi:
|
|
82
83
|
""" # noqa: E501
|
83
84
|
|
84
85
|
_param = self._create_strategy_serialize(
|
85
|
-
|
86
|
+
strategy_create=strategy_create,
|
86
87
|
_request_auth=_request_auth,
|
87
88
|
_content_type=_content_type,
|
88
89
|
_headers=_headers,
|
@@ -90,7 +91,7 @@ class StrategiesApi:
|
|
90
91
|
)
|
91
92
|
|
92
93
|
_response_types_map: Dict[str, Optional[str]] = {
|
93
|
-
"201": "
|
94
|
+
"201": "Strategy",
|
94
95
|
}
|
95
96
|
response_data = await self.api_client.call_api(
|
96
97
|
*_param, _request_timeout=_request_timeout
|
@@ -104,7 +105,7 @@ class StrategiesApi:
|
|
104
105
|
@validate_call
|
105
106
|
async def create_strategy_with_http_info(
|
106
107
|
self,
|
107
|
-
|
108
|
+
strategy_create: StrategyCreate,
|
108
109
|
_request_timeout: Union[
|
109
110
|
None,
|
110
111
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -116,12 +117,12 @@ class StrategiesApi:
|
|
116
117
|
_content_type: Optional[StrictStr] = None,
|
117
118
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
118
119
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
119
|
-
) -> ApiResponse[
|
120
|
+
) -> ApiResponse[Strategy]:
|
120
121
|
"""Create Strategy
|
121
122
|
|
122
123
|
|
123
|
-
:param
|
124
|
-
:type
|
124
|
+
:param strategy_create: (required)
|
125
|
+
:type strategy_create: StrategyCreate
|
125
126
|
:param _request_timeout: timeout setting for this request. If one
|
126
127
|
number provided, it will be total request
|
127
128
|
timeout. It can also be a pair (tuple) of
|
@@ -145,7 +146,7 @@ class StrategiesApi:
|
|
145
146
|
""" # noqa: E501
|
146
147
|
|
147
148
|
_param = self._create_strategy_serialize(
|
148
|
-
|
149
|
+
strategy_create=strategy_create,
|
149
150
|
_request_auth=_request_auth,
|
150
151
|
_content_type=_content_type,
|
151
152
|
_headers=_headers,
|
@@ -153,7 +154,7 @@ class StrategiesApi:
|
|
153
154
|
)
|
154
155
|
|
155
156
|
_response_types_map: Dict[str, Optional[str]] = {
|
156
|
-
"201": "
|
157
|
+
"201": "Strategy",
|
157
158
|
}
|
158
159
|
response_data = await self.api_client.call_api(
|
159
160
|
*_param, _request_timeout=_request_timeout
|
@@ -167,7 +168,7 @@ class StrategiesApi:
|
|
167
168
|
@validate_call
|
168
169
|
async def create_strategy_without_preload_content(
|
169
170
|
self,
|
170
|
-
|
171
|
+
strategy_create: StrategyCreate,
|
171
172
|
_request_timeout: Union[
|
172
173
|
None,
|
173
174
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -183,8 +184,8 @@ class StrategiesApi:
|
|
183
184
|
"""Create Strategy
|
184
185
|
|
185
186
|
|
186
|
-
:param
|
187
|
-
:type
|
187
|
+
:param strategy_create: (required)
|
188
|
+
:type strategy_create: StrategyCreate
|
188
189
|
:param _request_timeout: timeout setting for this request. If one
|
189
190
|
number provided, it will be total request
|
190
191
|
timeout. It can also be a pair (tuple) of
|
@@ -208,7 +209,7 @@ class StrategiesApi:
|
|
208
209
|
""" # noqa: E501
|
209
210
|
|
210
211
|
_param = self._create_strategy_serialize(
|
211
|
-
|
212
|
+
strategy_create=strategy_create,
|
212
213
|
_request_auth=_request_auth,
|
213
214
|
_content_type=_content_type,
|
214
215
|
_headers=_headers,
|
@@ -216,7 +217,7 @@ class StrategiesApi:
|
|
216
217
|
)
|
217
218
|
|
218
219
|
_response_types_map: Dict[str, Optional[str]] = {
|
219
|
-
"201": "
|
220
|
+
"201": "Strategy",
|
220
221
|
}
|
221
222
|
response_data = await self.api_client.call_api(
|
222
223
|
*_param, _request_timeout=_request_timeout
|
@@ -225,7 +226,7 @@ class StrategiesApi:
|
|
225
226
|
|
226
227
|
def _create_strategy_serialize(
|
227
228
|
self,
|
228
|
-
|
229
|
+
strategy_create,
|
229
230
|
_request_auth,
|
230
231
|
_content_type,
|
231
232
|
_headers,
|
@@ -250,8 +251,8 @@ class StrategiesApi:
|
|
250
251
|
# process the header parameters
|
251
252
|
# process the form parameters
|
252
253
|
# process the body parameter
|
253
|
-
if
|
254
|
-
_body_params =
|
254
|
+
if strategy_create is not None:
|
255
|
+
_body_params = strategy_create
|
255
256
|
|
256
257
|
# set the HTTP header `Accept`
|
257
258
|
if "Accept" not in _header_params:
|
@@ -303,7 +304,7 @@ class StrategiesApi:
|
|
303
304
|
_content_type: Optional[StrictStr] = None,
|
304
305
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
305
306
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
306
|
-
) -> List[
|
307
|
+
) -> List[Strategy]:
|
307
308
|
"""Get Strategies
|
308
309
|
|
309
310
|
|
@@ -343,7 +344,7 @@ class StrategiesApi:
|
|
343
344
|
)
|
344
345
|
|
345
346
|
_response_types_map: Dict[str, Optional[str]] = {
|
346
|
-
"200": "List[
|
347
|
+
"200": "List[Strategy]",
|
347
348
|
}
|
348
349
|
response_data = await self.api_client.call_api(
|
349
350
|
*_param, _request_timeout=_request_timeout
|
@@ -370,7 +371,7 @@ class StrategiesApi:
|
|
370
371
|
_content_type: Optional[StrictStr] = None,
|
371
372
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
372
373
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
373
|
-
) -> ApiResponse[List[
|
374
|
+
) -> ApiResponse[List[Strategy]]:
|
374
375
|
"""Get Strategies
|
375
376
|
|
376
377
|
|
@@ -410,7 +411,7 @@ class StrategiesApi:
|
|
410
411
|
)
|
411
412
|
|
412
413
|
_response_types_map: Dict[str, Optional[str]] = {
|
413
|
-
"200": "List[
|
414
|
+
"200": "List[Strategy]",
|
414
415
|
}
|
415
416
|
response_data = await self.api_client.call_api(
|
416
417
|
*_param, _request_timeout=_request_timeout
|
@@ -477,7 +478,7 @@ class StrategiesApi:
|
|
477
478
|
)
|
478
479
|
|
479
480
|
_response_types_map: Dict[str, Optional[str]] = {
|
480
|
-
"200": "List[
|
481
|
+
"200": "List[Strategy]",
|
481
482
|
}
|
482
483
|
response_data = await self.api_client.call_api(
|
483
484
|
*_param, _request_timeout=_request_timeout
|
@@ -791,7 +792,7 @@ class StrategiesApi:
|
|
791
792
|
async def update_strategy(
|
792
793
|
self,
|
793
794
|
id: StrictStr,
|
794
|
-
|
795
|
+
strategy_update: StrategyUpdate,
|
795
796
|
_request_timeout: Union[
|
796
797
|
None,
|
797
798
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -803,15 +804,15 @@ class StrategiesApi:
|
|
803
804
|
_content_type: Optional[StrictStr] = None,
|
804
805
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
805
806
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
806
|
-
) ->
|
807
|
+
) -> Strategy:
|
807
808
|
"""Update Strategy
|
808
809
|
|
809
810
|
Updates a strategy. If the strategy is being disabled, all bots associated with it will be set to stopping.
|
810
811
|
|
811
812
|
:param id: (required)
|
812
813
|
:type id: str
|
813
|
-
:param
|
814
|
-
:type
|
814
|
+
:param strategy_update: (required)
|
815
|
+
:type strategy_update: StrategyUpdate
|
815
816
|
:param _request_timeout: timeout setting for this request. If one
|
816
817
|
number provided, it will be total request
|
817
818
|
timeout. It can also be a pair (tuple) of
|
@@ -836,7 +837,7 @@ class StrategiesApi:
|
|
836
837
|
|
837
838
|
_param = self._update_strategy_serialize(
|
838
839
|
id=id,
|
839
|
-
|
840
|
+
strategy_update=strategy_update,
|
840
841
|
_request_auth=_request_auth,
|
841
842
|
_content_type=_content_type,
|
842
843
|
_headers=_headers,
|
@@ -844,7 +845,7 @@ class StrategiesApi:
|
|
844
845
|
)
|
845
846
|
|
846
847
|
_response_types_map: Dict[str, Optional[str]] = {
|
847
|
-
"200": "
|
848
|
+
"200": "Strategy",
|
848
849
|
}
|
849
850
|
response_data = await self.api_client.call_api(
|
850
851
|
*_param, _request_timeout=_request_timeout
|
@@ -859,7 +860,7 @@ class StrategiesApi:
|
|
859
860
|
async def update_strategy_with_http_info(
|
860
861
|
self,
|
861
862
|
id: StrictStr,
|
862
|
-
|
863
|
+
strategy_update: StrategyUpdate,
|
863
864
|
_request_timeout: Union[
|
864
865
|
None,
|
865
866
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -871,15 +872,15 @@ class StrategiesApi:
|
|
871
872
|
_content_type: Optional[StrictStr] = None,
|
872
873
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
873
874
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
874
|
-
) -> ApiResponse[
|
875
|
+
) -> ApiResponse[Strategy]:
|
875
876
|
"""Update Strategy
|
876
877
|
|
877
878
|
Updates a strategy. If the strategy is being disabled, all bots associated with it will be set to stopping.
|
878
879
|
|
879
880
|
:param id: (required)
|
880
881
|
:type id: str
|
881
|
-
:param
|
882
|
-
:type
|
882
|
+
:param strategy_update: (required)
|
883
|
+
:type strategy_update: StrategyUpdate
|
883
884
|
:param _request_timeout: timeout setting for this request. If one
|
884
885
|
number provided, it will be total request
|
885
886
|
timeout. It can also be a pair (tuple) of
|
@@ -904,7 +905,7 @@ class StrategiesApi:
|
|
904
905
|
|
905
906
|
_param = self._update_strategy_serialize(
|
906
907
|
id=id,
|
907
|
-
|
908
|
+
strategy_update=strategy_update,
|
908
909
|
_request_auth=_request_auth,
|
909
910
|
_content_type=_content_type,
|
910
911
|
_headers=_headers,
|
@@ -912,7 +913,7 @@ class StrategiesApi:
|
|
912
913
|
)
|
913
914
|
|
914
915
|
_response_types_map: Dict[str, Optional[str]] = {
|
915
|
-
"200": "
|
916
|
+
"200": "Strategy",
|
916
917
|
}
|
917
918
|
response_data = await self.api_client.call_api(
|
918
919
|
*_param, _request_timeout=_request_timeout
|
@@ -927,7 +928,7 @@ class StrategiesApi:
|
|
927
928
|
async def update_strategy_without_preload_content(
|
928
929
|
self,
|
929
930
|
id: StrictStr,
|
930
|
-
|
931
|
+
strategy_update: StrategyUpdate,
|
931
932
|
_request_timeout: Union[
|
932
933
|
None,
|
933
934
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -946,8 +947,8 @@ class StrategiesApi:
|
|
946
947
|
|
947
948
|
:param id: (required)
|
948
949
|
:type id: str
|
949
|
-
:param
|
950
|
-
:type
|
950
|
+
:param strategy_update: (required)
|
951
|
+
:type strategy_update: StrategyUpdate
|
951
952
|
:param _request_timeout: timeout setting for this request. If one
|
952
953
|
number provided, it will be total request
|
953
954
|
timeout. It can also be a pair (tuple) of
|
@@ -972,7 +973,7 @@ class StrategiesApi:
|
|
972
973
|
|
973
974
|
_param = self._update_strategy_serialize(
|
974
975
|
id=id,
|
975
|
-
|
976
|
+
strategy_update=strategy_update,
|
976
977
|
_request_auth=_request_auth,
|
977
978
|
_content_type=_content_type,
|
978
979
|
_headers=_headers,
|
@@ -980,7 +981,7 @@ class StrategiesApi:
|
|
980
981
|
)
|
981
982
|
|
982
983
|
_response_types_map: Dict[str, Optional[str]] = {
|
983
|
-
"200": "
|
984
|
+
"200": "Strategy",
|
984
985
|
}
|
985
986
|
response_data = await self.api_client.call_api(
|
986
987
|
*_param, _request_timeout=_request_timeout
|
@@ -990,7 +991,7 @@ class StrategiesApi:
|
|
990
991
|
def _update_strategy_serialize(
|
991
992
|
self,
|
992
993
|
id,
|
993
|
-
|
994
|
+
strategy_update,
|
994
995
|
_request_auth,
|
995
996
|
_content_type,
|
996
997
|
_headers,
|
@@ -1017,8 +1018,8 @@ class StrategiesApi:
|
|
1017
1018
|
# process the header parameters
|
1018
1019
|
# process the form parameters
|
1019
1020
|
# process the body parameter
|
1020
|
-
if
|
1021
|
-
_body_params =
|
1021
|
+
if strategy_update is not None:
|
1022
|
+
_body_params = strategy_update
|
1022
1023
|
|
1023
1024
|
# set the HTTP header `Accept`
|
1024
1025
|
if "Accept" not in _header_params:
|