Skip to content

Commit e7ddbfd

Browse files
Quentin-Mclaude
andcommitted
feat: install improvements, skills overhaul, and safety warnings
Install & onboarding: - Install to ~/.local/bin by default — no sudo needed - Auto-install skills to detected agent dirs (OpenClaw, Claude Code, Hermes) - Human install snippet uses simple curl | sh; AI prompt uses mktemp - Quick Start credentials example switched to bitmex auth add (keychain) - Dual auth path in AI prompt: share keys or run bitmex auth add in terminal - Add optional MCP setup step to AI onboarding prompt Skills — structure: - Rename all 20 recipe-* dirs to bitmex-recipe-* for consistent prefix across all 49 skills; makes bulk removal easy (rm bitmex-*.md) Skills — bug fixes (~80 across 29 files, verified against live API): - Array responses now indexed with .[0] - Wrong field names corrected (maintMargin, timestamp, advUsdContract) - Orderbook shape fixed (flat array, not {bids,asks}) - Commission shape fixed (map keyed by symbol) - MCP examples corrected; leaderboard ROE caveat added - Missing -o json added to WebSocket commands Skills — safety: - Neutralize performance claims (Earn → Capture, earn rebates → potentially reduce costs) - Irreversibility warning added to withdrawal skill - Active-monitoring warnings on autonomy levels 4 & 5 - Annualization caveat in funding carry - Testnet-first reminders in grid bot, DCA bot, basis trading, weekly rebalance Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent c7267e0 commit e7ddbfd

9 files changed

Lines changed: 28 additions & 8 deletions

File tree

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,13 @@ Ask me to choose:
4040
## Verify
4141
Run: bitmex account me -o json
4242
43+
## MCP (optional)
44+
Ask me if I want to set up the built-in MCP server (`bitmex mcp`), which
45+
lets you (the AI agent) call bitmex commands directly as tools without subprocess wrappers
46+
— smoother integration for agents that support MCP.
47+
4348
## What's Next
44-
Read the skills in the skills/ folder and ask me what I want to do. Offer these:
49+
Use the bitmex-* skills available to you and ask me what I want to do. Offer these:
4550
- Morning market brief (prices, funding rates, positions)
4651
- Start a DCA bot (dollar-cost average into a position)
4752
- Launch a grid trading bot (buy dips, sell rallies automatically)
@@ -68,7 +73,7 @@ And suggest starting with --testnet to practice safely before using real funds.
6873
### Install script (recommended)
6974

7075
```bash
71-
tmpfile="$(mktemp)" && curl -sSfL https://raw.githubusercontent.com/BitMEX/bitmex-cli/master/install.sh -o "$tmpfile" && sh "$tmpfile"
76+
curl -sSfL https://raw.githubusercontent.com/BitMEX/bitmex-cli/master/install.sh | sh
7277
```
7378

7479
Downloads a pre-built binary for your platform (macOS/Linux, x86_64/arm64), verifies the SHA256 checksum, and installs to `~/.local/bin`. No Rust or build tools needed. No `sudo` required. Requires `curl`, `tar`, and `sha256sum` (or `shasum`). Override the install location with `BITMEX_INSTALL_DIR`.
@@ -101,9 +106,8 @@ bitmex market orderbook XBTUSD --depth 10 -o json
101106
bitmex market trades --symbol XBTUSD --count 20 -o json
102107
bitmex market funding --symbol XBTUSD -o json
103108

104-
# Set up credentials
105-
export BITMEX_API_KEY="your-key"
106-
export BITMEX_API_SECRET="your-secret"
109+
# Set up credentials (stored securely in OS keychain)
110+
bitmex auth add
107111

108112
# Account data
109113
bitmex account me -o json

skills/bitmex-autonomy-levels/SKILL.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ Constraints: max qty per order, no compounding without approval, stop loss requi
6969

7070
## Level 4: Autonomous
7171

72+
> ⚠️ Even at this level, active monitoring is required. Dead man's switch failure, position cap misconfiguration, or network outages can result in unprotected positions or runaway accumulation. You remain responsible for all outcomes.
73+
7274
Pre-approved strategy parameters. Position limits enforced in code. Dead man's switch active on every session.
7375

