crypticorn 2.11.6__py3-none-any.whl → 2.11.8__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 +14 -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 +55 -54
- 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} +66 -59
- 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} +32 -31
- crypticorn/trade/client/models/{strategy_model_output.py → strategy_create.py} +22 -36
- 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.8.dist-info}/METADATA +1 -1
- {crypticorn-2.11.6.dist-info → crypticorn-2.11.8.dist-info}/RECORD +56 -42
- {crypticorn-2.11.6.dist-info → crypticorn-2.11.8.dist-info}/WHEEL +0 -0
- {crypticorn-2.11.6.dist-info → crypticorn-2.11.8.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.11.6.dist-info → crypticorn-2.11.8.dist-info}/licenses/LICENSE +0 -0
- {crypticorn-2.11.6.dist-info → crypticorn-2.11.8.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)
|
@@ -16,8 +16,8 @@ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
16
|
from typing import Any, Dict, List, Optional, Tuple, Union
|
17
17
|
from typing_extensions import Annotated
|
18
18
|
|
19
|
-
from pydantic import StrictStr
|
20
19
|
from typing import List
|
20
|
+
from crypticorn.trade.client.models.exchange import Exchange
|
21
21
|
|
22
22
|
from crypticorn.trade.client.api_client import ApiClient, RequestSerialized
|
23
23
|
from crypticorn.trade.client.api_response import ApiResponse
|
@@ -37,7 +37,7 @@ class ExchangesApi:
|
|
37
37
|
self.api_client = api_client
|
38
38
|
|
39
39
|
@validate_call
|
40
|
-
async def
|
40
|
+
async def get_all_exchanges(
|
41
41
|
self,
|
42
42
|
_request_timeout: Union[
|
43
43
|
None,
|
@@ -50,9 +50,10 @@ class ExchangesApi:
|
|
50
50
|
_content_type: Optional[StrictStr] = None,
|
51
51
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
52
52
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
53
|
-
) -> List[
|
54
|
-
"""Get Exchanges
|
53
|
+
) -> List[Exchange]:
|
54
|
+
"""Get All Exchanges
|
55
55
|
|
56
|
+
Returns a list of all exchanges.
|
56
57
|
|
57
58
|
:param _request_timeout: timeout setting for this request. If one
|
58
59
|
number provided, it will be total request
|
@@ -76,7 +77,7 @@ class ExchangesApi:
|
|
76
77
|
:return: Returns the result object.
|
77
78
|
""" # noqa: E501
|
78
79
|
|
79
|
-
_param = self.
|
80
|
+
_param = self._get_all_exchanges_serialize(
|
80
81
|
_request_auth=_request_auth,
|
81
82
|
_content_type=_content_type,
|
82
83
|
_headers=_headers,
|
@@ -84,7 +85,7 @@ class ExchangesApi:
|
|
84
85
|
)
|
85
86
|
|
86
87
|
_response_types_map: Dict[str, Optional[str]] = {
|
87
|
-
"200": "List[
|
88
|
+
"200": "List[Exchange]",
|
88
89
|
}
|
89
90
|
response_data = await self.api_client.call_api(
|
90
91
|
*_param, _request_timeout=_request_timeout
|
@@ -96,7 +97,7 @@ class ExchangesApi:
|
|
96
97
|
).data
|
97
98
|
|
98
99
|
@validate_call
|
99
|
-
async def
|
100
|
+
async def get_all_exchanges_with_http_info(
|
100
101
|
self,
|
101
102
|
_request_timeout: Union[
|
102
103
|
None,
|
@@ -109,9 +110,10 @@ class ExchangesApi:
|
|
109
110
|
_content_type: Optional[StrictStr] = None,
|
110
111
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
111
112
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
112
|
-
) -> ApiResponse[List[
|
113
|
-
"""Get Exchanges
|
113
|
+
) -> ApiResponse[List[Exchange]]:
|
114
|
+
"""Get All Exchanges
|
114
115
|
|
116
|
+
Returns a list of all exchanges.
|
115
117
|
|
116
118
|
:param _request_timeout: timeout setting for this request. If one
|
117
119
|
number provided, it will be total request
|
@@ -135,7 +137,7 @@ class ExchangesApi:
|
|
135
137
|
:return: Returns the result object.
|
136
138
|
""" # noqa: E501
|
137
139
|
|
138
|
-
_param = self.
|
140
|
+
_param = self._get_all_exchanges_serialize(
|
139
141
|
_request_auth=_request_auth,
|
140
142
|
_content_type=_content_type,
|
141
143
|
_headers=_headers,
|
@@ -143,7 +145,7 @@ class ExchangesApi:
|
|
143
145
|
)
|
144
146
|
|
145
147
|
_response_types_map: Dict[str, Optional[str]] = {
|
146
|
-
"200": "List[
|
148
|
+
"200": "List[Exchange]",
|
147
149
|
}
|
148
150
|
response_data = await self.api_client.call_api(
|
149
151
|
*_param, _request_timeout=_request_timeout
|
@@ -155,7 +157,7 @@ class ExchangesApi:
|
|
155
157
|
)
|
156
158
|
|
157
159
|
@validate_call
|
158
|
-
async def
|
160
|
+
async def get_all_exchanges_without_preload_content(
|
159
161
|
self,
|
160
162
|
_request_timeout: Union[
|
161
163
|
None,
|
@@ -169,8 +171,9 @@ class ExchangesApi:
|
|
169
171
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
170
172
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
171
173
|
) -> RESTResponseType:
|
172
|
-
"""Get Exchanges
|
174
|
+
"""Get All Exchanges
|
173
175
|
|
176
|
+
Returns a list of all exchanges.
|
174
177
|
|
175
178
|
:param _request_timeout: timeout setting for this request. If one
|
176
179
|
number provided, it will be total request
|
@@ -194,7 +197,7 @@ class ExchangesApi:
|
|
194
197
|
:return: Returns the result object.
|
195
198
|
""" # noqa: E501
|
196
199
|
|
197
|
-
_param = self.
|
200
|
+
_param = self._get_all_exchanges_serialize(
|
198
201
|
_request_auth=_request_auth,
|
199
202
|
_content_type=_content_type,
|
200
203
|
_headers=_headers,
|
@@ -202,14 +205,14 @@ class ExchangesApi:
|
|
202
205
|
)
|
203
206
|
|
204
207
|
_response_types_map: Dict[str, Optional[str]] = {
|
205
|
-
"200": "List[
|
208
|
+
"200": "List[Exchange]",
|
206
209
|
}
|
207
210
|
response_data = await self.api_client.call_api(
|
208
211
|
*_param, _request_timeout=_request_timeout
|
209
212
|
)
|
210
213
|
return response_data.response
|
211
214
|
|
212
|
-
def
|
215
|
+
def _get_all_exchanges_serialize(
|
213
216
|
self,
|
214
217
|
_request_auth,
|
215
218
|
_content_type,
|
@@ -259,3 +262,457 @@ class ExchangesApi:
|
|
259
262
|
_host=_host,
|
260
263
|
_request_auth=_request_auth,
|
261
264
|
)
|
265
|
+
|
266
|
+
@validate_call
|
267
|
+
async def get_planned_exchanges(
|
268
|
+
self,
|
269
|
+
_request_timeout: Union[
|
270
|
+
None,
|
271
|
+
Annotated[StrictFloat, Field(gt=0)],
|
272
|
+
Tuple[
|
273
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
274
|
+
],
|
275
|
+
] = None,
|
276
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
277
|
+
_content_type: Optional[StrictStr] = None,
|
278
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
279
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
280
|
+
) -> List[Exchange]:
|
281
|
+
"""Get Planned Exchanges
|
282
|
+
|
283
|
+
Returns a list of exchanges that are planned to be added for trading.
|
284
|
+
|
285
|
+
:param _request_timeout: timeout setting for this request. If one
|
286
|
+
number provided, it will be total request
|
287
|
+
timeout. It can also be a pair (tuple) of
|
288
|
+
(connection, read) timeouts.
|
289
|
+
:type _request_timeout: int, tuple(int, int), optional
|
290
|
+
:param _request_auth: set to override the auth_settings for an a single
|
291
|
+
request; this effectively ignores the
|
292
|
+
authentication in the spec for a single request.
|
293
|
+
:type _request_auth: dict, optional
|
294
|
+
:param _content_type: force content-type for the request.
|
295
|
+
:type _content_type: str, Optional
|
296
|
+
:param _headers: set to override the headers for a single
|
297
|
+
request; this effectively ignores the headers
|
298
|
+
in the spec for a single request.
|
299
|
+
:type _headers: dict, optional
|
300
|
+
:param _host_index: set to override the host_index for a single
|
301
|
+
request; this effectively ignores the host_index
|
302
|
+
in the spec for a single request.
|
303
|
+
:type _host_index: int, optional
|
304
|
+
:return: Returns the result object.
|
305
|
+
""" # noqa: E501
|
306
|
+
|
307
|
+
_param = self._get_planned_exchanges_serialize(
|
308
|
+
_request_auth=_request_auth,
|
309
|
+
_content_type=_content_type,
|
310
|
+
_headers=_headers,
|
311
|
+
_host_index=_host_index,
|
312
|
+
)
|
313
|
+
|
314
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
315
|
+
"200": "List[Exchange]",
|
316
|
+
}
|
317
|
+
response_data = await self.api_client.call_api(
|
318
|
+
*_param, _request_timeout=_request_timeout
|
319
|
+
)
|
320
|
+
await response_data.read()
|
321
|
+
return self.api_client.response_deserialize(
|
322
|
+
response_data=response_data,
|
323
|
+
response_types_map=_response_types_map,
|
324
|
+
).data
|
325
|
+
|
326
|
+
@validate_call
|
327
|
+
async def get_planned_exchanges_with_http_info(
|
328
|
+
self,
|
329
|
+
_request_timeout: Union[
|
330
|
+
None,
|
331
|
+
Annotated[StrictFloat, Field(gt=0)],
|
332
|
+
Tuple[
|
333
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
334
|
+
],
|
335
|
+
] = None,
|
336
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
337
|
+
_content_type: Optional[StrictStr] = None,
|
338
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
339
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
340
|
+
) -> ApiResponse[List[Exchange]]:
|
341
|
+
"""Get Planned Exchanges
|
342
|
+
|
343
|
+
Returns a list of exchanges that are planned to be added for trading.
|
344
|
+
|
345
|
+
:param _request_timeout: timeout setting for this request. If one
|
346
|
+
number provided, it will be total request
|
347
|
+
timeout. It can also be a pair (tuple) of
|
348
|
+
(connection, read) timeouts.
|
349
|
+
:type _request_timeout: int, tuple(int, int), optional
|
350
|
+
:param _request_auth: set to override the auth_settings for an a single
|
351
|
+
request; this effectively ignores the
|
352
|
+
authentication in the spec for a single request.
|
353
|
+
:type _request_auth: dict, optional
|
354
|
+
:param _content_type: force content-type for the request.
|
355
|
+
:type _content_type: str, Optional
|
356
|
+
:param _headers: set to override the headers for a single
|
357
|
+
request; this effectively ignores the headers
|
358
|
+
in the spec for a single request.
|
359
|
+
:type _headers: dict, optional
|
360
|
+
:param _host_index: set to override the host_index for a single
|
361
|
+
request; this effectively ignores the host_index
|
362
|
+
in the spec for a single request.
|
363
|
+
:type _host_index: int, optional
|
364
|
+
:return: Returns the result object.
|
365
|
+
""" # noqa: E501
|
366
|
+
|
367
|
+
_param = self._get_planned_exchanges_serialize(
|
368
|
+
_request_auth=_request_auth,
|
369
|
+
_content_type=_content_type,
|
370
|
+
_headers=_headers,
|
371
|
+
_host_index=_host_index,
|
372
|
+
)
|
373
|
+
|
374
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
375
|
+
"200": "List[Exchange]",
|
376
|
+
}
|
377
|
+
response_data = await self.api_client.call_api(
|
378
|
+
*_param, _request_timeout=_request_timeout
|
379
|
+
)
|
380
|
+
await response_data.read()
|
381
|
+
return self.api_client.response_deserialize(
|
382
|
+
response_data=response_data,
|
383
|
+
response_types_map=_response_types_map,
|
384
|
+
)
|
385
|
+
|
386
|
+
@validate_call
|
387
|
+
async def get_planned_exchanges_without_preload_content(
|
388
|
+
self,
|
389
|
+
_request_timeout: Union[
|
390
|
+
None,
|
391
|
+
Annotated[StrictFloat, Field(gt=0)],
|
392
|
+
Tuple[
|
393
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
394
|
+
],
|
395
|
+
] = None,
|
396
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
397
|
+
_content_type: Optional[StrictStr] = None,
|
398
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
399
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
400
|
+
) -> RESTResponseType:
|
401
|
+
"""Get Planned Exchanges
|
402
|
+
|
403
|
+
Returns a list of exchanges that are planned to be added for trading.
|
404
|
+
|
405
|
+
:param _request_timeout: timeout setting for this request. If one
|
406
|
+
number provided, it will be total request
|
407
|
+
timeout. It can also be a pair (tuple) of
|
408
|
+
(connection, read) timeouts.
|
409
|
+
:type _request_timeout: int, tuple(int, int), optional
|
410
|
+
:param _request_auth: set to override the auth_settings for an a single
|
411
|
+
request; this effectively ignores the
|
412
|
+
authentication in the spec for a single request.
|
413
|
+
:type _request_auth: dict, optional
|
414
|
+
:param _content_type: force content-type for the request.
|
415
|
+
:type _content_type: str, Optional
|
416
|
+
:param _headers: set to override the headers for a single
|
417
|
+
request; this effectively ignores the headers
|
418
|
+
in the spec for a single request.
|
419
|
+
:type _headers: dict, optional
|
420
|
+
:param _host_index: set to override the host_index for a single
|
421
|
+
request; this effectively ignores the host_index
|
422
|
+
in the spec for a single request.
|
423
|
+
:type _host_index: int, optional
|
424
|
+
:return: Returns the result object.
|
425
|
+
""" # noqa: E501
|
426
|
+
|
427
|
+
_param = self._get_planned_exchanges_serialize(
|
428
|
+
_request_auth=_request_auth,
|
429
|
+
_content_type=_content_type,
|
430
|
+
_headers=_headers,
|
431
|
+
_host_index=_host_index,
|
432
|
+
)
|
433
|
+
|
434
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
435
|
+
"200": "List[Exchange]",
|
436
|
+
}
|
437
|
+
response_data = await self.api_client.call_api(
|
438
|
+
*_param, _request_timeout=_request_timeout
|
439
|
+
)
|
440
|
+
return response_data.response
|
441
|
+
|
442
|
+
def _get_planned_exchanges_serialize(
|
443
|
+
self,
|
444
|
+
_request_auth,
|
445
|
+
_content_type,
|
446
|
+
_headers,
|
447
|
+
_host_index,
|
448
|
+
) -> RequestSerialized:
|
449
|
+
|
450
|
+
_host = None
|
451
|
+
|
452
|
+
_collection_formats: Dict[str, str] = {}
|
453
|
+
|
454
|
+
_path_params: Dict[str, str] = {}
|
455
|
+
_query_params: List[Tuple[str, str]] = []
|
456
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
457
|
+
_form_params: List[Tuple[str, str]] = []
|
458
|
+
_files: Dict[
|
459
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
460
|
+
] = {}
|
461
|
+
_body_params: Optional[bytes] = None
|
462
|
+
|
463
|
+
# process the path parameters
|
464
|
+
# process the query parameters
|
465
|
+
# process the header parameters
|
466
|
+
# process the form parameters
|
467
|
+
# process the body parameter
|
468
|
+
|
469
|
+
# set the HTTP header `Accept`
|
470
|
+
if "Accept" not in _header_params:
|
471
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
472
|
+
["application/json"]
|
473
|
+
)
|
474
|
+
|
475
|
+
# authentication setting
|
476
|
+
_auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
|
477
|
+
|
478
|
+
return self.api_client.param_serialize(
|
479
|
+
method="GET",
|
480
|
+
resource_path="/exchanges/planned",
|
481
|
+
path_params=_path_params,
|
482
|
+
query_params=_query_params,
|
483
|
+
header_params=_header_params,
|
484
|
+
body=_body_params,
|
485
|
+
post_params=_form_params,
|
486
|
+
files=_files,
|
487
|
+
auth_settings=_auth_settings,
|
488
|
+
collection_formats=_collection_formats,
|
489
|
+
_host=_host,
|
490
|
+
_request_auth=_request_auth,
|
491
|
+
)
|
492
|
+
|
493
|
+
@validate_call
|
494
|
+
async def get_tradeable_exchanges(
|
495
|
+
self,
|
496
|
+
_request_timeout: Union[
|
497
|
+
None,
|
498
|
+
Annotated[StrictFloat, Field(gt=0)],
|
499
|
+
Tuple[
|
500
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
501
|
+
],
|
502
|
+
] = None,
|
503
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
504
|
+
_content_type: Optional[StrictStr] = None,
|
505
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
506
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
507
|
+
) -> List[Exchange]:
|
508
|
+
"""Get Tradeable Exchanges
|
509
|
+
|
510
|
+
Returns a list of exchanges that are tradeable.
|
511
|
+
|
512
|
+
:param _request_timeout: timeout setting for this request. If one
|
513
|
+
number provided, it will be total request
|
514
|
+
timeout. It can also be a pair (tuple) of
|
515
|
+
(connection, read) timeouts.
|
516
|
+
:type _request_timeout: int, tuple(int, int), optional
|
517
|
+
:param _request_auth: set to override the auth_settings for an a single
|
518
|
+
request; this effectively ignores the
|
519
|
+
authentication in the spec for a single request.
|
520
|
+
:type _request_auth: dict, optional
|
521
|
+
:param _content_type: force content-type for the request.
|
522
|
+
:type _content_type: str, Optional
|
523
|
+
:param _headers: set to override the headers for a single
|
524
|
+
request; this effectively ignores the headers
|
525
|
+
in the spec for a single request.
|
526
|
+
:type _headers: dict, optional
|
527
|
+
:param _host_index: set to override the host_index for a single
|
528
|
+
request; this effectively ignores the host_index
|
529
|
+
in the spec for a single request.
|
530
|
+
:type _host_index: int, optional
|
531
|
+
:return: Returns the result object.
|
532
|
+
""" # noqa: E501
|
533
|
+
|
534
|
+
_param = self._get_tradeable_exchanges_serialize(
|
535
|
+
_request_auth=_request_auth,
|
536
|
+
_content_type=_content_type,
|
537
|
+
_headers=_headers,
|
538
|
+
_host_index=_host_index,
|
539
|
+
)
|
540
|
+
|
541
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
542
|
+
"200": "List[Exchange]",
|
543
|
+
}
|
544
|
+
response_data = await self.api_client.call_api(
|
545
|
+
*_param, _request_timeout=_request_timeout
|
546
|
+
)
|
547
|
+
await response_data.read()
|
548
|
+
return self.api_client.response_deserialize(
|
549
|
+
response_data=response_data,
|
550
|
+
response_types_map=_response_types_map,
|
551
|
+
).data
|
552
|
+
|
553
|
+
@validate_call
|
554
|
+
async def get_tradeable_exchanges_with_http_info(
|
555
|
+
self,
|
556
|
+
_request_timeout: Union[
|
557
|
+
None,
|
558
|
+
Annotated[StrictFloat, Field(gt=0)],
|
559
|
+
Tuple[
|
560
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
561
|
+
],
|
562
|
+
] = None,
|
563
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
564
|
+
_content_type: Optional[StrictStr] = None,
|
565
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
566
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
567
|
+
) -> ApiResponse[List[Exchange]]:
|
568
|
+
"""Get Tradeable Exchanges
|
569
|
+
|
570
|
+
Returns a list of exchanges that are tradeable.
|
571
|
+
|
572
|
+
:param _request_timeout: timeout setting for this request. If one
|
573
|
+
number provided, it will be total request
|
574
|
+
timeout. It can also be a pair (tuple) of
|
575
|
+
(connection, read) timeouts.
|
576
|
+
:type _request_timeout: int, tuple(int, int), optional
|
577
|
+
:param _request_auth: set to override the auth_settings for an a single
|
578
|
+
request; this effectively ignores the
|
579
|
+
authentication in the spec for a single request.
|
580
|
+
:type _request_auth: dict, optional
|
581
|
+
:param _content_type: force content-type for the request.
|
582
|
+
:type _content_type: str, Optional
|
583
|
+
:param _headers: set to override the headers for a single
|
584
|
+
request; this effectively ignores the headers
|
585
|
+
in the spec for a single request.
|
586
|
+
:type _headers: dict, optional
|
587
|
+
:param _host_index: set to override the host_index for a single
|
588
|
+
request; this effectively ignores the host_index
|
589
|
+
in the spec for a single request.
|
590
|
+
:type _host_index: int, optional
|
591
|
+
:return: Returns the result object.
|
592
|
+
""" # noqa: E501
|
593
|
+
|
594
|
+
_param = self._get_tradeable_exchanges_serialize(
|
595
|
+
_request_auth=_request_auth,
|
596
|
+
_content_type=_content_type,
|
597
|
+
_headers=_headers,
|
598
|
+
_host_index=_host_index,
|
599
|
+
)
|
600
|
+
|
601
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
602
|
+
"200": "List[Exchange]",
|
603
|
+
}
|
604
|
+
response_data = await self.api_client.call_api(
|
605
|
+
*_param, _request_timeout=_request_timeout
|
606
|
+
)
|
607
|
+
await response_data.read()
|
608
|
+
return self.api_client.response_deserialize(
|
609
|
+
response_data=response_data,
|
610
|
+
response_types_map=_response_types_map,
|
611
|
+
)
|
612
|
+
|
613
|
+
@validate_call
|
614
|
+
async def get_tradeable_exchanges_without_preload_content(
|
615
|
+
self,
|
616
|
+
_request_timeout: Union[
|
617
|
+
None,
|
618
|
+
Annotated[StrictFloat, Field(gt=0)],
|
619
|
+
Tuple[
|
620
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
621
|
+
],
|
622
|
+
] = None,
|
623
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
624
|
+
_content_type: Optional[StrictStr] = None,
|
625
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
626
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
627
|
+
) -> RESTResponseType:
|
628
|
+
"""Get Tradeable Exchanges
|
629
|
+
|
630
|
+
Returns a list of exchanges that are tradeable.
|
631
|
+
|
632
|
+
:param _request_timeout: timeout setting for this request. If one
|
633
|
+
number provided, it will be total request
|
634
|
+
timeout. It can also be a pair (tuple) of
|
635
|
+
(connection, read) timeouts.
|
636
|
+
:type _request_timeout: int, tuple(int, int), optional
|
637
|
+
:param _request_auth: set to override the auth_settings for an a single
|
638
|
+
request; this effectively ignores the
|
639
|
+
authentication in the spec for a single request.
|
640
|
+
:type _request_auth: dict, optional
|
641
|
+
:param _content_type: force content-type for the request.
|
642
|
+
:type _content_type: str, Optional
|
643
|
+
:param _headers: set to override the headers for a single
|
644
|
+
request; this effectively ignores the headers
|
645
|
+
in the spec for a single request.
|
646
|
+
:type _headers: dict, optional
|
647
|
+
:param _host_index: set to override the host_index for a single
|
648
|
+
request; this effectively ignores the host_index
|
649
|
+
in the spec for a single request.
|
650
|
+
:type _host_index: int, optional
|
651
|
+
:return: Returns the result object.
|
652
|
+
""" # noqa: E501
|
653
|
+
|
654
|
+
_param = self._get_tradeable_exchanges_serialize(
|
655
|
+
_request_auth=_request_auth,
|
656
|
+
_content_type=_content_type,
|
657
|
+
_headers=_headers,
|
658
|
+
_host_index=_host_index,
|
659
|
+
)
|
660
|
+
|
661
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
662
|
+
"200": "List[Exchange]",
|
663
|
+
}
|
664
|
+
response_data = await self.api_client.call_api(
|
665
|
+
*_param, _request_timeout=_request_timeout
|
666
|
+
)
|
667
|
+
return response_data.response
|
668
|
+
|
669
|
+
def _get_tradeable_exchanges_serialize(
|
670
|
+
self,
|
671
|
+
_request_auth,
|
672
|
+
_content_type,
|
673
|
+
_headers,
|
674
|
+
_host_index,
|
675
|
+
) -> RequestSerialized:
|
676
|
+
|
677
|
+
_host = None
|
678
|
+
|
679
|
+
_collection_formats: Dict[str, str] = {}
|
680
|
+
|
681
|
+
_path_params: Dict[str, str] = {}
|
682
|
+
_query_params: List[Tuple[str, str]] = []
|
683
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
684
|
+
_form_params: List[Tuple[str, str]] = []
|
685
|
+
_files: Dict[
|
686
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
687
|
+
] = {}
|
688
|
+
_body_params: Optional[bytes] = None
|
689
|
+
|
690
|
+
# process the path parameters
|
691
|
+
# process the query parameters
|
692
|
+
# process the header parameters
|
693
|
+
# process the form parameters
|
694
|
+
# process the body parameter
|
695
|
+
|
696
|
+
# set the HTTP header `Accept`
|
697
|
+
if "Accept" not in _header_params:
|
698
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
699
|
+
["application/json"]
|
700
|
+
)
|
701
|
+
|
702
|
+
# authentication setting
|
703
|
+
_auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
|
704
|
+
|
705
|
+
return self.api_client.param_serialize(
|
706
|
+
method="GET",
|
707
|
+
resource_path="/exchanges/tradeable",
|
708
|
+
path_params=_path_params,
|
709
|
+
query_params=_query_params,
|
710
|
+
header_params=_header_params,
|
711
|
+
body=_body_params,
|
712
|
+
post_params=_form_params,
|
713
|
+
files=_files,
|
714
|
+
auth_settings=_auth_settings,
|
715
|
+
collection_formats=_collection_formats,
|
716
|
+
_host=_host,
|
717
|
+
_request_auth=_request_auth,
|
718
|
+
)
|
@@ -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)
|