Index markets (mutating)
curl --request POST \
--url https://app.robin.markets/api/v1/markets \
--header 'Content-Type: application/json' \
--data '
{
"conditionIds": [
"0xce9a5fa30fe74e323b4a8f15afbb0b7a41a537aa880779ddf7dee22223b2f34a"
]
}
'import requests
url = "https://app.robin.markets/api/v1/markets"
payload = { "conditionIds": ["0xce9a5fa30fe74e323b4a8f15afbb0b7a41a537aa880779ddf7dee22223b2f34a"] }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
conditionIds: ['0xce9a5fa30fe74e323b4a8f15afbb0b7a41a537aa880779ddf7dee22223b2f34a']
})
};
fetch('https://app.robin.markets/api/v1/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://app.robin.markets/api/v1/markets",
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([
'conditionIds' => [
'0xce9a5fa30fe74e323b4a8f15afbb0b7a41a537aa880779ddf7dee22223b2f34a'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://app.robin.markets/api/v1/markets"
payload := strings.NewReader("{\n \"conditionIds\": [\n \"0xce9a5fa30fe74e323b4a8f15afbb0b7a41a537aa880779ddf7dee22223b2f34a\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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://app.robin.markets/api/v1/markets")
.header("Content-Type", "application/json")
.body("{\n \"conditionIds\": [\n \"0xce9a5fa30fe74e323b4a8f15afbb0b7a41a537aa880779ddf7dee22223b2f34a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.robin.markets/api/v1/markets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"conditionIds\": [\n \"0xce9a5fa30fe74e323b4a8f15afbb0b7a41a537aa880779ddf7dee22223b2f34a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"markets": [
{
"conditionId": "0xce9a5fa30fe74e323b4a8f15afbb0b7a41a537aa880779ddf7dee22223b2f34a",
"question": "Will Donald Trump win the 2028 US Presidential Election?",
"slug": "will-donald-trump-win-the-2028-us-presidential-election",
"image": "https://polymarket-upload.s3.us-east-2.amazonaws.com/...png",
"endDate": 1857168000000,
"outcomes": [
"Yes",
"No"
],
"resolved": false,
"winningOutcome": null,
"tvl": "2100000",
"pool": {
"matchedFraction": 0,
"unmatchedYes": "70000000",
"unmatchedNo": "0",
"minoritySide": "no"
},
"apy": {
"base": 6,
"guaranteeFloor": 6,
"matching": {
"yes": 0,
"no": 1
},
"yes": 6,
"no": 7,
"min": 6,
"max": 8,
"maxPointsBoost": 1,
"nativeApy": 3.48
},
"vault": "0xcb7444981296d08da7161b75378e3773dbf5d806"
}
],
"notFound": [
"0xce9a5fa30fe74e323b4a8f15afbb0b7a41a537aa880779ddf7dee22223b2f34a"
]
}{
"error": {
"code": "bad_request",
"message": "wallet is required"
}
}{
"error": {
"code": "rate_limited",
"message": "Too many requests"
}
}Markets
Index markets (mutating)
The ONLY mutating endpoint — every GET is a pure read. Indexes the given markets (any conditionId Robin doesn’t know yet is fetched from Polymarket and upserted), then returns the SAME shape as GET /markets ({ markets, notFound }) so the result is directly usable with no follow-up read. conditionIds are normalized to lowercase.
POST
/
markets
Index markets (mutating)
curl --request POST \
--url https://app.robin.markets/api/v1/markets \
--header 'Content-Type: application/json' \
--data '
{
"conditionIds": [
"0xce9a5fa30fe74e323b4a8f15afbb0b7a41a537aa880779ddf7dee22223b2f34a"
]
}
'import requests
url = "https://app.robin.markets/api/v1/markets"
payload = { "conditionIds": ["0xce9a5fa30fe74e323b4a8f15afbb0b7a41a537aa880779ddf7dee22223b2f34a"] }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
conditionIds: ['0xce9a5fa30fe74e323b4a8f15afbb0b7a41a537aa880779ddf7dee22223b2f34a']
})
};
fetch('https://app.robin.markets/api/v1/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://app.robin.markets/api/v1/markets",
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([
'conditionIds' => [
'0xce9a5fa30fe74e323b4a8f15afbb0b7a41a537aa880779ddf7dee22223b2f34a'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://app.robin.markets/api/v1/markets"
payload := strings.NewReader("{\n \"conditionIds\": [\n \"0xce9a5fa30fe74e323b4a8f15afbb0b7a41a537aa880779ddf7dee22223b2f34a\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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://app.robin.markets/api/v1/markets")
.header("Content-Type", "application/json")
.body("{\n \"conditionIds\": [\n \"0xce9a5fa30fe74e323b4a8f15afbb0b7a41a537aa880779ddf7dee22223b2f34a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.robin.markets/api/v1/markets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"conditionIds\": [\n \"0xce9a5fa30fe74e323b4a8f15afbb0b7a41a537aa880779ddf7dee22223b2f34a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"markets": [
{
"conditionId": "0xce9a5fa30fe74e323b4a8f15afbb0b7a41a537aa880779ddf7dee22223b2f34a",
"question": "Will Donald Trump win the 2028 US Presidential Election?",
"slug": "will-donald-trump-win-the-2028-us-presidential-election",
"image": "https://polymarket-upload.s3.us-east-2.amazonaws.com/...png",
"endDate": 1857168000000,
"outcomes": [
"Yes",
"No"
],
"resolved": false,
"winningOutcome": null,
"tvl": "2100000",
"pool": {
"matchedFraction": 0,
"unmatchedYes": "70000000",
"unmatchedNo": "0",
"minoritySide": "no"
},
"apy": {
"base": 6,
"guaranteeFloor": 6,
"matching": {
"yes": 0,
"no": 1
},
"yes": 6,
"no": 7,
"min": 6,
"max": 8,
"maxPointsBoost": 1,
"nativeApy": 3.48
},
"vault": "0xcb7444981296d08da7161b75378e3773dbf5d806"
}
],
"notFound": [
"0xce9a5fa30fe74e323b4a8f15afbb0b7a41a537aa880779ddf7dee22223b2f34a"
]
}{
"error": {
"code": "bad_request",
"message": "wallet is required"
}
}{
"error": {
"code": "rate_limited",
"message": "Too many requests"
}
}Body
application/json
Unique conditionIds to index (normalized to lowercase).
Required array length:
1 - 25 elements32-byte Polymarket condition id, hex.
Pattern:
^0x[a-fA-F0-9]{64}$⌘I