curl --request GET \
--url https://api.agg.market/midpoints \
--header 'x-app-id: <api-key>'import requests
url = "https://api.agg.market/midpoints"
headers = {"x-app-id": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-app-id': '<api-key>'}};
fetch('https://api.agg.market/midpoints', 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.agg.market/midpoints",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-app-id: <api-key>"
],
]);
$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.agg.market/midpoints"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-app-id", "<api-key>")
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.agg.market/midpoints")
.header("x-app-id", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agg.market/midpoints")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-app-id"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"venueMarketId": "<string>",
"venue": "<string>",
"midpoint": 123,
"spread": 123,
"timestamp": 123,
"outcomes": [
{
"venueMarketOutcomeId": "<string>",
"label": "<string>",
"midpoint": 123,
"bestBid": 123,
"bestAsk": 123
}
],
"matched": [
{
"venueMarketId": "<string>",
"venue": "<string>",
"midpoint": 123,
"outcomes": [
{
"venueMarketOutcomeId": "<string>",
"midpoint": 123,
"label": "<string>",
"bestBid": 123,
"bestAsk": 123
}
],
"bestBid": 123,
"bestAsk": 123
}
],
"siblingVenueMarketId": "<string>",
"bestBid": 123,
"bestAsk": 123,
"arbReturn": 123,
"error": {
"message": "<string>",
"retryable": true
}
}
]
}{
"message": "<string>"
}{
"message": "<string>"
}{
"code": "orderbook_service_unavailable",
"message": "<string>",
"retryable": true
}Get live midpoints for multiple markets
Returns live orderbook midpoints for the requested venue market IDs. venueMarketIds accepts either a comma-separated string (?venueMarketIds=a,b,c) or repeated params (?venueMarketIds=a&venueMarketIds=b). Midpoint represents the Yes-side price (0-1). Direct GET callers should keep batches small enough to stay under CDN URL limits; AGG SDK/UI clients default to 75 IDs per request and merge multiple batches automatically. Pass bestPrice=true to also receive top-of-book bestBid/bestAsk on every entry, per-outcome row, and matched sibling, plus arbReturn — the live, quality-gated cross-venue arbitrage return for the market’s cluster, computed fresh by the engine on this request. Prefer it over the arbReturn embedded in venue-event listings, which is synced by a background job and can be stale. Every entry carries marketStatus; resolved markets never serve a price — they return null prices plus a structured error (code: "market_resolved"), and unknown ids return code: "market_not_found", mirroring GET /orderbooks. Returns 503 if the orderbook engine is unavailable.
curl --request GET \
--url https://api.agg.market/midpoints \
--header 'x-app-id: <api-key>'import requests
url = "https://api.agg.market/midpoints"
headers = {"x-app-id": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-app-id': '<api-key>'}};
fetch('https://api.agg.market/midpoints', 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.agg.market/midpoints",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-app-id: <api-key>"
],
]);
$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.agg.market/midpoints"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-app-id", "<api-key>")
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.agg.market/midpoints")
.header("x-app-id", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agg.market/midpoints")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-app-id"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"venueMarketId": "<string>",
"venue": "<string>",
"midpoint": 123,
"spread": 123,
"timestamp": 123,
"outcomes": [
{
"venueMarketOutcomeId": "<string>",
"label": "<string>",
"midpoint": 123,
"bestBid": 123,
"bestAsk": 123
}
],
"matched": [
{
"venueMarketId": "<string>",
"venue": "<string>",
"midpoint": 123,
"outcomes": [
{
"venueMarketOutcomeId": "<string>",
"midpoint": 123,
"label": "<string>",
"bestBid": 123,
"bestAsk": 123
}
],
"bestBid": 123,
"bestAsk": 123
}
],
"siblingVenueMarketId": "<string>",
"bestBid": 123,
"bestAsk": 123,
"arbReturn": 123,
"error": {
"message": "<string>",
"retryable": true
}
}
]
}{
"message": "<string>"
}{
"message": "<string>"
}{
"code": "orderbook_service_unavailable",
"message": "<string>",
"retryable": true
}