Options
Options live in your code, so change the code to change an installed widget.
For fill sizing, give the mount element a definite CSS height. A
height: 100% mount needs a sized parent. The SDK follows that height without JavaScript measurements or a viewport cap. Without fill sizing, positioning grows naturally and feed pixel-height settings keep working.
- For the general feed, leave out
selection. Empty arrays are invalid. - Choice lists need a label for every configured ID. Visitors can narrow your list, not widen it.
- Look up IDs on your server with Find IDs: the lookup needs an API key, the widget does not. Sample IDs such as
900001work only in sample mode.
Filter by asset class
selection: { assetClass: ['crypto'] } shows only crypto. Several classes match any of them; leave assetClass out for all. stocks excludes indices, as in the Centaur app.
Filters combine, so stocks plus a Bitcoin selection is always empty. Centaur filters first, then shows the latest 20 posts. Scroll down or choose Load more to read older posts within the last seven days.
Methods
The SDK script addsCentaurWidgets.v1 to your page.
updatereplaces each value you pass, so pass the whole selection or appearance. Changing a positioning card’s asset clears itsviewActivityUrl; pass the new one in the same call.- To change
kind,mode, orwidgetId, destroy the widget and mount a new one. - Mount once per container. Many widgets can share one SDK script.
Callbacks
Optional functions in your options:onAssetNavigate handles the click unless it returns false. Cmd-click and other modified clicks always open the link normally. Links accept HTTP, HTTPS, or relative URLs.
Runtime behavior
- Visible live widgets refresh every 25 to 30 seconds (a target, not an SLA). Hidden widgets pause.
- While the visitor is reading, new posts wait behind the new-posts button.
- A temporary failure keeps what is on screen. An access denial clears it.
- If the stylesheet cannot load, the widget asks the visitor to reload and reports
STYLESHEET_FAILEDthroughonError. Remounting requests the same stylesheet URL again. A page reload fetches the current SDK and is the reliable fix. If it persists, check your content security policy. - Source links and the Centaur attribution open in a new tab. Photos show inline, with no enlarged view. Videos do not play yet.
- The SDK runs in your page. Shadow DOM isolates its styles, not its code.
/v1/sdk.jsupdates in place on the next page load. Breaking changes ship as/v2/.
What the positioning card shows
It covers positions Centaur tracks, not the whole market.
Missing prices and returns show as ”—”.