crypticorn 2.7.4__py3-none-any.whl → 2.8.0__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/__init__.py +8 -1
- crypticorn/auth/client/models/create_api_key_request.py +3 -1
- crypticorn/auth/client/models/get_api_keys200_response_inner.py +3 -1
- crypticorn/client.py +34 -16
- crypticorn/common/__init__.py +5 -1
- crypticorn/common/ansi_colors.py +37 -0
- crypticorn/common/auth.py +3 -1
- crypticorn/common/exceptions.py +29 -11
- crypticorn/common/logging.py +126 -0
- crypticorn/common/middleware.py +27 -0
- crypticorn/common/mixins.py +2 -1
- crypticorn/common/router/admin_router.py +100 -0
- crypticorn/common/router/status_router.py +24 -0
- crypticorn/common/scopes.py +5 -0
- crypticorn/hive/client/__init__.py +6 -3
- crypticorn/hive/client/api/__init__.py +1 -0
- crypticorn/hive/client/api/admin_api.py +1452 -0
- crypticorn/hive/client/api/models_api.py +7 -7
- crypticorn/hive/client/api/status_api.py +4 -231
- crypticorn/hive/client/models/__init__.py +5 -3
- crypticorn/hive/client/models/api_error_identifier.py +115 -0
- crypticorn/hive/client/models/api_error_level.py +37 -0
- crypticorn/hive/client/models/api_error_type.py +37 -0
- crypticorn/hive/client/models/data_info.py +27 -5
- crypticorn/hive/client/models/data_options.py +92 -0
- crypticorn/hive/client/models/exception_detail.py +6 -3
- crypticorn/hive/client/models/log_level.py +38 -0
- crypticorn/hive/client/models/model.py +3 -3
- crypticorn/hive/main.py +22 -3
- crypticorn/hive/utils.py +1 -2
- crypticorn/metrics/client/__init__.py +11 -0
- crypticorn/metrics/client/api/__init__.py +2 -0
- crypticorn/metrics/client/api/admin_api.py +1452 -0
- crypticorn/metrics/client/api/exchanges_api.py +51 -40
- crypticorn/metrics/client/api/indicators_api.py +49 -32
- crypticorn/metrics/client/api/logs_api.py +7 -7
- crypticorn/metrics/client/api/marketcap_api.py +28 -25
- crypticorn/metrics/client/api/markets_api.py +50 -278
- crypticorn/metrics/client/api/quote_currencies_api.py +289 -0
- crypticorn/metrics/client/api/status_api.py +4 -231
- crypticorn/metrics/client/api/tokens_api.py +241 -37
- crypticorn/metrics/client/models/__init__.py +9 -0
- crypticorn/metrics/client/models/api_error_identifier.py +115 -0
- crypticorn/metrics/client/models/api_error_level.py +37 -0
- crypticorn/metrics/client/models/api_error_type.py +37 -0
- crypticorn/metrics/client/models/exception_detail.py +6 -3
- crypticorn/metrics/client/models/exchange_mapping.py +121 -0
- crypticorn/metrics/client/models/internal_exchange.py +39 -0
- crypticorn/metrics/client/models/log_level.py +38 -0
- crypticorn/metrics/client/models/market_type.py +35 -0
- crypticorn/metrics/client/models/marketcap_ranking.py +87 -0
- crypticorn/metrics/client/models/ohlcv.py +113 -0
- crypticorn/metrics/main.py +14 -2
- crypticorn/pay/client/__init__.py +3 -0
- crypticorn/pay/client/api/__init__.py +1 -0
- crypticorn/pay/client/api/admin_api.py +1453 -0
- crypticorn/pay/client/api/status_api.py +4 -231
- crypticorn/pay/client/models/__init__.py +2 -0
- crypticorn/pay/client/models/log_level.py +38 -0
- crypticorn/{hive/client/models/data_value_value_value_inner.py → pay/client/models/response_getuptime.py} +36 -31
- crypticorn/pay/client/models/scope.py +2 -0
- crypticorn/pay/main.py +2 -0
- {crypticorn-2.7.4.dist-info → crypticorn-2.8.0.dist-info}/METADATA +46 -21
- {crypticorn-2.7.4.dist-info → crypticorn-2.8.0.dist-info}/RECORD +67 -44
- {crypticorn-2.7.4.dist-info → crypticorn-2.8.0.dist-info}/WHEEL +1 -1
- crypticorn/common/status_router.py +0 -44
- {crypticorn-2.7.4.dist-info → crypticorn-2.8.0.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.7.4.dist-info → crypticorn-2.8.0.dist-info}/top_level.txt +0 -0
@@ -281,7 +281,7 @@ class ModelsApi:
|
|
281
281
|
|
282
282
|
return self.api_client.param_serialize(
|
283
283
|
method="POST",
|
284
|
-
resource_path="/
|
284
|
+
resource_path="/models/creation",
|
285
285
|
path_params=_path_params,
|
286
286
|
query_params=_query_params,
|
287
287
|
header_params=_header_params,
|
@@ -523,7 +523,7 @@ class ModelsApi:
|
|
523
523
|
|
524
524
|
return self.api_client.param_serialize(
|
525
525
|
method="DELETE",
|
526
|
-
resource_path="/
|
526
|
+
resource_path="/models/{id}",
|
527
527
|
path_params=_path_params,
|
528
528
|
query_params=_query_params,
|
529
529
|
header_params=_header_params,
|
@@ -815,7 +815,7 @@ class ModelsApi:
|
|
815
815
|
|
816
816
|
return self.api_client.param_serialize(
|
817
817
|
method="POST",
|
818
|
-
resource_path="/
|
818
|
+
resource_path="/models/evaluation/{id}",
|
819
819
|
path_params=_path_params,
|
820
820
|
query_params=_query_params,
|
821
821
|
header_params=_header_params,
|
@@ -1057,7 +1057,7 @@ class ModelsApi:
|
|
1057
1057
|
|
1058
1058
|
return self.api_client.param_serialize(
|
1059
1059
|
method="GET",
|
1060
|
-
resource_path="/
|
1060
|
+
resource_path="/models/{id}",
|
1061
1061
|
path_params=_path_params,
|
1062
1062
|
query_params=_query_params,
|
1063
1063
|
header_params=_header_params,
|
@@ -1299,7 +1299,7 @@ class ModelsApi:
|
|
1299
1299
|
|
1300
1300
|
return self.api_client.param_serialize(
|
1301
1301
|
method="GET",
|
1302
|
-
resource_path="/
|
1302
|
+
resource_path="/models/by-name/{name}",
|
1303
1303
|
path_params=_path_params,
|
1304
1304
|
query_params=_query_params,
|
1305
1305
|
header_params=_header_params,
|
@@ -1590,7 +1590,7 @@ class ModelsApi:
|
|
1590
1590
|
|
1591
1591
|
return self.api_client.param_serialize(
|
1592
1592
|
method="GET",
|
1593
|
-
resource_path="/
|
1593
|
+
resource_path="/models",
|
1594
1594
|
path_params=_path_params,
|
1595
1595
|
query_params=_query_params,
|
1596
1596
|
header_params=_header_params,
|
@@ -1857,7 +1857,7 @@ class ModelsApi:
|
|
1857
1857
|
|
1858
1858
|
return self.api_client.param_serialize(
|
1859
1859
|
method="PUT",
|
1860
|
-
resource_path="/
|
1860
|
+
resource_path="/models/{id}",
|
1861
1861
|
path_params=_path_params,
|
1862
1862
|
query_params=_query_params,
|
1863
1863
|
header_params=_header_params,
|
@@ -17,7 +17,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
17
|
from typing_extensions import Annotated
|
18
18
|
|
19
19
|
from pydantic import StrictStr, field_validator
|
20
|
-
from typing import
|
20
|
+
from typing import Optional
|
21
21
|
|
22
22
|
from crypticorn.hive.client.api_client import ApiClient, RequestSerialized
|
23
23
|
from crypticorn.hive.client.api_response import ApiResponse
|
@@ -36,233 +36,6 @@ class StatusApi:
|
|
36
36
|
api_client = ApiClient.get_default()
|
37
37
|
self.api_client = api_client
|
38
38
|
|
39
|
-
@validate_call
|
40
|
-
async def get_config(
|
41
|
-
self,
|
42
|
-
_request_timeout: Union[
|
43
|
-
None,
|
44
|
-
Annotated[StrictFloat, Field(gt=0)],
|
45
|
-
Tuple[
|
46
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
47
|
-
],
|
48
|
-
] = None,
|
49
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
50
|
-
_content_type: Optional[StrictStr] = None,
|
51
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
52
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
53
|
-
) -> Dict[str, object]:
|
54
|
-
"""Config
|
55
|
-
|
56
|
-
Returns the version of the crypticorn library and the environment.
|
57
|
-
|
58
|
-
:param _request_timeout: timeout setting for this request. If one
|
59
|
-
number provided, it will be total request
|
60
|
-
timeout. It can also be a pair (tuple) of
|
61
|
-
(connection, read) timeouts.
|
62
|
-
:type _request_timeout: int, tuple(int, int), optional
|
63
|
-
:param _request_auth: set to override the auth_settings for an a single
|
64
|
-
request; this effectively ignores the
|
65
|
-
authentication in the spec for a single request.
|
66
|
-
:type _request_auth: dict, optional
|
67
|
-
:param _content_type: force content-type for the request.
|
68
|
-
:type _content_type: str, Optional
|
69
|
-
:param _headers: set to override the headers for a single
|
70
|
-
request; this effectively ignores the headers
|
71
|
-
in the spec for a single request.
|
72
|
-
:type _headers: dict, optional
|
73
|
-
:param _host_index: set to override the host_index for a single
|
74
|
-
request; this effectively ignores the host_index
|
75
|
-
in the spec for a single request.
|
76
|
-
:type _host_index: int, optional
|
77
|
-
:return: Returns the result object.
|
78
|
-
""" # noqa: E501
|
79
|
-
|
80
|
-
_param = self._get_config_serialize(
|
81
|
-
_request_auth=_request_auth,
|
82
|
-
_content_type=_content_type,
|
83
|
-
_headers=_headers,
|
84
|
-
_host_index=_host_index,
|
85
|
-
)
|
86
|
-
|
87
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
88
|
-
"200": "Dict[str, object]",
|
89
|
-
}
|
90
|
-
response_data = await self.api_client.call_api(
|
91
|
-
*_param, _request_timeout=_request_timeout
|
92
|
-
)
|
93
|
-
await response_data.read()
|
94
|
-
return self.api_client.response_deserialize(
|
95
|
-
response_data=response_data,
|
96
|
-
response_types_map=_response_types_map,
|
97
|
-
).data
|
98
|
-
|
99
|
-
@validate_call
|
100
|
-
async def get_config_with_http_info(
|
101
|
-
self,
|
102
|
-
_request_timeout: Union[
|
103
|
-
None,
|
104
|
-
Annotated[StrictFloat, Field(gt=0)],
|
105
|
-
Tuple[
|
106
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
107
|
-
],
|
108
|
-
] = None,
|
109
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
110
|
-
_content_type: Optional[StrictStr] = None,
|
111
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
112
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
113
|
-
) -> ApiResponse[Dict[str, object]]:
|
114
|
-
"""Config
|
115
|
-
|
116
|
-
Returns the version of the crypticorn library and the environment.
|
117
|
-
|
118
|
-
:param _request_timeout: timeout setting for this request. If one
|
119
|
-
number provided, it will be total request
|
120
|
-
timeout. It can also be a pair (tuple) of
|
121
|
-
(connection, read) timeouts.
|
122
|
-
:type _request_timeout: int, tuple(int, int), optional
|
123
|
-
:param _request_auth: set to override the auth_settings for an a single
|
124
|
-
request; this effectively ignores the
|
125
|
-
authentication in the spec for a single request.
|
126
|
-
:type _request_auth: dict, optional
|
127
|
-
:param _content_type: force content-type for the request.
|
128
|
-
:type _content_type: str, Optional
|
129
|
-
:param _headers: set to override the headers for a single
|
130
|
-
request; this effectively ignores the headers
|
131
|
-
in the spec for a single request.
|
132
|
-
:type _headers: dict, optional
|
133
|
-
:param _host_index: set to override the host_index for a single
|
134
|
-
request; this effectively ignores the host_index
|
135
|
-
in the spec for a single request.
|
136
|
-
:type _host_index: int, optional
|
137
|
-
:return: Returns the result object.
|
138
|
-
""" # noqa: E501
|
139
|
-
|
140
|
-
_param = self._get_config_serialize(
|
141
|
-
_request_auth=_request_auth,
|
142
|
-
_content_type=_content_type,
|
143
|
-
_headers=_headers,
|
144
|
-
_host_index=_host_index,
|
145
|
-
)
|
146
|
-
|
147
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
148
|
-
"200": "Dict[str, object]",
|
149
|
-
}
|
150
|
-
response_data = await self.api_client.call_api(
|
151
|
-
*_param, _request_timeout=_request_timeout
|
152
|
-
)
|
153
|
-
await response_data.read()
|
154
|
-
return self.api_client.response_deserialize(
|
155
|
-
response_data=response_data,
|
156
|
-
response_types_map=_response_types_map,
|
157
|
-
)
|
158
|
-
|
159
|
-
@validate_call
|
160
|
-
async def get_config_without_preload_content(
|
161
|
-
self,
|
162
|
-
_request_timeout: Union[
|
163
|
-
None,
|
164
|
-
Annotated[StrictFloat, Field(gt=0)],
|
165
|
-
Tuple[
|
166
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
167
|
-
],
|
168
|
-
] = None,
|
169
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
170
|
-
_content_type: Optional[StrictStr] = None,
|
171
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
172
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
173
|
-
) -> RESTResponseType:
|
174
|
-
"""Config
|
175
|
-
|
176
|
-
Returns the version of the crypticorn library and the environment.
|
177
|
-
|
178
|
-
:param _request_timeout: timeout setting for this request. If one
|
179
|
-
number provided, it will be total request
|
180
|
-
timeout. It can also be a pair (tuple) of
|
181
|
-
(connection, read) timeouts.
|
182
|
-
:type _request_timeout: int, tuple(int, int), optional
|
183
|
-
:param _request_auth: set to override the auth_settings for an a single
|
184
|
-
request; this effectively ignores the
|
185
|
-
authentication in the spec for a single request.
|
186
|
-
:type _request_auth: dict, optional
|
187
|
-
:param _content_type: force content-type for the request.
|
188
|
-
:type _content_type: str, Optional
|
189
|
-
:param _headers: set to override the headers for a single
|
190
|
-
request; this effectively ignores the headers
|
191
|
-
in the spec for a single request.
|
192
|
-
:type _headers: dict, optional
|
193
|
-
:param _host_index: set to override the host_index for a single
|
194
|
-
request; this effectively ignores the host_index
|
195
|
-
in the spec for a single request.
|
196
|
-
:type _host_index: int, optional
|
197
|
-
:return: Returns the result object.
|
198
|
-
""" # noqa: E501
|
199
|
-
|
200
|
-
_param = self._get_config_serialize(
|
201
|
-
_request_auth=_request_auth,
|
202
|
-
_content_type=_content_type,
|
203
|
-
_headers=_headers,
|
204
|
-
_host_index=_host_index,
|
205
|
-
)
|
206
|
-
|
207
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
208
|
-
"200": "Dict[str, object]",
|
209
|
-
}
|
210
|
-
response_data = await self.api_client.call_api(
|
211
|
-
*_param, _request_timeout=_request_timeout
|
212
|
-
)
|
213
|
-
return response_data.response
|
214
|
-
|
215
|
-
def _get_config_serialize(
|
216
|
-
self,
|
217
|
-
_request_auth,
|
218
|
-
_content_type,
|
219
|
-
_headers,
|
220
|
-
_host_index,
|
221
|
-
) -> RequestSerialized:
|
222
|
-
|
223
|
-
_host = None
|
224
|
-
|
225
|
-
_collection_formats: Dict[str, str] = {}
|
226
|
-
|
227
|
-
_path_params: Dict[str, str] = {}
|
228
|
-
_query_params: List[Tuple[str, str]] = []
|
229
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
230
|
-
_form_params: List[Tuple[str, str]] = []
|
231
|
-
_files: Dict[
|
232
|
-
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
233
|
-
] = {}
|
234
|
-
_body_params: Optional[bytes] = None
|
235
|
-
|
236
|
-
# process the path parameters
|
237
|
-
# process the query parameters
|
238
|
-
# process the header parameters
|
239
|
-
# process the form parameters
|
240
|
-
# process the body parameter
|
241
|
-
|
242
|
-
# set the HTTP header `Accept`
|
243
|
-
if "Accept" not in _header_params:
|
244
|
-
_header_params["Accept"] = self.api_client.select_header_accept(
|
245
|
-
["application/json"]
|
246
|
-
)
|
247
|
-
|
248
|
-
# authentication setting
|
249
|
-
_auth_settings: List[str] = []
|
250
|
-
|
251
|
-
return self.api_client.param_serialize(
|
252
|
-
method="GET",
|
253
|
-
resource_path="/config",
|
254
|
-
path_params=_path_params,
|
255
|
-
query_params=_query_params,
|
256
|
-
header_params=_header_params,
|
257
|
-
body=_body_params,
|
258
|
-
post_params=_form_params,
|
259
|
-
files=_files,
|
260
|
-
auth_settings=_auth_settings,
|
261
|
-
collection_formats=_collection_formats,
|
262
|
-
_host=_host,
|
263
|
-
_request_auth=_request_auth,
|
264
|
-
)
|
265
|
-
|
266
39
|
@validate_call
|
267
40
|
async def get_time(
|
268
41
|
self,
|
@@ -281,7 +54,7 @@ class StatusApi:
|
|
281
54
|
) -> str:
|
282
55
|
"""Time
|
283
56
|
|
284
|
-
Returns the current time in
|
57
|
+
Returns the current time in either ISO or Unix timestamp (seconds) format.
|
285
58
|
|
286
59
|
:param type:
|
287
60
|
:type type: str
|
@@ -345,7 +118,7 @@ class StatusApi:
|
|
345
118
|
) -> ApiResponse[str]:
|
346
119
|
"""Time
|
347
120
|
|
348
|
-
Returns the current time in
|
121
|
+
Returns the current time in either ISO or Unix timestamp (seconds) format.
|
349
122
|
|
350
123
|
:param type:
|
351
124
|
:type type: str
|
@@ -409,7 +182,7 @@ class StatusApi:
|
|
409
182
|
) -> RESTResponseType:
|
410
183
|
"""Time
|
411
184
|
|
412
|
-
Returns the current time in
|
185
|
+
Returns the current time in either ISO or Unix timestamp (seconds) format.
|
413
186
|
|
414
187
|
:param type:
|
415
188
|
:type type: str
|
@@ -14,12 +14,13 @@ Do not edit the class manually.
|
|
14
14
|
|
15
15
|
|
16
16
|
# import models into model package
|
17
|
+
from crypticorn.hive.client.models.api_error_identifier import ApiErrorIdentifier
|
18
|
+
from crypticorn.hive.client.models.api_error_level import ApiErrorLevel
|
19
|
+
from crypticorn.hive.client.models.api_error_type import ApiErrorType
|
17
20
|
from crypticorn.hive.client.models.coins import Coins
|
18
21
|
from crypticorn.hive.client.models.data_download_response import DataDownloadResponse
|
19
22
|
from crypticorn.hive.client.models.data_info import DataInfo
|
20
|
-
from crypticorn.hive.client.models.
|
21
|
-
DataValueValueValueInner,
|
22
|
-
)
|
23
|
+
from crypticorn.hive.client.models.data_options import DataOptions
|
23
24
|
from crypticorn.hive.client.models.data_version import DataVersion
|
24
25
|
from crypticorn.hive.client.models.data_version_info import DataVersionInfo
|
25
26
|
from crypticorn.hive.client.models.download_links import DownloadLinks
|
@@ -27,6 +28,7 @@ from crypticorn.hive.client.models.evaluation import Evaluation
|
|
27
28
|
from crypticorn.hive.client.models.evaluation_response import EvaluationResponse
|
28
29
|
from crypticorn.hive.client.models.exception_detail import ExceptionDetail
|
29
30
|
from crypticorn.hive.client.models.feature_size import FeatureSize
|
31
|
+
from crypticorn.hive.client.models.log_level import LogLevel
|
30
32
|
from crypticorn.hive.client.models.model import Model
|
31
33
|
from crypticorn.hive.client.models.model_create import ModelCreate
|
32
34
|
from crypticorn.hive.client.models.model_status import ModelStatus
|
@@ -0,0 +1,115 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Hive AI API
|
5
|
+
|
6
|
+
API for Hive AI model training and evaluation
|
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
|
+
Hive AI API
|
5
|
+
|
6
|
+
API for Hive AI model training and evaluation
|
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
|
+
Hive AI API
|
5
|
+
|
6
|
+
API for Hive AI model training and evaluation
|
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))
|
@@ -20,9 +20,7 @@ import json
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field
|
21
21
|
from typing import Any, ClassVar, Dict, List
|
22
22
|
from crypticorn.hive.client.models.coins import Coins
|
23
|
-
from crypticorn.hive.client.models.
|
24
|
-
DataValueValueValueInner,
|
25
|
-
)
|
23
|
+
from crypticorn.hive.client.models.data_options import DataOptions
|
26
24
|
from crypticorn.hive.client.models.data_version_info import DataVersionInfo
|
27
25
|
from crypticorn.hive.client.models.feature_size import FeatureSize
|
28
26
|
from crypticorn.hive.client.models.target_info import TargetInfo
|
@@ -35,7 +33,7 @@ class DataInfo(BaseModel):
|
|
35
33
|
The complete data information for all versions, coins, feature sizes and targets
|
36
34
|
""" # noqa: E501
|
37
35
|
|
38
|
-
data: Dict[str, Dict[str,
|
36
|
+
data: Dict[str, Dict[str, DataOptions]] = Field(
|
39
37
|
description="The complete data information for all versions, coins, feature sizes and targets."
|
40
38
|
)
|
41
39
|
coins: List[Coins] = Field(
|
@@ -99,6 +97,13 @@ class DataInfo(BaseModel):
|
|
99
97
|
exclude=excluded_fields,
|
100
98
|
exclude_none=True,
|
101
99
|
)
|
100
|
+
# override the default output from pydantic by calling `to_dict()` of each value in data (dict)
|
101
|
+
_field_dict = {}
|
102
|
+
if self.data:
|
103
|
+
for _key_data in self.data:
|
104
|
+
if self.data[_key_data]:
|
105
|
+
_field_dict[_key_data] = self.data[_key_data].to_dict()
|
106
|
+
_dict["data"] = _field_dict
|
102
107
|
# override the default output from pydantic by calling `to_dict()` of each item in targets (list)
|
103
108
|
_items = []
|
104
109
|
if self.targets:
|
@@ -133,7 +138,24 @@ class DataInfo(BaseModel):
|
|
133
138
|
|
134
139
|
_obj = cls.model_validate(
|
135
140
|
{
|
136
|
-
"data":
|
141
|
+
"data": (
|
142
|
+
dict(
|
143
|
+
(
|
144
|
+
_k,
|
145
|
+
(
|
146
|
+
dict(
|
147
|
+
(_ik, DataOptions.from_dict(_iv))
|
148
|
+
for _ik, _iv in _v.items()
|
149
|
+
)
|
150
|
+
if _v is not None
|
151
|
+
else None
|
152
|
+
),
|
153
|
+
)
|
154
|
+
for _k, _v in obj.get("data").items()
|
155
|
+
)
|
156
|
+
if obj.get("data") is not None
|
157
|
+
else None
|
158
|
+
),
|
137
159
|
"coins": obj.get("coins"),
|
138
160
|
"feature_sizes": obj.get("feature_sizes"),
|
139
161
|
"targets": (
|