获取盘口
curl --request GET \
--url 'https://v5.oddspapi.io/zh/markets?apiKey='import requests
url = "https://v5.oddspapi.io/zh/markets?apiKey="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://v5.oddspapi.io/zh/markets?apiKey=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://v5.oddspapi.io/zh/markets?apiKey=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://v5.oddspapi.io/zh/markets?apiKey="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://v5.oddspapi.io/zh/markets?apiKey=")
.asString();require 'uri'
require 'net/http'
url = URI("https://v5.oddspapi.io/zh/markets?apiKey=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"marketId": 111,
"marketLength": 2,
"sportId": 11,
"playerProp": false,
"handicap": 0,
"period": "result",
"marketType": "moneyline",
"marketName": "Winner (incl. overtime)",
"marketNameShort": "Winner",
"outcomes": [
{
"outcomeId": 111,
"outcomeName": "1"
},
{
"outcomeId": 112,
"outcomeName": "2"
}
]
},
{
"marketId": 113,
"marketLength": 3,
"sportId": 11,
"playerProp": false,
"handicap": 0,
"period": "fulltime",
"marketType": "1x2",
"marketName": "Regular Time Result",
"marketNameShort": "1X2",
"outcomes": [
{
"outcomeId": 113,
"outcomeName": "1"
},
{
"outcomeId": 114,
"outcomeName": "X"
},
{
"outcomeId": 115,
"outcomeName": "2"
}
]
}
]common
获取盘口
列出盘口。
查询模式:marketIds 或 sportId 或 outcomeIds。
GET
/
markets
获取盘口
curl --request GET \
--url 'https://v5.oddspapi.io/zh/markets?apiKey='import requests
url = "https://v5.oddspapi.io/zh/markets?apiKey="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://v5.oddspapi.io/zh/markets?apiKey=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://v5.oddspapi.io/zh/markets?apiKey=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://v5.oddspapi.io/zh/markets?apiKey="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://v5.oddspapi.io/zh/markets?apiKey=")
.asString();require 'uri'
require 'net/http'
url = URI("https://v5.oddspapi.io/zh/markets?apiKey=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"marketId": 111,
"marketLength": 2,
"sportId": 11,
"playerProp": false,
"handicap": 0,
"period": "result",
"marketType": "moneyline",
"marketName": "Winner (incl. overtime)",
"marketNameShort": "Winner",
"outcomes": [
{
"outcomeId": 111,
"outcomeName": "1"
},
{
"outcomeId": 112,
"outcomeName": "2"
}
]
},
{
"marketId": 113,
"marketLength": 3,
"sportId": 11,
"playerProp": false,
"handicap": 0,
"period": "fulltime",
"marketType": "1x2",
"marketName": "Regular Time Result",
"marketNameShort": "1X2",
"outcomes": [
{
"outcomeId": 113,
"outcomeName": "1"
},
{
"outcomeId": 114,
"outcomeName": "X"
},
{
"outcomeId": 115,
"outcomeName": "2"
}
]
}
]授权
Your API key (query-based auth for v5).
查询参数
Comma- or space-separated market IDs.
Single sport ID.
Comma- or space-separated outcome IDs.
响应
Returns Market[]
冻结的盘口标识符 —— 等于该盘口的第一个(最小的)outcomeId。
该盘口所属的运动(同时是 marketId 的前两位数字)。
开放的盘口类型分类值(如 1x2、totals、spreads、players-shots)。每个值稳定,但集合不穷尽。
该盘口结算所依据的通用赛段键(参见枚举页的赛段词汇表)。
Number of outcomes under this marketId - the sides that can be bet on, together forming the complete probability space (implied probabilities sum to ~1 before margin removal).
球员投注盘口为 true —— 其赔率行携带非零 playerId。
盘口的让分 / 大小球线。每条线是独立的盘口(独立 marketId)。
盘口显示名称,跟随请求的语言前缀翻译。
盘口短显示名称。
该盘口的结果,按规范顺序排列。
Show child attributes
Show child attributes