crypticorn 2.5.1__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/common/__init__.py +1 -0
- crypticorn/common/enums.py +3 -1
- crypticorn/common/errors.py +40 -4
- crypticorn/common/mixins.py +1 -0
- crypticorn/common/status_router.py +42 -0
- crypticorn/common/utils.py +5 -12
- 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/symbols_api.py +7 -8
- 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 +1 -1
- 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/trade/client/__init__.py +1 -2
- crypticorn/trade/client/api/exchanges_api.py +6 -6
- crypticorn/trade/client/api/trading_actions_api.py +16 -15
- crypticorn/trade/client/configuration.py +2 -2
- crypticorn/trade/client/models/__init__.py +1 -2
- crypticorn/trade/client/models/action_model.py +1 -2
- crypticorn/trade/client/models/exchange_key_model.py +2 -11
- crypticorn/trade/client/models/futures_trading_action.py +1 -2
- crypticorn/trade/client/models/order_model.py +4 -14
- crypticorn/trade/client/models/spot_trading_action.py +1 -2
- 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-2.5.1.dist-info → crypticorn-2.5.2.dist-info}/METADATA +1 -1
- {crypticorn-2.5.1.dist-info → crypticorn-2.5.2.dist-info}/RECORD +50 -127
- 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/error_response.py +0 -109
- 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_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/error_response.py +0 -109
- 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/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_key_model.py +0 -156
- crypticorn/trade/client/models/exchange.py +0 -35
- crypticorn/trade/client/models/market_type.py +0 -35
- {crypticorn-2.5.1.dist-info → crypticorn-2.5.2.dist-info}/WHEEL +0 -0
- {crypticorn-2.5.1.dist-info → crypticorn-2.5.2.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.5.1.dist-info → crypticorn-2.5.2.dist-info}/top_level.txt +0 -0
@@ -3,7 +3,7 @@
|
|
3
3
|
"""
|
4
4
|
Marketcap Service API
|
5
5
|
|
6
|
-
|
6
|
+
API for retrieving historical marketcap data, available exchanges, and indicators.
|
7
7
|
|
8
8
|
The version of the OpenAPI document: 1.0.0
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
@@ -3,7 +3,7 @@
|
|
3
3
|
"""
|
4
4
|
Marketcap Service API
|
5
5
|
|
6
|
-
|
6
|
+
API for retrieving historical marketcap data, available exchanges, and indicators.
|
7
7
|
|
8
8
|
The version of the OpenAPI document: 1.0.0
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
@@ -215,9 +215,7 @@ class Configuration:
|
|
215
215
|
debug: Optional[bool] = None,
|
216
216
|
) -> None:
|
217
217
|
"""Constructor"""
|
218
|
-
self._base_path =
|
219
|
-
"https://api.crypticorn.dev/v1/metrics" if host is None else host
|
220
|
-
)
|
218
|
+
self._base_path = "http://localhost/v1/metrics" if host is None else host
|
221
219
|
"""Default Base url
|
222
220
|
"""
|
223
221
|
self.server_index = 0 if server_index is None and host is None else server_index
|
@@ -559,7 +557,7 @@ class Configuration:
|
|
559
557
|
"""
|
560
558
|
return [
|
561
559
|
{
|
562
|
-
"url": "
|
560
|
+
"url": "http://localhost/v1/metrics",
|
563
561
|
"description": "No description provided",
|
564
562
|
}
|
565
563
|
]
|
@@ -3,7 +3,7 @@
|
|
3
3
|
"""
|
4
4
|
Marketcap Service API
|
5
5
|
|
6
|
-
|
6
|
+
API for retrieving historical marketcap data, available exchanges, and indicators.
|
7
7
|
|
8
8
|
The version of the OpenAPI document: 1.0.0
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
@@ -4,7 +4,7 @@
|
|
4
4
|
"""
|
5
5
|
Marketcap Service API
|
6
6
|
|
7
|
-
|
7
|
+
API for retrieving historical marketcap data, available exchanges, and indicators.
|
8
8
|
|
9
9
|
The version of the OpenAPI document: 1.0.0
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
@@ -14,12 +14,7 @@ Do not edit the class manually.
|
|
14
14
|
|
15
15
|
|
16
16
|
# import models into model package
|
17
|
-
from crypticorn.metrics.client.models.api_error_identifier import ApiErrorIdentifier
|
18
|
-
from crypticorn.metrics.client.models.api_error_level import ApiErrorLevel
|
19
|
-
from crypticorn.metrics.client.models.api_error_type import ApiErrorType
|
20
17
|
from crypticorn.metrics.client.models.exception_detail import ExceptionDetail
|
21
|
-
from crypticorn.metrics.client.models.internal_exchange import InternalExchange
|
22
|
-
from crypticorn.metrics.client.models.market_type import MarketType
|
23
18
|
from crypticorn.metrics.client.models.severity import Severity
|
24
19
|
from crypticorn.metrics.client.models.time_interval import TimeInterval
|
25
20
|
from crypticorn.metrics.client.models.trading_status import TradingStatus
|
@@ -3,7 +3,7 @@
|
|
3
3
|
"""
|
4
4
|
Marketcap Service API
|
5
5
|
|
6
|
-
|
6
|
+
API for retrieving historical marketcap data, available exchanges, and indicators.
|
7
7
|
|
8
8
|
The version of the OpenAPI document: 1.0.0
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
@@ -19,9 +19,6 @@ import json
|
|
19
19
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
22
|
-
from crypticorn.metrics.client.models.api_error_identifier import ApiErrorIdentifier
|
23
|
-
from crypticorn.metrics.client.models.api_error_level import ApiErrorLevel
|
24
|
-
from crypticorn.metrics.client.models.api_error_type import ApiErrorType
|
25
22
|
from typing import Optional, Set
|
26
23
|
from typing_extensions import Self
|
27
24
|
|
@@ -32,9 +29,9 @@ class ExceptionDetail(BaseModel):
|
|
32
29
|
""" # noqa: E501
|
33
30
|
|
34
31
|
message: Optional[StrictStr] = None
|
35
|
-
code:
|
36
|
-
type:
|
37
|
-
level:
|
32
|
+
code: StrictStr = Field(description="API error identifiers")
|
33
|
+
type: StrictStr = Field(description="Type of API error")
|
34
|
+
level: StrictStr = Field(description="API error levels")
|
38
35
|
status_code: StrictInt = Field(description="The HTTP status code")
|
39
36
|
details: Optional[Any] = None
|
40
37
|
__properties: ClassVar[List[str]] = [
|
@@ -3,7 +3,7 @@
|
|
3
3
|
"""
|
4
4
|
Marketcap Service API
|
5
5
|
|
6
|
-
|
6
|
+
API for retrieving historical marketcap data, available exchanges, and indicators.
|
7
7
|
|
8
8
|
The version of the OpenAPI document: 1.0.0
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
@@ -3,7 +3,7 @@
|
|
3
3
|
"""
|
4
4
|
Marketcap Service API
|
5
5
|
|
6
|
-
|
6
|
+
API for retrieving historical marketcap data, available exchanges, and indicators.
|
7
7
|
|
8
8
|
The version of the OpenAPI document: 1.0.0
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
@@ -3,7 +3,7 @@
|
|
3
3
|
"""
|
4
4
|
Marketcap Service API
|
5
5
|
|
6
|
-
|
6
|
+
API for retrieving historical marketcap data, available exchanges, and indicators.
|
7
7
|
|
8
8
|
The version of the OpenAPI document: 1.0.0
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
@@ -3,7 +3,7 @@
|
|
3
3
|
"""
|
4
4
|
Marketcap Service API
|
5
5
|
|
6
|
-
|
6
|
+
API for retrieving historical marketcap data, available exchanges, and indicators.
|
7
7
|
|
8
8
|
The version of the OpenAPI document: 1.0.0
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
@@ -42,18 +42,17 @@ from crypticorn.trade.client.exceptions import ApiException
|
|
42
42
|
from crypticorn.trade.client.models.action_model import ActionModel
|
43
43
|
from crypticorn.trade.client.models.bot_model import BotModel
|
44
44
|
from crypticorn.trade.client.models.bot_status import BotStatus
|
45
|
-
from crypticorn.trade.client.models.exchange import Exchange
|
46
45
|
from crypticorn.trade.client.models.exchange_key_model import ExchangeKeyModel
|
47
46
|
from crypticorn.trade.client.models.execution_ids import ExecutionIds
|
48
47
|
from crypticorn.trade.client.models.futures_balance import FuturesBalance
|
49
48
|
from crypticorn.trade.client.models.futures_trading_action import FuturesTradingAction
|
50
49
|
from crypticorn.trade.client.models.http_validation_error import HTTPValidationError
|
51
50
|
from crypticorn.trade.client.models.margin_mode import MarginMode
|
52
|
-
from crypticorn.trade.client.models.market_type import MarketType
|
53
51
|
from crypticorn.trade.client.models.notification_model import NotificationModel
|
54
52
|
from crypticorn.trade.client.models.order_model import OrderModel
|
55
53
|
from crypticorn.trade.client.models.order_status import OrderStatus
|
56
54
|
from crypticorn.trade.client.models.post_futures_action import PostFuturesAction
|
55
|
+
from crypticorn.trade.client.models.spot_trading_action import SpotTradingAction
|
57
56
|
from crypticorn.trade.client.models.strategy_exchange_info import StrategyExchangeInfo
|
58
57
|
from crypticorn.trade.client.models.strategy_model_input import StrategyModelInput
|
59
58
|
from crypticorn.trade.client.models.strategy_model_output import StrategyModelOutput
|
@@ -16,8 +16,8 @@ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
16
|
from typing import Any, Dict, List, Optional, Tuple, Union
|
17
17
|
from typing_extensions import Annotated
|
18
18
|
|
19
|
+
from pydantic import StrictStr
|
19
20
|
from typing import List
|
20
|
-
from crypticorn.trade.client.models.exchange import Exchange
|
21
21
|
|
22
22
|
from crypticorn.trade.client.api_client import ApiClient, RequestSerialized
|
23
23
|
from crypticorn.trade.client.api_response import ApiResponse
|
@@ -50,7 +50,7 @@ class ExchangesApi:
|
|
50
50
|
_content_type: Optional[StrictStr] = None,
|
51
51
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
52
52
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
53
|
-
) -> List[
|
53
|
+
) -> List[str]:
|
54
54
|
"""Get Exchanges
|
55
55
|
|
56
56
|
|
@@ -84,7 +84,7 @@ class ExchangesApi:
|
|
84
84
|
)
|
85
85
|
|
86
86
|
_response_types_map: Dict[str, Optional[str]] = {
|
87
|
-
"200": "List[
|
87
|
+
"200": "List[str]",
|
88
88
|
}
|
89
89
|
response_data = await self.api_client.call_api(
|
90
90
|
*_param, _request_timeout=_request_timeout
|
@@ -109,7 +109,7 @@ class ExchangesApi:
|
|
109
109
|
_content_type: Optional[StrictStr] = None,
|
110
110
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
111
111
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
112
|
-
) -> ApiResponse[List[
|
112
|
+
) -> ApiResponse[List[str]]:
|
113
113
|
"""Get Exchanges
|
114
114
|
|
115
115
|
|
@@ -143,7 +143,7 @@ class ExchangesApi:
|
|
143
143
|
)
|
144
144
|
|
145
145
|
_response_types_map: Dict[str, Optional[str]] = {
|
146
|
-
"200": "List[
|
146
|
+
"200": "List[str]",
|
147
147
|
}
|
148
148
|
response_data = await self.api_client.call_api(
|
149
149
|
*_param, _request_timeout=_request_timeout
|
@@ -202,7 +202,7 @@ class ExchangesApi:
|
|
202
202
|
)
|
203
203
|
|
204
204
|
_response_types_map: Dict[str, Optional[str]] = {
|
205
|
-
"200": "List[
|
205
|
+
"200": "List[str]",
|
206
206
|
}
|
207
207
|
response_data = await self.api_client.call_api(
|
208
208
|
*_param, _request_timeout=_request_timeout
|
@@ -21,6 +21,7 @@ from typing import Any, List, Optional
|
|
21
21
|
from crypticorn.trade.client.models.action_model import ActionModel
|
22
22
|
from crypticorn.trade.client.models.futures_trading_action import FuturesTradingAction
|
23
23
|
from crypticorn.trade.client.models.post_futures_action import PostFuturesAction
|
24
|
+
from crypticorn.trade.client.models.spot_trading_action import SpotTradingAction
|
24
25
|
|
25
26
|
from crypticorn.trade.client.api_client import ApiClient, RequestSerialized
|
26
27
|
from crypticorn.trade.client.api_response import ApiResponse
|
@@ -558,7 +559,7 @@ class TradingActionsApi:
|
|
558
559
|
@validate_call
|
559
560
|
async def post_spot_action(
|
560
561
|
self,
|
561
|
-
|
562
|
+
spot_trading_action: SpotTradingAction,
|
562
563
|
_request_timeout: Union[
|
563
564
|
None,
|
564
565
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -574,8 +575,8 @@ class TradingActionsApi:
|
|
574
575
|
"""Post Spot Action
|
575
576
|
|
576
577
|
|
577
|
-
:param
|
578
|
-
:type
|
578
|
+
:param spot_trading_action: (required)
|
579
|
+
:type spot_trading_action: SpotTradingAction
|
579
580
|
:param _request_timeout: timeout setting for this request. If one
|
580
581
|
number provided, it will be total request
|
581
582
|
timeout. It can also be a pair (tuple) of
|
@@ -599,7 +600,7 @@ class TradingActionsApi:
|
|
599
600
|
""" # noqa: E501
|
600
601
|
|
601
602
|
_param = self._post_spot_action_serialize(
|
602
|
-
|
603
|
+
spot_trading_action=spot_trading_action,
|
603
604
|
_request_auth=_request_auth,
|
604
605
|
_content_type=_content_type,
|
605
606
|
_headers=_headers,
|
@@ -622,7 +623,7 @@ class TradingActionsApi:
|
|
622
623
|
@validate_call
|
623
624
|
async def post_spot_action_with_http_info(
|
624
625
|
self,
|
625
|
-
|
626
|
+
spot_trading_action: SpotTradingAction,
|
626
627
|
_request_timeout: Union[
|
627
628
|
None,
|
628
629
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -638,8 +639,8 @@ class TradingActionsApi:
|
|
638
639
|
"""Post Spot Action
|
639
640
|
|
640
641
|
|
641
|
-
:param
|
642
|
-
:type
|
642
|
+
:param spot_trading_action: (required)
|
643
|
+
:type spot_trading_action: SpotTradingAction
|
643
644
|
:param _request_timeout: timeout setting for this request. If one
|
644
645
|
number provided, it will be total request
|
645
646
|
timeout. It can also be a pair (tuple) of
|
@@ -663,7 +664,7 @@ class TradingActionsApi:
|
|
663
664
|
""" # noqa: E501
|
664
665
|
|
665
666
|
_param = self._post_spot_action_serialize(
|
666
|
-
|
667
|
+
spot_trading_action=spot_trading_action,
|
667
668
|
_request_auth=_request_auth,
|
668
669
|
_content_type=_content_type,
|
669
670
|
_headers=_headers,
|
@@ -686,7 +687,7 @@ class TradingActionsApi:
|
|
686
687
|
@validate_call
|
687
688
|
async def post_spot_action_without_preload_content(
|
688
689
|
self,
|
689
|
-
|
690
|
+
spot_trading_action: SpotTradingAction,
|
690
691
|
_request_timeout: Union[
|
691
692
|
None,
|
692
693
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -702,8 +703,8 @@ class TradingActionsApi:
|
|
702
703
|
"""Post Spot Action
|
703
704
|
|
704
705
|
|
705
|
-
:param
|
706
|
-
:type
|
706
|
+
:param spot_trading_action: (required)
|
707
|
+
:type spot_trading_action: SpotTradingAction
|
707
708
|
:param _request_timeout: timeout setting for this request. If one
|
708
709
|
number provided, it will be total request
|
709
710
|
timeout. It can also be a pair (tuple) of
|
@@ -727,7 +728,7 @@ class TradingActionsApi:
|
|
727
728
|
""" # noqa: E501
|
728
729
|
|
729
730
|
_param = self._post_spot_action_serialize(
|
730
|
-
|
731
|
+
spot_trading_action=spot_trading_action,
|
731
732
|
_request_auth=_request_auth,
|
732
733
|
_content_type=_content_type,
|
733
734
|
_headers=_headers,
|
@@ -745,7 +746,7 @@ class TradingActionsApi:
|
|
745
746
|
|
746
747
|
def _post_spot_action_serialize(
|
747
748
|
self,
|
748
|
-
|
749
|
+
spot_trading_action,
|
749
750
|
_request_auth,
|
750
751
|
_content_type,
|
751
752
|
_headers,
|
@@ -770,8 +771,8 @@ class TradingActionsApi:
|
|
770
771
|
# process the header parameters
|
771
772
|
# process the form parameters
|
772
773
|
# process the body parameter
|
773
|
-
if
|
774
|
-
_body_params =
|
774
|
+
if spot_trading_action is not None:
|
775
|
+
_body_params = spot_trading_action
|
775
776
|
|
776
777
|
# set the HTTP header `Accept`
|
777
778
|
if "Accept" not in _header_params:
|
@@ -215,7 +215,7 @@ class Configuration:
|
|
215
215
|
debug: Optional[bool] = None,
|
216
216
|
) -> None:
|
217
217
|
"""Constructor"""
|
218
|
-
self._base_path = "http://
|
218
|
+
self._base_path = "http://localhost/v1/trade" if host is None else host
|
219
219
|
"""Default Base url
|
220
220
|
"""
|
221
221
|
self.server_index = 0 if server_index is None and host is None else server_index
|
@@ -557,7 +557,7 @@ class Configuration:
|
|
557
557
|
"""
|
558
558
|
return [
|
559
559
|
{
|
560
|
-
"url": "http://
|
560
|
+
"url": "http://localhost/v1/trade",
|
561
561
|
"description": "No description provided",
|
562
562
|
}
|
563
563
|
]
|
@@ -17,18 +17,17 @@ Do not edit the class manually.
|
|
17
17
|
from crypticorn.trade.client.models.action_model import ActionModel
|
18
18
|
from crypticorn.trade.client.models.bot_model import BotModel
|
19
19
|
from crypticorn.trade.client.models.bot_status import BotStatus
|
20
|
-
from crypticorn.trade.client.models.exchange import Exchange
|
21
20
|
from crypticorn.trade.client.models.exchange_key_model import ExchangeKeyModel
|
22
21
|
from crypticorn.trade.client.models.execution_ids import ExecutionIds
|
23
22
|
from crypticorn.trade.client.models.futures_balance import FuturesBalance
|
24
23
|
from crypticorn.trade.client.models.futures_trading_action import FuturesTradingAction
|
25
24
|
from crypticorn.trade.client.models.http_validation_error import HTTPValidationError
|
26
25
|
from crypticorn.trade.client.models.margin_mode import MarginMode
|
27
|
-
from crypticorn.trade.client.models.market_type import MarketType
|
28
26
|
from crypticorn.trade.client.models.notification_model import NotificationModel
|
29
27
|
from crypticorn.trade.client.models.order_model import OrderModel
|
30
28
|
from crypticorn.trade.client.models.order_status import OrderStatus
|
31
29
|
from crypticorn.trade.client.models.post_futures_action import PostFuturesAction
|
30
|
+
from crypticorn.trade.client.models.spot_trading_action import SpotTradingAction
|
32
31
|
from crypticorn.trade.client.models.strategy_exchange_info import StrategyExchangeInfo
|
33
32
|
from crypticorn.trade.client.models.strategy_model_input import StrategyModelInput
|
34
33
|
from crypticorn.trade.client.models.strategy_model_output import StrategyModelOutput
|
@@ -29,7 +29,6 @@ from pydantic import (
|
|
29
29
|
from typing import Any, ClassVar, Dict, List, Optional, Union
|
30
30
|
from typing_extensions import Annotated
|
31
31
|
from crypticorn.trade.client.models.margin_mode import MarginMode
|
32
|
-
from crypticorn.trade.client.models.market_type import MarketType
|
33
32
|
from crypticorn.trade.client.models.tpsl import TPSL
|
34
33
|
from crypticorn.trade.client.models.trading_action_type import TradingActionType
|
35
34
|
from typing import Optional, Set
|
@@ -48,7 +47,7 @@ class ActionModel(BaseModel):
|
|
48
47
|
open_order_execution_id: Optional[StrictStr] = None
|
49
48
|
client_order_id: Optional[StrictStr] = None
|
50
49
|
action_type: TradingActionType = Field(description="The type of action.")
|
51
|
-
market_type:
|
50
|
+
market_type: StrictStr = Field(description="Market types")
|
52
51
|
strategy_id: StrictStr = Field(description="UID for the strategy.")
|
53
52
|
symbol: StrictStr = Field(
|
54
53
|
description="Trading symbol or asset pair in format: 'symbol/quote_currency' (see market service for valid symbols)"
|
@@ -17,9 +17,8 @@ import pprint
|
|
17
17
|
import re # noqa: F401
|
18
18
|
import json
|
19
19
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field,
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
22
|
-
from crypticorn.trade.client.models.exchange import Exchange
|
23
22
|
from typing import Optional, Set
|
24
23
|
from typing_extensions import Self
|
25
24
|
|
@@ -32,12 +31,11 @@ class ExchangeKeyModel(BaseModel):
|
|
32
31
|
created_at: Optional[StrictInt] = None
|
33
32
|
updated_at: Optional[StrictInt] = None
|
34
33
|
id: Optional[StrictStr] = None
|
35
|
-
exchange:
|
34
|
+
exchange: StrictStr = Field(description="Supported exchanges for trading")
|
36
35
|
api_key: Optional[StrictStr] = None
|
37
36
|
secret: Optional[StrictStr] = None
|
38
37
|
passphrase: Optional[StrictStr] = None
|
39
38
|
label: StrictStr = Field(description="Label for the API key")
|
40
|
-
enabled: Optional[StrictBool] = None
|
41
39
|
user_id: Optional[StrictStr] = None
|
42
40
|
__properties: ClassVar[List[str]] = [
|
43
41
|
"created_at",
|
@@ -48,7 +46,6 @@ class ExchangeKeyModel(BaseModel):
|
|
48
46
|
"secret",
|
49
47
|
"passphrase",
|
50
48
|
"label",
|
51
|
-
"enabled",
|
52
49
|
"user_id",
|
53
50
|
]
|
54
51
|
|
@@ -119,11 +116,6 @@ class ExchangeKeyModel(BaseModel):
|
|
119
116
|
if self.passphrase is None and "passphrase" in self.model_fields_set:
|
120
117
|
_dict["passphrase"] = None
|
121
118
|
|
122
|
-
# set to None if enabled (nullable) is None
|
123
|
-
# and model_fields_set contains the field
|
124
|
-
if self.enabled is None and "enabled" in self.model_fields_set:
|
125
|
-
_dict["enabled"] = None
|
126
|
-
|
127
119
|
# set to None if user_id (nullable) is None
|
128
120
|
# and model_fields_set contains the field
|
129
121
|
if self.user_id is None and "user_id" in self.model_fields_set:
|
@@ -150,7 +142,6 @@ class ExchangeKeyModel(BaseModel):
|
|
150
142
|
"secret": obj.get("secret"),
|
151
143
|
"passphrase": obj.get("passphrase"),
|
152
144
|
"label": obj.get("label"),
|
153
|
-
"enabled": obj.get("enabled"),
|
154
145
|
"user_id": obj.get("user_id"),
|
155
146
|
}
|
156
147
|
)
|
@@ -29,7 +29,6 @@ from pydantic import (
|
|
29
29
|
from typing import Any, ClassVar, Dict, List, Optional, Union
|
30
30
|
from typing_extensions import Annotated
|
31
31
|
from crypticorn.trade.client.models.margin_mode import MarginMode
|
32
|
-
from crypticorn.trade.client.models.market_type import MarketType
|
33
32
|
from crypticorn.trade.client.models.tpsl import TPSL
|
34
33
|
from crypticorn.trade.client.models.trading_action_type import TradingActionType
|
35
34
|
from typing import Optional, Set
|
@@ -46,7 +45,7 @@ class FuturesTradingAction(BaseModel):
|
|
46
45
|
open_order_execution_id: Optional[StrictStr] = None
|
47
46
|
client_order_id: Optional[StrictStr] = None
|
48
47
|
action_type: TradingActionType = Field(description="The type of action.")
|
49
|
-
market_type:
|
48
|
+
market_type: StrictStr = Field(description="Market types")
|
50
49
|
strategy_id: StrictStr = Field(description="UID for the strategy.")
|
51
50
|
symbol: StrictStr = Field(
|
52
51
|
description="Trading symbol or asset pair in format: 'symbol/quote_currency' (see market service for valid symbols)"
|
@@ -19,9 +19,7 @@ import json
|
|
19
19
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional, Union
|
22
|
-
from crypticorn.trade.client.models.exchange import Exchange
|
23
22
|
from crypticorn.trade.client.models.margin_mode import MarginMode
|
24
|
-
from crypticorn.trade.client.models.market_type import MarketType
|
25
23
|
from crypticorn.trade.client.models.order_status import OrderStatus
|
26
24
|
from crypticorn.trade.client.models.trading_action_type import TradingActionType
|
27
25
|
from typing import Optional, Set
|
@@ -44,12 +42,14 @@ class OrderModel(BaseModel):
|
|
44
42
|
user_id: Optional[StrictStr] = None
|
45
43
|
bot_id: Optional[StrictStr] = None
|
46
44
|
client_order_id: Optional[StrictStr] = None
|
47
|
-
exchange: Optional[
|
45
|
+
exchange: Optional[StrictStr] = Field(
|
46
|
+
default=None, description="Supported exchanges for trading"
|
47
|
+
)
|
48
48
|
symbol: Optional[StrictStr] = None
|
49
49
|
common_symbol: Optional[StrictStr] = None
|
50
50
|
price: Optional[Union[StrictFloat, StrictInt]] = None
|
51
51
|
action_type: Optional[TradingActionType] = None
|
52
|
-
market_type: Optional[
|
52
|
+
market_type: Optional[StrictStr] = Field(default=None, description="Market types")
|
53
53
|
margin_mode: Optional[MarginMode] = None
|
54
54
|
status_code: Optional[StrictStr] = Field(
|
55
55
|
default=None, description="API error identifiers"
|
@@ -195,11 +195,6 @@ class OrderModel(BaseModel):
|
|
195
195
|
if self.client_order_id is None and "client_order_id" in self.model_fields_set:
|
196
196
|
_dict["client_order_id"] = None
|
197
197
|
|
198
|
-
# set to None if exchange (nullable) is None
|
199
|
-
# and model_fields_set contains the field
|
200
|
-
if self.exchange is None and "exchange" in self.model_fields_set:
|
201
|
-
_dict["exchange"] = None
|
202
|
-
|
203
198
|
# set to None if symbol (nullable) is None
|
204
199
|
# and model_fields_set contains the field
|
205
200
|
if self.symbol is None and "symbol" in self.model_fields_set:
|
@@ -220,11 +215,6 @@ class OrderModel(BaseModel):
|
|
220
215
|
if self.action_type is None and "action_type" in self.model_fields_set:
|
221
216
|
_dict["action_type"] = None
|
222
217
|
|
223
|
-
# set to None if market_type (nullable) is None
|
224
|
-
# and model_fields_set contains the field
|
225
|
-
if self.market_type is None and "market_type" in self.model_fields_set:
|
226
|
-
_dict["market_type"] = None
|
227
|
-
|
228
218
|
# set to None if margin_mode (nullable) is None
|
229
219
|
# and model_fields_set contains the field
|
230
220
|
if self.margin_mode is None and "margin_mode" in self.model_fields_set:
|
@@ -28,7 +28,6 @@ from pydantic import (
|
|
28
28
|
)
|
29
29
|
from typing import Any, ClassVar, Dict, List, Optional, Union
|
30
30
|
from typing_extensions import Annotated
|
31
|
-
from crypticorn.trade.client.models.market_type import MarketType
|
32
31
|
from crypticorn.trade.client.models.tpsl import TPSL
|
33
32
|
from crypticorn.trade.client.models.trading_action_type import TradingActionType
|
34
33
|
from typing import Optional, Set
|
@@ -45,7 +44,7 @@ class SpotTradingAction(BaseModel):
|
|
45
44
|
open_order_execution_id: Optional[StrictStr] = None
|
46
45
|
client_order_id: Optional[StrictStr] = None
|
47
46
|
action_type: TradingActionType = Field(description="The type of action.")
|
48
|
-
market_type:
|
47
|
+
market_type: StrictStr = Field(description="Market types")
|
49
48
|
strategy_id: StrictStr = Field(description="UID for the strategy.")
|
50
49
|
symbol: StrictStr = Field(
|
51
50
|
description="Trading symbol or asset pair in format: 'symbol/quote_currency' (see market service for valid symbols)"
|
@@ -17,9 +17,8 @@ import pprint
|
|
17
17
|
import re # noqa: F401
|
18
18
|
import json
|
19
19
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
|
21
21
|
from typing import Any, ClassVar, Dict, List, Union
|
22
|
-
from crypticorn.trade.client.models.exchange import Exchange
|
23
22
|
from typing import Optional, Set
|
24
23
|
from typing_extensions import Self
|
25
24
|
|
@@ -29,7 +28,7 @@ class StrategyExchangeInfo(BaseModel):
|
|
29
28
|
StrategyExchangeInfo
|
30
29
|
""" # noqa: E501
|
31
30
|
|
32
|
-
exchange:
|
31
|
+
exchange: StrictStr = Field(description="Supported exchanges for trading")
|
33
32
|
min_amount: Union[StrictFloat, StrictInt] = Field(
|
34
33
|
description="Minimum amount for the strategy on the exchange"
|
35
34
|
)
|
@@ -20,7 +20,6 @@ import json
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional, Union
|
22
22
|
from typing_extensions import Annotated
|
23
|
-
from crypticorn.trade.client.models.market_type import MarketType
|
24
23
|
from crypticorn.trade.client.models.strategy_exchange_info import StrategyExchangeInfo
|
25
24
|
from typing import Optional, Set
|
26
25
|
from typing_extensions import Self
|
@@ -50,7 +49,7 @@ class StrategyModelInput(BaseModel):
|
|
50
49
|
Annotated[float, Field(le=1.0, strict=True)],
|
51
50
|
Annotated[int, Field(le=1, strict=True)],
|
52
51
|
] = Field(description="Performance fee for the strategy")
|
53
|
-
market_type:
|
52
|
+
market_type: StrictStr = Field(description="Market types")
|
54
53
|
__properties: ClassVar[List[str]] = [
|
55
54
|
"created_at",
|
56
55
|
"updated_at",
|
@@ -20,7 +20,6 @@ import json
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional, Union
|
22
22
|
from typing_extensions import Annotated
|
23
|
-
from crypticorn.trade.client.models.market_type import MarketType
|
24
23
|
from crypticorn.trade.client.models.strategy_exchange_info import StrategyExchangeInfo
|
25
24
|
from typing import Optional, Set
|
26
25
|
from typing_extensions import Self
|
@@ -50,7 +49,7 @@ class StrategyModelOutput(BaseModel):
|
|
50
49
|
Annotated[float, Field(le=1.0, strict=True)],
|
51
50
|
Annotated[int, Field(le=1, strict=True)],
|
52
51
|
] = Field(description="Performance fee for the strategy")
|
53
|
-
market_type:
|
52
|
+
market_type: StrictStr = Field(description="Market types")
|
54
53
|
__properties: ClassVar[List[str]] = [
|
55
54
|
"created_at",
|
56
55
|
"updated_at",
|
@@ -39,7 +39,9 @@ class TPSL(BaseModel):
|
|
39
39
|
allocation: Union[
|
40
40
|
Annotated[float, Field(le=1.0, strict=True, ge=0.0)],
|
41
41
|
Annotated[int, Field(le=1, strict=True, ge=0)],
|
42
|
-
] = Field(
|
42
|
+
] = Field(
|
43
|
+
description="Percentage of the open order to sell. All allocations must sum up to 1."
|
44
|
+
)
|
43
45
|
execution_id: Optional[StrictStr] = None
|
44
46
|
client_order_id: Optional[StrictStr] = None
|
45
47
|
__properties: ClassVar[List[str]] = [
|