API से Asian handicap और over/under lines पढ़ें

किन rows में Asian handicap और totals होते हैं, उनकी line कहाँ है, और इन-प्ले स्कोर से line की गिनती कैसे होती है।

5 मिनट में पढ़ें ·

यह गाइड मैच की id से शुरू होती है, और आपकी पहली रिक्वेस्ट बताती है कि इसे कैसे खोजें। यहाँ मैच इन-प्ले में है, जहाँ Asian handicap की line मौजूदा स्कोर से गिनी जा सकती है।

Market types

Asian handicap और totals चार market types हैं, जिन्हें आप odd_type_ids में रिक्वेस्ट करते हैं। हर row की line hc में होती है।

मार्केट के प्रकार
type_idनाममतलब
0AH1Asian handicap, home
1AH2Asian handicap, away
8OverTotal goals over, Asian lines included (the line is in hc, e.g. 2.25 or 2.75). The coverage pages list the Asian lines as Asian Over/Under.
9UnderTotal goals under, Asian lines included (the line is in hc, e.g. 2.25 or 2.75). The coverage pages list the Asian lines as Asian Over/Under.

इनकी रिक्वेस्ट कैसे करें

मैच को match_ids में, चार types को odd_type_ids में और full time को odd_period_ids में रखें। Types और period फ़िल्टर हैं: इन्हें छोड़ दें तो रिस्पॉन्स में मैच के सभी market और period शामिल होंगे।

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":[13675188],"odd_type_ids":[0,1,8,9],"odd_period_ids":[1]}'

जवाब · 26 नव॰ 2026 को API से मिला एक जवाब, जिसकी शुरुआती रो दिखाई गई हैं।

JSON में जवाब: इनकी रिक्वेस्ट कैसे करें
{
  "status": "ok",
  "data": {
    "prematch": [],
    "inplay": [
      {
        "id": 401955490,
        "active": 1,
        "match_id": 13675188,
        "event_id": 72586828,
        "bookmaker": {
          "id": 26,
          "name": "Bet365"
        },
        "datetime": "2026-11-26T15:17:12",
        "period_id": 1,
        "type_id": 0,
        "order": 1,
        "back_lay_id": 0,
        "liquidity": -1,
        "hc": 0.75,
        "hc_as_draw": 1,
        "price": 1.575,
        "nav": "{\"v\":1,\"scope\":\"inplay\",\"eventId\":\"204400836\",\"oddId\":\"55...",
        "runtime": {
          "play": {
            "codec": 12,
            "display": "1H 12'"
          },
          "points": {
            "home": 0,
            "away": 0
          }
        }
      },
      {
        "id": 401954914,
        "active": 1,
        "match_id": 13675188,
        "event_id": 72457317,
        "bookmaker": {
          "id": 41,
          "name": "yabo"
        },
        "datetime": "2026-11-26T15:17:20",
        "period_id": 1,
        "type_id": 0,
        "order": 1,
        "back_lay_id": 0,
        "liquidity": -1,
        "hc": 1,
        "hc_as_draw": 1,
        "price": 1.41,
        "nav": "{\"v\":1,\"scope\":\"inplay\",\"eventId\":\"5853048\",\"event\":{\"spo...",
        "runtime": {
          "play": {
            "codec": 12,
            "display": "1H 12'"
          },
          "points": {
            "home": 0,
            "away": 0
          }
        }
      }
    ]
  },
  "time": "2026-11-26T15:17:21",
  "ms": "14.54ms"
}

हर row किसी एक बुकमेकर का एक भाव है: type_id बताता है कि कौन सा market और कौन सी side है, और hc उसकी line देता है।

Line और उसकी गिनती

odds रो के फ़ील्ड्स
फ़ील्डमतलब
hcThe handicap / total line, e.g. -0.5 or 2.5. On 1X2 rows (type_id 2, 3, 4) a non-zero hc is a European handicap line, and for correct score (type_id 66) it carries the score; see the type_id table.
hc_as_draw1 when the line counts from the current score, 0 when it counts from kickoff. In-play they differ by the goal difference: at 1-0, -0.25 with 1 equals -1.25 with 0.

इन-प्ले में, runtime उस भाव पर स्कोर रखता है: वह स्कोर जिससे hc_as_draw 1 वाली line की गिनती की जाती है।

Full time और halves

odd_period_ids चुनता है कि भाव किस हिस्से के लिए है: full time, पहला half या दूसरा half।

पीरियड्स
period_idनाम
0First half
1Full time
6Second half

एक ही स्क्रिप्ट में एक मैच की हर line

यह स्क्रिप्ट एक मैच के चार types की रिक्वेस्ट करती है और हर बुकमेकर की lines प्रिंट करती है, जहाँ total के over और under पास-पास दिखते हैं। यह ODDFEEDS_KEY से आपकी key पढ़ती है और अपने पहले आर्गुमेंट से मैच लेती है, यानी आपके अपने रिस्पॉन्स से एक match_id।

// Every Asian handicap and over/under line of one match, per bookmaker.
// Run it with your key and a match id from your own answer:
//   ODDFEEDS_KEY=<your key> node asian-handicap.mjs <match id>
const API = process.env.ODDFEEDS_URL || 'https://oddfeeds.com/api/v1/feeds';
const matchId = Number(process.argv[2]);

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: [0, 1, 8, 9],
    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];
console.log(`Match ${matchId}: ${rows.length} prices`);

const SIDE = { 0: 'AH home', 1: 'AH away' };
const byBook = new Map();
for (const r of rows) {
  if (!byBook.has(r.bookmaker.name)) byBook.set(r.bookmaker.name, []);
  byBook.get(r.bookmaker.name).push(r);
}
for (const [name, list] of byBook) {
  console.log(name);
  const ah = list.filter((r) => r.type_id <= 1)
    .sort((a, b) => a.type_id - b.type_id || a.hc - b.hc);
  for (const r of ah) {
    const fromScore = r.hc_as_draw ? ' (from the score)' : '';
    console.log(`  ${SIDE[r.type_id]} ${r.hc}${fromScore}: ${r.price}`);
  }
  const totals = new Map();
  for (const r of list.filter((x) => x.type_id === 8 || x.type_id === 9)) {
    if (!totals.has(r.hc)) totals.set(r.hc, {});
    totals.get(r.hc)[r.type_id === 8 ? 'over' : 'under'] = r.price;
  }
  for (const [hc, t] of [...totals].sort((a, b) => a[0] - b[0])) {
    console.log(`  total ${hc}: over ${t.over ?? '-'}, under ${t.under ?? '-'}`);
  }
}

आगे

डॉक्यूमेंटेशन के रेफ़रेंस टेबल हर market type और period की सूची देते हैं, और कवरेज पेज हर बुकमेकर के बाजारों की सूची देता है, जिनमें Asian handicap और Asian over/under शामिल हैं।

इसे लाइव डेटा पर आज़माएं

फ्री अकाउंट में प्लेग्राउंड आपके ब्राउज़र में लाइव डेटा पर इन रिक्वेस्ट को रन करता है।