Machine-readable contracts for building AI agents on top of bitmex-cli.
tool-catalog.json is the canonical command contract.
- Coverage: 134 commands with parameters, types, defaults, and examples
- Every command includes: group, description, auth requirement,
dangerousflag, and parameter schemas - 32 commands are marked
dangerous: true(orders, withdrawals, transfers, cancel-all, staking)
error-catalog.json is the error routing contract.
- 9 error categories with retry/backoff guidance
| File | Purpose |
|---|---|
tool-catalog.json |
Canonical command catalog (134 commands) |
error-catalog.json |
Error categories with retry guidance |
examples/ |
Runnable shell examples |
import json
with open("agents/tool-catalog.json") as f:
catalog = json.load(f)
for cmd in catalog["commands"]:
print(f"{cmd['group']}/{cmd['name']}: {cmd['description']}")
if cmd.get("dangerous"):
print(" ⚠ requires human confirmation")The catalog contains everything needed to generate tool schemas for OpenAI, Anthropic, MCP, LangChain, or any other framework. Each command entry includes:
{
"name": "order-buy",
"group": "trade",
"command": "bitmex order buy <PAIR> <VOLUME>",
"description": "Place a buy order.",
"auth_required": true,
"dangerous": true,
"parameters": [
{ "name": "PAIR", "type": "string", "required": true, "positional": true },
{ "name": "--type", "type": "string", "required": false }
],
"example": "bitmex order buy BTCUSD 0.001 --type limit --price 50000 --validate"
}safe_commands = [c for c in catalog["commands"] if not c.get("dangerous")]
dangerous_commands = [c for c in catalog["commands"] if c.get("dangerous")]../CONTEXT.md: Runtime context for tool-using agents../AGENTS.md: Full integration guide../skills/: Goal-oriented workflow skills../gemini-extension.json: Gemini CLI extension manifest