kalshi-python-async 3.0.0__tar.gz
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-3.0.0/PKG-INFO +78 -0
- kalshi_python_async-3.0.0/README.md +52 -0
- kalshi_python_async-3.0.0/kalshi_python_async/__init__.py +272 -0
- kalshi_python_async-3.0.0/kalshi_python_async/api/__init__.py +19 -0
- kalshi_python_async-3.0.0/kalshi_python_async/api/api_keys_api.py +1098 -0
- kalshi_python_async-3.0.0/kalshi_python_async/api/communications_api.py +3216 -0
- kalshi_python_async-3.0.0/kalshi_python_async/api/events_api.py +1941 -0
- kalshi_python_async-3.0.0/kalshi_python_async/api/exchange_api.py +1263 -0
- kalshi_python_async-3.0.0/kalshi_python_async/api/fcm_api.py +792 -0
- kalshi_python_async-3.0.0/kalshi_python_async/api/incentive_programs_api.py +346 -0
- kalshi_python_async-3.0.0/kalshi_python_async/api/live_data_api.py +564 -0
- kalshi_python_async-3.0.0/kalshi_python_async/api/market_api.py +2568 -0
- kalshi_python_async-3.0.0/kalshi_python_async/api/milestone_api.py +689 -0
- kalshi_python_async-3.0.0/kalshi_python_async/api/multivariate_api.py +1486 -0
- kalshi_python_async-3.0.0/kalshi_python_async/api/order_groups_api.py +1375 -0
- kalshi_python_async-3.0.0/kalshi_python_async/api/orders_api.py +2913 -0
- kalshi_python_async-3.0.0/kalshi_python_async/api/portfolio_api.py +1572 -0
- kalshi_python_async-3.0.0/kalshi_python_async/api/search_api.py +516 -0
- kalshi_python_async-3.0.0/kalshi_python_async/api/structured_targets_api.py +605 -0
- kalshi_python_async-3.0.0/kalshi_python_async/api_client.py +833 -0
- kalshi_python_async-3.0.0/kalshi_python_async/api_response.py +21 -0
- kalshi_python_async-3.0.0/kalshi_python_async/auth.py +89 -0
- kalshi_python_async-3.0.0/kalshi_python_async/configuration.py +622 -0
- kalshi_python_async-3.0.0/kalshi_python_async/exceptions.py +216 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/__init__.py +136 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/accept_quote_request.py +94 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/amend_order_request.py +120 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/amend_order_response.py +96 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/announcement.py +108 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/api_key.py +89 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/associated_event.py +105 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/batch_cancel_orders_individual_response.py +111 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/batch_cancel_orders_request.py +87 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/batch_cancel_orders_response.py +95 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/batch_create_orders_individual_response.py +114 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/batch_create_orders_request.py +95 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/batch_create_orders_response.py +95 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/batch_get_market_candlesticks_response.py +95 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/bid_ask_distribution.py +101 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/cancel_order_response.py +93 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/create_api_key_request.py +89 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/create_api_key_response.py +87 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/create_market_in_multivariate_event_collection_request.py +95 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/create_market_in_multivariate_event_collection_response.py +89 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/create_order_group_request.py +88 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/create_order_group_response.py +87 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/create_order_request.py +159 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/create_order_response.py +91 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/create_quote_request.py +93 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/create_quote_response.py +87 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/create_rfq_request.py +97 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/create_rfq_response.py +87 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/daily_schedule.py +89 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/decrease_order_request.py +90 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/decrease_order_response.py +91 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/error_response.py +93 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/event_data.py +133 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/event_position.py +105 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/exchange_status.py +97 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/fill.py +134 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/forecast_percentiles_point.py +101 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/generate_api_key_request.py +87 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/generate_api_key_response.py +89 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_api_keys_response.py +95 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_balance_response.py +91 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_communications_id_response.py +87 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_event_candlesticks_response.py +104 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_event_forecast_percentiles_history_response.py +95 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_event_metadata_response.py +123 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_event_response.py +101 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_events_candlesticks_response.py +95 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_events_candlesticks_response_events_inner.py +106 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_events_response.py +107 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_exchange_announcements_response.py +95 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_exchange_schedule_response.py +91 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_fills_response.py +97 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_filters_by_sports_response.py +102 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_incentive_programs_response.py +97 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_live_data_response.py +91 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_live_datas_response.py +95 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_market_candlesticks_response.py +97 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_market_orderbook_response.py +91 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_market_response.py +91 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_markets_response.py +97 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_milestone_response.py +91 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_milestones_response.py +97 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_multivariate_event_collection_lookup_history_response.py +95 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_multivariate_event_collection_response.py +91 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_multivariate_event_collections_response.py +97 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_multivariate_events_response.py +97 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_order_group_response.py +89 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_order_groups_response.py +95 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_order_queue_position_response.py +87 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_order_queue_positions_response.py +95 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_order_response.py +91 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_orders_response.py +97 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_portfolio_resting_order_total_value_response.py +87 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_positions_response.py +107 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_quote_response.py +91 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_quotes_response.py +97 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_rfq_response.py +91 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_rfqs_response.py +97 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_series_fee_changes_response.py +95 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_series_list_response.py +95 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_series_response.py +91 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_settlements_response.py +97 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_structured_target_response.py +91 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_structured_targets_response.py +97 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_tags_for_series_categories_response.py +87 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_trades_response.py +97 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/get_user_data_timestamp_response.py +88 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/incentive_program.py +121 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/live_data.py +91 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/lookup_point.py +102 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/lookup_tickers_for_market_in_multivariate_event_collection_request.py +95 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/lookup_tickers_for_market_in_multivariate_event_collection_response.py +89 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/maintenance_window.py +90 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/market.py +307 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/market_candlestick.py +108 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/market_candlesticks_response.py +97 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/market_metadata.py +91 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/market_position.py +110 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/milestone.py +120 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/multivariate_event_collection.py +122 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/mve_selected_leg.py +91 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/order.py +189 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/order_group.py +89 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/order_queue_position.py +91 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/order_status.py +38 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/orderbook.py +94 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/percentile_point.py +93 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/price_distribution.py +157 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/price_range.py +91 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/quote.py +153 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/rfq.py +129 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/schedule.py +105 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/scope_list.py +87 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/self_trade_prevention_type.py +37 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/series.py +129 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/series_fee_change.py +103 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/settlement.py +118 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/settlement_source.py +89 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/sport_filter_details.py +102 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/structured_target.py +98 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/ticker_pair.py +98 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/trade.py +113 -0
- kalshi_python_async-3.0.0/kalshi_python_async/models/weekly_schedule.py +154 -0
- kalshi_python_async-3.0.0/kalshi_python_async/py.typed +0 -0
- kalshi_python_async-3.0.0/kalshi_python_async/rest.py +213 -0
- kalshi_python_async-3.0.0/kalshi_python_async.egg-info/PKG-INFO +78 -0
- kalshi_python_async-3.0.0/kalshi_python_async.egg-info/SOURCES.txt +293 -0
- kalshi_python_async-3.0.0/kalshi_python_async.egg-info/dependency_links.txt +1 -0
- kalshi_python_async-3.0.0/kalshi_python_async.egg-info/requires.txt +12 -0
- kalshi_python_async-3.0.0/kalshi_python_async.egg-info/top_level.txt +1 -0
- kalshi_python_async-3.0.0/pyproject.toml +39 -0
- kalshi_python_async-3.0.0/setup.cfg +7 -0
- kalshi_python_async-3.0.0/setup.py +52 -0
- kalshi_python_async-3.0.0/test/test_accept_quote_request.py +52 -0
- kalshi_python_async-3.0.0/test/test_amend_order_request.py +65 -0
- kalshi_python_async-3.0.0/test/test_amend_order_response.py +174 -0
- kalshi_python_async-3.0.0/test/test_announcement.py +58 -0
- kalshi_python_async-3.0.0/test/test_api_key.py +54 -0
- kalshi_python_async-3.0.0/test/test_api_keys_api.py +59 -0
- kalshi_python_async-3.0.0/test/test_associated_event.py +62 -0
- kalshi_python_async-3.0.0/test/test_batch_cancel_orders_individual_response.py +90 -0
- kalshi_python_async-3.0.0/test/test_batch_cancel_orders_request.py +56 -0
- kalshi_python_async-3.0.0/test/test_batch_cancel_orders_response.py +64 -0
- kalshi_python_async-3.0.0/test/test_batch_create_orders_individual_response.py +87 -0
- kalshi_python_async-3.0.0/test/test_batch_create_orders_request.py +94 -0
- kalshi_python_async-3.0.0/test/test_batch_create_orders_response.py +62 -0
- kalshi_python_async-3.0.0/test/test_batch_get_market_candlesticks_response.py +132 -0
- kalshi_python_async-3.0.0/test/test_bid_ask_distribution.py +66 -0
- kalshi_python_async-3.0.0/test/test_cancel_order_response.py +114 -0
- kalshi_python_async-3.0.0/test/test_communications_api.py +108 -0
- kalshi_python_async-3.0.0/test/test_create_api_key_request.py +54 -0
- kalshi_python_async-3.0.0/test/test_create_api_key_response.py +52 -0
- kalshi_python_async-3.0.0/test/test_create_market_in_multivariate_event_collection_request.py +62 -0
- kalshi_python_async-3.0.0/test/test_create_market_in_multivariate_event_collection_response.py +54 -0
- kalshi_python_async-3.0.0/test/test_create_order_group_request.py +52 -0
- kalshi_python_async-3.0.0/test/test_create_order_group_response.py +52 -0
- kalshi_python_async-3.0.0/test/test_create_order_request.py +73 -0
- kalshi_python_async-3.0.0/test/test_create_order_response.py +112 -0
- kalshi_python_async-3.0.0/test/test_create_quote_request.py +58 -0
- kalshi_python_async-3.0.0/test/test_create_quote_response.py +52 -0
- kalshi_python_async-3.0.0/test/test_create_rfq_request.py +58 -0
- kalshi_python_async-3.0.0/test/test_create_rfq_response.py +52 -0
- kalshi_python_async-3.0.0/test/test_daily_schedule.py +54 -0
- kalshi_python_async-3.0.0/test/test_decrease_order_request.py +52 -0
- kalshi_python_async-3.0.0/test/test_decrease_order_response.py +112 -0
- kalshi_python_async-3.0.0/test/test_error_response.py +54 -0
- kalshi_python_async-3.0.0/test/test_event_data.py +144 -0
- kalshi_python_async-3.0.0/test/test_event_position.py +61 -0
- kalshi_python_async-3.0.0/test/test_events_api.py +80 -0
- kalshi_python_async-3.0.0/test/test_exchange_api.py +66 -0
- kalshi_python_async-3.0.0/test/test_exchange_status.py +55 -0
- kalshi_python_async-3.0.0/test/test_fcm_api.py +45 -0
- kalshi_python_async-3.0.0/test/test_fill.py +81 -0
- kalshi_python_async-3.0.0/test/test_forecast_percentiles_point.py +70 -0
- kalshi_python_async-3.0.0/test/test_generate_api_key_request.py +52 -0
- kalshi_python_async-3.0.0/test/test_generate_api_key_response.py +54 -0
- kalshi_python_async-3.0.0/test/test_get_api_keys_response.py +60 -0
- kalshi_python_async-3.0.0/test/test_get_balance_response.py +56 -0
- kalshi_python_async-3.0.0/test/test_get_communications_id_response.py +52 -0
- kalshi_python_async-3.0.0/test/test_get_event_candlesticks_response.py +144 -0
- kalshi_python_async-3.0.0/test/test_get_event_forecast_percentiles_history_response.py +76 -0
- kalshi_python_async-3.0.0/test/test_get_event_metadata_response.py +64 -0
- kalshi_python_async-3.0.0/test/test_get_event_response.py +370 -0
- kalshi_python_async-3.0.0/test/test_get_events_candlesticks_response.py +152 -0
- kalshi_python_async-3.0.0/test/test_get_events_candlesticks_response_events_inner.py +146 -0
- kalshi_python_async-3.0.0/test/test_get_events_response.py +247 -0
- kalshi_python_async-3.0.0/test/test_get_exchange_announcements_response.py +64 -0
- kalshi_python_async-3.0.0/test/test_get_exchange_schedule_response.py +122 -0
- kalshi_python_async-3.0.0/test/test_get_fills_response.py +92 -0
- kalshi_python_async-3.0.0/test/test_get_filters_by_sports_response.py +80 -0
- kalshi_python_async-3.0.0/test/test_get_incentive_programs_response.py +75 -0
- kalshi_python_async-3.0.0/test/test_get_live_data_response.py +56 -0
- kalshi_python_async-3.0.0/test/test_get_live_datas_response.py +60 -0
- kalshi_python_async-3.0.0/test/test_get_market_candlesticks_response.py +134 -0
- kalshi_python_async-3.0.0/test/test_get_market_orderbook_response.py +92 -0
- kalshi_python_async-3.0.0/test/test_get_market_response.py +194 -0
- kalshi_python_async-3.0.0/test/test_get_markets_response.py +200 -0
- kalshi_python_async-3.0.0/test/test_get_milestone_response.py +84 -0
- kalshi_python_async-3.0.0/test/test_get_milestones_response.py +89 -0
- kalshi_python_async-3.0.0/test/test_get_multivariate_event_collection_lookup_history_response.py +74 -0
- kalshi_python_async-3.0.0/test/test_get_multivariate_event_collection_response.py +102 -0
- kalshi_python_async-3.0.0/test/test_get_multivariate_event_collections_response.py +107 -0
- kalshi_python_async-3.0.0/test/test_get_multivariate_events_response.py +228 -0
- kalshi_python_async-3.0.0/test/test_get_order_group_response.py +58 -0
- kalshi_python_async-3.0.0/test/test_get_order_groups_response.py +55 -0
- kalshi_python_async-3.0.0/test/test_get_order_queue_position_response.py +52 -0
- kalshi_python_async-3.0.0/test/test_get_order_queue_positions_response.py +62 -0
- kalshi_python_async-3.0.0/test/test_get_order_response.py +112 -0
- kalshi_python_async-3.0.0/test/test_get_orders_response.py +118 -0
- kalshi_python_async-3.0.0/test/test_get_portfolio_resting_order_total_value_response.py +52 -0
- kalshi_python_async-3.0.0/test/test_get_positions_response.py +80 -0
- kalshi_python_async-3.0.0/test/test_get_quote_response.py +98 -0
- kalshi_python_async-3.0.0/test/test_get_quotes_response.py +103 -0
- kalshi_python_async-3.0.0/test/test_get_rfq_response.py +90 -0
- kalshi_python_async-3.0.0/test/test_get_rfqs_response.py +95 -0
- kalshi_python_async-3.0.0/test/test_get_series_fee_changes_response.py +66 -0
- kalshi_python_async-3.0.0/test/test_get_series_list_response.py +96 -0
- kalshi_python_async-3.0.0/test/test_get_series_response.py +92 -0
- kalshi_python_async-3.0.0/test/test_get_settlements_response.py +77 -0
- kalshi_python_async-3.0.0/test/test_get_structured_target_response.py +57 -0
- kalshi_python_async-3.0.0/test/test_get_structured_targets_response.py +60 -0
- kalshi_python_async-3.0.0/test/test_get_tags_for_series_categories_response.py +60 -0
- kalshi_python_async-3.0.0/test/test_get_trades_response.py +78 -0
- kalshi_python_async-3.0.0/test/test_get_user_data_timestamp_response.py +52 -0
- kalshi_python_async-3.0.0/test/test_incentive_program.py +66 -0
- kalshi_python_async-3.0.0/test/test_incentive_programs_api.py +38 -0
- kalshi_python_async-3.0.0/test/test_live_data.py +54 -0
- kalshi_python_async-3.0.0/test/test_live_data_api.py +45 -0
- kalshi_python_async-3.0.0/test/test_lookup_point.py +68 -0
- kalshi_python_async-3.0.0/test/test_lookup_tickers_for_market_in_multivariate_event_collection_request.py +62 -0
- kalshi_python_async-3.0.0/test/test_lookup_tickers_for_market_in_multivariate_event_collection_response.py +54 -0
- kalshi_python_async-3.0.0/test/test_maintenance_window.py +54 -0
- kalshi_python_async-3.0.0/test/test_market.py +174 -0
- kalshi_python_async-3.0.0/test/test_market_api.py +80 -0
- kalshi_python_async-3.0.0/test/test_market_candlestick.py +126 -0
- kalshi_python_async-3.0.0/test/test_market_candlesticks_response.py +126 -0
- kalshi_python_async-3.0.0/test/test_market_metadata.py +56 -0
- kalshi_python_async-3.0.0/test/test_market_position.py +73 -0
- kalshi_python_async-3.0.0/test/test_milestone.py +80 -0
- kalshi_python_async-3.0.0/test/test_milestone_api.py +45 -0
- kalshi_python_async-3.0.0/test/test_multivariate_api.py +66 -0
- kalshi_python_async-3.0.0/test/test_multivariate_event_collection.py +100 -0
- kalshi_python_async-3.0.0/test/test_mve_selected_leg.py +53 -0
- kalshi_python_async-3.0.0/test/test_order.py +102 -0
- kalshi_python_async-3.0.0/test/test_order_group.py +54 -0
- kalshi_python_async-3.0.0/test/test_order_groups_api.py +66 -0
- kalshi_python_async-3.0.0/test/test_order_queue_position.py +56 -0
- kalshi_python_async-3.0.0/test/test_order_status.py +33 -0
- kalshi_python_async-3.0.0/test/test_orderbook.py +80 -0
- kalshi_python_async-3.0.0/test/test_orders_api.py +136 -0
- kalshi_python_async-3.0.0/test/test_percentile_point.py +58 -0
- kalshi_python_async-3.0.0/test/test_portfolio_api.py +66 -0
- kalshi_python_async-3.0.0/test/test_price_distribution.py +66 -0
- kalshi_python_async-3.0.0/test/test_price_range.py +56 -0
- kalshi_python_async-3.0.0/test/test_quote.py +84 -0
- kalshi_python_async-3.0.0/test/test_rfq.py +75 -0
- kalshi_python_async-3.0.0/test/test_schedule.py +120 -0
- kalshi_python_async-3.0.0/test/test_scope_list.py +56 -0
- kalshi_python_async-3.0.0/test/test_search_api.py +45 -0
- kalshi_python_async-3.0.0/test/test_self_trade_prevention_type.py +33 -0
- kalshi_python_async-3.0.0/test/test_series.py +89 -0
- kalshi_python_async-3.0.0/test/test_series_fee_change.py +60 -0
- kalshi_python_async-3.0.0/test/test_settlement.py +69 -0
- kalshi_python_async-3.0.0/test/test_settlement_source.py +52 -0
- kalshi_python_async-3.0.0/test/test_sport_filter_details.py +68 -0
- kalshi_python_async-3.0.0/test/test_structured_target.py +56 -0
- kalshi_python_async-3.0.0/test/test_structured_targets_api.py +45 -0
- kalshi_python_async-3.0.0/test/test_ticker_pair.py +56 -0
- kalshi_python_async-3.0.0/test/test_trade.py +69 -0
- kalshi_python_async-3.0.0/test/test_weekly_schedule.py +124 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: kalshi_python_async
|
|
3
|
+
Version: 3.0.0
|
|
4
|
+
Summary: Manually defined OpenAPI spec for endpoints being migrated to spec-first approach
|
|
5
|
+
Home-page: https://github.com/Kalshi/exchange-infra
|
|
6
|
+
Author: OpenAPI Generator community
|
|
7
|
+
Author-email: Kalshi <support@kalshi.com>
|
|
8
|
+
License: LicenseRef-Proprietary
|
|
9
|
+
Project-URL: Repository, https://github.com/Kalshi/exchange-infra
|
|
10
|
+
Keywords: OpenAPI,OpenAPI-Generator,Kalshi Trading API
|
|
11
|
+
Requires-Python: >=3.13
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
Requires-Dist: aiohttp>=3.9.0
|
|
14
|
+
Requires-Dist: aiohttp-retry>=2.8.0
|
|
15
|
+
Requires-Dist: python-dateutil>=2.8.2
|
|
16
|
+
Requires-Dist: pydantic>=2
|
|
17
|
+
Requires-Dist: typing-extensions>=4.7.1
|
|
18
|
+
Requires-Dist: lazy-imports<2,>=1
|
|
19
|
+
Requires-Dist: cryptography>=41.0.0
|
|
20
|
+
Provides-Extra: dev
|
|
21
|
+
Requires-Dist: pytest>=7.2.1; extra == "dev"
|
|
22
|
+
Requires-Dist: pytest-cov>=2.8.1; extra == "dev"
|
|
23
|
+
Requires-Dist: mypy>=1.5; extra == "dev"
|
|
24
|
+
Dynamic: author
|
|
25
|
+
Dynamic: home-page
|
|
26
|
+
|
|
27
|
+
# Kalshi Trading API
|
|
28
|
+
Complete API for the Kalshi trading platform including all handlers for SDK generation
|
|
29
|
+
|
|
30
|
+
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
31
|
+
|
|
32
|
+
- API version: 3.0.0
|
|
33
|
+
- Package version: 3.0.0
|
|
34
|
+
- Generator version: 7.17.0
|
|
35
|
+
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
|
|
36
|
+
For more information, please visit []()
|
|
37
|
+
|
|
38
|
+
## Requirements.
|
|
39
|
+
|
|
40
|
+
Python 3.9+
|
|
41
|
+
|
|
42
|
+
## Installation & Usage
|
|
43
|
+
```python
|
|
44
|
+
pip install kalshi-python
|
|
45
|
+
import kalshi_python
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Getting Started
|
|
49
|
+
|
|
50
|
+
Please follow the [installation procedure](#installation--usage) and then run the following:
|
|
51
|
+
|
|
52
|
+
```python
|
|
53
|
+
from kalshi_python import Configuration, KalshiClient
|
|
54
|
+
|
|
55
|
+
# Configure the client
|
|
56
|
+
config = Configuration(
|
|
57
|
+
host="https://api.elections.kalshi.com/trade-api/v2"
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
# For authenticated requests
|
|
61
|
+
# Read private key from file
|
|
62
|
+
with open("path/to/private_key.pem", "r") as f:
|
|
63
|
+
private_key = f.read()
|
|
64
|
+
|
|
65
|
+
config.api_key_id = "your-api-key-id"
|
|
66
|
+
config.private_key_pem = private_key
|
|
67
|
+
|
|
68
|
+
# Initialize the client
|
|
69
|
+
client = KalshiClient(config)
|
|
70
|
+
|
|
71
|
+
# Make API calls
|
|
72
|
+
balance = client.get_balance()
|
|
73
|
+
print(f"Balance: ${balance.balance / 100:.2f}")
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Documentation
|
|
77
|
+
|
|
78
|
+
Full documentation is available at [docs.kalshi.com](https://docs.kalshi.com)
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Kalshi Trading API
|
|
2
|
+
Complete API for the Kalshi trading platform including all handlers for SDK generation
|
|
3
|
+
|
|
4
|
+
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
5
|
+
|
|
6
|
+
- API version: 3.0.0
|
|
7
|
+
- Package version: 3.0.0
|
|
8
|
+
- Generator version: 7.17.0
|
|
9
|
+
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
|
|
10
|
+
For more information, please visit []()
|
|
11
|
+
|
|
12
|
+
## Requirements.
|
|
13
|
+
|
|
14
|
+
Python 3.9+
|
|
15
|
+
|
|
16
|
+
## Installation & Usage
|
|
17
|
+
```python
|
|
18
|
+
pip install kalshi-python
|
|
19
|
+
import kalshi_python
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Getting Started
|
|
23
|
+
|
|
24
|
+
Please follow the [installation procedure](#installation--usage) and then run the following:
|
|
25
|
+
|
|
26
|
+
```python
|
|
27
|
+
from kalshi_python import Configuration, KalshiClient
|
|
28
|
+
|
|
29
|
+
# Configure the client
|
|
30
|
+
config = Configuration(
|
|
31
|
+
host="https://api.elections.kalshi.com/trade-api/v2"
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
# For authenticated requests
|
|
35
|
+
# Read private key from file
|
|
36
|
+
with open("path/to/private_key.pem", "r") as f:
|
|
37
|
+
private_key = f.read()
|
|
38
|
+
|
|
39
|
+
config.api_key_id = "your-api-key-id"
|
|
40
|
+
config.private_key_pem = private_key
|
|
41
|
+
|
|
42
|
+
# Initialize the client
|
|
43
|
+
client = KalshiClient(config)
|
|
44
|
+
|
|
45
|
+
# Make API calls
|
|
46
|
+
balance = client.get_balance()
|
|
47
|
+
print(f"Balance: ${balance.balance / 100:.2f}")
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Documentation
|
|
51
|
+
|
|
52
|
+
Full documentation is available at [docs.kalshi.com](https://docs.kalshi.com)
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
# flake8: noqa
|
|
4
|
+
|
|
5
|
+
"""
|
|
6
|
+
Kalshi Trade API Manual Endpoints
|
|
7
|
+
|
|
8
|
+
Manually defined OpenAPI spec for endpoints being migrated to spec-first approach
|
|
9
|
+
|
|
10
|
+
The version of the OpenAPI document: 3.0.0
|
|
11
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
12
|
+
|
|
13
|
+
Do not edit the class manually.
|
|
14
|
+
""" # noqa: E501
|
|
15
|
+
|
|
16
|
+
__version__ = "3.0.0"
|
|
17
|
+
|
|
18
|
+
# import apis into sdk package
|
|
19
|
+
from kalshi_python_async.api.api_keys_api import ApiKeysApi
|
|
20
|
+
from kalshi_python_async.api.communications_api import CommunicationsApi
|
|
21
|
+
from kalshi_python_async.api.events_api import EventsApi
|
|
22
|
+
from kalshi_python_async.api.exchange_api import ExchangeApi
|
|
23
|
+
from kalshi_python_async.api.fcm_api import FcmApi
|
|
24
|
+
from kalshi_python_async.api.incentive_programs_api import IncentiveProgramsApi
|
|
25
|
+
from kalshi_python_async.api.live_data_api import LiveDataApi
|
|
26
|
+
from kalshi_python_async.api.market_api import MarketApi
|
|
27
|
+
from kalshi_python_async.api.milestone_api import MilestoneApi
|
|
28
|
+
from kalshi_python_async.api.multivariate_api import MultivariateApi
|
|
29
|
+
from kalshi_python_async.api.order_groups_api import OrderGroupsApi
|
|
30
|
+
from kalshi_python_async.api.orders_api import OrdersApi
|
|
31
|
+
from kalshi_python_async.api.portfolio_api import PortfolioApi
|
|
32
|
+
from kalshi_python_async.api.search_api import SearchApi
|
|
33
|
+
from kalshi_python_async.api.structured_targets_api import StructuredTargetsApi
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
# import ApiClient
|
|
37
|
+
from kalshi_python_async.api_response import ApiResponse
|
|
38
|
+
from kalshi_python_async.api_client import ApiClient
|
|
39
|
+
from kalshi_python_async.configuration import Configuration
|
|
40
|
+
from kalshi_python_async.exceptions import OpenApiException
|
|
41
|
+
from kalshi_python_async.exceptions import ApiTypeError
|
|
42
|
+
from kalshi_python_async.exceptions import ApiValueError
|
|
43
|
+
from kalshi_python_async.exceptions import ApiKeyError
|
|
44
|
+
from kalshi_python_async.exceptions import ApiAttributeError
|
|
45
|
+
from kalshi_python_async.exceptions import ApiException
|
|
46
|
+
|
|
47
|
+
# Kalshi-specific authentication
|
|
48
|
+
from kalshi_python_async.auth import KalshiAuth
|
|
49
|
+
|
|
50
|
+
# Convenience imports for exceptions
|
|
51
|
+
from kalshi_python_async.exceptions import (
|
|
52
|
+
BadRequestException,
|
|
53
|
+
UnauthorizedException,
|
|
54
|
+
ForbiddenException,
|
|
55
|
+
NotFoundException,
|
|
56
|
+
ConflictException,
|
|
57
|
+
ServiceException,
|
|
58
|
+
UnprocessableEntityException,
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
# import models into sdk package
|
|
62
|
+
from kalshi_python_async.models.accept_quote_request import AcceptQuoteRequest
|
|
63
|
+
from kalshi_python_async.models.amend_order_request import AmendOrderRequest
|
|
64
|
+
from kalshi_python_async.models.amend_order_response import AmendOrderResponse
|
|
65
|
+
from kalshi_python_async.models.announcement import Announcement
|
|
66
|
+
from kalshi_python_async.models.api_key import ApiKey
|
|
67
|
+
from kalshi_python_async.models.associated_event import AssociatedEvent
|
|
68
|
+
from kalshi_python_async.models.batch_cancel_orders_individual_response import BatchCancelOrdersIndividualResponse
|
|
69
|
+
from kalshi_python_async.models.batch_cancel_orders_request import BatchCancelOrdersRequest
|
|
70
|
+
from kalshi_python_async.models.batch_cancel_orders_response import BatchCancelOrdersResponse
|
|
71
|
+
from kalshi_python_async.models.batch_create_orders_individual_response import BatchCreateOrdersIndividualResponse
|
|
72
|
+
from kalshi_python_async.models.batch_create_orders_request import BatchCreateOrdersRequest
|
|
73
|
+
from kalshi_python_async.models.batch_create_orders_response import BatchCreateOrdersResponse
|
|
74
|
+
from kalshi_python_async.models.batch_get_market_candlesticks_response import BatchGetMarketCandlesticksResponse
|
|
75
|
+
from kalshi_python_async.models.bid_ask_distribution import BidAskDistribution
|
|
76
|
+
from kalshi_python_async.models.cancel_order_response import CancelOrderResponse
|
|
77
|
+
from kalshi_python_async.models.create_api_key_request import CreateApiKeyRequest
|
|
78
|
+
from kalshi_python_async.models.create_api_key_response import CreateApiKeyResponse
|
|
79
|
+
from kalshi_python_async.models.create_market_in_multivariate_event_collection_request import CreateMarketInMultivariateEventCollectionRequest
|
|
80
|
+
from kalshi_python_async.models.create_market_in_multivariate_event_collection_response import CreateMarketInMultivariateEventCollectionResponse
|
|
81
|
+
from kalshi_python_async.models.create_order_group_request import CreateOrderGroupRequest
|
|
82
|
+
from kalshi_python_async.models.create_order_group_response import CreateOrderGroupResponse
|
|
83
|
+
from kalshi_python_async.models.create_order_request import CreateOrderRequest
|
|
84
|
+
from kalshi_python_async.models.create_order_response import CreateOrderResponse
|
|
85
|
+
from kalshi_python_async.models.create_quote_request import CreateQuoteRequest
|
|
86
|
+
from kalshi_python_async.models.create_quote_response import CreateQuoteResponse
|
|
87
|
+
from kalshi_python_async.models.create_rfq_request import CreateRFQRequest
|
|
88
|
+
from kalshi_python_async.models.create_rfq_response import CreateRFQResponse
|
|
89
|
+
from kalshi_python_async.models.daily_schedule import DailySchedule
|
|
90
|
+
from kalshi_python_async.models.decrease_order_request import DecreaseOrderRequest
|
|
91
|
+
from kalshi_python_async.models.decrease_order_response import DecreaseOrderResponse
|
|
92
|
+
from kalshi_python_async.models.error_response import ErrorResponse
|
|
93
|
+
from kalshi_python_async.models.event_data import EventData
|
|
94
|
+
from kalshi_python_async.models.event_position import EventPosition
|
|
95
|
+
from kalshi_python_async.models.exchange_status import ExchangeStatus
|
|
96
|
+
from kalshi_python_async.models.fill import Fill
|
|
97
|
+
from kalshi_python_async.models.forecast_percentiles_point import ForecastPercentilesPoint
|
|
98
|
+
from kalshi_python_async.models.generate_api_key_request import GenerateApiKeyRequest
|
|
99
|
+
from kalshi_python_async.models.generate_api_key_response import GenerateApiKeyResponse
|
|
100
|
+
from kalshi_python_async.models.get_api_keys_response import GetApiKeysResponse
|
|
101
|
+
from kalshi_python_async.models.get_balance_response import GetBalanceResponse
|
|
102
|
+
from kalshi_python_async.models.get_communications_id_response import GetCommunicationsIDResponse
|
|
103
|
+
from kalshi_python_async.models.get_event_candlesticks_response import GetEventCandlesticksResponse
|
|
104
|
+
from kalshi_python_async.models.get_event_forecast_percentiles_history_response import GetEventForecastPercentilesHistoryResponse
|
|
105
|
+
from kalshi_python_async.models.get_event_metadata_response import GetEventMetadataResponse
|
|
106
|
+
from kalshi_python_async.models.get_event_response import GetEventResponse
|
|
107
|
+
from kalshi_python_async.models.get_events_response import GetEventsResponse
|
|
108
|
+
from kalshi_python_async.models.get_exchange_announcements_response import GetExchangeAnnouncementsResponse
|
|
109
|
+
from kalshi_python_async.models.get_exchange_schedule_response import GetExchangeScheduleResponse
|
|
110
|
+
from kalshi_python_async.models.get_fills_response import GetFillsResponse
|
|
111
|
+
from kalshi_python_async.models.get_filters_by_sports_response import GetFiltersBySportsResponse
|
|
112
|
+
from kalshi_python_async.models.get_incentive_programs_response import GetIncentiveProgramsResponse
|
|
113
|
+
from kalshi_python_async.models.get_live_data_response import GetLiveDataResponse
|
|
114
|
+
from kalshi_python_async.models.get_live_datas_response import GetLiveDatasResponse
|
|
115
|
+
from kalshi_python_async.models.get_market_candlesticks_response import GetMarketCandlesticksResponse
|
|
116
|
+
from kalshi_python_async.models.get_market_orderbook_response import GetMarketOrderbookResponse
|
|
117
|
+
from kalshi_python_async.models.get_market_response import GetMarketResponse
|
|
118
|
+
from kalshi_python_async.models.get_markets_response import GetMarketsResponse
|
|
119
|
+
from kalshi_python_async.models.get_milestone_response import GetMilestoneResponse
|
|
120
|
+
from kalshi_python_async.models.get_milestones_response import GetMilestonesResponse
|
|
121
|
+
from kalshi_python_async.models.get_multivariate_event_collection_lookup_history_response import GetMultivariateEventCollectionLookupHistoryResponse
|
|
122
|
+
from kalshi_python_async.models.get_multivariate_event_collection_response import GetMultivariateEventCollectionResponse
|
|
123
|
+
from kalshi_python_async.models.get_multivariate_event_collections_response import GetMultivariateEventCollectionsResponse
|
|
124
|
+
from kalshi_python_async.models.get_multivariate_events_response import GetMultivariateEventsResponse
|
|
125
|
+
from kalshi_python_async.models.get_order_group_response import GetOrderGroupResponse
|
|
126
|
+
from kalshi_python_async.models.get_order_groups_response import GetOrderGroupsResponse
|
|
127
|
+
from kalshi_python_async.models.get_order_queue_position_response import GetOrderQueuePositionResponse
|
|
128
|
+
from kalshi_python_async.models.get_order_queue_positions_response import GetOrderQueuePositionsResponse
|
|
129
|
+
from kalshi_python_async.models.get_order_response import GetOrderResponse
|
|
130
|
+
from kalshi_python_async.models.get_orders_response import GetOrdersResponse
|
|
131
|
+
from kalshi_python_async.models.get_portfolio_resting_order_total_value_response import GetPortfolioRestingOrderTotalValueResponse
|
|
132
|
+
from kalshi_python_async.models.get_positions_response import GetPositionsResponse
|
|
133
|
+
from kalshi_python_async.models.get_quote_response import GetQuoteResponse
|
|
134
|
+
from kalshi_python_async.models.get_quotes_response import GetQuotesResponse
|
|
135
|
+
from kalshi_python_async.models.get_rfq_response import GetRFQResponse
|
|
136
|
+
from kalshi_python_async.models.get_rfqs_response import GetRFQsResponse
|
|
137
|
+
from kalshi_python_async.models.get_series_fee_changes_response import GetSeriesFeeChangesResponse
|
|
138
|
+
from kalshi_python_async.models.get_series_list_response import GetSeriesListResponse
|
|
139
|
+
from kalshi_python_async.models.get_series_response import GetSeriesResponse
|
|
140
|
+
from kalshi_python_async.models.get_settlements_response import GetSettlementsResponse
|
|
141
|
+
from kalshi_python_async.models.get_structured_target_response import GetStructuredTargetResponse
|
|
142
|
+
from kalshi_python_async.models.get_structured_targets_response import GetStructuredTargetsResponse
|
|
143
|
+
from kalshi_python_async.models.get_tags_for_series_categories_response import GetTagsForSeriesCategoriesResponse
|
|
144
|
+
from kalshi_python_async.models.get_trades_response import GetTradesResponse
|
|
145
|
+
from kalshi_python_async.models.get_user_data_timestamp_response import GetUserDataTimestampResponse
|
|
146
|
+
from kalshi_python_async.models.incentive_program import IncentiveProgram
|
|
147
|
+
from kalshi_python_async.models.live_data import LiveData
|
|
148
|
+
from kalshi_python_async.models.lookup_point import LookupPoint
|
|
149
|
+
from kalshi_python_async.models.lookup_tickers_for_market_in_multivariate_event_collection_request import LookupTickersForMarketInMultivariateEventCollectionRequest
|
|
150
|
+
from kalshi_python_async.models.lookup_tickers_for_market_in_multivariate_event_collection_response import LookupTickersForMarketInMultivariateEventCollectionResponse
|
|
151
|
+
from kalshi_python_async.models.maintenance_window import MaintenanceWindow
|
|
152
|
+
from kalshi_python_async.models.market import Market
|
|
153
|
+
from kalshi_python_async.models.market_candlestick import MarketCandlestick
|
|
154
|
+
from kalshi_python_async.models.market_candlesticks_response import MarketCandlesticksResponse
|
|
155
|
+
from kalshi_python_async.models.market_metadata import MarketMetadata
|
|
156
|
+
from kalshi_python_async.models.market_position import MarketPosition
|
|
157
|
+
from kalshi_python_async.models.milestone import Milestone
|
|
158
|
+
from kalshi_python_async.models.multivariate_event_collection import MultivariateEventCollection
|
|
159
|
+
from kalshi_python_async.models.mve_selected_leg import MveSelectedLeg
|
|
160
|
+
from kalshi_python_async.models.order import Order
|
|
161
|
+
from kalshi_python_async.models.order_group import OrderGroup
|
|
162
|
+
from kalshi_python_async.models.order_queue_position import OrderQueuePosition
|
|
163
|
+
from kalshi_python_async.models.order_status import OrderStatus
|
|
164
|
+
from kalshi_python_async.models.orderbook import Orderbook
|
|
165
|
+
from kalshi_python_async.models.percentile_point import PercentilePoint
|
|
166
|
+
from kalshi_python_async.models.price_distribution import PriceDistribution
|
|
167
|
+
from kalshi_python_async.models.price_range import PriceRange
|
|
168
|
+
from kalshi_python_async.models.quote import Quote
|
|
169
|
+
from kalshi_python_async.models.rfq import RFQ
|
|
170
|
+
from kalshi_python_async.models.schedule import Schedule
|
|
171
|
+
from kalshi_python_async.models.scope_list import ScopeList
|
|
172
|
+
from kalshi_python_async.models.self_trade_prevention_type import SelfTradePreventionType
|
|
173
|
+
from kalshi_python_async.models.series import Series
|
|
174
|
+
from kalshi_python_async.models.series_fee_change import SeriesFeeChange
|
|
175
|
+
from kalshi_python_async.models.settlement import Settlement
|
|
176
|
+
from kalshi_python_async.models.settlement_source import SettlementSource
|
|
177
|
+
from kalshi_python_async.models.sport_filter_details import SportFilterDetails
|
|
178
|
+
from kalshi_python_async.models.structured_target import StructuredTarget
|
|
179
|
+
from kalshi_python_async.models.ticker_pair import TickerPair
|
|
180
|
+
from kalshi_python_async.models.trade import Trade
|
|
181
|
+
from kalshi_python_async.models.weekly_schedule import WeeklySchedule
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
# KalshiClient with custom authentication
|
|
185
|
+
class KalshiClient(ApiClient):
|
|
186
|
+
"""Convenience client that combines all API classes into a single interface with Kalshi auth"""
|
|
187
|
+
|
|
188
|
+
def __init__(self, configuration=None):
|
|
189
|
+
super().__init__(configuration)
|
|
190
|
+
|
|
191
|
+
# Initialize Kalshi authentication if credentials are configured
|
|
192
|
+
self.kalshi_auth = None
|
|
193
|
+
if configuration and hasattr(configuration, 'api_key_id') and hasattr(configuration, 'private_key_pem'):
|
|
194
|
+
self.kalshi_auth = KalshiAuth(
|
|
195
|
+
configuration.api_key_id,
|
|
196
|
+
configuration.private_key_pem
|
|
197
|
+
)
|
|
198
|
+
|
|
199
|
+
# Initialize all API instances
|
|
200
|
+
self._api_keys_api = ApiKeysApi(self)
|
|
201
|
+
self._communications_api = CommunicationsApi(self)
|
|
202
|
+
self._events_api = EventsApi(self)
|
|
203
|
+
self._exchange_api = ExchangeApi(self)
|
|
204
|
+
self._fcm_api = FcmApi(self)
|
|
205
|
+
self._incentive_programs_api = IncentiveProgramsApi(self)
|
|
206
|
+
self._live_data_api = LiveDataApi(self)
|
|
207
|
+
self._market_api = MarketApi(self)
|
|
208
|
+
self._milestone_api = MilestoneApi(self)
|
|
209
|
+
self._multivariate_api = MultivariateApi(self)
|
|
210
|
+
self._order_groups_api = OrderGroupsApi(self)
|
|
211
|
+
self._orders_api = OrdersApi(self)
|
|
212
|
+
self._portfolio_api = PortfolioApi(self)
|
|
213
|
+
self._search_api = SearchApi(self)
|
|
214
|
+
self._structured_targets_api = StructuredTargetsApi(self)
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
def update_params_for_auth(
|
|
218
|
+
self,
|
|
219
|
+
headers,
|
|
220
|
+
queries,
|
|
221
|
+
auth_settings,
|
|
222
|
+
resource_path,
|
|
223
|
+
method,
|
|
224
|
+
body,
|
|
225
|
+
request_auth=None
|
|
226
|
+
):
|
|
227
|
+
"""Override to add Kalshi custom authentication headers"""
|
|
228
|
+
# Skip if no authentication configured
|
|
229
|
+
if not self.kalshi_auth:
|
|
230
|
+
return super().update_params_for_auth(
|
|
231
|
+
headers, queries, auth_settings, resource_path, method, body, request_auth
|
|
232
|
+
)
|
|
233
|
+
|
|
234
|
+
# Build full path - resource_path doesn't include base path
|
|
235
|
+
full_path = f"/trade-api/v2{resource_path}"
|
|
236
|
+
|
|
237
|
+
# Get auth headers from KalshiAuth
|
|
238
|
+
auth_headers = self.kalshi_auth.create_auth_headers(method, full_path)
|
|
239
|
+
headers.update(auth_headers)
|
|
240
|
+
|
|
241
|
+
return super().update_params_for_auth(
|
|
242
|
+
headers, queries, auth_settings, resource_path, method, body, request_auth
|
|
243
|
+
)
|
|
244
|
+
|
|
245
|
+
def __getattr__(self, name):
|
|
246
|
+
"""Dynamically forward method calls to the appropriate API instance"""
|
|
247
|
+
# Try each API instance to see if it has the method
|
|
248
|
+
api_names = [
|
|
249
|
+
'_api_keys_api',
|
|
250
|
+
'_communications_api',
|
|
251
|
+
'_events_api',
|
|
252
|
+
'_exchange_api',
|
|
253
|
+
'_fcm_api',
|
|
254
|
+
'_incentive_programs_api',
|
|
255
|
+
'_live_data_api',
|
|
256
|
+
'_market_api',
|
|
257
|
+
'_milestone_api',
|
|
258
|
+
'_multivariate_api',
|
|
259
|
+
'_order_groups_api',
|
|
260
|
+
'_orders_api',
|
|
261
|
+
'_portfolio_api',
|
|
262
|
+
'_search_api',
|
|
263
|
+
'_structured_targets_api',
|
|
264
|
+
]
|
|
265
|
+
for api_name in api_names:
|
|
266
|
+
if hasattr(self, api_name):
|
|
267
|
+
api_instance = getattr(self, api_name)
|
|
268
|
+
if hasattr(api_instance, name):
|
|
269
|
+
return getattr(api_instance, name)
|
|
270
|
+
|
|
271
|
+
# If not found in any API, raise AttributeError
|
|
272
|
+
raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'")
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# flake8: noqa
|
|
2
|
+
|
|
3
|
+
# import apis into api package
|
|
4
|
+
from kalshi_python_async.api.api_keys_api import ApiKeysApi
|
|
5
|
+
from kalshi_python_async.api.communications_api import CommunicationsApi
|
|
6
|
+
from kalshi_python_async.api.events_api import EventsApi
|
|
7
|
+
from kalshi_python_async.api.exchange_api import ExchangeApi
|
|
8
|
+
from kalshi_python_async.api.fcm_api import FcmApi
|
|
9
|
+
from kalshi_python_async.api.incentive_programs_api import IncentiveProgramsApi
|
|
10
|
+
from kalshi_python_async.api.live_data_api import LiveDataApi
|
|
11
|
+
from kalshi_python_async.api.market_api import MarketApi
|
|
12
|
+
from kalshi_python_async.api.milestone_api import MilestoneApi
|
|
13
|
+
from kalshi_python_async.api.multivariate_api import MultivariateApi
|
|
14
|
+
from kalshi_python_async.api.order_groups_api import OrderGroupsApi
|
|
15
|
+
from kalshi_python_async.api.orders_api import OrdersApi
|
|
16
|
+
from kalshi_python_async.api.portfolio_api import PortfolioApi
|
|
17
|
+
from kalshi_python_async.api.search_api import SearchApi
|
|
18
|
+
from kalshi_python_async.api.structured_targets_api import StructuredTargetsApi
|
|
19
|
+
|