Public API · v1
Bitcoin Indicators API
ดึงค่า indicator ชุดเดียวกับที่ dashboard ของ cointh.com ใช้ — ค่าล่าสุดและย้อนหลังรายวัน เป็น JSON หรือ CSV ฟรี ไม่ต้องสมัคร ไม่ต้องใช้ key
เริ่มใช้
Base URL: https://cointh.com/api/v1
curl https://cointh.com/api/v1/indicators/mvrv
ผลลัพธ์ (ตัวเลขในหน้านี้เป็นตัวอย่าง):
{
"ok": true,
"id": "mvrv",
"name": "MVRV",
"asOf": "2026-11-19",
"updatedAt": "2026-11-22T15:00:47.066Z",
"data": {
"price": 60789,
"mvrv": 1.1383,
"zScore": 0.239,
"realizedPrice": 53404,
"marketCap": 1222737312171,
"realizedCap": 1074182464692,
"supply": 20114438.6
},
"cache": { "ttlSeconds": 3600, "generatedAt": "2026-11-22T15:02:10.000Z" }
}
ลองเรียกจริง
กด "ส่งคำขอ" เพื่อดูผลลัพธ์
Endpoints
| Endpoint | ได้อะไร |
|---|---|
GET/api/v1 | รายการ endpoint และ indicator ทั้งหมด (machine-readable) |
GET/api/v1/indicators | ค่าล่าสุดของทุก indicator ในคำขอเดียว |
GET/api/v1/indicators/{id} | ค่าล่าสุดของ indicator เดียว พร้อมเส้นอ้างอิง |
GET/api/v1/indicators/{id}/history | ข้อมูลย้อนหลัง (JSON หรือ CSV) |
GET/api/v1/liquidation-map | Liquidation heatmap (โมเดลประมาณการ) |
ทุกคำตอบ JSON มี ok (true/false) · asOf คือวันที่ของข้อมูลจุดล่าสุด · updatedAt คือเวลาที่เรา build ข้อมูลชุดนั้น · เวลาเป็น UTC ทั้งหมด · ราคาเป็น USD
รายการ indicator
ใช้ค่าในคอลัมน์ id แทน {id} ใน URL — คอลัมน์ "ย้อนหลัง" คือ field ที่ได้จาก /history (มี price ติดมาด้วยทุกตัว)
| id | Indicator | ค่าล่าสุด (data) | ย้อนหลัง |
|---|---|---|---|
mvrv | MVRV | mvrv zScore realizedPrice marketCap realizedCap supply | mvrv zScore realizedPrice |
nupl | NUPL | nupl | nupl |
cvdd | CVDD | cvdd ratio refs | cvdd ratio |
supply-in-loss | Supply in Loss | supplyInLossBtc pct supply | supplyInLossBtc pct |
lth-realized-price | Realized Price - LTH | lthRealizedPrice lthMvrv lthSupplyInLossBtc change30dBtc change90dBtc | lthRealizedPrice lthSupplyInLossBtc |
production-cost | Production Cost | cost costLower costUpper margin hashrate difficulty electricityUsdPerKwh | cost costLower costUpper margin hashrate |
puell | Puell Multiple | puell refs | puell |
mayer | Mayer Multiple | mayer ma200 refs | mayer |
pi-cycle | Pi Cycle Top / Bottom | ma111 ma350x2 topSignal ema150 sma471x0745 bottomSignal | ma111 ma350x2 ema150 sma471x0745 |
2y-ma | 2Y MA Multiplier | ma2y ma2yx5 multiplier | ma2y ma2yx5 |
4y-ma | 4Y MA Multiple | multiple ma4y refs | multiple |
ahr999 | AHR999 | ahr999 refs | ahr999 |
rsi | RSI | rsi14 rsi22 rsiWeekly14 rsiMonthly14 | rsi14 rsi22 |
risk | Risk Index & DXY | risk dxy | risk dxy |
open-interest | Open Interest | primary aggregate funding longShort taker | oiBtc oiUsd |
peak-signals | Peak Signals | verdict hitCount total avgProgress signals[] | — |
bottom-signals | Bottom Signals | verdict hitCount total avgProgress signals[] | — |
refsคือเส้นอ้างอิงที่ dashboard ใช้ตัดสินโซน เช่นrefs.top/refs.bottom— เป็นค่าที่เราประเมินเอง ปรับได้ตามรอบrsiคำนวณแบบ Wilder จากราคาปิดรายวันของ BTC · รายสัปดาห์/รายเดือนรวมแท่งที่ยังไม่ปิด · ไม่ใช่ตัวเดียวกับกลยุทธ์หลายเหรียญบนหน้า /rsiopen-interestนับ OI ฝั่งเดียวทุกตลาด (Bybit และ Gate ถูกหาร 2 แล้ว) — เลขจะต่างจากเว็บที่ส่งต่อเลขดิบsignals[]ของ checklist แต่ละตัวมีcurrent,reference,hit,progress(0–100) · ใน/api/v1/indicatorsจะได้แค่สรุป ไม่มีsignals[]- Momentum & CVD และ Volume Profile ยังไม่มีใน API — สองหน้านี้คำนวณใน browser จากข้อมูล exchange โดยตรง
ข้อมูลย้อนหลัง
| Parameter | ค่า | ความหมาย |
|---|---|---|
from | YYYY-MM-DD | วันแรกที่ต้องการ (รวมวันนั้น) |
to | YYYY-MM-DD | วันสุดท้ายที่ต้องการ (รวมวันนั้น) |
limit | 1–10000 | เอาเฉพาะ N จุดล่าสุดของช่วงที่เลือก |
format | json | csv | ค่าเริ่มต้น json |
range | 24H | 7D | 30D | MAX | เฉพาะ open-interest — ค่าเริ่มต้น MAX (รายวัน) |
src | bybit | agg | เฉพาะ open-interest — agg = Bybit + OKX + Gate |
ไม่ใส่ parameter เลย = ได้ทั้ง series (ส่วนใหญ่รายวันย้อนไปถึงปี 2010–2011) รูปแบบ JSON เป็นแบบ column — dates[i] คู่กับ data.<field>[i] ค่าที่ยังคำนวณไม่ได้เป็น null
curl "https://cointh.com/api/v1/indicators/mayer/history?from=2026-11-17&to=2026-11-19"
{
"ok": true,
"id": "mayer",
"count": 3,
"from": "2026-11-17",
"to": "2026-11-19",
"fields": ["price", "mayer"],
"dates": ["2026-11-17", "2026-11-18", "2026-11-19"],
"data": {
"price": [64908, 62897, 60865],
"mayer": [0.8917, 0.865, 0.8381]
}
}
แบบ CSV (แถวแรกเป็นหัวคอลัมน์):
date,price,mayer
2026-11-17,64908,0.8917
2026-11-18,62897,0.865
2026-11-19,60865,0.8381
Liquidation map
ค่าเริ่มต้น range=90D · ได้ตาราง heatmap ขนาด grid.rows × grid.cols (แกนราคา × แกนเวลา) เข้ารหัสเป็น base64 ใน heat
- ถอด base64 เป็น byte array ยาว
cols × rows— ค่าที่คอลัมน์cแถวrคือheat[c * rows + r](0–255 ความเข้มสัมพัทธ์) - แถว
rตรงกับราคาgrid.priceMin + r × grid.priceStep· คอลัมน์cตรงกับtimes[c]และราคาปิดcloses[c]
Error & limit
เมื่อผิดพลาดจะได้ HTTP status ตามตาราง และ body รูปแบบเดียวกันเสมอ:
{ "ok": false, "error": { "code": "unknown_indicator", "message": "..." } }
| Status | code | สาเหตุ |
|---|---|---|
| 400 | invalid_parameter | parameter ผิดรูปแบบ |
| 404 | unknown_indicator · no_history · not_found | ไม่มี id / indicator นั้นไม่มีย้อนหลัง / ไม่มี endpoint |
| 429 | rate_limited | เกิน 60 ครั้ง/นาที — รอตาม header Retry-After |
| 503 | upstream_unavailable | แหล่งข้อมูลต้นทางล่มชั่วคราว ลองใหม่ภายหลัง |
- คำตอบถูก cache 1 ชั่วโมง (
Cache-Control: public, max-age=3600) — ดึงถี่กว่านั้นจะได้ข้อมูลชุดเดิม ไม่ต้อง poll บ่อย - indicator on-chain ส่วนใหญ่เป็นข้อมูลรายวัน ต้นทางอัปเดตวันละครั้ง ดูวันที่จริงของข้อมูลได้จาก
asOf - ถ้าบางแหล่งล่มตอนเรียก
/api/v1/indicatorsตัวนั้นจะเป็น{ "error": "unavailable" }ส่วนตัวอื่นยังได้ค่าปกติ
ตัวอย่างโค้ด
JavaScript
const res = await fetch("https://cointh.com/api/v1/indicators");
const { indicators } = await res.json();
console.log(indicators.mvrv.data.mvrv, indicators.mayer.data.mayer);
Python
import requests
r = requests.get(
"https://cointh.com/api/v1/indicators/mvrv/history",
params={"from": "2024-01-01"},
timeout=20,
)
h = r.json()
for date, mvrv in zip(h["dates"], h["data"]["mvrv"]):
print(date, mvrv)
pandas
import pandas as pd
df = pd.read_csv(
"https://cointh.com/api/v1/indicators/puell/history?format=csv",
parse_dates=["date"],
)
Google Sheets
=IMPORTDATA("https://cointh.com/api/v1/indicators/nupl/history?limit=365&format=csv")
เงื่อนไขการใช้
- ใช้ได้ฟรีทั้งงานส่วนตัวและเชิงพาณิชย์ — ถ้านำไปแสดงต่อ ขอเครดิต cointh.com
- ไม่มี SLA: ข้อมูลอาจช้า ผิดพลาด หรือหยุดให้บริการได้ และ field ใน
v1อาจเพิ่มได้ (จะไม่ลบหรือเปลี่ยนความหมายของ field เดิม) - เป็นข้อมูลเพื่อการศึกษา ไม่ใช่คำแนะนำการลงทุน
- ข้อมูลต้นทางมาจาก Coin Metrics, BGeometrics, bitcoin-data.com, checkonchain, Blockchain.info, Bybit, OKX, Gate และอื่นๆ — เราคำนวณและ cache ต่อ