Guides
Display currency
A chart of BTC-USD can be drawn in euros, or in ETH. It is one parameter, it is display only, and it says so on screen.
What it does
data-currency multiplies every bar by the exchange rate that was in force at that bar’s time, so the whole history is priced in the currency you name rather than restated at today’s rate. Volume is untouched, it is measured in the instrument, not in money, and the legend prints EUR (converted) so a converted chart can never be read as the venue’s own book.
<div class="vp-chart"
data-symbol="BTC-USDT"
data-datafeed="myfeed"
data-currency="EUR:EURUSD"></div>Name the market, because it is your feed
On your site the chart reads YOUR datafeed, and we have never seen it, asking it for EURUSD=X because that is our spelling would request an instrument that does not exist. So the currency carries the symbol its rate lives at, after a colon.
The named symbol must be quoted in the chart symbol’s own currency: one euro priced in dollars, which is what EURUSD already is on every feed that carries it. The chart divides by it. That direction is stated here rather than guessed from the ticker, because EURUSD and USDEUR are both legal spellings of one market at reciprocal prices and no parser can tell which you meant.
| Value | What happens |
|---|---|
EUR:EURUSD | The chart opens in EUR, dividing every bar by your EURUSD series. |
EUR:EURUSD,GBP:GBPUSD | Both are offered in the picker; the FIRST is what the chart opens in. |
EUR | Works on our own pages, where we know where the euro rate lives. On your site there is no market to read it from, so the entry is dropped and the chart stays in its own currency. |
data-toolbar="true" is what lets a reader switch currency themselves. With the toolbar off, the default, the parameter is simply the currency the chart is drawn in. It lists each currency with its flag and full name, and gains a search field once there are enough of them to scan.What is converted, and what is not
The price series, and anything the chart derives from it: candles, indicators, the axis and the crosshair. Drawings and any order or position lines your page placed keep the prices they were given, because those are numbers you chose in the instrument’s own currency if your page draws lines, place them in the currency the chart is displaying.
Nothing that leaves the chart, either. On our own terminal the price scale’s menu offers to arm an alert or place an order at the level under the pointer; while a conversion is on, those rows are disabled and say which currency to switch back to. The venue quotes, fills and prints in its own currency, so a level read off a converted axis means one thing on screen and something else at the other end, and converting it back at arm time would pin it to today’s rate for an alert that has to survive weeks of them. Drawing a line at the level still works: that one never leaves the chart.
History reaches back only as far as your rate series does. Bars older than the first rate are not drawn rather than converted at the earliest rate you happen to have, because a price multiplied by a rate that was not in force is a made-up number that looks exactly like a real one.
Rates at your chart’s resolution
The rate series is requested at the same interval as the chart, so a 1-hour chart converts with hourly rates. If your feed has no intraday history for that cross, the chart falls back to daily rates and says so in the control’s tooltip rather than quietly pretending to a precision it does not have.
A rate market you do not serve, or a symbol that resolves to nothing, is not a broken chart: the prices render as your feed quotes them and the control explains why. The one outcome we will not produce is unconverted numbers under a converted label.