وب‌سرویس طلا

وب‌سرویس قیمت طلای ایران

Live Emami and Bahar Azadi coins, 18K gram gold, mesghal, ounce benchmarks, and coin bubbles — same REST endpoint as the وب‌سرویس ارز.

شروع سریع

Full base URL is issued with your API subscription. Examples below use {API_BASE} as a placeholder.

GET panel-snapshot?symbols=sekee,geram18,ons
نمونه درخواست
curl -s "{API_BASE}/panel-snapshot?symbols=sekee,geram18,ons"

نمونه پاسخ‌ها

Emami gold coin
{
  "symbol": "sekee",
  "price": 78560000,
  "updated_at": "2026-07-09T10:42:18+03:30",
  "returns": { "day": 0.41, "week": 1.35, "month": 4.10 }
}
18K gold / gram
{
  "symbol": "geram18",
  "price": 9658000,
  "updated_at": "2026-07-09T10:42:18+03:30",
  "returns": { "day": 0.38, "week": 1.20, "month": 3.90 }
}
Gold ounce (USD)
{
  "symbol": "ons",
  "price": 3342,
  "updated_at": "2026-07-09T10:42:18+03:30",
  "returns": { "day": 0.15, "week": 0.82, "month": 2.40 }
}

مرجع وب‌سرویس

Endpoint names below are relative to your subscription base URL ({API_BASE}). Most symbols are quoted in IRR; the international ons (ounce) benchmark is in USD. Timestamps use Asia/Tehran (IRST, UTC+3:30).

نمای لحظه‌ای

Current coin and bullion prices with Tehran updated_at and pre-calculated returns (day, week, month, year, YTD). Request up to 40 symbols in one call.

GET panel-snapshot?symbols=sekee,geram18,ons
پارامترتوضیح
symbolsRequired. Comma-separated gold symbol codes, e.g. sekee, geram18, ons, sekeb.

فیلدهای پاسخ (each item in rows[]):

  • symbol — API symbol code
  • price — latest quote (IRR for coins/bullion; USD for ons)
  • updated_at — ISO 8601 timestamp, Tehran offset
  • last_date — trading date (YYYY-MM-DD)
  • returns.day|week|month|year|ytd — % change vs prior period close
نمونه پاسخ
{
  "rows": [
    {
      "symbol": "sekee",
      "price": 1810100000,
      "updated_at": "2026-07-09T11:17:51+03:30",
      "last_date": "2026-07-09",
      "returns": {
        "day": 0.41,
        "week": 1.35,
        "month": 4.10,
        "year": 22.50,
        "ytd": 15.80
      }
    },
    {
      "symbol": "ons",
      "price": 3342,
      "updated_at": "2026-07-09T11:17:51+03:30",
      "last_date": "2026-07-09",
      "returns": { "day": 0.15, "week": 0.82, "month": 2.40 }
    }
  ]
}

نمای لحظه‌ای همه نمادها

Single call returning live prices for every registered gold and currency symbol. Use for market heatmaps, screener tables, and portfolio dashboards.

GET panel-snapshot-all

فیلدهای پاسخ:

  • rows[] — same shape as live snapshot, all symbols
  • updated_at — batch timestamp when available
نمونه (خلاصه‌شده)
{
  "updated_at": "2026-07-09T11:17:51+03:30",
  "rows": [
    { "symbol": "sekee", "price": 1810100000, "returns": { "day": 0.41 } },
    { "symbol": "geram18", "price": 22250000, "returns": { "day": 0.38 } },
    { "symbol": "ons", "price": 3342, "returns": { "day": 0.15 } }
  ]
}

داده روز جاری

Today's open, high, low, current price, and minute-by-minute tick series for intraday gold charts. Session follows the Tehran calendar day — ideal for coin price trackers and session widgets.

GET day-summary?symbol=sekee
پارامترتوضیح
symbolRequired. One gold symbol, e.g. sekee (Emami coin), geram18 (18K gram), or ons (ounce in USD).

فیلدهای پاسخ:

  • session_date — today's date (YYYY-MM-DD, Tehran)
  • unitIRR or USD (for ons)
  • open, high, low, current — session OHLC
  • high_at — time of intraday high (HH:MM, Tehran)
  • prev_close — yesterday's closing price
  • change_pct — % vs prev_close
  • series[] — intraday ticks: time, ts (ISO), price
  • tick_count — number of live updates in the series
نمونه پاسخ (Emami coin)
{
  "symbol": "sekee",
  "name": "Emami Coin",
  "session_date": "2026-07-09",
  "unit": "IRR",
  "open": 1801000000,
  "high": 1810100000,
  "low": 1799800000,
  "high_at": "11:17",
  "current": 1810100000,
  "prev_close": 1809800000,
  "change_pct": 0.017,
  "tick_count": 12,
  "series": [
    { "time": "11:00", "ts": "2026-07-09T11:00:57+03:30", "price": 1801000000 },
    { "time": "11:17", "ts": "2026-07-09T11:17:51+03:30", "price": 1810100000 }
  ]
}

تاریخچه روزانه OHLC

