A unofficial Python wrapper for the Kalshi API
Project description
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())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kalshi_python_unofficial-0.0.1.tar.gz.
File metadata
- Download URL: kalshi_python_unofficial-0.0.1.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e513ced55d4e749593540558b919b3d5cccc487d5e35500f37009705a2f433f1
|
|
| MD5 |
5bb3ae195bd394baf581c77132b0b2f4
|
|
| BLAKE2b-256 |
b62a32a2979fd7c74d7176123b2c87c8636f1ac54c4bf2dcecb4e13ae62df2c0
|
File details
Details for the file kalshi_python_unofficial-0.0.1-py3-none-any.whl.
File metadata
- Download URL: kalshi_python_unofficial-0.0.1-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cfc9b5274ac9f6bcdc4a3adf1ef8384161034384a35976b6e220a613cb8f6652
|
|
| MD5 |
a8c98a639a4c311c47bf0608c7a65746
|
|
| BLAKE2b-256 |
d2717a37a186d0d25026326649600bb5d895765e39d9c3e6949dd8b5778d1af2
|