Markets of a game with orderbook keys
curl --request GET \
--url https://api.vatic.trading/api/v1/games/{id}/markets \
--header 'x-api-key: <api-key>'import requests
url = "https://api.vatic.trading/api/v1/games/{id}/markets"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.vatic.trading/api/v1/games/{id}/markets', 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.vatic.trading/api/v1/games/{id}/markets",
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-api-key: <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.vatic.trading/api/v1/games/{id}/markets"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<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.vatic.trading/api/v1/games/{id}/markets")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vatic.trading/api/v1/games/{id}/markets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "polymarket:0x9f1a...",
"game_id": "<string>",
"source": "<string>",
"event_external_id": "<string>",
"title": "<string>",
"raw_type": "<string>",
"canonical": {
"key": "1x2",
"period": "<string>",
"line": 123,
"includes_overtime": true
},
"redistributable": "yes",
"active": true,
"closed": true,
"venue_meta": {},
"outcomes": [
{
"idx": 123,
"label": "<string>",
"canonical_outcome": "<string>",
"team_id": "<string>",
"book": {
"type": "polymarket_asset_id",
"ref": "<string>",
"side": "<string>"
},
"trade": {
"venue": "polymarket",
"chain": {
"name": "<string>",
"id": 123
},
"instrument": {},
"order": {},
"contracts": {},
"collateral": {},
"submit": {},
"complement": {},
"tradable": true,
"caveats": [
"<string>"
],
"reference": [
"<string>"
]
}
}
]
}
],
"next_cursor": "<string>",
"meta": {
"as_of": "2023-11-07T05:31:56Z",
"redistributable_filter": "yes_only",
"venues_checked": [
"<string>"
],
"total": 123,
"withheld": {
"games": 123,
"reason": "<string>"
}
}
}{
"error": "<string>",
"code": "<string>",
"hint": "<string>"
}{
"error": "<string>",
"code": "<string>",
"hint": "<string>"
}{
"error": "<string>",
"code": "<string>",
"hint": "<string>"
}{
"error": "<string>",
"code": "<string>",
"hint": "<string>"
}{
"error": "<string>",
"code": "<string>",
"hint": "<string>"
}Game Graph
Game markets and orderbook keys
Every active market the platforms offer for the game, each outcome with a canonical meaning (1x2, moneyline, total:2.5, spread:-1.5, btts) and the key that opens its orderbook. Markets with an identical (key, period, includes_overtime) are comparable across platforms; unclassified markets have a null key.
GET
/
api
/
v1
/
games
/
{id}
/
markets
Markets of a game with orderbook keys
curl --request GET \
--url https://api.vatic.trading/api/v1/games/{id}/markets \
--header 'x-api-key: <api-key>'import requests
url = "https://api.vatic.trading/api/v1/games/{id}/markets"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.vatic.trading/api/v1/games/{id}/markets', 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.vatic.trading/api/v1/games/{id}/markets",
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-api-key: <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.vatic.trading/api/v1/games/{id}/markets"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<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.vatic.trading/api/v1/games/{id}/markets")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vatic.trading/api/v1/games/{id}/markets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "polymarket:0x9f1a...",
"game_id": "<string>",
"source": "<string>",
"event_external_id": "<string>",
"title": "<string>",
"raw_type": "<string>",
"canonical": {
"key": "1x2",
"period": "<string>",
"line": 123,
"includes_overtime": true
},
"redistributable": "yes",
"active": true,
"closed": true,
"venue_meta": {},
"outcomes": [
{
"idx": 123,
"label": "<string>",
"canonical_outcome": "<string>",
"team_id": "<string>",
"book": {
"type": "polymarket_asset_id",
"ref": "<string>",
"side": "<string>"
},
"trade": {
"venue": "polymarket",
"chain": {
"name": "<string>",
"id": 123
},
"instrument": {},
"order": {},
"contracts": {},
"collateral": {},
"submit": {},
"complement": {},
"tradable": true,
"caveats": [
"<string>"
],
"reference": [
"<string>"
]
}
}
]
}
],
"next_cursor": "<string>",
"meta": {
"as_of": "2023-11-07T05:31:56Z",
"redistributable_filter": "yes_only",
"venues_checked": [
"<string>"
],
"total": 123,
"withheld": {
"games": 123,
"reason": "<string>"
}
}
}{
"error": "<string>",
"code": "<string>",
"hint": "<string>"
}{
"error": "<string>",
"code": "<string>",
"hint": "<string>"
}{
"error": "<string>",
"code": "<string>",
"hint": "<string>"
}{
"error": "<string>",
"code": "<string>",
"hint": "<string>"
}{
"error": "<string>",
"code": "<string>",
"hint": "<string>"
}Authorizations
Required for order endpoints. Obtain your API key from the Vatic dashboard.
Path Parameters
Game id, e.g. espn:401879264. An id that was replaced still resolves to the new game.
Example:
"espn:401879264"
Query Parameters
Example:
"1x2"
Example:
"full"
Required range:
1 <= x <= 500Was this page helpful?