crypticorn 2.4.5__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/client.py +1 -1
- crypticorn/common/auth.py +7 -9
- crypticorn/common/errors.py +6 -1
- crypticorn/common/scopes.py +2 -1
- crypticorn/common/utils.py +15 -5
- crypticorn/klines/main.py +10 -5
- crypticorn/metrics/client/models/exchange_mapping.py +4 -2
- crypticorn/metrics/client/models/trading_status.py +1 -0
- crypticorn/metrics/main.py +5 -4
- crypticorn/pay/client/__init__.py +5 -4
- crypticorn/pay/client/api/payments_api.py +17 -17
- crypticorn/pay/client/api/products_api.py +49 -48
- crypticorn/pay/client/models/__init__.py +5 -4
- crypticorn/pay/client/models/payment.py +28 -147
- crypticorn/pay/client/models/product_create.py +120 -0
- crypticorn/pay/client/models/product_read.py +123 -0
- crypticorn/pay/client/models/product_sub_read.py +103 -0
- crypticorn/pay/client/models/product_update.py +142 -0
- 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.5.dist-info → crypticorn-2.4.7.dist-info}/METADATA +13 -2
- {crypticorn-2.4.5.dist-info → crypticorn-2.4.7.dist-info}/RECORD +65 -61
- {crypticorn-2.4.5.dist-info → crypticorn-2.4.7.dist-info}/WHEEL +0 -0
- {crypticorn-2.4.5.dist-info → crypticorn-2.4.7.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.4.5.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
|
|
@@ -24,16 +24,9 @@ import urllib3
|
|
24
24
|
|
25
25
|
|
26
26
|
JSON_SCHEMA_VALIDATION_KEYWORDS = {
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
"minimum",
|
31
|
-
"exclusiveMinimum",
|
32
|
-
"maxLength",
|
33
|
-
"minLength",
|
34
|
-
"pattern",
|
35
|
-
"maxItems",
|
36
|
-
"minItems",
|
27
|
+
'multipleOf', 'maximum', 'exclusiveMaximum',
|
28
|
+
'minimum', 'exclusiveMinimum', 'maxLength',
|
29
|
+
'minLength', 'pattern', 'maxItems', 'minItems'
|
37
30
|
}
|
38
31
|
|
39
32
|
ServerVariablesT = Dict[str, str]
|
@@ -141,80 +134,81 @@ class HostSetting(TypedDict):
|
|
141
134
|
class Configuration:
|
142
135
|
"""This class contains various settings of the API client.
|
143
136
|
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
137
|
+
:param host: Base url.
|
138
|
+
:param ignore_operation_servers
|
139
|
+
Boolean to ignore operation servers for the API client.
|
140
|
+
Config will use `host` as the base url regardless of the operation servers.
|
141
|
+
:param api_key: Dict to store API key(s).
|
142
|
+
Each entry in the dict specifies an API key.
|
143
|
+
The dict key is the name of the security scheme in the OAS specification.
|
144
|
+
The dict value is the API key secret.
|
145
|
+
:param api_key_prefix: Dict to store API prefix (e.g. Bearer).
|
146
|
+
The dict key is the name of the security scheme in the OAS specification.
|
147
|
+
The dict value is an API key prefix when generating the auth data.
|
148
|
+
:param username: Username for HTTP basic authentication.
|
149
|
+
:param password: Password for HTTP basic authentication.
|
150
|
+
:param access_token: Access token.
|
151
|
+
:param server_index: Index to servers configuration.
|
152
|
+
:param server_variables: Mapping with string values to replace variables in
|
153
|
+
templated server configuration. The validation of enums is performed for
|
154
|
+
variables with defined enum values before.
|
155
|
+
:param server_operation_index: Mapping from operation ID to an index to server
|
156
|
+
configuration.
|
157
|
+
:param server_operation_variables: Mapping from operation ID to a mapping with
|
158
|
+
string values to replace variables in templated server configuration.
|
159
|
+
The validation of enums is performed for variables with defined enum
|
160
|
+
values before.
|
161
|
+
:param ssl_ca_cert: str - the path to a file of concatenated CA certificates
|
162
|
+
in PEM format.
|
163
|
+
:param retries: Number of retries for API requests.
|
164
|
+
:param ca_cert_data: verify the peer using concatenated CA certificate data
|
165
|
+
in PEM (str) or DER (bytes) format.
|
166
|
+
|
167
|
+
:Example:
|
168
|
+
|
169
|
+
API Key Authentication Example.
|
170
|
+
Given the following security scheme in the OpenAPI specification:
|
171
|
+
components:
|
172
|
+
securitySchemes:
|
173
|
+
cookieAuth: # name for the security scheme
|
174
|
+
type: apiKey
|
175
|
+
in: cookie
|
176
|
+
name: JSESSIONID # cookie name
|
177
|
+
|
178
|
+
You can programmatically set the cookie:
|
179
|
+
|
180
|
+
conf = client.Configuration(
|
181
|
+
api_key={'cookieAuth': 'abc123'}
|
182
|
+
api_key_prefix={'cookieAuth': 'JSESSIONID'}
|
183
|
+
)
|
184
|
+
|
185
|
+
The following cookie will be added to the HTTP request:
|
186
|
+
Cookie: JSESSIONID abc123
|
194
187
|
"""
|
195
188
|
|
196
189
|
_default: ClassVar[Optional[Self]] = None
|
197
190
|
|
198
191
|
def __init__(
|
199
192
|
self,
|
200
|
-
host: Optional[str]
|
201
|
-
api_key: Optional[Dict[str, str]]
|
202
|
-
api_key_prefix: Optional[Dict[str, str]]
|
203
|
-
username: Optional[str]
|
204
|
-
password: Optional[str]
|
205
|
-
access_token: Optional[str]
|
206
|
-
server_index: Optional[int]
|
207
|
-
server_variables: Optional[ServerVariablesT]
|
208
|
-
server_operation_index: Optional[Dict[int, int]]
|
209
|
-
server_operation_variables: Optional[Dict[int, ServerVariablesT]]
|
210
|
-
ignore_operation_servers: bool
|
211
|
-
ssl_ca_cert: Optional[str]
|
193
|
+
host: Optional[str]=None,
|
194
|
+
api_key: Optional[Dict[str, str]]=None,
|
195
|
+
api_key_prefix: Optional[Dict[str, str]]=None,
|
196
|
+
username: Optional[str]=None,
|
197
|
+
password: Optional[str]=None,
|
198
|
+
access_token: Optional[str]=None,
|
199
|
+
server_index: Optional[int]=None,
|
200
|
+
server_variables: Optional[ServerVariablesT]=None,
|
201
|
+
server_operation_index: Optional[Dict[int, int]]=None,
|
202
|
+
server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None,
|
203
|
+
ignore_operation_servers: bool=False,
|
204
|
+
ssl_ca_cert: Optional[str]=None,
|
212
205
|
retries: Optional[int] = None,
|
213
206
|
ca_cert_data: Optional[Union[str, bytes]] = None,
|
214
207
|
*,
|
215
208
|
debug: Optional[bool] = None,
|
216
209
|
) -> None:
|
217
|
-
"""Constructor
|
210
|
+
"""Constructor
|
211
|
+
"""
|
218
212
|
self._base_path = "http://localhost/v1/trade" if host is None else host
|
219
213
|
"""Default Base url
|
220
214
|
"""
|
@@ -260,7 +254,7 @@ class Configuration:
|
|
260
254
|
"""
|
261
255
|
self.logger["package_logger"] = logging.getLogger("client")
|
262
256
|
self.logger["urllib3_logger"] = logging.getLogger("urllib3")
|
263
|
-
self.logger_format =
|
257
|
+
self.logger_format = '%(asctime)s %(levelname)s %(message)s'
|
264
258
|
"""Log format
|
265
259
|
"""
|
266
260
|
self.logger_stream_handler = None
|
@@ -316,7 +310,7 @@ class Configuration:
|
|
316
310
|
self.proxy_headers = None
|
317
311
|
"""Proxy headers
|
318
312
|
"""
|
319
|
-
self.safe_chars_for_path_param =
|
313
|
+
self.safe_chars_for_path_param = ''
|
320
314
|
"""Safe chars for path_param
|
321
315
|
"""
|
322
316
|
self.retries = retries
|
@@ -337,12 +331,12 @@ class Configuration:
|
|
337
331
|
"""date format
|
338
332
|
"""
|
339
333
|
|
340
|
-
def __deepcopy__(self, memo:
|
334
|
+
def __deepcopy__(self, memo: Dict[int, Any]) -> Self:
|
341
335
|
cls = self.__class__
|
342
336
|
result = cls.__new__(cls)
|
343
337
|
memo[id(self)] = result
|
344
338
|
for k, v in self.__dict__.items():
|
345
|
-
if k not in (
|
339
|
+
if k not in ('logger', 'logger_file_handler'):
|
346
340
|
setattr(result, k, copy.deepcopy(v, memo))
|
347
341
|
# shallow copy of loggers
|
348
342
|
result.logger = copy.copy(self.logger)
|
@@ -474,9 +468,7 @@ class Configuration:
|
|
474
468
|
self.__logger_format = value
|
475
469
|
self.logger_formatter = logging.Formatter(self.__logger_format)
|
476
470
|
|
477
|
-
def get_api_key_with_prefix(
|
478
|
-
self, identifier: str, alias: Optional[str] = None
|
479
|
-
) -> Optional[str]:
|
471
|
+
def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]:
|
480
472
|
"""Gets API key (with prefix if set).
|
481
473
|
|
482
474
|
:param identifier: The identifier of apiKey.
|
@@ -485,9 +477,7 @@ class Configuration:
|
|
485
477
|
"""
|
486
478
|
if self.refresh_api_key_hook is not None:
|
487
479
|
self.refresh_api_key_hook(self)
|
488
|
-
key = self.api_key.get(
|
489
|
-
identifier, self.api_key.get(alias) if alias is not None else None
|
490
|
-
)
|
480
|
+
key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None)
|
491
481
|
if key:
|
492
482
|
prefix = self.api_key_prefix.get(identifier)
|
493
483
|
if prefix:
|
@@ -508,31 +498,31 @@ class Configuration:
|
|
508
498
|
password = ""
|
509
499
|
if self.password is not None:
|
510
500
|
password = self.password
|
511
|
-
return urllib3.util.make_headers(
|
512
|
-
|
513
|
-
)
|
501
|
+
return urllib3.util.make_headers(
|
502
|
+
basic_auth=username + ':' + password
|
503
|
+
).get('authorization')
|
514
504
|
|
515
|
-
def auth_settings(self)
|
505
|
+
def auth_settings(self)-> AuthSettings:
|
516
506
|
"""Gets Auth Settings dict for api client.
|
517
507
|
|
518
508
|
:return: The Auth Settings information dict.
|
519
509
|
"""
|
520
510
|
auth: AuthSettings = {}
|
521
511
|
if self.access_token is not None:
|
522
|
-
auth[
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
512
|
+
auth['HTTPBearer'] = {
|
513
|
+
'type': 'bearer',
|
514
|
+
'in': 'header',
|
515
|
+
'format': 'JWT',
|
516
|
+
'key': 'Authorization',
|
517
|
+
'value': 'Bearer ' + self.access_token
|
528
518
|
}
|
529
|
-
if
|
530
|
-
auth[
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
519
|
+
if 'APIKeyHeader' in self.api_key:
|
520
|
+
auth['APIKeyHeader'] = {
|
521
|
+
'type': 'api_key',
|
522
|
+
'in': 'header',
|
523
|
+
'key': 'X-API-Key',
|
524
|
+
'value': self.get_api_key_with_prefix(
|
525
|
+
'APIKeyHeader',
|
536
526
|
),
|
537
527
|
}
|
538
528
|
return auth
|
@@ -542,13 +532,12 @@ class Configuration:
|
|
542
532
|
|
543
533
|
:return: The report for debugging.
|
544
534
|
"""
|
545
|
-
return
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
)
|
535
|
+
return "Python SDK Debug Report:\n"\
|
536
|
+
"OS: {env}\n"\
|
537
|
+
"Python Version: {pyversion}\n"\
|
538
|
+
"Version of the API: 0.1.0\n"\
|
539
|
+
"SDK Package Version: 1.0.0".\
|
540
|
+
format(env=sys.platform, pyversion=sys.version)
|
552
541
|
|
553
542
|
def get_host_settings(self) -> List[HostSetting]:
|
554
543
|
"""Gets an array of host settings
|
@@ -557,16 +546,16 @@ class Configuration:
|
|
557
546
|
"""
|
558
547
|
return [
|
559
548
|
{
|
560
|
-
|
561
|
-
|
549
|
+
'url': "http://localhost/v1/trade",
|
550
|
+
'description': "No description provided",
|
562
551
|
}
|
563
552
|
]
|
564
553
|
|
565
554
|
def get_host_from_settings(
|
566
555
|
self,
|
567
556
|
index: Optional[int],
|
568
|
-
variables: Optional[ServerVariablesT]
|
569
|
-
servers: Optional[List[HostSetting]]
|
557
|
+
variables: Optional[ServerVariablesT]=None,
|
558
|
+
servers: Optional[List[HostSetting]]=None,
|
570
559
|
) -> str:
|
571
560
|
"""Gets host URL based on the index and variables
|
572
561
|
:param index: array index of the host settings
|
@@ -585,22 +574,22 @@ class Configuration:
|
|
585
574
|
except IndexError:
|
586
575
|
raise ValueError(
|
587
576
|
"Invalid index {0} when selecting the host settings. "
|
588
|
-
"Must be less than {1}".format(index, len(servers))
|
589
|
-
)
|
577
|
+
"Must be less than {1}".format(index, len(servers)))
|
590
578
|
|
591
|
-
url = server[
|
579
|
+
url = server['url']
|
592
580
|
|
593
581
|
# go through variables and replace placeholders
|
594
|
-
for variable_name, variable in server.get(
|
595
|
-
used_value = variables.get(
|
582
|
+
for variable_name, variable in server.get('variables', {}).items():
|
583
|
+
used_value = variables.get(
|
584
|
+
variable_name, variable['default_value'])
|
596
585
|
|
597
|
-
if
|
586
|
+
if 'enum_values' in variable \
|
587
|
+
and used_value not in variable['enum_values']:
|
598
588
|
raise ValueError(
|
599
589
|
"The variable `{0}` in the host URL has invalid value "
|
600
590
|
"{1}. Must be {2}.".format(
|
601
|
-
variable_name, variables[variable_name],
|
602
|
-
|
603
|
-
)
|
591
|
+
variable_name, variables[variable_name],
|
592
|
+
variable['enum_values']))
|
604
593
|
|
605
594
|
url = url.replace("{" + variable_name + "}", used_value)
|
606
595
|
|
@@ -609,9 +598,7 @@ class Configuration:
|
|
609
598
|
@property
|
610
599
|
def host(self) -> str:
|
611
600
|
"""Return generated host."""
|
612
|
-
return self.get_host_from_settings(
|
613
|
-
self.server_index, variables=self.server_variables
|
614
|
-
)
|
601
|
+
return self.get_host_from_settings(self.server_index, variables=self.server_variables)
|
615
602
|
|
616
603
|
@host.setter
|
617
604
|
def host(self, value: str) -> None:
|
@@ -1,29 +1,27 @@
|
|
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
|
from typing import Any, Optional
|
15
15
|
from typing_extensions import Self
|
16
16
|
|
17
|
-
|
18
17
|
class OpenApiException(Exception):
|
19
18
|
"""The base exception class for all OpenAPIExceptions"""
|
20
19
|
|
21
20
|
|
22
21
|
class ApiTypeError(OpenApiException, TypeError):
|
23
|
-
def __init__(
|
24
|
-
|
25
|
-
|
26
|
-
"""Raises an exception for TypeErrors
|
22
|
+
def __init__(self, msg, path_to_item=None, valid_classes=None,
|
23
|
+
key_type=None) -> None:
|
24
|
+
""" Raises an exception for TypeErrors
|
27
25
|
|
28
26
|
Args:
|
29
27
|
msg (str): the exception message
|
@@ -106,9 +104,9 @@ class ApiKeyError(OpenApiException, KeyError):
|
|
106
104
|
class ApiException(OpenApiException):
|
107
105
|
|
108
106
|
def __init__(
|
109
|
-
self,
|
110
|
-
status=None,
|
111
|
-
reason=None,
|
107
|
+
self,
|
108
|
+
status=None,
|
109
|
+
reason=None,
|
112
110
|
http_resp=None,
|
113
111
|
*,
|
114
112
|
body: Optional[str] = None,
|
@@ -127,17 +125,17 @@ class ApiException(OpenApiException):
|
|
127
125
|
self.reason = http_resp.reason
|
128
126
|
if self.body is None:
|
129
127
|
try:
|
130
|
-
self.body = http_resp.data.decode(
|
128
|
+
self.body = http_resp.data.decode('utf-8')
|
131
129
|
except Exception:
|
132
130
|
pass
|
133
131
|
self.headers = http_resp.getheaders()
|
134
132
|
|
135
133
|
@classmethod
|
136
134
|
def from_response(
|
137
|
-
cls,
|
138
|
-
*,
|
139
|
-
http_resp,
|
140
|
-
body: Optional[str],
|
135
|
+
cls,
|
136
|
+
*,
|
137
|
+
http_resp,
|
138
|
+
body: Optional[str],
|
141
139
|
data: Optional[Any],
|
142
140
|
) -> Self:
|
143
141
|
if http_resp.status == 400:
|
@@ -157,9 +155,7 @@ class ApiException(OpenApiException):
|
|
157
155
|
raise ConflictException(http_resp=http_resp, body=body, data=data)
|
158
156
|
|
159
157
|
if http_resp.status == 422:
|
160
|
-
raise UnprocessableEntityException(
|
161
|
-
http_resp=http_resp, body=body, data=data
|
162
|
-
)
|
158
|
+
raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data)
|
163
159
|
|
164
160
|
if 500 <= http_resp.status <= 599:
|
165
161
|
raise ServiceException(http_resp=http_resp, body=body, data=data)
|
@@ -167,9 +163,11 @@ class ApiException(OpenApiException):
|
|
167
163
|
|
168
164
|
def __str__(self):
|
169
165
|
"""Custom error messages for exception"""
|
170
|
-
error_message = "({0})\n"
|
166
|
+
error_message = "({0})\n"\
|
167
|
+
"Reason: {1}\n".format(self.status, self.reason)
|
171
168
|
if self.headers:
|
172
|
-
error_message += "HTTP response headers: {0}\n".format(
|
169
|
+
error_message += "HTTP response headers: {0}\n".format(
|
170
|
+
self.headers)
|
173
171
|
|
174
172
|
if self.data or self.body:
|
175
173
|
error_message += "HTTP response body: {0}\n".format(self.data or self.body)
|
@@ -199,13 +197,11 @@ class ServiceException(ApiException):
|
|
199
197
|
|
200
198
|
class ConflictException(ApiException):
|
201
199
|
"""Exception for HTTP 409 Conflict."""
|
202
|
-
|
203
200
|
pass
|
204
201
|
|
205
202
|
|
206
203
|
class UnprocessableEntityException(ApiException):
|
207
204
|
"""Exception for HTTP 422 Unprocessable Entity."""
|
208
|
-
|
209
205
|
pass
|
210
206
|
|
211
207
|
|
@@ -2,14 +2,14 @@
|
|
2
2
|
|
3
3
|
# flake8: noqa
|
4
4
|
"""
|
5
|
-
Trading API
|
5
|
+
Trading API
|
6
6
|
|
7
|
-
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
8
8
|
|
9
|
-
The version of the OpenAPI document: 0.1.0
|
10
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
9
|
+
The version of the OpenAPI document: 0.1.0
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
12
|
-
Do not edit the class manually.
|
12
|
+
Do not edit the class manually.
|
13
13
|
""" # noqa: E501
|
14
14
|
|
15
15
|
|
@@ -38,6 +38,4 @@ from crypticorn.trade.client.models.strategy_model_output import StrategyModelOu
|
|
38
38
|
from crypticorn.trade.client.models.tpsl import TPSL
|
39
39
|
from crypticorn.trade.client.models.trading_action_type import TradingActionType
|
40
40
|
from crypticorn.trade.client.models.validation_error import ValidationError
|
41
|
-
from crypticorn.trade.client.models.validation_error_loc_inner import
|
42
|
-
ValidationErrorLocInner,
|
43
|
-
)
|
41
|
+
from crypticorn.trade.client.models.validation_error_loc_inner import ValidationErrorLocInner
|