--- name: bybit-structure description: Summarize short-term price structure for a single Bybit USDT perpetual — trend vs range, recent swing high/low, VWAP, ATR. Use after bybit-scan picks a candidate, or whenever the user asks "what's the structure on X / is X trending / where are the levels on X". Read-only, no API keys. --- # bybit-structure Given a symbol, fetches the last ~2h of 1-minute candles and summarizes the local structure so you can tell whether a vol spike has room to run or is about to reverse into chop. ## When to use - Follow-up after `bybit-scan` returns candidates - "Is BTCUSDT trending or ranging?" - "Where's the swing high on ETHUSDT?" ## How to run ``` python bybit-structure/structure.py SYMBOL [--lookback MINUTES] [--json] ``` Example: `python bybit-structure/structure.py SOLUSDT` Default lookback: 120 minutes of 1m candles. ## Output - `last`, `vwap`, distance from VWAP (%) - 60m swing high/low + distance from each (%) - full-lookback swing high/low + distance from each (%) - ATR(14) on 1m, in absolute and % - Trend classification: `up` / `down` / `range` based on linear-regression slope on 60m closes vs ATR ## Notes - Source: Bybit v5 public REST (`/v5/market/kline`). - Heuristic, not a signal. Use alongside your own eyes on a chart.