Daily candles for gold coin and bullion charts, backtests, and long-range analysis. Each row is one trading day with open, high, low, close. Emami coin history extends back to 2010.

GET history?symbol=sekee&from=2026-01-01&to=2026-07-01&limit=365
پارامترتوضیح
symbolRequired. Gold symbol code.
fromOptional. Start date YYYY-MM-DD.
toOptional. End date YYYY-MM-DD.
limitOptional. Max rows (default 365, max 5000).

فیلدهای پاسخ:

  • data[] — daily rows: date, j_date (Shamsi), weekday, open|high|low|close
  • count — rows returned in this response
  • available_records — total history depth for the symbol
  • from / to — actual date range covered
  • fetched_at — server timestamp (UTC) when the response was built
نمونه پاسخ
{
  "symbol": "sekee",
  "count": 2,
  "from": "2026-07-07",
  "to": "2026-07-08",
  "available_records": 4235,
  "data": [
    {
      "date": "2026-07-08",
      "j_date": "1405-04-17",
      "weekday": "Wednesday",
      "open": 1804950000,
      "high": 1810100000,
      "low": 1799800000,
      "close": 1809800000
    }
  ]
}

بازده در بازه دلخواه

Calculate absolute and percentage price change for any gold symbol between two dates. Uses historical closes; end date defaults to today and may use the live price when available.

GET return?symbol=sekee&from=2026-06-01&to=2026-07-01
پارامترتوضیح
symbolRequired. Gold symbol code.
fromRequired. Start date YYYY-MM-DD.
toOptional. End date YYYY-MM-DD (defaults to today).

فیلدهای پاسخ:

  • from_price / to_price — closing prices at each date
  • absolute_change — price difference in IRR (or USD for ons)
  • return_pct — percentage return over the period
نمونه پاسخ
{
  "symbol": "sekee",
  "from": "2026-06-01",
  "to": "2026-07-01",
  "from_price": 1869900000,
  "to_price": 1744850000,
  "absolute_change": -125050000,
  "return_pct": -6.6875
}

فهرست نمادها

List all available gold and currency symbols before querying prices. Returns symbol codes and Persian display titles from the upstream feed.

GET ex-gold-symbols

نمادهای رایج طلا:

  • sekee — Emami gold coin (full)
  • sekeb — Bahar Azadi gold coin (full)
  • geram18 — 18K gold per gram
  • mesghal — gold per mesghal (traditional unit)
  • ons — international gold ounce (USD)
  • nim, rob, gerami — half, quarter, and gram coins
نمونه پاسخ (truncated)
{
  "symbols": {
    "gold": [
      { "symbol": "sekee", "title": "سکه امامی", "url": "..." },
      { "symbol": "geram18", "title": "طلای ۱۸ عیار", "url": "..." },
      { "symbol": "ons", "title": "انس طلا", "url": "..." }
    ],
    "currency": [ ... ]
  }
}

دیتافید نمودار TradingView (UDF)

Embed Iran gold charts in the TradingView Charting Library via our UDF datafeed — same source as the live charts on Emami coin and other rate pages. Daily candles, Tehran timezone; coins and bullion in IRR, ons in USD.

UDF base URL is issued with your subscription. Prefix the paths below with {UDF_BASE}.

GET udf/config

Returns supported resolutions and datafeed capabilities.

GET udf/symbols?symbol=sekee

Symbol metadata: name, pricescale, currency_code (IRR or USD for ons).

GET udf/history?symbol=sekee&resolution=1D&from=1704067200&to=1711929600

Daily OHLC bars. from / to are Unix seconds. Response: t[], o[], h[], l[], c[], v[].

GET udf/search?query=emami&limit=10

Symbol search for chart symbol pickers.

TradingView widget
const UDF_BASE = "{YOUR_UDF_BASE}"; // issued on subscription

const datafeed = new Datafeeds.UDFCompatibleDatafeed(UDF_BASE, 60000);

const widget = new TradingView.widget({
  symbol: "sekee",
  interval: "1D",
  container: "tvChart",
  library_path: "/charting_library/",
  locale: "en",
  timezone: "Asia/Tehran",
  theme: "dark",
  autosize: true,
  datafeed,
});
Example — Emami coin symbol info
{
  "name": "sekee",
  "description": "Emami Coin",
  "type": "commodity",
  "timezone": "Asia/Tehran",
  "exchange": "IranMarket",
  "currency_code": "IRR",
  "supported_resolutions": ["1D"],
  "data_status": "streaming"
}
Example — history bars (truncated)
{
  "s": "ok",
  "t": [1704067200, 1704153600],
  "o": [78500000, 78650000],
  "h": [78800000, 78920000],
  "l": [78400000, 78580000],
  "c": [78650000, 78710000],
  "v": [0, 0]
}

نمادهای رایج طلا

  • sekeeEmami coin (most liquid gold coin in Iran)
  • sekebBahar Azadi coin
  • geram1818K gold per gram
  • onsGold ounce (quoted in USD, not IRR)
  • mesghal, nim, rob, gerami — mesghal, half, quarter, gram coins

مطالب مرتبط