အကြောင်းအရာသို့ ကျော်သွားရန်

အမြန်စတင်ခြင်း

မည်သည့်ဘာသာစကားဖြင့်မဆို စတင်အသုံးပြုပါ

FXMacroData API သည် ဆာဗာဘက်မှ အသုံးပြုရန်အတွက် စံနှုန်းမီ JSON REST API ဖြစ်ပါသည်။ အသုံးပြုသူသည် HTTP ကို အထောက်အကူပြုသော မည်သည့်ဘာသာစကားဖြင့်မဆို အသုံးပြုနိုင်ပါသည်။ USD ကြေညာချက်ဒေတာများ၊ USD ထုတ်ပြန်မှုပြက္ခဒိန်နှင့် ဒေတာကတ်တလော့သည် သော့ချက် (key) မရှိဘဲ အခမဲ့အသုံးပြုနိုင်သည်- အလတ်တလော 90 ရက်များ၊ 15 မိနစ် ထုတ်ပြန်မှုနှောင့်နှေးမှုဖြင့်၊ တစ်နေ့လျှင် အကြိမ်ရေ 100 အထိ တောင်းဆိုမှုများ ပြုလုပ်နိုင်ပါသည်။ ခန့်မှန်းခြေတန်ဖိုးများ (USD အပါအဝင်)၊ အခြားသော ငွေကြေးအားလုံး၊ အချိန်နှင့်တပြေးညီ ထုတ်ပြန်မှုများ နှင့် သမိုင်းကြောင်းဒေတာ အပြည့်အစုံအတွက် API သော့ချက် (key) လိုအပ်ပြီး၊ ၎င်းကို X-API-Key header. မည်သည်တို့ အခမဲ့ဖြစ်သည်ကို ကြည့်ပါ

အခြေခံ URL

https://api.fxmacrodata.com

စစ်ဆေးအတည်ပြုခြင်း

X-API-Key: YOUR_API_KEY

Authorization: Bearer YOUR_API_KEY

ဟောင်းနွမ်းသော ?api_key= query parameter သည် ခေတ်မရှိတော့ပါ- URL များရှိ key များသည် log များထဲသို့ ရောက်ရှိသွားပါသည်။

တုံ့ပြန်မှုပုံစံ

JSON (Content-Type: application/json)

