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>",
"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
}
}
]
}Markets
Get average price
Best and average prices per game in a league
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>",
"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
}
}
]
}Returns a truncated list of best and average prices for every game in a league. For each game and each market (moneyline / spread / total), the response includes:
- the best price (the price on the top resting offer);
- the average price you’d pay sweeping at least $500 of liquidity;
- the maximum bet that could be filled at the best price and the average price.
awayMoneylines, homeMoneylines, etc.) are stripped from each game; only the summary odds block remains.
Unlike most endpoints, this one returns the games at the top level (not under
data).Request
GET /exchange/getOddsForAveragePrice
string
required
League code (case-insensitive).
curl "https://api.4casters.io/exchange/getOddsForAveragePrice?leagueRequested=NBA" \
-H "Authorization: Bearer YOUR_TOKEN"
Response
array
Each
game is the standard Game shape with the following additional fields:Show Per-game extras
Show Per-game extras
number
string
number
string
object
Best / average prices and max bet sizes for moneyline, spread, and total markets.
Show odds
Show odds
integer
integer
integer
integer
Max bet at the best home-moneyline price.
integer
integer
integer
integer
integer
integer
integer
integer
string
integer
integer
integer
integer
number
integer
integer
integer
integer
integer
integer
integer
integer
string
integer
Max of
homeMoneylineMaxBet and awayMoneylineMaxBet.integer
integer
integer
integer
integer
integer
integer
integer
Authorizations
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.
Query Parameters
League code (case-insensitive).
Response
Game best/average prices
Show child attributes
Show child attributes
Was this page helpful?
⌘I