بنقرة واحدة
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 المهني
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.
| 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 '.'