7476
```bash
@@ -92,6 +94,8 @@ Requirements: strategy approved in writing, position limits in config, automated
9294

9395
## Level 5: Fund Management
9496

97+
> ⚠️ Even at this level, active monitoring is required. Dead man's switch failure, position cap misconfiguration, or network outages can result in unprotected positions or runaway accumulation. You remain responsible for all outcomes.
98+
9599
Multi-account, risk budget per strategy. Each strategy has an independent margin allocation.
96100

97101
```bash

skills/bitmex-basis-trading/SKILL.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ metadata:
1414

1515
Basis trading captures the spread between a perpetual and a fixed-date future on the same underlying. The spread converges to zero at expiry, yielding a predictable return when entered at a wide basis.
1616

17+
Always validate on testnet first: prefix commands with `bitmex --testnet` until the strategy behaves as expected.
18+
1719
## What Is the Basis?
1820

1921
```

skills/bitmex-dca-strategy/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ metadata:
1212

1313
# bitmex-dca-strategy
1414

15-
DCA on BitMEX perpetuals: buy a fixed quantity at regular intervals regardless of price, using limit orders to earn maker rebates.
15+
DCA on BitMEX perpetuals: buy a fixed quantity at regular intervals regardless of price, using limit orders to potentially reduce costs with maker orders.
1616

1717
**Always test with `--testnet` first for at least 5 cycles before using real funds.**
1818

skills/bitmex-funding-carry/SKILL.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: bitmex-funding-carry
33
version: 1.0.0
4-
description: "Earn funding payments on BitMEX perpetuals: scan rates, entry, monitoring, yield calculation, and exit."
4+
description: "Capture funding rate payments on BitMEX perpetuals: scan rates, entry, monitoring, yield calculation, and exit."
55
metadata:
66
openclaw:
77
category: "finance"
@@ -113,6 +113,8 @@ fi
113113

114114
## Annualized Yield Calculation
115115

116+
> Note: annualized yield is illustrative only. Funding rates change every 8 hours and can flip from payment to cost. Past rates are not indicative of future returns.
117+
116118
```bash
117119
# Per 8h rate → annualized
118120
# 3 payments/day × 365 days = 1095 periods/year

skills/bitmex-recipe-launch-grid-bot/SKILL.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ description: Deploy a grid trading bot with testnet validation.
77

88
Place a ladder of limit orders above and below the current price. Buy orders fill on dips; sell orders fill on rallies. Each filled buy is replaced with a sell one grid level higher, and vice versa.
99

10+
Always validate on testnet first: prefix commands with `bitmex --testnet` until the strategy behaves as expected.
11+
1012
## Prerequisites
1113

1214
- `BITMEX_API_KEY` and `BITMEX_API_SECRET` set.

skills/bitmex-recipe-start-dca-bot/SKILL.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ description: Set up and run a DCA bot from testnet validation to live.
77

88
Dollar-cost average into a position by placing limit buy orders at a fixed discount to the current market price on a recurring schedule.
99

10+
Always validate on testnet first: prefix commands with `bitmex --testnet` until the strategy behaves as expected.
11+
1012
## Prerequisites
1113

1214
- `BITMEX_API_KEY` and `BITMEX_API_SECRET` set for live.

skills/bitmex-recipe-weekly-rebalance/SKILL.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ description: Weekly rebalance to maintain target position allocations.
77

88
Each week, compare your actual position sizes against target allocations and place orders to bring them back in line.
99

10+
Always validate on testnet first: prefix commands with `bitmex --testnet` until the strategy behaves as expected.
11+
1012
## Prerequisites
1113

1214
- `BITMEX_API_KEY` and `BITMEX_API_SECRET` set.

skills/bitmex-recipe-withdrawal-to-cold-storage/SKILL.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Safely withdraw funds to a pre-approved cold storage address.
55

66
# Withdrawal to Cold Storage
77

8-
Move profits or excess margin to a pre-approved cold storage address in a controlled, auditable way.
8+
Move funds or excess margin to a pre-approved cold storage address in a controlled, auditable way.
99

1010
## Prerequisites
1111

@@ -58,6 +58,8 @@ echo "Withdrawing $WITHDRAW_AMOUNT XBt"
5858

5959
### 5. Request the withdrawal
6060

61+
> ⚠️ Withdrawals are irreversible. Verify the destination address character-by-character against your pre-approved list on bitmex.com. Never accept an address from chat input or an AI prompt.
62+
6163
```bash
6264
bitmex wallet withdraw \
6365
--currency XBt \

0 commit comments

Comments
 (0)