Skip to content

Embed funding across venues

Show one collected perpetual instrument’s current funding rates on your own page. The widget uses the same cached server answer as Studio funding spreads, not a separate market-data source. No key or account is needed. Every row of Studio funding spreads and every Studio instrument page has an Embed button that gives you the snippets below for that instrument.

Copy this tag where the table should appear:

<script async src="https://studio.debyko.com/js/funding-embed.js"
data-instrument="BTC-PERP"></script>

The script inserts one box right after its tag: an iframe served from studio.debyko.com, and below it the link “Data: DEBYKO · BTC-PERP →” to the instrument in Studio, as an ordinary link in your page. The table and its data request live inside the iframe, on DEBYKO’s origin, so your page’s connect-src and CORS never apply to them. Your Content Security Policy needs https://studio.debyko.com in script-src and frame-src (or child-src); nothing else, no inline style and no unsafe-eval, and it works under Trusted Types.

The box is as wide as its container, up to 640 px, with its own hairline edge and rounded corners. Its height follows the table: the iframe tells the script its height and the script sets it, so there is no inner scroll and no empty space. The two sides only accept each other’s messages from each other’s window and origin.

The script does not read your page beyond the background colour behind the box, sets no cookies and makes no request of its own.

A README, a forum post or anything else that renders Markdown images can show the same numbers as a static image:

[![BTC-PERP funding across venues — DEBYKO](https://studio.debyko.com/embed/funding.svg?instrument=BTC-PERP)](https://studio.debyko.com/btc-perp)

The card is drawn on the server from the same answer and carries no script. It follows the reader’s light or dark preference unless theme says otherwise.

Without the script, the iframe alone works too; you choose its height, and the table scrolls inside it if it is taller:

<iframe
src="https://studio.debyko.com/embed/funding?instrument=BTC-PERP&theme=auto"
title="BTC-PERP funding across venues — DEBYKO"
width="100%" height="520" style="max-width:640px;border:1px solid #E6E6E9;border-radius:8px"
loading="lazy" referrerpolicy="no-referrer" credentialless>
</iframe>

A plain iframe shows the “Data: DEBYKO” link inside its own footer.

Parameter Script attribute / iframe and card query Meaning
Instrument data-instrument / instrument Required canonical collected perpetual instrument, for example BTC-PERP, ETH-PERP or DOGE-PERP. Case-insensitive.
Theme data-theme / theme auto (default), light or dark. With the script, auto follows your page: light on a page that paints itself light, dark on one that paints itself dark; a page that paints no background follows its color-scheme and, for light dark, the reader’s prefers-color-scheme. It changes when your page or the reader’s preference changes. A plain iframe or the card follows the reader’s prefers-color-scheme. No theme preference is stored.

The widget says “Loading…” until the first answer, then the rows. Rates are restated to eight hours in basis points, exactly as Funding normalisation defines, two decimals, the same figures as the Studio matrix. A row shows a number only while its value is LIVE; otherwise it carries one word from Statuses: STALE, MISSING, NOT PUBLISHED, NOT COLLECTED, DELAYED, HALTED or MIGRATED, never a zero. LIVE rows come first, highest rate on top. Lowest, highest and spread use LIVE values only; fewer than two LIVE venues means no spread.

If the data cannot be read within eight seconds, the read fails or the platform is unavailable, the widget says MISSING in place of the rows and tries again a minute later; an instrument the platform does not collect says NOT COLLECTED. It never stays on “Loading…”.

The shared source answer is cached for 60 seconds. The widget refreshes once a minute and removes an expired value immediately between refreshes. These are current published rates, not settlement history or a prediction.

The public JSON endpoint is GET https://studio.debyko.com/data/widgets/funding?instrument=BTC-PERP. Its body contains as_of, served_at and the same instrument row used by Studio funding spreads. It is cached for 60 seconds. Page, card and data reads share an origin limit of 30 requests per IP with a refill of one request every two seconds. A refusal is 429 with Retry-After; invalid parameters are 400, an unknown/uncollected instrument is 404 on the data endpoint and the card, and unavailable data is 503.

DEBYKO sets no widget cookies and loads no analytics, replay, third-party scripts or external fonts in the iframe. Its data requests omit credentials and referrers. Only DEBYKO’s own request log records the route, status, timing and the same one-way network-prefix/browser hash used by Studio. No account identity or cross-site cookie identifier is attached. credentialless additionally asks supporting browsers to omit iframe credentials.