├── .gitignore
├── .gitlab-ci.yml
├── .openapi-generator-ignore
├── .openapi-generator
├── FILES
└── VERSION
├── .travis.yml
├── README.md
├── docs
├── AccountApi.md
├── AccountHistoryEntry.md
├── AccountHistoryEntryData.md
├── AuthApi.md
├── BankAccountDetails.md
├── ChangeSubscriptionRequest.md
├── ConfirmPasswordResetRequest.md
├── CreateUserRequest.md
├── CreateUserResponse.md
├── DefaultApi.md
├── Deposit.md
├── DepositHistory.md
├── ExchangeApi.md
├── GetMarketHistoryResponse.md
├── GetMarketOrderBookResponse.md
├── GetNotificationPreferencesResponse.md
├── GetRangedMarketByTickerResponse.md
├── GetRangedMarketResponse.md
├── GetRangedMarketsResponse.md
├── GetUserDepositsResponse.md
├── GetUserWithdrawalsResponse.md
├── LoginRequest.md
├── LoginResponse.md
├── Market.md
├── MarketApi.md
├── MarketPosition.md
├── MarketStatsPoint.md
├── Notification.md
├── NotificationList.md
├── Order.md
├── OrderBook.md
├── OrderHistory.md
├── OrderList.md
├── PortfolioApi.md
├── PortfolioMeasurement.md
├── PriceLevel.md
├── PublicTrade.md
├── PublicTradeList.md
├── RangedMarket.md
├── RangedMarketApi.md
├── RangedMarketsApi.md
├── ResetPasswordRequest.md
├── SettlementHistory.md
├── SettlementSource.md
├── SubscriptionPreference.md
├── TradeHistory.md
├── TradesGetResponse.md
├── User.md
├── UserApi.md
├── UserChangePasswordRequest.md
├── UserDepositRequest.md
├── UserDepositResponse.md
├── UserGetAccountHistoryResponse.md
├── UserGetBalanceResponse.md
├── UserGetMarketPositionResponse.md
├── UserGetMarketPositionsResponse.md
├── UserGetMarketResponse.md
├── UserGetMarketsResponse.md
├── UserGetNotificationsResponse.md
├── UserGetPortfolioHistoryRequest.md
├── UserGetPortfolioHistoryResponse.md
├── UserGetPortfolioValueResponse.md
├── UserGetProfileResponse.md
├── UserGetWatchlistResponse.md
├── UserListLedgerxBankAccountsResponse.md
├── UserOrderCreateRequest.md
├── UserOrderCreateResponse.md
├── UserOrderDecreaseRequest.md
├── UserOrderDecreaseResponse.md
├── UserOrdersGetResponse.md
├── UserTrade.md
├── UserTradeList.md
├── UserTradesGetResponse.md
├── UserUpdateProfileRequest.md
├── UserWithdrawalRequest.md
├── UserWithdrawalResponse.md
├── Watchlist.md
├── Withdrawal.md
└── WithdrawalHistory.md
├── generate.sh
├── git_push.sh
├── kalshi
├── __init__.py
├── api
│ ├── __init__.py
│ ├── account_api.py
│ ├── auth_api.py
│ ├── default_api.py
│ ├── exchange_api.py
│ ├── market_api.py
│ ├── portfolio_api.py
│ ├── ranged_market_api.py
│ ├── ranged_markets_api.py
│ └── user_api.py
├── api_client.py
├── apis
│ └── __init__.py
├── configuration.py
├── exceptions.py
├── model
│ ├── __init__.py
│ ├── account_history_entry.py
│ ├── account_history_entry_data.py
│ ├── bank_account_details.py
│ ├── change_subscription_request.py
│ ├── confirm_password_reset_request.py
│ ├── create_user_request.py
│ ├── create_user_response.py
│ ├── deposit.py
│ ├── deposit_history.py
│ ├── get_market_history_response.py
│ ├── get_market_order_book_response.py
│ ├── get_notification_preferences_response.py
│ ├── get_ranged_market_by_ticker_response.py
│ ├── get_ranged_market_response.py
│ ├── get_ranged_markets_response.py
│ ├── get_user_deposits_response.py
│ ├── get_user_withdrawals_response.py
│ ├── login_request.py
│ ├── login_response.py
│ ├── market.py
│ ├── market_position.py
│ ├── market_stats_point.py
│ ├── notification.py
│ ├── notification_list.py
│ ├── order.py
│ ├── order_book.py
│ ├── order_history.py
│ ├── order_list.py
│ ├── portfolio_measurement.py
│ ├── price_level.py
│ ├── public_trade.py
│ ├── public_trade_list.py
│ ├── ranged_market.py
│ ├── reset_password_request.py
│ ├── settlement_history.py
│ ├── settlement_source.py
│ ├── subscription_preference.py
│ ├── trade_history.py
│ ├── trades_get_response.py
│ ├── user.py
│ ├── user_change_password_request.py
│ ├── user_deposit_request.py
│ ├── user_deposit_response.py
│ ├── user_get_account_history_response.py
│ ├── user_get_balance_response.py
│ ├── user_get_market_position_response.py
│ ├── user_get_market_positions_response.py
│ ├── user_get_market_response.py
│ ├── user_get_markets_response.py
│ ├── user_get_notifications_response.py
│ ├── user_get_portfolio_history_request.py
│ ├── user_get_portfolio_history_response.py
│ ├── user_get_portfolio_value_response.py
│ ├── user_get_profile_response.py
│ ├── user_get_watchlist_response.py
│ ├── user_list_ledgerx_bank_accounts_response.py
│ ├── user_order_create_request.py
│ ├── user_order_create_response.py
│ ├── user_order_decrease_request.py
│ ├── user_order_decrease_response.py
│ ├── user_orders_get_response.py
│ ├── user_trade.py
│ ├── user_trade_list.py
│ ├── user_trades_get_response.py
│ ├── user_update_profile_request.py
│ ├── user_withdrawal_request.py
│ ├── user_withdrawal_response.py
│ ├── watchlist.py
│ ├── withdrawal.py
│ └── withdrawal_history.py
├── model_utils.py
├── models
│ └── __init__.py
└── rest.py
├── requirements.txt
├── setup.cfg
├── setup.py
├── swagger.json
├── test-requirements.txt
├── test
├── __init__.py
├── test_account_api.py
├── test_account_history_entry.py
├── test_account_history_entry_data.py
├── test_auth_api.py
├── test_bank_account_details.py
├── test_change_subscription_request.py
├── test_confirm_password_reset_request.py
├── test_create_user_request.py
├── test_create_user_response.py
├── test_default_api.py
├── test_deposit.py
├── test_deposit_history.py
├── test_exchange_api.py
├── test_get_market_history_response.py
├── test_get_market_order_book_response.py
├── test_get_notification_preferences_response.py
├── test_get_ranged_market_by_ticker_response.py
├── test_get_ranged_market_response.py
├── test_get_ranged_markets_response.py
├── test_get_user_deposits_response.py
├── test_get_user_withdrawals_response.py
├── test_login_request.py
├── test_login_response.py
├── test_market.py
├── test_market_api.py
├── test_market_position.py
├── test_market_stats_point.py
├── test_notification.py
├── test_notification_list.py
├── test_order.py
├── test_order_book.py
├── test_order_history.py
├── test_order_list.py
├── test_portfolio_api.py
├── test_portfolio_measurement.py
├── test_price_level.py
├── test_public_trade.py
├── test_public_trade_list.py
├── test_ranged_market.py
├── test_ranged_market_api.py
├── test_ranged_markets_api.py
├── test_reset_password_request.py
├── test_settlement_history.py
├── test_settlement_source.py
├── test_subscription_preference.py
├── test_trade_history.py
├── test_trades_get_response.py
├── test_user.py
├── test_user_api.py
├── test_user_change_password_request.py
├── test_user_deposit_request.py
├── test_user_deposit_response.py
├── test_user_get_account_history_response.py
├── test_user_get_balance_response.py
├── test_user_get_market_position_response.py
├── test_user_get_market_positions_response.py
├── test_user_get_market_response.py
├── test_user_get_markets_response.py
├── test_user_get_notifications_response.py
├── test_user_get_portfolio_history_request.py
├── test_user_get_portfolio_history_response.py
├── test_user_get_portfolio_value_response.py
├── test_user_get_profile_response.py
├── test_user_get_watchlist_response.py
├── test_user_list_ledgerx_bank_accounts_response.py
├── test_user_order_create_request.py
├── test_user_order_create_response.py
├── test_user_order_decrease_request.py
├── test_user_order_decrease_response.py
├── test_user_orders_get_response.py
├── test_user_trade.py
├── test_user_trade_list.py
├── test_user_trades_get_response.py
├── test_user_update_profile_request.py
├── test_user_withdrawal_request.py
├── test_user_withdrawal_response.py
├── test_watchlist.py
├── test_withdrawal.py
└── test_withdrawal_history.py
└── tox.ini
/.gitignore:
--------------------------------------------------------------------------------
1 | # Byte-compiled / optimized / DLL files
2 | __pycache__/
3 | *.py[cod]
4 | *$py.class
5 |
6 | # C extensions
7 | *.so
8 |
9 | # Distribution / packaging
10 | .Python
11 | env/
12 | build/
13 | develop-eggs/
14 | dist/
15 | downloads/
16 | eggs/
17 | .eggs/
18 | lib/
19 | lib64/
20 | parts/
21 | sdist/
22 | var/
23 | *.egg-info/
24 | .installed.cfg
25 | *.egg
26 |
27 | # PyInstaller
28 | # Usually these files are written by a python script from a template
29 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
30 | *.manifest
31 | *.spec
32 |
33 | # Installer logs
34 | pip-log.txt
35 | pip-delete-this-directory.txt
36 |
37 | # Unit test / coverage reports
38 | htmlcov/
39 | .tox/
40 | .coverage
41 | .coverage.*
42 | .cache
43 | nosetests.xml
44 | coverage.xml
45 | *,cover
46 | .hypothesis/
47 | venv/
48 | .venv/
49 | .python-version
50 | .pytest_cache
51 |
52 | # Translations
53 | *.mo
54 | *.pot
55 |
56 | # Django stuff:
57 | *.log
58 |
59 | # Sphinx documentation
60 | docs/_build/
61 |
62 | # PyBuilder
63 | target/
64 |
65 | #Ipython Notebook
66 | .ipynb_checkpoints
67 |
--------------------------------------------------------------------------------
/.gitlab-ci.yml:
--------------------------------------------------------------------------------
1 | # ref: https://docs.gitlab.com/ee/ci/README.html
2 |
3 | stages:
4 | - test
5 |
6 | .tests:
7 | stage: test
8 | script:
9 | - pip install -r requirements.txt
10 | - pip install -r test-requirements.txt
11 | - pytest --cov=kalshi
12 |
13 | test-3.6:
14 | extends: .tests
15 | image: python:3.6-alpine
16 | test-3.7:
17 | extends: .tests
18 | image: python:3.7-alpine
19 | test-3.8:
20 | extends: .tests
21 | image: python:3.8-alpine
22 | test-3.9:
23 | extends: .tests
24 | image: python:3.9-alpine
25 |
--------------------------------------------------------------------------------
/.openapi-generator-ignore:
--------------------------------------------------------------------------------
1 | # OpenAPI Generator Ignore
2 | # Generated by openapi-generator https://github.com/openapitools/openapi-generator
3 |
4 | # Use this file to prevent files from being overwritten by the generator.
5 | # The patterns follow closely to .gitignore or .dockerignore.
6 |
7 | # As an example, the C# client generator defines ApiClient.cs.
8 | # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9 | #ApiClient.cs
10 |
11 | # You can match any string of characters against a directory, file or extension with a single asterisk (*):
12 | #foo/*/qux
13 | # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14 |
15 | # You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16 | #foo/**/qux
17 | # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18 |
19 | # You can also negate patterns with an exclamation (!).
20 | # For example, you can ignore all files in a docs folder with the file extension .md:
21 | #docs/*.md
22 | # Then explicitly reverse the ignore rule for a single file:
23 | #!docs/README.md
24 |
--------------------------------------------------------------------------------
/.openapi-generator/VERSION:
--------------------------------------------------------------------------------
1 | 5.2.0
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | # ref: https://docs.travis-ci.com/user/languages/python
2 | language: python
3 | python:
4 | - "3.6"
5 | - "3.7"
6 | - "3.8"
7 | - "3.9"
8 | # command to install dependencies
9 | install:
10 | - "pip install -r requirements.txt"
11 | - "pip install -r test-requirements.txt"
12 | # command to run tests
13 | script: pytest --cov=kalshi
14 |
--------------------------------------------------------------------------------
/docs/AccountHistoryEntry.md:
--------------------------------------------------------------------------------
1 | # AccountHistoryEntry
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **type** | **str** | Type of entry, one of Deposit, Withdrawal, Order, or Settlement |
8 | **data** | [**AccountHistoryEntryData**](AccountHistoryEntryData.md) | | [optional]
9 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
10 |
11 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
12 |
13 |
14 |
--------------------------------------------------------------------------------
/docs/AccountHistoryEntryData.md:
--------------------------------------------------------------------------------
1 | # AccountHistoryEntryData
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **deposit** | [**DepositHistory**](DepositHistory.md) | | [optional]
8 | **order** | [**OrderHistory**](OrderHistory.md) | | [optional]
9 | **settlement** | [**SettlementHistory**](SettlementHistory.md) | | [optional]
10 | **trade** | [**TradeHistory**](TradeHistory.md) | | [optional]
11 | **withdrawal** | [**WithdrawalHistory**](WithdrawalHistory.md) | | [optional]
12 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
13 |
14 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
15 |
16 |
17 |
--------------------------------------------------------------------------------
/docs/BankAccountDetails.md:
--------------------------------------------------------------------------------
1 | # BankAccountDetails
2 |
3 | Encapsulates meta-data of bank accounts. This is not stored within Kalshi, it is always proxied from the clearing house.
4 |
5 | ## Properties
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **bank_id** | **str** | |
9 | **mask** | **str** | |
10 | **name** | **str** | |
11 | **plaid_item_needs_relink** | **bool** | |
12 | **subtype** | **str** | |
13 | **type** | **str** | |
14 | **routing_number** | **str** | | [optional]
15 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
16 |
17 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
18 |
19 |
20 |
--------------------------------------------------------------------------------
/docs/ChangeSubscriptionRequest.md:
--------------------------------------------------------------------------------
1 | # ChangeSubscriptionRequest
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **subscription_level** | **str** | Specifies the subscription level for email notifications its values can be: \"none\", \"basic\" or \"all\" |
8 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/ConfirmPasswordResetRequest.md:
--------------------------------------------------------------------------------
1 | # ConfirmPasswordResetRequest
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **password** | **str** | The new password. |
8 | **user_id** | **str** | UserUUID for your user. You can get this from the password reset link query parameter. |
9 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
10 |
11 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
12 |
13 |
14 |
--------------------------------------------------------------------------------
/docs/CreateUserRequest.md:
--------------------------------------------------------------------------------
1 | # CreateUserRequest
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **email** | **str** | A valid email for the new user. |
8 | **password** | **str** | Password for the new user account. |
9 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
10 |
11 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
12 |
13 |
14 |
--------------------------------------------------------------------------------
/docs/CreateUserResponse.md:
--------------------------------------------------------------------------------
1 | # CreateUserResponse
2 |
3 | Response for submitting an order
4 |
5 | ## Properties
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **user_id** | **str** | user_id for the created user. |
9 | **code** | **str** | swagger: ignore | [optional]
10 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/docs/DefaultApi.md:
--------------------------------------------------------------------------------
1 | # kalshi.DefaultApi
2 |
3 | All URIs are relative to *https://trading-api.kalshi.com/v1*
4 |
5 | Method | HTTP request | Description
6 | ------------- | ------------- | -------------
7 | [**get_trades**](DefaultApi.md#get_trades) | **GET** /trades | GetTrades
8 |
9 |
10 | # **get_trades**
11 | > TradesGetResponse get_trades()
12 |
13 | GetTrades
14 |
15 | End-point for getting all trades for all markets.
16 |
17 | ### Example
18 |
19 | ```python
20 | import time
21 | import kalshi
22 | from kalshi.api import default_api
23 | from kalshi.model.trades_get_response import TradesGetResponse
24 | from pprint import pprint
25 | # Defining the host is optional and defaults to https://trading-api.kalshi.com/v1
26 | # See configuration.py for a list of all supported configuration parameters.
27 | configuration = kalshi.Configuration(
28 | host = "https://trading-api.kalshi.com/v1"
29 | )
30 |
31 |
32 | # Enter a context with an instance of the API client
33 | with kalshi.ApiClient() as api_client:
34 | # Create an instance of the API class
35 | api_instance = default_api.DefaultApi(api_client)
36 | trades_date = "trades_date_example" # str | Restricts the response to trades during a certain day. Format: YYYY-MM-DD (optional)
37 | page_size = 1 # int | Parameter to specify the number of results per page (optional)
38 | page_number = 1 # int | Parameter to specify which page of the results should be retrieved (optional)
39 |
40 | # example passing only required values which don't have defaults set
41 | # and optional values
42 | try:
43 | # GetTrades
44 | api_response = api_instance.get_trades(trades_date=trades_date, page_size=page_size, page_number=page_number)
45 | pprint(api_response)
46 | except kalshi.ApiException as e:
47 | print("Exception when calling DefaultApi->get_trades: %s\n" % e)
48 | ```
49 |
50 |
51 | ### Parameters
52 |
53 | Name | Type | Description | Notes
54 | ------------- | ------------- | ------------- | -------------
55 | **trades_date** | **str**| Restricts the response to trades during a certain day. Format: YYYY-MM-DD | [optional]
56 | **page_size** | **int**| Parameter to specify the number of results per page | [optional]
57 | **page_number** | **int**| Parameter to specify which page of the results should be retrieved | [optional]
58 |
59 | ### Return type
60 |
61 | [**TradesGetResponse**](TradesGetResponse.md)
62 |
63 | ### Authorization
64 |
65 | No authorization required
66 |
67 | ### HTTP request headers
68 |
69 | - **Content-Type**: Not defined
70 | - **Accept**: application/json
71 |
72 |
73 | ### HTTP response details
74 | | Status code | Description | Response headers |
75 | |-------------|-------------|------------------|
76 | **200** | | - |
77 | **400** | JSONError is a generic structure for API error responses. | * code -
* details -
* message -
* service -
|
78 | **401** | JSONError is a generic structure for API error responses. | * code -
* details -
* message -
* service -
|
79 | **403** | JSONError is a generic structure for API error responses. | * code -
* details -
* message -
* service -
|
80 | **500** | JSONError is a generic structure for API error responses. | * code -
* details -
* message -
* service -
|
81 |
82 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
83 |
84 |
--------------------------------------------------------------------------------
/docs/Deposit.md:
--------------------------------------------------------------------------------
1 | # Deposit
2 |
3 | Represents a deposit.
4 |
5 | ## Properties
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **amount_cents** | **int** | | [optional]
9 | **bank_id** | **str** | | [optional]
10 | **created_ts** | **datetime** | | [optional]
11 | **deposit_type** | **str** | | [optional]
12 | **id** | **str** | | [optional]
13 | **return_code** | **str** | | [optional]
14 | **return_reason** | **str** | | [optional]
15 | **status** | **str** | | [optional]
16 | **user_id** | **str** | | [optional]
17 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
18 |
19 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
20 |
21 |
22 |
--------------------------------------------------------------------------------
/docs/DepositHistory.md:
--------------------------------------------------------------------------------
1 | # DepositHistory
2 |
3 | Represents a deposit account history item
4 |
5 | ## Properties
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **amount** | **int** | | [optional]
9 | **created_at** | **datetime** | | [optional]
10 | **deposit_type** | **str** | | [optional]
11 | **fee** | **int** | | [optional]
12 | **returned_amount** | **int** | | [optional]
13 | **status** | **str** | | [optional]
14 | **updated_at** | **datetime** | | [optional]
15 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
16 |
17 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
18 |
19 |
20 |
--------------------------------------------------------------------------------
/docs/ExchangeApi.md:
--------------------------------------------------------------------------------
1 | # kalshi.ExchangeApi
2 |
3 | All URIs are relative to *https://trading-api.kalshi.com/v1*
4 |
5 | Method | HTTP request | Description
6 | ------------- | ------------- | -------------
7 | [**get_exchange_status**](ExchangeApi.md#get_exchange_status) | **GET** /exchange/status |
8 |
9 |
10 | # **get_exchange_status**
11 | > get_exchange_status()
12 |
13 |
14 |
15 | End-point for getting the exchange status
16 |
17 | ### Example
18 |
19 | * Api Key Authentication (cookie):
20 | ```python
21 | import time
22 | import kalshi
23 | from kalshi.api import exchange_api
24 | from pprint import pprint
25 | # Defining the host is optional and defaults to https://trading-api.kalshi.com/v1
26 | # See configuration.py for a list of all supported configuration parameters.
27 | configuration = kalshi.Configuration(
28 | host = "https://trading-api.kalshi.com/v1"
29 | )
30 |
31 | # The client must configure the authentication and authorization parameters
32 | # in accordance with the API server security policy.
33 | # Examples for each auth method are provided below, use the example that
34 | # satisfies your auth use case.
35 |
36 | # Configure API key authorization: cookie
37 | configuration.api_key['cookie'] = 'YOUR_API_KEY'
38 |
39 | # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
40 | # configuration.api_key_prefix['cookie'] = 'Bearer'
41 |
42 | # Enter a context with an instance of the API client
43 | with kalshi.ApiClient(configuration) as api_client:
44 | # Create an instance of the API class
45 | api_instance = exchange_api.ExchangeApi(api_client)
46 |
47 | # example, this endpoint has no required or optional parameters
48 | try:
49 | api_instance.get_exchange_status()
50 | except kalshi.ApiException as e:
51 | print("Exception when calling ExchangeApi->get_exchange_status: %s\n" % e)
52 | ```
53 |
54 |
55 | ### Parameters
56 | This endpoint does not need any parameter.
57 |
58 | ### Return type
59 |
60 | void (empty response body)
61 |
62 | ### Authorization
63 |
64 | [cookie](../README.md#cookie)
65 |
66 | ### HTTP request headers
67 |
68 | - **Content-Type**: Not defined
69 | - **Accept**: Not defined
70 |
71 |
72 | ### HTTP response details
73 | | Status code | Description | Response headers |
74 | |-------------|-------------|------------------|
75 | **200** | | * exchange_active -
* trading_active -
|
76 | **401** | JSONError is a generic structure for API error responses. | * code -
* details -
* message -
* service -
|
77 | **403** | JSONError is a generic structure for API error responses. | * code -
* details -
* message -
* service -
|
78 | **500** | JSONError is a generic structure for API error responses. | * code -
* details -
* message -
* service -
|
79 | **503** | JSONError is a generic structure for API error responses. | * code -
* details -
* message -
* service -
|
80 |
81 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
82 |
83 |
--------------------------------------------------------------------------------
/docs/GetMarketHistoryResponse.md:
--------------------------------------------------------------------------------
1 | # GetMarketHistoryResponse
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **market_stats_points** | [**[MarketStatsPoint]**](MarketStatsPoint.md) | |
8 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/GetMarketOrderBookResponse.md:
--------------------------------------------------------------------------------
1 | # GetMarketOrderBookResponse
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **order_book** | [**OrderBook**](OrderBook.md) | |
8 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/GetNotificationPreferencesResponse.md:
--------------------------------------------------------------------------------
1 | # GetNotificationPreferencesResponse
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **preferences** | [**SubscriptionPreference**](SubscriptionPreference.md) | |
8 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/GetRangedMarketByTickerResponse.md:
--------------------------------------------------------------------------------
1 | # GetRangedMarketByTickerResponse
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **ranged_markets** | [**RangedMarket**](RangedMarket.md) | |
8 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/GetRangedMarketResponse.md:
--------------------------------------------------------------------------------
1 | # GetRangedMarketResponse
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **ranged_market** | [**RangedMarket**](RangedMarket.md) | |
8 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/GetRangedMarketsResponse.md:
--------------------------------------------------------------------------------
1 | # GetRangedMarketsResponse
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **ranged_markets** | [**[RangedMarket]**](RangedMarket.md) | |
8 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/GetUserDepositsResponse.md:
--------------------------------------------------------------------------------
1 | # GetUserDepositsResponse
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **deposits** | [**[Deposit]**](Deposit.md) | List of previous deposits for the user |
8 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/GetUserWithdrawalsResponse.md:
--------------------------------------------------------------------------------
1 | # GetUserWithdrawalsResponse
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **withdrawals** | [**[Withdrawal]**](Withdrawal.md) | List of previous withdrawals for the user |
8 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/LoginRequest.md:
--------------------------------------------------------------------------------
1 | # LoginRequest
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **email** | **str** | Email should be used as login identification credentials. |
8 | **password** | **str** | Password defined in the first step of the sign-up. |
9 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
10 |
11 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
12 |
13 |
14 |
--------------------------------------------------------------------------------
/docs/LoginResponse.md:
--------------------------------------------------------------------------------
1 | # LoginResponse
2 |
3 | Response for login request
4 |
5 | ## Properties
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **access_level** | **str** | Access level, to limit the access that applicants have |
9 | **token** | **str** | Access token for an member role session in the api |
10 | **user_id** | **str** | Your user_id, this will be required in all requests under the /users prefix |
11 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
12 |
13 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
14 |
15 |
16 |
--------------------------------------------------------------------------------
/docs/Market.md:
--------------------------------------------------------------------------------
1 | # Market
2 |
3 | Market details
4 |
5 | ## Properties
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **can_close_early** | **bool** | | [optional]
9 | **category** | **str** | | [optional]
10 | **close_date** | **datetime** | | [optional]
11 | **close_unconfirmed** | **bool** | | [optional]
12 | **create_date** | **datetime** | | [optional]
13 | **description_case_no** | **str** | | [optional]
14 | **description_case_yes** | **str** | | [optional]
15 | **description_context** | **str** | | [optional]
16 | **dollar_open_interest** | **int** | | [optional]
17 | **dollar_recent_volume** | **int** | | [optional]
18 | **dollar_volume** | **int** | | [optional]
19 | **expiration_date** | **datetime** | | [optional]
20 | **expiration_value** | **str** | | [optional]
21 | **frequency_in_days** | **int** | | [optional]
22 | **id** | **str** | | [optional]
23 | **image_url** | **str** | | [optional]
24 | **last_price** | **int** | | [optional]
25 | **list_date** | **datetime** | | [optional]
26 | **metrics_tags** | **[str]** | | [optional]
27 | **min_tick_size** | **str** | | [optional]
28 | **mini_title** | **str** | | [optional]
29 | **open_date** | **datetime** | | [optional]
30 | **open_interest** | **int** | | [optional]
31 | **option_type** | **str** | | [optional]
32 | **original_expiration_date** | **datetime** | | [optional]
33 | **previous_price** | **int** | | [optional]
34 | **previous_yes_ask** | **int** | | [optional]
35 | **previous_yes_bid** | **int** | | [optional]
36 | **ranged_group_name** | **str** | | [optional]
37 | **ranged_group_ticker** | **str** | | [optional]
38 | **recent_volume** | **int** | | [optional]
39 | **result** | **str** | | [optional]
40 | **settle_details** | **str** | | [optional]
41 | **settlement_sources** | [**[SettlementSource]**](SettlementSource.md) | | [optional]
42 | **status** | **str** | | [optional]
43 | **strike_price** | **float** | | [optional]
44 | **sub_title** | **str** | | [optional]
45 | **tags** | **[str]** | | [optional]
46 | **ticker_name** | **str** | | [optional]
47 | **title** | **str** | | [optional]
48 | **underlying** | **str** | | [optional]
49 | **volume** | **int** | | [optional]
50 | **yes_ask** | **int** | | [optional]
51 | **yes_bid** | **int** | | [optional]
52 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
53 |
54 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
55 |
56 |
57 |
--------------------------------------------------------------------------------
/docs/MarketPosition.md:
--------------------------------------------------------------------------------
1 | # MarketPosition
2 |
3 | MarketPosition is your accumulated position on a specific market considering all orders and trades.
4 |
5 | ## Properties
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **fees_paid** | **int** | | [optional]
9 | **final_position** | **int** | Settlement stats | [optional]
10 | **final_position_cost** | **int** | | [optional]
11 | **market_id** | **str** | | [optional]
12 | **position** | **int** | Current stats | [optional]
13 | **position_cost** | **int** | | [optional]
14 | **realized_pnl** | **int** | | [optional]
15 | **resting_orders_count** | **int** | | [optional]
16 | **total_cost** | **int** | | [optional]
17 | **user_id** | **str** | | [optional]
18 | **volume** | **int** | | [optional]
19 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
20 |
21 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
22 |
23 |
24 |
--------------------------------------------------------------------------------
/docs/MarketStatsPoint.md:
--------------------------------------------------------------------------------
1 | # MarketStatsPoint
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **dollar_open_interest** | **int** | | [optional]
8 | **dollar_volume** | **int** | | [optional]
9 | **open_interest** | **int** | | [optional]
10 | **price** | **int** | | [optional]
11 | **ts** | **int** | | [optional]
12 | **volume** | **int** | | [optional]
13 | **yes_ask** | **int** | | [optional]
14 | **yes_bid** | **int** | | [optional]
15 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
16 |
17 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
18 |
19 |
20 |
--------------------------------------------------------------------------------
/docs/Notification.md:
--------------------------------------------------------------------------------
1 | # Notification
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **content** | **{str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},)}** | | [optional]
8 | **created_ts** | **datetime** | | [optional]
9 | **id** | **str** | | [optional]
10 | **is_delivered** | **bool** | | [optional]
11 | **is_read** | **bool** | | [optional]
12 | **link** | **str** | | [optional]
13 | **type** | **str** | | [optional]
14 | **user_id** | **str** | | [optional]
15 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
16 |
17 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
18 |
19 |
20 |
--------------------------------------------------------------------------------
/docs/NotificationList.md:
--------------------------------------------------------------------------------
1 | # NotificationList
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **value** | [**[Notification]**](Notification.md) | |
8 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/Order.md:
--------------------------------------------------------------------------------
1 | # Order
2 |
3 | Represents user orders in the api. When an order is matched multiple trades can be created this can be tracked by looking into the trade.order_id field.
4 |
5 | ## Properties
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **close_cancel_count** | **int** | | [optional]
9 | **create_ts** | **datetime** | | [optional]
10 | **decrease_count** | **int** | | [optional]
11 | **expiration_ts** | **datetime** | | [optional]
12 | **extra_cost** | **int** | | [optional]
13 | **extra_count** | **int** | | [optional]
14 | **fcc_cancel_count** | **int** | | [optional]
15 | **is_yes** | **bool** | | [optional]
16 | **last_update_op** | **str** | | [optional]
17 | **maker_fill_count** | **int** | | [optional]
18 | **market_id** | **str** | | [optional]
19 | **order_id** | **str** | | [optional]
20 | **place_count** | **int** | | [optional]
21 | **price** | **int** | | [optional]
22 | **queue_position** | **int** | | [optional]
23 | **remaining_count** | **int** | | [optional]
24 | **status** | **str** | | [optional]
25 | **taker_fees** | **int** | | [optional]
26 | **taker_fill_cost** | **int** | | [optional]
27 | **taker_fill_count** | **int** | | [optional]
28 | **user_id** | **str** | | [optional]
29 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
30 |
31 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
32 |
33 |
34 |
--------------------------------------------------------------------------------
/docs/OrderBook.md:
--------------------------------------------------------------------------------
1 | # OrderBook
2 |
3 | OrderBook Contains the number of pending resting order for each price on a specific market.
4 |
5 | ## Properties
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **no** | [**[PriceLevel]**](PriceLevel.md) | |
9 | **yes** | [**[PriceLevel]**](PriceLevel.md) | |
10 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/docs/OrderHistory.md:
--------------------------------------------------------------------------------
1 | # OrderHistory
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **canceled_count** | **int** | | [optional]
8 | **close_cancel_count** | **int** | | [optional]
9 | **created_at** | **datetime** | | [optional]
10 | **fcc_canceled_count** | **int** | | [optional]
11 | **filled_count** | **int** | | [optional]
12 | **is_yes** | **bool** | | [optional]
13 | **market_id** | **str** | | [optional]
14 | **market_title** | **str** | | [optional]
15 | **original_count** | **int** | | [optional]
16 | **price** | **int** | | [optional]
17 | **remaining_count** | **int** | | [optional]
18 | **updated_at** | **datetime** | | [optional]
19 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
20 |
21 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
22 |
23 |
24 |
--------------------------------------------------------------------------------
/docs/OrderList.md:
--------------------------------------------------------------------------------
1 | # OrderList
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **value** | [**[Order]**](Order.md) | |
8 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/PortfolioApi.md:
--------------------------------------------------------------------------------
1 | # kalshi.PortfolioApi
2 |
3 | All URIs are relative to *https://trading-api.kalshi.com/v1*
4 |
5 | Method | HTTP request | Description
6 | ------------- | ------------- | -------------
7 | [**user_get_portfolio_history**](PortfolioApi.md#user_get_portfolio_history) | **GET** /users/{user_id}/portfolio/history | UserGetPortfolioHistory
8 |
9 |
10 | # **user_get_portfolio_history**
11 | > UserGetPortfolioHistoryResponse user_get_portfolio_history(user_id)
12 |
13 | UserGetPortfolioHistory
14 |
15 | End-point for getting the logged in user's portfolio historical track. The value for the user_id path parameter should match the user_id value returned on the response for the last login request (POST /log_in).
16 |
17 | ### Example
18 |
19 | * Api Key Authentication (cookie):
20 | ```python
21 | import time
22 | import kalshi
23 | from kalshi.api import portfolio_api
24 | from kalshi.model.user_get_portfolio_history_response import UserGetPortfolioHistoryResponse
25 | from kalshi.model.user_get_portfolio_history_request import UserGetPortfolioHistoryRequest
26 | from pprint import pprint
27 | # Defining the host is optional and defaults to https://trading-api.kalshi.com/v1
28 | # See configuration.py for a list of all supported configuration parameters.
29 | configuration = kalshi.Configuration(
30 | host = "https://trading-api.kalshi.com/v1"
31 | )
32 |
33 | # The client must configure the authentication and authorization parameters
34 | # in accordance with the API server security policy.
35 | # Examples for each auth method are provided below, use the example that
36 | # satisfies your auth use case.
37 |
38 | # Configure API key authorization: cookie
39 | configuration.api_key['cookie'] = 'YOUR_API_KEY'
40 |
41 | # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
42 | # configuration.api_key_prefix['cookie'] = 'Bearer'
43 |
44 | # Enter a context with an instance of the API client
45 | with kalshi.ApiClient(configuration) as api_client:
46 | # Create an instance of the API class
47 | api_instance = portfolio_api.PortfolioApi(api_client)
48 | user_id = "user_id_example" # str | This parameter should be filled with your user_id provided on log_in
49 | user_get_portfolio_history_request = UserGetPortfolioHistoryRequest(
50 | max_date=dateutil_parser('1970-01-01T00:00:00.00Z'),
51 | max_ts=1,
52 | min_date=dateutil_parser('1970-01-01T00:00:00.00Z'),
53 | min_ts=1,
54 | ) # UserGetPortfolioHistoryRequest | Order create input data (optional)
55 |
56 | # example passing only required values which don't have defaults set
57 | try:
58 | # UserGetPortfolioHistory
59 | api_response = api_instance.user_get_portfolio_history(user_id)
60 | pprint(api_response)
61 | except kalshi.ApiException as e:
62 | print("Exception when calling PortfolioApi->user_get_portfolio_history: %s\n" % e)
63 |
64 | # example passing only required values which don't have defaults set
65 | # and optional values
66 | try:
67 | # UserGetPortfolioHistory
68 | api_response = api_instance.user_get_portfolio_history(user_id, user_get_portfolio_history_request=user_get_portfolio_history_request)
69 | pprint(api_response)
70 | except kalshi.ApiException as e:
71 | print("Exception when calling PortfolioApi->user_get_portfolio_history: %s\n" % e)
72 | ```
73 |
74 |
75 | ### Parameters
76 |
77 | Name | Type | Description | Notes
78 | ------------- | ------------- | ------------- | -------------
79 | **user_id** | **str**| This parameter should be filled with your user_id provided on log_in |
80 | **user_get_portfolio_history_request** | [**UserGetPortfolioHistoryRequest**](UserGetPortfolioHistoryRequest.md)| Order create input data | [optional]
81 |
82 | ### Return type
83 |
84 | [**UserGetPortfolioHistoryResponse**](UserGetPortfolioHistoryResponse.md)
85 |
86 | ### Authorization
87 |
88 | [cookie](../README.md#cookie)
89 |
90 | ### HTTP request headers
91 |
92 | - **Content-Type**: application/json
93 | - **Accept**: application/json
94 |
95 |
96 | ### HTTP response details
97 | | Status code | Description | Response headers |
98 | |-------------|-------------|------------------|
99 | **200** | | - |
100 | **400** | JSONError is a generic structure for API error responses. | * code -
* details -
* message -
* service -
|
101 | **401** | JSONError is a generic structure for API error responses. | * code -
* details -
* message -
* service -
|
102 | **403** | JSONError is a generic structure for API error responses. | * code -
* details -
* message -
* service -
|
103 | **500** | JSONError is a generic structure for API error responses. | * code -
* details -
* message -
* service -
|
104 |
105 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
106 |
107 |
--------------------------------------------------------------------------------
/docs/PortfolioMeasurement.md:
--------------------------------------------------------------------------------
1 | # PortfolioMeasurement
2 |
3 | Portfolio measurement is simply a snapshot of the portfolio of a user on a timestamp.
4 |
5 | ## Properties
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **a** | **int** | |
9 | **cumulative_deposits** | **int** | |
10 | **cumulative_number_settlements** | **int** | Count of settlements member has had from account creation to timestamp (inclusive) |
11 | **cumulative_withdrawals** | **int** | |
12 | **ts** | **int** | Timestamp of the read in UNIX timestamp. (https://www.unixtimestamp.com/) |
13 | **v** | **int** | |
14 | **balance_change** | **int** | | [optional]
15 | **reason** | **str** | Reason for the portfolio value change, if applicable | [optional]
16 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
17 |
18 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
19 |
20 |
21 |
--------------------------------------------------------------------------------
/docs/PriceLevel.md:
--------------------------------------------------------------------------------
1 | # PriceLevel
2 |
3 | PriceLevel It is the state of a the market with respect to a specific price. It is represented as an array of 2 integer values. The first one is the price value and the second one is the total number of resting contract at that price among all orders. Minimum length: 2 Maximum length: 2 Items.0.Minimum: 1 Items.0.Maximum: 99 Items.1.Minimum: 0 Example: [30, 50] means there are 50 resting
4 |
5 | ## Properties
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **value** | **[int]** | PriceLevel It is the state of a the market with respect to a specific price. It is represented as an array of 2 integer values. The first one is the price value and the second one is the total number of resting contract at that price among all orders. Minimum length: 2 Maximum length: 2 Items.0.Minimum: 1 Items.0.Maximum: 99 Items.1.Minimum: 0 Example: [30, 50] means there are 50 resting |
9 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
10 |
11 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
12 |
13 |
14 |
--------------------------------------------------------------------------------
/docs/PublicTrade.md:
--------------------------------------------------------------------------------
1 | # PublicTrade
2 |
3 | Represents a trade that can be displayed publicly. This does not include maker and taker information. A trade is created whenever an order is fully or partially matched.
4 |
5 | ## Properties
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **count** | **int** | | [optional]
9 | **create_date** | **datetime** | | [optional]
10 | **market_id** | **str** | | [optional]
11 | **price** | **int** | | [optional]
12 | **trade_id** | **str** | | [optional]
13 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
14 |
15 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
16 |
17 |
18 |
--------------------------------------------------------------------------------
/docs/PublicTradeList.md:
--------------------------------------------------------------------------------
1 | # PublicTradeList
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **value** | [**[PublicTrade]**](PublicTrade.md) | |
8 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/RangedMarket.md:
--------------------------------------------------------------------------------
1 | # RangedMarket
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **id** | **str** | | [optional]
8 | **mini_title** | **str** | | [optional]
9 | **mutually_exclusive_side** | **str** | | [optional]
10 | **ticker** | **str** | | [optional]
11 | **title** | **str** | | [optional]
12 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
13 |
14 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
15 |
16 |
17 |
--------------------------------------------------------------------------------
/docs/RangedMarketApi.md:
--------------------------------------------------------------------------------
1 | # kalshi.RangedMarketApi
2 |
3 | All URIs are relative to *https://trading-api.kalshi.com/v1*
4 |
5 | Method | HTTP request | Description
6 | ------------- | ------------- | -------------
7 | [**get_ranged_market**](RangedMarketApi.md#get_ranged_market) | **GET** /ranged_markets/{ranged_market_id} | GetRangedMarket
8 |
9 |
10 | # **get_ranged_market**
11 | > GetRangedMarketResponse get_ranged_market(ranged_market_id)
12 |
13 | GetRangedMarket
14 |
15 | End-point for getting data about a ranged market
16 |
17 | ### Example
18 |
19 | ```python
20 | import time
21 | import kalshi
22 | from kalshi.api import ranged_market_api
23 | from kalshi.model.get_ranged_market_response import GetRangedMarketResponse
24 | from pprint import pprint
25 | # Defining the host is optional and defaults to https://trading-api.kalshi.com/v1
26 | # See configuration.py for a list of all supported configuration parameters.
27 | configuration = kalshi.Configuration(
28 | host = "https://trading-api.kalshi.com/v1"
29 | )
30 |
31 |
32 | # Enter a context with an instance of the API client
33 | with kalshi.ApiClient() as api_client:
34 | # Create an instance of the API class
35 | api_instance = ranged_market_api.RangedMarketApi(api_client)
36 | ranged_market_id = "ranged_market_id_example" # str | Should be filled in with a ranged market id
37 |
38 | # example passing only required values which don't have defaults set
39 | try:
40 | # GetRangedMarket
41 | api_response = api_instance.get_ranged_market(ranged_market_id)
42 | pprint(api_response)
43 | except kalshi.ApiException as e:
44 | print("Exception when calling RangedMarketApi->get_ranged_market: %s\n" % e)
45 | ```
46 |
47 |
48 | ### Parameters
49 |
50 | Name | Type | Description | Notes
51 | ------------- | ------------- | ------------- | -------------
52 | **ranged_market_id** | **str**| Should be filled in with a ranged market id |
53 |
54 | ### Return type
55 |
56 | [**GetRangedMarketResponse**](GetRangedMarketResponse.md)
57 |
58 | ### Authorization
59 |
60 | No authorization required
61 |
62 | ### HTTP request headers
63 |
64 | - **Content-Type**: Not defined
65 | - **Accept**: application/json
66 |
67 |
68 | ### HTTP response details
69 | | Status code | Description | Response headers |
70 | |-------------|-------------|------------------|
71 | **200** | GetRangedMarketResponse | - |
72 | **400** | JSONError is a generic structure for API error responses. | * code -
* details -
* message -
* service -
|
73 | **401** | JSONError is a generic structure for API error responses. | * code -
* details -
* message -
* service -
|
74 | **403** | JSONError is a generic structure for API error responses. | * code -
* details -
* message -
* service -
|
75 | **404** | JSONError is a generic structure for API error responses. | * code -
* details -
* message -
* service -
|
76 | **500** | JSONError is a generic structure for API error responses. | * code -
* details -
* message -
* service -
|
77 |
78 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
79 |
80 |
--------------------------------------------------------------------------------
/docs/RangedMarketsApi.md:
--------------------------------------------------------------------------------
1 | # kalshi.RangedMarketsApi
2 |
3 | All URIs are relative to *https://trading-api.kalshi.com/v1*
4 |
5 | Method | HTTP request | Description
6 | ------------- | ------------- | -------------
7 | [**get_ranged_market_by_ticker**](RangedMarketsApi.md#get_ranged_market_by_ticker) | **GET** /ranged_markets_by_ticker/{ticker} | GetRangedMarketByTicker
8 |
9 |
10 | # **get_ranged_market_by_ticker**
11 | > GetRangedMarketByTickerResponse get_ranged_market_by_ticker(ticker)
12 |
13 | GetRangedMarketByTicker
14 |
15 | End-point for getting data about a ranged market by its ticker
16 |
17 | ### Example
18 |
19 | ```python
20 | import time
21 | import kalshi
22 | from kalshi.api import ranged_markets_api
23 | from kalshi.model.get_ranged_market_by_ticker_response import GetRangedMarketByTickerResponse
24 | from pprint import pprint
25 | # Defining the host is optional and defaults to https://trading-api.kalshi.com/v1
26 | # See configuration.py for a list of all supported configuration parameters.
27 | configuration = kalshi.Configuration(
28 | host = "https://trading-api.kalshi.com/v1"
29 | )
30 |
31 |
32 | # Enter a context with an instance of the API client
33 | with kalshi.ApiClient() as api_client:
34 | # Create an instance of the API class
35 | api_instance = ranged_markets_api.RangedMarketsApi(api_client)
36 | ticker = "ticker_example" # str | Should be the ticker of the ranged market
37 |
38 | # example passing only required values which don't have defaults set
39 | try:
40 | # GetRangedMarketByTicker
41 | api_response = api_instance.get_ranged_market_by_ticker(ticker)
42 | pprint(api_response)
43 | except kalshi.ApiException as e:
44 | print("Exception when calling RangedMarketsApi->get_ranged_market_by_ticker: %s\n" % e)
45 | ```
46 |
47 |
48 | ### Parameters
49 |
50 | Name | Type | Description | Notes
51 | ------------- | ------------- | ------------- | -------------
52 | **ticker** | **str**| Should be the ticker of the ranged market |
53 |
54 | ### Return type
55 |
56 | [**GetRangedMarketByTickerResponse**](GetRangedMarketByTickerResponse.md)
57 |
58 | ### Authorization
59 |
60 | No authorization required
61 |
62 | ### HTTP request headers
63 |
64 | - **Content-Type**: Not defined
65 | - **Accept**: application/json
66 |
67 |
68 | ### HTTP response details
69 | | Status code | Description | Response headers |
70 | |-------------|-------------|------------------|
71 | **200** | GetRangedMarketByTickerResponse | - |
72 | **400** | JSONError is a generic structure for API error responses. | * code -
* details -
* message -
* service -
|
73 | **401** | JSONError is a generic structure for API error responses. | * code -
* details -
* message -
* service -
|
74 | **403** | JSONError is a generic structure for API error responses. | * code -
* details -
* message -
* service -
|
75 | **404** | JSONError is a generic structure for API error responses. | * code -
* details -
* message -
* service -
|
76 | **500** | JSONError is a generic structure for API error responses. | * code -
* details -
* message -
* service -
|
77 |
78 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
79 |
80 |
--------------------------------------------------------------------------------
/docs/ResetPasswordRequest.md:
--------------------------------------------------------------------------------
1 | # ResetPasswordRequest
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **email** | **str** | Email used to create your account |
8 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/SettlementHistory.md:
--------------------------------------------------------------------------------
1 | # SettlementHistory
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **determined_time** | **datetime** | | [optional]
8 | **market_id** | **str** | | [optional]
9 | **market_result** | **str** | | [optional]
10 | **market_title** | **str** | | [optional]
11 | **no_count** | **int** | | [optional]
12 | **no_total_cost** | **int** | | [optional]
13 | **profit** | **int** | | [optional]
14 | **settled_time** | **datetime** | | [optional]
15 | **yes_count** | **int** | | [optional]
16 | **yes_total_cost** | **int** | | [optional]
17 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
18 |
19 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
20 |
21 |
22 |
--------------------------------------------------------------------------------
/docs/SettlementSource.md:
--------------------------------------------------------------------------------
1 | # SettlementSource
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **name** | **str** | | [optional]
8 | **url** | **str** | | [optional]
9 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
10 |
11 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
12 |
13 |
14 |
--------------------------------------------------------------------------------
/docs/SubscriptionPreference.md:
--------------------------------------------------------------------------------
1 | # SubscriptionPreference
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **subscription_level** | **str** | | [optional]
8 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/TradeHistory.md:
--------------------------------------------------------------------------------
1 | # TradeHistory
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **amount** | **int** | | [optional]
8 | **created_at** | **datetime** | | [optional]
9 | **fee** | **int** | | [optional]
10 | **is_yes** | **bool** | | [optional]
11 | **market_id** | **str** | | [optional]
12 | **market_title** | **str** | | [optional]
13 | **price** | **int** | | [optional]
14 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
15 |
16 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
17 |
18 |
19 |
--------------------------------------------------------------------------------
/docs/TradesGetResponse.md:
--------------------------------------------------------------------------------
1 | # TradesGetResponse
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **trades** | [**PublicTradeList**](PublicTradeList.md) | |
8 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/User.md:
--------------------------------------------------------------------------------
1 | # User
2 |
3 | Represents a user's profile on the api.
4 |
5 | ## Properties
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **area_code** | **str** | | [optional]
9 | **birth_date** | **str** | | [optional]
10 | **city** | **str** | | [optional]
11 | **country** | **str** | | [optional]
12 | **country_code** | **str** | | [optional]
13 | **created_ts** | **datetime** | | [optional]
14 | **email** | **str** | | [optional]
15 | **finished_fre** | **bool** | | [optional]
16 | **first_name** | **str** | | [optional]
17 | **last_name** | **str** | | [optional]
18 | **phone_number** | **str** | | [optional]
19 | **postal_code** | **str** | | [optional]
20 | **state** | **str** | | [optional]
21 | **street1** | **str** | | [optional]
22 | **street2** | **str** | | [optional]
23 | **use_bid_ask** | **bool** | | [optional]
24 | **user_id** | **str** | | [optional]
25 | **watchlist** | **[str]** | | [optional]
26 | **wire_code** | **str** | | [optional]
27 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
28 |
29 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
30 |
31 |
32 |
--------------------------------------------------------------------------------
/docs/UserChangePasswordRequest.md:
--------------------------------------------------------------------------------
1 | # UserChangePasswordRequest
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **new_password** | **str** | New password value. |
8 | **old_password** | **str** | Old password should be passed as a validation parameter. |
9 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
10 |
11 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
12 |
13 |
14 |
--------------------------------------------------------------------------------
/docs/UserDepositRequest.md:
--------------------------------------------------------------------------------
1 | # UserDepositRequest
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **amount_cents** | **int** | |
8 | **bank_id** | **str** | |
9 | **fee_cents** | **int** | |
10 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/docs/UserDepositResponse.md:
--------------------------------------------------------------------------------
1 | # UserDepositResponse
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **deposit_id** | **str** | Id for the deposit that was created. |
8 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/UserGetAccountHistoryResponse.md:
--------------------------------------------------------------------------------
1 | # UserGetAccountHistoryResponse
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **entries** | [**[AccountHistoryEntry]**](AccountHistoryEntry.md) | List of account history items for the user |
8 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/UserGetBalanceResponse.md:
--------------------------------------------------------------------------------
1 | # UserGetBalanceResponse
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **balance** | **int** | |
8 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/UserGetMarketPositionResponse.md:
--------------------------------------------------------------------------------
1 | # UserGetMarketPositionResponse
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **market_position** | [**MarketPosition**](MarketPosition.md) | |
8 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/UserGetMarketPositionsResponse.md:
--------------------------------------------------------------------------------
1 | # UserGetMarketPositionsResponse
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **market_positions** | [**[MarketPosition]**](MarketPosition.md) | List of market positions |
8 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/UserGetMarketResponse.md:
--------------------------------------------------------------------------------
1 | # UserGetMarketResponse
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **market** | [**Market**](Market.md) | |
8 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/UserGetMarketsResponse.md:
--------------------------------------------------------------------------------
1 | # UserGetMarketsResponse
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **markets** | [**[Market]**](Market.md) | |
8 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/UserGetNotificationsResponse.md:
--------------------------------------------------------------------------------
1 | # UserGetNotificationsResponse
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **notifications** | [**NotificationList**](NotificationList.md) | |
8 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/UserGetPortfolioHistoryRequest.md:
--------------------------------------------------------------------------------
1 | # UserGetPortfolioHistoryRequest
2 |
3 | Request for fetching user portfolio history
4 |
5 | ## Properties
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **max_date** | **datetime** | Restricts the response to orders before a timestamp in: query | [optional]
9 | **max_ts** | **int** | Restricts the response to orders before a timestamp in unix seconds, overrides max_date in: query | [optional]
10 | **min_date** | **datetime** | Restricts the response to orders after a timestamp in: query | [optional]
11 | **min_ts** | **int** | Restricts the response to orders after a timestamp in unix seconds, overrides min_date in: query | [optional]
12 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
13 |
14 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
15 |
16 |
17 |
--------------------------------------------------------------------------------
/docs/UserGetPortfolioHistoryResponse.md:
--------------------------------------------------------------------------------
1 | # UserGetPortfolioHistoryResponse
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **values** | [**[PortfolioMeasurement]**](PortfolioMeasurement.md) | | [optional]
8 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/UserGetPortfolioValueResponse.md:
--------------------------------------------------------------------------------
1 | # UserGetPortfolioValueResponse
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **portfolio_value** | **int** | |
8 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/UserGetProfileResponse.md:
--------------------------------------------------------------------------------
1 | # UserGetProfileResponse
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **user** | [**User**](User.md) | |
8 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/UserGetWatchlistResponse.md:
--------------------------------------------------------------------------------
1 | # UserGetWatchlistResponse
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **watchlist** | [**Watchlist**](Watchlist.md) | |
8 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/UserListLedgerxBankAccountsResponse.md:
--------------------------------------------------------------------------------
1 | # UserListLedgerxBankAccountsResponse
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **accounts** | [**[BankAccountDetails]**](BankAccountDetails.md) | |
8 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/UserOrderCreateRequest.md:
--------------------------------------------------------------------------------
1 | # UserOrderCreateRequest
2 |
3 | Request for submitting an order
4 |
5 | ## Properties
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **count** | **int** | Specifies how many contracts should be bought |
9 | **market_id** | **str** | Specifies the id of the market for this order |
10 | **price** | **int** | |
11 | **side** | **str** | Specifies if this is a 'yes' or 'no' order |
12 | **expiration_unix_ts** | **int** | Specifies the expiration time of the order, in unix seconds. If this is not supplied, or is 0, the order won't expire. | [optional]
13 | **max_cost_cents** | **int** | | [optional]
14 | **sell_position_capped** | **bool** | Specifies whether the order place count should be capped by the members current position. | [optional]
15 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
16 |
17 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
18 |
19 |
20 |
--------------------------------------------------------------------------------
/docs/UserOrderCreateResponse.md:
--------------------------------------------------------------------------------
1 | # UserOrderCreateResponse
2 |
3 | Response for submitting an order
4 |
5 | ## Properties
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **order** | [**Order**](Order.md) | |
9 | **status** | **str** | Status of the order submit operation |
10 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/docs/UserOrderDecreaseRequest.md:
--------------------------------------------------------------------------------
1 | # UserOrderDecreaseRequest
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **count** | **int** | | [optional]
8 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/UserOrderDecreaseResponse.md:
--------------------------------------------------------------------------------
1 | # UserOrderDecreaseResponse
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **order** | [**Order**](Order.md) | |
8 | **reduced_by** | **int** | Status of the order submit operation |
9 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
10 |
11 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
12 |
13 |
14 |
--------------------------------------------------------------------------------
/docs/UserOrdersGetResponse.md:
--------------------------------------------------------------------------------
1 | # UserOrdersGetResponse
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **orders** | [**OrderList**](OrderList.md) | |
8 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/UserTrade.md:
--------------------------------------------------------------------------------
1 | # UserTrade
2 |
3 | Represents a trade from the user perspective. A trade is created whenever an order is fully or partially matched, so there can be multiple trades with the same order_id. It is guaranteed that the sum of the count field for all the trades with the same order_id field shouldn't exceed the place_count on the order.
4 |
5 | ## Properties
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **count** | **int** | | [optional]
9 | **create_date** | **datetime** | | [optional]
10 | **id** | **str** | | [optional]
11 | **is_taker** | **bool** | | [optional]
12 | **is_yes** | **bool** | | [optional]
13 | **market_id** | **str** | | [optional]
14 | **order_id** | **str** | | [optional]
15 | **price** | **int** | | [optional]
16 | **status** | **str** | | [optional]
17 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
18 |
19 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
20 |
21 |
22 |
--------------------------------------------------------------------------------
/docs/UserTradeList.md:
--------------------------------------------------------------------------------
1 | # UserTradeList
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **value** | [**[UserTrade]**](UserTrade.md) | |
8 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/UserTradesGetResponse.md:
--------------------------------------------------------------------------------
1 | # UserTradesGetResponse
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **trades** | [**UserTradeList**](UserTradeList.md) | |
8 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/UserUpdateProfileRequest.md:
--------------------------------------------------------------------------------
1 | # UserUpdateProfileRequest
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **area_code** | **str** | User's phone area code. |
8 | **country** | **str** | User's country 2 digits code |
9 | **country_code** | **str** | User's phone country code. Should be 1 for now because only USA accounts are accepted. |
10 | **phone_number** | **str** | User's phone number. |
11 | **postal_code** | **str** | User's address postal code |
12 | **state** | **str** | User's state 2 digits code |
13 | **birth_date** | **str** | | [optional]
14 | **city** | **str** | | [optional]
15 | **finished_fre** | **bool** | | [optional]
16 | **first_name** | **str** | | [optional]
17 | **last_name** | **str** | | [optional]
18 | **street1** | **str** | | [optional]
19 | **street2** | **str** | | [optional]
20 | **use_bid_ask** | **bool** | | [optional]
21 | **watchlist** | **[str]** | | [optional]
22 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
23 |
24 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
25 |
26 |
27 |
--------------------------------------------------------------------------------
/docs/UserWithdrawalRequest.md:
--------------------------------------------------------------------------------
1 | # UserWithdrawalRequest
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **amount_cents** | **int** | |
8 | **bank_id** | **str** | |
9 | **fee_cents** | **int** | |
10 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
11 |
12 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13 |
14 |
15 |
--------------------------------------------------------------------------------
/docs/UserWithdrawalResponse.md:
--------------------------------------------------------------------------------
1 | # UserWithdrawalResponse
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **withdrawal_id** | **str** | Id for the withdrawal that was created. |
8 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
9 |
10 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/Watchlist.md:
--------------------------------------------------------------------------------
1 | # Watchlist
2 |
3 | Watchlist is the list of markets that you have some activity on, this is used mostly by the UI.
4 |
5 | ## Properties
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **market_ids** | **[str]** | | [optional]
9 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
10 |
11 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
12 |
13 |
14 |
--------------------------------------------------------------------------------
/docs/Withdrawal.md:
--------------------------------------------------------------------------------
1 | # Withdrawal
2 |
3 | Represents a withdrawal.
4 |
5 | ## Properties
6 | Name | Type | Description | Notes
7 | ------------ | ------------- | ------------- | -------------
8 | **amount_cents** | **int** | | [optional]
9 | **bank_id** | **str** | | [optional]
10 | **created_ts** | **datetime** | | [optional]
11 | **id** | **str** | | [optional]
12 | **return_code** | **str** | | [optional]
13 | **return_reason** | **str** | | [optional]
14 | **status** | **str** | | [optional]
15 | **user_id** | **str** | | [optional]
16 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
17 |
18 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
19 |
20 |
21 |
--------------------------------------------------------------------------------
/docs/WithdrawalHistory.md:
--------------------------------------------------------------------------------
1 | # WithdrawalHistory
2 |
3 |
4 | ## Properties
5 | Name | Type | Description | Notes
6 | ------------ | ------------- | ------------- | -------------
7 | **amount** | **int** | | [optional]
8 | **created_at** | **datetime** | | [optional]
9 | **fee** | **int** | | [optional]
10 | **returned_amount** | **int** | | [optional]
11 | **status** | **str** | | [optional]
12 | **updated_at** | **datetime** | | [optional]
13 | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
14 |
15 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
16 |
17 |
18 |
--------------------------------------------------------------------------------
/generate.sh:
--------------------------------------------------------------------------------
1 | openapi-generator generate \
2 | -i swagger.json \
3 | -g python \
4 | --additional-properties packageName=kalshi,projectName=kalshi
5 |
--------------------------------------------------------------------------------
/git_push.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
3 | #
4 | # Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com"
5 |
6 | git_user_id=$1
7 | git_repo_id=$2
8 | release_note=$3
9 | git_host=$4
10 |
11 | if [ "$git_host" = "" ]; then
12 | git_host="github.com"
13 | echo "[INFO] No command line input provided. Set \$git_host to $git_host"
14 | fi
15 |
16 | if [ "$git_user_id" = "" ]; then
17 | git_user_id="GIT_USER_ID"
18 | echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
19 | fi
20 |
21 | if [ "$git_repo_id" = "" ]; then
22 | git_repo_id="GIT_REPO_ID"
23 | echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
24 | fi
25 |
26 | if [ "$release_note" = "" ]; then
27 | release_note="Minor update"
28 | echo "[INFO] No command line input provided. Set \$release_note to $release_note"
29 | fi
30 |
31 | # Initialize the local directory as a Git repository
32 | git init
33 |
34 | # Adds the files in the local repository and stages them for commit.
35 | git add .
36 |
37 | # Commits the tracked changes and prepares them to be pushed to a remote repository.
38 | git commit -m "$release_note"
39 |
40 | # Sets the new remote
41 | git_remote=`git remote`
42 | if [ "$git_remote" = "" ]; then # git remote not defined
43 |
44 | if [ "$GIT_TOKEN" = "" ]; then
45 | echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
46 | git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
47 | else
48 | git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git
49 | fi
50 |
51 | fi
52 |
53 | git pull origin master
54 |
55 | # Pushes (Forces) the changes in the local repository up to the remote repository
56 | echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
57 | git push origin master 2>&1 | grep -v 'To https'
58 |
59 |
--------------------------------------------------------------------------------
/kalshi/__init__.py:
--------------------------------------------------------------------------------
1 | # flake8: noqa
2 |
3 | """
4 | Kalshi API.
5 |
6 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
7 |
8 | The version of the OpenAPI document: 1.0.0
9 | Generated by: https://openapi-generator.tech
10 | """
11 |
12 |
13 | __version__ = "1.0.0"
14 |
15 | # import ApiClient
16 | from kalshi.api_client import ApiClient
17 |
18 | # import Configuration
19 | from kalshi.configuration import Configuration
20 |
21 | # import exceptions
22 | from kalshi.exceptions import OpenApiException
23 | from kalshi.exceptions import ApiAttributeError
24 | from kalshi.exceptions import ApiTypeError
25 | from kalshi.exceptions import ApiValueError
26 | from kalshi.exceptions import ApiKeyError
27 | from kalshi.exceptions import ApiException
28 |
--------------------------------------------------------------------------------
/kalshi/api/__init__.py:
--------------------------------------------------------------------------------
1 | # do not import all apis into this module because that uses a lot of memory and stack frames
2 | # if you need the ability to import all apis from one package, import them with
3 | # from kalshi.apis import AccountApi
4 |
--------------------------------------------------------------------------------
/kalshi/api/default_api.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import re # noqa: F401
12 | import sys # noqa: F401
13 |
14 | from kalshi.api_client import ApiClient, Endpoint as _Endpoint
15 | from kalshi.model_utils import ( # noqa: F401
16 | check_allowed_values,
17 | check_validations,
18 | date,
19 | datetime,
20 | file_type,
21 | none_type,
22 | validate_and_convert_types
23 | )
24 | from kalshi.model.trades_get_response import TradesGetResponse
25 |
26 |
27 | class DefaultApi(object):
28 | """NOTE: This class is auto generated by OpenAPI Generator
29 | Ref: https://openapi-generator.tech
30 |
31 | Do not edit the class manually.
32 | """
33 |
34 | def __init__(self, api_client=None):
35 | if api_client is None:
36 | api_client = ApiClient()
37 | self.api_client = api_client
38 |
39 | def __get_trades(
40 | self,
41 | **kwargs
42 | ):
43 | """GetTrades # noqa: E501
44 |
45 | End-point for getting all trades for all markets. # noqa: E501
46 | This method makes a synchronous HTTP request by default. To make an
47 | asynchronous HTTP request, please pass async_req=True
48 |
49 | >>> thread = api.get_trades(async_req=True)
50 | >>> result = thread.get()
51 |
52 |
53 | Keyword Args:
54 | trades_date (str): Restricts the response to trades during a certain day. Format: YYYY-MM-DD. [optional]
55 | page_size (int): Parameter to specify the number of results per page. [optional]
56 | page_number (int): Parameter to specify which page of the results should be retrieved. [optional]
57 | _return_http_data_only (bool): response data without head status
58 | code and headers. Default is True.
59 | _preload_content (bool): if False, the urllib3.HTTPResponse object
60 | will be returned without reading/decoding response data.
61 | Default is True.
62 | _request_timeout (int/float/tuple): timeout setting for this request. If
63 | one number provided, it will be total request timeout. It can also
64 | be a pair (tuple) of (connection, read) timeouts.
65 | Default is None.
66 | _check_input_type (bool): specifies if type checking
67 | should be done one the data sent to the server.
68 | Default is True.
69 | _check_return_type (bool): specifies if type checking
70 | should be done one the data received from the server.
71 | Default is True.
72 | _host_index (int/None): specifies the index of the server
73 | that we want to use.
74 | Default is read from the configuration.
75 | async_req (bool): execute request asynchronously
76 |
77 | Returns:
78 | TradesGetResponse
79 | If the method is called asynchronously, returns the request
80 | thread.
81 | """
82 | kwargs['async_req'] = kwargs.get(
83 | 'async_req', False
84 | )
85 | kwargs['_return_http_data_only'] = kwargs.get(
86 | '_return_http_data_only', True
87 | )
88 | kwargs['_preload_content'] = kwargs.get(
89 | '_preload_content', True
90 | )
91 | kwargs['_request_timeout'] = kwargs.get(
92 | '_request_timeout', None
93 | )
94 | kwargs['_check_input_type'] = kwargs.get(
95 | '_check_input_type', True
96 | )
97 | kwargs['_check_return_type'] = kwargs.get(
98 | '_check_return_type', True
99 | )
100 | kwargs['_host_index'] = kwargs.get('_host_index')
101 | return self.call_with_http_info(**kwargs)
102 |
103 | self.get_trades = _Endpoint(
104 | settings={
105 | 'response_type': (TradesGetResponse,),
106 | 'auth': [],
107 | 'endpoint_path': '/trades',
108 | 'operation_id': 'get_trades',
109 | 'http_method': 'GET',
110 | 'servers': None,
111 | },
112 | params_map={
113 | 'all': [
114 | 'trades_date',
115 | 'page_size',
116 | 'page_number',
117 | ],
118 | 'required': [],
119 | 'nullable': [
120 | ],
121 | 'enum': [
122 | ],
123 | 'validation': [
124 | ]
125 | },
126 | root_map={
127 | 'validations': {
128 | },
129 | 'allowed_values': {
130 | },
131 | 'openapi_types': {
132 | 'trades_date':
133 | (str,),
134 | 'page_size':
135 | (int,),
136 | 'page_number':
137 | (int,),
138 | },
139 | 'attribute_map': {
140 | 'trades_date': 'trades_date',
141 | 'page_size': 'page_size',
142 | 'page_number': 'page_number',
143 | },
144 | 'location_map': {
145 | 'trades_date': 'query',
146 | 'page_size': 'query',
147 | 'page_number': 'query',
148 | },
149 | 'collection_format_map': {
150 | }
151 | },
152 | headers_map={
153 | 'accept': [
154 | 'application/json'
155 | ],
156 | 'content_type': [],
157 | },
158 | api_client=api_client,
159 | callable=__get_trades
160 | )
161 |
--------------------------------------------------------------------------------
/kalshi/api/exchange_api.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import re # noqa: F401
12 | import sys # noqa: F401
13 |
14 | from kalshi.api_client import ApiClient, Endpoint as _Endpoint
15 | from kalshi.model_utils import ( # noqa: F401
16 | check_allowed_values,
17 | check_validations,
18 | date,
19 | datetime,
20 | file_type,
21 | none_type,
22 | validate_and_convert_types
23 | )
24 |
25 |
26 | class ExchangeApi(object):
27 | """NOTE: This class is auto generated by OpenAPI Generator
28 | Ref: https://openapi-generator.tech
29 |
30 | Do not edit the class manually.
31 | """
32 |
33 | def __init__(self, api_client=None):
34 | if api_client is None:
35 | api_client = ApiClient()
36 | self.api_client = api_client
37 |
38 | def __get_exchange_status(
39 | self,
40 | **kwargs
41 | ):
42 | """get_exchange_status # noqa: E501
43 |
44 | End-point for getting the exchange status # noqa: E501
45 | This method makes a synchronous HTTP request by default. To make an
46 | asynchronous HTTP request, please pass async_req=True
47 |
48 | >>> thread = api.get_exchange_status(async_req=True)
49 | >>> result = thread.get()
50 |
51 |
52 | Keyword Args:
53 | _return_http_data_only (bool): response data without head status
54 | code and headers. Default is True.
55 | _preload_content (bool): if False, the urllib3.HTTPResponse object
56 | will be returned without reading/decoding response data.
57 | Default is True.
58 | _request_timeout (int/float/tuple): timeout setting for this request. If
59 | one number provided, it will be total request timeout. It can also
60 | be a pair (tuple) of (connection, read) timeouts.
61 | Default is None.
62 | _check_input_type (bool): specifies if type checking
63 | should be done one the data sent to the server.
64 | Default is True.
65 | _check_return_type (bool): specifies if type checking
66 | should be done one the data received from the server.
67 | Default is True.
68 | _host_index (int/None): specifies the index of the server
69 | that we want to use.
70 | Default is read from the configuration.
71 | async_req (bool): execute request asynchronously
72 |
73 | Returns:
74 | None
75 | If the method is called asynchronously, returns the request
76 | thread.
77 | """
78 | kwargs['async_req'] = kwargs.get(
79 | 'async_req', False
80 | )
81 | kwargs['_return_http_data_only'] = kwargs.get(
82 | '_return_http_data_only', True
83 | )
84 | kwargs['_preload_content'] = kwargs.get(
85 | '_preload_content', True
86 | )
87 | kwargs['_request_timeout'] = kwargs.get(
88 | '_request_timeout', None
89 | )
90 | kwargs['_check_input_type'] = kwargs.get(
91 | '_check_input_type', True
92 | )
93 | kwargs['_check_return_type'] = kwargs.get(
94 | '_check_return_type', True
95 | )
96 | kwargs['_host_index'] = kwargs.get('_host_index')
97 | return self.call_with_http_info(**kwargs)
98 |
99 | self.get_exchange_status = _Endpoint(
100 | settings={
101 | 'response_type': None,
102 | 'auth': [
103 | 'cookie'
104 | ],
105 | 'endpoint_path': '/exchange/status',
106 | 'operation_id': 'get_exchange_status',
107 | 'http_method': 'GET',
108 | 'servers': None,
109 | },
110 | params_map={
111 | 'all': [
112 | ],
113 | 'required': [],
114 | 'nullable': [
115 | ],
116 | 'enum': [
117 | ],
118 | 'validation': [
119 | ]
120 | },
121 | root_map={
122 | 'validations': {
123 | },
124 | 'allowed_values': {
125 | },
126 | 'openapi_types': {
127 | },
128 | 'attribute_map': {
129 | },
130 | 'location_map': {
131 | },
132 | 'collection_format_map': {
133 | }
134 | },
135 | headers_map={
136 | 'accept': [],
137 | 'content_type': [],
138 | },
139 | api_client=api_client,
140 | callable=__get_exchange_status
141 | )
142 |
--------------------------------------------------------------------------------
/kalshi/api/ranged_market_api.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import re # noqa: F401
12 | import sys # noqa: F401
13 |
14 | from kalshi.api_client import ApiClient, Endpoint as _Endpoint
15 | from kalshi.model_utils import ( # noqa: F401
16 | check_allowed_values,
17 | check_validations,
18 | date,
19 | datetime,
20 | file_type,
21 | none_type,
22 | validate_and_convert_types
23 | )
24 | from kalshi.model.get_ranged_market_response import GetRangedMarketResponse
25 |
26 |
27 | class RangedMarketApi(object):
28 | """NOTE: This class is auto generated by OpenAPI Generator
29 | Ref: https://openapi-generator.tech
30 |
31 | Do not edit the class manually.
32 | """
33 |
34 | def __init__(self, api_client=None):
35 | if api_client is None:
36 | api_client = ApiClient()
37 | self.api_client = api_client
38 |
39 | def __get_ranged_market(
40 | self,
41 | ranged_market_id,
42 | **kwargs
43 | ):
44 | """GetRangedMarket # noqa: E501
45 |
46 | End-point for getting data about a ranged market # noqa: E501
47 | This method makes a synchronous HTTP request by default. To make an
48 | asynchronous HTTP request, please pass async_req=True
49 |
50 | >>> thread = api.get_ranged_market(ranged_market_id, async_req=True)
51 | >>> result = thread.get()
52 |
53 | Args:
54 | ranged_market_id (str): Should be filled in with a ranged market id
55 |
56 | Keyword Args:
57 | _return_http_data_only (bool): response data without head status
58 | code and headers. Default is True.
59 | _preload_content (bool): if False, the urllib3.HTTPResponse object
60 | will be returned without reading/decoding response data.
61 | Default is True.
62 | _request_timeout (int/float/tuple): timeout setting for this request. If
63 | one number provided, it will be total request timeout. It can also
64 | be a pair (tuple) of (connection, read) timeouts.
65 | Default is None.
66 | _check_input_type (bool): specifies if type checking
67 | should be done one the data sent to the server.
68 | Default is True.
69 | _check_return_type (bool): specifies if type checking
70 | should be done one the data received from the server.
71 | Default is True.
72 | _host_index (int/None): specifies the index of the server
73 | that we want to use.
74 | Default is read from the configuration.
75 | async_req (bool): execute request asynchronously
76 |
77 | Returns:
78 | GetRangedMarketResponse
79 | If the method is called asynchronously, returns the request
80 | thread.
81 | """
82 | kwargs['async_req'] = kwargs.get(
83 | 'async_req', False
84 | )
85 | kwargs['_return_http_data_only'] = kwargs.get(
86 | '_return_http_data_only', True
87 | )
88 | kwargs['_preload_content'] = kwargs.get(
89 | '_preload_content', True
90 | )
91 | kwargs['_request_timeout'] = kwargs.get(
92 | '_request_timeout', None
93 | )
94 | kwargs['_check_input_type'] = kwargs.get(
95 | '_check_input_type', True
96 | )
97 | kwargs['_check_return_type'] = kwargs.get(
98 | '_check_return_type', True
99 | )
100 | kwargs['_host_index'] = kwargs.get('_host_index')
101 | kwargs['ranged_market_id'] = \
102 | ranged_market_id
103 | return self.call_with_http_info(**kwargs)
104 |
105 | self.get_ranged_market = _Endpoint(
106 | settings={
107 | 'response_type': (GetRangedMarketResponse,),
108 | 'auth': [],
109 | 'endpoint_path': '/ranged_markets/{ranged_market_id}',
110 | 'operation_id': 'get_ranged_market',
111 | 'http_method': 'GET',
112 | 'servers': None,
113 | },
114 | params_map={
115 | 'all': [
116 | 'ranged_market_id',
117 | ],
118 | 'required': [
119 | 'ranged_market_id',
120 | ],
121 | 'nullable': [
122 | ],
123 | 'enum': [
124 | ],
125 | 'validation': [
126 | ]
127 | },
128 | root_map={
129 | 'validations': {
130 | },
131 | 'allowed_values': {
132 | },
133 | 'openapi_types': {
134 | 'ranged_market_id':
135 | (str,),
136 | },
137 | 'attribute_map': {
138 | 'ranged_market_id': 'ranged_market_id',
139 | },
140 | 'location_map': {
141 | 'ranged_market_id': 'path',
142 | },
143 | 'collection_format_map': {
144 | }
145 | },
146 | headers_map={
147 | 'accept': [
148 | 'application/json'
149 | ],
150 | 'content_type': [],
151 | },
152 | api_client=api_client,
153 | callable=__get_ranged_market
154 | )
155 |
--------------------------------------------------------------------------------
/kalshi/api/ranged_markets_api.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import re # noqa: F401
12 | import sys # noqa: F401
13 |
14 | from kalshi.api_client import ApiClient, Endpoint as _Endpoint
15 | from kalshi.model_utils import ( # noqa: F401
16 | check_allowed_values,
17 | check_validations,
18 | date,
19 | datetime,
20 | file_type,
21 | none_type,
22 | validate_and_convert_types
23 | )
24 | from kalshi.model.get_ranged_market_by_ticker_response import GetRangedMarketByTickerResponse
25 |
26 |
27 | class RangedMarketsApi(object):
28 | """NOTE: This class is auto generated by OpenAPI Generator
29 | Ref: https://openapi-generator.tech
30 |
31 | Do not edit the class manually.
32 | """
33 |
34 | def __init__(self, api_client=None):
35 | if api_client is None:
36 | api_client = ApiClient()
37 | self.api_client = api_client
38 |
39 | def __get_ranged_market_by_ticker(
40 | self,
41 | ticker,
42 | **kwargs
43 | ):
44 | """GetRangedMarketByTicker # noqa: E501
45 |
46 | End-point for getting data about a ranged market by its ticker # noqa: E501
47 | This method makes a synchronous HTTP request by default. To make an
48 | asynchronous HTTP request, please pass async_req=True
49 |
50 | >>> thread = api.get_ranged_market_by_ticker(ticker, async_req=True)
51 | >>> result = thread.get()
52 |
53 | Args:
54 | ticker (str): Should be the ticker of the ranged market
55 |
56 | Keyword Args:
57 | _return_http_data_only (bool): response data without head status
58 | code and headers. Default is True.
59 | _preload_content (bool): if False, the urllib3.HTTPResponse object
60 | will be returned without reading/decoding response data.
61 | Default is True.
62 | _request_timeout (int/float/tuple): timeout setting for this request. If
63 | one number provided, it will be total request timeout. It can also
64 | be a pair (tuple) of (connection, read) timeouts.
65 | Default is None.
66 | _check_input_type (bool): specifies if type checking
67 | should be done one the data sent to the server.
68 | Default is True.
69 | _check_return_type (bool): specifies if type checking
70 | should be done one the data received from the server.
71 | Default is True.
72 | _host_index (int/None): specifies the index of the server
73 | that we want to use.
74 | Default is read from the configuration.
75 | async_req (bool): execute request asynchronously
76 |
77 | Returns:
78 | GetRangedMarketByTickerResponse
79 | If the method is called asynchronously, returns the request
80 | thread.
81 | """
82 | kwargs['async_req'] = kwargs.get(
83 | 'async_req', False
84 | )
85 | kwargs['_return_http_data_only'] = kwargs.get(
86 | '_return_http_data_only', True
87 | )
88 | kwargs['_preload_content'] = kwargs.get(
89 | '_preload_content', True
90 | )
91 | kwargs['_request_timeout'] = kwargs.get(
92 | '_request_timeout', None
93 | )
94 | kwargs['_check_input_type'] = kwargs.get(
95 | '_check_input_type', True
96 | )
97 | kwargs['_check_return_type'] = kwargs.get(
98 | '_check_return_type', True
99 | )
100 | kwargs['_host_index'] = kwargs.get('_host_index')
101 | kwargs['ticker'] = \
102 | ticker
103 | return self.call_with_http_info(**kwargs)
104 |
105 | self.get_ranged_market_by_ticker = _Endpoint(
106 | settings={
107 | 'response_type': (GetRangedMarketByTickerResponse,),
108 | 'auth': [],
109 | 'endpoint_path': '/ranged_markets_by_ticker/{ticker}',
110 | 'operation_id': 'get_ranged_market_by_ticker',
111 | 'http_method': 'GET',
112 | 'servers': None,
113 | },
114 | params_map={
115 | 'all': [
116 | 'ticker',
117 | ],
118 | 'required': [
119 | 'ticker',
120 | ],
121 | 'nullable': [
122 | ],
123 | 'enum': [
124 | ],
125 | 'validation': [
126 | ]
127 | },
128 | root_map={
129 | 'validations': {
130 | },
131 | 'allowed_values': {
132 | },
133 | 'openapi_types': {
134 | 'ticker':
135 | (str,),
136 | },
137 | 'attribute_map': {
138 | 'ticker': 'ticker',
139 | },
140 | 'location_map': {
141 | 'ticker': 'path',
142 | },
143 | 'collection_format_map': {
144 | }
145 | },
146 | headers_map={
147 | 'accept': [
148 | 'application/json'
149 | ],
150 | 'content_type': [],
151 | },
152 | api_client=api_client,
153 | callable=__get_ranged_market_by_ticker
154 | )
155 |
--------------------------------------------------------------------------------
/kalshi/apis/__init__.py:
--------------------------------------------------------------------------------
1 |
2 | # flake8: noqa
3 |
4 | # Import all APIs into this package.
5 | # If you have many APIs here with many many models used in each API this may
6 | # raise a `RecursionError`.
7 | # In order to avoid this, import only the API that you directly need like:
8 | #
9 | # from .api.account_api import AccountApi
10 | #
11 | # or import this package, but before doing it, use:
12 | #
13 | # import sys
14 | # sys.setrecursionlimit(n)
15 |
16 | # Import APIs into API package:
17 | from kalshi.api.account_api import AccountApi
18 | from kalshi.api.auth_api import AuthApi
19 | from kalshi.api.default_api import DefaultApi
20 | from kalshi.api.exchange_api import ExchangeApi
21 | from kalshi.api.market_api import MarketApi
22 | from kalshi.api.portfolio_api import PortfolioApi
23 | from kalshi.api.ranged_market_api import RangedMarketApi
24 | from kalshi.api.ranged_markets_api import RangedMarketsApi
25 | from kalshi.api.user_api import UserApi
26 |
--------------------------------------------------------------------------------
/kalshi/exceptions.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 |
12 | class OpenApiException(Exception):
13 | """The base exception class for all OpenAPIExceptions"""
14 |
15 |
16 | class ApiTypeError(OpenApiException, TypeError):
17 | def __init__(self, msg, path_to_item=None, valid_classes=None,
18 | key_type=None):
19 | """ Raises an exception for TypeErrors
20 |
21 | Args:
22 | msg (str): the exception message
23 |
24 | Keyword Args:
25 | path_to_item (list): a list of keys an indices to get to the
26 | current_item
27 | None if unset
28 | valid_classes (tuple): the primitive classes that current item
29 | should be an instance of
30 | None if unset
31 | key_type (bool): False if our value is a value in a dict
32 | True if it is a key in a dict
33 | False if our item is an item in a list
34 | None if unset
35 | """
36 | self.path_to_item = path_to_item
37 | self.valid_classes = valid_classes
38 | self.key_type = key_type
39 | full_msg = msg
40 | if path_to_item:
41 | full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
42 | super(ApiTypeError, self).__init__(full_msg)
43 |
44 |
45 | class ApiValueError(OpenApiException, ValueError):
46 | def __init__(self, msg, path_to_item=None):
47 | """
48 | Args:
49 | msg (str): the exception message
50 |
51 | Keyword Args:
52 | path_to_item (list) the path to the exception in the
53 | received_data dict. None if unset
54 | """
55 |
56 | self.path_to_item = path_to_item
57 | full_msg = msg
58 | if path_to_item:
59 | full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
60 | super(ApiValueError, self).__init__(full_msg)
61 |
62 |
63 | class ApiAttributeError(OpenApiException, AttributeError):
64 | def __init__(self, msg, path_to_item=None):
65 | """
66 | Raised when an attribute reference or assignment fails.
67 |
68 | Args:
69 | msg (str): the exception message
70 |
71 | Keyword Args:
72 | path_to_item (None/list) the path to the exception in the
73 | received_data dict
74 | """
75 | self.path_to_item = path_to_item
76 | full_msg = msg
77 | if path_to_item:
78 | full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
79 | super(ApiAttributeError, self).__init__(full_msg)
80 |
81 |
82 | class ApiKeyError(OpenApiException, KeyError):
83 | def __init__(self, msg, path_to_item=None):
84 | """
85 | Args:
86 | msg (str): the exception message
87 |
88 | Keyword Args:
89 | path_to_item (None/list) the path to the exception in the
90 | received_data dict
91 | """
92 | self.path_to_item = path_to_item
93 | full_msg = msg
94 | if path_to_item:
95 | full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
96 | super(ApiKeyError, self).__init__(full_msg)
97 |
98 |
99 | class ApiException(OpenApiException):
100 |
101 | def __init__(self, status=None, reason=None, http_resp=None):
102 | if http_resp:
103 | self.status = http_resp.status
104 | self.reason = http_resp.reason
105 | self.body = http_resp.data
106 | self.headers = http_resp.getheaders()
107 | else:
108 | self.status = status
109 | self.reason = reason
110 | self.body = None
111 | self.headers = None
112 |
113 | def __str__(self):
114 | """Custom error messages for exception"""
115 | error_message = "({0})\n"\
116 | "Reason: {1}\n".format(self.status, self.reason)
117 | if self.headers:
118 | error_message += "HTTP response headers: {0}\n".format(
119 | self.headers)
120 |
121 | if self.body:
122 | error_message += "HTTP response body: {0}\n".format(self.body)
123 |
124 | return error_message
125 |
126 |
127 | class NotFoundException(ApiException):
128 |
129 | def __init__(self, status=None, reason=None, http_resp=None):
130 | super(NotFoundException, self).__init__(status, reason, http_resp)
131 |
132 |
133 | class UnauthorizedException(ApiException):
134 |
135 | def __init__(self, status=None, reason=None, http_resp=None):
136 | super(UnauthorizedException, self).__init__(status, reason, http_resp)
137 |
138 |
139 | class ForbiddenException(ApiException):
140 |
141 | def __init__(self, status=None, reason=None, http_resp=None):
142 | super(ForbiddenException, self).__init__(status, reason, http_resp)
143 |
144 |
145 | class ServiceException(ApiException):
146 |
147 | def __init__(self, status=None, reason=None, http_resp=None):
148 | super(ServiceException, self).__init__(status, reason, http_resp)
149 |
150 |
151 | def render_path(path_to_item):
152 | """Returns a string representation of a path"""
153 | result = ""
154 | for pth in path_to_item:
155 | if isinstance(pth, int):
156 | result += "[{0}]".format(pth)
157 | else:
158 | result += "['{0}']".format(pth)
159 | return result
160 |
--------------------------------------------------------------------------------
/kalshi/model/__init__.py:
--------------------------------------------------------------------------------
1 | # we can not import model classes here because that would create a circular
2 | # reference which would not work in python2
3 | # do not import all models into this module because that uses a lot of memory and stack frames
4 | # if you need the ability to import all models from one package, import them with
5 | # from {{packageName}.models import ModelA, ModelB
6 |
--------------------------------------------------------------------------------
/kalshi/models/__init__.py:
--------------------------------------------------------------------------------
1 | # flake8: noqa
2 |
3 | # import all models into this package
4 | # if you have many models here with many references from one model to another this may
5 | # raise a RecursionError
6 | # to avoid this, import only the models that you directly need like:
7 | # from from kalshi.model.pet import Pet
8 | # or import this package, but before doing it, use:
9 | # import sys
10 | # sys.setrecursionlimit(n)
11 |
12 | from kalshi.model.account_history_entry import AccountHistoryEntry
13 | from kalshi.model.account_history_entry_data import AccountHistoryEntryData
14 | from kalshi.model.bank_account_details import BankAccountDetails
15 | from kalshi.model.change_subscription_request import ChangeSubscriptionRequest
16 | from kalshi.model.confirm_password_reset_request import ConfirmPasswordResetRequest
17 | from kalshi.model.create_user_request import CreateUserRequest
18 | from kalshi.model.create_user_response import CreateUserResponse
19 | from kalshi.model.deposit import Deposit
20 | from kalshi.model.deposit_history import DepositHistory
21 | from kalshi.model.get_market_history_response import GetMarketHistoryResponse
22 | from kalshi.model.get_market_order_book_response import GetMarketOrderBookResponse
23 | from kalshi.model.get_notification_preferences_response import GetNotificationPreferencesResponse
24 | from kalshi.model.get_ranged_market_by_ticker_response import GetRangedMarketByTickerResponse
25 | from kalshi.model.get_ranged_market_response import GetRangedMarketResponse
26 | from kalshi.model.get_ranged_markets_response import GetRangedMarketsResponse
27 | from kalshi.model.get_user_deposits_response import GetUserDepositsResponse
28 | from kalshi.model.get_user_withdrawals_response import GetUserWithdrawalsResponse
29 | from kalshi.model.login_request import LoginRequest
30 | from kalshi.model.login_response import LoginResponse
31 | from kalshi.model.market import Market
32 | from kalshi.model.market_position import MarketPosition
33 | from kalshi.model.market_stats_point import MarketStatsPoint
34 | from kalshi.model.notification import Notification
35 | from kalshi.model.notification_list import NotificationList
36 | from kalshi.model.order import Order
37 | from kalshi.model.order_book import OrderBook
38 | from kalshi.model.order_history import OrderHistory
39 | from kalshi.model.order_list import OrderList
40 | from kalshi.model.portfolio_measurement import PortfolioMeasurement
41 | from kalshi.model.price_level import PriceLevel
42 | from kalshi.model.public_trade import PublicTrade
43 | from kalshi.model.public_trade_list import PublicTradeList
44 | from kalshi.model.ranged_market import RangedMarket
45 | from kalshi.model.reset_password_request import ResetPasswordRequest
46 | from kalshi.model.settlement_history import SettlementHistory
47 | from kalshi.model.settlement_source import SettlementSource
48 | from kalshi.model.subscription_preference import SubscriptionPreference
49 | from kalshi.model.trade_history import TradeHistory
50 | from kalshi.model.trades_get_response import TradesGetResponse
51 | from kalshi.model.user import User
52 | from kalshi.model.user_change_password_request import UserChangePasswordRequest
53 | from kalshi.model.user_deposit_request import UserDepositRequest
54 | from kalshi.model.user_deposit_response import UserDepositResponse
55 | from kalshi.model.user_get_account_history_response import UserGetAccountHistoryResponse
56 | from kalshi.model.user_get_balance_response import UserGetBalanceResponse
57 | from kalshi.model.user_get_market_position_response import UserGetMarketPositionResponse
58 | from kalshi.model.user_get_market_positions_response import UserGetMarketPositionsResponse
59 | from kalshi.model.user_get_market_response import UserGetMarketResponse
60 | from kalshi.model.user_get_markets_response import UserGetMarketsResponse
61 | from kalshi.model.user_get_notifications_response import UserGetNotificationsResponse
62 | from kalshi.model.user_get_portfolio_history_request import UserGetPortfolioHistoryRequest
63 | from kalshi.model.user_get_portfolio_history_response import UserGetPortfolioHistoryResponse
64 | from kalshi.model.user_get_portfolio_value_response import UserGetPortfolioValueResponse
65 | from kalshi.model.user_get_profile_response import UserGetProfileResponse
66 | from kalshi.model.user_get_watchlist_response import UserGetWatchlistResponse
67 | from kalshi.model.user_list_ledgerx_bank_accounts_response import UserListLedgerxBankAccountsResponse
68 | from kalshi.model.user_order_create_request import UserOrderCreateRequest
69 | from kalshi.model.user_order_create_response import UserOrderCreateResponse
70 | from kalshi.model.user_order_decrease_request import UserOrderDecreaseRequest
71 | from kalshi.model.user_order_decrease_response import UserOrderDecreaseResponse
72 | from kalshi.model.user_orders_get_response import UserOrdersGetResponse
73 | from kalshi.model.user_trade import UserTrade
74 | from kalshi.model.user_trade_list import UserTradeList
75 | from kalshi.model.user_trades_get_response import UserTradesGetResponse
76 | from kalshi.model.user_update_profile_request import UserUpdateProfileRequest
77 | from kalshi.model.user_withdrawal_request import UserWithdrawalRequest
78 | from kalshi.model.user_withdrawal_response import UserWithdrawalResponse
79 | from kalshi.model.watchlist import Watchlist
80 | from kalshi.model.withdrawal import Withdrawal
81 | from kalshi.model.withdrawal_history import WithdrawalHistory
82 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | python_dateutil >= 2.5.3
2 | setuptools >= 21.0.0
3 | urllib3 >= 1.25.3
4 |
--------------------------------------------------------------------------------
/setup.cfg:
--------------------------------------------------------------------------------
1 | [flake8]
2 | max-line-length=99
3 |
--------------------------------------------------------------------------------
/setup.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | from setuptools import setup, find_packages # noqa: H301
12 |
13 | NAME = "kalshi"
14 | VERSION = "1.0.0"
15 | # To install the library, run the following
16 | #
17 | # python setup.py install
18 | #
19 | # prerequisite: setuptools
20 | # http://pypi.python.org/pypi/setuptools
21 |
22 | REQUIRES = [
23 | "urllib3 >= 1.25.3",
24 | "python-dateutil",
25 | ]
26 |
27 | setup(
28 | name=NAME,
29 | version=VERSION,
30 | description="Kalshi API.",
31 | author="OpenAPI Generator community",
32 | author_email="team@openapitools.org",
33 | url="",
34 | keywords=["OpenAPI", "OpenAPI-Generator", "Kalshi API."],
35 | python_requires=">=3.6",
36 | install_requires=REQUIRES,
37 | packages=find_packages(exclude=["test", "tests"]),
38 | include_package_data=True,
39 | long_description="""\
40 | This documentation describes Kalshi's rest API for market makers # Authentication <!-- ReDoc-Inject: <security-definitions> --> # noqa: E501
41 | """
42 | )
43 |
--------------------------------------------------------------------------------
/test-requirements.txt:
--------------------------------------------------------------------------------
1 | pytest-cov>=2.8.1
2 |
--------------------------------------------------------------------------------
/test/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AndrewNolte/KalshiPythonClient/b93b431eca9d22f1342e7d7c59d64765ffddfd4d/test/__init__.py
--------------------------------------------------------------------------------
/test/test_account_api.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import unittest
12 |
13 | import kalshi
14 | from kalshi.api.account_api import AccountApi # noqa: E501
15 |
16 |
17 | class TestAccountApi(unittest.TestCase):
18 | """AccountApi unit test stubs"""
19 |
20 | def setUp(self):
21 | self.api = AccountApi() # noqa: E501
22 |
23 | def tearDown(self):
24 | pass
25 |
26 | def test_change_subscription(self):
27 | """Test case for change_subscription
28 |
29 | ChangeSubscription # noqa: E501
30 | """
31 | pass
32 |
33 | def test_get_notification_preferences(self):
34 | """Test case for get_notification_preferences
35 |
36 | GetNotificationPreferences # noqa: E501
37 | """
38 | pass
39 |
40 | def test_notification_mark_read(self):
41 | """Test case for notification_mark_read
42 |
43 | NotificationMarkRead # noqa: E501
44 | """
45 | pass
46 |
47 | def test_user_get_account_history(self):
48 | """Test case for user_get_account_history
49 |
50 | UserGetAccountHistory # noqa: E501
51 | """
52 | pass
53 |
54 | def test_user_get_notifications(self):
55 | """Test case for user_get_notifications
56 |
57 | UserGetNotifications # noqa: E501
58 | """
59 | pass
60 |
61 |
62 | if __name__ == '__main__':
63 | unittest.main()
64 |
--------------------------------------------------------------------------------
/test/test_account_history_entry.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.account_history_entry_data import AccountHistoryEntryData
16 | globals()['AccountHistoryEntryData'] = AccountHistoryEntryData
17 | from kalshi.model.account_history_entry import AccountHistoryEntry
18 |
19 |
20 | class TestAccountHistoryEntry(unittest.TestCase):
21 | """AccountHistoryEntry unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testAccountHistoryEntry(self):
30 | """Test AccountHistoryEntry"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = AccountHistoryEntry() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == '__main__':
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/test/test_account_history_entry_data.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.deposit_history import DepositHistory
16 | from kalshi.model.order_history import OrderHistory
17 | from kalshi.model.settlement_history import SettlementHistory
18 | from kalshi.model.trade_history import TradeHistory
19 | from kalshi.model.withdrawal_history import WithdrawalHistory
20 | globals()['DepositHistory'] = DepositHistory
21 | globals()['OrderHistory'] = OrderHistory
22 | globals()['SettlementHistory'] = SettlementHistory
23 | globals()['TradeHistory'] = TradeHistory
24 | globals()['WithdrawalHistory'] = WithdrawalHistory
25 | from kalshi.model.account_history_entry_data import AccountHistoryEntryData
26 |
27 |
28 | class TestAccountHistoryEntryData(unittest.TestCase):
29 | """AccountHistoryEntryData unit test stubs"""
30 |
31 | def setUp(self):
32 | pass
33 |
34 | def tearDown(self):
35 | pass
36 |
37 | def testAccountHistoryEntryData(self):
38 | """Test AccountHistoryEntryData"""
39 | # FIXME: construct object with mandatory attributes with example values
40 | # model = AccountHistoryEntryData() # noqa: E501
41 | pass
42 |
43 |
44 | if __name__ == '__main__':
45 | unittest.main()
46 |
--------------------------------------------------------------------------------
/test/test_auth_api.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import unittest
12 |
13 | import kalshi
14 | from kalshi.api.auth_api import AuthApi # noqa: E501
15 |
16 |
17 | class TestAuthApi(unittest.TestCase):
18 | """AuthApi unit test stubs"""
19 |
20 | def setUp(self):
21 | self.api = AuthApi() # noqa: E501
22 |
23 | def tearDown(self):
24 | pass
25 |
26 | def test_login(self):
27 | """Test case for login
28 |
29 | Login # noqa: E501
30 | """
31 | pass
32 |
33 | def test_logout(self):
34 | """Test case for logout
35 |
36 | Logout # noqa: E501
37 | """
38 | pass
39 |
40 | def test_reset_password(self):
41 | """Test case for reset_password
42 |
43 | ResetPassword # noqa: E501
44 | """
45 | pass
46 |
47 | def test_reset_password_confirm(self):
48 | """Test case for reset_password_confirm
49 |
50 | ResetPasswordConfirm # noqa: E501
51 | """
52 | pass
53 |
54 |
55 | if __name__ == '__main__':
56 | unittest.main()
57 |
--------------------------------------------------------------------------------
/test/test_bank_account_details.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.bank_account_details import BankAccountDetails
16 |
17 |
18 | class TestBankAccountDetails(unittest.TestCase):
19 | """BankAccountDetails unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testBankAccountDetails(self):
28 | """Test BankAccountDetails"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = BankAccountDetails() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_change_subscription_request.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.change_subscription_request import ChangeSubscriptionRequest
16 |
17 |
18 | class TestChangeSubscriptionRequest(unittest.TestCase):
19 | """ChangeSubscriptionRequest unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testChangeSubscriptionRequest(self):
28 | """Test ChangeSubscriptionRequest"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = ChangeSubscriptionRequest() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_confirm_password_reset_request.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.confirm_password_reset_request import ConfirmPasswordResetRequest
16 |
17 |
18 | class TestConfirmPasswordResetRequest(unittest.TestCase):
19 | """ConfirmPasswordResetRequest unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testConfirmPasswordResetRequest(self):
28 | """Test ConfirmPasswordResetRequest"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = ConfirmPasswordResetRequest() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_create_user_request.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.create_user_request import CreateUserRequest
16 |
17 |
18 | class TestCreateUserRequest(unittest.TestCase):
19 | """CreateUserRequest unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testCreateUserRequest(self):
28 | """Test CreateUserRequest"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = CreateUserRequest() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_create_user_response.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.create_user_response import CreateUserResponse
16 |
17 |
18 | class TestCreateUserResponse(unittest.TestCase):
19 | """CreateUserResponse unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testCreateUserResponse(self):
28 | """Test CreateUserResponse"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = CreateUserResponse() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_default_api.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import unittest
12 |
13 | import kalshi
14 | from kalshi.api.default_api import DefaultApi # noqa: E501
15 |
16 |
17 | class TestDefaultApi(unittest.TestCase):
18 | """DefaultApi unit test stubs"""
19 |
20 | def setUp(self):
21 | self.api = DefaultApi() # noqa: E501
22 |
23 | def tearDown(self):
24 | pass
25 |
26 | def test_get_trades(self):
27 | """Test case for get_trades
28 |
29 | GetTrades # noqa: E501
30 | """
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_deposit.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.deposit import Deposit
16 |
17 |
18 | class TestDeposit(unittest.TestCase):
19 | """Deposit unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testDeposit(self):
28 | """Test Deposit"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = Deposit() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_deposit_history.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.deposit_history import DepositHistory
16 |
17 |
18 | class TestDepositHistory(unittest.TestCase):
19 | """DepositHistory unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testDepositHistory(self):
28 | """Test DepositHistory"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = DepositHistory() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_exchange_api.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import unittest
12 |
13 | import kalshi
14 | from kalshi.api.exchange_api import ExchangeApi # noqa: E501
15 |
16 |
17 | class TestExchangeApi(unittest.TestCase):
18 | """ExchangeApi unit test stubs"""
19 |
20 | def setUp(self):
21 | self.api = ExchangeApi() # noqa: E501
22 |
23 | def tearDown(self):
24 | pass
25 |
26 | def test_get_exchange_status(self):
27 | """Test case for get_exchange_status
28 |
29 | """
30 | pass
31 |
32 |
33 | if __name__ == '__main__':
34 | unittest.main()
35 |
--------------------------------------------------------------------------------
/test/test_get_market_history_response.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.market_stats_point import MarketStatsPoint
16 | globals()['MarketStatsPoint'] = MarketStatsPoint
17 | from kalshi.model.get_market_history_response import GetMarketHistoryResponse
18 |
19 |
20 | class TestGetMarketHistoryResponse(unittest.TestCase):
21 | """GetMarketHistoryResponse unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testGetMarketHistoryResponse(self):
30 | """Test GetMarketHistoryResponse"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = GetMarketHistoryResponse() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == '__main__':
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/test/test_get_market_order_book_response.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.order_book import OrderBook
16 | globals()['OrderBook'] = OrderBook
17 | from kalshi.model.get_market_order_book_response import GetMarketOrderBookResponse
18 |
19 |
20 | class TestGetMarketOrderBookResponse(unittest.TestCase):
21 | """GetMarketOrderBookResponse unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testGetMarketOrderBookResponse(self):
30 | """Test GetMarketOrderBookResponse"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = GetMarketOrderBookResponse() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == '__main__':
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/test/test_get_notification_preferences_response.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.subscription_preference import SubscriptionPreference
16 | globals()['SubscriptionPreference'] = SubscriptionPreference
17 | from kalshi.model.get_notification_preferences_response import GetNotificationPreferencesResponse
18 |
19 |
20 | class TestGetNotificationPreferencesResponse(unittest.TestCase):
21 | """GetNotificationPreferencesResponse unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testGetNotificationPreferencesResponse(self):
30 | """Test GetNotificationPreferencesResponse"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = GetNotificationPreferencesResponse() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == '__main__':
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/test/test_get_ranged_market_by_ticker_response.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.ranged_market import RangedMarket
16 | globals()['RangedMarket'] = RangedMarket
17 | from kalshi.model.get_ranged_market_by_ticker_response import GetRangedMarketByTickerResponse
18 |
19 |
20 | class TestGetRangedMarketByTickerResponse(unittest.TestCase):
21 | """GetRangedMarketByTickerResponse unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testGetRangedMarketByTickerResponse(self):
30 | """Test GetRangedMarketByTickerResponse"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = GetRangedMarketByTickerResponse() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == '__main__':
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/test/test_get_ranged_market_response.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.ranged_market import RangedMarket
16 | globals()['RangedMarket'] = RangedMarket
17 | from kalshi.model.get_ranged_market_response import GetRangedMarketResponse
18 |
19 |
20 | class TestGetRangedMarketResponse(unittest.TestCase):
21 | """GetRangedMarketResponse unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testGetRangedMarketResponse(self):
30 | """Test GetRangedMarketResponse"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = GetRangedMarketResponse() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == '__main__':
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/test/test_get_ranged_markets_response.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.ranged_market import RangedMarket
16 | globals()['RangedMarket'] = RangedMarket
17 | from kalshi.model.get_ranged_markets_response import GetRangedMarketsResponse
18 |
19 |
20 | class TestGetRangedMarketsResponse(unittest.TestCase):
21 | """GetRangedMarketsResponse unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testGetRangedMarketsResponse(self):
30 | """Test GetRangedMarketsResponse"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = GetRangedMarketsResponse() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == '__main__':
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/test/test_get_user_deposits_response.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.deposit import Deposit
16 | globals()['Deposit'] = Deposit
17 | from kalshi.model.get_user_deposits_response import GetUserDepositsResponse
18 |
19 |
20 | class TestGetUserDepositsResponse(unittest.TestCase):
21 | """GetUserDepositsResponse unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testGetUserDepositsResponse(self):
30 | """Test GetUserDepositsResponse"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = GetUserDepositsResponse() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == '__main__':
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/test/test_get_user_withdrawals_response.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.withdrawal import Withdrawal
16 | globals()['Withdrawal'] = Withdrawal
17 | from kalshi.model.get_user_withdrawals_response import GetUserWithdrawalsResponse
18 |
19 |
20 | class TestGetUserWithdrawalsResponse(unittest.TestCase):
21 | """GetUserWithdrawalsResponse unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testGetUserWithdrawalsResponse(self):
30 | """Test GetUserWithdrawalsResponse"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = GetUserWithdrawalsResponse() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == '__main__':
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/test/test_login_request.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.login_request import LoginRequest
16 |
17 |
18 | class TestLoginRequest(unittest.TestCase):
19 | """LoginRequest unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testLoginRequest(self):
28 | """Test LoginRequest"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = LoginRequest() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_login_response.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.login_response import LoginResponse
16 |
17 |
18 | class TestLoginResponse(unittest.TestCase):
19 | """LoginResponse unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testLoginResponse(self):
28 | """Test LoginResponse"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = LoginResponse() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_market.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.settlement_source import SettlementSource
16 | globals()['SettlementSource'] = SettlementSource
17 | from kalshi.model.market import Market
18 |
19 |
20 | class TestMarket(unittest.TestCase):
21 | """Market unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testMarket(self):
30 | """Test Market"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = Market() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == '__main__':
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/test/test_market_api.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import unittest
12 |
13 | import kalshi
14 | from kalshi.api.market_api import MarketApi # noqa: E501
15 |
16 |
17 | class TestMarketApi(unittest.TestCase):
18 | """MarketApi unit test stubs"""
19 |
20 | def setUp(self):
21 | self.api = MarketApi() # noqa: E501
22 |
23 | def tearDown(self):
24 | pass
25 |
26 | def test_get_market(self):
27 | """Test case for get_market
28 |
29 | GetMarket # noqa: E501
30 | """
31 | pass
32 |
33 | def test_get_market_by_ticker(self):
34 | """Test case for get_market_by_ticker
35 |
36 | GetMarketByTicker # noqa: E501
37 | """
38 | pass
39 |
40 | def test_get_market_by_ticker_cached(self):
41 | """Test case for get_market_by_ticker_cached
42 |
43 | GetMarketByTickerCached # noqa: E501
44 | """
45 | pass
46 |
47 | def test_get_market_cached(self):
48 | """Test case for get_market_cached
49 |
50 | GetMarketCached # noqa: E501
51 | """
52 | pass
53 |
54 | def test_get_market_history(self):
55 | """Test case for get_market_history
56 |
57 | GetMarketHistory # noqa: E501
58 | """
59 | pass
60 |
61 | def test_get_market_history_cached(self):
62 | """Test case for get_market_history_cached
63 |
64 | GetMarketHistoryCached # noqa: E501
65 | """
66 | pass
67 |
68 | def test_get_market_order_book_cached(self):
69 | """Test case for get_market_order_book_cached
70 |
71 | GetMarketOrderBookCached # noqa: E501
72 | """
73 | pass
74 |
75 | def test_get_markets(self):
76 | """Test case for get_markets
77 |
78 | GetMarkets # noqa: E501
79 | """
80 | pass
81 |
82 | def test_get_markets_cached(self):
83 | """Test case for get_markets_cached
84 |
85 | GetMarketsCached # noqa: E501
86 | """
87 | pass
88 |
89 |
90 | if __name__ == '__main__':
91 | unittest.main()
92 |
--------------------------------------------------------------------------------
/test/test_market_position.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.market_position import MarketPosition
16 |
17 |
18 | class TestMarketPosition(unittest.TestCase):
19 | """MarketPosition unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testMarketPosition(self):
28 | """Test MarketPosition"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = MarketPosition() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_market_stats_point.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.market_stats_point import MarketStatsPoint
16 |
17 |
18 | class TestMarketStatsPoint(unittest.TestCase):
19 | """MarketStatsPoint unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testMarketStatsPoint(self):
28 | """Test MarketStatsPoint"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = MarketStatsPoint() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_notification.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.notification import Notification
16 |
17 |
18 | class TestNotification(unittest.TestCase):
19 | """Notification unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testNotification(self):
28 | """Test Notification"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = Notification() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_notification_list.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.notification import Notification
16 | globals()['Notification'] = Notification
17 | from kalshi.model.notification_list import NotificationList
18 |
19 |
20 | class TestNotificationList(unittest.TestCase):
21 | """NotificationList unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testNotificationList(self):
30 | """Test NotificationList"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = NotificationList() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == '__main__':
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/test/test_order.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.order import Order
16 |
17 |
18 | class TestOrder(unittest.TestCase):
19 | """Order unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testOrder(self):
28 | """Test Order"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = Order() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_order_book.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.price_level import PriceLevel
16 | globals()['PriceLevel'] = PriceLevel
17 | from kalshi.model.order_book import OrderBook
18 |
19 |
20 | class TestOrderBook(unittest.TestCase):
21 | """OrderBook unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testOrderBook(self):
30 | """Test OrderBook"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = OrderBook() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == '__main__':
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/test/test_order_history.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.order_history import OrderHistory
16 |
17 |
18 | class TestOrderHistory(unittest.TestCase):
19 | """OrderHistory unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testOrderHistory(self):
28 | """Test OrderHistory"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = OrderHistory() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_order_list.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.order import Order
16 | globals()['Order'] = Order
17 | from kalshi.model.order_list import OrderList
18 |
19 |
20 | class TestOrderList(unittest.TestCase):
21 | """OrderList unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testOrderList(self):
30 | """Test OrderList"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = OrderList() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == '__main__':
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/test/test_portfolio_api.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import unittest
12 |
13 | import kalshi
14 | from kalshi.api.portfolio_api import PortfolioApi # noqa: E501
15 |
16 |
17 | class TestPortfolioApi(unittest.TestCase):
18 | """PortfolioApi unit test stubs"""
19 |
20 | def setUp(self):
21 | self.api = PortfolioApi() # noqa: E501
22 |
23 | def tearDown(self):
24 | pass
25 |
26 | def test_user_get_portfolio_history(self):
27 | """Test case for user_get_portfolio_history
28 |
29 | UserGetPortfolioHistory # noqa: E501
30 | """
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_portfolio_measurement.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.portfolio_measurement import PortfolioMeasurement
16 |
17 |
18 | class TestPortfolioMeasurement(unittest.TestCase):
19 | """PortfolioMeasurement unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testPortfolioMeasurement(self):
28 | """Test PortfolioMeasurement"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = PortfolioMeasurement() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_price_level.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.price_level import PriceLevel
16 |
17 |
18 | class TestPriceLevel(unittest.TestCase):
19 | """PriceLevel unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testPriceLevel(self):
28 | """Test PriceLevel"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = PriceLevel() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_public_trade.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.public_trade import PublicTrade
16 |
17 |
18 | class TestPublicTrade(unittest.TestCase):
19 | """PublicTrade unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testPublicTrade(self):
28 | """Test PublicTrade"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = PublicTrade() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_public_trade_list.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.public_trade import PublicTrade
16 | globals()['PublicTrade'] = PublicTrade
17 | from kalshi.model.public_trade_list import PublicTradeList
18 |
19 |
20 | class TestPublicTradeList(unittest.TestCase):
21 | """PublicTradeList unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testPublicTradeList(self):
30 | """Test PublicTradeList"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = PublicTradeList() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == '__main__':
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/test/test_ranged_market.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.ranged_market import RangedMarket
16 |
17 |
18 | class TestRangedMarket(unittest.TestCase):
19 | """RangedMarket unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testRangedMarket(self):
28 | """Test RangedMarket"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = RangedMarket() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_ranged_market_api.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import unittest
12 |
13 | import kalshi
14 | from kalshi.api.ranged_market_api import RangedMarketApi # noqa: E501
15 |
16 |
17 | class TestRangedMarketApi(unittest.TestCase):
18 | """RangedMarketApi unit test stubs"""
19 |
20 | def setUp(self):
21 | self.api = RangedMarketApi() # noqa: E501
22 |
23 | def tearDown(self):
24 | pass
25 |
26 | def test_get_ranged_market(self):
27 | """Test case for get_ranged_market
28 |
29 | GetRangedMarket # noqa: E501
30 | """
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_ranged_markets_api.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import unittest
12 |
13 | import kalshi
14 | from kalshi.api.ranged_markets_api import RangedMarketsApi # noqa: E501
15 |
16 |
17 | class TestRangedMarketsApi(unittest.TestCase):
18 | """RangedMarketsApi unit test stubs"""
19 |
20 | def setUp(self):
21 | self.api = RangedMarketsApi() # noqa: E501
22 |
23 | def tearDown(self):
24 | pass
25 |
26 | def test_get_ranged_market_by_ticker(self):
27 | """Test case for get_ranged_market_by_ticker
28 |
29 | GetRangedMarketByTicker # noqa: E501
30 | """
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_reset_password_request.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.reset_password_request import ResetPasswordRequest
16 |
17 |
18 | class TestResetPasswordRequest(unittest.TestCase):
19 | """ResetPasswordRequest unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testResetPasswordRequest(self):
28 | """Test ResetPasswordRequest"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = ResetPasswordRequest() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_settlement_history.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.settlement_history import SettlementHistory
16 |
17 |
18 | class TestSettlementHistory(unittest.TestCase):
19 | """SettlementHistory unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testSettlementHistory(self):
28 | """Test SettlementHistory"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = SettlementHistory() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_settlement_source.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.settlement_source import SettlementSource
16 |
17 |
18 | class TestSettlementSource(unittest.TestCase):
19 | """SettlementSource unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testSettlementSource(self):
28 | """Test SettlementSource"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = SettlementSource() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_subscription_preference.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.subscription_preference import SubscriptionPreference
16 |
17 |
18 | class TestSubscriptionPreference(unittest.TestCase):
19 | """SubscriptionPreference unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testSubscriptionPreference(self):
28 | """Test SubscriptionPreference"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = SubscriptionPreference() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_trade_history.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.trade_history import TradeHistory
16 |
17 |
18 | class TestTradeHistory(unittest.TestCase):
19 | """TradeHistory unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testTradeHistory(self):
28 | """Test TradeHistory"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = TradeHistory() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_trades_get_response.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.public_trade_list import PublicTradeList
16 | globals()['PublicTradeList'] = PublicTradeList
17 | from kalshi.model.trades_get_response import TradesGetResponse
18 |
19 |
20 | class TestTradesGetResponse(unittest.TestCase):
21 | """TradesGetResponse unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testTradesGetResponse(self):
30 | """Test TradesGetResponse"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = TradesGetResponse() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == '__main__':
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/test/test_user.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.user import User
16 |
17 |
18 | class TestUser(unittest.TestCase):
19 | """User unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testUser(self):
28 | """Test User"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = User() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_user_api.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import unittest
12 |
13 | import kalshi
14 | from kalshi.api.user_api import UserApi # noqa: E501
15 |
16 |
17 | class TestUserApi(unittest.TestCase):
18 | """UserApi unit test stubs"""
19 |
20 | def setUp(self):
21 | self.api = UserApi() # noqa: E501
22 |
23 | def tearDown(self):
24 | pass
25 |
26 | def test_user_add_watchlist(self):
27 | """Test case for user_add_watchlist
28 |
29 | UserAddWatchlist # noqa: E501
30 | """
31 | pass
32 |
33 | def test_user_change_password(self):
34 | """Test case for user_change_password
35 |
36 | UserChangePassword # noqa: E501
37 | """
38 | pass
39 |
40 | def test_user_get_balance(self):
41 | """Test case for user_get_balance
42 |
43 | UserGetBalance # noqa: E501
44 | """
45 | pass
46 |
47 | def test_user_get_market_position(self):
48 | """Test case for user_get_market_position
49 |
50 | UserGetMarketPosition # noqa: E501
51 | """
52 | pass
53 |
54 | def test_user_get_market_positions(self):
55 | """Test case for user_get_market_positions
56 |
57 | UserGetMarketPositions # noqa: E501
58 | """
59 | pass
60 |
61 | def test_user_get_profile(self):
62 | """Test case for user_get_profile
63 |
64 | UserGetProfile # noqa: E501
65 | """
66 | pass
67 |
68 | def test_user_get_watchlist(self):
69 | """Test case for user_get_watchlist
70 |
71 | UserGetWatchlist # noqa: E501
72 | """
73 | pass
74 |
75 | def test_user_order_cancel(self):
76 | """Test case for user_order_cancel
77 |
78 | UserOrderCancel # noqa: E501
79 | """
80 | pass
81 |
82 | def test_user_order_create(self):
83 | """Test case for user_order_create
84 |
85 | UserOrderCreate # noqa: E501
86 | """
87 | pass
88 |
89 | def test_user_order_decrease(self):
90 | """Test case for user_order_decrease
91 |
92 | UserOrderDecrease # noqa: E501
93 | """
94 | pass
95 |
96 | def test_user_orders_get(self):
97 | """Test case for user_orders_get
98 |
99 | UserOrdersGet # noqa: E501
100 | """
101 | pass
102 |
103 | def test_user_remove_watchlist(self):
104 | """Test case for user_remove_watchlist
105 |
106 | UserRemoveWatchlist # noqa: E501
107 | """
108 | pass
109 |
110 | def test_user_trades_get(self):
111 | """Test case for user_trades_get
112 |
113 | UserTradesGet # noqa: E501
114 | """
115 | pass
116 |
117 |
118 | if __name__ == '__main__':
119 | unittest.main()
120 |
--------------------------------------------------------------------------------
/test/test_user_change_password_request.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.user_change_password_request import UserChangePasswordRequest
16 |
17 |
18 | class TestUserChangePasswordRequest(unittest.TestCase):
19 | """UserChangePasswordRequest unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testUserChangePasswordRequest(self):
28 | """Test UserChangePasswordRequest"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = UserChangePasswordRequest() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_user_deposit_request.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.user_deposit_request import UserDepositRequest
16 |
17 |
18 | class TestUserDepositRequest(unittest.TestCase):
19 | """UserDepositRequest unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testUserDepositRequest(self):
28 | """Test UserDepositRequest"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = UserDepositRequest() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_user_deposit_response.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.user_deposit_response import UserDepositResponse
16 |
17 |
18 | class TestUserDepositResponse(unittest.TestCase):
19 | """UserDepositResponse unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testUserDepositResponse(self):
28 | """Test UserDepositResponse"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = UserDepositResponse() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_user_get_account_history_response.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.account_history_entry import AccountHistoryEntry
16 | globals()['AccountHistoryEntry'] = AccountHistoryEntry
17 | from kalshi.model.user_get_account_history_response import UserGetAccountHistoryResponse
18 |
19 |
20 | class TestUserGetAccountHistoryResponse(unittest.TestCase):
21 | """UserGetAccountHistoryResponse unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testUserGetAccountHistoryResponse(self):
30 | """Test UserGetAccountHistoryResponse"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = UserGetAccountHistoryResponse() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == '__main__':
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/test/test_user_get_balance_response.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.user_get_balance_response import UserGetBalanceResponse
16 |
17 |
18 | class TestUserGetBalanceResponse(unittest.TestCase):
19 | """UserGetBalanceResponse unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testUserGetBalanceResponse(self):
28 | """Test UserGetBalanceResponse"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = UserGetBalanceResponse() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_user_get_market_position_response.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.market_position import MarketPosition
16 | globals()['MarketPosition'] = MarketPosition
17 | from kalshi.model.user_get_market_position_response import UserGetMarketPositionResponse
18 |
19 |
20 | class TestUserGetMarketPositionResponse(unittest.TestCase):
21 | """UserGetMarketPositionResponse unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testUserGetMarketPositionResponse(self):
30 | """Test UserGetMarketPositionResponse"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = UserGetMarketPositionResponse() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == '__main__':
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/test/test_user_get_market_positions_response.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.market_position import MarketPosition
16 | globals()['MarketPosition'] = MarketPosition
17 | from kalshi.model.user_get_market_positions_response import UserGetMarketPositionsResponse
18 |
19 |
20 | class TestUserGetMarketPositionsResponse(unittest.TestCase):
21 | """UserGetMarketPositionsResponse unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testUserGetMarketPositionsResponse(self):
30 | """Test UserGetMarketPositionsResponse"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = UserGetMarketPositionsResponse() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == '__main__':
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/test/test_user_get_market_response.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.market import Market
16 | globals()['Market'] = Market
17 | from kalshi.model.user_get_market_response import UserGetMarketResponse
18 |
19 |
20 | class TestUserGetMarketResponse(unittest.TestCase):
21 | """UserGetMarketResponse unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testUserGetMarketResponse(self):
30 | """Test UserGetMarketResponse"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = UserGetMarketResponse() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == '__main__':
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/test/test_user_get_markets_response.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.market import Market
16 | globals()['Market'] = Market
17 | from kalshi.model.user_get_markets_response import UserGetMarketsResponse
18 |
19 |
20 | class TestUserGetMarketsResponse(unittest.TestCase):
21 | """UserGetMarketsResponse unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testUserGetMarketsResponse(self):
30 | """Test UserGetMarketsResponse"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = UserGetMarketsResponse() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == '__main__':
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/test/test_user_get_notifications_response.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.notification_list import NotificationList
16 | globals()['NotificationList'] = NotificationList
17 | from kalshi.model.user_get_notifications_response import UserGetNotificationsResponse
18 |
19 |
20 | class TestUserGetNotificationsResponse(unittest.TestCase):
21 | """UserGetNotificationsResponse unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testUserGetNotificationsResponse(self):
30 | """Test UserGetNotificationsResponse"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = UserGetNotificationsResponse() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == '__main__':
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/test/test_user_get_portfolio_history_request.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.user_get_portfolio_history_request import UserGetPortfolioHistoryRequest
16 |
17 |
18 | class TestUserGetPortfolioHistoryRequest(unittest.TestCase):
19 | """UserGetPortfolioHistoryRequest unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testUserGetPortfolioHistoryRequest(self):
28 | """Test UserGetPortfolioHistoryRequest"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = UserGetPortfolioHistoryRequest() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_user_get_portfolio_history_response.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.portfolio_measurement import PortfolioMeasurement
16 | globals()['PortfolioMeasurement'] = PortfolioMeasurement
17 | from kalshi.model.user_get_portfolio_history_response import UserGetPortfolioHistoryResponse
18 |
19 |
20 | class TestUserGetPortfolioHistoryResponse(unittest.TestCase):
21 | """UserGetPortfolioHistoryResponse unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testUserGetPortfolioHistoryResponse(self):
30 | """Test UserGetPortfolioHistoryResponse"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = UserGetPortfolioHistoryResponse() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == '__main__':
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/test/test_user_get_portfolio_value_response.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.user_get_portfolio_value_response import UserGetPortfolioValueResponse
16 |
17 |
18 | class TestUserGetPortfolioValueResponse(unittest.TestCase):
19 | """UserGetPortfolioValueResponse unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testUserGetPortfolioValueResponse(self):
28 | """Test UserGetPortfolioValueResponse"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = UserGetPortfolioValueResponse() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_user_get_profile_response.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.user import User
16 | globals()['User'] = User
17 | from kalshi.model.user_get_profile_response import UserGetProfileResponse
18 |
19 |
20 | class TestUserGetProfileResponse(unittest.TestCase):
21 | """UserGetProfileResponse unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testUserGetProfileResponse(self):
30 | """Test UserGetProfileResponse"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = UserGetProfileResponse() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == '__main__':
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/test/test_user_get_watchlist_response.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.watchlist import Watchlist
16 | globals()['Watchlist'] = Watchlist
17 | from kalshi.model.user_get_watchlist_response import UserGetWatchlistResponse
18 |
19 |
20 | class TestUserGetWatchlistResponse(unittest.TestCase):
21 | """UserGetWatchlistResponse unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testUserGetWatchlistResponse(self):
30 | """Test UserGetWatchlistResponse"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = UserGetWatchlistResponse() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == '__main__':
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/test/test_user_list_ledgerx_bank_accounts_response.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.bank_account_details import BankAccountDetails
16 | globals()['BankAccountDetails'] = BankAccountDetails
17 | from kalshi.model.user_list_ledgerx_bank_accounts_response import UserListLedgerxBankAccountsResponse
18 |
19 |
20 | class TestUserListLedgerxBankAccountsResponse(unittest.TestCase):
21 | """UserListLedgerxBankAccountsResponse unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testUserListLedgerxBankAccountsResponse(self):
30 | """Test UserListLedgerxBankAccountsResponse"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = UserListLedgerxBankAccountsResponse() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == '__main__':
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/test/test_user_order_create_request.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.user_order_create_request import UserOrderCreateRequest
16 |
17 |
18 | class TestUserOrderCreateRequest(unittest.TestCase):
19 | """UserOrderCreateRequest unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testUserOrderCreateRequest(self):
28 | """Test UserOrderCreateRequest"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = UserOrderCreateRequest() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_user_order_create_response.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.order import Order
16 | globals()['Order'] = Order
17 | from kalshi.model.user_order_create_response import UserOrderCreateResponse
18 |
19 |
20 | class TestUserOrderCreateResponse(unittest.TestCase):
21 | """UserOrderCreateResponse unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testUserOrderCreateResponse(self):
30 | """Test UserOrderCreateResponse"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = UserOrderCreateResponse() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == '__main__':
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/test/test_user_order_decrease_request.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.user_order_decrease_request import UserOrderDecreaseRequest
16 |
17 |
18 | class TestUserOrderDecreaseRequest(unittest.TestCase):
19 | """UserOrderDecreaseRequest unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testUserOrderDecreaseRequest(self):
28 | """Test UserOrderDecreaseRequest"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = UserOrderDecreaseRequest() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_user_order_decrease_response.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.order import Order
16 | globals()['Order'] = Order
17 | from kalshi.model.user_order_decrease_response import UserOrderDecreaseResponse
18 |
19 |
20 | class TestUserOrderDecreaseResponse(unittest.TestCase):
21 | """UserOrderDecreaseResponse unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testUserOrderDecreaseResponse(self):
30 | """Test UserOrderDecreaseResponse"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = UserOrderDecreaseResponse() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == '__main__':
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/test/test_user_orders_get_response.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.order_list import OrderList
16 | globals()['OrderList'] = OrderList
17 | from kalshi.model.user_orders_get_response import UserOrdersGetResponse
18 |
19 |
20 | class TestUserOrdersGetResponse(unittest.TestCase):
21 | """UserOrdersGetResponse unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testUserOrdersGetResponse(self):
30 | """Test UserOrdersGetResponse"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = UserOrdersGetResponse() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == '__main__':
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/test/test_user_trade.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.user_trade import UserTrade
16 |
17 |
18 | class TestUserTrade(unittest.TestCase):
19 | """UserTrade unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testUserTrade(self):
28 | """Test UserTrade"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = UserTrade() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_user_trade_list.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.user_trade import UserTrade
16 | globals()['UserTrade'] = UserTrade
17 | from kalshi.model.user_trade_list import UserTradeList
18 |
19 |
20 | class TestUserTradeList(unittest.TestCase):
21 | """UserTradeList unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testUserTradeList(self):
30 | """Test UserTradeList"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = UserTradeList() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == '__main__':
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/test/test_user_trades_get_response.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.user_trade_list import UserTradeList
16 | globals()['UserTradeList'] = UserTradeList
17 | from kalshi.model.user_trades_get_response import UserTradesGetResponse
18 |
19 |
20 | class TestUserTradesGetResponse(unittest.TestCase):
21 | """UserTradesGetResponse unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testUserTradesGetResponse(self):
30 | """Test UserTradesGetResponse"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = UserTradesGetResponse() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == '__main__':
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/test/test_user_update_profile_request.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.user_update_profile_request import UserUpdateProfileRequest
16 |
17 |
18 | class TestUserUpdateProfileRequest(unittest.TestCase):
19 | """UserUpdateProfileRequest unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testUserUpdateProfileRequest(self):
28 | """Test UserUpdateProfileRequest"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = UserUpdateProfileRequest() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_user_withdrawal_request.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.user_withdrawal_request import UserWithdrawalRequest
16 |
17 |
18 | class TestUserWithdrawalRequest(unittest.TestCase):
19 | """UserWithdrawalRequest unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testUserWithdrawalRequest(self):
28 | """Test UserWithdrawalRequest"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = UserWithdrawalRequest() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_user_withdrawal_response.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.user_withdrawal_response import UserWithdrawalResponse
16 |
17 |
18 | class TestUserWithdrawalResponse(unittest.TestCase):
19 | """UserWithdrawalResponse unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testUserWithdrawalResponse(self):
28 | """Test UserWithdrawalResponse"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = UserWithdrawalResponse() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_watchlist.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.watchlist import Watchlist
16 |
17 |
18 | class TestWatchlist(unittest.TestCase):
19 | """Watchlist unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testWatchlist(self):
28 | """Test Watchlist"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = Watchlist() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_withdrawal.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.withdrawal import Withdrawal
16 |
17 |
18 | class TestWithdrawal(unittest.TestCase):
19 | """Withdrawal unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testWithdrawal(self):
28 | """Test Withdrawal"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = Withdrawal() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/test/test_withdrawal_history.py:
--------------------------------------------------------------------------------
1 | """
2 | Kalshi API.
3 |
4 | This documentation describes Kalshi's rest API for market makers # Authentication # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.0.0
7 | Generated by: https://openapi-generator.tech
8 | """
9 |
10 |
11 | import sys
12 | import unittest
13 |
14 | import kalshi
15 | from kalshi.model.withdrawal_history import WithdrawalHistory
16 |
17 |
18 | class TestWithdrawalHistory(unittest.TestCase):
19 | """WithdrawalHistory unit test stubs"""
20 |
21 | def setUp(self):
22 | pass
23 |
24 | def tearDown(self):
25 | pass
26 |
27 | def testWithdrawalHistory(self):
28 | """Test WithdrawalHistory"""
29 | # FIXME: construct object with mandatory attributes with example values
30 | # model = WithdrawalHistory() # noqa: E501
31 | pass
32 |
33 |
34 | if __name__ == '__main__':
35 | unittest.main()
36 |
--------------------------------------------------------------------------------
/tox.ini:
--------------------------------------------------------------------------------
1 | [tox]
2 | envlist = py3
3 |
4 | [testenv]
5 | deps=-r{toxinidir}/requirements.txt
6 | -r{toxinidir}/test-requirements.txt
7 |
8 | commands=
9 | pytest --cov=kalshi
10 |
--------------------------------------------------------------------------------