crypticorn 2.1.4__py3-none-any.whl → 2.1.6__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.
Files changed (47) hide show
  1. crypticorn/client.py +4 -0
  2. crypticorn/common/errors.py +1 -1
  3. crypticorn/common/sorter.py +9 -7
  4. crypticorn/common/urls.py +1 -0
  5. crypticorn/klines/client/configuration.py +2 -2
  6. crypticorn/metrics/__init__.py +4 -0
  7. crypticorn/metrics/client/__init__.py +60 -0
  8. crypticorn/metrics/client/api/__init__.py +10 -0
  9. crypticorn/metrics/client/api/exchanges_api.py +1003 -0
  10. crypticorn/metrics/client/api/health_check_api.py +265 -0
  11. crypticorn/metrics/client/api/indicators_api.py +680 -0
  12. crypticorn/metrics/client/api/logs_api.py +356 -0
  13. crypticorn/metrics/client/api/marketcap_api.py +1315 -0
  14. crypticorn/metrics/client/api/markets_api.py +618 -0
  15. crypticorn/metrics/client/api/tokens_api.py +300 -0
  16. crypticorn/metrics/client/api_client.py +758 -0
  17. crypticorn/metrics/client/api_response.py +20 -0
  18. crypticorn/metrics/client/configuration.py +575 -0
  19. crypticorn/metrics/client/exceptions.py +220 -0
  20. crypticorn/metrics/client/models/__init__.py +37 -0
  21. crypticorn/metrics/client/models/base_response_dict.py +106 -0
  22. crypticorn/metrics/client/models/base_response_health_check_response.py +114 -0
  23. crypticorn/metrics/client/models/base_response_list_dict.py +106 -0
  24. crypticorn/metrics/client/models/base_response_list_exchange_mapping.py +118 -0
  25. crypticorn/metrics/client/models/base_response_list_str.py +106 -0
  26. crypticorn/metrics/client/models/error_response.py +109 -0
  27. crypticorn/metrics/client/models/exchange_mapping.py +132 -0
  28. crypticorn/{trade/client/models/update_notification.py → metrics/client/models/health_check_response.py} +15 -19
  29. crypticorn/metrics/client/models/http_validation_error.py +99 -0
  30. crypticorn/metrics/client/models/market.py +35 -0
  31. crypticorn/metrics/client/models/severity.py +36 -0
  32. crypticorn/metrics/client/models/validation_error.py +105 -0
  33. crypticorn/metrics/client/models/validation_error_loc_inner.py +159 -0
  34. crypticorn/metrics/client/py.typed +0 -0
  35. crypticorn/metrics/client/rest.py +195 -0
  36. crypticorn/metrics/main.py +112 -0
  37. crypticorn/pay/client/api/products_api.py +15 -15
  38. crypticorn/pay/client/models/now_webhook_payload.py +1 -1
  39. crypticorn/trade/client/api/futures_trading_panel_api.py +15 -15
  40. crypticorn/trade/client/models/api_error_identifier.py +49 -47
  41. crypticorn/trade/client/models/api_error_level.py +2 -2
  42. {crypticorn-2.1.4.dist-info → crypticorn-2.1.6.dist-info}/METADATA +3 -3
  43. {crypticorn-2.1.4.dist-info → crypticorn-2.1.6.dist-info}/RECORD +45 -17
  44. crypticorn/trade/client/models/notification_type.py +0 -37
  45. crypticorn/trade/client/models/strategy_model.py +0 -158
  46. {crypticorn-2.1.4.dist-info → crypticorn-2.1.6.dist-info}/WHEEL +0 -0
  47. {crypticorn-2.1.4.dist-info → crypticorn-2.1.6.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,618 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Marketcap Service API
5
+
6
+ API for retrieving historical marketcap data, available exchanges, and indicators. ## Features - Historical marketcap data - OHLCV data with marketcap - Technical indicators (KER, SMA) - Exchange and symbol mappings - Error logs
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import Field, StrictStr, field_validator
20
+ from typing import Optional
21
+ from typing_extensions import Annotated
22
+ from crypticorn.metrics.client.models.base_response_list_dict import (
23
+ BaseResponseListDict,
24
+ )
25
+ from crypticorn.metrics.client.models.base_response_list_str import BaseResponseListStr
26
+ from crypticorn.metrics.client.models.market import Market
27
+
28
+ from crypticorn.metrics.client.api_client import ApiClient, RequestSerialized
29
+ from crypticorn.metrics.client.api_response import ApiResponse
30
+ from crypticorn.metrics.client.rest import RESTResponseType
31
+
32
+
33
+ class MarketsApi:
34
+ """NOTE: This class is auto generated by OpenAPI Generator
35
+ Ref: https://openapi-generator.tech
36
+
37
+ Do not edit the class manually.
38
+ """
39
+
40
+ def __init__(self, api_client=None) -> None:
41
+ if api_client is None:
42
+ api_client = ApiClient.get_default()
43
+ self.api_client = api_client
44
+
45
+ @validate_call
46
+ async def get_available_markets_for_symbol(
47
+ self,
48
+ market: Annotated[Market, Field(description="Market type (spot or futures)")],
49
+ symbol: Annotated[StrictStr, Field(description="Symbol to fetch markets for")],
50
+ quote_currency: Annotated[
51
+ Optional[StrictStr],
52
+ Field(description="Quote currency for which to fetch markets"),
53
+ ] = None,
54
+ status: Annotated[
55
+ Optional[StrictStr],
56
+ Field(description="Trading pair status for which to fetch markets"),
57
+ ] = None,
58
+ _request_timeout: Union[
59
+ None,
60
+ Annotated[StrictFloat, Field(gt=0)],
61
+ Tuple[
62
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
63
+ ],
64
+ ] = None,
65
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
66
+ _content_type: Optional[StrictStr] = None,
67
+ _headers: Optional[Dict[StrictStr, Any]] = None,
68
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
69
+ ) -> BaseResponseListDict:
70
+ """Get Markets For Symbol
71
+
72
+ Get markets for a symbol with filtering options.
73
+
74
+ :param market: Market type (spot or futures) (required)
75
+ :type market: Market
76
+ :param symbol: Symbol to fetch markets for (required)
77
+ :type symbol: str
78
+ :param quote_currency: Quote currency for which to fetch markets
79
+ :type quote_currency: str
80
+ :param status: Trading pair status for which to fetch markets
81
+ :type status: str
82
+ :param _request_timeout: timeout setting for this request. If one
83
+ number provided, it will be total request
84
+ timeout. It can also be a pair (tuple) of
85
+ (connection, read) timeouts.
86
+ :type _request_timeout: int, tuple(int, int), optional
87
+ :param _request_auth: set to override the auth_settings for an a single
88
+ request; this effectively ignores the
89
+ authentication in the spec for a single request.
90
+ :type _request_auth: dict, optional
91
+ :param _content_type: force content-type for the request.
92
+ :type _content_type: str, Optional
93
+ :param _headers: set to override the headers for a single
94
+ request; this effectively ignores the headers
95
+ in the spec for a single request.
96
+ :type _headers: dict, optional
97
+ :param _host_index: set to override the host_index for a single
98
+ request; this effectively ignores the host_index
99
+ in the spec for a single request.
100
+ :type _host_index: int, optional
101
+ :return: Returns the result object.
102
+ """ # noqa: E501
103
+
104
+ _param = self._get_available_markets_for_symbol_serialize(
105
+ market=market,
106
+ symbol=symbol,
107
+ quote_currency=quote_currency,
108
+ status=status,
109
+ _request_auth=_request_auth,
110
+ _content_type=_content_type,
111
+ _headers=_headers,
112
+ _host_index=_host_index,
113
+ )
114
+
115
+ _response_types_map: Dict[str, Optional[str]] = {
116
+ "200": "BaseResponseListDict",
117
+ "400": "ErrorResponse",
118
+ "404": "ErrorResponse",
119
+ "500": "ErrorResponse",
120
+ "422": "HTTPValidationError",
121
+ }
122
+ response_data = await self.api_client.call_api(
123
+ *_param, _request_timeout=_request_timeout
124
+ )
125
+ await response_data.read()
126
+ return self.api_client.response_deserialize(
127
+ response_data=response_data,
128
+ response_types_map=_response_types_map,
129
+ ).data
130
+
131
+ @validate_call
132
+ async def get_available_markets_for_symbol_with_http_info(
133
+ self,
134
+ market: Annotated[Market, Field(description="Market type (spot or futures)")],
135
+ symbol: Annotated[StrictStr, Field(description="Symbol to fetch markets for")],
136
+ quote_currency: Annotated[
137
+ Optional[StrictStr],
138
+ Field(description="Quote currency for which to fetch markets"),
139
+ ] = None,
140
+ status: Annotated[
141
+ Optional[StrictStr],
142
+ Field(description="Trading pair status for which to fetch markets"),
143
+ ] = None,
144
+ _request_timeout: Union[
145
+ None,
146
+ Annotated[StrictFloat, Field(gt=0)],
147
+ Tuple[
148
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
149
+ ],
150
+ ] = None,
151
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
152
+ _content_type: Optional[StrictStr] = None,
153
+ _headers: Optional[Dict[StrictStr, Any]] = None,
154
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
155
+ ) -> ApiResponse[BaseResponseListDict]:
156
+ """Get Markets For Symbol
157
+
158
+ Get markets for a symbol with filtering options.
159
+
160
+ :param market: Market type (spot or futures) (required)
161
+ :type market: Market
162
+ :param symbol: Symbol to fetch markets for (required)
163
+ :type symbol: str
164
+ :param quote_currency: Quote currency for which to fetch markets
165
+ :type quote_currency: str
166
+ :param status: Trading pair status for which to fetch markets
167
+ :type status: str
168
+ :param _request_timeout: timeout setting for this request. If one
169
+ number provided, it will be total request
170
+ timeout. It can also be a pair (tuple) of
171
+ (connection, read) timeouts.
172
+ :type _request_timeout: int, tuple(int, int), optional
173
+ :param _request_auth: set to override the auth_settings for an a single
174
+ request; this effectively ignores the
175
+ authentication in the spec for a single request.
176
+ :type _request_auth: dict, optional
177
+ :param _content_type: force content-type for the request.
178
+ :type _content_type: str, Optional
179
+ :param _headers: set to override the headers for a single
180
+ request; this effectively ignores the headers
181
+ in the spec for a single request.
182
+ :type _headers: dict, optional
183
+ :param _host_index: set to override the host_index for a single
184
+ request; this effectively ignores the host_index
185
+ in the spec for a single request.
186
+ :type _host_index: int, optional
187
+ :return: Returns the result object.
188
+ """ # noqa: E501
189
+
190
+ _param = self._get_available_markets_for_symbol_serialize(
191
+ market=market,
192
+ symbol=symbol,
193
+ quote_currency=quote_currency,
194
+ status=status,
195
+ _request_auth=_request_auth,
196
+ _content_type=_content_type,
197
+ _headers=_headers,
198
+ _host_index=_host_index,
199
+ )
200
+
201
+ _response_types_map: Dict[str, Optional[str]] = {
202
+ "200": "BaseResponseListDict",
203
+ "400": "ErrorResponse",
204
+ "404": "ErrorResponse",
205
+ "500": "ErrorResponse",
206
+ "422": "HTTPValidationError",
207
+ }
208
+ response_data = await self.api_client.call_api(
209
+ *_param, _request_timeout=_request_timeout
210
+ )
211
+ await response_data.read()
212
+ return self.api_client.response_deserialize(
213
+ response_data=response_data,
214
+ response_types_map=_response_types_map,
215
+ )
216
+
217
+ @validate_call
218
+ async def get_available_markets_for_symbol_without_preload_content(
219
+ self,
220
+ market: Annotated[Market, Field(description="Market type (spot or futures)")],
221
+ symbol: Annotated[StrictStr, Field(description="Symbol to fetch markets for")],
222
+ quote_currency: Annotated[
223
+ Optional[StrictStr],
224
+ Field(description="Quote currency for which to fetch markets"),
225
+ ] = None,
226
+ status: Annotated[
227
+ Optional[StrictStr],
228
+ Field(description="Trading pair status for which to fetch markets"),
229
+ ] = None,
230
+ _request_timeout: Union[
231
+ None,
232
+ Annotated[StrictFloat, Field(gt=0)],
233
+ Tuple[
234
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
235
+ ],
236
+ ] = None,
237
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
238
+ _content_type: Optional[StrictStr] = None,
239
+ _headers: Optional[Dict[StrictStr, Any]] = None,
240
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
241
+ ) -> RESTResponseType:
242
+ """Get Markets For Symbol
243
+
244
+ Get markets for a symbol with filtering options.
245
+
246
+ :param market: Market type (spot or futures) (required)
247
+ :type market: Market
248
+ :param symbol: Symbol to fetch markets for (required)
249
+ :type symbol: str
250
+ :param quote_currency: Quote currency for which to fetch markets
251
+ :type quote_currency: str
252
+ :param status: Trading pair status for which to fetch markets
253
+ :type status: str
254
+ :param _request_timeout: timeout setting for this request. If one
255
+ number provided, it will be total request
256
+ timeout. It can also be a pair (tuple) of
257
+ (connection, read) timeouts.
258
+ :type _request_timeout: int, tuple(int, int), optional
259
+ :param _request_auth: set to override the auth_settings for an a single
260
+ request; this effectively ignores the
261
+ authentication in the spec for a single request.
262
+ :type _request_auth: dict, optional
263
+ :param _content_type: force content-type for the request.
264
+ :type _content_type: str, Optional
265
+ :param _headers: set to override the headers for a single
266
+ request; this effectively ignores the headers
267
+ in the spec for a single request.
268
+ :type _headers: dict, optional
269
+ :param _host_index: set to override the host_index for a single
270
+ request; this effectively ignores the host_index
271
+ in the spec for a single request.
272
+ :type _host_index: int, optional
273
+ :return: Returns the result object.
274
+ """ # noqa: E501
275
+
276
+ _param = self._get_available_markets_for_symbol_serialize(
277
+ market=market,
278
+ symbol=symbol,
279
+ quote_currency=quote_currency,
280
+ status=status,
281
+ _request_auth=_request_auth,
282
+ _content_type=_content_type,
283
+ _headers=_headers,
284
+ _host_index=_host_index,
285
+ )
286
+
287
+ _response_types_map: Dict[str, Optional[str]] = {
288
+ "200": "BaseResponseListDict",
289
+ "400": "ErrorResponse",
290
+ "404": "ErrorResponse",
291
+ "500": "ErrorResponse",
292
+ "422": "HTTPValidationError",
293
+ }
294
+ response_data = await self.api_client.call_api(
295
+ *_param, _request_timeout=_request_timeout
296
+ )
297
+ return response_data.response
298
+
299
+ def _get_available_markets_for_symbol_serialize(
300
+ self,
301
+ market,
302
+ symbol,
303
+ quote_currency,
304
+ status,
305
+ _request_auth,
306
+ _content_type,
307
+ _headers,
308
+ _host_index,
309
+ ) -> RequestSerialized:
310
+
311
+ _host = None
312
+
313
+ _collection_formats: Dict[str, str] = {}
314
+
315
+ _path_params: Dict[str, str] = {}
316
+ _query_params: List[Tuple[str, str]] = []
317
+ _header_params: Dict[str, Optional[str]] = _headers or {}
318
+ _form_params: List[Tuple[str, str]] = []
319
+ _files: Dict[
320
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
321
+ ] = {}
322
+ _body_params: Optional[bytes] = None
323
+
324
+ # process the path parameters
325
+ if market is not None:
326
+ _path_params["market"] = market.value
327
+ if symbol is not None:
328
+ _path_params["symbol"] = symbol
329
+ # process the query parameters
330
+ if quote_currency is not None:
331
+
332
+ _query_params.append(("quote_currency", quote_currency))
333
+
334
+ if status is not None:
335
+
336
+ _query_params.append(("status", status))
337
+
338
+ # process the header parameters
339
+ # process the form parameters
340
+ # process the body parameter
341
+
342
+ # set the HTTP header `Accept`
343
+ if "Accept" not in _header_params:
344
+ _header_params["Accept"] = self.api_client.select_header_accept(
345
+ ["application/json"]
346
+ )
347
+
348
+ # authentication setting
349
+ _auth_settings: List[str] = []
350
+
351
+ return self.api_client.param_serialize(
352
+ method="GET",
353
+ resource_path="/markets/{market}/{symbol}",
354
+ path_params=_path_params,
355
+ query_params=_query_params,
356
+ header_params=_header_params,
357
+ body=_body_params,
358
+ post_params=_form_params,
359
+ files=_files,
360
+ auth_settings=_auth_settings,
361
+ collection_formats=_collection_formats,
362
+ _host=_host,
363
+ _request_auth=_request_auth,
364
+ )
365
+
366
+ @validate_call
367
+ async def get_quote_currencies(
368
+ self,
369
+ market: Annotated[Market, Field(description="Market type (spot or futures)")],
370
+ _request_timeout: Union[
371
+ None,
372
+ Annotated[StrictFloat, Field(gt=0)],
373
+ Tuple[
374
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
375
+ ],
376
+ ] = None,
377
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
378
+ _content_type: Optional[StrictStr] = None,
379
+ _headers: Optional[Dict[StrictStr, Any]] = None,
380
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
381
+ ) -> BaseResponseListStr:
382
+ """Get Quote Currencies
383
+
384
+ Get available quote currencies for a market.
385
+
386
+ :param market: Market type (spot or futures) (required)
387
+ :type market: Market
388
+ :param _request_timeout: timeout setting for this request. If one
389
+ number provided, it will be total request
390
+ timeout. It can also be a pair (tuple) of
391
+ (connection, read) timeouts.
392
+ :type _request_timeout: int, tuple(int, int), optional
393
+ :param _request_auth: set to override the auth_settings for an a single
394
+ request; this effectively ignores the
395
+ authentication in the spec for a single request.
396
+ :type _request_auth: dict, optional
397
+ :param _content_type: force content-type for the request.
398
+ :type _content_type: str, Optional
399
+ :param _headers: set to override the headers for a single
400
+ request; this effectively ignores the headers
401
+ in the spec for a single request.
402
+ :type _headers: dict, optional
403
+ :param _host_index: set to override the host_index for a single
404
+ request; this effectively ignores the host_index
405
+ in the spec for a single request.
406
+ :type _host_index: int, optional
407
+ :return: Returns the result object.
408
+ """ # noqa: E501
409
+
410
+ _param = self._get_quote_currencies_serialize(
411
+ market=market,
412
+ _request_auth=_request_auth,
413
+ _content_type=_content_type,
414
+ _headers=_headers,
415
+ _host_index=_host_index,
416
+ )
417
+
418
+ _response_types_map: Dict[str, Optional[str]] = {
419
+ "200": "BaseResponseListStr",
420
+ "400": "ErrorResponse",
421
+ "404": "ErrorResponse",
422
+ "500": "ErrorResponse",
423
+ "422": "HTTPValidationError",
424
+ }
425
+ response_data = await self.api_client.call_api(
426
+ *_param, _request_timeout=_request_timeout
427
+ )
428
+ await response_data.read()
429
+ return self.api_client.response_deserialize(
430
+ response_data=response_data,
431
+ response_types_map=_response_types_map,
432
+ ).data
433
+
434
+ @validate_call
435
+ async def get_quote_currencies_with_http_info(
436
+ self,
437
+ market: Annotated[Market, Field(description="Market type (spot or futures)")],
438
+ _request_timeout: Union[
439
+ None,
440
+ Annotated[StrictFloat, Field(gt=0)],
441
+ Tuple[
442
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
443
+ ],
444
+ ] = None,
445
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
446
+ _content_type: Optional[StrictStr] = None,
447
+ _headers: Optional[Dict[StrictStr, Any]] = None,
448
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
449
+ ) -> ApiResponse[BaseResponseListStr]:
450
+ """Get Quote Currencies
451
+
452
+ Get available quote currencies for a market.
453
+
454
+ :param market: Market type (spot or futures) (required)
455
+ :type market: Market
456
+ :param _request_timeout: timeout setting for this request. If one
457
+ number provided, it will be total request
458
+ timeout. It can also be a pair (tuple) of
459
+ (connection, read) timeouts.
460
+ :type _request_timeout: int, tuple(int, int), optional
461
+ :param _request_auth: set to override the auth_settings for an a single
462
+ request; this effectively ignores the
463
+ authentication in the spec for a single request.
464
+ :type _request_auth: dict, optional
465
+ :param _content_type: force content-type for the request.
466
+ :type _content_type: str, Optional
467
+ :param _headers: set to override the headers for a single
468
+ request; this effectively ignores the headers
469
+ in the spec for a single request.
470
+ :type _headers: dict, optional
471
+ :param _host_index: set to override the host_index for a single
472
+ request; this effectively ignores the host_index
473
+ in the spec for a single request.
474
+ :type _host_index: int, optional
475
+ :return: Returns the result object.
476
+ """ # noqa: E501
477
+
478
+ _param = self._get_quote_currencies_serialize(
479
+ market=market,
480
+ _request_auth=_request_auth,
481
+ _content_type=_content_type,
482
+ _headers=_headers,
483
+ _host_index=_host_index,
484
+ )
485
+
486
+ _response_types_map: Dict[str, Optional[str]] = {
487
+ "200": "BaseResponseListStr",
488
+ "400": "ErrorResponse",
489
+ "404": "ErrorResponse",
490
+ "500": "ErrorResponse",
491
+ "422": "HTTPValidationError",
492
+ }
493
+ response_data = await self.api_client.call_api(
494
+ *_param, _request_timeout=_request_timeout
495
+ )
496
+ await response_data.read()
497
+ return self.api_client.response_deserialize(
498
+ response_data=response_data,
499
+ response_types_map=_response_types_map,
500
+ )
501
+
502
+ @validate_call
503
+ async def get_quote_currencies_without_preload_content(
504
+ self,
505
+ market: Annotated[Market, Field(description="Market type (spot or futures)")],
506
+ _request_timeout: Union[
507
+ None,
508
+ Annotated[StrictFloat, Field(gt=0)],
509
+ Tuple[
510
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
511
+ ],
512
+ ] = None,
513
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
514
+ _content_type: Optional[StrictStr] = None,
515
+ _headers: Optional[Dict[StrictStr, Any]] = None,
516
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
517
+ ) -> RESTResponseType:
518
+ """Get Quote Currencies
519
+
520
+ Get available quote currencies for a market.
521
+
522
+ :param market: Market type (spot or futures) (required)
523
+ :type market: Market
524
+ :param _request_timeout: timeout setting for this request. If one
525
+ number provided, it will be total request
526
+ timeout. It can also be a pair (tuple) of
527
+ (connection, read) timeouts.
528
+ :type _request_timeout: int, tuple(int, int), optional
529
+ :param _request_auth: set to override the auth_settings for an a single
530
+ request; this effectively ignores the
531
+ authentication in the spec for a single request.
532
+ :type _request_auth: dict, optional
533
+ :param _content_type: force content-type for the request.
534
+ :type _content_type: str, Optional
535
+ :param _headers: set to override the headers for a single
536
+ request; this effectively ignores the headers
537
+ in the spec for a single request.
538
+ :type _headers: dict, optional
539
+ :param _host_index: set to override the host_index for a single
540
+ request; this effectively ignores the host_index
541
+ in the spec for a single request.
542
+ :type _host_index: int, optional
543
+ :return: Returns the result object.
544
+ """ # noqa: E501
545
+
546
+ _param = self._get_quote_currencies_serialize(
547
+ market=market,
548
+ _request_auth=_request_auth,
549
+ _content_type=_content_type,
550
+ _headers=_headers,
551
+ _host_index=_host_index,
552
+ )
553
+
554
+ _response_types_map: Dict[str, Optional[str]] = {
555
+ "200": "BaseResponseListStr",
556
+ "400": "ErrorResponse",
557
+ "404": "ErrorResponse",
558
+ "500": "ErrorResponse",
559
+ "422": "HTTPValidationError",
560
+ }
561
+ response_data = await self.api_client.call_api(
562
+ *_param, _request_timeout=_request_timeout
563
+ )
564
+ return response_data.response
565
+
566
+ def _get_quote_currencies_serialize(
567
+ self,
568
+ market,
569
+ _request_auth,
570
+ _content_type,
571
+ _headers,
572
+ _host_index,
573
+ ) -> RequestSerialized:
574
+
575
+ _host = None
576
+
577
+ _collection_formats: Dict[str, str] = {}
578
+
579
+ _path_params: Dict[str, str] = {}
580
+ _query_params: List[Tuple[str, str]] = []
581
+ _header_params: Dict[str, Optional[str]] = _headers or {}
582
+ _form_params: List[Tuple[str, str]] = []
583
+ _files: Dict[
584
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
585
+ ] = {}
586
+ _body_params: Optional[bytes] = None
587
+
588
+ # process the path parameters
589
+ if market is not None:
590
+ _path_params["market"] = market.value
591
+ # process the query parameters
592
+ # process the header parameters
593
+ # process the form parameters
594
+ # process the body parameter
595
+
596
+ # set the HTTP header `Accept`
597
+ if "Accept" not in _header_params:
598
+ _header_params["Accept"] = self.api_client.select_header_accept(
599
+ ["application/json"]
600
+ )
601
+
602
+ # authentication setting
603
+ _auth_settings: List[str] = []
604
+
605
+ return self.api_client.param_serialize(
606
+ method="GET",
607
+ resource_path="/quote_currencies/{market}",
608
+ path_params=_path_params,
609
+ query_params=_query_params,
610
+ header_params=_header_params,
611
+ body=_body_params,
612
+ post_params=_form_params,
613
+ files=_files,
614
+ auth_settings=_auth_settings,
615
+ collection_formats=_collection_formats,
616
+ _host=_host,
617
+ _request_auth=_request_auth,
618
+ )