Skip to content
Docs

Charts

Calls on your chart

Calls as arrows on candles, with a candle's calls one click away. Use our ready chart, or put the arrows on your own Lightweight Charts or TradingView Advanced Charts chart.

On this page
  1. The ready chart
  2. Height, use and cards
  3. Your own Lightweight Charts chart
  4. Bars and calls
  5. Options of connect
  6. The returned object
  7. States
  8. Addresses
  9. TradingView Advanced Charts

Which to use: it depends on whether your page already draws a chart.

Your productWhat to use
A stock or multi-asset platform with its own chart and barsOur marks on your chart: TradingView Advanced Charts or Lightweight Charts. Stocks with exchange sessions are drawn (NVDA, GOOGL).
A crypto venue or a Hyperliquid front endThe same two adapters, for symbols traded around the clock (BTC, ETH).
A page with no chart of its ownThe ready chart: Hyperliquid candles for about 140 tickers, about a hundred stocks among them (NVDA, GOOGL, NBIS), and daily Binance candles for other tokens. A stock without a Hyperliquid contract has no ready chart: draw your own chart and put our marks on it.

On both adapters, a call published while no bar stood (a night or a weekend on a stock chart) is counted on the next bar, and a call after the newest bar on that bar until a newer one comes, each as far as a week. On a Sunday a daily stock chart shows the weekend's calls on Friday's candle, and on Monday's once that candle is there; a click lists the same calls.

The ready chart

Paste this iframe into your page and replace the widget ID with yours. Your widget ID must list your site. You need no key or backend.

HTML
<iframe src="https://buzzberg.ai/embed/v1/chart?w=wgt_0123456789abcdef&ticker=BTC&theme=dark&interval=1d"
        title="Buzzberg chart with calls on BTC" width="100%" height="860" style="border:0" loading="lazy"
        referrerpolicy="strict-origin-when-cross-origin"></iframe>
Parametersw (widget ID), ticker, theme (auto, light, dark), interval (1h, 4h, 1d; 1d by default).
Where it showsOnly in a frame on one of the widget's sites. The request's Referer must be a page of an allowed site, so keep referrerpolicy="strict-origin-when-cross-origin" on the iframe. Opened in a tab, it shows "This chart is shown only inside its partner's site".
CandlesInstruments traded on Hyperliquid: about 140 listed contracts (BTC, ETH and other major tokens, about a hundred stocks such as NVDA, GOOGL and NBIS, and funds, commodities and indexes) and the tokens of its main perpetual book. 1h covers 14 days, 4h 30 days, 1d 365 days. Other crypto: daily candles only, when Buzzberg holds at least two stored Binance daily candles and the newest is at most 7 days old; a token also falls back to them when Hyperliquid has none. Other tokens, and stocks and funds without a Hyperliquid contract: no chart (a card says so); for such a stock, put our marks on your own chart.
Limits60 requests a minute per IP address. A 200 response is private, max-age=60.

The ready chart, live on BTC.

Height, use and cards

HeightThe page fills the frame it is given. The chart is 380 px tall (320 on screens narrower than 640 px) and shrinks to 240 in a short frame. The picked candle's calls take the rest, at least 320 px (260 on narrow screens), and a longer list scrolls inside its card; with no candle open, the chart keeps its full height. An 860 px frame shows the chart at full height; 760 px still fits without scrolling the frame. The page posts {type: 'buzzberg-widget:height', height} to its host: the frame's own height or, in a shorter frame, the minimum height the layout needs. The loader buzzberg-widget-v1.js creates this frame for an element with data-kind="chart" (Widget builder).
StateThe page tells its host ready, unknown_ticker, no_chart (tracked, but no price chart, and a retry will not change that: hide the chart; a calls widget can show its calls), unavailable or refused. With the loader, the element gets data-buzzberg-state and a buzzberg-widget:state event (State).
UseDrag to move the chart; pinch or drag the time axis to zoom. The mouse wheel scrolls your page. A line above the chart shows the candle under the pointer: time, open, high, low, close, change, and the counts of its long calls and of its short and avoid calls. Below 480 px wide it leaves out open, high and low. Prices are grouped by thousands. Click a candle with arrows to list its calls under the chart; the newest such candle is open on load.
CardStatusWhen
This widget is unavailable.404Unknown widget ID.
This chart is shown only inside its partner's site.403No Referer of an allowed site.
Buzzberg has no calls for …404A symbol Buzzberg does not track.
Buzzberg has no price chart for …200No candles for this ticker.
The chart is unavailable right now.503 429A failed read, or the request limit.

