An open API service indexing awesome lists of open source software.

https://github.com/ellache/kalshi_cli

Python-based CLI tool for interacting with Kalshi API. Uses argparse, scripts can be mapped to custom CLI arguments via setuptools. Not actively maintained.
https://github.com/ellache/kalshi_cli

cli kalshi

Last synced: 30 days ago
JSON representation

Python-based CLI tool for interacting with Kalshi API. Uses argparse, scripts can be mapped to custom CLI arguments via setuptools. Not actively maintained.

Awesome Lists containing this project

README

          

# Kalshi CLI tool

Enables CLI interaction with [Kalshi's](https://kalshi.com/home) trading api.
Supported operations include:
- Retrieve all markets
- Retrieve individual market by ID
- Retrieve user positions
- Place order (with custom expiration, not supported via UI)

[Kalshi docs](https://kalshi-public-docs.s3.amazonaws.com/KalshiAPI.html)

### Setup
WIP

### Usage
kalshi help - lists usages within CLI

###### Placing Orders
kalshi buy -a -id -p -s -e -max -sellCap
kalshi sell -a -id -p -s -e -max -sellCap

There are no "buy" and "sell" orders in kalshi, you can buy shares on one side, or you can buy the opposite
side to close a position (see the site for more details). The sell command, therefore, attempts to place an order to "close",
or buy a contract on the opposite side that you offer (all contracts are yes/no binaries)

###### Retrieving Markets
kalshi getMarket -id
kalshi getMarkets

###### Retrieving Positions
kalshi positions

### Notes

This tool is still a WIP. Outstanding items include:
- Supporting new Kalshi API methods
- Using local json to map ticker to market ID for methods dependent on market ID
- Additional test coverage
- Pretty print orderbook
- Pretty print market bids for cached markets
- Add addtional arguments for methods not currently supported

Contributing: