How to Embed Stock Prices on Your Website
A step-by-step guide to adding real-time stock price widgets to any website — no coding experience required.
Displaying live stock prices on your website is one of the most effective ways to keep visitors engaged — especially if you run a financial blog, investment newsletter, or portfolio tracker. Instead of linking to external finance sites, you can embed a clean, real-time stock price widget directly on your page. In this guide, we will walk through exactly how to do that using PriceWidget, a free stock widget generator that makes the entire process effortless.
Why Embed Stock Prices on Your Website?
Adding a stock ticker widget to your website offers several advantages. First, it keeps your visitors on your site longer by providing the financial data they are looking for without redirecting them to Yahoo Finance or Google. Second, live price data adds credibility to your content — readers trust a site that shows current, accurate market information. Third, a well-designed stock widget enhances the user experience and makes your site feel more professional and polished.
Whether you write about individual stocks like Apple (AAPL) and Tesla (TSLA), or you cover broader market trends, an embedded stock price widget creates a dynamic, constantly-updated element that gives your pages a fresh feel even between content updates.
What You Need Before You Start
The good news is that you do not need any technical expertise or development tools to embed a stock widget. All you need is:
- A website where you can edit the HTML (WordPress, Squarespace, Wix, a static HTML site, or any CMS)
- The stock ticker symbol you want to display (for example, AAPL for Apple, MSFT for Microsoft, or GOOGL for Alphabet)
- A free widget generator like PriceWidget
That is it. No API keys to manage, no JavaScript libraries to install, and no server-side configuration. The entire process works through a simple HTML iframe tag.
Step 1: Choose Your Stock Ticker Symbol
Every publicly traded stock has a unique ticker symbol. For example, Apple is AAPL, Amazon is AMZN, Google’s parent company Alphabet is GOOGL, and Tesla is TSLA. If you are unsure of a company’s ticker, a quick search on any financial site will give you the answer.
PriceWidget also supports cryptocurrency tickers. Bitcoin is listed as BTC-USD, Ethereum as ETH-USD, and Solana as SOL-USD. You can generate widgets for both stocks and crypto using the same tool.
Step 2: Generate Your Widget with PriceWidget
Head to the PriceWidget Generator on our homepage. Type your desired ticker symbol into the search box and click “Search.” The tool will fetch the latest price data and render a preview of your widget, including:
- The current stock price in the native currency
- The daily price change (absolute amount and percentage)
- A sparkline chart showing the price trend over the last 30 days
- The company or cryptocurrency name
- A timestamp showing when the data was last updated
Step 3: Customize the Widget Appearance
PriceWidget offers two customization options to help the widget blend with your site design:
Theme Selection
Choose between a light theme (white background, dark text) and a dark theme (dark background, light text). The light theme works best on websites with white or light-colored backgrounds, while the dark theme is ideal for sites with darker color schemes. Pick whichever matches your site’s aesthetic.
Size Options
You can select from three sizes: Small (280px wide), Medium (340px wide), and Large (420px wide). The small size is great for sidebars, the medium size works well in content columns, and the large size is ideal for featured placements or hero sections.
Step 4: Copy and Paste the Embed Code
Once you are happy with the preview, click the “Copy Embed Code” button. This copies an HTML iframe snippet to your clipboard. The code looks like this:
<iframe
src="https://price.toolboxlite.com/widget/AAPL?theme=light&size=md"
width="340"
height="180"
frameborder="0"
style="border-radius:12px;overflow:hidden;"
title="Apple Inc. Price Widget"
></iframe>Paste this snippet into your website’s HTML wherever you want the widget to appear. In WordPress, you can use a “Custom HTML” block. In Squarespace, use the “Code” block. In a static HTML file, paste it directly into the body of your page.
Step 5: Verify and Publish
After pasting the embed code, preview your page to make sure the widget renders correctly. The widget is fully responsive within its iframe and will auto-refresh the price data every 60 seconds, so your visitors always see current market information without needing to reload the page.
If you want to change the ticker, theme, or size later, simply generate a new embed code and replace the old iframe snippet. There is no limit on how many widgets you can embed — add one per stock, or create a dashboard layout with multiple widgets side by side.
Best Practices for Stock Price Widgets
- Match the theme to your site. A mismatched widget looks out of place. Use the dark theme on dark sites and the light theme on light sites.
- Place widgets where they add value. Position stock widgets near relevant content — next to stock analysis articles, inside portfolio pages, or in a dedicated market data section.
- Use appropriate sizes. Do not force a large widget into a narrow sidebar. Choose the size that fits the container naturally.
- Combine stocks and crypto. If your audience is interested in both traditional markets and crypto, embed widgets for each to create a comprehensive price dashboard.
- Keep it minimal. One or two well-placed widgets are more effective than a wall of tickers. Focus on the stocks and cryptos most relevant to your audience.
Conclusion
Embedding stock prices on your website has never been simpler. With PriceWidget, the entire process takes less than a minute: search for a ticker, customize the widget, copy the embed code, and paste it into your site. The widget handles everything else — real-time price updates, responsive sizing, and a clean, professional design.
Ready to get started? Try the PriceWidget Generator now and add live stock prices to your website today.