crypticorn 2.8.0rc7__py3-none-any.whl → 2.8.0rc9__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 +5 -1
- crypticorn/common/__init__.py +2 -0
- crypticorn/common/ansi_colors.py +2 -1
- crypticorn/common/auth.py +2 -2
- crypticorn/common/enums.py +2 -0
- crypticorn/common/errors.py +8 -5
- crypticorn/common/exceptions.py +24 -20
- crypticorn/common/logging.py +19 -12
- crypticorn/common/middleware.py +4 -4
- crypticorn/common/mixins.py +10 -3
- crypticorn/common/openapi.py +11 -0
- crypticorn/common/pagination.py +2 -0
- crypticorn/common/router/admin_router.py +3 -3
- crypticorn/common/router/status_router.py +9 -2
- crypticorn/common/scopes.py +3 -3
- crypticorn/common/urls.py +9 -0
- crypticorn/common/utils.py +16 -8
- crypticorn/common/warnings.py +63 -0
- crypticorn/hive/utils.py +1 -2
- 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.0rc9.dist-info}/METADATA +3 -2
- {crypticorn-2.8.0rc7.dist-info → crypticorn-2.8.0rc9.dist-info}/RECORD +47 -34
- {crypticorn-2.8.0rc7.dist-info → crypticorn-2.8.0rc9.dist-info}/WHEEL +0 -0
- {crypticorn-2.8.0rc7.dist-info → crypticorn-2.8.0rc9.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.8.0rc7.dist-info → crypticorn-2.8.0rc9.dist-info}/top_level.txt +0 -0
@@ -19,6 +19,9 @@ from typing_extensions import Annotated
|
|
19
19
|
from pydantic import Field, StrictInt, StrictStr, field_validator
|
20
20
|
from typing import Any, Dict, List, Optional
|
21
21
|
from typing_extensions import Annotated
|
22
|
+
from crypticorn.metrics.client.models.market_type import MarketType
|
23
|
+
from crypticorn.metrics.client.models.marketcap_ranking import MarketcapRanking
|
24
|
+
from crypticorn.metrics.client.models.ohlcv import OHLCV
|
22
25
|
|
23
26
|
from crypticorn.metrics.client.api_client import ApiClient, RequestSerialized
|
24
27
|
from crypticorn.metrics.client.api_response import ApiResponse
|
@@ -277,7 +280,7 @@ class MarketcapApi:
|
|
277
280
|
|
278
281
|
return self.api_client.param_serialize(
|
279
282
|
method="GET",
|
280
|
-
resource_path="/
|
283
|
+
resource_path="/marketcap/current",
|
281
284
|
path_params=_path_params,
|
282
285
|
query_params=_query_params,
|
283
286
|
header_params=_header_params,
|
@@ -577,7 +580,7 @@ class MarketcapApi:
|
|
577
580
|
Field(description="Interval for which to fetch symbols and marketcap data"),
|
578
581
|
] = None,
|
579
582
|
market: Annotated[
|
580
|
-
Optional[
|
583
|
+
Optional[MarketType],
|
581
584
|
Field(description="Market for which to fetch symbols and marketcap data"),
|
582
585
|
] = None,
|
583
586
|
exchange: Annotated[
|
@@ -595,7 +598,7 @@ class MarketcapApi:
|
|
595
598
|
_content_type: Optional[StrictStr] = None,
|
596
599
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
597
600
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
598
|
-
) -> List[
|
601
|
+
) -> List[MarketcapRanking]:
|
599
602
|
"""Get Symbols Marketcap Between Timestamps
|
600
603
|
|
601
604
|
Retrieve marketcap data for symbols between timestamps with optional filtering.
|
@@ -607,7 +610,7 @@ class MarketcapApi:
|
|
607
610
|
:param interval: Interval for which to fetch symbols and marketcap data
|
608
611
|
:type interval: str
|
609
612
|
:param market: Market for which to fetch symbols and marketcap data
|
610
|
-
:type market:
|
613
|
+
:type market: MarketType
|
611
614
|
:param exchange: Exchange for which to fetch symbols and marketcap data
|
612
615
|
:type exchange: str
|
613
616
|
:param _request_timeout: timeout setting for this request. If one
|
@@ -645,7 +648,7 @@ class MarketcapApi:
|
|
645
648
|
)
|
646
649
|
|
647
650
|
_response_types_map: Dict[str, Optional[str]] = {
|
648
|
-
"200": "List[
|
651
|
+
"200": "List[MarketcapRanking]",
|
649
652
|
}
|
650
653
|
response_data = await self.api_client.call_api(
|
651
654
|
*_param, _request_timeout=_request_timeout
|
@@ -670,7 +673,7 @@ class MarketcapApi:
|
|
670
673
|
Field(description="Interval for which to fetch symbols and marketcap data"),
|
671
674
|
] = None,
|
672
675
|
market: Annotated[
|
673
|
-
Optional[
|
676
|
+
Optional[MarketType],
|
674
677
|
Field(description="Market for which to fetch symbols and marketcap data"),
|
675
678
|
] = None,
|
676
679
|
exchange: Annotated[
|
@@ -688,7 +691,7 @@ class MarketcapApi:
|
|
688
691
|
_content_type: Optional[StrictStr] = None,
|
689
692
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
690
693
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
691
|
-
) -> ApiResponse[List[
|
694
|
+
) -> ApiResponse[List[MarketcapRanking]]:
|
692
695
|
"""Get Symbols Marketcap Between Timestamps
|
693
696
|
|
694
697
|
Retrieve marketcap data for symbols between timestamps with optional filtering.
|
@@ -700,7 +703,7 @@ class MarketcapApi:
|
|
700
703
|
:param interval: Interval for which to fetch symbols and marketcap data
|
701
704
|
:type interval: str
|
702
705
|
:param market: Market for which to fetch symbols and marketcap data
|
703
|
-
:type market:
|
706
|
+
:type market: MarketType
|
704
707
|
:param exchange: Exchange for which to fetch symbols and marketcap data
|
705
708
|
:type exchange: str
|
706
709
|
:param _request_timeout: timeout setting for this request. If one
|
@@ -738,7 +741,7 @@ class MarketcapApi:
|
|
738
741
|
)
|
739
742
|
|
740
743
|
_response_types_map: Dict[str, Optional[str]] = {
|
741
|
-
"200": "List[
|
744
|
+
"200": "List[MarketcapRanking]",
|
742
745
|
}
|
743
746
|
response_data = await self.api_client.call_api(
|
744
747
|
*_param, _request_timeout=_request_timeout
|
@@ -763,7 +766,7 @@ class MarketcapApi:
|
|
763
766
|
Field(description="Interval for which to fetch symbols and marketcap data"),
|
764
767
|
] = None,
|
765
768
|
market: Annotated[
|
766
|
-
Optional[
|
769
|
+
Optional[MarketType],
|
767
770
|
Field(description="Market for which to fetch symbols and marketcap data"),
|
768
771
|
] = None,
|
769
772
|
exchange: Annotated[
|
@@ -793,7 +796,7 @@ class MarketcapApi:
|
|
793
796
|
:param interval: Interval for which to fetch symbols and marketcap data
|
794
797
|
:type interval: str
|
795
798
|
:param market: Market for which to fetch symbols and marketcap data
|
796
|
-
:type market:
|
799
|
+
:type market: MarketType
|
797
800
|
:param exchange: Exchange for which to fetch symbols and marketcap data
|
798
801
|
:type exchange: str
|
799
802
|
:param _request_timeout: timeout setting for this request. If one
|
@@ -831,7 +834,7 @@ class MarketcapApi:
|
|
831
834
|
)
|
832
835
|
|
833
836
|
_response_types_map: Dict[str, Optional[str]] = {
|
834
|
-
"200": "List[
|
837
|
+
"200": "List[MarketcapRanking]",
|
835
838
|
}
|
836
839
|
response_data = await self.api_client.call_api(
|
837
840
|
*_param, _request_timeout=_request_timeout
|
@@ -880,7 +883,7 @@ class MarketcapApi:
|
|
880
883
|
|
881
884
|
if market is not None:
|
882
885
|
|
883
|
-
_query_params.append(("market", market))
|
886
|
+
_query_params.append(("market", market.value))
|
884
887
|
|
885
888
|
if exchange is not None:
|
886
889
|
|
@@ -925,7 +928,7 @@ class MarketcapApi:
|
|
925
928
|
Optional[StrictStr], Field(description="Timeframe for OHLCV data")
|
926
929
|
] = None,
|
927
930
|
market: Annotated[
|
928
|
-
Optional[
|
931
|
+
Optional[MarketType], Field(description="Market for OHLCV data")
|
929
932
|
] = None,
|
930
933
|
top_n: Annotated[
|
931
934
|
Optional[StrictInt], Field(description="Number of symbols to fetch")
|
@@ -945,7 +948,7 @@ class MarketcapApi:
|
|
945
948
|
_content_type: Optional[StrictStr] = None,
|
946
949
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
947
950
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
948
|
-
) ->
|
951
|
+
) -> Dict[str, List[OHLCV]]:
|
949
952
|
"""Get Symbols Marketcap With Ohlcv
|
950
953
|
|
951
954
|
Retrieve OHLCV data with marketcap for symbols at a specific timestamp.
|
@@ -955,7 +958,7 @@ class MarketcapApi:
|
|
955
958
|
:param timeframe: Timeframe for OHLCV data
|
956
959
|
:type timeframe: str
|
957
960
|
:param market: Market for OHLCV data
|
958
|
-
:type market:
|
961
|
+
:type market: MarketType
|
959
962
|
:param top_n: Number of symbols to fetch
|
960
963
|
:type top_n: int
|
961
964
|
:param ohlcv_limit: Number of OHLCV data points to fetch
|
@@ -995,7 +998,7 @@ class MarketcapApi:
|
|
995
998
|
)
|
996
999
|
|
997
1000
|
_response_types_map: Dict[str, Optional[str]] = {
|
998
|
-
"200": "
|
1001
|
+
"200": "Dict[str, List[OHLCV]]",
|
999
1002
|
}
|
1000
1003
|
response_data = await self.api_client.call_api(
|
1001
1004
|
*_param, _request_timeout=_request_timeout
|
@@ -1017,7 +1020,7 @@ class MarketcapApi:
|
|
1017
1020
|
Optional[StrictStr], Field(description="Timeframe for OHLCV data")
|
1018
1021
|
] = None,
|
1019
1022
|
market: Annotated[
|
1020
|
-
Optional[
|
1023
|
+
Optional[MarketType], Field(description="Market for OHLCV data")
|
1021
1024
|
] = None,
|
1022
1025
|
top_n: Annotated[
|
1023
1026
|
Optional[StrictInt], Field(description="Number of symbols to fetch")
|
@@ -1037,7 +1040,7 @@ class MarketcapApi:
|
|
1037
1040
|
_content_type: Optional[StrictStr] = None,
|
1038
1041
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1039
1042
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1040
|
-
) -> ApiResponse[
|
1043
|
+
) -> ApiResponse[Dict[str, List[OHLCV]]]:
|
1041
1044
|
"""Get Symbols Marketcap With Ohlcv
|
1042
1045
|
|
1043
1046
|
Retrieve OHLCV data with marketcap for symbols at a specific timestamp.
|
@@ -1047,7 +1050,7 @@ class MarketcapApi:
|
|
1047
1050
|
:param timeframe: Timeframe for OHLCV data
|
1048
1051
|
:type timeframe: str
|
1049
1052
|
:param market: Market for OHLCV data
|
1050
|
-
:type market:
|
1053
|
+
:type market: MarketType
|
1051
1054
|
:param top_n: Number of symbols to fetch
|
1052
1055
|
:type top_n: int
|
1053
1056
|
:param ohlcv_limit: Number of OHLCV data points to fetch
|
@@ -1087,7 +1090,7 @@ class MarketcapApi:
|
|
1087
1090
|
)
|
1088
1091
|
|
1089
1092
|
_response_types_map: Dict[str, Optional[str]] = {
|
1090
|
-
"200": "
|
1093
|
+
"200": "Dict[str, List[OHLCV]]",
|
1091
1094
|
}
|
1092
1095
|
response_data = await self.api_client.call_api(
|
1093
1096
|
*_param, _request_timeout=_request_timeout
|
@@ -1109,7 +1112,7 @@ class MarketcapApi:
|
|
1109
1112
|
Optional[StrictStr], Field(description="Timeframe for OHLCV data")
|
1110
1113
|
] = None,
|
1111
1114
|
market: Annotated[
|
1112
|
-
Optional[
|
1115
|
+
Optional[MarketType], Field(description="Market for OHLCV data")
|
1113
1116
|
] = None,
|
1114
1117
|
top_n: Annotated[
|
1115
1118
|
Optional[StrictInt], Field(description="Number of symbols to fetch")
|
@@ -1139,7 +1142,7 @@ class MarketcapApi:
|
|
1139
1142
|
:param timeframe: Timeframe for OHLCV data
|
1140
1143
|
:type timeframe: str
|
1141
1144
|
:param market: Market for OHLCV data
|
1142
|
-
:type market:
|
1145
|
+
:type market: MarketType
|
1143
1146
|
:param top_n: Number of symbols to fetch
|
1144
1147
|
:type top_n: int
|
1145
1148
|
:param ohlcv_limit: Number of OHLCV data points to fetch
|
@@ -1179,7 +1182,7 @@ class MarketcapApi:
|
|
1179
1182
|
)
|
1180
1183
|
|
1181
1184
|
_response_types_map: Dict[str, Optional[str]] = {
|
1182
|
-
"200": "
|
1185
|
+
"200": "Dict[str, List[OHLCV]]",
|
1183
1186
|
}
|
1184
1187
|
response_data = await self.api_client.call_api(
|
1185
1188
|
*_param, _request_timeout=_request_timeout
|
@@ -1224,7 +1227,7 @@ class MarketcapApi:
|
|
1224
1227
|
|
1225
1228
|
if market is not None:
|
1226
1229
|
|
1227
|
-
_query_params.append(("market", market))
|
1230
|
+
_query_params.append(("market", market.value))
|
1228
1231
|
|
1229
1232
|
if top_n is not None:
|
1230
1233
|
|
@@ -17,8 +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, StrictStr
|
20
|
-
from typing import List, Optional
|
20
|
+
from typing import Any, Dict, List, Optional
|
21
21
|
from typing_extensions import Annotated
|
22
|
+
from crypticorn.metrics.client.models.market_type import MarketType
|
22
23
|
from crypticorn.metrics.client.models.trading_status import TradingStatus
|
23
24
|
|
24
25
|
from crypticorn.metrics.client.api_client import ApiClient, RequestSerialized
|
@@ -42,9 +43,14 @@ class MarketsApi:
|
|
42
43
|
async def get_available_markets_for_symbol(
|
43
44
|
self,
|
44
45
|
market: Annotated[
|
45
|
-
|
46
|
+
MarketType, Field(description="Market type (spot or futures)")
|
47
|
+
],
|
48
|
+
ticker: Annotated[
|
49
|
+
StrictStr,
|
50
|
+
Field(
|
51
|
+
description="Ticker to fetch markets for. Strip the quote currency from the ticker."
|
52
|
+
),
|
46
53
|
],
|
47
|
-
symbol: Annotated[StrictStr, Field(description="Symbol to fetch markets for")],
|
48
54
|
quote_currency: Annotated[
|
49
55
|
Optional[StrictStr],
|
50
56
|
Field(description="Quote currency for which to fetch markets"),
|
@@ -64,15 +70,15 @@ class MarketsApi:
|
|
64
70
|
_content_type: Optional[StrictStr] = None,
|
65
71
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
66
72
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
67
|
-
) -> List[str]:
|
73
|
+
) -> List[Dict[str, object]]:
|
68
74
|
"""Get Markets For Symbol
|
69
75
|
|
70
76
|
Get markets for a symbol with filtering options.
|
71
77
|
|
72
78
|
:param market: Market type (spot or futures) (required)
|
73
|
-
:type market:
|
74
|
-
:param
|
75
|
-
:type
|
79
|
+
:type market: MarketType
|
80
|
+
:param ticker: Ticker to fetch markets for. Strip the quote currency from the ticker. (required)
|
81
|
+
:type ticker: str
|
76
82
|
:param quote_currency: Quote currency for which to fetch markets
|
77
83
|
:type quote_currency: str
|
78
84
|
:param status: Trading pair status for which to fetch markets
|
@@ -101,7 +107,7 @@ class MarketsApi:
|
|
101
107
|
|
102
108
|
_param = self._get_available_markets_for_symbol_serialize(
|
103
109
|
market=market,
|
104
|
-
|
110
|
+
ticker=ticker,
|
105
111
|
quote_currency=quote_currency,
|
106
112
|
status=status,
|
107
113
|
_request_auth=_request_auth,
|
@@ -111,7 +117,7 @@ class MarketsApi:
|
|
111
117
|
)
|
112
118
|
|
113
119
|
_response_types_map: Dict[str, Optional[str]] = {
|
114
|
-
"200": "List[str]",
|
120
|
+
"200": "List[Dict[str, object]]",
|
115
121
|
}
|
116
122
|
response_data = await self.api_client.call_api(
|
117
123
|
*_param, _request_timeout=_request_timeout
|
@@ -126,9 +132,14 @@ class MarketsApi:
|
|
126
132
|
async def get_available_markets_for_symbol_with_http_info(
|
127
133
|
self,
|
128
134
|
market: Annotated[
|
129
|
-
|
135
|
+
MarketType, Field(description="Market type (spot or futures)")
|
136
|
+
],
|
137
|
+
ticker: Annotated[
|
138
|
+
StrictStr,
|
139
|
+
Field(
|
140
|
+
description="Ticker to fetch markets for. Strip the quote currency from the ticker."
|
141
|
+
),
|
130
142
|
],
|
131
|
-
symbol: Annotated[StrictStr, Field(description="Symbol to fetch markets for")],
|
132
143
|
quote_currency: Annotated[
|
133
144
|
Optional[StrictStr],
|
134
145
|
Field(description="Quote currency for which to fetch markets"),
|
@@ -148,15 +159,15 @@ class MarketsApi:
|
|
148
159
|
_content_type: Optional[StrictStr] = None,
|
149
160
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
150
161
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
151
|
-
) -> ApiResponse[List[str]]:
|
162
|
+
) -> ApiResponse[List[Dict[str, object]]]:
|
152
163
|
"""Get Markets For Symbol
|
153
164
|
|
154
165
|
Get markets for a symbol with filtering options.
|
155
166
|
|
156
167
|
:param market: Market type (spot or futures) (required)
|
157
|
-
:type market:
|
158
|
-
:param
|
159
|
-
:type
|
168
|
+
:type market: MarketType
|
169
|
+
:param ticker: Ticker to fetch markets for. Strip the quote currency from the ticker. (required)
|
170
|
+
:type ticker: str
|
160
171
|
:param quote_currency: Quote currency for which to fetch markets
|
161
172
|
:type quote_currency: str
|
162
173
|
:param status: Trading pair status for which to fetch markets
|
@@ -185,7 +196,7 @@ class MarketsApi:
|
|
185
196
|
|
186
197
|
_param = self._get_available_markets_for_symbol_serialize(
|
187
198
|
market=market,
|
188
|
-
|
199
|
+
ticker=ticker,
|
189
200
|
quote_currency=quote_currency,
|
190
201
|
status=status,
|
191
202
|
_request_auth=_request_auth,
|
@@ -195,7 +206,7 @@ class MarketsApi:
|
|
195
206
|
)
|
196
207
|
|
197
208
|
_response_types_map: Dict[str, Optional[str]] = {
|
198
|
-
"200": "List[str]",
|
209
|
+
"200": "List[Dict[str, object]]",
|
199
210
|
}
|
200
211
|
response_data = await self.api_client.call_api(
|
201
212
|
*_param, _request_timeout=_request_timeout
|
@@ -210,9 +221,14 @@ class MarketsApi:
|
|
210
221
|
async def get_available_markets_for_symbol_without_preload_content(
|
211
222
|
self,
|
212
223
|
market: Annotated[
|
213
|
-
|
224
|
+
MarketType, Field(description="Market type (spot or futures)")
|
225
|
+
],
|
226
|
+
ticker: Annotated[
|
227
|
+
StrictStr,
|
228
|
+
Field(
|
229
|
+
description="Ticker to fetch markets for. Strip the quote currency from the ticker."
|
230
|
+
),
|
214
231
|
],
|
215
|
-
symbol: Annotated[StrictStr, Field(description="Symbol to fetch markets for")],
|
216
232
|
quote_currency: Annotated[
|
217
233
|
Optional[StrictStr],
|
218
234
|
Field(description="Quote currency for which to fetch markets"),
|
@@ -238,9 +254,9 @@ class MarketsApi:
|
|
238
254
|
Get markets for a symbol with filtering options.
|
239
255
|
|
240
256
|
:param market: Market type (spot or futures) (required)
|
241
|
-
:type market:
|
242
|
-
:param
|
243
|
-
:type
|
257
|
+
:type market: MarketType
|
258
|
+
:param ticker: Ticker to fetch markets for. Strip the quote currency from the ticker. (required)
|
259
|
+
:type ticker: str
|
244
260
|
:param quote_currency: Quote currency for which to fetch markets
|
245
261
|
:type quote_currency: str
|
246
262
|
:param status: Trading pair status for which to fetch markets
|
@@ -269,7 +285,7 @@ class MarketsApi:
|
|
269
285
|
|
270
286
|
_param = self._get_available_markets_for_symbol_serialize(
|
271
287
|
market=market,
|
272
|
-
|
288
|
+
ticker=ticker,
|
273
289
|
quote_currency=quote_currency,
|
274
290
|
status=status,
|
275
291
|
_request_auth=_request_auth,
|
@@ -279,7 +295,7 @@ class MarketsApi:
|
|
279
295
|
)
|
280
296
|
|
281
297
|
_response_types_map: Dict[str, Optional[str]] = {
|
282
|
-
"200": "List[str]",
|
298
|
+
"200": "List[Dict[str, object]]",
|
283
299
|
}
|
284
300
|
response_data = await self.api_client.call_api(
|
285
301
|
*_param, _request_timeout=_request_timeout
|
@@ -289,7 +305,7 @@ class MarketsApi:
|
|
289
305
|
def _get_available_markets_for_symbol_serialize(
|
290
306
|
self,
|
291
307
|
market,
|
292
|
-
|
308
|
+
ticker,
|
293
309
|
quote_currency,
|
294
310
|
status,
|
295
311
|
_request_auth,
|
@@ -312,267 +328,23 @@ class MarketsApi:
|
|
312
328
|
_body_params: Optional[bytes] = None
|
313
329
|
|
314
330
|
# process the path parameters
|
315
|
-
if market is not None:
|
316
|
-
_path_params["market"] = market
|
317
|
-
if symbol is not None:
|
318
|
-
_path_params["symbol"] = symbol
|
319
331
|
# process the query parameters
|
320
|
-
if
|
321
|
-
|
322
|
-
_query_params.append(("quote_currency", quote_currency))
|
323
|
-
|
324
|
-
if status is not None:
|
325
|
-
|
326
|
-
_query_params.append(("status", status.value))
|
327
|
-
|
328
|
-
# process the header parameters
|
329
|
-
# process the form parameters
|
330
|
-
# process the body parameter
|
331
|
-
|
332
|
-
# set the HTTP header `Accept`
|
333
|
-
if "Accept" not in _header_params:
|
334
|
-
_header_params["Accept"] = self.api_client.select_header_accept(
|
335
|
-
["application/json"]
|
336
|
-
)
|
337
|
-
|
338
|
-
# authentication setting
|
339
|
-
_auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
|
340
|
-
|
341
|
-
return self.api_client.param_serialize(
|
342
|
-
method="GET",
|
343
|
-
resource_path="/markets/{market}/{symbol}",
|
344
|
-
path_params=_path_params,
|
345
|
-
query_params=_query_params,
|
346
|
-
header_params=_header_params,
|
347
|
-
body=_body_params,
|
348
|
-
post_params=_form_params,
|
349
|
-
files=_files,
|
350
|
-
auth_settings=_auth_settings,
|
351
|
-
collection_formats=_collection_formats,
|
352
|
-
_host=_host,
|
353
|
-
_request_auth=_request_auth,
|
354
|
-
)
|
355
|
-
|
356
|
-
@validate_call
|
357
|
-
async def get_quote_currencies(
|
358
|
-
self,
|
359
|
-
market: Annotated[
|
360
|
-
StrictStr, Field(description="Market type (spot or futures)")
|
361
|
-
],
|
362
|
-
_request_timeout: Union[
|
363
|
-
None,
|
364
|
-
Annotated[StrictFloat, Field(gt=0)],
|
365
|
-
Tuple[
|
366
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
367
|
-
],
|
368
|
-
] = None,
|
369
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
370
|
-
_content_type: Optional[StrictStr] = None,
|
371
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
372
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
373
|
-
) -> List[str]:
|
374
|
-
"""Get Quote Currencies
|
375
|
-
|
376
|
-
Get available quote currencies for a market.
|
377
|
-
|
378
|
-
:param market: Market type (spot or futures) (required)
|
379
|
-
:type market: str
|
380
|
-
:param _request_timeout: timeout setting for this request. If one
|
381
|
-
number provided, it will be total request
|
382
|
-
timeout. It can also be a pair (tuple) of
|
383
|
-
(connection, read) timeouts.
|
384
|
-
:type _request_timeout: int, tuple(int, int), optional
|
385
|
-
:param _request_auth: set to override the auth_settings for an a single
|
386
|
-
request; this effectively ignores the
|
387
|
-
authentication in the spec for a single request.
|
388
|
-
:type _request_auth: dict, optional
|
389
|
-
:param _content_type: force content-type for the request.
|
390
|
-
:type _content_type: str, Optional
|
391
|
-
:param _headers: set to override the headers for a single
|
392
|
-
request; this effectively ignores the headers
|
393
|
-
in the spec for a single request.
|
394
|
-
:type _headers: dict, optional
|
395
|
-
:param _host_index: set to override the host_index for a single
|
396
|
-
request; this effectively ignores the host_index
|
397
|
-
in the spec for a single request.
|
398
|
-
:type _host_index: int, optional
|
399
|
-
:return: Returns the result object.
|
400
|
-
""" # noqa: E501
|
401
|
-
|
402
|
-
_param = self._get_quote_currencies_serialize(
|
403
|
-
market=market,
|
404
|
-
_request_auth=_request_auth,
|
405
|
-
_content_type=_content_type,
|
406
|
-
_headers=_headers,
|
407
|
-
_host_index=_host_index,
|
408
|
-
)
|
409
|
-
|
410
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
411
|
-
"200": "List[str]",
|
412
|
-
}
|
413
|
-
response_data = await self.api_client.call_api(
|
414
|
-
*_param, _request_timeout=_request_timeout
|
415
|
-
)
|
416
|
-
await response_data.read()
|
417
|
-
return self.api_client.response_deserialize(
|
418
|
-
response_data=response_data,
|
419
|
-
response_types_map=_response_types_map,
|
420
|
-
).data
|
421
|
-
|
422
|
-
@validate_call
|
423
|
-
async def get_quote_currencies_with_http_info(
|
424
|
-
self,
|
425
|
-
market: Annotated[
|
426
|
-
StrictStr, Field(description="Market type (spot or futures)")
|
427
|
-
],
|
428
|
-
_request_timeout: Union[
|
429
|
-
None,
|
430
|
-
Annotated[StrictFloat, Field(gt=0)],
|
431
|
-
Tuple[
|
432
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
433
|
-
],
|
434
|
-
] = None,
|
435
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
436
|
-
_content_type: Optional[StrictStr] = None,
|
437
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
438
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
439
|
-
) -> ApiResponse[List[str]]:
|
440
|
-
"""Get Quote Currencies
|
441
|
-
|
442
|
-
Get available quote currencies for a market.
|
443
|
-
|
444
|
-
:param market: Market type (spot or futures) (required)
|
445
|
-
:type market: str
|
446
|
-
:param _request_timeout: timeout setting for this request. If one
|
447
|
-
number provided, it will be total request
|
448
|
-
timeout. It can also be a pair (tuple) of
|
449
|
-
(connection, read) timeouts.
|
450
|
-
:type _request_timeout: int, tuple(int, int), optional
|
451
|
-
:param _request_auth: set to override the auth_settings for an a single
|
452
|
-
request; this effectively ignores the
|
453
|
-
authentication in the spec for a single request.
|
454
|
-
:type _request_auth: dict, optional
|
455
|
-
:param _content_type: force content-type for the request.
|
456
|
-
:type _content_type: str, Optional
|
457
|
-
:param _headers: set to override the headers for a single
|
458
|
-
request; this effectively ignores the headers
|
459
|
-
in the spec for a single request.
|
460
|
-
:type _headers: dict, optional
|
461
|
-
:param _host_index: set to override the host_index for a single
|
462
|
-
request; this effectively ignores the host_index
|
463
|
-
in the spec for a single request.
|
464
|
-
:type _host_index: int, optional
|
465
|
-
:return: Returns the result object.
|
466
|
-
""" # noqa: E501
|
467
|
-
|
468
|
-
_param = self._get_quote_currencies_serialize(
|
469
|
-
market=market,
|
470
|
-
_request_auth=_request_auth,
|
471
|
-
_content_type=_content_type,
|
472
|
-
_headers=_headers,
|
473
|
-
_host_index=_host_index,
|
474
|
-
)
|
332
|
+
if market is not None:
|
475
333
|
|
476
|
-
|
477
|
-
"200": "List[str]",
|
478
|
-
}
|
479
|
-
response_data = await self.api_client.call_api(
|
480
|
-
*_param, _request_timeout=_request_timeout
|
481
|
-
)
|
482
|
-
await response_data.read()
|
483
|
-
return self.api_client.response_deserialize(
|
484
|
-
response_data=response_data,
|
485
|
-
response_types_map=_response_types_map,
|
486
|
-
)
|
334
|
+
_query_params.append(("market", market.value))
|
487
335
|
|
488
|
-
|
489
|
-
async def get_quote_currencies_without_preload_content(
|
490
|
-
self,
|
491
|
-
market: Annotated[
|
492
|
-
StrictStr, Field(description="Market type (spot or futures)")
|
493
|
-
],
|
494
|
-
_request_timeout: Union[
|
495
|
-
None,
|
496
|
-
Annotated[StrictFloat, Field(gt=0)],
|
497
|
-
Tuple[
|
498
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
499
|
-
],
|
500
|
-
] = None,
|
501
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
502
|
-
_content_type: Optional[StrictStr] = None,
|
503
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
504
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
505
|
-
) -> RESTResponseType:
|
506
|
-
"""Get Quote Currencies
|
336
|
+
if ticker is not None:
|
507
337
|
|
508
|
-
|
338
|
+
_query_params.append(("ticker", ticker))
|
509
339
|
|
510
|
-
|
511
|
-
:type market: str
|
512
|
-
:param _request_timeout: timeout setting for this request. If one
|
513
|
-
number provided, it will be total request
|
514
|
-
timeout. It can also be a pair (tuple) of
|
515
|
-
(connection, read) timeouts.
|
516
|
-
:type _request_timeout: int, tuple(int, int), optional
|
517
|
-
:param _request_auth: set to override the auth_settings for an a single
|
518
|
-
request; this effectively ignores the
|
519
|
-
authentication in the spec for a single request.
|
520
|
-
:type _request_auth: dict, optional
|
521
|
-
:param _content_type: force content-type for the request.
|
522
|
-
:type _content_type: str, Optional
|
523
|
-
:param _headers: set to override the headers for a single
|
524
|
-
request; this effectively ignores the headers
|
525
|
-
in the spec for a single request.
|
526
|
-
:type _headers: dict, optional
|
527
|
-
:param _host_index: set to override the host_index for a single
|
528
|
-
request; this effectively ignores the host_index
|
529
|
-
in the spec for a single request.
|
530
|
-
:type _host_index: int, optional
|
531
|
-
:return: Returns the result object.
|
532
|
-
""" # noqa: E501
|
533
|
-
|
534
|
-
_param = self._get_quote_currencies_serialize(
|
535
|
-
market=market,
|
536
|
-
_request_auth=_request_auth,
|
537
|
-
_content_type=_content_type,
|
538
|
-
_headers=_headers,
|
539
|
-
_host_index=_host_index,
|
540
|
-
)
|
541
|
-
|
542
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
543
|
-
"200": "List[str]",
|
544
|
-
}
|
545
|
-
response_data = await self.api_client.call_api(
|
546
|
-
*_param, _request_timeout=_request_timeout
|
547
|
-
)
|
548
|
-
return response_data.response
|
549
|
-
|
550
|
-
def _get_quote_currencies_serialize(
|
551
|
-
self,
|
552
|
-
market,
|
553
|
-
_request_auth,
|
554
|
-
_content_type,
|
555
|
-
_headers,
|
556
|
-
_host_index,
|
557
|
-
) -> RequestSerialized:
|
340
|
+
if quote_currency is not None:
|
558
341
|
|
559
|
-
|
342
|
+
_query_params.append(("quote_currency", quote_currency))
|
560
343
|
|
561
|
-
|
344
|
+
if status is not None:
|
562
345
|
|
563
|
-
|
564
|
-
_query_params: List[Tuple[str, str]] = []
|
565
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
566
|
-
_form_params: List[Tuple[str, str]] = []
|
567
|
-
_files: Dict[
|
568
|
-
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
569
|
-
] = {}
|
570
|
-
_body_params: Optional[bytes] = None
|
346
|
+
_query_params.append(("status", status.value))
|
571
347
|
|
572
|
-
# process the path parameters
|
573
|
-
if market is not None:
|
574
|
-
_path_params["market"] = market
|
575
|
-
# process the query parameters
|
576
348
|
# process the header parameters
|
577
349
|
# process the form parameters
|
578
350
|
# process the body parameter
|
@@ -588,7 +360,7 @@ class MarketsApi:
|
|
588
360
|
|
589
361
|
return self.api_client.param_serialize(
|
590
362
|
method="GET",
|
591
|
-
resource_path="/
|
363
|
+
resource_path="/markets",
|
592
364
|
path_params=_path_params,
|
593
365
|
query_params=_query_params,
|
594
366
|
header_params=_header_params,
|