{"id":25880929,"url":"https://github.com/pgvalle/stonker","last_synced_at":"2026-05-07T01:03:54.635Z","repository":{"id":278828811,"uuid":"932970284","full_name":"pgvalle/Stonker","owner":"pgvalle","description":"A telegram bot that helps you monitoring your investments","archived":false,"fork":false,"pushed_at":"2025-04-15T16:54:07.000Z","size":239,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-15T17:40:40.772Z","etag":null,"topics":["bot","docker","javascript","jesus","nodejs","stock-monitor","stocks","telegram","telegram-bot"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pgvalle.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,"zenodo":null}},"created_at":"2025-02-14T21:32:20.000Z","updated_at":"2025-04-15T16:54:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"909ad37c-b907-41cf-b0b2-e029bb81e559","html_url":"https://github.com/pgvalle/Stonker","commit_stats":null,"previous_names":["pgvalle/stonkswatcher"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/pgvalle/Stonker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgvalle%2FStonker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgvalle%2FStonker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgvalle%2FStonker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgvalle%2FStonker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pgvalle","download_url":"https://codeload.github.com/pgvalle/Stonker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgvalle%2FStonker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276532587,"owners_count":25658982,"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","status":"online","status_checked_at":"2025-09-23T02:00:09.130Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["bot","docker","javascript","jesus","nodejs","stock-monitor","stocks","telegram","telegram-bot"],"created_at":"2025-03-02T14:30:00.934Z","updated_at":"2025-09-23T07:12:03.449Z","avatar_url":"https://github.com/pgvalle.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stonker\n\n# WARNING: The current state of this piece of software is unusable and this readme is outdated\n\nStonker is a Telegram bot that helps you track stock investments,\nnotifying you when stock prices change.\nNo more constantly checking prices—Stonker has you covered.\n\n\u003e **DISCLAIMER:** Invest at your own risk, even with Stonker at your service.\nI take no responsibility for any financial outcomes.\n\n---\n\n## Setting up and running\n\n### 1. Requirements\n\n- Node.js **18+** (Older versions may work but are untested.)\n\n### 2. Get Your Token\n\nYou need a Telegram bot token. Talk to [@BotFather](https://t.me/BotFather) to obtain one.\n\n### 3. Running the Bot\n\n#### Option 1: Without Docker\n\n```sh\ngit clone https://github.com/pgvalle/Stonker\ncd Stonker\nnpm install\nexport TELEGRAM_BOT_TOKEN='your_token_here'\nnode src/bot.js\n```\n\n#### Option 2: With Docker\n\n```sh\ngit clone https://github.com/pgvalle/Stonker\ncd Stonker\ndocker build -t stonker .\ndocker run -e TELEGRAM_BOT_TOKEN='your_token_here' -d stonker\n```\n\n## Commands\n\n**TODO:** document commands here.\n\u003c!-- - **/invest STOCK VALUE DIFF**\n  - Simulates stock investment.\n  - `VALUE` must be \u003e= 1.00.\n  - `DIFF` must be \u003e 0.00 (notification each time VALUE changes by DIFF).\n  - Reinvesting on the same stock overwrites the previous investment.\n  - Only 2 decimals are used (e.g. 0.001 -\u003e $0.00).\n  - Example:\n    ```\n    /invest AMD 1 0.01\n    /invest AMD 1.00 1  # Overwrites previous investment\n    ```\n\n- **/linvest [STOCK ...]**\n  - Lists your investments in specified stocks.\n  - If no arguments are provided, lists all investments.\n  - Example:\n    ```\n    /linvest\n    /linvest AMD TSLA NVDA\n    ```\n\n- **/dinvest [STOCK ...]**\n  - Deletes your investments in specified stocks.\n  - If no arguments are provided, deletes all investments.\n  - Example:\n    ```\n    /dinvest\n    /dinvest AMD TSLA NVDA\n    ```\n\n- **/stock [STOCK ...]**\n  - Lists specified stocks and their last known prices.\n  - If no arguments are provided, lists all tracked stocks.\n  - The bot just knows stocks that users have invested with /invest.\n  - Example:\n    ```\n    /stock\n    /stock AMD TSLA NVDA\n    ```\n\n- **/help [COMMAND ...]**\n  - Shows help for specified commands.\n  - If no arguments are provided, lists all commands.\n  - Example:\n    ```\n    /help\n    /help invest stock\n    ``` --\u003e\n\n## Motivation\n\nA realization hit me after playing a little bit with the stock market and talking to friends:\nEither you are extremely lucky, \nrivileged with relevant information or have time monitor stock prices every second.\nBut I bet you are none of those, just like me.\nSo here is Stonker to help you.\n\n## The Journey\n\nI was not familiar with stocks at all.\nWhen I was looking for a way to collect real-time stock data, I thought\n[gadicc/node-yahoo-finance2](https://github.com/gadicc/node-yahoo-finance2) was going to help me,\nbut it turned out not to be what I needed.\nAfter 2 days trying to make sense out of it,\nI found [gregtuc/StockSocket](https://github.com/gregtuc/StockSocket),\nwhich was exactly what I needed.\n\nAnother challenge was structuring the code.\nI started with everything in a single file, but after nearly a week,\nI finally managed to reorganize it.\nI struggled with design patterns and got frustrated at times,\nespecially due to my tendency to strive for symmetry and perfection,\nwhich lead to me hanging for hours just trying to make my code \"look good\".\n\nAfter a couple weeks of having a half-working release,\nI decided to simplify the project.\nInitially, I wanted Stonker to watch Stocks for multiple users independently.\nHowever, I decided to go for a single-user approach later,\nbecause this requirement was just complicating everything.\n\n## Technology Stack\n\n- **SQLite3** - I demanded persistence, and sqlite already does the heavylifting of data manipulation for you.\n- **NodeJS** - Using it would improve my portfolio.\n  Javascript is a big name and I have never played much with it before this project.\n- **[yagop/node-telegram-bot-api](https://github.com/yagop/node-telegram-bot-api)** - Initially, I considered WhatsApp,\n  because here in Brazil **EVERYONE** has a Whatsapp account.\n  But all the options I had required stuff like creating an account or having a spare phone number.\n  Telegram turned out to be a better option.\n- **[gregtuc/StockSocket](https://github.com/gregtuc/StockSocket)** - Provides real-time stock data updates via websockets.\n  It's archived, but it works.\n- **[Docker](https://www.docker.com/)** - A friend of mine suggested me to use docker.\n  I think it was a great idea.\n\n## Future Improvements\n\nIf you have suggestions or find bugs, feel free to contribute!\n\n## Meme\n\nJust for the sake of it.\n\n![Stonks](https://media.tenor.com/id8Pj5h70zgAAAAe/stonks.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgvalle%2Fstonker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpgvalle%2Fstonker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgvalle%2Fstonker/lists"}