{"id":18016458,"url":"https://github.com/nikhil25803/stockpriceapi","last_synced_at":"2026-04-16T08:36:46.662Z","repository":{"id":218601500,"uuid":"746560083","full_name":"nikhil25803/StockPriceAPI","owner":"nikhil25803","description":"An application to access and manage data from the Bombay Stock Exchange (BSE).","archived":false,"fork":false,"pushed_at":"2024-01-22T19:55:26.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T01:18:27.354Z","etag":null,"topics":["caching","fastapi","mongodb","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nikhil25803.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-01-22T08:55:52.000Z","updated_at":"2024-02-09T10:15:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"e076bda8-73e7-4019-82be-5961282cc723","html_url":"https://github.com/nikhil25803/StockPriceAPI","commit_stats":null,"previous_names":["nikhil25803/stockpriceapi"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikhil25803%2FStockPriceAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikhil25803%2FStockPriceAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikhil25803%2FStockPriceAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikhil25803%2FStockPriceAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nikhil25803","download_url":"https://codeload.github.com/nikhil25803/StockPriceAPI/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247201261,"owners_count":20900574,"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":["caching","fastapi","mongodb","python3"],"created_at":"2024-10-30T04:18:07.419Z","updated_at":"2026-04-16T08:36:46.613Z","avatar_url":"https://github.com/nikhil25803.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# StockPriceAPI\n\nAPI for an application to access and manage data from the Bombay Stock Exchange (BSE). Based on the data released by Equity Bhavcopy [Link](https://www.bseindia.com/markets/MarketInfo/BhavCopy.aspx)\n\n### Project Structure\n\n```md\nStockPriceAPI\n├── 📄 LICENSE\n├── 📄 README.md\n├── 📄 .gitignore\n├── 📄 .env\n├── 📄 .requirements.txt\n├── 📄 .dev-requirements.txt\n└── 📂 api/\n│ └──── 📂 db/\n│ └──── 📂 models/\n│ └──── 📂 routes/\n│ └──── 📄 main.py\n└── 📂 preprocessing/\n│ └──── 📂 scrape_up/\n│ │ ├──── 📄 script.py\n```\n\n### Project Setup\n\n- Clone the repository\n\n```bash\ngit clone https://github.com/nikhil25803/StockPriceAPI\n```\n\n```bash\ncd StockPriceAPI\n```\n\n- Virtual Environment Setup\n\n```bash\npython -m venv env\n```\n\n- Download Requirements\n\n```bash\npip install -r dev-requirements.txt\n```\n\n- Environment Variables Requirements\n\n```.env\nMONGO_URI=...\n```\n\n### Data Preprocessing\n\n- Extract and read the CSV file in the ZIP.\n- Store the data in MongoDB.\n- Script with command line argument to extract and load stock data of any date.\n- Added support to fetch the last 50 days' data.\n\n#### Run script to extract and load stock data.\n\n```bash\npython preprocessing/script.py --help\n```\n\nResponse:\n\n```bash\nusage: script.py [-h] [--date DATE] [--last50Days LAST50DAYS]\n\nDownload and load Bombay Stock Exchange data in the database\n\noptions:\n  -h, --help            show this help message and exit\n  --date DATE           Download Equity Bhavcopy data of a particular date Format: dd-mm-yyy. Eg. 09/01/2024\n  --last50Days LAST50DAYS\n                        Load the last 50 days' data.\n```\n\nExample: Load data of date 20/01/2023\n\n```bash\npython preprocessing/script.py --date 20/01/2023\n```\n\nThis will download Equity Bhavcopy data and load it into the MongoDB database.\n\n### API\n\nStart the server:\n\n```bash\nuvicorn api.main:app --reload\n```\n\n\u003e You can listen to the server on `http://127.0.0.1:8000/`\n\nAccess the endpoints through UI by OpenAPI on `/docs` path.\n\n#### Endpoint Summary\n\n- A GET route for the top 10 stocks.\n- A GET route to find stocks by name.\n- A GET router to get a stock price history list for the UI graph.\n- A POST route to add a stock to favorites.\n- A GET route to see favorite stocks.\n- A DELETE route to remove a stock from favorites\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikhil25803%2Fstockpriceapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikhil25803%2Fstockpriceapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikhil25803%2Fstockpriceapi/lists"}