Một số phương pháp tìm giá trị cược lấy giá của Pinnacle làm tham chiếu và tìm các nhà cái trả thưởng cao hơn cho cùng một kết quả. Bạn chọn giá tham chiếu nào và theo cách nào là tùy bạn: hướng dẫn này hiển thị cách đọc các mức giá cho mục đích đó.
Pinnacle và các nhà cái của bạn trong một yêu cầu
Đưa Pinnacle và các nhà cái bạn đặt cược vào bookmaker_ids trong một yêu cầu, để các mức giá đặt cạnh nhau được đọc cùng lúc. bookmaker của mỗi hàng chứa id và tên nhà cái: lấy id từ phản hồi API hoặc từ trang từng nhà cái, được liên kết từ trang phạm vi phủ dữ liệu.
curl -X POST https://oddfeeds.com/api/v1/feeds \
-H "Authorization: Bearer ofk_your_api_key" \
-H "Content-Type: application/json" \
-d '{"scope":"odds","match_ids":[13683300],"bookmaker_ids":[10,64,16],"odd_type_ids":[2,3,4],"odd_period_ids":[1]}'const res = await fetch('https://oddfeeds.com/api/v1/feeds', {
method: 'POST',
headers: {
'Authorization': 'Bearer ofk_your_api_key',
'Content-Type': 'application/json',
},
body: JSON.stringify({"scope":"odds","match_ids":[13683300],"bookmaker_ids":[10,64,16],"odd_type_ids":[2,3,4],"odd_period_ids":[1]}),
});
const feed = await res.json();import requests
res = requests.post(
'https://oddfeeds.com/api/v1/feeds',
headers={'Authorization': 'Bearer ofk_your_api_key'},
json={"scope":"odds","match_ids":[13683300],"bookmaker_ids":[10,64,16],"odd_type_ids":[2,3,4],"odd_period_ids":[1]},
timeout=20,
)
feed = res.json()Kết quả trả về · Kết quả thực tế từ API vào ngày 26 thg 11, 2026, hiển thị các dòng đầu tiên. Kết quả của bạn sẽ chứa các ID khác: hãy đưa những ID đó vào yêu cầu tiếp theo.
Phản hồi dưới dạng JSON: Pinnacle và các nhà cái của bạn trong một yêu cầu
{
"status": "ok",
"data": {
"prematch": [
{
"id": 394831901,
"active": 1,
"match_id": 13683300,
"event_id": 72548340,
"bookmaker": {
"id": 64,
"name": "Holiganbet"
},
"datetime": "2026-11-26T01:34:05",
"period_id": 1,
"type_id": 4,
"order": 1,
"back_lay_id": 0,
"liquidity": -1,
"hc": -2,
"hc_as_draw": 0,
"price": 1.222,
"nav": "{\"v\":1,\"scope\":\"prematch\",\"eventId\":\"320047483511185408\",..."
},
{
"id": 396015507,
"active": 1,
"match_id": 13683300,
"event_id": 72551794,
"bookmaker": {
"id": 16,
"name": "Cashpoint"
},
"datetime": "2026-11-26T01:33:38",
"period_id": 1,
"type_id": 3,
"order": 1,
"back_lay_id": 0,
"liquidity": -1,
"hc": 1,
"hc_as_draw": 0,
"price": 5.2,
"nav": "{\"scope\": \"prematch\", \"eventId\": \"3198590012\", \"oddId\": \"..."
}
],
"inplay": []
},
"time": "2026-11-26T15:19:22",
"ms": "1.26ms"
}
Đặt cạnh nhau, trên cùng một dòng cược
Chỉ đặt mức giá bên cạnh Pinnacle khi cả hai có cùng type_id, period_id và hc. datetime cho biết lần cuối mức giá thay đổi tại nhà cái là khi nào.
Độ mới của từng mức giá
Một mức giá có thể không đổi trong vài phút. seen từ odds_seen cho biết thời điểm trình quét của chúng tôi xác nhận mức giá đó lần cuối: hãy lấy cả hai mức giá trước khi so sánh.
curl -X POST https://oddfeeds.com/api/v1/feeds \
-H "Authorization: Bearer ofk_your_api_key" \
-H "Content-Type: application/json" \
-d '{"scope":"odds_seen","odd_ids":[394831901,396015507,396015629]}'const res = await fetch('https://oddfeeds.com/api/v1/feeds', {
method: 'POST',
headers: {
'Authorization': 'Bearer ofk_your_api_key',
'Content-Type': 'application/json',
},
body: JSON.stringify({"scope":"odds_seen","odd_ids":[394831901,396015507,396015629]}),
});
const feed = await res.json();import requests
res = requests.post(
'https://oddfeeds.com/api/v1/feeds',
headers={'Authorization': 'Bearer ofk_your_api_key'},
json={"scope":"odds_seen","odd_ids":[394831901,396015507,396015629]},
timeout=20,
)
feed = res.json()Kết quả trả về · Kết quả thực tế từ API vào ngày 26 thg 11, 2026, hiển thị các dòng đầu tiên.
Phản hồi dưới dạng JSON: Độ mới của từng mức giá
{
"status": "ok",
"data": [
{
"id": 396015507,
"open": "2026-11-26T01:33:38",
"seen": "2026-11-26T15:18:28",
"closed": ""
},
{
"id": 396015629,
"open": "2026-11-26T01:33:38",
"seen": "2026-11-26T15:18:28",
"closed": ""
}
],
"time": "2026-11-26T15:20:21",
"ms": "53us"
}
Ví dụ: loại bỏ margin theo tỷ lệ
Mức giá của nhà cái luôn chứa margin: tổng xác suất quy đổi (1 chia cho từng mức giá) sẽ lớn hơn 100%. Một cách phổ biến để loại bỏ margin là chia từng xác suất quy đổi cho tổng đó, và mức giá tương ứng với xác suất mới chính là giá đã loại bỏ margin.
Ví dụ trên các mức giá giả định, không lấy từ feed
| Kết quả | Giá | 1 / giá | Sau khi loại margin | Giá sau khi loại margin |
|---|---|---|---|---|
1 | 2.10 | 47.6% | 45.4% | 2.20 |
X | 3.40 | 29.4% | 28.1% | 3.56 |
2 | 3.60 | 27.8% | 26.5% | 3.77 |
| Tổng | 104.8% | 100.0% |
Đây là một trong nhiều phương pháp, việc sử dụng phương pháp nào hoàn toàn do bạn quyết định. Chúng tôi cung cấp giá gốc của từng nhà cái kèm thời gian thay đổi gần nhất; giá loại bỏ margin sẽ được tính toán phía bạn.
Pinnacle bên cạnh các nhà cái khác trong một script
Script này yêu cầu giá 1X2 của một trận đấu tại mọi nhà cái trong key của bạn và in từng mức giá bên cạnh Pinnacle trên cùng dòng cược, kèm số giây từ lần thay đổi gần nhất. Script đọc key từ ODDFEEDS_KEY.
// One match's 1X2 prices set beside Pinnacle's on the same period and line, with
// how long ago each price last changed. What you do with the two prices is yours.
// ODDFEEDS_KEY=<your key> node pinnacle-reference.mjs <match id>
const API = process.env.ODDFEEDS_URL || 'https://oddfeeds.com/api/v1/feeds';
const matchId = Number(process.argv[2]);
const SIDE = { 2: '1', 3: 'X', 4: '2' };
const ago = (utc) => Math.round((Date.now() - Date.parse(`${utc}Z`)) / 1000);
const res = await fetch(API, {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.ODDFEEDS_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
scope: 'odds',
match_ids: [matchId],
odd_type_ids: [2, 3, 4],
odd_period_ids: [1],
}),
});
const feed = await res.json();
if (feed.status !== 'ok') throw new Error(`${res.status}: ${feed.error}`);
const rows = [...feed.data.prematch, ...feed.data.inplay]
.filter((r) => r.back_lay_id === 0 && (r.order ?? 1) === 1); // back, best level
console.log(`Match ${matchId}: ${rows.length} prices`);
// The same outcome = the same period, type and line (hc).
const key = (r) => `${r.period_id}|${r.type_id}|${r.hc}`;
const pinnacle = new Map(rows.filter((r) => r.bookmaker.name === 'Pinnacle')
.map((r) => [key(r), r]));
for (const r of rows) {
const p = pinnacle.get(key(r));
if (!p || r === p) continue;
const line = r.hc ? ` hc ${r.hc}` : '';
console.log(` ${SIDE[r.type_id]}${line}: ${r.bookmaker.name} ${r.price}`
+ ` (${ago(r.datetime)} s), Pinnacle ${p.price} (${ago(p.datetime)} s)`);
}# One match's 1X2 prices set beside Pinnacle's on the same period and line, with
# how long ago each price last changed. What you do with the two prices is yours.
# ODDFEEDS_KEY=<your key> python pinnacle-reference.py <match id>
import os
import sys
from datetime import datetime, timezone
import requests
API = os.environ.get('ODDFEEDS_URL', 'https://oddfeeds.com/api/v1/feeds')
match_id = int(sys.argv[1])
SIDE = {2: '1', 3: 'X', 4: '2'}
def ago(utc):
then = datetime.fromisoformat(utc).replace(tzinfo=timezone.utc)
return round((datetime.now(timezone.utc) - then).total_seconds())
res = requests.post(
API,
headers={'Authorization': f"Bearer {os.environ['ODDFEEDS_KEY']}"},
json={'scope': 'odds', 'match_ids': [match_id],
'odd_type_ids': [2, 3, 4], 'odd_period_ids': [1]},
timeout=20,
)
feed = res.json()
if feed['status'] != 'ok':
raise RuntimeError(f"{res.status_code}: {feed['error']}")
rows = [r for r in feed['data']['prematch'] + feed['data']['inplay']
if r['back_lay_id'] == 0 and (r.get('order') or 1) == 1] # back, best level
print(f"Match {match_id}: {len(rows)} prices")
def key(r):
# The same outcome = the same period, type and line (hc).
return (r['period_id'], r['type_id'], r['hc'])
pinnacle = {key(r): r for r in rows if r['bookmaker']['name'] == 'Pinnacle'}
for r in rows:
p = pinnacle.get(key(r))
if not p or r is p:
continue
line = f" hc {r['hc']}" if r['hc'] else ''
print(f" {SIDE[r['type_id']]}{line}: {r['bookmaker']['name']} {r['price']}"
f" ({ago(r['datetime'])} s), Pinnacle {p['price']} ({ago(p['datetime'])} s)")Tiếp theo
Trường hợp sử dụng so sánh giá trị với Pinnacle hiển thị những dữ liệu khác mà công cụ tìm giá trị cược đọc từ API.