Get average price
curl --request GET \
--url https://api.4casters.io/exchange/getOddsForAveragePrice \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.4casters.io/exchange/getOddsForAveragePrice"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.4casters.io/exchange/getOddsForAveragePrice', 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://api.4casters.io/exchange/getOddsForAveragePrice",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.4casters.io/exchange/getOddsForAveragePrice"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.4casters.io/exchange/getOddsForAveragePrice")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.4casters.io/exchange/getOddsForAveragePrice")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"games": [
{
"id": "<string>",
"parentGameID": "<string>",
"cheapDataUID": "<string>",
"league": "<string>",
"sport": "<string>",
"start": "2023-11-07T05:31:56Z",
"ended": true,
"live": true,
"featured": true,
"eventName": "<string>",
"tournamentName": "<string>",
"periodName": "<string>",
"isSpecials": true,
"participants": [
{
"id": "<string>",
"longName": "<string>",
"shortName": "<string>",
"homeAway": "home",
"mainPitcher": "<string>",
"rotationNumber": "<string>",
"futuresSide": "<string>",
"score": 123
}
],
"matchedVolume": 123,
"mainHomeSpread": "<unknown>",
"mainAwaySpread": "<unknown>",
"mainTotal": "<unknown>",
"odds": {
"averageHomeMoneyline": 123,
"bestHomeMoneyline": 123,
"bestHomeMoneylineWithCommission": 123,
"bestHomeMoneylinePriceLimit": 123,
"averageAwayMoneyline": 123,
"bestAwayMoneyline": 123,
"bestAwayMoneylineWithCommission": 123,
"bestAwayMoneylinePriceLimit": 123,
"averageHomeSpread": 123,
"bestHomeSpread": 123,
"bestHomeSpreadWithCommission": 123,
"bestHomeSpreadPriceLimit": 123,
"mainHomeSpread": "<unknown>",
"averageAwaySpread": 123,
"bestAwaySpread": 123,
"bestAwaySpreadWithCommission": 123,
"bestAwaySpreadPriceLimit": 123,
"mainAwaySpread": "<unknown>",
"averageOver": 123,
"bestOver": 123,
"bestOverWithCommission": 123,
"bestOverPriceLimit": 123,
"averageUnder": 123,
"bestUnder": 123,
"bestUnderWithCommission": 123,
"bestUnderPriceLimit": 123,
"mainTotal": "<unknown>",
"maxMoneyLineBet": 123,
"homeMoneylineMaxBet": 123,
"awayMoneylineMaxBet": 123,
"maxTotalBet": 123,
"maxOverBet": 123,
"maxUnderBet": 123,
"maxSpreadBet": 123,
"maxHomeSpreadBet": 123,
"maxAwaySpreadBet": 123
}
}
]
}市场
获取均价
某联赛中每场赛事的最优价与均价
GET
/
exchange
/
getOddsForAveragePrice
Get average price
curl --request GET \
--url https://api.4casters.io/exchange/getOddsForAveragePrice \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.4casters.io/exchange/getOddsForAveragePrice"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.4casters.io/exchange/getOddsForAveragePrice', 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://api.4casters.io/exchange/getOddsForAveragePrice",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.4casters.io/exchange/getOddsForAveragePrice"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.4casters.io/exchange/getOddsForAveragePrice")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.4casters.io/exchange/getOddsForAveragePrice")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"games": [
{
"id": "<string>",
"parentGameID": "<string>",
"cheapDataUID": "<string>",
"league": "<string>",
"sport": "<string>",
"start": "2023-11-07T05:31:56Z",
"ended": true,
"live": true,
"featured": true,
"eventName": "<string>",
"tournamentName": "<string>",
"periodName": "<string>",
"isSpecials": true,
"participants": [
{
"id": "<string>",
"longName": "<string>",
"shortName": "<string>",
"homeAway": "home",
"mainPitcher": "<string>",
"rotationNumber": "<string>",
"futuresSide": "<string>",
"score": 123
}
],
"matchedVolume": 123,
"mainHomeSpread": "<unknown>",
"mainAwaySpread": "<unknown>",
"mainTotal": "<unknown>",
"odds": {
"averageHomeMoneyline": 123,
"bestHomeMoneyline": 123,
"bestHomeMoneylineWithCommission": 123,
"bestHomeMoneylinePriceLimit": 123,
"averageAwayMoneyline": 123,
"bestAwayMoneyline": 123,
"bestAwayMoneylineWithCommission": 123,
"bestAwayMoneylinePriceLimit": 123,
"averageHomeSpread": 123,
"bestHomeSpread": 123,
"bestHomeSpreadWithCommission": 123,
"bestHomeSpreadPriceLimit": 123,
"mainHomeSpread": "<unknown>",
"averageAwaySpread": 123,
"bestAwaySpread": 123,
"bestAwaySpreadWithCommission": 123,
"bestAwaySpreadPriceLimit": 123,
"mainAwaySpread": "<unknown>",
"averageOver": 123,
"bestOver": 123,
"bestOverWithCommission": 123,
"bestOverPriceLimit": 123,
"averageUnder": 123,
"bestUnder": 123,
"bestUnderWithCommission": 123,
"bestUnderPriceLimit": 123,
"mainTotal": "<unknown>",
"maxMoneyLineBet": 123,
"homeMoneylineMaxBet": 123,
"awayMoneylineMaxBet": 123,
"maxTotalBet": 123,
"maxOverBet": 123,
"maxUnderBet": 123,
"maxSpreadBet": 123,
"maxHomeSpreadBet": 123,
"maxAwaySpreadBet": 123
}
}
]
}返回某联赛中每场赛事的最优价与均价的截断列表。对每场赛事和每个市场(moneyline / spread / total),响应包含:
- 最优价格(最优挂单上的价格);
- 扫掉至少 $500 流动性时你会支付的均价;
- 可按最优价格和均价成交的最大投注额。
awayMoneylines、homeMoneylines 等)已被剥离;仅保留汇总的 odds 块。
与大多数端点不同,此端点在顶层返回赛事(不在
data 下)。请求
GET /exchange/getOddsForAveragePrice
string
必填
联赛代码(不区分大小写)。
curl "https://api.4casters.io/exchange/getOddsForAveragePrice?leagueRequested=NBA" \
-H "Authorization: Bearer YOUR_TOKEN"
响应
array
每个
game 为标准 Game 形态,并带有以下附加字段:显示 单场附加字段
显示 单场附加字段
number
string
number
string
object
独赢、让分和大小分的最优 / 均价以及最大投注额。
显示 odds
显示 odds
integer
integer
integer
integer
主队独赢最优价下的最大投注额。
integer
integer
integer
integer
integer
integer
integer
integer
string
integer
integer
integer
integer
number
integer
integer
integer
integer
integer
integer
integer
integer
string
integer
homeMoneylineMaxBet 与 awayMoneylineMaxBet 的较大值。integer
integer
integer
integer
integer
integer
integer
integer
授权
Pass your auth token in the Authorization header. The Bearer prefix is optional; the server also accepts a signed auth cookie or a token field in the request body.
查询参数
League code (case-insensitive).
响应
Game best/average prices
Show child attributes
Show child attributes
此页面对您有帮助吗?