رفتن به محتوای اصلی

مستندات فنی

مستندات فنی API تابلو

این صفحه برای کسانی است که از قبل کلید API گرفته‌اند (از صفحه‌ی API قیمت). همه‌ی endpointها زیر آدرس https://tablo.gold هستند و پاسخ همه JSON است.

احراز هویت

کلید را در هدر Authorization به‌صورت زیر بفرستید:

Authorization: Bearer tablo_XXXXXXXXXXXXXXXXXXXXXXXX

هر کلید فقط برای همان endpointهایی کار می‌کند که موقع صدور برایش granted شده — تماس با endpoint دیگر ۴۰۳ برمی‌گرداند.

محصولات API

قیمت‌های طلا

GET /api/v1/gold-prices

قیمت اعلامی طلای ۱۸ عیار به تفکیک هر اپ.

{
  "generated_at": "2026-09-04T10:00:00.000Z",
  "platforms": [
    {
      "platform_slug": "wallgold",
      "price_toman": 68500000,
      "price_display": "۶۸,۵۰۰,۰۰۰",
      "updated_at": "2026-09-04T09:59:42.000Z"
    }
  ]
}

قیمت‌های سکه

GET /api/v1/coin-prices

قیمت سکه امامی، نیم‌سکه و ربع‌سکه.

{
  "generated_at": "2026-09-04T10:00:00.000Z",
  "coins": [
    {
      "key": "emami",
      "label": "سکه امامی",
      "price_toman": 620000000,
      "price_display": "۶۲۰,۰۰۰,۰۰۰",
      "updated_at": "2026-09-04T09:59:42.000Z"
    },
    { "key": "half", "label": "نیم سکه", "...": "..." },
    { "key": "quarter", "label": "ربع سکه", "...": "..." }
  ]
}

حباب و اسپرد

GET /api/v1/bubble-spread

حباب قیمت گرم طلا نسبت به ارزش ذاتی، و اسپرد (فاصله‌ی بیشترین تا کمترین قیمت اپ‌ها). هرکدام از inputها ناقص باشد، همان فیلد null برمی‌گردد — نه خطا.

{
  "generated_at": "2026-09-04T10:00:00.000Z",
  "bubble": { "toman": 3400000, "updated_at": "2026-09-04T09:59:00.000Z" },
  "spread": {
    "toman": 81000,
    "display": "۸۱,۰۰۰",
    "updated_at": "2026-09-04T09:59:42.000Z"
  }
}

حباب سکه

GET /api/v1/coin-bubble

حباب فقط برای سکه امامی محاسبه می‌شود؛ نیم‌سکه و ربع‌سکه حباب ندارند.

{
  "generated_at": "2026-09-04T10:00:00.000Z",
  "key": "emami",
  "label": "سکه امامی",
  "coin_bubble": { "toman": 15000000, "updated_at": "2026-09-04T09:59:00.000Z" }
}

نرخ مرجع

GET /api/v1/reference

یک نرخ مرجع مستقل از خود قیمت‌های اپ‌ها — محصولی جدا، با granted API جدا.

{
  "generated_at": "2026-09-04T10:00:00.000Z",
  "reference_price": {
    "value": 18600000,
    "read_at": "2026-09-04T09:59:00.000Z",
    "sourceLabel": "tala.ir"
  }
}

سقف درخواست و کدهای خطا

سقف درخواست ۶۰ درخواست در ۶۰ ثانیه، به‌ازای هر کلید و هر endpoint به‌صورت جدا (رد شدن از سقف روی یک endpoint، روی بقیه اثری ندارد).

401{ "error": "invalid or expired api key" }

کلید ارسال نشده، نامعتبر، غیرفعال یا منقضی شده است.

403{ "error": "key not authorized for this api" }

کلید معتبر است ولی برای این endpoint granted نشده.

429{ "error": "rate limit exceeded" }

بیش از ۶۰ درخواست در ۶۰ ثانیه برای همین ترکیب مشتری و endpoint. هدر Retry-After ثانیه‌های لازم برای تلاش دوباره را می‌گوید.

503{ "error": "service temporarily unavailable" }

خطای موقت زیرساخت؛ تلاش دوباره بی‌خطر است.

پیاده‌سازی با هوش مصنوعی

این پرامپت را کپی کنید و به دستیار هوش مصنوعی خودتان (Claude، Cursor، ChatGPT و…) بدهید تا یک کلاینت کامل برای این API بسازد.

You are helping me build a client for the Tablo Gold Price API (tablo.gold).

Base URL: https://tablo.gold
Auth: every request needs an "Authorization: Bearer <API_KEY>" header. Keys look like "tablo_XXXXXXXXXXXX".

Endpoints (all GET, JSON responses, each independently granted per key):
1. /api/v1/gold-prices  — per-platform gram-18k gold prices.
   { generated_at, platforms: [{ platform_slug, price_toman, price_display, updated_at }] }
2. /api/v1/coin-prices  — سکه امامی / نیم‌سکه / ربع‌سکه prices.
   { generated_at, coins: [{ key, label, price_toman, price_display, updated_at }] }
3. /api/v1/bubble-spread — the gram-gold bubble (gap vs. intrinsic value) and the
   spread across platforms. Either field can be null when an input is missing.
   { generated_at, bubble: { toman, updated_at } | null, spread: { toman, display, updated_at } | null }
4. /api/v1/coin-bubble  — the امامی coin's bubble ONLY (half/quarter have no bubble).
   { generated_at, key: "emami", label, coin_bubble: { toman, updated_at } | null }
5. /api/v1/reference    — an independent market reference price, sold as its own product.
   { generated_at, reference_price: { value, read_at, sourceLabel } | null }

Error responses:
- 401 { "error": "invalid or expired api key" }        — missing/unknown/disabled/expired key.
- 403 { "error": "key not authorized for this api" }   — valid key, wrong endpoint.
- 429 { "error": "rate limit exceeded" }                — 60 requests / 60 seconds per key per
                                                            endpoint; a Retry-After header (seconds)
                                                            says how long to back off.
- 503 { "error": "service temporarily unavailable" }    — transient, safe to retry.

Treat any null field (bubble, spread, coin_bubble, reference_price) as "not available right now",
not as an error — never throw on a null value alone.

Please write a client (ask me which language/runtime if it isn't obvious from my project) that:
authenticates with the bearer key, calls only the endpoint(s) I actually need, retries a 429 after
waiting for Retry-After seconds, and treats null fields as legitimately absent data.

صفحه‌ی خرید APIروش محاسبه و بروزرسانی قیمت‌ها