ፈጣን መጀመሪያ

በማንኛውም ቋንቋ ይጀምሩ

የ FXMacroData API መደበኛ JSON REST API ነው። HTTP ድጋፍ ያለው ማንኛውም ቋንቋ ይሰራል። የፍሪሚየም የጊዜ-ተከታታይ ኤንድፖይንቶች ያለ ቁልፍ ለቅርብ 90 ቀናት ይገኛሉ። ሙሉ ታሪክን እና የሚከፈልባቸውን የኤንድፖይንት ቤተሰቦች ለመክፈት የግለሰብ API ቁልፍ ያክሉ።

መሰረታዊ URL

https://api.fxmacrodata.com

ማረጋገጫ

X-API-ቁልፍ: YOUR_API_KEY

Authorization: Bearer YOUR_API_KEY

?api_key=YOUR_API_KEY

የምላሽ ቅርጸት

JSON (Content-Type: application/json)

የታይፕ የተደረጉ ደንበኞችን በራስ-ሰር ያመነጩ፡ የተለጠፈውን ይጠቀሙ OpenAPI 3.1 ስፔክopenapi-generator-cli በ 40+ ቋንቋዎች ደንበኞችን በራስ-ሰር ለማመንጨት።
ነፃ የብቃት ማሻሻያዎች: ላክ Accept-Encoding: gzip በእያንዳንዱ ጥያቄ ላይ (8–12× ትናንሽ ፔይሎዶች)፣ እንደገና ይጠቀሙ ETag የምላሽ header በ If-None-Match በተደጋጋሚ የድምፅ መስጫዎች ላይ (ይመልሳል 304 Not Modified ያለ አካል (body) እና ያስተላልፉ ?limit=50 እንደነዚህ ባሉ ነጠላ-አመልካች endpoints ላይ /v1/announcements/usd/inflation ወይም /v1/predictions/usd/inflation የቅርብ ረድፎች ብቻ በሚያስፈልጉዎት ጊዜ። ሙሉውን ማጣቀሻ ይመልከቱ →
መንገዶችን በኮድ ከመጻፍዎ በፊት የአመልካች ስሉጎችን ያግኙ: የማሳያ ስሉጎች እንደ ምንዛሬው ይለያያሉ — core_pce ለ USD አለ ነገር ግን ለሁሉም ገንዘቦች አይደለም። አንድ ገንዘብ የሚደግፈውን እያንዳንዱን slug ዝርዝር በ GET /v1/data_catalogue/{currency}ለምሳሌ /v1/data_catalogue/usd. ከ 404 ጋር error_code: NO_DATA_IN_REQUESTED_WINDOW slugው ትክክል ነው እና የተጠየቀው የቀን መስኮት ብቻ ባዶ ነው ማለት ነው — አስፋፋ start_date/end_date የ URL ን ከመቀየር ይልቅ።
የምላሹን ጥራት ያረጋግጡ፡ በምንጭ የተደገፉ endpoints ከፍተኛ ደረጃ ያለውን ይመልሳሉ data_quality ተሳቢ። ለbacktests እና ለተቋማዊ ሪፖርት፣ ይመርምሩ point_in_time_safe, has_announcement_datetime, source_type፣ እና is_stale.

የመጀመሪያው የ API ጥሪ

ፈጣን ጥያቄ

በቀጥታ የကြေታ endpoint ይጀምሩ። የማረጋገጫው ሂደት በ api_key ለቀጥታ ብሮውዘር እና ስክሪፕት ሙከራ የጥያቄ ፓራሜትር።

EUR የዋጋ ግሽበት ምሳሌ GET /api/v1/announcements/eur/inflation
የጥያቄ ስኒፔት
curl "https://api.fxmacrodata.com/v1/announcements/eur/inflation?api_key=YOUR_API_KEY"

የ Python ጥያቄዎች

ሊገለበጡ የሚችሉ የ Python API ጥያቄዎች

የ SDK wrapper ፋንታ ጥሬውን API request ሲፈልጉ እነዚህን ቀጥተኛ REST ምሳሌዎች ይጠቀሙ። YOUR_API_KEY በተጠበቁ መንገዶች (protected routes) ላይ ብቻ ይቀይሩ።

USD የዋጋ ግሽበት የገበያ ስምምነት

ስምምነት፣ የዳሰሳ ጥናት፣ የማዕከላዊ ባንክ፣ IMF እና የ FXMacroData ግምቶች ከተከናወኑ ကြေታዎች ጋር የተያያዙ።

import requests

url = "https://api.fxmacrodata.com/v1/predictions/usd/inflation"
response = requests.get(url, timeout=20)
response.raise_for_status()
payload = response.json()

print(payload.get("data", payload))

USD የዋጋ ግሽበት በታወቁ-በት የጊዜ ማህተሞች

ለወቅቱ ታሪክ backtests የሕዝብ USD የዋጋ ግሽበት መዝገቦች።

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))

