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.4.0
  • Package version: 3.4.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_sync-3.4.0.tar.gz (124.6 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_sync-3.4.0-py3-none-any.whl (268.3 kB view details)

Uploaded Python 3

File details

Details for the file kalshi_python_sync-3.4.0.tar.gz.

File metadata

  • Download URL: kalshi_python_sync-3.4.0.tar.gz
  • Upload date:
  • Size: 124.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for kalshi_python_sync-3.4.0.tar.gz
Algorithm Hash digest
SHA256 aebd56c5bdbc6cf58a74a41a08978f8ee6e74ff5532f5d34dab1c49740895997
MD5 c4b947acf2e6e79ccc8d0dbf828b9dfe
BLAKE2b-256 171dd4b1fdd5cda33411fdcc49a91ddedb046da5b63b5e8a1680d7006e110b99

See more details on using hashes here.

File details

Details for the file kalshi_python_sync-3.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for kalshi_python_sync-3.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 32e4e7a8ae414d3c09d17187cd9c7fbbc9ec8563620f4f222bf09e486ee20460
MD5 5248e6df871868189bfa42135447e926
BLAKE2b-256 4326078cf865daf83cb9607f09bafa7596638ef1f62bf755f649ee862b5fe94a

See more details on using hashes here.

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