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
@@ -1,159 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
"""
|
4
|
-
Klines Service API
|
5
|
-
|
6
|
-
API for retrieving OHLCV data, funding rates, and symbol information from Binance. ## WebSocket Support Connect to `/ws` to receive real-time OHLCV updates. Example subscription message: ```json { \"action\": \"subscribe\", \"market\": \"spot\", \"symbol\": \"BTCUSDT\", \"timeframe\": \"15m\" } ```
|
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
|
-
from inspect import getfullargspec
|
17
|
-
import json
|
18
|
-
import pprint
|
19
|
-
import re # noqa: F401
|
20
|
-
from pydantic import (
|
21
|
-
BaseModel,
|
22
|
-
ConfigDict,
|
23
|
-
Field,
|
24
|
-
StrictInt,
|
25
|
-
StrictStr,
|
26
|
-
ValidationError,
|
27
|
-
field_validator,
|
28
|
-
)
|
29
|
-
from typing import Optional
|
30
|
-
from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict
|
31
|
-
from typing_extensions import Literal, Self
|
32
|
-
from pydantic import Field
|
33
|
-
|
34
|
-
VALIDATIONERRORLOCINNER_ANY_OF_SCHEMAS = ["int", "str"]
|
35
|
-
|
36
|
-
|
37
|
-
class ValidationErrorLocInner(BaseModel):
|
38
|
-
"""
|
39
|
-
ValidationErrorLocInner
|
40
|
-
"""
|
41
|
-
|
42
|
-
# data type: str
|
43
|
-
anyof_schema_1_validator: Optional[StrictStr] = None
|
44
|
-
# data type: int
|
45
|
-
anyof_schema_2_validator: Optional[StrictInt] = None
|
46
|
-
if TYPE_CHECKING:
|
47
|
-
actual_instance: Optional[Union[int, str]] = None
|
48
|
-
else:
|
49
|
-
actual_instance: Any = None
|
50
|
-
any_of_schemas: Set[str] = {"int", "str"}
|
51
|
-
|
52
|
-
model_config = {
|
53
|
-
"validate_assignment": True,
|
54
|
-
"protected_namespaces": (),
|
55
|
-
}
|
56
|
-
|
57
|
-
def __init__(self, *args, **kwargs) -> None:
|
58
|
-
if args:
|
59
|
-
if len(args) > 1:
|
60
|
-
raise ValueError(
|
61
|
-
"If a position argument is used, only 1 is allowed to set `actual_instance`"
|
62
|
-
)
|
63
|
-
if kwargs:
|
64
|
-
raise ValueError(
|
65
|
-
"If a position argument is used, keyword arguments cannot be used."
|
66
|
-
)
|
67
|
-
super().__init__(actual_instance=args[0])
|
68
|
-
else:
|
69
|
-
super().__init__(**kwargs)
|
70
|
-
|
71
|
-
@field_validator("actual_instance")
|
72
|
-
def actual_instance_must_validate_anyof(cls, v):
|
73
|
-
instance = ValidationErrorLocInner.model_construct()
|
74
|
-
error_messages = []
|
75
|
-
# validate data type: str
|
76
|
-
try:
|
77
|
-
instance.anyof_schema_1_validator = v
|
78
|
-
return v
|
79
|
-
except (ValidationError, ValueError) as e:
|
80
|
-
error_messages.append(str(e))
|
81
|
-
# validate data type: int
|
82
|
-
try:
|
83
|
-
instance.anyof_schema_2_validator = v
|
84
|
-
return v
|
85
|
-
except (ValidationError, ValueError) as e:
|
86
|
-
error_messages.append(str(e))
|
87
|
-
if error_messages:
|
88
|
-
# no match
|
89
|
-
raise ValueError(
|
90
|
-
"No match found when setting the actual_instance in ValidationErrorLocInner with anyOf schemas: int, str. Details: "
|
91
|
-
+ ", ".join(error_messages)
|
92
|
-
)
|
93
|
-
else:
|
94
|
-
return v
|
95
|
-
|
96
|
-
@classmethod
|
97
|
-
def from_dict(cls, obj: Dict[str, Any]) -> Self:
|
98
|
-
return cls.from_json(json.dumps(obj))
|
99
|
-
|
100
|
-
@classmethod
|
101
|
-
def from_json(cls, json_str: str) -> Self:
|
102
|
-
"""Returns the object represented by the json string"""
|
103
|
-
instance = cls.model_construct()
|
104
|
-
error_messages = []
|
105
|
-
# deserialize data into str
|
106
|
-
try:
|
107
|
-
# validation
|
108
|
-
instance.anyof_schema_1_validator = json.loads(json_str)
|
109
|
-
# assign value to actual_instance
|
110
|
-
instance.actual_instance = instance.anyof_schema_1_validator
|
111
|
-
return instance
|
112
|
-
except (ValidationError, ValueError) as e:
|
113
|
-
error_messages.append(str(e))
|
114
|
-
# deserialize data into int
|
115
|
-
try:
|
116
|
-
# validation
|
117
|
-
instance.anyof_schema_2_validator = json.loads(json_str)
|
118
|
-
# assign value to actual_instance
|
119
|
-
instance.actual_instance = instance.anyof_schema_2_validator
|
120
|
-
return instance
|
121
|
-
except (ValidationError, ValueError) as e:
|
122
|
-
error_messages.append(str(e))
|
123
|
-
|
124
|
-
if error_messages:
|
125
|
-
# no match
|
126
|
-
raise ValueError(
|
127
|
-
"No match found when deserializing the JSON string into ValidationErrorLocInner with anyOf schemas: int, str. Details: "
|
128
|
-
+ ", ".join(error_messages)
|
129
|
-
)
|
130
|
-
else:
|
131
|
-
return instance
|
132
|
-
|
133
|
-
def to_json(self) -> str:
|
134
|
-
"""Returns the JSON representation of the actual instance"""
|
135
|
-
if self.actual_instance is None:
|
136
|
-
return "null"
|
137
|
-
|
138
|
-
if hasattr(self.actual_instance, "to_json") and callable(
|
139
|
-
self.actual_instance.to_json
|
140
|
-
):
|
141
|
-
return self.actual_instance.to_json()
|
142
|
-
else:
|
143
|
-
return json.dumps(self.actual_instance)
|
144
|
-
|
145
|
-
def to_dict(self) -> Optional[Union[Dict[str, Any], int, str]]:
|
146
|
-
"""Returns the dict representation of the actual instance"""
|
147
|
-
if self.actual_instance is None:
|
148
|
-
return None
|
149
|
-
|
150
|
-
if hasattr(self.actual_instance, "to_dict") and callable(
|
151
|
-
self.actual_instance.to_dict
|
152
|
-
):
|
153
|
-
return self.actual_instance.to_dict()
|
154
|
-
else:
|
155
|
-
return self.actual_instance
|
156
|
-
|
157
|
-
def to_str(self) -> str:
|
158
|
-
"""Returns the string representation of the actual instance"""
|
159
|
-
return pprint.pformat(self.model_dump())
|
@@ -1,265 +0,0 @@
|
|
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 crypticorn.metrics.client.models.base_response_health_check_response import (
|
20
|
-
BaseResponseHealthCheckResponse,
|
21
|
-
)
|
22
|
-
|
23
|
-
from crypticorn.metrics.client.api_client import ApiClient, RequestSerialized
|
24
|
-
from crypticorn.metrics.client.api_response import ApiResponse
|
25
|
-
from crypticorn.metrics.client.rest import RESTResponseType
|
26
|
-
|
27
|
-
|
28
|
-
class HealthCheckApi:
|
29
|
-
"""NOTE: This class is auto generated by OpenAPI Generator
|
30
|
-
Ref: https://openapi-generator.tech
|
31
|
-
|
32
|
-
Do not edit the class manually.
|
33
|
-
"""
|
34
|
-
|
35
|
-
def __init__(self, api_client=None) -> None:
|
36
|
-
if api_client is None:
|
37
|
-
api_client = ApiClient.get_default()
|
38
|
-
self.api_client = api_client
|
39
|
-
|
40
|
-
@validate_call
|
41
|
-
async def health_check(
|
42
|
-
self,
|
43
|
-
_request_timeout: Union[
|
44
|
-
None,
|
45
|
-
Annotated[StrictFloat, Field(gt=0)],
|
46
|
-
Tuple[
|
47
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
48
|
-
],
|
49
|
-
] = None,
|
50
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
51
|
-
_content_type: Optional[StrictStr] = None,
|
52
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
53
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
54
|
-
) -> BaseResponseHealthCheckResponse:
|
55
|
-
"""Read Root
|
56
|
-
|
57
|
-
Health check endpoint to verify if the API is running.
|
58
|
-
|
59
|
-
:param _request_timeout: timeout setting for this request. If one
|
60
|
-
number provided, it will be total request
|
61
|
-
timeout. It can also be a pair (tuple) of
|
62
|
-
(connection, read) timeouts.
|
63
|
-
:type _request_timeout: int, tuple(int, int), optional
|
64
|
-
:param _request_auth: set to override the auth_settings for an a single
|
65
|
-
request; this effectively ignores the
|
66
|
-
authentication in the spec for a single request.
|
67
|
-
:type _request_auth: dict, optional
|
68
|
-
:param _content_type: force content-type for the request.
|
69
|
-
:type _content_type: str, Optional
|
70
|
-
:param _headers: set to override the headers for a single
|
71
|
-
request; this effectively ignores the headers
|
72
|
-
in the spec for a single request.
|
73
|
-
:type _headers: dict, optional
|
74
|
-
:param _host_index: set to override the host_index for a single
|
75
|
-
request; this effectively ignores the host_index
|
76
|
-
in the spec for a single request.
|
77
|
-
:type _host_index: int, optional
|
78
|
-
:return: Returns the result object.
|
79
|
-
""" # noqa: E501
|
80
|
-
|
81
|
-
_param = self._health_check_serialize(
|
82
|
-
_request_auth=_request_auth,
|
83
|
-
_content_type=_content_type,
|
84
|
-
_headers=_headers,
|
85
|
-
_host_index=_host_index,
|
86
|
-
)
|
87
|
-
|
88
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
89
|
-
"200": "BaseResponseHealthCheckResponse",
|
90
|
-
}
|
91
|
-
response_data = await self.api_client.call_api(
|
92
|
-
*_param, _request_timeout=_request_timeout
|
93
|
-
)
|
94
|
-
await response_data.read()
|
95
|
-
return self.api_client.response_deserialize(
|
96
|
-
response_data=response_data,
|
97
|
-
response_types_map=_response_types_map,
|
98
|
-
).data
|
99
|
-
|
100
|
-
@validate_call
|
101
|
-
async def health_check_with_http_info(
|
102
|
-
self,
|
103
|
-
_request_timeout: Union[
|
104
|
-
None,
|
105
|
-
Annotated[StrictFloat, Field(gt=0)],
|
106
|
-
Tuple[
|
107
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
108
|
-
],
|
109
|
-
] = None,
|
110
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
111
|
-
_content_type: Optional[StrictStr] = None,
|
112
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
113
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
114
|
-
) -> ApiResponse[BaseResponseHealthCheckResponse]:
|
115
|
-
"""Read Root
|
116
|
-
|
117
|
-
Health check endpoint to verify if the API is running.
|
118
|
-
|
119
|
-
:param _request_timeout: timeout setting for this request. If one
|
120
|
-
number provided, it will be total request
|
121
|
-
timeout. It can also be a pair (tuple) of
|
122
|
-
(connection, read) timeouts.
|
123
|
-
:type _request_timeout: int, tuple(int, int), optional
|
124
|
-
:param _request_auth: set to override the auth_settings for an a single
|
125
|
-
request; this effectively ignores the
|
126
|
-
authentication in the spec for a single request.
|
127
|
-
:type _request_auth: dict, optional
|
128
|
-
:param _content_type: force content-type for the request.
|
129
|
-
:type _content_type: str, Optional
|
130
|
-
:param _headers: set to override the headers for a single
|
131
|
-
request; this effectively ignores the headers
|
132
|
-
in the spec for a single request.
|
133
|
-
:type _headers: dict, optional
|
134
|
-
:param _host_index: set to override the host_index for a single
|
135
|
-
request; this effectively ignores the host_index
|
136
|
-
in the spec for a single request.
|
137
|
-
:type _host_index: int, optional
|
138
|
-
:return: Returns the result object.
|
139
|
-
""" # noqa: E501
|
140
|
-
|
141
|
-
_param = self._health_check_serialize(
|
142
|
-
_request_auth=_request_auth,
|
143
|
-
_content_type=_content_type,
|
144
|
-
_headers=_headers,
|
145
|
-
_host_index=_host_index,
|
146
|
-
)
|
147
|
-
|
148
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
149
|
-
"200": "BaseResponseHealthCheckResponse",
|
150
|
-
}
|
151
|
-
response_data = await self.api_client.call_api(
|
152
|
-
*_param, _request_timeout=_request_timeout
|
153
|
-
)
|
154
|
-
await response_data.read()
|
155
|
-
return self.api_client.response_deserialize(
|
156
|
-
response_data=response_data,
|
157
|
-
response_types_map=_response_types_map,
|
158
|
-
)
|
159
|
-
|
160
|
-
@validate_call
|
161
|
-
async def health_check_without_preload_content(
|
162
|
-
self,
|
163
|
-
_request_timeout: Union[
|
164
|
-
None,
|
165
|
-
Annotated[StrictFloat, Field(gt=0)],
|
166
|
-
Tuple[
|
167
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
168
|
-
],
|
169
|
-
] = None,
|
170
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
171
|
-
_content_type: Optional[StrictStr] = None,
|
172
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
173
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
174
|
-
) -> RESTResponseType:
|
175
|
-
"""Read Root
|
176
|
-
|
177
|
-
Health check endpoint to verify if the API is running.
|
178
|
-
|
179
|
-
:param _request_timeout: timeout setting for this request. If one
|
180
|
-
number provided, it will be total request
|
181
|
-
timeout. It can also be a pair (tuple) of
|
182
|
-
(connection, read) timeouts.
|
183
|
-
:type _request_timeout: int, tuple(int, int), optional
|
184
|
-
:param _request_auth: set to override the auth_settings for an a single
|
185
|
-
request; this effectively ignores the
|
186
|
-
authentication in the spec for a single request.
|
187
|
-
:type _request_auth: dict, optional
|
188
|
-
:param _content_type: force content-type for the request.
|
189
|
-
:type _content_type: str, Optional
|
190
|
-
:param _headers: set to override the headers for a single
|
191
|
-
request; this effectively ignores the headers
|
192
|
-
in the spec for a single request.
|
193
|
-
:type _headers: dict, optional
|
194
|
-
:param _host_index: set to override the host_index for a single
|
195
|
-
request; this effectively ignores the host_index
|
196
|
-
in the spec for a single request.
|
197
|
-
:type _host_index: int, optional
|
198
|
-
:return: Returns the result object.
|
199
|
-
""" # noqa: E501
|
200
|
-
|
201
|
-
_param = self._health_check_serialize(
|
202
|
-
_request_auth=_request_auth,
|
203
|
-
_content_type=_content_type,
|
204
|
-
_headers=_headers,
|
205
|
-
_host_index=_host_index,
|
206
|
-
)
|
207
|
-
|
208
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
209
|
-
"200": "BaseResponseHealthCheckResponse",
|
210
|
-
}
|
211
|
-
response_data = await self.api_client.call_api(
|
212
|
-
*_param, _request_timeout=_request_timeout
|
213
|
-
)
|
214
|
-
return response_data.response
|
215
|
-
|
216
|
-
def _health_check_serialize(
|
217
|
-
self,
|
218
|
-
_request_auth,
|
219
|
-
_content_type,
|
220
|
-
_headers,
|
221
|
-
_host_index,
|
222
|
-
) -> RequestSerialized:
|
223
|
-
|
224
|
-
_host = None
|
225
|
-
|
226
|
-
_collection_formats: Dict[str, str] = {}
|
227
|
-
|
228
|
-
_path_params: Dict[str, str] = {}
|
229
|
-
_query_params: List[Tuple[str, str]] = []
|
230
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
231
|
-
_form_params: List[Tuple[str, str]] = []
|
232
|
-
_files: Dict[
|
233
|
-
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
234
|
-
] = {}
|
235
|
-
_body_params: Optional[bytes] = None
|
236
|
-
|
237
|
-
# process the path parameters
|
238
|
-
# process the query parameters
|
239
|
-
# process the header parameters
|
240
|
-
# process the form parameters
|
241
|
-
# process the body parameter
|
242
|
-
|
243
|
-
# set the HTTP header `Accept`
|
244
|
-
if "Accept" not in _header_params:
|
245
|
-
_header_params["Accept"] = self.api_client.select_header_accept(
|
246
|
-
["application/json"]
|
247
|
-
)
|
248
|
-
|
249
|
-
# authentication setting
|
250
|
-
_auth_settings: List[str] = []
|
251
|
-
|
252
|
-
return self.api_client.param_serialize(
|
253
|
-
method="GET",
|
254
|
-
resource_path="/",
|
255
|
-
path_params=_path_params,
|
256
|
-
query_params=_query_params,
|
257
|
-
header_params=_header_params,
|
258
|
-
body=_body_params,
|
259
|
-
post_params=_form_params,
|
260
|
-
files=_files,
|
261
|
-
auth_settings=_auth_settings,
|
262
|
-
collection_formats=_collection_formats,
|
263
|
-
_host=_host,
|
264
|
-
_request_auth=_request_auth,
|
265
|
-
)
|
@@ -1,108 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
"""
|
4
|
-
Marketcap Service API
|
5
|
-
|
6
|
-
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
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
|
-
ALPHANUMERIC_CHARACTERS_ONLY = "alphanumeric_characters_only"
|
32
|
-
BLACK_SWAN = "black_swan"
|
33
|
-
BOT_ALREADY_DELETED = "bot_already_deleted"
|
34
|
-
BOT_DISABLED = "bot_disabled"
|
35
|
-
BOT_STOPPING_COMPLETED = "bot_stopping_completed"
|
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
|
-
FORBIDDEN = "forbidden"
|
57
|
-
HEDGE_MODE_NOT_ACTIVE = "hedge_mode_not_active"
|
58
|
-
HTTP_REQUEST_ERROR = "http_request_error"
|
59
|
-
INSUFFICIENT_BALANCE = "insufficient_balance"
|
60
|
-
INSUFFICIENT_MARGIN = "insufficient_margin"
|
61
|
-
INSUFFICIENT_SCOPES = "insufficient_scopes"
|
62
|
-
INVALID_API_KEY = "invalid_api_key"
|
63
|
-
INVALID_BEARER = "invalid_bearer"
|
64
|
-
INVALID_DATA = "invalid_data"
|
65
|
-
INVALID_DATA_RESPONSE = "invalid_data_response"
|
66
|
-
INVALID_EXCHANGE_KEY = "invalid_exchange_key"
|
67
|
-
INVALID_MARGIN_MODE = "invalid_margin_mode"
|
68
|
-
INVALID_PARAMETER_PROVIDED = "invalid_parameter_provided"
|
69
|
-
JWT_EXPIRED = "jwt_expired"
|
70
|
-
LEVERAGE_LIMIT_EXCEEDED = "leverage_limit_exceeded"
|
71
|
-
ORDER_VIOLATES_LIQUIDATION_PRICE_CONSTRAINTS = (
|
72
|
-
"order_violates_liquidation_price_constraints"
|
73
|
-
)
|
74
|
-
NO_CREDENTIALS = "no_credentials"
|
75
|
-
NOW_API_DOWN = "now_api_down"
|
76
|
-
OBJECT_NOT_FOUND = "object_not_found"
|
77
|
-
OBJECT_ALREADY_EXISTS = "object_already_exists"
|
78
|
-
ORDER_IS_ALREADY_FILLED = "order_is_already_filled"
|
79
|
-
ORDER_IS_BEING_PROCESSED = "order_is_being_processed"
|
80
|
-
ORDER_QUANTITY_LIMIT_EXCEEDED = "order_quantity_limit_exceeded"
|
81
|
-
ORDER_DOES_NOT_EXIST = "order_does_not_exist"
|
82
|
-
ORDER_PRICE_IS_INVALID = "order_price_is_invalid"
|
83
|
-
ORDER_SIZE_TOO_LARGE = "order_size_too_large"
|
84
|
-
ORDER_SIZE_TOO_SMALL = "order_size_too_small"
|
85
|
-
POSITION_LIMIT_EXCEEDED = "position_limit_exceeded"
|
86
|
-
POSITION_DOES_NOT_EXIST = "position_does_not_exist"
|
87
|
-
POSITION_OPENING_TEMPORARILY_SUSPENDED = "position_opening_temporarily_suspended"
|
88
|
-
POST_ONLY_ORDER_WOULD_IMMEDIATELY_MATCH = "post_only_order_would_immediately_match"
|
89
|
-
REQUEST_SCOPE_LIMIT_EXCEEDED = "request_scope_limit_exceeded"
|
90
|
-
RISK_LIMIT_EXCEEDED = "risk_limit_exceeded"
|
91
|
-
RPC_TIMEOUT = "rpc_timeout"
|
92
|
-
SYSTEM_SETTLEMENT_IN_PROCESS = "system_settlement_in_process"
|
93
|
-
STRATEGY_DISABLED = "strategy_disabled"
|
94
|
-
STRATEGY_LEVERAGE_MISMATCH = "strategy_leverage_mismatch"
|
95
|
-
STRATEGY_NOT_SUPPORTING_EXCHANGE = "strategy_not_supporting_exchange"
|
96
|
-
SUCCESS = "success"
|
97
|
-
SYMBOL_DOES_NOT_EXIST = "symbol_does_not_exist"
|
98
|
-
TRADING_ACTION_EXPIRED = "trading_action_expired"
|
99
|
-
TRADING_ACTION_SKIPPED = "trading_action_skipped"
|
100
|
-
TRADING_HAS_BEEN_LOCKED = "trading_has_been_locked"
|
101
|
-
TRADING_IS_SUSPENDED = "trading_is_suspended"
|
102
|
-
UNKNOWN_ERROR_OCCURRED = "unknown_error_occurred"
|
103
|
-
REQUESTED_RESOURCE_NOT_FOUND = "requested_resource_not_found"
|
104
|
-
|
105
|
-
@classmethod
|
106
|
-
def from_json(cls, json_str: str) -> Self:
|
107
|
-
"""Create an instance of ApiErrorIdentifier from a JSON string"""
|
108
|
-
return cls(json.loads(json_str))
|
@@ -1,37 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
"""
|
4
|
-
Marketcap Service API
|
5
|
-
|
6
|
-
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
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))
|
@@ -1,37 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
"""
|
4
|
-
Marketcap Service API
|
5
|
-
|
6
|
-
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
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))
|