crypticorn 2.16.0__py3-none-any.whl → 2.17.0__py3-none-any.whl

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