Ukuqala ngokukhawuleza
Build with official macro releases and their history
Release delivery. Supported releases target availability within one second of official publication. See measured release speed by source. Timing varies by release.
History as it was known. Selected series span decades. First prints and subsequent revisions are retained where captured, with publication-time status so backtests can respect what was known.
Plan the next event. The economic calendar connects official release schedules with available official forecasts and separately labelled FXMacroData predictions. Forecast and surprise coverage varies by release.
I-FXMacroData API lu-standard JSON REST API yokusetyenziswa kwiserba. Oluphi na ulwimi olunoxhaso lwe-HTTP lusebenza. Idata yezaziso ze-USD, ikhalenda yokukhululwa kwe-USD, kunye nekhatalogi yedata zisimahla ngaphandle kwekhiyi: iintsuku ze-90 zakutsha kakhulu, ngokoxolo lokukhululwa lwemizuzu eyi-15, ukuya kutsho kwizicelo ezi-100 ngosuku. Amanani aqikelelweyo (aquka i-USD), yonke eminye imali, ukukhululwa kwexesha lokwenyani, kunye nembali epheleleyo zidinga ikhiyi ye-API, ethunyelwe ku- X-API-Key header. Jonga ukuba yintoni elungileyo mahala
i-Base URL
https://api.fxmacrodata.com
uKuqinisekisa
X-API-Key: YOUR_API_KEY
Authorization: Bearer YOUR_API_KEY
Eyadala ?api_key= i-query parameter ayisasebenzi: iikiyi kwi-URL zigqibela kwiilogs.
Ifomathi yephendulo
JSON (Content-Type: application/json)
openapi-generator-cli ukuze zigeneze ngokuzenzekelayo ii-clients kwiilwimi ze-40+.
Accept-Encoding: gzip kuyo yonke i-request (8–12× ii-payloads ezincinci), sebenzisa kwakhona i- ETag i-response header ku If-None-Match kwi-repeat polls (ibuyisela 304 Not Modified ngaphandle kwe-body), kwaye upasse ?limit=50 kwi-endpoints ze-single-indicator ezifana ne- /v1/announcements/usd/inflation okanye /v1/predictions/usd/inflation xa udinga kuphela imigca yakutsha. Jonga i-reference epheleleyo →
limit yamkela ukuya ku-100. Ukuze uqokelele irange epheleleyo, phinda i-request ngokusebenzisa offset bekwe kwi pagination.next_offset until pagination.has_more is false. Jonga i-loop ye-Python ↓
fetch() ukusuka kwikhasi lewebhu kuvimbelelwa nguweb-browser. Witsha i-FXMacroData ukusuka kwi-backend yakho kwaye ugcine i-key ye-API ungayifaki kwikhowudi ye-client-side.
core_pce ikhona kwi-USD kodwa hayi kwi-currency yonke. Bhala yonke i-slug eyixhaswa yi-currency nge- GET /v1/data_catalogue/{currency}, umzekelo /v1/data_catalogue/usd. I-200 apho data i-array ayinanto kwaye ethwele no_data.error_code: NO_DATA_IN_REQUESTED_WINDOW kuthetha ukuba i-slug isebenza kwaye i-date window ecelweyo kuphela eyingenanto — andise start_date/end_date kunoko ukutshintsha i-URL okanye ukuzama kwakhona. I-404 ithetha ukuba i-slug yomali okanye yendikheyitha ayilunganga.
data_quality object. Kwi-backtests kunye ne-institutional reporting, hlola point_in_time_safe, has_announcement_datetime, source_type, kwaye is_stale. point_in_time_safe kuyinyoka xa naluphi na uluhlu kwifenestu lusebenza nexesha lokupublisha eliphuma kwi-release lag yemeko ye-series, ngoko hlola assumed_release_time_count kunye ne-per-row release_time_assumed u-flag ngaphambi kokuba uphathe i-false njengento engasetyenziswayo.
Ukufikelela kwimarike
Sebenzisa i FXMacroData nge- RapidAPI
RapidAPI lithuba lwe-marketplace olukhethwayo lwe-FXMacroData REST API. FXMacroData inikezela ngedatha; RapidAPI ulawula i-marketplace subscription yakho, i-key ye-API, i-request quota kunye ne-billing. Akukho account ye-FXMacroData okanye i-key eyahlukileyo idingekayo kwi-requests kule ndlela.
- Vula i- uluhlu olusemthethweni lwe-FXMacroData kunye nokukhetha i-plan. Jonga i-pricing tab ukuze ubone i-coverage yale mihla, i-quotas kunye ne-rate limits.
- Kopa i-key yakho ye-RapidAPI ukusuka kwi-endpoint playground uze uyigcine kwimeko ye-server yakho njenge
RAPIDAPI_KEY. - Thumela iimfuno ku
https://fxmacrodata1.p.rapidapi.comkunye ne-headers ze-RapidAPI zombini, njengoko kubonisiwe ngezantsi.
curl --request GET \ --url "https://fxmacrodata1.p.rapidapi.com/v1/announcements/usd/inflation?limit=3" \ --header "X-RapidAPI-Key: $RAPIDAPI_KEY" \ --header "X-RapidAPI-Host: fxmacrodata1.p.rapidapi.com"
Ukuphakama kwe-Marketplace endpoint coverage
Urhlu luquka izaziso, amakalenda okuphuma, ikhathala ledatha, iindleko ze-FX zansuku zonke, i-positioning ye-COT, iindaba ze-central-bank, iintsuku ze-market kunye nokuhlola impilo. Ukufikelela kwimali kunye nembali kuxhomekeke kwisicwangciso sakho se-RapidAPI. Sebenzisa ikhathala ukufumana ii-indicator slugs ezixhaswayo.
Ufikelelo lwe-Direct FXMacroData
Ezinye imizekelo kule page isebenzisa api.fxmacrodata.com kunye ne-FXMacroData X-API-Key xa kufuneka. Ii-Keys kunye ne-subscriptions zahlukile phakathi kwee-channels. I-subscription ye-RapidAPI iquka ii-REST endpoints ezibhalweyo; ii-website subscriptions, MCP, ii-forecasts, i-streaming kunye ne-webhooks zizinto ezahlukileyo.
Gcina i-key yakho kude ne-code ye-browser neelipozithi zokuboniswa ngaphandle. Kwiziphumo ezinde, landela pagination.next_offset until pagination.has_more kuyinyoka. Ungaze uthumele i-key yakho ye-API kwi-support.
u-call wokuqala we-API
iRequest eKhawulezileyo
Isiqephu sokuqala sisebenza njengoko sinjalo: akulaviyo i-key ye-data yeUSD, inikezelwa i-15 emva kokukhululwa. Faka X-API-Key for all 62 currencies and real-time delivery, sent from a server, script, or notebook.
# USD inflation, no key: 15-minute delay, most recent 90 days
curl "https://api.fxmacrodata.com/v1/announcements/usd/inflation?limit=5"
# EUR inflation: add X-API-Key for all 62 currencies and real-time releases
curl -H "X-API-Key: YOUR_API_KEY" "https://api.fxmacrodata.com/v1/announcements/eur/inflation"
ii-requests ze-Python
Izicelo ze-Python API ezinokukopiywa
Sebenzisa ezi zikhawulo ziqondileyo ze-REST xa ufuna i-raw API request endaweni ye-SDK wrapper. Tshintsha i-YOUR_API_KEY kuphela kwi-routes ezikhuselekileyo.
i-USD inflation market consensus
Izibonakaliso zeConsensus, i-survey, ibhanki yasebanki, IMF, kunye ne-FXMacroData forecasts ezidityaniswe nezaziso ezifezekisileyo.
import requests
url = "https://api.fxmacrodata.com/v1/predictions/usd/inflation"
headers = {"X-API-Key": "YOUR_API_KEY"}
response = requests.get(url, headers=headers, timeout=20)
response.raise_for_status()
payload = response.json()
print(payload.get("data", payload))
inflation ye-USD kunye nee-timestamps ze-known-at
Iirekhodi zokunyuka kwexabiso lezinto (inflation) ze-USD ezivulekileyo zokuhlolwa kwexesha elidlulileyo.
import requests
url = "https://api.fxmacrodata.com/v1/announcements/usd/inflation"
response = requests.get(url, timeout=20)
response.raise_for_status()
payload = response.json()
print(payload.get("data", payload))
imbali ye-spot ye-EUR/USD FX
Imbali yamanani yemisuzelo ye-FX yansuku yonke ye-pair charts, iimodeli, kunye nee-release overlays.
import requests
url = "https://api.fxmacrodata.com/v1/forex/eur/usd"
headers = {"X-API-Key": "YOUR_API_KEY"}
response = requests.get(url, headers=headers, timeout=20)
response.raise_for_status()
payload = response.json()
print(payload.get("data", payload))
imbali ye-policy-rate ye-AUD
Imbali yezigqibo ze-Central-bank kunye nexesha lemveliso lophando olungenalo i-lookahead.
import requests
url = "https://api.fxmacrodata.com/v1/announcements/aud/policy_rate"
headers = {"X-API-Key": "YOUR_API_KEY"}
response = requests.get(url, headers=headers, timeout=20)
response.raise_for_status()
payload = response.json()
print(payload.get("data", payload))
ishedyuli yokukhutshwa kwe-JPY ezizayo
ii-macro events ezizayo ne-UTC, i-market-local, kunye nee-requested-timezone fields zokuhlela ii-alerts, i-model refreshes, kunye nee-trading reviews.
import requests
url = "https://api.fxmacrodata.com/v1/calendar/jpy"
params = {
"timezone": "Asia/Tokyo",
}
headers = {"X-API-Key": "YOUR_API_KEY"}
response = requests.get(url, params=params, headers=headers, timeout=20)
response.raise_for_status()
payload = response.json()
print(payload.get("data", payload))
Ixabiso le-Gold commodity
i-time series esemthethweni yezinto ezixabisekileyo (precious-metals) eenamanani ansuku yonke kunye nee-fields zotshintsho.
import requests
url = "https://api.fxmacrodata.com/v1/commodities/gold"
headers = {"X-API-Key": "YOUR_API_KEY"}
response = requests.get(url, headers=headers, timeout=20)
response.raise_for_status()
payload = response.json()
print(payload.get("data", payload))
Python
Faka i-official fxmacrodata ipaki evela kuPyPI (1.2.x). I-clients ye-sync ne-async ibuyisela ii-dictionaries ezi-plain ze-JSON ezilayida ngqo ku-pandas. Client() ngaphandle kwe-key ifunda i-tier ye-free ye-USD; nika api_key kunye ne-real-time delivery ye-currency enye nayiphi na.
Ukusebenzisa i-SDK
from fxmacrodata import Client # USD inflation — no key needed: 15-minute delay, most recent 90 days data = Client().get_indicator("usd", "inflation") print(data["data"][0]) # Add X-API-Key for all 62 currencies and real-time releases client = Client(api_key="YOUR_API_KEY") # EUR policy rate — requires API key rate = client.get_indicator("eur", "policy_rate") # Forex price data — requires API key fx = client.get_fx_price("usd", "jpy")
Ukusebenzisa i-REST API ngqo
import requests resp = requests.get( "https://api.fxmacrodata.com/v1/announcements/usd/inflation", timeout=30, ) resp.raise_for_status() payload = resp.json() print(payload["data_quality"]["point_in_time_safe"], payload["data"][0])
Ukupagelela imbali epheleleyo
import requests URL = "https://api.fxmacrodata.com/v1/announcements/eur/inflation" HEADERS = {"X-API-Key": "YOUR_API_KEY"} rows, offset = [], 0 while True: resp = requests.get( URL, params={"limit": 100, "offset": offset}, headers=HEADERS, timeout=30, ) resp.raise_for_status() page = resp.json() rows.extend(page["data"]) if not page["pagination"]["has_more"]: break offset = page["pagination"]["next_offset"] print(len(rows), "rows")
i-Async client
import asyncio from fxmacrodata import AsyncClient async def main(): async with AsyncClient(api_key="YOUR_API_KEY") as client: data = await client.get_indicator("eur", "inflation") print(data) asyncio.run(main())
Izimo ezilindelekileyo & Izibikelelo
I- /v1/predictions/{currency}/{indicator} endpoint ibonisa idata yesibikelelo evela kwiisurveye zesivumelwano semakethe, imiboniso yibhanki yasebenzweni, IMF World Economic Outlook, kunye neesurveye zabapredikshini abachanekileyo. Iz prediction zicelwa kwimalu ethile kunye nendlela yokuzoba, efana ne https://api.fxmacrodata.com/v1/predictions/usd/inflation; i-requests zezimo ezilindelekileyo zemaluthelo kuphela azixhaswa. Isimo ngasinye sixhunywe nesaziso saso nge- announcement_id, ukuze ukwazi ukudibanisa iziqikelelo ne-observations ezivavanyisweyo.
prediction_type="fxmacrodata" yisimo esiveliswe yi-FXMacroData; i-consensus eyi-compiled yenyani ibhalwe njenge- market_consensus. Ukufumaneka kwe-Forecast kuyahluka ngokokuveliswa — hlola i- i-coverage matrix. Kucalulo olungenazo i-look-ahead, landela i- igayidi ye-point-in-time backtesting.
/v1/predictions/coverage/{currency}. I-key yokuzama okanye eyokuhlawulelwa ibuyisa ixabiso le-forecast.
Python — thatha izibikelelo udibanise nezinto ezenzekileyo
import requests HEADERS = {"X-API-Key": "YOUR_API_KEY"} # Predictions for USD inflation — requires API key preds = requests.get( "https://api.fxmacrodata.com/v1/predictions/usd/inflation", headers=HEADERS, timeout=30, ).json() for group in preds["data"]: print(group["announcement_id"], group["date"]) for p in group["predictions"]: print(f" {p['prediction_source_label']}: {p['predicted_value']}") # Filter by prediction type market = requests.get( "https://api.fxmacrodata.com/v1/predictions/usd/inflation", params={"prediction_type": "market_consensus"}, headers=HEADERS, timeout=30, ).json() # Join predictions with actuals using announcement_id actuals = requests.get( "https://api.fxmacrodata.com/v1/announcements/usd/inflation", headers=HEADERS, timeout=30, ).json() actuals_by_id = {row["announcement_id"]: row for row in actuals["data"]} for group in preds["data"]: actual = actuals_by_id.get(group["announcement_id"]) if actual: print(f"{group['date']}: actual={actual['val']}, forecast={group['predictions'][0]['predicted_value']}")
cURL — fetch predictions ngokohlobo
# Which sources forecast USD indicators — free, no key curl "https://api.fxmacrodata.com/v1/predictions/coverage/usd" # All USD inflation predictions — requires API key curl -H "X-API-Key: YOUR_API_KEY" "https://api.fxmacrodata.com/v1/predictions/usd/inflation" # Filter by prediction type: market_consensus, imf_weo, central_bank_forecast, survey curl -H "X-API-Key: YOUR_API_KEY" "https://api.fxmacrodata.com/v1/predictions/usd/inflation?prediction_type=market_consensus" # EUR policy-rate predictions curl -H "X-API-Key: YOUR_API_KEY" "https://api.fxmacrodata.com/v1/predictions/eur/policy_rate"
i-Reference yezinhlobo ze-Prediction
| prediction_type | Inkcazo |
|---|---|
| market_consensus | Isivumelwano semarike okanye se-economist, apho kukhona |
| market_prediction | Ukuqikelela kwe-point komqikeleli onobuchule |
| model_nowcast | u-nowcast wemodeli yebhanki yasebenzise (central-bank) okanye yebhanki yezigcini (reserve-bank) |
| survey | Uphando lwe-central-bank lwaba-forecasters abachaphazelekayo (umz. ECB SPF) |
| central_bank_forecast | Ukuqikelela okusemthethweni kwe-central-bank (umz. RBNZ MPS, BoC MPR) |
| central_bank_projection | Isimo sekamva esemthethweni sebhanki yasebenzweni |
| imf_weo | ukuqikelela kwe-IMF World Economic Outlook |
| fxmacrodata | i-prediction eyenziwe yi-FXMacroData edibanisa i-guidance ye-central-bank, i-surveys, kunye nee-historical trends |
cURL
Akukho kufuneka ukufakwa. Isebenza kulo nayiphi na i-terminal.
For an event monitor, the economic calendar API guide connects scheduled events, released values, historical queries and the live event stream.
# USD inflation — no-key evaluation, up to 100 requests/day curl "https://api.fxmacrodata.com/v1/announcements/usd/inflation" # EUR policy rate — send your API key in the X-API-Key header curl -H "X-API-Key: YOUR_API_KEY" "https://api.fxmacrodata.com/v1/announcements/eur/policy_rate" # Release calendar for Australia — requires API key curl -H "X-API-Key: YOUR_API_KEY" "https://api.fxmacrodata.com/v1/calendar/aud" # Release calendar converted to a requested IANA timezone curl "https://api.fxmacrodata.com/v1/calendar/usd?indicator=gdp&timezone=America/Sao_Paulo" # Forex price history — requires API key curl -H "X-API-Key: YOUR_API_KEY" "https://api.fxmacrodata.com/v1/forex/usd/jpy" # Data catalogue (discover available indicators for USD) curl "https://api.fxmacrodata.com/v1/data_catalogue/usd"
JavaScript / TypeScript
Sisebenza kwicala le-server kwi-Node.js (18+), i-Deno, kunye ne-Bun. I-API ayithumeli i-headers ze-CORS, ngoko ke yitshatshe ukusuka kwi-backend yakho kunoko ukusuka kwikhowudi ye-browser.
i-client esemthethweni ye-npm
import { FXMacroDataClient } from "@fxmacrodata/client"; const client = new FXMacroDataClient({ apiKey: "YOUR_API_KEY", }); // Public endpoint example const usdInflation = await client.announcements("usd", "inflation"); // Non-USD endpoint example (requires paid key) const eurRate = await client.announcements("eur", "policy_rate"); console.log(usdInflation, eurRate);
Ukusebenzisa i-Fetch ngqo
// USD inflation — no-key evaluation, up to 100 requests/day const res = await fetch( "https://api.fxmacrodata.com/v1/announcements/usd/inflation" ); const data = await res.json(); console.log(data); // With API key for non-USD const API_KEY = process.env.FXMD_API_KEY; const eur = await fetch( "https://api.fxmacrodata.com/v1/announcements/eur/policy_rate", { headers: { "X-API-Key": API_KEY } } ); console.log(await eur.json());
Hamba
Akukho packages zangaphandle ezifunekayo — i-standard library iphatha konke.
package main import ( "encoding/json" "fmt" "net/http" "io" ) func main() { // USD inflation — no-key evaluation, up to 100 requests/day resp, err := http.Get("https://api.fxmacrodata.com/v1/announcements/usd/inflation") if err != nil { panic(err) } defer resp.Body.Close() body, _ := io.ReadAll(resp.Body) var result map[string]interface{} json.Unmarshal(body, &result;) fmt.Println(result) }
R
Kufuneka httr kwaye jsonlite.
library(httr) library(jsonlite) # USD inflation — no-key evaluation, up to 100 requests/day res <- GET("https://api.fxmacrodata.com/v1/announcements/usd/inflation") data <- fromJSON(content(res, "text", encoding = "UTF-8")) # Convert to data frame df <- as.data.frame(data$data) head(df) # With API key for non-USD eur <- GET( "https://api.fxmacrodata.com/v1/announcements/eur/policy_rate", add_headers(`X-API-Key` = "YOUR_API_KEY") ) print(fromJSON(content(eur, "text")))
Java
Iindlela zokusetyenziswa java.net.http (Java 11+). Akukho libraries zangaphandle ezifunekayo.
import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; public class FXMacroDataExample { public static void main(String[] args) throws Exception { var client = HttpClient.newHttpClient(); var request = HttpRequest.newBuilder() .uri(URI.create("https://api.fxmacrodata.com/v1/announcements/usd/inflation")) .build(); var response = client.send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.body()); } }
C# / .NET
Iindlela zokusetyenziswa HttpClient (.NET 6+).
using System.Net.Http; using System.Text.Json; var client = new HttpClient(); // USD inflation — no-key evaluation, up to 100 requests/day var json = await client.GetStringAsync( "https://api.fxmacrodata.com/v1/announcements/usd/inflation" ); var doc = JsonDocument.Parse(json); Console.WriteLine(doc.RootElement);
MATLAB
Isebenzisa i-built-in webread function.
% USD inflation — no-key evaluation, up to 100 requests/day data = webread('https://api.fxmacrodata.com/v1/announcements/usd/inflation'); disp(data); % With API key for non-USD opts = weboptions('Timeout', 30, 'HeaderFields', {'X-API-Key', 'YOUR_API_KEY'}); url = 'https://api.fxmacrodata.com/v1/announcements/eur/policy_rate'; eur = webread(url, opts); disp(eur);
Vela i-typed client yanoma luliphi ulwimi
i-FXMacroData API ishicilela into epheleleyo i-specification ye-OpenAPI 3.1. Yisebenzise kunye ne openapi-generator ukuze kube ne-clients ezinemiga epheleleyo ye-Kotlin, Swift, Rust, Dart, Ruby, PHP, kunye ne-40+ ezinye iilwimi.
# Install the openapi-generator CLI npm install @openapitools/openapi-generator-cli -g # Generate a Go client openapi-generator-cli generate \ -i https://api.fxmacrodata.com/openapi.json \ -g go \ -o ./fxmacrodata-go-client # Generate a Java client openapi-generator-cli generate \ -i https://api.fxmacrodata.com/openapi.json \ -g java \ -o ./fxmacrodata-java-client
Ulungile ukwakha?
Idata yokukhululwa kwe-USD isebenza ngaphandle kwekhiyi, ukuya kutsho kwizicelo ezi-100 /ngosuku kwaye imizuzu eyi-15 emva kokupashwa. Bhalisa ukuze ufumane ukukhululwa kwexesha lokwenyani, amanani aqikelelweyo, imbali epheleleyo, imingcele ephakamileyo, kunye nayo yonke imali.