Typed clients များကို အလိုအလျောက် ထုတ်ပေးပါ- ထုတ်ဝေထားသော အရာကို အသုံးပြုပါ OpenAPI 3.1 အသေးစိတ်ဖော်ပြချက် ဖြင့် openapi-generator-cli 40+ ဘာသာစကားများတွင် clients များကို အလိုအလျောက် ထုတ်ပေးရန်။
အခမဲ့ စွမ်းဆောင်ရည် အကျိုးကျေးဇူးများ- ပေးပို့ပါ Accept-Encoding: gzip တောင်းဆိုမှုတိုင်းတွင် (8–12× ပိုမိုသေးငယ်သော payload များ)၊ ပြန်လည်အသုံးပြုပါ ETag response header တွင် If-None-Match ထပ်ခါတလဲလဲ စစ်ဆေးမှုများတွင် (ပြန်ပေးသည် 304 Not Modified body မပါဘဲ) နှင့် ပေးပို့ပါ ?limit=50 ဥပမာအားဖြင့် single-indicator endpoints များတွင် /v1/announcements/usd/inflation သို့မဟုတ် /v1/predictions/usd/inflation လတ်တလော အတန်းများကိုသာ လိုအပ်သောအခါတွင်။ အပြည့်အစုံ ရည်ညွှန်းချက်ကို ကြည့်ပါ →
သင့်ဆာဗာမှ API ကို ခေါ်ဆိုပါ- API သည် ဘရောက်ဇာ မူလနေရာများသို့ CORS header များကို မပေးပို့ပါ၊ ထို့ကြောင့် fetch() ဝဘ်စာမျက်နှာတစ်ခုမှ တောင်းဆိုမှုသည် ဘရောက်ဇာမှ ပိတ်ပင်ထားပါသည်။ သင့် backend မှ FXMacroData ကို ခေါ်ဆိုပြီး API key ကို client-side ကုဒ်များတွင် မထားပါနှင့်။
paths များကို hard-coding မလုပ်မီ indicator slugs များကို ရှာဖွေပါ- ညွှန်ကိန်း slugs များသည် ငွေကြေးအလိုက် ကွဲပြားသည် — core_pce USD အတွက် ရှိသော်လည်း ငွေကြေးတိုင်းအတွက် မရှိပါ။ ငွေကြေးတစ်ခု ပံ့ပိုးပေးသော slug အားလုံးကို စာရင်းပြုစုပါ GET /v1/data_catalogue/{currency}ဥပမာအားဖြင့် /v1/data_catalogue/usd. မည်သည့်အရာဖြစ်သော 200 တစ်ခု data array သည် အလွတ်ဖြစ်နေပြီး မည်သည်ကို သယ်ဆောင်သည် no_data.error_code: NO_DATA_IN_REQUESTED_WINDOW ဆိုသည်မှာ slug သည် အကျုံးဝင်ပြီး တောင်းဆိုထားသော ရက်စွဲဝင်းဒိုးသာ အလွတ်ဖြစ်သည်ဟု ဆိုလိုသည် — ကျယ်ပြန့်စေသည် start_date/end_date URL ကို ပြောင်းလဲခြင်း သို့မဟုတ် ထပ်မံကြိုးစားခြင်းထက် ပို၍ထိရောက်ပါသည်။ 404 သည် ငွေကြေး သို့မဟုတ် indicator slug မှားယွင်းနေသည်ဟု ဆိုလိုပါသည်။
တုံ့ပြန်မှု အရည်အသွေးကို စစ်ဆေးပါ- Source-backed endpoints များသည် ထိပ်တန်းအဆင့်တစ်ခုကို ပြန်ပေးသည် data_quality object။ Backtests များနှင့် အဖွဲ့အစည်းဆိုင်ရာ အစီရင်ခံစာများအတွက် စစ်ဆေးပါ point_in_time_safe, has_announcement_datetime, source_typeနှင့် is_stale. point_in_time_safe ပြတင်းပေါက်အတွင်းရှိ မည်သည့် အတန်းမဆိုတွင် စီးရီး၏ တိုင်းတာထားသော ထုတ်ပြန်မှု ကြန့်ကြာမှုမှ ဆင်းသက်လာသော ထုတ်ပြန်ချိန် ပါရှိနေပါက မှားယွင်းနေသည်၊ ထို့ကြောင့် စစ်ဆေးပါ assumed_release_time_count နှင့် တစ်ကြောင်းချင်းစီအတွက် release_time_assumed မှားယွင်းနေသည်ကို အသုံးမပြုနိုင်ဟု မသတ်မှတ်မီ အလံအမှတ်အသား ပြုလုပ်ပါ။

စျေးကွက်အတွင်း အသုံးပြုခွင့်

FXMacroData မှ RapidAPI အထိ အသုံးပြုပါ

RapidAPI သည် FXMacroData REST API အတွက် ရွေးချယ်နိုင်သော ဈေးကွက်ချန်နယ်တစ်ခု ဖြစ်သည်။ FXMacroData က ဒေတာများကို ပံ့ပိုးပေးသည်; RapidAPI က သင်၏ ဈေးကွက်စာရင်းသွင်းမှု၊ API key၊ တောင်းဆိုမှု ပမာဏနှင့် ငွေတောင်းခံမှုတို့ကို စီမံခန့်ခွဲသည်။ ဤချန်နယ်မှတစ်ဆင့် တောင်းဆိုမှုများအတွက် သီးခြား FXMacroData အကောင့် သို့မဟုတ် key လိုအပ်ခြင်းမရှိပါ။

  1. ဖွင့်ရန် တရားဝင် FXMacroData စာရင်းသွင်းမှု နှင့် အစီအစဉ်တစ်ခုကို ရွေးချယ်ပါ။ လက်ရှိလွှမ်းခြုံမှု၊ သတ်မှတ်ပမာဏ (quotas) နှင့် အသုံးပြုမှုနှုန်း ကန့်သတ်ချက်များ (rate limits) အတွက် ဈေးနှုန်း (pricing) tab ကို စစ်ဆေးပါ။
  2. သင်၏ RapidAPI သော့ကို endpoint playground မှ ကူးယူပြီး သင်၏ ဆာဗာ ပတ်ဝန်းကျင်တွင် ဤသို့ သိမ်းဆည်းပါ - RAPIDAPI_KEY.
  3. တောင်းဆိုမှုများ ပေးပို့ရန် https://fxmacrodata1.p.rapidapi.com အောက်တွင် ပြထားသည့်အတိုင်း RapidAPI headers နှစ်ခုလုံးဖြင့်။
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"

