Before you follow the steps, create a free SiftingIO account and get your API key. No credit card is required. Add the Forex and Commodities Free feeds to your account, then use the small evaluation below to check real-time quotes and historical data before building your application.
A forex data API and a commodity price API often belong in the same project. A treasury dashboard needs currency rates alongside energy costs. A market research page might show EURUSD, gold and crude oil. A pricing application may need both a commodity's dollar price and the currency in which its customers pay.
The connection is useful, but the numbers are not interchangeable. A currency pair expresses one currency in another. Gold has a physical unit as well as a quote currency. Oil needs an identified price series. Each observation also has a time and a meaning: a bid, an ask, a completed historical close or a live update.
This guide builds a small evaluation around three instruments: EURUSD, XAUUSD and WTIUSD. The deliverable is a worksheet recording what your application can safely do with each series. You can follow it with cURL, an API client and a spreadsheet. There is no programming-language requirement.
Start with three instruments and one clear use case#
Decide what the first screen must answer. For example: “Show the latest available EURUSD, gold and WTI quotes, with a short historical chart and an honest indication of when the data last changed.” That is specific enough to test. “Get all financial data” is not.
The SiftingIO Forex Data API supplies real-time and historical data for supported major, cross and exotic currency pairs. The Commodities Data API covers metals, energy and agricultural price series, including gold, silver, copper, WTI, Brent and natural gas. REST provides current observations and historical bars; WebSocket provides live updates. The same API key can be used across enabled feeds, while access and usage limits depend on the market subscriptions attached to the account.
Use this starting worksheet:
| Instrument | API identifier | REST market | First question to settle |
|---|---|---|---|
| Euro / US dollar | EURUSD | forex | Does the displayed number mean US dollars for one euro? |
| Gold / US dollar | XAUUSD | commodities | Are the price and physical unit clearly identified? |
| WTI crude oil | WTIUSD | commodities | Is this the particular oil price series the application needs? |
These identifiers are provider-specific request values, not a promise that every service uses the same spelling. Check the Forex symbol catalog and Commodities symbol catalog before extending the list. Keep the API identifier separate from a friendlier display label such as “Gold”. That avoids accidentally sending a label as a request parameter.
Get a free API key and confirm both feeds are enabled#
Create the account, enable the required Free feeds and generate a key in the dashboard. Then consult the API quickstart for the current authentication instructions. For the REST requests below, send the key in the X-API-Key header.
The distinction between a key and a subscription matters. A valid key identifies the account; it does not make an unenabled market available automatically. If a Forex request succeeds and a Commodities request returns an access error, check the Commodities subscription before rewriting the request code.
At the time of writing, the published Free plan limits include 10,000 REST calls per month and a 60-requests-per-minute limit per market. The plan also lists WebSocket access with one connection and five symbol subscriptions. It is intended for evaluation, personal projects and internal, non-commercial use. Customer-facing or commercial deployments need the applicable plan permissions; possessing a key is not a distribution licence.
Keep the real key in a private environment variable or your API client's secret store. In the commands below, $SIFTING_API_KEY means that privately configured value. Do not paste a working key into a public repository, article comment, screenshot or browser-delivered application. This guide does not require sharing your key with anyone.
Read a real-time quote before drawing a chart#
Make one request for each instrument:
curl --fail-with-body \
-H "X-API-Key: $SIFTING_API_KEY" \
"https://api.sifting.io/v1/last/quote/forex/EURUSD"
curl --fail-with-body \
-H "X-API-Key: $SIFTING_API_KEY" \
"https://api.sifting.io/v1/last/quote/commodities/XAUUSD"
curl --fail-with-body \
-H "X-API-Key: $SIFTING_API_KEY" \
"https://api.sifting.io/v1/last/quote/commodities/WTIUSD"
These are request templates, not recorded live results. Your response depends on current coverage, market conditions and account access. Inspect the HTTP status and body together. A JSON response containing an error is not a successful price observation.
The latest quote endpoint returns bid and ask prices, sizes, a symbol and a timestamp. Read the field names carefully:
| Field | Meaning | Evaluation check |
|---|---|---|
s | Symbol | It matches the instrument requested |
b and a | Bid and ask prices | The application parses them as numerical values before calculations |
B and A | Bid and ask sizes | Their interpretation is established before display |
t | Observation timestamp in Unix milliseconds | It is converted correctly and retained with the price |
The REST quote prices and sizes are JSON strings. Concatenating them as text will not calculate a spread. For a simple illustration, an invented bid of 1.1000 and ask of 1.1002 have a spread of 0.0002. Their arithmetic midpoint is 1.1001. Label a midpoint as a calculated midpoint; it is not the same thing as a last trade or an executable customer price.
This also helps explain why two screens can disagree without either request being malformed. One may show the bid, another the ask and a third a calculated value. SiftingIO supplies aggregated market data; an observation is not an order, a trading commitment or a guarantee of execution at that price. Record the field used by the application instead of keeping an unexplained column called “price”.
Add currency and unit information to the worksheet#
For EURUSD, the quote direction is part of the number's definition. A hypothetical rate of 1.10 means 1.10 US dollars per euro. Its reciprocal is approximately 0.9091 euros per US dollar. Reversing the pair reverses the calculation; changing a label without changing the number creates an error.
For XAUUSD, the gold instrument page identifies the quotation as US dollars per troy ounce. “USD” alone is not a complete unit label for a commodity. The distinction becomes important when a downstream worksheet contains quantities in grams, kilograms or some other unit.
For WTIUSD, confirm the series definition and unit against the relevant instrument documentation. Do not quietly substitute Brent because both are crude oil, or describe a generic series as a particular dated contract without supporting metadata. The same discipline applies when you later add natural gas, industrial metals or agricultural commodities.
Extend your worksheet with four columns: quote currency, unit, observation type and intended use. If any of those is unknown, pause the derived calculation while keeping the raw observation available for inspection. A missing unit is a documentation question to resolve, not a reason to invent a conversion factor.
Suppose a research screen converts a dollar-denominated commodity price into euros. It needs an appropriately timed EURUSD rate and a documented conversion direction. Dividing USD per unit by USD per EUR gives EUR per unit. That is dimensional arithmetic, not a forecast about either market. For a fuller discussion of currency direction and rounding, use the currency-conversion guide.
Test historical Forex and commodity data in a bounded window#
Current quotes answer what is available now. Historical OHLCV bars answer what happened during specified intervals. Test them separately so that a working quote request does not get mistaken for verified historical coverage.
Start with a short, completed window and an hourly interval:
curl --fail-with-body --compressed \
-H "X-API-Key: $SIFTING_API_KEY" \
-H "Accept-Encoding: gzip" \
"https://api.sifting.io/v1/hist/forex/EURUSD/bars?start=2026-10-26&end=2026-10-27&interval=1h&limit=100"
curl --fail-with-body --compressed \
-H "X-API-Key: $SIFTING_API_KEY" \
-H "Accept-Encoding: gzip" \
"https://api.sifting.io/v1/hist/commodities/XAUUSD/bars?start=2026-10-26&end=2026-10-27&interval=1h&limit=100"
Use the Commodities route with WTIUSD for the third instrument. The examples send the compression header and ask cURL to decompress the response. Read the Forex historical-bars reference and Commodities historical-bars reference for the exact parameter and pagination rules.
Each bar has an opening timestamp t and open, high, low and close fields o, h, l and c. Its close is a historical price observation for that bucket. It is not simply a live quote retrieved later. Record the requested interval, actual first and last timestamps and number of returned bars.
The documented start and end bounds apply to bar timestamps. An end date at midnight can include a bar opening at that midnight; it does not automatically mean “include the entire named calendar day”. Decide which completed observations your study needs, then select and label the resulting range explicitly.
The v field deserves special attention. In the Forex historical endpoint it represents the source's reported tick count, or zero when unavailable, rather than traded currency volume. The Commodities bars documentation describes tick-count volume. Neither is a basis for claiming that a certain number of physical units changed hands. Preserve the endpoint's definition when exporting the data to a spreadsheet.
Verify coverage instead of assuming the first page is complete#
SiftingIO lists 25+ years of Forex history and 20+ years of Commodities history for supported series. The historical-depth table uses EURUSD and XAUUSD as reference instruments and states that full available depth is included on every plan, Free through Ultra. The actual range varies by instrument. It does not follow that every currency pair, commodity or interval begins on the same date.
Write down the period required by the application before requesting a large history. “Ten years of daily gold observations” and “three months of hourly oil observations” are different requirements. A short successful sample establishes that the integration works for that sample; it does not establish the complete older range.
Check meta.next_cursor after each response. When another page is indicated, request it using the returned token according to that endpoint's documentation. Treat the token as opaque. Do not construct one from a guessed timestamp or stop solely because the chart already contains enough points to look convincing.
Your coverage record should distinguish these outcomes:
| Result | What it establishes | What to record next |
|---|---|---|
| Populated page with a next cursor | Some requested observations are available | Continue pagination |
| Completed pagination with the required range present | The retrieved sample meets the stated date requirement | Save actual range and checks |
| Empty result in a known closed period | No observations were returned for that window | Check the expected schedule and a separate open window |
| History begins after the requested date | The retrieved sample is shorter than requested | Show the actual start and investigate coverage |
| Error or interrupted pagination | Retrieval did not complete | Preserve the error and resume safely |
The missing-candles guide explains how to investigate gaps without manufacturing replacement prices. Keep a coverage shortfall visible even if the rest of the chart renders normally.
Align observations before comparing markets#
An FX quote timestamp, a commodity quote timestamp and a historical bar's opening timestamp describe different events. Putting them in adjacent spreadsheet rows does not make them simultaneous.
For a real-time display, retain the timestamp separately for each instrument. Decide how old an observation may be before the screen marks it as old or unavailable. That threshold belongs to the use case. A slow research summary and an actively monitored price panel need not use the same rule.
For historical comparisons, select a common valuation convention and check the actual bar windows. The same calendar date does not prove that two daily observations represent the same closing instant. Scheduled breaks, holidays and different source conventions can all affect the comparison. Inspect interval boundaries before calculating changes or correlations.
Keep response-generation time separate from observation time as well. A fresh meta.as_of says when the historical response was produced; it does not turn an older bar into a new market observation. Likewise, fast HTTP delivery does not establish that a quoted price changed recently.
If you add live streaming, use the WebSocket protocol and verify the product identifiers: fx for Forex and com for Commodities. An authentication acknowledgement establishes the connection's access and limits. A subscription acknowledgement establishes acceptance of the requested subscription. Neither alone proves that a new price has arrived. Check actual ticks and their timestamps, including after reconnection.
Calculate the request budget before choosing a refresh rate#
The Free plan is useful for a small evaluation. A continuously refreshed dashboard can consume a monthly allowance much faster than a short manual test. Count requests by market and include historical pages, retries and any extra endpoints.
Assume one REST quote request per instrument per refresh round. The following are invented workload scenarios, not measured SiftingIO usage:
| Scenario | Forex quote calls | Commodities quote calls | Total quote calls |
|---|---|---|---|
| Twenty manual rounds for three instruments | 20 | 40 | 60 |
| Refresh each minute for one six-hour day | 360 | 720 | 1,080 |
| Same six-hour schedule on 22 days | 7,920 | 15,840 | 23,760 |
The last row assumes 360 refresh rounds per day and no extra refresh at the ending boundary. Its Forex quote workload fits within a 10,000-call monthly allowance before other requests. Its Commodities workload exceeds that allowance because the example requests two commodity symbols separately. Staying below a per-minute rate limit does not mean staying below the monthly quota.
Choose the architecture after understanding that workload. An occasional lookup may need only REST. A continuously updated screen may be better served by permitted WebSocket subscriptions. Shared server-side retrieval can prevent every viewer from independently requesting the same observation, but usage rights still apply. Check the plan and streaming limits rather than treating WebSocket as an unlimited alternative.
The request-volume calculator guide walks through larger workloads. For this evaluation, write down the refresh schedule and the number of independent readers before multiplying the instrument count.
Make the worksheet decide what the application displays#
A useful evaluation ends with explicit behavior, not a collection of successful screenshots. Add the following cases to your worksheet and decide what the screen should do in each one:
| Check | Pass condition | If the condition is not met |
|---|---|---|
| Authentication and feed access | Both selected markets accept the account's requests | Resolve key or subscription access before interpreting data |
| Instrument meaning | Symbol, currency, unit and chosen price field are recorded | Withhold conversions and unexplained derived values |
| Quote freshness | Observation time meets the application's stated rule | Mark the value old or unavailable |
| Historical completeness | Pagination and actual coverage satisfy the requirement | Display the retrieved range and the outstanding gap |
| Comparable observations | Historical windows and price meanings are compatible | Align them before calculating cross-market statistics |
| Workload | Monthly calls and request rate fit the plan | Change the retrieval design or choose suitable capacity |
Use the errors and rate-limits reference when implementing those decisions. An authentication problem, missing feed access, an unsupported symbol and a rate limit are different failures. Repeating the same malformed request rapidly will not resolve any of them.
For transient failures, use bounded retries and retain the failure state if recovery does not happen. During a market closure, do not fabricate a new timestamp around the last observed value. A chart can retain a clearly labelled historical point while the live panel explains that a newer acceptable observation is unavailable.
Inspect the same history in Excel or CSV#
You do not need to build a charting application to inspect the results. SiftingIO Market Data Export lets you download historical data as CSV or Excel. Its account-free preview covers recent intraday observations; use your signed-in account and API key for older dates and the relevant access permissions.
Export the same instrument, interval and date window used in the REST evaluation. Compare timestamps and selected values before adding spreadsheet calculations. If a tool reports a partial result, keep that warning with the file instead of treating a successful download as evidence of complete history.
Save the worksheet beside the export. Record when it was retrieved, the actual covered period, quote currency, unit, endpoint and any missing-data decision. That small record makes it easier for another person to reproduce the analysis without guessing which “gold price” column you meant.
For a future extension, the commodity procurement and FX cost model shows how commodity and currency movements enter one purchasing-cost calculation. Establish the input definitions here first, then apply a business model to them.
Questions to settle before moving beyond the prototype#
Is there a free Forex and commodity price API?#
SiftingIO offers Free feeds for both markets without a credit card, subject to the published quotas and use permissions. Enable the feeds required by your evaluation, generate a key and test the actual instruments. The free key is a practical starting point, not a promise of unlimited requests or unrestricted commercial redistribution.
Does Free include historical data, or only live prices?#
Full available historical depth is included on every SiftingIO tier. Forex and Commodities have different published depth figures, and exact coverage varies by series. Test your required dates and intervals; distinguish history availability from the number of calls needed to retrieve it.
Should a gold and oil dashboard use REST or WebSocket?#
Use REST for explicit current observations and historical requests. Consider WebSocket when the application needs continuing live updates. Decide using the refresh requirement, number of instruments, account permissions and connection limits. A stream does not replace a historical query or establish that disconnected intervals were recovered.
What should the first working version prove?#
It should prove that the account can access the selected feeds, every number has a clear meaning, observation times are handled correctly and the required history can be retrieved within the usage budget. Once those checks pass, charts, alerts and research calculations have a sounder foundation.
Start with a free SiftingIO API key, complete the three-instrument worksheet and keep the results with your first dataset. You will have something more useful than an impressive-looking price panel: a record of what the application knows, what it still needs to verify and how it should behave when data is unavailable.
This guide describes a technical evaluation using illustrative calculations. It is not investment advice, a forecast or a guarantee of execution, coverage for every instrument, or uninterrupted data delivery. Product limits and permissions are governed by the current plan and terms.



