kalshi-python-sync 3.0.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 (149) hide show
  1. kalshi_python_sync/__init__.py +272 -0
  2. kalshi_python_sync/api/__init__.py +19 -0
  3. kalshi_python_sync/api/api_keys_api.py +1098 -0
  4. kalshi_python_sync/api/communications_api.py +3216 -0
  5. kalshi_python_sync/api/events_api.py +1941 -0
  6. kalshi_python_sync/api/exchange_api.py +1263 -0
  7. kalshi_python_sync/api/fcm_api.py +792 -0
  8. kalshi_python_sync/api/incentive_programs_api.py +346 -0
  9. kalshi_python_sync/api/live_data_api.py +564 -0
  10. kalshi_python_sync/api/market_api.py +2568 -0
  11. kalshi_python_sync/api/milestone_api.py +689 -0
  12. kalshi_python_sync/api/multivariate_api.py +1486 -0
  13. kalshi_python_sync/api/order_groups_api.py +1375 -0
  14. kalshi_python_sync/api/orders_api.py +2913 -0
  15. kalshi_python_sync/api/portfolio_api.py +1572 -0
  16. kalshi_python_sync/api/search_api.py +516 -0
  17. kalshi_python_sync/api/structured_targets_api.py +605 -0
  18. kalshi_python_sync/api_client.py +830 -0
  19. kalshi_python_sync/api_response.py +21 -0
  20. kalshi_python_sync/auth.py +89 -0
  21. kalshi_python_sync/configuration.py +626 -0
  22. kalshi_python_sync/exceptions.py +216 -0
  23. kalshi_python_sync/models/__init__.py +136 -0
  24. kalshi_python_sync/models/accept_quote_request.py +94 -0
  25. kalshi_python_sync/models/amend_order_request.py +120 -0
  26. kalshi_python_sync/models/amend_order_response.py +96 -0
  27. kalshi_python_sync/models/announcement.py +108 -0
  28. kalshi_python_sync/models/api_key.py +89 -0
  29. kalshi_python_sync/models/associated_event.py +105 -0
  30. kalshi_python_sync/models/batch_cancel_orders_individual_response.py +111 -0
  31. kalshi_python_sync/models/batch_cancel_orders_request.py +87 -0
  32. kalshi_python_sync/models/batch_cancel_orders_response.py +95 -0
  33. kalshi_python_sync/models/batch_create_orders_individual_response.py +114 -0
  34. kalshi_python_sync/models/batch_create_orders_request.py +95 -0
  35. kalshi_python_sync/models/batch_create_orders_response.py +95 -0
  36. kalshi_python_sync/models/batch_get_market_candlesticks_response.py +95 -0
  37. kalshi_python_sync/models/bid_ask_distribution.py +101 -0
  38. kalshi_python_sync/models/cancel_order_response.py +93 -0
  39. kalshi_python_sync/models/create_api_key_request.py +89 -0
  40. kalshi_python_sync/models/create_api_key_response.py +87 -0
  41. kalshi_python_sync/models/create_market_in_multivariate_event_collection_request.py +95 -0
  42. kalshi_python_sync/models/create_market_in_multivariate_event_collection_response.py +89 -0
  43. kalshi_python_sync/models/create_order_group_request.py +88 -0
  44. kalshi_python_sync/models/create_order_group_response.py +87 -0
  45. kalshi_python_sync/models/create_order_request.py +159 -0
  46. kalshi_python_sync/models/create_order_response.py +91 -0
  47. kalshi_python_sync/models/create_quote_request.py +93 -0
  48. kalshi_python_sync/models/create_quote_response.py +87 -0
  49. kalshi_python_sync/models/create_rfq_request.py +97 -0
  50. kalshi_python_sync/models/create_rfq_response.py +87 -0
  51. kalshi_python_sync/models/daily_schedule.py +89 -0
  52. kalshi_python_sync/models/decrease_order_request.py +90 -0
  53. kalshi_python_sync/models/decrease_order_response.py +91 -0
  54. kalshi_python_sync/models/error_response.py +93 -0
  55. kalshi_python_sync/models/event_data.py +133 -0
  56. kalshi_python_sync/models/event_position.py +105 -0
  57. kalshi_python_sync/models/exchange_status.py +97 -0
  58. kalshi_python_sync/models/fill.py +134 -0
  59. kalshi_python_sync/models/forecast_percentiles_point.py +101 -0
  60. kalshi_python_sync/models/generate_api_key_request.py +87 -0
  61. kalshi_python_sync/models/generate_api_key_response.py +89 -0
  62. kalshi_python_sync/models/get_api_keys_response.py +95 -0
  63. kalshi_python_sync/models/get_balance_response.py +91 -0
  64. kalshi_python_sync/models/get_communications_id_response.py +87 -0
  65. kalshi_python_sync/models/get_event_candlesticks_response.py +104 -0
  66. kalshi_python_sync/models/get_event_forecast_percentiles_history_response.py +95 -0
  67. kalshi_python_sync/models/get_event_metadata_response.py +123 -0
  68. kalshi_python_sync/models/get_event_response.py +101 -0
  69. kalshi_python_sync/models/get_events_response.py +107 -0
  70. kalshi_python_sync/models/get_exchange_announcements_response.py +95 -0
  71. kalshi_python_sync/models/get_exchange_schedule_response.py +91 -0
  72. kalshi_python_sync/models/get_fills_response.py +97 -0
  73. kalshi_python_sync/models/get_filters_by_sports_response.py +102 -0
  74. kalshi_python_sync/models/get_incentive_programs_response.py +97 -0
  75. kalshi_python_sync/models/get_live_data_response.py +91 -0
  76. kalshi_python_sync/models/get_live_datas_response.py +95 -0
  77. kalshi_python_sync/models/get_market_candlesticks_response.py +97 -0
  78. kalshi_python_sync/models/get_market_orderbook_response.py +91 -0
  79. kalshi_python_sync/models/get_market_response.py +91 -0
  80. kalshi_python_sync/models/get_markets_response.py +97 -0
  81. kalshi_python_sync/models/get_milestone_response.py +91 -0
  82. kalshi_python_sync/models/get_milestones_response.py +97 -0
  83. kalshi_python_sync/models/get_multivariate_event_collection_lookup_history_response.py +95 -0
  84. kalshi_python_sync/models/get_multivariate_event_collection_response.py +91 -0
  85. kalshi_python_sync/models/get_multivariate_event_collections_response.py +97 -0
  86. kalshi_python_sync/models/get_multivariate_events_response.py +97 -0
  87. kalshi_python_sync/models/get_order_group_response.py +89 -0
  88. kalshi_python_sync/models/get_order_groups_response.py +95 -0
  89. kalshi_python_sync/models/get_order_queue_position_response.py +87 -0
  90. kalshi_python_sync/models/get_order_queue_positions_response.py +95 -0
  91. kalshi_python_sync/models/get_order_response.py +91 -0
  92. kalshi_python_sync/models/get_orders_response.py +97 -0
  93. kalshi_python_sync/models/get_portfolio_resting_order_total_value_response.py +87 -0
  94. kalshi_python_sync/models/get_positions_response.py +107 -0
  95. kalshi_python_sync/models/get_quote_response.py +91 -0
  96. kalshi_python_sync/models/get_quotes_response.py +97 -0
  97. kalshi_python_sync/models/get_rfq_response.py +91 -0
  98. kalshi_python_sync/models/get_rfqs_response.py +97 -0
  99. kalshi_python_sync/models/get_series_fee_changes_response.py +95 -0
  100. kalshi_python_sync/models/get_series_list_response.py +95 -0
  101. kalshi_python_sync/models/get_series_response.py +91 -0
  102. kalshi_python_sync/models/get_settlements_response.py +97 -0
  103. kalshi_python_sync/models/get_structured_target_response.py +91 -0
  104. kalshi_python_sync/models/get_structured_targets_response.py +97 -0
  105. kalshi_python_sync/models/get_tags_for_series_categories_response.py +87 -0
  106. kalshi_python_sync/models/get_trades_response.py +97 -0
  107. kalshi_python_sync/models/get_user_data_timestamp_response.py +88 -0
  108. kalshi_python_sync/models/incentive_program.py +121 -0
  109. kalshi_python_sync/models/live_data.py +91 -0
  110. kalshi_python_sync/models/lookup_point.py +102 -0
  111. kalshi_python_sync/models/lookup_tickers_for_market_in_multivariate_event_collection_request.py +95 -0
  112. kalshi_python_sync/models/lookup_tickers_for_market_in_multivariate_event_collection_response.py +89 -0
  113. kalshi_python_sync/models/maintenance_window.py +90 -0
  114. kalshi_python_sync/models/market.py +307 -0
  115. kalshi_python_sync/models/market_candlestick.py +108 -0
  116. kalshi_python_sync/models/market_candlesticks_response.py +97 -0
  117. kalshi_python_sync/models/market_metadata.py +91 -0
  118. kalshi_python_sync/models/market_position.py +110 -0
  119. kalshi_python_sync/models/milestone.py +120 -0
  120. kalshi_python_sync/models/multivariate_event_collection.py +122 -0
  121. kalshi_python_sync/models/mve_selected_leg.py +91 -0
  122. kalshi_python_sync/models/order.py +189 -0
  123. kalshi_python_sync/models/order_group.py +89 -0
  124. kalshi_python_sync/models/order_queue_position.py +91 -0
  125. kalshi_python_sync/models/order_status.py +38 -0
  126. kalshi_python_sync/models/orderbook.py +94 -0
  127. kalshi_python_sync/models/percentile_point.py +93 -0
  128. kalshi_python_sync/models/price_distribution.py +157 -0
  129. kalshi_python_sync/models/price_range.py +91 -0
  130. kalshi_python_sync/models/quote.py +153 -0
  131. kalshi_python_sync/models/rfq.py +129 -0
  132. kalshi_python_sync/models/schedule.py +105 -0
  133. kalshi_python_sync/models/scope_list.py +87 -0
  134. kalshi_python_sync/models/self_trade_prevention_type.py +37 -0
  135. kalshi_python_sync/models/series.py +129 -0
  136. kalshi_python_sync/models/series_fee_change.py +103 -0
  137. kalshi_python_sync/models/settlement.py +118 -0
  138. kalshi_python_sync/models/settlement_source.py +89 -0
  139. kalshi_python_sync/models/sport_filter_details.py +102 -0
  140. kalshi_python_sync/models/structured_target.py +98 -0
  141. kalshi_python_sync/models/ticker_pair.py +98 -0
  142. kalshi_python_sync/models/trade.py +113 -0
  143. kalshi_python_sync/models/weekly_schedule.py +154 -0
  144. kalshi_python_sync/py.typed +0 -0
  145. kalshi_python_sync/rest.py +258 -0
  146. kalshi_python_sync-3.0.0.dist-info/METADATA +77 -0
  147. kalshi_python_sync-3.0.0.dist-info/RECORD +149 -0
  148. kalshi_python_sync-3.0.0.dist-info/WHEEL +5 -0
  149. kalshi_python_sync-3.0.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,564 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Kalshi Trade API Manual Endpoints
