Skip to main content

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

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)

Source distribution for kalshi-python 2.1.4
File Size Uploaded
kalshi_python-2.1.4.tar.gz 75.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kalshi-python 2.1.4
File Interpreter ABI Platform
kalshi_python-2.1.4-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

2.1.4 This release

2 release files

2.1.3

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page