Your own Lightweight Charts chart

For a page that already draws a Lightweight Charts chart. Supports Lightweight Charts 4.1 and later, including version 5. For earlier 4.x versions, supply candles. The script puts the arrows on your candles.

HTML
<script src="https://buzzberg.ai/static/js/buzzberg-chart-v1.js"></script>
<script>
  const calls = BuzzbergChart.connect({
    widgetId: 'wgt_0123456789abcdef',
    ticker: 'BTC',
    chart, series,                                // your chart and its price series
    details: document.getElementById('calls'),    // optional: where a picked candle's calls open
    theme: 'dark',
  });
</script>
  • Long calls get an arrow under the bar; short and avoid calls get one over it. The arrows are the library's series markers. When an arrow stands for more than one call and there is room, its count is written beside it.
  • Clicking such a bar opens its calls in details, in the calls widget's card: up to 30 calls, newest first. Clicking an arrow lists that side only; clicking or tapping the candle lists both. Without details, a click only calls onSelect.
  • The script notices new candles itself, at most once every 250 ms. It does not poll: counts older than a minute are read again when the bars change or you call update.
  • On Lightweight Charts 4, a series has a single list of markers. The script keeps your markers in it; after you set markers yourself, call redraw(). On version 5 the two lists are separate.

The candle card's iframe also posts state messages to your page; the adapter ignores them, and its own onState and state() report what the arrows show.

Bars and calls

