{"id":19287973,"url":"https://github.com/pedrosfaria2/flask_binance","last_synced_at":"2026-04-07T20:32:35.410Z","repository":{"id":250075804,"uuid":"832921409","full_name":"pedrosfaria2/flask_binance","owner":"pedrosfaria2","description":"A web app to collect and analyse market data","archived":false,"fork":false,"pushed_at":"2024-07-27T01:41:27.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-23T23:28:22.460Z","etag":null,"topics":["css","docker","flask","html","html5","javascript","market-data","pytest","python","python3","rabbitmq","rest-api","sql","websocket","websocket-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pedrosfaria2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-24T02:17:00.000Z","updated_at":"2024-07-27T19:54:41.000Z","dependencies_parsed_at":"2025-01-05T19:22:16.322Z","dependency_job_id":"50239918-65c4-4b5b-bd01-86e6f8f83c89","html_url":"https://github.com/pedrosfaria2/flask_binance","commit_stats":null,"previous_names":["pedrosfaria2/flask_binance"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pedrosfaria2/flask_binance","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrosfaria2%2Fflask_binance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrosfaria2%2Fflask_binance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrosfaria2%2Fflask_binance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrosfaria2%2Fflask_binance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pedrosfaria2","download_url":"https://codeload.github.com/pedrosfaria2/flask_binance/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrosfaria2%2Fflask_binance/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31528452,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["css","docker","flask","html","html5","javascript","market-data","pytest","python","python3","rabbitmq","rest-api","sql","websocket","websocket-api"],"created_at":"2024-11-09T22:07:43.400Z","updated_at":"2026-04-07T20:32:35.392Z","avatar_url":"https://github.com/pedrosfaria2.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Binance WebSocket Market Data\n\nThis project is a web application that uses WebSockets to receive real-time market data from Binance and detects price anomalies. The application is built with Flask on the backend and uses Socket.IO for real-time communication with the frontend.\n\n## Features\n\n- Connects to Binance WebSocket API to receive real-time market data.\n- Detects price anomalies using a Z-Score algorithm.\n- Publishes price anomaly alerts to a RabbitMQ queue.\n- Web interface to view market data and alerts in real-time.\n\n## Installation\n\n### Prerequisites\n\n- Python 3.8 or higher\n- RabbitMQ\n- Docker\n\n### Steps to Install\n\n1. Clone the repository:\n\n    ```bash\n    git clone https://github.com/pedrosfaria2/flask_binance.git\n    cd flask_binance\n    ```\n\n2. Create a virtual environment and activate it:\n\n    ```bash\n    python -m venv .venv\n    source .venv/bin/activate  # For Linux/MacOS\n    .\\.venv\\Scripts\\activate  # For Windows\n    ```\n\n3. Install the dependencies:\n\n    ```bash\n    pip install -r requirements.txt\n    ```\n\n## Usage\n\n1. Start RabbitMQ using Docker:\n\n    ```bash\n    docker-compose up --build\n    ```\n\n2. Start the backend server:\n\n    ```bash\n    python run.py\n    ```\n\n3. Open your web browser and go to [http://localhost:5000](http://localhost:5000).\n\n4. Click \"Start WebSocket\".\n\n5. Subscribe to any symbols you are interested in.\n\n6. Start the price anomaly worker:\n\n    ```bash\n    python -m price_anomaly_worker.run_worker\n    ```\n   \nNote: The anomaly detection algorithm is configured with a 1-second interval so that alerts can be seen more frequently to experiment with the app. Feel free to adjust it as needed.\n\n7. Enjoy the real-time market data and alerts!\n\n## Tests\n\n- The project includes a comprehensive suite of unit tests.\n- To run the tests, simply execute:\n\n    ```bash\n    pytest\n    ```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpedrosfaria2%2Fflask_binance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpedrosfaria2%2Fflask_binance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpedrosfaria2%2Fflask_binance/lists"}