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: 3.29.0
  • Package version: 3.29.0
  • Generator version: 7.17.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit

Requirements.

Python 3.13+

Installation & Usage

pip install kalshi_python_async
import kalshi_python_async

Getting Started

Please follow the installation procedure and then run the following:

import asyncio

from kalshi_python_async 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

async def main():
    # Initialize the client
    async with KalshiClient(config) as client:
        # Make API calls
        balance = await client.get_balance()
        print(f"Balance: ${balance.balance / 100:.2f}")

asyncio.run(main())

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_async-3.29.0.tar.gz (183.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kalshi_python_async-3.29.0-py3-none-any.whl (401.3 kB view details)

Uploaded Python 3

File details

Details for the file kalshi_python_async-3.29.0.tar.gz.

File metadata

  • Download URL: kalshi_python_async-3.29.0.tar.gz
  • Upload date:
  • Size: 183.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for kalshi_python_async-3.29.0.tar.gz
Algorithm Hash digest
SHA256 ce9080f7c7e88bc6589d9f2390535daeb64c90625498703bc31175356352e692
MD5 7c7d2a53e17ea7e8ae68772ea8811c1f
BLAKE2b-256 a7af9ebb0a79780158f5a7a6420e8b994b67d9d5a19cd9b9ee8e604c50885481

See more details on using hashes here.

Provenance

The following attestation bundles were made for kalshi_python_async-3.29.0.tar.gz:

Publisher: publish-pypi.yml on Kalshi/exchange-infra

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kalshi_python_async-3.29.0-py3-none-any.whl.

File metadata

File hashes

Hashes for kalshi_python_async-3.29.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e7b53f0d99c571b6df5e9cfd458b0e74b779d9d5e3e4d05de01062c9f0b108b7
MD5 1dd8cc8cf25e59a871a3b0b0eedcae39
BLAKE2b-256 1c772d40d649cd06f1a899a324b8a74aa3e7f7a4b9076a855085e0e9fd0b27a8

See more details on using hashes here.

Provenance

The following attestation bundles were made for kalshi_python_async-3.29.0-py3-none-any.whl:

Publisher: publish-pypi.yml on Kalshi/exchange-infra

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

3.29.0 This release

2 files

3.28.0

2 files

3.27.0

2 files

3.26.0

2 files

3.25.0

2 files

3.24.0

2 files

3.23.0

2 files

3.22.0

2 files

3.21.0

2 files

3.20.0

2 files

3.19.0

2 files

3.18.0

2 files

3.16.0

2 files

3.15.0

2 files

3.14.0

2 files

3.13.0

2 files

3.12.0

2 files

3.11.0

2 files

3.10.0

2 files

3.9.0

2 files

3.8.0

2 files

3.7.0

2 files

3.6.0

2 files

3.5.0

2 files

3.4.0

2 files

3.3.0

2 files

3.2.1

2 files

3.2.0

2 files

3.1.0

2 files

3.0.0

2 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