crypticorn 2.4.7__py3-none-any.whl → 2.5.0__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 +7 -4
- crypticorn/common/__init__.py +1 -0
- crypticorn/common/auth.py +7 -3
- crypticorn/common/errors.py +21 -0
- crypticorn/common/exceptions.py +83 -0
- crypticorn/common/utils.py +11 -4
- crypticorn/klines/client/__init__.py +10 -3
- crypticorn/klines/client/api/__init__.py +1 -0
- crypticorn/klines/client/api/change_in_timeframe_api.py +331 -0
- crypticorn/klines/client/api/funding_rates_api.py +13 -13
- crypticorn/klines/client/api/health_check_api.py +8 -8
- crypticorn/klines/client/api/ohlcv_data_api.py +38 -26
- crypticorn/klines/client/api/symbols_api.py +26 -20
- crypticorn/klines/client/api/udf_api.py +229 -229
- crypticorn/klines/client/api_client.py +8 -5
- crypticorn/klines/client/configuration.py +80 -37
- crypticorn/klines/client/models/__init__.py +9 -3
- crypticorn/klines/client/models/base_response_list_change_in_timeframe_response.py +123 -0
- crypticorn/klines/client/models/change_in_timeframe_response.py +86 -0
- crypticorn/klines/client/models/market_type.py +35 -0
- crypticorn/klines/client/models/response_get_udf_history.py +198 -0
- crypticorn/klines/client/rest.py +111 -159
- crypticorn/klines/main.py +32 -22
- crypticorn/metrics/main.py +39 -40
- crypticorn/pay/client/__init__.py +0 -3
- crypticorn/pay/client/api/now_payments_api.py +1 -53
- crypticorn/pay/client/models/__init__.py +0 -3
- crypticorn/pay/client/models/payment.py +3 -3
- crypticorn/pay/client/models/scope.py +6 -1
- crypticorn/trade/client/__init__.py +8 -6
- crypticorn/trade/client/api/__init__.py +0 -1
- crypticorn/trade/client/api/api_keys_api.py +167 -273
- crypticorn/trade/client/api/bots_api.py +140 -226
- crypticorn/trade/client/api/exchanges_api.py +31 -51
- crypticorn/trade/client/api/futures_trading_panel_api.py +169 -272
- crypticorn/trade/client/api/notifications_api.py +200 -323
- crypticorn/trade/client/api/orders_api.py +40 -60
- crypticorn/trade/client/api/status_api.py +31 -49
- crypticorn/trade/client/api/strategies_api.py +137 -223
- crypticorn/trade/client/api/trading_actions_api.py +106 -170
- crypticorn/trade/client/api_client.py +111 -153
- crypticorn/trade/client/api_response.py +2 -3
- crypticorn/trade/client/configuration.py +128 -115
- crypticorn/trade/client/exceptions.py +25 -21
- crypticorn/trade/client/models/__init__.py +8 -6
- crypticorn/trade/client/models/action_model.py +108 -54
- crypticorn/trade/client/models/api_error_identifier.py +76 -72
- crypticorn/trade/client/models/api_error_level.py +9 -11
- crypticorn/trade/client/models/api_error_type.py +9 -11
- crypticorn/trade/client/models/bot_model.py +57 -36
- crypticorn/trade/client/models/bot_status.py +9 -11
- crypticorn/trade/client/models/exchange.py +7 -9
- crypticorn/trade/client/models/exchange_key_model.py +43 -32
- crypticorn/trade/client/models/execution_ids.py +18 -18
- crypticorn/trade/client/models/futures_balance.py +43 -27
- crypticorn/trade/client/models/futures_trading_action.py +102 -50
- crypticorn/trade/client/models/http_validation_error.py +19 -15
- crypticorn/trade/client/models/margin_mode.py +7 -9
- crypticorn/trade/client/models/market_type.py +7 -9
- crypticorn/trade/client/models/notification_model.py +52 -32
- crypticorn/trade/client/models/order_model.py +112 -72
- crypticorn/trade/client/models/order_status.py +10 -12
- crypticorn/trade/client/models/post_futures_action.py +20 -16
- crypticorn/trade/client/models/strategy_exchange_info.py +15 -16
- crypticorn/trade/client/models/strategy_model_input.py +61 -33
- crypticorn/trade/client/models/strategy_model_output.py +61 -33
- crypticorn/trade/client/models/tpsl.py +39 -25
- crypticorn/trade/client/models/trading_action_type.py +9 -11
- crypticorn/trade/client/models/validation_error.py +24 -18
- crypticorn/trade/client/models/validation_error_loc_inner.py +37 -16
- crypticorn/trade/client/rest.py +23 -38
- {crypticorn-2.4.7.dist-info → crypticorn-2.5.0.dist-info}/METADATA +1 -1
- {crypticorn-2.4.7.dist-info → crypticorn-2.5.0.dist-info}/RECORD +76 -70
- {crypticorn-2.4.7.dist-info → crypticorn-2.5.0.dist-info}/WHEEL +1 -1
- {crypticorn-2.4.7.dist-info → crypticorn-2.5.0.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.4.7.dist-info → crypticorn-2.5.0.dist-info}/top_level.txt +0 -0
@@ -16,13 +16,10 @@ 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 Field, StrictStr
|
20
19
|
from typing import Any
|
21
|
-
from typing_extensions import Annotated
|
22
20
|
from crypticorn.pay.client.models.now_api_status_res import NowAPIStatusRes
|
23
21
|
from crypticorn.pay.client.models.now_create_invoice_req import NowCreateInvoiceReq
|
24
22
|
from crypticorn.pay.client.models.now_create_invoice_res import NowCreateInvoiceRes
|
25
|
-
from crypticorn.pay.client.models.now_webhook_payload import NowWebhookPayload
|
26
23
|
|
27
24
|
from crypticorn.pay.client.api_client import ApiClient, RequestSerialized
|
28
25
|
from crypticorn.pay.client.api_response import ApiResponse
|
@@ -526,10 +523,6 @@ class NOWPaymentsApi:
|
|
526
523
|
@validate_call
|
527
524
|
async def handle_now_webhook(
|
528
525
|
self,
|
529
|
-
x_nowpayments_sig: Annotated[
|
530
|
-
StrictStr, Field(description="Signature for the webhook")
|
531
|
-
],
|
532
|
-
now_webhook_payload: NowWebhookPayload,
|
533
526
|
_request_timeout: Union[
|
534
527
|
None,
|
535
528
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -546,10 +539,6 @@ class NOWPaymentsApi:
|
|
546
539
|
|
547
540
|
Handle NOWPayments webhook notifications (IPN). Validates the signature, updates the payment status and creates a product subscription if the payment is successful.
|
548
541
|
|
549
|
-
:param x_nowpayments_sig: Signature for the webhook (required)
|
550
|
-
:type x_nowpayments_sig: str
|
551
|
-
:param now_webhook_payload: (required)
|
552
|
-
:type now_webhook_payload: NowWebhookPayload
|
553
542
|
:param _request_timeout: timeout setting for this request. If one
|
554
543
|
number provided, it will be total request
|
555
544
|
timeout. It can also be a pair (tuple) of
|
@@ -573,8 +562,6 @@ class NOWPaymentsApi:
|
|
573
562
|
""" # noqa: E501
|
574
563
|
|
575
564
|
_param = self._handle_now_webhook_serialize(
|
576
|
-
x_nowpayments_sig=x_nowpayments_sig,
|
577
|
-
now_webhook_payload=now_webhook_payload,
|
578
565
|
_request_auth=_request_auth,
|
579
566
|
_content_type=_content_type,
|
580
567
|
_headers=_headers,
|
@@ -583,7 +570,6 @@ class NOWPaymentsApi:
|
|
583
570
|
|
584
571
|
_response_types_map: Dict[str, Optional[str]] = {
|
585
572
|
"200": "object",
|
586
|
-
"422": "HTTPValidationError",
|
587
573
|
}
|
588
574
|
response_data = await self.api_client.call_api(
|
589
575
|
*_param, _request_timeout=_request_timeout
|
@@ -597,10 +583,6 @@ class NOWPaymentsApi:
|
|
597
583
|
@validate_call
|
598
584
|
async def handle_now_webhook_with_http_info(
|
599
585
|
self,
|
600
|
-
x_nowpayments_sig: Annotated[
|
601
|
-
StrictStr, Field(description="Signature for the webhook")
|
602
|
-
],
|
603
|
-
now_webhook_payload: NowWebhookPayload,
|
604
586
|
_request_timeout: Union[
|
605
587
|
None,
|
606
588
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -617,10 +599,6 @@ class NOWPaymentsApi:
|
|
617
599
|
|
618
600
|
Handle NOWPayments webhook notifications (IPN). Validates the signature, updates the payment status and creates a product subscription if the payment is successful.
|
619
601
|
|
620
|
-
:param x_nowpayments_sig: Signature for the webhook (required)
|
621
|
-
:type x_nowpayments_sig: str
|
622
|
-
:param now_webhook_payload: (required)
|
623
|
-
:type now_webhook_payload: NowWebhookPayload
|
624
602
|
:param _request_timeout: timeout setting for this request. If one
|
625
603
|
number provided, it will be total request
|
626
604
|
timeout. It can also be a pair (tuple) of
|
@@ -644,8 +622,6 @@ class NOWPaymentsApi:
|
|
644
622
|
""" # noqa: E501
|
645
623
|
|
646
624
|
_param = self._handle_now_webhook_serialize(
|
647
|
-
x_nowpayments_sig=x_nowpayments_sig,
|
648
|
-
now_webhook_payload=now_webhook_payload,
|
649
625
|
_request_auth=_request_auth,
|
650
626
|
_content_type=_content_type,
|
651
627
|
_headers=_headers,
|
@@ -654,7 +630,6 @@ class NOWPaymentsApi:
|
|
654
630
|
|
655
631
|
_response_types_map: Dict[str, Optional[str]] = {
|
656
632
|
"200": "object",
|
657
|
-
"422": "HTTPValidationError",
|
658
633
|
}
|
659
634
|
response_data = await self.api_client.call_api(
|
660
635
|
*_param, _request_timeout=_request_timeout
|
@@ -668,10 +643,6 @@ class NOWPaymentsApi:
|
|
668
643
|
@validate_call
|
669
644
|
async def handle_now_webhook_without_preload_content(
|
670
645
|
self,
|
671
|
-
x_nowpayments_sig: Annotated[
|
672
|
-
StrictStr, Field(description="Signature for the webhook")
|
673
|
-
],
|
674
|
-
now_webhook_payload: NowWebhookPayload,
|
675
646
|
_request_timeout: Union[
|
676
647
|
None,
|
677
648
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -688,10 +659,6 @@ class NOWPaymentsApi:
|
|
688
659
|
|
689
660
|
Handle NOWPayments webhook notifications (IPN). Validates the signature, updates the payment status and creates a product subscription if the payment is successful.
|
690
661
|
|
691
|
-
:param x_nowpayments_sig: Signature for the webhook (required)
|
692
|
-
:type x_nowpayments_sig: str
|
693
|
-
:param now_webhook_payload: (required)
|
694
|
-
:type now_webhook_payload: NowWebhookPayload
|
695
662
|
:param _request_timeout: timeout setting for this request. If one
|
696
663
|
number provided, it will be total request
|
697
664
|
timeout. It can also be a pair (tuple) of
|
@@ -715,8 +682,6 @@ class NOWPaymentsApi:
|
|
715
682
|
""" # noqa: E501
|
716
683
|
|
717
684
|
_param = self._handle_now_webhook_serialize(
|
718
|
-
x_nowpayments_sig=x_nowpayments_sig,
|
719
|
-
now_webhook_payload=now_webhook_payload,
|
720
685
|
_request_auth=_request_auth,
|
721
686
|
_content_type=_content_type,
|
722
687
|
_headers=_headers,
|
@@ -725,7 +690,6 @@ class NOWPaymentsApi:
|
|
725
690
|
|
726
691
|
_response_types_map: Dict[str, Optional[str]] = {
|
727
692
|
"200": "object",
|
728
|
-
"422": "HTTPValidationError",
|
729
693
|
}
|
730
694
|
response_data = await self.api_client.call_api(
|
731
695
|
*_param, _request_timeout=_request_timeout
|
@@ -734,8 +698,6 @@ class NOWPaymentsApi:
|
|
734
698
|
|
735
699
|
def _handle_now_webhook_serialize(
|
736
700
|
self,
|
737
|
-
x_nowpayments_sig,
|
738
|
-
now_webhook_payload,
|
739
701
|
_request_auth,
|
740
702
|
_content_type,
|
741
703
|
_headers,
|
@@ -758,12 +720,8 @@ class NOWPaymentsApi:
|
|
758
720
|
# process the path parameters
|
759
721
|
# process the query parameters
|
760
722
|
# process the header parameters
|
761
|
-
if x_nowpayments_sig is not None:
|
762
|
-
_header_params["x-nowpayments-sig"] = x_nowpayments_sig
|
763
723
|
# process the form parameters
|
764
724
|
# process the body parameter
|
765
|
-
if now_webhook_payload is not None:
|
766
|
-
_body_params = now_webhook_payload
|
767
725
|
|
768
726
|
# set the HTTP header `Accept`
|
769
727
|
if "Accept" not in _header_params:
|
@@ -771,18 +729,8 @@ class NOWPaymentsApi:
|
|
771
729
|
["application/json"]
|
772
730
|
)
|
773
731
|
|
774
|
-
# set the HTTP header `Content-Type`
|
775
|
-
if _content_type:
|
776
|
-
_header_params["Content-Type"] = _content_type
|
777
|
-
else:
|
778
|
-
_default_content_type = self.api_client.select_header_content_type(
|
779
|
-
["application/json"]
|
780
|
-
)
|
781
|
-
if _default_content_type is not None:
|
782
|
-
_header_params["Content-Type"] = _default_content_type
|
783
|
-
|
784
732
|
# authentication setting
|
785
|
-
_auth_settings: List[str] = [
|
733
|
+
_auth_settings: List[str] = []
|
786
734
|
|
787
735
|
return self.api_client.param_serialize(
|
788
736
|
method="POST",
|
@@ -18,9 +18,6 @@ from crypticorn.pay.client.models.http_validation_error import HTTPValidationErr
|
|
18
18
|
from crypticorn.pay.client.models.now_api_status_res import NowAPIStatusRes
|
19
19
|
from crypticorn.pay.client.models.now_create_invoice_req import NowCreateInvoiceReq
|
20
20
|
from crypticorn.pay.client.models.now_create_invoice_res import NowCreateInvoiceRes
|
21
|
-
from crypticorn.pay.client.models.now_fee_structure import NowFeeStructure
|
22
|
-
from crypticorn.pay.client.models.now_payment_status import NowPaymentStatus
|
23
|
-
from crypticorn.pay.client.models.now_webhook_payload import NowWebhookPayload
|
24
21
|
from crypticorn.pay.client.models.payment import Payment
|
25
22
|
from crypticorn.pay.client.models.payment_status import PaymentStatus
|
26
23
|
from crypticorn.pay.client.models.product_create import ProductCreate
|
@@ -32,7 +32,7 @@ class Payment(BaseModel):
|
|
32
32
|
|
33
33
|
id: StrictStr = Field(description="Payment ID")
|
34
34
|
product_id: StrictStr = Field(description="Product ID")
|
35
|
-
|
35
|
+
timestamp: StrictInt = Field(description="Payment timestamp in seconds")
|
36
36
|
amount: Union[StrictFloat, StrictInt] = Field(description="Payment amount")
|
37
37
|
currency: StrictStr = Field(description="Payment currency")
|
38
38
|
status: PaymentStatus
|
@@ -41,7 +41,7 @@ class Payment(BaseModel):
|
|
41
41
|
__properties: ClassVar[List[str]] = [
|
42
42
|
"id",
|
43
43
|
"product_id",
|
44
|
-
"
|
44
|
+
"timestamp",
|
45
45
|
"amount",
|
46
46
|
"currency",
|
47
47
|
"status",
|
@@ -101,7 +101,7 @@ class Payment(BaseModel):
|
|
101
101
|
{
|
102
102
|
"id": obj.get("id"),
|
103
103
|
"product_id": obj.get("product_id"),
|
104
|
-
"
|
104
|
+
"timestamp": obj.get("timestamp"),
|
105
105
|
"amount": obj.get("amount"),
|
106
106
|
"currency": obj.get("currency"),
|
107
107
|
"status": obj.get("status"),
|
@@ -26,6 +26,7 @@ class Scope(str, Enum):
|
|
26
26
|
"""
|
27
27
|
allowed enum values
|
28
28
|
"""
|
29
|
+
READ_COLON_PREDICTIONS = "read:predictions"
|
29
30
|
READ_COLON_HIVE_COLON_MODEL = "read:hive:model"
|
30
31
|
READ_COLON_HIVE_COLON_DATA = "read:hive:data"
|
31
32
|
WRITE_COLON_HIVE_COLON_MODEL = "write:hive:model"
|
@@ -48,7 +49,11 @@ class Scope(str, Enum):
|
|
48
49
|
WRITE_COLON_PAY_COLON_PRODUCTS = "write:pay:products"
|
49
50
|
READ_COLON_PAY_COLON_NOW = "read:pay:now"
|
50
51
|
WRITE_COLON_PAY_COLON_NOW = "write:pay:now"
|
51
|
-
|
52
|
+
READ_COLON_METRICS_COLON_MARKETCAP = "read:metrics:marketcap"
|
53
|
+
READ_COLON_METRICS_COLON_INDICATORS = "read:metrics:indicators"
|
54
|
+
READ_COLON_METRICS_COLON_EXCHANGES = "read:metrics:exchanges"
|
55
|
+
READ_COLON_METRICS_COLON_TOKENS = "read:metrics:tokens"
|
56
|
+
READ_COLON_METRICS_COLON_MARKETS = "read:metrics:markets"
|
52
57
|
|
53
58
|
@classmethod
|
54
59
|
def from_json(cls, json_str: str) -> Self:
|
@@ -3,14 +3,14 @@
|
|
3
3
|
# flake8: noqa
|
4
4
|
|
5
5
|
"""
|
6
|
-
|
6
|
+
Trading API
|
7
7
|
|
8
|
-
|
8
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
9
9
|
|
10
|
-
|
11
|
-
|
10
|
+
The version of the OpenAPI document: 0.1.0
|
11
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
12
12
|
|
13
|
-
|
13
|
+
Do not edit the class manually.
|
14
14
|
""" # noqa: E501
|
15
15
|
|
16
16
|
|
@@ -63,4 +63,6 @@ from crypticorn.trade.client.models.strategy_model_output import StrategyModelOu
|
|
63
63
|
from crypticorn.trade.client.models.tpsl import TPSL
|
64
64
|
from crypticorn.trade.client.models.trading_action_type import TradingActionType
|
65
65
|
from crypticorn.trade.client.models.validation_error import ValidationError
|
66
|
-
from crypticorn.trade.client.models.validation_error_loc_inner import
|
66
|
+
from crypticorn.trade.client.models.validation_error_loc_inner import (
|
67
|
+
ValidationErrorLocInner,
|
68
|
+
)
|
@@ -10,4 +10,3 @@ from crypticorn.trade.client.api.orders_api import OrdersApi
|
|
10
10
|
from crypticorn.trade.client.api.status_api import StatusApi
|
11
11
|
from crypticorn.trade.client.api.strategies_api import StrategiesApi
|
12
12
|
from crypticorn.trade.client.api.trading_actions_api import TradingActionsApi
|
13
|
-
|