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.
- kalshi_python_async/__init__.py +272 -0
- kalshi_python_async/api/__init__.py +19 -0
- kalshi_python_async/api/api_keys_api.py +1098 -0
- kalshi_python_async/api/communications_api.py +3216 -0
- kalshi_python_async/api/events_api.py +1941 -0
- kalshi_python_async/api/exchange_api.py +1263 -0
- kalshi_python_async/api/fcm_api.py +792 -0
- kalshi_python_async/api/incentive_programs_api.py +346 -0
- kalshi_python_async/api/live_data_api.py +564 -0
- kalshi_python_async/api/market_api.py +2568 -0
- kalshi_python_async/api/milestone_api.py +689 -0
- kalshi_python_async/api/multivariate_api.py +1486 -0
- kalshi_python_async/api/order_groups_api.py +1375 -0
- kalshi_python_async/api/orders_api.py +2913 -0
- kalshi_python_async/api/portfolio_api.py +1572 -0
- kalshi_python_async/api/search_api.py +516 -0
- kalshi_python_async/api/structured_targets_api.py +605 -0
- kalshi_python_async/api_client.py +833 -0
- kalshi_python_async/api_response.py +21 -0
- kalshi_python_async/auth.py +89 -0
- kalshi_python_async/configuration.py +622 -0
- kalshi_python_async/exceptions.py +216 -0
- kalshi_python_async/models/__init__.py +136 -0
- kalshi_python_async/models/accept_quote_request.py +94 -0
- kalshi_python_async/models/amend_order_request.py +120 -0
- kalshi_python_async/models/amend_order_response.py +96 -0
- kalshi_python_async/models/announcement.py +108 -0
- kalshi_python_async/models/api_key.py +89 -0
- kalshi_python_async/models/associated_event.py +105 -0
- kalshi_python_async/models/batch_cancel_orders_individual_response.py +111 -0
- kalshi_python_async/models/batch_cancel_orders_request.py +87 -0
- kalshi_python_async/models/batch_cancel_orders_response.py +95 -0
- kalshi_python_async/models/batch_create_orders_individual_response.py +114 -0
- kalshi_python_async/models/batch_create_orders_request.py +95 -0
- kalshi_python_async/models/batch_create_orders_response.py +95 -0
- kalshi_python_async/models/batch_get_market_candlesticks_response.py +95 -0
- kalshi_python_async/models/bid_ask_distribution.py +101 -0
- kalshi_python_async/models/cancel_order_response.py +93 -0
- kalshi_python_async/models/create_api_key_request.py +89 -0
- kalshi_python_async/models/create_api_key_response.py +87 -0
- kalshi_python_async/models/create_market_in_multivariate_event_collection_request.py +95 -0
- kalshi_python_async/models/create_market_in_multivariate_event_collection_response.py +89 -0
- kalshi_python_async/models/create_order_group_request.py +88 -0
- kalshi_python_async/models/create_order_group_response.py +87 -0
- kalshi_python_async/models/create_order_request.py +159 -0
- kalshi_python_async/models/create_order_response.py +91 -0
- kalshi_python_async/models/create_quote_request.py +93 -0
- kalshi_python_async/models/create_quote_response.py +87 -0
- kalshi_python_async/models/create_rfq_request.py +97 -0
- kalshi_python_async/models/create_rfq_response.py +87 -0
- kalshi_python_async/models/daily_schedule.py +89 -0
- kalshi_python_async/models/decrease_order_request.py +90 -0
- kalshi_python_async/models/decrease_order_response.py +91 -0
- kalshi_python_async/models/error_response.py +93 -0
- kalshi_python_async/models/event_data.py +133 -0
- kalshi_python_async/models/event_position.py +105 -0
- kalshi_python_async/models/exchange_status.py +97 -0
- kalshi_python_async/models/fill.py +134 -0
- kalshi_python_async/models/forecast_percentiles_point.py +101 -0
- kalshi_python_async/models/generate_api_key_request.py +87 -0
- kalshi_python_async/models/generate_api_key_response.py +89 -0
- kalshi_python_async/models/get_api_keys_response.py +95 -0
- kalshi_python_async/models/get_balance_response.py +91 -0
- kalshi_python_async/models/get_communications_id_response.py +87 -0
- kalshi_python_async/models/get_event_candlesticks_response.py +104 -0
- kalshi_python_async/models/get_event_forecast_percentiles_history_response.py +95 -0
- kalshi_python_async/models/get_event_metadata_response.py +123 -0
- kalshi_python_async/models/get_event_response.py +101 -0
- kalshi_python_async/models/get_events_candlesticks_response.py +95 -0
- kalshi_python_async/models/get_events_candlesticks_response_events_inner.py +106 -0
- kalshi_python_async/models/get_events_response.py +107 -0
- kalshi_python_async/models/get_exchange_announcements_response.py +95 -0
- kalshi_python_async/models/get_exchange_schedule_response.py +91 -0
- kalshi_python_async/models/get_fills_response.py +97 -0
- kalshi_python_async/models/get_filters_by_sports_response.py +102 -0
- kalshi_python_async/models/get_incentive_programs_response.py +97 -0
- kalshi_python_async/models/get_live_data_response.py +91 -0
- kalshi_python_async/models/get_live_datas_response.py +95 -0
- kalshi_python_async/models/get_market_candlesticks_response.py +97 -0
- kalshi_python_async/models/get_market_orderbook_response.py +91 -0
- kalshi_python_async/models/get_market_response.py +91 -0
- kalshi_python_async/models/get_markets_response.py +97 -0
- kalshi_python_async/models/get_milestone_response.py +91 -0
- kalshi_python_async/models/get_milestones_response.py +97 -0
- kalshi_python_async/models/get_multivariate_event_collection_lookup_history_response.py +95 -0
- kalshi_python_async/models/get_multivariate_event_collection_response.py +91 -0
- kalshi_python_async/models/get_multivariate_event_collections_response.py +97 -0
- kalshi_python_async/models/get_multivariate_events_response.py +97 -0
- kalshi_python_async/models/get_order_group_response.py +89 -0
- kalshi_python_async/models/get_order_groups_response.py +95 -0
- kalshi_python_async/models/get_order_queue_position_response.py +87 -0
- kalshi_python_async/models/get_order_queue_positions_response.py +95 -0
- kalshi_python_async/models/get_order_response.py +91 -0
- kalshi_python_async/models/get_orders_response.py +97 -0
- kalshi_python_async/models/get_portfolio_resting_order_total_value_response.py +87 -0
- kalshi_python_async/models/get_positions_response.py +107 -0
- kalshi_python_async/models/get_quote_response.py +91 -0
- kalshi_python_async/models/get_quotes_response.py +97 -0
- kalshi_python_async/models/get_rfq_response.py +91 -0
- kalshi_python_async/models/get_rfqs_response.py +97 -0
- kalshi_python_async/models/get_series_fee_changes_response.py +95 -0
- kalshi_python_async/models/get_series_list_response.py +95 -0
- kalshi_python_async/models/get_series_response.py +91 -0
- kalshi_python_async/models/get_settlements_response.py +97 -0
- kalshi_python_async/models/get_structured_target_response.py +91 -0
- kalshi_python_async/models/get_structured_targets_response.py +97 -0
- kalshi_python_async/models/get_tags_for_series_categories_response.py +87 -0
- kalshi_python_async/models/get_trades_response.py +97 -0
- kalshi_python_async/models/get_user_data_timestamp_response.py +88 -0
- kalshi_python_async/models/incentive_program.py +121 -0
- kalshi_python_async/models/live_data.py +91 -0
- kalshi_python_async/models/lookup_point.py +102 -0
- kalshi_python_async/models/lookup_tickers_for_market_in_multivariate_event_collection_request.py +95 -0
- kalshi_python_async/models/lookup_tickers_for_market_in_multivariate_event_collection_response.py +89 -0
- kalshi_python_async/models/maintenance_window.py +90 -0
- kalshi_python_async/models/market.py +307 -0
- kalshi_python_async/models/market_candlestick.py +108 -0
- kalshi_python_async/models/market_candlesticks_response.py +97 -0
- kalshi_python_async/models/market_metadata.py +91 -0
- kalshi_python_async/models/market_position.py +110 -0
- kalshi_python_async/models/milestone.py +120 -0
- kalshi_python_async/models/multivariate_event_collection.py +122 -0
- kalshi_python_async/models/mve_selected_leg.py +91 -0
- kalshi_python_async/models/order.py +189 -0
- kalshi_python_async/models/order_group.py +89 -0
- kalshi_python_async/models/order_queue_position.py +91 -0
- kalshi_python_async/models/order_status.py +38 -0
- kalshi_python_async/models/orderbook.py +94 -0
- kalshi_python_async/models/percentile_point.py +93 -0
- kalshi_python_async/models/price_distribution.py +157 -0
- kalshi_python_async/models/price_range.py +91 -0
- kalshi_python_async/models/quote.py +153 -0
- kalshi_python_async/models/rfq.py +129 -0
- kalshi_python_async/models/schedule.py +105 -0
- kalshi_python_async/models/scope_list.py +87 -0
- kalshi_python_async/models/self_trade_prevention_type.py +37 -0
- kalshi_python_async/models/series.py +129 -0
- kalshi_python_async/models/series_fee_change.py +103 -0
- kalshi_python_async/models/settlement.py +118 -0
- kalshi_python_async/models/settlement_source.py +89 -0
- kalshi_python_async/models/sport_filter_details.py +102 -0
- kalshi_python_async/models/structured_target.py +98 -0
- kalshi_python_async/models/ticker_pair.py +98 -0
- kalshi_python_async/models/trade.py +113 -0
- kalshi_python_async/models/weekly_schedule.py +154 -0
- kalshi_python_async/py.typed +0 -0
- kalshi_python_async/rest.py +213 -0
- kalshi_python_async-3.0.0.dist-info/METADATA +78 -0
- kalshi_python_async-3.0.0.dist-info/RECORD +151 -0
- kalshi_python_async-3.0.0.dist-info/WHEEL +5 -0
- kalshi_python_async-3.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1486 @@
|
|
|
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, StrictInt, StrictStr, field_validator
|
|
19
|
+
from typing import Optional
|
|
20
|
+
from typing_extensions import Annotated
|
|
21
|
+
from kalshi_python_async.models.create_market_in_multivariate_event_collection_request import CreateMarketInMultivariateEventCollectionRequest
|
|
22
|
+
from kalshi_python_async.models.create_market_in_multivariate_event_collection_response import CreateMarketInMultivariateEventCollectionResponse
|
|
23
|
+
from kalshi_python_async.models.get_multivariate_event_collection_lookup_history_response import GetMultivariateEventCollectionLookupHistoryResponse
|
|
24
|
+
from kalshi_python_async.models.get_multivariate_event_collection_response import GetMultivariateEventCollectionResponse
|
|
25
|
+
from kalshi_python_async.models.get_multivariate_event_collections_response import GetMultivariateEventCollectionsResponse
|
|
26
|
+
from kalshi_python_async.models.lookup_tickers_for_market_in_multivariate_event_collection_request import LookupTickersForMarketInMultivariateEventCollectionRequest
|
|
27
|
+
from kalshi_python_async.models.lookup_tickers_for_market_in_multivariate_event_collection_response import LookupTickersForMarketInMultivariateEventCollectionResponse
|
|
28
|
+
|
|
29
|
+
from kalshi_python_async.api_client import ApiClient, RequestSerialized
|
|
30
|
+
from kalshi_python_async.api_response import ApiResponse
|
|
31
|
+
from kalshi_python_async.rest import RESTResponseType
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class MultivariateApi:
|
|
35
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
36
|
+
Ref: https://openapi-generator.tech
|
|
37
|
+
|
|
38
|
+
Do not edit the class manually.
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
def __init__(self, api_client=None) -> None:
|
|
42
|
+
if api_client is None:
|
|
43
|
+
api_client = ApiClient.get_default()
|
|
44
|
+
self.api_client = api_client
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
@validate_call
|
|
48
|
+
async def create_market_in_multivariate_event_collection(
|
|
49
|
+
self,
|
|
50
|
+
collection_ticker: StrictStr,
|
|
51
|
+
# Request body parameters as keyword arguments
|
|
52
|
+
**kwargs: Any,
|
|
53
|
+
) -> CreateMarketInMultivariateEventCollectionResponse:
|
|
54
|
+
"""Create Market In Multivariate Event Collection
|
|
55
|
+
|
|
56
|
+
Endpoint for looking up an individual market in a multivariate event collection. This endpoint must be hit at least once before trading or looking up a market.
|
|
57
|
+
|
|
58
|
+
:param collection_ticker: Collection ticker (required)
|
|
59
|
+
:type collection_ticker: str
|
|
60
|
+
:param create_market_in_multivariate_event_collection_request: (required)
|
|
61
|
+
:type create_market_in_multivariate_event_collection_request: CreateMarketInMultivariateEventCollectionRequest
|
|
62
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
63
|
+
number provided, it will be total request
|
|
64
|
+
timeout. It can also be a pair (tuple) of
|
|
65
|
+
(connection, read) timeouts.
|
|
66
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
67
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
68
|
+
request; this effectively ignores the
|
|
69
|
+
authentication in the spec for a single request.
|
|
70
|
+
:type _request_auth: dict, optional
|
|
71
|
+
:param _content_type: force content-type for the request.
|
|
72
|
+
:type _content_type: str, Optional
|
|
73
|
+
:param _headers: set to override the headers for a single
|
|
74
|
+
request; this effectively ignores the headers
|
|
75
|
+
in the spec for a single request.
|
|
76
|
+
:type _headers: dict, optional
|
|
77
|
+
:param _host_index: set to override the host_index for a single
|
|
78
|
+
request; this effectively ignores the host_index
|
|
79
|
+
in the spec for a single request.
|
|
80
|
+
:type _host_index: int, optional
|
|
81
|
+
:return: Returns the result object.
|
|
82
|
+
""" # noqa: E501
|
|
83
|
+
|
|
84
|
+
# Create request object from kwargs
|
|
85
|
+
create_market_in_multivariate_event_collection_request = CreateMarketInMultivariateEventCollectionRequest(**kwargs) if kwargs else None
|
|
86
|
+
|
|
87
|
+
_param = self._create_market_in_multivariate_event_collection_serialize(
|
|
88
|
+
collection_ticker=collection_ticker,
|
|
89
|
+
create_market_in_multivariate_event_collection_request=create_market_in_multivariate_event_collection_request,
|
|
90
|
+
_request_auth=kwargs.get('_request_auth'),
|
|
91
|
+
_content_type=kwargs.get('_content_type'),
|
|
92
|
+
_headers=kwargs.get('_headers'),
|
|
93
|
+
_host_index=kwargs.get('_host_index', 0)
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
97
|
+
'200': "CreateMarketInMultivariateEventCollectionResponse",
|
|
98
|
+
'400': "ErrorResponse",
|
|
99
|
+
'401': "ErrorResponse",
|
|
100
|
+
'500': "ErrorResponse",
|
|
101
|
+
}
|
|
102
|
+
response_data = await self.api_client.call_api(
|
|
103
|
+
*_param,
|
|
104
|
+
_request_timeout=kwargs.get('_request_timeout'),
|
|
105
|
+
)
|
|
106
|
+
await response_data.read()
|
|
107
|
+
return self.api_client.response_deserialize(
|
|
108
|
+
response_data=response_data,
|
|
109
|
+
response_types_map=_response_types_map,
|
|
110
|
+
).data
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
@validate_call
|
|
114
|
+
async def create_market_in_multivariate_event_collection_with_http_info(
|
|
115
|
+
self,
|
|
116
|
+
collection_ticker: Annotated[StrictStr, Field(description="Collection ticker")],
|
|
117
|
+
create_market_in_multivariate_event_collection_request: CreateMarketInMultivariateEventCollectionRequest,
|
|
118
|
+
_request_timeout: Union[
|
|
119
|
+
None,
|
|
120
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
121
|
+
Tuple[
|
|
122
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
123
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
124
|
+
]
|
|
125
|
+
] = None,
|
|
126
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
127
|
+
_content_type: Optional[StrictStr] = None,
|
|
128
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
129
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
130
|
+
) -> ApiResponse[CreateMarketInMultivariateEventCollectionResponse]:
|
|
131
|
+
"""Create Market In Multivariate Event Collection
|
|
132
|
+
|
|
133
|
+
Endpoint for looking up an individual market in a multivariate event collection. This endpoint must be hit at least once before trading or looking up a market.
|
|
134
|
+
|
|
135
|
+
:param collection_ticker: Collection ticker (required)
|
|
136
|
+
:type collection_ticker: str
|
|
137
|
+
:param create_market_in_multivariate_event_collection_request: (required)
|
|
138
|
+
:type create_market_in_multivariate_event_collection_request: CreateMarketInMultivariateEventCollectionRequest
|
|
139
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
140
|
+
number provided, it will be total request
|
|
141
|
+
timeout. It can also be a pair (tuple) of
|
|
142
|
+
(connection, read) timeouts.
|
|
143
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
144
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
145
|
+
request; this effectively ignores the
|
|
146
|
+
authentication in the spec for a single request.
|
|
147
|
+
:type _request_auth: dict, optional
|
|
148
|
+
:param _content_type: force content-type for the request.
|
|
149
|
+
:type _content_type: str, Optional
|
|
150
|
+
:param _headers: set to override the headers for a single
|
|
151
|
+
request; this effectively ignores the headers
|
|
152
|
+
in the spec for a single request.
|
|
153
|
+
:type _headers: dict, optional
|
|
154
|
+
:param _host_index: set to override the host_index for a single
|
|
155
|
+
request; this effectively ignores the host_index
|
|
156
|
+
in the spec for a single request.
|
|
157
|
+
:type _host_index: int, optional
|
|
158
|
+
:return: Returns the result object.
|
|
159
|
+
""" # noqa: E501
|
|
160
|
+
|
|
161
|
+
_param = self._create_market_in_multivariate_event_collection_serialize(
|
|
162
|
+
collection_ticker=collection_ticker,
|
|
163
|
+
create_market_in_multivariate_event_collection_request=create_market_in_multivariate_event_collection_request,
|
|
164
|
+
_request_auth=_request_auth,
|
|
165
|
+
_content_type=_content_type,
|
|
166
|
+
_headers=_headers,
|
|
167
|
+
_host_index=_host_index
|
|
168
|
+
)
|
|
169
|
+
|
|
170
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
171
|
+
'200': "CreateMarketInMultivariateEventCollectionResponse",
|
|
172
|
+
'400': "ErrorResponse",
|
|
173
|
+
'401': "ErrorResponse",
|
|
174
|
+
'500': "ErrorResponse",
|
|
175
|
+
}
|
|
176
|
+
response_data = await self.api_client.call_api(
|
|
177
|
+
*_param,
|
|
178
|
+
_request_timeout=_request_timeout
|
|
179
|
+
)
|
|
180
|
+
await response_data.read()
|
|
181
|
+
return self.api_client.response_deserialize(
|
|
182
|
+
response_data=response_data,
|
|
183
|
+
response_types_map=_response_types_map,
|
|
184
|
+
)
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
@validate_call
|
|
188
|
+
async def create_market_in_multivariate_event_collection_without_preload_content(
|
|
189
|
+
self,
|
|
190
|
+
collection_ticker: Annotated[StrictStr, Field(description="Collection ticker")],
|
|
191
|
+
create_market_in_multivariate_event_collection_request: CreateMarketInMultivariateEventCollectionRequest,
|
|
192
|
+
_request_timeout: Union[
|
|
193
|
+
None,
|
|
194
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
195
|
+
Tuple[
|
|
196
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
197
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
198
|
+
]
|
|
199
|
+
] = None,
|
|
200
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
201
|
+
_content_type: Optional[StrictStr] = None,
|
|
202
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
203
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
204
|
+
) -> RESTResponseType:
|
|
205
|
+
"""Create Market In Multivariate Event Collection
|
|
206
|
+
|
|
207
|
+
Endpoint for looking up an individual market in a multivariate event collection. This endpoint must be hit at least once before trading or looking up a market.
|
|
208
|
+
|
|
209
|
+
:param collection_ticker: Collection ticker (required)
|
|
210
|
+
:type collection_ticker: str
|
|
211
|
+
:param create_market_in_multivariate_event_collection_request: (required)
|
|
212
|
+
:type create_market_in_multivariate_event_collection_request: CreateMarketInMultivariateEventCollectionRequest
|
|
213
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
214
|
+
number provided, it will be total request
|
|
215
|
+
timeout. It can also be a pair (tuple) of
|
|
216
|
+
(connection, read) timeouts.
|
|
217
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
218
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
219
|
+
request; this effectively ignores the
|
|
220
|
+
authentication in the spec for a single request.
|
|
221
|
+
:type _request_auth: dict, optional
|
|
222
|
+
:param _content_type: force content-type for the request.
|
|
223
|
+
:type _content_type: str, Optional
|
|
224
|
+
:param _headers: set to override the headers for a single
|
|
225
|
+
request; this effectively ignores the headers
|
|
226
|
+
in the spec for a single request.
|
|
227
|
+
:type _headers: dict, optional
|
|
228
|
+
:param _host_index: set to override the host_index for a single
|
|
229
|
+
request; this effectively ignores the host_index
|
|
230
|
+
in the spec for a single request.
|
|
231
|
+
:type _host_index: int, optional
|
|
232
|
+
:return: Returns the result object.
|
|
233
|
+
""" # noqa: E501
|
|
234
|
+
|
|
235
|
+
_param = self._create_market_in_multivariate_event_collection_serialize(
|
|
236
|
+
collection_ticker=collection_ticker,
|
|
237
|
+
create_market_in_multivariate_event_collection_request=create_market_in_multivariate_event_collection_request,
|
|
238
|
+
_request_auth=_request_auth,
|
|
239
|
+
_content_type=_content_type,
|
|
240
|
+
_headers=_headers,
|
|
241
|
+
_host_index=_host_index
|
|
242
|
+
)
|
|
243
|
+
|
|
244
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
245
|
+
'200': "CreateMarketInMultivariateEventCollectionResponse",
|
|
246
|
+
'400': "ErrorResponse",
|
|
247
|
+
'401': "ErrorResponse",
|
|
248
|
+
'500': "ErrorResponse",
|
|
249
|
+
}
|
|
250
|
+
response_data = await self.api_client.call_api(
|
|
251
|
+
*_param,
|
|
252
|
+
_request_timeout=_request_timeout
|
|
253
|
+
)
|
|
254
|
+
return response_data.response
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
def _create_market_in_multivariate_event_collection_serialize(
|
|
258
|
+
self,
|
|
259
|
+
collection_ticker,
|
|
260
|
+
create_market_in_multivariate_event_collection_request,
|
|
261
|
+
_request_auth,
|
|
262
|
+
_content_type,
|
|
263
|
+
_headers,
|
|
264
|
+
_host_index,
|
|
265
|
+
) -> RequestSerialized:
|
|
266
|
+
|
|
267
|
+
_host = None
|
|
268
|
+
|
|
269
|
+
_collection_formats: Dict[str, str] = {
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
_path_params: Dict[str, str] = {}
|
|
273
|
+
_query_params: List[Tuple[str, str]] = []
|
|
274
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
275
|
+
_form_params: List[Tuple[str, str]] = []
|
|
276
|
+
_files: Dict[
|
|
277
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
278
|
+
] = {}
|
|
279
|
+
_body_params: Optional[bytes] = None
|
|
280
|
+
|
|
281
|
+
# process the path parameters
|
|
282
|
+
if collection_ticker is not None:
|
|
283
|
+
_path_params['collection_ticker'] = collection_ticker
|
|
284
|
+
# process the query parameters
|
|
285
|
+
# process the header parameters
|
|
286
|
+
# process the form parameters
|
|
287
|
+
# process the body parameter
|
|
288
|
+
if create_market_in_multivariate_event_collection_request is not None:
|
|
289
|
+
_body_params = create_market_in_multivariate_event_collection_request
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
# set the HTTP header `Accept`
|
|
293
|
+
if 'Accept' not in _header_params:
|
|
294
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
295
|
+
[
|
|
296
|
+
'application/json'
|
|
297
|
+
]
|
|
298
|
+
)
|
|
299
|
+
|
|
300
|
+
# set the HTTP header `Content-Type`
|
|
301
|
+
if _content_type:
|
|
302
|
+
_header_params['Content-Type'] = _content_type
|
|
303
|
+
else:
|
|
304
|
+
_default_content_type = (
|
|
305
|
+
self.api_client.select_header_content_type(
|
|
306
|
+
[
|
|
307
|
+
'application/json'
|
|
308
|
+
]
|
|
309
|
+
)
|
|
310
|
+
)
|
|
311
|
+
if _default_content_type is not None:
|
|
312
|
+
_header_params['Content-Type'] = _default_content_type
|
|
313
|
+
|
|
314
|
+
# authentication setting
|
|
315
|
+
_auth_settings: List[str] = [
|
|
316
|
+
'kalshiAccessSignature',
|
|
317
|
+
'kalshiAccessKey',
|
|
318
|
+
'kalshiAccessTimestamp'
|
|
319
|
+
]
|
|
320
|
+
|
|
321
|
+
return self.api_client.param_serialize(
|
|
322
|
+
method='POST',
|
|
323
|
+
resource_path='/multivariate_event_collections/{collection_ticker}',
|
|
324
|
+
path_params=_path_params,
|
|
325
|
+
query_params=_query_params,
|
|
326
|
+
header_params=_header_params,
|
|
327
|
+
body=_body_params,
|
|
328
|
+
post_params=_form_params,
|
|
329
|
+
files=_files,
|
|
330
|
+
auth_settings=_auth_settings,
|
|
331
|
+
collection_formats=_collection_formats,
|
|
332
|
+
_host=_host,
|
|
333
|
+
_request_auth=_request_auth
|
|
334
|
+
)
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
@validate_call
|
|
340
|
+
async def get_multivariate_event_collection(
|
|
341
|
+
self,
|
|
342
|
+
collection_ticker: StrictStr,
|
|
343
|
+
) -> GetMultivariateEventCollectionResponse:
|
|
344
|
+
"""Get Multivariate Event Collection
|
|
345
|
+
|
|
346
|
+
Endpoint for getting data about a multivariate event collection by its ticker.
|
|
347
|
+
|
|
348
|
+
:param collection_ticker: Collection ticker (required)
|
|
349
|
+
:type collection_ticker: str
|
|
350
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
351
|
+
number provided, it will be total request
|
|
352
|
+
timeout. It can also be a pair (tuple) of
|
|
353
|
+
(connection, read) timeouts.
|
|
354
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
355
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
356
|
+
request; this effectively ignores the
|
|
357
|
+
authentication in the spec for a single request.
|
|
358
|
+
:type _request_auth: dict, optional
|
|
359
|
+
:param _content_type: force content-type for the request.
|
|
360
|
+
:type _content_type: str, Optional
|
|
361
|
+
:param _headers: set to override the headers for a single
|
|
362
|
+
request; this effectively ignores the headers
|
|
363
|
+
in the spec for a single request.
|
|
364
|
+
:type _headers: dict, optional
|
|
365
|
+
:param _host_index: set to override the host_index for a single
|
|
366
|
+
request; this effectively ignores the host_index
|
|
367
|
+
in the spec for a single request.
|
|
368
|
+
:type _host_index: int, optional
|
|
369
|
+
:return: Returns the result object.
|
|
370
|
+
""" # noqa: E501
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
_param = self._get_multivariate_event_collection_serialize(
|
|
374
|
+
collection_ticker=collection_ticker,
|
|
375
|
+
_request_auth=None,
|
|
376
|
+
_content_type=None,
|
|
377
|
+
_headers=None,
|
|
378
|
+
_host_index=0
|
|
379
|
+
)
|
|
380
|
+
|
|
381
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
382
|
+
'200': "GetMultivariateEventCollectionResponse",
|
|
383
|
+
'400': "ErrorResponse",
|
|
384
|
+
'404': "ErrorResponse",
|
|
385
|
+
'500': "ErrorResponse",
|
|
386
|
+
}
|
|
387
|
+
response_data = await self.api_client.call_api(
|
|
388
|
+
*_param,
|
|
389
|
+
_request_timeout=None,
|
|
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
|
+
).data
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
@validate_call
|
|
399
|
+
async def get_multivariate_event_collection_with_http_info(
|
|
400
|
+
self,
|
|
401
|
+
collection_ticker: Annotated[StrictStr, Field(description="Collection ticker")],
|
|
402
|
+
_request_timeout: Union[
|
|
403
|
+
None,
|
|
404
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
405
|
+
Tuple[
|
|
406
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
407
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
408
|
+
]
|
|
409
|
+
] = None,
|
|
410
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
411
|
+
_content_type: Optional[StrictStr] = None,
|
|
412
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
413
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
414
|
+
) -> ApiResponse[GetMultivariateEventCollectionResponse]:
|
|
415
|
+
"""Get Multivariate Event Collection
|
|
416
|
+
|
|
417
|
+
Endpoint for getting data about a multivariate event collection by its ticker.
|
|
418
|
+
|
|
419
|
+
:param collection_ticker: Collection ticker (required)
|
|
420
|
+
:type collection_ticker: str
|
|
421
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
422
|
+
number provided, it will be total request
|
|
423
|
+
timeout. It can also be a pair (tuple) of
|
|
424
|
+
(connection, read) timeouts.
|
|
425
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
426
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
427
|
+
request; this effectively ignores the
|
|
428
|
+
authentication in the spec for a single request.
|
|
429
|
+
:type _request_auth: dict, optional
|
|
430
|
+
:param _content_type: force content-type for the request.
|
|
431
|
+
:type _content_type: str, Optional
|
|
432
|
+
:param _headers: set to override the headers for a single
|
|
433
|
+
request; this effectively ignores the headers
|
|
434
|
+
in the spec for a single request.
|
|
435
|
+
:type _headers: dict, optional
|
|
436
|
+
:param _host_index: set to override the host_index for a single
|
|
437
|
+
request; this effectively ignores the host_index
|
|
438
|
+
in the spec for a single request.
|
|
439
|
+
:type _host_index: int, optional
|
|
440
|
+
:return: Returns the result object.
|
|
441
|
+
""" # noqa: E501
|
|
442
|
+
|
|
443
|
+
_param = self._get_multivariate_event_collection_serialize(
|
|
444
|
+
collection_ticker=collection_ticker,
|
|
445
|
+
_request_auth=_request_auth,
|
|
446
|
+
_content_type=_content_type,
|
|
447
|
+
_headers=_headers,
|
|
448
|
+
_host_index=_host_index
|
|
449
|
+
)
|
|
450
|
+
|
|
451
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
452
|
+
'200': "GetMultivariateEventCollectionResponse",
|
|
453
|
+
'400': "ErrorResponse",
|
|
454
|
+
'404': "ErrorResponse",
|
|
455
|
+
'500': "ErrorResponse",
|
|
456
|
+
}
|
|
457
|
+
response_data = await self.api_client.call_api(
|
|
458
|
+
*_param,
|
|
459
|
+
_request_timeout=_request_timeout
|
|
460
|
+
)
|
|
461
|
+
await response_data.read()
|
|
462
|
+
return self.api_client.response_deserialize(
|
|
463
|
+
response_data=response_data,
|
|
464
|
+
response_types_map=_response_types_map,
|
|
465
|
+
)
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
@validate_call
|
|
469
|
+
async def get_multivariate_event_collection_without_preload_content(
|
|
470
|
+
self,
|
|
471
|
+
collection_ticker: Annotated[StrictStr, Field(description="Collection ticker")],
|
|
472
|
+
_request_timeout: Union[
|
|
473
|
+
None,
|
|
474
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
475
|
+
Tuple[
|
|
476
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
477
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
478
|
+
]
|
|
479
|
+
] = None,
|
|
480
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
481
|
+
_content_type: Optional[StrictStr] = None,
|
|
482
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
483
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
484
|
+
) -> RESTResponseType:
|
|
485
|
+
"""Get Multivariate Event Collection
|
|
486
|
+
|
|
487
|
+
Endpoint for getting data about a multivariate event collection by its ticker.
|
|
488
|
+
|
|
489
|
+
:param collection_ticker: Collection ticker (required)
|
|
490
|
+
:type collection_ticker: str
|
|
491
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
492
|
+
number provided, it will be total request
|
|
493
|
+
timeout. It can also be a pair (tuple) of
|
|
494
|
+
(connection, read) timeouts.
|
|
495
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
496
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
497
|
+
request; this effectively ignores the
|
|
498
|
+
authentication in the spec for a single request.
|
|
499
|
+
:type _request_auth: dict, optional
|
|
500
|
+
:param _content_type: force content-type for the request.
|
|
501
|
+
:type _content_type: str, Optional
|
|
502
|
+
:param _headers: set to override the headers for a single
|
|
503
|
+
request; this effectively ignores the headers
|
|
504
|
+
in the spec for a single request.
|
|
505
|
+
:type _headers: dict, optional
|
|
506
|
+
:param _host_index: set to override the host_index for a single
|
|
507
|
+
request; this effectively ignores the host_index
|
|
508
|
+
in the spec for a single request.
|
|
509
|
+
:type _host_index: int, optional
|
|
510
|
+
:return: Returns the result object.
|
|
511
|
+
""" # noqa: E501
|
|
512
|
+
|
|
513
|
+
_param = self._get_multivariate_event_collection_serialize(
|
|
514
|
+
collection_ticker=collection_ticker,
|
|
515
|
+
_request_auth=_request_auth,
|
|
516
|
+
_content_type=_content_type,
|
|
517
|
+
_headers=_headers,
|
|
518
|
+
_host_index=_host_index
|
|
519
|
+
)
|
|
520
|
+
|
|
521
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
522
|
+
'200': "GetMultivariateEventCollectionResponse",
|
|
523
|
+
'400': "ErrorResponse",
|
|
524
|
+
'404': "ErrorResponse",
|
|
525
|
+
'500': "ErrorResponse",
|
|
526
|
+
}
|
|
527
|
+
response_data = await self.api_client.call_api(
|
|
528
|
+
*_param,
|
|
529
|
+
_request_timeout=_request_timeout
|
|
530
|
+
)
|
|
531
|
+
return response_data.response
|
|
532
|
+
|
|
533
|
+
|
|
534
|
+
def _get_multivariate_event_collection_serialize(
|
|
535
|
+
self,
|
|
536
|
+
collection_ticker,
|
|
537
|
+
_request_auth,
|
|
538
|
+
_content_type,
|
|
539
|
+
_headers,
|
|
540
|
+
_host_index,
|
|
541
|
+
) -> RequestSerialized:
|
|
542
|
+
|
|
543
|
+
_host = None
|
|
544
|
+
|
|
545
|
+
_collection_formats: Dict[str, str] = {
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
_path_params: Dict[str, str] = {}
|
|
549
|
+
_query_params: List[Tuple[str, str]] = []
|
|
550
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
551
|
+
_form_params: List[Tuple[str, str]] = []
|
|
552
|
+
_files: Dict[
|
|
553
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
554
|
+
] = {}
|
|
555
|
+
_body_params: Optional[bytes] = None
|
|
556
|
+
|
|
557
|
+
# process the path parameters
|
|
558
|
+
if collection_ticker is not None:
|
|
559
|
+
_path_params['collection_ticker'] = collection_ticker
|
|
560
|
+
# process the query parameters
|
|
561
|
+
# process the header parameters
|
|
562
|
+
# process the form parameters
|
|
563
|
+
# process the body parameter
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
# set the HTTP header `Accept`
|
|
567
|
+
if 'Accept' not in _header_params:
|
|
568
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
569
|
+
[
|
|
570
|
+
'application/json'
|
|
571
|
+
]
|
|
572
|
+
)
|
|
573
|
+
|
|
574
|
+
|
|
575
|
+
# authentication setting
|
|
576
|
+
_auth_settings: List[str] = [
|
|
577
|
+
]
|
|
578
|
+
|
|
579
|
+
return self.api_client.param_serialize(
|
|
580
|
+
method='GET',
|
|
581
|
+
resource_path='/multivariate_event_collections/{collection_ticker}',
|
|
582
|
+
path_params=_path_params,
|
|
583
|
+
query_params=_query_params,
|
|
584
|
+
header_params=_header_params,
|
|
585
|
+
body=_body_params,
|
|
586
|
+
post_params=_form_params,
|
|
587
|
+
files=_files,
|
|
588
|
+
auth_settings=_auth_settings,
|
|
589
|
+
collection_formats=_collection_formats,
|
|
590
|
+
_host=_host,
|
|
591
|
+
_request_auth=_request_auth
|
|
592
|
+
)
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
|
|
596
|
+
|
|
597
|
+
@validate_call
|
|
598
|
+
async def get_multivariate_event_collection_lookup_history(
|
|
599
|
+
self,
|
|
600
|
+
collection_ticker: StrictStr,
|
|
601
|
+
lookback_seconds: Any,
|
|
602
|
+
) -> GetMultivariateEventCollectionLookupHistoryResponse:
|
|
603
|
+
"""Get Multivariate Event Collection Lookup History
|
|
604
|
+
|
|
605
|
+
Endpoint for retrieving which markets in an event collection were recently looked up.
|
|
606
|
+
|
|
607
|
+
:param collection_ticker: Collection ticker (required)
|
|
608
|
+
:type collection_ticker: str
|
|
609
|
+
:param lookback_seconds: Number of seconds to look back for lookup history. Must be one of 10, 60, 300, or 3600. (required)
|
|
610
|
+
:type lookback_seconds: int
|
|
611
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
612
|
+
number provided, it will be total request
|
|
613
|
+
timeout. It can also be a pair (tuple) of
|
|
614
|
+
(connection, read) timeouts.
|
|
615
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
616
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
617
|
+
request; this effectively ignores the
|
|
618
|
+
authentication in the spec for a single request.
|
|
619
|
+
:type _request_auth: dict, optional
|
|
620
|
+
:param _content_type: force content-type for the request.
|
|
621
|
+
:type _content_type: str, Optional
|
|
622
|
+
:param _headers: set to override the headers for a single
|
|
623
|
+
request; this effectively ignores the headers
|
|
624
|
+
in the spec for a single request.
|
|
625
|
+
:type _headers: dict, optional
|
|
626
|
+
:param _host_index: set to override the host_index for a single
|
|
627
|
+
request; this effectively ignores the host_index
|
|
628
|
+
in the spec for a single request.
|
|
629
|
+
:type _host_index: int, optional
|
|
630
|
+
:return: Returns the result object.
|
|
631
|
+
""" # noqa: E501
|
|
632
|
+
|
|
633
|
+
|
|
634
|
+
_param = self._get_multivariate_event_collection_lookup_history_serialize(
|
|
635
|
+
collection_ticker=collection_ticker,
|
|
636
|
+
lookback_seconds=lookback_seconds,
|
|
637
|
+
_request_auth=None,
|
|
638
|
+
_content_type=None,
|
|
639
|
+
_headers=None,
|
|
640
|
+
_host_index=0
|
|
641
|
+
)
|
|
642
|
+
|
|
643
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
644
|
+
'200': "GetMultivariateEventCollectionLookupHistoryResponse",
|
|
645
|
+
'400': "ErrorResponse",
|
|
646
|
+
'500': "ErrorResponse",
|
|
647
|
+
}
|
|
648
|
+
response_data = await self.api_client.call_api(
|
|
649
|
+
*_param,
|
|
650
|
+
_request_timeout=None,
|
|
651
|
+
)
|
|
652
|
+
await response_data.read()
|
|
653
|
+
return self.api_client.response_deserialize(
|
|
654
|
+
response_data=response_data,
|
|
655
|
+
response_types_map=_response_types_map,
|
|
656
|
+
).data
|
|
657
|
+
|
|
658
|
+
|
|
659
|
+
@validate_call
|
|
660
|
+
async def get_multivariate_event_collection_lookup_history_with_http_info(
|
|
661
|
+
self,
|
|
662
|
+
collection_ticker: Annotated[StrictStr, Field(description="Collection ticker")],
|
|
663
|
+
lookback_seconds: Annotated[StrictInt, Field(description="Number of seconds to look back for lookup history. Must be one of 10, 60, 300, or 3600.")],
|
|
664
|
+
_request_timeout: Union[
|
|
665
|
+
None,
|
|
666
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
667
|
+
Tuple[
|
|
668
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
669
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
670
|
+
]
|
|
671
|
+
] = None,
|
|
672
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
673
|
+
_content_type: Optional[StrictStr] = None,
|
|
674
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
675
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
676
|
+
) -> ApiResponse[GetMultivariateEventCollectionLookupHistoryResponse]:
|
|
677
|
+
"""Get Multivariate Event Collection Lookup History
|
|
678
|
+
|
|
679
|
+
Endpoint for retrieving which markets in an event collection were recently looked up.
|
|
680
|
+
|
|
681
|
+
:param collection_ticker: Collection ticker (required)
|
|
682
|
+
:type collection_ticker: str
|
|
683
|
+
:param lookback_seconds: Number of seconds to look back for lookup history. Must be one of 10, 60, 300, or 3600. (required)
|
|
684
|
+
:type lookback_seconds: int
|
|
685
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
686
|
+
number provided, it will be total request
|
|
687
|
+
timeout. It can also be a pair (tuple) of
|
|
688
|
+
(connection, read) timeouts.
|
|
689
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
690
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
691
|
+
request; this effectively ignores the
|
|
692
|
+
authentication in the spec for a single request.
|
|
693
|
+
:type _request_auth: dict, optional
|
|
694
|
+
:param _content_type: force content-type for the request.
|
|
695
|
+
:type _content_type: str, Optional
|
|
696
|
+
:param _headers: set to override the headers for a single
|
|
697
|
+
request; this effectively ignores the headers
|
|
698
|
+
in the spec for a single request.
|
|
699
|
+
:type _headers: dict, optional
|
|
700
|
+
:param _host_index: set to override the host_index for a single
|
|
701
|
+
request; this effectively ignores the host_index
|
|
702
|
+
in the spec for a single request.
|
|
703
|
+
:type _host_index: int, optional
|
|
704
|
+
:return: Returns the result object.
|
|
705
|
+
""" # noqa: E501
|
|
706
|
+
|
|
707
|
+
_param = self._get_multivariate_event_collection_lookup_history_serialize(
|
|
708
|
+
collection_ticker=collection_ticker,
|
|
709
|
+
lookback_seconds=lookback_seconds,
|
|
710
|
+
_request_auth=_request_auth,
|
|
711
|
+
_content_type=_content_type,
|
|
712
|
+
_headers=_headers,
|
|
713
|
+
_host_index=_host_index
|
|
714
|
+
)
|
|
715
|
+
|
|
716
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
717
|
+
'200': "GetMultivariateEventCollectionLookupHistoryResponse",
|
|
718
|
+
'400': "ErrorResponse",
|
|
719
|
+
'500': "ErrorResponse",
|
|
720
|
+
}
|
|
721
|
+
response_data = await self.api_client.call_api(
|
|
722
|
+
*_param,
|
|
723
|
+
_request_timeout=_request_timeout
|
|
724
|
+
)
|
|
725
|
+
await response_data.read()
|
|
726
|
+
return self.api_client.response_deserialize(
|
|
727
|
+
response_data=response_data,
|
|
728
|
+
response_types_map=_response_types_map,
|
|
729
|
+
)
|
|
730
|
+
|
|
731
|
+
|
|
732
|
+
@validate_call
|
|
733
|
+
async def get_multivariate_event_collection_lookup_history_without_preload_content(
|
|
734
|
+
self,
|
|
735
|
+
collection_ticker: Annotated[StrictStr, Field(description="Collection ticker")],
|
|
736
|
+
lookback_seconds: Annotated[StrictInt, Field(description="Number of seconds to look back for lookup history. Must be one of 10, 60, 300, or 3600.")],
|
|
737
|
+
_request_timeout: Union[
|
|
738
|
+
None,
|
|
739
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
740
|
+
Tuple[
|
|
741
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
742
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
743
|
+
]
|
|
744
|
+
] = None,
|
|
745
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
746
|
+
_content_type: Optional[StrictStr] = None,
|
|
747
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
748
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
749
|
+
) -> RESTResponseType:
|
|
750
|
+
"""Get Multivariate Event Collection Lookup History
|
|
751
|
+
|
|
752
|
+
Endpoint for retrieving which markets in an event collection were recently looked up.
|
|
753
|
+
|
|
754
|
+
:param collection_ticker: Collection ticker (required)
|
|
755
|
+
:type collection_ticker: str
|
|
756
|
+
:param lookback_seconds: Number of seconds to look back for lookup history. Must be one of 10, 60, 300, or 3600. (required)
|
|
757
|
+
:type lookback_seconds: int
|
|
758
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
759
|
+
number provided, it will be total request
|
|
760
|
+
timeout. It can also be a pair (tuple) of
|
|
761
|
+
(connection, read) timeouts.
|
|
762
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
763
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
764
|
+
request; this effectively ignores the
|
|
765
|
+
authentication in the spec for a single request.
|
|
766
|
+
:type _request_auth: dict, optional
|
|
767
|
+
:param _content_type: force content-type for the request.
|
|
768
|
+
:type _content_type: str, Optional
|
|
769
|
+
:param _headers: set to override the headers for a single
|
|
770
|
+
request; this effectively ignores the headers
|
|
771
|
+
in the spec for a single request.
|
|
772
|
+
:type _headers: dict, optional
|
|
773
|
+
:param _host_index: set to override the host_index for a single
|
|
774
|
+
request; this effectively ignores the host_index
|
|
775
|
+
in the spec for a single request.
|
|
776
|
+
:type _host_index: int, optional
|
|
777
|
+
:return: Returns the result object.
|
|
778
|
+
""" # noqa: E501
|
|
779
|
+
|
|
780
|
+
_param = self._get_multivariate_event_collection_lookup_history_serialize(
|
|
781
|
+
collection_ticker=collection_ticker,
|
|
782
|
+
lookback_seconds=lookback_seconds,
|
|
783
|
+
_request_auth=_request_auth,
|
|
784
|
+
_content_type=_content_type,
|
|
785
|
+
_headers=_headers,
|
|
786
|
+
_host_index=_host_index
|
|
787
|
+
)
|
|
788
|
+
|
|
789
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
790
|
+
'200': "GetMultivariateEventCollectionLookupHistoryResponse",
|
|
791
|
+
'400': "ErrorResponse",
|
|
792
|
+
'500': "ErrorResponse",
|
|
793
|
+
}
|
|
794
|
+
response_data = await self.api_client.call_api(
|
|
795
|
+
*_param,
|
|
796
|
+
_request_timeout=_request_timeout
|
|
797
|
+
)
|
|
798
|
+
return response_data.response
|
|
799
|
+
|
|
800
|
+
|
|
801
|
+
def _get_multivariate_event_collection_lookup_history_serialize(
|
|
802
|
+
self,
|
|
803
|
+
collection_ticker,
|
|
804
|
+
lookback_seconds,
|
|
805
|
+
_request_auth,
|
|
806
|
+
_content_type,
|
|
807
|
+
_headers,
|
|
808
|
+
_host_index,
|
|
809
|
+
) -> RequestSerialized:
|
|
810
|
+
|
|
811
|
+
_host = None
|
|
812
|
+
|
|
813
|
+
_collection_formats: Dict[str, str] = {
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
_path_params: Dict[str, str] = {}
|
|
817
|
+
_query_params: List[Tuple[str, str]] = []
|
|
818
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
819
|
+
_form_params: List[Tuple[str, str]] = []
|
|
820
|
+
_files: Dict[
|
|
821
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
822
|
+
] = {}
|
|
823
|
+
_body_params: Optional[bytes] = None
|
|
824
|
+
|
|
825
|
+
# process the path parameters
|
|
826
|
+
if collection_ticker is not None:
|
|
827
|
+
_path_params['collection_ticker'] = collection_ticker
|
|
828
|
+
# process the query parameters
|
|
829
|
+
if lookback_seconds is not None:
|
|
830
|
+
|
|
831
|
+
_query_params.append(('lookback_seconds', lookback_seconds))
|
|
832
|
+
|
|
833
|
+
# process the header parameters
|
|
834
|
+
# process the form parameters
|
|
835
|
+
# process the body parameter
|
|
836
|
+
|
|
837
|
+
|
|
838
|
+
# set the HTTP header `Accept`
|
|
839
|
+
if 'Accept' not in _header_params:
|
|
840
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
841
|
+
[
|
|
842
|
+
'application/json'
|
|
843
|
+
]
|
|
844
|
+
)
|
|
845
|
+
|
|
846
|
+
|
|
847
|
+
# authentication setting
|
|
848
|
+
_auth_settings: List[str] = [
|
|
849
|
+
]
|
|
850
|
+
|
|
851
|
+
return self.api_client.param_serialize(
|
|
852
|
+
method='GET',
|
|
853
|
+
resource_path='/multivariate_event_collections/{collection_ticker}/lookup',
|
|
854
|
+
path_params=_path_params,
|
|
855
|
+
query_params=_query_params,
|
|
856
|
+
header_params=_header_params,
|
|
857
|
+
body=_body_params,
|
|
858
|
+
post_params=_form_params,
|
|
859
|
+
files=_files,
|
|
860
|
+
auth_settings=_auth_settings,
|
|
861
|
+
collection_formats=_collection_formats,
|
|
862
|
+
_host=_host,
|
|
863
|
+
_request_auth=_request_auth
|
|
864
|
+
)
|
|
865
|
+
|
|
866
|
+
|
|
867
|
+
|
|
868
|
+
|
|
869
|
+
@validate_call
|
|
870
|
+
async def get_multivariate_event_collections(
|
|
871
|
+
self,
|
|
872
|
+
status: Any = None,
|
|
873
|
+
associated_event_ticker: Any = None,
|
|
874
|
+
series_ticker: Any = None,
|
|
875
|
+
limit: Any = None,
|
|
876
|
+
cursor: Any = None,
|
|
877
|
+
) -> GetMultivariateEventCollectionsResponse:
|
|
878
|
+
"""Get Multivariate Event Collections
|
|
879
|
+
|
|
880
|
+
Endpoint for getting data about multivariate event collections.
|
|
881
|
+
|
|
882
|
+
:param status: Only return collections of a certain status. Can be unopened, open, or closed.
|
|
883
|
+
:type status: str
|
|
884
|
+
:param associated_event_ticker: Only return collections associated with a particular event ticker.
|
|
885
|
+
:type associated_event_ticker: str
|
|
886
|
+
:param series_ticker: Only return collections with a particular series ticker.
|
|
887
|
+
:type series_ticker: str
|
|
888
|
+
:param limit: Specify the maximum number of results.
|
|
889
|
+
:type limit: int
|
|
890
|
+
:param cursor: The Cursor represents a pointer to the next page of records in the pagination. This optional parameter, when filled, should be filled with the cursor string returned in a previous request to this end-point.
|
|
891
|
+
:type cursor: str
|
|
892
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
893
|
+
number provided, it will be total request
|
|
894
|
+
timeout. It can also be a pair (tuple) of
|
|
895
|
+
(connection, read) timeouts.
|
|
896
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
897
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
898
|
+
request; this effectively ignores the
|
|
899
|
+
authentication in the spec for a single request.
|
|
900
|
+
:type _request_auth: dict, optional
|
|
901
|
+
:param _content_type: force content-type for the request.
|
|
902
|
+
:type _content_type: str, Optional
|
|
903
|
+
:param _headers: set to override the headers for a single
|
|
904
|
+
request; this effectively ignores the headers
|
|
905
|
+
in the spec for a single request.
|
|
906
|
+
:type _headers: dict, optional
|
|
907
|
+
:param _host_index: set to override the host_index for a single
|
|
908
|
+
request; this effectively ignores the host_index
|
|
909
|
+
in the spec for a single request.
|
|
910
|
+
:type _host_index: int, optional
|
|
911
|
+
:return: Returns the result object.
|
|
912
|
+
""" # noqa: E501
|
|
913
|
+
|
|
914
|
+
|
|
915
|
+
_param = self._get_multivariate_event_collections_serialize(
|
|
916
|
+
status=status,
|
|
917
|
+
associated_event_ticker=associated_event_ticker,
|
|
918
|
+
series_ticker=series_ticker,
|
|
919
|
+
limit=limit,
|
|
920
|
+
cursor=cursor,
|
|
921
|
+
_request_auth=None,
|
|
922
|
+
_content_type=None,
|
|
923
|
+
_headers=None,
|
|
924
|
+
_host_index=0
|
|
925
|
+
)
|
|
926
|
+
|
|
927
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
928
|
+
'200': "GetMultivariateEventCollectionsResponse",
|
|
929
|
+
'400': "ErrorResponse",
|
|
930
|
+
'500': "ErrorResponse",
|
|
931
|
+
}
|
|
932
|
+
response_data = await self.api_client.call_api(
|
|
933
|
+
*_param,
|
|
934
|
+
_request_timeout=None,
|
|
935
|
+
)
|
|
936
|
+
await response_data.read()
|
|
937
|
+
return self.api_client.response_deserialize(
|
|
938
|
+
response_data=response_data,
|
|
939
|
+
response_types_map=_response_types_map,
|
|
940
|
+
).data
|
|
941
|
+
|
|
942
|
+
|
|
943
|
+
@validate_call
|
|
944
|
+
async def get_multivariate_event_collections_with_http_info(
|
|
945
|
+
self,
|
|
946
|
+
status: Annotated[Optional[StrictStr], Field(description="Only return collections of a certain status. Can be unopened, open, or closed.")] = None,
|
|
947
|
+
associated_event_ticker: Annotated[Optional[StrictStr], Field(description="Only return collections associated with a particular event ticker.")] = None,
|
|
948
|
+
series_ticker: Annotated[Optional[StrictStr], Field(description="Only return collections with a particular series ticker.")] = None,
|
|
949
|
+
limit: Annotated[Optional[Annotated[int, Field(le=200, strict=True, ge=1)]], Field(description="Specify the maximum number of results.")] = None,
|
|
950
|
+
cursor: Annotated[Optional[StrictStr], Field(description="The Cursor represents a pointer to the next page of records in the pagination. This optional parameter, when filled, should be filled with the cursor string returned in a previous request to this end-point.")] = None,
|
|
951
|
+
_request_timeout: Union[
|
|
952
|
+
None,
|
|
953
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
954
|
+
Tuple[
|
|
955
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
956
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
957
|
+
]
|
|
958
|
+
] = None,
|
|
959
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
960
|
+
_content_type: Optional[StrictStr] = None,
|
|
961
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
962
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
963
|
+
) -> ApiResponse[GetMultivariateEventCollectionsResponse]:
|
|
964
|
+
"""Get Multivariate Event Collections
|
|
965
|
+
|
|
966
|
+
Endpoint for getting data about multivariate event collections.
|
|
967
|
+
|
|
968
|
+
:param status: Only return collections of a certain status. Can be unopened, open, or closed.
|
|
969
|
+
:type status: str
|
|
970
|
+
:param associated_event_ticker: Only return collections associated with a particular event ticker.
|
|
971
|
+
:type associated_event_ticker: str
|
|
972
|
+
:param series_ticker: Only return collections with a particular series ticker.
|
|
973
|
+
:type series_ticker: str
|
|
974
|
+
:param limit: Specify the maximum number of results.
|
|
975
|
+
:type limit: int
|
|
976
|
+
:param cursor: The Cursor represents a pointer to the next page of records in the pagination. This optional parameter, when filled, should be filled with the cursor string returned in a previous request to this end-point.
|
|
977
|
+
:type cursor: str
|
|
978
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
979
|
+
number provided, it will be total request
|
|
980
|
+
timeout. It can also be a pair (tuple) of
|
|
981
|
+
(connection, read) timeouts.
|
|
982
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
983
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
984
|
+
request; this effectively ignores the
|
|
985
|
+
authentication in the spec for a single request.
|
|
986
|
+
:type _request_auth: dict, optional
|
|
987
|
+
:param _content_type: force content-type for the request.
|
|
988
|
+
:type _content_type: str, Optional
|
|
989
|
+
:param _headers: set to override the headers for a single
|
|
990
|
+
request; this effectively ignores the headers
|
|
991
|
+
in the spec for a single request.
|
|
992
|
+
:type _headers: dict, optional
|
|
993
|
+
:param _host_index: set to override the host_index for a single
|
|
994
|
+
request; this effectively ignores the host_index
|
|
995
|
+
in the spec for a single request.
|
|
996
|
+
:type _host_index: int, optional
|
|
997
|
+
:return: Returns the result object.
|
|
998
|
+
""" # noqa: E501
|
|
999
|
+
|
|
1000
|
+
_param = self._get_multivariate_event_collections_serialize(
|
|
1001
|
+
status=status,
|
|
1002
|
+
associated_event_ticker=associated_event_ticker,
|
|
1003
|
+
series_ticker=series_ticker,
|
|
1004
|
+
limit=limit,
|
|
1005
|
+
cursor=cursor,
|
|
1006
|
+
_request_auth=_request_auth,
|
|
1007
|
+
_content_type=_content_type,
|
|
1008
|
+
_headers=_headers,
|
|
1009
|
+
_host_index=_host_index
|
|
1010
|
+
)
|
|
1011
|
+
|
|
1012
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1013
|
+
'200': "GetMultivariateEventCollectionsResponse",
|
|
1014
|
+
'400': "ErrorResponse",
|
|
1015
|
+
'500': "ErrorResponse",
|
|
1016
|
+
}
|
|
1017
|
+
response_data = await self.api_client.call_api(
|
|
1018
|
+
*_param,
|
|
1019
|
+
_request_timeout=_request_timeout
|
|
1020
|
+
)
|
|
1021
|
+
await response_data.read()
|
|
1022
|
+
return self.api_client.response_deserialize(
|
|
1023
|
+
response_data=response_data,
|
|
1024
|
+
response_types_map=_response_types_map,
|
|
1025
|
+
)
|
|
1026
|
+
|
|
1027
|
+
|
|
1028
|
+
@validate_call
|
|
1029
|
+
async def get_multivariate_event_collections_without_preload_content(
|
|
1030
|
+
self,
|
|
1031
|
+
status: Annotated[Optional[StrictStr], Field(description="Only return collections of a certain status. Can be unopened, open, or closed.")] = None,
|
|
1032
|
+
associated_event_ticker: Annotated[Optional[StrictStr], Field(description="Only return collections associated with a particular event ticker.")] = None,
|
|
1033
|
+
series_ticker: Annotated[Optional[StrictStr], Field(description="Only return collections with a particular series ticker.")] = None,
|
|
1034
|
+
limit: Annotated[Optional[Annotated[int, Field(le=200, strict=True, ge=1)]], Field(description="Specify the maximum number of results.")] = None,
|
|
1035
|
+
cursor: Annotated[Optional[StrictStr], Field(description="The Cursor represents a pointer to the next page of records in the pagination. This optional parameter, when filled, should be filled with the cursor string returned in a previous request to this end-point.")] = None,
|
|
1036
|
+
_request_timeout: Union[
|
|
1037
|
+
None,
|
|
1038
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1039
|
+
Tuple[
|
|
1040
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1041
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1042
|
+
]
|
|
1043
|
+
] = None,
|
|
1044
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1045
|
+
_content_type: Optional[StrictStr] = None,
|
|
1046
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1047
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1048
|
+
) -> RESTResponseType:
|
|
1049
|
+
"""Get Multivariate Event Collections
|
|
1050
|
+
|
|
1051
|
+
Endpoint for getting data about multivariate event collections.
|
|
1052
|
+
|
|
1053
|
+
:param status: Only return collections of a certain status. Can be unopened, open, or closed.
|
|
1054
|
+
:type status: str
|
|
1055
|
+
:param associated_event_ticker: Only return collections associated with a particular event ticker.
|
|
1056
|
+
:type associated_event_ticker: str
|
|
1057
|
+
:param series_ticker: Only return collections with a particular series ticker.
|
|
1058
|
+
:type series_ticker: str
|
|
1059
|
+
:param limit: Specify the maximum number of results.
|
|
1060
|
+
:type limit: int
|
|
1061
|
+
:param cursor: The Cursor represents a pointer to the next page of records in the pagination. This optional parameter, when filled, should be filled with the cursor string returned in a previous request to this end-point.
|
|
1062
|
+
:type cursor: str
|
|
1063
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1064
|
+
number provided, it will be total request
|
|
1065
|
+
timeout. It can also be a pair (tuple) of
|
|
1066
|
+
(connection, read) timeouts.
|
|
1067
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1068
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1069
|
+
request; this effectively ignores the
|
|
1070
|
+
authentication in the spec for a single request.
|
|
1071
|
+
:type _request_auth: dict, optional
|
|
1072
|
+
:param _content_type: force content-type for the request.
|
|
1073
|
+
:type _content_type: str, Optional
|
|
1074
|
+
:param _headers: set to override the headers for a single
|
|
1075
|
+
request; this effectively ignores the headers
|
|
1076
|
+
in the spec for a single request.
|
|
1077
|
+
:type _headers: dict, optional
|
|
1078
|
+
:param _host_index: set to override the host_index for a single
|
|
1079
|
+
request; this effectively ignores the host_index
|
|
1080
|
+
in the spec for a single request.
|
|
1081
|
+
:type _host_index: int, optional
|
|
1082
|
+
:return: Returns the result object.
|
|
1083
|
+
""" # noqa: E501
|
|
1084
|
+
|
|
1085
|
+
_param = self._get_multivariate_event_collections_serialize(
|
|
1086
|
+
status=status,
|
|
1087
|
+
associated_event_ticker=associated_event_ticker,
|
|
1088
|
+
series_ticker=series_ticker,
|
|
1089
|
+
limit=limit,
|
|
1090
|
+
cursor=cursor,
|
|
1091
|
+
_request_auth=_request_auth,
|
|
1092
|
+
_content_type=_content_type,
|
|
1093
|
+
_headers=_headers,
|
|
1094
|
+
_host_index=_host_index
|
|
1095
|
+
)
|
|
1096
|
+
|
|
1097
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1098
|
+
'200': "GetMultivariateEventCollectionsResponse",
|
|
1099
|
+
'400': "ErrorResponse",
|
|
1100
|
+
'500': "ErrorResponse",
|
|
1101
|
+
}
|
|
1102
|
+
response_data = await self.api_client.call_api(
|
|
1103
|
+
*_param,
|
|
1104
|
+
_request_timeout=_request_timeout
|
|
1105
|
+
)
|
|
1106
|
+
return response_data.response
|
|
1107
|
+
|
|
1108
|
+
|
|
1109
|
+
def _get_multivariate_event_collections_serialize(
|
|
1110
|
+
self,
|
|
1111
|
+
status,
|
|
1112
|
+
associated_event_ticker,
|
|
1113
|
+
series_ticker,
|
|
1114
|
+
limit,
|
|
1115
|
+
cursor,
|
|
1116
|
+
_request_auth,
|
|
1117
|
+
_content_type,
|
|
1118
|
+
_headers,
|
|
1119
|
+
_host_index,
|
|
1120
|
+
) -> RequestSerialized:
|
|
1121
|
+
|
|
1122
|
+
_host = None
|
|
1123
|
+
|
|
1124
|
+
_collection_formats: Dict[str, str] = {
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
_path_params: Dict[str, str] = {}
|
|
1128
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1129
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1130
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1131
|
+
_files: Dict[
|
|
1132
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1133
|
+
] = {}
|
|
1134
|
+
_body_params: Optional[bytes] = None
|
|
1135
|
+
|
|
1136
|
+
# process the path parameters
|
|
1137
|
+
# process the query parameters
|
|
1138
|
+
if status is not None:
|
|
1139
|
+
|
|
1140
|
+
_query_params.append(('status', status))
|
|
1141
|
+
|
|
1142
|
+
if associated_event_ticker is not None:
|
|
1143
|
+
|
|
1144
|
+
_query_params.append(('associated_event_ticker', associated_event_ticker))
|
|
1145
|
+
|
|
1146
|
+
if series_ticker is not None:
|
|
1147
|
+
|
|
1148
|
+
_query_params.append(('series_ticker', series_ticker))
|
|
1149
|
+
|
|
1150
|
+
if limit is not None:
|
|
1151
|
+
|
|
1152
|
+
_query_params.append(('limit', limit))
|
|
1153
|
+
|
|
1154
|
+
if cursor is not None:
|
|
1155
|
+
|
|
1156
|
+
_query_params.append(('cursor', cursor))
|
|
1157
|
+
|
|
1158
|
+
# process the header parameters
|
|
1159
|
+
# process the form parameters
|
|
1160
|
+
# process the body parameter
|
|
1161
|
+
|
|
1162
|
+
|
|
1163
|
+
# set the HTTP header `Accept`
|
|
1164
|
+
if 'Accept' not in _header_params:
|
|
1165
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1166
|
+
[
|
|
1167
|
+
'application/json'
|
|
1168
|
+
]
|
|
1169
|
+
)
|
|
1170
|
+
|
|
1171
|
+
|
|
1172
|
+
# authentication setting
|
|
1173
|
+
_auth_settings: List[str] = [
|
|
1174
|
+
]
|
|
1175
|
+
|
|
1176
|
+
return self.api_client.param_serialize(
|
|
1177
|
+
method='GET',
|
|
1178
|
+
resource_path='/multivariate_event_collections',
|
|
1179
|
+
path_params=_path_params,
|
|
1180
|
+
query_params=_query_params,
|
|
1181
|
+
header_params=_header_params,
|
|
1182
|
+
body=_body_params,
|
|
1183
|
+
post_params=_form_params,
|
|
1184
|
+
files=_files,
|
|
1185
|
+
auth_settings=_auth_settings,
|
|
1186
|
+
collection_formats=_collection_formats,
|
|
1187
|
+
_host=_host,
|
|
1188
|
+
_request_auth=_request_auth
|
|
1189
|
+
)
|
|
1190
|
+
|
|
1191
|
+
|
|
1192
|
+
|
|
1193
|
+
|
|
1194
|
+
@validate_call
|
|
1195
|
+
async def lookup_tickers_for_market_in_multivariate_event_collection(
|
|
1196
|
+
self,
|
|
1197
|
+
collection_ticker: StrictStr,
|
|
1198
|
+
# Request body parameters as keyword arguments
|
|
1199
|
+
**kwargs: Any,
|
|
1200
|
+
) -> LookupTickersForMarketInMultivariateEventCollectionResponse:
|
|
1201
|
+
"""Lookup Tickers For Market In Multivariate Event Collection
|
|
1202
|
+
|
|
1203
|
+
Endpoint for looking up an individual market in a multivariate event collection. If CreateMarketInMultivariateEventCollection has never been hit with that variable combination before, this will return a 404.
|
|
1204
|
+
|
|
1205
|
+
:param collection_ticker: Collection ticker (required)
|
|
1206
|
+
:type collection_ticker: str
|
|
1207
|
+
:param lookup_tickers_for_market_in_multivariate_event_collection_request: (required)
|
|
1208
|
+
:type lookup_tickers_for_market_in_multivariate_event_collection_request: LookupTickersForMarketInMultivariateEventCollectionRequest
|
|
1209
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1210
|
+
number provided, it will be total request
|
|
1211
|
+
timeout. It can also be a pair (tuple) of
|
|
1212
|
+
(connection, read) timeouts.
|
|
1213
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1214
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1215
|
+
request; this effectively ignores the
|
|
1216
|
+
authentication in the spec for a single request.
|
|
1217
|
+
:type _request_auth: dict, optional
|
|
1218
|
+
:param _content_type: force content-type for the request.
|
|
1219
|
+
:type _content_type: str, Optional
|
|
1220
|
+
:param _headers: set to override the headers for a single
|
|
1221
|
+
request; this effectively ignores the headers
|
|
1222
|
+
in the spec for a single request.
|
|
1223
|
+
:type _headers: dict, optional
|
|
1224
|
+
:param _host_index: set to override the host_index for a single
|
|
1225
|
+
request; this effectively ignores the host_index
|
|
1226
|
+
in the spec for a single request.
|
|
1227
|
+
:type _host_index: int, optional
|
|
1228
|
+
:return: Returns the result object.
|
|
1229
|
+
""" # noqa: E501
|
|
1230
|
+
|
|
1231
|
+
# Create request object from kwargs
|
|
1232
|
+
lookup_tickers_for_market_in_multivariate_event_collection_request = LookupTickersForMarketInMultivariateEventCollectionRequest(**kwargs) if kwargs else None
|
|
1233
|
+
|
|
1234
|
+
_param = self._lookup_tickers_for_market_in_multivariate_event_collection_serialize(
|
|
1235
|
+
collection_ticker=collection_ticker,
|
|
1236
|
+
lookup_tickers_for_market_in_multivariate_event_collection_request=lookup_tickers_for_market_in_multivariate_event_collection_request,
|
|
1237
|
+
_request_auth=kwargs.get('_request_auth'),
|
|
1238
|
+
_content_type=kwargs.get('_content_type'),
|
|
1239
|
+
_headers=kwargs.get('_headers'),
|
|
1240
|
+
_host_index=kwargs.get('_host_index', 0)
|
|
1241
|
+
)
|
|
1242
|
+
|
|
1243
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1244
|
+
'200': "LookupTickersForMarketInMultivariateEventCollectionResponse",
|
|
1245
|
+
'400': "ErrorResponse",
|
|
1246
|
+
'401': "ErrorResponse",
|
|
1247
|
+
'404': "ErrorResponse",
|
|
1248
|
+
'500': "ErrorResponse",
|
|
1249
|
+
}
|
|
1250
|
+
response_data = await self.api_client.call_api(
|
|
1251
|
+
*_param,
|
|
1252
|
+
_request_timeout=kwargs.get('_request_timeout'),
|
|
1253
|
+
)
|
|
1254
|
+
await response_data.read()
|
|
1255
|
+
return self.api_client.response_deserialize(
|
|
1256
|
+
response_data=response_data,
|
|
1257
|
+
response_types_map=_response_types_map,
|
|
1258
|
+
).data
|
|
1259
|
+
|
|
1260
|
+
|
|
1261
|
+
@validate_call
|
|
1262
|
+
async def lookup_tickers_for_market_in_multivariate_event_collection_with_http_info(
|
|
1263
|
+
self,
|
|
1264
|
+
collection_ticker: Annotated[StrictStr, Field(description="Collection ticker")],
|
|
1265
|
+
lookup_tickers_for_market_in_multivariate_event_collection_request: LookupTickersForMarketInMultivariateEventCollectionRequest,
|
|
1266
|
+
_request_timeout: Union[
|
|
1267
|
+
None,
|
|
1268
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1269
|
+
Tuple[
|
|
1270
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1271
|
+
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[LookupTickersForMarketInMultivariateEventCollectionResponse]:
|
|
1279
|
+
"""Lookup Tickers For Market In Multivariate Event Collection
|
|
1280
|
+
|
|
1281
|
+
Endpoint for looking up an individual market in a multivariate event collection. If CreateMarketInMultivariateEventCollection has never been hit with that variable combination before, this will return a 404.
|
|
1282
|
+
|
|
1283
|
+
:param collection_ticker: Collection ticker (required)
|
|
1284
|
+
:type collection_ticker: str
|
|
1285
|
+
:param lookup_tickers_for_market_in_multivariate_event_collection_request: (required)
|
|
1286
|
+
:type lookup_tickers_for_market_in_multivariate_event_collection_request: LookupTickersForMarketInMultivariateEventCollectionRequest
|
|
1287
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1288
|
+
number provided, it will be total request
|
|
1289
|
+
timeout. It can also be a pair (tuple) of
|
|
1290
|
+
(connection, read) timeouts.
|
|
1291
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1292
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1293
|
+
request; this effectively ignores the
|
|
1294
|
+
authentication in the spec for a single request.
|
|
1295
|
+
:type _request_auth: dict, optional
|
|
1296
|
+
:param _content_type: force content-type for the request.
|
|
1297
|
+
:type _content_type: str, Optional
|
|
1298
|
+
:param _headers: set to override the headers for a single
|
|
1299
|
+
request; this effectively ignores the headers
|
|
1300
|
+
in the spec for a single request.
|
|
1301
|
+
:type _headers: dict, optional
|
|
1302
|
+
:param _host_index: set to override the host_index for a single
|
|
1303
|
+
request; this effectively ignores the host_index
|
|
1304
|
+
in the spec for a single request.
|
|
1305
|
+
:type _host_index: int, optional
|
|
1306
|
+
:return: Returns the result object.
|
|
1307
|
+
""" # noqa: E501
|
|
1308
|
+
|
|
1309
|
+
_param = self._lookup_tickers_for_market_in_multivariate_event_collection_serialize(
|
|
1310
|
+
collection_ticker=collection_ticker,
|
|
1311
|
+
lookup_tickers_for_market_in_multivariate_event_collection_request=lookup_tickers_for_market_in_multivariate_event_collection_request,
|
|
1312
|
+
_request_auth=_request_auth,
|
|
1313
|
+
_content_type=_content_type,
|
|
1314
|
+
_headers=_headers,
|
|
1315
|
+
_host_index=_host_index
|
|
1316
|
+
)
|
|
1317
|
+
|
|
1318
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1319
|
+
'200': "LookupTickersForMarketInMultivariateEventCollectionResponse",
|
|
1320
|
+
'400': "ErrorResponse",
|
|
1321
|
+
'401': "ErrorResponse",
|
|
1322
|
+
'404': "ErrorResponse",
|
|
1323
|
+
'500': "ErrorResponse",
|
|
1324
|
+
}
|
|
1325
|
+
response_data = await self.api_client.call_api(
|
|
1326
|
+
*_param,
|
|
1327
|
+
_request_timeout=_request_timeout
|
|
1328
|
+
)
|
|
1329
|
+
await response_data.read()
|
|
1330
|
+
return self.api_client.response_deserialize(
|
|
1331
|
+
response_data=response_data,
|
|
1332
|
+
response_types_map=_response_types_map,
|
|
1333
|
+
)
|
|
1334
|
+
|
|
1335
|
+
|
|
1336
|
+
@validate_call
|
|
1337
|
+
async def lookup_tickers_for_market_in_multivariate_event_collection_without_preload_content(
|
|
1338
|
+
self,
|
|
1339
|
+
collection_ticker: Annotated[StrictStr, Field(description="Collection ticker")],
|
|
1340
|
+
lookup_tickers_for_market_in_multivariate_event_collection_request: LookupTickersForMarketInMultivariateEventCollectionRequest,
|
|
1341
|
+
_request_timeout: Union[
|
|
1342
|
+
None,
|
|
1343
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1344
|
+
Tuple[
|
|
1345
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1346
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1347
|
+
]
|
|
1348
|
+
] = None,
|
|
1349
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1350
|
+
_content_type: Optional[StrictStr] = None,
|
|
1351
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1352
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1353
|
+
) -> RESTResponseType:
|
|
1354
|
+
"""Lookup Tickers For Market In Multivariate Event Collection
|
|
1355
|
+
|
|
1356
|
+
Endpoint for looking up an individual market in a multivariate event collection. If CreateMarketInMultivariateEventCollection has never been hit with that variable combination before, this will return a 404.
|
|
1357
|
+
|
|
1358
|
+
:param collection_ticker: Collection ticker (required)
|
|
1359
|
+
:type collection_ticker: str
|
|
1360
|
+
:param lookup_tickers_for_market_in_multivariate_event_collection_request: (required)
|
|
1361
|
+
:type lookup_tickers_for_market_in_multivariate_event_collection_request: LookupTickersForMarketInMultivariateEventCollectionRequest
|
|
1362
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1363
|
+
number provided, it will be total request
|
|
1364
|
+
timeout. It can also be a pair (tuple) of
|
|
1365
|
+
(connection, read) timeouts.
|
|
1366
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1367
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1368
|
+
request; this effectively ignores the
|
|
1369
|
+
authentication in the spec for a single request.
|
|
1370
|
+
:type _request_auth: dict, optional
|
|
1371
|
+
:param _content_type: force content-type for the request.
|
|
1372
|
+
:type _content_type: str, Optional
|
|
1373
|
+
:param _headers: set to override the headers for a single
|
|
1374
|
+
request; this effectively ignores the headers
|
|
1375
|
+
in the spec for a single request.
|
|
1376
|
+
:type _headers: dict, optional
|
|
1377
|
+
:param _host_index: set to override the host_index for a single
|
|
1378
|
+
request; this effectively ignores the host_index
|
|
1379
|
+
in the spec for a single request.
|
|
1380
|
+
:type _host_index: int, optional
|
|
1381
|
+
:return: Returns the result object.
|
|
1382
|
+
""" # noqa: E501
|
|
1383
|
+
|
|
1384
|
+
_param = self._lookup_tickers_for_market_in_multivariate_event_collection_serialize(
|
|
1385
|
+
collection_ticker=collection_ticker,
|
|
1386
|
+
lookup_tickers_for_market_in_multivariate_event_collection_request=lookup_tickers_for_market_in_multivariate_event_collection_request,
|
|
1387
|
+
_request_auth=_request_auth,
|
|
1388
|
+
_content_type=_content_type,
|
|
1389
|
+
_headers=_headers,
|
|
1390
|
+
_host_index=_host_index
|
|
1391
|
+
)
|
|
1392
|
+
|
|
1393
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1394
|
+
'200': "LookupTickersForMarketInMultivariateEventCollectionResponse",
|
|
1395
|
+
'400': "ErrorResponse",
|
|
1396
|
+
'401': "ErrorResponse",
|
|
1397
|
+
'404': "ErrorResponse",
|
|
1398
|
+
'500': "ErrorResponse",
|
|
1399
|
+
}
|
|
1400
|
+
response_data = await self.api_client.call_api(
|
|
1401
|
+
*_param,
|
|
1402
|
+
_request_timeout=_request_timeout
|
|
1403
|
+
)
|
|
1404
|
+
return response_data.response
|
|
1405
|
+
|
|
1406
|
+
|
|
1407
|
+
def _lookup_tickers_for_market_in_multivariate_event_collection_serialize(
|
|
1408
|
+
self,
|
|
1409
|
+
collection_ticker,
|
|
1410
|
+
lookup_tickers_for_market_in_multivariate_event_collection_request,
|
|
1411
|
+
_request_auth,
|
|
1412
|
+
_content_type,
|
|
1413
|
+
_headers,
|
|
1414
|
+
_host_index,
|
|
1415
|
+
) -> RequestSerialized:
|
|
1416
|
+
|
|
1417
|
+
_host = None
|
|
1418
|
+
|
|
1419
|
+
_collection_formats: Dict[str, str] = {
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1422
|
+
_path_params: Dict[str, str] = {}
|
|
1423
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1424
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1425
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1426
|
+
_files: Dict[
|
|
1427
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1428
|
+
] = {}
|
|
1429
|
+
_body_params: Optional[bytes] = None
|
|
1430
|
+
|
|
1431
|
+
# process the path parameters
|
|
1432
|
+
if collection_ticker is not None:
|
|
1433
|
+
_path_params['collection_ticker'] = collection_ticker
|
|
1434
|
+
# process the query parameters
|
|
1435
|
+
# process the header parameters
|
|
1436
|
+
# process the form parameters
|
|
1437
|
+
# process the body parameter
|
|
1438
|
+
if lookup_tickers_for_market_in_multivariate_event_collection_request is not None:
|
|
1439
|
+
_body_params = lookup_tickers_for_market_in_multivariate_event_collection_request
|
|
1440
|
+
|
|
1441
|
+
|
|
1442
|
+
# set the HTTP header `Accept`
|
|
1443
|
+
if 'Accept' not in _header_params:
|
|
1444
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1445
|
+
[
|
|
1446
|
+
'application/json'
|
|
1447
|
+
]
|
|
1448
|
+
)
|
|
1449
|
+
|
|
1450
|
+
# set the HTTP header `Content-Type`
|
|
1451
|
+
if _content_type:
|
|
1452
|
+
_header_params['Content-Type'] = _content_type
|
|
1453
|
+
else:
|
|
1454
|
+
_default_content_type = (
|
|
1455
|
+
self.api_client.select_header_content_type(
|
|
1456
|
+
[
|
|
1457
|
+
'application/json'
|
|
1458
|
+
]
|
|
1459
|
+
)
|
|
1460
|
+
)
|
|
1461
|
+
if _default_content_type is not None:
|
|
1462
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1463
|
+
|
|
1464
|
+
# authentication setting
|
|
1465
|
+
_auth_settings: List[str] = [
|
|
1466
|
+
'kalshiAccessSignature',
|
|
1467
|
+
'kalshiAccessKey',
|
|
1468
|
+
'kalshiAccessTimestamp'
|
|
1469
|
+
]
|
|
1470
|
+
|
|
1471
|
+
return self.api_client.param_serialize(
|
|
1472
|
+
method='PUT',
|
|
1473
|
+
resource_path='/multivariate_event_collections/{collection_ticker}/lookup',
|
|
1474
|
+
path_params=_path_params,
|
|
1475
|
+
query_params=_query_params,
|
|
1476
|
+
header_params=_header_params,
|
|
1477
|
+
body=_body_params,
|
|
1478
|
+
post_params=_form_params,
|
|
1479
|
+
files=_files,
|
|
1480
|
+
auth_settings=_auth_settings,
|
|
1481
|
+
collection_formats=_collection_formats,
|
|
1482
|
+
_host=_host,
|
|
1483
|
+
_request_auth=_request_auth
|
|
1484
|
+
)
|
|
1485
|
+
|
|
1486
|
+
|