Skip to main content

Manually defined OpenAPI spec for endpoints being migrated to spec-first approach

Project description

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

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

Project details


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.20.0.tar.gz (166.2 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.20.0-py3-none-any.whl (372.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kalshi_python_async-3.20.0.tar.gz
  • Upload date:
  • Size: 166.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for kalshi_python_async-3.20.0.tar.gz
Algorithm Hash digest
SHA256 a8eb68ad0cca8704887ec88436c66c5dcc36dcc197ca00e2bed2d0c1c26d5b2c
MD5 478c84478421bfb6c11ad7352481134a
BLAKE2b-256 4c2fc07047add5819a1a40368456be31a2726c42f7eabc6aa0975b58274f3b37

See more details on using hashes here.

Provenance

The following attestation bundles were made for kalshi_python_async-3.20.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.20.0-py3-none-any.whl.

File metadata

File hashes

Hashes for kalshi_python_async-3.20.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4a58c54ed16e8759de1f85921d94beec7714131da732b20c7ff8a5d87a29f484
MD5 c618baea9fcdabdb1e39826498254c65
BLAKE2b-256 89bb5a44749a859e16118308dd6e4d47c2329a51a23cfb56d769e712c10fc871

See more details on using hashes here.

Provenance

The following attestation bundles were made for kalshi_python_async-3.20.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.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page