crypticorn 2.17.0rc4__py3-none-any.whl → 2.17.0rc6__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 (151) hide show
  1. crypticorn/auth/client/api/admin_api.py +6 -26
  2. crypticorn/auth/client/api/auth_api.py +36 -148
  3. crypticorn/auth/client/api/service_api.py +3 -16
  4. crypticorn/auth/client/api/user_api.py +33 -136
  5. crypticorn/auth/client/api/wallet_api.py +18 -76
  6. crypticorn/auth/client/api_client.py +0 -5
  7. crypticorn/auth/client/models/add_wallet_request.py +1 -1
  8. crypticorn/auth/client/models/authorize_user_request.py +1 -1
  9. crypticorn/auth/client/models/create_api_key_request.py +1 -1
  10. crypticorn/auth/client/models/create_user_request.py +1 -1
  11. crypticorn/auth/client/models/get_api_keys200_response_inner.py +1 -1
  12. crypticorn/auth/client/models/list_wallets200_response_balances_inner_sale_round.py +1 -1
  13. crypticorn/auth/client/models/list_wallets200_response_balances_inner_wallet.py +1 -1
  14. crypticorn/auth/client/models/list_wallets200_response_balances_inner_wallet_vesting_wallets_inner.py +1 -1
  15. crypticorn/auth/client/models/list_wallets200_response_data_inner.py +1 -1
  16. crypticorn/auth/client/models/logout_default_response.py +1 -1
  17. crypticorn/auth/client/models/oauth_callback200_response_user.py +1 -1
  18. crypticorn/auth/client/models/refresh_token_info200_response_user_session.py +1 -1
  19. crypticorn/auth/client/models/rotate_tokens200_response.py +1 -1
  20. crypticorn/auth/client/models/token_info200_response.py +1 -1
  21. crypticorn/auth/client/models/update_user_request.py +1 -1
  22. crypticorn/auth/client/models/user_by_username200_response.py +1 -1
  23. crypticorn/auth/client/models/verify200_response.py +1 -1
  24. crypticorn/auth/client/models/verify_email200_response_auth.py +1 -1
  25. crypticorn/auth/client/models/verify_email200_response_auth_auth.py +1 -1
  26. crypticorn/auth/client/models/whoami200_response.py +1 -1
  27. crypticorn/cli/init.py +1 -1
  28. crypticorn/cli/templates/.env.docker.temp +3 -0
  29. crypticorn/cli/templates/.env.example.temp +4 -0
  30. crypticorn/cli/templates/Dockerfile +5 -2
  31. crypticorn/client.py +0 -1
  32. crypticorn/common/auth.py +31 -4
  33. crypticorn/common/decorators.py +1 -2
  34. crypticorn/common/enums.py +0 -2
  35. crypticorn/common/errors.py +10 -0
  36. crypticorn/common/metrics.py +1 -1
  37. crypticorn/common/middleware.py +0 -1
  38. crypticorn/common/pagination.py +116 -24
  39. crypticorn/common/router/admin_router.py +1 -11
  40. crypticorn/common/router/status_router.py +33 -2
  41. crypticorn/common/scopes.py +2 -2
  42. crypticorn/common/utils.py +1 -2
  43. crypticorn/dex/__init__.py +6 -0
  44. crypticorn/dex/client/__init__.py +49 -0
  45. crypticorn/dex/client/api/__init__.py +6 -0
  46. crypticorn/dex/client/api/admin_api.py +2983 -0
  47. crypticorn/dex/client/api/signals_api.py +1794 -0
  48. crypticorn/dex/client/api/status_api.py +889 -0
  49. crypticorn/dex/client/api_client.py +753 -0
  50. crypticorn/dex/client/api_response.py +20 -0
  51. crypticorn/dex/client/configuration.py +620 -0
  52. crypticorn/dex/client/exceptions.py +220 -0
  53. crypticorn/dex/client/models/__init__.py +30 -0
  54. crypticorn/dex/client/models/api_error_identifier.py +121 -0
  55. crypticorn/dex/client/models/api_error_level.py +37 -0
  56. crypticorn/dex/client/models/api_error_type.py +37 -0
  57. crypticorn/dex/client/models/exception_detail.py +117 -0
  58. crypticorn/dex/client/models/log_level.py +38 -0
  59. crypticorn/dex/client/models/paginated_response_signal_with_token.py +134 -0
  60. crypticorn/dex/client/models/risk.py +86 -0
  61. crypticorn/dex/client/models/signal_overview_stats.py +156 -0
  62. crypticorn/dex/client/models/signal_volume.py +84 -0
  63. crypticorn/dex/client/models/signal_with_token.py +163 -0
  64. crypticorn/dex/client/models/token_data.py +127 -0
  65. crypticorn/dex/client/models/token_detail.py +116 -0
  66. crypticorn/dex/client/py.typed +0 -0
  67. crypticorn/dex/client/rest.py +217 -0
  68. crypticorn/dex/main.py +1 -0
  69. crypticorn/hive/client/api/admin_api.py +18 -75
  70. crypticorn/hive/client/api/data_api.py +6 -28
  71. crypticorn/hive/client/api/models_api.py +22 -88
  72. crypticorn/hive/client/api/status_api.py +6 -27
  73. crypticorn/hive/client/api_client.py +0 -5
  74. crypticorn/hive/client/models/coin_info.py +1 -1
  75. crypticorn/hive/client/models/exception_detail.py +1 -1
  76. crypticorn/hive/client/models/target_info.py +1 -1
  77. crypticorn/hive/utils.py +2 -2
  78. crypticorn/klines/client/api/admin_api.py +18 -75
  79. crypticorn/klines/client/api/change_in_timeframe_api.py +3 -16
  80. crypticorn/klines/client/api/funding_rates_api.py +3 -16
  81. crypticorn/klines/client/api/ohlcv_data_api.py +3 -16
  82. crypticorn/klines/client/api/status_api.py +6 -27
  83. crypticorn/klines/client/api/symbols_api.py +3 -16
  84. crypticorn/klines/client/api/udf_api.py +18 -74
  85. crypticorn/klines/client/api_client.py +0 -5
  86. crypticorn/klines/client/models/exception_detail.py +1 -1
  87. crypticorn/klines/client/models/ohlcv.py +1 -1
  88. crypticorn/klines/client/models/symbol_group.py +1 -1
  89. crypticorn/klines/client/models/udf_config.py +1 -1
  90. crypticorn/metrics/client/api/admin_api.py +18 -75
  91. crypticorn/metrics/client/api/exchanges_api.py +12 -52
  92. crypticorn/metrics/client/api/indicators_api.py +6 -28
  93. crypticorn/metrics/client/api/logs_api.py +3 -16
  94. crypticorn/metrics/client/api/marketcap_api.py +12 -52
  95. crypticorn/metrics/client/api/markets_api.py +3 -16
  96. crypticorn/metrics/client/api/quote_currencies_api.py +3 -16
  97. crypticorn/metrics/client/api/status_api.py +6 -27
  98. crypticorn/metrics/client/api/tokens_api.py +6 -26
  99. crypticorn/metrics/client/api_client.py +0 -5
  100. crypticorn/metrics/client/models/exception_detail.py +1 -1
  101. crypticorn/metrics/client/models/exchange_mapping.py +1 -1
  102. crypticorn/metrics/client/models/marketcap_ranking.py +1 -1
  103. crypticorn/metrics/client/models/marketcap_symbol_ranking.py +1 -1
  104. crypticorn/metrics/client/models/ohlcv.py +1 -1
  105. crypticorn/pay/client/api/admin_api.py +21 -87
  106. crypticorn/pay/client/api/now_payments_api.py +15 -64
  107. crypticorn/pay/client/api/payments_api.py +6 -28
  108. crypticorn/pay/client/api/products_api.py +12 -52
  109. crypticorn/pay/client/api/status_api.py +6 -27
  110. crypticorn/pay/client/api_client.py +0 -5
  111. crypticorn/pay/client/models/exception_detail.py +1 -1
  112. crypticorn/pay/client/models/now_create_invoice_req.py +1 -1
  113. crypticorn/pay/client/models/now_create_invoice_res.py +1 -1
  114. crypticorn/pay/client/models/product.py +1 -1
  115. crypticorn/pay/client/models/product_create.py +1 -1
  116. crypticorn/pay/client/models/product_update.py +1 -1
  117. crypticorn/trade/client/__init__.py +15 -0
  118. crypticorn/trade/client/api/admin_api.py +43 -107
  119. crypticorn/trade/client/api/api_keys_api.py +207 -184
  120. crypticorn/trade/client/api/bots_api.py +6557 -240
  121. crypticorn/trade/client/api/exchanges_api.py +9 -36
  122. crypticorn/trade/client/api/notifications_api.py +18 -72
  123. crypticorn/trade/client/api/orders_api.py +220 -115
  124. crypticorn/trade/client/api/status_api.py +6 -24
  125. crypticorn/trade/client/api/strategies_api.py +15 -60
  126. crypticorn/trade/client/api/trading_actions_api.py +431 -112
  127. crypticorn/trade/client/models/__init__.py +15 -0
  128. crypticorn/trade/client/models/bot.py +7 -18
  129. crypticorn/trade/client/models/bot_create.py +17 -1
  130. crypticorn/trade/client/models/bot_update.py +17 -1
  131. crypticorn/trade/client/models/exchange_key_create.py +17 -1
  132. crypticorn/trade/client/models/exchange_key_update.py +17 -1
  133. crypticorn/trade/client/models/notification.py +17 -1
  134. crypticorn/trade/client/models/notification_create.py +17 -1
  135. crypticorn/trade/client/models/notification_update.py +17 -1
  136. crypticorn/trade/client/models/orders_count.py +88 -0
  137. crypticorn/trade/client/models/paginated_response_futures_trading_action.py +134 -0
  138. crypticorn/trade/client/models/paginated_response_order.py +134 -0
  139. crypticorn/trade/client/models/paginated_response_union_futures_trading_action_spot_trading_action.py +141 -0
  140. crypticorn/trade/client/models/paginated_response_union_futures_trading_action_spot_trading_action_data_inner.py +165 -0
  141. crypticorn/trade/client/models/pn_l.py +95 -0
  142. crypticorn/trade/client/models/spot_trading_action.py +207 -0
  143. crypticorn/trade/client/models/strategy.py +17 -1
  144. crypticorn/trade/client/models/strategy_create.py +17 -1
  145. crypticorn/trade/client/models/strategy_update.py +17 -1
  146. {crypticorn-2.17.0rc4.dist-info → crypticorn-2.17.0rc6.dist-info}/METADATA +3 -3
  147. {crypticorn-2.17.0rc4.dist-info → crypticorn-2.17.0rc6.dist-info}/RECORD +151 -116
  148. {crypticorn-2.17.0rc4.dist-info → crypticorn-2.17.0rc6.dist-info}/WHEEL +0 -0
  149. {crypticorn-2.17.0rc4.dist-info → crypticorn-2.17.0rc6.dist-info}/entry_points.txt +0 -0
  150. {crypticorn-2.17.0rc4.dist-info → crypticorn-2.17.0rc6.dist-info}/licenses/LICENSE +0 -0
  151. {crypticorn-2.17.0rc4.dist-info → crypticorn-2.17.0rc6.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,1794 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ DEX AI API
5
+
6
+ API for DEX AI
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
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
15
+ from typing import Any, Dict, List, Optional, Tuple, Union
16
+ from typing_extensions import Annotated
17
+
18
+ from crypticorn.dex.client.models.paginated_response_signal_with_token import (
19
+ PaginatedResponseSignalWithToken,
20
+ )
21
+ from crypticorn.dex.client.models.signal_overview_stats import SignalOverviewStats
22
+
23
+ from crypticorn.dex.client.api_client import ApiClient, RequestSerialized
24
+ from crypticorn.dex.client.api_response import ApiResponse
25
+ from crypticorn.dex.client.rest import RESTResponseType
26
+
27
+ # Import async_to_sync for sync methods
28
+ try:
29
+ from asgiref.sync import async_to_sync
30
+
31
+ _HAS_ASGIREF = True
32
+ except ImportError:
33
+ _HAS_ASGIREF = False
34
+
35
+ def async_to_sync(async_func):
36
+ """Fallback decorator that raises an error if asgiref is not available."""
37
+
38
+ def wrapper(*args, **kwargs):
39
+ raise ImportError(
40
+ "asgiref is required for sync methods. Install with: pip install asgiref"
41
+ )
42
+
43
+ return wrapper
44
+
45
+
46
+ class SignalsApi:
47
+ """NOTE: This class is auto generated by OpenAPI Generator
48
+ Ref: https://openapi-generator.tech
49
+
50
+ Do not edit the class manually.
51
+ """
52
+
53
+ def __init__(self, api_client=None, is_sync: bool = False) -> None:
54
+ if api_client is None:
55
+ api_client = ApiClient.get_default()
56
+ self.api_client = api_client
57
+ self.is_sync = is_sync
58
+
59
+ @validate_call
60
+ def get_signal_stats(
61
+ self,
62
+ _request_timeout: Union[
63
+ None,
64
+ Annotated[StrictFloat, Field(gt=0)],
65
+ Tuple[
66
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
67
+ ],
68
+ ] = None,
69
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
70
+ _content_type: Optional[StrictStr] = None,
71
+ _headers: Optional[Dict[StrictStr, Any]] = None,
72
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
73
+ ) -> SignalOverviewStats:
74
+ """Get Stats"""
75
+ if self.is_sync:
76
+ return self._get_signal_stats_sync(
77
+ _request_timeout=_request_timeout,
78
+ _request_auth=_request_auth,
79
+ _content_type=_content_type,
80
+ _headers=_headers,
81
+ _host_index=_host_index,
82
+ )
83
+
84
+ else:
85
+ return self._get_signal_stats_async(
86
+ _request_timeout=_request_timeout,
87
+ _request_auth=_request_auth,
88
+ _content_type=_content_type,
89
+ _headers=_headers,
90
+ _host_index=_host_index,
91
+ )
92
+
93
+ @validate_call
94
+ def get_signal_stats_with_http_info(
95
+ self,
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
+ ) -> ApiResponse[SignalOverviewStats]:
108
+ """Get Stats with HTTP info"""
109
+ if self.is_sync:
110
+ return self._get_signal_stats_sync_with_http_info(
111
+ _request_timeout=_request_timeout,
112
+ _request_auth=_request_auth,
113
+ _content_type=_content_type,
114
+ _headers=_headers,
115
+ _host_index=_host_index,
116
+ )
117
+
118
+ else:
119
+ return self._get_signal_stats_async_with_http_info(
120
+ _request_timeout=_request_timeout,
121
+ _request_auth=_request_auth,
122
+ _content_type=_content_type,
123
+ _headers=_headers,
124
+ _host_index=_host_index,
125
+ )
126
+
127
+ @validate_call
128
+ def get_signal_stats_without_preload_content(
129
+ self,
130
+ _request_timeout: Union[
131
+ None,
132
+ Annotated[StrictFloat, Field(gt=0)],
133
+ Tuple[
134
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
135
+ ],
136
+ ] = None,
137
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
138
+ _content_type: Optional[StrictStr] = None,
139
+ _headers: Optional[Dict[StrictStr, Any]] = None,
140
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
141
+ ) -> RESTResponseType:
142
+ """Get Stats without preloading content"""
143
+ if self.is_sync:
144
+ return self._get_signal_stats_sync_without_preload_content(
145
+ _request_timeout=_request_timeout,
146
+ _request_auth=_request_auth,
147
+ _content_type=_content_type,
148
+ _headers=_headers,
149
+ _host_index=_host_index,
150
+ )
151
+
152
+ else:
153
+ return self._get_signal_stats_async_without_preload_content(
154
+ _request_timeout=_request_timeout,
155
+ _request_auth=_request_auth,
156
+ _content_type=_content_type,
157
+ _headers=_headers,
158
+ _host_index=_host_index,
159
+ )
160
+
161
+ # Private async implementation methods
162
+ @validate_call
163
+ async def _get_signal_stats_async(
164
+ self,
165
+ _request_timeout: Union[
166
+ None,
167
+ Annotated[StrictFloat, Field(gt=0)],
168
+ Tuple[
169
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
170
+ ],
171
+ ] = None,
172
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
173
+ _content_type: Optional[StrictStr] = None,
174
+ _headers: Optional[Dict[StrictStr, Any]] = None,
175
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
176
+ ) -> SignalOverviewStats:
177
+ """Get Stats
178
+
179
+ Get comprehensive statistics for all signals.
180
+
181
+ :param _request_timeout: timeout setting for this request. If one
182
+ number provided, it will be total request
183
+ timeout. It can also be a pair (tuple) of
184
+ (connection, read) timeouts.
185
+ :type _request_timeout: int, tuple(int, int), optional
186
+ :param _request_auth: set to override the auth_settings for an a single
187
+ request; this effectively ignores the
188
+ authentication in the spec for a single request.
189
+ :type _request_auth: dict, optional
190
+ :param _content_type: force content-type for the request.
191
+ :type _content_type: str, Optional
192
+ :param _headers: set to override the headers for a single
193
+ request; this effectively ignores the headers
194
+ in the spec for a single request.
195
+ :type _headers: dict, optional
196
+ :param _host_index: set to override the host_index for a single
197
+ request; this effectively ignores the host_index
198
+ in the spec for a single request.
199
+ :type _host_index: int, optional
200
+ :return: Returns the result object.
201
+ """ # noqa: E501
202
+
203
+ _param = self._get_signal_stats_serialize(
204
+ _request_auth=_request_auth,
205
+ _content_type=_content_type,
206
+ _headers=_headers,
207
+ _host_index=_host_index,
208
+ )
209
+
210
+ _response_types_map: Dict[str, Optional[str]] = {
211
+ "200": "SignalOverviewStats",
212
+ }
213
+ response_data = await self.api_client.call_api(
214
+ *_param, _request_timeout=_request_timeout
215
+ )
216
+ await response_data.read()
217
+ return self.api_client.response_deserialize(
218
+ response_data=response_data,
219
+ response_types_map=_response_types_map,
220
+ ).data
221
+
222
+ @validate_call
223
+ async def _get_signal_stats_async_with_http_info(
224
+ self,
225
+ _request_timeout: Union[
226
+ None,
227
+ Annotated[StrictFloat, Field(gt=0)],
228
+ Tuple[
229
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
230
+ ],
231
+ ] = None,
232
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
233
+ _content_type: Optional[StrictStr] = None,
234
+ _headers: Optional[Dict[StrictStr, Any]] = None,
235
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
236
+ ) -> ApiResponse[SignalOverviewStats]:
237
+ """Get Stats
238
+
239
+ Get comprehensive statistics for all signals.
240
+
241
+ :param _request_timeout: timeout setting for this request. If one
242
+ number provided, it will be total request
243
+ timeout. It can also be a pair (tuple) of
244
+ (connection, read) timeouts.
245
+ :type _request_timeout: int, tuple(int, int), optional
246
+ :param _request_auth: set to override the auth_settings for an a single
247
+ request; this effectively ignores the
248
+ authentication in the spec for a single request.
249
+ :type _request_auth: dict, optional
250
+ :param _content_type: force content-type for the request.
251
+ :type _content_type: str, Optional
252
+ :param _headers: set to override the headers for a single
253
+ request; this effectively ignores the headers
254
+ in the spec for a single request.
255
+ :type _headers: dict, optional
256
+ :param _host_index: set to override the host_index for a single
257
+ request; this effectively ignores the host_index
258
+ in the spec for a single request.
259
+ :type _host_index: int, optional
260
+ :return: Returns the result object.
261
+ """ # noqa: E501
262
+
263
+ _param = self._get_signal_stats_serialize(
264
+ _request_auth=_request_auth,
265
+ _content_type=_content_type,
266
+ _headers=_headers,
267
+ _host_index=_host_index,
268
+ )
269
+
270
+ _response_types_map: Dict[str, Optional[str]] = {
271
+ "200": "SignalOverviewStats",
272
+ }
273
+ response_data = await self.api_client.call_api(
274
+ *_param, _request_timeout=_request_timeout
275
+ )
276
+ await response_data.read()
277
+ return self.api_client.response_deserialize(
278
+ response_data=response_data, response_types_map=_response_types_map
279
+ )
280
+
281
+ @validate_call
282
+ async def _get_signal_stats_async_without_preload_content(
283
+ self,
284
+ _request_timeout: Union[
285
+ None,
286
+ Annotated[StrictFloat, Field(gt=0)],
287
+ Tuple[
288
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
289
+ ],
290
+ ] = None,
291
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
292
+ _content_type: Optional[StrictStr] = None,
293
+ _headers: Optional[Dict[StrictStr, Any]] = None,
294
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
295
+ ) -> RESTResponseType:
296
+ """Get Stats
297
+
298
+ Get comprehensive statistics for all signals.
299
+
300
+ :param _request_timeout: timeout setting for this request. If one
301
+ number provided, it will be total request
302
+ timeout. It can also be a pair (tuple) of
303
+ (connection, read) timeouts.
304
+ :type _request_timeout: int, tuple(int, int), optional
305
+ :param _request_auth: set to override the auth_settings for an a single
306
+ request; this effectively ignores the
307
+ authentication in the spec for a single request.
308
+ :type _request_auth: dict, optional
309
+ :param _content_type: force content-type for the request.
310
+ :type _content_type: str, Optional
311
+ :param _headers: set to override the headers for a single
312
+ request; this effectively ignores the headers
313
+ in the spec for a single request.
314
+ :type _headers: dict, optional
315
+ :param _host_index: set to override the host_index for a single
316
+ request; this effectively ignores the host_index
317
+ in the spec for a single request.
318
+ :type _host_index: int, optional
319
+ :return: Returns the result object.
320
+ """ # noqa: E501
321
+
322
+ _param = self._get_signal_stats_serialize(
323
+ _request_auth=_request_auth,
324
+ _content_type=_content_type,
325
+ _headers=_headers,
326
+ _host_index=_host_index,
327
+ )
328
+
329
+ _response_types_map: Dict[str, Optional[str]] = {
330
+ "200": "SignalOverviewStats",
331
+ }
332
+ response_data = await self.api_client.call_api(
333
+ *_param, _request_timeout=_request_timeout
334
+ )
335
+ return response_data
336
+
337
+ # Private sync implementation methods
338
+ @validate_call
339
+ def _get_signal_stats_sync(
340
+ self,
341
+ _request_timeout: Union[
342
+ None,
343
+ Annotated[StrictFloat, Field(gt=0)],
344
+ Tuple[
345
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
346
+ ],
347
+ ] = None,
348
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
349
+ _content_type: Optional[StrictStr] = None,
350
+ _headers: Optional[Dict[StrictStr, Any]] = None,
351
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
352
+ ) -> SignalOverviewStats:
353
+ """Synchronous version of get_signal_stats"""
354
+ return async_to_sync(self._get_signal_stats_async)(
355
+ _request_timeout=_request_timeout,
356
+ _request_auth=_request_auth,
357
+ _content_type=_content_type,
358
+ _headers=_headers,
359
+ _host_index=_host_index,
360
+ )
361
+
362
+ @validate_call
363
+ def _get_signal_stats_sync_with_http_info(
364
+ self,
365
+ _request_timeout: Union[
366
+ None,
367
+ Annotated[StrictFloat, Field(gt=0)],
368
+ Tuple[
369
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
370
+ ],
371
+ ] = None,
372
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
373
+ _content_type: Optional[StrictStr] = None,
374
+ _headers: Optional[Dict[StrictStr, Any]] = None,
375
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
376
+ ) -> ApiResponse[SignalOverviewStats]:
377
+ """Synchronous version of get_signal_stats_with_http_info"""
378
+ return async_to_sync(self._get_signal_stats_async_with_http_info)(
379
+ _request_timeout=_request_timeout,
380
+ _request_auth=_request_auth,
381
+ _content_type=_content_type,
382
+ _headers=_headers,
383
+ _host_index=_host_index,
384
+ )
385
+
386
+ @validate_call
387
+ def _get_signal_stats_sync_without_preload_content(
388
+ self,
389
+ _request_timeout: Union[
390
+ None,
391
+ Annotated[StrictFloat, Field(gt=0)],
392
+ Tuple[
393
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
394
+ ],
395
+ ] = None,
396
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
397
+ _content_type: Optional[StrictStr] = None,
398
+ _headers: Optional[Dict[StrictStr, Any]] = None,
399
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
400
+ ) -> RESTResponseType:
401
+ """Synchronous version of get_signal_stats_without_preload_content"""
402
+ return async_to_sync(self._get_signal_stats_async_without_preload_content)(
403
+ _request_timeout=_request_timeout,
404
+ _request_auth=_request_auth,
405
+ _content_type=_content_type,
406
+ _headers=_headers,
407
+ _host_index=_host_index,
408
+ )
409
+
410
+ def _get_signal_stats_serialize(
411
+ self,
412
+ _request_auth,
413
+ _content_type,
414
+ _headers,
415
+ _host_index,
416
+ ) -> RequestSerialized:
417
+
418
+ _host = None
419
+
420
+ _collection_formats: Dict[str, str] = {}
421
+
422
+ _path_params: Dict[str, str] = {}
423
+ _query_params: List[Tuple[str, str]] = []
424
+ _header_params: Dict[str, Optional[str]] = _headers or {}
425
+ _form_params: List[Tuple[str, str]] = []
426
+ _files: Dict[
427
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
428
+ ] = {}
429
+ _body_params: Optional[bytes] = None
430
+
431
+ # process the path parameters
432
+ # process the query parameters
433
+ # process the header parameters
434
+ # process the form parameters
435
+ # process the body parameter
436
+
437
+ # set the HTTP header `Accept`
438
+ if "Accept" not in _header_params:
439
+ _header_params["Accept"] = self.api_client.select_header_accept(
440
+ ["application/json"]
441
+ )
442
+
443
+ # authentication setting
444
+ _auth_settings: List[str] = []
445
+
446
+ return self.api_client.param_serialize(
447
+ method="GET",
448
+ resource_path="/signals/stats",
449
+ path_params=_path_params,
450
+ query_params=_query_params,
451
+ header_params=_header_params,
452
+ body=_body_params,
453
+ post_params=_form_params,
454
+ files=_files,
455
+ auth_settings=_auth_settings,
456
+ collection_formats=_collection_formats,
457
+ _host=_host,
458
+ _request_auth=_request_auth,
459
+ )
460
+
461
+ @validate_call
462
+ def get_signals(
463
+ self,
464
+ filter_by: Annotated[
465
+ Optional[StrictStr], Field(description="The field to filter by")
466
+ ] = None,
467
+ filter_value: Annotated[
468
+ Optional[Any], Field(description="The value to filter with")
469
+ ] = None,
470
+ sort_order: Annotated[
471
+ Optional[StrictStr], Field(description="The order to sort by")
472
+ ] = None,
473
+ sort_by: Annotated[
474
+ Optional[StrictStr], Field(description="The field to sort by")
475
+ ] = None,
476
+ page: Annotated[
477
+ Optional[StrictInt], Field(description="The current page number")
478
+ ] = None,
479
+ page_size: Annotated[
480
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
481
+ Field(
482
+ description="The number of items per page. Default is 10, max is 100."
483
+ ),
484
+ ] = None,
485
+ _request_timeout: Union[
486
+ None,
487
+ Annotated[StrictFloat, Field(gt=0)],
488
+ Tuple[
489
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
490
+ ],
491
+ ] = None,
492
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
493
+ _content_type: Optional[StrictStr] = None,
494
+ _headers: Optional[Dict[StrictStr, Any]] = None,
495
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
496
+ ) -> PaginatedResponseSignalWithToken:
497
+ """Get Signals"""
498
+ if self.is_sync:
499
+ return self._get_signals_sync(
500
+ filter_by=filter_by,
501
+ filter_value=filter_value,
502
+ sort_order=sort_order,
503
+ sort_by=sort_by,
504
+ page=page,
505
+ page_size=page_size,
506
+ _request_timeout=_request_timeout,
507
+ _request_auth=_request_auth,
508
+ _content_type=_content_type,
509
+ _headers=_headers,
510
+ _host_index=_host_index,
511
+ )
512
+
513
+ else:
514
+ return self._get_signals_async(
515
+ filter_by=filter_by,
516
+ filter_value=filter_value,
517
+ sort_order=sort_order,
518
+ sort_by=sort_by,
519
+ page=page,
520
+ page_size=page_size,
521
+ _request_timeout=_request_timeout,
522
+ _request_auth=_request_auth,
523
+ _content_type=_content_type,
524
+ _headers=_headers,
525
+ _host_index=_host_index,
526
+ )
527
+
528
+ @validate_call
529
+ def get_signals_with_http_info(
530
+ self,
531
+ filter_by: Annotated[
532
+ Optional[StrictStr], Field(description="The field to filter by")
533
+ ] = None,
534
+ filter_value: Annotated[
535
+ Optional[Any], Field(description="The value to filter with")
536
+ ] = None,
537
+ sort_order: Annotated[
538
+ Optional[StrictStr], Field(description="The order to sort by")
539
+ ] = None,
540
+ sort_by: Annotated[
541
+ Optional[StrictStr], Field(description="The field to sort by")
542
+ ] = None,
543
+ page: Annotated[
544
+ Optional[StrictInt], Field(description="The current page number")
545
+ ] = None,
546
+ page_size: Annotated[
547
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
548
+ Field(
549
+ description="The number of items per page. Default is 10, max is 100."
550
+ ),
551
+ ] = None,
552
+ _request_timeout: Union[
553
+ None,
554
+ Annotated[StrictFloat, Field(gt=0)],
555
+ Tuple[
556
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
557
+ ],
558
+ ] = None,
559
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
560
+ _content_type: Optional[StrictStr] = None,
561
+ _headers: Optional[Dict[StrictStr, Any]] = None,
562
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
563
+ ) -> ApiResponse[PaginatedResponseSignalWithToken]:
564
+ """Get Signals with HTTP info"""
565
+ if self.is_sync:
566
+ return self._get_signals_sync_with_http_info(
567
+ filter_by=filter_by,
568
+ filter_value=filter_value,
569
+ sort_order=sort_order,
570
+ sort_by=sort_by,
571
+ page=page,
572
+ page_size=page_size,
573
+ _request_timeout=_request_timeout,
574
+ _request_auth=_request_auth,
575
+ _content_type=_content_type,
576
+ _headers=_headers,
577
+ _host_index=_host_index,
578
+ )
579
+
580
+ else:
581
+ return self._get_signals_async_with_http_info(
582
+ filter_by=filter_by,
583
+ filter_value=filter_value,
584
+ sort_order=sort_order,
585
+ sort_by=sort_by,
586
+ page=page,
587
+ page_size=page_size,
588
+ _request_timeout=_request_timeout,
589
+ _request_auth=_request_auth,
590
+ _content_type=_content_type,
591
+ _headers=_headers,
592
+ _host_index=_host_index,
593
+ )
594
+
595
+ @validate_call
596
+ def get_signals_without_preload_content(
597
+ self,
598
+ filter_by: Annotated[
599
+ Optional[StrictStr], Field(description="The field to filter by")
600
+ ] = None,
601
+ filter_value: Annotated[
602
+ Optional[Any], Field(description="The value to filter with")
603
+ ] = None,
604
+ sort_order: Annotated[
605
+ Optional[StrictStr], Field(description="The order to sort by")
606
+ ] = None,
607
+ sort_by: Annotated[
608
+ Optional[StrictStr], Field(description="The field to sort by")
609
+ ] = None,
610
+ page: Annotated[
611
+ Optional[StrictInt], Field(description="The current page number")
612
+ ] = None,
613
+ page_size: Annotated[
614
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
615
+ Field(
616
+ description="The number of items per page. Default is 10, max is 100."
617
+ ),
618
+ ] = None,
619
+ _request_timeout: Union[
620
+ None,
621
+ Annotated[StrictFloat, Field(gt=0)],
622
+ Tuple[
623
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
624
+ ],
625
+ ] = None,
626
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
627
+ _content_type: Optional[StrictStr] = None,
628
+ _headers: Optional[Dict[StrictStr, Any]] = None,
629
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
630
+ ) -> RESTResponseType:
631
+ """Get Signals without preloading content"""
632
+ if self.is_sync:
633
+ return self._get_signals_sync_without_preload_content(
634
+ filter_by=filter_by,
635
+ filter_value=filter_value,
636
+ sort_order=sort_order,
637
+ sort_by=sort_by,
638
+ page=page,
639
+ page_size=page_size,
640
+ _request_timeout=_request_timeout,
641
+ _request_auth=_request_auth,
642
+ _content_type=_content_type,
643
+ _headers=_headers,
644
+ _host_index=_host_index,
645
+ )
646
+
647
+ else:
648
+ return self._get_signals_async_without_preload_content(
649
+ filter_by=filter_by,
650
+ filter_value=filter_value,
651
+ sort_order=sort_order,
652
+ sort_by=sort_by,
653
+ page=page,
654
+ page_size=page_size,
655
+ _request_timeout=_request_timeout,
656
+ _request_auth=_request_auth,
657
+ _content_type=_content_type,
658
+ _headers=_headers,
659
+ _host_index=_host_index,
660
+ )
661
+
662
+ # Private async implementation methods
663
+ @validate_call
664
+ async def _get_signals_async(
665
+ self,
666
+ filter_by: Annotated[
667
+ Optional[StrictStr], Field(description="The field to filter by")
668
+ ] = None,
669
+ filter_value: Annotated[
670
+ Optional[Any], Field(description="The value to filter with")
671
+ ] = None,
672
+ sort_order: Annotated[
673
+ Optional[StrictStr], Field(description="The order to sort by")
674
+ ] = None,
675
+ sort_by: Annotated[
676
+ Optional[StrictStr], Field(description="The field to sort by")
677
+ ] = None,
678
+ page: Annotated[
679
+ Optional[StrictInt], Field(description="The current page number")
680
+ ] = None,
681
+ page_size: Annotated[
682
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
683
+ Field(
684
+ description="The number of items per page. Default is 10, max is 100."
685
+ ),
686
+ ] = None,
687
+ _request_timeout: Union[
688
+ None,
689
+ Annotated[StrictFloat, Field(gt=0)],
690
+ Tuple[
691
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
692
+ ],
693
+ ] = None,
694
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
695
+ _content_type: Optional[StrictStr] = None,
696
+ _headers: Optional[Dict[StrictStr, Any]] = None,
697
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
698
+ ) -> PaginatedResponseSignalWithToken:
699
+ """Get Signals
700
+
701
+ Get all signals. Returns the latest 10 signals by default. The default sort is `called_at` and the default order is `desc`.
702
+
703
+ :param filter_by: The field to filter by
704
+ :type filter_by: str
705
+ :param filter_value: The value to filter with
706
+ :type filter_value: AnyOf
707
+ :param sort_order: The order to sort by
708
+ :type sort_order: str
709
+ :param sort_by: The field to sort by
710
+ :type sort_by: str
711
+ :param page: The current page number
712
+ :type page: int
713
+ :param page_size: The number of items per page. Default is 10, max is 100.
714
+ :type page_size: int
715
+ :param _request_timeout: timeout setting for this request. If one
716
+ number provided, it will be total request
717
+ timeout. It can also be a pair (tuple) of
718
+ (connection, read) timeouts.
719
+ :type _request_timeout: int, tuple(int, int), optional
720
+ :param _request_auth: set to override the auth_settings for an a single
721
+ request; this effectively ignores the
722
+ authentication in the spec for a single request.
723
+ :type _request_auth: dict, optional
724
+ :param _content_type: force content-type for the request.
725
+ :type _content_type: str, Optional
726
+ :param _headers: set to override the headers for a single
727
+ request; this effectively ignores the headers
728
+ in the spec for a single request.
729
+ :type _headers: dict, optional
730
+ :param _host_index: set to override the host_index for a single
731
+ request; this effectively ignores the host_index
732
+ in the spec for a single request.
733
+ :type _host_index: int, optional
734
+ :return: Returns the result object.
735
+ """ # noqa: E501
736
+
737
+ _param = self._get_signals_serialize(
738
+ filter_by=filter_by,
739
+ filter_value=filter_value,
740
+ sort_order=sort_order,
741
+ sort_by=sort_by,
742
+ page=page,
743
+ page_size=page_size,
744
+ _request_auth=_request_auth,
745
+ _content_type=_content_type,
746
+ _headers=_headers,
747
+ _host_index=_host_index,
748
+ )
749
+
750
+ _response_types_map: Dict[str, Optional[str]] = {
751
+ "200": "PaginatedResponseSignalWithToken",
752
+ }
753
+ response_data = await self.api_client.call_api(
754
+ *_param, _request_timeout=_request_timeout
755
+ )
756
+ await response_data.read()
757
+ return self.api_client.response_deserialize(
758
+ response_data=response_data,
759
+ response_types_map=_response_types_map,
760
+ ).data
761
+
762
+ @validate_call
763
+ async def _get_signals_async_with_http_info(
764
+ self,
765
+ filter_by: Annotated[
766
+ Optional[StrictStr], Field(description="The field to filter by")
767
+ ] = None,
768
+ filter_value: Annotated[
769
+ Optional[Any], Field(description="The value to filter with")
770
+ ] = None,
771
+ sort_order: Annotated[
772
+ Optional[StrictStr], Field(description="The order to sort by")
773
+ ] = None,
774
+ sort_by: Annotated[
775
+ Optional[StrictStr], Field(description="The field to sort by")
776
+ ] = None,
777
+ page: Annotated[
778
+ Optional[StrictInt], Field(description="The current page number")
779
+ ] = None,
780
+ page_size: Annotated[
781
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
782
+ Field(
783
+ description="The number of items per page. Default is 10, max is 100."
784
+ ),
785
+ ] = None,
786
+ _request_timeout: Union[
787
+ None,
788
+ Annotated[StrictFloat, Field(gt=0)],
789
+ Tuple[
790
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
791
+ ],
792
+ ] = None,
793
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
794
+ _content_type: Optional[StrictStr] = None,
795
+ _headers: Optional[Dict[StrictStr, Any]] = None,
796
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
797
+ ) -> ApiResponse[PaginatedResponseSignalWithToken]:
798
+ """Get Signals
799
+
800
+ Get all signals. Returns the latest 10 signals by default. The default sort is `called_at` and the default order is `desc`.
801
+
802
+ :param filter_by: The field to filter by
803
+ :type filter_by: str
804
+ :param filter_value: The value to filter with
805
+ :type filter_value: AnyOf
806
+ :param sort_order: The order to sort by
807
+ :type sort_order: str
808
+ :param sort_by: The field to sort by
809
+ :type sort_by: str
810
+ :param page: The current page number
811
+ :type page: int
812
+ :param page_size: The number of items per page. Default is 10, max is 100.
813
+ :type page_size: int
814
+ :param _request_timeout: timeout setting for this request. If one
815
+ number provided, it will be total request
816
+ timeout. It can also be a pair (tuple) of
817
+ (connection, read) timeouts.
818
+ :type _request_timeout: int, tuple(int, int), optional
819
+ :param _request_auth: set to override the auth_settings for an a single
820
+ request; this effectively ignores the
821
+ authentication in the spec for a single request.
822
+ :type _request_auth: dict, optional
823
+ :param _content_type: force content-type for the request.
824
+ :type _content_type: str, Optional
825
+ :param _headers: set to override the headers for a single
826
+ request; this effectively ignores the headers
827
+ in the spec for a single request.
828
+ :type _headers: dict, optional
829
+ :param _host_index: set to override the host_index for a single
830
+ request; this effectively ignores the host_index
831
+ in the spec for a single request.
832
+ :type _host_index: int, optional
833
+ :return: Returns the result object.
834
+ """ # noqa: E501
835
+
836
+ _param = self._get_signals_serialize(
837
+ filter_by=filter_by,
838
+ filter_value=filter_value,
839
+ sort_order=sort_order,
840
+ sort_by=sort_by,
841
+ page=page,
842
+ page_size=page_size,
843
+ _request_auth=_request_auth,
844
+ _content_type=_content_type,
845
+ _headers=_headers,
846
+ _host_index=_host_index,
847
+ )
848
+
849
+ _response_types_map: Dict[str, Optional[str]] = {
850
+ "200": "PaginatedResponseSignalWithToken",
851
+ }
852
+ response_data = await self.api_client.call_api(
853
+ *_param, _request_timeout=_request_timeout
854
+ )
855
+ await response_data.read()
856
+ return self.api_client.response_deserialize(
857
+ response_data=response_data, response_types_map=_response_types_map
858
+ )
859
+
860
+ @validate_call
861
+ async def _get_signals_async_without_preload_content(
862
+ self,
863
+ filter_by: Annotated[
864
+ Optional[StrictStr], Field(description="The field to filter by")
865
+ ] = None,
866
+ filter_value: Annotated[
867
+ Optional[Any], Field(description="The value to filter with")
868
+ ] = None,
869
+ sort_order: Annotated[
870
+ Optional[StrictStr], Field(description="The order to sort by")
871
+ ] = None,
872
+ sort_by: Annotated[
873
+ Optional[StrictStr], Field(description="The field to sort by")
874
+ ] = None,
875
+ page: Annotated[
876
+ Optional[StrictInt], Field(description="The current page number")
877
+ ] = None,
878
+ page_size: Annotated[
879
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
880
+ Field(
881
+ description="The number of items per page. Default is 10, max is 100."
882
+ ),
883
+ ] = None,
884
+ _request_timeout: Union[
885
+ None,
886
+ Annotated[StrictFloat, Field(gt=0)],
887
+ Tuple[
888
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
889
+ ],
890
+ ] = None,
891
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
892
+ _content_type: Optional[StrictStr] = None,
893
+ _headers: Optional[Dict[StrictStr, Any]] = None,
894
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
895
+ ) -> RESTResponseType:
896
+ """Get Signals
897
+
898
+ Get all signals. Returns the latest 10 signals by default. The default sort is `called_at` and the default order is `desc`.
899
+
900
+ :param filter_by: The field to filter by
901
+ :type filter_by: str
902
+ :param filter_value: The value to filter with
903
+ :type filter_value: AnyOf
904
+ :param sort_order: The order to sort by
905
+ :type sort_order: str
906
+ :param sort_by: The field to sort by
907
+ :type sort_by: str
908
+ :param page: The current page number
909
+ :type page: int
910
+ :param page_size: The number of items per page. Default is 10, max is 100.
911
+ :type page_size: int
912
+ :param _request_timeout: timeout setting for this request. If one
913
+ number provided, it will be total request
914
+ timeout. It can also be a pair (tuple) of
915
+ (connection, read) timeouts.
916
+ :type _request_timeout: int, tuple(int, int), optional
917
+ :param _request_auth: set to override the auth_settings for an a single
918
+ request; this effectively ignores the
919
+ authentication in the spec for a single request.
920
+ :type _request_auth: dict, optional
921
+ :param _content_type: force content-type for the request.
922
+ :type _content_type: str, Optional
923
+ :param _headers: set to override the headers for a single
924
+ request; this effectively ignores the headers
925
+ in the spec for a single request.
926
+ :type _headers: dict, optional
927
+ :param _host_index: set to override the host_index for a single
928
+ request; this effectively ignores the host_index
929
+ in the spec for a single request.
930
+ :type _host_index: int, optional
931
+ :return: Returns the result object.
932
+ """ # noqa: E501
933
+
934
+ _param = self._get_signals_serialize(
935
+ filter_by=filter_by,
936
+ filter_value=filter_value,
937
+ sort_order=sort_order,
938
+ sort_by=sort_by,
939
+ page=page,
940
+ page_size=page_size,
941
+ _request_auth=_request_auth,
942
+ _content_type=_content_type,
943
+ _headers=_headers,
944
+ _host_index=_host_index,
945
+ )
946
+
947
+ _response_types_map: Dict[str, Optional[str]] = {
948
+ "200": "PaginatedResponseSignalWithToken",
949
+ }
950
+ response_data = await self.api_client.call_api(
951
+ *_param, _request_timeout=_request_timeout
952
+ )
953
+ return response_data
954
+
955
+ # Private sync implementation methods
956
+ @validate_call
957
+ def _get_signals_sync(
958
+ self,
959
+ filter_by: Annotated[
960
+ Optional[StrictStr], Field(description="The field to filter by")
961
+ ] = None,
962
+ filter_value: Annotated[
963
+ Optional[Any], Field(description="The value to filter with")
964
+ ] = None,
965
+ sort_order: Annotated[
966
+ Optional[StrictStr], Field(description="The order to sort by")
967
+ ] = None,
968
+ sort_by: Annotated[
969
+ Optional[StrictStr], Field(description="The field to sort by")
970
+ ] = None,
971
+ page: Annotated[
972
+ Optional[StrictInt], Field(description="The current page number")
973
+ ] = None,
974
+ page_size: Annotated[
975
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
976
+ Field(
977
+ description="The number of items per page. Default is 10, max is 100."
978
+ ),
979
+ ] = None,
980
+ _request_timeout: Union[
981
+ None,
982
+ Annotated[StrictFloat, Field(gt=0)],
983
+ Tuple[
984
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
985
+ ],
986
+ ] = None,
987
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
988
+ _content_type: Optional[StrictStr] = None,
989
+ _headers: Optional[Dict[StrictStr, Any]] = None,
990
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
991
+ ) -> PaginatedResponseSignalWithToken:
992
+ """Synchronous version of get_signals"""
993
+ return async_to_sync(self._get_signals_async)(
994
+ filter_by=filter_by,
995
+ filter_value=filter_value,
996
+ sort_order=sort_order,
997
+ sort_by=sort_by,
998
+ page=page,
999
+ page_size=page_size,
1000
+ _request_timeout=_request_timeout,
1001
+ _request_auth=_request_auth,
1002
+ _content_type=_content_type,
1003
+ _headers=_headers,
1004
+ _host_index=_host_index,
1005
+ )
1006
+
1007
+ @validate_call
1008
+ def _get_signals_sync_with_http_info(
1009
+ self,
1010
+ filter_by: Annotated[
1011
+ Optional[StrictStr], Field(description="The field to filter by")
1012
+ ] = None,
1013
+ filter_value: Annotated[
1014
+ Optional[Any], Field(description="The value to filter with")
1015
+ ] = None,
1016
+ sort_order: Annotated[
1017
+ Optional[StrictStr], Field(description="The order to sort by")
1018
+ ] = None,
1019
+ sort_by: Annotated[
1020
+ Optional[StrictStr], Field(description="The field to sort by")
1021
+ ] = None,
1022
+ page: Annotated[
1023
+ Optional[StrictInt], Field(description="The current page number")
1024
+ ] = None,
1025
+ page_size: Annotated[
1026
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
1027
+ Field(
1028
+ description="The number of items per page. Default is 10, max is 100."
1029
+ ),
1030
+ ] = None,
1031
+ _request_timeout: Union[
1032
+ None,
1033
+ Annotated[StrictFloat, Field(gt=0)],
1034
+ Tuple[
1035
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1036
+ ],
1037
+ ] = None,
1038
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1039
+ _content_type: Optional[StrictStr] = None,
1040
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1041
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1042
+ ) -> ApiResponse[PaginatedResponseSignalWithToken]:
1043
+ """Synchronous version of get_signals_with_http_info"""
1044
+ return async_to_sync(self._get_signals_async_with_http_info)(
1045
+ filter_by=filter_by,
1046
+ filter_value=filter_value,
1047
+ sort_order=sort_order,
1048
+ sort_by=sort_by,
1049
+ page=page,
1050
+ page_size=page_size,
1051
+ _request_timeout=_request_timeout,
1052
+ _request_auth=_request_auth,
1053
+ _content_type=_content_type,
1054
+ _headers=_headers,
1055
+ _host_index=_host_index,
1056
+ )
1057
+
1058
+ @validate_call
1059
+ def _get_signals_sync_without_preload_content(
1060
+ self,
1061
+ filter_by: Annotated[
1062
+ Optional[StrictStr], Field(description="The field to filter by")
1063
+ ] = None,
1064
+ filter_value: Annotated[
1065
+ Optional[Any], Field(description="The value to filter with")
1066
+ ] = None,
1067
+ sort_order: Annotated[
1068
+ Optional[StrictStr], Field(description="The order to sort by")
1069
+ ] = None,
1070
+ sort_by: Annotated[
1071
+ Optional[StrictStr], Field(description="The field to sort by")
1072
+ ] = None,
1073
+ page: Annotated[
1074
+ Optional[StrictInt], Field(description="The current page number")
1075
+ ] = None,
1076
+ page_size: Annotated[
1077
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
1078
+ Field(
1079
+ description="The number of items per page. Default is 10, max is 100."
1080
+ ),
1081
+ ] = None,
1082
+ _request_timeout: Union[
1083
+ None,
1084
+ Annotated[StrictFloat, Field(gt=0)],
1085
+ Tuple[
1086
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1087
+ ],
1088
+ ] = None,
1089
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1090
+ _content_type: Optional[StrictStr] = None,
1091
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1092
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1093
+ ) -> RESTResponseType:
1094
+ """Synchronous version of get_signals_without_preload_content"""
1095
+ return async_to_sync(self._get_signals_async_without_preload_content)(
1096
+ filter_by=filter_by,
1097
+ filter_value=filter_value,
1098
+ sort_order=sort_order,
1099
+ sort_by=sort_by,
1100
+ page=page,
1101
+ page_size=page_size,
1102
+ _request_timeout=_request_timeout,
1103
+ _request_auth=_request_auth,
1104
+ _content_type=_content_type,
1105
+ _headers=_headers,
1106
+ _host_index=_host_index,
1107
+ )
1108
+
1109
+ def _get_signals_serialize(
1110
+ self,
1111
+ filter_by,
1112
+ filter_value,
1113
+ sort_order,
1114
+ sort_by,
1115
+ page,
1116
+ page_size,
1117
+ _request_auth,
1118
+ _content_type,
1119
+ _headers,
1120
+ _host_index,
1121
+ ) -> RequestSerialized:
1122
+
1123
+ _host = None
1124
+
1125
+ _collection_formats: Dict[str, str] = {}
1126
+
1127
+ _path_params: Dict[str, str] = {}
1128
+ _query_params: List[Tuple[str, str]] = []
1129
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1130
+ _form_params: List[Tuple[str, str]] = []
1131
+ _files: Dict[
1132
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1133
+ ] = {}
1134
+ _body_params: Optional[bytes] = None
1135
+
1136
+ # process the path parameters
1137
+ # process the query parameters
1138
+ if filter_by is not None:
1139
+
1140
+ _query_params.append(("filter_by", filter_by))
1141
+
1142
+ if filter_value is not None:
1143
+
1144
+ _query_params.append(("filter_value", filter_value))
1145
+
1146
+ if sort_order is not None:
1147
+
1148
+ _query_params.append(("sort_order", sort_order))
1149
+
1150
+ if sort_by is not None:
1151
+
1152
+ _query_params.append(("sort_by", sort_by))
1153
+
1154
+ if page is not None:
1155
+
1156
+ _query_params.append(("page", page))
1157
+
1158
+ if page_size is not None:
1159
+
1160
+ _query_params.append(("page_size", page_size))
1161
+
1162
+ # process the header parameters
1163
+ # process the form parameters
1164
+ # process the body parameter
1165
+
1166
+ # set the HTTP header `Accept`
1167
+ if "Accept" not in _header_params:
1168
+ _header_params["Accept"] = self.api_client.select_header_accept(
1169
+ ["application/json"]
1170
+ )
1171
+
1172
+ # authentication setting
1173
+ _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
1174
+
1175
+ return self.api_client.param_serialize(
1176
+ method="GET",
1177
+ resource_path="/signals",
1178
+ path_params=_path_params,
1179
+ query_params=_query_params,
1180
+ header_params=_header_params,
1181
+ body=_body_params,
1182
+ post_params=_form_params,
1183
+ files=_files,
1184
+ auth_settings=_auth_settings,
1185
+ collection_formats=_collection_formats,
1186
+ _host=_host,
1187
+ _request_auth=_request_auth,
1188
+ )
1189
+
1190
+ @validate_call
1191
+ def get_top_signals(
1192
+ self,
1193
+ page: Annotated[
1194
+ Optional[StrictInt], Field(description="The current page number")
1195
+ ] = None,
1196
+ page_size: Annotated[
1197
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
1198
+ Field(
1199
+ description="The number of items per page. Default is 10, max is 100."
1200
+ ),
1201
+ ] = None,
1202
+ since: Annotated[
1203
+ Optional[Annotated[int, Field(strict=True, ge=1)]],
1204
+ Field(
1205
+ description="Include signals from the last X hours. Default is 24 hours."
1206
+ ),
1207
+ ] = None,
1208
+ _request_timeout: Union[
1209
+ None,
1210
+ Annotated[StrictFloat, Field(gt=0)],
1211
+ Tuple[
1212
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1213
+ ],
1214
+ ] = None,
1215
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1216
+ _content_type: Optional[StrictStr] = None,
1217
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1218
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1219
+ ) -> PaginatedResponseSignalWithToken:
1220
+ """Get Top Signals"""
1221
+ if self.is_sync:
1222
+ return self._get_top_signals_sync(
1223
+ page=page,
1224
+ page_size=page_size,
1225
+ since=since,
1226
+ _request_timeout=_request_timeout,
1227
+ _request_auth=_request_auth,
1228
+ _content_type=_content_type,
1229
+ _headers=_headers,
1230
+ _host_index=_host_index,
1231
+ )
1232
+
1233
+ else:
1234
+ return self._get_top_signals_async(
1235
+ page=page,
1236
+ page_size=page_size,
1237
+ since=since,
1238
+ _request_timeout=_request_timeout,
1239
+ _request_auth=_request_auth,
1240
+ _content_type=_content_type,
1241
+ _headers=_headers,
1242
+ _host_index=_host_index,
1243
+ )
1244
+
1245
+ @validate_call
1246
+ def get_top_signals_with_http_info(
1247
+ self,
1248
+ page: Annotated[
1249
+ Optional[StrictInt], Field(description="The current page number")
1250
+ ] = None,
1251
+ page_size: Annotated[
1252
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
1253
+ Field(
1254
+ description="The number of items per page. Default is 10, max is 100."
1255
+ ),
1256
+ ] = None,
1257
+ since: Annotated[
1258
+ Optional[Annotated[int, Field(strict=True, ge=1)]],
1259
+ Field(
1260
+ description="Include signals from the last X hours. Default is 24 hours."
1261
+ ),
1262
+ ] = None,
1263
+ _request_timeout: Union[
1264
+ None,
1265
+ Annotated[StrictFloat, Field(gt=0)],
1266
+ Tuple[
1267
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1268
+ ],
1269
+ ] = None,
1270
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1271
+ _content_type: Optional[StrictStr] = None,
1272
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1273
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1274
+ ) -> ApiResponse[PaginatedResponseSignalWithToken]:
1275
+ """Get Top Signals with HTTP info"""
1276
+ if self.is_sync:
1277
+ return self._get_top_signals_sync_with_http_info(
1278
+ page=page,
1279
+ page_size=page_size,
1280
+ since=since,
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
+ else:
1289
+ return self._get_top_signals_async_with_http_info(
1290
+ page=page,
1291
+ page_size=page_size,
1292
+ since=since,
1293
+ _request_timeout=_request_timeout,
1294
+ _request_auth=_request_auth,
1295
+ _content_type=_content_type,
1296
+ _headers=_headers,
1297
+ _host_index=_host_index,
1298
+ )
1299
+
1300
+ @validate_call
1301
+ def get_top_signals_without_preload_content(
1302
+ self,
1303
+ page: Annotated[
1304
+ Optional[StrictInt], Field(description="The current page number")
1305
+ ] = None,
1306
+ page_size: Annotated[
1307
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
1308
+ Field(
1309
+ description="The number of items per page. Default is 10, max is 100."
1310
+ ),
1311
+ ] = None,
1312
+ since: Annotated[
1313
+ Optional[Annotated[int, Field(strict=True, ge=1)]],
1314
+ Field(
1315
+ description="Include signals from the last X hours. Default is 24 hours."
1316
+ ),
1317
+ ] = None,
1318
+ _request_timeout: Union[
1319
+ None,
1320
+ Annotated[StrictFloat, Field(gt=0)],
1321
+ Tuple[
1322
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1323
+ ],
1324
+ ] = None,
1325
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1326
+ _content_type: Optional[StrictStr] = None,
1327
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1328
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1329
+ ) -> RESTResponseType:
1330
+ """Get Top Signals without preloading content"""
1331
+ if self.is_sync:
1332
+ return self._get_top_signals_sync_without_preload_content(
1333
+ page=page,
1334
+ page_size=page_size,
1335
+ since=since,
1336
+ _request_timeout=_request_timeout,
1337
+ _request_auth=_request_auth,
1338
+ _content_type=_content_type,
1339
+ _headers=_headers,
1340
+ _host_index=_host_index,
1341
+ )
1342
+
1343
+ else:
1344
+ return self._get_top_signals_async_without_preload_content(
1345
+ page=page,
1346
+ page_size=page_size,
1347
+ since=since,
1348
+ _request_timeout=_request_timeout,
1349
+ _request_auth=_request_auth,
1350
+ _content_type=_content_type,
1351
+ _headers=_headers,
1352
+ _host_index=_host_index,
1353
+ )
1354
+
1355
+ # Private async implementation methods
1356
+ @validate_call
1357
+ async def _get_top_signals_async(
1358
+ self,
1359
+ page: Annotated[
1360
+ Optional[StrictInt], Field(description="The current page number")
1361
+ ] = None,
1362
+ page_size: Annotated[
1363
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
1364
+ Field(
1365
+ description="The number of items per page. Default is 10, max is 100."
1366
+ ),
1367
+ ] = None,
1368
+ since: Annotated[
1369
+ Optional[Annotated[int, Field(strict=True, ge=1)]],
1370
+ Field(
1371
+ description="Include signals from the last X hours. Default is 24 hours."
1372
+ ),
1373
+ ] = None,
1374
+ _request_timeout: Union[
1375
+ None,
1376
+ Annotated[StrictFloat, Field(gt=0)],
1377
+ Tuple[
1378
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1379
+ ],
1380
+ ] = None,
1381
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1382
+ _content_type: Optional[StrictStr] = None,
1383
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1384
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1385
+ ) -> PaginatedResponseSignalWithToken:
1386
+ """Get Top Signals
1387
+
1388
+ Get the top performing signals from the last X hours.The default is from the last 24 hours.
1389
+
1390
+ :param page: The current page number
1391
+ :type page: int
1392
+ :param page_size: The number of items per page. Default is 10, max is 100.
1393
+ :type page_size: int
1394
+ :param since: Include signals from the last X hours. Default is 24 hours.
1395
+ :type since: int
1396
+ :param _request_timeout: timeout setting for this request. If one
1397
+ number provided, it will be total request
1398
+ timeout. It can also be a pair (tuple) of
1399
+ (connection, read) timeouts.
1400
+ :type _request_timeout: int, tuple(int, int), optional
1401
+ :param _request_auth: set to override the auth_settings for an a single
1402
+ request; this effectively ignores the
1403
+ authentication in the spec for a single request.
1404
+ :type _request_auth: dict, optional
1405
+ :param _content_type: force content-type for the request.
1406
+ :type _content_type: str, Optional
1407
+ :param _headers: set to override the headers for a single
1408
+ request; this effectively ignores the headers
1409
+ in the spec for a single request.
1410
+ :type _headers: dict, optional
1411
+ :param _host_index: set to override the host_index for a single
1412
+ request; this effectively ignores the host_index
1413
+ in the spec for a single request.
1414
+ :type _host_index: int, optional
1415
+ :return: Returns the result object.
1416
+ """ # noqa: E501
1417
+
1418
+ _param = self._get_top_signals_serialize(
1419
+ page=page,
1420
+ page_size=page_size,
1421
+ since=since,
1422
+ _request_auth=_request_auth,
1423
+ _content_type=_content_type,
1424
+ _headers=_headers,
1425
+ _host_index=_host_index,
1426
+ )
1427
+
1428
+ _response_types_map: Dict[str, Optional[str]] = {
1429
+ "200": "PaginatedResponseSignalWithToken",
1430
+ }
1431
+ response_data = await self.api_client.call_api(
1432
+ *_param, _request_timeout=_request_timeout
1433
+ )
1434
+ await response_data.read()
1435
+ return self.api_client.response_deserialize(
1436
+ response_data=response_data,
1437
+ response_types_map=_response_types_map,
1438
+ ).data
1439
+
1440
+ @validate_call
1441
+ async def _get_top_signals_async_with_http_info(
1442
+ self,
1443
+ page: Annotated[
1444
+ Optional[StrictInt], Field(description="The current page number")
1445
+ ] = None,
1446
+ page_size: Annotated[
1447
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
1448
+ Field(
1449
+ description="The number of items per page. Default is 10, max is 100."
1450
+ ),
1451
+ ] = None,
1452
+ since: Annotated[
1453
+ Optional[Annotated[int, Field(strict=True, ge=1)]],
1454
+ Field(
1455
+ description="Include signals from the last X hours. Default is 24 hours."
1456
+ ),
1457
+ ] = None,
1458
+ _request_timeout: Union[
1459
+ None,
1460
+ Annotated[StrictFloat, Field(gt=0)],
1461
+ Tuple[
1462
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1463
+ ],
1464
+ ] = None,
1465
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1466
+ _content_type: Optional[StrictStr] = None,
1467
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1468
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1469
+ ) -> ApiResponse[PaginatedResponseSignalWithToken]:
1470
+ """Get Top Signals
1471
+
1472
+ Get the top performing signals from the last X hours.The default is from the last 24 hours.
1473
+
1474
+ :param page: The current page number
1475
+ :type page: int
1476
+ :param page_size: The number of items per page. Default is 10, max is 100.
1477
+ :type page_size: int
1478
+ :param since: Include signals from the last X hours. Default is 24 hours.
1479
+ :type since: int
1480
+ :param _request_timeout: timeout setting for this request. If one
1481
+ number provided, it will be total request
1482
+ timeout. It can also be a pair (tuple) of
1483
+ (connection, read) timeouts.
1484
+ :type _request_timeout: int, tuple(int, int), optional
1485
+ :param _request_auth: set to override the auth_settings for an a single
1486
+ request; this effectively ignores the
1487
+ authentication in the spec for a single request.
1488
+ :type _request_auth: dict, optional
1489
+ :param _content_type: force content-type for the request.
1490
+ :type _content_type: str, Optional
1491
+ :param _headers: set to override the headers for a single
1492
+ request; this effectively ignores the headers
1493
+ in the spec for a single request.
1494
+ :type _headers: dict, optional
1495
+ :param _host_index: set to override the host_index for a single
1496
+ request; this effectively ignores the host_index
1497
+ in the spec for a single request.
1498
+ :type _host_index: int, optional
1499
+ :return: Returns the result object.
1500
+ """ # noqa: E501
1501
+
1502
+ _param = self._get_top_signals_serialize(
1503
+ page=page,
1504
+ page_size=page_size,
1505
+ since=since,
1506
+ _request_auth=_request_auth,
1507
+ _content_type=_content_type,
1508
+ _headers=_headers,
1509
+ _host_index=_host_index,
1510
+ )
1511
+
1512
+ _response_types_map: Dict[str, Optional[str]] = {
1513
+ "200": "PaginatedResponseSignalWithToken",
1514
+ }
1515
+ response_data = await self.api_client.call_api(
1516
+ *_param, _request_timeout=_request_timeout
1517
+ )
1518
+ await response_data.read()
1519
+ return self.api_client.response_deserialize(
1520
+ response_data=response_data, response_types_map=_response_types_map
1521
+ )
1522
+
1523
+ @validate_call
1524
+ async def _get_top_signals_async_without_preload_content(
1525
+ self,
1526
+ page: Annotated[
1527
+ Optional[StrictInt], Field(description="The current page number")
1528
+ ] = None,
1529
+ page_size: Annotated[
1530
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
1531
+ Field(
1532
+ description="The number of items per page. Default is 10, max is 100."
1533
+ ),
1534
+ ] = None,
1535
+ since: Annotated[
1536
+ Optional[Annotated[int, Field(strict=True, ge=1)]],
1537
+ Field(
1538
+ description="Include signals from the last X hours. Default is 24 hours."
1539
+ ),
1540
+ ] = None,
1541
+ _request_timeout: Union[
1542
+ None,
1543
+ Annotated[StrictFloat, Field(gt=0)],
1544
+ Tuple[
1545
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1546
+ ],
1547
+ ] = None,
1548
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1549
+ _content_type: Optional[StrictStr] = None,
1550
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1551
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1552
+ ) -> RESTResponseType:
1553
+ """Get Top Signals
1554
+
1555
+ Get the top performing signals from the last X hours.The default is from the last 24 hours.
1556
+
1557
+ :param page: The current page number
1558
+ :type page: int
1559
+ :param page_size: The number of items per page. Default is 10, max is 100.
1560
+ :type page_size: int
1561
+ :param since: Include signals from the last X hours. Default is 24 hours.
1562
+ :type since: int
1563
+ :param _request_timeout: timeout setting for this request. If one
1564
+ number provided, it will be total request
1565
+ timeout. It can also be a pair (tuple) of
1566
+ (connection, read) timeouts.
1567
+ :type _request_timeout: int, tuple(int, int), optional
1568
+ :param _request_auth: set to override the auth_settings for an a single
1569
+ request; this effectively ignores the
1570
+ authentication in the spec for a single request.
1571
+ :type _request_auth: dict, optional
1572
+ :param _content_type: force content-type for the request.
1573
+ :type _content_type: str, Optional
1574
+ :param _headers: set to override the headers for a single
1575
+ request; this effectively ignores the headers
1576
+ in the spec for a single request.
1577
+ :type _headers: dict, optional
1578
+ :param _host_index: set to override the host_index for a single
1579
+ request; this effectively ignores the host_index
1580
+ in the spec for a single request.
1581
+ :type _host_index: int, optional
1582
+ :return: Returns the result object.
1583
+ """ # noqa: E501
1584
+
1585
+ _param = self._get_top_signals_serialize(
1586
+ page=page,
1587
+ page_size=page_size,
1588
+ since=since,
1589
+ _request_auth=_request_auth,
1590
+ _content_type=_content_type,
1591
+ _headers=_headers,
1592
+ _host_index=_host_index,
1593
+ )
1594
+
1595
+ _response_types_map: Dict[str, Optional[str]] = {
1596
+ "200": "PaginatedResponseSignalWithToken",
1597
+ }
1598
+ response_data = await self.api_client.call_api(
1599
+ *_param, _request_timeout=_request_timeout
1600
+ )
1601
+ return response_data
1602
+
1603
+ # Private sync implementation methods
1604
+ @validate_call
1605
+ def _get_top_signals_sync(
1606
+ self,
1607
+ page: Annotated[
1608
+ Optional[StrictInt], Field(description="The current page number")
1609
+ ] = None,
1610
+ page_size: Annotated[
1611
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
1612
+ Field(
1613
+ description="The number of items per page. Default is 10, max is 100."
1614
+ ),
1615
+ ] = None,
1616
+ since: Annotated[
1617
+ Optional[Annotated[int, Field(strict=True, ge=1)]],
1618
+ Field(
1619
+ description="Include signals from the last X hours. Default is 24 hours."
1620
+ ),
1621
+ ] = None,
1622
+ _request_timeout: Union[
1623
+ None,
1624
+ Annotated[StrictFloat, Field(gt=0)],
1625
+ Tuple[
1626
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1627
+ ],
1628
+ ] = None,
1629
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1630
+ _content_type: Optional[StrictStr] = None,
1631
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1632
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1633
+ ) -> PaginatedResponseSignalWithToken:
1634
+ """Synchronous version of get_top_signals"""
1635
+ return async_to_sync(self._get_top_signals_async)(
1636
+ page=page,
1637
+ page_size=page_size,
1638
+ since=since,
1639
+ _request_timeout=_request_timeout,
1640
+ _request_auth=_request_auth,
1641
+ _content_type=_content_type,
1642
+ _headers=_headers,
1643
+ _host_index=_host_index,
1644
+ )
1645
+
1646
+ @validate_call
1647
+ def _get_top_signals_sync_with_http_info(
1648
+ self,
1649
+ page: Annotated[
1650
+ Optional[StrictInt], Field(description="The current page number")
1651
+ ] = None,
1652
+ page_size: Annotated[
1653
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
1654
+ Field(
1655
+ description="The number of items per page. Default is 10, max is 100."
1656
+ ),
1657
+ ] = None,
1658
+ since: Annotated[
1659
+ Optional[Annotated[int, Field(strict=True, ge=1)]],
1660
+ Field(
1661
+ description="Include signals from the last X hours. Default is 24 hours."
1662
+ ),
1663
+ ] = None,
1664
+ _request_timeout: Union[
1665
+ None,
1666
+ Annotated[StrictFloat, Field(gt=0)],
1667
+ Tuple[
1668
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1669
+ ],
1670
+ ] = None,
1671
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1672
+ _content_type: Optional[StrictStr] = None,
1673
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1674
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1675
+ ) -> ApiResponse[PaginatedResponseSignalWithToken]:
1676
+ """Synchronous version of get_top_signals_with_http_info"""
1677
+ return async_to_sync(self._get_top_signals_async_with_http_info)(
1678
+ page=page,
1679
+ page_size=page_size,
1680
+ since=since,
1681
+ _request_timeout=_request_timeout,
1682
+ _request_auth=_request_auth,
1683
+ _content_type=_content_type,
1684
+ _headers=_headers,
1685
+ _host_index=_host_index,
1686
+ )
1687
+
1688
+ @validate_call
1689
+ def _get_top_signals_sync_without_preload_content(
1690
+ self,
1691
+ page: Annotated[
1692
+ Optional[StrictInt], Field(description="The current page number")
1693
+ ] = None,
1694
+ page_size: Annotated[
1695
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
1696
+ Field(
1697
+ description="The number of items per page. Default is 10, max is 100."
1698
+ ),
1699
+ ] = None,
1700
+ since: Annotated[
1701
+ Optional[Annotated[int, Field(strict=True, ge=1)]],
1702
+ Field(
1703
+ description="Include signals from the last X hours. Default is 24 hours."
1704
+ ),
1705
+ ] = None,
1706
+ _request_timeout: Union[
1707
+ None,
1708
+ Annotated[StrictFloat, Field(gt=0)],
1709
+ Tuple[
1710
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1711
+ ],
1712
+ ] = None,
1713
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1714
+ _content_type: Optional[StrictStr] = None,
1715
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1716
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1717
+ ) -> RESTResponseType:
1718
+ """Synchronous version of get_top_signals_without_preload_content"""
1719
+ return async_to_sync(self._get_top_signals_async_without_preload_content)(
1720
+ page=page,
1721
+ page_size=page_size,
1722
+ since=since,
1723
+ _request_timeout=_request_timeout,
1724
+ _request_auth=_request_auth,
1725
+ _content_type=_content_type,
1726
+ _headers=_headers,
1727
+ _host_index=_host_index,
1728
+ )
1729
+
1730
+ def _get_top_signals_serialize(
1731
+ self,
1732
+ page,
1733
+ page_size,
1734
+ since,
1735
+ _request_auth,
1736
+ _content_type,
1737
+ _headers,
1738
+ _host_index,
1739
+ ) -> RequestSerialized:
1740
+
1741
+ _host = None
1742
+
1743
+ _collection_formats: Dict[str, str] = {}
1744
+
1745
+ _path_params: Dict[str, str] = {}
1746
+ _query_params: List[Tuple[str, str]] = []
1747
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1748
+ _form_params: List[Tuple[str, str]] = []
1749
+ _files: Dict[
1750
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1751
+ ] = {}
1752
+ _body_params: Optional[bytes] = None
1753
+
1754
+ # process the path parameters
1755
+ # process the query parameters
1756
+ if page is not None:
1757
+
1758
+ _query_params.append(("page", page))
1759
+
1760
+ if page_size is not None:
1761
+
1762
+ _query_params.append(("page_size", page_size))
1763
+
1764
+ if since is not None:
1765
+
1766
+ _query_params.append(("since", since))
1767
+
1768
+ # process the header parameters
1769
+ # process the form parameters
1770
+ # process the body parameter
1771
+
1772
+ # set the HTTP header `Accept`
1773
+ if "Accept" not in _header_params:
1774
+ _header_params["Accept"] = self.api_client.select_header_accept(
1775
+ ["application/json"]
1776
+ )
1777
+
1778
+ # authentication setting
1779
+ _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
1780
+
1781
+ return self.api_client.param_serialize(
1782
+ method="GET",
1783
+ resource_path="/signals/top",
1784
+ path_params=_path_params,
1785
+ query_params=_query_params,
1786
+ header_params=_header_params,
1787
+ body=_body_params,
1788
+ post_params=_form_params,
1789
+ files=_files,
1790
+ auth_settings=_auth_settings,
1791
+ collection_formats=_collection_formats,
1792
+ _host=_host,
1793
+ _request_auth=_request_auth,
1794
+ )