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,39 +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.
|
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 InternalExchange(str, Enum):
|
22
|
-
"""
|
23
|
-
All exchanges we are using, including public (Exchange)
|
24
|
-
"""
|
25
|
-
|
26
|
-
"""
|
27
|
-
allowed enum values
|
28
|
-
"""
|
29
|
-
KUCOIN = "kucoin"
|
30
|
-
BINGX = "bingx"
|
31
|
-
BINANCE = "binance"
|
32
|
-
BYBIT = "bybit"
|
33
|
-
HYPERLIQUID = "hyperliquid"
|
34
|
-
BITGET = "bitget"
|
35
|
-
|
36
|
-
@classmethod
|
37
|
-
def from_json(cls, json_str: str) -> Self:
|
38
|
-
"""Create an instance of InternalExchange from a JSON string"""
|
39
|
-
return cls(json.loads(json_str))
|
@@ -1,35 +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
|
-
import json
|
17
|
-
from enum import Enum
|
18
|
-
from typing_extensions import Self
|
19
|
-
|
20
|
-
|
21
|
-
class Market(str, Enum):
|
22
|
-
"""
|
23
|
-
Market
|
24
|
-
"""
|
25
|
-
|
26
|
-
"""
|
27
|
-
allowed enum values
|
28
|
-
"""
|
29
|
-
SPOT = "spot"
|
30
|
-
FUTURES = "futures"
|
31
|
-
|
32
|
-
@classmethod
|
33
|
-
def from_json(cls, json_str: str) -> Self:
|
34
|
-
"""Create an instance of Market from a JSON string"""
|
35
|
-
return cls(json.loads(json_str))
|
@@ -1,35 +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.
|
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 MarketType(str, Enum):
|
22
|
-
"""
|
23
|
-
Market types
|
24
|
-
"""
|
25
|
-
|
26
|
-
"""
|
27
|
-
allowed enum values
|
28
|
-
"""
|
29
|
-
SPOT = "spot"
|
30
|
-
FUTURES = "futures"
|
31
|
-
|
32
|
-
@classmethod
|
33
|
-
def from_json(cls, json_str: str) -> Self:
|
34
|
-
"""Create an instance of MarketType from a JSON string"""
|
35
|
-
return cls(json.loads(json_str))
|
@@ -1,105 +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
|
-
import pprint
|
17
|
-
import re # noqa: F401
|
18
|
-
import json
|
19
|
-
|
20
|
-
from datetime import datetime
|
21
|
-
from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt
|
22
|
-
from typing import Any, ClassVar, Dict, List, Union
|
23
|
-
from typing import Optional, Set
|
24
|
-
from typing_extensions import Self
|
25
|
-
|
26
|
-
|
27
|
-
class OHLCVResponse(BaseModel):
|
28
|
-
"""
|
29
|
-
OHLCVResponse
|
30
|
-
""" # noqa: E501
|
31
|
-
|
32
|
-
timestamp: List[datetime]
|
33
|
-
open: List[Union[StrictFloat, StrictInt]]
|
34
|
-
high: List[Union[StrictFloat, StrictInt]]
|
35
|
-
low: List[Union[StrictFloat, StrictInt]]
|
36
|
-
close: List[Union[StrictFloat, StrictInt]]
|
37
|
-
volume: List[Union[StrictFloat, StrictInt]]
|
38
|
-
__properties: ClassVar[List[str]] = [
|
39
|
-
"timestamp",
|
40
|
-
"open",
|
41
|
-
"high",
|
42
|
-
"low",
|
43
|
-
"close",
|
44
|
-
"volume",
|
45
|
-
]
|
46
|
-
|
47
|
-
model_config = ConfigDict(
|
48
|
-
populate_by_name=True,
|
49
|
-
validate_assignment=True,
|
50
|
-
protected_namespaces=(),
|
51
|
-
)
|
52
|
-
|
53
|
-
def to_str(self) -> str:
|
54
|
-
"""Returns the string representation of the model using alias"""
|
55
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
56
|
-
|
57
|
-
def to_json(self) -> str:
|
58
|
-
"""Returns the JSON representation of the model using alias"""
|
59
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
60
|
-
return json.dumps(self.to_dict())
|
61
|
-
|
62
|
-
@classmethod
|
63
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
64
|
-
"""Create an instance of OHLCVResponse from a JSON string"""
|
65
|
-
return cls.from_dict(json.loads(json_str))
|
66
|
-
|
67
|
-
def to_dict(self) -> Dict[str, Any]:
|
68
|
-
"""Return the dictionary representation of the model using alias.
|
69
|
-
|
70
|
-
This has the following differences from calling pydantic's
|
71
|
-
`self.model_dump(by_alias=True)`:
|
72
|
-
|
73
|
-
* `None` is only added to the output dict for nullable fields that
|
74
|
-
were set at model initialization. Other fields with value `None`
|
75
|
-
are ignored.
|
76
|
-
"""
|
77
|
-
excluded_fields: Set[str] = set([])
|
78
|
-
|
79
|
-
_dict = self.model_dump(
|
80
|
-
by_alias=True,
|
81
|
-
exclude=excluded_fields,
|
82
|
-
exclude_none=True,
|
83
|
-
)
|
84
|
-
return _dict
|
85
|
-
|
86
|
-
@classmethod
|
87
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
88
|
-
"""Create an instance of OHLCVResponse from a dict"""
|
89
|
-
if obj is None:
|
90
|
-
return None
|
91
|
-
|
92
|
-
if not isinstance(obj, dict):
|
93
|
-
return cls.model_validate(obj)
|
94
|
-
|
95
|
-
_obj = cls.model_validate(
|
96
|
-
{
|
97
|
-
"timestamp": obj.get("timestamp"),
|
98
|
-
"open": obj.get("open"),
|
99
|
-
"high": obj.get("high"),
|
100
|
-
"low": obj.get("low"),
|
101
|
-
"close": obj.get("close"),
|
102
|
-
"volume": obj.get("volume"),
|
103
|
-
}
|
104
|
-
)
|
105
|
-
return _obj
|
@@ -1,198 +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
|
-
StrictStr,
|
25
|
-
ValidationError,
|
26
|
-
field_validator,
|
27
|
-
)
|
28
|
-
from typing import Optional
|
29
|
-
from crypticorn.klines.client.models.history_error_response import HistoryErrorResponse
|
30
|
-
from crypticorn.klines.client.models.history_no_data_response import (
|
31
|
-
HistoryNoDataResponse,
|
32
|
-
)
|
33
|
-
from crypticorn.klines.client.models.history_success_response import (
|
34
|
-
HistorySuccessResponse,
|
35
|
-
)
|
36
|
-
from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict
|
37
|
-
from typing_extensions import Literal, Self
|
38
|
-
from pydantic import Field
|
39
|
-
|
40
|
-
RESPONSEGETHISTORYUDFHISTORYGET_ANY_OF_SCHEMAS = [
|
41
|
-
"HistoryErrorResponse",
|
42
|
-
"HistoryNoDataResponse",
|
43
|
-
"HistorySuccessResponse",
|
44
|
-
]
|
45
|
-
|
46
|
-
|
47
|
-
class ResponseGetHistoryUdfHistoryGet(BaseModel):
|
48
|
-
"""
|
49
|
-
ResponseGetHistoryUdfHistoryGet
|
50
|
-
"""
|
51
|
-
|
52
|
-
# data type: HistorySuccessResponse
|
53
|
-
anyof_schema_1_validator: Optional[HistorySuccessResponse] = None
|
54
|
-
# data type: HistoryNoDataResponse
|
55
|
-
anyof_schema_2_validator: Optional[HistoryNoDataResponse] = None
|
56
|
-
# data type: HistoryErrorResponse
|
57
|
-
anyof_schema_3_validator: Optional[HistoryErrorResponse] = None
|
58
|
-
if TYPE_CHECKING:
|
59
|
-
actual_instance: Optional[
|
60
|
-
Union[HistoryErrorResponse, HistoryNoDataResponse, HistorySuccessResponse]
|
61
|
-
] = None
|
62
|
-
else:
|
63
|
-
actual_instance: Any = None
|
64
|
-
any_of_schemas: Set[str] = {
|
65
|
-
"HistoryErrorResponse",
|
66
|
-
"HistoryNoDataResponse",
|
67
|
-
"HistorySuccessResponse",
|
68
|
-
}
|
69
|
-
|
70
|
-
model_config = {
|
71
|
-
"validate_assignment": True,
|
72
|
-
"protected_namespaces": (),
|
73
|
-
}
|
74
|
-
|
75
|
-
def __init__(self, *args, **kwargs) -> None:
|
76
|
-
if args:
|
77
|
-
if len(args) > 1:
|
78
|
-
raise ValueError(
|
79
|
-
"If a position argument is used, only 1 is allowed to set `actual_instance`"
|
80
|
-
)
|
81
|
-
if kwargs:
|
82
|
-
raise ValueError(
|
83
|
-
"If a position argument is used, keyword arguments cannot be used."
|
84
|
-
)
|
85
|
-
super().__init__(actual_instance=args[0])
|
86
|
-
else:
|
87
|
-
super().__init__(**kwargs)
|
88
|
-
|
89
|
-
@field_validator("actual_instance")
|
90
|
-
def actual_instance_must_validate_anyof(cls, v):
|
91
|
-
instance = ResponseGetHistoryUdfHistoryGet.model_construct()
|
92
|
-
error_messages = []
|
93
|
-
# validate data type: HistorySuccessResponse
|
94
|
-
if not isinstance(v, HistorySuccessResponse):
|
95
|
-
error_messages.append(
|
96
|
-
f"Error! Input type `{type(v)}` is not `HistorySuccessResponse`"
|
97
|
-
)
|
98
|
-
else:
|
99
|
-
return v
|
100
|
-
|
101
|
-
# validate data type: HistoryNoDataResponse
|
102
|
-
if not isinstance(v, HistoryNoDataResponse):
|
103
|
-
error_messages.append(
|
104
|
-
f"Error! Input type `{type(v)}` is not `HistoryNoDataResponse`"
|
105
|
-
)
|
106
|
-
else:
|
107
|
-
return v
|
108
|
-
|
109
|
-
# validate data type: HistoryErrorResponse
|
110
|
-
if not isinstance(v, HistoryErrorResponse):
|
111
|
-
error_messages.append(
|
112
|
-
f"Error! Input type `{type(v)}` is not `HistoryErrorResponse`"
|
113
|
-
)
|
114
|
-
else:
|
115
|
-
return v
|
116
|
-
|
117
|
-
if error_messages:
|
118
|
-
# no match
|
119
|
-
raise ValueError(
|
120
|
-
"No match found when setting the actual_instance in ResponseGetHistoryUdfHistoryGet with anyOf schemas: HistoryErrorResponse, HistoryNoDataResponse, HistorySuccessResponse. Details: "
|
121
|
-
+ ", ".join(error_messages)
|
122
|
-
)
|
123
|
-
else:
|
124
|
-
return v
|
125
|
-
|
126
|
-
@classmethod
|
127
|
-
def from_dict(cls, obj: Dict[str, Any]) -> Self:
|
128
|
-
return cls.from_json(json.dumps(obj))
|
129
|
-
|
130
|
-
@classmethod
|
131
|
-
def from_json(cls, json_str: str) -> Self:
|
132
|
-
"""Returns the object represented by the json string"""
|
133
|
-
instance = cls.model_construct()
|
134
|
-
error_messages = []
|
135
|
-
# anyof_schema_1_validator: Optional[HistorySuccessResponse] = None
|
136
|
-
try:
|
137
|
-
instance.actual_instance = HistorySuccessResponse.from_json(json_str)
|
138
|
-
return instance
|
139
|
-
except (ValidationError, ValueError) as e:
|
140
|
-
error_messages.append(str(e))
|
141
|
-
# anyof_schema_2_validator: Optional[HistoryNoDataResponse] = None
|
142
|
-
try:
|
143
|
-
instance.actual_instance = HistoryNoDataResponse.from_json(json_str)
|
144
|
-
return instance
|
145
|
-
except (ValidationError, ValueError) as e:
|
146
|
-
error_messages.append(str(e))
|
147
|
-
# anyof_schema_3_validator: Optional[HistoryErrorResponse] = None
|
148
|
-
try:
|
149
|
-
instance.actual_instance = HistoryErrorResponse.from_json(json_str)
|
150
|
-
return instance
|
151
|
-
except (ValidationError, ValueError) as e:
|
152
|
-
error_messages.append(str(e))
|
153
|
-
|
154
|
-
if error_messages:
|
155
|
-
# no match
|
156
|
-
raise ValueError(
|
157
|
-
"No match found when deserializing the JSON string into ResponseGetHistoryUdfHistoryGet with anyOf schemas: HistoryErrorResponse, HistoryNoDataResponse, HistorySuccessResponse. Details: "
|
158
|
-
+ ", ".join(error_messages)
|
159
|
-
)
|
160
|
-
else:
|
161
|
-
return instance
|
162
|
-
|
163
|
-
def to_json(self) -> str:
|
164
|
-
"""Returns the JSON representation of the actual instance"""
|
165
|
-
if self.actual_instance is None:
|
166
|
-
return "null"
|
167
|
-
|
168
|
-
if hasattr(self.actual_instance, "to_json") and callable(
|
169
|
-
self.actual_instance.to_json
|
170
|
-
):
|
171
|
-
return self.actual_instance.to_json()
|
172
|
-
else:
|
173
|
-
return json.dumps(self.actual_instance)
|
174
|
-
|
175
|
-
def to_dict(
|
176
|
-
self,
|
177
|
-
) -> Optional[
|
178
|
-
Union[
|
179
|
-
Dict[str, Any],
|
180
|
-
HistoryErrorResponse,
|
181
|
-
HistoryNoDataResponse,
|
182
|
-
HistorySuccessResponse,
|
183
|
-
]
|
184
|
-
]:
|
185
|
-
"""Returns the dict representation of the actual instance"""
|
186
|
-
if self.actual_instance is None:
|
187
|
-
return None
|
188
|
-
|
189
|
-
if hasattr(self.actual_instance, "to_dict") and callable(
|
190
|
-
self.actual_instance.to_dict
|
191
|
-
):
|
192
|
-
return self.actual_instance.to_dict()
|
193
|
-
else:
|
194
|
-
return self.actual_instance
|
195
|
-
|
196
|
-
def to_str(self) -> str:
|
197
|
-
"""Returns the string representation of the actual instance"""
|
198
|
-
return pprint.pformat(self.model_dump())
|
@@ -1,198 +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
|
-
StrictStr,
|
25
|
-
ValidationError,
|
26
|
-
field_validator,
|
27
|
-
)
|
28
|
-
from typing import Optional
|
29
|
-
from crypticorn.klines.client.models.history_error_response import HistoryErrorResponse
|
30
|
-
from crypticorn.klines.client.models.history_no_data_response import (
|
31
|
-
HistoryNoDataResponse,
|
32
|
-
)
|
33
|
-
from crypticorn.klines.client.models.history_success_response import (
|
34
|
-
HistorySuccessResponse,
|
35
|
-
)
|
36
|
-
from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict
|
37
|
-
from typing_extensions import Literal, Self
|
38
|
-
from pydantic import Field
|
39
|
-
|
40
|
-
RESPONSEGETUDFHISTORY_ANY_OF_SCHEMAS = [
|
41
|
-
"HistoryErrorResponse",
|
42
|
-
"HistoryNoDataResponse",
|
43
|
-
"HistorySuccessResponse",
|
44
|
-
]
|
45
|
-
|
46
|
-
|
47
|
-
class ResponseGetUdfHistory(BaseModel):
|
48
|
-
"""
|
49
|
-
ResponseGetUdfHistory
|
50
|
-
"""
|
51
|
-
|
52
|
-
# data type: HistorySuccessResponse
|
53
|
-
anyof_schema_1_validator: Optional[HistorySuccessResponse] = None
|
54
|
-
# data type: HistoryNoDataResponse
|
55
|
-
anyof_schema_2_validator: Optional[HistoryNoDataResponse] = None
|
56
|
-
# data type: HistoryErrorResponse
|
57
|
-
anyof_schema_3_validator: Optional[HistoryErrorResponse] = None
|
58
|
-
if TYPE_CHECKING:
|
59
|
-
actual_instance: Optional[
|
60
|
-
Union[HistoryErrorResponse, HistoryNoDataResponse, HistorySuccessResponse]
|
61
|
-
] = None
|
62
|
-
else:
|
63
|
-
actual_instance: Any = None
|
64
|
-
any_of_schemas: Set[str] = {
|
65
|
-
"HistoryErrorResponse",
|
66
|
-
"HistoryNoDataResponse",
|
67
|
-
"HistorySuccessResponse",
|
68
|
-
}
|
69
|
-
|
70
|
-
model_config = {
|
71
|
-
"validate_assignment": True,
|
72
|
-
"protected_namespaces": (),
|
73
|
-
}
|
74
|
-
|
75
|
-
def __init__(self, *args, **kwargs) -> None:
|
76
|
-
if args:
|
77
|
-
if len(args) > 1:
|
78
|
-
raise ValueError(
|
79
|
-
"If a position argument is used, only 1 is allowed to set `actual_instance`"
|
80
|
-
)
|
81
|
-
if kwargs:
|
82
|
-
raise ValueError(
|
83
|
-
"If a position argument is used, keyword arguments cannot be used."
|
84
|
-
)
|
85
|
-
super().__init__(actual_instance=args[0])
|
86
|
-
else:
|
87
|
-
super().__init__(**kwargs)
|
88
|
-
|
89
|
-
@field_validator("actual_instance")
|
90
|
-
def actual_instance_must_validate_anyof(cls, v):
|
91
|
-
instance = ResponseGetUdfHistory.model_construct()
|
92
|
-
error_messages = []
|
93
|
-
# validate data type: HistorySuccessResponse
|
94
|
-
if not isinstance(v, HistorySuccessResponse):
|
95
|
-
error_messages.append(
|
96
|
-
f"Error! Input type `{type(v)}` is not `HistorySuccessResponse`"
|
97
|
-
)
|
98
|
-
else:
|
99
|
-
return v
|
100
|
-
|
101
|
-
# validate data type: HistoryNoDataResponse
|
102
|
-
if not isinstance(v, HistoryNoDataResponse):
|
103
|
-
error_messages.append(
|
104
|
-
f"Error! Input type `{type(v)}` is not `HistoryNoDataResponse`"
|
105
|
-
)
|
106
|
-
else:
|
107
|
-
return v
|
108
|
-
|
109
|
-
# validate data type: HistoryErrorResponse
|
110
|
-
if not isinstance(v, HistoryErrorResponse):
|
111
|
-
error_messages.append(
|
112
|
-
f"Error! Input type `{type(v)}` is not `HistoryErrorResponse`"
|
113
|
-
)
|
114
|
-
else:
|
115
|
-
return v
|
116
|
-
|
117
|
-
if error_messages:
|
118
|
-
# no match
|
119
|
-
raise ValueError(
|
120
|
-
"No match found when setting the actual_instance in ResponseGetUdfHistory with anyOf schemas: HistoryErrorResponse, HistoryNoDataResponse, HistorySuccessResponse. Details: "
|
121
|
-
+ ", ".join(error_messages)
|
122
|
-
)
|
123
|
-
else:
|
124
|
-
return v
|
125
|
-
|
126
|
-
@classmethod
|
127
|
-
def from_dict(cls, obj: Dict[str, Any]) -> Self:
|
128
|
-
return cls.from_json(json.dumps(obj))
|
129
|
-
|
130
|
-
@classmethod
|
131
|
-
def from_json(cls, json_str: str) -> Self:
|
132
|
-
"""Returns the object represented by the json string"""
|
133
|
-
instance = cls.model_construct()
|
134
|
-
error_messages = []
|
135
|
-
# anyof_schema_1_validator: Optional[HistorySuccessResponse] = None
|
136
|
-
try:
|
137
|
-
instance.actual_instance = HistorySuccessResponse.from_json(json_str)
|
138
|
-
return instance
|
139
|
-
except (ValidationError, ValueError) as e:
|
140
|
-
error_messages.append(str(e))
|
141
|
-
# anyof_schema_2_validator: Optional[HistoryNoDataResponse] = None
|
142
|
-
try:
|
143
|
-
instance.actual_instance = HistoryNoDataResponse.from_json(json_str)
|
144
|
-
return instance
|
145
|
-
except (ValidationError, ValueError) as e:
|
146
|
-
error_messages.append(str(e))
|
147
|
-
# anyof_schema_3_validator: Optional[HistoryErrorResponse] = None
|
148
|
-
try:
|
149
|
-
instance.actual_instance = HistoryErrorResponse.from_json(json_str)
|
150
|
-
return instance
|
151
|
-
except (ValidationError, ValueError) as e:
|
152
|
-
error_messages.append(str(e))
|
153
|
-
|
154
|
-
if error_messages:
|
155
|
-
# no match
|
156
|
-
raise ValueError(
|
157
|
-
"No match found when deserializing the JSON string into ResponseGetUdfHistory with anyOf schemas: HistoryErrorResponse, HistoryNoDataResponse, HistorySuccessResponse. Details: "
|
158
|
-
+ ", ".join(error_messages)
|
159
|
-
)
|
160
|
-
else:
|
161
|
-
return instance
|
162
|
-
|
163
|
-
def to_json(self) -> str:
|
164
|
-
"""Returns the JSON representation of the actual instance"""
|
165
|
-
if self.actual_instance is None:
|
166
|
-
return "null"
|
167
|
-
|
168
|
-
if hasattr(self.actual_instance, "to_json") and callable(
|
169
|
-
self.actual_instance.to_json
|
170
|
-
):
|
171
|
-
return self.actual_instance.to_json()
|
172
|
-
else:
|
173
|
-
return json.dumps(self.actual_instance)
|
174
|
-
|
175
|
-
def to_dict(
|
176
|
-
self,
|
177
|
-
) -> Optional[
|
178
|
-
Union[
|
179
|
-
Dict[str, Any],
|
180
|
-
HistoryErrorResponse,
|
181
|
-
HistoryNoDataResponse,
|
182
|
-
HistorySuccessResponse,
|
183
|
-
]
|
184
|
-
]:
|
185
|
-
"""Returns the dict representation of the actual instance"""
|
186
|
-
if self.actual_instance is None:
|
187
|
-
return None
|
188
|
-
|
189
|
-
if hasattr(self.actual_instance, "to_dict") and callable(
|
190
|
-
self.actual_instance.to_dict
|
191
|
-
):
|
192
|
-
return self.actual_instance.to_dict()
|
193
|
-
else:
|
194
|
-
return self.actual_instance
|
195
|
-
|
196
|
-
def to_str(self) -> str:
|
197
|
-
"""Returns the string representation of the actual instance"""
|
198
|
-
return pprint.pformat(self.model_dump())
|