Create or join a Synthetic Book definition
Creates an account-owned ten-minute lease for a canonical weighted book and returns the synthetic_id to subscribe to at wss://stream.kairos.trade with provider/topic synthetic.
Uses the caller’s existing Kairos credential triple; no separate Synthetic Books credential, scope, or account allowlist is required. The full API-key triple also satisfies the mutation gate automatically.
Equivalent canonical definitions share a data-plane materialization but receive distinct account-owned lease UUIDs. Maximum 15 legs, depth 50, 25 active leases per user, and 30 create requests/minute/user by default.
curl --request POST \
--url https://execution.kairos.trade/v1/synthetics \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--header 'X-Api-Secret: <api-key>' \
--header 'X-Client-Id: <api-key>' \
--data '
{
"legs": [
{
"venue": "polymarket",
"contract_id": "<string>",
"weight": "-1",
"token_id": "<string>",
"outcome_index": 1
}
],
"depth": 50,
"classification": "arbitrary_basket"
}
'import requests
url = "https://execution.kairos.trade/v1/synthetics"
payload = {
"legs": [
{
"venue": "polymarket",
"contract_id": "<string>",
"weight": "-1",
"token_id": "<string>",
"outcome_index": 1
}
],
"depth": 50,
"classification": "arbitrary_basket"
}
headers = {
"X-Client-Id": "<api-key>",
"X-Api-Key": "<api-key>",
"X-Api-Secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Client-Id': '<api-key>',
'X-Api-Key': '<api-key>',
'X-Api-Secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
legs: [
{
venue: 'polymarket',
contract_id: '<string>',
weight: '-1',
token_id: '<string>',
outcome_index: 1
}
],
depth: 50,
classification: 'arbitrary_basket'
})
};
fetch('https://execution.kairos.trade/v1/synthetics', 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://execution.kairos.trade/v1/synthetics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'legs' => [
[
'venue' => 'polymarket',
'contract_id' => '<string>',
'weight' => '-1',
'token_id' => '<string>',
'outcome_index' => 1
]
],
'depth' => 50,
'classification' => 'arbitrary_basket'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>",
"X-Api-Secret: <api-key>",
"X-Client-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://execution.kairos.trade/v1/synthetics"
payload := strings.NewReader("{\n \"legs\": [\n {\n \"venue\": \"polymarket\",\n \"contract_id\": \"<string>\",\n \"weight\": \"-1\",\n \"token_id\": \"<string>\",\n \"outcome_index\": 1\n }\n ],\n \"depth\": 50,\n \"classification\": \"arbitrary_basket\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Client-Id", "<api-key>")
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("X-Api-Secret", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://execution.kairos.trade/v1/synthetics")
.header("X-Client-Id", "<api-key>")
.header("X-Api-Key", "<api-key>")
.header("X-Api-Secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"legs\": [\n {\n \"venue\": \"polymarket\",\n \"contract_id\": \"<string>\",\n \"weight\": \"-1\",\n \"token_id\": \"<string>\",\n \"outcome_index\": 1\n }\n ],\n \"depth\": 50,\n \"classification\": \"arbitrary_basket\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://execution.kairos.trade/v1/synthetics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Client-Id"] = '<api-key>'
request["X-Api-Key"] = '<api-key>'
request["X-Api-Secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"legs\": [\n {\n \"venue\": \"polymarket\",\n \"contract_id\": \"<string>\",\n \"weight\": \"-1\",\n \"token_id\": \"<string>\",\n \"outcome_index\": 1\n }\n ],\n \"depth\": 50,\n \"classification\": \"arbitrary_basket\"\n}"
response = http.request(request)
puts response.read_body{
"synthetic_id": "syn_0123456789abcdef",
"subscription_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created": true,
"fees_updated": true,
"sources_subscribed": 1,
"expires_at_ms": 123,
"ttl_ms": 600000
}{
"error": "synthetic_books_unavailable",
"message": "<string>",
"details": {}
}{
"error": "Insufficient scope",
"code": "<string>"
}{
"error": "Insufficient scope",
"code": "<string>"
}{
"error": "synthetic_books_unavailable",
"message": "<string>",
"details": {}
}{
"error": "synthetic_books_unavailable",
"message": "<string>",
"details": {}
}{
"error": "synthetic_books_unavailable",
"message": "<string>",
"details": {}
}{
"error": "synthetic_books_unavailable",
"message": "<string>",
"details": {}
}{
"error": "synthetic_books_unavailable",
"message": "<string>",
"details": {}
}{
"error": "synthetic_books_unavailable",
"message": "<string>",
"details": {}
}Authorizations
Credential client id (kairos_ck_...). Must be sent together with X-Api-Key and X-Api-Secret.
64-char hex API key.
64-char hex API secret.
Body
1 - 15 elementsShow child attributes
Show child attributes
bbo, aggregated_l2, decomposed_l2 1 <= x <= 5050
Reviewed economic metadata; Kairos does not infer it from the formula.
arbitrary_basket, relative_value, exact_equivalence, complement, partition, implication, range, guaranteed_payout Response
Lease created and canonical synthetic id returned.
^syn_[0-9a-f]{16}$"syn_0123456789abcdef"
Opaque account-owned public lease id. This is not the materializer's private numeric handle.
True when this request created the canonical materialization; false when it joined an equivalent one.
x >= 0600000
Was this page helpful?
curl --request POST \
--url https://execution.kairos.trade/v1/synthetics \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--header 'X-Api-Secret: <api-key>' \
--header 'X-Client-Id: <api-key>' \
--data '
{
"legs": [
{
"venue": "polymarket",
"contract_id": "<string>",
"weight": "-1",
"token_id": "<string>",
"outcome_index": 1
}
],
"depth": 50,
"classification": "arbitrary_basket"
}
'import requests
url = "https://execution.kairos.trade/v1/synthetics"
payload = {
"legs": [
{
"venue": "polymarket",
"contract_id": "<string>",
"weight": "-1",
"token_id": "<string>",
"outcome_index": 1
}
],
"depth": 50,
"classification": "arbitrary_basket"
}
headers = {
"X-Client-Id": "<api-key>",
"X-Api-Key": "<api-key>",
"X-Api-Secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Client-Id': '<api-key>',
'X-Api-Key': '<api-key>',
'X-Api-Secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
legs: [
{
venue: 'polymarket',
contract_id: '<string>',
weight: '-1',
token_id: '<string>',
outcome_index: 1
}
],
depth: 50,
classification: 'arbitrary_basket'
})
};
fetch('https://execution.kairos.trade/v1/synthetics', 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://execution.kairos.trade/v1/synthetics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'legs' => [
[
'venue' => 'polymarket',
'contract_id' => '<string>',
'weight' => '-1',
'token_id' => '<string>',
'outcome_index' => 1
]
],
'depth' => 50,
'classification' => 'arbitrary_basket'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>",
"X-Api-Secret: <api-key>",
"X-Client-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://execution.kairos.trade/v1/synthetics"
payload := strings.NewReader("{\n \"legs\": [\n {\n \"venue\": \"polymarket\",\n \"contract_id\": \"<string>\",\n \"weight\": \"-1\",\n \"token_id\": \"<string>\",\n \"outcome_index\": 1\n }\n ],\n \"depth\": 50,\n \"classification\": \"arbitrary_basket\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Client-Id", "<api-key>")
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("X-Api-Secret", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://execution.kairos.trade/v1/synthetics")
.header("X-Client-Id", "<api-key>")
.header("X-Api-Key", "<api-key>")
.header("X-Api-Secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"legs\": [\n {\n \"venue\": \"polymarket\",\n \"contract_id\": \"<string>\",\n \"weight\": \"-1\",\n \"token_id\": \"<string>\",\n \"outcome_index\": 1\n }\n ],\n \"depth\": 50,\n \"classification\": \"arbitrary_basket\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://execution.kairos.trade/v1/synthetics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Client-Id"] = '<api-key>'
request["X-Api-Key"] = '<api-key>'
request["X-Api-Secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"legs\": [\n {\n \"venue\": \"polymarket\",\n \"contract_id\": \"<string>\",\n \"weight\": \"-1\",\n \"token_id\": \"<string>\",\n \"outcome_index\": 1\n }\n ],\n \"depth\": 50,\n \"classification\": \"arbitrary_basket\"\n}"
response = http.request(request)
puts response.read_body{
"synthetic_id": "syn_0123456789abcdef",
"subscription_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created": true,
"fees_updated": true,
"sources_subscribed": 1,
"expires_at_ms": 123,
"ttl_ms": 600000
}{
"error": "synthetic_books_unavailable",
"message": "<string>",
"details": {}
}{
"error": "Insufficient scope",
"code": "<string>"
}{
"error": "Insufficient scope",
"code": "<string>"
}{
"error": "synthetic_books_unavailable",
"message": "<string>",
"details": {}
}{
"error": "synthetic_books_unavailable",
"message": "<string>",
"details": {}
}{
"error": "synthetic_books_unavailable",
"message": "<string>",
"details": {}
}{
"error": "synthetic_books_unavailable",
"message": "<string>",
"details": {}
}{
"error": "synthetic_books_unavailable",
"message": "<string>",
"details": {}
}{
"error": "synthetic_books_unavailable",
"message": "<string>",
"details": {}
}