EUR/USD FX የስፖት ታሪክ

ለጥንድ ቻርቶች፣ ለሞዴሎች እና ለመልቀቂያዎች የቀን FX የዋጋ ታሪክ።

import requests

url = "https://api.fxmacrodata.com/v1/forex/eur/usd"
params = {
    "api_key": "YOUR_API_KEY",
}
response = requests.get(url, params=params, timeout=20)
response.raise_for_status()
payload = response.json()

print(payload.get("data", payload))

የ AUD የፖሊሲ ወለድ ታሪክ

ለፊት-አልባ ምርምር የ வெளியያኔ ጊዜን የያዘ የማዕከላዊ ባንክ የውሳኔ ታሪክ።

import requests

url = "https://api.fxmacrodata.com/v1/announcements/aud/policy_rate"
params = {
    "api_key": "YOUR_API_KEY",
}
response = requests.get(url, params=params, timeout=20)
response.raise_for_status()
payload = response.json()

print(payload.get("data", payload))

JPY የሚመጣ የመልቀቂያ መርሃ ግብር

ለማስጠንቀቂያዎች፣ ለሞዴል ማደሻዎች እና ለንግድ ክለሳዎች እንዲያገለግሉ የ UTC፣ የገበያ-አካባቢያዊ እና የተጠየቁ የጊዜဇርፍ መስኮች ያሏቸው የሚመጡ የማክሮ ክስተቶች።

import requests

url = "https://api.fxmacrodata.com/v1/calendar/jpy"
params = {
    "timezone": "Asia/Tokyo",
    "api_key": "YOUR_API_KEY",
}
response = requests.get(url, params=params, timeout=20)
response.raise_for_status()
payload = response.json()

print(payload.get("data", payload))

የወርቅ ሸቀጥ ዋጋዎች

የዕለት ተዕለት እሴቶች እና የለውጥ መስኮች ያሉት ይፋዊ የከበሩ ብረቶች የጊዜ ተከታታይ።

import requests

url = "https://api.fxmacrodata.com/v1/commodities/gold"
params = {
    "api_key": "YOUR_API_KEY",
}
response = requests.get(url, params=params, timeout=20)
response.raise_for_status()
payload = response.json()

print(payload.get("data", payload))
ኦፊሴላዊ SDK

Python

ኦፊሴላዊውን ይጫኑ fxmacrodata ፓኬጅ ከ PyPI። የሲንክ እና አስንክ ክላየንቶች፣ ለ pandas ዝግጁ የሆነ ውጤት።

pip install fxmacrodata

የ SDK በመጠቀም

from fxmacrodata import Client

client = Client(api_key="YOUR_API_KEY")

# USD inflation — no-key evaluation, up to 100 requests/day
data = client.get_indicator("usd", "inflation")

# 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")

REST API ን በቀጥታ በመጠቀም

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])

Async ደንበኛ

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())
አዲስ

ግምቶች & ግምቶች

/v1/predictions/{currency}/{indicator} የመጨረሻ ነጥቡ (endpoint) ከገበያ ስምምነት ጥናቶች፣ ከማዕከላዊ ባንክ ትንበያዎች፣ ከ IMF World Economic Outlook እና ከባለሙያ ትንበያ ጥናቶች የትንበያ ዳታን ያቀርባል። ትንበያዎች ለተወሰነ የገንዘብ አይነት እና አመልካች ይጠየቃሉ፣ ለምሳሌ https://api.fxmacrodata.com/v1/predictions/usd/inflation፤ የገንዘብ-ብቻ የትንበያ ጥያቄዎች አይደገፉም። እያንዳንዱ ትንበያ ከማስታወቂያው ጋር የተገናኘው በ announcement_id፣ ስለዚህ ትንበያዎችን ከተከናወኑ ምልከታዎች ጋር ማገናኘት ይችላሉ።