စျေးကွက်အတွင်း အသုံးပြုနိုင်သည့် အချက်အလက် အတိုင်းအတာ

စာရင်းတွင် ကြေညာချက်များ၊ ထုတ်ပြန်မှု ပြက္ခဒိန်များ၊ အချက်အလက် ကတ်တလောက်၊ နေ့စဉ် FX အတိုးနှုန်းများ၊ COT အနေအထားများ၊ ဗဟိုဘဏ် သတင်းများ၊ ဈေးကွက် အချိန်အပိုင်းအခြားများနှင့် ကျန်းမာရေး စစ်ဆေးမှုတို့ ပါဝင်သည်။ ငွေကြေးနှင့် သမိုင်းကြောင်း အသုံးပြုနိုင်မှုသည် သင်၏ RapidAPI အစီအစဉ်ပေါ်တွင် မူတည်သည်။ အထောက်အထား slug များကို ရှာဖွေရန် ကတ်တလောက်ကို အသုံးပြုပါ။

တိုက်ရိုက် FXMacroData အသုံးပြုမှု

ဤစာမျက်နှာပေါ်ရှိ အခြားဥပမာများသည် အသုံးပြုသည် api.fxmacrodata.com နှင့် FXMacroData တစ်ခု X-API-Key လိုအပ်သည့်အခါ။ ချန်နယ်များအကြား Key များနှင့် စာရင်းသွင်းမှုများမှာ သီးခြားစီဖြစ်သည်။ RapidAPI စာရင်းသွင်းမှုတစ်ခုသည် ဖော်ပြပါ REST endpoints များကို လွှမ်းခြုံထားသည်၊ ဝက်ဘ်ဆိုက် စာရင်းသွင်းမှုများ၊ MCP၊ ခန့်မှန်းချက်များ၊ streaming နှင့် webhooks များမှာ သီးခြား ဝန်ဆောင်မှုများ ဖြစ်ကြသည်။

သင်၏ key ကို browser code နှင့် အများပြည်သူဆိုင်ရာ repository များတွင် မထားပါနှင့်။ ပိုမိုရှည်လျားသော ရလဒ်အစုအဝေးများအတွက်၊ လိုက်နာပါ pagination.next_offset until pagination.has_more မှာ မှားယွင်းပါသည်။ သင်၏ API key ကို support ထံသို့ မည်သည့်အခါမျှ မပို့ပါနှင့်။

ပထမဆုံး API call

အမြန်တောင်းဆိုချက် (Quick Request)

ပထမဆုံး အပိုင်းကို မူလအတိုင်း အသုံးပြုနိုင်သည်- USD အချက်အလက်များအတွက် သော့မလိုအပ်ပါ၊ ထုတ်ပြန်ပြီး 15 မိနစ်အကြာတွင် ပေးပို့သည်။ ထည့်သွင်းပါ X-API-Key 22 ငွေကြေးအားလုံးနှင့် server၊ script သို့မဟုတ် notebook တစ်ခုမှ ပေးပို့သော အချိန်နှင့်တစ်ပြေးညီ ပေးပို့မှုအတွက်။

ကီး (Key) မရှိပါ · USD ငွေကြေးဖောင်းပွမှု GET /v1/announcements/usd/inflation
1 · ကီး (Key) မလိုအပ်ပါ
# USD inflation, no key: 15-minute delay, most recent 90 days
curl "https://api.fxmacrodata.com/v1/announcements/usd/inflation?limit=5"
2 · API သော့ဖြင့် · EUR
# EUR inflation: add X-API-Key for all 22 currencies and real-time releases
curl -H "X-API-Key: YOUR_API_KEY" "https://api.fxmacrodata.com/v1/announcements/eur/inflation"

Python requests များ

ကူးယူနိုင်သော Python API တောင်းဆိုမှုများ