5
+
6
+ Manually defined OpenAPI spec for endpoints being migrated to spec-first approach
7
+
8
+ The version of the OpenAPI document: 3.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+ import warnings
14
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt, StrictBool
15
+ from typing import Any, Dict, List, Optional, Tuple, Union
16
+ from typing_extensions import Annotated
17
+
18
+ from pydantic import Field, StrictStr
19
+ from typing import List
20
+ from typing_extensions import Annotated
21
+ from kalshi_python_sync.models.get_live_data_response import GetLiveDataResponse
22
+ from kalshi_python_sync.models.get_live_datas_response import GetLiveDatasResponse
23
+
24
+ from kalshi_python_sync.api_client import ApiClient, RequestSerialized
25
+ from kalshi_python_sync.api_response import ApiResponse
26
+ from kalshi_python_sync.rest import RESTResponseType
27
+
28
+
29
+ class LiveDataApi:
30
+ """NOTE: This class is auto generated by OpenAPI Generator
31
+ Ref: https://openapi-generator.tech
32
+
33
+ Do not edit the class manually.
34
+ """
35
+
36
+ def __init__(self, api_client=None) -> None:
37
+ if api_client is None:
38
+ api_client = ApiClient.get_default()
39
+ self.api_client = api_client
40
+
41
+
42
+ @validate_call
43
+ def get_live_data(
44
+ self,
45
+ type: StrictStr,
46
+ milestone_id: StrictStr,
47
+ ) -> GetLiveDataResponse:
48
+ """Get Live Data
49
+
50
+ Get live data for a specific milestone
51
+
52
+ :param type: Type of live data (required)
53
+ :type type: str
54
+ :param milestone_id: Milestone ID (required)
55
+ :type milestone_id: str
56
+ :param _request_timeout: timeout setting for this request. If one
57
+ number provided, it will be total request
58
+ timeout. It can also be a pair (tuple) of
59
+ (connection, read) timeouts.
60
+ :type _request_timeout: int, tuple(int, int), optional
61
+ :param _request_auth: set to override the auth_settings for an a single
62
+ request; this effectively ignores the
63
+ authentication in the spec for a single request.
64
+ :type _request_auth: dict, optional
65
+ :param _content_type: force content-type for the request.
66
+ :type _content_type: str, Optional
67
+ :param _headers: set to override the headers for a single
68
+ request; this effectively ignores the headers
69
+ in the spec for a single request.
70
+ :type _headers: dict, optional
71
+ :param _host_index: set to override the host_index for a single
72
+ request; this effectively ignores the host_index
73
+ in the spec for a single request.
74
+ :type _host_index: int, optional
75
+ :return: Returns the result object.
76
+ """ # noqa: E501
77
+
78
+
79
+ _param = self._get_live_data_serialize(
80
+ type=type,
81
+ milestone_id=milestone_id,
82
+ _request_auth=None,
83
+ _content_type=None,
84
+ _headers=None,
85
+ _host_index=0
86
+ )
87
+
88
+ _response_types_map: Dict[str, Optional[str]] = {
89
+ '200': "GetLiveDataResponse",
90
+ '404': None,
91
+ '500': None,
92
+ }
93
+ response_data = self.api_client.call_api(
94
+ *_param,
95
+ _request_timeout=None,
96
+ )
97
+ response_data.read()
98
+ return self.api_client.response_deserialize(
99
+ response_data=response_data,
100
+ response_types_map=_response_types_map,
101
+ ).data
102
+
103
+
104
+ @validate_call
105
+ def get_live_data_with_http_info(
106
+ self,
107
+ type: Annotated[StrictStr, Field(description="Type of live data")],
108
+ milestone_id: Annotated[StrictStr, Field(description="Milestone ID")],
109
+ _request_timeout: Union[
110
+ None,
111
+ Annotated[StrictFloat, Field(gt=0)],
112
+ Tuple[
113
+ Annotated[StrictFloat, Field(gt=0)],
114
+ Annotated[StrictFloat, Field(gt=0)]
115
+ ]
116
+ ] = None,
117
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
118
+ _content_type: Optional[StrictStr] = None,
119
+ _headers: Optional[Dict[StrictStr, Any]] = None,
120
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
121
+ ) -> ApiResponse[GetLiveDataResponse]:
122
+ """Get Live Data
123
+
124
+ Get live data for a specific milestone
125
+
126
+ :param type: Type of live data (required)
127
+ :type type: str
128
+ :param milestone_id: Milestone ID (required)
129
+ :type milestone_id: str
130
+ :param _request_timeout: timeout setting for this request. If one
131
+ number provided, it will be total request
132
+ timeout. It can also be a pair (tuple) of
133
+ (connection, read) timeouts.
134
+ :type _request_timeout: int, tuple(int, int), optional
135
+ :param _request_auth: set to override the auth_settings for an a single
136
+ request; this effectively ignores the
137
+ authentication in the spec for a single request.
138
+ :type _request_auth: dict, optional
139
+ :param _content_type: force content-type for the request.
140
+ :type _content_type: str, Optional
141
+ :param _headers: set to override the headers for a single
142
+ request; this effectively ignores the headers
143
+ in the spec for a single request.
144
+ :type _headers: dict, optional
145
+ :param _host_index: set to override the host_index for a single
146
+ request; this effectively ignores the host_index
147
+ in the spec for a single request.
148
+ :type _host_index: int, optional
149
+ :return: Returns the result object.
150
+ """ # noqa: E501
151
+
152
+ _param = self._get_live_data_serialize(
153
+ type=type,
154
+ milestone_id=milestone_id,
155
+ _request_auth=_request_auth,
156
+ _content_type=_content_type,
157
+ _headers=_headers,
158
+ _host_index=_host_index
159
+ )
160
+
161
+ _response_types_map: Dict[str, Optional[str]] = {
162
+ '200': "GetLiveDataResponse",
163
+ '404': None,
164
+ '500': None,
165
+ }
166
+ response_data = self.api_client.call_api(
167
+ *_param,
168
+ _request_timeout=_request_timeout
169
+ )
170
+ response_data.read()
171
+ return self.api_client.response_deserialize(
172
+ response_data=response_data,
173
+ response_types_map=_response_types_map,
174
+ )
175
+
176
+
177
+ @validate_call
178
+ def get_live_data_without_preload_content(
179
+ self,
180
+ type: Annotated[StrictStr, Field(description="Type of live data")],
181
+ milestone_id: Annotated[StrictStr, Field(description="Milestone ID")],
182
+ _request_timeout: Union[
183
+ None,
184
+ Annotated[StrictFloat, Field(gt=0)],
185
+ Tuple[
186
+ Annotated[StrictFloat, Field(gt=0)],
187
+ Annotated[StrictFloat, Field(gt=0)]
188
+ ]
189
+ ] = None,
190
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
191
+ _content_type: Optional[StrictStr] = None,
192
+ _headers: Optional[Dict[StrictStr, Any]] = None,
193
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
194
+ ) -> RESTResponseType:
195
+ """Get Live Data
196
+
197
+ Get live data for a specific milestone
198
+
199
+ :param type: Type of live data (required)
200
+ :type type: str
201
+ :param milestone_id: Milestone ID (required)
202
+ :type milestone_id: str
203
+ :param _request_timeout: timeout setting for this request. If one
204
+ number provided, it will be total request
205
+ timeout. It can also be a pair (tuple) of
206
+ (connection, read) timeouts.
207
+ :type _request_timeout: int, tuple(int, int), optional
208
+ :param _request_auth: set to override the auth_settings for an a single
209
+ request; this effectively ignores the
210
+ authentication in the spec for a single request.
211
+ :type _request_auth: dict, optional
212
+ :param _content_type: force content-type for the request.
213
+ :type _content_type: str, Optional
214
+ :param _headers: set to override the headers for a single
215
+ request; this effectively ignores the headers
216
+ in the spec for a single request.
217
+ :type _headers: dict, optional
218
+ :param _host_index: set to override the host_index for a single
219
+ request; this effectively ignores the host_index
220
+ in the spec for a single request.
221
+ :type _host_index: int, optional
222
+ :return: Returns the result object.
223
+ """ # noqa: E501
224
+
225
+ _param = self._get_live_data_serialize(
226
+ type=type,
227
+ milestone_id=milestone_id,
228
+ _request_auth=_request_auth,
229
+ _content_type=_content_type,
230
+ _headers=_headers,
231
+ _host_index=_host_index
232
+ )
233
+
234
+ _response_types_map: Dict[str, Optional[str]] = {
235
+ '200': "GetLiveDataResponse",
236
+ '404': None,
237
+ '500': None,
238
+ }
239
+ response_data = self.api_client.call_api(
240
+ *_param,
241
+ _request_timeout=_request_timeout
242
+ )
243
+ return response_data.response
244
+
245
+
246
+ def _get_live_data_serialize(
247
+ self,
248
+ type,
249
+ milestone_id,
250
+ _request_auth,
251
+ _content_type,
252
+ _headers,
253
+ _host_index,
254
+ ) -> RequestSerialized:
255
+
256
+ _host = None
257
+
258
+ _collection_formats: Dict[str, str] = {
259
+ }
260
+
261
+ _path_params: Dict[str, str] = {}
262
+ _query_params: List[Tuple[str, str]] = []
263
+ _header_params: Dict[str, Optional[str]] = _headers or {}
264
+ _form_params: List[Tuple[str, str]] = []
265
+ _files: Dict[
266
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
267
+ ] = {}
268
+ _body_params: Optional[bytes] = None
269
+
270
+ # process the path parameters
271
+ if type is not None:
272
+ _path_params['type'] = type
273
+ if milestone_id is not None:
274
+ _path_params['milestone_id'] = milestone_id
275
+ # process the query parameters
276
+ # process the header parameters
277
+ # process the form parameters
278
+ # process the body parameter
279
+
280
+
281
+ # set the HTTP header `Accept`
282
+ if 'Accept' not in _header_params:
283
+ _header_params['Accept'] = self.api_client.select_header_accept(
284
+ [
285
+ 'application/json'
286
+ ]
287
+ )
288
+
289
+
290
+ # authentication setting
291
+ _auth_settings: List[str] = [
292
+ ]
293
+
294
+ return self.api_client.param_serialize(
295
+ method='GET',
296
+ resource_path='/live_data/{type}/milestone/{milestone_id}',
297
+ path_params=_path_params,
298
+ query_params=_query_params,
299
+ header_params=_header_params,
300
+ body=_body_params,
301
+ post_params=_form_params,
302
+ files=_files,
303
+ auth_settings=_auth_settings,
304
+ collection_formats=_collection_formats,
305
+ _host=_host,
306
+ _request_auth=_request_auth
307
+ )
308
+
309
+
310
+
311
+
312
+ @validate_call
313
+ def get_live_datas(
314
+ self,
315
+ milestone_ids: Any,
316
+ ) -> GetLiveDatasResponse:
317
+ """Get Multiple Live Data
318
+
319
+ Get live data for multiple milestones
320
+
321
+ :param milestone_ids: Array of milestone IDs (required)
322
+ :type milestone_ids: List[str]
323
+ :param _request_timeout: timeout setting for this request. If one
324
+ number provided, it will be total request
325
+ timeout. It can also be a pair (tuple) of
326
+ (connection, read) timeouts.
327
+ :type _request_timeout: int, tuple(int, int), optional
328
+ :param _request_auth: set to override the auth_settings for an a single
329
+ request; this effectively ignores the
330
+ authentication in the spec for a single request.
331
+ :type _request_auth: dict, optional
332
+ :param _content_type: force content-type for the request.
333
+ :type _content_type: str, Optional
334
+ :param _headers: set to override the headers for a single
335
+ request; this effectively ignores the headers
336
+ in the spec for a single request.
337
+ :type _headers: dict, optional
338
+ :param _host_index: set to override the host_index for a single
339
+ request; this effectively ignores the host_index
340
+ in the spec for a single request.
341
+ :type _host_index: int, optional
342
+ :return: Returns the result object.
343
+ """ # noqa: E501
344
+
345
+
346
+ _param = self._get_live_datas_serialize(
347
+ milestone_ids=milestone_ids,
348
+ _request_auth=None,
349
+ _content_type=None,
350
+ _headers=None,
351
+ _host_index=0
352
+ )
353
+
354
+ _response_types_map: Dict[str, Optional[str]] = {
355
+ '200': "GetLiveDatasResponse",
356
+ '500': None,
357
+ }
358
+ response_data = self.api_client.call_api(
359
+ *_param,
360
+ _request_timeout=None,
361
+ )
362
+ response_data.read()
363
+ return self.api_client.response_deserialize(
364
+ response_data=response_data,
365
+ response_types_map=_response_types_map,
366
+ ).data
367
+
368
+
369
+ @validate_call
370
+ def get_live_datas_with_http_info(
371
+ self,
372
+ milestone_ids: Annotated[List[StrictStr], Field(max_length=100, description="Array of milestone IDs")],
373
+ _request_timeout: Union[
374
+ None,
375
+ Annotated[StrictFloat, Field(gt=0)],
376
+ Tuple[
377
+ Annotated[StrictFloat, Field(gt=0)],
378
+ Annotated[StrictFloat, Field(gt=0)]
379
+ ]
380
+ ] = None,
381
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
382
+ _content_type: Optional[StrictStr] = None,
383
+ _headers: Optional[Dict[StrictStr, Any]] = None,
384
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
385
+ ) -> ApiResponse[GetLiveDatasResponse]:
386
+ """Get Multiple Live Data
387
+
388
+ Get live data for multiple milestones
389
+
390
+ :param milestone_ids: Array of milestone IDs (required)
391
+ :type milestone_ids: List[str]
392
+ :param _request_timeout: timeout setting for this request. If one
393
+ number provided, it will be total request
394
+ timeout. It can also be a pair (tuple) of
395
+ (connection, read) timeouts.
396
+ :type _request_timeout: int, tuple(int, int), optional
397
+ :param _request_auth: set to override the auth_settings for an a single
398
+ request; this effectively ignores the
399
+ authentication in the spec for a single request.
400
+ :type _request_auth: dict, optional
401
+ :param _content_type: force content-type for the request.
402
+ :type _content_type: str, Optional
403
+ :param _headers: set to override the headers for a single
404
+ request; this effectively ignores the headers
405
+ in the spec for a single request.
406
+ :type _headers: dict, optional
407
+ :param _host_index: set to override the host_index for a single
408
+ request; this effectively ignores the host_index
409
+ in the spec for a single request.
410
+ :type _host_index: int, optional
411
+ :return: Returns the result object.
412
+ """ # noqa: E501
413
+
414
+ _param = self._get_live_datas_serialize(
415
+ milestone_ids=milestone_ids,
416
+ _request_auth=_request_auth,
417
+ _content_type=_content_type,
418
+ _headers=_headers,
419
+ _host_index=_host_index
420
+ )
421
+
422
+ _response_types_map: Dict[str, Optional[str]] = {
423
+ '200': "GetLiveDatasResponse",
424
+ '500': None,
425
+ }
426
+ response_data = self.api_client.call_api(
427
+ *_param,
428
+ _request_timeout=_request_timeout
429
+ )
430
+ response_data.read()
431
+ return self.api_client.response_deserialize(
432
+ response_data=response_data,
433
+ response_types_map=_response_types_map,
434
+ )
435
+
436
+
437
+ @validate_call
438
+ def get_live_datas_without_preload_content(
439
+ self,
440
+ milestone_ids: Annotated[List[StrictStr], Field(max_length=100, description="Array of milestone IDs")],
441
+ _request_timeout: Union[
442
+ None,
443
+ Annotated[StrictFloat, Field(gt=0)],
444
+ Tuple[
445
+ Annotated[StrictFloat, Field(gt=0)],
446
+ Annotated[StrictFloat, Field(gt=0)]
447
+ ]
448
+ ] = None,
449
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
450
+ _content_type: Optional[StrictStr] = None,
451
+ _headers: Optional[Dict[StrictStr, Any]] = None,
452
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
453
+ ) -> RESTResponseType:
454
+ """Get Multiple Live Data
455
+
456
+ Get live data for multiple milestones
457
+
458
+ :param milestone_ids: Array of milestone IDs (required)
459
+ :type milestone_ids: List[str]
460
+ :param _request_timeout: timeout setting for this request. If one
461
+ number provided, it will be total request
462
+ timeout. It can also be a pair (tuple) of
463
+ (connection, read) timeouts.
464
+ :type _request_timeout: int, tuple(int, int), optional
465
+ :param _request_auth: set to override the auth_settings for an a single
466
+ request; this effectively ignores the
467
+ authentication in the spec for a single request.
468
+ :type _request_auth: dict, optional
469
+ :param _content_type: force content-type for the request.
470
+ :type _content_type: str, Optional
471
+ :param _headers: set to override the headers for a single
472
+ request; this effectively ignores the headers
473
+ in the spec for a single request.
474
+ :type _headers: dict, optional
475
+ :param _host_index: set to override the host_index for a single
476
+ request; this effectively ignores the host_index
477
+ in the spec for a single request.
478
+ :type _host_index: int, optional
479
+ :return: Returns the result object.
480
+ """ # noqa: E501
481
+
482
+ _param = self._get_live_datas_serialize(
483
+ milestone_ids=milestone_ids,
484
+ _request_auth=_request_auth,
485
+ _content_type=_content_type,
486
+ _headers=_headers,
487
+ _host_index=_host_index
488
+ )
489
+
490
+ _response_types_map: Dict[str, Optional[str]] = {
491
+ '200': "GetLiveDatasResponse",
492
+ '500': None,
493
+ }
494
+ response_data = self.api_client.call_api(
495
+ *_param,
496
+ _request_timeout=_request_timeout
497
+ )
498
+ return response_data.response
499
+
500
+
501
+ def _get_live_datas_serialize(
502
+ self,
503
+ milestone_ids,
504
+ _request_auth,
505
+ _content_type,
506
+ _headers,
507
+ _host_index,
508
+ ) -> RequestSerialized:
509
+
510
+ _host = None
511
+
512
+ _collection_formats: Dict[str, str] = {
513
+ 'milestone_ids': 'multi',
514
+ }
515
+
516
+ _path_params: Dict[str, str] = {}
517
+ _query_params: List[Tuple[str, str]] = []
518
+ _header_params: Dict[str, Optional[str]] = _headers or {}
519
+ _form_params: List[Tuple[str, str]] = []
520
+ _files: Dict[
521
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
522
+ ] = {}
523
+ _body_params: Optional[bytes] = None
524
+
525
+ # process the path parameters
526
+ # process the query parameters
527
+ if milestone_ids is not None:
528
+
529
+ _query_params.append(('milestone_ids', milestone_ids))
530
+
531
+ # process the header parameters
532
+ # process the form parameters
533
+ # process the body parameter
534
+
535
+
536
+ # set the HTTP header `Accept`
537
+ if 'Accept' not in _header_params:
538
+ _header_params['Accept'] = self.api_client.select_header_accept(
539
+ [
540
+ 'application/json'
541
+ ]
542
+ )
543
+
544
+
545
+ # authentication setting
546
+ _auth_settings: List[str] = [
547
+ ]
548
+
549
+ return self.api_client.param_serialize(
550
+ method='GET',
551
+ resource_path='/live_data/batch',
552
+ path_params=_path_params,
553
+ query_params=_query_params,
554
+ header_params=_header_params,
555
+ body=_body_params,
556
+ post_params=_form_params,
557
+ files=_files,
558
+ auth_settings=_auth_settings,
559
+ collection_formats=_collection_formats,
560
+ _host=_host,
561
+ _request_auth=_request_auth
562
+ )
563
+
564
+