crypticorn 2.7.3__py3-none-any.whl → 2.7.4__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.
@@ -0,0 +1,33 @@
1
+ FROM python:3.11.5
2
+
3
+ # This line is used to allow the cache to be busted (only busts in CI)
4
+ ARG CACHEBUST=1
5
+ COPY ./requirements.txt /code/requirements.txt
6
+
7
+ WORKDIR /code
8
+ # set API_ENV in .env
9
+ # API_ENV=local
10
+ # add to compose file
11
+ # build:
12
+ # context: .
13
+ # dockerfile: src/api/Dockerfile
14
+ # args:
15
+ # - API_ENV=${API_ENV}
16
+ # environment:
17
+ # - API_ENV=${API_ENV}
18
+ #
19
+ # and to the workflow:
20
+ # env:
21
+ # API_ENV: ${{ github.ref == 'refs/heads/main' && 'prod' || 'dev' }}
22
+ ARG API_ENV
23
+
24
+ RUN pip install --no-cache-dir -r requirements.txt
25
+
26
+ RUN if [ "$API_ENV" != "prod" ]; then \
27
+ pip install --pre crypticorn; \
28
+ fi
29
+
30
+
31
+ COPY ./src /code/src
32
+
33
+ CMD ["uvicorn", "src.api.main:app", "--host", "0.0.0.0", "--port", "3000"]
@@ -0,0 +1,26 @@
1
+ # Please see the documentation for all configuration options:
2
+ # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
3
+
4
+ version: 2
5
+ updates:
6
+ - package-ecosystem: "pip"
7
+ directory: "/" # root folder, or change if your requirements.txt is elsewhere
8
+ schedule:
9
+ interval: "weekly" # options: "daily", "weekly", "monthly"
10
+ open-pull-requests-limit: 3
11
+ labels:
12
+ - "dependencies"
13
+ rebase-strategy: "auto" # will rebase PRs if needed
14
+ ignore:
15
+ - dependency-name: "*"
16
+ update-types: ["version-update:semver-major"] # avoids risky major bumps
17
+ commit-message:
18
+ prefix: "deps"
19
+ target-branch: "dev" # ! merge to main after pr is merged
20
+ groups:
21
+ pip-dependencies:
22
+ patterns:
23
+ - "*"
24
+ update-types:
25
+ - "minor"
26
+ - "patch"
@@ -0,0 +1,12 @@
1
+ # https://docs.astral.sh/ruff/integrations/#github-actions
2
+ name: Ruff
3
+ on: [ push, pull_request ]
4
+ jobs:
5
+ ruff:
6
+ runs-on: ubuntu-latest
7
+ steps:
8
+ - uses: actions/checkout@v4
9
+ - uses: astral-sh/ruff-action@v3
10
+ with:
11
+ args: check --ignore E402 --output-format=github .
12
+ src: "./src"
@@ -264,11 +264,6 @@ class ApiError(ExcludeEnumMixin, Enum, metaclass=ApiErrorFallback):
264
264
  ApiErrorType.USER_ERROR,
265
265
  ApiErrorLevel.ERROR,
266
266
  )
267
- INVALID_MODEL_NAME = (
268
- ApiErrorIdentifier.INVALID_MODEL_NAME,
269
- ApiErrorType.USER_ERROR,
270
- ApiErrorLevel.ERROR,
271
- )
272
267
  INSUFFICIENT_SCOPES = (
273
268
  ApiErrorIdentifier.INSUFFICIENT_SCOPES,
274
269
  ApiErrorType.USER_ERROR,
@@ -304,6 +299,11 @@ class ApiError(ExcludeEnumMixin, Enum, metaclass=ApiErrorFallback):
304
299
  ApiErrorType.SERVER_ERROR,
305
300
  ApiErrorLevel.ERROR,
306
301
  )
