一键导入
bitmex-recipe-price-level-alerts
Set up price level alerts for key levels.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Set up price level alerts for key levels.
用 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-price-level-alerts |
| description | Set up price level alerts for key levels. |
Get notified when a symbol crosses a key price level. Three approaches: API-based alerts, polling, and WebSocket streaming.
BITMEX_API_KEY set for API alert registration.jq and bc installed.BitMEX can push notifications to your account when levels are hit:
# Alert when XBTUSD goes above 100000
bitmex notifications add-alert XBTUSD 100000 --above -o json \
| jq '{alertID, symbol, price, direction}'
# Alert when XBTUSD drops below 90000 (default direction is below; omit --above)
bitmex notifications add-alert XBTUSD 90000 -o json \
| jq '{alertID, symbol, price, direction}'
List active alerts:
bitmex notifications alerts -o json | jq '[.[] | {alertID, symbol, price, direction, triggered}]'
Simple and reliable; polls every 15 seconds:
SYMBOL=XBTUSD
ALERT_ABOVE=100000
ALERT_BELOW=90000
while true; do
PRICE=$(bitmex market instrument --symbol $SYMBOL -o json | jq '.[0].lastPrice')
TS=$(date -u +%H:%M:%S)
if (( $(echo "$PRICE > $ALERT_ABOVE" | bc -l) )); then
echo "$TS ALERT: $SYMBOL $PRICE crossed ABOVE $ALERT_ABOVE"
# Add notification hook here (e.g. curl to webhook, send SMS)
break
elif (( $(echo "$PRICE < $ALERT_BELOW" | bc -l) )); then
echo "$TS ALERT: $SYMBOL $PRICE crossed BELOW $ALERT_BELOW"
break
fi
sleep 15
done
Zero-poll, lowest latency:
bitmex ws instrument:XBTUSD \
| jq --argjson above 100000 --argjson below 90000 \
'select(.data != null) | .data[]
| select(.lastPrice != null)
| select(.lastPrice > $above or .lastPrice < $below)
| {symbol, lastPrice, timestamp}'
bitmex ws instrument:XBTUSD instrument:ETHUSD.