Add WebSocket streaming, mocked tests, and exchange metadata support#3
Draft
Add WebSocket streaming, mocked tests, and exchange metadata support#3
Conversation
- Added tests/test_live_data_mocked.py with comprehensive mocked tests for CI - Added src/app/api/v1/ws_live_data.py for WebSocket streaming endpoint - Updated ExchangeClient to provide get_meta_info() method - Updated market_data service to include exchange metadata in response - All tests passing, linting and type checking successful Co-authored-by: Nfectious <19631929+Nfectious@users.noreply.github.com>
- Flatten nested conditionals in get_meta_info() for better readability - Add clarifying comment about TimeoutError in WebSocket endpoint - Improve comment in NaN handling test for clarity
Copilot
AI
changed the title
[WIP] Add complete FastAPI service for OHLCV candles and indicators
Add WebSocket streaming, mocked tests, and exchange metadata support
Feb 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds missing components to the FastAPI crypto data service: deterministic mocked tests for CI, real-time WebSocket streaming, and exchange metadata in API responses.
Changes
WebSocket Streaming (
src/app/api/v1/ws_live_data.py)/api/v1/live_data/wsendpoint for real-time data streamingMocked Tests (
tests/test_live_data_mocked.py)ExchangeClient.fetch_ohlcvExchange Metadata
ExchangeClient.get_meta_info()exposes exchange configurationmetafield now includesdefault_type(spot/future/etc.)process_ohlcv_datasignature to accept metadataCode Quality
get_meta_info()Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
api.binance.com/home/REDACTED/.local/bin/pytest pytest -v(dns block)/home/REDACTED/.local/bin/uvicorn uvicorn app.main:app --host 0.0.0.0 --port 8000(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
This pull request was created from Copilot chat.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.