crypticorn 2.1.4__py3-none-any.whl → 2.1.6__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/client.py +4 -0
  2. crypticorn/common/errors.py +1 -1
  3. crypticorn/common/sorter.py +9 -7
  4. crypticorn/common/urls.py +1 -0
  5. crypticorn/klines/client/configuration.py +2 -2
  6. crypticorn/metrics/__init__.py +4 -0
  7. crypticorn/metrics/client/__init__.py +60 -0
  8. crypticorn/metrics/client/api/__init__.py +10 -0
  9. crypticorn/metrics/client/api/exchanges_api.py +1003 -0
  10. crypticorn/metrics/client/api/health_check_api.py +265 -0
  11. crypticorn/metrics/client/api/indicators_api.py +680 -0
  12. crypticorn/metrics/client/api/logs_api.py +356 -0
  13. crypticorn/metrics/client/api/marketcap_api.py +1315 -0
  14. crypticorn/metrics/client/api/markets_api.py +618 -0
  15. crypticorn/metrics/client/api/tokens_api.py +300 -0
  16. crypticorn/metrics/client/api_client.py +758 -0
  17. crypticorn/metrics/client/api_response.py +20 -0
  18. crypticorn/metrics/client/configuration.py +575 -0
  19. crypticorn/metrics/client/exceptions.py +220 -0
  20. crypticorn/metrics/client/models/__init__.py +37 -0
  21. crypticorn/metrics/client/models/base_response_dict.py +106 -0
  22. crypticorn/metrics/client/models/base_response_health_check_response.py +114 -0
  23. crypticorn/metrics/client/models/base_response_list_dict.py +106 -0
  24. crypticorn/metrics/client/models/base_response_list_exchange_mapping.py +118 -0
  25. crypticorn/metrics/client/models/base_response_list_str.py +106 -0
  26. crypticorn/metrics/client/models/error_response.py +109 -0
  27. crypticorn/metrics/client/models/exchange_mapping.py +132 -0
  28. crypticorn/{trade/client/models/update_notification.py → metrics/client/models/health_check_response.py} +15 -19
  29. crypticorn/metrics/client/models/http_validation_error.py +99 -0
  30. crypticorn/metrics/client/models/market.py +35 -0
  31. crypticorn/metrics/client/models/severity.py +36 -0
  32. crypticorn/metrics/client/models/validation_error.py +105 -0
  33. crypticorn/metrics/client/models/validation_error_loc_inner.py +159 -0
  34. crypticorn/metrics/client/py.typed +0 -0
  35. crypticorn/metrics/client/rest.py +195 -0
  36. crypticorn/metrics/main.py +112 -0
  37. crypticorn/pay/client/api/products_api.py +15 -15
  38. crypticorn/pay/client/models/now_webhook_payload.py +1 -1
  39. crypticorn/trade/client/api/futures_trading_panel_api.py +15 -15
  40. crypticorn/trade/client/models/api_error_identifier.py +49 -47
  41. crypticorn/trade/client/models/api_error_level.py +2 -2
  42. {crypticorn-2.1.4.dist-info → crypticorn-2.1.6.dist-info}/METADATA +3 -3
  43. {crypticorn-2.1.4.dist-info → crypticorn-2.1.6.dist-info}/RECORD +45 -17
  44. crypticorn/trade/client/models/notification_type.py +0 -37
  45. crypticorn/trade/client/models/strategy_model.py +0 -158
  46. {crypticorn-2.1.4.dist-info → crypticorn-2.1.6.dist-info}/WHEEL +0 -0
  47. {crypticorn-2.1.4.dist-info → crypticorn-2.1.6.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,356 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Marketcap Service API
5
+
6
+ API for retrieving historical marketcap data, available exchanges, and indicators. ## Features - Historical marketcap data - OHLCV data with marketcap - Technical indicators (KER, SMA) - Exchange and symbol mappings - Error logs
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
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import Field, StrictInt
20
+ from typing import Optional
21
+ from typing_extensions import Annotated
22
+ from crypticorn.metrics.client.models.base_response_list_dict import (
23
+ BaseResponseListDict,
24
+ )
25
+ from crypticorn.metrics.client.models.severity import Severity
26
+
27
+ from crypticorn.metrics.client.api_client import ApiClient, RequestSerialized
28
+ from crypticorn.metrics.client.api_response import ApiResponse
29
+ from crypticorn.metrics.client.rest import RESTResponseType
30
+
31
+
32
+ class LogsApi:
33
+ """NOTE: This class is auto generated by OpenAPI Generator
34
+ Ref: https://openapi-generator.tech
35
+
36
+ Do not edit the class manually.
37
+ """
38
+
39
+ def __init__(self, api_client=None) -> None:
40
+ if api_client is None:
41
+ api_client = ApiClient.get_default()
42
+ self.api_client = api_client
43
+
44
+ @validate_call
45
+ async def get_metrics_error_logs(
46
+ self,
47
+ severity: Annotated[
48
+ Optional[Severity], Field(description="Severity level of errors to fetch")
49
+ ] = None,
50
+ start_timestamp: Annotated[
51
+ Optional[StrictInt],
52
+ Field(description="Start timestamp for which to fetch error logs"),
53
+ ] = None,
54
+ end_timestamp: Annotated[
55
+ Optional[StrictInt],
56
+ Field(description="End timestamp for which to fetch error logs"),
57
+ ] = None,
58
+ _request_timeout: Union[
59
+ None,
60
+ Annotated[StrictFloat, Field(gt=0)],
61
+ Tuple[
62
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
63
+ ],
64
+ ] = None,
65
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
66
+ _content_type: Optional[StrictStr] = None,
67
+ _headers: Optional[Dict[StrictStr, Any]] = None,
68
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
69
+ ) -> BaseResponseListDict:
70
+ """Get Error Logs
71
+
72
+ Get error logs with filtering options.
73
+
74
+ :param severity: Severity level of errors to fetch
75
+ :type severity: Severity
76
+ :param start_timestamp: Start timestamp for which to fetch error logs
77
+ :type start_timestamp: int
78
+ :param end_timestamp: End timestamp for which to fetch error logs
79
+ :type end_timestamp: int
80
+ :param _request_timeout: timeout setting for this request. If one
81
+ number provided, it will be total request
82
+ timeout. It can also be a pair (tuple) of
83
+ (connection, read) timeouts.
84
+ :type _request_timeout: int, tuple(int, int), optional
85
+ :param _request_auth: set to override the auth_settings for an a single
86
+ request; this effectively ignores the
87
+ authentication in the spec for a single request.
88
+ :type _request_auth: dict, optional
89
+ :param _content_type: force content-type for the request.
90
+ :type _content_type: str, Optional
91
+ :param _headers: set to override the headers for a single
92
+ request; this effectively ignores the headers
93
+ in the spec for a single request.
94
+ :type _headers: dict, optional
95
+ :param _host_index: set to override the host_index for a single
96
+ request; this effectively ignores the host_index
97
+ in the spec for a single request.
98
+ :type _host_index: int, optional
99
+ :return: Returns the result object.
100
+ """ # noqa: E501
101
+
102
+ _param = self._get_metrics_error_logs_serialize(
103
+ severity=severity,
104
+ start_timestamp=start_timestamp,
105
+ end_timestamp=end_timestamp,
106
+ _request_auth=_request_auth,
107
+ _content_type=_content_type,
108
+ _headers=_headers,
109
+ _host_index=_host_index,
110
+ )
111
+
112
+ _response_types_map: Dict[str, Optional[str]] = {
113
+ "200": "BaseResponseListDict",
114
+ "400": "ErrorResponse",
115
+ "404": "ErrorResponse",
116
+ "500": "ErrorResponse",
117
+ "422": "HTTPValidationError",
118
+ }
119
+ response_data = await self.api_client.call_api(
120
+ *_param, _request_timeout=_request_timeout
121
+ )
122
+ await response_data.read()
123
+ return self.api_client.response_deserialize(
124
+ response_data=response_data,
125
+ response_types_map=_response_types_map,
126
+ ).data
127
+
128
+ @validate_call
129
+ async def get_metrics_error_logs_with_http_info(
130
+ self,
131
+ severity: Annotated[
132
+ Optional[Severity], Field(description="Severity level of errors to fetch")
133
+ ] = None,
134
+ start_timestamp: Annotated[
135
+ Optional[StrictInt],
136
+ Field(description="Start timestamp for which to fetch error logs"),
137
+ ] = None,
138
+ end_timestamp: Annotated[
139
+ Optional[StrictInt],
140
+ Field(description="End timestamp for which to fetch error logs"),
141
+ ] = None,
142
+ _request_timeout: Union[
143
+ None,
144
+ Annotated[StrictFloat, Field(gt=0)],
145
+ Tuple[
146
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
147
+ ],
148
+ ] = None,
149
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
150
+ _content_type: Optional[StrictStr] = None,
151
+ _headers: Optional[Dict[StrictStr, Any]] = None,
152
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
153
+ ) -> ApiResponse[BaseResponseListDict]:
154
+ """Get Error Logs
155
+
156
+ Get error logs with filtering options.
157
+
158
+ :param severity: Severity level of errors to fetch
159
+ :type severity: Severity
160
+ :param start_timestamp: Start timestamp for which to fetch error logs
161
+ :type start_timestamp: int
162
+ :param end_timestamp: End timestamp for which to fetch error logs
163
+ :type end_timestamp: int
164
+ :param _request_timeout: timeout setting for this request. If one
165
+ number provided, it will be total request
166
+ timeout. It can also be a pair (tuple) of
167
+ (connection, read) timeouts.
168
+ :type _request_timeout: int, tuple(int, int), optional
169
+ :param _request_auth: set to override the auth_settings for an a single
170
+ request; this effectively ignores the
171
+ authentication in the spec for a single request.
172
+ :type _request_auth: dict, optional
173
+ :param _content_type: force content-type for the request.
174
+ :type _content_type: str, Optional
175
+ :param _headers: set to override the headers for a single
176
+ request; this effectively ignores the headers
177
+ in the spec for a single request.
178
+ :type _headers: dict, optional
179
+ :param _host_index: set to override the host_index for a single
180
+ request; this effectively ignores the host_index
181
+ in the spec for a single request.
182
+ :type _host_index: int, optional
183
+ :return: Returns the result object.
184
+ """ # noqa: E501
185
+
186
+ _param = self._get_metrics_error_logs_serialize(
187
+ severity=severity,
188
+ start_timestamp=start_timestamp,
189
+ end_timestamp=end_timestamp,
190
+ _request_auth=_request_auth,
191
+ _content_type=_content_type,
192
+ _headers=_headers,
193
+ _host_index=_host_index,
194
+ )
195
+
196
+ _response_types_map: Dict[str, Optional[str]] = {
197
+ "200": "BaseResponseListDict",
198
+ "400": "ErrorResponse",
199
+ "404": "ErrorResponse",
200
+ "500": "ErrorResponse",
201
+ "422": "HTTPValidationError",
202
+ }
203
+ response_data = await self.api_client.call_api(
204
+ *_param, _request_timeout=_request_timeout
205
+ )
206
+ await response_data.read()
207
+ return self.api_client.response_deserialize(
208
+ response_data=response_data,
209
+ response_types_map=_response_types_map,
210
+ )
211
+
212
+ @validate_call
213
+ async def get_metrics_error_logs_without_preload_content(
214
+ self,
215
+ severity: Annotated[
216
+ Optional[Severity], Field(description="Severity level of errors to fetch")
217
+ ] = None,
218
+ start_timestamp: Annotated[
219
+ Optional[StrictInt],
220
+ Field(description="Start timestamp for which to fetch error logs"),
221
+ ] = None,
222
+ end_timestamp: Annotated[
223
+ Optional[StrictInt],
224
+ Field(description="End timestamp for which to fetch error logs"),
225
+ ] = None,
226
+ _request_timeout: Union[
227
+ None,
228
+ Annotated[StrictFloat, Field(gt=0)],
229
+ Tuple[
230
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
231
+ ],
232
+ ] = None,
233
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
234
+ _content_type: Optional[StrictStr] = None,
235
+ _headers: Optional[Dict[StrictStr, Any]] = None,
236
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
237
+ ) -> RESTResponseType:
238
+ """Get Error Logs
239
+
240
+ Get error logs with filtering options.
241
+
242
+ :param severity: Severity level of errors to fetch
243
+ :type severity: Severity
244
+ :param start_timestamp: Start timestamp for which to fetch error logs
245
+ :type start_timestamp: int
246
+ :param end_timestamp: End timestamp for which to fetch error logs
247
+ :type end_timestamp: int
248
+ :param _request_timeout: timeout setting for this request. If one
249
+ number provided, it will be total request
250
+ timeout. It can also be a pair (tuple) of
251
+ (connection, read) timeouts.
252
+ :type _request_timeout: int, tuple(int, int), optional
253
+ :param _request_auth: set to override the auth_settings for an a single
254
+ request; this effectively ignores the
255
+ authentication in the spec for a single request.
256
+ :type _request_auth: dict, optional
257
+ :param _content_type: force content-type for the request.
258
+ :type _content_type: str, Optional
259
+ :param _headers: set to override the headers for a single
260
+ request; this effectively ignores the headers
261
+ in the spec for a single request.
262
+ :type _headers: dict, optional
263
+ :param _host_index: set to override the host_index for a single
264
+ request; this effectively ignores the host_index
265
+ in the spec for a single request.
266
+ :type _host_index: int, optional
267
+ :return: Returns the result object.
268
+ """ # noqa: E501
269
+
270
+ _param = self._get_metrics_error_logs_serialize(
271
+ severity=severity,
272
+ start_timestamp=start_timestamp,
273
+ end_timestamp=end_timestamp,
274
+ _request_auth=_request_auth,
275
+ _content_type=_content_type,
276
+ _headers=_headers,
277
+ _host_index=_host_index,
278
+ )
279
+
280
+ _response_types_map: Dict[str, Optional[str]] = {
281
+ "200": "BaseResponseListDict",
282
+ "400": "ErrorResponse",
283
+ "404": "ErrorResponse",
284
+ "500": "ErrorResponse",
285
+ "422": "HTTPValidationError",
286
+ }
287
+ response_data = await self.api_client.call_api(
288
+ *_param, _request_timeout=_request_timeout
289
+ )
290
+ return response_data.response
291
+
292
+ def _get_metrics_error_logs_serialize(
293
+ self,
294
+ severity,
295
+ start_timestamp,
296
+ end_timestamp,
297
+ _request_auth,
298
+ _content_type,
299
+ _headers,
300
+ _host_index,
301
+ ) -> RequestSerialized:
302
+
303
+ _host = None
304
+
305
+ _collection_formats: Dict[str, str] = {}
306
+
307
+ _path_params: Dict[str, str] = {}
308
+ _query_params: List[Tuple[str, str]] = []
309
+ _header_params: Dict[str, Optional[str]] = _headers or {}
310
+ _form_params: List[Tuple[str, str]] = []
311
+ _files: Dict[
312
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
313
+ ] = {}
314
+ _body_params: Optional[bytes] = None
315
+
316
+ # process the path parameters
317
+ # process the query parameters
318
+ if severity is not None:
319
+
320
+ _query_params.append(("severity", severity.value))
321
+
322
+ if start_timestamp is not None:
323
+
324
+ _query_params.append(("start_timestamp", start_timestamp))
325
+
326
+ if end_timestamp is not None:
327
+
328
+ _query_params.append(("end_timestamp", end_timestamp))
329
+
330
+ # process the header parameters
331
+ # process the form parameters
332
+ # process the body parameter
333
+
334
+ # set the HTTP header `Accept`
335
+ if "Accept" not in _header_params:
336
+ _header_params["Accept"] = self.api_client.select_header_accept(
337
+ ["application/json"]
338
+ )
339
+
340
+ # authentication setting
341
+ _auth_settings: List[str] = []
342
+
343
+ return self.api_client.param_serialize(
344
+ method="GET",
345
+ resource_path="/error_logs",
346
+ path_params=_path_params,
347
+ query_params=_query_params,
348
+ header_params=_header_params,
349
+ body=_body_params,
350
+ post_params=_form_params,
351
+ files=_files,
352
+ auth_settings=_auth_settings,
353
+ collection_formats=_collection_formats,
354
+ _host=_host,
355
+ _request_auth=_request_auth,
356
+ )