crypticorn 2.5.0rc5__py3-none-any.whl → 2.5.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- crypticorn/auth/main.py +2 -0
- crypticorn/client.py +60 -69
- crypticorn/common/__init__.py +3 -1
- crypticorn/common/auth.py +38 -20
- crypticorn/common/enums.py +4 -31
- crypticorn/common/errors.py +72 -17
- crypticorn/common/exceptions.py +29 -15
- crypticorn/common/mixins.py +37 -0
- crypticorn/common/status_router.py +42 -0
- crypticorn/common/urls.py +2 -1
- crypticorn/common/utils.py +9 -14
- crypticorn/hive/main.py +2 -0
- crypticorn/klines/client/__init__.py +10 -43
- crypticorn/klines/client/api/__init__.py +1 -1
- crypticorn/klines/client/api/change_in_timeframe_api.py +16 -31
- crypticorn/klines/client/api/funding_rates_api.py +8 -22
- crypticorn/klines/client/api/ohlcv_data_api.py +17 -38
- crypticorn/klines/client/api/{health_check_api.py → status_api.py} +18 -23
- crypticorn/klines/client/api/symbols_api.py +18 -34
- crypticorn/klines/client/api/udf_api.py +48 -59
- crypticorn/klines/client/api_client.py +1 -1
- crypticorn/klines/client/configuration.py +1 -1
- crypticorn/klines/client/exceptions.py +1 -1
- crypticorn/klines/client/models/__init__.py +9 -42
- crypticorn/klines/client/models/{change_in_timeframe_response.py → change_in_timeframe.py} +5 -5
- crypticorn/klines/client/models/{error_response.py → exception_detail.py} +25 -20
- crypticorn/klines/client/models/{funding_rate_response.py → funding_rate.py} +5 -5
- crypticorn/klines/client/models/{ohlcv_response.py → ohlcv_history.py} +14 -14
- crypticorn/klines/client/models/resolution.py +1 -1
- crypticorn/klines/client/models/{exchange.py → search_symbol.py} +17 -13
- crypticorn/klines/client/models/sort_direction.py +1 -1
- crypticorn/klines/client/models/{symbol_group_response.py → symbol_group.py} +5 -5
- crypticorn/klines/client/models/{symbol_info_response.py → symbol_info.py} +5 -5
- crypticorn/klines/client/models/symbol_type.py +1 -1
- crypticorn/klines/client/models/timeframe.py +1 -1
- crypticorn/klines/client/models/{udf_config_response.py → udf_config.py} +7 -19
- crypticorn/klines/client/rest.py +1 -1
- crypticorn/klines/main.py +40 -23
- crypticorn/metrics/client/__init__.py +3 -22
- crypticorn/metrics/client/api/__init__.py +1 -1
- crypticorn/metrics/client/api/exchanges_api.py +53 -97
- crypticorn/metrics/client/api/indicators_api.py +26 -52
- crypticorn/metrics/client/api/logs_api.py +8 -23
- crypticorn/metrics/client/api/marketcap_api.py +36 -88
- crypticorn/metrics/client/api/markets_api.py +26 -55
- crypticorn/metrics/client/api/{health_check_api.py → status_api.py} +18 -23
- crypticorn/metrics/client/api/tokens_api.py +7 -21
- crypticorn/metrics/client/api_client.py +1 -1
- crypticorn/metrics/client/configuration.py +1 -1
- crypticorn/metrics/client/exceptions.py +1 -1
- crypticorn/metrics/client/models/__init__.py +2 -21
- crypticorn/metrics/client/models/{error_response.py → exception_detail.py} +25 -20
- 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/metrics/main.py +51 -43
- crypticorn/pay/main.py +2 -0
- crypticorn/trade/client/__init__.py +1 -5
- crypticorn/trade/client/api/exchanges_api.py +6 -6
- crypticorn/trade/client/api/trading_actions_api.py +16 -15
- crypticorn/trade/client/models/__init__.py +1 -5
- crypticorn/trade/client/models/action_model.py +1 -2
- crypticorn/trade/client/models/bot_model.py +3 -7
- crypticorn/trade/client/models/exchange_key_model.py +2 -11
- crypticorn/trade/client/models/execution_ids.py +1 -1
- crypticorn/trade/client/models/futures_trading_action.py +1 -2
- crypticorn/trade/client/models/notification_model.py +3 -12
- crypticorn/trade/client/models/order_model.py +7 -21
- crypticorn/trade/client/models/spot_trading_action.py +230 -0
- crypticorn/trade/client/models/strategy_exchange_info.py +2 -3
- crypticorn/trade/client/models/strategy_model_input.py +1 -2
- crypticorn/trade/client/models/strategy_model_output.py +1 -2
- crypticorn/trade/client/models/tpsl.py +3 -1
- crypticorn/trade/main.py +2 -0
- {crypticorn-2.5.0rc5.dist-info → crypticorn-2.5.2.dist-info}/METADATA +7 -5
- {crypticorn-2.5.0rc5.dist-info → crypticorn-2.5.2.dist-info}/RECORD +81 -141
- {crypticorn-2.5.0rc5.dist-info → crypticorn-2.5.2.dist-info}/WHEEL +1 -1
- crypticorn/common/sorter.py +0 -40
- 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/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/market.py +0 -35
- crypticorn/klines/client/models/market_type.py +0 -35
- 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/validation_error.py +0 -105
- crypticorn/klines/client/models/validation_error_loc_inner.py +0 -159
- crypticorn/metrics/client/models/base_response_dict.py +0 -106
- 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/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/min_amount_req.py +0 -124
- crypticorn/pay/client/models/min_amount_res.py +0 -105
- 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/trade/client/models/api_error_identifier.py +0 -104
- crypticorn/trade/client/models/api_error_level.py +0 -37
- crypticorn/trade/client/models/api_error_type.py +0 -37
- crypticorn/trade/client/models/api_key_model.py +0 -156
- crypticorn/trade/client/models/exchange.py +0 -35
- crypticorn/trade/client/models/market_type.py +0 -35
- /crypticorn/common/{pydantic.py → decorators.py} +0 -0
- {crypticorn-2.5.0rc5.dist-info → crypticorn-2.5.2.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.5.0rc5.dist-info → crypticorn-2.5.2.dist-info}/top_level.txt +0 -0
@@ -1,118 +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
|
-
|
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, StrictBool, StrictStr
|
22
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
23
|
-
from crypticorn.metrics.client.models.exchange_mapping import ExchangeMapping
|
24
|
-
from typing import Optional, Set
|
25
|
-
from typing_extensions import Self
|
26
|
-
|
27
|
-
|
28
|
-
class BaseResponseListExchangeMapping(BaseModel):
|
29
|
-
"""
|
30
|
-
BaseResponseListExchangeMapping
|
31
|
-
""" # noqa: E501
|
32
|
-
|
33
|
-
success: Optional[StrictBool] = True
|
34
|
-
message: Optional[StrictStr] = None
|
35
|
-
data: Optional[List[ExchangeMapping]] = None
|
36
|
-
timestamp: Optional[datetime] = None
|
37
|
-
__properties: ClassVar[List[str]] = ["success", "message", "data", "timestamp"]
|
38
|
-
|
39
|
-
model_config = ConfigDict(
|
40
|
-
populate_by_name=True,
|
41
|
-
validate_assignment=True,
|
42
|
-
protected_namespaces=(),
|
43
|
-
)
|
44
|
-
|
45
|
-
def to_str(self) -> str:
|
46
|
-
"""Returns the string representation of the model using alias"""
|
47
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
48
|
-
|
49
|
-
def to_json(self) -> str:
|
50
|
-
"""Returns the JSON representation of the model using alias"""
|
51
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
52
|
-
return json.dumps(self.to_dict())
|
53
|
-
|
54
|
-
@classmethod
|
55
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
56
|
-
"""Create an instance of BaseResponseListExchangeMapping from a JSON string"""
|
57
|
-
return cls.from_dict(json.loads(json_str))
|
58
|
-
|
59
|
-
def to_dict(self) -> Dict[str, Any]:
|
60
|
-
"""Return the dictionary representation of the model using alias.
|
61
|
-
|
62
|
-
This has the following differences from calling pydantic's
|
63
|
-
`self.model_dump(by_alias=True)`:
|
64
|
-
|
65
|
-
* `None` is only added to the output dict for nullable fields that
|
66
|
-
were set at model initialization. Other fields with value `None`
|
67
|
-
are ignored.
|
68
|
-
"""
|
69
|
-
excluded_fields: Set[str] = set([])
|
70
|
-
|
71
|
-
_dict = self.model_dump(
|
72
|
-
by_alias=True,
|
73
|
-
exclude=excluded_fields,
|
74
|
-
exclude_none=True,
|
75
|
-
)
|
76
|
-
# override the default output from pydantic by calling `to_dict()` of each item in data (list)
|
77
|
-
_items = []
|
78
|
-
if self.data:
|
79
|
-
for _item_data in self.data:
|
80
|
-
if _item_data:
|
81
|
-
_items.append(_item_data.to_dict())
|
82
|
-
_dict["data"] = _items
|
83
|
-
# set to None if message (nullable) is None
|
84
|
-
# and model_fields_set contains the field
|
85
|
-
if self.message is None and "message" in self.model_fields_set:
|
86
|
-
_dict["message"] = None
|
87
|
-
|
88
|
-
# set to None if data (nullable) is None
|
89
|
-
# and model_fields_set contains the field
|
90
|
-
if self.data is None and "data" in self.model_fields_set:
|
91
|
-
_dict["data"] = None
|
92
|
-
|
93
|
-
return _dict
|
94
|
-
|
95
|
-
@classmethod
|
96
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
97
|
-
"""Create an instance of BaseResponseListExchangeMapping from a dict"""
|
98
|
-
if obj is None:
|
99
|
-
return None
|
100
|
-
|
101
|
-
if not isinstance(obj, dict):
|
102
|
-
return cls.model_validate(obj)
|
103
|
-
|
104
|
-
_obj = cls.model_validate(
|
105
|
-
{
|
106
|
-
"success": (
|
107
|
-
obj.get("success") if obj.get("success") is not None else True
|
108
|
-
),
|
109
|
-
"message": obj.get("message"),
|
110
|
-
"data": (
|
111
|
-
[ExchangeMapping.from_dict(_item) for _item in obj["data"]]
|
112
|
-
if obj.get("data") is not None
|
113
|
-
else None
|
114
|
-
),
|
115
|
-
"timestamp": obj.get("timestamp"),
|
116
|
-
}
|
117
|
-
)
|
118
|
-
return _obj
|
@@ -1,106 +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
|
-
|
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, StrictBool, StrictStr
|
22
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
23
|
-
from typing import Optional, Set
|
24
|
-
from typing_extensions import Self
|
25
|
-
|
26
|
-
|
27
|
-
class BaseResponseListStr(BaseModel):
|
28
|
-
"""
|
29
|
-
BaseResponseListStr
|
30
|
-
""" # noqa: E501
|
31
|
-
|
32
|
-
success: Optional[StrictBool] = True
|
33
|
-
message: Optional[StrictStr] = None
|
34
|
-
data: Optional[List[StrictStr]] = None
|
35
|
-
timestamp: Optional[datetime] = None
|
36
|
-
__properties: ClassVar[List[str]] = ["success", "message", "data", "timestamp"]
|
37
|
-
|
38
|
-
model_config = ConfigDict(
|
39
|
-
populate_by_name=True,
|
40
|
-
validate_assignment=True,
|
41
|
-
protected_namespaces=(),
|
42
|
-
)
|
43
|
-
|
44
|
-
def to_str(self) -> str:
|
45
|
-
"""Returns the string representation of the model using alias"""
|
46
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
47
|
-
|
48
|
-
def to_json(self) -> str:
|
49
|
-
"""Returns the JSON representation of the model using alias"""
|
50
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
51
|
-
return json.dumps(self.to_dict())
|
52
|
-
|
53
|
-
@classmethod
|
54
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
55
|
-
"""Create an instance of BaseResponseListStr from a JSON string"""
|
56
|
-
return cls.from_dict(json.loads(json_str))
|
57
|
-
|
58
|
-
def to_dict(self) -> Dict[str, Any]:
|
59
|
-
"""Return the dictionary representation of the model using alias.
|
60
|
-
|
61
|
-
This has the following differences from calling pydantic's
|
62
|
-
`self.model_dump(by_alias=True)`:
|
63
|
-
|
64
|
-
* `None` is only added to the output dict for nullable fields that
|
65
|
-
were set at model initialization. Other fields with value `None`
|
66
|
-
are ignored.
|
67
|
-
"""
|
68
|
-
excluded_fields: Set[str] = set([])
|
69
|
-
|
70
|
-
_dict = self.model_dump(
|
71
|
-
by_alias=True,
|
72
|
-
exclude=excluded_fields,
|
73
|
-
exclude_none=True,
|
74
|
-
)
|
75
|
-
# set to None if message (nullable) is None
|
76
|
-
# and model_fields_set contains the field
|
77
|
-
if self.message is None and "message" in self.model_fields_set:
|
78
|
-
_dict["message"] = None
|
79
|
-
|
80
|
-
# set to None if data (nullable) is None
|
81
|
-
# and model_fields_set contains the field
|
82
|
-
if self.data is None and "data" in self.model_fields_set:
|
83
|
-
_dict["data"] = None
|
84
|
-
|
85
|
-
return _dict
|
86
|
-
|
87
|
-
@classmethod
|
88
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
89
|
-
"""Create an instance of BaseResponseListStr from a dict"""
|
90
|
-
if obj is None:
|
91
|
-
return None
|
92
|
-
|
93
|
-
if not isinstance(obj, dict):
|
94
|
-
return cls.model_validate(obj)
|
95
|
-
|
96
|
-
_obj = cls.model_validate(
|
97
|
-
{
|
98
|
-
"success": (
|
99
|
-
obj.get("success") if obj.get("success") is not None else True
|
100
|
-
),
|
101
|
-
"message": obj.get("message"),
|
102
|
-
"data": obj.get("data"),
|
103
|
-
"timestamp": obj.get("timestamp"),
|
104
|
-
}
|
105
|
-
)
|
106
|
-
return _obj
|
@@ -1,134 +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
|
-
|
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, StrictStr
|
22
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
23
|
-
from crypticorn.metrics.client.models.market_type import MarketType
|
24
|
-
from crypticorn.metrics.client.models.trading_status import TradingStatus
|
25
|
-
from typing import Optional, Set
|
26
|
-
from typing_extensions import Self
|
27
|
-
|
28
|
-
|
29
|
-
class ExchangeMapping(BaseModel):
|
30
|
-
"""
|
31
|
-
ExchangeMapping
|
32
|
-
""" # noqa: E501
|
33
|
-
|
34
|
-
exchange_name: StrictStr
|
35
|
-
symbol: StrictStr
|
36
|
-
quote_currency: StrictStr
|
37
|
-
pair: StrictStr
|
38
|
-
first_trade_timestamp: Optional[datetime]
|
39
|
-
last_trade_timestamp: Optional[datetime]
|
40
|
-
status: TradingStatus
|
41
|
-
market_type: Optional[MarketType]
|
42
|
-
__properties: ClassVar[List[str]] = [
|
43
|
-
"exchange_name",
|
44
|
-
"symbol",
|
45
|
-
"quote_currency",
|
46
|
-
"pair",
|
47
|
-
"first_trade_timestamp",
|
48
|
-
"last_trade_timestamp",
|
49
|
-
"status",
|
50
|
-
"market_type",
|
51
|
-
]
|
52
|
-
|
53
|
-
model_config = ConfigDict(
|
54
|
-
populate_by_name=True,
|
55
|
-
validate_assignment=True,
|
56
|
-
protected_namespaces=(),
|
57
|
-
)
|
58
|
-
|
59
|
-
def to_str(self) -> str:
|
60
|
-
"""Returns the string representation of the model using alias"""
|
61
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
62
|
-
|
63
|
-
def to_json(self) -> str:
|
64
|
-
"""Returns the JSON representation of the model using alias"""
|
65
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
66
|
-
return json.dumps(self.to_dict())
|
67
|
-
|
68
|
-
@classmethod
|
69
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
70
|
-
"""Create an instance of ExchangeMapping from a JSON string"""
|
71
|
-
return cls.from_dict(json.loads(json_str))
|
72
|
-
|
73
|
-
def to_dict(self) -> Dict[str, Any]:
|
74
|
-
"""Return the dictionary representation of the model using alias.
|
75
|
-
|
76
|
-
This has the following differences from calling pydantic's
|
77
|
-
`self.model_dump(by_alias=True)`:
|
78
|
-
|
79
|
-
* `None` is only added to the output dict for nullable fields that
|
80
|
-
were set at model initialization. Other fields with value `None`
|
81
|
-
are ignored.
|
82
|
-
"""
|
83
|
-
excluded_fields: Set[str] = set([])
|
84
|
-
|
85
|
-
_dict = self.model_dump(
|
86
|
-
by_alias=True,
|
87
|
-
exclude=excluded_fields,
|
88
|
-
exclude_none=True,
|
89
|
-
)
|
90
|
-
# set to None if first_trade_timestamp (nullable) is None
|
91
|
-
# and model_fields_set contains the field
|
92
|
-
if (
|
93
|
-
self.first_trade_timestamp is None
|
94
|
-
and "first_trade_timestamp" in self.model_fields_set
|
95
|
-
):
|
96
|
-
_dict["first_trade_timestamp"] = None
|
97
|
-
|
98
|
-
# set to None if last_trade_timestamp (nullable) is None
|
99
|
-
# and model_fields_set contains the field
|
100
|
-
if (
|
101
|
-
self.last_trade_timestamp is None
|
102
|
-
and "last_trade_timestamp" in self.model_fields_set
|
103
|
-
):
|
104
|
-
_dict["last_trade_timestamp"] = None
|
105
|
-
|
106
|
-
# set to None if market_type (nullable) is None
|
107
|
-
# and model_fields_set contains the field
|
108
|
-
if self.market_type is None and "market_type" in self.model_fields_set:
|
109
|
-
_dict["market_type"] = None
|
110
|
-
|
111
|
-
return _dict
|
112
|
-
|
113
|
-
@classmethod
|
114
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
115
|
-
"""Create an instance of ExchangeMapping from a dict"""
|
116
|
-
if obj is None:
|
117
|
-
return None
|
118
|
-
|
119
|
-
if not isinstance(obj, dict):
|
120
|
-
return cls.model_validate(obj)
|
121
|
-
|
122
|
-
_obj = cls.model_validate(
|
123
|
-
{
|
124
|
-
"exchange_name": obj.get("exchange_name"),
|
125
|
-
"symbol": obj.get("symbol"),
|
126
|
-
"quote_currency": obj.get("quote_currency"),
|
127
|
-
"pair": obj.get("pair"),
|
128
|
-
"first_trade_timestamp": obj.get("first_trade_timestamp"),
|
129
|
-
"last_trade_timestamp": obj.get("last_trade_timestamp"),
|
130
|
-
"status": obj.get("status"),
|
131
|
-
"market_type": obj.get("market_type"),
|
132
|
-
}
|
133
|
-
)
|
134
|
-
return _obj
|
@@ -1,91 +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
|
-
|
15
|
-
from __future__ import annotations
|
16
|
-
import pprint
|
17
|
-
import re # noqa: F401
|
18
|
-
import json
|
19
|
-
|
20
|
-
from pydantic import BaseModel, ConfigDict, StrictStr
|
21
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
22
|
-
from typing import Optional, Set
|
23
|
-
from typing_extensions import Self
|
24
|
-
|
25
|
-
|
26
|
-
class HealthCheckResponse(BaseModel):
|
27
|
-
"""
|
28
|
-
HealthCheckResponse
|
29
|
-
""" # noqa: E501
|
30
|
-
|
31
|
-
status: Optional[StrictStr] = "ok"
|
32
|
-
version: Optional[StrictStr] = "1.0.0"
|
33
|
-
__properties: ClassVar[List[str]] = ["status", "version"]
|
34
|
-
|
35
|
-
model_config = ConfigDict(
|
36
|
-
populate_by_name=True,
|
37
|
-
validate_assignment=True,
|
38
|
-
protected_namespaces=(),
|
39
|
-
)
|
40
|
-
|
41
|
-
def to_str(self) -> str:
|
42
|
-
"""Returns the string representation of the model using alias"""
|
43
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
44
|
-
|
45
|
-
def to_json(self) -> str:
|
46
|
-
"""Returns the JSON representation of the model using alias"""
|
47
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
48
|
-
return json.dumps(self.to_dict())
|
49
|
-
|
50
|
-
@classmethod
|
51
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
52
|
-
"""Create an instance of HealthCheckResponse from a JSON string"""
|
53
|
-
return cls.from_dict(json.loads(json_str))
|
54
|
-
|
55
|
-
def to_dict(self) -> Dict[str, Any]:
|
56
|
-
"""Return the dictionary representation of the model using alias.
|
57
|
-
|
58
|
-
This has the following differences from calling pydantic's
|
59
|
-
`self.model_dump(by_alias=True)`:
|
60
|
-
|
61
|
-
* `None` is only added to the output dict for nullable fields that
|
62
|
-
were set at model initialization. Other fields with value `None`
|
63
|
-
are ignored.
|
64
|
-
"""
|
65
|
-
excluded_fields: Set[str] = set([])
|
66
|
-
|
67
|
-
_dict = self.model_dump(
|
68
|
-
by_alias=True,
|
69
|
-
exclude=excluded_fields,
|
70
|
-
exclude_none=True,
|
71
|
-
)
|
72
|
-
return _dict
|
73
|
-
|
74
|
-
@classmethod
|
75
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
76
|
-
"""Create an instance of HealthCheckResponse from a dict"""
|
77
|
-
if obj is None:
|
78
|
-
return None
|
79
|
-
|
80
|
-
if not isinstance(obj, dict):
|
81
|
-
return cls.model_validate(obj)
|
82
|
-
|
83
|
-
_obj = cls.model_validate(
|
84
|
-
{
|
85
|
-
"status": obj.get("status") if obj.get("status") is not None else "ok",
|
86
|
-
"version": (
|
87
|
-
obj.get("version") if obj.get("version") is not None else "1.0.0"
|
88
|
-
),
|
89
|
-
}
|
90
|
-
)
|
91
|
-
return _obj
|
@@ -1,99 +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
|
-
|
15
|
-
from __future__ import annotations
|
16
|
-
import pprint
|
17
|
-
import re # noqa: F401
|
18
|
-
import json
|
19
|
-
|
20
|
-
from pydantic import BaseModel, ConfigDict
|
21
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
22
|
-
from crypticorn.metrics.client.models.validation_error import ValidationError
|
23
|
-
from typing import Optional, Set
|
24
|
-
from typing_extensions import Self
|
25
|
-
|
26
|
-
|
27
|
-
class HTTPValidationError(BaseModel):
|
28
|
-
"""
|
29
|
-
HTTPValidationError
|
30
|
-
""" # noqa: E501
|
31
|
-
|
32
|
-
detail: Optional[List[ValidationError]] = None
|
33
|
-
__properties: ClassVar[List[str]] = ["detail"]
|
34
|
-
|
35
|
-
model_config = ConfigDict(
|
36
|
-
populate_by_name=True,
|
37
|
-
validate_assignment=True,
|
38
|
-
protected_namespaces=(),
|
39
|
-
)
|
40
|
-
|
41
|
-
def to_str(self) -> str:
|
42
|
-
"""Returns the string representation of the model using alias"""
|
43
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
44
|
-
|
45
|
-
def to_json(self) -> str:
|
46
|
-
"""Returns the JSON representation of the model using alias"""
|
47
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
48
|
-
return json.dumps(self.to_dict())
|
49
|
-
|
50
|
-
@classmethod
|
51
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
52
|
-
"""Create an instance of HTTPValidationError from a JSON string"""
|
53
|
-
return cls.from_dict(json.loads(json_str))
|
54
|
-
|
55
|
-
def to_dict(self) -> Dict[str, Any]:
|
56
|
-
"""Return the dictionary representation of the model using alias.
|
57
|
-
|
58
|
-
This has the following differences from calling pydantic's
|
59
|
-
`self.model_dump(by_alias=True)`:
|
60
|
-
|
61
|
-
* `None` is only added to the output dict for nullable fields that
|
62
|
-
were set at model initialization. Other fields with value `None`
|
63
|
-
are ignored.
|
64
|
-
"""
|
65
|
-
excluded_fields: Set[str] = set([])
|
66
|
-
|
67
|
-
_dict = self.model_dump(
|
68
|
-
by_alias=True,
|
69
|
-
exclude=excluded_fields,
|
70
|
-
exclude_none=True,
|
71
|
-
)
|
72
|
-
# override the default output from pydantic by calling `to_dict()` of each item in detail (list)
|
73
|
-
_items = []
|
74
|
-
if self.detail:
|
75
|
-
for _item_detail in self.detail:
|
76
|
-
if _item_detail:
|
77
|
-
_items.append(_item_detail.to_dict())
|
78
|
-
_dict["detail"] = _items
|
79
|
-
return _dict
|
80
|
-
|
81
|
-
@classmethod
|
82
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
83
|
-
"""Create an instance of HTTPValidationError from a dict"""
|
84
|
-
if obj is None:
|
85
|
-
return None
|
86
|
-
|
87
|
-
if not isinstance(obj, dict):
|
88
|
-
return cls.model_validate(obj)
|
89
|
-
|
90
|
-
_obj = cls.model_validate(
|
91
|
-
{
|
92
|
-
"detail": (
|
93
|
-
[ValidationError.from_dict(_item) for _item in obj["detail"]]
|
94
|
-
if obj.get("detail") is not None
|
95
|
-
else None
|
96
|
-
)
|
97
|
-
}
|
98
|
-
)
|
99
|
-
return _obj
|
@@ -1,35 +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
|
-
|
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
|
-
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
|
-
|
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))
|