302
+ INVALID_MODEL_NAME = (
303
+ ApiErrorIdentifier.INVALID_MODEL_NAME,
304
+ ApiErrorType.USER_ERROR,
305
+ ApiErrorLevel.ERROR,
306
+ )
307
307
  INVALID_PARAMETER = (
308
308
  ApiErrorIdentifier.INVALID_PARAMETER,
309
309
  ApiErrorType.SERVER_ERROR,
@@ -1,8 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: crypticorn
3
- Version: 2.7.3
3
+ Version: 2.7.4
4
4
  Summary: Maximise Your Crypto Trading Profits with Machine Learning
5
5
  Author-email: Crypticorn <timon@crypticorn.com>
6
+ License: MIT
6
7
  Project-URL: Homepage, https://crypticorn.com
7
8
  Keywords: machine learning,data science,crypto,modelling
8
9
  Classifier: Topic :: Scientific/Engineering
@@ -24,6 +25,8 @@ Requires-Dist: typing-extensions<5.0.0,>=4.7.1
24
25
  Requires-Dist: requests<3.0.0,>=2.32.0
25
26
  Requires-Dist: tqdm<5.0.0,>=4.67.0
26
27
  Provides-Extra: dev
28
+ Requires-Dist: build; extra == "dev"
29
+ Requires-Dist: twine; extra == "dev"
27
30
  Requires-Dist: streamlit; extra == "dev"
28
31
  Requires-Dist: httpx; extra == "dev"
29
32
  Requires-Dist: black; extra == "dev"
@@ -40,17 +43,12 @@ Requires-Dist: PyJWT==2.10.0; extra == "test"
40
43
  Provides-Extra: extra
41
44
  Requires-Dist: pandas<3.0.0,>=2.2.0; extra == "extra"
42
45
 
43
- # What is Crypticorn?
46
+ ## What is Crypticorn?
44
47
 
45
- Crypticorn is at the forefront of cutting-edge artificial intelligence cryptocurrency trading.
46
- Crypticorn offers AI-based solutions for both active and passive investors, including:
47
- - Prediction Dashboard with trading terminal,
48
- - AI Agents with different strategies,
49
- - DEX AI Signals for newly launched tokens,
50
- - DEX AI Bots
48
+ Crypticorn is at the forefront of cutting-edge crypto trading with Machine Learning.
51
49
 
52
- Use this API Client to contribute to the so-called Hive AI, a community driven AI Meta Model for predicting the
53
- cryptocurrency market.
50
+ Use this API Client to access valuable data sources, contribute to the Hive AI - a community driven AI Meta Model for predicting the
51
+ crypto market - and programmatically interact with the entire Crypticorn ecosystem.
54
52
 
55
53
  ## Installation
56
54
 
@@ -66,17 +64,19 @@ If you want the latest version, which could be a pre release, run:
66
64
  pip install --pre crypticorn
67
65
  ```
68
66
 
67
+ You can install extra dependencies grouped in the extras `extra` (heavy dependencies that do not come with the default version) `dev` (development) and `test` (testing). The `extra` dependencies include heavy libraries like `pandas`, which is only used in a few custom API operations (suffixed with `_fmt`), which preprocess the response data as a pandas Dataframe for convenience.
68
+
69
69
  ## Structure
70
70
 
71
71
  Our API is available as an asynchronous Python SDK. The main entry point you need is the `ApiClient` class, which you would import like this:
72
72
  ```python
73
73
  from crypticorn import ApiClient
74
74
  ```
75
- The ApiClient serves as the central interface for API operations. It instantiates multiple API wrappers corresponding to our microservices.
75
+ The ApiClient serves as the central interface for API operations. It instantiates multiple API wrappers corresponding to our micro services.
76
76
 
77
- Specific imports, such as request models, should be accessed through the appropriate submodules.
77
+ Request and response models for API operations should be accessed through the appropriate sub package.
78
78
 
79
- Note: All symbols are re-exported at the first submodule layer for convenience.
79
+ Note: All symbols are re-exported at the sub package level for convenience.
80
80
 
81
81
  ```python
82
82
  from crypticorn.trade import BotStatus
@@ -87,6 +87,10 @@ The `common` submodule contains shared classes not bound to a specific API.
87
87
  from crypticorn.common import Scope, Exchange
88
88
  ```
89
89
 
90
+ ## Authentication
91
+
92
+ To get started, [create an API key in your dashboard](https://app.crypticorn.com/account/developer). Then instantiate the `ApiClient` class with your copied key.
93
+
90
94
  ## Basic Usage
91
95
 
92
96
  ### With Async Context Protocol
@@ -131,16 +135,16 @@ print(res)
131
135
  ```
132
136
  The output would look like this:
133
137
  ```python
134
- status_code=200 headers={'Date': 'Wed, 09 Apr 2025 19:15:19 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Alt-Svc': 'h3=":443"; ma=86400', 'Server': 'cloudflare', 'Cf-Cache-Status': 'DYNAMIC', 'Content-Encoding': 'gzip', 'CF-RAY': '92dc551a687bbe5e-ZRH'} data=[ProductModel(id='67e8146e7bae32f3838fe36a', name='Awesome Product', price=5.0, scopes=None, duration=30, description='You need to buy this', is_active=True)] raw_data=b'[{"id":"67e8146e7bae32f3838fe36a","name":"Awesome Product","price":5.0,"duration":30,"description":"You need to buy this","is_active":true}]'
138
+ status_code=200 headers={'Date': 'Wed, 09 Apr 2025 19:15:19 GMT', 'Content-Type': 'application/json'} data=[ProductModel(id='67e8146e7bae32f3838fe36a', name='Awesome Product', price=5.0, scopes=None, duration=30, description='You need to buy this', is_active=True)] raw_data=b'[{"id":"67e8146e7bae32f3838fe36a","name":"Awesome Product","price":5.0,"duration":30,"description":"You need to buy this","is_active":true}]'
135
139
  ```
136
- You can then access the data of the response (as serialized output) with:
140
+ You can then access the data of the response (as serialized output (1) or as JSON string in bytes (2)) with:
137
141
  ```python
138
142
  print(res.data)
143
+ print(res.raw_data)
139
144
  ```
140
145
  On top of that you get some information about the request:
141
146
  ```python
142
147
  print(res.status_code)
143
- print(res.raw_data)
144
148
  print(res.headers)
145
149
  ```
146
150
 
@@ -163,6 +167,7 @@ This might be of use if you are testing a specific API locally.
163
167
  To override e.g. the host for the Hive client to connect to http://localhost:8000 instead of the default proxy, you would do:
164
168
  ```python
165
169
  from crypticorn.hive import Configuration as Hiveconfig
170
+ from crypticorn.common import Service
166
171
  async with ApiClient(base_url=BaseUrl.DEV) as client:
167
- client.configure(config=HiveConfig(host="http://localhost:8000"), client=client.hive)
172
+ client.configure(config=HiveConfig(host="http://localhost:8000"), client=Service.HIVE)
168
173
  ```
@@ -58,13 +58,16 @@ crypticorn/auth/client/models/whoami200_response.py,sha256=-Kj3fB4lgNaa8v_LTertj
58
58
  crypticorn/cli/__init__.py,sha256=bgMmlpRThjYcxXJ1U3UmLE8ODVT5olmFY1u69VOjthQ,69
59
59
  crypticorn/cli/__main__.py,sha256=x9T4xS3U-qokGEzad7rTujmq4yjV5xcYSXgNsDFkvyo,253
60
60
  crypticorn/cli/init.py,sha256=xefvOCjXOiSUPWHFDDv7DWDC0Ggs1JKxk7KPCXyMZnU,3729
61
+ crypticorn/cli/templates/Dockerfile,sha256=89KlphaXJH51L7Vs4B928WmwYcMtpvLmKGyoDAhOcMw,726
61
62
  crypticorn/cli/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
62
63
  crypticorn/cli/templates/auth.py,sha256=Q1TxlA7qzhjvrqp1xz1aV2vGnj3DKFNN-VSl3o0B-dI,983
64
+ crypticorn/cli/templates/dependabot.yml,sha256=ct5ieB8KAV1KLzoYKUNm6dZ9wKG_P_JQHgRjZUfT54w,861
65
+ crypticorn/cli/templates/ruff.yml,sha256=gWicFFTzC4nToSmRkIIGipos8CZ447YG0kebBCJhtJE,319
63
66
  crypticorn/common/__init__.py,sha256=42ajAXlz0LDBb1AFyX8xvwpp1MB_YrvqutFDkLthUQM,464
64
67
  crypticorn/common/auth.py,sha256=60SRXlW72VJO8rGzCiemWmzGu8tXDqWr0wt9EM6p8aI,8631
65
68
  crypticorn/common/decorators.py,sha256=pmnGYCIrLv59wZkDbvPyK9NJmgPJWW74LXTdIWSjOkY,1063
66
69
  crypticorn/common/enums.py,sha256=RitDVqlG_HTe6tHT6bWusZNFCeYk1eQvJVH-7x3_Zlg,668
67
- crypticorn/common/errors.py,sha256=K1VSEKZro1I4cmi-sOhx24pTrvhbbD4RBRRqKodWpA8,27851
70
+ crypticorn/common/errors.py,sha256=8jxZ2lLn_NoFKKq6n2JwKPsR0dA2vkGnbXDfEK6ndH0,27851
68
71
  crypticorn/common/exceptions.py,sha256=2gsYU0AMiLga4D99PBprQX59k12jJJMlUZ0uEk9rQxs,5671
69
72
  crypticorn/common/mixins.py,sha256=LKPcNTR8uREeDGWTlWozNx7rS1mYdQVx1RllLhxIAsE,1640
70
73
  crypticorn/common/pagination.py,sha256=c07jrMNrBaNTmgx4sppdP7ND4RNT7NBqBXWvofazIlE,2251
@@ -221,8 +224,8 @@ crypticorn/trade/client/models/strategy_model_input.py,sha256=ala19jARyfA5ysys5D
221
224
  crypticorn/trade/client/models/strategy_model_output.py,sha256=2o2lhbgUSTznowpMLEHF1Ex9TG9oRmzlCIb-gXqo7_s,5643
222
225
  crypticorn/trade/client/models/tpsl.py,sha256=C2KgTIZs-a8W4msdaXgBKJcwtA-o5wR4rBauRP-iQxU,4317
223
226
  crypticorn/trade/client/models/trading_action_type.py,sha256=pGq_TFLMPfYFizYP-xKgEC1ZF4U3lGdJYoGa_ZH2x-Q,769
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,,
227
+ crypticorn-2.7.4.dist-info/METADATA,sha256=NXP9FYzO0RuNNmNtzDry1guS__kY09E4kS8vl1wmd5Y,6607
228
+ crypticorn-2.7.4.dist-info/WHEEL,sha256=GHB6lJx2juba1wDgXDNlMTyM13ckjBMKf-OnwgKOCtA,91
229
+ crypticorn-2.7.4.dist-info/entry_points.txt,sha256=d_xHsGvUTebPveVUK0SrpDFQ5ZRSjlI7lNCc11sn2PM,59
230
+ crypticorn-2.7.4.dist-info/top_level.txt,sha256=EP3NY216qIBYfmvGl0L2Zc9ItP0DjGSkiYqd9xJwGcM,11
231
+ crypticorn-2.7.4.dist-info/RECORD,,