← Back to Developer Docs

VTRS Price Widget

Drop a live, auto-updating VTRS price pill into any website in two lines of HTML.

Live Preview

This exact widget is what your users will see — fetched live from /api/vtrs-price, auto-refreshing every 60 seconds.

Embed Code

Paste this anywhere in your HTML — no build step, no framework required.

html
<script src="https://vitreusdex.com/widget.js"></script>
<div id="vtrs-widget"></div>

Integration Instructions

  1. 1

    Add the script tag

    Place this once in your page — in <head> or just before </body>. The file is ~2 KB gzipped and served with 5-minute edge caching.

  2. 2

    Drop in a <div id="vtrs-widget">

    Anywhere you want the price pill to appear. The widget is self-contained — its styles are scoped to #vtrs-widget with all: initial so it will not inherit or leak CSS.

  3. 3

    That's it

    The widget fetches the live price on load and refreshes every 60 seconds. Clicking it opens vitreusdex.com in a new tab.

CORS enabled

The /api/vtrs-price endpoint is open to all origins — no key, no allowlist.

Cached at the edge

Widget script and price data are cached for 60 seconds to stay fast and friendly to CoinGecko rate limits.

Dark theme by default

Tuned for dark sites but legible on light backgrounds too. Styles are scoped via all: initial.

Zero dependencies

Plain vanilla JS — no React, no framework. Works in any site, any CMS.

Prefer to build your own?

Hit the raw price API and render however you like:

javascript
fetch('https://vitreusdex.com/api/vtrs-price')
  .then(r => r.json())
  .then(data => {
    console.log('VTRS price:', data.price_usd);
    console.log('24h change:', data.price_change_24h + '%');
  });