ワンクリックで
bitmex-recipe-subaccount-capital-rotation
Rotate capital between subaccounts based on strategy performance.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Rotate capital between subaccounts based on strategy performance.
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-recipe-subaccount-capital-rotation |
| description | Rotate capital between subaccounts based on strategy performance. |
Evaluate performance across multiple BitMEX subaccounts and transfer capital from underperforming strategies to outperforming ones.
BITMEX_API_KEY and BITMEX_API_SECRET set (master account credentials).jq and bc installed.bitmex subaccount transfer-accounts -o json \
| jq '[.[] | {id, username, entitlementRoleName}]'
Note the id for each subaccount you want to evaluate.
Use each subaccount's own API credentials, or query from the master account if permitted:
# wallet balance returns {amount, currency, ...}; use account margin for walletBalance/availableMargin
bitmex wallet balance --currency XBt -o json 2>/dev/null | jq '{currency, amount}'
bitmex account margin --currency XBt -o json 2>/dev/null | jq '{walletBalance, availableMargin, marginBalance}'
Record balances across accounts for comparison.
Pull 30-day trade history for each account:
bitmex execution trade-history --reverse --count 500 -o json \
| jq '
(map(.realisedPnl // 0) | add) as $total_pnl |
(map(.commission // 0) | add) as $total_fees |
{totalPnl: $total_pnl, totalFees: $total_fees, netPnl: ($total_pnl - $total_fees)}
'
Rank accounts by netPnl.
# Example: rotate 20% of an underperformer's balance to the top performer
SOURCE_BALANCE=50000000 # satoshis
ROTATION_AMOUNT=$(echo "scale=0; $SOURCE_BALANCE * 0.20 / 1" | bc)
echo "Rotating $ROTATION_AMOUNT XBt"
bitmex wallet transfer \
--currency XBt \
--amount $ROTATION_AMOUNT \
--to-user-id <target_subaccount_user_id> \
--yes -o json \
| jq '{transferID, amount, currency, status}'
bitmex account margin --currency XBt -o json 2>/dev/null | jq '{walletBalance, availableMargin}'
bitmex wallet history --currency XBt --count 5 -o json 2>/dev/null \
| jq '[.[] | {timestamp, amount, transactType}]'