SDK wrapper အစား raw API request ကို လိုချင်သောအခါ ဤတိုက်ရိုက် REST ဥပမာများကို အသုံးပြုပါ။ ကာကွယ်ထားသော route များတွင်သာ YOUR_API_KEY ကို အစားထိုးပါ။

USD ငွေကြေးဖောင်းပွမှု ဈေးကွက် သဘောတူညီချက်

အမှန်တကယ် ထုတ်ပြန်ချက်များနှင့် ပေါင်းစပ်ထားသော Consensus၊ စစ်တမ်း၊ ဗဟိုဘဏ်၊ IMF နှင့် FXMacroData ခန့်မှန်းချက်များ။

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

known-at တံဆိပ်များပါရှိသော USD ငွေကြေးဖောင်းပွမှု

point-in-time 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 spot သမိုင်းကြောင်း

Pair charts များ၊ မော်ဒယ်များနှင့် ထုတ်ပြန်မှု အလွှာများအတွက် နေ့စဉ် FX စျေးနှုန်း သမိုင်းကြောင်း။

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

AUD policy-rate သမိုင်းကြောင်း

ကြိုတင်မမြင်ရသော သုတေသနအတွက် ထုတ်ပြန်မှုအချိန်နှင့်အတူ ဗဟိုဘဏ် ဆုံးဖြတ်ချက် သမိုင်းကြောင်း။

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

JPY လာမည့် ထုတ်ပြန်မှု အစီအစဉ်

alert များ စီစဉ်ရန်၊ model refresh များပြုလုပ်ရန်နှင့် trading review များအတွက် UTC, market-local နှင့် တောင်းဆိုထားသော timezone field များပါဝင်သည့် လာမည့် macro events များ။

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

ရွှေကုန်စည် ဈေးနှုန်းများ

နေ့စဉ်တန်ဖိုးများနှင့် အပြောင်းအလဲ fields များပါဝင်သော တရားဝင် အဖိုးတန်သတ္တု အချိန်စီးရီး။

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))
တရားဝင် SDK

Python

တရားဝင်တစ်ခုကို ထည့်သွင်းပါ fxmacrodata PyPI (1.2.x) မှ package။ Sync နှင့် async client များသည် pandas ထဲသို့ တိုက်ရိုက်ထည့်သွင်းနိုင်သော ရိုးရှင်းသည့် JSON dictionary များကို ပြန်ပေးသည်။ Client() key မပါဘဲ အခမဲ့ USD အဆင့်ကို ဖတ်ရှုသည်၊ အောင်မြင်သည် api_key အခြားငွေကြေးတိုင်းနှင့် အချိန်နှင့်တစ်ပြေးညီ ပေးပို့မှုအတွက်။

pip install fxmacrodata

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

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

မှတ်တမ်းအပြည့်အစုံကို စာမျက်နှာအလိုက် ကြည့်ရှုခြင်း

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

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 သည် ဈေးကွက် consensus စစ်တမ်းများ၊ ဗဟိုဘဏ် ခန့်မှန်းချက်များ၊ IMF World Economic Outlook နှင့် ပရော်ဖက်ရှင်နယ် ခန့်မှန်းသူများ၏ စစ်တမ်းများမှ forecast ဒေတာများကို ဖော်ပြပေးပါသည်။ ခန့်မှန်းချက်များကို သတ်မှတ်ထားသော ငွေကြေးနှင့် indicator တစ်ခုအတွက် တောင်းဆိုနိုင်သည်၊ ဥပမာ https://api.fxmacrodata.com/v1/predictions/usd/inflation; ငွေကြေးသီးသန့် ခန့်မှန်းချက် request များကို ထောက်ပံ့မှုမရှိပါ။ ခန့်မှန်းချက်တစ်ခုစီကို ၎င်း၏ ကြေညာချက်နှင့် ဤအရာမှတစ်ဆင့် ချိတ်ဆက်ထားသည် announcement_idထို့ကြောင့် သင်သည် ခန့်မှန်းချက်များကို လက်တွေ့လေ့လာချက်များနှင့် ပေါင်းစပ်နိုင်သည်

