crypticorn 2.8.0rc8__py3-none-any.whl → 2.8.0rc9__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.
Files changed (47) hide show
  1. crypticorn/__init__.py +4 -0
  2. crypticorn/common/__init__.py +2 -0
  3. crypticorn/common/ansi_colors.py +2 -1
  4. crypticorn/common/auth.py +2 -2
  5. crypticorn/common/enums.py +2 -0
  6. crypticorn/common/errors.py +8 -5
  7. crypticorn/common/exceptions.py +24 -20
  8. crypticorn/common/logging.py +11 -13
  9. crypticorn/common/middleware.py +2 -1
  10. crypticorn/common/mixins.py +10 -3
  11. crypticorn/common/openapi.py +11 -0
  12. crypticorn/common/pagination.py +2 -0
  13. crypticorn/common/router/admin_router.py +3 -3
  14. crypticorn/common/router/status_router.py +9 -2
  15. crypticorn/common/scopes.py +3 -3
  16. crypticorn/common/urls.py +9 -0
  17. crypticorn/common/utils.py +16 -8
  18. crypticorn/common/warnings.py +63 -0
  19. crypticorn/hive/utils.py +1 -2
  20. crypticorn/metrics/client/__init__.py +11 -0
  21. crypticorn/metrics/client/api/__init__.py +2 -0
  22. crypticorn/metrics/client/api/admin_api.py +1452 -0
  23. crypticorn/metrics/client/api/exchanges_api.py +51 -40
  24. crypticorn/metrics/client/api/indicators_api.py +49 -32
  25. crypticorn/metrics/client/api/logs_api.py +7 -7
  26. crypticorn/metrics/client/api/marketcap_api.py +28 -25
  27. crypticorn/metrics/client/api/markets_api.py +50 -278
  28. crypticorn/metrics/client/api/quote_currencies_api.py +289 -0
  29. crypticorn/metrics/client/api/status_api.py +4 -231
  30. crypticorn/metrics/client/api/tokens_api.py +241 -37
  31. crypticorn/metrics/client/models/__init__.py +9 -0
  32. crypticorn/metrics/client/models/api_error_identifier.py +115 -0
  33. crypticorn/metrics/client/models/api_error_level.py +37 -0
  34. crypticorn/metrics/client/models/api_error_type.py +37 -0
  35. crypticorn/metrics/client/models/exception_detail.py +6 -3
  36. crypticorn/metrics/client/models/exchange_mapping.py +121 -0
  37. crypticorn/metrics/client/models/internal_exchange.py +39 -0
  38. crypticorn/metrics/client/models/log_level.py +38 -0
  39. crypticorn/metrics/client/models/market_type.py +35 -0
  40. crypticorn/metrics/client/models/marketcap_ranking.py +87 -0
  41. crypticorn/metrics/client/models/ohlcv.py +113 -0
  42. crypticorn/metrics/main.py +14 -2
  43. {crypticorn-2.8.0rc8.dist-info → crypticorn-2.8.0rc9.dist-info}/METADATA +3 -2
  44. {crypticorn-2.8.0rc8.dist-info → crypticorn-2.8.0rc9.dist-info}/RECORD +47 -34
  45. {crypticorn-2.8.0rc8.dist-info → crypticorn-2.8.0rc9.dist-info}/WHEEL +0 -0
  46. {crypticorn-2.8.0rc8.dist-info → crypticorn-2.8.0rc9.dist-info}/entry_points.txt +0 -0
  47. {crypticorn-2.8.0rc8.dist-info → crypticorn-2.8.0rc9.dist-info}/top_level.txt +0 -0
@@ -16,9 +16,7 @@ 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 Field, StrictStr, field_validator
20
19
  from typing import Any, Dict, List
21
- from typing_extensions import Annotated
22
20
 
23
21
  from crypticorn.metrics.client.api_client import ApiClient, RequestSerialized
24
22
  from crypticorn.metrics.client.api_response import ApiResponse
@@ -38,11 +36,235 @@ class TokensApi:
38
36
  self.api_client = api_client
39
37
 
40
38
  @validate_call
