Skip to content

Commit 806402e

Browse files
authored
Merge pull request #2 from second-state/remove/predict-subcommand
Remove prediction market (Polymarket/Kalshi) support
2 parents a0f5fcb + fbfee19 commit 806402e

File tree

10 files changed

+6
-1638
lines changed

10 files changed

+6
-1638
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,6 @@ jobs:
5555
- name: Smoke test - news
5656
run: ./target/release/fintool news BTC || true
5757

58-
- name: Smoke test - predict
59-
run: |
60-
./target/release/fintool predict list || true
61-
./target/release/fintool predict search "election" || true
62-
6358
- name: Smoke test - report
6459
run: ./target/release/fintool report list AAPL || true
6560

README.md

Lines changed: 1 addition & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# fintool
22

3-
A Rust CLI for financial trading and market intelligence — spot and perpetual futures on **Hyperliquid**, **Unit**, **Binance**, and **Coinbase**, stock quotes, LLM-enriched analysis, prediction markets on **Polymarket** and **Kalshi**, SEC filings, and news.
3+
A Rust CLI for financial trading and market intelligence — spot and perpetual futures on **Hyperliquid**, **Unit**, **Binance**, and **Coinbase**, stock quotes, LLM-enriched analysis, SEC filings, and news.
44

55
## Install as an OpenClaw Skill
66

@@ -48,10 +48,6 @@ fintool news ETH
4848
fintool report annual AAPL
4949
fintool report list TSLA
5050

51-
# Prediction markets
52-
fintool predict list
53-
fintool predict search "election"
54-
5551
# Spot trading (auto-selects exchange)
5652
fintool order buy TSLA 100 410
5753
fintool order sell TSLA 1 420
@@ -186,9 +182,6 @@ binance_api_secret = "..."
186182
coinbase_api_key = "..."
187183
coinbase_api_secret = "..."
188184

