kalshi-python-sync 3.33.0__py3-none-any.whl → 3.35.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 (245) hide show
  1. kalshi_python_sync/__init__.py +14 -2
  2. kalshi_python_sync/api/account_api.py +1 -1
  3. kalshi_python_sync/api/api_keys_api.py +1 -1
  4. kalshi_python_sync/api/communications_api.py +3 -3
  5. kalshi_python_sync/api/events_api.py +38 -4
  6. kalshi_python_sync/api/exchange_api.py +1 -1
  7. kalshi_python_sync/api/fcm_api.py +292 -1
  8. kalshi_python_sync/api/historical_api.py +10 -10
  9. kalshi_python_sync/api/incentive_programs_api.py +1 -1
  10. kalshi_python_sync/api/live_data_api.py +7 -7
  11. kalshi_python_sync/api/market_api.py +1 -1
  12. kalshi_python_sync/api/milestone_api.py +7 -7
  13. kalshi_python_sync/api/multivariate_api.py +1 -1
  14. kalshi_python_sync/api/order_groups_api.py +25 -25
  15. kalshi_python_sync/api/orders_api.py +30 -30
  16. kalshi_python_sync/api/portfolio_api.py +345 -24
  17. kalshi_python_sync/api/search_api.py +1 -1
  18. kalshi_python_sync/api/structured_targets_api.py +1 -1
  19. kalshi_python_sync/api_client.py +2 -2
  20. kalshi_python_sync/configuration.py +3 -3
  21. kalshi_python_sync/exceptions.py +1 -1
  22. kalshi_python_sync/models/__init__.py +13 -1
  23. kalshi_python_sync/models/accept_block_trade_proposal_request.py +1 -1
  24. kalshi_python_sync/models/accept_quote_request.py +1 -1
  25. kalshi_python_sync/models/account_api_usage_level_volume_goal.py +1 -1
  26. kalshi_python_sync/models/account_api_usage_level_volume_progress.py +1 -1
  27. kalshi_python_sync/models/amend_order_request.py +1 -1
  28. kalshi_python_sync/models/amend_order_response.py +1 -1
  29. kalshi_python_sync/models/amend_order_v2_request.py +1 -1
  30. kalshi_python_sync/models/amend_order_v2_response.py +1 -1
  31. kalshi_python_sync/models/api_key.py +1 -1
  32. kalshi_python_sync/models/api_key_scope.py +1 -1
  33. kalshi_python_sync/models/api_key_type.py +1 -1
  34. kalshi_python_sync/models/api_usage_level_grant.py +1 -1
  35. kalshi_python_sync/models/apply_subaccount_transfer_request.py +1 -1
  36. kalshi_python_sync/models/associated_event.py +1 -1
  37. kalshi_python_sync/models/batch_cancel_orders_individual_response.py +1 -1
  38. kalshi_python_sync/models/batch_cancel_orders_request.py +1 -1
  39. kalshi_python_sync/models/batch_cancel_orders_request_order.py +1 -1
  40. kalshi_python_sync/models/batch_cancel_orders_response.py +1 -1
  41. kalshi_python_sync/models/batch_cancel_orders_v2_request.py +1 -1
  42. kalshi_python_sync/models/batch_cancel_orders_v2_request_orders_inner.py +1 -1
  43. kalshi_python_sync/models/batch_cancel_orders_v2_response.py +1 -1
  44. kalshi_python_sync/models/batch_cancel_orders_v2_response_orders_inner.py +1 -1
  45. kalshi_python_sync/models/batch_create_orders_individual_response.py +1 -1
  46. kalshi_python_sync/models/batch_create_orders_request.py +1 -1
  47. kalshi_python_sync/models/batch_create_orders_response.py +1 -1
  48. kalshi_python_sync/models/batch_create_orders_v2_request.py +1 -1
  49. kalshi_python_sync/models/batch_create_orders_v2_response.py +1 -1
  50. kalshi_python_sync/models/batch_create_orders_v2_response_orders_inner.py +1 -1
  51. kalshi_python_sync/models/batch_get_market_candlesticks_response.py +1 -1
  52. kalshi_python_sync/models/bid_ask_distribution.py +1 -1
  53. kalshi_python_sync/models/bid_ask_distribution_historical.py +1 -1
  54. kalshi_python_sync/models/block_trade_proposal.py +1 -1
  55. kalshi_python_sync/models/book_side.py +1 -1
  56. kalshi_python_sync/models/bucket_limit.py +1 -1
  57. kalshi_python_sync/models/cancel_order_v2_response.py +1 -1
  58. kalshi_python_sync/models/create_api_key_request.py +1 -1
  59. kalshi_python_sync/models/create_api_key_response.py +1 -1
  60. kalshi_python_sync/models/create_fcm_position_transfer_request.py +96 -0
  61. kalshi_python_sync/models/create_fcm_position_transfer_response.py +87 -0
  62. kalshi_python_sync/models/create_fcm_subtrader_request.py +1 -1
  63. kalshi_python_sync/models/create_fcm_subtrader_response.py +1 -1
  64. kalshi_python_sync/models/create_market_in_multivariate_event_collection_request.py +1 -1
  65. kalshi_python_sync/models/create_market_in_multivariate_event_collection_response.py +1 -1
  66. kalshi_python_sync/models/create_order_group_request.py +1 -1
  67. kalshi_python_sync/models/create_order_group_response.py +1 -1
  68. kalshi_python_sync/models/create_order_request.py +1 -1
  69. kalshi_python_sync/models/create_order_response.py +1 -1
  70. kalshi_python_sync/models/create_order_v2_request.py +1 -1
  71. kalshi_python_sync/models/create_order_v2_response.py +1 -1
  72. kalshi_python_sync/models/create_quote_request.py +1 -1
  73. kalshi_python_sync/models/create_quote_response.py +1 -1
  74. kalshi_python_sync/models/create_rfq_request.py +1 -1
  75. kalshi_python_sync/models/create_rfq_response.py +1 -1
  76. kalshi_python_sync/models/create_subaccount_request.py +1 -1
  77. kalshi_python_sync/models/create_subaccount_response.py +1 -1
  78. kalshi_python_sync/models/credit_history.py +105 -0
  79. kalshi_python_sync/models/daily_schedule.py +1 -1
  80. kalshi_python_sync/models/decrease_order_v2_request.py +1 -1
  81. kalshi_python_sync/models/decrease_order_v2_response.py +1 -1
  82. kalshi_python_sync/models/deposit.py +1 -1
  83. kalshi_python_sync/models/endpoint_token_cost.py +1 -1
  84. kalshi_python_sync/models/error_response.py +1 -1
  85. kalshi_python_sync/models/event_data.py +1 -1
  86. kalshi_python_sync/models/event_fee_change.py +1 -1
  87. kalshi_python_sync/models/event_live_data.py +1 -1
  88. kalshi_python_sync/models/event_position.py +1 -1
  89. kalshi_python_sync/models/exchange_index_status.py +1 -1
  90. kalshi_python_sync/models/exchange_instance.py +1 -1
  91. kalshi_python_sync/models/exchange_status.py +1 -1
  92. kalshi_python_sync/models/fcm_fill.py +1 -1
  93. kalshi_python_sync/models/fcm_subtrader.py +1 -1
  94. kalshi_python_sync/models/fee_type.py +1 -1
  95. kalshi_python_sync/models/fill.py +1 -1
  96. kalshi_python_sync/models/forecast_percentiles_point.py +1 -1
  97. kalshi_python_sync/models/generate_api_key_request.py +1 -1
  98. kalshi_python_sync/models/generate_api_key_response.py +1 -1
  99. kalshi_python_sync/models/get_account_api_limits_response.py +1 -1
  100. kalshi_python_sync/models/get_account_api_usage_level_volume_progress_response.py +1 -1
  101. kalshi_python_sync/models/get_account_endpoint_costs_response.py +1 -1
  102. kalshi_python_sync/models/get_api_keys_response.py +1 -1
  103. kalshi_python_sync/models/get_balance_response.py +1 -1
  104. kalshi_python_sync/models/get_block_trade_proposals_response.py +1 -1
  105. kalshi_python_sync/models/get_communications_id_response.py +1 -1
  106. kalshi_python_sync/models/get_credit_history_response.py +97 -0
  107. kalshi_python_sync/models/get_deposits_response.py +1 -1
  108. kalshi_python_sync/models/get_event_candlesticks_response.py +1 -1
  109. kalshi_python_sync/models/get_event_fee_changes_response.py +1 -1
  110. kalshi_python_sync/models/get_event_forecast_percentiles_history_response.py +1 -1
  111. kalshi_python_sync/models/get_event_live_data_response.py +1 -1
  112. kalshi_python_sync/models/get_event_metadata_response.py +1 -1
  113. kalshi_python_sync/models/get_event_response.py +1 -1
  114. kalshi_python_sync/models/get_events_response.py +1 -1
  115. kalshi_python_sync/models/get_exchange_schedule_response.py +1 -1
  116. kalshi_python_sync/models/get_fcm_event_contract_daily_cap_response.py +1 -1
  117. kalshi_python_sync/models/get_fcm_fills_response.py +1 -1
  118. kalshi_python_sync/models/get_fcm_subtrader_blocked_categories_response.py +1 -1
  119. kalshi_python_sync/models/get_fills_response.py +1 -1
  120. kalshi_python_sync/models/get_filters_by_sports_response.py +1 -1
  121. kalshi_python_sync/models/get_game_stats_response.py +1 -1
  122. kalshi_python_sync/models/get_historical_cutoff_response.py +1 -1
  123. kalshi_python_sync/models/get_incentive_programs_response.py +1 -1
  124. kalshi_python_sync/models/get_intra_exchange_instance_transfer_response.py +1 -1
  125. kalshi_python_sync/models/get_intra_exchange_instance_transfers_response.py +1 -1
  126. kalshi_python_sync/models/get_live_data_response.py +1 -1
  127. kalshi_python_sync/models/get_live_datas_response.py +1 -1
  128. kalshi_python_sync/models/get_market_candlesticks_historical_response.py +1 -1
  129. kalshi_python_sync/models/get_market_candlesticks_response.py +1 -1
  130. kalshi_python_sync/models/get_market_index_history_response.py +110 -0
  131. kalshi_python_sync/models/get_market_index_response.py +116 -0
  132. kalshi_python_sync/models/get_market_indexes_response.py +95 -0
  133. kalshi_python_sync/models/get_market_orderbook_response.py +1 -1
  134. kalshi_python_sync/models/get_market_orderbooks_response.py +1 -1
  135. kalshi_python_sync/models/get_market_response.py +1 -1
  136. kalshi_python_sync/models/get_markets_response.py +1 -1
  137. kalshi_python_sync/models/get_milestone_response.py +1 -1
  138. kalshi_python_sync/models/get_milestones_response.py +1 -1
  139. kalshi_python_sync/models/get_multivariate_event_collection_response.py +1 -1
  140. kalshi_python_sync/models/get_multivariate_event_collections_response.py +1 -1
  141. kalshi_python_sync/models/get_multivariate_events_response.py +1 -1
  142. kalshi_python_sync/models/get_order_group_response.py +1 -1
  143. kalshi_python_sync/models/get_order_groups_response.py +1 -1
  144. kalshi_python_sync/models/get_order_queue_position_response.py +1 -1
  145. kalshi_python_sync/models/get_order_queue_positions_response.py +1 -1
  146. kalshi_python_sync/models/get_order_response.py +1 -1
  147. kalshi_python_sync/models/get_orders_response.py +1 -1
  148. kalshi_python_sync/models/get_portfolio_resting_order_total_value_response.py +1 -1
  149. kalshi_python_sync/models/get_positions_response.py +1 -1
  150. kalshi_python_sync/models/get_quote_response.py +1 -1
  151. kalshi_python_sync/models/get_quotes_response.py +1 -1
  152. kalshi_python_sync/models/get_rfq_response.py +1 -1
  153. kalshi_python_sync/models/get_rfqs_response.py +1 -1
  154. kalshi_python_sync/models/get_series_fee_changes_response.py +1 -1
  155. kalshi_python_sync/models/get_series_list_response.py +1 -1
  156. kalshi_python_sync/models/get_series_response.py +1 -1
  157. kalshi_python_sync/models/get_settlements_response.py +1 -1
  158. kalshi_python_sync/models/get_structured_target_response.py +1 -1
  159. kalshi_python_sync/models/get_structured_targets_response.py +1 -1
  160. kalshi_python_sync/models/get_subaccount_balances_response.py +1 -1
  161. kalshi_python_sync/models/get_subaccount_netting_response.py +1 -1
  162. kalshi_python_sync/models/get_subaccount_transfers_response.py +1 -1
  163. kalshi_python_sync/models/get_tags_for_series_categories_response.py +1 -1
  164. kalshi_python_sync/models/get_target_balance_allocation_response.py +1 -1
  165. kalshi_python_sync/models/get_trades_response.py +1 -1
  166. kalshi_python_sync/models/get_user_data_timestamp_response.py +1 -1
  167. kalshi_python_sync/models/get_weather_index_calibrations_response.py +1 -1
  168. kalshi_python_sync/models/get_weather_index_response.py +1 -1
  169. kalshi_python_sync/models/get_withdrawals_response.py +1 -1
  170. kalshi_python_sync/models/incentive_program.py +1 -1
  171. kalshi_python_sync/models/indexed_balance.py +1 -1
  172. kalshi_python_sync/models/intra_exchange_instance_transfer.py +5 -3
  173. kalshi_python_sync/models/intra_exchange_instance_transfer_request.py +5 -2
  174. kalshi_python_sync/models/intra_exchange_instance_transfer_response.py +1 -1
  175. kalshi_python_sync/models/intra_exchange_instance_transfer_status.py +1 -1
  176. kalshi_python_sync/models/list_fcm_subtraders_response.py +1 -1
  177. kalshi_python_sync/models/live_data.py +1 -1
  178. kalshi_python_sync/models/maintenance_window.py +1 -1
  179. kalshi_python_sync/models/market.py +1 -1
  180. kalshi_python_sync/models/market_candlestick.py +1 -1
  181. kalshi_python_sync/models/market_candlestick_historical.py +1 -1
  182. kalshi_python_sync/models/market_candlesticks_response.py +1 -1
  183. kalshi_python_sync/models/market_index.py +113 -0
  184. kalshi_python_sync/models/market_index_latest.py +94 -0
  185. kalshi_python_sync/models/market_index_session.py +95 -0
  186. kalshi_python_sync/models/market_index_status.py +38 -0
  187. kalshi_python_sync/models/market_index_timeseries_point.py +89 -0
  188. kalshi_python_sync/models/market_metadata.py +1 -1
  189. kalshi_python_sync/models/market_orderbook_fp.py +1 -1
  190. kalshi_python_sync/models/market_position.py +1 -1
  191. kalshi_python_sync/models/milestone.py +2 -2
  192. kalshi_python_sync/models/multivariate_event_collection.py +1 -1
  193. kalshi_python_sync/models/mve_selected_leg.py +1 -1
  194. kalshi_python_sync/models/order.py +1 -1
  195. kalshi_python_sync/models/order_group.py +1 -1
  196. kalshi_python_sync/models/order_queue_position.py +1 -1
  197. kalshi_python_sync/models/order_status.py +1 -1
  198. kalshi_python_sync/models/orderbook_count_fp.py +1 -1
  199. kalshi_python_sync/models/outcome_side.py +1 -1
  200. kalshi_python_sync/models/percentile_point.py +1 -1
  201. kalshi_python_sync/models/play_by_play.py +1 -1
  202. kalshi_python_sync/models/play_by_play_periods_inner.py +1 -1
  203. kalshi_python_sync/models/price_distribution.py +1 -1
  204. kalshi_python_sync/models/price_distribution_historical.py +1 -1
  205. kalshi_python_sync/models/price_range.py +1 -1
  206. kalshi_python_sync/models/propose_block_trade_request.py +1 -1
  207. kalshi_python_sync/models/propose_block_trade_response.py +1 -1
  208. kalshi_python_sync/models/quote.py +1 -1
  209. kalshi_python_sync/models/resting_margin_reservation.py +1 -1
  210. kalshi_python_sync/models/rfq.py +5 -3
  211. kalshi_python_sync/models/schedule.py +1 -1
  212. kalshi_python_sync/models/scope_list.py +1 -1
  213. kalshi_python_sync/models/self_trade_prevention_type.py +1 -1
  214. kalshi_python_sync/models/series.py +1 -1
  215. kalshi_python_sync/models/series_fee_change.py +1 -1
  216. kalshi_python_sync/models/set_target_balance_allocation_request.py +1 -1
  217. kalshi_python_sync/models/settlement.py +1 -1
  218. kalshi_python_sync/models/settlement_source.py +1 -1
  219. kalshi_python_sync/models/sport_filter_details.py +1 -1
  220. kalshi_python_sync/models/structured_target.py +1 -1
  221. kalshi_python_sync/models/subaccount_balance.py +1 -1
  222. kalshi_python_sync/models/subaccount_netting_config.py +1 -1
  223. kalshi_python_sync/models/subaccount_transfer.py +1 -1
  224. kalshi_python_sync/models/target_balance_allocation.py +1 -1
  225. kalshi_python_sync/models/target_balance_allocation_input.py +1 -1
  226. kalshi_python_sync/models/ticker_pair.py +1 -1
  227. kalshi_python_sync/models/trade.py +1 -1
  228. kalshi_python_sync/models/update_fcm_event_contract_daily_cap_request.py +1 -1
  229. kalshi_python_sync/models/update_fcm_subtrader_blocked_categories_request.py +1 -1
  230. kalshi_python_sync/models/update_fcm_subtrader_blocked_categories_response.py +1 -1
  231. kalshi_python_sync/models/update_order_group_limit_request.py +1 -1
  232. kalshi_python_sync/models/update_subaccount_netting_request.py +1 -1
  233. kalshi_python_sync/models/user_filter.py +1 -1
  234. kalshi_python_sync/models/weather_index_calibration.py +1 -1
  235. kalshi_python_sync/models/weather_index_calibration_station.py +1 -1
  236. kalshi_python_sync/models/weather_index_point.py +1 -1
  237. kalshi_python_sync/models/weather_index_station_reading.py +1 -1
  238. kalshi_python_sync/models/weekly_schedule.py +1 -1
  239. kalshi_python_sync/models/withdrawal.py +1 -1
  240. kalshi_python_sync/rest.py +1 -1
  241. {kalshi_python_sync-3.33.0.dist-info → kalshi_python_sync-3.35.0.dist-info}/METADATA +3 -3
  242. kalshi_python_sync-3.35.0.dist-info/RECORD +248 -0
  243. {kalshi_python_sync-3.33.0.dist-info → kalshi_python_sync-3.35.0.dist-info}/WHEEL +1 -1
  244. kalshi_python_sync-3.33.0.dist-info/RECORD +0 -236
  245. {kalshi_python_sync-3.33.0.dist-info → kalshi_python_sync-3.35.0.dist-info}/top_level.txt +0 -0
@@ -7,13 +7,13 @@
7
7
 
8
8
  Manually defined OpenAPI spec for endpoints being migrated to spec-first approach
9
9
 
10
- The version of the OpenAPI document: 3.33.0
10
+ The version of the OpenAPI document: 3.35.0
11
11
  Generated by OpenAPI Generator (https://openapi-generator.tech)
12
12
 
13
13
  Do not edit the class manually.
14
14
  """ # noqa: E501
15
15
 
16
- __version__ = "3.33.0"
16
+ __version__ = "3.35.0"
17
17
 
18
18
  # import apis into sdk package
19
19
  from kalshi_python_sync.api.account_api import AccountApi
@@ -98,6 +98,8 @@ from kalshi_python_sync.models.bucket_limit import BucketLimit
98
98
  from kalshi_python_sync.models.cancel_order_v2_response import CancelOrderV2Response
99
99
  from kalshi_python_sync.models.create_api_key_request import CreateApiKeyRequest
100
100
  from kalshi_python_sync.models.create_api_key_response import CreateApiKeyResponse
101
+ from kalshi_python_sync.models.create_fcm_position_transfer_request import CreateFCMPositionTransferRequest
102
+ from kalshi_python_sync.models.create_fcm_position_transfer_response import CreateFCMPositionTransferResponse
101
103
  from kalshi_python_sync.models.create_fcm_subtrader_request import CreateFCMSubtraderRequest
102
104
  from kalshi_python_sync.models.create_fcm_subtrader_response import CreateFCMSubtraderResponse
103
105
  from kalshi_python_sync.models.create_market_in_multivariate_event_collection_request import CreateMarketInMultivariateEventCollectionRequest
@@ -114,6 +116,7 @@ from kalshi_python_sync.models.create_rfq_request import CreateRFQRequest
114
116
  from kalshi_python_sync.models.create_rfq_response import CreateRFQResponse
115
117
  from kalshi_python_sync.models.create_subaccount_request import CreateSubaccountRequest
116
118
  from kalshi_python_sync.models.create_subaccount_response import CreateSubaccountResponse
119
+ from kalshi_python_sync.models.credit_history import CreditHistory
117
120
  from kalshi_python_sync.models.daily_schedule import DailySchedule
118
121
  from kalshi_python_sync.models.decrease_order_v2_request import DecreaseOrderV2Request
119
122
  from kalshi_python_sync.models.decrease_order_v2_response import DecreaseOrderV2Response
@@ -141,6 +144,7 @@ from kalshi_python_sync.models.get_api_keys_response import GetApiKeysResponse
141
144
  from kalshi_python_sync.models.get_balance_response import GetBalanceResponse
142
145
  from kalshi_python_sync.models.get_block_trade_proposals_response import GetBlockTradeProposalsResponse
143
146
  from kalshi_python_sync.models.get_communications_id_response import GetCommunicationsIDResponse
147
+ from kalshi_python_sync.models.get_credit_history_response import GetCreditHistoryResponse
144
148
  from kalshi_python_sync.models.get_deposits_response import GetDepositsResponse
145
149
  from kalshi_python_sync.models.get_event_candlesticks_response import GetEventCandlesticksResponse
146
150
  from kalshi_python_sync.models.get_event_fee_changes_response import GetEventFeeChangesResponse
@@ -164,6 +168,9 @@ from kalshi_python_sync.models.get_live_data_response import GetLiveDataResponse
164
168
  from kalshi_python_sync.models.get_live_datas_response import GetLiveDatasResponse
165
169
  from kalshi_python_sync.models.get_market_candlesticks_historical_response import GetMarketCandlesticksHistoricalResponse
166
170
  from kalshi_python_sync.models.get_market_candlesticks_response import GetMarketCandlesticksResponse
171
+ from kalshi_python_sync.models.get_market_index_history_response import GetMarketIndexHistoryResponse
172
+ from kalshi_python_sync.models.get_market_index_response import GetMarketIndexResponse
173
+ from kalshi_python_sync.models.get_market_indexes_response import GetMarketIndexesResponse
167
174
  from kalshi_python_sync.models.get_market_orderbook_response import GetMarketOrderbookResponse
168
175
  from kalshi_python_sync.models.get_market_orderbooks_response import GetMarketOrderbooksResponse
169
176
  from kalshi_python_sync.models.get_market_response import GetMarketResponse
@@ -214,6 +221,11 @@ from kalshi_python_sync.models.market import Market
214
221
  from kalshi_python_sync.models.market_candlestick import MarketCandlestick
215
222
  from kalshi_python_sync.models.market_candlestick_historical import MarketCandlestickHistorical
216
223
  from kalshi_python_sync.models.market_candlesticks_response import MarketCandlesticksResponse
224
+ from kalshi_python_sync.models.market_index import MarketIndex
225
+ from kalshi_python_sync.models.market_index_latest import MarketIndexLatest
226
+ from kalshi_python_sync.models.market_index_session import MarketIndexSession
227
+ from kalshi_python_sync.models.market_index_status import MarketIndexStatus
228
+ from kalshi_python_sync.models.market_index_timeseries_point import MarketIndexTimeseriesPoint
217
229
  from kalshi_python_sync.models.market_metadata import MarketMetadata
218
230
  from kalshi_python_sync.models.market_orderbook_fp import MarketOrderbookFp
219
231
  from kalshi_python_sync.models.market_position import MarketPosition
@@ -5,7 +5,7 @@
5
5
 
6
6
  Manually defined OpenAPI spec for endpoints being migrated to spec-first approach
7
7
 
8
- The version of the OpenAPI document: 3.33.0
8
+ The version of the OpenAPI document: 3.35.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -5,7 +5,7 @@
5
5
 
6
6
  Manually defined OpenAPI spec for endpoints being migrated to spec-first approach
7
7
 
8
- The version of the OpenAPI document: 3.33.0
8
+ The version of the OpenAPI document: 3.35.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -5,7 +5,7 @@
5
5
 
6
6
  Manually defined OpenAPI spec for endpoints being migrated to spec-first approach
7
7
 
8
- The version of the OpenAPI document: 3.33.0
8
+ The version of the OpenAPI document: 3.35.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -4805,7 +4805,7 @@ class CommunicationsApi:
4805
4805
  cursor: Annotated[Optional[StrictStr], Field(description="Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.")] = None,
4806
4806
  event_ticker: Annotated[Optional[StrictStr], Field(description="Event ticker to filter by. Only a single event ticker is supported.")] = None,
4807
4807
  market_ticker: Annotated[Optional[StrictStr], Field(description="Filter by market ticker")] = None,
4808
- subaccount: Annotated[Optional[StrictInt], Field(description="Subaccount number (0 for primary, 1-63 for subaccounts). If omitted, defaults to all subaccounts.")] = None,
4808
+ subaccount: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Subaccount number (0 for primary, 1-63 for subaccounts). If omitted, defaults to all subaccounts.")] = None,
4809
4809
  limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Parameter to specify the number of results per page. Defaults to 100.")] = None,
4810
4810
  status: Annotated[Optional[StrictStr], Field(description="Filter RFQs by status")] = None,
4811
4811
  creator_user_id: Annotated[Optional[StrictStr], Field(description="Filter RFQs by creator user UUID. Use user_filter=self for the authenticated user.")] = None,
@@ -4903,7 +4903,7 @@ class CommunicationsApi:
4903
4903
  cursor: Annotated[Optional[StrictStr], Field(description="Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.")] = None,
4904
4904
  event_ticker: Annotated[Optional[StrictStr], Field(description="Event ticker to filter by. Only a single event ticker is supported.")] = None,
4905
4905
  market_ticker: Annotated[Optional[StrictStr], Field(description="Filter by market ticker")] = None,
4906
- subaccount: Annotated[Optional[StrictInt], Field(description="Subaccount number (0 for primary, 1-63 for subaccounts). If omitted, defaults to all subaccounts.")] = None,
4906
+ subaccount: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Subaccount number (0 for primary, 1-63 for subaccounts). If omitted, defaults to all subaccounts.")] = None,
4907
4907
  limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Parameter to specify the number of results per page. Defaults to 100.")] = None,
4908
4908
  status: Annotated[Optional[StrictStr], Field(description="Filter RFQs by status")] = None,
4909
4909
  creator_user_id: Annotated[Optional[StrictStr], Field(description="Filter RFQs by creator user UUID. Use user_filter=self for the authenticated user.")] = None,
@@ -5,7 +5,7 @@
5
5
 
6
6
  Manually defined OpenAPI spec for endpoints being migrated to spec-first approach
7
7
 
8
- The version of the OpenAPI document: 3.33.0
8
+ The version of the OpenAPI document: 3.35.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -48,6 +48,7 @@ class EventsApi:
48
48
  def get_event(
49
49
  self,
50
50
  event_ticker: StrictStr,
51
+ exclude_markets: Any = None,
51
52
  with_nested_markets: Any = None,
52
53
  ) -> GetEventResponse:
53
54
  """Get Event
@@ -56,6 +57,8 @@ class EventsApi:
56
57
 
57
58
  :param event_ticker: Event ticker (required)
58
59
  :type event_ticker: str
60
+ :param exclude_markets: Return event metadata without loading child markets. Use GET /markets with event_ticker, limit and cursor for bounded market pages. Cannot be combined with with_nested_markets=true.
61
+ :type exclude_markets: bool
59
62
  :param with_nested_markets: If true, markets are included within the event object. If false (default), markets are returned as a separate top-level field in the response. Historical markets settled before the historical cutoff will not be included.
60
63
  :type with_nested_markets: bool
61
64
  :param _request_timeout: timeout setting for this request. If one
@@ -83,6 +86,7 @@ class EventsApi:
83
86
 
84
87
  _param = self._get_event_serialize(
85
88
  event_ticker=event_ticker,
89
+ exclude_markets=exclude_markets,
86
90
  with_nested_markets=with_nested_markets,
87
91
  _request_auth=None,
88
92
  _content_type=None,
@@ -112,6 +116,7 @@ class EventsApi:
112
116
  def get_event_with_http_info(
113
117
  self,
114
118
  event_ticker: Annotated[StrictStr, Field(description="Event ticker")],
119
+ exclude_markets: Annotated[Optional[StrictBool], Field(description="Return event metadata without loading child markets. Use GET /markets with event_ticker, limit and cursor for bounded market pages. Cannot be combined with with_nested_markets=true.")] = None,
115
120
  with_nested_markets: Annotated[Optional[StrictBool], Field(description="If true, markets are included within the event object. If false (default), markets are returned as a separate top-level field in the response. Historical markets settled before the historical cutoff will not be included.")] = None,
116
121
  _request_timeout: Union[
117
122
  None,
@@ -132,6 +137,8 @@ class EventsApi:
132
137
 
133
138
  :param event_ticker: Event ticker (required)
134
139
  :type event_ticker: str
140
+ :param exclude_markets: Return event metadata without loading child markets. Use GET /markets with event_ticker, limit and cursor for bounded market pages. Cannot be combined with with_nested_markets=true.
141
+ :type exclude_markets: bool
135
142
  :param with_nested_markets: If true, markets are included within the event object. If false (default), markets are returned as a separate top-level field in the response. Historical markets settled before the historical cutoff will not be included.
136
143
  :type with_nested_markets: bool
137
144
  :param _request_timeout: timeout setting for this request. If one
@@ -158,6 +165,7 @@ class EventsApi:
158
165
 
159
166
  _param = self._get_event_serialize(
160
167
  event_ticker=event_ticker,
168
+ exclude_markets=exclude_markets,
161
169
  with_nested_markets=with_nested_markets,
162
170
  _request_auth=_request_auth,
163
171
  _content_type=_content_type,
@@ -187,6 +195,7 @@ class EventsApi:
187
195
  def get_event_without_preload_content(
188
196
  self,
189
197
  event_ticker: Annotated[StrictStr, Field(description="Event ticker")],
198
+ exclude_markets: Annotated[Optional[StrictBool], Field(description="Return event metadata without loading child markets. Use GET /markets with event_ticker, limit and cursor for bounded market pages. Cannot be combined with with_nested_markets=true.")] = None,
190
199
  with_nested_markets: Annotated[Optional[StrictBool], Field(description="If true, markets are included within the event object. If false (default), markets are returned as a separate top-level field in the response. Historical markets settled before the historical cutoff will not be included.")] = None,
191
200
  _request_timeout: Union[
192
201
  None,
@@ -207,6 +216,8 @@ class EventsApi:
207
216
 
208
217
  :param event_ticker: Event ticker (required)
209
218
  :type event_ticker: str
219
+ :param exclude_markets: Return event metadata without loading child markets. Use GET /markets with event_ticker, limit and cursor for bounded market pages. Cannot be combined with with_nested_markets=true.
220
+ :type exclude_markets: bool
210
221
  :param with_nested_markets: If true, markets are included within the event object. If false (default), markets are returned as a separate top-level field in the response. Historical markets settled before the historical cutoff will not be included.
211
222
  :type with_nested_markets: bool
212
223
  :param _request_timeout: timeout setting for this request. If one
@@ -233,6 +244,7 @@ class EventsApi:
233
244
 
234
245
  _param = self._get_event_serialize(
235
246
  event_ticker=event_ticker,
247
+ exclude_markets=exclude_markets,
236
248
  with_nested_markets=with_nested_markets,
237
249
  _request_auth=_request_auth,
238
250
  _content_type=_content_type,
@@ -257,6 +269,7 @@ class EventsApi:
257
269
  def _get_event_serialize(
258
270
  self,
259
271
  event_ticker,
272
+ exclude_markets,
260
273
  with_nested_markets,
261
274
  _request_auth,
262
275
  _content_type,
@@ -282,6 +295,10 @@ class EventsApi:
282
295
  if event_ticker is not None:
283
296
  _path_params['event_ticker'] = event_ticker
284
297
  # process the query parameters
298
+ if exclude_markets is not None:
299
+
300
+ _query_params.append(('exclude_markets', exclude_markets))
301
+
285
302
  if with_nested_markets is not None:
286
303
 
287
304
  _query_params.append(('with_nested_markets', with_nested_markets))
@@ -1946,11 +1963,12 @@ class EventsApi:
1946
1963
  cursor: Any = None,
1947
1964
  series_ticker: Any = None,
1948
1965
  collection_ticker: Any = None,
1966
+ tickers: Any = None,
1949
1967
  with_nested_markets: Any = None,
1950
1968
  ) -> GetMultivariateEventsResponse:
1951
1969
  """Get Multivariate Events
1952
1970
 
1953
- Retrieve multivariate (combo) events. These are dynamically created events from multivariate event collections. Supports filtering by series and collection ticker.
1971
+ Retrieve multivariate (combo) events. These are dynamically created events from multivariate event collections. Supports filtering by series ticker, collection ticker, or a comma-separated list of event tickers.
1954
1972
 
1955
1973
  :param limit: Number of results per page. Defaults to 100. Maximum value is 200.
1956
1974
  :type limit: int
@@ -1960,6 +1978,8 @@ class EventsApi:
1960
1978
  :type series_ticker: str
1961
1979
  :param collection_ticker: Filter events by collection ticker. Returns only multivariate events belonging to the specified collection. Cannot be used together with series_ticker.
1962
1980
  :type collection_ticker: str
1981
+ :param tickers: Filter by specific event tickers. Comma-separated list of event tickers to retrieve.
1982
+ :type tickers: str
1963
1983
  :param with_nested_markets: Parameter to specify if nested markets should be included in the response. When true, each event will include a 'markets' field containing a list of Market objects associated with that event.
1964
1984
  :type with_nested_markets: bool
1965
1985
  :param _request_timeout: timeout setting for this request. If one
@@ -1990,6 +2010,7 @@ class EventsApi:
1990
2010
  cursor=cursor,
1991
2011
  series_ticker=series_ticker,
1992
2012
  collection_ticker=collection_ticker,
2013
+ tickers=tickers,
1993
2014
  with_nested_markets=with_nested_markets,
1994
2015
  _request_auth=None,
1995
2016
  _content_type=None,
@@ -2021,6 +2042,7 @@ class EventsApi:
2021
2042
  cursor: Annotated[Optional[StrictStr], Field(description="Pagination cursor. Use the cursor value returned from the previous response to get the next page of results.")] = None,
2022
2043
  series_ticker: Annotated[Optional[StrictStr], Field(description="Filter by series ticker")] = None,
2023
2044
  collection_ticker: Annotated[Optional[StrictStr], Field(description="Filter events by collection ticker. Returns only multivariate events belonging to the specified collection. Cannot be used together with series_ticker.")] = None,
2045
+ tickers: Annotated[Optional[StrictStr], Field(description="Filter by specific event tickers. Comma-separated list of event tickers to retrieve.")] = None,
2024
2046
  with_nested_markets: Annotated[Optional[StrictBool], Field(description="Parameter to specify if nested markets should be included in the response. When true, each event will include a 'markets' field containing a list of Market objects associated with that event.")] = None,
2025
2047
  _request_timeout: Union[
2026
2048
  None,
@@ -2037,7 +2059,7 @@ class EventsApi:
2037
2059
  ) -> ApiResponse[GetMultivariateEventsResponse]:
2038
2060
  """Get Multivariate Events
2039
2061
 
2040
- Retrieve multivariate (combo) events. These are dynamically created events from multivariate event collections. Supports filtering by series and collection ticker.
2062
+ Retrieve multivariate (combo) events. These are dynamically created events from multivariate event collections. Supports filtering by series ticker, collection ticker, or a comma-separated list of event tickers.
2041
2063
 
2042
2064
  :param limit: Number of results per page. Defaults to 100. Maximum value is 200.
2043
2065
  :type limit: int
@@ -2047,6 +2069,8 @@ class EventsApi:
2047
2069
  :type series_ticker: str
2048
2070
  :param collection_ticker: Filter events by collection ticker. Returns only multivariate events belonging to the specified collection. Cannot be used together with series_ticker.
2049
2071
  :type collection_ticker: str
2072
+ :param tickers: Filter by specific event tickers. Comma-separated list of event tickers to retrieve.
2073
+ :type tickers: str
2050
2074
  :param with_nested_markets: Parameter to specify if nested markets should be included in the response. When true, each event will include a 'markets' field containing a list of Market objects associated with that event.
2051
2075
  :type with_nested_markets: bool
2052
2076
  :param _request_timeout: timeout setting for this request. If one
@@ -2076,6 +2100,7 @@ class EventsApi:
2076
2100
  cursor=cursor,
2077
2101
  series_ticker=series_ticker,
2078
2102
  collection_ticker=collection_ticker,
2103
+ tickers=tickers,
2079
2104
  with_nested_markets=with_nested_markets,
2080
2105
  _request_auth=_request_auth,
2081
2106
  _content_type=_content_type,
@@ -2107,6 +2132,7 @@ class EventsApi:
2107
2132
  cursor: Annotated[Optional[StrictStr], Field(description="Pagination cursor. Use the cursor value returned from the previous response to get the next page of results.")] = None,
2108
2133
  series_ticker: Annotated[Optional[StrictStr], Field(description="Filter by series ticker")] = None,
2109
2134
  collection_ticker: Annotated[Optional[StrictStr], Field(description="Filter events by collection ticker. Returns only multivariate events belonging to the specified collection. Cannot be used together with series_ticker.")] = None,
2135
+ tickers: Annotated[Optional[StrictStr], Field(description="Filter by specific event tickers. Comma-separated list of event tickers to retrieve.")] = None,
2110
2136
  with_nested_markets: Annotated[Optional[StrictBool], Field(description="Parameter to specify if nested markets should be included in the response. When true, each event will include a 'markets' field containing a list of Market objects associated with that event.")] = None,
2111
2137
  _request_timeout: Union[
2112
2138
  None,
@@ -2123,7 +2149,7 @@ class EventsApi:
2123
2149
  ) -> RESTResponseType:
2124
2150
  """Get Multivariate Events
2125
2151
 
2126
- Retrieve multivariate (combo) events. These are dynamically created events from multivariate event collections. Supports filtering by series and collection ticker.
2152
+ Retrieve multivariate (combo) events. These are dynamically created events from multivariate event collections. Supports filtering by series ticker, collection ticker, or a comma-separated list of event tickers.
2127
2153
 
2128
2154
  :param limit: Number of results per page. Defaults to 100. Maximum value is 200.
2129
2155
  :type limit: int
@@ -2133,6 +2159,8 @@ class EventsApi:
2133
2159
  :type series_ticker: str
2134
2160
  :param collection_ticker: Filter events by collection ticker. Returns only multivariate events belonging to the specified collection. Cannot be used together with series_ticker.
2135
2161
  :type collection_ticker: str
2162
+ :param tickers: Filter by specific event tickers. Comma-separated list of event tickers to retrieve.
2163
+ :type tickers: str
2136
2164
  :param with_nested_markets: Parameter to specify if nested markets should be included in the response. When true, each event will include a 'markets' field containing a list of Market objects associated with that event.
2137
2165
  :type with_nested_markets: bool
2138
2166
  :param _request_timeout: timeout setting for this request. If one
@@ -2162,6 +2190,7 @@ class EventsApi:
2162
2190
  cursor=cursor,
2163
2191
  series_ticker=series_ticker,
2164
2192
  collection_ticker=collection_ticker,
2193
+ tickers=tickers,
2165
2194
  with_nested_markets=with_nested_markets,
2166
2195
  _request_auth=_request_auth,
2167
2196
  _content_type=_content_type,
@@ -2188,6 +2217,7 @@ class EventsApi:
2188
2217
  cursor,
2189
2218
  series_ticker,
2190
2219
  collection_ticker,
2220
+ tickers,
2191
2221
  with_nested_markets,
2192
2222
  _request_auth,
2193
2223
  _content_type,
@@ -2227,6 +2257,10 @@ class EventsApi:
2227
2257
 
2228
2258
  _query_params.append(('collection_ticker', collection_ticker))
2229
2259
 
2260
+ if tickers is not None:
2261
+
2262
+ _query_params.append(('tickers', tickers))
2263
+
2230
2264
  if with_nested_markets is not None:
2231
2265
 
2232
2266
  _query_params.append(('with_nested_markets', with_nested_markets))
@@ -5,7 +5,7 @@
5
5
 
6
6
  Manually defined OpenAPI spec for endpoints being migrated to spec-first approach
7
7
 
8
- The version of the OpenAPI document: 3.33.0
8
+ The version of the OpenAPI document: 3.35.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -5,7 +5,7 @@
5
5
 
6
6
  Manually defined OpenAPI spec for endpoints being migrated to spec-first approach
7
7
 
8
- The version of the OpenAPI document: 3.33.0
8
+ The version of the OpenAPI document: 3.35.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -18,6 +18,8 @@ from typing_extensions import Annotated
18
18
  from pydantic import Field, StrictInt, StrictStr, field_validator
19
19
  from typing import Any, Dict, Optional
20
20
  from typing_extensions import Annotated
21
+ from kalshi_python_sync.models.create_fcm_position_transfer_request import CreateFCMPositionTransferRequest
22
+ from kalshi_python_sync.models.create_fcm_position_transfer_response import CreateFCMPositionTransferResponse
21
23
  from kalshi_python_sync.models.create_fcm_subtrader_request import CreateFCMSubtraderRequest
22
24
  from kalshi_python_sync.models.create_fcm_subtrader_response import CreateFCMSubtraderResponse
23
25
  from kalshi_python_sync.models.get_fcm_event_contract_daily_cap_response import GetFCMEventContractDailyCapResponse
@@ -48,6 +50,295 @@ class FcmApi:
48
50
  self.api_client = api_client
49
51
 
50
52
 
53
+ @validate_call
54
+ def create_fcm_position_transfer(
55
+ self,
56
+ # Request body parameters as keyword arguments
57
+ **kwargs: Any,
58
+ ) -> CreateFCMPositionTransferResponse:
59
+ """Create FCM Position Transfer
60
+
61
+ Endpoint for FCM members to move a position in one market from one of their subtraders into a subtrader under their FCM's error account. **This endpoint must be enabled for your FCM by Kalshi.** Kalshi enables it by configuring the error account that receives transferred positions and gives you that account's user id, which prefixes `target_subtrader_id`. Contact Kalshi to enable it; until then, requests return 400. - The destination is always your FCM's error account. `target_subtrader_id` picks the subtrader under it, which is created on first use. - Each request moves one market for one source subtrader. To move many positions, send one request per subtrader and market. - The transfer is booked like a trade at `price_centicents`, which is always the YES price, even when moving NO. No fee is charged and no fill is created. For YES, the error account pays the price per contract; for NO, it pays $1 minus the price per contract. The FCM receives the same amount. Use 0 for YES or 10000 for NO to move no cash. These amounts assume the source holds the side being moved and the target subtrader holds no opposite position in that market; otherwise the positions net like a trade and the balance changes differ. - The source's current position is not checked. A request for more than the source holds, or with the opposite sign, flips or grows the source's position. - Requests are not idempotent. After a timeout or 5xx, check the position before retrying. - The market must be open, neither account may be blocked, and the error account must have enough available balance on the market's exchange index to pay for the transfer. Otherwise the request returns 409. **Example: moving YES.** A customer subtrader holds 10 YES contracts. Send `position_centicount` 1000 and `price_centicents` 4500 (YES at 45 cents): - The customer subtrader goes from 10 YES to 0, and the error account subtrader from 0 to 10 YES. - The error account pays 10 x $0.45 = $4.50 and the FCM receives $4.50. - Sending `price_centicents` 0 instead moves the position with no cash. **Example: moving NO.** A customer subtrader holds 5 NO contracts. Send `position_centicount` -500 and `price_centicents` 7000 (YES at 70 cents, so NO at 30 cents): - The customer subtrader goes from 5 NO to 0, and the error account subtrader from 0 to 5 NO. - The error account pays 5 x $0.30 = $1.50 and the FCM receives $1.50. - Sending `price_centicents` 10000 instead moves the position with no cash. Sending 0 makes the error account pay the full $1 per contract ($5.00).
62
+
63
+ :param create_fcm_position_transfer_request: (required)
64
+ :type create_fcm_position_transfer_request: CreateFCMPositionTransferRequest
65
+ :param _request_timeout: timeout setting for this request. If one
66
+ number provided, it will be total request
67
+ timeout. It can also be a pair (tuple) of
68
+ (connection, read) timeouts.
69
+ :type _request_timeout: int, tuple(int, int), optional
70
+ :param _request_auth: set to override the auth_settings for an a single
71
+ request; this effectively ignores the
72
+ authentication in the spec for a single request.
73
+ :type _request_auth: dict, optional
74
+ :param _content_type: force content-type for the request.
75
+ :type _content_type: str, Optional
76
+ :param _headers: set to override the headers for a single
77
+ request; this effectively ignores the headers
78
+ in the spec for a single request.
79
+ :type _headers: dict, optional
80
+ :param _host_index: set to override the host_index for a single
81
+ request; this effectively ignores the host_index
82
+ in the spec for a single request.
83
+ :type _host_index: int, optional
84
+ :return: Returns the result object.
85
+ """ # noqa: E501
86
+
87
+ # Create request object from kwargs
88
+ create_fcm_position_transfer_request = CreateFCMPositionTransferRequest(**kwargs) if kwargs else None
89
+
90
+ _param = self._create_fcm_position_transfer_serialize(
91
+ create_fcm_position_transfer_request=create_fcm_position_transfer_request,
92
+ _request_auth=kwargs.get('_request_auth'),
93
+ _content_type=kwargs.get('_content_type'),
94
+ _headers=kwargs.get('_headers'),
95
+ _host_index=kwargs.get('_host_index', 0)
96
+ )
97
+
98
+ _response_types_map: Dict[str, Optional[str]] = {
99
+ '201': "CreateFCMPositionTransferResponse",
100
+ '400': "ErrorResponse",
101
+ '401': "ErrorResponse",
102
+ '403': "ErrorResponse",
103
+ '404': "ErrorResponse",
104
+ '409': "ErrorResponse",
105
+ '429': "ErrorResponse",
106
+ '500': "ErrorResponse",
107
+ }
108
+ response_data = self.api_client.call_api(
109
+ *_param,
110
+ _request_timeout=kwargs.get('_request_timeout'),
111
+ )
112
+ response_data.read()
113
+ return self.api_client.response_deserialize(
114
+ response_data=response_data,
115
+ response_types_map=_response_types_map,
116
+ ).data
117
+
118
+
119
+ @validate_call
120
+ def create_fcm_position_transfer_with_http_info(
121
+ self,
122
+ create_fcm_position_transfer_request: CreateFCMPositionTransferRequest,
123
+ _request_timeout: Union[
124
+ None,
125
+ Annotated[StrictFloat, Field(gt=0)],
126
+ Tuple[
127
+ Annotated[StrictFloat, Field(gt=0)],
128
+ Annotated[StrictFloat, Field(gt=0)]
129
+ ]
130
+ ] = None,
131
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
132
+ _content_type: Optional[StrictStr] = None,
133
+ _headers: Optional[Dict[StrictStr, Any]] = None,
134
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
135
+ ) -> ApiResponse[CreateFCMPositionTransferResponse]:
136
+ """Create FCM Position Transfer
137
+
138
+ Endpoint for FCM members to move a position in one market from one of their subtraders into a subtrader under their FCM's error account. **This endpoint must be enabled for your FCM by Kalshi.** Kalshi enables it by configuring the error account that receives transferred positions and gives you that account's user id, which prefixes `target_subtrader_id`. Contact Kalshi to enable it; until then, requests return 400. - The destination is always your FCM's error account. `target_subtrader_id` picks the subtrader under it, which is created on first use. - Each request moves one market for one source subtrader. To move many positions, send one request per subtrader and market. - The transfer is booked like a trade at `price_centicents`, which is always the YES price, even when moving NO. No fee is charged and no fill is created. For YES, the error account pays the price per contract; for NO, it pays $1 minus the price per contract. The FCM receives the same amount. Use 0 for YES or 10000 for NO to move no cash. These amounts assume the source holds the side being moved and the target subtrader holds no opposite position in that market; otherwise the positions net like a trade and the balance changes differ. - The source's current position is not checked. A request for more than the source holds, or with the opposite sign, flips or grows the source's position. - Requests are not idempotent. After a timeout or 5xx, check the position before retrying. - The market must be open, neither account may be blocked, and the error account must have enough available balance on the market's exchange index to pay for the transfer. Otherwise the request returns 409. **Example: moving YES.** A customer subtrader holds 10 YES contracts. Send `position_centicount` 1000 and `price_centicents` 4500 (YES at 45 cents): - The customer subtrader goes from 10 YES to 0, and the error account subtrader from 0 to 10 YES. - The error account pays 10 x $0.45 = $4.50 and the FCM receives $4.50. - Sending `price_centicents` 0 instead moves the position with no cash. **Example: moving NO.** A customer subtrader holds 5 NO contracts. Send `position_centicount` -500 and `price_centicents` 7000 (YES at 70 cents, so NO at 30 cents): - The customer subtrader goes from 5 NO to 0, and the error account subtrader from 0 to 5 NO. - The error account pays 5 x $0.30 = $1.50 and the FCM receives $1.50. - Sending `price_centicents` 10000 instead moves the position with no cash. Sending 0 makes the error account pay the full $1 per contract ($5.00).
139
+
140
+ :param create_fcm_position_transfer_request: (required)
141
+ :type create_fcm_position_transfer_request: CreateFCMPositionTransferRequest
142
+ :param _request_timeout: timeout setting for this request. If one
143
+ number provided, it will be total request
144
+ timeout. It can also be a pair (tuple) of
145
+ (connection, read) timeouts.
146
+ :type _request_timeout: int, tuple(int, int), optional
147
+ :param _request_auth: set to override the auth_settings for an a single
148
+ request; this effectively ignores the
149
+ authentication in the spec for a single request.
150
+ :type _request_auth: dict, optional
151
+ :param _content_type: force content-type for the request.
152
+ :type _content_type: str, Optional
153
+ :param _headers: set to override the headers for a single
154
+ request; this effectively ignores the headers
155
+ in the spec for a single request.
156
+ :type _headers: dict, optional
157
+ :param _host_index: set to override the host_index for a single
158
+ request; this effectively ignores the host_index
159
+ in the spec for a single request.
160
+ :type _host_index: int, optional
161
+ :return: Returns the result object.
162
+ """ # noqa: E501
163
+
164
+ _param = self._create_fcm_position_transfer_serialize(
165
+ create_fcm_position_transfer_request=create_fcm_position_transfer_request,
166
+ _request_auth=_request_auth,
167
+ _content_type=_content_type,
168
+ _headers=_headers,
169
+ _host_index=_host_index
170
+ )
171
+
172
+ _response_types_map: Dict[str, Optional[str]] = {
173
+ '201': "CreateFCMPositionTransferResponse",
174
+ '400': "ErrorResponse",
175
+ '401': "ErrorResponse",
176
+ '403': "ErrorResponse",
177
+ '404': "ErrorResponse",
178
+ '409': "ErrorResponse",
179
+ '429': "ErrorResponse",
180
+ '500': "ErrorResponse",
181
+ }
182
+ response_data = self.api_client.call_api(
183
+ *_param,
184
+ _request_timeout=_request_timeout
185
+ )
186
+ response_data.read()
187
+ return self.api_client.response_deserialize(
188
+ response_data=response_data,
189
+ response_types_map=_response_types_map,
190
+ )
191
+
192
+
193
+ @validate_call
194
+ def create_fcm_position_transfer_without_preload_content(
195
+ self,
196
+ create_fcm_position_transfer_request: CreateFCMPositionTransferRequest,
197
+ _request_timeout: Union[
198
+ None,
199
+ Annotated[StrictFloat, Field(gt=0)],
200
+ Tuple[
201
+ Annotated[StrictFloat, Field(gt=0)],
202
+ Annotated[StrictFloat, Field(gt=0)]
203
+ ]
204
+ ] = None,
205
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
206
+ _content_type: Optional[StrictStr] = None,
207
+ _headers: Optional[Dict[StrictStr, Any]] = None,
208
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
209
+ ) -> RESTResponseType:
210
+ """Create FCM Position Transfer
211
+
212
+ Endpoint for FCM members to move a position in one market from one of their subtraders into a subtrader under their FCM's error account. **This endpoint must be enabled for your FCM by Kalshi.** Kalshi enables it by configuring the error account that receives transferred positions and gives you that account's user id, which prefixes `target_subtrader_id`. Contact Kalshi to enable it; until then, requests return 400. - The destination is always your FCM's error account. `target_subtrader_id` picks the subtrader under it, which is created on first use. - Each request moves one market for one source subtrader. To move many positions, send one request per subtrader and market. - The transfer is booked like a trade at `price_centicents`, which is always the YES price, even when moving NO. No fee is charged and no fill is created. For YES, the error account pays the price per contract; for NO, it pays $1 minus the price per contract. The FCM receives the same amount. Use 0 for YES or 10000 for NO to move no cash. These amounts assume the source holds the side being moved and the target subtrader holds no opposite position in that market; otherwise the positions net like a trade and the balance changes differ. - The source's current position is not checked. A request for more than the source holds, or with the opposite sign, flips or grows the source's position. - Requests are not idempotent. After a timeout or 5xx, check the position before retrying. - The market must be open, neither account may be blocked, and the error account must have enough available balance on the market's exchange index to pay for the transfer. Otherwise the request returns 409. **Example: moving YES.** A customer subtrader holds 10 YES contracts. Send `position_centicount` 1000 and `price_centicents` 4500 (YES at 45 cents): - The customer subtrader goes from 10 YES to 0, and the error account subtrader from 0 to 10 YES. - The error account pays 10 x $0.45 = $4.50 and the FCM receives $4.50. - Sending `price_centicents` 0 instead moves the position with no cash. **Example: moving NO.** A customer subtrader holds 5 NO contracts. Send `position_centicount` -500 and `price_centicents` 7000 (YES at 70 cents, so NO at 30 cents): - The customer subtrader goes from 5 NO to 0, and the error account subtrader from 0 to 5 NO. - The error account pays 5 x $0.30 = $1.50 and the FCM receives $1.50. - Sending `price_centicents` 10000 instead moves the position with no cash. Sending 0 makes the error account pay the full $1 per contract ($5.00).
213
+
214
+ :param create_fcm_position_transfer_request: (required)
215
+ :type create_fcm_position_transfer_request: CreateFCMPositionTransferRequest
216
+ :param _request_timeout: timeout setting for this request. If one
217
+ number provided, it will be total request
218
+ timeout. It can also be a pair (tuple) of
219
+ (connection, read) timeouts.
220
+ :type _request_timeout: int, tuple(int, int), optional
221
+ :param _request_auth: set to override the auth_settings for an a single
222
+ request; this effectively ignores the
223
+ authentication in the spec for a single request.
224
+ :type _request_auth: dict, optional
225
+ :param _content_type: force content-type for the request.
226
+ :type _content_type: str, Optional
227
+ :param _headers: set to override the headers for a single
228
+ request; this effectively ignores the headers
229
+ in the spec for a single request.
230
+ :type _headers: dict, optional
231
+ :param _host_index: set to override the host_index for a single
232
+ request; this effectively ignores the host_index
233
+ in the spec for a single request.
234
+ :type _host_index: int, optional
235
+ :return: Returns the result object.
236
+ """ # noqa: E501
237
+
238
+ _param = self._create_fcm_position_transfer_serialize(
239
+ create_fcm_position_transfer_request=create_fcm_position_transfer_request,
240
+ _request_auth=_request_auth,
241
+ _content_type=_content_type,
242
+ _headers=_headers,
243
+ _host_index=_host_index
244
+ )
245
+
246
+ _response_types_map: Dict[str, Optional[str]] = {
247
+ '201': "CreateFCMPositionTransferResponse",
248
+ '400': "ErrorResponse",
249
+ '401': "ErrorResponse",
250
+ '403': "ErrorResponse",
251
+ '404': "ErrorResponse",
252
+ '409': "ErrorResponse",
253
+ '429': "ErrorResponse",
254
+ '500': "ErrorResponse",
255
+ }
256
+ response_data = self.api_client.call_api(
257
+ *_param,
258
+ _request_timeout=_request_timeout
259
+ )
260
+ return response_data.response
261
+
262
+
263
+ def _create_fcm_position_transfer_serialize(
264
+ self,
265
+ create_fcm_position_transfer_request,
266
+ _request_auth,
267
+ _content_type,
268
+ _headers,
269
+ _host_index,
270
+ ) -> RequestSerialized:
271
+
272
+ _host = None
273
+
274
+ _collection_formats: Dict[str, str] = {
275
+ }
276
+
277
+ _path_params: Dict[str, str] = {}
278
+ _query_params: List[Tuple[str, str]] = []
279
+ _header_params: Dict[str, Optional[str]] = _headers or {}
280
+ _form_params: List[Tuple[str, str]] = []
281
+ _files: Dict[
282
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
283
+ ] = {}
284
+ _body_params: Optional[bytes] = None
285
+
286
+ # process the path parameters
287
+ # process the query parameters
288
+ # process the header parameters
289
+ # process the form parameters
290
+ # process the body parameter
291
+ if create_fcm_position_transfer_request is not None:
292
+ _body_params = create_fcm_position_transfer_request
293
+
294
+
295
+ # set the HTTP header `Accept`
296
+ if 'Accept' not in _header_params:
297
+ _header_params['Accept'] = self.api_client.select_header_accept(
298
+ [
299
+ 'application/json'
300
+ ]
301
+ )
302
+
303
+ # set the HTTP header `Content-Type`
304
+ if _content_type:
305
+ _header_params['Content-Type'] = _content_type
306
+ else:
307
+ _default_content_type = (
308
+ self.api_client.select_header_content_type(
309
+ [
310
+ 'application/json'
311
+ ]
312
+ )
313
+ )
314
+ if _default_content_type is not None:
315
+ _header_params['Content-Type'] = _default_content_type
316
+
317
+ # authentication setting
318
+ _auth_settings: List[str] = [
319
+ 'kalshiAccessSignature',
320
+ 'kalshiAccessKey',
321
+ 'kalshiAccessTimestamp'
322
+ ]
323
+
324
+ return self.api_client.param_serialize(
325
+ method='POST',
326
+ resource_path='/fcm/positions/transfers',
327
+ path_params=_path_params,
328
+ query_params=_query_params,
329
+ header_params=_header_params,
330
+ body=_body_params,
331
+ post_params=_form_params,
332
+ files=_files,
333
+ auth_settings=_auth_settings,
334
+ collection_formats=_collection_formats,
335
+ _host=_host,
336
+ _request_auth=_request_auth
337
+ )
338
+
339
+
340
+
341
+
51
342
  @validate_call
52
343
  def create_fcm_subtrader(
53
344
  self,