crypticorn 2.8.0rc9__py3-none-any.whl → 2.9.0rc1__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/cli/init.py +2 -2
- crypticorn/common/router/admin_router.py +7 -9
- crypticorn/klines/client/__init__.py +9 -1
- crypticorn/klines/client/api/__init__.py +1 -0
- crypticorn/klines/client/api/admin_api.py +1455 -0
- crypticorn/klines/client/api/change_in_timeframe_api.py +24 -20
- crypticorn/klines/client/api/funding_rates_api.py +12 -10
- crypticorn/klines/client/api/ohlcv_data_api.py +37 -24
- crypticorn/klines/client/api/status_api.py +8 -235
- crypticorn/klines/client/api/symbols_api.py +12 -9
- crypticorn/klines/client/api/udf_api.py +6 -6
- crypticorn/klines/client/models/__init__.py +8 -1
- crypticorn/klines/client/models/api_error_identifier.py +115 -0
- crypticorn/klines/client/models/api_error_level.py +37 -0
- crypticorn/klines/client/models/api_error_type.py +37 -0
- crypticorn/klines/client/models/exception_detail.py +6 -3
- crypticorn/klines/client/models/funding_rate.py +6 -12
- crypticorn/klines/client/models/funding_rate_response.py +103 -0
- crypticorn/klines/client/models/internal_exchange.py +39 -0
- crypticorn/klines/client/models/log_level.py +38 -0
- crypticorn/klines/client/models/market_type.py +35 -0
- crypticorn/klines/client/models/{ohlcv_history.py → ohlcv.py} +12 -13
- crypticorn/klines/client/models/search_symbol.py +3 -4
- crypticorn/klines/client/models/udf_config.py +2 -1
- crypticorn/klines/main.py +1 -13
- crypticorn/metrics/client/api/admin_api.py +22 -19
- crypticorn/metrics/client/api/status_api.py +6 -6
- crypticorn/metrics/client/configuration.py +4 -2
- {crypticorn-2.8.0rc9.dist-info → crypticorn-2.9.0rc1.dist-info}/METADATA +1 -1
- {crypticorn-2.8.0rc9.dist-info → crypticorn-2.9.0rc1.dist-info}/RECORD +33 -25
- {crypticorn-2.8.0rc9.dist-info → crypticorn-2.9.0rc1.dist-info}/WHEEL +0 -0
- {crypticorn-2.8.0rc9.dist-info → crypticorn-2.9.0rc1.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.8.0rc9.dist-info → crypticorn-2.9.0rc1.dist-info}/top_level.txt +0 -0
@@ -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
|
@@ -521,7 +294,7 @@ class StatusApi:
|
|
521
294
|
_content_type: Optional[StrictStr] = None,
|
522
295
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
523
296
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
524
|
-
) -> str:
|
297
|
+
) -> Dict[str, object]:
|
525
298
|
"""Ping
|
526
299
|
|
527
300
|
Returns 'OK' if the API is running.
|
@@ -556,7 +329,7 @@ class StatusApi:
|
|
556
329
|
)
|
557
330
|
|
558
331
|
_response_types_map: Dict[str, Optional[str]] = {
|
559
|
-
"200": "str",
|
332
|
+
"200": "Dict[str, object]",
|
560
333
|
}
|
561
334
|
response_data = await self.api_client.call_api(
|
562
335
|
*_param, _request_timeout=_request_timeout
|
@@ -581,7 +354,7 @@ class StatusApi:
|
|
581
354
|
_content_type: Optional[StrictStr] = None,
|
582
355
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
583
356
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
584
|
-
) -> ApiResponse[str]:
|
357
|
+
) -> ApiResponse[Dict[str, object]]:
|
585
358
|
"""Ping
|
586
359
|
|
587
360
|
Returns 'OK' if the API is running.
|
@@ -616,7 +389,7 @@ class StatusApi:
|
|
616
389
|
)
|
617
390
|
|
618
391
|
_response_types_map: Dict[str, Optional[str]] = {
|
619
|
-
"200": "str",
|
392
|
+
"200": "Dict[str, object]",
|
620
393
|
}
|
621
394
|
response_data = await self.api_client.call_api(
|
622
395
|
*_param, _request_timeout=_request_timeout
|
@@ -676,7 +449,7 @@ class StatusApi:
|
|
676
449
|
)
|
677
450
|
|
678
451
|
_response_types_map: Dict[str, Optional[str]] = {
|
679
|
-
"200": "str",
|
452
|
+
"200": "Dict[str, object]",
|
680
453
|
}
|
681
454
|
response_data = await self.api_client.call_api(
|
682
455
|
*_param, _request_timeout=_request_timeout
|
@@ -19,6 +19,7 @@ from typing_extensions import Annotated
|
|
19
19
|
from pydantic import Field, StrictStr
|
20
20
|
from typing import List
|
21
21
|
from typing_extensions import Annotated
|
22
|
+
from crypticorn.klines.client.models.market_type import MarketType
|
22
23
|
|
23
24
|
from crypticorn.klines.client.api_client import ApiClient, RequestSerialized
|
24
25
|
from crypticorn.klines.client.api_response import ApiResponse
|
@@ -40,7 +41,7 @@ class SymbolsApi:
|
|
40
41
|
@validate_call
|
41
42
|
async def get_klines_symbols(
|
42
43
|
self,
|
43
|
-
market: Annotated[
|
44
|
+
market: Annotated[MarketType, Field(description="Market type")],
|
44
45
|
_request_timeout: Union[
|
45
46
|
None,
|
46
47
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -58,7 +59,7 @@ class SymbolsApi:
|
|
58
59
|
Retrieve a list of whitelisted symbols for a specific market.
|
59
60
|
|
60
61
|
:param market: Market type (required)
|
61
|
-
:type market:
|
62
|
+
:type market: MarketType
|
62
63
|
:param _request_timeout: timeout setting for this request. If one
|
63
64
|
number provided, it will be total request
|
64
65
|
timeout. It can also be a pair (tuple) of
|
@@ -104,7 +105,7 @@ class SymbolsApi:
|
|
104
105
|
@validate_call
|
105
106
|
async def get_klines_symbols_with_http_info(
|
106
107
|
self,
|
107
|
-
market: Annotated[
|
108
|
+
market: Annotated[MarketType, Field(description="Market type")],
|
108
109
|
_request_timeout: Union[
|
109
110
|
None,
|
110
111
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -122,7 +123,7 @@ class SymbolsApi:
|
|
122
123
|
Retrieve a list of whitelisted symbols for a specific market.
|
123
124
|
|
124
125
|
:param market: Market type (required)
|
125
|
-
:type market:
|
126
|
+
:type market: MarketType
|
126
127
|
:param _request_timeout: timeout setting for this request. If one
|
127
128
|
number provided, it will be total request
|
128
129
|
timeout. It can also be a pair (tuple) of
|
@@ -168,7 +169,7 @@ class SymbolsApi:
|
|
168
169
|
@validate_call
|
169
170
|
async def get_klines_symbols_without_preload_content(
|
170
171
|
self,
|
171
|
-
market: Annotated[
|
172
|
+
market: Annotated[MarketType, Field(description="Market type")],
|
172
173
|
_request_timeout: Union[
|
173
174
|
None,
|
174
175
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -186,7 +187,7 @@ class SymbolsApi:
|
|
186
187
|
Retrieve a list of whitelisted symbols for a specific market.
|
187
188
|
|
188
189
|
:param market: Market type (required)
|
189
|
-
:type market:
|
190
|
+
:type market: MarketType
|
190
191
|
:param _request_timeout: timeout setting for this request. If one
|
191
192
|
number provided, it will be total request
|
192
193
|
timeout. It can also be a pair (tuple) of
|
@@ -248,9 +249,11 @@ class SymbolsApi:
|
|
248
249
|
_body_params: Optional[bytes] = None
|
249
250
|
|
250
251
|
# process the path parameters
|
251
|
-
if market is not None:
|
252
|
-
_path_params["market"] = market
|
253
252
|
# process the query parameters
|
253
|
+
if market is not None:
|
254
|
+
|
255
|
+
_query_params.append(("market", market.value))
|
256
|
+
|
254
257
|
# process the header parameters
|
255
258
|
# process the form parameters
|
256
259
|
# process the body parameter
|
@@ -266,7 +269,7 @@ class SymbolsApi:
|
|
266
269
|
|
267
270
|
return self.api_client.param_serialize(
|
268
271
|
method="GET",
|
269
|
-
resource_path="/symbols
|
272
|
+
resource_path="/symbols",
|
270
273
|
path_params=_path_params,
|
271
274
|
query_params=_query_params,
|
272
275
|
header_params=_header_params,
|
@@ -18,7 +18,7 @@ from typing_extensions import Annotated
|
|
18
18
|
|
19
19
|
from pydantic import StrictInt, StrictStr
|
20
20
|
from typing import Any, List, Optional
|
21
|
-
from crypticorn.klines.client.models.
|
21
|
+
from crypticorn.klines.client.models.ohlcv import OHLCV
|
22
22
|
from crypticorn.klines.client.models.resolution import Resolution
|
23
23
|
from crypticorn.klines.client.models.search_symbol import SearchSymbol
|
24
24
|
from crypticorn.klines.client.models.symbol_group import SymbolGroup
|
@@ -773,7 +773,7 @@ class UDFApi:
|
|
773
773
|
_content_type: Optional[StrictStr] = None,
|
774
774
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
775
775
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
776
|
-
) ->
|
776
|
+
) -> OHLCV:
|
777
777
|
"""Get History
|
778
778
|
|
779
779
|
|
@@ -822,7 +822,7 @@ class UDFApi:
|
|
822
822
|
)
|
823
823
|
|
824
824
|
_response_types_map: Dict[str, Optional[str]] = {
|
825
|
-
"200": "
|
825
|
+
"200": "OHLCV",
|
826
826
|
}
|
827
827
|
response_data = await self.api_client.call_api(
|
828
828
|
*_param, _request_timeout=_request_timeout
|
@@ -852,7 +852,7 @@ class UDFApi:
|
|
852
852
|
_content_type: Optional[StrictStr] = None,
|
853
853
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
854
854
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
855
|
-
) -> ApiResponse[
|
855
|
+
) -> ApiResponse[OHLCV]:
|
856
856
|
"""Get History
|
857
857
|
|
858
858
|
|
@@ -901,7 +901,7 @@ class UDFApi:
|
|
901
901
|
)
|
902
902
|
|
903
903
|
_response_types_map: Dict[str, Optional[str]] = {
|
904
|
-
"200": "
|
904
|
+
"200": "OHLCV",
|
905
905
|
}
|
906
906
|
response_data = await self.api_client.call_api(
|
907
907
|
*_param, _request_timeout=_request_timeout
|
@@ -980,7 +980,7 @@ class UDFApi:
|
|
980
980
|
)
|
981
981
|
|
982
982
|
_response_types_map: Dict[str, Optional[str]] = {
|
983
|
-
"200": "
|
983
|
+
"200": "OHLCV",
|
984
984
|
}
|
985
985
|
response_data = await self.api_client.call_api(
|
986
986
|
*_param, _request_timeout=_request_timeout
|
@@ -14,10 +14,17 @@ Do not edit the class manually.
|
|
14
14
|
|
15
15
|
|
16
16
|
# import models into model package
|
17
|
+
from crypticorn.klines.client.models.api_error_identifier import ApiErrorIdentifier
|
18
|
+
from crypticorn.klines.client.models.api_error_level import ApiErrorLevel
|
19
|
+
from crypticorn.klines.client.models.api_error_type import ApiErrorType
|
17
20
|
from crypticorn.klines.client.models.change_in_timeframe import ChangeInTimeframe
|
18
21
|
from crypticorn.klines.client.models.exception_detail import ExceptionDetail
|
19
22
|
from crypticorn.klines.client.models.funding_rate import FundingRate
|
20
|
-
from crypticorn.klines.client.models.
|
23
|
+
from crypticorn.klines.client.models.funding_rate_response import FundingRateResponse
|
24
|
+
from crypticorn.klines.client.models.internal_exchange import InternalExchange
|
25
|
+
from crypticorn.klines.client.models.log_level import LogLevel
|
26
|
+
from crypticorn.klines.client.models.market_type import MarketType
|
27
|
+
from crypticorn.klines.client.models.ohlcv import OHLCV
|
21
28
|
from crypticorn.klines.client.models.resolution import Resolution
|
22
29
|
from crypticorn.klines.client.models.search_symbol import SearchSymbol
|
23
30
|
from crypticorn.klines.client.models.sort_direction import SortDirection
|
@@ -0,0 +1,115 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Klines Service API
|
5
|
+
|
6
|
+
API for retrieving OHLCV data, funding rates, and symbol information from Binance.
|
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
|
+
Klines Service API
|
5
|
+
|
6
|
+
API for retrieving OHLCV data, funding rates, and symbol information from Binance.
|
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
|
+
Klines Service API
|
5
|
+
|
6
|
+
API for retrieving OHLCV data, funding rates, and symbol information from Binance.
|
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.klines.client.models.api_error_identifier import ApiErrorIdentifier
|
23
|
+
from crypticorn.klines.client.models.api_error_level import ApiErrorLevel
|
24
|
+
from crypticorn.klines.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:
|
33
|
-
type:
|
34
|
-
level:
|
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]] = [
|