piker/ai/prompt-io/opencode/20260826T222600Z_5f631e19_p...

2.1 KiB
Raw Blame History

Prompt

The user reported that selecting NVDAUSDT.USDTM.PERP.BINANCE connected Binances USD-M websocket but never loaded the feed or downstream chart. They asked OpenCode to compare Binances API changelog with pikers FQME and feed code, diagnose the failure, and solve it.

The user clarified that future provider failures must raise loudly instead of silently blocking feed and chart startup. They also confirmed the same hang from piker -l info --pdb chart nvdausdt.usdtm.perp.binance.

Generated code

git diff HEAD~1..HEAD -- piker/brokers/binance/feed.py

Routes USD-M book-ticker and aggregate-trade data through Binances new /public and /market websocket paths, merges both sockets into the existing quote stream, accepts the new st aggregate-trade field, and requires both stream classes before declaring startup complete. It also removes the misleading missing-provider warning, derives feed mode from resolved pair metadata, and raises DataUnavailable for connection or live-data startup timeouts.

git diff HEAD~1..HEAD -- piker/brokers/binance/venues.py

Defines Binances current public and market USD-M websocket endpoints and makes the market endpoint the regular futures websocket API root.

git diff HEAD~1..HEAD -- piker/data/_web_bs.py

Adds an optional connection deadline to open_autorecon_ws() so callers can fail context entry when repeated websocket handshakes never become connected.

git diff HEAD~1..HEAD -- tests/test_binance.py

Adds regressions for exact Binance stream routing, silent live-data startup, silent websocket connection startup, and the current USD-M aggregate-trade payload schema.

Verification output

pytest -q tests/test_binance.py passes all four tests. Compile checks, focused Ruff fatal-error checks, and git diff --check pass. Live probes through pikers merged stream received both required stream classes and returned normalized trade quotes for NVDAUSDT USD-M and BTCUSDT spot.