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 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
Requirements.
Python 3.9+
Installation & Usage
pip install kalshi-python
import kalshi_python
Getting Started
Please follow the installation procedure and then run the following:
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
Metadata
Release files for kalshi-python 2.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kalshi_python-2.1.4.tar.gz | 75.9 kB | Without provenance | Details for kalshi_python-2.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kalshi_python-2.1.4-py3-none-any.whl | Python 3 | none | any | Details for kalshi_python-2.1.4-py3-none-any.whl |
Total release size: 257.3 kB
Release files / kalshi_python-2.1.4.tar.gz
| Download URL | kalshi_python-2.1.4.tar.gz |
|---|---|
| Size | 75.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
16c1d1baa7e6745df597913f2f4f3f79585690dec986026415253332b60db8e6
|
|
BLAKE2b-256 checksum How to use checksums |
e5ca3bd9083ddb849c7d2d1eb9669efc3a9025ef48356d79af0dae7c3b618d36
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / kalshi_python-2.1.4-py3-none-any.whl
| Download URL | kalshi_python-2.1.4-py3-none-any.whl |
|---|---|
| Size | 181.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
921cfdbbe2bebb5cab9c85ecd930b36569f5cea79d170a1d8af5deca331e82dc
|
|
BLAKE2b-256 checksum How to use checksums |
b521a7904ee5368cb4e4a8d0bc5d1a937a9a07ddbffee89e83a276cd0310b76f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for kalshi-python 2.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.