crypticorn 2.5.1__py3-none-any.whl → 2.5.3__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 +3 -0
- crypticorn/common/__init__.py +1 -0
- crypticorn/common/enums.py +3 -1
- crypticorn/common/errors.py +42 -21
- crypticorn/common/mixins.py +20 -0
- crypticorn/common/scopes.py +4 -20
- crypticorn/common/status_router.py +44 -0
- crypticorn/common/utils.py +13 -14
- crypticorn/hive/client/__init__.py +1 -5
- crypticorn/hive/client/api/data_api.py +1 -33
- crypticorn/hive/client/api/models_api.py +8 -104
- crypticorn/hive/client/api/status_api.py +481 -9
- crypticorn/hive/client/configuration.py +12 -4
- crypticorn/hive/client/models/__init__.py +1 -5
- crypticorn/hive/client/models/coins.py +0 -1
- crypticorn/hive/client/models/data_version.py +0 -1
- crypticorn/{metrics/client/models/error_response.py → hive/client/models/exception_detail.py} +26 -21
- crypticorn/hive/client/rest.py +4 -1
- crypticorn/klines/client/__init__.py +0 -5
- crypticorn/klines/client/api/change_in_timeframe_api.py +8 -9
- crypticorn/klines/client/api/ohlcv_data_api.py +7 -8
- crypticorn/klines/client/api/status_api.py +481 -6
- crypticorn/klines/client/api/symbols_api.py +7 -8
- crypticorn/klines/client/api/udf_api.py +0 -227
- crypticorn/klines/client/models/__init__.py +0 -5
- crypticorn/klines/client/models/exception_detail.py +3 -6
- crypticorn/klines/client/models/search_symbol.py +4 -3
- crypticorn/klines/client/models/udf_config.py +1 -2
- crypticorn/metrics/client/__init__.py +1 -6
- crypticorn/metrics/client/api/exchanges_api.py +29 -31
- crypticorn/metrics/client/api/indicators_api.py +15 -16
- crypticorn/metrics/client/api/logs_api.py +1 -1
- crypticorn/metrics/client/api/marketcap_api.py +15 -16
- crypticorn/metrics/client/api/markets_api.py +15 -16
- crypticorn/metrics/client/api/status_api.py +477 -2
- crypticorn/metrics/client/api/tokens_api.py +1 -1
- crypticorn/metrics/client/api_client.py +1 -1
- crypticorn/metrics/client/configuration.py +3 -5
- crypticorn/metrics/client/exceptions.py +1 -1
- crypticorn/metrics/client/models/__init__.py +1 -6
- crypticorn/metrics/client/models/exception_detail.py +4 -7
- crypticorn/metrics/client/models/severity.py +1 -1
- crypticorn/metrics/client/models/time_interval.py +1 -1
- crypticorn/metrics/client/models/trading_status.py +1 -1
- crypticorn/metrics/client/rest.py +1 -1
- crypticorn/pay/client/__init__.py +3 -8
- crypticorn/pay/client/api/now_payments_api.py +14 -17
- crypticorn/pay/client/api/payments_api.py +2 -11
- crypticorn/pay/client/api/products_api.py +2 -11
- crypticorn/pay/client/api/status_api.py +483 -8
- crypticorn/pay/client/api_client.py +2 -2
- crypticorn/pay/client/configuration.py +3 -3
- crypticorn/pay/client/exceptions.py +2 -2
- crypticorn/pay/client/models/__init__.py +3 -8
- crypticorn/{metrics/client/models/base_response_dict.py → pay/client/models/exception_detail.py} +28 -20
- crypticorn/pay/client/models/now_create_invoice_req.py +2 -2
- crypticorn/pay/client/models/now_create_invoice_res.py +2 -2
- crypticorn/pay/client/models/payment.py +2 -2
- crypticorn/pay/client/models/payment_status.py +2 -2
- crypticorn/pay/client/models/product_create.py +2 -2
- crypticorn/pay/client/models/product_read.py +2 -2
- crypticorn/pay/client/models/product_sub_read.py +2 -2
- crypticorn/pay/client/models/product_update.py +2 -2
- crypticorn/pay/client/models/scope.py +2 -2
- crypticorn/pay/client/models/services.py +2 -2
- crypticorn/pay/client/rest.py +2 -2
- crypticorn/trade/client/__init__.py +4 -9
- crypticorn/trade/client/api/api_keys_api.py +5 -20
- crypticorn/trade/client/api/bots_api.py +7 -19
- crypticorn/trade/client/api/exchanges_api.py +8 -8
- crypticorn/trade/client/api/futures_trading_panel_api.py +10 -22
- crypticorn/trade/client/api/notifications_api.py +10 -25
- crypticorn/trade/client/api/orders_api.py +2 -5
- crypticorn/trade/client/api/status_api.py +483 -8
- crypticorn/trade/client/api/strategies_api.py +5 -17
- crypticorn/trade/client/api/trading_actions_api.py +18 -26
- crypticorn/trade/client/api_client.py +2 -2
- crypticorn/trade/client/configuration.py +5 -5
- crypticorn/trade/client/exceptions.py +2 -2
- crypticorn/trade/client/models/__init__.py +4 -9
- crypticorn/trade/client/models/action_model.py +3 -4
- crypticorn/trade/client/models/bot_model.py +2 -2
- crypticorn/trade/client/models/bot_status.py +2 -2
- crypticorn/{klines/client/models/error_response.py → trade/client/models/exception_detail.py} +26 -21
- crypticorn/trade/client/models/exchange_key_model.py +4 -13
- crypticorn/trade/client/models/execution_ids.py +2 -2
- crypticorn/trade/client/models/futures_balance.py +2 -2
- crypticorn/trade/client/models/futures_trading_action.py +3 -4
- crypticorn/trade/client/models/margin_mode.py +2 -2
- crypticorn/trade/client/models/notification_model.py +2 -2
- crypticorn/trade/client/models/order_model.py +6 -16
- crypticorn/trade/client/models/order_status.py +2 -2
- crypticorn/trade/client/models/post_futures_action.py +2 -2
- crypticorn/trade/client/models/spot_trading_action.py +3 -4
- crypticorn/trade/client/models/strategy_exchange_info.py +4 -5
- crypticorn/trade/client/models/strategy_model_input.py +3 -4
- crypticorn/trade/client/models/strategy_model_output.py +3 -4
- crypticorn/trade/client/models/tpsl.py +5 -3
- crypticorn/trade/client/models/trading_action_type.py +2 -2
- crypticorn/trade/client/rest.py +2 -2
- {crypticorn-2.5.1.dist-info → crypticorn-2.5.3.dist-info}/METADATA +1 -1
- crypticorn-2.5.3.dist-info/RECORD +223 -0
- crypticorn/hive/client/models/http_validation_error.py +0 -99
- crypticorn/hive/client/models/validation_error.py +0 -105
- crypticorn/hive/client/models/validation_error_loc_inner.py +0 -159
- crypticorn/klines/client/api/health_check_api.py +0 -265
- crypticorn/klines/client/models/api_error_identifier.py +0 -108
- crypticorn/klines/client/models/api_error_level.py +0 -37
- crypticorn/klines/client/models/api_error_type.py +0 -37
- crypticorn/klines/client/models/base_response_health_check_response.py +0 -114
- crypticorn/klines/client/models/base_response_list_change_in_timeframe_response.py +0 -123
- crypticorn/klines/client/models/base_response_list_funding_rate_response.py +0 -118
- crypticorn/klines/client/models/base_response_list_str.py +0 -106
- crypticorn/klines/client/models/base_response_ohlcv_response.py +0 -114
- crypticorn/klines/client/models/change_in_timeframe_response.py +0 -86
- crypticorn/klines/client/models/exchange.py +0 -91
- crypticorn/klines/client/models/funding_rate_response.py +0 -92
- crypticorn/klines/client/models/health_check_response.py +0 -91
- crypticorn/klines/client/models/history_error_response.py +0 -89
- crypticorn/klines/client/models/history_no_data_response.py +0 -99
- crypticorn/klines/client/models/history_success_response.py +0 -99
- crypticorn/klines/client/models/http_validation_error.py +0 -99
- crypticorn/klines/client/models/internal_exchange.py +0 -39
- crypticorn/klines/client/models/market.py +0 -35
- crypticorn/klines/client/models/market_type.py +0 -35
- crypticorn/klines/client/models/ohlcv_response.py +0 -105
- crypticorn/klines/client/models/response_get_history_udf_history_get.py +0 -198
- crypticorn/klines/client/models/response_get_udf_history.py +0 -198
- crypticorn/klines/client/models/search_symbol_response.py +0 -104
- crypticorn/klines/client/models/symbol_group_response.py +0 -83
- crypticorn/klines/client/models/symbol_info_response.py +0 -131
- crypticorn/klines/client/models/udf_config_response.py +0 -160
- crypticorn/klines/client/models/validation_error.py +0 -105
- crypticorn/klines/client/models/validation_error_loc_inner.py +0 -159
- crypticorn/metrics/client/api/health_check_api.py +0 -265
- crypticorn/metrics/client/models/api_error_identifier.py +0 -108
- crypticorn/metrics/client/models/api_error_level.py +0 -37
- crypticorn/metrics/client/models/api_error_type.py +0 -37
- crypticorn/metrics/client/models/base_response_health_check_response.py +0 -114
- crypticorn/metrics/client/models/base_response_list_dict.py +0 -106
- crypticorn/metrics/client/models/base_response_list_exchange_mapping.py +0 -118
- crypticorn/metrics/client/models/base_response_list_str.py +0 -106
- crypticorn/metrics/client/models/exchange_mapping.py +0 -134
- crypticorn/metrics/client/models/health_check_response.py +0 -91
- crypticorn/metrics/client/models/http_validation_error.py +0 -99
- crypticorn/metrics/client/models/internal_exchange.py +0 -39
- crypticorn/metrics/client/models/market.py +0 -35
- crypticorn/metrics/client/models/market_type.py +0 -35
- crypticorn/metrics/client/models/validation_error.py +0 -105
- crypticorn/metrics/client/models/validation_error_loc_inner.py +0 -159
- crypticorn/pay/client/models/api_status_res.py +0 -83
- crypticorn/pay/client/models/body_create_now_invoice.py +0 -98
- crypticorn/pay/client/models/body_create_product.py +0 -98
- crypticorn/pay/client/models/body_get_products.py +0 -87
- crypticorn/pay/client/models/body_handle_now_webhook.py +0 -98
- crypticorn/pay/client/models/body_update_product.py +0 -98
- crypticorn/pay/client/models/combined_payment_history.py +0 -101
- crypticorn/pay/client/models/create_invoice_req.py +0 -188
- crypticorn/pay/client/models/create_invoice_res.py +0 -188
- crypticorn/pay/client/models/currency.py +0 -165
- crypticorn/pay/client/models/estimate_price_req.py +0 -91
- crypticorn/pay/client/models/estimate_price_res.py +0 -102
- crypticorn/pay/client/models/get_currencies_res.py +0 -99
- crypticorn/pay/client/models/get_payment_status_res.py +0 -222
- crypticorn/pay/client/models/get_payments_list_res.py +0 -109
- crypticorn/pay/client/models/http_validation_error.py +0 -99
- crypticorn/pay/client/models/min_amount_req.py +0 -124
- crypticorn/pay/client/models/min_amount_res.py +0 -105
- crypticorn/pay/client/models/now_api_status_res.py +0 -83
- crypticorn/pay/client/models/now_fee_structure.py +0 -104
- crypticorn/pay/client/models/now_payment_model.py +0 -124
- crypticorn/pay/client/models/now_payment_status.py +0 -42
- crypticorn/pay/client/models/now_webhook_payload.py +0 -181
- crypticorn/pay/client/models/partial_product_update_model.py +0 -150
- crypticorn/pay/client/models/product.py +0 -87
- crypticorn/pay/client/models/product_model.py +0 -128
- crypticorn/pay/client/models/product_subs_model.py +0 -108
- crypticorn/pay/client/models/product_update_model.py +0 -150
- crypticorn/pay/client/models/unified_payment_model.py +0 -112
- crypticorn/pay/client/models/validation_error.py +0 -105
- crypticorn/pay/client/models/validation_error_loc_inner.py +0 -159
- crypticorn/trade/client/models/api_key_model.py +0 -156
- crypticorn/trade/client/models/exchange.py +0 -35
- crypticorn/trade/client/models/http_validation_error.py +0 -99
- crypticorn/trade/client/models/market_type.py +0 -35
- crypticorn/trade/client/models/validation_error.py +0 -105
- crypticorn/trade/client/models/validation_error_loc_inner.py +0 -159
- crypticorn-2.5.1.dist-info/RECORD +0 -307
- {crypticorn-2.5.1.dist-info → crypticorn-2.5.3.dist-info}/WHEEL +0 -0
- {crypticorn-2.5.1.dist-info → crypticorn-2.5.3.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.5.1.dist-info → crypticorn-2.5.3.dist-info}/top_level.txt +0 -0
@@ -16,7 +16,8 @@ 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
|
19
|
+
from pydantic import StrictStr, field_validator
|
20
|
+
from typing import Any, Dict, Optional
|
20
21
|
|
21
22
|
from crypticorn.klines.client.api_client import ApiClient, RequestSerialized
|
22
23
|
from crypticorn.klines.client.api_response import ApiResponse
|
@@ -35,6 +36,477 @@ class StatusApi:
|
|
35
36
|
api_client = ApiClient.get_default()
|
36
37
|
self.api_client = api_client
|
37
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
|
+
@validate_call
|
267
|
+
async def get_time(
|
268
|
+
self,
|
269
|
+
type: Optional[StrictStr] = None,
|
270
|
+
_request_timeout: Union[
|
271
|
+
None,
|
272
|
+
Annotated[StrictFloat, Field(gt=0)],
|
273
|
+
Tuple[
|
274
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
275
|
+
],
|
276
|
+
] = None,
|
277
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
278
|
+
_content_type: Optional[StrictStr] = None,
|
279
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
280
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
281
|
+
) -> str:
|
282
|
+
"""Time
|
283
|
+
|
284
|
+
Returns the current time in the specified format.
|
285
|
+
|
286
|
+
:param type:
|
287
|
+
:type type: str
|
288
|
+
:param _request_timeout: timeout setting for this request. If one
|
289
|
+
number provided, it will be total request
|
290
|
+
timeout. It can also be a pair (tuple) of
|
291
|
+
(connection, read) timeouts.
|
292
|
+
:type _request_timeout: int, tuple(int, int), optional
|
293
|
+
:param _request_auth: set to override the auth_settings for an a single
|
294
|
+
request; this effectively ignores the
|
295
|
+
authentication in the spec for a single request.
|
296
|
+
:type _request_auth: dict, optional
|
297
|
+
:param _content_type: force content-type for the request.
|
298
|
+
:type _content_type: str, Optional
|
299
|
+
:param _headers: set to override the headers for a single
|
300
|
+
request; this effectively ignores the headers
|
301
|
+
in the spec for a single request.
|
302
|
+
:type _headers: dict, optional
|
303
|
+
:param _host_index: set to override the host_index for a single
|
304
|
+
request; this effectively ignores the host_index
|
305
|
+
in the spec for a single request.
|
306
|
+
:type _host_index: int, optional
|
307
|
+
:return: Returns the result object.
|
308
|
+
""" # noqa: E501
|
309
|
+
|
310
|
+
_param = self._get_time_serialize(
|
311
|
+
type=type,
|
312
|
+
_request_auth=_request_auth,
|
313
|
+
_content_type=_content_type,
|
314
|
+
_headers=_headers,
|
315
|
+
_host_index=_host_index,
|
316
|
+
)
|
317
|
+
|
318
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
319
|
+
"200": "str",
|
320
|
+
}
|
321
|
+
response_data = await self.api_client.call_api(
|
322
|
+
*_param, _request_timeout=_request_timeout
|
323
|
+
)
|
324
|
+
await response_data.read()
|
325
|
+
return self.api_client.response_deserialize(
|
326
|
+
response_data=response_data,
|
327
|
+
response_types_map=_response_types_map,
|
328
|
+
).data
|
329
|
+
|
330
|
+
@validate_call
|
331
|
+
async def get_time_with_http_info(
|
332
|
+
self,
|
333
|
+
type: Optional[StrictStr] = None,
|
334
|
+
_request_timeout: Union[
|
335
|
+
None,
|
336
|
+
Annotated[StrictFloat, Field(gt=0)],
|
337
|
+
Tuple[
|
338
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
339
|
+
],
|
340
|
+
] = None,
|
341
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
342
|
+
_content_type: Optional[StrictStr] = None,
|
343
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
344
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
345
|
+
) -> ApiResponse[str]:
|
346
|
+
"""Time
|
347
|
+
|
348
|
+
Returns the current time in the specified format.
|
349
|
+
|
350
|
+
:param type:
|
351
|
+
:type type: str
|
352
|
+
:param _request_timeout: timeout setting for this request. If one
|
353
|
+
number provided, it will be total request
|
354
|
+
timeout. It can also be a pair (tuple) of
|
355
|
+
(connection, read) timeouts.
|
356
|
+
:type _request_timeout: int, tuple(int, int), optional
|
357
|
+
:param _request_auth: set to override the auth_settings for an a single
|
358
|
+
request; this effectively ignores the
|
359
|
+
authentication in the spec for a single request.
|
360
|
+
:type _request_auth: dict, optional
|
361
|
+
:param _content_type: force content-type for the request.
|
362
|
+
:type _content_type: str, Optional
|
363
|
+
:param _headers: set to override the headers for a single
|
364
|
+
request; this effectively ignores the headers
|
365
|
+
in the spec for a single request.
|
366
|
+
:type _headers: dict, optional
|
367
|
+
:param _host_index: set to override the host_index for a single
|
368
|
+
request; this effectively ignores the host_index
|
369
|
+
in the spec for a single request.
|
370
|
+
:type _host_index: int, optional
|
371
|
+
:return: Returns the result object.
|
372
|
+
""" # noqa: E501
|
373
|
+
|
374
|
+
_param = self._get_time_serialize(
|
375
|
+
type=type,
|
376
|
+
_request_auth=_request_auth,
|
377
|
+
_content_type=_content_type,
|
378
|
+
_headers=_headers,
|
379
|
+
_host_index=_host_index,
|
380
|
+
)
|
381
|
+
|
382
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
383
|
+
"200": "str",
|
384
|
+
}
|
385
|
+
response_data = await self.api_client.call_api(
|
386
|
+
*_param, _request_timeout=_request_timeout
|
387
|
+
)
|
388
|
+
await response_data.read()
|
389
|
+
return self.api_client.response_deserialize(
|
390
|
+
response_data=response_data,
|
391
|
+
response_types_map=_response_types_map,
|
392
|
+
)
|
393
|
+
|
394
|
+
@validate_call
|
395
|
+
async def get_time_without_preload_content(
|
396
|
+
self,
|
397
|
+
type: Optional[StrictStr] = None,
|
398
|
+
_request_timeout: Union[
|
399
|
+
None,
|
400
|
+
Annotated[StrictFloat, Field(gt=0)],
|
401
|
+
Tuple[
|
402
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
403
|
+
],
|
404
|
+
] = None,
|
405
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
406
|
+
_content_type: Optional[StrictStr] = None,
|
407
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
408
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
409
|
+
) -> RESTResponseType:
|
410
|
+
"""Time
|
411
|
+
|
412
|
+
Returns the current time in the specified format.
|
413
|
+
|
414
|
+
:param type:
|
415
|
+
:type type: str
|
416
|
+
:param _request_timeout: timeout setting for this request. If one
|
417
|
+
number provided, it will be total request
|
418
|
+
timeout. It can also be a pair (tuple) of
|
419
|
+
(connection, read) timeouts.
|
420
|
+
:type _request_timeout: int, tuple(int, int), optional
|
421
|
+
:param _request_auth: set to override the auth_settings for an a single
|
422
|
+
request; this effectively ignores the
|
423
|
+
authentication in the spec for a single request.
|
424
|
+
:type _request_auth: dict, optional
|
425
|
+
:param _content_type: force content-type for the request.
|
426
|
+
:type _content_type: str, Optional
|
427
|
+
:param _headers: set to override the headers for a single
|
428
|
+
request; this effectively ignores the headers
|
429
|
+
in the spec for a single request.
|
430
|
+
:type _headers: dict, optional
|
431
|
+
:param _host_index: set to override the host_index for a single
|
432
|
+
request; this effectively ignores the host_index
|
433
|
+
in the spec for a single request.
|
434
|
+
:type _host_index: int, optional
|
435
|
+
:return: Returns the result object.
|
436
|
+
""" # noqa: E501
|
437
|
+
|
438
|
+
_param = self._get_time_serialize(
|
439
|
+
type=type,
|
440
|
+
_request_auth=_request_auth,
|
441
|
+
_content_type=_content_type,
|
442
|
+
_headers=_headers,
|
443
|
+
_host_index=_host_index,
|
444
|
+
)
|
445
|
+
|
446
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
447
|
+
"200": "str",
|
448
|
+
}
|
449
|
+
response_data = await self.api_client.call_api(
|
450
|
+
*_param, _request_timeout=_request_timeout
|
451
|
+
)
|
452
|
+
return response_data.response
|
453
|
+
|
454
|
+
def _get_time_serialize(
|
455
|
+
self,
|
456
|
+
type,
|
457
|
+
_request_auth,
|
458
|
+
_content_type,
|
459
|
+
_headers,
|
460
|
+
_host_index,
|
461
|
+
) -> RequestSerialized:
|
462
|
+
|
463
|
+
_host = None
|
464
|
+
|
465
|
+
_collection_formats: Dict[str, str] = {}
|
466
|
+
|
467
|
+
_path_params: Dict[str, str] = {}
|
468
|
+
_query_params: List[Tuple[str, str]] = []
|
469
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
470
|
+
_form_params: List[Tuple[str, str]] = []
|
471
|
+
_files: Dict[
|
472
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
473
|
+
] = {}
|
474
|
+
_body_params: Optional[bytes] = None
|
475
|
+
|
476
|
+
# process the path parameters
|
477
|
+
# process the query parameters
|
478
|
+
if type is not None:
|
479
|
+
|
480
|
+
_query_params.append(("type", type))
|
481
|
+
|
482
|
+
# process the header parameters
|
483
|
+
# process the form parameters
|
484
|
+
# process the body parameter
|
485
|
+
|
486
|
+
# set the HTTP header `Accept`
|
487
|
+
if "Accept" not in _header_params:
|
488
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
489
|
+
["application/json"]
|
490
|
+
)
|
491
|
+
|
492
|
+
# authentication setting
|
493
|
+
_auth_settings: List[str] = []
|
494
|
+
|
495
|
+
return self.api_client.param_serialize(
|
496
|
+
method="GET",
|
497
|
+
resource_path="/time",
|
498
|
+
path_params=_path_params,
|
499
|
+
query_params=_query_params,
|
500
|
+
header_params=_header_params,
|
501
|
+
body=_body_params,
|
502
|
+
post_params=_form_params,
|
503
|
+
files=_files,
|
504
|
+
auth_settings=_auth_settings,
|
505
|
+
collection_formats=_collection_formats,
|
506
|
+
_host=_host,
|
507
|
+
_request_auth=_request_auth,
|
508
|
+
)
|
509
|
+
|
38
510
|
@validate_call
|
39
511
|
async def ping(
|
40
512
|
self,
|
@@ -49,9 +521,10 @@ class StatusApi:
|
|
49
521
|
_content_type: Optional[StrictStr] = None,
|
50
522
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
51
523
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
52
|
-
) ->
|
524
|
+
) -> str:
|
53
525
|
"""Ping
|
54
526
|
|
527
|
+
Returns 'OK' if the API is running.
|
55
528
|
|
56
529
|
:param _request_timeout: timeout setting for this request. If one
|
57
530
|
number provided, it will be total request
|
@@ -83,7 +556,7 @@ class StatusApi:
|
|
83
556
|
)
|
84
557
|
|
85
558
|
_response_types_map: Dict[str, Optional[str]] = {
|
86
|
-
"200": "
|
559
|
+
"200": "str",
|
87
560
|
}
|
88
561
|
response_data = await self.api_client.call_api(
|
89
562
|
*_param, _request_timeout=_request_timeout
|
@@ -108,9 +581,10 @@ class StatusApi:
|
|
108
581
|
_content_type: Optional[StrictStr] = None,
|
109
582
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
110
583
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
111
|
-
) -> ApiResponse[
|
584
|
+
) -> ApiResponse[str]:
|
112
585
|
"""Ping
|
113
586
|
|
587
|
+
Returns 'OK' if the API is running.
|
114
588
|
|
115
589
|
:param _request_timeout: timeout setting for this request. If one
|
116
590
|
number provided, it will be total request
|
@@ -142,7 +616,7 @@ class StatusApi:
|
|
142
616
|
)
|
143
617
|
|
144
618
|
_response_types_map: Dict[str, Optional[str]] = {
|
145
|
-
"200": "
|
619
|
+
"200": "str",
|
146
620
|
}
|
147
621
|
response_data = await self.api_client.call_api(
|
148
622
|
*_param, _request_timeout=_request_timeout
|
@@ -170,6 +644,7 @@ class StatusApi:
|
|
170
644
|
) -> RESTResponseType:
|
171
645
|
"""Ping
|
172
646
|
|
647
|
+
Returns 'OK' if the API is running.
|
173
648
|
|
174
649
|
:param _request_timeout: timeout setting for this request. If one
|
175
650
|
number provided, it will be total request
|
@@ -201,7 +676,7 @@ class StatusApi:
|
|
201
676
|
)
|
202
677
|
|
203
678
|
_response_types_map: Dict[str, Optional[str]] = {
|
204
|
-
"200": "
|
679
|
+
"200": "str",
|
205
680
|
}
|
206
681
|
response_data = await self.api_client.call_api(
|
207
682
|
*_param, _request_timeout=_request_timeout
|
@@ -19,7 +19,6 @@ 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
|
23
22
|
|
24
23
|
from crypticorn.klines.client.api_client import ApiClient, RequestSerialized
|
25
24
|
from crypticorn.klines.client.api_response import ApiResponse
|
@@ -41,7 +40,7 @@ class SymbolsApi:
|
|
41
40
|
@validate_call
|
42
41
|
async def get_klines_symbols(
|
43
42
|
self,
|
44
|
-
market: Annotated[
|
43
|
+
market: Annotated[StrictStr, Field(description="Market type")],
|
45
44
|
_request_timeout: Union[
|
46
45
|
None,
|
47
46
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -59,7 +58,7 @@ class SymbolsApi:
|
|
59
58
|
Retrieve a list of whitelisted symbols for a specific market.
|
60
59
|
|
61
60
|
:param market: Market type (required)
|
62
|
-
:type market:
|
61
|
+
:type market: str
|
63
62
|
:param _request_timeout: timeout setting for this request. If one
|
64
63
|
number provided, it will be total request
|
65
64
|
timeout. It can also be a pair (tuple) of
|
@@ -105,7 +104,7 @@ class SymbolsApi:
|
|
105
104
|
@validate_call
|
106
105
|
async def get_klines_symbols_with_http_info(
|
107
106
|
self,
|
108
|
-
market: Annotated[
|
107
|
+
market: Annotated[StrictStr, Field(description="Market type")],
|
109
108
|
_request_timeout: Union[
|
110
109
|
None,
|
111
110
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -123,7 +122,7 @@ class SymbolsApi:
|
|
123
122
|
Retrieve a list of whitelisted symbols for a specific market.
|
124
123
|
|
125
124
|
:param market: Market type (required)
|
126
|
-
:type market:
|
125
|
+
:type market: str
|
127
126
|
:param _request_timeout: timeout setting for this request. If one
|
128
127
|
number provided, it will be total request
|
129
128
|
timeout. It can also be a pair (tuple) of
|
@@ -169,7 +168,7 @@ class SymbolsApi:
|
|
169
168
|
@validate_call
|
170
169
|
async def get_klines_symbols_without_preload_content(
|
171
170
|
self,
|
172
|
-
market: Annotated[
|
171
|
+
market: Annotated[StrictStr, Field(description="Market type")],
|
173
172
|
_request_timeout: Union[
|
174
173
|
None,
|
175
174
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -187,7 +186,7 @@ class SymbolsApi:
|
|
187
186
|
Retrieve a list of whitelisted symbols for a specific market.
|
188
187
|
|
189
188
|
:param market: Market type (required)
|
190
|
-
:type market:
|
189
|
+
:type market: str
|
191
190
|
:param _request_timeout: timeout setting for this request. If one
|
192
191
|
number provided, it will be total request
|
193
192
|
timeout. It can also be a pair (tuple) of
|
@@ -250,7 +249,7 @@ class SymbolsApi:
|
|
250
249
|
|
251
250
|
# process the path parameters
|
252
251
|
if market is not None:
|
253
|
-
_path_params["market"] = market
|
252
|
+
_path_params["market"] = market
|
254
253
|
# process the query parameters
|
255
254
|
# process the header parameters
|
256
255
|
# process the form parameters
|