# Kalshi Trading API
Complete API for the Kalshi trading platform including all handlers for SDK generation
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: 2.0.0
- Package version: 2.1.4
- Generator version: 7.15.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
For more information, please visit [https://kalshi.com](https://kalshi.com)
## Requirements.
Python 3.9+
## Installation & Usage
```python
pip install kalshi-python
import kalshi_python
```
## Getting Started
Please follow the [installation procedure](#installation--usage) and then run the following:
```python
from kalshi_python import Configuration, KalshiClient
# Configure the client
config = Configuration(
host="https://api.elections.kalshi.com/trade-api/v2"
)
# For authenticated requests
# Read private key from file
with open("path/to/private_key.pem", "r") as f:
private_key = f.read()
config.api_key_id = "your-api-key-id"
config.private_key_pem = private_key
# Initialize the client
client = KalshiClient(config)
# Make API calls
balance = client.get_balance()
print(f"Balance: ${balance.balance / 100:.2f}")
```
## Documentation
Full documentation is available at [docs.kalshi.com](https://docs.kalshi.com)
Raw data
{
"_id": null,
"home_page": "https://github.com/Kalshi/exchange-infra",
"name": "kalshi-python",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "OpenAPI, OpenAPI-Generator, Kalshi Trading API",
"author": "Kalshi Support",
"author_email": "Kalshi Support <support@kalshi.com>",
"download_url": "https://files.pythonhosted.org/packages/e5/ca/3bd9083ddb849c7d2d1eb9669efc3a9025ef48356d79af0dae7c3b618d36/kalshi_python-2.1.4.tar.gz",
"platform": null,
"description": "# Kalshi Trading API\nComplete API for the Kalshi trading platform including all handlers for SDK generation\n\nThis Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:\n\n- API version: 2.0.0\n- Package version: 2.1.4\n- Generator version: 7.15.0\n- Build package: org.openapitools.codegen.languages.PythonClientCodegen\nFor more information, please visit [https://kalshi.com](https://kalshi.com)\n\n## Requirements.\n\nPython 3.9+\n\n## Installation & Usage\n```python\npip install kalshi-python\nimport kalshi_python\n```\n\n## Getting Started\n\nPlease follow the [installation procedure](#installation--usage) and then run the following:\n\n```python\nfrom kalshi_python import Configuration, KalshiClient\n\n# Configure the client\nconfig = Configuration(\n host=\"https://api.elections.kalshi.com/trade-api/v2\"\n)\n\n# For authenticated requests\n# Read private key from file\nwith open(\"path/to/private_key.pem\", \"r\") as f:\n private_key = f.read()\n\nconfig.api_key_id = \"your-api-key-id\"\nconfig.private_key_pem = private_key\n\n# Initialize the client\nclient = KalshiClient(config)\n\n# Make API calls\nbalance = client.get_balance()\nprint(f\"Balance: ${balance.balance / 100:.2f}\")\n```\n\n## Documentation\n\nFull documentation is available at [docs.kalshi.com](https://docs.kalshi.com)\n\n\n",
"bugtrack_url": null,
"license": null,
"summary": "Kalshi Trading API",
"version": "2.1.4",
"project_urls": {
"Homepage": "https://github.com/Kalshi/exchange-infra",
"Repository": "https://github.com/GIT_USER_ID/GIT_REPO_ID"
},
"split_keywords": [
"openapi",
" openapi-generator",
" kalshi trading api"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "b521a7904ee5368cb4e4a8d0bc5d1a937a9a07ddbffee89e83a276cd0310b76f",
"md5": "26fec8097c0f51ca8fde03d95f7c40a7",
"sha256": "921cfdbbe2bebb5cab9c85ecd930b36569f5cea79d170a1d8af5deca331e82dc"
},
"downloads": -1,
"filename": "kalshi_python-2.1.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "26fec8097c0f51ca8fde03d95f7c40a7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 181373,
"upload_time": "2025-09-06T06:01:36",
"upload_time_iso_8601": "2025-09-06T06:01:36.285723Z",
"url": "https://files.pythonhosted.org/packages/b5/21/a7904ee5368cb4e4a8d0bc5d1a937a9a07ddbffee89e83a276cd0310b76f/kalshi_python-2.1.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "e5ca3bd9083ddb849c7d2d1eb9669efc3a9025ef48356d79af0dae7c3b618d36",
"md5": "19c70f52656687f31ea161bffcfebe55",
"sha256": "16c1d1baa7e6745df597913f2f4f3f79585690dec986026415253332b60db8e6"
},
"downloads": -1,
"filename": "kalshi_python-2.1.4.tar.gz",
"has_sig": false,
"md5_digest": "19c70f52656687f31ea161bffcfebe55",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 75911,
"upload_time": "2025-09-06T06:01:37",
"upload_time_iso_8601": "2025-09-06T06:01:37.632833Z",
"url": "https://files.pythonhosted.org/packages/e5/ca/3bd9083ddb849c7d2d1eb9669efc3a9025ef48356d79af0dae7c3b618d36/kalshi_python-2.1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-06 06:01:37",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Kalshi",
"github_project": "exchange-infra",
"github_not_found": true,
"lcname": "kalshi-python"
}