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
@@ -3,9 +3,9 @@
|
|
3
3
|
"""
|
4
4
|
Trading API
|
5
5
|
|
6
|
-
|
6
|
+
API for automated trading and exchange interface
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
10
|
|
11
11
|
Do not edit the class manually.
|
@@ -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
|
@@ -96,7 +97,6 @@ class TradingActionsApi:
|
|
96
97
|
|
97
98
|
_response_types_map: Dict[str, Optional[str]] = {
|
98
99
|
"200": "List[ActionModel]",
|
99
|
-
"422": "HTTPValidationError",
|
100
100
|
}
|
101
101
|
response_data = await self.api_client.call_api(
|
102
102
|
*_param, _request_timeout=_request_timeout
|
@@ -164,7 +164,6 @@ class TradingActionsApi:
|
|
164
164
|
|
165
165
|
_response_types_map: Dict[str, Optional[str]] = {
|
166
166
|
"200": "List[ActionModel]",
|
167
|
-
"422": "HTTPValidationError",
|
168
167
|
}
|
169
168
|
response_data = await self.api_client.call_api(
|
170
169
|
*_param, _request_timeout=_request_timeout
|
@@ -232,7 +231,6 @@ class TradingActionsApi:
|
|
232
231
|
|
233
232
|
_response_types_map: Dict[str, Optional[str]] = {
|
234
233
|
"200": "List[ActionModel]",
|
235
|
-
"422": "HTTPValidationError",
|
236
234
|
}
|
237
235
|
response_data = await self.api_client.call_api(
|
238
236
|
*_param, _request_timeout=_request_timeout
|
@@ -354,7 +352,6 @@ class TradingActionsApi:
|
|
354
352
|
|
355
353
|
_response_types_map: Dict[str, Optional[str]] = {
|
356
354
|
"200": "PostFuturesAction",
|
357
|
-
"422": "HTTPValidationError",
|
358
355
|
}
|
359
356
|
response_data = await self.api_client.call_api(
|
360
357
|
*_param, _request_timeout=_request_timeout
|
@@ -419,7 +416,6 @@ class TradingActionsApi:
|
|
419
416
|
|
420
417
|
_response_types_map: Dict[str, Optional[str]] = {
|
421
418
|
"200": "PostFuturesAction",
|
422
|
-
"422": "HTTPValidationError",
|
423
419
|
}
|
424
420
|
response_data = await self.api_client.call_api(
|
425
421
|
*_param, _request_timeout=_request_timeout
|
@@ -484,7 +480,6 @@ class TradingActionsApi:
|
|
484
480
|
|
485
481
|
_response_types_map: Dict[str, Optional[str]] = {
|
486
482
|
"200": "PostFuturesAction",
|
487
|
-
"422": "HTTPValidationError",
|
488
483
|
}
|
489
484
|
response_data = await self.api_client.call_api(
|
490
485
|
*_param, _request_timeout=_request_timeout
|
@@ -558,7 +553,7 @@ class TradingActionsApi:
|
|
558
553
|
@validate_call
|
559
554
|
async def post_spot_action(
|
560
555
|
self,
|
561
|
-
|
556
|
+
spot_trading_action: SpotTradingAction,
|
562
557
|
_request_timeout: Union[
|
563
558
|
None,
|
564
559
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -574,8 +569,8 @@ class TradingActionsApi:
|
|
574
569
|
"""Post Spot Action
|
575
570
|
|
576
571
|
|
577
|
-
:param
|
578
|
-
:type
|
572
|
+
:param spot_trading_action: (required)
|
573
|
+
:type spot_trading_action: SpotTradingAction
|
579
574
|
:param _request_timeout: timeout setting for this request. If one
|
580
575
|
number provided, it will be total request
|
581
576
|
timeout. It can also be a pair (tuple) of
|
@@ -599,7 +594,7 @@ class TradingActionsApi:
|
|
599
594
|
""" # noqa: E501
|
600
595
|
|
601
596
|
_param = self._post_spot_action_serialize(
|
602
|
-
|
597
|
+
spot_trading_action=spot_trading_action,
|
603
598
|
_request_auth=_request_auth,
|
604
599
|
_content_type=_content_type,
|
605
600
|
_headers=_headers,
|
@@ -608,7 +603,6 @@ class TradingActionsApi:
|
|
608
603
|
|
609
604
|
_response_types_map: Dict[str, Optional[str]] = {
|
610
605
|
"200": "object",
|
611
|
-
"422": "HTTPValidationError",
|
612
606
|
}
|
613
607
|
response_data = await self.api_client.call_api(
|
614
608
|
*_param, _request_timeout=_request_timeout
|
@@ -622,7 +616,7 @@ class TradingActionsApi:
|
|
622
616
|
@validate_call
|
623
617
|
async def post_spot_action_with_http_info(
|
624
618
|
self,
|
625
|
-
|
619
|
+
spot_trading_action: SpotTradingAction,
|
626
620
|
_request_timeout: Union[
|
627
621
|
None,
|
628
622
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -638,8 +632,8 @@ class TradingActionsApi:
|
|
638
632
|
"""Post Spot Action
|
639
633
|
|
640
634
|
|
641
|
-
:param
|
642
|
-
:type
|
635
|
+
:param spot_trading_action: (required)
|
636
|
+
:type spot_trading_action: SpotTradingAction
|
643
637
|
:param _request_timeout: timeout setting for this request. If one
|
644
638
|
number provided, it will be total request
|
645
639
|
timeout. It can also be a pair (tuple) of
|
@@ -663,7 +657,7 @@ class TradingActionsApi:
|
|
663
657
|
""" # noqa: E501
|
664
658
|
|
665
659
|
_param = self._post_spot_action_serialize(
|
666
|
-
|
660
|
+
spot_trading_action=spot_trading_action,
|
667
661
|
_request_auth=_request_auth,
|
668
662
|
_content_type=_content_type,
|
669
663
|
_headers=_headers,
|
@@ -672,7 +666,6 @@ class TradingActionsApi:
|
|
672
666
|
|
673
667
|
_response_types_map: Dict[str, Optional[str]] = {
|
674
668
|
"200": "object",
|
675
|
-
"422": "HTTPValidationError",
|
676
669
|
}
|
677
670
|
response_data = await self.api_client.call_api(
|
678
671
|
*_param, _request_timeout=_request_timeout
|
@@ -686,7 +679,7 @@ class TradingActionsApi:
|
|
686
679
|
@validate_call
|
687
680
|
async def post_spot_action_without_preload_content(
|
688
681
|
self,
|
689
|
-
|
682
|
+
spot_trading_action: SpotTradingAction,
|
690
683
|
_request_timeout: Union[
|
691
684
|
None,
|
692
685
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -702,8 +695,8 @@ class TradingActionsApi:
|
|
702
695
|
"""Post Spot Action
|
703
696
|
|
704
697
|
|
705
|
-
:param
|
706
|
-
:type
|
698
|
+
:param spot_trading_action: (required)
|
699
|
+
:type spot_trading_action: SpotTradingAction
|
707
700
|
:param _request_timeout: timeout setting for this request. If one
|
708
701
|
number provided, it will be total request
|
709
702
|
timeout. It can also be a pair (tuple) of
|
@@ -727,7 +720,7 @@ class TradingActionsApi:
|
|
727
720
|
""" # noqa: E501
|
728
721
|
|
729
722
|
_param = self._post_spot_action_serialize(
|
730
|
-
|
723
|
+
spot_trading_action=spot_trading_action,
|
731
724
|
_request_auth=_request_auth,
|
732
725
|
_content_type=_content_type,
|
733
726
|
_headers=_headers,
|
@@ -736,7 +729,6 @@ class TradingActionsApi:
|
|
736
729
|
|
737
730
|
_response_types_map: Dict[str, Optional[str]] = {
|
738
731
|
"200": "object",
|
739
|
-
"422": "HTTPValidationError",
|
740
732
|
}
|
741
733
|
response_data = await self.api_client.call_api(
|
742
734
|
*_param, _request_timeout=_request_timeout
|
@@ -745,7 +737,7 @@ class TradingActionsApi:
|
|
745
737
|
|
746
738
|
def _post_spot_action_serialize(
|
747
739
|
self,
|
748
|
-
|
740
|
+
spot_trading_action,
|
749
741
|
_request_auth,
|
750
742
|
_content_type,
|
751
743
|
_headers,
|
@@ -770,8 +762,8 @@ class TradingActionsApi:
|
|
770
762
|
# process the header parameters
|
771
763
|
# process the form parameters
|
772
764
|
# process the body parameter
|
773
|
-
if
|
774
|
-
_body_params =
|
765
|
+
if spot_trading_action is not None:
|
766
|
+
_body_params = spot_trading_action
|
775
767
|
|
776
768
|
# set the HTTP header `Accept`
|
777
769
|
if "Accept" not in _header_params:
|
@@ -3,9 +3,9 @@
|
|
3
3
|
"""
|
4
4
|
Trading API
|
5
5
|
|
6
|
-
|
6
|
+
API for automated trading and exchange interface
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
10
|
|
11
11
|
Do not edit the class manually.
|
@@ -3,9 +3,9 @@
|
|
3
3
|
"""
|
4
4
|
Trading API
|
5
5
|
|
6
|
-
|
6
|
+
API for automated trading and exchange interface
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
10
|
|
11
11
|
Do not edit the class manually.
|
@@ -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
|
@@ -546,7 +546,7 @@ class Configuration:
|
|
546
546
|
"Python SDK Debug Report:\n"
|
547
547
|
"OS: {env}\n"
|
548
548
|
"Python Version: {pyversion}\n"
|
549
|
-
"Version of the API:
|
549
|
+
"Version of the API: 1.0.0\n"
|
550
550
|
"SDK Package Version: 1.0.0".format(env=sys.platform, pyversion=sys.version)
|
551
551
|
)
|
552
552
|
|
@@ -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
|
]
|
@@ -3,9 +3,9 @@
|
|
3
3
|
"""
|
4
4
|
Trading API
|
5
5
|
|
6
|
-
|
6
|
+
API for automated trading and exchange interface
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
10
|
|
11
11
|
Do not edit the class manually.
|
@@ -4,9 +4,9 @@
|
|
4
4
|
"""
|
5
5
|
Trading API
|
6
6
|
|
7
|
-
|
7
|
+
API for automated trading and exchange interface
|
8
8
|
|
9
|
-
The version of the OpenAPI document:
|
9
|
+
The version of the OpenAPI document: 1.0.0
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
12
12
|
Do not edit the class manually.
|
@@ -17,24 +17,19 @@ 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.
|
20
|
+
from crypticorn.trade.client.models.exception_detail import ExceptionDetail
|
21
21
|
from crypticorn.trade.client.models.exchange_key_model import ExchangeKeyModel
|
22
22
|
from crypticorn.trade.client.models.execution_ids import ExecutionIds
|
23
23
|
from crypticorn.trade.client.models.futures_balance import FuturesBalance
|
24
24
|
from crypticorn.trade.client.models.futures_trading_action import FuturesTradingAction
|
25
|
-
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
|
35
34
|
from crypticorn.trade.client.models.tpsl import TPSL
|
36
35
|
from crypticorn.trade.client.models.trading_action_type import TradingActionType
|
37
|
-
from crypticorn.trade.client.models.validation_error import ValidationError
|
38
|
-
from crypticorn.trade.client.models.validation_error_loc_inner import (
|
39
|
-
ValidationErrorLocInner,
|
40
|
-
)
|
@@ -3,9 +3,9 @@
|
|
3
3
|
"""
|
4
4
|
Trading API
|
5
5
|
|
6
|
-
|
6
|
+
API for automated trading and exchange interface
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
10
|
|
11
11
|
Do not edit the class manually.
|
@@ -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)"
|
@@ -3,9 +3,9 @@
|
|
3
3
|
"""
|
4
4
|
Trading API
|
5
5
|
|
6
|
-
|
6
|
+
API for automated trading and exchange interface
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
10
|
|
11
11
|
Do not edit the class manually.
|
@@ -3,9 +3,9 @@
|
|
3
3
|
"""
|
4
4
|
Trading API
|
5
5
|
|
6
|
-
|
6
|
+
API for automated trading and exchange interface
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
10
|
|
11
11
|
Do not edit the class manually.
|
crypticorn/{klines/client/models/error_response.py → trade/client/models/exception_detail.py}
RENAMED
@@ -1,9 +1,9 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
|
3
3
|
"""
|
4
|
-
|
4
|
+
Trading API
|
5
5
|
|
6
|
-
|
6
|
+
API for automated trading and exchange interface
|
7
7
|
|
8
8
|
The version of the OpenAPI document: 1.0.0
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
@@ -17,29 +17,30 @@ import pprint
|
|
17
17
|
import re # noqa: F401
|
18
18
|
import json
|
19
19
|
|
20
|
-
from
|
21
|
-
from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
22
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
23
22
|
from typing import Optional, Set
|
24
23
|
from typing_extensions import Self
|
25
24
|
|
26
25
|
|
27
|
-
class
|
26
|
+
class ExceptionDetail(BaseModel):
|
28
27
|
"""
|
29
|
-
|
28
|
+
This is the detail of the exception. It is used to enrich the exception with additional information by unwrapping the ApiError into its components.
|
30
29
|
""" # noqa: E501
|
31
30
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
31
|
+
message: Optional[StrictStr] = None
|
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")
|
35
|
+
status_code: StrictInt = Field(description="The HTTP status code")
|
36
|
+
details: Optional[Any] = None
|
37
37
|
__properties: ClassVar[List[str]] = [
|
38
|
-
"success",
|
39
38
|
"message",
|
40
|
-
"
|
39
|
+
"code",
|
40
|
+
"type",
|
41
|
+
"level",
|
42
|
+
"status_code",
|
41
43
|
"details",
|
42
|
-
"timestamp",
|
43
44
|
]
|
44
45
|
|
45
46
|
model_config = ConfigDict(
|
@@ -59,7 +60,7 @@ class ErrorResponse(BaseModel):
|
|
59
60
|
|
60
61
|
@classmethod
|
61
62
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
62
|
-
"""Create an instance of
|
63
|
+
"""Create an instance of ExceptionDetail from a JSON string"""
|
63
64
|
return cls.from_dict(json.loads(json_str))
|
64
65
|
|
65
66
|
def to_dict(self) -> Dict[str, Any]:
|
@@ -79,6 +80,11 @@ class ErrorResponse(BaseModel):
|
|
79
80
|
exclude=excluded_fields,
|
80
81
|
exclude_none=True,
|
81
82
|
)
|
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
|
+
|
82
88
|
# set to None if details (nullable) is None
|
83
89
|
# and model_fields_set contains the field
|
84
90
|
if self.details is None and "details" in self.model_fields_set:
|
@@ -88,7 +94,7 @@ class ErrorResponse(BaseModel):
|
|
88
94
|
|
89
95
|
@classmethod
|
90
96
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
91
|
-
"""Create an instance of
|
97
|
+
"""Create an instance of ExceptionDetail from a dict"""
|
92
98
|
if obj is None:
|
93
99
|
return None
|
94
100
|
|
@@ -97,13 +103,12 @@ class ErrorResponse(BaseModel):
|
|
97
103
|
|
98
104
|
_obj = cls.model_validate(
|
99
105
|
{
|
100
|
-
"success": (
|
101
|
-
obj.get("success") if obj.get("success") is not None else False
|
102
|
-
),
|
103
106
|
"message": obj.get("message"),
|
104
|
-
"
|
107
|
+
"code": obj.get("code"),
|
108
|
+
"type": obj.get("type"),
|
109
|
+
"level": obj.get("level"),
|
110
|
+
"status_code": obj.get("status_code"),
|
105
111
|
"details": obj.get("details"),
|
106
|
-
"timestamp": obj.get("timestamp"),
|
107
112
|
}
|
108
113
|
)
|
109
114
|
return _obj
|
@@ -3,9 +3,9 @@
|
|
3
3
|
"""
|
4
4
|
Trading API
|
5
5
|
|
6
|
-
|
6
|
+
API for automated trading and exchange interface
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
10
|
|
11
11
|
Do not edit the class manually.
|
@@ -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
|
)
|
@@ -3,9 +3,9 @@
|
|
3
3
|
"""
|
4
4
|
Trading API
|
5
5
|
|
6
|
-
|
6
|
+
API for automated trading and exchange interface
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
10
|
|
11
11
|
Do not edit the class manually.
|
@@ -3,9 +3,9 @@
|
|
3
3
|
"""
|
4
4
|
Trading API
|
5
5
|
|
6
|
-
|
6
|
+
API for automated trading and exchange interface
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
10
|
|
11
11
|
Do not edit the class manually.
|
@@ -3,9 +3,9 @@
|
|
3
3
|
"""
|
4
4
|
Trading API
|
5
5
|
|
6
|
-
|
6
|
+
API for automated trading and exchange interface
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
10
|
|
11
11
|
Do not edit the class manually.
|
@@ -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)"
|
@@ -3,9 +3,9 @@
|
|
3
3
|
"""
|
4
4
|
Trading API
|
5
5
|
|
6
|
-
|
6
|
+
API for automated trading and exchange interface
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
10
|
|
11
11
|
Do not edit the class manually.
|
@@ -3,9 +3,9 @@
|
|
3
3
|
"""
|
4
4
|
Trading API
|
5
5
|
|
6
|
-
|
6
|
+
API for automated trading and exchange interface
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
10
|
|
11
11
|
Do not edit the class manually.
|
@@ -3,9 +3,9 @@
|
|
3
3
|
"""
|
4
4
|
Trading API
|
5
5
|
|
6
|
-
|
6
|
+
API for automated trading and exchange interface
|
7
7
|
|
8
|
-
The version of the OpenAPI document:
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
10
|
|
11
11
|
Do not edit the class manually.
|
@@ -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:
|