{"id":21915168,"url":"https://github.com/ethanlee928/financebot","last_synced_at":"2026-05-19T06:06:56.857Z","repository":{"id":115457341,"uuid":"586565860","full_name":"ethanlee928/FinanceBot","owner":"ethanlee928","description":"a simple slack bot to monitor financial market","archived":false,"fork":false,"pushed_at":"2023-07-29T17:40:28.000Z","size":1933,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-22T09:26:52.323Z","etag":null,"topics":["bot","finance","slack-bot","slackbot"],"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/ethanlee928.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":"2023-01-08T15:37:33.000Z","updated_at":"2024-08-17T04:18:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"e1ff833b-17c6-4510-88c6-fec8c0b79c84","html_url":"https://github.com/ethanlee928/FinanceBot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ethanlee928/FinanceBot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethanlee928%2FFinanceBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethanlee928%2FFinanceBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethanlee928%2FFinanceBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethanlee928%2FFinanceBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ethanlee928","download_url":"https://codeload.github.com/ethanlee928/FinanceBot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethanlee928%2FFinanceBot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33204126,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T09:27:30.708Z","status":"online","status_checked_at":"2026-05-19T02:00:06.763Z","response_time":58,"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","finance","slack-bot","slackbot"],"created_at":"2024-11-28T19:09:18.698Z","updated_at":"2026-05-19T06:06:56.847Z","avatar_url":"https://github.com/ethanlee928.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Finance Bot\n\nA simple bot utilising Polygon API, Slack API, and MQTT to monitor the financial market, including stocks, forex, options, and crypto\n\n## 1. Prerequisites\n\nEnvironments variables required for this repository, please create a `.env` file in root directory, it will be loaded into the docker containers by `docker-compose`.\n\n`.env`:\n\n```bash\nPOLYGON_API_KEY=\nSLACK_BOT_TOKEN= #Bot User OAuth Token\nSLACK_SOCKET_TOKEN=\n\n# ----- BROKER CONFIG -----\nBROKER_HOST=mosquitto\nBROKER_PORT=1883\nBROKER_USERNAME=\nBROKER_PASSWORD=\n```\n\n### 1.1 Creating Polygon Account \u0026 API Key\n\n[polygon.io](https://polygon.io)\n\n- Creating an account is free of charge.\n- There's a basic plan for API that is free of charge, which is sufficient for this project.\n\n### 1.2 Creating Slack App\n\n- Create a slack account\n- [Create Slack App](https://api.slack.com/apps)\n- Create an app \"From an app manifest\":\n  ![Illustration](./screenshots/create_slack_app.png)\n- Select the workspace you would like your bot to exists in.\n- Copy the `app_manifest.yml` from this repository when entering app manifest.\n- Click `Create`, and install the app to your workspace.\n\n### 1.3 Tokens\n\nTo access the channel messages and send out messages from our program, we will need the tokens of the bot.\n\n#### Socket Tokens\n\n1. Click into the App you just created --\u003e `Basic Information` --\u003e Scroll and look for `App-Level Token`\n2. Click on `Generate Token and Scope` --\u003e give a token name --\u003e click on `Add Scope` and select `connections:write` --\u003e `Generate`.\n3. Click on the newly created token --\u003e Copy the token and paste it in `.env` under `SLACK_SOCKET_TOKEN`.\n\n#### Bot User Token\n\n1. Click on `OAth \u0026 Permission`.\n2. Copy `Bot User OAuth Token` and paste it in `.env` under `SLACK_BOT_TOKEN`.\n\n## 2. How to Start\n\n### 2.1 Development mode\n\n```bash\n# Build docker image if Dockerfile changed\nmake mode=dev build\n\nmake mode=dev start\n\n# Enter the containers to develop, e.g., slackbot container\ndocker exec -it financebot-slackbot bash\n\n# Clean up\nmake mode=dev clean\n```\n\n### 2.2 Production mode\n\n```bash\n# Build docker image if Dockerfile changed\nmake mode=prod build\n\nmake mode=prod start\n\n# Clean up\nmake mode=prod clean\n```\n\n## 3. Illustrations\n\nAvailable commands:\n\n1. `help`: replies a message on how to use it.\n2. `ping`: replies the server status.\n3. `chart`: plots candle sticks charts for the specified type of security and duration.\n   - Example: `chart C:JPYHKD 1 day 2022-12-01`\n   - This will return the candle sticks chart of `JPY/HKD` pair from `2022-12-01` to present.\n   - Prefix for different types of equities.\n     | **Types** | **Prefix** | **Examples** |\n     |-----------|------------|----------------------|\n     | Stocks | - | AAPL |\n     | Options | O: | O:SPY251219C00650000 |\n     | Indices | I: | I:NDX |\n     | Forex | C: | C:EURUSD |\n     | Crypto | X: | X:BTCUSD |\n\n![Illustration](./screenshots/illustration.png)\n**Remarks**: all commands are case **insensitive**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethanlee928%2Ffinancebot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fethanlee928%2Ffinancebot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethanlee928%2Ffinancebot/lists"}