crypticorn 2.1.5__py3-none-any.whl → 2.2.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/auth/main.py +2 -19
- crypticorn/client.py +75 -22
- crypticorn/common/__init__.py +1 -2
- crypticorn/common/auth.py +205 -1
- crypticorn/common/scopes.py +2 -2
- crypticorn/common/urls.py +21 -9
- crypticorn/hive/main.py +4 -12
- crypticorn/klines/client/configuration.py +2 -2
- crypticorn/klines/main.py +2 -12
- crypticorn/metrics/__init__.py +4 -0
- crypticorn/metrics/client/__init__.py +60 -0
- crypticorn/metrics/client/api/__init__.py +10 -0
- crypticorn/metrics/client/api/exchanges_api.py +1003 -0
- crypticorn/metrics/client/api/health_check_api.py +265 -0
- crypticorn/metrics/client/api/indicators_api.py +680 -0
- crypticorn/metrics/client/api/logs_api.py +356 -0
- crypticorn/metrics/client/api/marketcap_api.py +1315 -0
- crypticorn/metrics/client/api/markets_api.py +618 -0
- crypticorn/metrics/client/api/tokens_api.py +300 -0
- crypticorn/metrics/client/api_client.py +758 -0
- crypticorn/metrics/client/api_response.py +20 -0
- crypticorn/metrics/client/configuration.py +575 -0
- crypticorn/metrics/client/exceptions.py +220 -0
- crypticorn/metrics/client/models/__init__.py +37 -0
- crypticorn/metrics/client/models/base_response_dict.py +106 -0
- crypticorn/metrics/client/models/base_response_health_check_response.py +114 -0
- crypticorn/metrics/client/models/base_response_list_dict.py +106 -0
- crypticorn/metrics/client/models/base_response_list_exchange_mapping.py +118 -0
- crypticorn/metrics/client/models/base_response_list_str.py +106 -0
- crypticorn/metrics/client/models/error_response.py +109 -0
- crypticorn/metrics/client/models/exchange_mapping.py +132 -0
- crypticorn/metrics/client/models/health_check_response.py +91 -0
- crypticorn/metrics/client/models/http_validation_error.py +99 -0
- crypticorn/metrics/client/models/market.py +35 -0
- crypticorn/metrics/client/models/severity.py +36 -0
- crypticorn/metrics/client/models/validation_error.py +105 -0
- crypticorn/metrics/client/models/validation_error_loc_inner.py +159 -0
- crypticorn/metrics/client/py.typed +0 -0
- crypticorn/metrics/client/rest.py +195 -0
- crypticorn/metrics/main.py +102 -0
- crypticorn/pay/main.py +2 -12
- crypticorn/trade/main.py +2 -12
- crypticorn-2.2.0.dist-info/METADATA +146 -0
- {crypticorn-2.1.5.dist-info → crypticorn-2.2.0.dist-info}/RECORD +46 -16
- crypticorn/common/auth_client.py +0 -213
- crypticorn-2.1.5.dist-info/METADATA +0 -92
- {crypticorn-2.1.5.dist-info → crypticorn-2.2.0.dist-info}/WHEEL +0 -0
- {crypticorn-2.1.5.dist-info → crypticorn-2.2.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,300 @@
|
|
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, StrictStr, field_validator
|
20
|
+
from typing_extensions import Annotated
|
21
|
+
from crypticorn.metrics.client.models.base_response_list_dict import (
|
22
|
+
BaseResponseListDict,
|
23
|
+
)
|
24
|
+
|
25
|
+
from crypticorn.metrics.client.api_client import ApiClient, RequestSerialized
|
26
|
+
from crypticorn.metrics.client.api_response import ApiResponse
|
27
|
+
from crypticorn.metrics.client.rest import RESTResponseType
|
28
|
+
|
29
|
+
|
30
|
+
class TokensApi:
|
31
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
32
|
+
Ref: https://openapi-generator.tech
|
33
|
+
|
34
|
+
Do not edit the class manually.
|
35
|
+
"""
|
36
|
+
|
37
|
+
def __init__(self, api_client=None) -> None:
|
38
|
+
if api_client is None:
|
39
|
+
api_client = ApiClient.get_default()
|
40
|
+
self.api_client = api_client
|
41
|
+
|
42
|
+
@validate_call
|
43
|
+
async def get_stable_and_wrapped_tokens(
|
44
|
+
self,
|
45
|
+
token_type: Annotated[
|
46
|
+
StrictStr, Field(description="Token type (stable or wrapped)")
|
47
|
+
],
|
48
|
+
_request_timeout: Union[
|
49
|
+
None,
|
50
|
+
Annotated[StrictFloat, Field(gt=0)],
|
51
|
+
Tuple[
|
52
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
53
|
+
],
|
54
|
+
] = None,
|
55
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
56
|
+
_content_type: Optional[StrictStr] = None,
|
57
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
58
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
59
|
+
) -> BaseResponseListDict:
|
60
|
+
"""Get Stable Wrapped Tokens
|
61
|
+
|
62
|
+
Get list of stable or wrapped tokens.
|
63
|
+
|
64
|
+
:param token_type: Token type (stable or wrapped) (required)
|
65
|
+
:type token_type: str
|
66
|
+
:param _request_timeout: timeout setting for this request. If one
|
67
|
+
number provided, it will be total request
|
68
|
+
timeout. It can also be a pair (tuple) of
|
69
|
+
(connection, read) timeouts.
|
70
|
+
:type _request_timeout: int, tuple(int, int), optional
|
71
|
+
:param _request_auth: set to override the auth_settings for an a single
|
72
|
+
request; this effectively ignores the
|
73
|
+
authentication in the spec for a single request.
|
74
|
+
:type _request_auth: dict, optional
|
75
|
+
:param _content_type: force content-type for the request.
|
76
|
+
:type _content_type: str, Optional
|
77
|
+
:param _headers: set to override the headers for a single
|
78
|
+
request; this effectively ignores the headers
|
79
|
+
in the spec for a single request.
|
80
|
+
:type _headers: dict, optional
|
81
|
+
:param _host_index: set to override the host_index for a single
|
82
|
+
request; this effectively ignores the host_index
|
83
|
+
in the spec for a single request.
|
84
|
+
:type _host_index: int, optional
|
85
|
+
:return: Returns the result object.
|
86
|
+
""" # noqa: E501
|
87
|
+
|
88
|
+
_param = self._get_stable_and_wrapped_tokens_serialize(
|
89
|
+
token_type=token_type,
|
90
|
+
_request_auth=_request_auth,
|
91
|
+
_content_type=_content_type,
|
92
|
+
_headers=_headers,
|
93
|
+
_host_index=_host_index,
|
94
|
+
)
|
95
|
+
|
96
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
97
|
+
"200": "BaseResponseListDict",
|
98
|
+
"400": "ErrorResponse",
|
99
|
+
"404": "ErrorResponse",
|
100
|
+
"500": "ErrorResponse",
|
101
|
+
"422": "HTTPValidationError",
|
102
|
+
}
|
103
|
+
response_data = await self.api_client.call_api(
|
104
|
+
*_param, _request_timeout=_request_timeout
|
105
|
+
)
|
106
|
+
await response_data.read()
|
107
|
+
return self.api_client.response_deserialize(
|
108
|
+
response_data=response_data,
|
109
|
+
response_types_map=_response_types_map,
|
110
|
+
).data
|
111
|
+
|
112
|
+
@validate_call
|
113
|
+
async def get_stable_and_wrapped_tokens_with_http_info(
|
114
|
+
self,
|
115
|
+
token_type: Annotated[
|
116
|
+
StrictStr, Field(description="Token type (stable or wrapped)")
|
117
|
+
],
|
118
|
+
_request_timeout: Union[
|
119
|
+
None,
|
120
|
+
Annotated[StrictFloat, Field(gt=0)],
|
121
|
+
Tuple[
|
122
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
123
|
+
],
|
124
|
+
] = None,
|
125
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
126
|
+
_content_type: Optional[StrictStr] = None,
|
127
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
128
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
129
|
+
) -> ApiResponse[BaseResponseListDict]:
|
130
|
+
"""Get Stable Wrapped Tokens
|
131
|
+
|
132
|
+
Get list of stable or wrapped tokens.
|
133
|
+
|
134
|
+
:param token_type: Token type (stable or wrapped) (required)
|
135
|
+
:type token_type: str
|
136
|
+
:param _request_timeout: timeout setting for this request. If one
|
137
|
+
number provided, it will be total request
|
138
|
+
timeout. It can also be a pair (tuple) of
|
139
|
+
(connection, read) timeouts.
|
140
|
+
:type _request_timeout: int, tuple(int, int), optional
|
141
|
+
:param _request_auth: set to override the auth_settings for an a single
|
142
|
+
request; this effectively ignores the
|
143
|
+
authentication in the spec for a single request.
|
144
|
+
:type _request_auth: dict, optional
|
145
|
+
:param _content_type: force content-type for the request.
|
146
|
+
:type _content_type: str, Optional
|
147
|
+
:param _headers: set to override the headers for a single
|
148
|
+
request; this effectively ignores the headers
|
149
|
+
in the spec for a single request.
|
150
|
+
:type _headers: dict, optional
|
151
|
+
:param _host_index: set to override the host_index for a single
|
152
|
+
request; this effectively ignores the host_index
|
153
|
+
in the spec for a single request.
|
154
|
+
:type _host_index: int, optional
|
155
|
+
:return: Returns the result object.
|
156
|
+
""" # noqa: E501
|
157
|
+
|
158
|
+
_param = self._get_stable_and_wrapped_tokens_serialize(
|
159
|
+
token_type=token_type,
|
160
|
+
_request_auth=_request_auth,
|
161
|
+
_content_type=_content_type,
|
162
|
+
_headers=_headers,
|
163
|
+
_host_index=_host_index,
|
164
|
+
)
|
165
|
+
|
166
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
167
|
+
"200": "BaseResponseListDict",
|
168
|
+
"400": "ErrorResponse",
|
169
|
+
"404": "ErrorResponse",
|
170
|
+
"500": "ErrorResponse",
|
171
|
+
"422": "HTTPValidationError",
|
172
|
+
}
|
173
|
+
response_data = await self.api_client.call_api(
|
174
|
+
*_param, _request_timeout=_request_timeout
|
175
|
+
)
|
176
|
+
await response_data.read()
|
177
|
+
return self.api_client.response_deserialize(
|
178
|
+
response_data=response_data,
|
179
|
+
response_types_map=_response_types_map,
|
180
|
+
)
|
181
|
+
|
182
|
+
@validate_call
|
183
|
+
async def get_stable_and_wrapped_tokens_without_preload_content(
|
184
|
+
self,
|
185
|
+
token_type: Annotated[
|
186
|
+
StrictStr, Field(description="Token type (stable or wrapped)")
|
187
|
+
],
|
188
|
+
_request_timeout: Union[
|
189
|
+
None,
|
190
|
+
Annotated[StrictFloat, Field(gt=0)],
|
191
|
+
Tuple[
|
192
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
193
|
+
],
|
194
|
+
] = None,
|
195
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
196
|
+
_content_type: Optional[StrictStr] = None,
|
197
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
198
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
199
|
+
) -> RESTResponseType:
|
200
|
+
"""Get Stable Wrapped Tokens
|
201
|
+
|
202
|
+
Get list of stable or wrapped tokens.
|
203
|
+
|
204
|
+
:param token_type: Token type (stable or wrapped) (required)
|
205
|
+
:type token_type: str
|
206
|
+
:param _request_timeout: timeout setting for this request. If one
|
207
|
+
number provided, it will be total request
|
208
|
+
timeout. It can also be a pair (tuple) of
|
209
|
+
(connection, read) timeouts.
|
210
|
+
:type _request_timeout: int, tuple(int, int), optional
|
211
|
+
:param _request_auth: set to override the auth_settings for an a single
|
212
|
+
request; this effectively ignores the
|
213
|
+
authentication in the spec for a single request.
|
214
|
+
:type _request_auth: dict, optional
|
215
|
+
:param _content_type: force content-type for the request.
|
216
|
+
:type _content_type: str, Optional
|
217
|
+
:param _headers: set to override the headers for a single
|
218
|
+
request; this effectively ignores the headers
|
219
|
+
in the spec for a single request.
|
220
|
+
:type _headers: dict, optional
|
221
|
+
:param _host_index: set to override the host_index for a single
|
222
|
+
request; this effectively ignores the host_index
|
223
|
+
in the spec for a single request.
|
224
|
+
:type _host_index: int, optional
|
225
|
+
:return: Returns the result object.
|
226
|
+
""" # noqa: E501
|
227
|
+
|
228
|
+
_param = self._get_stable_and_wrapped_tokens_serialize(
|
229
|
+
token_type=token_type,
|
230
|
+
_request_auth=_request_auth,
|
231
|
+
_content_type=_content_type,
|
232
|
+
_headers=_headers,
|
233
|
+
_host_index=_host_index,
|
234
|
+
)
|
235
|
+
|
236
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
237
|
+
"200": "BaseResponseListDict",
|
238
|
+
"400": "ErrorResponse",
|
239
|
+
"404": "ErrorResponse",
|
240
|
+
"500": "ErrorResponse",
|
241
|
+
"422": "HTTPValidationError",
|
242
|
+
}
|
243
|
+
response_data = await self.api_client.call_api(
|
244
|
+
*_param, _request_timeout=_request_timeout
|
245
|
+
)
|
246
|
+
return response_data.response
|
247
|
+
|
248
|
+
def _get_stable_and_wrapped_tokens_serialize(
|
249
|
+
self,
|
250
|
+
token_type,
|
251
|
+
_request_auth,
|
252
|
+
_content_type,
|
253
|
+
_headers,
|
254
|
+
_host_index,
|
255
|
+
) -> RequestSerialized:
|
256
|
+
|
257
|
+
_host = None
|
258
|
+
|
259
|
+
_collection_formats: Dict[str, str] = {}
|
260
|
+
|
261
|
+
_path_params: Dict[str, str] = {}
|
262
|
+
_query_params: List[Tuple[str, str]] = []
|
263
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
264
|
+
_form_params: List[Tuple[str, str]] = []
|
265
|
+
_files: Dict[
|
266
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
267
|
+
] = {}
|
268
|
+
_body_params: Optional[bytes] = None
|
269
|
+
|
270
|
+
# process the path parameters
|
271
|
+
if token_type is not None:
|
272
|
+
_path_params["token_type"] = token_type
|
273
|
+
# process the query parameters
|
274
|
+
# process the header parameters
|
275
|
+
# process the form parameters
|
276
|
+
# process the body parameter
|
277
|
+
|
278
|
+
# set the HTTP header `Accept`
|
279
|
+
if "Accept" not in _header_params:
|
280
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
281
|
+
["application/json"]
|
282
|
+
)
|
283
|
+
|
284
|
+
# authentication setting
|
285
|
+
_auth_settings: List[str] = []
|
286
|
+
|
287
|
+
return self.api_client.param_serialize(
|
288
|
+
method="GET",
|
289
|
+
resource_path="/tokens/{token_type}",
|
290
|
+
path_params=_path_params,
|
291
|
+
query_params=_query_params,
|
292
|
+
header_params=_header_params,
|
293
|
+
body=_body_params,
|
294
|
+
post_params=_form_params,
|
295
|
+
files=_files,
|
296
|
+
auth_settings=_auth_settings,
|
297
|
+
collection_formats=_collection_formats,
|
298
|
+
_host=_host,
|
299
|
+
_request_auth=_request_auth,
|
300
|
+
)
|