Bar lengthA day or longer: matched by UTC date. One hour up to a day: by whole UTC hours (a bar that opens at 13:30 counts from 13:00). Shorter than an hour: not served, state unsupported_interval.
Bar timesUTC, as the library expects. A page that shifts every bar to local time passes the shift as timeOffset.
GapsA bar covers the time up to the next bar. A call in a gap before a bar (a night or a weekend) is counted on that bar, as far as a week before it ends; a call after the newest bar is counted on it until a newer bar comes, as far as a week. A bar longer than a week counts its whole stretch, and its card lists the last week. Calls before the first bar are not drawn.
HistoryCounts: 365 days by day, 30 days by hour. Calls of a candle: the last 30 days; an older candle opens a card that says its calls are not listed.
Which callsThe calls the partner feed serves for the exact instrument. An arrow and its list can differ by a few calls: counts are usually up to a minute old (11 minutes at most, the page's own one-minute copy included), a call saved late reaches the arrows within about 40 minutes, and a call the feed cannot show is counted but not listed.

Options of connect

OptionMeaning
widgetIdYour widget ID, or sample to try it on any page: frozen counts and cards of the sample tickers, drawn on your own candles of the same days.
tickerAny symbol Buzzberg tracks.
chart, seriesYour chart and its price series. One adapter per series: a second connect replaces the first.
detailsOptional element where a picked candle's calls open.
themeauto, light or dark.
colors{bullish, bearish}; #22a05a and #e0524d by default.
sizeMarker size, 0.8 by default.
detailsHeight, detailsMaxHeightHeight of the calls card, 420 and 4000 pixels by default; the card reports its own height.
barSecondsThe bar length when it cannot be read from the data, as with a single bar.
timeOffsetSeconds the page added to every bar time to show local time.
candlesAn array or a function, when the series has no data() (before 4.1).
createSeriesMarkers, libraryLightweight Charts 5 loaded as an ES module. The standalone build is found on window.LightweightCharts.
onState(state)Called with {state, ticker, interval, calls, as_of, error, detail}; first inside connect.
onSelect(candle)Called with {time, from, to, side, bullish, bearish, listed, url}: side is bullish, bearish or null; listed is false for a candle older than the listed calls.

The returned object

CallMeaning
update({ticker, theme, barSeconds, timeOffset, candles})Updates the instrument or settings and returns a promise resolving to the adapter state.
refresh()Reads the counts again. Returns a promise of the state.
redraw()Draws the arrows again.
select(time, side)Opens a bar by its time, as a click does.
close()Removes the calls card.
state()The last state.
counts(time)The counts drawn on the bar with that time, {bullish, bearish}, or null when there is no such bar.
destroy()Ends the adapter; called before the chart is removed.

States

StateWhen
loadingThe counts are being read.
readyArrows drawn. After a failed re-read the arrows already drawn stay, with error set.
emptyNo bars yet, or no calls on them.
unsupported_intervalBars shorter than an hour.
errorerror is unknown_widget, origin_not_allowed, unknown_ticker, too_many_requests, unavailable, network or markers_unavailable. The adapter keeps an error state for a minute before it asks again.

Addresses

AddressResponse and who may read it
GET /embed/v1/chart-data?w=&ticker=&interval=1d|1hJSON: buckets as [start, long calls, short and avoid calls], empty buckets left out, with ticker, name, version, interval, bucket_seconds, from, to, as_of and window. Read by a script on an allowed site: the request's Origin must be one of the widget's sites.
GET /embed/v1/chart?w=&ticker=&theme=&interval=The ready chart (HTML), framed only by the allowed sites.
GET /embed/v1/chart-calls?w=&ticker=&from=&to=[&side=][&theme=]The calls card (HTML), framed only by the allowed sites. from and to are whole hours in UTC seconds, at most 7 days apart, starting no more than 30 days back (31 for a daily candle that began a day earlier).
  • Both responses are private, max-age=60. Each IP address can read the counts 120 times a minute, and the card 60 times a minute and 1,000 times a day.
  • Requests go to the origin serving buzzberg-chart-v1.js, normally https://buzzberg.ai.
  • Allow https://buzzberg.ai in script-src and connect-src, and in frame-src when using the calls card.

TradingView Advanced Charts

Built and tested against TradingView's published datafeed and marks interfaces, not against the Charting Library itself, which TradingView distributes on request.

For a chart drawn with TradingView's Charting Library. The same script adds our marks through your datafeed.

HTML
<script src="https://buzzberg.ai/static/js/buzzberg-chart-v1.js"></script>
<script>
  const calls = BuzzbergChart.connectAdvanced({
    widgetId: 'wgt_0123456789abcdef',
    datafeed: yourDatafeed,                       // the datafeed you already give the library
    ticker: (symbolInfo) => 'BTC',                // your symbol -> the Buzzberg ticker, or null
    details: document.getElementById('calls'),    // optional: where a picked bar's calls open
    theme: 'dark',
  });
  const widget = new TradingView.widget({ ...yourOptions, datafeed: calls.datafeed });
  widget.onChartReady(() => calls.bind(widget));
</script>
  • Pass calls.datafeed to the library. It is your datafeed, except that onReady also reports supports_marks: true and getMarks returns your marks plus ours. The combined marks response waits at most four seconds for each source. Every other method is yours, unchanged; getBars and subscribeBars pass through to it.
  • Each bar gets one mark for long calls and one for short and avoid calls. The label is the count up to 9, then +; with twoCharacterLabels: true and the library's two_character_bar_marks_labels featureset, up to 99. The tooltip gives the exact count.
  • Marks are drawn for resolutions of one hour or longer that divide a day, for any number of days, for one week, and for 1 to 12 months; other resolutions get unsupported_interval.
  • A symbol with an exchange session or a time zone other than UTC (a stock) is drawn too. The script reads the times of the bars your datafeed sends to the library, and nothing else of them, and puts the calls on those bars by the rule above. Until a symbol's first bars have come there are no marks (state idle); when they come, the marks are asked for again, which needs bind(widget).
  • After you call bind(widget), clicking a mark opens that bar's calls for that side in details.
  • Without ticker, the script reads the symbol's name: BINANCE:BTCUSDT, BTC-USD, BTC/USDT:USDT and BTC-PERP all read as BTC, NVDA as NVDA.
  • Options: widgetId, datafeed (required), ticker (a symbol, or a function (symbolInfo) => 'BTC' that returns a symbol or null), details, theme, colors, twoCharacterLabels, detailsHeight, detailsMaxHeight, onState, onSelect. Returned: datafeed, bind(widget), refresh(), select(markId), close(), state(), destroy(). States: idle, ready, empty, unsupported_interval, error.

For requests, limits and your page's policy, see Addresses.