189-
# Kalshi — prediction market trading
190-
# kalshi_api_key = "..."
191-
# kalshi_api_secret = "..."
192185
```
193186

194187
### Config Options
@@ -205,9 +198,6 @@ coinbase_api_secret = "..."
205198
| `api_keys` | `binance_api_secret` | string || Binance API secret (HMAC-SHA256 signing). |
206199
| `api_keys` | `coinbase_api_key` | string || Coinbase Advanced Trade API key. |
207200
| `api_keys` | `coinbase_api_secret` | string || Coinbase Advanced Trade API secret (HMAC-SHA256 signing). |
208-
| `api_keys` | `kalshi_api_key` | string || Kalshi API key (for prediction market trading). |
209-
| `api_keys` | `kalshi_api_secret` | string || Kalshi API secret. |
210-
211201
### What Needs Configuration
212202

213203
| Command | Hyperliquid Wallet | Binance Keys | Coinbase Keys | OpenAI Key | Exchange Support |
@@ -216,15 +206,13 @@ coinbase_api_secret = "..."
216206
| `perp quote` | No | No | No | No | N/A (read-only) |
217207
| `news`, `init` | No | No | No | No | N/A |
218208
| `report` | No | No | No | No | N/A |
219-
| `predict list/search/quote` | No | No | No | No | N/A |
220209
| `order buy/sell` | Yes (HL) | Yes (Binance) | Yes (Coinbase) | No | All three |
221210
| `perp buy/sell` | Yes (HL) | Yes (Binance) | No | No | HL + Binance |
222211
| `orders` | Yes (HL) | Yes (Binance) | Yes (Coinbase) | No | All three |
223212
| `cancel` | Yes (HL) | Yes (Binance) | Yes (Coinbase) | No | All three |
224213
| `balance` | Yes (HL) | Yes (Binance) | Yes (Coinbase) | No | All three |
225214
| `positions` | Yes (HL) | Yes (Binance) | Yes (Coinbase) | No | All three |
226215
| `options buy/sell` | No | Yes (Binance) | No | No | Binance only |
227-
| `predict buy/sell` | Yes (HL) | No | No | No | Polymarket/Kalshi |
228216
| `deposit` (HL) | Yes | No | No | No | Hyperliquid |
229217
| `deposit` (Binance) | No | Yes | No | No | Binance |
230218
| `deposit` (Coinbase) | No | No | Yes | No | Coinbase |
@@ -950,51 +938,6 @@ fintool bridge-status --human
950938

951939
---
952940

953-
### `fintool predict list [--platform <PLATFORM>] [--limit <N>]`
954-
955-
List trending prediction markets from Polymarket and/or Kalshi.
956-
957-
```bash
958-
fintool predict list
959-
fintool predict list --platform polymarket --limit 5
960-
fintool predict list --platform kalshi --human
961-
```
962-
963-
---
964-
965-
### `fintool predict search <QUERY> [--platform <PLATFORM>] [--limit <N>]`
966-
967-
Search prediction markets by keyword.
968-
969-
```bash
970-
fintool predict search "trump"
971-
fintool predict search "BTC" --platform kalshi
972-
```
973-
974-
---
975-
976-
### `fintool predict quote <MARKET_ID>`
977-
978-
Get detailed quote for a specific market. Market ID format: `platform:identifier`.
979-
980-
```bash
981-
fintool predict quote kalshi:KXBALANCE-29
982-
fintool predict quote polymarket:china-coup-attempt-before-2027
983-
```
984-
985-
---
986-
987-
### `fintool predict buy/sell <MARKET_ID> <SIDE> <AMOUNT>`
988-
989-
> ⚠️ **Stub** — Requires Polymarket CLOB signing or Kalshi API credentials.
990-
991-
```bash
992-
fintool predict buy kalshi:KXBALANCE-29 yes 10
993-
fintool predict sell polymarket:some-market no 50 --min-price 90
994-
```
995-
996-
---
997-
998941
## Command Summary
999942

1000943
| Command | Description | Exchanges |
@@ -1015,14 +958,9 @@ fintool predict sell polymarket:some-market no 50 --min-price 90
1015958
| `fintool balance` | Account balances | Hyperliquid, Binance, Coinbase |
1016959
| `fintool positions` | Open positions + PnL | Hyperliquid, Binance, Coinbase |
1017960
| `fintool options buy/sell ...` | Options trading | Binance only |
1018-
| `fintool predict list` | List prediction markets | Polymarket, Kalshi |
1019-
| `fintool predict search <Q>` | Search prediction markets | Polymarket, Kalshi |
1020-
| `fintool predict quote <ID>` | Quote prediction market | Polymarket, Kalshi |
1021961
| `fintool deposit <ASSET>` | Deposit to exchange | Hyperliquid, Binance, Coinbase |
1022962
| `fintool withdraw <AMT> <ASSET>` | Withdraw from exchange | Hyperliquid, Binance, Coinbase |
1023963
| `fintool bridge-status` | Unit bridge operation status | Hyperliquid |
1024-
| `fintool predict buy/sell <ID> ...` | Trade predictions (stub) | Polymarket, Kalshi |
1025-
1026964
## Data Sources
1027965

1028966
| Data | Source | Auth Required | Notes |
@@ -1040,10 +978,6 @@ fintool predict sell polymarket:some-market no 50 --min-price 90
1040978
| Trading — Binance futures | Binance Futures API `/fapi/v1/order` | API key + secret | HMAC-SHA256 signing |
1041979
| Trading — Binance options | Binance Options API `/eapi/v1/order` | API key + secret | HMAC-SHA256 signing |
1042980
| Trading — Coinbase spot | Coinbase Advanced Trade API `/api/v3/brokerage/orders` | API key + secret | HMAC-SHA256 signing |
1043-
| Prediction markets (quotes) | Polymarket Gamma API | No | |
1044-
| Prediction markets (quotes) | Kalshi REST API | No | |
1045-
| Prediction markets (trading) | Polymarket CLOB | Wallet private key | |
1046-
| Prediction markets (trading) | Kalshi REST API | API key + secret | |
1047981
| Deposit/Withdraw — HyperUnit bridge | HyperUnit API | Wallet private key | ETH, BTC, SOL ↔ Hyperliquid |
1048982
| Deposit — USDC cross-chain bridge | Across Protocol API | Wallet private key | Ethereum/Base → Arbitrum → HL |
1049983
| Deposit/Withdraw — HL USDC | Hyperliquid Bridge2 | Wallet private key | Arbitrum ↔ Hyperliquid |
@@ -1067,7 +1001,6 @@ fintool/
10671001
│ ├── coinbase.rs # Coinbase Advanced Trade API client (spot, deposit/withdraw, HMAC-SHA256)
10681002
│ ├── bridge.rs # Across Protocol cross-chain USDC bridge (Ethereum/Base ↔ Arbitrum)
10691003
│ ├── unit.rs # HyperUnit bridge (ETH/BTC/SOL deposit/withdraw, fee estimation)
1070-
│ ├── polymarket.rs # Polymarket CLOB client
10711004
│ ├── format.rs # Color formatting helpers
10721005
│ └── commands/
10731006
│ ├── quote.rs # Multi-source quotes + LLM enrichment
@@ -1080,7 +1013,6 @@ fintool/
10801013
│ ├── balance.rs # Account balance
10811014
│ ├── positions.rs # Open positions
10821015
│ ├── options.rs # Options trading (Binance only)
1083-
│ ├── predict.rs # Prediction markets (Polymarket + Kalshi)
10841016
│ ├── deposit.rs # Multi-exchange deposit (Unit, Across, Binance, Coinbase)
10851017
│ ├── withdraw.rs # Multi-exchange withdraw (Bridge2, Unit, Across, Binance, Coinbase)
10861018
│ └── bridge_status.rs # HyperUnit bridge operation tracker

config.toml.default

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ testnet = false
2020
# openai_api_key = "sk-..."
2121
# openai_model = "gpt-4.1-mini"
2222

23-
# Kalshi API credentials — enables prediction market trading
24-
# Sign up at https://kalshi.com
25-
# kalshi_api_key = "..."
26-
# kalshi_api_secret = "..."
27-
2823
# CryptoPanic token — crypto news (optional, not currently used)
2924
# Free at https://cryptopanic.com/developers/api/
3025
# cryptopanic_token = "..."

skills/SKILL.md

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: fintool
3-
description: "Financial trading CLI — spot/perp/options trading on Hyperliquid, Binance, Coinbase. Deposit and withdraw across chains (Unit bridge, Across Protocol). LLM-enriched price quotes with trend analysis. Prediction markets (Polymarket + Kalshi). News and SEC filings. Use when: user asks about stock/crypto prices, wants to trade, deposit, withdraw, check portfolio, or browse prediction markets."
3+
description: "Financial trading CLI — spot/perp/options trading on Hyperliquid, Binance, Coinbase. Deposit and withdraw across chains (Unit bridge, Across Protocol). LLM-enriched price quotes with trend analysis. News and SEC filings. Use when: user asks about stock/crypto prices, wants to trade, deposit, withdraw, or check portfolio."
44
homepage: https://github.com/second-state/fintool
55
metadata: { "openclaw": { "emoji": "📈", "requires": { "bins": ["curl"] } } }
66
---
@@ -166,29 +166,7 @@ Returns: mark price, oracle price, funding rate, open interest, premium, max lev
166166
- `EXPIRY` format: `YYYY-MM-DD` (e.g., `2026-03-28`)
167167
- Binance converts to: `BTC-260328-80000-C` internally
168168

169-
### Workflow 4: Prediction Markets
170-
171-
**Goal**: Browse and trade on prediction markets (Polymarket + Kalshi).
172-
173-
**Step 1 — Browse markets:**
174-
```bash
175-
{baseDir}/scripts/fintool predict list
176-
{baseDir}/scripts/fintool predict search "election"
177-
{baseDir}/scripts/fintool predict search "BTC" --platform kalshi
178-
```
179-
180-
**Step 2 — Get detailed quote:**
181-
```bash
182-
{baseDir}/scripts/fintool predict quote kalshi:TICKER
183-
{baseDir}/scripts/fintool predict quote polymarket:slug
184-
```
185-
186-
**Step 3 — Trade (stub — requires platform-specific auth):**
187-
```bash
188-
{baseDir}/scripts/fintool predict buy kalshi:TICKER yes 10
189-
```
190-
191-
### Workflow 5: Portfolio Overview
169+
### Workflow 4: Portfolio Overview
192170

193171
**Goal**: Check current positions and balances across exchanges.
194172

@@ -211,7 +189,7 @@ Returns: mark price, oracle price, funding rate, open interest, premium, max lev
211189
{baseDir}/scripts/fintool cancel coinbase:uuid-here # Coinbase
212190
```
213191

