kalshi-python-async 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 (151) hide show
  1. kalshi_python_async/__init__.py +272 -0
  2. kalshi_python_async/api/__init__.py +19 -0
  3. kalshi_python_async/api/api_keys_api.py +1098 -0
  4. kalshi_python_async/api/communications_api.py +3216 -0
  5. kalshi_python_async/api/events_api.py +1941 -0
  6. kalshi_python_async/api/exchange_api.py +1263 -0
  7. kalshi_python_async/api/fcm_api.py +792 -0
  8. kalshi_python_async/api/incentive_programs_api.py +346 -0
  9. kalshi_python_async/api/live_data_api.py +564 -0
  10. kalshi_python_async/api/market_api.py +2568 -0
  11. kalshi_python_async/api/milestone_api.py +689 -0
  12. kalshi_python_async/api/multivariate_api.py +1486 -0
  13. kalshi_python_async/api/order_groups_api.py +1375 -0
  14. kalshi_python_async/api/orders_api.py +2913 -0
  15. kalshi_python_async/api/portfolio_api.py +1572 -0
  16. kalshi_python_async/api/search_api.py +516 -0
  17. kalshi_python_async/api/structured_targets_api.py +605 -0
  18. kalshi_python_async/api_client.py +833 -0
  19. kalshi_python_async/api_response.py +21 -0
  20. kalshi_python_async/auth.py +89 -0
  21. kalshi_python_async/configuration.py +622 -0
  22. kalshi_python_async/exceptions.py +216 -0
  23. kalshi_python_async/models/__init__.py +136 -0
  24. kalshi_python_async/models/accept_quote_request.py +94 -0
  25. kalshi_python_async/models/amend_order_request.py +120 -0
  26. kalshi_python_async/models/amend_order_response.py +96 -0
  27. kalshi_python_async/models/announcement.py +108 -0
  28. kalshi_python_async/models/api_key.py +89 -0
  29. kalshi_python_async/models/associated_event.py +105 -0
  30. kalshi_python_async/models/batch_cancel_orders_individual_response.py +111 -0
  31. kalshi_python_async/models/batch_cancel_orders_request.py +87 -0
  32. kalshi_python_async/models/batch_cancel_orders_response.py +95 -0
  33. kalshi_python_async/models/batch_create_orders_individual_response.py +114 -0
  34. kalshi_python_async/models/batch_create_orders_request.py +95 -0
  35. kalshi_python_async/models/batch_create_orders_response.py +95 -0
  36. kalshi_python_async/models/batch_get_market_candlesticks_response.py +95 -0
  37. kalshi_python_async/models/bid_ask_distribution.py +101 -0
  38. kalshi_python_async/models/cancel_order_response.py +93 -0
  39. kalshi_python_async/models/create_api_key_request.py +89 -0
  40. kalshi_python_async/models/create_api_key_response.py +87 -0
  41. kalshi_python_async/models/create_market_in_multivariate_event_collection_request.py +95 -0
  42. kalshi_python_async/models/create_market_in_multivariate_event_collection_response.py +89 -0
  43. kalshi_python_async/models/create_order_group_request.py +88 -0
  44. kalshi_python_async/models/create_order_group_response.py +87 -0
  45. kalshi_python_async/models/create_order_request.py +159 -0
  46. kalshi_python_async/models/create_order_response.py +91 -0
  47. kalshi_python_async/models/create_quote_request.py +93 -0
  48. kalshi_python_async/models/create_quote_response.py +87 -0
  49. kalshi_python_async/models/create_rfq_request.py +97 -0
  50. kalshi_python_async/models/create_rfq_response.py +87 -0
  51. kalshi_python_async/models/daily_schedule.py +89 -0
  52. kalshi_python_async/models/decrease_order_request.py +90 -0
  53. kalshi_python_async/models/decrease_order_response.py +91 -0
  54. kalshi_python_async/models/error_response.py +93 -0
  55. kalshi_python_async/models/event_data.py +133 -0
  56. kalshi_python_async/models/event_position.py +105 -0
  57. kalshi_python_async/models/exchange_status.py +97 -0
  58. kalshi_python_async/models/fill.py +134 -0
  59. kalshi_python_async/models/forecast_percentiles_point.py +101 -0
  60. kalshi_python_async/models/generate_api_key_request.py +87 -0
  61. kalshi_python_async/models/generate_api_key_response.py +89 -0
  62. kalshi_python_async/models/get_api_keys_response.py +95 -0
  63. kalshi_python_async/models/get_balance_response.py +91 -0
  64. kalshi_python_async/models/get_communications_id_response.py +87 -0
  65. kalshi_python_async/models/get_event_candlesticks_response.py +104 -0
  66. kalshi_python_async/models/get_event_forecast_percentiles_history_response.py +95 -0
  67. kalshi_python_async/models/get_event_metadata_response.py +123 -0
  68. kalshi_python_async/models/get_event_response.py +101 -0
  69. kalshi_python_async/models/get_events_candlesticks_response.py +95 -0
  70. kalshi_python_async/models/get_events_candlesticks_response_events_inner.py +106 -0
  71. kalshi_python_async/models/get_events_response.py +107 -0
  72. kalshi_python_async/models/get_exchange_announcements_response.py +95 -0
  73. kalshi_python_async/models/get_exchange_schedule_response.py +91 -0
  74. kalshi_python_async/models/get_fills_response.py +97 -0
  75. kalshi_python_async/models/get_filters_by_sports_response.py +102 -0
  76. kalshi_python_async/models/get_incentive_programs_response.py +97 -0
  77. kalshi_python_async/models/get_live_data_response.py +91 -0
  78. kalshi_python_async/models/get_live_datas_response.py +95 -0
  79. kalshi_python_async/models/get_market_candlesticks_response.py +97 -0
  80. kalshi_python_async/models/get_market_orderbook_response.py +91 -0
  81. kalshi_python_async/models/get_market_response.py +91 -0
  82. kalshi_python_async/models/get_markets_response.py +97 -0
  83. kalshi_python_async/models/get_milestone_response.py +91 -0
  84. kalshi_python_async/models/get_milestones_response.py +97 -0
  85. kalshi_python_async/models/get_multivariate_event_collection_lookup_history_response.py +95 -0
  86. kalshi_python_async/models/get_multivariate_event_collection_response.py +91 -0
  87. kalshi_python_async/models/get_multivariate_event_collections_response.py +97 -0
  88. kalshi_python_async/models/get_multivariate_events_response.py +97 -0
  89. kalshi_python_async/models/get_order_group_response.py +89 -0
  90. kalshi_python_async/models/get_order_groups_response.py +95 -0
  91. kalshi_python_async/models/get_order_queue_position_response.py +87 -0
  92. kalshi_python_async/models/get_order_queue_positions_response.py +95 -0
  93. kalshi_python_async/models/get_order_response.py +91 -0
  94. kalshi_python_async/models/get_orders_response.py +97 -0
  95. kalshi_python_async/models/get_portfolio_resting_order_total_value_response.py +87 -0
  96. kalshi_python_async/models/get_positions_response.py +107 -0
  97. kalshi_python_async/models/get_quote_response.py +91 -0
  98. kalshi_python_async/models/get_quotes_response.py +97 -0
  99. kalshi_python_async/models/get_rfq_response.py +91 -0
  100. kalshi_python_async/models/get_rfqs_response.py +97 -0
  101. kalshi_python_async/models/get_series_fee_changes_response.py +95 -0
  102. kalshi_python_async/models/get_series_list_response.py +95 -0
  103. kalshi_python_async/models/get_series_response.py +91 -0
  104. kalshi_python_async/models/get_settlements_response.py +97 -0
  105. kalshi_python_async/models/get_structured_target_response.py +91 -0
  106. kalshi_python_async/models/get_structured_targets_response.py +97 -0
  107. kalshi_python_async/models/get_tags_for_series_categories_response.py +87 -0
  108. kalshi_python_async/models/get_trades_response.py +97 -0
  109. kalshi_python_async/models/get_user_data_timestamp_response.py +88 -0
  110. kalshi_python_async/models/incentive_program.py +121 -0
  111. kalshi_python_async/models/live_data.py +91 -0
  112. kalshi_python_async/models/lookup_point.py +102 -0
  113. kalshi_python_async/models/lookup_tickers_for_market_in_multivariate_event_collection_request.py +95 -0
  114. kalshi_python_async/models/lookup_tickers_for_market_in_multivariate_event_collection_response.py +89 -0
  115. kalshi_python_async/models/maintenance_window.py +90 -0
  116. kalshi_python_async/models/market.py +307 -0
  117. kalshi_python_async/models/market_candlestick.py +108 -0
  118. kalshi_python_async/models/market_candlesticks_response.py +97 -0
  119. kalshi_python_async/models/market_metadata.py +91 -0
  120. kalshi_python_async/models/market_position.py +110 -0
  121. kalshi_python_async/models/milestone.py +120 -0
  122. kalshi_python_async/models/multivariate_event_collection.py +122 -0
  123. kalshi_python_async/models/mve_selected_leg.py +91 -0
  124. kalshi_python_async/models/order.py +189 -0
  125. kalshi_python_async/models/order_group.py +89 -0
  126. kalshi_python_async/models/order_queue_position.py +91 -0
  127. kalshi_python_async/models/order_status.py +38 -0
  128. kalshi_python_async/models/orderbook.py +94 -0
  129. kalshi_python_async/models/percentile_point.py +93 -0
  130. kalshi_python_async/models/price_distribution.py +157 -0
  131. kalshi_python_async/models/price_range.py +91 -0
  132. kalshi_python_async/models/quote.py +153 -0
  133. kalshi_python_async/models/rfq.py +129 -0
  134. kalshi_python_async/models/schedule.py +105 -0
  135. kalshi_python_async/models/scope_list.py +87 -0
  136. kalshi_python_async/models/self_trade_prevention_type.py +37 -0
  137. kalshi_python_async/models/series.py +129 -0
  138. kalshi_python_async/models/series_fee_change.py +103 -0
  139. kalshi_python_async/models/settlement.py +118 -0
  140. kalshi_python_async/models/settlement_source.py +89 -0
  141. kalshi_python_async/models/sport_filter_details.py +102 -0
  142. kalshi_python_async/models/structured_target.py +98 -0
  143. kalshi_python_async/models/ticker_pair.py +98 -0
  144. kalshi_python_async/models/trade.py +113 -0
  145. kalshi_python_async/models/weekly_schedule.py +154 -0
  146. kalshi_python_async/py.typed +0 -0
  147. kalshi_python_async/rest.py +213 -0
  148. kalshi_python_async-3.0.0.dist-info/METADATA +78 -0
  149. kalshi_python_async-3.0.0.dist-info/RECORD +151 -0
  150. kalshi_python_async-3.0.0.dist-info/WHEEL +5 -0
  151. kalshi_python_async-3.0.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1263 @@
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 StrictBool, StrictStr
19
+ from typing import Optional
20
+ from kalshi_python_async.models.exchange_status import ExchangeStatus
21
+ from kalshi_python_async.models.get_exchange_announcements_response import GetExchangeAnnouncementsResponse
22
+ from kalshi_python_async.models.get_exchange_schedule_response import GetExchangeScheduleResponse
23
+ from kalshi_python_async.models.get_series_fee_changes_response import GetSeriesFeeChangesResponse
24
+ from kalshi_python_async.models.get_user_data_timestamp_response import GetUserDataTimestampResponse
25
+
26
+ from kalshi_python_async.api_client import ApiClient, RequestSerialized
27
+ from kalshi_python_async.api_response import ApiResponse
28
+ from kalshi_python_async.rest import RESTResponseType
29
+
30
+
31
+ class ExchangeApi:
32
+ """NOTE: This class is auto generated by OpenAPI Generator
33
+ Ref: https://openapi-generator.tech
34
+
35
+ Do not edit the class manually.
36
+ """
37
+
38
+ def __init__(self, api_client=None) -> None:
39
+ if api_client is None:
40
+ api_client = ApiClient.get_default()
41
+ self.api_client = api_client
42
+
43
+
44
+ @validate_call
45
+ async def get_exchange_announcements(
46
+ self,
47
+ ) -> GetExchangeAnnouncementsResponse:
48
+ """Get Exchange Announcements
49
+
50
+ Endpoint for getting all exchange-wide announcements.
51
+
52
+ :param _request_timeout: timeout setting for this request. If one
53
+ number provided, it will be total request
54
+ timeout. It can also be a pair (tuple) of
55
+ (connection, read) timeouts.
56
+ :type _request_timeout: int, tuple(int, int), optional
57
+ :param _request_auth: set to override the auth_settings for an a single
58
+ request; this effectively ignores the
59
+ authentication in the spec for a single request.
60
+ :type _request_auth: dict, optional
61
+ :param _content_type: force content-type for the request.
62
+ :type _content_type: str, Optional
63
+ :param _headers: set to override the headers for a single
64
+ request; this effectively ignores the headers
65
+ in the spec for a single request.
66
+ :type _headers: dict, optional
67
+ :param _host_index: set to override the host_index for a single
68
+ request; this effectively ignores the host_index
69
+ in the spec for a single request.
70
+ :type _host_index: int, optional
71
+ :return: Returns the result object.
72
+ """ # noqa: E501
73
+
74
+
75
+ _param = self._get_exchange_announcements_serialize(
76
+ _request_auth=None,
77
+ _content_type=None,
78
+ _headers=None,
79
+ _host_index=0
80
+ )
81
+
82
+ _response_types_map: Dict[str, Optional[str]] = {
83
+ '200': "GetExchangeAnnouncementsResponse",
84
+ '500': None,
85
+ }
86
+ response_data = await self.api_client.call_api(
87
+ *_param,
88
+ _request_timeout=None,
89
+ )
90
+ await response_data.read()
91
+ return self.api_client.response_deserialize(
92
+ response_data=response_data,
93
+ response_types_map=_response_types_map,
94
+ ).data
95
+
96
+
97
+ @validate_call
98
+ async def get_exchange_announcements_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)],
105
+ Annotated[StrictFloat, Field(gt=0)]
106
+ ]
107
+ ] = None,
108
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
109
+ _content_type: Optional[StrictStr] = None,
110
+ _headers: Optional[Dict[StrictStr, Any]] = None,
111
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
112
+ ) -> ApiResponse[GetExchangeAnnouncementsResponse]:
113
+ """Get Exchange Announcements
114
+
115
+ Endpoint for getting all exchange-wide announcements.
116
+
117
+ :param _request_timeout: timeout setting for this request. If one
118
+ number provided, it will be total request
119
+ timeout. It can also be a pair (tuple) of
120
+ (connection, read) timeouts.
121
+ :type _request_timeout: int, tuple(int, int), optional
122
+ :param _request_auth: set to override the auth_settings for an a single
123
+ request; this effectively ignores the
124
+ authentication in the spec for a single request.
125
+ :type _request_auth: dict, optional
126
+ :param _content_type: force content-type for the request.
127
+ :type _content_type: str, Optional
128
+ :param _headers: set to override the headers for a single
129
+ request; this effectively ignores the headers
130
+ in the spec for a single request.
131
+ :type _headers: dict, optional
132
+ :param _host_index: set to override the host_index for a single
133
+ request; this effectively ignores the host_index
134
+ in the spec for a single request.
135
+ :type _host_index: int, optional
136
+ :return: Returns the result object.
137
+ """ # noqa: E501
138
+
139
+ _param = self._get_exchange_announcements_serialize(
140
+ _request_auth=_request_auth,
141
+ _content_type=_content_type,
142
+ _headers=_headers,
143
+ _host_index=_host_index
144
+ )
145
+
146
+ _response_types_map: Dict[str, Optional[str]] = {
147
+ '200': "GetExchangeAnnouncementsResponse",
148
+ '500': None,
149
+ }
150
+ response_data = await self.api_client.call_api(
151
+ *_param,
152
+ _request_timeout=_request_timeout
153
+ )
154
+ await response_data.read()
155
+ return self.api_client.response_deserialize(
156
+ response_data=response_data,
157
+ response_types_map=_response_types_map,
158
+ )
159
+
160
+
161
+ @validate_call
162
+ async def get_exchange_announcements_without_preload_content(
163
+ self,
164
+ _request_timeout: Union[
165
+ None,
166
+ Annotated[StrictFloat, Field(gt=0)],
167
+ Tuple[
168
+ Annotated[StrictFloat, Field(gt=0)],
169
+ Annotated[StrictFloat, Field(gt=0)]
170
+ ]
171
+ ] = None,
172
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
173
+ _content_type: Optional[StrictStr] = None,
174
+ _headers: Optional[Dict[StrictStr, Any]] = None,
175
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
176
+ ) -> RESTResponseType:
177
+ """Get Exchange Announcements
178
+
179
+ Endpoint for getting all exchange-wide announcements.
180
+
181
+ :param _request_timeout: timeout setting for this request. If one
182
+ number provided, it will be total request
183
+ timeout. It can also be a pair (tuple) of
184
+ (connection, read) timeouts.
185
+ :type _request_timeout: int, tuple(int, int), optional
186
+ :param _request_auth: set to override the auth_settings for an a single
187
+ request; this effectively ignores the
188
+ authentication in the spec for a single request.
189
+ :type _request_auth: dict, optional
190
+ :param _content_type: force content-type for the request.
191
+ :type _content_type: str, Optional
192
+ :param _headers: set to override the headers for a single
193
+ request; this effectively ignores the headers
194
+ in the spec for a single request.
195
+ :type _headers: dict, optional
196
+ :param _host_index: set to override the host_index for a single
197
+ request; this effectively ignores the host_index
198
+ in the spec for a single request.
199
+ :type _host_index: int, optional
200
+ :return: Returns the result object.
201
+ """ # noqa: E501
202
+
203
+ _param = self._get_exchange_announcements_serialize(
204
+ _request_auth=_request_auth,
205
+ _content_type=_content_type,
206
+ _headers=_headers,
207
+ _host_index=_host_index
208
+ )
209
+
210
+ _response_types_map: Dict[str, Optional[str]] = {
211
+ '200': "GetExchangeAnnouncementsResponse",
212
+ '500': None,
213
+ }
214
+ response_data = await self.api_client.call_api(
215
+ *_param,
216
+ _request_timeout=_request_timeout
217
+ )
218
+ return response_data.response
219
+
220
+
221
+ def _get_exchange_announcements_serialize(
222
+ self,
223
+ _request_auth,
224
+ _content_type,
225
+ _headers,
226
+ _host_index,
227
+ ) -> RequestSerialized:
228
+
229
+ _host = None
230
+
231
+ _collection_formats: Dict[str, str] = {
232
+ }
233
+
234
+ _path_params: Dict[str, str] = {}
235
+ _query_params: List[Tuple[str, str]] = []
236
+ _header_params: Dict[str, Optional[str]] = _headers or {}
237
+ _form_params: List[Tuple[str, str]] = []
238
+ _files: Dict[
239
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
240
+ ] = {}
241
+ _body_params: Optional[bytes] = None
242
+
243
+ # process the path parameters
244
+ # process the query parameters
245
+ # process the header parameters
246
+ # process the form parameters
247
+ # process the body parameter
248
+
249
+
250
+ # set the HTTP header `Accept`
251
+ if 'Accept' not in _header_params:
252
+ _header_params['Accept'] = self.api_client.select_header_accept(
253
+ [
254
+ 'application/json'
255
+ ]
256
+ )
257
+
258
+
259
+ # authentication setting
260
+ _auth_settings: List[str] = [
261
+ ]
262
+
263
+ return self.api_client.param_serialize(
264
+ method='GET',
265
+ resource_path='/exchange/announcements',
266
+ path_params=_path_params,
267
+ query_params=_query_params,
268
+ header_params=_header_params,
269
+ body=_body_params,
270
+ post_params=_form_params,
271
+ files=_files,
272
+ auth_settings=_auth_settings,
273
+ collection_formats=_collection_formats,
274
+ _host=_host,
275
+ _request_auth=_request_auth
276
+ )
277
+
278
+
279
+
280
+
281
+ @validate_call
282
+ async def get_exchange_schedule(
283
+ self,
284
+ ) -> GetExchangeScheduleResponse:
285
+ """Get Exchange Schedule
286
+
287
+ Endpoint for getting the exchange schedule.
288
+
289
+ :param _request_timeout: timeout setting for this request. If one
290
+ number provided, it will be total request
291
+ timeout. It can also be a pair (tuple) of
292
+ (connection, read) timeouts.
293
+ :type _request_timeout: int, tuple(int, int), optional
294
+ :param _request_auth: set to override the auth_settings for an a single
295
+ request; this effectively ignores the
296
+ authentication in the spec for a single request.
297
+ :type _request_auth: dict, optional
298
+ :param _content_type: force content-type for the request.
299
+ :type _content_type: str, Optional
300
+ :param _headers: set to override the headers for a single
301
+ request; this effectively ignores the headers
302
+ in the spec for a single request.
303
+ :type _headers: dict, optional
304
+ :param _host_index: set to override the host_index for a single
305
+ request; this effectively ignores the host_index
306
+ in the spec for a single request.
307
+ :type _host_index: int, optional
308
+ :return: Returns the result object.
309
+ """ # noqa: E501
310
+
311
+
312
+ _param = self._get_exchange_schedule_serialize(
313
+ _request_auth=None,
314
+ _content_type=None,
315
+ _headers=None,
316
+ _host_index=0
317
+ )
318
+
319
+ _response_types_map: Dict[str, Optional[str]] = {
320
+ '200': "GetExchangeScheduleResponse",
321
+ '500': None,
322
+ }
323
+ response_data = await self.api_client.call_api(
324
+ *_param,
325
+ _request_timeout=None,
326
+ )
327
+ await response_data.read()
328
+ return self.api_client.response_deserialize(
329
+ response_data=response_data,
330
+ response_types_map=_response_types_map,
331
+ ).data
332
+
333
+
334
+ @validate_call
335
+ async def get_exchange_schedule_with_http_info(
336
+ self,
337
+ _request_timeout: Union[
338
+ None,
339
+ Annotated[StrictFloat, Field(gt=0)],
340
+ Tuple[
341
+ Annotated[StrictFloat, Field(gt=0)],
342
+ Annotated[StrictFloat, Field(gt=0)]
343
+ ]
344
+ ] = None,
345
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
346
+ _content_type: Optional[StrictStr] = None,
347
+ _headers: Optional[Dict[StrictStr, Any]] = None,
348
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
349
+ ) -> ApiResponse[GetExchangeScheduleResponse]:
350
+ """Get Exchange Schedule
351
+
352
+ Endpoint for getting the exchange schedule.
353
+
354
+ :param _request_timeout: timeout setting for this request. If one
355
+ number provided, it will be total request
356
+ timeout. It can also be a pair (tuple) of
357
+ (connection, read) timeouts.
358
+ :type _request_timeout: int, tuple(int, int), optional
359
+ :param _request_auth: set to override the auth_settings for an a single
360
+ request; this effectively ignores the
361
+ authentication in the spec for a single request.
362
+ :type _request_auth: dict, optional
363
+ :param _content_type: force content-type for the request.
364
+ :type _content_type: str, Optional
365
+ :param _headers: set to override the headers for a single
366
+ request; this effectively ignores the headers
367
+ in the spec for a single request.
368
+ :type _headers: dict, optional
369
+ :param _host_index: set to override the host_index for a single
370
+ request; this effectively ignores the host_index
371
+ in the spec for a single request.
372
+ :type _host_index: int, optional
373
+ :return: Returns the result object.
374
+ """ # noqa: E501
375
+
376
+ _param = self._get_exchange_schedule_serialize(
377
+ _request_auth=_request_auth,
378
+ _content_type=_content_type,
379
+ _headers=_headers,
380
+ _host_index=_host_index
381
+ )
382
+
383
+ _response_types_map: Dict[str, Optional[str]] = {
384
+ '200': "GetExchangeScheduleResponse",
385
+ '500': None,
386
+ }
387
+ response_data = await self.api_client.call_api(
388
+ *_param,
389
+ _request_timeout=_request_timeout
390
+ )
391
+ await response_data.read()
392
+ return self.api_client.response_deserialize(
393
+ response_data=response_data,
394
+ response_types_map=_response_types_map,
395
+ )
396
+
397
+
398
+ @validate_call
399
+ async def get_exchange_schedule_without_preload_content(
400
+ self,
401
+ _request_timeout: Union[
402
+ None,
403
+ Annotated[StrictFloat, Field(gt=0)],
404
+ Tuple[
405
+ Annotated[StrictFloat, Field(gt=0)],
406
+ Annotated[StrictFloat, Field(gt=0)]
407
+ ]
408
+ ] = None,
409
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
410
+ _content_type: Optional[StrictStr] = None,
411
+ _headers: Optional[Dict[StrictStr, Any]] = None,
412
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
413
+ ) -> RESTResponseType:
414
+ """Get Exchange Schedule
415
+
416
+ Endpoint for getting the exchange schedule.
417
+
418
+ :param _request_timeout: timeout setting for this request. If one
419
+ number provided, it will be total request
420
+ timeout. It can also be a pair (tuple) of
421
+ (connection, read) timeouts.
422
+ :type _request_timeout: int, tuple(int, int), optional
423
+ :param _request_auth: set to override the auth_settings for an a single
424
+ request; this effectively ignores the
425
+ authentication in the spec for a single request.
426
+ :type _request_auth: dict, optional
427
+ :param _content_type: force content-type for the request.
428
+ :type _content_type: str, Optional
429
+ :param _headers: set to override the headers for a single
430
+ request; this effectively ignores the headers
431
+ in the spec for a single request.
432
+ :type _headers: dict, optional
433
+ :param _host_index: set to override the host_index for a single
434
+ request; this effectively ignores the host_index
435
+ in the spec for a single request.
436
+ :type _host_index: int, optional
437
+ :return: Returns the result object.
438
+ """ # noqa: E501
439
+
440
+ _param = self._get_exchange_schedule_serialize(
441
+ _request_auth=_request_auth,
442
+ _content_type=_content_type,
443
+ _headers=_headers,
444
+ _host_index=_host_index
445
+ )
446
+
447
+ _response_types_map: Dict[str, Optional[str]] = {
448
+ '200': "GetExchangeScheduleResponse",
449
+ '500': None,
450
+ }
451
+ response_data = await self.api_client.call_api(
452
+ *_param,
453
+ _request_timeout=_request_timeout
454
+ )
455
+ return response_data.response
456
+
457
+
458
+ def _get_exchange_schedule_serialize(
459
+ self,
460
+ _request_auth,
461
+ _content_type,
462
+ _headers,
463
+ _host_index,
464
+ ) -> RequestSerialized:
465
+
466
+ _host = None
467
+
468
+ _collection_formats: Dict[str, str] = {
469
+ }
470
+
471
+ _path_params: Dict[str, str] = {}
472
+ _query_params: List[Tuple[str, str]] = []
473
+ _header_params: Dict[str, Optional[str]] = _headers or {}
474
+ _form_params: List[Tuple[str, str]] = []
475
+ _files: Dict[
476
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
477
+ ] = {}
478
+ _body_params: Optional[bytes] = None
479
+
480
+ # process the path parameters
481
+ # process the query parameters
482
+ # process the header parameters
483
+ # process the form parameters
484
+ # process the body parameter
485
+
486
+
487
+ # set the HTTP header `Accept`
488
+ if 'Accept' not in _header_params:
489
+ _header_params['Accept'] = self.api_client.select_header_accept(
490
+ [
491
+ 'application/json'
492
+ ]
493
+ )
494
+
495
+
496
+ # authentication setting
497
+ _auth_settings: List[str] = [
498
+ ]
499
+
500
+ return self.api_client.param_serialize(
501
+ method='GET',
502
+ resource_path='/exchange/schedule',
503
+ path_params=_path_params,
504
+ query_params=_query_params,
505
+ header_params=_header_params,
506
+ body=_body_params,
507
+ post_params=_form_params,
508
+ files=_files,
509
+ auth_settings=_auth_settings,
510
+ collection_formats=_collection_formats,
511
+ _host=_host,
512
+ _request_auth=_request_auth
513
+ )
514
+
515
+
516
+
517
+
518
+ @validate_call
519
+ async def get_exchange_status(
520
+ self,
521
+ ) -> ExchangeStatus:
522
+ """Get Exchange Status
523
+
524
+ Endpoint for getting the exchange status.
525
+
526
+ :param _request_timeout: timeout setting for this request. If one
527
+ number provided, it will be total request
528
+ timeout. It can also be a pair (tuple) of
529
+ (connection, read) timeouts.
530
+ :type _request_timeout: int, tuple(int, int), optional
531
+ :param _request_auth: set to override the auth_settings for an a single
532
+ request; this effectively ignores the
533
+ authentication in the spec for a single request.
534
+ :type _request_auth: dict, optional
535
+ :param _content_type: force content-type for the request.
536
+ :type _content_type: str, Optional
537
+ :param _headers: set to override the headers for a single
538
+ request; this effectively ignores the headers
539
+ in the spec for a single request.
540
+ :type _headers: dict, optional
541
+ :param _host_index: set to override the host_index for a single
542
+ request; this effectively ignores the host_index
543
+ in the spec for a single request.
544
+ :type _host_index: int, optional
545
+ :return: Returns the result object.
546
+ """ # noqa: E501
547
+
548
+
549
+ _param = self._get_exchange_status_serialize(
550
+ _request_auth=None,
551
+ _content_type=None,
552
+ _headers=None,
553
+ _host_index=0
554
+ )
555
+
556
+ _response_types_map: Dict[str, Optional[str]] = {
557
+ '200': "ExchangeStatus",
558
+ '500': "ExchangeStatus",
559
+ '503': "ExchangeStatus",
560
+ '504': "ExchangeStatus",
561
+ }
562
+ response_data = await self.api_client.call_api(
563
+ *_param,
564
+ _request_timeout=None,
565
+ )
566
+ await response_data.read()
567
+ return self.api_client.response_deserialize(
568
+ response_data=response_data,
569
+ response_types_map=_response_types_map,
570
+ ).data
571
+
572
+
573
+ @validate_call
574
+ async def get_exchange_status_with_http_info(
575
+ self,
576
+ _request_timeout: Union[
577
+ None,
578
+ Annotated[StrictFloat, Field(gt=0)],
579
+ Tuple[
580
+ Annotated[StrictFloat, Field(gt=0)],
581
+ Annotated[StrictFloat, Field(gt=0)]
582
+ ]
583
+ ] = None,
584
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
585
+ _content_type: Optional[StrictStr] = None,
586
+ _headers: Optional[Dict[StrictStr, Any]] = None,
587
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
588
+ ) -> ApiResponse[ExchangeStatus]:
589
+ """Get Exchange Status
590
+
591
+ Endpoint for getting the exchange status.
592
+
593
+ :param _request_timeout: timeout setting for this request. If one
594
+ number provided, it will be total request
595
+ timeout. It can also be a pair (tuple) of
596
+ (connection, read) timeouts.
597
+ :type _request_timeout: int, tuple(int, int), optional
598
+ :param _request_auth: set to override the auth_settings for an a single
599
+ request; this effectively ignores the
600
+ authentication in the spec for a single request.
601
+ :type _request_auth: dict, optional
602
+ :param _content_type: force content-type for the request.
603
+ :type _content_type: str, Optional
604
+ :param _headers: set to override the headers for a single
605
+ request; this effectively ignores the headers
606
+ in the spec for a single request.
607
+ :type _headers: dict, optional
608
+ :param _host_index: set to override the host_index for a single
609
+ request; this effectively ignores the host_index
610
+ in the spec for a single request.
611
+ :type _host_index: int, optional
612
+ :return: Returns the result object.
613
+ """ # noqa: E501
614
+
615
+ _param = self._get_exchange_status_serialize(
616
+ _request_auth=_request_auth,
617
+ _content_type=_content_type,
618
+ _headers=_headers,
619
+ _host_index=_host_index
620
+ )
621
+
622
+ _response_types_map: Dict[str, Optional[str]] = {
623
+ '200': "ExchangeStatus",
624
+ '500': "ExchangeStatus",
625
+ '503': "ExchangeStatus",
626
+ '504': "ExchangeStatus",
627
+ }
628
+ response_data = await self.api_client.call_api(
629
+ *_param,
630
+ _request_timeout=_request_timeout
631
+ )
632
+ await response_data.read()
633
+ return self.api_client.response_deserialize(
634
+ response_data=response_data,
635
+ response_types_map=_response_types_map,
636
+ )
637
+
638
+
639
+ @validate_call
640
+ async def get_exchange_status_without_preload_content(
641
+ self,
642
+ _request_timeout: Union[
643
+ None,
644
+ Annotated[StrictFloat, Field(gt=0)],
645
+ Tuple[
646
+ Annotated[StrictFloat, Field(gt=0)],
647
+ Annotated[StrictFloat, Field(gt=0)]
648
+ ]
649
+ ] = None,
650
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
651
+ _content_type: Optional[StrictStr] = None,
652
+ _headers: Optional[Dict[StrictStr, Any]] = None,
653
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
654
+ ) -> RESTResponseType:
655
+ """Get Exchange Status
656
+
657
+ Endpoint for getting the exchange status.
658
+
659
+ :param _request_timeout: timeout setting for this request. If one
660
+ number provided, it will be total request
661
+ timeout. It can also be a pair (tuple) of
662
+ (connection, read) timeouts.
663
+ :type _request_timeout: int, tuple(int, int), optional
664
+ :param _request_auth: set to override the auth_settings for an a single
665
+ request; this effectively ignores the
666
+ authentication in the spec for a single request.
667
+ :type _request_auth: dict, optional
668
+ :param _content_type: force content-type for the request.
669
+ :type _content_type: str, Optional
670
+ :param _headers: set to override the headers for a single
671
+ request; this effectively ignores the headers
672
+ in the spec for a single request.
673
+ :type _headers: dict, optional
674
+ :param _host_index: set to override the host_index for a single
675
+ request; this effectively ignores the host_index
676
+ in the spec for a single request.
677
+ :type _host_index: int, optional
678
+ :return: Returns the result object.
679
+ """ # noqa: E501
680
+
681
+ _param = self._get_exchange_status_serialize(
682
+ _request_auth=_request_auth,
683
+ _content_type=_content_type,
684
+ _headers=_headers,
685
+ _host_index=_host_index
686
+ )
687
+
688
+ _response_types_map: Dict[str, Optional[str]] = {
689
+ '200': "ExchangeStatus",
690
+ '500': "ExchangeStatus",
691
+ '503': "ExchangeStatus",
692
+ '504': "ExchangeStatus",
693
+ }
694
+ response_data = await self.api_client.call_api(
695
+ *_param,
696
+ _request_timeout=_request_timeout
697
+ )
698
+ return response_data.response
699
+
700
+
701
+ def _get_exchange_status_serialize(
702
+ self,
703
+ _request_auth,
704
+ _content_type,
705
+ _headers,
706
+ _host_index,
707
+ ) -> RequestSerialized:
708
+
709
+ _host = None
710
+
711
+ _collection_formats: Dict[str, str] = {
712
+ }
713
+
714
+ _path_params: Dict[str, str] = {}
715
+ _query_params: List[Tuple[str, str]] = []
716
+ _header_params: Dict[str, Optional[str]] = _headers or {}
717
+ _form_params: List[Tuple[str, str]] = []
718
+ _files: Dict[
719
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
720
+ ] = {}
721
+ _body_params: Optional[bytes] = None
722
+
723
+ # process the path parameters
724
+ # process the query parameters
725
+ # process the header parameters
726
+ # process the form parameters
727
+ # process the body parameter
728
+
729
+
730
+ # set the HTTP header `Accept`
731
+ if 'Accept' not in _header_params:
732
+ _header_params['Accept'] = self.api_client.select_header_accept(
733
+ [
734
+ 'application/json'
735
+ ]
736
+ )
737
+
738
+
739
+ # authentication setting
740
+ _auth_settings: List[str] = [
741
+ ]
742
+
743
+ return self.api_client.param_serialize(
744
+ method='GET',
745
+ resource_path='/exchange/status',
746
+ path_params=_path_params,
747
+ query_params=_query_params,
748
+ header_params=_header_params,
749
+ body=_body_params,
750
+ post_params=_form_params,
751
+ files=_files,
752
+ auth_settings=_auth_settings,
753
+ collection_formats=_collection_formats,
754
+ _host=_host,
755
+ _request_auth=_request_auth
756
+ )
757
+
758
+
759
+
760
+
761
+ @validate_call
762
+ async def get_series_fee_changes(
763
+ self,
764
+ series_ticker: Any = None,
765
+ show_historical: Any = None,
766
+ ) -> GetSeriesFeeChangesResponse:
767
+ """Get Series Fee Changes
768
+
769
+ :param series_ticker:
770
+ :type series_ticker: str
771
+ :param show_historical:
772
+ :type show_historical: bool
773
+ :param _request_timeout: timeout setting for this request. If one
774
+ number provided, it will be total request
775
+ timeout. It can also be a pair (tuple) of
776
+ (connection, read) timeouts.
777
+ :type _request_timeout: int, tuple(int, int), optional
778
+ :param _request_auth: set to override the auth_settings for an a single
779
+ request; this effectively ignores the
780
+ authentication in the spec for a single request.
781
+ :type _request_auth: dict, optional
782
+ :param _content_type: force content-type for the request.
783
+ :type _content_type: str, Optional
784
+ :param _headers: set to override the headers for a single
785
+ request; this effectively ignores the headers
786
+ in the spec for a single request.
787
+ :type _headers: dict, optional
788
+ :param _host_index: set to override the host_index for a single
789
+ request; this effectively ignores the host_index
790
+ in the spec for a single request.
791
+ :type _host_index: int, optional
792
+ :return: Returns the result object.
793
+ """ # noqa: E501
794
+
795
+
796
+ _param = self._get_series_fee_changes_serialize(
797
+ series_ticker=series_ticker,
798
+ show_historical=show_historical,
799
+ _request_auth=None,
800
+ _content_type=None,
801
+ _headers=None,
802
+ _host_index=0
803
+ )
804
+
805
+ _response_types_map: Dict[str, Optional[str]] = {
806
+ '200': "GetSeriesFeeChangesResponse",
807
+ '400': "ErrorResponse",
808
+ '500': "ErrorResponse",
809
+ }
810
+ response_data = await self.api_client.call_api(
811
+ *_param,
812
+ _request_timeout=None,
813
+ )
814
+ await response_data.read()
815
+ return self.api_client.response_deserialize(
816
+ response_data=response_data,
817
+ response_types_map=_response_types_map,
818
+ ).data
819
+
820
+
821
+ @validate_call
822
+ async def get_series_fee_changes_with_http_info(
823
+ self,
824
+ series_ticker: Optional[StrictStr] = None,
825
+ show_historical: Optional[StrictBool] = None,
826
+ _request_timeout: Union[
827
+ None,
828
+ Annotated[StrictFloat, Field(gt=0)],
829
+ Tuple[
830
+ Annotated[StrictFloat, Field(gt=0)],
831
+ Annotated[StrictFloat, Field(gt=0)]
832
+ ]
833
+ ] = None,
834
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
835
+ _content_type: Optional[StrictStr] = None,
836
+ _headers: Optional[Dict[StrictStr, Any]] = None,
837
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
838
+ ) -> ApiResponse[GetSeriesFeeChangesResponse]:
839
+ """Get Series Fee Changes
840
+
841
+ :param series_ticker:
842
+ :type series_ticker: str
843
+ :param show_historical:
844
+ :type show_historical: bool
845
+ :param _request_timeout: timeout setting for this request. If one
846
+ number provided, it will be total request
847
+ timeout. It can also be a pair (tuple) of
848
+ (connection, read) timeouts.
849
+ :type _request_timeout: int, tuple(int, int), optional
850
+ :param _request_auth: set to override the auth_settings for an a single
851
+ request; this effectively ignores the
852
+ authentication in the spec for a single request.
853
+ :type _request_auth: dict, optional
854
+ :param _content_type: force content-type for the request.
855
+ :type _content_type: str, Optional
856
+ :param _headers: set to override the headers for a single
857
+ request; this effectively ignores the headers
858
+ in the spec for a single request.
859
+ :type _headers: dict, optional
860
+ :param _host_index: set to override the host_index for a single
861
+ request; this effectively ignores the host_index
862
+ in the spec for a single request.
863
+ :type _host_index: int, optional
864
+ :return: Returns the result object.
865
+ """ # noqa: E501
866
+
867
+ _param = self._get_series_fee_changes_serialize(
868
+ series_ticker=series_ticker,
869
+ show_historical=show_historical,
870
+ _request_auth=_request_auth,
871
+ _content_type=_content_type,
872
+ _headers=_headers,
873
+ _host_index=_host_index
874
+ )
875
+
876
+ _response_types_map: Dict[str, Optional[str]] = {
877
+ '200': "GetSeriesFeeChangesResponse",
878
+ '400': "ErrorResponse",
879
+ '500': "ErrorResponse",
880
+ }
881
+ response_data = await self.api_client.call_api(
882
+ *_param,
883
+ _request_timeout=_request_timeout
884
+ )
885
+ await response_data.read()
886
+ return self.api_client.response_deserialize(
887
+ response_data=response_data,
888
+ response_types_map=_response_types_map,
889
+ )
890
+
891
+
892
+ @validate_call
893
+ async def get_series_fee_changes_without_preload_content(
894
+ self,
895
+ series_ticker: Optional[StrictStr] = None,
896
+ show_historical: Optional[StrictBool] = None,
897
+ _request_timeout: Union[
898
+ None,
899
+ Annotated[StrictFloat, Field(gt=0)],
900
+ Tuple[
901
+ Annotated[StrictFloat, Field(gt=0)],
902
+ Annotated[StrictFloat, Field(gt=0)]
903
+ ]
904
+ ] = None,
905
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
906
+ _content_type: Optional[StrictStr] = None,
907
+ _headers: Optional[Dict[StrictStr, Any]] = None,
908
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
909
+ ) -> RESTResponseType:
910
+ """Get Series Fee Changes
911
+
912
+ :param series_ticker:
913
+ :type series_ticker: str
914
+ :param show_historical:
915
+ :type show_historical: bool
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_series_fee_changes_serialize(
939
+ series_ticker=series_ticker,
940
+ show_historical=show_historical,
941
+ _request_auth=_request_auth,
942
+ _content_type=_content_type,
943
+ _headers=_headers,
944
+ _host_index=_host_index
945
+ )
946
+
947
+ _response_types_map: Dict[str, Optional[str]] = {
948
+ '200': "GetSeriesFeeChangesResponse",
949
+ '400': "ErrorResponse",
950
+ '500': "ErrorResponse",
951
+ }
952
+ response_data = await self.api_client.call_api(
953
+ *_param,
954
+ _request_timeout=_request_timeout
955
+ )
956
+ return response_data.response
957
+
958
+
959
+ def _get_series_fee_changes_serialize(
960
+ self,
961
+ series_ticker,
962
+ show_historical,
963
+ _request_auth,
964
+ _content_type,
965
+ _headers,
966
+ _host_index,
967
+ ) -> RequestSerialized:
968
+
969
+ _host = None
970
+
971
+ _collection_formats: Dict[str, str] = {
972
+ }
973
+
974
+ _path_params: Dict[str, str] = {}
975
+ _query_params: List[Tuple[str, str]] = []
976
+ _header_params: Dict[str, Optional[str]] = _headers or {}
977
+ _form_params: List[Tuple[str, str]] = []
978
+ _files: Dict[
979
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
980
+ ] = {}
981
+ _body_params: Optional[bytes] = None
982
+
983
+ # process the path parameters
984
+ # process the query parameters
985
+ if series_ticker is not None:
986
+
987
+ _query_params.append(('series_ticker', series_ticker))
988
+
989
+ if show_historical is not None:
990
+
991
+ _query_params.append(('show_historical', show_historical))
992
+
993
+ # process the header parameters
994
+ # process the form parameters
995
+ # process the body parameter
996
+
997
+
998
+ # set the HTTP header `Accept`
999
+ if 'Accept' not in _header_params:
1000
+ _header_params['Accept'] = self.api_client.select_header_accept(
1001
+ [
1002
+ 'application/json'
1003
+ ]
1004
+ )
1005
+
1006
+
1007
+ # authentication setting
1008
+ _auth_settings: List[str] = [
1009
+ ]
1010
+
1011
+ return self.api_client.param_serialize(
1012
+ method='GET',
1013
+ resource_path='/series/fee_changes',
1014
+ path_params=_path_params,
1015
+ query_params=_query_params,
1016
+ header_params=_header_params,
1017
+ body=_body_params,
1018
+ post_params=_form_params,
1019
+ files=_files,
1020
+ auth_settings=_auth_settings,
1021
+ collection_formats=_collection_formats,
1022
+ _host=_host,
1023
+ _request_auth=_request_auth
1024
+ )
1025
+
1026
+
1027
+
1028
+
1029
+ @validate_call
1030
+ async def get_user_data_timestamp(
1031
+ self,
1032
+ ) -> GetUserDataTimestampResponse:
1033
+ """Get User Data Timestamp
1034
+
1035
+ There is typically a short delay before exchange events are reflected in the API endpoints. Whenever possible, combine API responses to PUT/POST/DELETE requests with websocket data to obtain the most accurate view of the exchange state. This endpoint provides an approximate indication of when the data from the following endpoints was last validated: GetBalance, GetOrder(s), GetFills, GetPositions
1036
+
1037
+ :param _request_timeout: timeout setting for this request. If one
1038
+ number provided, it will be total request
1039
+ timeout. It can also be a pair (tuple) of
1040
+ (connection, read) timeouts.
1041
+ :type _request_timeout: int, tuple(int, int), optional
1042
+ :param _request_auth: set to override the auth_settings for an a single
1043
+ request; this effectively ignores the
1044
+ authentication in the spec for a single request.
1045
+ :type _request_auth: dict, optional
1046
+ :param _content_type: force content-type for the request.
1047
+ :type _content_type: str, Optional
1048
+ :param _headers: set to override the headers for a single
1049
+ request; this effectively ignores the headers
1050
+ in the spec for a single request.
1051
+ :type _headers: dict, optional
1052
+ :param _host_index: set to override the host_index for a single
1053
+ request; this effectively ignores the host_index
1054
+ in the spec for a single request.
1055
+ :type _host_index: int, optional
1056
+ :return: Returns the result object.
1057
+ """ # noqa: E501
1058
+
1059
+
1060
+ _param = self._get_user_data_timestamp_serialize(
1061
+ _request_auth=None,
1062
+ _content_type=None,
1063
+ _headers=None,
1064
+ _host_index=0
1065
+ )
1066
+
1067
+ _response_types_map: Dict[str, Optional[str]] = {
1068
+ '200': "GetUserDataTimestampResponse",
1069
+ '500': None,
1070
+ }
1071
+ response_data = await self.api_client.call_api(
1072
+ *_param,
1073
+ _request_timeout=None,
1074
+ )
1075
+ await response_data.read()
1076
+ return self.api_client.response_deserialize(
1077
+ response_data=response_data,
1078
+ response_types_map=_response_types_map,
1079
+ ).data
1080
+
1081
+
1082
+ @validate_call
1083
+ async def get_user_data_timestamp_with_http_info(
1084
+ self,
1085
+ _request_timeout: Union[
1086
+ None,
1087
+ Annotated[StrictFloat, Field(gt=0)],
1088
+ Tuple[
1089
+ Annotated[StrictFloat, Field(gt=0)],
1090
+ 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
+ ) -> ApiResponse[GetUserDataTimestampResponse]:
1098
+ """Get User Data Timestamp
1099
+
1100
+ There is typically a short delay before exchange events are reflected in the API endpoints. Whenever possible, combine API responses to PUT/POST/DELETE requests with websocket data to obtain the most accurate view of the exchange state. This endpoint provides an approximate indication of when the data from the following endpoints was last validated: GetBalance, GetOrder(s), GetFills, GetPositions
1101
+
1102
+ :param _request_timeout: timeout setting for this request. If one
1103
+ number provided, it will be total request
1104
+ timeout. It can also be a pair (tuple) of
1105
+ (connection, read) timeouts.
1106
+ :type _request_timeout: int, tuple(int, int), optional
1107
+ :param _request_auth: set to override the auth_settings for an a single
1108
+ request; this effectively ignores the
1109
+ authentication in the spec for a single request.
1110
+ :type _request_auth: dict, optional
1111
+ :param _content_type: force content-type for the request.
1112
+ :type _content_type: str, Optional
1113
+ :param _headers: set to override the headers for a single
1114
+ request; this effectively ignores the headers
1115
+ in the spec for a single request.
1116
+ :type _headers: dict, optional
1117
+ :param _host_index: set to override the host_index for a single
1118
+ request; this effectively ignores the host_index
1119
+ in the spec for a single request.
1120
+ :type _host_index: int, optional
1121
+ :return: Returns the result object.
1122
+ """ # noqa: E501
1123
+
1124
+ _param = self._get_user_data_timestamp_serialize(
1125
+ _request_auth=_request_auth,
1126
+ _content_type=_content_type,
1127
+ _headers=_headers,
1128
+ _host_index=_host_index
1129
+ )
1130
+
1131
+ _response_types_map: Dict[str, Optional[str]] = {
1132
+ '200': "GetUserDataTimestampResponse",
1133
+ '500': None,
1134
+ }
1135
+ response_data = await self.api_client.call_api(
1136
+ *_param,
1137
+ _request_timeout=_request_timeout
1138
+ )
1139
+ await response_data.read()
1140
+ return self.api_client.response_deserialize(
1141
+ response_data=response_data,
1142
+ response_types_map=_response_types_map,
1143
+ )
1144
+
1145
+
1146
+ @validate_call
1147
+ async def get_user_data_timestamp_without_preload_content(
1148
+ self,
1149
+ _request_timeout: Union[
1150
+ None,
1151
+ Annotated[StrictFloat, Field(gt=0)],
1152
+ Tuple[
1153
+ Annotated[StrictFloat, Field(gt=0)],
1154
+ Annotated[StrictFloat, Field(gt=0)]
1155
+ ]
1156
+ ] = None,
1157
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1158
+ _content_type: Optional[StrictStr] = None,
1159
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1160
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1161
+ ) -> RESTResponseType:
1162
+ """Get User Data Timestamp
1163
+
1164
+ There is typically a short delay before exchange events are reflected in the API endpoints. Whenever possible, combine API responses to PUT/POST/DELETE requests with websocket data to obtain the most accurate view of the exchange state. This endpoint provides an approximate indication of when the data from the following endpoints was last validated: GetBalance, GetOrder(s), GetFills, GetPositions
1165
+
1166
+ :param _request_timeout: timeout setting for this request. If one
1167
+ number provided, it will be total request
1168
+ timeout. It can also be a pair (tuple) of
1169
+ (connection, read) timeouts.
1170
+ :type _request_timeout: int, tuple(int, int), optional
1171
+ :param _request_auth: set to override the auth_settings for an a single
1172
+ request; this effectively ignores the
1173
+ authentication in the spec for a single request.
1174
+ :type _request_auth: dict, optional
1175
+ :param _content_type: force content-type for the request.
1176
+ :type _content_type: str, Optional
1177
+ :param _headers: set to override the headers for a single
1178
+ request; this effectively ignores the headers
1179
+ in the spec for a single request.
1180
+ :type _headers: dict, optional
1181
+ :param _host_index: set to override the host_index for a single
1182
+ request; this effectively ignores the host_index
1183
+ in the spec for a single request.
1184
+ :type _host_index: int, optional
1185
+ :return: Returns the result object.
1186
+ """ # noqa: E501
1187
+
1188
+ _param = self._get_user_data_timestamp_serialize(
1189
+ _request_auth=_request_auth,
1190
+ _content_type=_content_type,
1191
+ _headers=_headers,
1192
+ _host_index=_host_index
1193
+ )
1194
+
1195
+ _response_types_map: Dict[str, Optional[str]] = {
1196
+ '200': "GetUserDataTimestampResponse",
1197
+ '500': None,
1198
+ }
1199
+ response_data = await self.api_client.call_api(
1200
+ *_param,
1201
+ _request_timeout=_request_timeout
1202
+ )
1203
+ return response_data.response
1204
+
1205
+
1206
+ def _get_user_data_timestamp_serialize(
1207
+ self,
1208
+ _request_auth,
1209
+ _content_type,
1210
+ _headers,
1211
+ _host_index,
1212
+ ) -> RequestSerialized:
1213
+
1214
+ _host = None
1215
+
1216
+ _collection_formats: Dict[str, str] = {
1217
+ }
1218
+
1219
+ _path_params: Dict[str, str] = {}
1220
+ _query_params: List[Tuple[str, str]] = []
1221
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1222
+ _form_params: List[Tuple[str, str]] = []
1223
+ _files: Dict[
1224
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1225
+ ] = {}
1226
+ _body_params: Optional[bytes] = None
1227
+
1228
+ # process the path parameters
1229
+ # process the query parameters
1230
+ # process the header parameters
1231
+ # process the form parameters
1232
+ # process the body parameter
1233
+
1234
+
1235
+ # set the HTTP header `Accept`
1236
+ if 'Accept' not in _header_params:
1237
+ _header_params['Accept'] = self.api_client.select_header_accept(
1238
+ [
1239
+ 'application/json'
1240
+ ]
1241
+ )
1242
+
1243
+
1244
+ # authentication setting
1245
+ _auth_settings: List[str] = [
1246
+ ]
1247
+
1248
+ return self.api_client.param_serialize(
1249
+ method='GET',
1250
+ resource_path='/exchange/user_data_timestamp',
1251
+ path_params=_path_params,
1252
+ query_params=_query_params,
1253
+ header_params=_header_params,
1254
+ body=_body_params,
1255
+ post_params=_form_params,
1256
+ files=_files,
1257
+ auth_settings=_auth_settings,
1258
+ collection_formats=_collection_formats,
1259
+ _host=_host,
1260
+ _request_auth=_request_auth
1261
+ )
1262
+
1263
+