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
}
}
]
}Mercados
Obtener precio promedio
Mejores precios y precios promedio por juego en una liga
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
}
}
]
}Devuelve una lista truncada de los mejores precios y precios promedio de cada juego de una liga. Para cada juego y cada mercado (moneyline / spread / total), la respuesta incluye:
- el mejor precio (el precio de la oferta en espera superior);
- el precio promedio que pagarías barriendo al menos $500 de liquidez;
- la apuesta máxima que podría cruzarse al mejor precio y al precio promedio.
awayMoneylines, homeMoneylines, etc.) se eliminan de cada juego; solo permanece el bloque resumen odds.
A diferencia de la mayoría de los endpoints, este devuelve los juegos en el nivel superior (no bajo
data).Solicitud
GET /exchange/getOddsForAveragePrice
string
requerido
Código de liga (no distingue mayúsculas).
curl "https://api.4casters.io/exchange/getOddsForAveragePrice?leagueRequested=NBA" \
-H "Authorization: Bearer YOUR_TOKEN"
Respuesta
array
Cada
game tiene la forma estándar de Game con los siguientes campos adicionales:Mostrar Extras por juego
Mostrar Extras por juego
number
string
number
string
object
Mejores precios / precios promedio y tamaños máximos de apuesta para mercados moneyline, spread y total.
Mostrar odds
Mostrar odds
integer
integer
integer
integer
Apuesta máxima al mejor precio moneyline local.
integer
integer
integer
integer
integer
integer
integer
integer
string
integer
integer
integer
integer
number
integer
integer
integer
integer
integer
integer
integer
integer
string
integer
Máximo de
homeMoneylineMaxBet y awayMoneylineMaxBet.integer
integer
integer
integer
integer
integer
integer
integer
Autorizaciones
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.
Parámetros de consulta
League code (case-insensitive).
Respuesta
Game best/average prices
Show child attributes
Show child attributes
¿Esta página le ayudó?