crypticorn 2.8.0rc9__py3-none-any.whl → 2.9.0rc1__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 +2 -2
- crypticorn/common/router/admin_router.py +7 -9
- crypticorn/klines/client/__init__.py +9 -1
- crypticorn/klines/client/api/__init__.py +1 -0
- crypticorn/klines/client/api/admin_api.py +1455 -0
- crypticorn/klines/client/api/change_in_timeframe_api.py +24 -20
- crypticorn/klines/client/api/funding_rates_api.py +12 -10
- crypticorn/klines/client/api/ohlcv_data_api.py +37 -24
- crypticorn/klines/client/api/status_api.py +8 -235
- crypticorn/klines/client/api/symbols_api.py +12 -9
- crypticorn/klines/client/api/udf_api.py +6 -6
- crypticorn/klines/client/models/__init__.py +8 -1
- crypticorn/klines/client/models/api_error_identifier.py +115 -0
- crypticorn/klines/client/models/api_error_level.py +37 -0
- crypticorn/klines/client/models/api_error_type.py +37 -0
- crypticorn/klines/client/models/exception_detail.py +6 -3
- crypticorn/klines/client/models/funding_rate.py +6 -12
- crypticorn/klines/client/models/funding_rate_response.py +103 -0
- crypticorn/klines/client/models/internal_exchange.py +39 -0
- crypticorn/klines/client/models/log_level.py +38 -0
- crypticorn/klines/client/models/market_type.py +35 -0
- crypticorn/klines/client/models/{ohlcv_history.py → ohlcv.py} +12 -13
- crypticorn/klines/client/models/search_symbol.py +3 -4
- crypticorn/klines/client/models/udf_config.py +2 -1
- crypticorn/klines/main.py +1 -13
- crypticorn/metrics/client/api/admin_api.py +22 -19
- crypticorn/metrics/client/api/status_api.py +6 -6
- crypticorn/metrics/client/configuration.py +4 -2
- {crypticorn-2.8.0rc9.dist-info → crypticorn-2.9.0rc1.dist-info}/METADATA +1 -1
- {crypticorn-2.8.0rc9.dist-info → crypticorn-2.9.0rc1.dist-info}/RECORD +33 -25
- {crypticorn-2.8.0rc9.dist-info → crypticorn-2.9.0rc1.dist-info}/WHEEL +0 -0
- {crypticorn-2.8.0rc9.dist-info → crypticorn-2.9.0rc1.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.8.0rc9.dist-info → crypticorn-2.9.0rc1.dist-info}/top_level.txt +0 -0
@@ -16,10 +16,11 @@ 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
|
19
|
+
from pydantic import Field
|
20
20
|
from typing import List, Optional
|
21
21
|
from typing_extensions import Annotated
|
22
22
|
from crypticorn.klines.client.models.change_in_timeframe import ChangeInTimeframe
|
23
|
+
from crypticorn.klines.client.models.market_type import MarketType
|
23
24
|
from crypticorn.klines.client.models.timeframe import Timeframe
|
24
25
|
|
25
26
|
from crypticorn.klines.client.api_client import ApiClient, RequestSerialized
|
@@ -43,11 +44,12 @@ class ChangeInTimeframeApi:
|
|
43
44
|
async def get_change_in_timeframe(
|
44
45
|
self,
|
45
46
|
market: Annotated[
|
46
|
-
Optional[
|
47
|
+
Optional[MarketType],
|
48
|
+
Field(description="The market to calculate the change in"),
|
47
49
|
] = None,
|
48
50
|
timeframe: Annotated[
|
49
51
|
Optional[Timeframe],
|
50
|
-
Field(description="
|
52
|
+
Field(description="The timeframe to calculate the change in"),
|
51
53
|
] = None,
|
52
54
|
_request_timeout: Union[
|
53
55
|
None,
|
@@ -63,11 +65,11 @@ class ChangeInTimeframeApi:
|
|
63
65
|
) -> List[ChangeInTimeframe]:
|
64
66
|
"""Get Change In Timeframe
|
65
67
|
|
66
|
-
Retrieve price change percentage between last two completed timestamps for all pairs.
|
68
|
+
Retrieve price change percentage between last two completed timestamps for all pairs.
|
67
69
|
|
68
|
-
:param market:
|
69
|
-
:type market:
|
70
|
-
:param timeframe:
|
70
|
+
:param market: The market to calculate the change in
|
71
|
+
:type market: MarketType
|
72
|
+
:param timeframe: The timeframe to calculate the change in
|
71
73
|
:type timeframe: Timeframe
|
72
74
|
:param _request_timeout: timeout setting for this request. If one
|
73
75
|
number provided, it will be total request
|
@@ -116,11 +118,12 @@ class ChangeInTimeframeApi:
|
|
116
118
|
async def get_change_in_timeframe_with_http_info(
|
117
119
|
self,
|
118
120
|
market: Annotated[
|
119
|
-
Optional[
|
121
|
+
Optional[MarketType],
|
122
|
+
Field(description="The market to calculate the change in"),
|
120
123
|
] = None,
|
121
124
|
timeframe: Annotated[
|
122
125
|
Optional[Timeframe],
|
123
|
-
Field(description="
|
126
|
+
Field(description="The timeframe to calculate the change in"),
|
124
127
|
] = None,
|
125
128
|
_request_timeout: Union[
|
126
129
|
None,
|
@@ -136,11 +139,11 @@ class ChangeInTimeframeApi:
|
|
136
139
|
) -> ApiResponse[List[ChangeInTimeframe]]:
|
137
140
|
"""Get Change In Timeframe
|
138
141
|
|
139
|
-
Retrieve price change percentage between last two completed timestamps for all pairs.
|
142
|
+
Retrieve price change percentage between last two completed timestamps for all pairs.
|
140
143
|
|
141
|
-
:param market:
|
142
|
-
:type market:
|
143
|
-
:param timeframe:
|
144
|
+
:param market: The market to calculate the change in
|
145
|
+
:type market: MarketType
|
146
|
+
:param timeframe: The timeframe to calculate the change in
|
144
147
|
:type timeframe: Timeframe
|
145
148
|
:param _request_timeout: timeout setting for this request. If one
|
146
149
|
number provided, it will be total request
|
@@ -189,11 +192,12 @@ class ChangeInTimeframeApi:
|
|
189
192
|
async def get_change_in_timeframe_without_preload_content(
|
190
193
|
self,
|
191
194
|
market: Annotated[
|
192
|
-
Optional[
|
195
|
+
Optional[MarketType],
|
196
|
+
Field(description="The market to calculate the change in"),
|
193
197
|
] = None,
|
194
198
|
timeframe: Annotated[
|
195
199
|
Optional[Timeframe],
|
196
|
-
Field(description="
|
200
|
+
Field(description="The timeframe to calculate the change in"),
|
197
201
|
] = None,
|
198
202
|
_request_timeout: Union[
|
199
203
|
None,
|
@@ -209,11 +213,11 @@ class ChangeInTimeframeApi:
|
|
209
213
|
) -> RESTResponseType:
|
210
214
|
"""Get Change In Timeframe
|
211
215
|
|
212
|
-
Retrieve price change percentage between last two completed timestamps for all pairs.
|
216
|
+
Retrieve price change percentage between last two completed timestamps for all pairs.
|
213
217
|
|
214
|
-
:param market:
|
215
|
-
:type market:
|
216
|
-
:param timeframe:
|
218
|
+
:param market: The market to calculate the change in
|
219
|
+
:type market: MarketType
|
220
|
+
:param timeframe: The timeframe to calculate the change in
|
217
221
|
:type timeframe: Timeframe
|
218
222
|
:param _request_timeout: timeout setting for this request. If one
|
219
223
|
number provided, it will be total request
|
@@ -281,7 +285,7 @@ class ChangeInTimeframeApi:
|
|
281
285
|
# process the query parameters
|
282
286
|
if market is not None:
|
283
287
|
|
284
|
-
_query_params.append(("market", market))
|
288
|
+
_query_params.append(("market", market.value))
|
285
289
|
|
286
290
|
if timeframe is not None:
|
287
291
|
|
@@ -17,9 +17,9 @@ from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
17
|
from typing_extensions import Annotated
|
18
18
|
|
19
19
|
from pydantic import Field, StrictInt, StrictStr
|
20
|
-
from typing import
|
20
|
+
from typing import Optional
|
21
21
|
from typing_extensions import Annotated
|
22
|
-
from crypticorn.klines.client.models.
|
22
|
+
from crypticorn.klines.client.models.funding_rate_response import FundingRateResponse
|
23
23
|
|
24
24
|
from crypticorn.klines.client.api_client import ApiClient, RequestSerialized
|
25
25
|
from crypticorn.klines.client.api_response import ApiResponse
|
@@ -65,7 +65,7 @@ class FundingRatesApi:
|
|
65
65
|
_content_type: Optional[StrictStr] = None,
|
66
66
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
67
67
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
68
|
-
) ->
|
68
|
+
) -> FundingRateResponse:
|
69
69
|
"""Funding Rate
|
70
70
|
|
71
71
|
Retrieve funding rate data for a specific symbol in the futures market.
|
@@ -112,7 +112,7 @@ class FundingRatesApi:
|
|
112
112
|
)
|
113
113
|
|
114
114
|
_response_types_map: Dict[str, Optional[str]] = {
|
115
|
-
"200": "
|
115
|
+
"200": "FundingRateResponse",
|
116
116
|
}
|
117
117
|
response_data = await self.api_client.call_api(
|
118
118
|
*_param, _request_timeout=_request_timeout
|
@@ -150,7 +150,7 @@ class FundingRatesApi:
|
|
150
150
|
_content_type: Optional[StrictStr] = None,
|
151
151
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
152
152
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
153
|
-
) -> ApiResponse[
|
153
|
+
) -> ApiResponse[FundingRateResponse]:
|
154
154
|
"""Funding Rate
|
155
155
|
|
156
156
|
Retrieve funding rate data for a specific symbol in the futures market.
|
@@ -197,7 +197,7 @@ class FundingRatesApi:
|
|
197
197
|
)
|
198
198
|
|
199
199
|
_response_types_map: Dict[str, Optional[str]] = {
|
200
|
-
"200": "
|
200
|
+
"200": "FundingRateResponse",
|
201
201
|
}
|
202
202
|
response_data = await self.api_client.call_api(
|
203
203
|
*_param, _request_timeout=_request_timeout
|
@@ -282,7 +282,7 @@ class FundingRatesApi:
|
|
282
282
|
)
|
283
283
|
|
284
284
|
_response_types_map: Dict[str, Optional[str]] = {
|
285
|
-
"200": "
|
285
|
+
"200": "FundingRateResponse",
|
286
286
|
}
|
287
287
|
response_data = await self.api_client.call_api(
|
288
288
|
*_param, _request_timeout=_request_timeout
|
@@ -315,9 +315,11 @@ class FundingRatesApi:
|
|
315
315
|
_body_params: Optional[bytes] = None
|
316
316
|
|
317
317
|
# process the path parameters
|
318
|
-
if symbol is not None:
|
319
|
-
_path_params["symbol"] = symbol
|
320
318
|
# process the query parameters
|
319
|
+
if symbol is not None:
|
320
|
+
|
321
|
+
_query_params.append(("symbol", symbol))
|
322
|
+
|
321
323
|
if start is not None:
|
322
324
|
|
323
325
|
_query_params.append(("start", start))
|
@@ -345,7 +347,7 @@ class FundingRatesApi:
|
|
345
347
|
|
346
348
|
return self.api_client.param_serialize(
|
347
349
|
method="GET",
|
348
|
-
resource_path="/
|
350
|
+
resource_path="/funding",
|
349
351
|
path_params=_path_params,
|
350
352
|
query_params=_query_params,
|
351
353
|
header_params=_header_params,
|
@@ -17,9 +17,10 @@ from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
17
|
from typing_extensions import Annotated
|
18
18
|
|
19
19
|
from pydantic import Field, StrictInt, StrictStr
|
20
|
-
from typing import Optional
|
20
|
+
from typing import List, Optional
|
21
21
|
from typing_extensions import Annotated
|
22
|
-
from crypticorn.klines.client.models.
|
22
|
+
from crypticorn.klines.client.models.market_type import MarketType
|
23
|
+
from crypticorn.klines.client.models.ohlcv import OHLCV
|
23
24
|
from crypticorn.klines.client.models.sort_direction import SortDirection
|
24
25
|
from crypticorn.klines.client.models.timeframe import Timeframe
|
25
26
|
|
@@ -43,7 +44,7 @@ class OHLCVDataApi:
|
|
43
44
|
@validate_call
|
44
45
|
async def get_ohlcv(
|
45
46
|
self,
|
46
|
-
market: Annotated[
|
47
|
+
market: Annotated[MarketType, Field(description="Market type")],
|
47
48
|
timeframe: Annotated[Timeframe, Field(description="Timeframe for the candles")],
|
48
49
|
symbol: Annotated[
|
49
50
|
StrictStr, Field(description="Trading pair symbol (e.g., BTCUSDT)")
|
@@ -60,7 +61,9 @@ class OHLCVDataApi:
|
|
60
61
|
] = None,
|
61
62
|
sort_direction: Annotated[
|
62
63
|
Optional[SortDirection],
|
63
|
-
Field(
|
64
|
+
Field(
|
65
|
+
description="Sort by timestamp in ascending or descending order. Default is descending."
|
66
|
+
),
|
64
67
|
] = None,
|
65
68
|
_request_timeout: Union[
|
66
69
|
None,
|
@@ -73,13 +76,13 @@ class OHLCVDataApi:
|
|
73
76
|
_content_type: Optional[StrictStr] = None,
|
74
77
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
75
78
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
76
|
-
) ->
|
79
|
+
) -> List[OHLCV]:
|
77
80
|
"""Get Ohlcv
|
78
81
|
|
79
82
|
Retrieve OHLCV (Open, High, Low, Close, Volume) data for a specific market, timeframe, and symbol.
|
80
83
|
|
81
84
|
:param market: Market type (required)
|
82
|
-
:type market:
|
85
|
+
:type market: MarketType
|
83
86
|
:param timeframe: Timeframe for the candles (required)
|
84
87
|
:type timeframe: Timeframe
|
85
88
|
:param symbol: Trading pair symbol (e.g., BTCUSDT) (required)
|
@@ -90,7 +93,7 @@ class OHLCVDataApi:
|
|
90
93
|
:type end: int
|
91
94
|
:param limit: Number of candles to return
|
92
95
|
:type limit: int
|
93
|
-
:param sort_direction:
|
96
|
+
:param sort_direction: Sort by timestamp in ascending or descending order. Default is descending.
|
94
97
|
:type sort_direction: SortDirection
|
95
98
|
:param _request_timeout: timeout setting for this request. If one
|
96
99
|
number provided, it will be total request
|
@@ -129,7 +132,7 @@ class OHLCVDataApi:
|
|
129
132
|
)
|
130
133
|
|
131
134
|
_response_types_map: Dict[str, Optional[str]] = {
|
132
|
-
"200": "
|
135
|
+
"200": "List[OHLCV]",
|
133
136
|
}
|
134
137
|
response_data = await self.api_client.call_api(
|
135
138
|
*_param, _request_timeout=_request_timeout
|
@@ -143,7 +146,7 @@ class OHLCVDataApi:
|
|
143
146
|
@validate_call
|
144
147
|
async def get_ohlcv_with_http_info(
|
145
148
|
self,
|
146
|
-
market: Annotated[
|
149
|
+
market: Annotated[MarketType, Field(description="Market type")],
|
147
150
|
timeframe: Annotated[Timeframe, Field(description="Timeframe for the candles")],
|
148
151
|
symbol: Annotated[
|
149
152
|
StrictStr, Field(description="Trading pair symbol (e.g., BTCUSDT)")
|
@@ -160,7 +163,9 @@ class OHLCVDataApi:
|
|
160
163
|
] = None,
|
161
164
|
sort_direction: Annotated[
|
162
165
|
Optional[SortDirection],
|
163
|
-
Field(
|
166
|
+
Field(
|
167
|
+
description="Sort by timestamp in ascending or descending order. Default is descending."
|
168
|
+
),
|
164
169
|
] = None,
|
165
170
|
_request_timeout: Union[
|
166
171
|
None,
|
@@ -173,13 +178,13 @@ class OHLCVDataApi:
|
|
173
178
|
_content_type: Optional[StrictStr] = None,
|
174
179
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
175
180
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
176
|
-
) -> ApiResponse[
|
181
|
+
) -> ApiResponse[List[OHLCV]]:
|
177
182
|
"""Get Ohlcv
|
178
183
|
|
179
184
|
Retrieve OHLCV (Open, High, Low, Close, Volume) data for a specific market, timeframe, and symbol.
|
180
185
|
|
181
186
|
:param market: Market type (required)
|
182
|
-
:type market:
|
187
|
+
:type market: MarketType
|
183
188
|
:param timeframe: Timeframe for the candles (required)
|
184
189
|
:type timeframe: Timeframe
|
185
190
|
:param symbol: Trading pair symbol (e.g., BTCUSDT) (required)
|
@@ -190,7 +195,7 @@ class OHLCVDataApi:
|
|
190
195
|
:type end: int
|
191
196
|
:param limit: Number of candles to return
|
192
197
|
:type limit: int
|
193
|
-
:param sort_direction:
|
198
|
+
:param sort_direction: Sort by timestamp in ascending or descending order. Default is descending.
|
194
199
|
:type sort_direction: SortDirection
|
195
200
|
:param _request_timeout: timeout setting for this request. If one
|
196
201
|
number provided, it will be total request
|
@@ -229,7 +234,7 @@ class OHLCVDataApi:
|
|
229
234
|
)
|
230
235
|
|
231
236
|
_response_types_map: Dict[str, Optional[str]] = {
|
232
|
-
"200": "
|
237
|
+
"200": "List[OHLCV]",
|
233
238
|
}
|
234
239
|
response_data = await self.api_client.call_api(
|
235
240
|
*_param, _request_timeout=_request_timeout
|
@@ -243,7 +248,7 @@ class OHLCVDataApi:
|
|
243
248
|
@validate_call
|
244
249
|
async def get_ohlcv_without_preload_content(
|
245
250
|
self,
|
246
|
-
market: Annotated[
|
251
|
+
market: Annotated[MarketType, Field(description="Market type")],
|
247
252
|
timeframe: Annotated[Timeframe, Field(description="Timeframe for the candles")],
|
248
253
|
symbol: Annotated[
|
249
254
|
StrictStr, Field(description="Trading pair symbol (e.g., BTCUSDT)")
|
@@ -260,7 +265,9 @@ class OHLCVDataApi:
|
|
260
265
|
] = None,
|
261
266
|
sort_direction: Annotated[
|
262
267
|
Optional[SortDirection],
|
263
|
-
Field(
|
268
|
+
Field(
|
269
|
+
description="Sort by timestamp in ascending or descending order. Default is descending."
|
270
|
+
),
|
264
271
|
] = None,
|
265
272
|
_request_timeout: Union[
|
266
273
|
None,
|
@@ -279,7 +286,7 @@ class OHLCVDataApi:
|
|
279
286
|
Retrieve OHLCV (Open, High, Low, Close, Volume) data for a specific market, timeframe, and symbol.
|
280
287
|
|
281
288
|
:param market: Market type (required)
|
282
|
-
:type market:
|
289
|
+
:type market: MarketType
|
283
290
|
:param timeframe: Timeframe for the candles (required)
|
284
291
|
:type timeframe: Timeframe
|
285
292
|
:param symbol: Trading pair symbol (e.g., BTCUSDT) (required)
|
@@ -290,7 +297,7 @@ class OHLCVDataApi:
|
|
290
297
|
:type end: int
|
291
298
|
:param limit: Number of candles to return
|
292
299
|
:type limit: int
|
293
|
-
:param sort_direction:
|
300
|
+
:param sort_direction: Sort by timestamp in ascending or descending order. Default is descending.
|
294
301
|
:type sort_direction: SortDirection
|
295
302
|
:param _request_timeout: timeout setting for this request. If one
|
296
303
|
number provided, it will be total request
|
@@ -329,7 +336,7 @@ class OHLCVDataApi:
|
|
329
336
|
)
|
330
337
|
|
331
338
|
_response_types_map: Dict[str, Optional[str]] = {
|
332
|
-
"200": "
|
339
|
+
"200": "List[OHLCV]",
|
333
340
|
}
|
334
341
|
response_data = await self.api_client.call_api(
|
335
342
|
*_param, _request_timeout=_request_timeout
|
@@ -365,13 +372,19 @@ class OHLCVDataApi:
|
|
365
372
|
_body_params: Optional[bytes] = None
|
366
373
|
|
367
374
|
# process the path parameters
|
375
|
+
# process the query parameters
|
368
376
|
if market is not None:
|
369
|
-
|
377
|
+
|
378
|
+
_query_params.append(("market", market.value))
|
379
|
+
|
370
380
|
if timeframe is not None:
|
371
|
-
|
381
|
+
|
382
|
+
_query_params.append(("timeframe", timeframe.value))
|
383
|
+
|
372
384
|
if symbol is not None:
|
373
|
-
|
374
|
-
|
385
|
+
|
386
|
+
_query_params.append(("symbol", symbol))
|
387
|
+
|
375
388
|
if start is not None:
|
376
389
|
|
377
390
|
_query_params.append(("start", start))
|
@@ -403,7 +416,7 @@ class OHLCVDataApi:
|
|
403
416
|
|
404
417
|
return self.api_client.param_serialize(
|
405
418
|
method="GET",
|
406
|
-
resource_path="/
|
419
|
+
resource_path="/ohlcv",
|
407
420
|
path_params=_path_params,
|
408
421
|
query_params=_query_params,
|
409
422
|
header_params=_header_params,
|