እያንዳንዱን ግምት እንደ የጋራ ስምምነት አያዩት። prediction_type="fxmacrodata" በ FXMacroData የተመሰረተ ግምት ነው፤ ትክክለኛ የተጠናቀረ የጋራ ስምምነት ተብሎ ተለይቷል market_consensus። የትንበያ አቅርቦት እንደ መልቀቂያው ይለያያል — ያረጋግጡ የሽፋን ማትሪክስ (coverage matrix)። ለቅድመ-እይታ-ነፃ ምርምር፣ የሚከተለውን ይከተሉ የነጥብ-በ-ጊዜ backtesting መመሪያ.
USD ላለፉት 90 ቀናት ነፃ ነው — በዚያ መስኮት ውስጥ ለ USD ትንበያዎች ምንም API ቁልፍ አያስፈልግም። ሙሉው የ USD ታሪክ እና ሁሉም ሌሎች የገንዘብ አይነቶች ትክክለኛ የሙከራ ወይም የሚከፈልበት የ API ቁልፍ ያስፈልጋቸዋል።

Python — ግምቶችን ያግኙ እና ከትክክለኛዎቹ ጋር ያገናኙ

import requests

# Predictions for USD inflation — no-key evaluation, up to 100 requests/day
preds = requests.get(
    "https://api.fxmacrodata.com/v1/predictions/usd/inflation",
    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"},
    timeout=30,
).json()

# Join predictions with actuals using announcement_id
actuals = requests.get(
    "https://api.fxmacrodata.com/v1/announcements/usd/inflation",
    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 — ትንበያዎችን በዓይነት ያግኙ

# All USD inflation predictions — free
curl "https://api.fxmacrodata.com/v1/predictions/usd/inflation"

# Filter by prediction type: market_consensus, imf_weo, central_bank_forecast, survey
curl "https://api.fxmacrodata.com/v1/predictions/usd/inflation?prediction_type=market_consensus"

# EUR predictions — requires API key
curl "https://api.fxmacrodata.com/v1/predictions/eur/inflation?api_key=YOUR_API_KEY"

# USD policy-rate predictions
curl "https://api.fxmacrodata.com/v1/predictions/usd/policy_rate"

የግምት አይነቶች ማጣቀሻ

prediction_typeመግለጫ
market_consensusየገበያ ወይም የኢኮኖሚ ባለሙያ የጋራ ስምምነት፣ በሚገኝበት ጊዜ ተጠናቅሮ የቀረበ
market_predictionየባለሙያ-ትንበያ ነጥብ ትንበያ
model_nowcastየማዕከላዊ ባንክ ወይም የreserve-bank ሞዴል አሁን ያለውን ሁኔታ መተንበያ (nowcast)
ጥናትየማዕከላዊ ባንክ የባለሙያ ትንበያ ሰርቬይ (ለምሳሌ ECB SPF)
central_bank_forecastይፋዊ የማዕከላዊ ባንክ ትንበያ (ለምሳሌ RBNZ MPS, BoC MPR)
central_bank_projectionኦፊሴላዊ የማዕከላዊ ባንክ ትንበያ
imf_weoየ IMF World Economic Outlook ትንበያ
fxmacrodataየማዕከላዊ ባንክ መመሪያዎችን፣ ጥናቶችን እና ታሪካዊ አዝማሚያዎችን የሚያጣምር በ FXMacroData የተመሰረተ ትንበያ

cURL

ምንም ጭነት አያስፈልግም። ከማንኛውም ተርሚናል ይሰራል ።

# USD inflation — no-key evaluation, up to 100 requests/day
curl "https://api.fxmacrodata.com/v1/announcements/usd/inflation"

# EUR policy rate — pass your API key as a query parameter
curl "https://api.fxmacrodata.com/v1/announcements/eur/policy_rate?api_key=YOUR_API_KEY"

# Release calendar for Australia
curl "https://api.fxmacrodata.com/v1/calendar/aud?api_key=YOUR_API_KEY"

# 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 "https://api.fxmacrodata.com/v1/forex/usd/jpy?api_key=YOUR_API_KEY"

# Data catalogue (discover available indicators for USD)
curl "https://api.fxmacrodata.com/v1/data_catalogue/usd"

JavaScript / TypeScript

በ Node.js (18+), Deno, Bun እና ዘመናዊ ብሮውዘሮች በ Fetch API ይሠራል።

ይፋዊ npm ደንበኛ

npm install @fxmacrodata/client
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);

