Skip to main content

kalshi-python-unofficial

A lightweight Python wrapper for the Kalshi trading API. Fairly untested at the moment.

Usage

Setting API Credentials

import kalshi.auth
kalshi.auth.set_key("PUBLIC_KEY","path/to/private_key.pem")

REST Endpoints

Full coverage except for collections and advanced endpoints.

from kalshi.rest import portfolio, exchange
print(portfolio.GetBalance())
print(exchange.GetExchangeStatus())

Websocket Client

import kalshi.websocket
class MyClient(kalshi.websocket.Client):
    async def on_open(self):
        await self.subscribe(["orderbook_delta"], ["KXBTCD-25JAN1821-T104249.99"])

    async def on_message(self, message):
        print("Received message:", message)

ws_client = MyClient()
asyncio.run(ws_client.connect())

Metadata

Release files for kalshi-python-unofficial 0.0.1

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-unofficial 0.0.1
File Size Uploaded Provenance Actions
kalshi_python_unofficial-0.0.1.tar.gz 7.2 kB Without provenance Details for kalshi_python_unofficial-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kalshi-python-unofficial 0.0.1
File Interpreter ABI Platform Actions
kalshi_python_unofficial-0.0.1-py3-none-any.whl Python 3 none any Details for kalshi_python_unofficial-0.0.1-py3-none-any.whl

Total release size: 16.1 kB

Release files / kalshi_python_unofficial-0.0.1.tar.gz

Download URL kalshi_python_unofficial-0.0.1.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e513ced55d4e749593540558b919b3d5cccc487d5e35500f37009705a2f433f1
BLAKE2b-256 checksum
How to use checksums
b62a32a2979fd7c74d7176123b2c87c8636f1ac54c4bf2dcecb4e13ae62df2c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.9.2

Release files / kalshi_python_unofficial-0.0.1-py3-none-any.whl

Download URL kalshi_python_unofficial-0.0.1-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cfc9b5274ac9f6bcdc4a3adf1ef8384161034384a35976b6e220a613cb8f6652
BLAKE2b-256 checksum
How to use checksums
d2717a37a186d0d25026326649600bb5d895765e39d9c3e6949dd8b5778d1af2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.9.2

Security for kalshi-python-unofficial 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

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