ワンクリックで
bitmex-portfolio-intel
Portfolio analysis on bitmex-cli: balance, positions, trade history, execution fills, margin state, and volume.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Portfolio analysis on bitmex-cli: balance, positions, trade history, execution fills, margin state, and volume.
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-portfolio-intel |
| version | 1.0.0 |
| description | Portfolio analysis on bitmex-cli: balance, positions, trade history, execution fills, margin state, and volume. |
| metadata | {"openclaw":{"category":"finance"},"requires":{"bins":["bitmex"]},"depends":["bitmex-shared"]} |
Read-only commands for understanding current portfolio state. All commands in this skill require authentication but make no changes.
# XBt (satoshi) balance
bitmex wallet balance --currency XBt -o json 2>/dev/null | \
jq '{currency, amount, withdrawableAmount, pendingDebit, pendingCredit}'
# All currencies (returns single object for default currency; use --currency to specify)
bitmex wallet balance -o json 2>/dev/null | \
jq '{currency, amount, withdrawableAmount}'
# Wallet summary across accounts (returns array of wallet events)
bitmex wallet summary -o json 2>/dev/null | \
jq '[.[] | {transactType, amount, walletBalance, currency}]'
# All open positions
bitmex position list -o json 2>/dev/null | \
jq '[.[] | select(.isOpen == true) | {
symbol, currentQty, avgEntryPrice, markPrice,
unrealisedPnl, realisedPnl, liquidationPrice,
leverage, roe: .unrealisedRoePcnt
}]'
# Single symbol detail
bitmex position list --symbol XBTUSD -o json 2>/dev/null | jq '.[0]'
# Last 100 trades
bitmex execution trade-history --reverse --count 100 -o json 2>/dev/null | \
jq '[.[] | {timestamp, symbol, side, lastPx, lastQty, commission, execType}]'
# Filter by symbol
bitmex execution trade-history --symbol XBTUSD --reverse --count 100 -o json 2>/dev/null | \
jq '[.[] | select(.execType == "Trade") | {timestamp, side, lastPx, lastQty}]'
# PnL summary from trade history
bitmex execution trade-history --reverse --count 500 -o json 2>/dev/null | \
jq '
{
total_trades: length,
total_volume: (map(.lastQty // 0) | add),
total_fees: (map(.commission // 0) | add),
realised_pnl: (map(.realisedPnl // 0) | add)
}
'
# All executions including funding, settlement, and trades
bitmex execution list --reverse --count 100 -o json 2>/dev/null | \
jq '[.[] | {timestamp, symbol, execType, side, lastPx, lastQty, commission}]'
# Funding payments received/paid
bitmex execution list --reverse --count 200 -o json 2>/dev/null | \
jq '[.[] | select(.execType == "Funding") | {timestamp, symbol, commission, realisedPnl}]'
bitmex account margin --currency XBt -o json 2>/dev/null | \
jq '{
marginBalance,
walletBalance,
unrealisedPnl,
realisedPnl,
availableMargin,
maintenanceMargin,
marginLeverage,
liquidationPrice: .grossLastValue
}'
Used for fee tier assessment:
bitmex account volume -o json 2>/dev/null | \
jq '.[0] | {advUsd, advUsdContract, advUsdSpot}'
# Returns object keyed by symbol; query a specific symbol:
bitmex account commission -o json 2>/dev/null | \
jq '.XBTUSD | {makerFee, takerFee, settlementFee}'
# All symbols:
bitmex account commission -o json 2>/dev/null | \
jq 'to_entries | map({symbol: .key, makerFee: .value.makerFee, takerFee: .value.takerFee, settlementFee: .value.settlementFee})'
# All wallet events (deposits, withdrawals, funding)
bitmex wallet history --currency XBt -o json 2>/dev/null | \
jq '[.[] | {timestamp, transactType, amount, fee, address}]'
# Deposits only
bitmex wallet history --currency XBt -o json 2>/dev/null | \
jq '[.[] | select(.transactType == "Deposit") | {timestamp, amount}]'
echo "=== Portfolio Snapshot ==="
bitmex account margin --currency XBt -o json 2>/dev/null | \
jq '"Balance: \(.marginBalance) sats | Unrealised PnL: \(.unrealisedPnl) sats"'
bitmex position list -o json 2>/dev/null | \
jq '"Positions: \([.[] | select(.isOpen == true)] | length)"'
bitmex order list --reverse -o json 2>/dev/null | \
jq '"Open orders: \([.[] | select(.ordStatus == "New" or .ordStatus == "PartiallyFilled")] | length)"'