{"id":22553123,"url":"https://github.com/leohonlmc/go_stock_tracker","last_synced_at":"2025-03-28T10:24:32.508Z","repository":{"id":210772199,"uuid":"726707619","full_name":"leohonlmc/go_stock_tracker","owner":"leohonlmc","description":"Go Stock Tracker","archived":false,"fork":false,"pushed_at":"2023-12-16T05:27:51.000Z","size":144,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T23:46:36.017Z","etag":null,"topics":["golang","stock-market","tracker","websocket"],"latest_commit_sha":null,"homepage":"","language":"Go","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/leohonlmc.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}},"created_at":"2023-12-03T06:17:50.000Z","updated_at":"2024-09-23T21:10:23.000Z","dependencies_parsed_at":"2023-12-16T06:49:25.151Z","dependency_job_id":null,"html_url":"https://github.com/leohonlmc/go_stock_tracker","commit_stats":null,"previous_names":["leohonlmc/go_stock_tracker"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leohonlmc%2Fgo_stock_tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leohonlmc%2Fgo_stock_tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leohonlmc%2Fgo_stock_tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leohonlmc%2Fgo_stock_tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leohonlmc","download_url":"https://codeload.github.com/leohonlmc/go_stock_tracker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246010390,"owners_count":20709107,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["golang","stock-market","tracker","websocket"],"created_at":"2024-12-07T18:08:36.918Z","updated_at":"2025-03-28T10:24:32.479Z","avatar_url":"https://github.com/leohonlmc.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go Stock Tracker\n\n\u003cp\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Go-00ADD8?style=for-the-badge\u0026logo=go\u0026logoColor=white\" height=\"25\"/\u003e\n\u003c/p\u003e\n\n\u003cp\u003e\n  \u003cimg src=\"./go.png\" alt=\"Go Logo\" width=\"250\" align=\"right\"/\u003e\n  \u003cb\u003eProject Overview\u003c/b\u003e\u003cbr\u003e\n  `Go Stock Tracker` is a Go-based application designed to track and display stock market data in real-time. Utilizing the Gin web framework for routing and WebSocket for real-time communication, this application fetches stock data from an external API and presents updated information at regular intervals.\n\u003c/p\u003e\n\n### Features\n\n- Real-time stock data tracking through WebSocket.\n- Efficient web routing using Gin framework.\n- Periodic updates of stock data at configurable intervals.\n- Fetches data from external stock market APIs.\n- Scalable architecture suitable for expanding to multiple stock symbols.\n\n## Getting Started\n\n### Prerequisites\n\n- Go (1.x or later)\n- External API key for stock data (e.g., Alpha Vantage)\n- Git\n\n### Installation\n\n1. **Clone the Repository**\n   ```bash\n   git clone https://github.com/your-username/go-stock-tracker.git\n   ```\n   API_KEY=\u003cYour_Alpha_Vantage_API_Key\u003e\n\ngo run app.go\n\n## Testing WebSocket Endpoint with Postman\n\nPostman allows you to test WebSocket connections and send messages. Here's how you can test the `/ws` WebSocket endpoint:\n\n1. **Open Postman**\n\n2. **Create a New WebSocket Request**\n\n   - Click on the `New` button.\n   - Select `WebSocket Request`.\n\n3. **Configure the WebSocket URL**\n\n   - Enter the WebSocket URL in the format: `ws://localhost:8080/ws` (adjust the domain and port as per your server configuration).\n\n4. **Connect to the WebSocket**\n\n   - Click `Connect` to establish a WebSocket connection.\n\n5. **Send a Message**\n\n   - To request stock data, send a JSON message in the following format:\n     ```json\n     {\n       \"action\": \"getStock\",\n       \"ticker\": \"YOUR_STOCK_TICKER\"\n     }\n     ```\n   - Replace `YOUR_STOCK_TICKER` with the desired stock symbol (e.g., `IBM` or `AAPL`).\n\n6. **Receive Updates**\n\n   - After sending the message, you should receive periodic updates with the latest stock data.\n   - The updates will appear in the `Messages` section of Postman.\n\n7. **Close the Connection**\n   - Once done, you can close the WebSocket connection by clicking the `Disconnect` button.\n\nNote: Ensure your Go Stock Tracker application is running before testing with Postman.\n\nNote:\n\n- I have removed the sections commented out with `\u003c!-- --\u003e` as they might be related to features not currently implemented.\n- The WebSocket section is now more focused on the real-time aspect of your application.\n- Remember to replace `https://github.com/your-username/go-stock-tracker.git` with your actual repository URL.\n- Ensure that the `.env` file and your API key are appropriately configured as per your project setup.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleohonlmc%2Fgo_stock_tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleohonlmc%2Fgo_stock_tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleohonlmc%2Fgo_stock_tracker/lists"}