Are you building a finance website or blog using Wix, and want to show real-time stock prices like Apple, Tesla, or Google? In this step-by-step guide, you'll learn how to create a scrolling stock ticker widget in Wix using FMP's Stock Quote API endpoint, without exposing your secret API key to the public.
Even if you don't have coding experience, don't worry — I'll walk you through everything.
What You Will Learn:
-
How to get real-time stock data
-
How to store your API key safely in Wix
-
How to embed a custom stock ticker in your website
-
How to fetch data securely without showing your API key
What You Need
-
Your custom API key from FMP
-
Basic access to your site's Wix Editor and Velo Dev Mode
Step 1: Get a Free API Key from FMP
-
After signing in, go to your Dashboard
-
Copy your API Key — you'll use this in Wix, but don't share it publicly
Step 2: Store the API Key in Wix Secrets Manager
This step keeps your key hidden from the public.
-
In Wix Editor, turn on Dev Mode as shown in the below image
-
Click on Backend → Secrets Manager
-
Click + New Secret
-
Name:
FMP_API_KEY -
Value: paste your real API key here
-
-
Click Save

Your API key is now safe. Only Wix backend code can access it.
Step 3: Add Secure Code in Backend (news.jsw)
-
In the Backend section, right-click → Add New Web Module as shown in the below image
-
Name it news.jsw
-
Paste this code inside:

This code fetches stock prices securely using your hidden API key.

Step 4: Add HTML Embed Widget to Your Wix Page
-
Go to the page where you want the stock ticker
-
Click Add (+) → Embed Code → HTML Embed
-
Paste this HTML code (you can style it however you like):

Step 5: Add Page Code to Communicate With Backend
-
Click Page Code in the editor
-
Paste this code:

Congratulations! You've just created a custom stock ticker widget in Wix that:
-
Shows live stock prices
-
Works beautifully on desktop and mobile
-
Keeps your API key secure
This is how it should look:

With this simple and secure method, you can now display real-time stock prices on your Wix website without exposing your API key. It's a great way to enhance your site and provide live financial insights to your visitors.