41
- async def get_stable_and_wrapped_tokens(
39
+ async def get_stable_tokens(
40
+ self,
41
+ _request_timeout: Union[
42
+ None,
43
+ Annotated[StrictFloat, Field(gt=0)],
44
+ Tuple[
45
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
46
+ ],
47
+ ] = None,
48
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
49
+ _content_type: Optional[StrictStr] = None,
50
+ _headers: Optional[Dict[StrictStr, Any]] = None,
51
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
52
+ ) -> List[Dict[str, object]]:
53
+ """Get Stable Tokens
54
+
55
+ Get list of stable tokens.
56
+
57
+ :param _request_timeout: timeout setting for this request. If one
58
+ number provided, it will be total request
59
+ timeout. It can also be a pair (tuple) of
60
+ (connection, read) timeouts.
61
+ :type _request_timeout: int, tuple(int, int), optional
62
+ :param _request_auth: set to override the auth_settings for an a single
63
+ request; this effectively ignores the
64
+ authentication in the spec for a single request.
65
+ :type _request_auth: dict, optional
66
+ :param _content_type: force content-type for the request.
67
+ :type _content_type: str, Optional
68
+ :param _headers: set to override the headers for a single
69
+ request; this effectively ignores the headers
70
+ in the spec for a single request.
71
+ :type _headers: dict, optional
72
+ :param _host_index: set to override the host_index for a single
73
+ request; this effectively ignores the host_index
74
+ in the spec for a single request.
75
+ :type _host_index: int, optional
76
+ :return: Returns the result object.
77
+ """ # noqa: E501
78
+
79
+ _param = self._get_stable_tokens_serialize(
80
+ _request_auth=_request_auth,
81
+ _content_type=_content_type,
82
+ _headers=_headers,
83
+ _host_index=_host_index,
84
+ )
85
+
86
+ _response_types_map: Dict[str, Optional[str]] = {
87
+ "200": "List[Dict[str, object]]",
88
+ }
89
+ response_data = await self.api_client.call_api(
90
+ *_param, _request_timeout=_request_timeout
91
+ )
92
+ await response_data.read()
93
+ return self.api_client.response_deserialize(
94
+ response_data=response_data,
95
+ response_types_map=_response_types_map,
96
+ ).data
97
+
98
+ @validate_call
99
+ async def get_stable_tokens_with_http_info(
100
+ self,
101
+ _request_timeout: Union[
102
+ None,
103
+ Annotated[StrictFloat, Field(gt=0)],
104
+ Tuple[
105
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
106
+ ],
107
+ ] = None,
108
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
109
+ _content_type: Optional[StrictStr] = None,
110
+ _headers: Optional[Dict[StrictStr, Any]] = None,
111
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
112
+ ) -> ApiResponse[List[Dict[str, object]]]:
113
+ """Get Stable Tokens
114
+
115
+ Get list of stable tokens.
116
+
117
+ :param _request_timeout: timeout setting for this request. If one
118
+ number provided, it will be total request
119
+ timeout. It can also be a pair (tuple) of
120
+ (connection, read) timeouts.
121
+ :type _request_timeout: int, tuple(int, int), optional
122
+ :param _request_auth: set to override the auth_settings for an a single
123
+ request; this effectively ignores the
124
+ authentication in the spec for a single request.
125
+ :type _request_auth: dict, optional
126
+ :param _content_type: force content-type for the request.
127
+ :type _content_type: str, Optional
128
+ :param _headers: set to override the headers for a single
129
+ request; this effectively ignores the headers
130
+ in the spec for a single request.
131
+ :type _headers: dict, optional
132
+ :param _host_index: set to override the host_index for a single
133
+ request; this effectively ignores the host_index
134
+ in the spec for a single request.
135
+ :type _host_index: int, optional
136
+ :return: Returns the result object.
137
+ """ # noqa: E501
138
+
139
+ _param = self._get_stable_tokens_serialize(
140
+ _request_auth=_request_auth,
141
+ _content_type=_content_type,
142
+ _headers=_headers,
143
+ _host_index=_host_index,
144
+ )
145
+
146
+ _response_types_map: Dict[str, Optional[str]] = {
147
+ "200": "List[Dict[str, object]]",
148
+ }
149
+ response_data = await self.api_client.call_api(
150
+ *_param, _request_timeout=_request_timeout
151
+ )
152
+ await response_data.read()
153
+ return self.api_client.response_deserialize(
154
+ response_data=response_data,
155
+ response_types_map=_response_types_map,
156
+ )
157
+
158
+ @validate_call
159
+ async def get_stable_tokens_without_preload_content(
160
+ self,
161
+ _request_timeout: Union[
162
+ None,
163
+ Annotated[StrictFloat, Field(gt=0)],
164
+ Tuple[
165
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
166
+ ],
167
+ ] = None,
168
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
169
+ _content_type: Optional[StrictStr] = None,
170
+ _headers: Optional[Dict[StrictStr, Any]] = None,
171
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
172
+ ) -> RESTResponseType:
173
+ """Get Stable Tokens
174
+
175
+ Get list of stable tokens.
176
+
177
+ :param _request_timeout: timeout setting for this request. If one
178
+ number provided, it will be total request
179
+ timeout. It can also be a pair (tuple) of
180
+ (connection, read) timeouts.
181
+ :type _request_timeout: int, tuple(int, int), optional
182
+ :param _request_auth: set to override the auth_settings for an a single
183
+ request; this effectively ignores the
184
+ authentication in the spec for a single request.
185
+ :type _request_auth: dict, optional
186
+ :param _content_type: force content-type for the request.
187
+ :type _content_type: str, Optional
188
+ :param _headers: set to override the headers for a single
189
+ request; this effectively ignores the headers
190
+ in the spec for a single request.
191
+ :type _headers: dict, optional
192
+ :param _host_index: set to override the host_index for a single
193
+ request; this effectively ignores the host_index
194
+ in the spec for a single request.
195
+ :type _host_index: int, optional
196
+ :return: Returns the result object.
197
+ """ # noqa: E501
198
+
199
+ _param = self._get_stable_tokens_serialize(
200
+ _request_auth=_request_auth,
201
+ _content_type=_content_type,
202
+ _headers=_headers,
203
+ _host_index=_host_index,
204
+ )
205
+
206
+ _response_types_map: Dict[str, Optional[str]] = {
207
+ "200": "List[Dict[str, object]]",
208
+ }
209
+ response_data = await self.api_client.call_api(
210
+ *_param, _request_timeout=_request_timeout
211
+ )
212
+ return response_data.response
213
+
214
+ def _get_stable_tokens_serialize(
215
+ self,
216
+ _request_auth,
217
+ _content_type,
218
+ _headers,
219
+ _host_index,
220
+ ) -> RequestSerialized:
221
+
222
+ _host = None
223
+
224
+ _collection_formats: Dict[str, str] = {}
225
+
226
+ _path_params: Dict[str, str] = {}
227
+ _query_params: List[Tuple[str, str]] = []
228
+ _header_params: Dict[str, Optional[str]] = _headers or {}
229
+ _form_params: List[Tuple[str, str]] = []
230
+ _files: Dict[
231
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
232
+ ] = {}
233
+ _body_params: Optional[bytes] = None
234
+
235
+ # process the path parameters
236
+ # process the query parameters
237
+ # process the header parameters
238
+ # process the form parameters
239
+ # process the body parameter
240
+
241
+ # set the HTTP header `Accept`
242
+ if "Accept" not in _header_params:
243
+ _header_params["Accept"] = self.api_client.select_header_accept(
244
+ ["application/json"]
245
+ )
246
+
247
+ # authentication setting
248
+ _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
249
+
250
+ return self.api_client.param_serialize(
251
+ method="GET",
252
+ resource_path="/tokens/stables",
253
+ path_params=_path_params,
254
+ query_params=_query_params,
255
+ header_params=_header_params,
256
+ body=_body_params,
257
+ post_params=_form_params,
258
+ files=_files,
259
+ auth_settings=_auth_settings,
260
+ collection_formats=_collection_formats,
261
+ _host=_host,
262
+ _request_auth=_request_auth,
263
+ )
264
+
265
+ @validate_call
266
+ async def get_wrapped_tokens(
42
267
  self,
43
- token_type: Annotated[
44
- StrictStr, Field(description="Token type (stable or wrapped)")
45
- ],
46
268
  _request_timeout: Union[
47
269
  None,
48
270
  Annotated[StrictFloat, Field(gt=0)],
@@ -55,12 +277,10 @@ class TokensApi:
55
277
  _headers: Optional[Dict[StrictStr, Any]] = None,
56
278
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
57
279
  ) -> List[Dict[str, object]]:
58
- """Get Stable Wrapped Tokens
280
+ """Get Wrapped Tokens
59
281
 
60
- Get list of stable or wrapped tokens.
282
+ Get list of wrapped tokens.
61
283
 
62
- :param token_type: Token type (stable or wrapped) (required)
63
- :type token_type: str
64
284
  :param _request_timeout: timeout setting for this request. If one
65
285
  number provided, it will be total request
66
286
  timeout. It can also be a pair (tuple) of
@@ -83,8 +303,7 @@ class TokensApi:
83
303
  :return: Returns the result object.
84
304
  """ # noqa: E501
85
305
 
86
- _param = self._get_stable_and_wrapped_tokens_serialize(
87
- token_type=token_type,
306
+ _param = self._get_wrapped_tokens_serialize(
88
307
  _request_auth=_request_auth,
89
308
  _content_type=_content_type,
90
309
  _headers=_headers,
@@ -104,11 +323,8 @@ class TokensApi:
104
323
  ).data
105
324
 
106
325
  @validate_call
107
- async def get_stable_and_wrapped_tokens_with_http_info(
326
+ async def get_wrapped_tokens_with_http_info(
108
327
  self,
109
- token_type: Annotated[
110
- StrictStr, Field(description="Token type (stable or wrapped)")
111
- ],
112
328
  _request_timeout: Union[
113
329
  None,
114
330
  Annotated[StrictFloat, Field(gt=0)],
@@ -121,12 +337,10 @@ class TokensApi:
121
337
  _headers: Optional[Dict[StrictStr, Any]] = None,
122
338
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
123
339
  ) -> ApiResponse[List[Dict[str, object]]]:
124
- """Get Stable Wrapped Tokens
340
+ """Get Wrapped Tokens
125
341
 
126
- Get list of stable or wrapped tokens.
342
+ Get list of wrapped tokens.
127
343
 
128
- :param token_type: Token type (stable or wrapped) (required)
129
- :type token_type: str
130
344
  :param _request_timeout: timeout setting for this request. If one
131
345
  number provided, it will be total request
132
346
  timeout. It can also be a pair (tuple) of
@@ -149,8 +363,7 @@ class TokensApi:
149
363
  :return: Returns the result object.
150
364
  """ # noqa: E501
151
365
 
152
- _param = self._get_stable_and_wrapped_tokens_serialize(
153
- token_type=token_type,
366
+ _param = self._get_wrapped_tokens_serialize(
154
367
  _request_auth=_request_auth,
155
368
  _content_type=_content_type,
156
369
  _headers=_headers,
@@ -170,11 +383,8 @@ class TokensApi:
170
383
  )
171
384
 
172
385
  @validate_call
173
- async def get_stable_and_wrapped_tokens_without_preload_content(
386
+ async def get_wrapped_tokens_without_preload_content(
174
387
  self,
175
- token_type: Annotated[
176
- StrictStr, Field(description="Token type (stable or wrapped)")
177
- ],
178
388
  _request_timeout: Union[
179
389
  None,
180
390
  Annotated[StrictFloat, Field(gt=0)],
@@ -187,12 +397,10 @@ class TokensApi:
187
397
  _headers: Optional[Dict[StrictStr, Any]] = None,
188
398
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
189
399
  ) -> RESTResponseType:
190
- """Get Stable Wrapped Tokens
400
+ """Get Wrapped Tokens
191
401
 
192
- Get list of stable or wrapped tokens.
402
+ Get list of wrapped tokens.
193
403
 
194
- :param token_type: Token type (stable or wrapped) (required)
195
- :type token_type: str
196
404
  :param _request_timeout: timeout setting for this request. If one
197
405
  number provided, it will be total request
198
406
  timeout. It can also be a pair (tuple) of
@@ -215,8 +423,7 @@ class TokensApi:
215
423
  :return: Returns the result object.
216
424
  """ # noqa: E501
217
425
 
218
- _param = self._get_stable_and_wrapped_tokens_serialize(
219
- token_type=token_type,
426
+ _param = self._get_wrapped_tokens_serialize(
220
427
  _request_auth=_request_auth,
221
428
  _content_type=_content_type,
222
429
  _headers=_headers,
@@ -231,9 +438,8 @@ class TokensApi:
231
438
  )
232
439
  return response_data.response
233
440
 
234
- def _get_stable_and_wrapped_tokens_serialize(
441
+ def _get_wrapped_tokens_serialize(
235
442
  self,
236
- token_type,
237
443
  _request_auth,
238
444
  _content_type,
239
445
  _headers,
@@ -254,8 +460,6 @@ class TokensApi:
254
460
  _body_params: Optional[bytes] = None
255
461
 
256
462
  # process the path parameters
257
- if token_type is not None:
258
- _path_params["token_type"] = token_type
259
463
  # process the query parameters
260
464
  # process the header parameters
261
465
  # process the form parameters
@@ -272,7 +476,7 @@ class TokensApi:
272
476
 
273
477
  return self.api_client.param_serialize(
274
478
  method="GET",
275
- resource_path="/tokens/{token_type}",
479
+ resource_path="/tokens/wrapped",
276
480
  path_params=_path_params,
277
481
  query_params=_query_params,
278
482
  header_params=_header_params,
@@ -14,7 +14,16 @@ Do not edit the class manually.
14
14
 
15
15
 
16
16
  # import models into model package
17
+ from crypticorn.metrics.client.models.api_error_identifier import ApiErrorIdentifier
18
+ from crypticorn.metrics.client.models.api_error_level import ApiErrorLevel
19
+ from crypticorn.metrics.client.models.api_error_type import ApiErrorType
17
20
  from crypticorn.metrics.client.models.exception_detail import ExceptionDetail
21
+ from crypticorn.metrics.client.models.exchange_mapping import ExchangeMapping
22
+ from crypticorn.metrics.client.models.internal_exchange import InternalExchange
23
+ from crypticorn.metrics.client.models.log_level import LogLevel
24
+ from crypticorn.metrics.client.models.market_type import MarketType
25
+ from crypticorn.metrics.client.models.marketcap_ranking import MarketcapRanking
26
+ from crypticorn.metrics.client.models.ohlcv import OHLCV
18
27
  from crypticorn.metrics.client.models.severity import Severity
19
28
  from crypticorn.metrics.client.models.time_interval import TimeInterval
20
29
  from crypticorn.metrics.client.models.trading_status import TradingStatus
@@ -0,0 +1,115 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Marketcap Service API
5
+
6
+ API for retrieving historical marketcap data, available exchanges, and indicators.
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import json
17
+ from enum import Enum
18
+ from typing_extensions import Self
19
+
20
+
21
+ class ApiErrorIdentifier(str, Enum):
22
+ """
23
+ API error identifiers
24
+ """
25
+
26
+ """
27
+ allowed enum values
28
+ """
29
+ ALLOCATION_BELOW_CURRENT_EXPOSURE = "allocation_below_current_exposure"
30
+ ALLOCATION_BELOW_MIN_AMOUNT = "allocation_below_min_amount"
31
+ BLACK_SWAN = "black_swan"
32
+ BOT_ALREADY_DELETED = "bot_already_deleted"
33
+ BOT_DISABLED = "bot_disabled"
34
+ BOT_STOPPING_COMPLETED = "bot_stopping_completed"
35
+ BOT_STOPPING_STARTED = "bot_stopping_started"
36
+ CLIENT_ORDER_ID_ALREADY_EXISTS = "client_order_id_already_exists"
37
+ INVALID_CONTENT_TYPE = "invalid_content_type"
38
+ DELETE_BOT_ERROR = "delete_bot_error"
39
+ EXCHANGE_INVALID_SIGNATURE = "exchange_invalid_signature"
40
+ EXCHANGE_INVALID_TIMESTAMP = "exchange_invalid_timestamp"
41
+ EXCHANGE_IP_ADDRESS_IS_NOT_AUTHORIZED = "exchange_ip_address_is_not_authorized"
42
+ EXCHANGE_KEY_ALREADY_EXISTS = "exchange_key_already_exists"
43
+ EXCHANGE_KEY_IN_USE = "exchange_key_in_use"
44
+ EXCHANGE_SYSTEM_UNDER_MAINTENANCE = "exchange_system_under_maintenance"
45
+ EXCHANGE_RATE_LIMIT_EXCEEDED = "exchange_rate_limit_exceeded"
46
+ INSUFFICIENT_PERMISSIONS_SPOT_AND_FUTURES_REQUIRED = (
47
+ "insufficient_permissions_spot_and_futures_required"
48
+ )
49
+ EXCHANGE_SERVICE_TEMPORARILY_UNAVAILABLE = (
50
+ "exchange_service_temporarily_unavailable"
51
+ )
52
+ EXCHANGE_SYSTEM_IS_BUSY = "exchange_system_is_busy"
53
+ EXCHANGE_SYSTEM_CONFIGURATION_ERROR = "exchange_system_configuration_error"
54
+ EXCHANGE_INTERNAL_SYSTEM_ERROR = "exchange_internal_system_error"
55
+ EXCHANGE_USER_ACCOUNT_IS_FROZEN = "exchange_user_account_is_frozen"
56
+ API_KEY_EXPIRED = "api_key_expired"
57
+ BEARER_TOKEN_EXPIRED = "bearer_token_expired"
58
+ FORBIDDEN = "forbidden"
59
+ HEDGE_MODE_NOT_ACTIVE = "hedge_mode_not_active"
60
+ HTTP_REQUEST_ERROR = "http_request_error"
61
+ INSUFFICIENT_BALANCE = "insufficient_balance"
62
+ INSUFFICIENT_MARGIN = "insufficient_margin"
63
+ INSUFFICIENT_SCOPES = "insufficient_scopes"
64
+ INVALID_API_KEY = "invalid_api_key"
65
+ INVALID_BEARER = "invalid_bearer"
66
+ INVALID_DATA = "invalid_data"
67
+ INVALID_DATA_RESPONSE = "invalid_data_response"
68
+ INVALID_EXCHANGE_KEY = "invalid_exchange_key"
69
+ INVALID_MARGIN_MODE = "invalid_margin_mode"
70
+ INVALID_MODEL_NAME = "invalid_model_name"
71
+ INVALID_PARAMETER_PROVIDED = "invalid_parameter_provided"
72
+ LEVERAGE_LIMIT_EXCEEDED = "leverage_limit_exceeded"
73
+ ORDER_VIOLATES_LIQUIDATION_PRICE_CONSTRAINTS = (
74
+ "order_violates_liquidation_price_constraints"
75
+ )
76
+ MODEL_NAME_NOT_UNIQUE = "model_name_not_unique"
77
+ NO_CREDENTIALS = "no_credentials"
78
+ NOW_API_DOWN = "now_api_down"
79
+ OBJECT_ALREADY_EXISTS = "object_already_exists"
80
+ OBJECT_CREATED = "object_created"
81
+ OBJECT_DELETED = "object_deleted"
82
+ OBJECT_NOT_FOUND = "object_not_found"
83
+ OBJECT_UPDATED = "object_updated"
84
+ ORDER_IS_ALREADY_FILLED = "order_is_already_filled"
85
+ ORDER_IS_BEING_PROCESSED = "order_is_being_processed"
86
+ ORDER_QUANTITY_LIMIT_EXCEEDED = "order_quantity_limit_exceeded"
87
+ ORDER_DOES_NOT_EXIST = "order_does_not_exist"
88
+ ORDER_PRICE_IS_INVALID = "order_price_is_invalid"
89
+ ORDER_SIZE_TOO_LARGE = "order_size_too_large"
90
+ ORDER_SIZE_TOO_SMALL = "order_size_too_small"
91
+ POSITION_LIMIT_EXCEEDED = "position_limit_exceeded"
92
+ POSITION_DOES_NOT_EXIST = "position_does_not_exist"
93
+ POSITION_OPENING_TEMPORARILY_SUSPENDED = "position_opening_temporarily_suspended"
94
+ POST_ONLY_ORDER_WOULD_IMMEDIATELY_MATCH = "post_only_order_would_immediately_match"
95
+ REQUEST_SCOPE_LIMIT_EXCEEDED = "request_scope_limit_exceeded"
96
+ RISK_LIMIT_EXCEEDED = "risk_limit_exceeded"
97
+ RPC_TIMEOUT = "rpc_timeout"
98
+ SYSTEM_SETTLEMENT_IN_PROCESS = "system_settlement_in_process"
99
+ STRATEGY_ALREADY_EXISTS = "strategy_already_exists"
100
+ STRATEGY_DISABLED = "strategy_disabled"
101
+ STRATEGY_LEVERAGE_MISMATCH = "strategy_leverage_mismatch"
102
+ STRATEGY_NOT_SUPPORTING_EXCHANGE = "strategy_not_supporting_exchange"
103
+ SUCCESS = "success"
104
+ SYMBOL_DOES_NOT_EXIST = "symbol_does_not_exist"
105
+ TRADING_ACTION_EXPIRED = "trading_action_expired"
106
+ TRADING_ACTION_SKIPPED = "trading_action_skipped"
107
+ TRADING_HAS_BEEN_LOCKED = "trading_has_been_locked"
108
+ TRADING_IS_SUSPENDED = "trading_is_suspended"
109
+ UNKNOWN_ERROR_OCCURRED = "unknown_error_occurred"
110
+ REQUESTED_RESOURCE_NOT_FOUND = "requested_resource_not_found"
111
+
112
+ @classmethod
113
+ def from_json(cls, json_str: str) -> Self:
114
+ """Create an instance of ApiErrorIdentifier from a JSON string"""
115
+ return cls(json.loads(json_str))
@@ -0,0 +1,37 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Marketcap Service API
5
+
6
+ API for retrieving historical marketcap data, available exchanges, and indicators.
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import json
17
+ from enum import Enum
18
+ from typing_extensions import Self
19
+
20
+
21
+ class ApiErrorLevel(str, Enum):
22
+ """
23
+ API error levels
24
+ """
25
+
26
+ """
27
+ allowed enum values
28
+ """
29
+ ERROR = "error"
30
+ INFO = "info"
31
+ SUCCESS = "success"
32
+ WARNING = "warning"
33
+
34
+ @classmethod
35
+ def from_json(cls, json_str: str) -> Self:
36
+ """Create an instance of ApiErrorLevel from a JSON string"""
37
+ return cls(json.loads(json_str))
@@ -0,0 +1,37 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Marketcap Service API
5
+
6
+ API for retrieving historical marketcap data, available exchanges, and indicators.
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import json
17
+ from enum import Enum
18
+ from typing_extensions import Self
19
+
20
+
21
+ class ApiErrorType(str, Enum):
22
+ """
23
+ Type of API error
24
+ """
25
+
26
+ """
27
+ allowed enum values
28
+ """
29
+ USER_ERROR = "user error"
30
+ EXCHANGE_ERROR = "exchange error"
31
+ SERVER_ERROR = "server error"
32
+ NO_ERROR = "no error"
33
+
34
+ @classmethod
35
+ def from_json(cls, json_str: str) -> Self:
36
+ """Create an instance of ApiErrorType from a JSON string"""
37
+ return cls(json.loads(json_str))
@@ -19,6 +19,9 @@ import json
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
+ from crypticorn.metrics.client.models.api_error_identifier import ApiErrorIdentifier
23
+ from crypticorn.metrics.client.models.api_error_level import ApiErrorLevel
24
+ from crypticorn.metrics.client.models.api_error_type import ApiErrorType
22
25
  from typing import Optional, Set
23
26
  from typing_extensions import Self
24
27
 
@@ -29,9 +32,9 @@ class ExceptionDetail(BaseModel):
29
32
  """ # noqa: E501
30
33
 
31
34
  message: Optional[StrictStr] = None
32
- code: StrictStr = Field(description="API error identifiers")
33
- type: StrictStr = Field(description="Type of API error")
34
- level: StrictStr = Field(description="API error levels")
35
+ code: ApiErrorIdentifier = Field(description="The unique error code")
36
+ type: ApiErrorType = Field(description="The type of error")
37
+ level: ApiErrorLevel = Field(description="The level of the error")
35
38
  status_code: StrictInt = Field(description="The HTTP status code")
36
39
  details: Optional[Any] = None
37
40
  __properties: ClassVar[List[str]] = [