crypticorn 2.8.0rc7__py3-none-any.whl → 2.8.1__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/__init__.py +1 -1
- crypticorn/cli/init.py +2 -2
- crypticorn/common/exceptions.py +5 -4
- crypticorn/common/logging.py +13 -4
- crypticorn/common/middleware.py +2 -3
- crypticorn/common/router/admin_router.py +10 -12
- crypticorn/common/router/status_router.py +2 -2
- crypticorn/hive/utils.py +1 -2
- 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/__init__.py +11 -0
- crypticorn/metrics/client/api/__init__.py +2 -0
- crypticorn/metrics/client/api/admin_api.py +1452 -0
- crypticorn/metrics/client/api/exchanges_api.py +51 -40
- crypticorn/metrics/client/api/indicators_api.py +49 -32
- crypticorn/metrics/client/api/logs_api.py +7 -7
- crypticorn/metrics/client/api/marketcap_api.py +28 -25
- crypticorn/metrics/client/api/markets_api.py +50 -278
- crypticorn/metrics/client/api/quote_currencies_api.py +289 -0
- crypticorn/metrics/client/api/status_api.py +4 -231
- crypticorn/metrics/client/api/tokens_api.py +241 -37
- crypticorn/metrics/client/models/__init__.py +9 -0
- crypticorn/metrics/client/models/api_error_identifier.py +115 -0
- crypticorn/metrics/client/models/api_error_level.py +37 -0
- crypticorn/metrics/client/models/api_error_type.py +37 -0
- crypticorn/metrics/client/models/exception_detail.py +6 -3
- crypticorn/metrics/client/models/exchange_mapping.py +121 -0
- crypticorn/metrics/client/models/internal_exchange.py +39 -0
- crypticorn/metrics/client/models/log_level.py +38 -0
- crypticorn/metrics/client/models/market_type.py +35 -0
- crypticorn/metrics/client/models/marketcap_ranking.py +87 -0
- crypticorn/metrics/client/models/ohlcv.py +113 -0
- crypticorn/metrics/main.py +14 -2
- {crypticorn-2.8.0rc7.dist-info → crypticorn-2.8.1.dist-info}/METADATA +3 -2
- {crypticorn-2.8.0rc7.dist-info → crypticorn-2.8.1.dist-info}/RECORD +59 -40
- {crypticorn-2.8.0rc7.dist-info → crypticorn-2.8.1.dist-info}/WHEEL +0 -0
- {crypticorn-2.8.0rc7.dist-info → crypticorn-2.8.1.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.8.0rc7.dist-info → crypticorn-2.8.1.dist-info}/top_level.txt +0 -0
@@ -19,6 +19,9 @@ from typing_extensions import Annotated
|
|
19
19
|
from pydantic import Field, StrictInt, StrictStr
|
20
20
|
from typing import Any, Dict, List, Optional
|
21
21
|
from typing_extensions import Annotated
|
22
|
+
from crypticorn.metrics.client.models.exchange_mapping import ExchangeMapping
|
23
|
+
from crypticorn.metrics.client.models.internal_exchange import InternalExchange
|
24
|
+
from crypticorn.metrics.client.models.market_type import MarketType
|
22
25
|
from crypticorn.metrics.client.models.time_interval import TimeInterval
|
23
26
|
from crypticorn.metrics.client.models.trading_status import TradingStatus
|
24
27
|
|
@@ -43,7 +46,7 @@ class ExchangesApi:
|
|
43
46
|
async def get_available_exchanges(
|
44
47
|
self,
|
45
48
|
market: Annotated[
|
46
|
-
|
49
|
+
MarketType, Field(description="Market type (spot or futures)")
|
47
50
|
],
|
48
51
|
symbol: Annotated[
|
49
52
|
StrictStr, Field(description="Symbol to fetch available exchanges for")
|
@@ -91,7 +94,7 @@ class ExchangesApi:
|
|
91
94
|
Get available exchanges for a symbol with various filtering options.
|
92
95
|
|
93
96
|
:param market: Market type (spot or futures) (required)
|
94
|
-
:type market:
|
97
|
+
:type market: MarketType
|
95
98
|
:param symbol: Symbol to fetch available exchanges for (required)
|
96
99
|
:type symbol: str
|
97
100
|
:param interval: Interval for which to fetch available exchanges
|
@@ -156,7 +159,7 @@ class ExchangesApi:
|
|
156
159
|
async def get_available_exchanges_with_http_info(
|
157
160
|
self,
|
158
161
|
market: Annotated[
|
159
|
-
|
162
|
+
MarketType, Field(description="Market type (spot or futures)")
|
160
163
|
],
|
161
164
|
symbol: Annotated[
|
162
165
|
StrictStr, Field(description="Symbol to fetch available exchanges for")
|
@@ -204,7 +207,7 @@ class ExchangesApi:
|
|
204
207
|
Get available exchanges for a symbol with various filtering options.
|
205
208
|
|
206
209
|
:param market: Market type (spot or futures) (required)
|
207
|
-
:type market:
|
210
|
+
:type market: MarketType
|
208
211
|
:param symbol: Symbol to fetch available exchanges for (required)
|
209
212
|
:type symbol: str
|
210
213
|
:param interval: Interval for which to fetch available exchanges
|
@@ -269,7 +272,7 @@ class ExchangesApi:
|
|
269
272
|
async def get_available_exchanges_without_preload_content(
|
270
273
|
self,
|
271
274
|
market: Annotated[
|
272
|
-
|
275
|
+
MarketType, Field(description="Market type (spot or futures)")
|
273
276
|
],
|
274
277
|
symbol: Annotated[
|
275
278
|
StrictStr, Field(description="Symbol to fetch available exchanges for")
|
@@ -317,7 +320,7 @@ class ExchangesApi:
|
|
317
320
|
Get available exchanges for a symbol with various filtering options.
|
318
321
|
|
319
322
|
:param market: Market type (spot or futures) (required)
|
320
|
-
:type market:
|
323
|
+
:type market: MarketType
|
321
324
|
:param symbol: Symbol to fetch available exchanges for (required)
|
322
325
|
:type symbol: str
|
323
326
|
:param interval: Interval for which to fetch available exchanges
|
@@ -403,11 +406,15 @@ class ExchangesApi:
|
|
403
406
|
_body_params: Optional[bytes] = None
|
404
407
|
|
405
408
|
# process the path parameters
|
409
|
+
# process the query parameters
|
406
410
|
if market is not None:
|
407
|
-
|
411
|
+
|
412
|
+
_query_params.append(("market", market.value))
|
413
|
+
|
408
414
|
if symbol is not None:
|
409
|
-
|
410
|
-
|
415
|
+
|
416
|
+
_query_params.append(("symbol", symbol))
|
417
|
+
|
411
418
|
if interval is not None:
|
412
419
|
|
413
420
|
_query_params.append(("interval", interval.value))
|
@@ -443,7 +450,7 @@ class ExchangesApi:
|
|
443
450
|
|
444
451
|
return self.api_client.param_serialize(
|
445
452
|
method="GET",
|
446
|
-
resource_path="/
|
453
|
+
resource_path="/exchanges/available",
|
447
454
|
path_params=_path_params,
|
448
455
|
query_params=_query_params,
|
449
456
|
header_params=_header_params,
|
@@ -460,7 +467,7 @@ class ExchangesApi:
|
|
460
467
|
async def get_available_exchanges_for_market(
|
461
468
|
self,
|
462
469
|
market: Annotated[
|
463
|
-
|
470
|
+
MarketType, Field(description="Market type (spot or futures)")
|
464
471
|
],
|
465
472
|
_request_timeout: Union[
|
466
473
|
None,
|
@@ -479,7 +486,7 @@ class ExchangesApi:
|
|
479
486
|
Get list of exchanges for a market.
|
480
487
|
|
481
488
|
:param market: Market type (spot or futures) (required)
|
482
|
-
:type market:
|
489
|
+
:type market: MarketType
|
483
490
|
:param _request_timeout: timeout setting for this request. If one
|
484
491
|
number provided, it will be total request
|
485
492
|
timeout. It can also be a pair (tuple) of
|
@@ -526,7 +533,7 @@ class ExchangesApi:
|
|
526
533
|
async def get_available_exchanges_for_market_with_http_info(
|
527
534
|
self,
|
528
535
|
market: Annotated[
|
529
|
-
|
536
|
+
MarketType, Field(description="Market type (spot or futures)")
|
530
537
|
],
|
531
538
|
_request_timeout: Union[
|
532
539
|
None,
|
@@ -545,7 +552,7 @@ class ExchangesApi:
|
|
545
552
|
Get list of exchanges for a market.
|
546
553
|
|
547
554
|
:param market: Market type (spot or futures) (required)
|
548
|
-
:type market:
|
555
|
+
:type market: MarketType
|
549
556
|
:param _request_timeout: timeout setting for this request. If one
|
550
557
|
number provided, it will be total request
|
551
558
|
timeout. It can also be a pair (tuple) of
|
@@ -592,7 +599,7 @@ class ExchangesApi:
|
|
592
599
|
async def get_available_exchanges_for_market_without_preload_content(
|
593
600
|
self,
|
594
601
|
market: Annotated[
|
595
|
-
|
602
|
+
MarketType, Field(description="Market type (spot or futures)")
|
596
603
|
],
|
597
604
|
_request_timeout: Union[
|
598
605
|
None,
|
@@ -611,7 +618,7 @@ class ExchangesApi:
|
|
611
618
|
Get list of exchanges for a market.
|
612
619
|
|
613
620
|
:param market: Market type (spot or futures) (required)
|
614
|
-
:type market:
|
621
|
+
:type market: MarketType
|
615
622
|
:param _request_timeout: timeout setting for this request. If one
|
616
623
|
number provided, it will be total request
|
617
624
|
timeout. It can also be a pair (tuple) of
|
@@ -673,9 +680,11 @@ class ExchangesApi:
|
|
673
680
|
_body_params: Optional[bytes] = None
|
674
681
|
|
675
682
|
# process the path parameters
|
676
|
-
if market is not None:
|
677
|
-
_path_params["market"] = market
|
678
683
|
# process the query parameters
|
684
|
+
if market is not None:
|
685
|
+
|
686
|
+
_query_params.append(("market", market.value))
|
687
|
+
|
679
688
|
# process the header parameters
|
680
689
|
# process the form parameters
|
681
690
|
# process the body parameter
|
@@ -691,7 +700,7 @@ class ExchangesApi:
|
|
691
700
|
|
692
701
|
return self.api_client.param_serialize(
|
693
702
|
method="GET",
|
694
|
-
resource_path="/
|
703
|
+
resource_path="/exchanges/list",
|
695
704
|
path_params=_path_params,
|
696
705
|
query_params=_query_params,
|
697
706
|
header_params=_header_params,
|
@@ -708,10 +717,10 @@ class ExchangesApi:
|
|
708
717
|
async def get_exchange_mappings(
|
709
718
|
self,
|
710
719
|
market: Annotated[
|
711
|
-
|
720
|
+
MarketType, Field(description="Market type (spot or futures)")
|
712
721
|
],
|
713
722
|
exchange: Annotated[
|
714
|
-
Optional[
|
723
|
+
Optional[InternalExchange],
|
715
724
|
Field(description="Exchange name for which to fetch exchange mappings"),
|
716
725
|
] = None,
|
717
726
|
_request_timeout: Union[
|
@@ -725,15 +734,15 @@ class ExchangesApi:
|
|
725
734
|
_content_type: Optional[StrictStr] = None,
|
726
735
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
727
736
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
728
|
-
) -> List[
|
737
|
+
) -> List[ExchangeMapping]:
|
729
738
|
"""Get Exchange Mappings
|
730
739
|
|
731
740
|
Get exchange mappings for a market with optional exchange name filter.
|
732
741
|
|
733
742
|
:param market: Market type (spot or futures) (required)
|
734
|
-
:type market:
|
743
|
+
:type market: MarketType
|
735
744
|
:param exchange: Exchange name for which to fetch exchange mappings
|
736
|
-
:type exchange:
|
745
|
+
:type exchange: InternalExchange
|
737
746
|
:param _request_timeout: timeout setting for this request. If one
|
738
747
|
number provided, it will be total request
|
739
748
|
timeout. It can also be a pair (tuple) of
|
@@ -766,7 +775,7 @@ class ExchangesApi:
|
|
766
775
|
)
|
767
776
|
|
768
777
|
_response_types_map: Dict[str, Optional[str]] = {
|
769
|
-
"200": "List[
|
778
|
+
"200": "List[ExchangeMapping]",
|
770
779
|
}
|
771
780
|
response_data = await self.api_client.call_api(
|
772
781
|
*_param, _request_timeout=_request_timeout
|
@@ -781,10 +790,10 @@ class ExchangesApi:
|
|
781
790
|
async def get_exchange_mappings_with_http_info(
|
782
791
|
self,
|
783
792
|
market: Annotated[
|
784
|
-
|
793
|
+
MarketType, Field(description="Market type (spot or futures)")
|
785
794
|
],
|
786
795
|
exchange: Annotated[
|
787
|
-
Optional[
|
796
|
+
Optional[InternalExchange],
|
788
797
|
Field(description="Exchange name for which to fetch exchange mappings"),
|
789
798
|
] = None,
|
790
799
|
_request_timeout: Union[
|
@@ -798,15 +807,15 @@ class ExchangesApi:
|
|
798
807
|
_content_type: Optional[StrictStr] = None,
|
799
808
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
800
809
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
801
|
-
) -> ApiResponse[List[
|
810
|
+
) -> ApiResponse[List[ExchangeMapping]]:
|
802
811
|
"""Get Exchange Mappings
|
803
812
|
|
804
813
|
Get exchange mappings for a market with optional exchange name filter.
|
805
814
|
|
806
815
|
:param market: Market type (spot or futures) (required)
|
807
|
-
:type market:
|
816
|
+
:type market: MarketType
|
808
817
|
:param exchange: Exchange name for which to fetch exchange mappings
|
809
|
-
:type exchange:
|
818
|
+
:type exchange: InternalExchange
|
810
819
|
:param _request_timeout: timeout setting for this request. If one
|
811
820
|
number provided, it will be total request
|
812
821
|
timeout. It can also be a pair (tuple) of
|
@@ -839,7 +848,7 @@ class ExchangesApi:
|
|
839
848
|
)
|
840
849
|
|
841
850
|
_response_types_map: Dict[str, Optional[str]] = {
|
842
|
-
"200": "List[
|
851
|
+
"200": "List[ExchangeMapping]",
|
843
852
|
}
|
844
853
|
response_data = await self.api_client.call_api(
|
845
854
|
*_param, _request_timeout=_request_timeout
|
@@ -854,10 +863,10 @@ class ExchangesApi:
|
|
854
863
|
async def get_exchange_mappings_without_preload_content(
|
855
864
|
self,
|
856
865
|
market: Annotated[
|
857
|
-
|
866
|
+
MarketType, Field(description="Market type (spot or futures)")
|
858
867
|
],
|
859
868
|
exchange: Annotated[
|
860
|
-
Optional[
|
869
|
+
Optional[InternalExchange],
|
861
870
|
Field(description="Exchange name for which to fetch exchange mappings"),
|
862
871
|
] = None,
|
863
872
|
_request_timeout: Union[
|
@@ -877,9 +886,9 @@ class ExchangesApi:
|
|
877
886
|
Get exchange mappings for a market with optional exchange name filter.
|
878
887
|
|
879
888
|
:param market: Market type (spot or futures) (required)
|
880
|
-
:type market:
|
889
|
+
:type market: MarketType
|
881
890
|
:param exchange: Exchange name for which to fetch exchange mappings
|
882
|
-
:type exchange:
|
891
|
+
:type exchange: InternalExchange
|
883
892
|
:param _request_timeout: timeout setting for this request. If one
|
884
893
|
number provided, it will be total request
|
885
894
|
timeout. It can also be a pair (tuple) of
|
@@ -912,7 +921,7 @@ class ExchangesApi:
|
|
912
921
|
)
|
913
922
|
|
914
923
|
_response_types_map: Dict[str, Optional[str]] = {
|
915
|
-
"200": "List[
|
924
|
+
"200": "List[ExchangeMapping]",
|
916
925
|
}
|
917
926
|
response_data = await self.api_client.call_api(
|
918
927
|
*_param, _request_timeout=_request_timeout
|
@@ -943,12 +952,14 @@ class ExchangesApi:
|
|
943
952
|
_body_params: Optional[bytes] = None
|
944
953
|
|
945
954
|
# process the path parameters
|
946
|
-
if market is not None:
|
947
|
-
_path_params["market"] = market
|
948
955
|
# process the query parameters
|
956
|
+
if market is not None:
|
957
|
+
|
958
|
+
_query_params.append(("market", market.value))
|
959
|
+
|
949
960
|
if exchange is not None:
|
950
961
|
|
951
|
-
_query_params.append(("exchange", exchange))
|
962
|
+
_query_params.append(("exchange", exchange.value))
|
952
963
|
|
953
964
|
# process the header parameters
|
954
965
|
# process the form parameters
|
@@ -965,7 +976,7 @@ class ExchangesApi:
|
|
965
976
|
|
966
977
|
return self.api_client.param_serialize(
|
967
978
|
method="GET",
|
968
|
-
resource_path="/
|
979
|
+
resource_path="/exchanges/mappings",
|
969
980
|
path_params=_path_params,
|
970
981
|
query_params=_query_params,
|
971
982
|
header_params=_header_params,
|
@@ -19,6 +19,7 @@ from typing_extensions import Annotated
|
|
19
19
|
from pydantic import Field, StrictInt, StrictStr
|
20
20
|
from typing import Any, Dict, Optional
|
21
21
|
from typing_extensions import Annotated
|
22
|
+
from crypticorn.metrics.client.models.market_type import MarketType
|
22
23
|
|
23
24
|
from crypticorn.metrics.client.api_client import ApiClient, RequestSerialized
|
24
25
|
from crypticorn.metrics.client.api_response import ApiResponse
|
@@ -40,8 +41,10 @@ class IndicatorsApi:
|
|
40
41
|
@validate_call
|
41
42
|
async def get_ker_indicator(
|
42
43
|
self,
|
43
|
-
symbol:
|
44
|
-
|
44
|
+
symbol: Annotated[
|
45
|
+
StrictStr, Field(description="Symbol to fetch KER indicator for")
|
46
|
+
],
|
47
|
+
market: Annotated[Optional[MarketType], Field(description="Market")] = None,
|
45
48
|
period: Annotated[
|
46
49
|
Optional[StrictInt], Field(description="KER indicator period")
|
47
50
|
] = None,
|
@@ -65,10 +68,10 @@ class IndicatorsApi:
|
|
65
68
|
|
66
69
|
Calculate and retrieve the KER indicator for a symbol.
|
67
70
|
|
68
|
-
:param symbol: (required)
|
71
|
+
:param symbol: Symbol to fetch KER indicator for (required)
|
69
72
|
:type symbol: str
|
70
73
|
:param market: Market
|
71
|
-
:type market:
|
74
|
+
:type market: MarketType
|
72
75
|
:param period: KER indicator period
|
73
76
|
:type period: int
|
74
77
|
:param timestamp: Timestamp for which to fetch KER indicator
|
@@ -121,8 +124,10 @@ class IndicatorsApi:
|
|
121
124
|
@validate_call
|
122
125
|
async def get_ker_indicator_with_http_info(
|
123
126
|
self,
|
124
|
-
symbol:
|
125
|
-
|
127
|
+
symbol: Annotated[
|
128
|
+
StrictStr, Field(description="Symbol to fetch KER indicator for")
|
129
|
+
],
|
130
|
+
market: Annotated[Optional[MarketType], Field(description="Market")] = None,
|
126
131
|
period: Annotated[
|
127
132
|
Optional[StrictInt], Field(description="KER indicator period")
|
128
133
|
] = None,
|
@@ -146,10 +151,10 @@ class IndicatorsApi:
|
|
146
151
|
|
147
152
|
Calculate and retrieve the KER indicator for a symbol.
|
148
153
|
|
149
|
-
:param symbol: (required)
|
154
|
+
:param symbol: Symbol to fetch KER indicator for (required)
|
150
155
|
:type symbol: str
|
151
156
|
:param market: Market
|
152
|
-
:type market:
|
157
|
+
:type market: MarketType
|
153
158
|
:param period: KER indicator period
|
154
159
|
:type period: int
|
155
160
|
:param timestamp: Timestamp for which to fetch KER indicator
|
@@ -202,8 +207,10 @@ class IndicatorsApi:
|
|
202
207
|
@validate_call
|
203
208
|
async def get_ker_indicator_without_preload_content(
|
204
209
|
self,
|
205
|
-
symbol:
|
206
|
-
|
210
|
+
symbol: Annotated[
|
211
|
+
StrictStr, Field(description="Symbol to fetch KER indicator for")
|
212
|
+
],
|
213
|
+
market: Annotated[Optional[MarketType], Field(description="Market")] = None,
|
207
214
|
period: Annotated[
|
208
215
|
Optional[StrictInt], Field(description="KER indicator period")
|
209
216
|
] = None,
|
@@ -227,10 +234,10 @@ class IndicatorsApi:
|
|
227
234
|
|
228
235
|
Calculate and retrieve the KER indicator for a symbol.
|
229
236
|
|
230
|
-
:param symbol: (required)
|
237
|
+
:param symbol: Symbol to fetch KER indicator for (required)
|
231
238
|
:type symbol: str
|
232
239
|
:param market: Market
|
233
|
-
:type market:
|
240
|
+
:type market: MarketType
|
234
241
|
:param period: KER indicator period
|
235
242
|
:type period: int
|
236
243
|
:param timestamp: Timestamp for which to fetch KER indicator
|
@@ -302,12 +309,14 @@ class IndicatorsApi:
|
|
302
309
|
_body_params: Optional[bytes] = None
|
303
310
|
|
304
311
|
# process the path parameters
|
305
|
-
if symbol is not None:
|
306
|
-
_path_params["symbol"] = symbol
|
307
312
|
# process the query parameters
|
313
|
+
if symbol is not None:
|
314
|
+
|
315
|
+
_query_params.append(("symbol", symbol))
|
316
|
+
|
308
317
|
if market is not None:
|
309
318
|
|
310
|
-
_query_params.append(("market", market))
|
319
|
+
_query_params.append(("market", market.value))
|
311
320
|
|
312
321
|
if period is not None:
|
313
322
|
|
@@ -332,7 +341,7 @@ class IndicatorsApi:
|
|
332
341
|
|
333
342
|
return self.api_client.param_serialize(
|
334
343
|
method="GET",
|
335
|
-
resource_path="/ker
|
344
|
+
resource_path="/indicators/ker",
|
336
345
|
path_params=_path_params,
|
337
346
|
query_params=_query_params,
|
338
347
|
header_params=_header_params,
|
@@ -348,9 +357,11 @@ class IndicatorsApi:
|
|
348
357
|
@validate_call
|
349
358
|
async def get_sma_indicator(
|
350
359
|
self,
|
351
|
-
symbol:
|
360
|
+
symbol: Annotated[
|
361
|
+
StrictStr, Field(description="Symbol to fetch SMA indicator for")
|
362
|
+
],
|
352
363
|
market: Annotated[
|
353
|
-
Optional[
|
364
|
+
Optional[MarketType],
|
354
365
|
Field(description="The market type to use for the SMA indicator"),
|
355
366
|
] = None,
|
356
367
|
period: Annotated[
|
@@ -377,10 +388,10 @@ class IndicatorsApi:
|
|
377
388
|
|
378
389
|
Calculate and retrieve the Simple Moving Average (SMA) indicator for a symbol.
|
379
390
|
|
380
|
-
:param symbol: (required)
|
391
|
+
:param symbol: Symbol to fetch SMA indicator for (required)
|
381
392
|
:type symbol: str
|
382
393
|
:param market: The market type to use for the SMA indicator
|
383
|
-
:type market:
|
394
|
+
:type market: MarketType
|
384
395
|
:param period: The period to use for the SMA indicator
|
385
396
|
:type period: int
|
386
397
|
:param timestamp: The timestamp for which to fetch the SMA indicator
|
@@ -433,9 +444,11 @@ class IndicatorsApi:
|
|
433
444
|
@validate_call
|
434
445
|
async def get_sma_indicator_with_http_info(
|
435
446
|
self,
|
436
|
-
symbol:
|
447
|
+
symbol: Annotated[
|
448
|
+
StrictStr, Field(description="Symbol to fetch SMA indicator for")
|
449
|
+
],
|
437
450
|
market: Annotated[
|
438
|
-
Optional[
|
451
|
+
Optional[MarketType],
|
439
452
|
Field(description="The market type to use for the SMA indicator"),
|
440
453
|
] = None,
|
441
454
|
period: Annotated[
|
@@ -462,10 +475,10 @@ class IndicatorsApi:
|
|
462
475
|
|
463
476
|
Calculate and retrieve the Simple Moving Average (SMA) indicator for a symbol.
|
464
477
|
|
465
|
-
:param symbol: (required)
|
478
|
+
:param symbol: Symbol to fetch SMA indicator for (required)
|
466
479
|
:type symbol: str
|
467
480
|
:param market: The market type to use for the SMA indicator
|
468
|
-
:type market:
|
481
|
+
:type market: MarketType
|
469
482
|
:param period: The period to use for the SMA indicator
|
470
483
|
:type period: int
|
471
484
|
:param timestamp: The timestamp for which to fetch the SMA indicator
|
@@ -518,9 +531,11 @@ class IndicatorsApi:
|
|
518
531
|
@validate_call
|
519
532
|
async def get_sma_indicator_without_preload_content(
|
520
533
|
self,
|
521
|
-
symbol:
|
534
|
+
symbol: Annotated[
|
535
|
+
StrictStr, Field(description="Symbol to fetch SMA indicator for")
|
536
|
+
],
|
522
537
|
market: Annotated[
|
523
|
-
Optional[
|
538
|
+
Optional[MarketType],
|
524
539
|
Field(description="The market type to use for the SMA indicator"),
|
525
540
|
] = None,
|
526
541
|
period: Annotated[
|
@@ -547,10 +562,10 @@ class IndicatorsApi:
|
|
547
562
|
|
548
563
|
Calculate and retrieve the Simple Moving Average (SMA) indicator for a symbol.
|
549
564
|
|
550
|
-
:param symbol: (required)
|
565
|
+
:param symbol: Symbol to fetch SMA indicator for (required)
|
551
566
|
:type symbol: str
|
552
567
|
:param market: The market type to use for the SMA indicator
|
553
|
-
:type market:
|
568
|
+
:type market: MarketType
|
554
569
|
:param period: The period to use for the SMA indicator
|
555
570
|
:type period: int
|
556
571
|
:param timestamp: The timestamp for which to fetch the SMA indicator
|
@@ -622,12 +637,14 @@ class IndicatorsApi:
|
|
622
637
|
_body_params: Optional[bytes] = None
|
623
638
|
|
624
639
|
# process the path parameters
|
625
|
-
if symbol is not None:
|
626
|
-
_path_params["symbol"] = symbol
|
627
640
|
# process the query parameters
|
641
|
+
if symbol is not None:
|
642
|
+
|
643
|
+
_query_params.append(("symbol", symbol))
|
644
|
+
|
628
645
|
if market is not None:
|
629
646
|
|
630
|
-
_query_params.append(("market", market))
|
647
|
+
_query_params.append(("market", market.value))
|
631
648
|
|
632
649
|
if period is not None:
|
633
650
|
|
@@ -652,7 +669,7 @@ class IndicatorsApi:
|
|
652
669
|
|
653
670
|
return self.api_client.param_serialize(
|
654
671
|
method="GET",
|
655
|
-
resource_path="/sma
|
672
|
+
resource_path="/indicators/sma",
|
656
673
|
path_params=_path_params,
|
657
674
|
query_params=_query_params,
|
658
675
|
header_params=_header_params,
|
@@ -16,8 +16,8 @@ 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, StrictInt
|
20
|
-
from typing import List, Optional
|
19
|
+
from pydantic import Field, StrictInt
|
20
|
+
from typing import Any, Dict, List, Optional
|
21
21
|
from typing_extensions import Annotated
|
22
22
|
from crypticorn.metrics.client.models.severity import Severity
|
23
23
|
|
@@ -63,7 +63,7 @@ class LogsApi:
|
|
63
63
|
_content_type: Optional[StrictStr] = None,
|
64
64
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
65
65
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
66
|
-
) -> List[str]:
|
66
|
+
) -> List[Dict[str, object]]:
|
67
67
|
"""Get Error Logs
|
68
68
|
|
69
69
|
Get error logs with filtering options.
|
@@ -107,7 +107,7 @@ class LogsApi:
|
|
107
107
|
)
|
108
108
|
|
109
109
|
_response_types_map: Dict[str, Optional[str]] = {
|
110
|
-
"200": "List[str]",
|
110
|
+
"200": "List[Dict[str, object]]",
|
111
111
|
}
|
112
112
|
response_data = await self.api_client.call_api(
|
113
113
|
*_param, _request_timeout=_request_timeout
|
@@ -143,7 +143,7 @@ class LogsApi:
|
|
143
143
|
_content_type: Optional[StrictStr] = None,
|
144
144
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
145
145
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
146
|
-
) -> ApiResponse[List[str]]:
|
146
|
+
) -> ApiResponse[List[Dict[str, object]]]:
|
147
147
|
"""Get Error Logs
|
148
148
|
|
149
149
|
Get error logs with filtering options.
|
@@ -187,7 +187,7 @@ class LogsApi:
|
|
187
187
|
)
|
188
188
|
|
189
189
|
_response_types_map: Dict[str, Optional[str]] = {
|
190
|
-
"200": "List[str]",
|
190
|
+
"200": "List[Dict[str, object]]",
|
191
191
|
}
|
192
192
|
response_data = await self.api_client.call_api(
|
193
193
|
*_param, _request_timeout=_request_timeout
|
@@ -267,7 +267,7 @@ class LogsApi:
|
|
267
267
|
)
|
268
268
|
|
269
269
|
_response_types_map: Dict[str, Optional[str]] = {
|
270
|
-
"200": "List[str]",
|
270
|
+
"200": "List[Dict[str, object]]",
|
271
271
|
}
|
272
272
|
response_data = await self.api_client.call_api(
|
273
273
|
*_param, _request_timeout=_request_timeout
|