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,188 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
"""
|
4
|
-
Payment API
|
5
|
-
|
6
|
-
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
-
|
8
|
-
The version of the OpenAPI document: 0.1.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, Field, StrictBool, 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 CreateInvoiceRes(BaseModel):
|
27
|
-
"""
|
28
|
-
Response model for created invoice. https://documenter.getpostman.com/view/7907941/2s93JusNJt#f5e4e645-dce2-4b06-b2ca-2a29aaa5e845
|
29
|
-
""" # noqa: E501
|
30
|
-
|
31
|
-
id: StrictStr = Field(description="Invoice ID")
|
32
|
-
token_id: StrictStr = Field(description="Internal identifier")
|
33
|
-
order_id: Optional[StrictStr] = None
|
34
|
-
order_description: Optional[StrictStr] = None
|
35
|
-
price_amount: StrictStr = Field(description="Base price in fiat")
|
36
|
-
price_currency: StrictStr = Field(description="Ticker of base fiat currency")
|
37
|
-
pay_currency: Optional[StrictStr] = None
|
38
|
-
ipn_callback_url: Optional[StrictStr] = None
|
39
|
-
invoice_url: StrictStr = Field(description="Link to the payment page")
|
40
|
-
success_url: Optional[StrictStr] = None
|
41
|
-
cancel_url: Optional[StrictStr] = None
|
42
|
-
partially_paid_url: Optional[StrictStr] = None
|
43
|
-
payout_currency: Optional[StrictStr] = None
|
44
|
-
created_at: StrictStr = Field(description="Time of invoice creation")
|
45
|
-
updated_at: StrictStr = Field(description="Time of latest invoice update")
|
46
|
-
is_fixed_rate: StrictBool = Field(description="Fixed Rate option status")
|
47
|
-
is_fee_paid_by_user: StrictBool = Field(
|
48
|
-
description="Fee Paid By User option status"
|
49
|
-
)
|
50
|
-
__properties: ClassVar[List[str]] = [
|
51
|
-
"id",
|
52
|
-
"token_id",
|
53
|
-
"order_id",
|
54
|
-
"order_description",
|
55
|
-
"price_amount",
|
56
|
-
"price_currency",
|
57
|
-
"pay_currency",
|
58
|
-
"ipn_callback_url",
|
59
|
-
"invoice_url",
|
60
|
-
"success_url",
|
61
|
-
"cancel_url",
|
62
|
-
"partially_paid_url",
|
63
|
-
"payout_currency",
|
64
|
-
"created_at",
|
65
|
-
"updated_at",
|
66
|
-
"is_fixed_rate",
|
67
|
-
"is_fee_paid_by_user",
|
68
|
-
]
|
69
|
-
|
70
|
-
model_config = ConfigDict(
|
71
|
-
populate_by_name=True,
|
72
|
-
validate_assignment=True,
|
73
|
-
protected_namespaces=(),
|
74
|
-
)
|
75
|
-
|
76
|
-
def to_str(self) -> str:
|
77
|
-
"""Returns the string representation of the model using alias"""
|
78
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
79
|
-
|
80
|
-
def to_json(self) -> str:
|
81
|
-
"""Returns the JSON representation of the model using alias"""
|
82
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
83
|
-
return json.dumps(self.to_dict())
|
84
|
-
|
85
|
-
@classmethod
|
86
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
87
|
-
"""Create an instance of CreateInvoiceRes from a JSON string"""
|
88
|
-
return cls.from_dict(json.loads(json_str))
|
89
|
-
|
90
|
-
def to_dict(self) -> Dict[str, Any]:
|
91
|
-
"""Return the dictionary representation of the model using alias.
|
92
|
-
|
93
|
-
This has the following differences from calling pydantic's
|
94
|
-
`self.model_dump(by_alias=True)`:
|
95
|
-
|
96
|
-
* `None` is only added to the output dict for nullable fields that
|
97
|
-
were set at model initialization. Other fields with value `None`
|
98
|
-
are ignored.
|
99
|
-
"""
|
100
|
-
excluded_fields: Set[str] = set([])
|
101
|
-
|
102
|
-
_dict = self.model_dump(
|
103
|
-
by_alias=True,
|
104
|
-
exclude=excluded_fields,
|
105
|
-
exclude_none=True,
|
106
|
-
)
|
107
|
-
# set to None if order_id (nullable) is None
|
108
|
-
# and model_fields_set contains the field
|
109
|
-
if self.order_id is None and "order_id" in self.model_fields_set:
|
110
|
-
_dict["order_id"] = None
|
111
|
-
|
112
|
-
# set to None if order_description (nullable) is None
|
113
|
-
# and model_fields_set contains the field
|
114
|
-
if (
|
115
|
-
self.order_description is None
|
116
|
-
and "order_description" in self.model_fields_set
|
117
|
-
):
|
118
|
-
_dict["order_description"] = None
|
119
|
-
|
120
|
-
# set to None if pay_currency (nullable) is None
|
121
|
-
# and model_fields_set contains the field
|
122
|
-
if self.pay_currency is None and "pay_currency" in self.model_fields_set:
|
123
|
-
_dict["pay_currency"] = None
|
124
|
-
|
125
|
-
# set to None if ipn_callback_url (nullable) is None
|
126
|
-
# and model_fields_set contains the field
|
127
|
-
if (
|
128
|
-
self.ipn_callback_url is None
|
129
|
-
and "ipn_callback_url" in self.model_fields_set
|
130
|
-
):
|
131
|
-
_dict["ipn_callback_url"] = None
|
132
|
-
|
133
|
-
# set to None if success_url (nullable) is None
|
134
|
-
# and model_fields_set contains the field
|
135
|
-
if self.success_url is None and "success_url" in self.model_fields_set:
|
136
|
-
_dict["success_url"] = None
|
137
|
-
|
138
|
-
# set to None if cancel_url (nullable) is None
|
139
|
-
# and model_fields_set contains the field
|
140
|
-
if self.cancel_url is None and "cancel_url" in self.model_fields_set:
|
141
|
-
_dict["cancel_url"] = None
|
142
|
-
|
143
|
-
# set to None if partially_paid_url (nullable) is None
|
144
|
-
# and model_fields_set contains the field
|
145
|
-
if (
|
146
|
-
self.partially_paid_url is None
|
147
|
-
and "partially_paid_url" in self.model_fields_set
|
148
|
-
):
|
149
|
-
_dict["partially_paid_url"] = None
|
150
|
-
|
151
|
-
# set to None if payout_currency (nullable) is None
|
152
|
-
# and model_fields_set contains the field
|
153
|
-
if self.payout_currency is None and "payout_currency" in self.model_fields_set:
|
154
|
-
_dict["payout_currency"] = None
|
155
|
-
|
156
|
-
return _dict
|
157
|
-
|
158
|
-
@classmethod
|
159
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
160
|
-
"""Create an instance of CreateInvoiceRes from a dict"""
|
161
|
-
if obj is None:
|
162
|
-
return None
|
163
|
-
|
164
|
-
if not isinstance(obj, dict):
|
165
|
-
return cls.model_validate(obj)
|
166
|
-
|
167
|
-
_obj = cls.model_validate(
|
168
|
-
{
|
169
|
-
"id": obj.get("id"),
|
170
|
-
"token_id": obj.get("token_id"),
|
171
|
-
"order_id": obj.get("order_id"),
|
172
|
-
"order_description": obj.get("order_description"),
|
173
|
-
"price_amount": obj.get("price_amount"),
|
174
|
-
"price_currency": obj.get("price_currency"),
|
175
|
-
"pay_currency": obj.get("pay_currency"),
|
176
|
-
"ipn_callback_url": obj.get("ipn_callback_url"),
|
177
|
-
"invoice_url": obj.get("invoice_url"),
|
178
|
-
"success_url": obj.get("success_url"),
|
179
|
-
"cancel_url": obj.get("cancel_url"),
|
180
|
-
"partially_paid_url": obj.get("partially_paid_url"),
|
181
|
-
"payout_currency": obj.get("payout_currency"),
|
182
|
-
"created_at": obj.get("created_at"),
|
183
|
-
"updated_at": obj.get("updated_at"),
|
184
|
-
"is_fixed_rate": obj.get("is_fixed_rate"),
|
185
|
-
"is_fee_paid_by_user": obj.get("is_fee_paid_by_user"),
|
186
|
-
}
|
187
|
-
)
|
188
|
-
return _obj
|
@@ -1,165 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
"""
|
4
|
-
Payment API
|
5
|
-
|
6
|
-
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
-
|
8
|
-
The version of the OpenAPI document: 0.1.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, Field, StrictBool, StrictInt, 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 Currency(BaseModel):
|
27
|
-
"""
|
28
|
-
Model representing a single cryptocurrency supported by the API. This model contains detailed information about each cryptocurrency available for payments, including its identifiers, network details, validation patterns, and configuration settings.
|
29
|
-
""" # noqa: E501
|
30
|
-
|
31
|
-
id: StrictInt = Field(description="Unique identifier for the currency")
|
32
|
-
code: StrictStr = Field(description="Currency code/ticker symbol")
|
33
|
-
name: StrictStr = Field(description="Full name of the currency")
|
34
|
-
enable: StrictBool = Field(description="Whether the currency is currently enabled")
|
35
|
-
wallet_regex: StrictStr = Field(
|
36
|
-
description="Regex pattern for valid wallet addresses"
|
37
|
-
)
|
38
|
-
priority: StrictInt = Field(description="Priority ranking of the currency")
|
39
|
-
extra_id_exists: StrictBool = Field(
|
40
|
-
description="Whether the currency requires an extra ID/memo/tag"
|
41
|
-
)
|
42
|
-
extra_id_regex: Optional[StrictStr] = None
|
43
|
-
logo_url: StrictStr = Field(description="URL path to currency logo image")
|
44
|
-
track: StrictBool = Field(description="Whether the currency is being tracked")
|
45
|
-
cg_id: Optional[StrictStr] = None
|
46
|
-
is_maxlimit: StrictBool = Field(
|
47
|
-
description="Whether the currency has a maximum limit"
|
48
|
-
)
|
49
|
-
network: Optional[StrictStr] = None
|
50
|
-
smart_contract: Optional[StrictStr] = None
|
51
|
-
network_precision: Optional[StrictInt] = None
|
52
|
-
__properties: ClassVar[List[str]] = [
|
53
|
-
"id",
|
54
|
-
"code",
|
55
|
-
"name",
|
56
|
-
"enable",
|
57
|
-
"wallet_regex",
|
58
|
-
"priority",
|
59
|
-
"extra_id_exists",
|
60
|
-
"extra_id_regex",
|
61
|
-
"logo_url",
|
62
|
-
"track",
|
63
|
-
"cg_id",
|
64
|
-
"is_maxlimit",
|
65
|
-
"network",
|
66
|
-
"smart_contract",
|
67
|
-
"network_precision",
|
68
|
-
]
|
69
|
-
|
70
|
-
model_config = ConfigDict(
|
71
|
-
populate_by_name=True,
|
72
|
-
validate_assignment=True,
|
73
|
-
protected_namespaces=(),
|
74
|
-
)
|
75
|
-
|
76
|
-
def to_str(self) -> str:
|
77
|
-
"""Returns the string representation of the model using alias"""
|
78
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
79
|
-
|
80
|
-
def to_json(self) -> str:
|
81
|
-
"""Returns the JSON representation of the model using alias"""
|
82
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
83
|
-
return json.dumps(self.to_dict())
|
84
|
-
|
85
|
-
@classmethod
|
86
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
87
|
-
"""Create an instance of Currency from a JSON string"""
|
88
|
-
return cls.from_dict(json.loads(json_str))
|
89
|
-
|
90
|
-
def to_dict(self) -> Dict[str, Any]:
|
91
|
-
"""Return the dictionary representation of the model using alias.
|
92
|
-
|
93
|
-
This has the following differences from calling pydantic's
|
94
|
-
`self.model_dump(by_alias=True)`:
|
95
|
-
|
96
|
-
* `None` is only added to the output dict for nullable fields that
|
97
|
-
were set at model initialization. Other fields with value `None`
|
98
|
-
are ignored.
|
99
|
-
"""
|
100
|
-
excluded_fields: Set[str] = set([])
|
101
|
-
|
102
|
-
_dict = self.model_dump(
|
103
|
-
by_alias=True,
|
104
|
-
exclude=excluded_fields,
|
105
|
-
exclude_none=True,
|
106
|
-
)
|
107
|
-
# set to None if extra_id_regex (nullable) is None
|
108
|
-
# and model_fields_set contains the field
|
109
|
-
if self.extra_id_regex is None and "extra_id_regex" in self.model_fields_set:
|
110
|
-
_dict["extra_id_regex"] = None
|
111
|
-
|
112
|
-
# set to None if cg_id (nullable) is None
|
113
|
-
# and model_fields_set contains the field
|
114
|
-
if self.cg_id is None and "cg_id" in self.model_fields_set:
|
115
|
-
_dict["cg_id"] = None
|
116
|
-
|
117
|
-
# set to None if network (nullable) is None
|
118
|
-
# and model_fields_set contains the field
|
119
|
-
if self.network is None and "network" in self.model_fields_set:
|
120
|
-
_dict["network"] = None
|
121
|
-
|
122
|
-
# set to None if smart_contract (nullable) is None
|
123
|
-
# and model_fields_set contains the field
|
124
|
-
if self.smart_contract is None and "smart_contract" in self.model_fields_set:
|
125
|
-
_dict["smart_contract"] = None
|
126
|
-
|
127
|
-
# set to None if network_precision (nullable) is None
|
128
|
-
# and model_fields_set contains the field
|
129
|
-
if (
|
130
|
-
self.network_precision is None
|
131
|
-
and "network_precision" in self.model_fields_set
|
132
|
-
):
|
133
|
-
_dict["network_precision"] = None
|
134
|
-
|
135
|
-
return _dict
|
136
|
-
|
137
|
-
@classmethod
|
138
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
139
|
-
"""Create an instance of Currency from a dict"""
|
140
|
-
if obj is None:
|
141
|
-
return None
|
142
|
-
|
143
|
-
if not isinstance(obj, dict):
|
144
|
-
return cls.model_validate(obj)
|
145
|
-
|
146
|
-
_obj = cls.model_validate(
|
147
|
-
{
|
148
|
-
"id": obj.get("id"),
|
149
|
-
"code": obj.get("code"),
|
150
|
-
"name": obj.get("name"),
|
151
|
-
"enable": obj.get("enable"),
|
152
|
-
"wallet_regex": obj.get("wallet_regex"),
|
153
|
-
"priority": obj.get("priority"),
|
154
|
-
"extra_id_exists": obj.get("extra_id_exists"),
|
155
|
-
"extra_id_regex": obj.get("extra_id_regex"),
|
156
|
-
"logo_url": obj.get("logo_url"),
|
157
|
-
"track": obj.get("track"),
|
158
|
-
"cg_id": obj.get("cg_id"),
|
159
|
-
"is_maxlimit": obj.get("is_maxlimit"),
|
160
|
-
"network": obj.get("network"),
|
161
|
-
"smart_contract": obj.get("smart_contract"),
|
162
|
-
"network_precision": obj.get("network_precision"),
|
163
|
-
}
|
164
|
-
)
|
165
|
-
return _obj
|
@@ -1,91 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
"""
|
4
|
-
Payment API
|
5
|
-
|
6
|
-
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
-
|
8
|
-
The version of the OpenAPI document: 0.1.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, Field, StrictFloat, StrictInt, StrictStr
|
21
|
-
from typing import Any, ClassVar, Dict, List, Union
|
22
|
-
from typing import Optional, Set
|
23
|
-
from typing_extensions import Self
|
24
|
-
|
25
|
-
|
26
|
-
class EstimatePriceReq(BaseModel):
|
27
|
-
"""
|
28
|
-
Method for calculating the approximate price in cryptocurrency for a given value. This endpoint estimates the cryptocurrency amount for a given fiat currency value, or estimates crypto-to-crypto conversions. https://documenter.getpostman.com/view/7907941/2s93JusNJt#3c86a16e-94ad-4230-a470-4e833766a4c7
|
29
|
-
""" # noqa: E501
|
30
|
-
|
31
|
-
amount: Union[StrictFloat, StrictInt] = Field(description="Cost value")
|
32
|
-
currency_from: StrictStr = Field(description="Fiat currency")
|
33
|
-
currency_to: StrictStr = Field(description="Cryptocurrency")
|
34
|
-
__properties: ClassVar[List[str]] = ["amount", "currency_from", "currency_to"]
|
35
|
-
|
36
|
-
model_config = ConfigDict(
|
37
|
-
populate_by_name=True,
|
38
|
-
validate_assignment=True,
|
39
|
-
protected_namespaces=(),
|
40
|
-
)
|
41
|
-
|
42
|
-
def to_str(self) -> str:
|
43
|
-
"""Returns the string representation of the model using alias"""
|
44
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
45
|
-
|
46
|
-
def to_json(self) -> str:
|
47
|
-
"""Returns the JSON representation of the model using alias"""
|
48
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
49
|
-
return json.dumps(self.to_dict())
|
50
|
-
|
51
|
-
@classmethod
|
52
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
53
|
-
"""Create an instance of EstimatePriceReq from a JSON string"""
|
54
|
-
return cls.from_dict(json.loads(json_str))
|
55
|
-
|
56
|
-
def to_dict(self) -> Dict[str, Any]:
|
57
|
-
"""Return the dictionary representation of the model using alias.
|
58
|
-
|
59
|
-
This has the following differences from calling pydantic's
|
60
|
-
`self.model_dump(by_alias=True)`:
|
61
|
-
|
62
|
-
* `None` is only added to the output dict for nullable fields that
|
63
|
-
were set at model initialization. Other fields with value `None`
|
64
|
-
are ignored.
|
65
|
-
"""
|
66
|
-
excluded_fields: Set[str] = set([])
|
67
|
-
|
68
|
-
_dict = self.model_dump(
|
69
|
-
by_alias=True,
|
70
|
-
exclude=excluded_fields,
|
71
|
-
exclude_none=True,
|
72
|
-
)
|
73
|
-
return _dict
|
74
|
-
|
75
|
-
@classmethod
|
76
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
77
|
-
"""Create an instance of EstimatePriceReq from a dict"""
|
78
|
-
if obj is None:
|
79
|
-
return None
|
80
|
-
|
81
|
-
if not isinstance(obj, dict):
|
82
|
-
return cls.model_validate(obj)
|
83
|
-
|
84
|
-
_obj = cls.model_validate(
|
85
|
-
{
|
86
|
-
"amount": obj.get("amount"),
|
87
|
-
"currency_from": obj.get("currency_from"),
|
88
|
-
"currency_to": obj.get("currency_to"),
|
89
|
-
}
|
90
|
-
)
|
91
|
-
return _obj
|
@@ -1,102 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
"""
|
4
|
-
Payment API
|
5
|
-
|
6
|
-
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
-
|
8
|
-
The version of the OpenAPI document: 0.1.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, Field, StrictFloat, StrictInt, StrictStr
|
21
|
-
from typing import Any, ClassVar, Dict, List, Union
|
22
|
-
from typing import Optional, Set
|
23
|
-
from typing_extensions import Self
|
24
|
-
|
25
|
-
|
26
|
-
class EstimatePriceRes(BaseModel):
|
27
|
-
"""
|
28
|
-
Response for the estimate price calculation. Contains the source currency and amount, target currency, and the estimated conversion amount. https://documenter.getpostman.com/view/7907941/2s93JusNJt#3c86a16e-94ad-4230-a470-4e833766a4c7
|
29
|
-
""" # noqa: E501
|
30
|
-
|
31
|
-
currency_from: StrictStr = Field(description="Source currency")
|
32
|
-
amount_from: Union[StrictFloat, StrictInt] = Field(
|
33
|
-
description="Original amount in source currency"
|
34
|
-
)
|
35
|
-
currency_to: StrictStr = Field(description="Target cryptocurrency")
|
36
|
-
estimated_amount: Union[StrictFloat, StrictInt] = Field(
|
37
|
-
description="Estimated amount in target cryptocurrency"
|
38
|
-
)
|
39
|
-
__properties: ClassVar[List[str]] = [
|
40
|
-
"currency_from",
|
41
|
-
"amount_from",
|
42
|
-
"currency_to",
|
43
|
-
"estimated_amount",
|
44
|
-
]
|
45
|
-
|
46
|
-
model_config = ConfigDict(
|
47
|
-
populate_by_name=True,
|
48
|
-
validate_assignment=True,
|
49
|
-
protected_namespaces=(),
|
50
|
-
)
|
51
|
-
|
52
|
-
def to_str(self) -> str:
|
53
|
-
"""Returns the string representation of the model using alias"""
|
54
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
55
|
-
|
56
|
-
def to_json(self) -> str:
|
57
|
-
"""Returns the JSON representation of the model using alias"""
|
58
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
59
|
-
return json.dumps(self.to_dict())
|
60
|
-
|
61
|
-
@classmethod
|
62
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
63
|
-
"""Create an instance of EstimatePriceRes from a JSON string"""
|
64
|
-
return cls.from_dict(json.loads(json_str))
|
65
|
-
|
66
|
-
def to_dict(self) -> Dict[str, Any]:
|
67
|
-
"""Return the dictionary representation of the model using alias.
|
68
|
-
|
69
|
-
This has the following differences from calling pydantic's
|
70
|
-
`self.model_dump(by_alias=True)`:
|
71
|
-
|
72
|
-
* `None` is only added to the output dict for nullable fields that
|
73
|
-
were set at model initialization. Other fields with value `None`
|
74
|
-
are ignored.
|
75
|
-
"""
|
76
|
-
excluded_fields: Set[str] = set([])
|
77
|
-
|
78
|
-
_dict = self.model_dump(
|
79
|
-
by_alias=True,
|
80
|
-
exclude=excluded_fields,
|
81
|
-
exclude_none=True,
|
82
|
-
)
|
83
|
-
return _dict
|
84
|
-
|
85
|
-
@classmethod
|
86
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
87
|
-
"""Create an instance of EstimatePriceRes from a dict"""
|
88
|
-
if obj is None:
|
89
|
-
return None
|
90
|
-
|
91
|
-
if not isinstance(obj, dict):
|
92
|
-
return cls.model_validate(obj)
|
93
|
-
|
94
|
-
_obj = cls.model_validate(
|
95
|
-
{
|
96
|
-
"currency_from": obj.get("currency_from"),
|
97
|
-
"amount_from": obj.get("amount_from"),
|
98
|
-
"currency_to": obj.get("currency_to"),
|
99
|
-
"estimated_amount": obj.get("estimated_amount"),
|
100
|
-
}
|
101
|
-
)
|
102
|
-
return _obj
|
@@ -1,99 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
"""
|
4
|
-
Payment API
|
5
|
-
|
6
|
-
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
-
|
8
|
-
The version of the OpenAPI document: 0.1.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, Field
|
21
|
-
from typing import Any, ClassVar, Dict, List
|
22
|
-
from crypticorn.pay.client.models.currency import Currency
|
23
|
-
from typing import Optional, Set
|
24
|
-
from typing_extensions import Self
|
25
|
-
|
26
|
-
|
27
|
-
class GetCurrenciesRes(BaseModel):
|
28
|
-
"""
|
29
|
-
Response containing list of available cryptocurrencies.
|
30
|
-
""" # noqa: E501
|
31
|
-
|
32
|
-
currencies: List[Currency] = Field(description="List of supported cryptocurrencies")
|
33
|
-
__properties: ClassVar[List[str]] = ["currencies"]
|
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 GetCurrenciesRes 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 currencies (list)
|
73
|
-
_items = []
|
74
|
-
if self.currencies:
|
75
|
-
for _item_currencies in self.currencies:
|
76
|
-
if _item_currencies:
|
77
|
-
_items.append(_item_currencies.to_dict())
|
78
|
-
_dict["currencies"] = _items
|
79
|
-
return _dict
|
80
|
-
|
81
|
-
@classmethod
|
82
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
83
|
-
"""Create an instance of GetCurrenciesRes 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
|
-
"currencies": (
|
93
|
-
[Currency.from_dict(_item) for _item in obj["currencies"]]
|
94
|
-
if obj.get("currencies") is not None
|
95
|
-
else None
|
96
|
-
)
|
97
|
-
}
|
98
|
-
)
|
99
|
-
return _obj
|