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