一键导入
crypto-websocket-bars
Use Alpaca CryptoDataStream websocket for real-time crypto bars in live trading (OHLC only, volume excluded)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use Alpaca CryptoDataStream websocket for real-time crypto bars in live trading (OHLC only, volume excluded)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | crypto-websocket-bars |
| description | Use Alpaca CryptoDataStream websocket for real-time crypto bars in live trading (OHLC only, volume excluded) |
| version | 5.4.0 |
| status | success |
| date | "2026-03-27T00:00:00.000Z" |
| triggers | ["crypto websocket","real-time crypto bars","live crypto data","streaming crypto"] |
Live trader polled Alpaca REST API every 15 seconds for crypto bar updates. The MarketDataStream websocket was initialized but never queried — the stream data was wasted.
Wire MarketDataStream.get_latest_bar() into update_bars() for crypto symbols. Append real-time websocket bars with volume=0 (Alpaca crypto volume is platform-only, not global exchange volume).
Alpaca CryptoDataStream (websocket, background thread)
↓ _handle_bar() stores under both BTC/USD and BTCUSD keys
↓
update_bars(fetcher, symbol, current, market_stream=stream)
├─ REST fetch (always, for initial load + bulk history)
└─ Stream bar append (crypto only, if newer than last REST bar)
└─ volume=0 (exclude Alpaca platform volume)
_crypto_symbol_variants(symbol): Returns both ['BTC/USD', 'BTCUSD'] formssubscribe_bars(): Normalizes BTC/USD → BTCUSD for Alpaca API_handle_bar(): Stores bar under both key formatsget_latest_bar(): Tries both formats for lookupAlpaca crypto volume is platform-only ($250k-$750k/day BTC) vs global exchange volume ($30B). Using it would corrupt volume-based features. Setting to 0 ensures no downstream code uses unreliable volume.
| File | Change |
|---|---|
scripts/live_trader.py | update_bars() accepts market_stream, appends crypto stream bars with volume=0 |
alpaca_trading/data/stream.py | _crypto_symbol_variants(), dual-key storage, subscribe normalization |
enable_flag: --use-websocket 1
volume_for_stream_bars: 0.0 # Always zero for crypto
crypto_detection: detect_asset_type(symbol) == AssetType.CRYPTO
backwards_compatible: true # market_stream=None preserves existing behavior
BTC/USD vs BTCUSD)Normalize long-form CODEX cycle folders to short form before notebooks run. Trigger: cyc001_reg001_*, hard-coded cyc paths breaking, staged CODEX raw data failing in Notebooks 1/2.
v5.6.0 joint multi-TF model: single model per symbol with broadcast 1Hour context replaces dual 15Min/1Hour models. Trigger: (1) replacing weighted-voting model aggregation, (2) adding broadcast features to vectorized env, (3) limited training data + worried about overfitting from doubling obs_dim, (4) backtest builder mismatch with newer feature counts.
DEPRECATED in v5.6.0 — see joint-multi-tf-v560 skill. Documents the v5.2.0 dual-model approach (train separate 15Min/1Hour models, combine via weighted voting). Still relevant for: (1) loading legacy v5.5.0 dual models, (2) understanding the historical aggregation layer, (3) resampling pattern via origin='start'.
Surface a shipped-but-undocumented CLI feature in user-facing docs. Trigger: user reports a known feature missing from README/readthedocs even though the CLI command exists.
KINTSUGI Snakefile + CLI changes that route SLURM jobs around accounts saturated by OTHER users on the same QOS pool. Trigger: QOSGrpMemLimit, jobs stuck pending despite available GPU slots in config, noisy neighbor on shared QOS, multi-user investment pool exhaustion, _build_cycle_assignment static-vs-live.
KINTSUGI SLURM batch processing: Maximize throughput using multi-account resource calculation with GPU+CPU pools per account. Trigger: SLURM job submission, batch processing, resource maximization, GPU+CPU concurrent, headless processing, resource pool.