mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-09 23:08:48 +00:00
Feature: stock market service and info widget (#3617)
--------- Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
parent
810c321881
commit
231e2408c3
14 changed files with 424 additions and 1 deletions
48
docs/widgets/info/stocks.md
Normal file
48
docs/widgets/info/stocks.md
Normal file
|
@ -0,0 +1,48 @@
|
|||
---
|
||||
title: Stocks
|
||||
description: Stocks Information Widget Configuration
|
||||
---
|
||||
|
||||
_(Find the Stocks service widget [here](../services/stocks.md))_
|
||||
|
||||
The Stocks Information Widget allows you to include basic stock market data in
|
||||
your Homepage header. The widget includes the current price of a stock, and the
|
||||
change in price for the day.
|
||||
|
||||
Finnhub.io is currently the only supported provider for the stocks widget.
|
||||
You can sign up for a free api key at [finnhub.io](https://finnhub.io).
|
||||
You are encouraged to read finnhub.io's
|
||||
[terms of service/privacy policy](https://finnhub.io/terms-of-service) before
|
||||
signing up. The documentation for the endpoint that is utilized can be viewed
|
||||
[here](https://finnhub.io/docs/api/quote).
|
||||
|
||||
You must set `finnhub` as a provider in your `settings.yaml` like below:
|
||||
|
||||
```yaml
|
||||
providers:
|
||||
finnhub: yourfinnhubapikeyhere
|
||||
```
|
||||
|
||||
Next, configure the stocks widget in your `widgets.yaml`:
|
||||
|
||||
The information widget allows for up to 8 items in the watchlist.
|
||||
|
||||
```yaml
|
||||
- stocks:
|
||||
provider: finnhub
|
||||
color: true # optional, defaults to true
|
||||
cache: 1 # optional, default caches results for 1 minute
|
||||
watchlist:
|
||||
- GME
|
||||
- AMC
|
||||
- NVDA
|
||||
- AMD
|
||||
- TSM
|
||||
- MSFT
|
||||
- AAPL
|
||||
- BRK.A
|
||||
```
|
||||
|
||||
The above configuration would result in something like this:
|
||||
|
||||

|
50
docs/widgets/services/stocks.md
Normal file
50
docs/widgets/services/stocks.md
Normal file
|
@ -0,0 +1,50 @@
|
|||
---
|
||||
title: Stocks
|
||||
description: Stocks Service Widget Configuration
|
||||
---
|
||||
|
||||
_(Find the Stocks information widget [here](../info/stocks.md))_
|
||||
|
||||
The widget includes:
|
||||
|
||||
- US stock market status
|
||||
- Current price of provided stock symbol
|
||||
- Change in price of stock symbol for the day.
|
||||
|
||||
Finnhub.io is currently the only supported provider for the stocks widget.
|
||||
You can sign up for a free api key at [finnhub.io](https://finnhub.io).
|
||||
You are encouraged to read finnhub.io's
|
||||
[terms of service/privacy policy](https://finnhub.io/terms-of-service) before
|
||||
signing up.
|
||||
|
||||
Allowed fields: no configurable fields for this widget.
|
||||
|
||||
You must set `finnhub` as a provider in your `settings.yaml`:
|
||||
|
||||
```yaml
|
||||
providers:
|
||||
finnhub: yourfinnhubapikeyhere
|
||||
```
|
||||
|
||||
Next, configure the stocks widget in your `services.yaml`:
|
||||
|
||||
The service widget allows for up to 28 items in the watchlist. You may get rate
|
||||
limited if using the information and service widgets together.
|
||||
|
||||
```yaml
|
||||
widget:
|
||||
type: stocks
|
||||
provider: finnhub
|
||||
showUSMarketStatus: true # optional, defaults to true
|
||||
watchlist:
|
||||
- GME
|
||||
- AMC
|
||||
- NVDA
|
||||
- TSM
|
||||
- BRK.A
|
||||
- TSLA
|
||||
- AAPL
|
||||
- MSFT
|
||||
- AMZN
|
||||
- BRK.B
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue