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.
- Host: GitHub
- URL: https://github.com/ellache/kalshi_cli
- Owner: EllAchE
- License: mit
- Created: 2021-11-06T21:53:29.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-01-20T08:37:23.000Z (over 4 years ago)
- Last Synced: 2025-02-23T09:29:43.240Z (over 1 year ago)
- Topics: cli, kalshi
- Language: Python
- Homepage:
- Size: 284 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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: