If you run a crypto blog, a link directory or a community site, sooner or later you want live prices on it: a ticker under the header, a Bitcoin price card in the sidebar, a candlestick chart inside a market update. The usual routes each have a catch:
- Call an exchange API yourself. You have to deal with CORS, rate limits, reconnects and drawing the chart. That is a lot of work to show one number.
- Install a WordPress plugin. It only helps on WordPress, many free tiers stop at a price table, and some ask you to sign up somewhere for an API key.
- Use an exchange’s own widget. These usually carry the exchange’s branding and referral links, and rarely match your site’s design.
This guide covers a simpler route: the Coinpred crypto widgets. They are free and open source (MIT): 30 widgets in 90 styles, from a price ticker and candlestick chart to a crypto market heatmap, technical indicator panel and liquidation map. Every one is added the same way: copy a snippet, paste it into your page. No sign-up and no API key.
Below we go platform by platform and finish with a troubleshooting checklist. Skip to the section for your site.

1. What a widget is made of
Every embed code looks like this (a price ticker here):
<div class="coinpred-widget" data-widget="ticker" data-style="bar" data-coins="BTC,ETH,SOL" data-lang="en" data-theme="light">
<a href="https://coinpred.com/widgets/" target="_blank" rel="noopener">Coinpred Price ticker tape</a>
</div>
<script async src="https://coinpred.com/widgets/v1.js"></script>
There are two parts:
- A
divplaced where the widget should appear. Which widget, which coins and which style are all set withdata-attributes. - A
scripttag that loads the widget script from coinpred.com, which also provides the data. It loads asynchronously and never blocks your page.
The Coinpred link inside the div is shown at the bottom of the widget. Keeping it visible is the only condition of free use.
When the script loads it finds every element with class="coinpred-widget" and renders it. Widgets run inside Shadow DOM, so your CSS cannot break them and theirs cannot leak into your site. Five widgets on one page still need the script only once, and they share the same market data request.
2. Step one: pick a widget and configure it
Open coinpred.com/widgets. The left column lists every widget and the right column shows the tutorial for the one you are looking at. Each widget card has a live preview and a settings panel:
- Style: three per widget, for example Bar, Chips and Board for the ticker.
- Coins: search and add any of the top 100 coins by market cap; icons are included.
- Theme: light or dark, to match your background.
- Language: English or Chinese.
- Preview width: switch to 375 px to check the phone layout.
The embed code under the card updates as you change settings. Press “Copy code” when you are happy with it.
Not sure which widget fits? A quick guide:
| Where it goes | Widget | Why |
|---|---|---|
| Top of the site, under the navigation | Price ticker (ticker) |
One scrolling line of prices and 24h change |
| Sidebar | Coin price card (price), mini cards (cards) |
Small, with a sparkline |
| Market analysis posts | Candlestick chart (chart), technical indicators (indicators) |
Intervals from 15 minutes to daily |
| Market overview or directory home page | Crypto heatmap (heatmap), price bubbles (bubbles) |
See what is up and down at a glance |
| Derivatives content | Liquidation map, funding rates, long/short ratio, Fear & Greed | Each states its data source and method |
| Tool pages | Crypto converter (converter) |
100 coins against USDT and USD |

3. Plain HTML: paste and you are done
If you edit HTML directly, or your site builder lets you, paste the snippet inside <body> where the widget should appear, save and reload.
A few practical tips:
With several widgets, keep the script line once. A ticker at the top and a chart in the article:
<!-- Top: price ticker -->
<div class="coinpred-widget" data-widget="ticker" data-style="bar" data-coins="BTC,ETH,SOL" data-lang="en" data-theme="light">
<a href="https://coinpred.com/widgets/" target="_blank" rel="noopener">Coinpred Price ticker tape</a>
</div>
<!-- Article: BTC 4h candlestick chart -->
<div class="coinpred-widget" data-widget="chart" data-style="candle" data-coins="BTC" data-interval="4h" data-height="360" data-lang="en" data-theme="dark">
<a href="https://coinpred.com/signal-lab/" target="_blank" rel="noopener">Coinpred Candlestick chart</a>
</div>
<!-- Load the script once, at the end of the page -->
<script async src="https://coinpred.com/widgets/v1.js"></script>
To limit the width, wrap it. Widgets fill their parent’s width:
<div style="max-width: 420px">
<!-- paste the widget code here -->
</div>
You can change coins by hand. data-coins takes tickers separated by commas, such as BTC,ETH,SOL,DOGE. Use the plain ticker, not BTCUSDT.
4. WordPress: no plugin needed
People often search for a “crypto price WordPress plugin”, but the built-in HTML block does the job.
Block editor (Gutenberg):
- Open the page or post and click “+”.
- Add a Custom HTML block.
- Paste the code and use the block’s Preview to see the widget.
- Update or publish.
Classic editor: switch to the Text tab before pasting. Pasted into the Visual tab, the code shows up as plain text.
Sidebar: go to Appearance → Widgets, add a Custom HTML widget to the sidebar and save. With Elementor, drag in the HTML widget.
Two common WordPress gotchas:
- The code disappears when an Author saves the post. WordPress only lets administrators (super admins on multisite) save
<script>tags; Author and Contributor roles have them stripped. Add the widget as an administrator, or put the singlescriptline in your theme footer. - Nothing shows after installing a caching or optimisation plugin. Some plugins combine or delay JavaScript. Add
coinpred.com/widgets/v1.jsto the plugin’s exclusion list and clear the cache.
5. Webflow, Wix, Shopify, Ghost and static blogs
The idea is the same everywhere: find the block that accepts custom HTML and paste the code.
- Webflow: drag in an Embed (Code Embed) element, paste, publish, and check the live page; the Designer preview may not run scripts.
- Wix: add Embed Code → Embed HTML, choose “Code” and paste. Wix wraps it in an iframe, so drag the element tall enough for the widget.
- Shopify: add a Custom Liquid section in the theme editor and paste.
- Ghost: insert an HTML card.
- Hugo, Hexo and other static site generators: you can usually write HTML in Markdown. Hugo strips raw HTML by default; set
markup.goldmark.renderer.unsafe = trueor put the code in a template or shortcode.
Where it will not work: Notion, Medium, most forums and email do not run third-party scripts. Link to the widget page or use a screenshot there.
6. React, Next.js, Vue and Nuxt
Single-page apps differ in one way: the page is not reloaded on navigation, and the script only scans the page once when it first loads. So: render the widget div, load the script once on the client, and if it is already loaded call window.CoinpredWidgets.scan() to mount new widgets.
React / Next.js ('use client' is needed in the App Router):
'use client';
import { useEffect } from 'react';
const SRC = 'https://coinpred.com/widgets/v1.js';
export default function CoinpredWidget() {
useEffect(() => {
if (window.CoinpredWidgets) return void window.CoinpredWidgets.scan();
if (!document.querySelector('script[src="' + SRC + '"]')) {
const s = document.createElement('script'); s.src = SRC; s.async = true; document.body.appendChild(s);
}
}, []);
return (
<div className="coinpred-widget" data-widget="price" data-style="classic" data-coins="BTC" data-lang="en" data-theme="light">
<a href="https://coinpred.com/price-prediction/" target="_blank" rel="noopener">Coinpred Coin price card</a>
</div>
);
}
In JSX, class becomes className; the data- attributes stay as they are. To reuse it, turn data-coins and data-theme into props.
Vue 3 / Nuxt:
<template>
<div class="coinpred-widget" data-widget="price" data-style="classic" data-coins="BTC" data-lang="en" data-theme="light">
<a href="https://coinpred.com/price-prediction/" target="_blank" rel="noopener">Coinpred Coin price card</a>
</div>
</template>
<script setup>
import { onMounted } from 'vue';
const SRC = 'https://coinpred.com/widgets/v1.js';
onMounted(() => {
if (window.CoinpredWidgets) return window.CoinpredWidgets.scan();
const s = document.createElement('script'); s.src = SRC; s.async = true; document.body.appendChild(s);
});
</script>
With server-side rendering in Nuxt, onMounted only runs in the browser, so this works as is. More examples are in the examples folder on GitHub.
7. Let an AI assistant add it: ChatGPT, Cursor, Claude
If you code with AI, or would rather not touch code at all, let the AI do it. Every widget on the widget page has a ready-made prompt:
Add the “Price ticker tape” widget from coinpred.com to my site. Docs: https://coinpred.com/widgets/docs/ticker.md
My settings: style=bar, coins=BTC,ETH,SOL, lang=en, theme=light
Two lines are enough. The first names the widget and links its doc; the second is the configuration you picked on the page, and it updates as you change settings. The doc lists every option, the setup for each framework and the usage rules, so the AI knows exactly what to generate.
It works slightly differently depending on the assistant:
- Coding agents that edit your project (Cursor, GitHub Copilot, Claude Code): paste the prompt in the project chat and add where it should go, such as “under the header on the home page”. The agent reads the doc and writes the code into the right file.
- Chat assistants (ChatGPT, Claude): they give you the code and tell you where to paste it. Mention how your site is built, for example “my site is on WordPress”, and the answer will follow that platform.
Not sure which widget you need? Use the general prompt from the “Add with AI” button on the widget page and describe the goal, for example “a chart on my crypto directory home page that shows the whole market’s moves, dark background”. The AI picks from the 30 widgets (a heatmap or bubbles, in that case).
Two things to watch:
- Ask for the official code. Some assistants like to build their own version with a chart library and an exchange API. The doc tells them to use the official snippet; if they still drift, point them back to it.
- Check that the Coinpred link is still there. An assistant may remove it as clutter, which breaks the one condition of free use.

8. Options at a glance
Every option is an attribute on the div; reload the page after changing it:
| Attribute | What it does | Examples |
|---|---|---|
data-widget |
Widget type | ticker, price, chart, heatmap, bubbles, indicators |
data-style |
Style, three per widget | ticker: bar / chip / board |
data-coins |
Coins, comma separated | BTC,ETH,SOL |
data-theme |
Theme | light / dark |
data-lang |
Language | en / zh |
data-interval |
Candle interval (chart, indicators) | 15m / 1h / 4h / 1d |
data-height |
Height in px (chart, heatmap, bubbles) | 360 / 480 / 600 |
data-limit |
Number of items (lists, heatmap) | 10 / 50 / 100 |
The exact values each widget accepts are in its “Options” tab on the widget page and in the widget docs.
9. Widget not showing? Check in this order
- Did your editor strip the code? Right-click → View page source and search for
coinpred-widget. If it is missing, the code was not saved (see the WordPress roles note above). - Did the script load? Open DevTools (F12) → Network and look for
v1.jswith status 200. - Does your site send a Content Security Policy? If so, allow
https://coinpred.cominscript-src,connect-srcandimg-src: the script, the market data and the coin icons all come from that domain. - Is it a single-page app? If widgets vanish after navigation, call
window.CoinpredWidgets.scan()as in section 6. - Wrong language or colours? Check
data-langanddata-theme. A light widget on a dark site looks out of place; usedark. - Numbers not changing? Prices refresh every 30 seconds, derivatives data about every 5 minutes and Fear & Greed daily. Updates pause while the tab is in the background and resume when you return.
10. Free, open source, and where the data comes from
- Free: no sign-up, no API key and no usage limits for normal websites. The only condition is keeping the Coinpred link at the bottom of the widget visible.
- Open source: the widget script is MIT-licensed. Source, English and Chinese docs and framework examples are on GitHub: github.com/Boom-Caoq/crypto-widgets. Issues and suggestions are welcome. It is a coinpred.com open-source project, with more tools to come.
- Data sources: all widget data is collected from public internet sources: public market data from exchanges such as Binance and OKX, plus CoinGecko, alternative.me, mempool.space, Deribit and public Ethereum nodes. Each widget’s ⓘ button and doc explain its source and method; the liquidation map, for instance, is a model estimate, and heatmap tiles are sized by the square root of market cap.
- Availability: the widgets and coinpred.com are not intended for users or websites in mainland China, and access from mainland China is restricted through Cloudflare. Please do not embed them on sites that serve mainland China users.
- Widget data is for information only, may be delayed or inaccurate, and is not investment advice.
Summary
The quickest way to add live crypto prices to a website: pick a widget and style on the widget page, copy the code and paste it into your page. In WordPress use a Custom HTML block; in React or Vue call scan() after navigation. If you would rather not do it yourself, hand the widget’s prompt to your AI assistant.
Hit a case this guide does not cover? Open an issue on GitHub and we will add it to the docs.



