crypticorn 2.1.5__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 (38) hide show
  1. crypticorn/client.py +4 -0
  2. crypticorn/common/urls.py +1 -0
  3. crypticorn/klines/client/configuration.py +2 -2
  4. crypticorn/metrics/__init__.py +4 -0
  5. crypticorn/metrics/client/__init__.py +60 -0
  6. crypticorn/metrics/client/api/__init__.py +10 -0
  7. crypticorn/metrics/client/api/exchanges_api.py +1003 -0
  8. crypticorn/metrics/client/api/health_check_api.py +265 -0
  9. crypticorn/metrics/client/api/indicators_api.py +680 -0
  10. crypticorn/metrics/client/api/logs_api.py +356 -0
  11. crypticorn/metrics/client/api/marketcap_api.py +1315 -0
  12. crypticorn/metrics/client/api/markets_api.py +618 -0
  13. crypticorn/metrics/client/api/tokens_api.py +300 -0
  14. crypticorn/metrics/client/api_client.py +758 -0
  15. crypticorn/metrics/client/api_response.py +20 -0
  16. crypticorn/metrics/client/configuration.py +575 -0
  17. crypticorn/metrics/client/exceptions.py +220 -0
  18. crypticorn/metrics/client/models/__init__.py +37 -0
  19. crypticorn/metrics/client/models/base_response_dict.py +106 -0
  20. crypticorn/metrics/client/models/base_response_health_check_response.py +114 -0
  21. crypticorn/metrics/client/models/base_response_list_dict.py +106 -0
  22. crypticorn/metrics/client/models/base_response_list_exchange_mapping.py +118 -0
  23. crypticorn/metrics/client/models/base_response_list_str.py +106 -0
  24. crypticorn/metrics/client/models/error_response.py +109 -0
  25. crypticorn/metrics/client/models/exchange_mapping.py +132 -0
  26. crypticorn/metrics/client/models/health_check_response.py +91 -0
  27. crypticorn/metrics/client/models/http_validation_error.py +99 -0
  28. crypticorn/metrics/client/models/market.py +35 -0
  29. crypticorn/metrics/client/models/severity.py +36 -0
  30. crypticorn/metrics/client/models/validation_error.py +105 -0
  31. crypticorn/metrics/client/models/validation_error_loc_inner.py +159 -0
  32. crypticorn/metrics/client/py.typed +0 -0
  33. crypticorn/metrics/client/rest.py +195 -0
  34. crypticorn/metrics/main.py +112 -0
  35. {crypticorn-2.1.5.dist-info → crypticorn-2.1.6.dist-info}/METADATA +1 -1
  36. {crypticorn-2.1.5.dist-info → crypticorn-2.1.6.dist-info}/RECORD +38 -7
  37. {crypticorn-2.1.5.dist-info → crypticorn-2.1.6.dist-info}/WHEEL +0 -0
  38. {crypticorn-2.1.5.dist-info → crypticorn-2.1.6.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,1315 @@
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, StrictInt, 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.market import Market
26
+
27
+ from crypticorn.metrics.client.api_client import ApiClient, RequestSerialized
28
+ from crypticorn.metrics.client.api_response import ApiResponse
29
+ from crypticorn.metrics.client.rest import RESTResponseType
30
+
31
+
32
+ class MarketcapApi:
33
+ """NOTE: This class is auto generated by OpenAPI Generator
34
+ Ref: https://openapi-generator.tech
35
+
36
+ Do not edit the class manually.
37
+ """
38
+
39
+ def __init__(self, api_client=None) -> None:
40
+ if api_client is None:
41
+ api_client = ApiClient.get_default()
42
+ self.api_client = api_client
43
+
44
+ @validate_call
45
+ async def get_current_marketcap(
46
+ self,
47
+ limit: Annotated[
48
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
49
+ Field(description="Number of top symbols to fetch (1-100)"),
50
+ ] = None,
51
+ _request_timeout: Union[
52
+ None,
53
+ Annotated[StrictFloat, Field(gt=0)],
54
+ Tuple[
55
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
56
+ ],
57
+ ] = None,
58
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
59
+ _content_type: Optional[StrictStr] = None,
60
+ _headers: Optional[Dict[StrictStr, Any]] = None,
61
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
62
+ ) -> BaseResponseListDict:
63
+ """Get Current Marketcap
64
+
65
+ Retrieve current marketcap data for all symbols.
66
+
67
+ :param limit: Number of top symbols to fetch (1-100)
68
+ :type limit: int
69
+ :param _request_timeout: timeout setting for this request. If one
70
+ number provided, it will be total request
71
+ timeout. It can also be a pair (tuple) of
72
+ (connection, read) timeouts.
73
+ :type _request_timeout: int, tuple(int, int), optional
74
+ :param _request_auth: set to override the auth_settings for an a single
75
+ request; this effectively ignores the
76
+ authentication in the spec for a single request.
77
+ :type _request_auth: dict, optional
78
+ :param _content_type: force content-type for the request.
79
+ :type _content_type: str, Optional
80
+ :param _headers: set to override the headers for a single
81
+ request; this effectively ignores the headers
82
+ in the spec for a single request.
83
+ :type _headers: dict, optional
84
+ :param _host_index: set to override the host_index for a single
85
+ request; this effectively ignores the host_index
86
+ in the spec for a single request.
87
+ :type _host_index: int, optional
88
+ :return: Returns the result object.
89
+ """ # noqa: E501
90
+
91
+ _param = self._get_current_marketcap_serialize(
92
+ limit=limit,
93
+ _request_auth=_request_auth,
94
+ _content_type=_content_type,
95
+ _headers=_headers,
96
+ _host_index=_host_index,
97
+ )
98
+
99
+ _response_types_map: Dict[str, Optional[str]] = {
100
+ "200": "BaseResponseListDict",
101
+ "400": "ErrorResponse",
102
+ "404": "ErrorResponse",
103
+ "500": "ErrorResponse",
104
+ "422": "HTTPValidationError",
105
+ }
106
+ response_data = await self.api_client.call_api(
107
+ *_param, _request_timeout=_request_timeout
108
+ )
109
+ await response_data.read()
110
+ return self.api_client.response_deserialize(
111
+ response_data=response_data,
112
+ response_types_map=_response_types_map,
113
+ ).data
114
+
115
+ @validate_call
116
+ async def get_current_marketcap_with_http_info(
117
+ self,
118
+ limit: Annotated[
119
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
120
+ Field(description="Number of top symbols to fetch (1-100)"),
121
+ ] = None,
122
+ _request_timeout: Union[
123
+ None,
124
+ Annotated[StrictFloat, Field(gt=0)],
125
+ Tuple[
126
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
127
+ ],
128
+ ] = None,
129
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
130
+ _content_type: Optional[StrictStr] = None,
131
+ _headers: Optional[Dict[StrictStr, Any]] = None,
132
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
133
+ ) -> ApiResponse[BaseResponseListDict]:
134
+ """Get Current Marketcap
135
+
136
+ Retrieve current marketcap data for all symbols.
137
+
138
+ :param limit: Number of top symbols to fetch (1-100)
139
+ :type limit: int
140
+ :param _request_timeout: timeout setting for this request. If one
141
+ number provided, it will be total request
142
+ timeout. It can also be a pair (tuple) of
143
+ (connection, read) timeouts.
144
+ :type _request_timeout: int, tuple(int, int), optional
145
+ :param _request_auth: set to override the auth_settings for an a single
146
+ request; this effectively ignores the
147
+ authentication in the spec for a single request.
148
+ :type _request_auth: dict, optional
149
+ :param _content_type: force content-type for the request.
150
+ :type _content_type: str, Optional
151
+ :param _headers: set to override the headers for a single
152
+ request; this effectively ignores the headers
153
+ in the spec for a single request.
154
+ :type _headers: dict, optional
155
+ :param _host_index: set to override the host_index for a single
156
+ request; this effectively ignores the host_index
157
+ in the spec for a single request.
158
+ :type _host_index: int, optional
159
+ :return: Returns the result object.
160
+ """ # noqa: E501
161
+
162
+ _param = self._get_current_marketcap_serialize(
163
+ limit=limit,
164
+ _request_auth=_request_auth,
165
+ _content_type=_content_type,
166
+ _headers=_headers,
167
+ _host_index=_host_index,
168
+ )
169
+
170
+ _response_types_map: Dict[str, Optional[str]] = {
171
+ "200": "BaseResponseListDict",
172
+ "400": "ErrorResponse",
173
+ "404": "ErrorResponse",
174
+ "500": "ErrorResponse",
175
+ "422": "HTTPValidationError",
176
+ }
177
+ response_data = await self.api_client.call_api(
178
+ *_param, _request_timeout=_request_timeout
179
+ )
180
+ await response_data.read()
181
+ return self.api_client.response_deserialize(
182
+ response_data=response_data,
183
+ response_types_map=_response_types_map,
184
+ )
185
+
186
+ @validate_call
187
+ async def get_current_marketcap_without_preload_content(
188
+ self,
189
+ limit: Annotated[
190
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
191
+ Field(description="Number of top symbols to fetch (1-100)"),
192
+ ] = None,
193
+ _request_timeout: Union[
194
+ None,
195
+ Annotated[StrictFloat, Field(gt=0)],
196
+ Tuple[
197
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
198
+ ],
199
+ ] = None,
200
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
201
+ _content_type: Optional[StrictStr] = None,
202
+ _headers: Optional[Dict[StrictStr, Any]] = None,
203
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
204
+ ) -> RESTResponseType:
205
+ """Get Current Marketcap
206
+
207
+ Retrieve current marketcap data for all symbols.
208
+
209
+ :param limit: Number of top symbols to fetch (1-100)
210
+ :type limit: int
211
+ :param _request_timeout: timeout setting for this request. If one
212
+ number provided, it will be total request
213
+ timeout. It can also be a pair (tuple) of
214
+ (connection, read) timeouts.
215
+ :type _request_timeout: int, tuple(int, int), optional
216
+ :param _request_auth: set to override the auth_settings for an a single
217
+ request; this effectively ignores the
218
+ authentication in the spec for a single request.
219
+ :type _request_auth: dict, optional
220
+ :param _content_type: force content-type for the request.
221
+ :type _content_type: str, Optional
222
+ :param _headers: set to override the headers for a single
223
+ request; this effectively ignores the headers
224
+ in the spec for a single request.
225
+ :type _headers: dict, optional
226
+ :param _host_index: set to override the host_index for a single
227
+ request; this effectively ignores the host_index
228
+ in the spec for a single request.
229
+ :type _host_index: int, optional
230
+ :return: Returns the result object.
231
+ """ # noqa: E501
232
+
233
+ _param = self._get_current_marketcap_serialize(
234
+ limit=limit,
235
+ _request_auth=_request_auth,
236
+ _content_type=_content_type,
237
+ _headers=_headers,
238
+ _host_index=_host_index,
239
+ )
240
+
241
+ _response_types_map: Dict[str, Optional[str]] = {
242
+ "200": "BaseResponseListDict",
243
+ "400": "ErrorResponse",
244
+ "404": "ErrorResponse",
245
+ "500": "ErrorResponse",
246
+ "422": "HTTPValidationError",
247
+ }
248
+ response_data = await self.api_client.call_api(
249
+ *_param, _request_timeout=_request_timeout
250
+ )
251
+ return response_data.response
252
+
253
+ def _get_current_marketcap_serialize(
254
+ self,
255
+ limit,
256
+ _request_auth,
257
+ _content_type,
258
+ _headers,
259
+ _host_index,
260
+ ) -> RequestSerialized:
261
+
262
+ _host = None
263
+
264
+ _collection_formats: Dict[str, str] = {}
265
+
266
+ _path_params: Dict[str, str] = {}
267
+ _query_params: List[Tuple[str, str]] = []
268
+ _header_params: Dict[str, Optional[str]] = _headers or {}
269
+ _form_params: List[Tuple[str, str]] = []
270
+ _files: Dict[
271
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
272
+ ] = {}
273
+ _body_params: Optional[bytes] = None
274
+
275
+ # process the path parameters
276
+ # process the query parameters
277
+ if limit is not None:
278
+
279
+ _query_params.append(("limit", limit))
280
+
281
+ # process the header parameters
282
+ # process the form parameters
283
+ # process the body parameter
284
+
285
+ # set the HTTP header `Accept`
286
+ if "Accept" not in _header_params:
287
+ _header_params["Accept"] = self.api_client.select_header_accept(
288
+ ["application/json"]
289
+ )
290
+
291
+ # authentication setting
292
+ _auth_settings: List[str] = []
293
+
294
+ return self.api_client.param_serialize(
295
+ method="GET",
296
+ resource_path="/get_current_marketcap",
297
+ path_params=_path_params,
298
+ query_params=_query_params,
299
+ header_params=_header_params,
300
+ body=_body_params,
301
+ post_params=_form_params,
302
+ files=_files,
303
+ auth_settings=_auth_settings,
304
+ collection_formats=_collection_formats,
305
+ _host=_host,
306
+ _request_auth=_request_auth,
307
+ )
308
+
309
+ @validate_call
310
+ async def get_marketcap_between_timestamps(
311
+ self,
312
+ start_timestamp: Annotated[
313
+ Optional[StrictInt], Field(description="Start timestamp")
314
+ ] = None,
315
+ end_timestamp: Annotated[
316
+ Optional[StrictInt], Field(description="End timestamp")
317
+ ] = None,
318
+ _request_timeout: Union[
319
+ None,
320
+ Annotated[StrictFloat, Field(gt=0)],
321
+ Tuple[
322
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
323
+ ],
324
+ ] = None,
325
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
326
+ _content_type: Optional[StrictStr] = None,
327
+ _headers: Optional[Dict[StrictStr, Any]] = None,
328
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
329
+ ) -> BaseResponseListDict:
330
+ """Get Marketcap Between Timestamps
331
+
332
+ Retrieve marketcap data between timestamps.
333
+
334
+ :param start_timestamp: Start timestamp
335
+ :type start_timestamp: int
336
+ :param end_timestamp: End timestamp
337
+ :type end_timestamp: int
338
+ :param _request_timeout: timeout setting for this request. If one
339
+ number provided, it will be total request
340
+ timeout. It can also be a pair (tuple) of
341
+ (connection, read) timeouts.
342
+ :type _request_timeout: int, tuple(int, int), optional
343
+ :param _request_auth: set to override the auth_settings for an a single
344
+ request; this effectively ignores the
345
+ authentication in the spec for a single request.
346
+ :type _request_auth: dict, optional
347
+ :param _content_type: force content-type for the request.
348
+ :type _content_type: str, Optional
349
+ :param _headers: set to override the headers for a single
350
+ request; this effectively ignores the headers
351
+ in the spec for a single request.
352
+ :type _headers: dict, optional
353
+ :param _host_index: set to override the host_index for a single
354
+ request; this effectively ignores the host_index
355
+ in the spec for a single request.
356
+ :type _host_index: int, optional
357
+ :return: Returns the result object.
358
+ """ # noqa: E501
359
+
360
+ _param = self._get_marketcap_between_timestamps_serialize(
361
+ start_timestamp=start_timestamp,
362
+ end_timestamp=end_timestamp,
363
+ _request_auth=_request_auth,
364
+ _content_type=_content_type,
365
+ _headers=_headers,
366
+ _host_index=_host_index,
367
+ )
368
+
369
+ _response_types_map: Dict[str, Optional[str]] = {
370
+ "200": "BaseResponseListDict",
371
+ "400": "ErrorResponse",
372
+ "404": "ErrorResponse",
373
+ "500": "ErrorResponse",
374
+ "422": "HTTPValidationError",
375
+ }
376
+ response_data = await self.api_client.call_api(
377
+ *_param, _request_timeout=_request_timeout
378
+ )
379
+ await response_data.read()
380
+ return self.api_client.response_deserialize(
381
+ response_data=response_data,
382
+ response_types_map=_response_types_map,
383
+ ).data
384
+
385
+ @validate_call
386
+ async def get_marketcap_between_timestamps_with_http_info(
387
+ self,
388
+ start_timestamp: Annotated[
389
+ Optional[StrictInt], Field(description="Start timestamp")
390
+ ] = None,
391
+ end_timestamp: Annotated[
392
+ Optional[StrictInt], Field(description="End timestamp")
393
+ ] = None,
394
+ _request_timeout: Union[
395
+ None,
396
+ Annotated[StrictFloat, Field(gt=0)],
397
+ Tuple[
398
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
399
+ ],
400
+ ] = None,
401
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
402
+ _content_type: Optional[StrictStr] = None,
403
+ _headers: Optional[Dict[StrictStr, Any]] = None,
404
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
405
+ ) -> ApiResponse[BaseResponseListDict]:
406
+ """Get Marketcap Between Timestamps
407
+
408
+ Retrieve marketcap data between timestamps.
409
+
410
+ :param start_timestamp: Start timestamp
411
+ :type start_timestamp: int
412
+ :param end_timestamp: End timestamp
413
+ :type end_timestamp: int
414
+ :param _request_timeout: timeout setting for this request. If one
415
+ number provided, it will be total request
416
+ timeout. It can also be a pair (tuple) of
417
+ (connection, read) timeouts.
418
+ :type _request_timeout: int, tuple(int, int), optional
419
+ :param _request_auth: set to override the auth_settings for an a single
420
+ request; this effectively ignores the
421
+ authentication in the spec for a single request.
422
+ :type _request_auth: dict, optional
423
+ :param _content_type: force content-type for the request.
424
+ :type _content_type: str, Optional
425
+ :param _headers: set to override the headers for a single
426
+ request; this effectively ignores the headers
427
+ in the spec for a single request.
428
+ :type _headers: dict, optional
429
+ :param _host_index: set to override the host_index for a single
430
+ request; this effectively ignores the host_index
431
+ in the spec for a single request.
432
+ :type _host_index: int, optional
433
+ :return: Returns the result object.
434
+ """ # noqa: E501
435
+
436
+ _param = self._get_marketcap_between_timestamps_serialize(
437
+ start_timestamp=start_timestamp,
438
+ end_timestamp=end_timestamp,
439
+ _request_auth=_request_auth,
440
+ _content_type=_content_type,
441
+ _headers=_headers,
442
+ _host_index=_host_index,
443
+ )
444
+
445
+ _response_types_map: Dict[str, Optional[str]] = {
446
+ "200": "BaseResponseListDict",
447
+ "400": "ErrorResponse",
448
+ "404": "ErrorResponse",
449
+ "500": "ErrorResponse",
450
+ "422": "HTTPValidationError",
451
+ }
452
+ response_data = await self.api_client.call_api(
453
+ *_param, _request_timeout=_request_timeout
454
+ )
455
+ await response_data.read()
456
+ return self.api_client.response_deserialize(
457
+ response_data=response_data,
458
+ response_types_map=_response_types_map,
459
+ )
460
+
461
+ @validate_call
462
+ async def get_marketcap_between_timestamps_without_preload_content(
463
+ self,
464
+ start_timestamp: Annotated[
465
+ Optional[StrictInt], Field(description="Start timestamp")
466
+ ] = None,
467
+ end_timestamp: Annotated[
468
+ Optional[StrictInt], Field(description="End timestamp")
469
+ ] = None,
470
+ _request_timeout: Union[
471
+ None,
472
+ Annotated[StrictFloat, Field(gt=0)],
473
+ Tuple[
474
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
475
+ ],
476
+ ] = None,
477
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
478
+ _content_type: Optional[StrictStr] = None,
479
+ _headers: Optional[Dict[StrictStr, Any]] = None,
480
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
481
+ ) -> RESTResponseType:
482
+ """Get Marketcap Between Timestamps
483
+
484
+ Retrieve marketcap data between timestamps.
485
+
486
+ :param start_timestamp: Start timestamp
487
+ :type start_timestamp: int
488
+ :param end_timestamp: End timestamp
489
+ :type end_timestamp: int
490
+ :param _request_timeout: timeout setting for this request. If one
491
+ number provided, it will be total request
492
+ timeout. It can also be a pair (tuple) of
493
+ (connection, read) timeouts.
494
+ :type _request_timeout: int, tuple(int, int), optional
495
+ :param _request_auth: set to override the auth_settings for an a single
496
+ request; this effectively ignores the
497
+ authentication in the spec for a single request.
498
+ :type _request_auth: dict, optional
499
+ :param _content_type: force content-type for the request.
500
+ :type _content_type: str, Optional
501
+ :param _headers: set to override the headers for a single
502
+ request; this effectively ignores the headers
503
+ in the spec for a single request.
504
+ :type _headers: dict, optional
505
+ :param _host_index: set to override the host_index for a single
506
+ request; this effectively ignores the host_index
507
+ in the spec for a single request.
508
+ :type _host_index: int, optional
509
+ :return: Returns the result object.
510
+ """ # noqa: E501
511
+
512
+ _param = self._get_marketcap_between_timestamps_serialize(
513
+ start_timestamp=start_timestamp,
514
+ end_timestamp=end_timestamp,
515
+ _request_auth=_request_auth,
516
+ _content_type=_content_type,
517
+ _headers=_headers,
518
+ _host_index=_host_index,
519
+ )
520
+
521
+ _response_types_map: Dict[str, Optional[str]] = {
522
+ "200": "BaseResponseListDict",
523
+ "400": "ErrorResponse",
524
+ "404": "ErrorResponse",
525
+ "500": "ErrorResponse",
526
+ "422": "HTTPValidationError",
527
+ }
528
+ response_data = await self.api_client.call_api(
529
+ *_param, _request_timeout=_request_timeout
530
+ )
531
+ return response_data.response
532
+
533
+ def _get_marketcap_between_timestamps_serialize(
534
+ self,
535
+ start_timestamp,
536
+ end_timestamp,
537
+ _request_auth,
538
+ _content_type,
539
+ _headers,
540
+ _host_index,
541
+ ) -> RequestSerialized:
542
+
543
+ _host = None
544
+
545
+ _collection_formats: Dict[str, str] = {}
546
+
547
+ _path_params: Dict[str, str] = {}
548
+ _query_params: List[Tuple[str, str]] = []
549
+ _header_params: Dict[str, Optional[str]] = _headers or {}
550
+ _form_params: List[Tuple[str, str]] = []
551
+ _files: Dict[
552
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
553
+ ] = {}
554
+ _body_params: Optional[bytes] = None
555
+
556
+ # process the path parameters
557
+ # process the query parameters
558
+ if start_timestamp is not None:
559
+
560
+ _query_params.append(("start_timestamp", start_timestamp))
561
+
562
+ if end_timestamp is not None:
563
+
564
+ _query_params.append(("end_timestamp", end_timestamp))
565
+
566
+ # process the header parameters
567
+ # process the form parameters
568
+ # process the body parameter
569
+
570
+ # set the HTTP header `Accept`
571
+ if "Accept" not in _header_params:
572
+ _header_params["Accept"] = self.api_client.select_header_accept(
573
+ ["application/json"]
574
+ )
575
+
576
+ # authentication setting
577
+ _auth_settings: List[str] = []
578
+
579
+ return self.api_client.param_serialize(
580
+ method="GET",
581
+ resource_path="/marketcap",
582
+ path_params=_path_params,
583
+ query_params=_query_params,
584
+ header_params=_header_params,
585
+ body=_body_params,
586
+ post_params=_form_params,
587
+ files=_files,
588
+ auth_settings=_auth_settings,
589
+ collection_formats=_collection_formats,
590
+ _host=_host,
591
+ _request_auth=_request_auth,
592
+ )
593
+
594
+ @validate_call
595
+ async def get_marketcap_symbols(
596
+ self,
597
+ start_timestamp: Annotated[
598
+ Optional[StrictInt], Field(description="Start timestamp")
599
+ ] = None,
600
+ end_timestamp: Annotated[
601
+ Optional[StrictInt], Field(description="End timestamp")
602
+ ] = None,
603
+ interval: Annotated[
604
+ Optional[StrictStr],
605
+ Field(description="Interval for which to fetch symbols and marketcap data"),
606
+ ] = None,
607
+ market: Annotated[
608
+ Optional[Market],
609
+ Field(description="Market for which to fetch symbols and marketcap data"),
610
+ ] = None,
611
+ exchange: Annotated[
612
+ Optional[StrictStr],
613
+ Field(description="Exchange for which to fetch symbols and marketcap data"),
614
+ ] = None,
615
+ _request_timeout: Union[
616
+ None,
617
+ Annotated[StrictFloat, Field(gt=0)],
618
+ Tuple[
619
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
620
+ ],
621
+ ] = None,
622
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
623
+ _content_type: Optional[StrictStr] = None,
624
+ _headers: Optional[Dict[StrictStr, Any]] = None,
625
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
626
+ ) -> BaseResponseListDict:
627
+ """Get Symbols Marketcap Between Timestamps
628
+
629
+ Retrieve marketcap data for symbols between timestamps with optional filtering.
630
+
631
+ :param start_timestamp: Start timestamp
632
+ :type start_timestamp: int
633
+ :param end_timestamp: End timestamp
634
+ :type end_timestamp: int
635
+ :param interval: Interval for which to fetch symbols and marketcap data
636
+ :type interval: str
637
+ :param market: Market for which to fetch symbols and marketcap data
638
+ :type market: Market
639
+ :param exchange: Exchange for which to fetch symbols and marketcap data
640
+ :type exchange: str
641
+ :param _request_timeout: timeout setting for this request. If one
642
+ number provided, it will be total request
643
+ timeout. It can also be a pair (tuple) of
644
+ (connection, read) timeouts.
645
+ :type _request_timeout: int, tuple(int, int), optional
646
+ :param _request_auth: set to override the auth_settings for an a single
647
+ request; this effectively ignores the
648
+ authentication in the spec for a single request.
649
+ :type _request_auth: dict, optional
650
+ :param _content_type: force content-type for the request.
651
+ :type _content_type: str, Optional
652
+ :param _headers: set to override the headers for a single
653
+ request; this effectively ignores the headers
654
+ in the spec for a single request.
655
+ :type _headers: dict, optional
656
+ :param _host_index: set to override the host_index for a single
657
+ request; this effectively ignores the host_index
658
+ in the spec for a single request.
659
+ :type _host_index: int, optional
660
+ :return: Returns the result object.
661
+ """ # noqa: E501
662
+
663
+ _param = self._get_marketcap_symbols_serialize(
664
+ start_timestamp=start_timestamp,
665
+ end_timestamp=end_timestamp,
666
+ interval=interval,
667
+ market=market,
668
+ exchange=exchange,
669
+ _request_auth=_request_auth,
670
+ _content_type=_content_type,
671
+ _headers=_headers,
672
+ _host_index=_host_index,
673
+ )
674
+
675
+ _response_types_map: Dict[str, Optional[str]] = {
676
+ "200": "BaseResponseListDict",
677
+ "400": "ErrorResponse",
678
+ "404": "ErrorResponse",
679
+ "500": "ErrorResponse",
680
+ "422": "HTTPValidationError",
681
+ }
682
+ response_data = await self.api_client.call_api(
683
+ *_param, _request_timeout=_request_timeout
684
+ )
685
+ await response_data.read()
686
+ return self.api_client.response_deserialize(
687
+ response_data=response_data,
688
+ response_types_map=_response_types_map,
689
+ ).data
690
+
691
+ @validate_call
692
+ async def get_marketcap_symbols_with_http_info(
693
+ self,
694
+ start_timestamp: Annotated[
695
+ Optional[StrictInt], Field(description="Start timestamp")
696
+ ] = None,
697
+ end_timestamp: Annotated[
698
+ Optional[StrictInt], Field(description="End timestamp")
699
+ ] = None,
700
+ interval: Annotated[
701
+ Optional[StrictStr],
702
+ Field(description="Interval for which to fetch symbols and marketcap data"),
703
+ ] = None,
704
+ market: Annotated[
705
+ Optional[Market],
706
+ Field(description="Market for which to fetch symbols and marketcap data"),
707
+ ] = None,
708
+ exchange: Annotated[
709
+ Optional[StrictStr],
710
+ Field(description="Exchange for which to fetch symbols and marketcap data"),
711
+ ] = None,
712
+ _request_timeout: Union[
713
+ None,
714
+ Annotated[StrictFloat, Field(gt=0)],
715
+ Tuple[
716
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
717
+ ],
718
+ ] = None,
719
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
720
+ _content_type: Optional[StrictStr] = None,
721
+ _headers: Optional[Dict[StrictStr, Any]] = None,
722
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
723
+ ) -> ApiResponse[BaseResponseListDict]:
724
+ """Get Symbols Marketcap Between Timestamps
725
+
726
+ Retrieve marketcap data for symbols between timestamps with optional filtering.
727
+
728
+ :param start_timestamp: Start timestamp
729
+ :type start_timestamp: int
730
+ :param end_timestamp: End timestamp
731
+ :type end_timestamp: int
732
+ :param interval: Interval for which to fetch symbols and marketcap data
733
+ :type interval: str
734
+ :param market: Market for which to fetch symbols and marketcap data
735
+ :type market: Market
736
+ :param exchange: Exchange for which to fetch symbols and marketcap data
737
+ :type exchange: str
738
+ :param _request_timeout: timeout setting for this request. If one
739
+ number provided, it will be total request
740
+ timeout. It can also be a pair (tuple) of
741
+ (connection, read) timeouts.
742
+ :type _request_timeout: int, tuple(int, int), optional
743
+ :param _request_auth: set to override the auth_settings for an a single
744
+ request; this effectively ignores the
745
+ authentication in the spec for a single request.
746
+ :type _request_auth: dict, optional
747
+ :param _content_type: force content-type for the request.
748
+ :type _content_type: str, Optional
749
+ :param _headers: set to override the headers for a single
750
+ request; this effectively ignores the headers
751
+ in the spec for a single request.
752
+ :type _headers: dict, optional
753
+ :param _host_index: set to override the host_index for a single
754
+ request; this effectively ignores the host_index
755
+ in the spec for a single request.
756
+ :type _host_index: int, optional
757
+ :return: Returns the result object.
758
+ """ # noqa: E501
759
+
760
+ _param = self._get_marketcap_symbols_serialize(
761
+ start_timestamp=start_timestamp,
762
+ end_timestamp=end_timestamp,
763
+ interval=interval,
764
+ market=market,
765
+ exchange=exchange,
766
+ _request_auth=_request_auth,
767
+ _content_type=_content_type,
768
+ _headers=_headers,
769
+ _host_index=_host_index,
770
+ )
771
+
772
+ _response_types_map: Dict[str, Optional[str]] = {
773
+ "200": "BaseResponseListDict",
774
+ "400": "ErrorResponse",
775
+ "404": "ErrorResponse",
776
+ "500": "ErrorResponse",
777
+ "422": "HTTPValidationError",
778
+ }
779
+ response_data = await self.api_client.call_api(
780
+ *_param, _request_timeout=_request_timeout
781
+ )
782
+ await response_data.read()
783
+ return self.api_client.response_deserialize(
784
+ response_data=response_data,
785
+ response_types_map=_response_types_map,
786
+ )
787
+
788
+ @validate_call
789
+ async def get_marketcap_symbols_without_preload_content(
790
+ self,
791
+ start_timestamp: Annotated[
792
+ Optional[StrictInt], Field(description="Start timestamp")
793
+ ] = None,
794
+ end_timestamp: Annotated[
795
+ Optional[StrictInt], Field(description="End timestamp")
796
+ ] = None,
797
+ interval: Annotated[
798
+ Optional[StrictStr],
799
+ Field(description="Interval for which to fetch symbols and marketcap data"),
800
+ ] = None,
801
+ market: Annotated[
802
+ Optional[Market],
803
+ Field(description="Market for which to fetch symbols and marketcap data"),
804
+ ] = None,
805
+ exchange: Annotated[
806
+ Optional[StrictStr],
807
+ Field(description="Exchange for which to fetch symbols and marketcap data"),
808
+ ] = None,
809
+ _request_timeout: Union[
810
+ None,
811
+ Annotated[StrictFloat, Field(gt=0)],
812
+ Tuple[
813
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
814
+ ],
815
+ ] = None,
816
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
817
+ _content_type: Optional[StrictStr] = None,
818
+ _headers: Optional[Dict[StrictStr, Any]] = None,
819
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
820
+ ) -> RESTResponseType:
821
+ """Get Symbols Marketcap Between Timestamps
822
+
823
+ Retrieve marketcap data for symbols between timestamps with optional filtering.
824
+
825
+ :param start_timestamp: Start timestamp
826
+ :type start_timestamp: int
827
+ :param end_timestamp: End timestamp
828
+ :type end_timestamp: int
829
+ :param interval: Interval for which to fetch symbols and marketcap data
830
+ :type interval: str
831
+ :param market: Market for which to fetch symbols and marketcap data
832
+ :type market: Market
833
+ :param exchange: Exchange for which to fetch symbols and marketcap data
834
+ :type exchange: str
835
+ :param _request_timeout: timeout setting for this request. If one
836
+ number provided, it will be total request
837
+ timeout. It can also be a pair (tuple) of
838
+ (connection, read) timeouts.
839
+ :type _request_timeout: int, tuple(int, int), optional
840
+ :param _request_auth: set to override the auth_settings for an a single
841
+ request; this effectively ignores the
842
+ authentication in the spec for a single request.
843
+ :type _request_auth: dict, optional
844
+ :param _content_type: force content-type for the request.
845
+ :type _content_type: str, Optional
846
+ :param _headers: set to override the headers for a single
847
+ request; this effectively ignores the headers
848
+ in the spec for a single request.
849
+ :type _headers: dict, optional
850
+ :param _host_index: set to override the host_index for a single
851
+ request; this effectively ignores the host_index
852
+ in the spec for a single request.
853
+ :type _host_index: int, optional
854
+ :return: Returns the result object.
855
+ """ # noqa: E501
856
+
857
+ _param = self._get_marketcap_symbols_serialize(
858
+ start_timestamp=start_timestamp,
859
+ end_timestamp=end_timestamp,
860
+ interval=interval,
861
+ market=market,
862
+ exchange=exchange,
863
+ _request_auth=_request_auth,
864
+ _content_type=_content_type,
865
+ _headers=_headers,
866
+ _host_index=_host_index,
867
+ )
868
+
869
+ _response_types_map: Dict[str, Optional[str]] = {
870
+ "200": "BaseResponseListDict",
871
+ "400": "ErrorResponse",
872
+ "404": "ErrorResponse",
873
+ "500": "ErrorResponse",
874
+ "422": "HTTPValidationError",
875
+ }
876
+ response_data = await self.api_client.call_api(
877
+ *_param, _request_timeout=_request_timeout
878
+ )
879
+ return response_data.response
880
+
881
+ def _get_marketcap_symbols_serialize(
882
+ self,
883
+ start_timestamp,
884
+ end_timestamp,
885
+ interval,
886
+ market,
887
+ exchange,
888
+ _request_auth,
889
+ _content_type,
890
+ _headers,
891
+ _host_index,
892
+ ) -> RequestSerialized:
893
+
894
+ _host = None
895
+
896
+ _collection_formats: Dict[str, str] = {}
897
+
898
+ _path_params: Dict[str, str] = {}
899
+ _query_params: List[Tuple[str, str]] = []
900
+ _header_params: Dict[str, Optional[str]] = _headers or {}
901
+ _form_params: List[Tuple[str, str]] = []
902
+ _files: Dict[
903
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
904
+ ] = {}
905
+ _body_params: Optional[bytes] = None
906
+
907
+ # process the path parameters
908
+ # process the query parameters
909
+ if start_timestamp is not None:
910
+
911
+ _query_params.append(("start_timestamp", start_timestamp))
912
+
913
+ if end_timestamp is not None:
914
+
915
+ _query_params.append(("end_timestamp", end_timestamp))
916
+
917
+ if interval is not None:
918
+
919
+ _query_params.append(("interval", interval))
920
+
921
+ if market is not None:
922
+
923
+ _query_params.append(("market", market.value))
924
+
925
+ if exchange is not None:
926
+
927
+ _query_params.append(("exchange", exchange))
928
+
929
+ # process the header parameters
930
+ # process the form parameters
931
+ # process the body parameter
932
+
933
+ # set the HTTP header `Accept`
934
+ if "Accept" not in _header_params:
935
+ _header_params["Accept"] = self.api_client.select_header_accept(
936
+ ["application/json"]
937
+ )
938
+
939
+ # authentication setting
940
+ _auth_settings: List[str] = []
941
+
942
+ return self.api_client.param_serialize(
943
+ method="GET",
944
+ resource_path="/marketcap/symbols",
945
+ path_params=_path_params,
946
+ query_params=_query_params,
947
+ header_params=_header_params,
948
+ body=_body_params,
949
+ post_params=_form_params,
950
+ files=_files,
951
+ auth_settings=_auth_settings,
952
+ collection_formats=_collection_formats,
953
+ _host=_host,
954
+ _request_auth=_request_auth,
955
+ )
956
+
957
+ @validate_call
958
+ async def get_marketcap_symbols_with_ohlcv(
959
+ self,
960
+ timestamp: Annotated[
961
+ Optional[StrictInt],
962
+ Field(description="Timestamp for which to fetch symbols and OHLCV data"),
963
+ ] = None,
964
+ timeframe: Annotated[
965
+ Optional[StrictStr], Field(description="Timeframe for OHLCV data")
966
+ ] = None,
967
+ market: Annotated[
968
+ Optional[Market], Field(description="Market for OHLCV data")
969
+ ] = None,
970
+ top_n: Annotated[
971
+ Optional[StrictInt], Field(description="Number of symbols to fetch")
972
+ ] = None,
973
+ ohlcv_limit: Annotated[
974
+ Optional[StrictInt],
975
+ Field(description="Number of OHLCV data points to fetch"),
976
+ ] = None,
977
+ _request_timeout: Union[
978
+ None,
979
+ Annotated[StrictFloat, Field(gt=0)],
980
+ Tuple[
981
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
982
+ ],
983
+ ] = None,
984
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
985
+ _content_type: Optional[StrictStr] = None,
986
+ _headers: Optional[Dict[StrictStr, Any]] = None,
987
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
988
+ ) -> BaseResponseListDict:
989
+ """Get Symbols Marketcap With Ohlcv
990
+
991
+ Retrieve OHLCV data with marketcap for symbols at a specific timestamp.
992
+
993
+ :param timestamp: Timestamp for which to fetch symbols and OHLCV data
994
+ :type timestamp: int
995
+ :param timeframe: Timeframe for OHLCV data
996
+ :type timeframe: str
997
+ :param market: Market for OHLCV data
998
+ :type market: Market
999
+ :param top_n: Number of symbols to fetch
1000
+ :type top_n: int
1001
+ :param ohlcv_limit: Number of OHLCV data points to fetch
1002
+ :type ohlcv_limit: int
1003
+ :param _request_timeout: timeout setting for this request. If one
1004
+ number provided, it will be total request
1005
+ timeout. It can also be a pair (tuple) of
1006
+ (connection, read) timeouts.
1007
+ :type _request_timeout: int, tuple(int, int), optional
1008
+ :param _request_auth: set to override the auth_settings for an a single
1009
+ request; this effectively ignores the
1010
+ authentication in the spec for a single request.
1011
+ :type _request_auth: dict, optional
1012
+ :param _content_type: force content-type for the request.
1013
+ :type _content_type: str, Optional
1014
+ :param _headers: set to override the headers for a single
1015
+ request; this effectively ignores the headers
1016
+ in the spec for a single request.
1017
+ :type _headers: dict, optional
1018
+ :param _host_index: set to override the host_index for a single
1019
+ request; this effectively ignores the host_index
1020
+ in the spec for a single request.
1021
+ :type _host_index: int, optional
1022
+ :return: Returns the result object.
1023
+ """ # noqa: E501
1024
+
1025
+ _param = self._get_marketcap_symbols_with_ohlcv_serialize(
1026
+ timestamp=timestamp,
1027
+ timeframe=timeframe,
1028
+ market=market,
1029
+ top_n=top_n,
1030
+ ohlcv_limit=ohlcv_limit,
1031
+ _request_auth=_request_auth,
1032
+ _content_type=_content_type,
1033
+ _headers=_headers,
1034
+ _host_index=_host_index,
1035
+ )
1036
+
1037
+ _response_types_map: Dict[str, Optional[str]] = {
1038
+ "200": "BaseResponseListDict",
1039
+ "400": "ErrorResponse",
1040
+ "404": "ErrorResponse",
1041
+ "500": "ErrorResponse",
1042
+ "422": "HTTPValidationError",
1043
+ }
1044
+ response_data = await self.api_client.call_api(
1045
+ *_param, _request_timeout=_request_timeout
1046
+ )
1047
+ await response_data.read()
1048
+ return self.api_client.response_deserialize(
1049
+ response_data=response_data,
1050
+ response_types_map=_response_types_map,
1051
+ ).data
1052
+
1053
+ @validate_call
1054
+ async def get_marketcap_symbols_with_ohlcv_with_http_info(
1055
+ self,
1056
+ timestamp: Annotated[
1057
+ Optional[StrictInt],
1058
+ Field(description="Timestamp for which to fetch symbols and OHLCV data"),
1059
+ ] = None,
1060
+ timeframe: Annotated[
1061
+ Optional[StrictStr], Field(description="Timeframe for OHLCV data")
1062
+ ] = None,
1063
+ market: Annotated[
1064
+ Optional[Market], Field(description="Market for OHLCV data")
1065
+ ] = None,
1066
+ top_n: Annotated[
1067
+ Optional[StrictInt], Field(description="Number of symbols to fetch")
1068
+ ] = None,
1069
+ ohlcv_limit: Annotated[
1070
+ Optional[StrictInt],
1071
+ Field(description="Number of OHLCV data points to fetch"),
1072
+ ] = None,
1073
+ _request_timeout: Union[
1074
+ None,
1075
+ Annotated[StrictFloat, Field(gt=0)],
1076
+ Tuple[
1077
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1078
+ ],
1079
+ ] = None,
1080
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1081
+ _content_type: Optional[StrictStr] = None,
1082
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1083
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1084
+ ) -> ApiResponse[BaseResponseListDict]:
1085
+ """Get Symbols Marketcap With Ohlcv
1086
+
1087
+ Retrieve OHLCV data with marketcap for symbols at a specific timestamp.
1088
+
1089
+ :param timestamp: Timestamp for which to fetch symbols and OHLCV data
1090
+ :type timestamp: int
1091
+ :param timeframe: Timeframe for OHLCV data
1092
+ :type timeframe: str
1093
+ :param market: Market for OHLCV data
1094
+ :type market: Market
1095
+ :param top_n: Number of symbols to fetch
1096
+ :type top_n: int
1097
+ :param ohlcv_limit: Number of OHLCV data points to fetch
1098
+ :type ohlcv_limit: int
1099
+ :param _request_timeout: timeout setting for this request. If one
1100
+ number provided, it will be total request
1101
+ timeout. It can also be a pair (tuple) of
1102
+ (connection, read) timeouts.
1103
+ :type _request_timeout: int, tuple(int, int), optional
1104
+ :param _request_auth: set to override the auth_settings for an a single
1105
+ request; this effectively ignores the
1106
+ authentication in the spec for a single request.
1107
+ :type _request_auth: dict, optional
1108
+ :param _content_type: force content-type for the request.
1109
+ :type _content_type: str, Optional
1110
+ :param _headers: set to override the headers for a single
1111
+ request; this effectively ignores the headers
1112
+ in the spec for a single request.
1113
+ :type _headers: dict, optional
1114
+ :param _host_index: set to override the host_index for a single
1115
+ request; this effectively ignores the host_index
1116
+ in the spec for a single request.
1117
+ :type _host_index: int, optional
1118
+ :return: Returns the result object.
1119
+ """ # noqa: E501
1120
+
1121
+ _param = self._get_marketcap_symbols_with_ohlcv_serialize(
1122
+ timestamp=timestamp,
1123
+ timeframe=timeframe,
1124
+ market=market,
1125
+ top_n=top_n,
1126
+ ohlcv_limit=ohlcv_limit,
1127
+ _request_auth=_request_auth,
1128
+ _content_type=_content_type,
1129
+ _headers=_headers,
1130
+ _host_index=_host_index,
1131
+ )
1132
+
1133
+ _response_types_map: Dict[str, Optional[str]] = {
1134
+ "200": "BaseResponseListDict",
1135
+ "400": "ErrorResponse",
1136
+ "404": "ErrorResponse",
1137
+ "500": "ErrorResponse",
1138
+ "422": "HTTPValidationError",
1139
+ }
1140
+ response_data = await self.api_client.call_api(
1141
+ *_param, _request_timeout=_request_timeout
1142
+ )
1143
+ await response_data.read()
1144
+ return self.api_client.response_deserialize(
1145
+ response_data=response_data,
1146
+ response_types_map=_response_types_map,
1147
+ )
1148
+
1149
+ @validate_call
1150
+ async def get_marketcap_symbols_with_ohlcv_without_preload_content(
1151
+ self,
1152
+ timestamp: Annotated[
1153
+ Optional[StrictInt],
1154
+ Field(description="Timestamp for which to fetch symbols and OHLCV data"),
1155
+ ] = None,
1156
+ timeframe: Annotated[
1157
+ Optional[StrictStr], Field(description="Timeframe for OHLCV data")
1158
+ ] = None,
1159
+ market: Annotated[
1160
+ Optional[Market], Field(description="Market for OHLCV data")
1161
+ ] = None,
1162
+ top_n: Annotated[
1163
+ Optional[StrictInt], Field(description="Number of symbols to fetch")
1164
+ ] = None,
1165
+ ohlcv_limit: Annotated[
1166
+ Optional[StrictInt],
1167
+ Field(description="Number of OHLCV data points to fetch"),
1168
+ ] = None,
1169
+ _request_timeout: Union[
1170
+ None,
1171
+ Annotated[StrictFloat, Field(gt=0)],
1172
+ Tuple[
1173
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1174
+ ],
1175
+ ] = None,
1176
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1177
+ _content_type: Optional[StrictStr] = None,
1178
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1179
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1180
+ ) -> RESTResponseType:
1181
+ """Get Symbols Marketcap With Ohlcv
1182
+
1183
+ Retrieve OHLCV data with marketcap for symbols at a specific timestamp.
1184
+
1185
+ :param timestamp: Timestamp for which to fetch symbols and OHLCV data
1186
+ :type timestamp: int
1187
+ :param timeframe: Timeframe for OHLCV data
1188
+ :type timeframe: str
1189
+ :param market: Market for OHLCV data
1190
+ :type market: Market
1191
+ :param top_n: Number of symbols to fetch
1192
+ :type top_n: int
1193
+ :param ohlcv_limit: Number of OHLCV data points to fetch
1194
+ :type ohlcv_limit: int
1195
+ :param _request_timeout: timeout setting for this request. If one
1196
+ number provided, it will be total request
1197
+ timeout. It can also be a pair (tuple) of
1198
+ (connection, read) timeouts.
1199
+ :type _request_timeout: int, tuple(int, int), optional
1200
+ :param _request_auth: set to override the auth_settings for an a single
1201
+ request; this effectively ignores the
1202
+ authentication in the spec for a single request.
1203
+ :type _request_auth: dict, optional
1204
+ :param _content_type: force content-type for the request.
1205
+ :type _content_type: str, Optional
1206
+ :param _headers: set to override the headers for a single
1207
+ request; this effectively ignores the headers
1208
+ in the spec for a single request.
1209
+ :type _headers: dict, optional
1210
+ :param _host_index: set to override the host_index for a single
1211
+ request; this effectively ignores the host_index
1212
+ in the spec for a single request.
1213
+ :type _host_index: int, optional
1214
+ :return: Returns the result object.
1215
+ """ # noqa: E501
1216
+
1217
+ _param = self._get_marketcap_symbols_with_ohlcv_serialize(
1218
+ timestamp=timestamp,
1219
+ timeframe=timeframe,
1220
+ market=market,
1221
+ top_n=top_n,
1222
+ ohlcv_limit=ohlcv_limit,
1223
+ _request_auth=_request_auth,
1224
+ _content_type=_content_type,
1225
+ _headers=_headers,
1226
+ _host_index=_host_index,
1227
+ )
1228
+
1229
+ _response_types_map: Dict[str, Optional[str]] = {
1230
+ "200": "BaseResponseListDict",
1231
+ "400": "ErrorResponse",
1232
+ "404": "ErrorResponse",
1233
+ "500": "ErrorResponse",
1234
+ "422": "HTTPValidationError",
1235
+ }
1236
+ response_data = await self.api_client.call_api(
1237
+ *_param, _request_timeout=_request_timeout
1238
+ )
1239
+ return response_data.response
1240
+
1241
+ def _get_marketcap_symbols_with_ohlcv_serialize(
1242
+ self,
1243
+ timestamp,
1244
+ timeframe,
1245
+ market,
1246
+ top_n,
1247
+ ohlcv_limit,
1248
+ _request_auth,
1249
+ _content_type,
1250
+ _headers,
1251
+ _host_index,
1252
+ ) -> RequestSerialized:
1253
+
1254
+ _host = None
1255
+
1256
+ _collection_formats: Dict[str, str] = {}
1257
+
1258
+ _path_params: Dict[str, str] = {}
1259
+ _query_params: List[Tuple[str, str]] = []
1260
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1261
+ _form_params: List[Tuple[str, str]] = []
1262
+ _files: Dict[
1263
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1264
+ ] = {}
1265
+ _body_params: Optional[bytes] = None
1266
+
1267
+ # process the path parameters
1268
+ # process the query parameters
1269
+ if timestamp is not None:
1270
+
1271
+ _query_params.append(("timestamp", timestamp))
1272
+
1273
+ if timeframe is not None:
1274
+
1275
+ _query_params.append(("timeframe", timeframe))
1276
+
1277
+ if market is not None:
1278
+
1279
+ _query_params.append(("market", market.value))
1280
+
1281
+ if top_n is not None:
1282
+
1283
+ _query_params.append(("top_n", top_n))
1284
+
1285
+ if ohlcv_limit is not None:
1286
+
1287
+ _query_params.append(("ohlcv_limit", ohlcv_limit))
1288
+
1289
+ # process the header parameters
1290
+ # process the form parameters
1291
+ # process the body parameter
1292
+
1293
+ # set the HTTP header `Accept`
1294
+ if "Accept" not in _header_params:
1295
+ _header_params["Accept"] = self.api_client.select_header_accept(
1296
+ ["application/json"]
1297
+ )
1298
+
1299
+ # authentication setting
1300
+ _auth_settings: List[str] = []
1301
+
1302
+ return self.api_client.param_serialize(
1303
+ method="GET",
1304
+ resource_path="/marketcap/symbols/ohlcv",
1305
+ path_params=_path_params,
1306
+ query_params=_query_params,
1307
+ header_params=_header_params,
1308
+ body=_body_params,
1309
+ post_params=_form_params,
1310
+ files=_files,
1311
+ auth_settings=_auth_settings,
1312
+ collection_formats=_collection_formats,
1313
+ _host=_host,
1314
+ _request_auth=_request_auth,
1315
+ )