214-
### Workflow 6: Depositing Funds
192+
### Workflow 5: Depositing Funds
215193

216194
**Goal**: Fund an exchange account with crypto from an external wallet or another chain.
217195

@@ -249,7 +227,7 @@ Automatically signs 3 transactions: approval → Across bridge → HL Bridge2 de
249227
{baseDir}/scripts/fintool deposit USDC --exchange coinbase
250228
```
251229

252-
### Workflow 7: Withdrawing Funds
230+
### Workflow 6: Withdrawing Funds
253231

254232
**Goal**: Move assets from an exchange to an external wallet or another chain.
255233

src/cli.rs

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,6 @@ pub enum Commands {
5353
#[command(subcommand)]
5454
Options(OptionsCmd),
5555

56-
/// Prediction market trading
57-
#[command(subcommand)]
58-
Predict(PredictCmd),
59-
6056
/// Get stock reports (10-K annual, 10-Q quarterly) from SEC EDGAR
6157
#[command(subcommand)]
6258
Report(ReportCmd),
@@ -192,53 +188,3 @@ pub enum OptionsCmd {
192188
size: String,
193189
},
194190
}
195-
196-
#[derive(Subcommand)]
197-
pub enum PredictCmd {
198-
/// List trending/popular prediction markets
199-
List {
200-
/// Filter by platform: polymarket, kalshi, or all (default)
201-
#[arg(long, default_value = "all")]
202-
platform: String,
203-
/// Max results
204-
#[arg(long, default_value = "10")]
205-
limit: usize,
206-
},
207-
/// Search prediction markets by keyword
208-
Search {
209-
query: String,
210-
#[arg(long, default_value = "all")]
211-
platform: String,
212-
#[arg(long, default_value = "10")]
213-
limit: usize,
214-
},
215-
/// Get price/probability quote for a specific market
216-
Quote {
217-
/// Market ID or ticker (e.g. polymarket:slug or kalshi:TICKER)
218-
market: String,
219-
},
220-
/// Buy a prediction contract
221-
Buy {
222-
/// Market ID (polymarket:slug or kalshi:TICKER)
223-
market: String,
224-
/// Side: yes or no
225-
side: String,
226-
/// Amount in USDC (Polymarket) or USD (Kalshi)
227-
amount: String,
228-
/// Max price in cents (1-99)
229-
#[arg(long)]
230-
max_price: Option<String>,
231-
},
232-
/// Sell a prediction contract
233-
Sell {
234-
/// Market ID (polymarket:slug or kalshi:TICKER)
235-
market: String,
236-
/// Side: yes or no
237-
side: String,
238-
/// Number of contracts to sell
239-
amount: String,
240-
/// Min price in cents (1-99)
241-
#[arg(long)]
242-
min_price: Option<String>,
243-
},
244-
}

src/commands/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ pub mod order;
88
pub mod orders;
99
pub mod perp;
1010
pub mod positions;
11-
pub mod predict;
1211
pub mod quote;
1312
pub mod report;
1413
pub mod withdraw;

0 commit comments

Comments
 (0)