ခန့်မှန်းချက်တိုင်းကို consensus အဖြစ် မသတ်မှတ်ပါနှင့်။ prediction_type="fxmacrodata" သည် FXMacroData မှ ထုတ်ပေးသော ခန့်မှန်းချက်ဖြစ်သည်၊ အမှန်တကယ် စုစည်းထားသော consensus ကို ဤသို့ အမှတ်အသားပြုထားသည် market_consensus. Forecast ရရှိနိုင်မှုသည် release အလိုက် ကွဲပြားသည် — ဤအရာကို စစ်ဆေးပါ လွှမ်းခြုံမှု မက်ထရစ်. Look-ahead-free research အတွက်၊ ဤအရာကို လိုက်နာပါ point-in-time backtesting လမ်းညွှန်.
ခန့်မှန်းချက်တန်ဖိုးများအတွက် ငွေကြေးတိုင်းတွင် API key လိုအပ်ပြီး၊ USD လည်း ပါဝင်ပါသည်။ လွှမ်းခြုံမှု — မည်သည့် အရင်းအမြစ်များက အညွှန်းကိန်းတစ်ခုစီကို ခန့်မှန်းပေးသည် — သော့မရှိဘဲ အခမဲ့ဖြစ်သည် /v1/predictions/coverage/{currency}။ စမ်းသပ်သုံးစွဲမှု သို့မဟုတ် ပေးချေပြီးသော key သည် ခန့်မှန်းတန်ဖိုးများကို ပြန်ပေးပါသည်။

Python — ခန့်မှန်းချက်များကို ရယူပြီး အမှန်တကယ်တန်ဖိုးများနှင့် ပေါင်းစပ်ပါ

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 — အမျိုးအစားအလိုက် ခန့်မှန်းချက်များကို ရယူပါ

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

Prediction အမျိုးအစားများ ကိုးကားချက်

prediction_typeဖော်ပြချက်
market_consensusရရှိနိုင်သည့်နေရာတွင် စုစည်းထားသော ဈေးကွက် သို့မဟုတ် စီးပွားရေးပညာရှင်များ၏ သဘောတူညီချက်
market_predictionကျွမ်းကျင် ခန့်မှန်းသူ၏ အချက်အလက် ခန့်မှန်းချက်
model_nowcastဗဟိုဘဏ် သို့မဟုတ် အရန်ဘဏ် မော်ဒယ် nowcast
စစ်တမ်း (survey)Professional forecasters များ၏ ဗဟိုဘဏ် စစ်တမ်း (ဥပမာ ECB SPF)
central_bank_forecastတရားဝင် ဗဟိုဘဏ် ခန့်မှန်းချက် (ဥပမာ RBNZ MPS, BoC MPR)
central_bank_projectionတရားဝင် ဗဟိုဘဏ် ခန့်မှန်းချက်
imf_weoIMF World Economic Outlook ခန့်မှန်းချက်
fxmacrodataဗဟိုဘဏ် လမ်းညွှန်ချက်များ၊ စစ်တမ်းများနှင့် သမိုင်းဝင် လမ်းကြောင်းများကို ပေါင်းစပ်ထားသော FXMacroData မှ ထုတ်ပေးသော ခန့်မှန်းချက်

cURL

ထည့်သွင်းရန် မလိုပါ။ မည်သည့် terminal မှမဆို အလုပ်လုပ်ပါသည်။

# 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

Node.js (18+), Deno နှင့် Bun တို့တွင် server-side အဖြစ် အလုပ်လုပ်ပါသည်။ API သည် CORS header များကို မပေးပို့သောကြောင့် ၎င်းကို ဘရောက်ဇာကုဒ်မှမဟုတ်ဘဲ သင့် backend မှ ခေါ်ဆိုပါ။

တရားဝင် npm client

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 = 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());

သွားပါ

ပြင်ပ package များ မလိုအပ်ပါ — standard library က အားလုံးကို ကိုင်တွယ်ပါသည်။

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",
  add_headers(`X-API-Key` = "YOUR_API_KEY")
)
print(fromJSON(content(eur, "text")))

Java

အသုံးပြုမှုများ java.net.http (Java 11+). ပြင်ပ library များ မလိုအပ်ပါ။

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

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

မည်သည့်ဘာသာစကားအတွက်မဆို typed client တစ်ခု ဖန်တီးပါ

FXMacroData API သည် ပြည့်စုံသော တစ်ခုကို ထုတ်ဝေသည် OpenAPI 3.1 သတ်မှတ်ချက်. ၎င်းကို ဤအရာနှင့် အသုံးပြုပါ openapi-generator Kotlin, Swift, Rust, Dart, Ruby, PHP နှင့် အခြား 40+ ဘာသာစကားများအတွက် fully typed clients များ ထုတ်လုပ်ရန်။

