원클릭으로
bitmex-shared
Shared runtime contract for bitmex-cli: auth, invocation, parsing, and safety.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Shared runtime contract for bitmex-cli: auth, invocation, parsing, and safety.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | bitmex-shared |
| version | 1.0.0 |
| description | Shared runtime contract for bitmex-cli: auth, invocation, parsing, and safety. |
| metadata | {"openclaw":{"category":"finance"},"requires":{"bins":["bitmex"]}} |
This tool is experimental. Commands execute real financial transactions on BitMEX. Use --testnet before using real funds. See DISCLAIMER.md for full terms.
Always call:
bitmex <command-group> <subcommand> [args...] -o json 2>/dev/null
Rules:
stdout only.stderr as diagnostics.0 = success.stdout contains a JSON error envelope.export BITMEX_API_KEY="your-key"
export BITMEX_API_SECRET="your-secret"
Public market data (market, announce, chat read) requires no credentials. All account, order, position, wallet, and staking commands require auth.
Use --testnet for all testing. Connects to testnet.bitmex.com. No real money at risk. Obtain testnet API keys from testnet.bitmex.com/app/apiKeys.
bitmex --testnet market instrument --active -o json
bitmex --testnet order buy XBTUSD 100 --price 50000 --validate -o json
bitmex --testnet position list -o json
{ "error": "<category>", "message": "<description>" }
Categories: api, auth, network, rate_limit, validation, config, websocket, io, parse.
Rate limit errors include suggestion, retryable, and docs_url fields:
{ "error": "rate_limit", "message": "...", "suggestion": "Wait 47s", "retryable": true }
BitMEX uses HMAC-SHA256 signatures. Every authenticated request includes api-key, api-expires, and api-signature headers. The CLI handles this automatically when BITMEX_API_KEY and BITMEX_API_SECRET are set.
# Verify credentials are working
bitmex account me -o json 2>/dev/null | jq '.username'
Configuration is stored at ~/.config/bitmex/config.toml. Use bitmex auth set to write credentials:
bitmex auth set --api-key <key> --api-secret <secret>
bitmex auth show # confirm (secret is masked)
bitmex auth reset # clear stored credentials
--validate before live order submission.--testnet for all new strategies.BITMEX_API_SECRET.--yes or explicit user confirmation.Any command that modifies state is considered dangerous: order buy/sell/amend/cancel/cancel-all/close-position, position leverage/isolate/transfer-margin/risk-limit, wallet withdraw/transfer, staking unstake. Never execute these without explicit user confirmation.
RESULT=$(bitmex market instrument --symbol XBTUSD -o json 2>/dev/null)
if [ $? -ne 0 ]; then
CATEGORY=$(echo "$RESULT" | jq -r '.error // "unknown"')
MESSAGE=$(echo "$RESULT" | jq -r '.message // ""')
echo "Error [$CATEGORY]: $MESSAGE"
exit 1
fi
echo "$RESULT" | jq '.'
Price, funding, liquidation, and balance alerts using polling and WebSocket on bitmex-cli.
Autonomy progression for bitmex-cli agents: from read-only market data to autonomous fund management.
Delta-neutral basis trading between BitMEX perpetuals and fixed-date futures: entry, monitoring, and exit.
Dollar cost averaging on bitmex-cli: testnet-first, fixed qty per interval, limit orders, and position cap enforcement.
Error category handling, duplicate order prevention, retry logic, and partial fill management for bitmex-cli.
Minimize trading fees on bitmex-cli: maker vs taker, post-only orders, commission tiers, and fee audit.