crypticorn 2.7.2__py3-none-any.whl → 2.7.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.
@@ -93,7 +93,7 @@ async def general_handler(request: Request, exc: Exception):
93
93
  """This is the default exception handler for all exceptions."""
94
94
  body = ExceptionContent(message=str(exc), error=ApiError.UNKNOWN_ERROR)
95
95
  return JSONResponse(
96
- status_code=body.error.status_code, content=HTTPException(content=body).detail
96
+ status_code=body.enrich().status_code, content=HTTPException(content=body).detail
97
97
  )
98
98
 
99
99
 
@@ -101,7 +101,7 @@ async def request_validation_handler(request: Request, exc: RequestValidationErr
101
101
  """This is the exception handler for all request validation errors."""
102
102
  body = ExceptionContent(message=str(exc), error=ApiError.INVALID_DATA_REQUEST)
103
103
  return JSONResponse(
104
- status_code=body.error.status_code, content=HTTPException(content=body).detail
104
+ status_code=body.enrich().status_code, content=HTTPException(content=body).detail
105
105
  )
106
106
 
107
107
 
@@ -109,7 +109,7 @@ async def response_validation_handler(request: Request, exc: ResponseValidationE
109
109
  """This is the exception handler for all response validation errors."""
110
110
  body = ExceptionContent(message=str(exc), error=ApiError.INVALID_DATA_RESPONSE)
111
111
  return JSONResponse(
112
- status_code=body.error.status_code, content=HTTPException(content=body).detail
112
+ status_code=body.enrich().status_code, content=HTTPException(content=body).detail
113
113
  )
114
114
 
115
115
 
crypticorn/klines/main.py CHANGED
@@ -10,6 +10,7 @@ from crypticorn.klines import (
10
10
  )
11
11
  from crypticorn.common import optional_import
12
12
 
13
+
13
14
  class KlinesClient:
14
15
  """
15
16
  A client for interacting with the Crypticorn Klines API.
@@ -30,6 +31,7 @@ class KlinesClient:
30
31
  self.udf = UDFApi(self.base_client)
31
32
  self.status = StatusApi(self.base_client)
32
33
 
34
+
33
35
  class FundingRatesApiWrapper(FundingRatesApi):
34
36
  """
35
37
  A wrapper for the FundingRatesApi class.
@@ -51,6 +53,7 @@ class FundingRatesApiWrapper(FundingRatesApi):
51
53
  ]
52
54
  return pd.DataFrame(response)
53
55
 
56
+
54
57
  class OHLCVDataApiWrapper(OHLCVDataApi):
55
58
  """
56
59
  A wrapper for the OHLCVDataApi class.
@@ -89,5 +92,3 @@ class SymbolsApiWrapper(SymbolsApi):
89
92
  pd = optional_import("pandas", "extra")
90
93
  response = await self.get_klines_symbols(*args, **kwargs)
91
94
  return pd.DataFrame(response, columns=["symbol"])
92
-
93
-
@@ -43,5 +43,5 @@ from crypticorn.pay.client.models.product_create import ProductCreate
43
43
  from crypticorn.pay.client.models.product_read import ProductRead
44
44
  from crypticorn.pay.client.models.product_sub_read import ProductSubRead
45
45
  from crypticorn.pay.client.models.product_update import ProductUpdate
46
+ from crypticorn.pay.client.models.provider import Provider
46
47
  from crypticorn.pay.client.models.scope import Scope
47
- from crypticorn.pay.client.models.services import Services
@@ -23,5 +23,5 @@ from crypticorn.pay.client.models.product_create import ProductCreate
23
23
  from crypticorn.pay.client.models.product_read import ProductRead
24
24
  from crypticorn.pay.client.models.product_sub_read import ProductSubRead
25
25
  from crypticorn.pay.client.models.product_update import ProductUpdate
26
+ from crypticorn.pay.client.models.provider import Provider
26
27
  from crypticorn.pay.client.models.scope import Scope
27
- from crypticorn.pay.client.models.services import Services
@@ -20,7 +20,7 @@ import json
20
20
  from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
21
21
  from typing import Any, ClassVar, Dict, List, Union
22
22
  from crypticorn.pay.client.models.payment_status import PaymentStatus
23
- from crypticorn.pay.client.models.services import Services
23
+ from crypticorn.pay.client.models.provider import Provider
24
24
  from typing import Optional, Set
25
25
  from typing_extensions import Self
26
26
 
@@ -36,7 +36,7 @@ class Payment(BaseModel):
36
36
  amount: Union[StrictFloat, StrictInt] = Field(description="Payment amount")
37
37
  currency: StrictStr = Field(description="Payment currency")
38
38
  status: PaymentStatus
39
- service: Services = Field(description="Payment service")
39
+ provider: Provider = Field(description="Payment provider")
40
40
  market: StrictStr = Field(description="Payment market")
41
41
  __properties: ClassVar[List[str]] = [
42
42
  "id",
@@ -45,7 +45,7 @@ class Payment(BaseModel):
45
45
  "amount",
46
46
  "currency",
47
47
  "status",
48
- "service",
48
+ "provider",
49
49
  "market",
50
50
  ]
51
51
 
@@ -105,7 +105,7 @@ class Payment(BaseModel):
105
105
  "amount": obj.get("amount"),
106
106
  "currency": obj.get("currency"),
107
107
  "status": obj.get("status"),
108
- "service": obj.get("service"),
108
+ "provider": obj.get("provider"),
109
109
  "market": obj.get("market"),
110
110
  }
111
111
  )
@@ -18,9 +18,9 @@ from enum import Enum
18
18
  from typing_extensions import Self
19
19
 
20
20
 
21
- class Services(str, Enum):
21
+ class Provider(str, Enum):
22
22
  """
23
- Available payment services
23
+ Available payment providers
24
24
  """
25
25
 
26
26
  """
@@ -30,5 +30,5 @@ class Services(str, Enum):
30
30
 
31
31
  @classmethod
32
32
  def from_json(cls, json_str: str) -> Self:
33
- """Create an instance of Services from a JSON string"""
33
+ """Create an instance of Provider from a JSON string"""
34
34
  return cls(json.loads(json_str))
@@ -54,6 +54,7 @@ class Scope(str, Enum):
54
54
  READ_COLON_METRICS_COLON_EXCHANGES = "read:metrics:exchanges"
55
55
  READ_COLON_METRICS_COLON_TOKENS = "read:metrics:tokens"
56
56
  READ_COLON_METRICS_COLON_MARKETS = "read:metrics:markets"
57
+ READ_COLON_SENTIMENT = "read:sentiment"
57
58
 
58
59
  @classmethod
59
60
  def from_json(cls, json_str: str) -> Self:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: crypticorn
3
- Version: 2.7.2
3
+ Version: 2.7.3
4
4
  Summary: Maximise Your Crypto Trading Profits with Machine Learning
5
5
  Author-email: Crypticorn <timon@crypticorn.com>
6
6
  Project-URL: Homepage, https://crypticorn.com
@@ -65,7 +65,7 @@ crypticorn/common/auth.py,sha256=60SRXlW72VJO8rGzCiemWmzGu8tXDqWr0wt9EM6p8aI,863
65
65
  crypticorn/common/decorators.py,sha256=pmnGYCIrLv59wZkDbvPyK9NJmgPJWW74LXTdIWSjOkY,1063
66
66
  crypticorn/common/enums.py,sha256=RitDVqlG_HTe6tHT6bWusZNFCeYk1eQvJVH-7x3_Zlg,668
67
67
  crypticorn/common/errors.py,sha256=K1VSEKZro1I4cmi-sOhx24pTrvhbbD4RBRRqKodWpA8,27851
68
- crypticorn/common/exceptions.py,sha256=Rrpk2ORou2F__cNUWmXs6tFZwIFBZppF4YapUSZLfOQ,5662
68
+ crypticorn/common/exceptions.py,sha256=2gsYU0AMiLga4D99PBprQX59k12jJJMlUZ0uEk9rQxs,5671
69
69
  crypticorn/common/mixins.py,sha256=LKPcNTR8uREeDGWTlWozNx7rS1mYdQVx1RllLhxIAsE,1640
70
70
  crypticorn/common/pagination.py,sha256=c07jrMNrBaNTmgx4sppdP7ND4RNT7NBqBXWvofazIlE,2251
71
71
  crypticorn/common/scopes.py,sha256=gbxrzME18ASQS18IHg96TvFZxh5-O8ffD2caGpfs0lc,2333
@@ -106,7 +106,7 @@ crypticorn/hive/client/models/target.py,sha256=otOJK8s5WVUen6J1AQZpRiD330RIpaJU6
106
106
  crypticorn/hive/client/models/target_info.py,sha256=hFaOMZlirH2B68DQstL_c4WvtejwXyOk67lxIaeuh3Q,2857
107
107
  crypticorn/hive/client/models/target_type.py,sha256=FUMaEFkPM7EvStPJE1auimDJ9mxDf6pbsFf-dF3coGw,684
108
108
  crypticorn/klines/__init__.py,sha256=9UUW013uZ5x4evz5zRUxbNid-6O9WAPPYvPZIHpAwms,87
109
- crypticorn/klines/main.py,sha256=gLbd-taZhyHLV20CT2CFQr-ucM0oESx9QtqoYTe-G4U,2788
109
+ crypticorn/klines/main.py,sha256=yJJn4UCsAzokuI7aSwuQ4pvDN1twCrsarqSfWp7RjGs,2789
110
110
  crypticorn/klines/client/__init__.py,sha256=YLtas-sCXyq543ujKIWIT73qfQ1D97stsztr1AWjhSc,2222
111
111
  crypticorn/klines/client/api_client.py,sha256=XYk_eoVRHxQDoTKJJwMpO__LbU1DQtpMikBTyulJrvE,26925
112
112
  crypticorn/klines/client/api_response.py,sha256=WhxwYDSMm6wPixp9CegO8dJzjFxDz3JF1yCq9s0ZqKE,639
@@ -158,7 +158,7 @@ crypticorn/metrics/client/models/time_interval.py,sha256=8bHhMNt56xVGvJi5xNFMrAk
158
158
  crypticorn/metrics/client/models/trading_status.py,sha256=_S-KAyuCJsLLY0UTcNKkhLWoPJS-ywf7y3yTdhIuF0w,746
159
159
  crypticorn/pay/__init__.py,sha256=ux-B-YbNetpTlZTb2fijuGUOEmSm4IB0fYtieGnVDBg,78
160
160
  crypticorn/pay/main.py,sha256=-e0YvDBe73b2hRkAh65hFmGdqjsaQcXTHtLyXlM_YM0,635
161
- crypticorn/pay/client/__init__.py,sha256=yQNTTvME58c4yP0GeYso18Vmp5WFgI_hF3nfG-j-pog,1920
161
+ crypticorn/pay/client/__init__.py,sha256=D3z0IMntxJ8rvoNLCycAZHTTfirtpiOZgD9wJ3TQ-ok,1920
162
162
  crypticorn/pay/client/api_client.py,sha256=HjmMJeQ4hcDNWm5I9LEQtZEGD1hPeyQU2y_SLmgD9mE,26870
163
163
  crypticorn/pay/client/api_response.py,sha256=WhxwYDSMm6wPixp9CegO8dJzjFxDz3JF1yCq9s0ZqKE,639
164
164
  crypticorn/pay/client/configuration.py,sha256=-PRnl7AEOWSGACFOzIF42EMTZ8iGluXwhZvqAhSRXPI,19110
@@ -170,18 +170,18 @@ crypticorn/pay/client/api/now_payments_api.py,sha256=3BouXcha-xARDX6_soa5egqRszE
170
170
  crypticorn/pay/client/api/payments_api.py,sha256=XlCNkD6s_6nH8fktneoqMq4ZTHB9YkotVqX_edy614o,33820
171
171
  crypticorn/pay/client/api/products_api.py,sha256=zh8y_3YgpCUZT7wAGAR7lDheR98y53YGJHwOU6VJQjw,33586
172
172
  crypticorn/pay/client/api/status_api.py,sha256=iv78XeKV11rKNIszd0mmp5e9gL0sivjhipxkMQ52C6o,28718
173
- crypticorn/pay/client/models/__init__.py,sha256=9oOXl7NGOQykvucMofo5y3C7pH1Ee9ATpGE3FWT99Yg,1058
173
+ crypticorn/pay/client/models/__init__.py,sha256=BiTv22k13pM4VzR0de6TR8k4j-kuuWRDGT58E6GzMHw,1058
174
174
  crypticorn/pay/client/models/exception_detail.py,sha256=RKqu-lNMwpLu_lcLJe5WmSFCcsaHFKCDS8uCcpcd6L8,3664
175
175
  crypticorn/pay/client/models/now_create_invoice_req.py,sha256=9MKrW4ETKdQLFuGUXcyqUwFkQ_4utWrhGvLzUxOoFws,6644
176
176
  crypticorn/pay/client/models/now_create_invoice_res.py,sha256=zsdEAJjyZCmZdaag6Jr6XdLJIKZkOrx03K8t0IY7aTU,6957
177
- crypticorn/pay/client/models/payment.py,sha256=4cp0FJ9EYGcUXkUA7127syiSG_OR6_yg6tmE3XQNx8w,3538
177
+ crypticorn/pay/client/models/payment.py,sha256=SxHoHZ4AKWPk0r_1oeiP-7Vz5RdN9ow02cfZM0XKHdA,3543
178
178
  crypticorn/pay/client/models/payment_status.py,sha256=S3-Xnvumq-c0aNkx3HzfsxglTf6E1-5HgjJTHX_d9QE,823
179
179
  crypticorn/pay/client/models/product_create.py,sha256=lY_7nOdUrKwZwEr22MnXk-28Hk7ZeeTlnDJMl9kMf9g,3543
180
180
  crypticorn/pay/client/models/product_read.py,sha256=H2DQJNlO7fpL8R5KScprmn0-23orEazK2skr7c-KBHk,3647
181
181
  crypticorn/pay/client/models/product_sub_read.py,sha256=5B0W9-tEypWUpmjUyvuaT_bgVq5wRsDcK-rWQDdU3wY,3156
182
182
  crypticorn/pay/client/models/product_update.py,sha256=dM27vbcHRgtu3YrFgux3ufg8QMN5ta6OnGGRIe8Wrjk,4441
183
- crypticorn/pay/client/models/scope.py,sha256=6XPD2CEFqTw-J8FadRBmiuHUprUgIx4T4HBhPQbX2GI,2301
184
- crypticorn/pay/client/models/services.py,sha256=xN6qNVzXfoHz585HTAD3s7dCb4wA_w7skj8MH65ov3w,655
183
+ crypticorn/pay/client/models/provider.py,sha256=w2gJkEoTBnW-VluQ3AYLouWelszdf8Y4LnAVkWJUkTQ,656
184
+ crypticorn/pay/client/models/scope.py,sha256=4TwV_i3LtE1KxHSChzDzGYHxYwu_QzK90xx4SHBn_ZE,2345
185
185
  crypticorn/trade/__init__.py,sha256=QzScH9n-ly3QSaBSpPP7EqYwhdzDqYCZJs0-AhEhrsY,84
186
186
  crypticorn/trade/main.py,sha256=h-lh8ESY0E5lKB5bg-D41TPxiNND8g4pFAd7updpd0Y,1074
187
187
  crypticorn/trade/client/__init__.py,sha256=-KjY8hKc4WdMIJhPYtpG23d8QO7clLAcPlq8zrLvH9k,2951
@@ -221,8 +221,8 @@ crypticorn/trade/client/models/strategy_model_input.py,sha256=ala19jARyfA5ysys5D
221
221
  crypticorn/trade/client/models/strategy_model_output.py,sha256=2o2lhbgUSTznowpMLEHF1Ex9TG9oRmzlCIb-gXqo7_s,5643
222
222
  crypticorn/trade/client/models/tpsl.py,sha256=C2KgTIZs-a8W4msdaXgBKJcwtA-o5wR4rBauRP-iQxU,4317
223
223
  crypticorn/trade/client/models/trading_action_type.py,sha256=pGq_TFLMPfYFizYP-xKgEC1ZF4U3lGdJYoGa_ZH2x-Q,769
224
- crypticorn-2.7.2.dist-info/METADATA,sha256=rrRjVB2iZbzO8D4Z_k_1HL474oAKSYCNnE0ad3ixFn8,6249
225
- crypticorn-2.7.2.dist-info/WHEEL,sha256=GHB6lJx2juba1wDgXDNlMTyM13ckjBMKf-OnwgKOCtA,91
226
- crypticorn-2.7.2.dist-info/entry_points.txt,sha256=d_xHsGvUTebPveVUK0SrpDFQ5ZRSjlI7lNCc11sn2PM,59
227
- crypticorn-2.7.2.dist-info/top_level.txt,sha256=EP3NY216qIBYfmvGl0L2Zc9ItP0DjGSkiYqd9xJwGcM,11
228
- crypticorn-2.7.2.dist-info/RECORD,,
224
+ crypticorn-2.7.3.dist-info/METADATA,sha256=t3vla6kYBXY_bkb-HZrZN5EOagTwHt7KLRYcgCFHc50,6249
225
+ crypticorn-2.7.3.dist-info/WHEEL,sha256=GHB6lJx2juba1wDgXDNlMTyM13ckjBMKf-OnwgKOCtA,91
226
+ crypticorn-2.7.3.dist-info/entry_points.txt,sha256=d_xHsGvUTebPveVUK0SrpDFQ5ZRSjlI7lNCc11sn2PM,59
227
+ crypticorn-2.7.3.dist-info/top_level.txt,sha256=EP3NY216qIBYfmvGl0L2Zc9ItP0DjGSkiYqd9xJwGcM,11
228
+ crypticorn-2.7.3.dist-info/RECORD,,