# 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 ထုတ်ပြန်မှုဒေတာသည် သော့ချက် (key) မရှိဘဲ တစ်နေ့လျှင် တောင်းဆိုမှု 100 အကြိမ်အထိ နှင့် ထုတ်ပြန်ပြီး 15 မိနစ် နောက်ကျပြီးမှ အလုပ်လုပ်ပါသည်။ အချိန်နှင့်တပြေးညီ ထုတ်ပြန်မှုများ၊ ခန့်မှန်းခြေတန်ဖိုးများ၊ သမိုင်းကြောင်းဒေတာ အပြည့်အစုံ၊ ပိုမိုမြင့်မားသော ကန့်သတ်ချက်များနှင့် ငွေကြေးအားလုံးအတွက် စာရင်းသွင်းပါ။

AI ဖြင့် ဆောင်းပါးကို အကျဉ်းချုပ်ပါ-

ChatGPT Perplexity Claude Grok Gemini Mistral

AI အဖြေပေးရန် အဆင်သင့်

အဓိကအချက်များ

စာမျက်နှာ
အမြန်စတင်ခြင်း
ကဏ္ဍ
စာရွက်စာတမ်းများ
အဓိက URL
https://fxmacrodata.com/my/documentation/quickstart
အရင်းအမြစ်
FXMacroData အယ်ဒီတာနှင့် တရားဝင် ထုတ်ဝေသူ ရည်ညွှန်းချက်များ
နောက်ဆုံးမွမ်းမံသည့်နေ့
စာမျက်နှာ metadata ကို ကြည့်ပါ

မူလအစနှင့် ယုံကြည်စိတ်ချရမှု

အထက်ပါ canonical URL နှင့် အရင်းအမြစ် field ကို ကိုးကားပါ။ ရရှိနိုင်သည့်နေရာတွင် ဤစာမျက်နှာသည် တရားဝင် ထုတ်ဝေသူ၏ ထုတ်ပြန်ချက်များနှင့် အချိန်မှတ်တမ်းတင်ထားသော အပ်ဒိတ်များသို့ ချိတ်ဆက်ပေးပါသည်။

အမြန်မေးခွန်း&A;

ဤစာမျက်နှာသည် ဘာအကြောင်းလဲ? ဤစာမျက်နှာသည် trading, research နှင့် API workflows များအတွက် တိုက်ရိုက်အသုံးပြုနိုင်သော context ဖြင့် Quickstart အကြောင်းကို ရှင်းပြထားပါသည်။

မည်သည့်အရင်းအမြစ်ကို ကိုးကားသင့်သနည်း။ Canonical URL နှင့် ဖော်ပြထားသော ရင်းမြစ်ကွင်းကို အသုံးပြုပါ၊ ရရှိနိုင်ပါက တရားဝင် ထုတ်ဝေသူ ကိုးကားချက်များကို ကိုးကားပါ။

ဤအကြောင်းအရာသည် မည်မျှလတ်ဆတ်သနည်း။ အထက်ပါ နောက်ဆုံး update ဖြစ်သော တန်ဖိုးသည် စာမျက်နှာ metadata သို့မဟုတ် နောက်ဆုံးရရှိနိုင်သော data timestamp ကို ထင်ဟပ်စေပါသည်။

ယင်းကို AI assistants များတွင် အသုံးပြုနိုင်ပါသလား။ ဟုတ်ကဲ့။ ဤကဏ္ဍကို chat assistants များတွင် ပြန်လည်ရယူရန်နှင့် ကိုးကားရန်အတွက် ရည်ရွယ်ချက်ရှိရှိ ဖွဲ့စည်းထားခြင်း ဖြစ်သည်။

Prompt Packs များ

တစ်သမတ်တည်းရှိသော အရင်းအမြစ်အသိရှိသော ရလဒ်များအတွက် ၎င်းတို့ကို ChatGPT, Claude, Gemini, Mistral, Perplexity သို့မဟုတ် Grok တို့တွင် အသုံးပြုပါ။

စာမျက်နှာကို မျှဝေပါ X LinkedIn အီးမေးလ်