A Forex API can put EUR/USD prices next to the service metrics your team already watches in Grafana. This guide connects SiftingIO to two panels: a candlestick chart for recent price history and a quote panel showing bid, ask, and the observation time.
Create your free SiftingIO account to generate an API key and try the examples. No credit card is required. See the Forex API for coverage and the available access methods.
This puts currency context on the same screen as a payment service, pricing application, or FX integration, instead of adding another standalone chart to maintain. You can inspect recent movement and the latest available reference quote without switching tools.
Why use SiftingIO for a Forex dashboard?#
SiftingIO provides historical Forex OHLCV bars and current bid/ask quotes through REST, using the same API key. Its Forex product also supports live WebSocket updates for applications that need streaming rather than periodic refreshes.
For this dashboard, that means one data source configuration, documented JSON fields, and UTC timestamps across the chart and quote panel. Start with EURUSD, then use the Forex symbol catalog to check other pairs before adding them.
These are aggregated reference values, not executable quotes from your broker. The data methodology explains the distinction. Label the panel accordingly, especially if someone will compare it with an execution platform.
1. Connect Grafana without exposing your API key#
You need Grafana with the Infinity data source installed, permission to configure a data source, and a SiftingIO key with Forex access. Follow Grafana's Infinity installation guide for your deployment and supported version.
Create an Infinity data source named SiftingIO Forex. In its authentication settings, select API key and set:
| Setting | Value |
|---|---|
| Key | X-API-Key |
| Value | Your SiftingIO API key |
| In | header |
| Allowed hosts | https://api.sifting.io |
Save the credential at the data-source level. Do not put it in a panel URL, dashboard variable, or per-query header. Grafana documents this separation in its Infinity configuration guide. Restrict dashboard and data-source access to the people who should use the feed; hiding a key is not a substitute for access control.
For a customer-facing web application rather than an internal Grafana screen, use the architecture in keeping a market data API key out of browser code.
2. Request recent EUR/USD candles#
The historical endpoint is:
GET https://api.sifting.io/v1/hist/forex/EURUSD/bars
Start with a short time range, such as the last 24 hours, and 15-minute bars. The Forex bars reference defines t as the bar's opening time in Unix milliseconds, o/h/l/c as prices, and v as aggregated traded volume summed across contributing sources. That volume represents the contributing sources, not a consolidated total for the entire global FX market.
In a new panel, select your SiftingIO Forex data source. Set Type: JSON, Source: URL, Method: GET, Parser: JSONata, and Format: Time series. Use this URL:
https://api.sifting.io/v1/hist/forex/EURUSD/bars?interval=15m&limit=1000&start=${__timeFrom:date:iso}&end=${__timeTo:date:iso}
The two time macros are expanded by Infinity into UTC timestamps. They follow the dashboard's time range; do not paste the unexpanded URL into a terminal. Grafana documents them in Infinity time macros.
Under Parsing options, set Rows/Root to $.data, then define these columns:
| Selector | Title | Type |
|---|---|---|
t | time | Time (UNIX ms) |
o | open | Number |
h | high | Number |
l | low | Number |
c | close | Number |
v | volume | Number |
Select the Candlestick visualization. If Grafana does not assign the dimensions automatically, map Open, High, Low, Close, and Volume to the matching fields above. Choose Candles mode for price only, or Both to include volume. These options are covered in Grafana's candlestick documentation.
Set the dashboard timezone to UTC if you want its labels to match API timestamps directly. This changes the displayed labels, not the underlying candle boundaries. Name the panel EUR/USD · 15-minute OHLCV so its interval is visible.
Check compression and completeness#
Historical requests require gzip. Current Infinity releases support gzip automatically; Grafana announced that behavior in its gzip support update. Start without a custom Accept-Encoding header. If you see 406 gzip_required, check the installed plugin version and outgoing request configuration. Our gzip troubleshooting guide explains the API requirement.
The limit=1000 above is an example page size, not a statement about the maximum supported limit. A 24-hour window contains about 96 fifteen-minute slots, comfortably below that size. A weekend can return fewer bars or none.
Check the raw response for meta.next_cursor before trusting a wider chart. The query above does not configure a cursor-following loop. If a cursor is present, shorten the range, select a coarser supported interval, or fetch all pages through a backend collector. Do not present the first page as the full selected period. For longer imports, see cursor pagination for historical bars.
3. Add bid, ask, and quote time#
Add a second panel using the same data source and this URL:
https://api.sifting.io/v1/last/quote/forex/EURUSD
The quote reference defines b and a as bid and ask, returned as strings, and t as the observation timestamp in Unix milliseconds. Use JSONata as the parser and Table as the query format. In Rows/Root, enter:
$append([], {
"bid": $number(b),
"ask": $number(a),
"quoted_at": t
})
This creates a one-row array and converts the two prices to numbers. Configure bid and ask as Number columns, and quoted_at as Time (UNIX ms). Infinity supports these expressions through its JSONata backend parser.
A Table visualization is a useful first check because you can see all three fields. For a larger display, switch to Stat, use a last-value calculation, and include the two prices plus the timestamp. Apply five decimal places to the EUR/USD price fields and a date/time unit to quoted_at, not the same formatting to all three. Title it EUR/USD reference quote.
The quote endpoint always requests the latest available observation; it does not become a historical quote when you move Grafana's time picker. Keep that distinction visible beside the historical chart.
Do not replace a failed request with a zero price. Keep the error visible and inspect the response. If you retain the last successful observation, retain and display its original timestamp too. The stale market data guide covers freshness checks in more detail.
4. Budget refreshes before leaving the screen on#
With one query per panel, one dashboard refresh makes two REST requests. A useful baseline for a 30-day month is:
requests = 2 panels × independent viewers × 43,200 minutes ÷ refresh interval in minutes
| Refresh interval | One always-open viewer | Two independent viewers |
|---|---|---|
| 10 minutes | 8,640 | 17,280 |
| 5 minutes | 17,280 | 34,560 |
| 1 minute | 86,400 | 172,800 |
These figures assume no shared caching, no additional pages, and no retries. Manual refreshes, opening the dashboard, alerts, and other applications using the key add requests. Compare the result with your current plan allowance and leave headroom.
For initial evaluation, keep automatic refresh off and refresh manually. Enable a schedule once the panels are correct. A periodically refreshed dashboard is not a tick-by-tick stream. For a live application that needs pushed FX updates, use the WebSocket documentation; retrieve historical OHLCV through REST, not WebSocket.
If the screen needs faster quotes than candles, separate the fast quote view from the slower historical view, or use a shared backend collector with an explicit refresh policy. Account for all viewers and queries rather than assuming one browser's usage is the total.
Before sharing the dashboard#
Confirm that changing the time range changes the candle request, while the quote still shows the latest observation. Inspect the first and last candle timestamps, check for a remaining cursor, and make sure the visible interval matches the request. An empty period should stay empty, not turn into zero-priced candles.
Check that exported dashboard JSON contains no API key. Verify that errors remain distinguishable from valid prices, and that viewers can see the quote timestamp. Finally, confirm your plan's display rights before sharing market data outside your team.
This recipe was checked against the linked API and Grafana documentation. It is a configuration walkthrough, not a pre-tested dashboard export; validate the panels on your own Grafana instance before using them operationally.
Try it with your own currency pairs#
Start with EURUSD and a single day of candles. Once the field mapping is clear, choose another supported pair and reuse the same data source. SiftingIO gives you current quotes, historical OHLCV, and a separate streaming path under one credential, so an initial dashboard can also inform a later application integration.
Create your free account and generate an API key, explore the Forex API, or talk to us about your data requirements. If a spreadsheet is a better starting point for your team, try the Google Sheets Forex guide.