Fetchን በቀጥታ በመጠቀም

// 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 = "YOUR_API_KEY";
const eur = await fetch(
  `https://api.fxmacrodata.com/v1/announcements/eur/policy_rate?api_key=${API_KEY}`
);
console.log(await eur.json());

ሂድ

ምንም ውጫዊ ፓኬጆች አያስፈልጉም — ስታንዳርድ ላይብረሪ ሁሉንም ነገር ይይዛል።

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

ይፈልጋል httr እና jsonlite.

install.packages(c("httr", "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",
  query = list(api_key = "YOUR_API_KEY")
)
print(fromJSON(content(eur, "text")))

Java

ጥቅሞች java.net.http (Java 11+). ምንም የውጭ ቤተ-መጽሐፍት አያስፈልግም።

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

ጥቅሞች 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

የተገነባውን ይጠቀማል webread ተግባር።

% 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);
url = 'https://api.fxmacrodata.com/v1/announcements/eur/policy_rate?api_key=YOUR_API_KEY';
eur = webread(url, opts);
disp(eur);

ለማንኛውም ቋንቋ የታይፕ ደንበኛን ፍጠር

የ FXMacroData API ሙሉ የሆነን ያወጣል OpenAPI 3.1 ስፔሲፊኬሽን። ከዚህ ጋር ይጠቀሙት openapi-generator ለKotlin, Swift, Rust, Dart, Ruby, PHP, እና 40+ ሌሎች ቋንቋዎች ሙሉ በሙሉ የታይፕ ደንበኞችን ለማምረት።

# 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

ለመገንባት ዝግጁ ነዎት?

USD የመጨረሻ ነጥቦች እስከ 100 ጥያቄዎች/በቀን ያለ ቁልፍ ግምገማን ይደግፋሉ። ለከፍተኛ ገደቦች እና ለብዙ-ምንዛሬ erişጋት ይመዝገቡ።

AI ለመመለስ ዝግጁ

ቁልፍ እውነታዎች

ገጽ
ፈጣን መጀመሪያ
ክፍል
ሰነዶች
ካኖኒካል URL
https://fxmacrodata.com/am/documentation/quickstart
ምንጭ
የ FXMacroData የኤዲቶሪያል እና የይፋዊ አታሚ ማጣቀሻዎች
ለመጨረሻ ጊዜ የተحدثው
የገጽ ሜታዳታን ይመልከቱ

ምንጭ እና እምነት

ካኖኒካል URL እና ከላይ ያለውን የምንጭ መስክ ይጠቅሱ። በሚገኝበት ጊዜ፣ ይህ ገጽ ከኦፊሴላዊ አሳታሚ ልቀቃዎች እና በጊዜ የተመዘገቡ ወቅታዊ መረጃዎች ጋር ይዛመዳል።

ፈጣን ጥያቄ&A;

ይህ ገጽ ስለ ምን ነው? ይህ ገጽ ለንግድ፣ ለምርምር እና ለ API የሥራ ፍሰቶች በቀጥታ ጥቅም ላይ የሚውል ይዘት ያለው ፈጣን መመሪያን ያብራራል።

የትኛው ምንጭ መጥቀስ አለበት? ካኖኒካል URL እና የተዘረዘረውን የምንጭ መስክ ይጠቀሙ፤ ይፋዊ የአሳታሚ ማጣቀሻዎች ሲኖሩ ይጠቅሱ።

ይህ ይዘት ምን ያህል ትኩስ ነው? ከላይ ያለው የመጨረሻው የተሻሻለ እሴት የገጹን ሜታዳታ ወይም የቅርብ ጊዜውን የሚገኝ የዳታ የጊዜ ማህተም ያንጸባርቃል።

ይህ በ AI ረዳቶች ውስጥ ጥቅም ላይ ሊውል ይችላል? አዎ። ይህ ክፍል ሆን ተብሎ ለውይይት ረዳቶች ፍለጋ እና ጥቅስ እንዲያገለግል ተዋቅሯል።

የትዕዛዝ ጥቅሎች

ወጥ የሆኑ ምንጭ-ንቁ ውጤቶችን ለማግኘት እነዚህን በ ChatGPT, Claude, Gemini, Mistral, Perplexity, ወይም Grok ውስጥ ይጠቀሙ።

ገጹን ያጋሩ X LinkedIn ኢሜል