Files
homarr/apps/docs/docs/widgets/stock-price/index.mdx
T

66 lines
2.0 KiB
Plaintext

---
title: "Stock Price"
description: "Displays the current stock price of a company."
hide_title: true
---
import { WidgetInteractionGuide } from "@site/src/components/widgets/interactions";
import { AddingWidget } from "@site/src/components/widgets/adding";
import { WidgetConfig } from "@site/src/components/widgets/configuration";
import { WidgetHeader } from "@site/src/components/widgets/header";
import { stockPriceWidget } from ".";
<WidgetHeader widget={stockPriceWidget} categories={["Finance", "Market"]} />
Using the Stocks widget, you can show the current stock prices of your favorite companies on your dashboard.
The compact view prioritizes the symbol, current price, and trend. Company name, change, and time range appear only when both the widget width and height can support them; the advanced view always shows the complete summary.
### Screenshots
import apple from "./img/apple.png";
import google from "./img/google.png";
import ethereum from "./img/ethereum.png";
import nvidia from "./img/nvidia.png";
<div className="flex gap-1">
<div className="flex flex-col gap-1">
<div className="flex gap-1">
<img src={apple} alt="stock-price apple" width={128} height={128} />
<img src={google} alt="stock-price google" width={128} height={128} />
</div>
<img src={ethereum} alt="stock-price ethereum" width={128 * 2 + 4} height={128 + 2} />
</div>
<img src={nvidia} alt="stock-price nvidia" width={128 * 2 + 2} height={128 * 2 + 4} />
</div>
<WidgetInteractionGuide />
### Adding the widget
<AddingWidget />
### Configuration
<WidgetConfig configuration={stockPriceWidget.configuration} />
### Examples
Here's a small collection of examples, that you can use for testing or actual use (in no particular order):
- AAPL
- GOOGL
- AMZN
- TSLA
- MSFT
- META
- NVDA
- NFLX
- BTC-USD
- ETH-USD
### Data source
We use the Yahoo Finance API to fetch the stock prices.
If you need to whitelist the api, please use the following URL: `https://query1.finance.yahoo.com`