{"id":13830427,"url":"https://github.com/balassy/MMM-SingleStock","last_synced_at":"2025-07-09T11:32:59.715Z","repository":{"id":42235311,"uuid":"139518870","full_name":"balassy/MMM-SingleStock","owner":"balassy","description":"MagicMirror module that displays the stock price of a single company.","archived":false,"fork":false,"pushed_at":"2024-03-11T04:09:38.000Z","size":184,"stargazers_count":8,"open_issues_count":7,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-20T03:02:43.365Z","etag":null,"topics":["javascipt","magicmirror2","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/balassy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2018-07-03T02:37:28.000Z","updated_at":"2024-11-14T09:44:28.000Z","dependencies_parsed_at":"2024-01-15T17:39:07.129Z","dependency_job_id":"78a9b5fe-3618-4d23-999f-39afe08f8af9","html_url":"https://github.com/balassy/MMM-SingleStock","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balassy%2FMMM-SingleStock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balassy%2FMMM-SingleStock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balassy%2FMMM-SingleStock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balassy%2FMMM-SingleStock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/balassy","download_url":"https://codeload.github.com/balassy/MMM-SingleStock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225539392,"owners_count":17485318,"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":["javascipt","magicmirror2","nodejs"],"created_at":"2024-08-04T10:00:59.805Z","updated_at":"2024-11-20T11:30:45.862Z","avatar_url":"https://github.com/balassy.png","language":"JavaScript","funding_links":[],"categories":["Finance"],"sub_categories":[],"readme":"# MMM-SingleStock\n\nThis is a module for the [MagicMirror²](https://github.com/MichMich/MagicMirror/) to display a single stock price without any fancy animation.\n\n## Features\n\nBy default this module displays the symbol and the current price of the configured stock:\n\n![Default](https://raw.githubusercontent.com/balassy/MMM-SingleStock/master/doc/screenshot-default.png)\n\nYou can configure the module to display the full name of the company instead of the stock symbol:\n\n![With full company name](https://raw.githubusercontent.com/balassy/MMM-SingleStock/master/doc/screenshot-companyname.png)\n\nIf you wish, you can completely remove the prefix, and display only the price value:\n\n![Without prefix](https://raw.githubusercontent.com/balassy/MMM-SingleStock/master/doc/screenshot-none.png)\n\nYou can even configure any custom prefix, for example a dollar sign:\n\n![With custom prefix](https://raw.githubusercontent.com/balassy/MMM-SingleStock/master/doc/screenshot-customprefix.png)\n\nThe second line of the module displays the change of the price which can be hidden if you prefer:\n\n![Without second line](https://raw.githubusercontent.com/balassy/MMM-SingleStock/master/doc/screenshot-nochange.png)\n\nYou can also configure the module to display a percent change in the price:\n\n![Percent Change](doc/screenshot-percentchange.png)\n\nFinally, this module also supports a smaller view as well as colorizing the percentage change and highlight the stock value:\n\n![Minimal](doc/screenshot-minimizedcolorized.png)\n\nThis module is capable to display only a single stock price. If you would like to see the price of more stocks on your mirror, add this module multiple times.\n\nFor updates, please check the [CHANGELOG](https://github.com/balassy/MMM-SingleStock/blob/master/CHANGELOG.md).\n\n## Using the module\n\nTo use this module follow these steps:\n\n1. Clone this repository to the `modules` folder of your MagicMirror:\n\n```bash\ngit clone https://github.com/balassy/MMM-SingleStock.git\n```\n\n2. Add the following configuration block to the modules array in the `config/config.js` file:\n\n```js\nvar config = {\n  modules: [\n    {\n      module: 'MMM-SingleStock',\n      position: 'top_right',\n      config: {\n        stockSymbol: 'GOOG',\n        apiToken: 'YOUR_TOKEN',  // Unique, private API key obtained from https://iexcloud.io/console/tokens\n        updateInterval: 3600000, // 1 hour in milliseconds\n        showChange: true,        // false | true\n        changeType: '',          // 'percent' | ''\n        label: 'symbol',         // 'symbol' | 'companyName' | 'none' | any string\n        colorized: false,        // false | true\n        minimal: false           // false | true\n      }\n    }\n  ]\n}\n```\n\n## Configuration options\n\n| Option           | Description\n|----------------- |-----------\n| `stockSymbol`    | **REQUIRED** The symbol of the stock of what the value should be displayed in this module. \u003cbr\u003e\u003cbr\u003e **Type:** `string` \u003cbr\u003e**Default value:** `GOOG`\n| `apiToken`       | **REQUIRED** Your unique, private API key for the IEX Cloud you can obtain from https://iexcloud.io/console/tokens. \u003cbr\u003e\u003cbr\u003e **Type:** `string` \u003cbr\u003e**Default value:** `\"\"` (empty string)\n| `updateInterval` | *Optional* The frequency of when the module should query the current price of the stock. \u003cbr\u003e\u003cbr\u003e**Type:** `int` (milliseconds) \u003cbr\u003e**Default value:** `3600000` milliseconds (1 hour)\n| `showChange`     | *Optional* Determines whether the price difference should be also displayed. \u003cbr\u003e\u003cbr\u003e**Type:** `boolean` \u003cbr\u003e**Default value:** `true` (yes, the price difference is displayed)\n|`changeType`      | *Optional* Allows stock change to be shown as the raw value or as a percent.\u003cbr\u003e\u003cbr\u003e**Type:** `string` \u003cbr\u003e**Default Value**: `\"\"` (empty string)\u003cbr\u003e**Possible values:** \u003cbr\u003e`percent`: Show the change as a percent rather than the raw value.\n| `label`          | *Optional* Determines what prefix should be prepended to the price. \u003cbr\u003e\u003cbr\u003e**Type:** `string` \u003cbr\u003e**Possible values:** \u003cbr\u003e`symbol`: The acronym of the stock (e.g. `GOOG`) is displayed before the price.\u003cbr\u003e`companyName`: The full name of the company (e.g. `Alphabet Inc.`) is displayed before the price.\u003cbr\u003e`none`: Nothing is displayed before the price, only the price is shown.\u003cbr\u003eAny other string is displayed as is, e.g. set `$` to display a dollar sign before the price number.\u003cbr\u003e**Default value:** `symbol` (the acronym of the stock is displayed before the price)\n| `colorized`      | *Optional* Determines whether the price difference should be displayed in red (negative) or green (positive) as well as highlight the current price. \u003cbr\u003e\u003cbr\u003e**Type:** `boolean` \u003cbr\u003e**Default value:** `false` (no color highlight)\n| `minimal`        | *Optional* Determines whether the module should reduce the font size for a more compact display. \u003cbr\u003e\u003cbr\u003e**Type:** `boolean` \u003cbr\u003e**Default value:** `false` (regular font size)\n\n## How it works\n\nThis module periodically sends requests from the browser window of the MagicMirror Electron application to the [IEX Cloud Service](https://iextrading.com/developer/). The IEX Cloud API has [multiple tiers](https://iexcloud.io/pricing/) including a free tier which is suitable for this module. However to access the API you need a unique, private API Token.\n\nYou can sign up to IEX Cloud by visiting this URL: https://iexcloud.io/cloud-login#/register/\n\n## Localization\n\nCurrently this module supports English (`en`) and Hungarian (`hu`) languages. The language can be specified in the global `language` setting in the `config.js` file.\n\nWant to see more languages? Please contribute!\n\n## Contribution\n\nAlthough for operation this module does not depend on any other module, if you would like to contribute to the codebase, please use the preconfigured linters to analyze the source code before sending a pull request. To run the linters follow these steps:\n\n1. Install developer dependencies:\n\n```bash\nnpm install\n```\n\n2. Run all linters:\n\n```bash\nnpm run lint\n```\n\n## Got feedback?\n\nYour feedback is more than welcome, please send your suggestions, feature requests or bug reports as [Github issues](https://github.com/balassy/MMM-SingleStock/issues).\n\n## Acknowledments\n\nMany thanks to [Michael Teeuw](https://github.com/MichMich) for creating and maintaining the [MagicMirror²](https://github.com/MichMich/MagicMirror/) project fully open source.\n\nThanks to [alexyak](https://github.com/alexyak) for calling my attention to the IEX API.\n\nThanks to [Rodrigo Ramírez Norambuena](https://github.com/roramirez) for creating the [MagicMirror-Module-Template](https://github.com/roramirez/MagicMirror-Module-Template).\n\n\n## About the author\n\nThis project is created and maintaned by [György Balássy](https://www.linkedin.com/in/balassy).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbalassy%2FMMM-SingleStock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbalassy%2FMMM-SingleStock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbalassy%2FMMM-SingleStock/lists"}