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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
kalshi_python-2.1.4.tar.gz
(75.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
kalshi_python-2.1.4-py3-none-any.whl
(181.4 kB
view details)
File details
Details for the file kalshi_python-2.1.4.tar.gz.
File metadata
- Download URL: kalshi_python-2.1.4.tar.gz
- Upload date:
- Size: 75.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16c1d1baa7e6745df597913f2f4f3f79585690dec986026415253332b60db8e6
|
|
| MD5 |
19c70f52656687f31ea161bffcfebe55
|
|
| BLAKE2b-256 |
e5ca3bd9083ddb849c7d2d1eb9669efc3a9025ef48356d79af0dae7c3b618d36
|
File details
Details for the file kalshi_python-2.1.4-py3-none-any.whl.
File metadata
- Download URL: kalshi_python-2.1.4-py3-none-any.whl
- Upload date:
- Size: 181.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
921cfdbbe2bebb5cab9c85ecd930b36569f5cea79d170a1d8af5deca331e82dc
|
|
| MD5 |
26fec8097c0f51ca8fde03d95f7c40a7
|
|
| BLAKE2b-256 |
b521a7904ee5368cb4e4a8d0bc5d1a937a9a07ddbffee89e83a276cd0310b76f
|