crypticorn 2.4.7__py3-none-any.whl → 2.5.0rc2__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/cli/init.py +7 -4
- crypticorn/common/__init__.py +1 -0
- crypticorn/common/auth.py +7 -3
- crypticorn/common/exceptions.py +27 -0
- crypticorn/common/utils.py +7 -2
- crypticorn/klines/client/__init__.py +10 -3
- crypticorn/klines/client/api/__init__.py +1 -0
- crypticorn/klines/client/api/change_in_timeframe_api.py +331 -0
- crypticorn/klines/client/api/funding_rates_api.py +13 -13
- crypticorn/klines/client/api/health_check_api.py +8 -8
- crypticorn/klines/client/api/ohlcv_data_api.py +38 -26
- crypticorn/klines/client/api/symbols_api.py +26 -20
- crypticorn/klines/client/api/udf_api.py +229 -229
- crypticorn/klines/client/api_client.py +8 -5
- crypticorn/klines/client/configuration.py +80 -37
- crypticorn/klines/client/models/__init__.py +9 -3
- crypticorn/klines/client/models/base_response_list_change_in_timeframe_response.py +123 -0
- crypticorn/klines/client/models/change_in_timeframe_response.py +86 -0
- crypticorn/klines/client/models/market_type.py +35 -0
- crypticorn/klines/client/models/response_get_udf_history.py +198 -0
- crypticorn/klines/client/rest.py +111 -159
- crypticorn/metrics/main.py +1 -0
- crypticorn/pay/client/__init__.py +0 -3
- crypticorn/pay/client/api/now_payments_api.py +1 -53
- crypticorn/pay/client/models/__init__.py +0 -3
- crypticorn/pay/client/models/payment.py +3 -3
- crypticorn/pay/client/models/scope.py +6 -1
- crypticorn/trade/client/__init__.py +8 -6
- crypticorn/trade/client/api/__init__.py +0 -1
- crypticorn/trade/client/api/api_keys_api.py +167 -273
- crypticorn/trade/client/api/bots_api.py +140 -226
- crypticorn/trade/client/api/exchanges_api.py +31 -51
- crypticorn/trade/client/api/futures_trading_panel_api.py +169 -272
- crypticorn/trade/client/api/notifications_api.py +200 -323
- crypticorn/trade/client/api/orders_api.py +40 -60
- crypticorn/trade/client/api/status_api.py +31 -49
- crypticorn/trade/client/api/strategies_api.py +137 -223
- crypticorn/trade/client/api/trading_actions_api.py +106 -170
- crypticorn/trade/client/api_client.py +111 -153
- crypticorn/trade/client/api_response.py +2 -3
- crypticorn/trade/client/configuration.py +128 -115
- crypticorn/trade/client/exceptions.py +25 -21
- crypticorn/trade/client/models/__init__.py +8 -6
- crypticorn/trade/client/models/action_model.py +108 -54
- crypticorn/trade/client/models/api_error_identifier.py +76 -72
- crypticorn/trade/client/models/api_error_level.py +9 -11
- crypticorn/trade/client/models/api_error_type.py +9 -11
- crypticorn/trade/client/models/bot_model.py +57 -36
- crypticorn/trade/client/models/bot_status.py +9 -11
- crypticorn/trade/client/models/exchange.py +7 -9
- crypticorn/trade/client/models/exchange_key_model.py +43 -32
- crypticorn/trade/client/models/execution_ids.py +18 -18
- crypticorn/trade/client/models/futures_balance.py +43 -27
- crypticorn/trade/client/models/futures_trading_action.py +102 -50
- crypticorn/trade/client/models/http_validation_error.py +19 -15
- crypticorn/trade/client/models/margin_mode.py +7 -9
- crypticorn/trade/client/models/market_type.py +7 -9
- crypticorn/trade/client/models/notification_model.py +52 -32
- crypticorn/trade/client/models/order_model.py +112 -72
- crypticorn/trade/client/models/order_status.py +10 -12
- crypticorn/trade/client/models/post_futures_action.py +20 -16
- crypticorn/trade/client/models/strategy_exchange_info.py +15 -16
- crypticorn/trade/client/models/strategy_model_input.py +61 -33
- crypticorn/trade/client/models/strategy_model_output.py +61 -33
- crypticorn/trade/client/models/tpsl.py +39 -25
- crypticorn/trade/client/models/trading_action_type.py +9 -11
- crypticorn/trade/client/models/validation_error.py +24 -18
- crypticorn/trade/client/models/validation_error_loc_inner.py +37 -16
- crypticorn/trade/client/rest.py +23 -38
- {crypticorn-2.4.7.dist-info → crypticorn-2.5.0rc2.dist-info}/METADATA +1 -1
- {crypticorn-2.4.7.dist-info → crypticorn-2.5.0rc2.dist-info}/RECORD +74 -68
- {crypticorn-2.4.7.dist-info → crypticorn-2.5.0rc2.dist-info}/WHEEL +1 -1
- {crypticorn-2.4.7.dist-info → crypticorn-2.5.0rc2.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.4.7.dist-info → crypticorn-2.5.0rc2.dist-info}/top_level.txt +0 -0
@@ -1,14 +1,14 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
|
3
3
|
"""
|
4
|
-
|
4
|
+
Trading API
|
5
5
|
|
6
|
-
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
7
|
|
8
|
-
|
9
|
-
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
10
|
|
11
|
-
|
11
|
+
Do not edit the class manually.
|
12
12
|
""" # noqa: E501
|
13
13
|
|
14
14
|
import warnings
|
@@ -38,7 +38,6 @@ class StrategiesApi:
|
|
38
38
|
api_client = ApiClient.get_default()
|
39
39
|
self.api_client = api_client
|
40
40
|
|
41
|
-
|
42
41
|
@validate_call
|
43
42
|
async def create_strategy(
|
44
43
|
self,
|
@@ -47,9 +46,8 @@ class StrategiesApi:
|
|
47
46
|
None,
|
48
47
|
Annotated[StrictFloat, Field(gt=0)],
|
49
48
|
Tuple[
|
50
|
-
Annotated[StrictFloat, Field(gt=0)],
|
51
|
-
|
52
|
-
]
|
49
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
50
|
+
],
|
53
51
|
] = None,
|
54
52
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
55
53
|
_content_type: Optional[StrictStr] = None,
|
@@ -81,23 +79,22 @@ class StrategiesApi:
|
|
81
79
|
in the spec for a single request.
|
82
80
|
:type _host_index: int, optional
|
83
81
|
:return: Returns the result object.
|
84
|
-
"""
|
82
|
+
""" # noqa: E501
|
85
83
|
|
86
84
|
_param = self._create_strategy_serialize(
|
87
85
|
strategy_model_input=strategy_model_input,
|
88
86
|
_request_auth=_request_auth,
|
89
87
|
_content_type=_content_type,
|
90
88
|
_headers=_headers,
|
91
|
-
_host_index=_host_index
|
89
|
+
_host_index=_host_index,
|
92
90
|
)
|
93
91
|
|
94
92
|
_response_types_map: Dict[str, Optional[str]] = {
|
95
|
-
|
96
|
-
|
93
|
+
"200": "object",
|
94
|
+
"422": "HTTPValidationError",
|
97
95
|
}
|
98
96
|
response_data = await self.api_client.call_api(
|
99
|
-
*_param,
|
100
|
-
_request_timeout=_request_timeout
|
97
|
+
*_param, _request_timeout=_request_timeout
|
101
98
|
)
|
102
99
|
await response_data.read()
|
103
100
|
return self.api_client.response_deserialize(
|
@@ -105,7 +102,6 @@ class StrategiesApi:
|
|
105
102
|
response_types_map=_response_types_map,
|
106
103
|
).data
|
107
104
|
|
108
|
-
|
109
105
|
@validate_call
|
110
106
|
async def create_strategy_with_http_info(
|
111
107
|
self,
|
@@ -114,9 +110,8 @@ class StrategiesApi:
|
|
114
110
|
None,
|
115
111
|
Annotated[StrictFloat, Field(gt=0)],
|
116
112
|
Tuple[
|
117
|
-
Annotated[StrictFloat, Field(gt=0)],
|
118
|
-
|
119
|
-
]
|
113
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
114
|
+
],
|
120
115
|
] = None,
|
121
116
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
122
117
|
_content_type: Optional[StrictStr] = None,
|
@@ -148,23 +143,22 @@ class StrategiesApi:
|
|
148
143
|
in the spec for a single request.
|
149
144
|
:type _host_index: int, optional
|
150
145
|
:return: Returns the result object.
|
151
|
-
"""
|
146
|
+
""" # noqa: E501
|
152
147
|
|
153
148
|
_param = self._create_strategy_serialize(
|
154
149
|
strategy_model_input=strategy_model_input,
|
155
150
|
_request_auth=_request_auth,
|
156
151
|
_content_type=_content_type,
|
157
152
|
_headers=_headers,
|
158
|
-
_host_index=_host_index
|
153
|
+
_host_index=_host_index,
|
159
154
|
)
|
160
155
|
|
161
156
|
_response_types_map: Dict[str, Optional[str]] = {
|
162
|
-
|
163
|
-
|
157
|
+
"200": "object",
|
158
|
+
"422": "HTTPValidationError",
|
164
159
|
}
|
165
160
|
response_data = await self.api_client.call_api(
|
166
|
-
*_param,
|
167
|
-
_request_timeout=_request_timeout
|
161
|
+
*_param, _request_timeout=_request_timeout
|
168
162
|
)
|
169
163
|
await response_data.read()
|
170
164
|
return self.api_client.response_deserialize(
|
@@ -172,7 +166,6 @@ class StrategiesApi:
|
|
172
166
|
response_types_map=_response_types_map,
|
173
167
|
)
|
174
168
|
|
175
|
-
|
176
169
|
@validate_call
|
177
170
|
async def create_strategy_without_preload_content(
|
178
171
|
self,
|
@@ -181,9 +174,8 @@ class StrategiesApi:
|
|
181
174
|
None,
|
182
175
|
Annotated[StrictFloat, Field(gt=0)],
|
183
176
|
Tuple[
|
184
|
-
Annotated[StrictFloat, Field(gt=0)],
|
185
|
-
|
186
|
-
]
|
177
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
178
|
+
],
|
187
179
|
] = None,
|
188
180
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
189
181
|
_content_type: Optional[StrictStr] = None,
|
@@ -215,27 +207,25 @@ class StrategiesApi:
|
|
215
207
|
in the spec for a single request.
|
216
208
|
:type _host_index: int, optional
|
217
209
|
:return: Returns the result object.
|
218
|
-
"""
|
210
|
+
""" # noqa: E501
|
219
211
|
|
220
212
|
_param = self._create_strategy_serialize(
|
221
213
|
strategy_model_input=strategy_model_input,
|
222
214
|
_request_auth=_request_auth,
|
223
215
|
_content_type=_content_type,
|
224
216
|
_headers=_headers,
|
225
|
-
_host_index=_host_index
|
217
|
+
_host_index=_host_index,
|
226
218
|
)
|
227
219
|
|
228
220
|
_response_types_map: Dict[str, Optional[str]] = {
|
229
|
-
|
230
|
-
|
221
|
+
"200": "object",
|
222
|
+
"422": "HTTPValidationError",
|
231
223
|
}
|
232
224
|
response_data = await self.api_client.call_api(
|
233
|
-
*_param,
|
234
|
-
_request_timeout=_request_timeout
|
225
|
+
*_param, _request_timeout=_request_timeout
|
235
226
|
)
|
236
227
|
return response_data.response
|
237
228
|
|
238
|
-
|
239
229
|
def _create_strategy_serialize(
|
240
230
|
self,
|
241
231
|
strategy_model_input,
|
@@ -247,8 +237,7 @@ class StrategiesApi:
|
|
247
237
|
|
248
238
|
_host = None
|
249
239
|
|
250
|
-
_collection_formats: Dict[str, str] = {
|
251
|
-
}
|
240
|
+
_collection_formats: Dict[str, str] = {}
|
252
241
|
|
253
242
|
_path_params: Dict[str, str] = {}
|
254
243
|
_query_params: List[Tuple[str, str]] = []
|
@@ -267,38 +256,28 @@ class StrategiesApi:
|
|
267
256
|
if strategy_model_input is not None:
|
268
257
|
_body_params = strategy_model_input
|
269
258
|
|
270
|
-
|
271
259
|
# set the HTTP header `Accept`
|
272
|
-
if
|
273
|
-
_header_params[
|
274
|
-
[
|
275
|
-
'application/json'
|
276
|
-
]
|
260
|
+
if "Accept" not in _header_params:
|
261
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
262
|
+
["application/json"]
|
277
263
|
)
|
278
264
|
|
279
265
|
# set the HTTP header `Content-Type`
|
280
266
|
if _content_type:
|
281
|
-
_header_params[
|
267
|
+
_header_params["Content-Type"] = _content_type
|
282
268
|
else:
|
283
|
-
_default_content_type = (
|
284
|
-
|
285
|
-
[
|
286
|
-
'application/json'
|
287
|
-
]
|
288
|
-
)
|
269
|
+
_default_content_type = self.api_client.select_header_content_type(
|
270
|
+
["application/json"]
|
289
271
|
)
|
290
272
|
if _default_content_type is not None:
|
291
|
-
_header_params[
|
273
|
+
_header_params["Content-Type"] = _default_content_type
|
292
274
|
|
293
275
|
# authentication setting
|
294
|
-
_auth_settings: List[str] = [
|
295
|
-
'APIKeyHeader',
|
296
|
-
'HTTPBearer'
|
297
|
-
]
|
276
|
+
_auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
|
298
277
|
|
299
278
|
return self.api_client.param_serialize(
|
300
|
-
method=
|
301
|
-
resource_path=
|
279
|
+
method="POST",
|
280
|
+
resource_path="/strategies",
|
302
281
|
path_params=_path_params,
|
303
282
|
query_params=_query_params,
|
304
283
|
header_params=_header_params,
|
@@ -308,12 +287,9 @@ class StrategiesApi:
|
|
308
287
|
auth_settings=_auth_settings,
|
309
288
|
collection_formats=_collection_formats,
|
310
289
|
_host=_host,
|
311
|
-
_request_auth=_request_auth
|
290
|
+
_request_auth=_request_auth,
|
312
291
|
)
|
313
292
|
|
314
|
-
|
315
|
-
|
316
|
-
|
317
293
|
@validate_call
|
318
294
|
async def get_strategies(
|
319
295
|
self,
|
@@ -323,9 +299,8 @@ class StrategiesApi:
|
|
323
299
|
None,
|
324
300
|
Annotated[StrictFloat, Field(gt=0)],
|
325
301
|
Tuple[
|
326
|
-
Annotated[StrictFloat, Field(gt=0)],
|
327
|
-
|
328
|
-
]
|
302
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
303
|
+
],
|
329
304
|
] = None,
|
330
305
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
331
306
|
_content_type: Optional[StrictStr] = None,
|
@@ -359,7 +334,7 @@ class StrategiesApi:
|
|
359
334
|
in the spec for a single request.
|
360
335
|
:type _host_index: int, optional
|
361
336
|
:return: Returns the result object.
|
362
|
-
"""
|
337
|
+
""" # noqa: E501
|
363
338
|
|
364
339
|
_param = self._get_strategies_serialize(
|
365
340
|
limit=limit,
|
@@ -367,16 +342,15 @@ class StrategiesApi:
|
|
367
342
|
_request_auth=_request_auth,
|
368
343
|
_content_type=_content_type,
|
369
344
|
_headers=_headers,
|
370
|
-
_host_index=_host_index
|
345
|
+
_host_index=_host_index,
|
371
346
|
)
|
372
347
|
|
373
348
|
_response_types_map: Dict[str, Optional[str]] = {
|
374
|
-
|
375
|
-
|
349
|
+
"200": "List[StrategyModelOutput]",
|
350
|
+
"422": "HTTPValidationError",
|
376
351
|
}
|
377
352
|
response_data = await self.api_client.call_api(
|
378
|
-
*_param,
|
379
|
-
_request_timeout=_request_timeout
|
353
|
+
*_param, _request_timeout=_request_timeout
|
380
354
|
)
|
381
355
|
await response_data.read()
|
382
356
|
return self.api_client.response_deserialize(
|
@@ -384,7 +358,6 @@ class StrategiesApi:
|
|
384
358
|
response_types_map=_response_types_map,
|
385
359
|
).data
|
386
360
|
|
387
|
-
|
388
361
|
@validate_call
|
389
362
|
async def get_strategies_with_http_info(
|
390
363
|
self,
|
@@ -394,9 +367,8 @@ class StrategiesApi:
|
|
394
367
|
None,
|
395
368
|
Annotated[StrictFloat, Field(gt=0)],
|
396
369
|
Tuple[
|
397
|
-
Annotated[StrictFloat, Field(gt=0)],
|
398
|
-
|
399
|
-
]
|
370
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
371
|
+
],
|
400
372
|
] = None,
|
401
373
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
402
374
|
_content_type: Optional[StrictStr] = None,
|
@@ -430,7 +402,7 @@ class StrategiesApi:
|
|
430
402
|
in the spec for a single request.
|
431
403
|
:type _host_index: int, optional
|
432
404
|
:return: Returns the result object.
|
433
|
-
"""
|
405
|
+
""" # noqa: E501
|
434
406
|
|
435
407
|
_param = self._get_strategies_serialize(
|
436
408
|
limit=limit,
|
@@ -438,16 +410,15 @@ class StrategiesApi:
|
|
438
410
|
_request_auth=_request_auth,
|
439
411
|
_content_type=_content_type,
|
440
412
|
_headers=_headers,
|
441
|
-
_host_index=_host_index
|
413
|
+
_host_index=_host_index,
|
442
414
|
)
|
443
415
|
|
444
416
|
_response_types_map: Dict[str, Optional[str]] = {
|
445
|
-
|
446
|
-
|
417
|
+
"200": "List[StrategyModelOutput]",
|
418
|
+
"422": "HTTPValidationError",
|
447
419
|
}
|
448
420
|
response_data = await self.api_client.call_api(
|
449
|
-
*_param,
|
450
|
-
_request_timeout=_request_timeout
|
421
|
+
*_param, _request_timeout=_request_timeout
|
451
422
|
)
|
452
423
|
await response_data.read()
|
453
424
|
return self.api_client.response_deserialize(
|
@@ -455,7 +426,6 @@ class StrategiesApi:
|
|
455
426
|
response_types_map=_response_types_map,
|
456
427
|
)
|
457
428
|
|
458
|
-
|
459
429
|
@validate_call
|
460
430
|
async def get_strategies_without_preload_content(
|
461
431
|
self,
|
@@ -465,9 +435,8 @@ class StrategiesApi:
|
|
465
435
|
None,
|
466
436
|
Annotated[StrictFloat, Field(gt=0)],
|
467
437
|
Tuple[
|
468
|
-
Annotated[StrictFloat, Field(gt=0)],
|
469
|
-
|
470
|
-
]
|
438
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
439
|
+
],
|
471
440
|
] = None,
|
472
441
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
473
442
|
_content_type: Optional[StrictStr] = None,
|
@@ -501,7 +470,7 @@ class StrategiesApi:
|
|
501
470
|
in the spec for a single request.
|
502
471
|
:type _host_index: int, optional
|
503
472
|
:return: Returns the result object.
|
504
|
-
"""
|
473
|
+
""" # noqa: E501
|
505
474
|
|
506
475
|
_param = self._get_strategies_serialize(
|
507
476
|
limit=limit,
|
@@ -509,20 +478,18 @@ class StrategiesApi:
|
|
509
478
|
_request_auth=_request_auth,
|
510
479
|
_content_type=_content_type,
|
511
480
|
_headers=_headers,
|
512
|
-
_host_index=_host_index
|
481
|
+
_host_index=_host_index,
|
513
482
|
)
|
514
483
|
|
515
484
|
_response_types_map: Dict[str, Optional[str]] = {
|
516
|
-
|
517
|
-
|
485
|
+
"200": "List[StrategyModelOutput]",
|
486
|
+
"422": "HTTPValidationError",
|
518
487
|
}
|
519
488
|
response_data = await self.api_client.call_api(
|
520
|
-
*_param,
|
521
|
-
_request_timeout=_request_timeout
|
489
|
+
*_param, _request_timeout=_request_timeout
|
522
490
|
)
|
523
491
|
return response_data.response
|
524
492
|
|
525
|
-
|
526
493
|
def _get_strategies_serialize(
|
527
494
|
self,
|
528
495
|
limit,
|
@@ -535,8 +502,7 @@ class StrategiesApi:
|
|
535
502
|
|
536
503
|
_host = None
|
537
504
|
|
538
|
-
_collection_formats: Dict[str, str] = {
|
539
|
-
}
|
505
|
+
_collection_formats: Dict[str, str] = {}
|
540
506
|
|
541
507
|
_path_params: Dict[str, str] = {}
|
542
508
|
_query_params: List[Tuple[str, str]] = []
|
@@ -550,36 +516,29 @@ class StrategiesApi:
|
|
550
516
|
# process the path parameters
|
551
517
|
# process the query parameters
|
552
518
|
if limit is not None:
|
553
|
-
|
554
|
-
_query_params.append((
|
555
|
-
|
519
|
+
|
520
|
+
_query_params.append(("limit", limit))
|
521
|
+
|
556
522
|
if offset is not None:
|
557
|
-
|
558
|
-
_query_params.append((
|
559
|
-
|
523
|
+
|
524
|
+
_query_params.append(("offset", offset))
|
525
|
+
|
560
526
|
# process the header parameters
|
561
527
|
# process the form parameters
|
562
528
|
# process the body parameter
|
563
529
|
|
564
|
-
|
565
530
|
# set the HTTP header `Accept`
|
566
|
-
if
|
567
|
-
_header_params[
|
568
|
-
[
|
569
|
-
'application/json'
|
570
|
-
]
|
531
|
+
if "Accept" not in _header_params:
|
532
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
533
|
+
["application/json"]
|
571
534
|
)
|
572
535
|
|
573
|
-
|
574
536
|
# authentication setting
|
575
|
-
_auth_settings: List[str] = [
|
576
|
-
'APIKeyHeader',
|
577
|
-
'HTTPBearer'
|
578
|
-
]
|
537
|
+
_auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
|
579
538
|
|
580
539
|
return self.api_client.param_serialize(
|
581
|
-
method=
|
582
|
-
resource_path=
|
540
|
+
method="GET",
|
541
|
+
resource_path="/strategies",
|
583
542
|
path_params=_path_params,
|
584
543
|
query_params=_query_params,
|
585
544
|
header_params=_header_params,
|
@@ -589,12 +548,9 @@ class StrategiesApi:
|
|
589
548
|
auth_settings=_auth_settings,
|
590
549
|
collection_formats=_collection_formats,
|
591
550
|
_host=_host,
|
592
|
-
_request_auth=_request_auth
|
551
|
+
_request_auth=_request_auth,
|
593
552
|
)
|
594
553
|
|
595
|
-
|
596
|
-
|
597
|
-
|
598
554
|
@validate_call
|
599
555
|
async def kill_strategy(
|
600
556
|
self,
|
@@ -603,9 +559,8 @@ class StrategiesApi:
|
|
603
559
|
None,
|
604
560
|
Annotated[StrictFloat, Field(gt=0)],
|
605
561
|
Tuple[
|
606
|
-
Annotated[StrictFloat, Field(gt=0)],
|
607
|
-
|
608
|
-
]
|
562
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
563
|
+
],
|
609
564
|
] = None,
|
610
565
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
611
566
|
_content_type: Optional[StrictStr] = None,
|
@@ -638,23 +593,22 @@ class StrategiesApi:
|
|
638
593
|
in the spec for a single request.
|
639
594
|
:type _host_index: int, optional
|
640
595
|
:return: Returns the result object.
|
641
|
-
"""
|
596
|
+
""" # noqa: E501
|
642
597
|
|
643
598
|
_param = self._kill_strategy_serialize(
|
644
599
|
id=id,
|
645
600
|
_request_auth=_request_auth,
|
646
601
|
_content_type=_content_type,
|
647
602
|
_headers=_headers,
|
648
|
-
_host_index=_host_index
|
603
|
+
_host_index=_host_index,
|
649
604
|
)
|
650
605
|
|
651
606
|
_response_types_map: Dict[str, Optional[str]] = {
|
652
|
-
|
653
|
-
|
607
|
+
"200": "object",
|
608
|
+
"422": "HTTPValidationError",
|
654
609
|
}
|
655
610
|
response_data = await self.api_client.call_api(
|
656
|
-
*_param,
|
657
|
-
_request_timeout=_request_timeout
|
611
|
+
*_param, _request_timeout=_request_timeout
|
658
612
|
)
|
659
613
|
await response_data.read()
|
660
614
|
return self.api_client.response_deserialize(
|
@@ -662,7 +616,6 @@ class StrategiesApi:
|
|
662
616
|
response_types_map=_response_types_map,
|
663
617
|
).data
|
664
618
|
|
665
|
-
|
666
619
|
@validate_call
|
667
620
|
async def kill_strategy_with_http_info(
|
668
621
|
self,
|
@@ -671,9 +624,8 @@ class StrategiesApi:
|
|
671
624
|
None,
|
672
625
|
Annotated[StrictFloat, Field(gt=0)],
|
673
626
|
Tuple[
|
674
|
-
Annotated[StrictFloat, Field(gt=0)],
|
675
|
-
|
676
|
-
]
|
627
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
628
|
+
],
|
677
629
|
] = None,
|
678
630
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
679
631
|
_content_type: Optional[StrictStr] = None,
|
@@ -706,23 +658,22 @@ class StrategiesApi:
|
|
706
658
|
in the spec for a single request.
|
707
659
|
:type _host_index: int, optional
|
708
660
|
:return: Returns the result object.
|
709
|
-
"""
|
661
|
+
""" # noqa: E501
|
710
662
|
|
711
663
|
_param = self._kill_strategy_serialize(
|
712
664
|
id=id,
|
713
665
|
_request_auth=_request_auth,
|
714
666
|
_content_type=_content_type,
|
715
667
|
_headers=_headers,
|
716
|
-
_host_index=_host_index
|
668
|
+
_host_index=_host_index,
|
717
669
|
)
|
718
670
|
|
719
671
|
_response_types_map: Dict[str, Optional[str]] = {
|
720
|
-
|
721
|
-
|
672
|
+
"200": "object",
|
673
|
+
"422": "HTTPValidationError",
|
722
674
|
}
|
723
675
|
response_data = await self.api_client.call_api(
|
724
|
-
*_param,
|
725
|
-
_request_timeout=_request_timeout
|
676
|
+
*_param, _request_timeout=_request_timeout
|
726
677
|
)
|
727
678
|
await response_data.read()
|
728
679
|
return self.api_client.response_deserialize(
|
@@ -730,7 +681,6 @@ class StrategiesApi:
|
|
730
681
|
response_types_map=_response_types_map,
|
731
682
|
)
|
732
683
|
|
733
|
-
|
734
684
|
@validate_call
|
735
685
|
async def kill_strategy_without_preload_content(
|
736
686
|
self,
|
@@ -739,9 +689,8 @@ class StrategiesApi:
|
|
739
689
|
None,
|
740
690
|
Annotated[StrictFloat, Field(gt=0)],
|
741
691
|
Tuple[
|
742
|
-
Annotated[StrictFloat, Field(gt=0)],
|
743
|
-
|
744
|
-
]
|
692
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
693
|
+
],
|
745
694
|
] = None,
|
746
695
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
747
696
|
_content_type: Optional[StrictStr] = None,
|
@@ -774,27 +723,25 @@ class StrategiesApi:
|
|
774
723
|
in the spec for a single request.
|
775
724
|
:type _host_index: int, optional
|
776
725
|
:return: Returns the result object.
|
777
|
-
"""
|
726
|
+
""" # noqa: E501
|
778
727
|
|
779
728
|
_param = self._kill_strategy_serialize(
|
780
729
|
id=id,
|
781
730
|
_request_auth=_request_auth,
|
782
731
|
_content_type=_content_type,
|
783
732
|
_headers=_headers,
|
784
|
-
_host_index=_host_index
|
733
|
+
_host_index=_host_index,
|
785
734
|
)
|
786
735
|
|
787
736
|
_response_types_map: Dict[str, Optional[str]] = {
|
788
|
-
|
789
|
-
|
737
|
+
"200": "object",
|
738
|
+
"422": "HTTPValidationError",
|
790
739
|
}
|
791
740
|
response_data = await self.api_client.call_api(
|
792
|
-
*_param,
|
793
|
-
_request_timeout=_request_timeout
|
741
|
+
*_param, _request_timeout=_request_timeout
|
794
742
|
)
|
795
743
|
return response_data.response
|
796
744
|
|
797
|
-
|
798
745
|
def _kill_strategy_serialize(
|
799
746
|
self,
|
800
747
|
id,
|
@@ -806,8 +753,7 @@ class StrategiesApi:
|
|
806
753
|
|
807
754
|
_host = None
|
808
755
|
|
809
|
-
_collection_formats: Dict[str, str] = {
|
810
|
-
}
|
756
|
+
_collection_formats: Dict[str, str] = {}
|
811
757
|
|
812
758
|
_path_params: Dict[str, str] = {}
|
813
759
|
_query_params: List[Tuple[str, str]] = []
|
@@ -820,31 +766,24 @@ class StrategiesApi:
|
|
820
766
|
|
821
767
|
# process the path parameters
|
822
768
|
if id is not None:
|
823
|
-
_path_params[
|
769
|
+
_path_params["id"] = id
|
824
770
|
# process the query parameters
|
825
771
|
# process the header parameters
|
826
772
|
# process the form parameters
|
827
773
|
# process the body parameter
|
828
774
|
|
829
|
-
|
830
775
|
# set the HTTP header `Accept`
|
831
|
-
if
|
832
|
-
_header_params[
|
833
|
-
[
|
834
|
-
'application/json'
|
835
|
-
]
|
776
|
+
if "Accept" not in _header_params:
|
777
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
778
|
+
["application/json"]
|
836
779
|
)
|
837
780
|
|
838
|
-
|
839
781
|
# authentication setting
|
840
|
-
_auth_settings: List[str] = [
|
841
|
-
'APIKeyHeader',
|
842
|
-
'HTTPBearer'
|
843
|
-
]
|
782
|
+
_auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
|
844
783
|
|
845
784
|
return self.api_client.param_serialize(
|
846
|
-
method=
|
847
|
-
resource_path=
|
785
|
+
method="DELETE",
|
786
|
+
resource_path="/strategies/{id}",
|
848
787
|
path_params=_path_params,
|
849
788
|
query_params=_query_params,
|
850
789
|
header_params=_header_params,
|
@@ -854,12 +793,9 @@ class StrategiesApi:
|
|
854
793
|
auth_settings=_auth_settings,
|
855
794
|
collection_formats=_collection_formats,
|
856
795
|
_host=_host,
|
857
|
-
_request_auth=_request_auth
|
796
|
+
_request_auth=_request_auth,
|
858
797
|
)
|
859
798
|
|
860
|
-
|
861
|
-
|
862
|
-
|
863
799
|
@validate_call
|
864
800
|
async def update_strategy(
|
865
801
|
self,
|
@@ -869,9 +805,8 @@ class StrategiesApi:
|
|
869
805
|
None,
|
870
806
|
Annotated[StrictFloat, Field(gt=0)],
|
871
807
|
Tuple[
|
872
|
-
Annotated[StrictFloat, Field(gt=0)],
|
873
|
-
|
874
|
-
]
|
808
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
809
|
+
],
|
875
810
|
] = None,
|
876
811
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
877
812
|
_content_type: Optional[StrictStr] = None,
|
@@ -906,7 +841,7 @@ class StrategiesApi:
|
|
906
841
|
in the spec for a single request.
|
907
842
|
:type _host_index: int, optional
|
908
843
|
:return: Returns the result object.
|
909
|
-
"""
|
844
|
+
""" # noqa: E501
|
910
845
|
|
911
846
|
_param = self._update_strategy_serialize(
|
912
847
|
id=id,
|
@@ -914,16 +849,15 @@ class StrategiesApi:
|
|
914
849
|
_request_auth=_request_auth,
|
915
850
|
_content_type=_content_type,
|
916
851
|
_headers=_headers,
|
917
|
-
_host_index=_host_index
|
852
|
+
_host_index=_host_index,
|
918
853
|
)
|
919
854
|
|
920
855
|
_response_types_map: Dict[str, Optional[str]] = {
|
921
|
-
|
922
|
-
|
856
|
+
"200": "object",
|
857
|
+
"422": "HTTPValidationError",
|
923
858
|
}
|
924
859
|
response_data = await self.api_client.call_api(
|
925
|
-
*_param,
|
926
|
-
_request_timeout=_request_timeout
|
860
|
+
*_param, _request_timeout=_request_timeout
|
927
861
|
)
|
928
862
|
await response_data.read()
|
929
863
|
return self.api_client.response_deserialize(
|
@@ -931,7 +865,6 @@ class StrategiesApi:
|
|
931
865
|
response_types_map=_response_types_map,
|
932
866
|
).data
|
933
867
|
|
934
|
-
|
935
868
|
@validate_call
|
936
869
|
async def update_strategy_with_http_info(
|
937
870
|
self,
|
@@ -941,9 +874,8 @@ class StrategiesApi:
|
|
941
874
|
None,
|
942
875
|
Annotated[StrictFloat, Field(gt=0)],
|
943
876
|
Tuple[
|
944
|
-
Annotated[StrictFloat, Field(gt=0)],
|
945
|
-
|
946
|
-
]
|
877
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
878
|
+
],
|
947
879
|
] = None,
|
948
880
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
949
881
|
_content_type: Optional[StrictStr] = None,
|
@@ -978,7 +910,7 @@ class StrategiesApi:
|
|
978
910
|
in the spec for a single request.
|
979
911
|
:type _host_index: int, optional
|
980
912
|
:return: Returns the result object.
|
981
|
-
"""
|
913
|
+
""" # noqa: E501
|
982
914
|
|
983
915
|
_param = self._update_strategy_serialize(
|
984
916
|
id=id,
|
@@ -986,16 +918,15 @@ class StrategiesApi:
|
|
986
918
|
_request_auth=_request_auth,
|
987
919
|
_content_type=_content_type,
|
988
920
|
_headers=_headers,
|
989
|
-
_host_index=_host_index
|
921
|
+
_host_index=_host_index,
|
990
922
|
)
|
991
923
|
|
992
924
|
_response_types_map: Dict[str, Optional[str]] = {
|
993
|
-
|
994
|
-
|
925
|
+
"200": "object",
|
926
|
+
"422": "HTTPValidationError",
|
995
927
|
}
|
996
928
|
response_data = await self.api_client.call_api(
|
997
|
-
*_param,
|
998
|
-
_request_timeout=_request_timeout
|
929
|
+
*_param, _request_timeout=_request_timeout
|
999
930
|
)
|
1000
931
|
await response_data.read()
|
1001
932
|
return self.api_client.response_deserialize(
|
@@ -1003,7 +934,6 @@ class StrategiesApi:
|
|
1003
934
|
response_types_map=_response_types_map,
|
1004
935
|
)
|
1005
936
|
|
1006
|
-
|
1007
937
|
@validate_call
|
1008
938
|
async def update_strategy_without_preload_content(
|
1009
939
|
self,
|
@@ -1013,9 +943,8 @@ class StrategiesApi:
|
|
1013
943
|
None,
|
1014
944
|
Annotated[StrictFloat, Field(gt=0)],
|
1015
945
|
Tuple[
|
1016
|
-
Annotated[StrictFloat, Field(gt=0)],
|
1017
|
-
|
1018
|
-
]
|
946
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
947
|
+
],
|
1019
948
|
] = None,
|
1020
949
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1021
950
|
_content_type: Optional[StrictStr] = None,
|
@@ -1050,7 +979,7 @@ class StrategiesApi:
|
|
1050
979
|
in the spec for a single request.
|
1051
980
|
:type _host_index: int, optional
|
1052
981
|
:return: Returns the result object.
|
1053
|
-
"""
|
982
|
+
""" # noqa: E501
|
1054
983
|
|
1055
984
|
_param = self._update_strategy_serialize(
|
1056
985
|
id=id,
|
@@ -1058,20 +987,18 @@ class StrategiesApi:
|
|
1058
987
|
_request_auth=_request_auth,
|
1059
988
|
_content_type=_content_type,
|
1060
989
|
_headers=_headers,
|
1061
|
-
_host_index=_host_index
|
990
|
+
_host_index=_host_index,
|
1062
991
|
)
|
1063
992
|
|
1064
993
|
_response_types_map: Dict[str, Optional[str]] = {
|
1065
|
-
|
1066
|
-
|
994
|
+
"200": "object",
|
995
|
+
"422": "HTTPValidationError",
|
1067
996
|
}
|
1068
997
|
response_data = await self.api_client.call_api(
|
1069
|
-
*_param,
|
1070
|
-
_request_timeout=_request_timeout
|
998
|
+
*_param, _request_timeout=_request_timeout
|
1071
999
|
)
|
1072
1000
|
return response_data.response
|
1073
1001
|
|
1074
|
-
|
1075
1002
|
def _update_strategy_serialize(
|
1076
1003
|
self,
|
1077
1004
|
id,
|
@@ -1084,8 +1011,7 @@ class StrategiesApi:
|
|
1084
1011
|
|
1085
1012
|
_host = None
|
1086
1013
|
|
1087
|
-
_collection_formats: Dict[str, str] = {
|
1088
|
-
}
|
1014
|
+
_collection_formats: Dict[str, str] = {}
|
1089
1015
|
|
1090
1016
|
_path_params: Dict[str, str] = {}
|
1091
1017
|
_query_params: List[Tuple[str, str]] = []
|
@@ -1098,7 +1024,7 @@ class StrategiesApi:
|
|
1098
1024
|
|
1099
1025
|
# process the path parameters
|
1100
1026
|
if id is not None:
|
1101
|
-
_path_params[
|
1027
|
+
_path_params["id"] = id
|
1102
1028
|
# process the query parameters
|
1103
1029
|
# process the header parameters
|
1104
1030
|
# process the form parameters
|
@@ -1106,38 +1032,28 @@ class StrategiesApi:
|
|
1106
1032
|
if strategy_model_input is not None:
|
1107
1033
|
_body_params = strategy_model_input
|
1108
1034
|
|
1109
|
-
|
1110
1035
|
# set the HTTP header `Accept`
|
1111
|
-
if
|
1112
|
-
_header_params[
|
1113
|
-
[
|
1114
|
-
'application/json'
|
1115
|
-
]
|
1036
|
+
if "Accept" not in _header_params:
|
1037
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
1038
|
+
["application/json"]
|
1116
1039
|
)
|
1117
1040
|
|
1118
1041
|
# set the HTTP header `Content-Type`
|
1119
1042
|
if _content_type:
|
1120
|
-
_header_params[
|
1043
|
+
_header_params["Content-Type"] = _content_type
|
1121
1044
|
else:
|
1122
|
-
_default_content_type = (
|
1123
|
-
|
1124
|
-
[
|
1125
|
-
'application/json'
|
1126
|
-
]
|
1127
|
-
)
|
1045
|
+
_default_content_type = self.api_client.select_header_content_type(
|
1046
|
+
["application/json"]
|
1128
1047
|
)
|
1129
1048
|
if _default_content_type is not None:
|
1130
|
-
_header_params[
|
1049
|
+
_header_params["Content-Type"] = _default_content_type
|
1131
1050
|
|
1132
1051
|
# authentication setting
|
1133
|
-
_auth_settings: List[str] = [
|
1134
|
-
'APIKeyHeader',
|
1135
|
-
'HTTPBearer'
|
1136
|
-
]
|
1052
|
+
_auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
|
1137
1053
|
|
1138
1054
|
return self.api_client.param_serialize(
|
1139
|
-
method=
|
1140
|
-
resource_path=
|
1055
|
+
method="PUT",
|
1056
|
+
resource_path="/strategies/{id}",
|
1141
1057
|
path_params=_path_params,
|
1142
1058
|
query_params=_query_params,
|
1143
1059
|
header_params=_header_params,
|
@@ -1147,7 +1063,5 @@ class StrategiesApi:
|
|
1147
1063
|
auth_settings=_auth_settings,
|
1148
1064
|
collection_formats=_collection_formats,
|
1149
1065
|
_host=_host,
|
1150
|
-
_request_auth=_request_auth
|
1066
|
+
_request_auth=_request_auth,
|
1151
1067
|
)
|
1152
|
-
|
1153
|
-
|