crypticorn 2.16.0__py3-none-any.whl → 2.17.0__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 +2 -2
- crypticorn/auth/client/api/admin_api.py +397 -13
- crypticorn/auth/client/api/auth_api.py +3610 -341
- crypticorn/auth/client/api/service_api.py +249 -7
- crypticorn/auth/client/api/user_api.py +2295 -179
- crypticorn/auth/client/api/wallet_api.py +1468 -81
- crypticorn/auth/client/configuration.py +2 -2
- crypticorn/auth/client/models/create_api_key_request.py +2 -1
- crypticorn/auth/client/models/get_api_keys200_response_inner.py +2 -1
- crypticorn/auth/client/rest.py +23 -4
- crypticorn/auth/main.py +8 -5
- crypticorn/cli/init.py +1 -1
- crypticorn/cli/templates/.env.docker.temp +3 -0
- crypticorn/cli/templates/.env.example.temp +4 -0
- crypticorn/cli/templates/Dockerfile +5 -2
- crypticorn/client.py +226 -59
- crypticorn/common/__init__.py +1 -0
- crypticorn/common/auth.py +45 -14
- crypticorn/common/decorators.py +1 -2
- crypticorn/common/enums.py +0 -2
- crypticorn/common/errors.py +10 -0
- crypticorn/common/metrics.py +30 -0
- crypticorn/common/middleware.py +94 -1
- crypticorn/common/pagination.py +252 -20
- crypticorn/common/router/admin_router.py +2 -2
- crypticorn/common/router/status_router.py +40 -2
- crypticorn/common/scopes.py +2 -2
- crypticorn/common/warnings.py +7 -0
- crypticorn/dex/__init__.py +6 -0
- crypticorn/dex/client/__init__.py +49 -0
- crypticorn/dex/client/api/__init__.py +6 -0
- crypticorn/dex/client/api/admin_api.py +2986 -0
- crypticorn/dex/client/api/signals_api.py +1798 -0
- crypticorn/dex/client/api/status_api.py +892 -0
- crypticorn/dex/client/api_client.py +758 -0
- crypticorn/dex/client/api_response.py +20 -0
- crypticorn/dex/client/configuration.py +620 -0
- crypticorn/dex/client/exceptions.py +220 -0
- crypticorn/dex/client/models/__init__.py +30 -0
- crypticorn/dex/client/models/api_error_identifier.py +121 -0
- crypticorn/dex/client/models/api_error_level.py +37 -0
- crypticorn/dex/client/models/api_error_type.py +37 -0
- crypticorn/dex/client/models/exception_detail.py +117 -0
- crypticorn/dex/client/models/log_level.py +38 -0
- crypticorn/dex/client/models/paginated_response_signal_with_token.py +134 -0
- crypticorn/dex/client/models/risk.py +86 -0
- crypticorn/dex/client/models/signal_overview_stats.py +158 -0
- crypticorn/dex/client/models/signal_volume.py +84 -0
- crypticorn/dex/client/models/signal_with_token.py +163 -0
- crypticorn/dex/client/models/token_data.py +127 -0
- crypticorn/dex/client/models/token_detail.py +116 -0
- crypticorn/dex/client/py.typed +0 -0
- crypticorn/dex/client/rest.py +217 -0
- crypticorn/dex/main.py +1 -0
- crypticorn/hive/client/api/admin_api.py +1173 -47
- crypticorn/hive/client/api/data_api.py +499 -17
- crypticorn/hive/client/api/models_api.py +1595 -87
- crypticorn/hive/client/api/status_api.py +397 -16
- crypticorn/hive/client/api_client.py +0 -5
- crypticorn/hive/client/models/api_error_identifier.py +1 -1
- crypticorn/hive/client/models/coin_info.py +1 -1
- crypticorn/hive/client/models/exception_detail.py +1 -1
- crypticorn/hive/client/models/target_info.py +1 -1
- crypticorn/hive/client/rest.py +23 -4
- crypticorn/hive/main.py +99 -25
- crypticorn/hive/utils.py +2 -2
- crypticorn/klines/client/api/admin_api.py +1173 -47
- crypticorn/klines/client/api/change_in_timeframe_api.py +269 -11
- crypticorn/klines/client/api/funding_rates_api.py +315 -11
- crypticorn/klines/client/api/ohlcv_data_api.py +390 -11
- crypticorn/klines/client/api/status_api.py +397 -16
- crypticorn/klines/client/api/symbols_api.py +216 -11
- crypticorn/klines/client/api/udf_api.py +1268 -51
- crypticorn/klines/client/api_client.py +0 -5
- crypticorn/klines/client/models/api_error_identifier.py +3 -1
- crypticorn/klines/client/models/exception_detail.py +1 -1
- crypticorn/klines/client/models/ohlcv.py +1 -1
- crypticorn/klines/client/models/symbol_group.py +1 -1
- crypticorn/klines/client/models/udf_config.py +1 -1
- crypticorn/klines/client/rest.py +23 -4
- crypticorn/klines/main.py +89 -12
- crypticorn/metrics/client/api/admin_api.py +1173 -47
- crypticorn/metrics/client/api/exchanges_api.py +1370 -145
- crypticorn/metrics/client/api/indicators_api.py +622 -17
- crypticorn/metrics/client/api/logs_api.py +296 -11
- crypticorn/metrics/client/api/marketcap_api.py +1207 -67
- crypticorn/metrics/client/api/markets_api.py +343 -11
- crypticorn/metrics/client/api/quote_currencies_api.py +228 -11
- crypticorn/metrics/client/api/status_api.py +397 -16
- crypticorn/metrics/client/api/tokens_api.py +382 -15
- crypticorn/metrics/client/api_client.py +0 -5
- crypticorn/metrics/client/configuration.py +4 -2
- crypticorn/metrics/client/models/exception_detail.py +1 -1
- crypticorn/metrics/client/models/exchange_mapping.py +1 -1
- crypticorn/metrics/client/models/marketcap_ranking.py +1 -1
- crypticorn/metrics/client/models/marketcap_symbol_ranking.py +1 -1
- crypticorn/metrics/client/models/ohlcv.py +1 -1
- crypticorn/metrics/client/rest.py +23 -4
- crypticorn/metrics/main.py +113 -19
- crypticorn/pay/client/api/admin_api.py +1585 -57
- crypticorn/pay/client/api/now_payments_api.py +961 -39
- crypticorn/pay/client/api/payments_api.py +562 -17
- crypticorn/pay/client/api/products_api.py +880 -30
- crypticorn/pay/client/api/status_api.py +397 -16
- crypticorn/pay/client/api_client.py +0 -5
- crypticorn/pay/client/configuration.py +2 -2
- crypticorn/pay/client/models/api_error_identifier.py +7 -7
- crypticorn/pay/client/models/exception_detail.py +1 -1
- crypticorn/pay/client/models/now_create_invoice_req.py +1 -1
- crypticorn/pay/client/models/now_create_invoice_res.py +1 -1
- crypticorn/pay/client/models/product.py +1 -1
- crypticorn/pay/client/models/product_create.py +1 -1
- crypticorn/pay/client/models/product_update.py +1 -1
- crypticorn/pay/client/models/scope.py +1 -0
- crypticorn/pay/client/rest.py +23 -4
- crypticorn/pay/main.py +10 -6
- crypticorn/trade/client/__init__.py +11 -1
- crypticorn/trade/client/api/__init__.py +0 -1
- crypticorn/trade/client/api/admin_api.py +1184 -55
- crypticorn/trade/client/api/api_keys_api.py +1678 -162
- crypticorn/trade/client/api/bots_api.py +7563 -187
- crypticorn/trade/client/api/exchanges_api.py +565 -19
- crypticorn/trade/client/api/notifications_api.py +1290 -116
- crypticorn/trade/client/api/orders_api.py +393 -55
- crypticorn/trade/client/api/status_api.py +397 -13
- crypticorn/trade/client/api/strategies_api.py +1133 -77
- crypticorn/trade/client/api/trading_actions_api.py +786 -65
- crypticorn/trade/client/models/__init__.py +11 -0
- crypticorn/trade/client/models/actions_count.py +88 -0
- crypticorn/trade/client/models/api_error_identifier.py +1 -0
- crypticorn/trade/client/models/bot.py +7 -18
- crypticorn/trade/client/models/bot_create.py +17 -1
- crypticorn/trade/client/models/bot_update.py +17 -1
- crypticorn/trade/client/models/exchange.py +6 -1
- crypticorn/trade/client/models/exchange_key.py +1 -1
- crypticorn/trade/client/models/exchange_key_balance.py +111 -0
- crypticorn/trade/client/models/exchange_key_create.py +17 -1
- crypticorn/trade/client/models/exchange_key_update.py +17 -1
- crypticorn/trade/client/models/execution_ids.py +1 -1
- crypticorn/trade/client/models/futures_balance.py +27 -25
- crypticorn/trade/client/models/notification.py +17 -1
- crypticorn/trade/client/models/notification_create.py +18 -2
- crypticorn/trade/client/models/notification_update.py +17 -1
- crypticorn/trade/client/models/orders_count.py +88 -0
- crypticorn/trade/client/models/paginated_response_futures_trading_action.py +134 -0
- crypticorn/trade/client/models/paginated_response_order.py +134 -0
- crypticorn/trade/client/models/pn_l.py +95 -0
- crypticorn/trade/client/models/post_futures_action.py +1 -1
- crypticorn/trade/client/models/spot_balance.py +109 -0
- crypticorn/trade/client/models/strategy.py +22 -4
- crypticorn/trade/client/models/strategy_create.py +23 -5
- crypticorn/trade/client/models/strategy_exchange_info.py +16 -4
- crypticorn/trade/client/models/strategy_update.py +19 -3
- crypticorn/trade/client/models/tpsl.py +4 -19
- crypticorn/trade/client/models/tpsl_create.py +6 -19
- crypticorn/trade/client/rest.py +23 -4
- crypticorn/trade/main.py +15 -12
- {crypticorn-2.16.0.dist-info → crypticorn-2.17.0.dist-info}/METADATA +65 -20
- {crypticorn-2.16.0.dist-info → crypticorn-2.17.0.dist-info}/RECORD +163 -128
- crypticorn/trade/client/api/futures_trading_panel_api.py +0 -1285
- {crypticorn-2.16.0.dist-info → crypticorn-2.17.0.dist-info}/WHEEL +0 -0
- {crypticorn-2.16.0.dist-info → crypticorn-2.17.0.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.16.0.dist-info → crypticorn-2.17.0.dist-info}/licenses/LICENSE +0 -0
- {crypticorn-2.16.0.dist-info → crypticorn-2.17.0.dist-info}/top_level.txt +0 -0
@@ -11,14 +11,10 @@ Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
Do not edit the class manually.
|
12
12
|
""" # noqa: E501
|
13
13
|
|
14
|
-
import warnings
|
15
14
|
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
16
15
|
from typing import Any, Dict, List, Optional, Tuple, Union
|
17
16
|
from typing_extensions import Annotated
|
18
17
|
|
19
|
-
from pydantic import Field, StrictInt, StrictStr
|
20
|
-
from typing import List, Optional
|
21
|
-
from typing_extensions import Annotated
|
22
18
|
from crypticorn.metrics.client.models.exchange_availability import ExchangeAvailability
|
23
19
|
from crypticorn.metrics.client.models.exchange_mapping import ExchangeMapping
|
24
20
|
from crypticorn.metrics.client.models.internal_exchange import InternalExchange
|
@@ -30,6 +26,24 @@ from crypticorn.metrics.client.api_client import ApiClient, RequestSerialized
|
|
30
26
|
from crypticorn.metrics.client.api_response import ApiResponse
|
31
27
|
from crypticorn.metrics.client.rest import RESTResponseType
|
32
28
|
|
29
|
+
# Import async_to_sync for sync methods
|
30
|
+
try:
|
31
|
+
from asgiref.sync import async_to_sync
|
32
|
+
|
33
|
+
_HAS_ASGIREF = True
|
34
|
+
except ImportError:
|
35
|
+
_HAS_ASGIREF = False
|
36
|
+
|
37
|
+
def async_to_sync(async_func):
|
38
|
+
"""Fallback decorator that raises an error if asgiref is not available."""
|
39
|
+
|
40
|
+
def wrapper(*args, **kwargs):
|
41
|
+
raise ImportError(
|
42
|
+
"asgiref is required for sync methods. Install with: pip install asgiref"
|
43
|
+
)
|
44
|
+
|
45
|
+
return wrapper
|
46
|
+
|
33
47
|
|
34
48
|
class ExchangesApi:
|
35
49
|
"""NOTE: This class is auto generated by OpenAPI Generator
|
@@ -38,13 +52,255 @@ class ExchangesApi:
|
|
38
52
|
Do not edit the class manually.
|
39
53
|
"""
|
40
54
|
|
41
|
-
def __init__(self, api_client=None) -> None:
|
55
|
+
def __init__(self, api_client=None, is_sync: bool = False) -> None:
|
42
56
|
if api_client is None:
|
43
57
|
api_client = ApiClient.get_default()
|
44
58
|
self.api_client = api_client
|
59
|
+
self.is_sync = is_sync
|
60
|
+
|
61
|
+
@validate_call
|
62
|
+
def get_available_exchanges(
|
63
|
+
self,
|
64
|
+
market: Annotated[
|
65
|
+
MarketType, Field(description="Market type (spot or futures)")
|
66
|
+
],
|
67
|
+
symbol: Annotated[
|
68
|
+
StrictStr, Field(description="Symbol to fetch available exchanges for")
|
69
|
+
],
|
70
|
+
interval: Annotated[
|
71
|
+
Optional[TimeInterval],
|
72
|
+
Field(description="Interval for which to fetch available exchanges"),
|
73
|
+
] = None,
|
74
|
+
start_timestamp: Annotated[
|
75
|
+
Optional[StrictInt],
|
76
|
+
Field(
|
77
|
+
description="Start timestamp for which to fetch available exchanges (defaults to previous 7 day's closing)"
|
78
|
+
),
|
79
|
+
] = None,
|
80
|
+
end_timestamp: Annotated[
|
81
|
+
Optional[StrictInt],
|
82
|
+
Field(description="End timestamp for which to fetch available exchanges"),
|
83
|
+
] = None,
|
84
|
+
quote_currency: Annotated[
|
85
|
+
Optional[StrictStr],
|
86
|
+
Field(
|
87
|
+
description="Quote currency for which to fetch available exchanges (Use quote currencies endpoint to get available quote currencies)"
|
88
|
+
),
|
89
|
+
] = None,
|
90
|
+
status: Annotated[
|
91
|
+
Optional[TradingStatus],
|
92
|
+
Field(
|
93
|
+
description="Trading pair status for which to fetch available exchanges"
|
94
|
+
),
|
95
|
+
] = None,
|
96
|
+
_request_timeout: Union[
|
97
|
+
None,
|
98
|
+
Annotated[StrictFloat, Field(gt=0)],
|
99
|
+
Tuple[
|
100
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
101
|
+
],
|
102
|
+
] = None,
|
103
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
104
|
+
_content_type: Optional[StrictStr] = None,
|
105
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
106
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
107
|
+
) -> List[ExchangeAvailability]:
|
108
|
+
"""Get Available Exchanges"""
|
109
|
+
if self.is_sync:
|
110
|
+
return self._get_available_exchanges_sync(
|
111
|
+
market=market,
|
112
|
+
symbol=symbol,
|
113
|
+
interval=interval,
|
114
|
+
start_timestamp=start_timestamp,
|
115
|
+
end_timestamp=end_timestamp,
|
116
|
+
quote_currency=quote_currency,
|
117
|
+
status=status,
|
118
|
+
_request_timeout=_request_timeout,
|
119
|
+
_request_auth=_request_auth,
|
120
|
+
_content_type=_content_type,
|
121
|
+
_headers=_headers,
|
122
|
+
_host_index=_host_index,
|
123
|
+
)
|
124
|
+
|
125
|
+
else:
|
126
|
+
return self._get_available_exchanges_async(
|
127
|
+
market=market,
|
128
|
+
symbol=symbol,
|
129
|
+
interval=interval,
|
130
|
+
start_timestamp=start_timestamp,
|
131
|
+
end_timestamp=end_timestamp,
|
132
|
+
quote_currency=quote_currency,
|
133
|
+
status=status,
|
134
|
+
_request_timeout=_request_timeout,
|
135
|
+
_request_auth=_request_auth,
|
136
|
+
_content_type=_content_type,
|
137
|
+
_headers=_headers,
|
138
|
+
_host_index=_host_index,
|
139
|
+
)
|
140
|
+
|
141
|
+
@validate_call
|
142
|
+
def get_available_exchanges_with_http_info(
|
143
|
+
self,
|
144
|
+
market: Annotated[
|
145
|
+
MarketType, Field(description="Market type (spot or futures)")
|
146
|
+
],
|
147
|
+
symbol: Annotated[
|
148
|
+
StrictStr, Field(description="Symbol to fetch available exchanges for")
|
149
|
+
],
|
150
|
+
interval: Annotated[
|
151
|
+
Optional[TimeInterval],
|
152
|
+
Field(description="Interval for which to fetch available exchanges"),
|
153
|
+
] = None,
|
154
|
+
start_timestamp: Annotated[
|
155
|
+
Optional[StrictInt],
|
156
|
+
Field(
|
157
|
+
description="Start timestamp for which to fetch available exchanges (defaults to previous 7 day's closing)"
|
158
|
+
),
|
159
|
+
] = None,
|
160
|
+
end_timestamp: Annotated[
|
161
|
+
Optional[StrictInt],
|
162
|
+
Field(description="End timestamp for which to fetch available exchanges"),
|
163
|
+
] = None,
|
164
|
+
quote_currency: Annotated[
|
165
|
+
Optional[StrictStr],
|
166
|
+
Field(
|
167
|
+
description="Quote currency for which to fetch available exchanges (Use quote currencies endpoint to get available quote currencies)"
|
168
|
+
),
|
169
|
+
] = None,
|
170
|
+
status: Annotated[
|
171
|
+
Optional[TradingStatus],
|
172
|
+
Field(
|
173
|
+
description="Trading pair status for which to fetch available exchanges"
|
174
|
+
),
|
175
|
+
] = None,
|
176
|
+
_request_timeout: Union[
|
177
|
+
None,
|
178
|
+
Annotated[StrictFloat, Field(gt=0)],
|
179
|
+
Tuple[
|
180
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
181
|
+
],
|
182
|
+
] = None,
|
183
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
184
|
+
_content_type: Optional[StrictStr] = None,
|
185
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
186
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
187
|
+
) -> ApiResponse[List[ExchangeAvailability]]:
|
188
|
+
"""Get Available Exchanges with HTTP info"""
|
189
|
+
if self.is_sync:
|
190
|
+
return self._get_available_exchanges_sync_with_http_info(
|
191
|
+
market=market,
|
192
|
+
symbol=symbol,
|
193
|
+
interval=interval,
|
194
|
+
start_timestamp=start_timestamp,
|
195
|
+
end_timestamp=end_timestamp,
|
196
|
+
quote_currency=quote_currency,
|
197
|
+
status=status,
|
198
|
+
_request_timeout=_request_timeout,
|
199
|
+
_request_auth=_request_auth,
|
200
|
+
_content_type=_content_type,
|
201
|
+
_headers=_headers,
|
202
|
+
_host_index=_host_index,
|
203
|
+
)
|
204
|
+
|
205
|
+
else:
|
206
|
+
return self._get_available_exchanges_async_with_http_info(
|
207
|
+
market=market,
|
208
|
+
symbol=symbol,
|
209
|
+
interval=interval,
|
210
|
+
start_timestamp=start_timestamp,
|
211
|
+
end_timestamp=end_timestamp,
|
212
|
+
quote_currency=quote_currency,
|
213
|
+
status=status,
|
214
|
+
_request_timeout=_request_timeout,
|
215
|
+
_request_auth=_request_auth,
|
216
|
+
_content_type=_content_type,
|
217
|
+
_headers=_headers,
|
218
|
+
_host_index=_host_index,
|
219
|
+
)
|
220
|
+
|
221
|
+
@validate_call
|
222
|
+
def get_available_exchanges_without_preload_content(
|
223
|
+
self,
|
224
|
+
market: Annotated[
|
225
|
+
MarketType, Field(description="Market type (spot or futures)")
|
226
|
+
],
|
227
|
+
symbol: Annotated[
|
228
|
+
StrictStr, Field(description="Symbol to fetch available exchanges for")
|
229
|
+
],
|
230
|
+
interval: Annotated[
|
231
|
+
Optional[TimeInterval],
|
232
|
+
Field(description="Interval for which to fetch available exchanges"),
|
233
|
+
] = None,
|
234
|
+
start_timestamp: Annotated[
|
235
|
+
Optional[StrictInt],
|
236
|
+
Field(
|
237
|
+
description="Start timestamp for which to fetch available exchanges (defaults to previous 7 day's closing)"
|
238
|
+
),
|
239
|
+
] = None,
|
240
|
+
end_timestamp: Annotated[
|
241
|
+
Optional[StrictInt],
|
242
|
+
Field(description="End timestamp for which to fetch available exchanges"),
|
243
|
+
] = None,
|
244
|
+
quote_currency: Annotated[
|
245
|
+
Optional[StrictStr],
|
246
|
+
Field(
|
247
|
+
description="Quote currency for which to fetch available exchanges (Use quote currencies endpoint to get available quote currencies)"
|
248
|
+
),
|
249
|
+
] = None,
|
250
|
+
status: Annotated[
|
251
|
+
Optional[TradingStatus],
|
252
|
+
Field(
|
253
|
+
description="Trading pair status for which to fetch available exchanges"
|
254
|
+
),
|
255
|
+
] = None,
|
256
|
+
_request_timeout: Union[
|
257
|
+
None,
|
258
|
+
Annotated[StrictFloat, Field(gt=0)],
|
259
|
+
Tuple[
|
260
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
261
|
+
],
|
262
|
+
] = None,
|
263
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
264
|
+
_content_type: Optional[StrictStr] = None,
|
265
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
266
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
267
|
+
) -> RESTResponseType:
|
268
|
+
"""Get Available Exchanges without preloading content"""
|
269
|
+
if self.is_sync:
|
270
|
+
return self._get_available_exchanges_sync_without_preload_content(
|
271
|
+
market=market,
|
272
|
+
symbol=symbol,
|
273
|
+
interval=interval,
|
274
|
+
start_timestamp=start_timestamp,
|
275
|
+
end_timestamp=end_timestamp,
|
276
|
+
quote_currency=quote_currency,
|
277
|
+
status=status,
|
278
|
+
_request_timeout=_request_timeout,
|
279
|
+
_request_auth=_request_auth,
|
280
|
+
_content_type=_content_type,
|
281
|
+
_headers=_headers,
|
282
|
+
_host_index=_host_index,
|
283
|
+
)
|
284
|
+
|
285
|
+
else:
|
286
|
+
return self._get_available_exchanges_async_without_preload_content(
|
287
|
+
market=market,
|
288
|
+
symbol=symbol,
|
289
|
+
interval=interval,
|
290
|
+
start_timestamp=start_timestamp,
|
291
|
+
end_timestamp=end_timestamp,
|
292
|
+
quote_currency=quote_currency,
|
293
|
+
status=status,
|
294
|
+
_request_timeout=_request_timeout,
|
295
|
+
_request_auth=_request_auth,
|
296
|
+
_content_type=_content_type,
|
297
|
+
_headers=_headers,
|
298
|
+
_host_index=_host_index,
|
299
|
+
)
|
45
300
|
|
301
|
+
# Private async implementation methods
|
46
302
|
@validate_call
|
47
|
-
async def
|
303
|
+
async def _get_available_exchanges_async(
|
48
304
|
self,
|
49
305
|
market: Annotated[
|
50
306
|
MarketType, Field(description="Market type (spot or futures)")
|
@@ -157,7 +413,7 @@ class ExchangesApi:
|
|
157
413
|
).data
|
158
414
|
|
159
415
|
@validate_call
|
160
|
-
async def
|
416
|
+
async def _get_available_exchanges_async_with_http_info(
|
161
417
|
self,
|
162
418
|
market: Annotated[
|
163
419
|
MarketType, Field(description="Market type (spot or futures)")
|
@@ -265,12 +521,11 @@ class ExchangesApi:
|
|
265
521
|
)
|
266
522
|
await response_data.read()
|
267
523
|
return self.api_client.response_deserialize(
|
268
|
-
response_data=response_data,
|
269
|
-
response_types_map=_response_types_map,
|
524
|
+
response_data=response_data, response_types_map=_response_types_map
|
270
525
|
)
|
271
526
|
|
272
527
|
@validate_call
|
273
|
-
async def
|
528
|
+
async def _get_available_exchanges_async_without_preload_content(
|
274
529
|
self,
|
275
530
|
market: Annotated[
|
276
531
|
MarketType, Field(description="Market type (spot or futures)")
|
@@ -376,111 +631,425 @@ class ExchangesApi:
|
|
376
631
|
response_data = await self.api_client.call_api(
|
377
632
|
*_param, _request_timeout=_request_timeout
|
378
633
|
)
|
379
|
-
return response_data
|
380
|
-
|
381
|
-
def _get_available_exchanges_serialize(
|
382
|
-
self,
|
383
|
-
market,
|
384
|
-
symbol,
|
385
|
-
interval,
|
386
|
-
start_timestamp,
|
387
|
-
end_timestamp,
|
388
|
-
quote_currency,
|
389
|
-
status,
|
390
|
-
_request_auth,
|
391
|
-
_content_type,
|
392
|
-
_headers,
|
393
|
-
_host_index,
|
394
|
-
) -> RequestSerialized:
|
395
|
-
|
396
|
-
_host = None
|
397
|
-
|
398
|
-
_collection_formats: Dict[str, str] = {}
|
399
|
-
|
400
|
-
_path_params: Dict[str, str] = {}
|
401
|
-
_query_params: List[Tuple[str, str]] = []
|
402
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
403
|
-
_form_params: List[Tuple[str, str]] = []
|
404
|
-
_files: Dict[
|
405
|
-
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
406
|
-
] = {}
|
407
|
-
_body_params: Optional[bytes] = None
|
408
|
-
|
409
|
-
# process the path parameters
|
410
|
-
# process the query parameters
|
411
|
-
if market is not None:
|
412
|
-
|
413
|
-
_query_params.append(("market", market.value))
|
414
|
-
|
415
|
-
if symbol is not None:
|
416
|
-
|
417
|
-
_query_params.append(("symbol", symbol))
|
418
|
-
|
419
|
-
if interval is not None:
|
420
|
-
|
421
|
-
_query_params.append(("interval", interval.value))
|
422
|
-
|
423
|
-
if start_timestamp is not None:
|
424
|
-
|
425
|
-
_query_params.append(("start_timestamp", start_timestamp))
|
426
|
-
|
427
|
-
if end_timestamp is not None:
|
428
|
-
|
429
|
-
_query_params.append(("end_timestamp", end_timestamp))
|
430
|
-
|
431
|
-
if quote_currency is not None:
|
432
|
-
|
433
|
-
_query_params.append(("quote_currency", quote_currency))
|
434
|
-
|
435
|
-
if status is not None:
|
436
|
-
|
437
|
-
_query_params.append(("status", status.value))
|
438
|
-
|
439
|
-
# process the header parameters
|
440
|
-
# process the form parameters
|
441
|
-
# process the body parameter
|
442
|
-
|
443
|
-
# set the HTTP header `Accept`
|
444
|
-
if "Accept" not in _header_params:
|
445
|
-
_header_params["Accept"] = self.api_client.select_header_accept(
|
446
|
-
["application/json"]
|
447
|
-
)
|
448
|
-
|
449
|
-
# authentication setting
|
450
|
-
_auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
|
451
|
-
|
452
|
-
return self.api_client.param_serialize(
|
453
|
-
method="GET",
|
454
|
-
resource_path="/exchanges/available",
|
455
|
-
path_params=_path_params,
|
456
|
-
query_params=_query_params,
|
457
|
-
header_params=_header_params,
|
458
|
-
body=_body_params,
|
459
|
-
post_params=_form_params,
|
460
|
-
files=_files,
|
461
|
-
auth_settings=_auth_settings,
|
462
|
-
collection_formats=_collection_formats,
|
463
|
-
_host=_host,
|
464
|
-
_request_auth=_request_auth,
|
465
|
-
)
|
634
|
+
return response_data
|
466
635
|
|
636
|
+
# Private sync implementation methods
|
467
637
|
@validate_call
|
468
|
-
|
638
|
+
def _get_available_exchanges_sync(
|
469
639
|
self,
|
470
640
|
market: Annotated[
|
471
641
|
MarketType, Field(description="Market type (spot or futures)")
|
472
642
|
],
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
] = None,
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
643
|
+
symbol: Annotated[
|
644
|
+
StrictStr, Field(description="Symbol to fetch available exchanges for")
|
645
|
+
],
|
646
|
+
interval: Annotated[
|
647
|
+
Optional[TimeInterval],
|
648
|
+
Field(description="Interval for which to fetch available exchanges"),
|
649
|
+
] = None,
|
650
|
+
start_timestamp: Annotated[
|
651
|
+
Optional[StrictInt],
|
652
|
+
Field(
|
653
|
+
description="Start timestamp for which to fetch available exchanges (defaults to previous 7 day's closing)"
|
654
|
+
),
|
655
|
+
] = None,
|
656
|
+
end_timestamp: Annotated[
|
657
|
+
Optional[StrictInt],
|
658
|
+
Field(description="End timestamp for which to fetch available exchanges"),
|
659
|
+
] = None,
|
660
|
+
quote_currency: Annotated[
|
661
|
+
Optional[StrictStr],
|
662
|
+
Field(
|
663
|
+
description="Quote currency for which to fetch available exchanges (Use quote currencies endpoint to get available quote currencies)"
|
664
|
+
),
|
665
|
+
] = None,
|
666
|
+
status: Annotated[
|
667
|
+
Optional[TradingStatus],
|
668
|
+
Field(
|
669
|
+
description="Trading pair status for which to fetch available exchanges"
|
670
|
+
),
|
671
|
+
] = None,
|
672
|
+
_request_timeout: Union[
|
673
|
+
None,
|
674
|
+
Annotated[StrictFloat, Field(gt=0)],
|
675
|
+
Tuple[
|
676
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
677
|
+
],
|
678
|
+
] = None,
|
679
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
680
|
+
_content_type: Optional[StrictStr] = None,
|
681
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
682
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
683
|
+
) -> List[ExchangeAvailability]:
|
684
|
+
"""Synchronous version of get_available_exchanges"""
|
685
|
+
return async_to_sync(self._get_available_exchanges_async)(
|
686
|
+
market=market,
|
687
|
+
symbol=symbol,
|
688
|
+
interval=interval,
|
689
|
+
start_timestamp=start_timestamp,
|
690
|
+
end_timestamp=end_timestamp,
|
691
|
+
quote_currency=quote_currency,
|
692
|
+
status=status,
|
693
|
+
_request_timeout=_request_timeout,
|
694
|
+
_request_auth=_request_auth,
|
695
|
+
_content_type=_content_type,
|
696
|
+
_headers=_headers,
|
697
|
+
_host_index=_host_index,
|
698
|
+
)
|
699
|
+
|
700
|
+
@validate_call
|
701
|
+
def _get_available_exchanges_sync_with_http_info(
|
702
|
+
self,
|
703
|
+
market: Annotated[
|
704
|
+
MarketType, Field(description="Market type (spot or futures)")
|
705
|
+
],
|
706
|
+
symbol: Annotated[
|
707
|
+
StrictStr, Field(description="Symbol to fetch available exchanges for")
|
708
|
+
],
|
709
|
+
interval: Annotated[
|
710
|
+
Optional[TimeInterval],
|
711
|
+
Field(description="Interval for which to fetch available exchanges"),
|
712
|
+
] = None,
|
713
|
+
start_timestamp: Annotated[
|
714
|
+
Optional[StrictInt],
|
715
|
+
Field(
|
716
|
+
description="Start timestamp for which to fetch available exchanges (defaults to previous 7 day's closing)"
|
717
|
+
),
|
718
|
+
] = None,
|
719
|
+
end_timestamp: Annotated[
|
720
|
+
Optional[StrictInt],
|
721
|
+
Field(description="End timestamp for which to fetch available exchanges"),
|
722
|
+
] = None,
|
723
|
+
quote_currency: Annotated[
|
724
|
+
Optional[StrictStr],
|
725
|
+
Field(
|
726
|
+
description="Quote currency for which to fetch available exchanges (Use quote currencies endpoint to get available quote currencies)"
|
727
|
+
),
|
728
|
+
] = None,
|
729
|
+
status: Annotated[
|
730
|
+
Optional[TradingStatus],
|
731
|
+
Field(
|
732
|
+
description="Trading pair status for which to fetch available exchanges"
|
733
|
+
),
|
734
|
+
] = None,
|
735
|
+
_request_timeout: Union[
|
736
|
+
None,
|
737
|
+
Annotated[StrictFloat, Field(gt=0)],
|
738
|
+
Tuple[
|
739
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
740
|
+
],
|
741
|
+
] = None,
|
742
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
743
|
+
_content_type: Optional[StrictStr] = None,
|
744
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
745
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
746
|
+
) -> ApiResponse[List[ExchangeAvailability]]:
|
747
|
+
"""Synchronous version of get_available_exchanges_with_http_info"""
|
748
|
+
return async_to_sync(self._get_available_exchanges_async_with_http_info)(
|
749
|
+
market=market,
|
750
|
+
symbol=symbol,
|
751
|
+
interval=interval,
|
752
|
+
start_timestamp=start_timestamp,
|
753
|
+
end_timestamp=end_timestamp,
|
754
|
+
quote_currency=quote_currency,
|
755
|
+
status=status,
|
756
|
+
_request_timeout=_request_timeout,
|
757
|
+
_request_auth=_request_auth,
|
758
|
+
_content_type=_content_type,
|
759
|
+
_headers=_headers,
|
760
|
+
_host_index=_host_index,
|
761
|
+
)
|
762
|
+
|
763
|
+
@validate_call
|
764
|
+
def _get_available_exchanges_sync_without_preload_content(
|
765
|
+
self,
|
766
|
+
market: Annotated[
|
767
|
+
MarketType, Field(description="Market type (spot or futures)")
|
768
|
+
],
|
769
|
+
symbol: Annotated[
|
770
|
+
StrictStr, Field(description="Symbol to fetch available exchanges for")
|
771
|
+
],
|
772
|
+
interval: Annotated[
|
773
|
+
Optional[TimeInterval],
|
774
|
+
Field(description="Interval for which to fetch available exchanges"),
|
775
|
+
] = None,
|
776
|
+
start_timestamp: Annotated[
|
777
|
+
Optional[StrictInt],
|
778
|
+
Field(
|
779
|
+
description="Start timestamp for which to fetch available exchanges (defaults to previous 7 day's closing)"
|
780
|
+
),
|
781
|
+
] = None,
|
782
|
+
end_timestamp: Annotated[
|
783
|
+
Optional[StrictInt],
|
784
|
+
Field(description="End timestamp for which to fetch available exchanges"),
|
785
|
+
] = None,
|
786
|
+
quote_currency: Annotated[
|
787
|
+
Optional[StrictStr],
|
788
|
+
Field(
|
789
|
+
description="Quote currency for which to fetch available exchanges (Use quote currencies endpoint to get available quote currencies)"
|
790
|
+
),
|
791
|
+
] = None,
|
792
|
+
status: Annotated[
|
793
|
+
Optional[TradingStatus],
|
794
|
+
Field(
|
795
|
+
description="Trading pair status for which to fetch available exchanges"
|
796
|
+
),
|
797
|
+
] = None,
|
798
|
+
_request_timeout: Union[
|
799
|
+
None,
|
800
|
+
Annotated[StrictFloat, Field(gt=0)],
|
801
|
+
Tuple[
|
802
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
803
|
+
],
|
804
|
+
] = None,
|
805
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
806
|
+
_content_type: Optional[StrictStr] = None,
|
807
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
808
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
809
|
+
) -> RESTResponseType:
|
810
|
+
"""Synchronous version of get_available_exchanges_without_preload_content"""
|
811
|
+
return async_to_sync(
|
812
|
+
self._get_available_exchanges_async_without_preload_content
|
813
|
+
)(
|
814
|
+
market=market,
|
815
|
+
symbol=symbol,
|
816
|
+
interval=interval,
|
817
|
+
start_timestamp=start_timestamp,
|
818
|
+
end_timestamp=end_timestamp,
|
819
|
+
quote_currency=quote_currency,
|
820
|
+
status=status,
|
821
|
+
_request_timeout=_request_timeout,
|
822
|
+
_request_auth=_request_auth,
|
823
|
+
_content_type=_content_type,
|
824
|
+
_headers=_headers,
|
825
|
+
_host_index=_host_index,
|
826
|
+
)
|
827
|
+
|
828
|
+
def _get_available_exchanges_serialize(
|
829
|
+
self,
|
830
|
+
market,
|
831
|
+
symbol,
|
832
|
+
interval,
|
833
|
+
start_timestamp,
|
834
|
+
end_timestamp,
|
835
|
+
quote_currency,
|
836
|
+
status,
|
837
|
+
_request_auth,
|
838
|
+
_content_type,
|
839
|
+
_headers,
|
840
|
+
_host_index,
|
841
|
+
) -> RequestSerialized:
|
842
|
+
|
843
|
+
_host = None
|
844
|
+
|
845
|
+
_collection_formats: Dict[str, str] = {}
|
846
|
+
|
847
|
+
_path_params: Dict[str, str] = {}
|
848
|
+
_query_params: List[Tuple[str, str]] = []
|
849
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
850
|
+
_form_params: List[Tuple[str, str]] = []
|
851
|
+
_files: Dict[
|
852
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
853
|
+
] = {}
|
854
|
+
_body_params: Optional[bytes] = None
|
855
|
+
|
856
|
+
# process the path parameters
|
857
|
+
# process the query parameters
|
858
|
+
if market is not None:
|
859
|
+
|
860
|
+
_query_params.append(("market", market.value))
|
861
|
+
|
862
|
+
if symbol is not None:
|
863
|
+
|
864
|
+
_query_params.append(("symbol", symbol))
|
865
|
+
|
866
|
+
if interval is not None:
|
867
|
+
|
868
|
+
_query_params.append(("interval", interval.value))
|
869
|
+
|
870
|
+
if start_timestamp is not None:
|
871
|
+
|
872
|
+
_query_params.append(("start_timestamp", start_timestamp))
|
873
|
+
|
874
|
+
if end_timestamp is not None:
|
875
|
+
|
876
|
+
_query_params.append(("end_timestamp", end_timestamp))
|
877
|
+
|
878
|
+
if quote_currency is not None:
|
879
|
+
|
880
|
+
_query_params.append(("quote_currency", quote_currency))
|
881
|
+
|
882
|
+
if status is not None:
|
883
|
+
|
884
|
+
_query_params.append(("status", status.value))
|
885
|
+
|
886
|
+
# process the header parameters
|
887
|
+
# process the form parameters
|
888
|
+
# process the body parameter
|
889
|
+
|
890
|
+
# set the HTTP header `Accept`
|
891
|
+
if "Accept" not in _header_params:
|
892
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
893
|
+
["application/json"]
|
894
|
+
)
|
895
|
+
|
896
|
+
# authentication setting
|
897
|
+
_auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
|
898
|
+
|
899
|
+
return self.api_client.param_serialize(
|
900
|
+
method="GET",
|
901
|
+
resource_path="/exchanges/available",
|
902
|
+
path_params=_path_params,
|
903
|
+
query_params=_query_params,
|
904
|
+
header_params=_header_params,
|
905
|
+
body=_body_params,
|
906
|
+
post_params=_form_params,
|
907
|
+
files=_files,
|
908
|
+
auth_settings=_auth_settings,
|
909
|
+
collection_formats=_collection_formats,
|
910
|
+
_host=_host,
|
911
|
+
_request_auth=_request_auth,
|
912
|
+
)
|
913
|
+
|
914
|
+
@validate_call
|
915
|
+
def get_available_exchanges_for_market(
|
916
|
+
self,
|
917
|
+
market: Annotated[
|
918
|
+
MarketType, Field(description="Market type (spot or futures)")
|
919
|
+
],
|
920
|
+
_request_timeout: Union[
|
921
|
+
None,
|
922
|
+
Annotated[StrictFloat, Field(gt=0)],
|
923
|
+
Tuple[
|
924
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
925
|
+
],
|
926
|
+
] = None,
|
927
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
928
|
+
_content_type: Optional[StrictStr] = None,
|
929
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
930
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
931
|
+
) -> List[str]:
|
932
|
+
"""Get Exchange List"""
|
933
|
+
if self.is_sync:
|
934
|
+
return self._get_available_exchanges_for_market_sync(
|
935
|
+
market=market,
|
936
|
+
_request_timeout=_request_timeout,
|
937
|
+
_request_auth=_request_auth,
|
938
|
+
_content_type=_content_type,
|
939
|
+
_headers=_headers,
|
940
|
+
_host_index=_host_index,
|
941
|
+
)
|
942
|
+
|
943
|
+
else:
|
944
|
+
return self._get_available_exchanges_for_market_async(
|
945
|
+
market=market,
|
946
|
+
_request_timeout=_request_timeout,
|
947
|
+
_request_auth=_request_auth,
|
948
|
+
_content_type=_content_type,
|
949
|
+
_headers=_headers,
|
950
|
+
_host_index=_host_index,
|
951
|
+
)
|
952
|
+
|
953
|
+
@validate_call
|
954
|
+
def get_available_exchanges_for_market_with_http_info(
|
955
|
+
self,
|
956
|
+
market: Annotated[
|
957
|
+
MarketType, Field(description="Market type (spot or futures)")
|
958
|
+
],
|
959
|
+
_request_timeout: Union[
|
960
|
+
None,
|
961
|
+
Annotated[StrictFloat, Field(gt=0)],
|
962
|
+
Tuple[
|
963
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
964
|
+
],
|
965
|
+
] = None,
|
966
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
967
|
+
_content_type: Optional[StrictStr] = None,
|
968
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
969
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
970
|
+
) -> ApiResponse[List[str]]:
|
971
|
+
"""Get Exchange List with HTTP info"""
|
972
|
+
if self.is_sync:
|
973
|
+
return self._get_available_exchanges_for_market_sync_with_http_info(
|
974
|
+
market=market,
|
975
|
+
_request_timeout=_request_timeout,
|
976
|
+
_request_auth=_request_auth,
|
977
|
+
_content_type=_content_type,
|
978
|
+
_headers=_headers,
|
979
|
+
_host_index=_host_index,
|
980
|
+
)
|
981
|
+
|
982
|
+
else:
|
983
|
+
return self._get_available_exchanges_for_market_async_with_http_info(
|
984
|
+
market=market,
|
985
|
+
_request_timeout=_request_timeout,
|
986
|
+
_request_auth=_request_auth,
|
987
|
+
_content_type=_content_type,
|
988
|
+
_headers=_headers,
|
989
|
+
_host_index=_host_index,
|
990
|
+
)
|
991
|
+
|
992
|
+
@validate_call
|
993
|
+
def get_available_exchanges_for_market_without_preload_content(
|
994
|
+
self,
|
995
|
+
market: Annotated[
|
996
|
+
MarketType, Field(description="Market type (spot or futures)")
|
997
|
+
],
|
998
|
+
_request_timeout: Union[
|
999
|
+
None,
|
1000
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1001
|
+
Tuple[
|
1002
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1003
|
+
],
|
1004
|
+
] = None,
|
1005
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1006
|
+
_content_type: Optional[StrictStr] = None,
|
1007
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1008
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1009
|
+
) -> RESTResponseType:
|
1010
|
+
"""Get Exchange List without preloading content"""
|
1011
|
+
if self.is_sync:
|
1012
|
+
return (
|
1013
|
+
self._get_available_exchanges_for_market_sync_without_preload_content(
|
1014
|
+
market=market,
|
1015
|
+
_request_timeout=_request_timeout,
|
1016
|
+
_request_auth=_request_auth,
|
1017
|
+
_content_type=_content_type,
|
1018
|
+
_headers=_headers,
|
1019
|
+
_host_index=_host_index,
|
1020
|
+
)
|
1021
|
+
)
|
1022
|
+
|
1023
|
+
else:
|
1024
|
+
return (
|
1025
|
+
self._get_available_exchanges_for_market_async_without_preload_content(
|
1026
|
+
market=market,
|
1027
|
+
_request_timeout=_request_timeout,
|
1028
|
+
_request_auth=_request_auth,
|
1029
|
+
_content_type=_content_type,
|
1030
|
+
_headers=_headers,
|
1031
|
+
_host_index=_host_index,
|
1032
|
+
)
|
1033
|
+
)
|
1034
|
+
|
1035
|
+
# Private async implementation methods
|
1036
|
+
@validate_call
|
1037
|
+
async def _get_available_exchanges_for_market_async(
|
1038
|
+
self,
|
1039
|
+
market: Annotated[
|
1040
|
+
MarketType, Field(description="Market type (spot or futures)")
|
1041
|
+
],
|
1042
|
+
_request_timeout: Union[
|
1043
|
+
None,
|
1044
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1045
|
+
Tuple[
|
1046
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1047
|
+
],
|
1048
|
+
] = None,
|
1049
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1050
|
+
_content_type: Optional[StrictStr] = None,
|
1051
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1052
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
484
1053
|
) -> List[str]:
|
485
1054
|
"""Get Exchange List
|
486
1055
|
|
@@ -531,7 +1100,7 @@ class ExchangesApi:
|
|
531
1100
|
).data
|
532
1101
|
|
533
1102
|
@validate_call
|
534
|
-
async def
|
1103
|
+
async def _get_available_exchanges_for_market_async_with_http_info(
|
535
1104
|
self,
|
536
1105
|
market: Annotated[
|
537
1106
|
MarketType, Field(description="Market type (spot or futures)")
|
@@ -592,12 +1161,11 @@ class ExchangesApi:
|
|
592
1161
|
)
|
593
1162
|
await response_data.read()
|
594
1163
|
return self.api_client.response_deserialize(
|
595
|
-
response_data=response_data,
|
596
|
-
response_types_map=_response_types_map,
|
1164
|
+
response_data=response_data, response_types_map=_response_types_map
|
597
1165
|
)
|
598
1166
|
|
599
1167
|
@validate_call
|
600
|
-
async def
|
1168
|
+
async def _get_available_exchanges_for_market_async_without_preload_content(
|
601
1169
|
self,
|
602
1170
|
market: Annotated[
|
603
1171
|
MarketType, Field(description="Market type (spot or futures)")
|
@@ -656,7 +1224,96 @@ class ExchangesApi:
|
|
656
1224
|
response_data = await self.api_client.call_api(
|
657
1225
|
*_param, _request_timeout=_request_timeout
|
658
1226
|
)
|
659
|
-
return response_data
|
1227
|
+
return response_data
|
1228
|
+
|
1229
|
+
# Private sync implementation methods
|
1230
|
+
@validate_call
|
1231
|
+
def _get_available_exchanges_for_market_sync(
|
1232
|
+
self,
|
1233
|
+
market: Annotated[
|
1234
|
+
MarketType, Field(description="Market type (spot or futures)")
|
1235
|
+
],
|
1236
|
+
_request_timeout: Union[
|
1237
|
+
None,
|
1238
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1239
|
+
Tuple[
|
1240
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1241
|
+
],
|
1242
|
+
] = None,
|
1243
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1244
|
+
_content_type: Optional[StrictStr] = None,
|
1245
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1246
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1247
|
+
) -> List[str]:
|
1248
|
+
"""Synchronous version of get_available_exchanges_for_market"""
|
1249
|
+
return async_to_sync(self._get_available_exchanges_for_market_async)(
|
1250
|
+
market=market,
|
1251
|
+
_request_timeout=_request_timeout,
|
1252
|
+
_request_auth=_request_auth,
|
1253
|
+
_content_type=_content_type,
|
1254
|
+
_headers=_headers,
|
1255
|
+
_host_index=_host_index,
|
1256
|
+
)
|
1257
|
+
|
1258
|
+
@validate_call
|
1259
|
+
def _get_available_exchanges_for_market_sync_with_http_info(
|
1260
|
+
self,
|
1261
|
+
market: Annotated[
|
1262
|
+
MarketType, Field(description="Market type (spot or futures)")
|
1263
|
+
],
|
1264
|
+
_request_timeout: Union[
|
1265
|
+
None,
|
1266
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1267
|
+
Tuple[
|
1268
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1269
|
+
],
|
1270
|
+
] = None,
|
1271
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1272
|
+
_content_type: Optional[StrictStr] = None,
|
1273
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1274
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1275
|
+
) -> ApiResponse[List[str]]:
|
1276
|
+
"""Synchronous version of get_available_exchanges_for_market_with_http_info"""
|
1277
|
+
return async_to_sync(
|
1278
|
+
self._get_available_exchanges_for_market_async_with_http_info
|
1279
|
+
)(
|
1280
|
+
market=market,
|
1281
|
+
_request_timeout=_request_timeout,
|
1282
|
+
_request_auth=_request_auth,
|
1283
|
+
_content_type=_content_type,
|
1284
|
+
_headers=_headers,
|
1285
|
+
_host_index=_host_index,
|
1286
|
+
)
|
1287
|
+
|
1288
|
+
@validate_call
|
1289
|
+
def _get_available_exchanges_for_market_sync_without_preload_content(
|
1290
|
+
self,
|
1291
|
+
market: Annotated[
|
1292
|
+
MarketType, Field(description="Market type (spot or futures)")
|
1293
|
+
],
|
1294
|
+
_request_timeout: Union[
|
1295
|
+
None,
|
1296
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1297
|
+
Tuple[
|
1298
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1299
|
+
],
|
1300
|
+
] = None,
|
1301
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1302
|
+
_content_type: Optional[StrictStr] = None,
|
1303
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1304
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1305
|
+
) -> RESTResponseType:
|
1306
|
+
"""Synchronous version of get_available_exchanges_for_market_without_preload_content"""
|
1307
|
+
return async_to_sync(
|
1308
|
+
self._get_available_exchanges_for_market_async_without_preload_content
|
1309
|
+
)(
|
1310
|
+
market=market,
|
1311
|
+
_request_timeout=_request_timeout,
|
1312
|
+
_request_auth=_request_auth,
|
1313
|
+
_content_type=_content_type,
|
1314
|
+
_headers=_headers,
|
1315
|
+
_host_index=_host_index,
|
1316
|
+
)
|
660
1317
|
|
661
1318
|
def _get_available_exchanges_for_market_serialize(
|
662
1319
|
self,
|
@@ -715,7 +1372,143 @@ class ExchangesApi:
|
|
715
1372
|
)
|
716
1373
|
|
717
1374
|
@validate_call
|
718
|
-
|
1375
|
+
def get_exchange_mappings(
|
1376
|
+
self,
|
1377
|
+
market: Annotated[
|
1378
|
+
MarketType, Field(description="Market type (spot or futures)")
|
1379
|
+
],
|
1380
|
+
exchange: Annotated[
|
1381
|
+
Optional[InternalExchange],
|
1382
|
+
Field(description="Exchange name for which to fetch exchange mappings"),
|
1383
|
+
] = None,
|
1384
|
+
_request_timeout: Union[
|
1385
|
+
None,
|
1386
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1387
|
+
Tuple[
|
1388
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1389
|
+
],
|
1390
|
+
] = None,
|
1391
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1392
|
+
_content_type: Optional[StrictStr] = None,
|
1393
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1394
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1395
|
+
) -> List[ExchangeMapping]:
|
1396
|
+
"""Get Exchange Mappings"""
|
1397
|
+
if self.is_sync:
|
1398
|
+
return self._get_exchange_mappings_sync(
|
1399
|
+
market=market,
|
1400
|
+
exchange=exchange,
|
1401
|
+
_request_timeout=_request_timeout,
|
1402
|
+
_request_auth=_request_auth,
|
1403
|
+
_content_type=_content_type,
|
1404
|
+
_headers=_headers,
|
1405
|
+
_host_index=_host_index,
|
1406
|
+
)
|
1407
|
+
|
1408
|
+
else:
|
1409
|
+
return self._get_exchange_mappings_async(
|
1410
|
+
market=market,
|
1411
|
+
exchange=exchange,
|
1412
|
+
_request_timeout=_request_timeout,
|
1413
|
+
_request_auth=_request_auth,
|
1414
|
+
_content_type=_content_type,
|
1415
|
+
_headers=_headers,
|
1416
|
+
_host_index=_host_index,
|
1417
|
+
)
|
1418
|
+
|
1419
|
+
@validate_call
|
1420
|
+
def get_exchange_mappings_with_http_info(
|
1421
|
+
self,
|
1422
|
+
market: Annotated[
|
1423
|
+
MarketType, Field(description="Market type (spot or futures)")
|
1424
|
+
],
|
1425
|
+
exchange: Annotated[
|
1426
|
+
Optional[InternalExchange],
|
1427
|
+
Field(description="Exchange name for which to fetch exchange mappings"),
|
1428
|
+
] = None,
|
1429
|
+
_request_timeout: Union[
|
1430
|
+
None,
|
1431
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1432
|
+
Tuple[
|
1433
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1434
|
+
],
|
1435
|
+
] = None,
|
1436
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1437
|
+
_content_type: Optional[StrictStr] = None,
|
1438
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1439
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1440
|
+
) -> ApiResponse[List[ExchangeMapping]]:
|
1441
|
+
"""Get Exchange Mappings with HTTP info"""
|
1442
|
+
if self.is_sync:
|
1443
|
+
return self._get_exchange_mappings_sync_with_http_info(
|
1444
|
+
market=market,
|
1445
|
+
exchange=exchange,
|
1446
|
+
_request_timeout=_request_timeout,
|
1447
|
+
_request_auth=_request_auth,
|
1448
|
+
_content_type=_content_type,
|
1449
|
+
_headers=_headers,
|
1450
|
+
_host_index=_host_index,
|
1451
|
+
)
|
1452
|
+
|
1453
|
+
else:
|
1454
|
+
return self._get_exchange_mappings_async_with_http_info(
|
1455
|
+
market=market,
|
1456
|
+
exchange=exchange,
|
1457
|
+
_request_timeout=_request_timeout,
|
1458
|
+
_request_auth=_request_auth,
|
1459
|
+
_content_type=_content_type,
|
1460
|
+
_headers=_headers,
|
1461
|
+
_host_index=_host_index,
|
1462
|
+
)
|
1463
|
+
|
1464
|
+
@validate_call
|
1465
|
+
def get_exchange_mappings_without_preload_content(
|
1466
|
+
self,
|
1467
|
+
market: Annotated[
|
1468
|
+
MarketType, Field(description="Market type (spot or futures)")
|
1469
|
+
],
|
1470
|
+
exchange: Annotated[
|
1471
|
+
Optional[InternalExchange],
|
1472
|
+
Field(description="Exchange name for which to fetch exchange mappings"),
|
1473
|
+
] = None,
|
1474
|
+
_request_timeout: Union[
|
1475
|
+
None,
|
1476
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1477
|
+
Tuple[
|
1478
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1479
|
+
],
|
1480
|
+
] = None,
|
1481
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1482
|
+
_content_type: Optional[StrictStr] = None,
|
1483
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1484
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1485
|
+
) -> RESTResponseType:
|
1486
|
+
"""Get Exchange Mappings without preloading content"""
|
1487
|
+
if self.is_sync:
|
1488
|
+
return self._get_exchange_mappings_sync_without_preload_content(
|
1489
|
+
market=market,
|
1490
|
+
exchange=exchange,
|
1491
|
+
_request_timeout=_request_timeout,
|
1492
|
+
_request_auth=_request_auth,
|
1493
|
+
_content_type=_content_type,
|
1494
|
+
_headers=_headers,
|
1495
|
+
_host_index=_host_index,
|
1496
|
+
)
|
1497
|
+
|
1498
|
+
else:
|
1499
|
+
return self._get_exchange_mappings_async_without_preload_content(
|
1500
|
+
market=market,
|
1501
|
+
exchange=exchange,
|
1502
|
+
_request_timeout=_request_timeout,
|
1503
|
+
_request_auth=_request_auth,
|
1504
|
+
_content_type=_content_type,
|
1505
|
+
_headers=_headers,
|
1506
|
+
_host_index=_host_index,
|
1507
|
+
)
|
1508
|
+
|
1509
|
+
# Private async implementation methods
|
1510
|
+
@validate_call
|
1511
|
+
async def _get_exchange_mappings_async(
|
719
1512
|
self,
|
720
1513
|
market: Annotated[
|
721
1514
|
MarketType, Field(description="Market type (spot or futures)")
|
@@ -788,7 +1581,7 @@ class ExchangesApi:
|
|
788
1581
|
).data
|
789
1582
|
|
790
1583
|
@validate_call
|
791
|
-
async def
|
1584
|
+
async def _get_exchange_mappings_async_with_http_info(
|
792
1585
|
self,
|
793
1586
|
market: Annotated[
|
794
1587
|
MarketType, Field(description="Market type (spot or futures)")
|
@@ -856,12 +1649,11 @@ class ExchangesApi:
|
|
856
1649
|
)
|
857
1650
|
await response_data.read()
|
858
1651
|
return self.api_client.response_deserialize(
|
859
|
-
response_data=response_data,
|
860
|
-
response_types_map=_response_types_map,
|
1652
|
+
response_data=response_data, response_types_map=_response_types_map
|
861
1653
|
)
|
862
1654
|
|
863
1655
|
@validate_call
|
864
|
-
async def
|
1656
|
+
async def _get_exchange_mappings_async_without_preload_content(
|
865
1657
|
self,
|
866
1658
|
market: Annotated[
|
867
1659
|
MarketType, Field(description="Market type (spot or futures)")
|
@@ -921,14 +1713,114 @@ class ExchangesApi:
|
|
921
1713
|
_host_index=_host_index,
|
922
1714
|
)
|
923
1715
|
|
924
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
925
|
-
"200": "List[ExchangeMapping]",
|
926
|
-
}
|
927
|
-
response_data = await self.api_client.call_api(
|
928
|
-
*_param, _request_timeout=_request_timeout
|
929
|
-
)
|
930
|
-
return response_data
|
931
|
-
|
1716
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1717
|
+
"200": "List[ExchangeMapping]",
|
1718
|
+
}
|
1719
|
+
response_data = await self.api_client.call_api(
|
1720
|
+
*_param, _request_timeout=_request_timeout
|
1721
|
+
)
|
1722
|
+
return response_data
|
1723
|
+
|
1724
|
+
# Private sync implementation methods
|
1725
|
+
@validate_call
|
1726
|
+
def _get_exchange_mappings_sync(
|
1727
|
+
self,
|
1728
|
+
market: Annotated[
|
1729
|
+
MarketType, Field(description="Market type (spot or futures)")
|
1730
|
+
],
|
1731
|
+
exchange: Annotated[
|
1732
|
+
Optional[InternalExchange],
|
1733
|
+
Field(description="Exchange name for which to fetch exchange mappings"),
|
1734
|
+
] = None,
|
1735
|
+
_request_timeout: Union[
|
1736
|
+
None,
|
1737
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1738
|
+
Tuple[
|
1739
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1740
|
+
],
|
1741
|
+
] = None,
|
1742
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1743
|
+
_content_type: Optional[StrictStr] = None,
|
1744
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1745
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1746
|
+
) -> List[ExchangeMapping]:
|
1747
|
+
"""Synchronous version of get_exchange_mappings"""
|
1748
|
+
return async_to_sync(self._get_exchange_mappings_async)(
|
1749
|
+
market=market,
|
1750
|
+
exchange=exchange,
|
1751
|
+
_request_timeout=_request_timeout,
|
1752
|
+
_request_auth=_request_auth,
|
1753
|
+
_content_type=_content_type,
|
1754
|
+
_headers=_headers,
|
1755
|
+
_host_index=_host_index,
|
1756
|
+
)
|
1757
|
+
|
1758
|
+
@validate_call
|
1759
|
+
def _get_exchange_mappings_sync_with_http_info(
|
1760
|
+
self,
|
1761
|
+
market: Annotated[
|
1762
|
+
MarketType, Field(description="Market type (spot or futures)")
|
1763
|
+
],
|
1764
|
+
exchange: Annotated[
|
1765
|
+
Optional[InternalExchange],
|
1766
|
+
Field(description="Exchange name for which to fetch exchange mappings"),
|
1767
|
+
] = None,
|
1768
|
+
_request_timeout: Union[
|
1769
|
+
None,
|
1770
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1771
|
+
Tuple[
|
1772
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1773
|
+
],
|
1774
|
+
] = None,
|
1775
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1776
|
+
_content_type: Optional[StrictStr] = None,
|
1777
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1778
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1779
|
+
) -> ApiResponse[List[ExchangeMapping]]:
|
1780
|
+
"""Synchronous version of get_exchange_mappings_with_http_info"""
|
1781
|
+
return async_to_sync(self._get_exchange_mappings_async_with_http_info)(
|
1782
|
+
market=market,
|
1783
|
+
exchange=exchange,
|
1784
|
+
_request_timeout=_request_timeout,
|
1785
|
+
_request_auth=_request_auth,
|
1786
|
+
_content_type=_content_type,
|
1787
|
+
_headers=_headers,
|
1788
|
+
_host_index=_host_index,
|
1789
|
+
)
|
1790
|
+
|
1791
|
+
@validate_call
|
1792
|
+
def _get_exchange_mappings_sync_without_preload_content(
|
1793
|
+
self,
|
1794
|
+
market: Annotated[
|
1795
|
+
MarketType, Field(description="Market type (spot or futures)")
|
1796
|
+
],
|
1797
|
+
exchange: Annotated[
|
1798
|
+
Optional[InternalExchange],
|
1799
|
+
Field(description="Exchange name for which to fetch exchange mappings"),
|
1800
|
+
] = None,
|
1801
|
+
_request_timeout: Union[
|
1802
|
+
None,
|
1803
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1804
|
+
Tuple[
|
1805
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1806
|
+
],
|
1807
|
+
] = None,
|
1808
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1809
|
+
_content_type: Optional[StrictStr] = None,
|
1810
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1811
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1812
|
+
) -> RESTResponseType:
|
1813
|
+
"""Synchronous version of get_exchange_mappings_without_preload_content"""
|
1814
|
+
return async_to_sync(self._get_exchange_mappings_async_without_preload_content)(
|
1815
|
+
market=market,
|
1816
|
+
exchange=exchange,
|
1817
|
+
_request_timeout=_request_timeout,
|
1818
|
+
_request_auth=_request_auth,
|
1819
|
+
_content_type=_content_type,
|
1820
|
+
_headers=_headers,
|
1821
|
+
_host_index=_host_index,
|
1822
|
+
)
|
1823
|
+
|
932
1824
|
def _get_exchange_mappings_serialize(
|
933
1825
|
self,
|
934
1826
|
market,
|
@@ -991,12 +1883,199 @@ class ExchangesApi:
|
|
991
1883
|
)
|
992
1884
|
|
993
1885
|
@validate_call
|
994
|
-
|
1886
|
+
def get_exchange_mappings_for_pair(
|
1887
|
+
self,
|
1888
|
+
pair: Annotated[
|
1889
|
+
StrictStr,
|
1890
|
+
Field(
|
1891
|
+
description="Trading pair to find mappings for. Can be exchange specific (e.g., 'BTCUSDT', '1000SHIBUSDT') or a common format Symbol/QuoteCurrency (e.g., 'BTC/USDT')"
|
1892
|
+
),
|
1893
|
+
],
|
1894
|
+
market: Annotated[
|
1895
|
+
Optional[MarketType],
|
1896
|
+
Field(description="Market type (spot or futures). Defaults to futures."),
|
1897
|
+
] = None,
|
1898
|
+
exchange: Annotated[
|
1899
|
+
Optional[InternalExchange],
|
1900
|
+
Field(
|
1901
|
+
description="Optional exchange name to filter by. If not provided, returns all exchanges a match was found for."
|
1902
|
+
),
|
1903
|
+
] = None,
|
1904
|
+
quote_currency: Annotated[
|
1905
|
+
Optional[StrictStr],
|
1906
|
+
Field(description="Quote currency to filter by. Defaults to USDT."),
|
1907
|
+
] = None,
|
1908
|
+
_request_timeout: Union[
|
1909
|
+
None,
|
1910
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1911
|
+
Tuple[
|
1912
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1913
|
+
],
|
1914
|
+
] = None,
|
1915
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1916
|
+
_content_type: Optional[StrictStr] = None,
|
1917
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1918
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1919
|
+
) -> List[ExchangeMapping]:
|
1920
|
+
"""Get Exchange Mappings For Pair"""
|
1921
|
+
if self.is_sync:
|
1922
|
+
return self._get_exchange_mappings_for_pair_sync(
|
1923
|
+
pair=pair,
|
1924
|
+
market=market,
|
1925
|
+
exchange=exchange,
|
1926
|
+
quote_currency=quote_currency,
|
1927
|
+
_request_timeout=_request_timeout,
|
1928
|
+
_request_auth=_request_auth,
|
1929
|
+
_content_type=_content_type,
|
1930
|
+
_headers=_headers,
|
1931
|
+
_host_index=_host_index,
|
1932
|
+
)
|
1933
|
+
|
1934
|
+
else:
|
1935
|
+
return self._get_exchange_mappings_for_pair_async(
|
1936
|
+
pair=pair,
|
1937
|
+
market=market,
|
1938
|
+
exchange=exchange,
|
1939
|
+
quote_currency=quote_currency,
|
1940
|
+
_request_timeout=_request_timeout,
|
1941
|
+
_request_auth=_request_auth,
|
1942
|
+
_content_type=_content_type,
|
1943
|
+
_headers=_headers,
|
1944
|
+
_host_index=_host_index,
|
1945
|
+
)
|
1946
|
+
|
1947
|
+
@validate_call
|
1948
|
+
def get_exchange_mappings_for_pair_with_http_info(
|
1949
|
+
self,
|
1950
|
+
pair: Annotated[
|
1951
|
+
StrictStr,
|
1952
|
+
Field(
|
1953
|
+
description="Trading pair to find mappings for. Can be exchange specific (e.g., 'BTCUSDT', '1000SHIBUSDT') or a common format Symbol/QuoteCurrency (e.g., 'BTC/USDT')"
|
1954
|
+
),
|
1955
|
+
],
|
1956
|
+
market: Annotated[
|
1957
|
+
Optional[MarketType],
|
1958
|
+
Field(description="Market type (spot or futures). Defaults to futures."),
|
1959
|
+
] = None,
|
1960
|
+
exchange: Annotated[
|
1961
|
+
Optional[InternalExchange],
|
1962
|
+
Field(
|
1963
|
+
description="Optional exchange name to filter by. If not provided, returns all exchanges a match was found for."
|
1964
|
+
),
|
1965
|
+
] = None,
|
1966
|
+
quote_currency: Annotated[
|
1967
|
+
Optional[StrictStr],
|
1968
|
+
Field(description="Quote currency to filter by. Defaults to USDT."),
|
1969
|
+
] = None,
|
1970
|
+
_request_timeout: Union[
|
1971
|
+
None,
|
1972
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1973
|
+
Tuple[
|
1974
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1975
|
+
],
|
1976
|
+
] = None,
|
1977
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1978
|
+
_content_type: Optional[StrictStr] = None,
|
1979
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1980
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1981
|
+
) -> ApiResponse[List[ExchangeMapping]]:
|
1982
|
+
"""Get Exchange Mappings For Pair with HTTP info"""
|
1983
|
+
if self.is_sync:
|
1984
|
+
return self._get_exchange_mappings_for_pair_sync_with_http_info(
|
1985
|
+
pair=pair,
|
1986
|
+
market=market,
|
1987
|
+
exchange=exchange,
|
1988
|
+
quote_currency=quote_currency,
|
1989
|
+
_request_timeout=_request_timeout,
|
1990
|
+
_request_auth=_request_auth,
|
1991
|
+
_content_type=_content_type,
|
1992
|
+
_headers=_headers,
|
1993
|
+
_host_index=_host_index,
|
1994
|
+
)
|
1995
|
+
|
1996
|
+
else:
|
1997
|
+
return self._get_exchange_mappings_for_pair_async_with_http_info(
|
1998
|
+
pair=pair,
|
1999
|
+
market=market,
|
2000
|
+
exchange=exchange,
|
2001
|
+
quote_currency=quote_currency,
|
2002
|
+
_request_timeout=_request_timeout,
|
2003
|
+
_request_auth=_request_auth,
|
2004
|
+
_content_type=_content_type,
|
2005
|
+
_headers=_headers,
|
2006
|
+
_host_index=_host_index,
|
2007
|
+
)
|
2008
|
+
|
2009
|
+
@validate_call
|
2010
|
+
def get_exchange_mappings_for_pair_without_preload_content(
|
2011
|
+
self,
|
2012
|
+
pair: Annotated[
|
2013
|
+
StrictStr,
|
2014
|
+
Field(
|
2015
|
+
description="Trading pair to find mappings for. Can be exchange specific (e.g., 'BTCUSDT', '1000SHIBUSDT') or a common format Symbol/QuoteCurrency (e.g., 'BTC/USDT')"
|
2016
|
+
),
|
2017
|
+
],
|
2018
|
+
market: Annotated[
|
2019
|
+
Optional[MarketType],
|
2020
|
+
Field(description="Market type (spot or futures). Defaults to futures."),
|
2021
|
+
] = None,
|
2022
|
+
exchange: Annotated[
|
2023
|
+
Optional[InternalExchange],
|
2024
|
+
Field(
|
2025
|
+
description="Optional exchange name to filter by. If not provided, returns all exchanges a match was found for."
|
2026
|
+
),
|
2027
|
+
] = None,
|
2028
|
+
quote_currency: Annotated[
|
2029
|
+
Optional[StrictStr],
|
2030
|
+
Field(description="Quote currency to filter by. Defaults to USDT."),
|
2031
|
+
] = None,
|
2032
|
+
_request_timeout: Union[
|
2033
|
+
None,
|
2034
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2035
|
+
Tuple[
|
2036
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
2037
|
+
],
|
2038
|
+
] = None,
|
2039
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2040
|
+
_content_type: Optional[StrictStr] = None,
|
2041
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2042
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2043
|
+
) -> RESTResponseType:
|
2044
|
+
"""Get Exchange Mappings For Pair without preloading content"""
|
2045
|
+
if self.is_sync:
|
2046
|
+
return self._get_exchange_mappings_for_pair_sync_without_preload_content(
|
2047
|
+
pair=pair,
|
2048
|
+
market=market,
|
2049
|
+
exchange=exchange,
|
2050
|
+
quote_currency=quote_currency,
|
2051
|
+
_request_timeout=_request_timeout,
|
2052
|
+
_request_auth=_request_auth,
|
2053
|
+
_content_type=_content_type,
|
2054
|
+
_headers=_headers,
|
2055
|
+
_host_index=_host_index,
|
2056
|
+
)
|
2057
|
+
|
2058
|
+
else:
|
2059
|
+
return self._get_exchange_mappings_for_pair_async_without_preload_content(
|
2060
|
+
pair=pair,
|
2061
|
+
market=market,
|
2062
|
+
exchange=exchange,
|
2063
|
+
quote_currency=quote_currency,
|
2064
|
+
_request_timeout=_request_timeout,
|
2065
|
+
_request_auth=_request_auth,
|
2066
|
+
_content_type=_content_type,
|
2067
|
+
_headers=_headers,
|
2068
|
+
_host_index=_host_index,
|
2069
|
+
)
|
2070
|
+
|
2071
|
+
# Private async implementation methods
|
2072
|
+
@validate_call
|
2073
|
+
async def _get_exchange_mappings_for_pair_async(
|
995
2074
|
self,
|
996
2075
|
pair: Annotated[
|
997
2076
|
StrictStr,
|
998
2077
|
Field(
|
999
|
-
description="Trading pair to find mappings for (e.g., 'BTCUSDT', '1000SHIBUSDT')"
|
2078
|
+
description="Trading pair to find mappings for. Can be exchange specific (e.g., 'BTCUSDT', '1000SHIBUSDT') or a common format Symbol/QuoteCurrency (e.g., 'BTC/USDT')"
|
1000
2079
|
),
|
1001
2080
|
],
|
1002
2081
|
market: Annotated[
|
@@ -1006,7 +2085,7 @@ class ExchangesApi:
|
|
1006
2085
|
exchange: Annotated[
|
1007
2086
|
Optional[InternalExchange],
|
1008
2087
|
Field(
|
1009
|
-
description="Optional exchange name to filter by. If not provided, returns all exchanges."
|
2088
|
+
description="Optional exchange name to filter by. If not provided, returns all exchanges a match was found for."
|
1010
2089
|
),
|
1011
2090
|
] = None,
|
1012
2091
|
quote_currency: Annotated[
|
@@ -1029,11 +2108,11 @@ class ExchangesApi:
|
|
1029
2108
|
|
1030
2109
|
Get exchange mappings for a specific trading pair across all exchanges or a specific exchange. This endpoint finds the underlying symbol for a given pair and returns all perpetual contracts (excluding quarterly/dated contracts) with the specified quote currency.
|
1031
2110
|
|
1032
|
-
:param pair: Trading pair to find mappings for (e.g., 'BTCUSDT', '1000SHIBUSDT') (required)
|
2111
|
+
:param pair: Trading pair to find mappings for. Can be exchange specific (e.g., 'BTCUSDT', '1000SHIBUSDT') or a common format Symbol/QuoteCurrency (e.g., 'BTC/USDT') (required)
|
1033
2112
|
:type pair: str
|
1034
2113
|
:param market: Market type (spot or futures). Defaults to futures.
|
1035
2114
|
:type market: MarketType
|
1036
|
-
:param exchange: Optional exchange name to filter by. If not provided, returns all exchanges.
|
2115
|
+
:param exchange: Optional exchange name to filter by. If not provided, returns all exchanges a match was found for.
|
1037
2116
|
:type exchange: InternalExchange
|
1038
2117
|
:param quote_currency: Quote currency to filter by. Defaults to USDT.
|
1039
2118
|
:type quote_currency: str
|
@@ -1083,12 +2162,12 @@ class ExchangesApi:
|
|
1083
2162
|
).data
|
1084
2163
|
|
1085
2164
|
@validate_call
|
1086
|
-
async def
|
2165
|
+
async def _get_exchange_mappings_for_pair_async_with_http_info(
|
1087
2166
|
self,
|
1088
2167
|
pair: Annotated[
|
1089
2168
|
StrictStr,
|
1090
2169
|
Field(
|
1091
|
-
description="Trading pair to find mappings for (e.g., 'BTCUSDT', '1000SHIBUSDT')"
|
2170
|
+
description="Trading pair to find mappings for. Can be exchange specific (e.g., 'BTCUSDT', '1000SHIBUSDT') or a common format Symbol/QuoteCurrency (e.g., 'BTC/USDT')"
|
1092
2171
|
),
|
1093
2172
|
],
|
1094
2173
|
market: Annotated[
|
@@ -1098,7 +2177,7 @@ class ExchangesApi:
|
|
1098
2177
|
exchange: Annotated[
|
1099
2178
|
Optional[InternalExchange],
|
1100
2179
|
Field(
|
1101
|
-
description="Optional exchange name to filter by. If not provided, returns all exchanges."
|
2180
|
+
description="Optional exchange name to filter by. If not provided, returns all exchanges a match was found for."
|
1102
2181
|
),
|
1103
2182
|
] = None,
|
1104
2183
|
quote_currency: Annotated[
|
@@ -1121,11 +2200,11 @@ class ExchangesApi:
|
|
1121
2200
|
|
1122
2201
|
Get exchange mappings for a specific trading pair across all exchanges or a specific exchange. This endpoint finds the underlying symbol for a given pair and returns all perpetual contracts (excluding quarterly/dated contracts) with the specified quote currency.
|
1123
2202
|
|
1124
|
-
:param pair: Trading pair to find mappings for (e.g., 'BTCUSDT', '1000SHIBUSDT') (required)
|
2203
|
+
:param pair: Trading pair to find mappings for. Can be exchange specific (e.g., 'BTCUSDT', '1000SHIBUSDT') or a common format Symbol/QuoteCurrency (e.g., 'BTC/USDT') (required)
|
1125
2204
|
:type pair: str
|
1126
2205
|
:param market: Market type (spot or futures). Defaults to futures.
|
1127
2206
|
:type market: MarketType
|
1128
|
-
:param exchange: Optional exchange name to filter by. If not provided, returns all exchanges.
|
2207
|
+
:param exchange: Optional exchange name to filter by. If not provided, returns all exchanges a match was found for.
|
1129
2208
|
:type exchange: InternalExchange
|
1130
2209
|
:param quote_currency: Quote currency to filter by. Defaults to USDT.
|
1131
2210
|
:type quote_currency: str
|
@@ -1170,17 +2249,16 @@ class ExchangesApi:
|
|
1170
2249
|
)
|
1171
2250
|
await response_data.read()
|
1172
2251
|
return self.api_client.response_deserialize(
|
1173
|
-
response_data=response_data,
|
1174
|
-
response_types_map=_response_types_map,
|
2252
|
+
response_data=response_data, response_types_map=_response_types_map
|
1175
2253
|
)
|
1176
2254
|
|
1177
2255
|
@validate_call
|
1178
|
-
async def
|
2256
|
+
async def _get_exchange_mappings_for_pair_async_without_preload_content(
|
1179
2257
|
self,
|
1180
2258
|
pair: Annotated[
|
1181
2259
|
StrictStr,
|
1182
2260
|
Field(
|
1183
|
-
description="Trading pair to find mappings for (e.g., 'BTCUSDT', '1000SHIBUSDT')"
|
2261
|
+
description="Trading pair to find mappings for. Can be exchange specific (e.g., 'BTCUSDT', '1000SHIBUSDT') or a common format Symbol/QuoteCurrency (e.g., 'BTC/USDT')"
|
1184
2262
|
),
|
1185
2263
|
],
|
1186
2264
|
market: Annotated[
|
@@ -1190,7 +2268,7 @@ class ExchangesApi:
|
|
1190
2268
|
exchange: Annotated[
|
1191
2269
|
Optional[InternalExchange],
|
1192
2270
|
Field(
|
1193
|
-
description="Optional exchange name to filter by. If not provided, returns all exchanges."
|
2271
|
+
description="Optional exchange name to filter by. If not provided, returns all exchanges a match was found for."
|
1194
2272
|
),
|
1195
2273
|
] = None,
|
1196
2274
|
quote_currency: Annotated[
|
@@ -1213,11 +2291,11 @@ class ExchangesApi:
|
|
1213
2291
|
|
1214
2292
|
Get exchange mappings for a specific trading pair across all exchanges or a specific exchange. This endpoint finds the underlying symbol for a given pair and returns all perpetual contracts (excluding quarterly/dated contracts) with the specified quote currency.
|
1215
2293
|
|
1216
|
-
:param pair: Trading pair to find mappings for (e.g., 'BTCUSDT', '1000SHIBUSDT') (required)
|
2294
|
+
:param pair: Trading pair to find mappings for. Can be exchange specific (e.g., 'BTCUSDT', '1000SHIBUSDT') or a common format Symbol/QuoteCurrency (e.g., 'BTC/USDT') (required)
|
1217
2295
|
:type pair: str
|
1218
2296
|
:param market: Market type (spot or futures). Defaults to futures.
|
1219
2297
|
:type market: MarketType
|
1220
|
-
:param exchange: Optional exchange name to filter by. If not provided, returns all exchanges.
|
2298
|
+
:param exchange: Optional exchange name to filter by. If not provided, returns all exchanges a match was found for.
|
1221
2299
|
:type exchange: InternalExchange
|
1222
2300
|
:param quote_currency: Quote currency to filter by. Defaults to USDT.
|
1223
2301
|
:type quote_currency: str
|
@@ -1260,7 +2338,154 @@ class ExchangesApi:
|
|
1260
2338
|
response_data = await self.api_client.call_api(
|
1261
2339
|
*_param, _request_timeout=_request_timeout
|
1262
2340
|
)
|
1263
|
-
return response_data
|
2341
|
+
return response_data
|
2342
|
+
|
2343
|
+
# Private sync implementation methods
|
2344
|
+
@validate_call
|
2345
|
+
def _get_exchange_mappings_for_pair_sync(
|
2346
|
+
self,
|
2347
|
+
pair: Annotated[
|
2348
|
+
StrictStr,
|
2349
|
+
Field(
|
2350
|
+
description="Trading pair to find mappings for. Can be exchange specific (e.g., 'BTCUSDT', '1000SHIBUSDT') or a common format Symbol/QuoteCurrency (e.g., 'BTC/USDT')"
|
2351
|
+
),
|
2352
|
+
],
|
2353
|
+
market: Annotated[
|
2354
|
+
Optional[MarketType],
|
2355
|
+
Field(description="Market type (spot or futures). Defaults to futures."),
|
2356
|
+
] = None,
|
2357
|
+
exchange: Annotated[
|
2358
|
+
Optional[InternalExchange],
|
2359
|
+
Field(
|
2360
|
+
description="Optional exchange name to filter by. If not provided, returns all exchanges a match was found for."
|
2361
|
+
),
|
2362
|
+
] = None,
|
2363
|
+
quote_currency: Annotated[
|
2364
|
+
Optional[StrictStr],
|
2365
|
+
Field(description="Quote currency to filter by. Defaults to USDT."),
|
2366
|
+
] = None,
|
2367
|
+
_request_timeout: Union[
|
2368
|
+
None,
|
2369
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2370
|
+
Tuple[
|
2371
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
2372
|
+
],
|
2373
|
+
] = None,
|
2374
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2375
|
+
_content_type: Optional[StrictStr] = None,
|
2376
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2377
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2378
|
+
) -> List[ExchangeMapping]:
|
2379
|
+
"""Synchronous version of get_exchange_mappings_for_pair"""
|
2380
|
+
return async_to_sync(self._get_exchange_mappings_for_pair_async)(
|
2381
|
+
pair=pair,
|
2382
|
+
market=market,
|
2383
|
+
exchange=exchange,
|
2384
|
+
quote_currency=quote_currency,
|
2385
|
+
_request_timeout=_request_timeout,
|
2386
|
+
_request_auth=_request_auth,
|
2387
|
+
_content_type=_content_type,
|
2388
|
+
_headers=_headers,
|
2389
|
+
_host_index=_host_index,
|
2390
|
+
)
|
2391
|
+
|
2392
|
+
@validate_call
|
2393
|
+
def _get_exchange_mappings_for_pair_sync_with_http_info(
|
2394
|
+
self,
|
2395
|
+
pair: Annotated[
|
2396
|
+
StrictStr,
|
2397
|
+
Field(
|
2398
|
+
description="Trading pair to find mappings for. Can be exchange specific (e.g., 'BTCUSDT', '1000SHIBUSDT') or a common format Symbol/QuoteCurrency (e.g., 'BTC/USDT')"
|
2399
|
+
),
|
2400
|
+
],
|
2401
|
+
market: Annotated[
|
2402
|
+
Optional[MarketType],
|
2403
|
+
Field(description="Market type (spot or futures). Defaults to futures."),
|
2404
|
+
] = None,
|
2405
|
+
exchange: Annotated[
|
2406
|
+
Optional[InternalExchange],
|
2407
|
+
Field(
|
2408
|
+
description="Optional exchange name to filter by. If not provided, returns all exchanges a match was found for."
|
2409
|
+
),
|
2410
|
+
] = None,
|
2411
|
+
quote_currency: Annotated[
|
2412
|
+
Optional[StrictStr],
|
2413
|
+
Field(description="Quote currency to filter by. Defaults to USDT."),
|
2414
|
+
] = None,
|
2415
|
+
_request_timeout: Union[
|
2416
|
+
None,
|
2417
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2418
|
+
Tuple[
|
2419
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
2420
|
+
],
|
2421
|
+
] = None,
|
2422
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2423
|
+
_content_type: Optional[StrictStr] = None,
|
2424
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2425
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2426
|
+
) -> ApiResponse[List[ExchangeMapping]]:
|
2427
|
+
"""Synchronous version of get_exchange_mappings_for_pair_with_http_info"""
|
2428
|
+
return async_to_sync(self._get_exchange_mappings_for_pair_async_with_http_info)(
|
2429
|
+
pair=pair,
|
2430
|
+
market=market,
|
2431
|
+
exchange=exchange,
|
2432
|
+
quote_currency=quote_currency,
|
2433
|
+
_request_timeout=_request_timeout,
|
2434
|
+
_request_auth=_request_auth,
|
2435
|
+
_content_type=_content_type,
|
2436
|
+
_headers=_headers,
|
2437
|
+
_host_index=_host_index,
|
2438
|
+
)
|
2439
|
+
|
2440
|
+
@validate_call
|
2441
|
+
def _get_exchange_mappings_for_pair_sync_without_preload_content(
|
2442
|
+
self,
|
2443
|
+
pair: Annotated[
|
2444
|
+
StrictStr,
|
2445
|
+
Field(
|
2446
|
+
description="Trading pair to find mappings for. Can be exchange specific (e.g., 'BTCUSDT', '1000SHIBUSDT') or a common format Symbol/QuoteCurrency (e.g., 'BTC/USDT')"
|
2447
|
+
),
|
2448
|
+
],
|
2449
|
+
market: Annotated[
|
2450
|
+
Optional[MarketType],
|
2451
|
+
Field(description="Market type (spot or futures). Defaults to futures."),
|
2452
|
+
] = None,
|
2453
|
+
exchange: Annotated[
|
2454
|
+
Optional[InternalExchange],
|
2455
|
+
Field(
|
2456
|
+
description="Optional exchange name to filter by. If not provided, returns all exchanges a match was found for."
|
2457
|
+
),
|
2458
|
+
] = None,
|
2459
|
+
quote_currency: Annotated[
|
2460
|
+
Optional[StrictStr],
|
2461
|
+
Field(description="Quote currency to filter by. Defaults to USDT."),
|
2462
|
+
] = None,
|
2463
|
+
_request_timeout: Union[
|
2464
|
+
None,
|
2465
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2466
|
+
Tuple[
|
2467
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
2468
|
+
],
|
2469
|
+
] = None,
|
2470
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2471
|
+
_content_type: Optional[StrictStr] = None,
|
2472
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2473
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2474
|
+
) -> RESTResponseType:
|
2475
|
+
"""Synchronous version of get_exchange_mappings_for_pair_without_preload_content"""
|
2476
|
+
return async_to_sync(
|
2477
|
+
self._get_exchange_mappings_for_pair_async_without_preload_content
|
2478
|
+
)(
|
2479
|
+
pair=pair,
|
2480
|
+
market=market,
|
2481
|
+
exchange=exchange,
|
2482
|
+
quote_currency=quote_currency,
|
2483
|
+
_request_timeout=_request_timeout,
|
2484
|
+
_request_auth=_request_auth,
|
2485
|
+
_content_type=_content_type,
|
2486
|
+
_headers=_headers,
|
2487
|
+
_host_index=_host_index,
|
2488
|
+
)
|
1264
2489
|
|
1265
2490
|
def _get_exchange_mappings_for_pair_serialize(
|
1266
2491
|
self,
|