Skip to main content

An asyncio-native Kalshi API.

Project description

An async-native, fully type-hinted Python client for Kalshi

aiokalshi provides a friendly interface into Kalshi's REST API (websocket support is in development). The library offers the benefits of asynchronous code, editor autocomplete, and parity with Kalshi's API while being easy to use and not requiring authentication.

Installation

uv add aiokalshi
pip install aiokalshi

Usage

aiokalshi uses the same structure as Kalshi's documented RESTful API. Every query parameter available is provided in a typed fashion, meaning you get autocomplete when customizing your queries.

Every response includes all of the available data and makes use of Pydantic.

from httpx import AsyncClient
from aiokalshi import Kalshi

async def main():
    async with AsyncClient() as client:
        kalshi = Kalshi(client)
        markets = await kalshi.markets.list()
        markets_one = await kalshi.markets.list(limit=1)
        market = await kalshi.markets.get(markets_one.markets[0].ticker)
        orderbook = await kalshi.markets.orderbook.get(market.ticker, depth=5)

Status

This project is under rapid development. Expect breaking changes.

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

aiokalshi-0.0.1.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

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

aiokalshi-0.0.1-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file aiokalshi-0.0.1.tar.gz.

File metadata

  • Download URL: aiokalshi-0.0.1.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.19

File hashes

Hashes for aiokalshi-0.0.1.tar.gz
Algorithm Hash digest
SHA256 f896cae5a520ab9fdbce45fcf2c9bce7beb16138b17782eea9d4d3a76120a5b6
MD5 cc057e49b00407df16b68fd92a66268d
BLAKE2b-256 d6f6101b896e8b30c94d16ff0a70303467d6b5d89863939db4d47af0c6a70f44

See more details on using hashes here.

File details

Details for the file aiokalshi-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: aiokalshi-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.19

File hashes

Hashes for aiokalshi-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 28e84930b05d22b7366fe47a8ca96384f9660211ad9c8bba91a4d6b565b47be9
MD5 d8548e7a2db8c20cb1adf1db905a946f
BLAKE2b-256 478ec5b2fadacaa069918e954cfe319c8142b4558bb57d2132fbf93a73442518

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