curl --request GET \
--url https://api.orbscan.com/v1/orderbook/markets \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.orbscan.com/v1/orderbook/markets"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.orbscan.com/v1/orderbook/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.orbscan.com/v1/orderbook/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 => [
"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.orbscan.com/v1/orderbook/markets"
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.orbscan.com/v1/orderbook/markets")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbscan.com/v1/orderbook/markets")
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{
"message": "OK",
"status_code": "1",
"data": {
"items": [
{
"marketId": "248851",
"conditionId": "0x3784ea734e3886a167bf3d8de6b79290e2dcf57e71812f9db5cfe165936d3215",
"question": "Will the FDV of OpenSea's token be above $5b 1 week after launch?",
"slug": "will-the-fdv-of-openseas-token-be-above-5b-1-week-after-launch",
"status": "closed",
"openAt": 1677095132413,
"closeAt": 1703894400000,
"outcomes": [
{
"name": "Yes",
"tokenId": "100299615833860717861695156210002025817496421474264537699755386813000932190489"
},
{
"name": "No",
"tokenId": "9444964418353784846201878646812530954474648898197532093004406084519216761243"
}
]
}
],
"nextCursor": "AAAAAAADzBQ"
}
}{
"message": "limit must be between 1 and 1000",
"status_code": "0",
"data": null
}{
"message": "Missing or invalid API key",
"status_code": "0",
"data": null
}{
"message": "Rate limit exceeded",
"status_code": "0",
"data": null
}Get Order Book Markets
List the Polymarket crypto markets and outcome tokens covered by the Order Book API.
curl --request GET \
--url https://api.orbscan.com/v1/orderbook/markets \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.orbscan.com/v1/orderbook/markets"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.orbscan.com/v1/orderbook/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.orbscan.com/v1/orderbook/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 => [
"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.orbscan.com/v1/orderbook/markets"
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.orbscan.com/v1/orderbook/markets")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbscan.com/v1/orderbook/markets")
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{
"message": "OK",
"status_code": "1",
"data": {
"items": [
{
"marketId": "248851",
"conditionId": "0x3784ea734e3886a167bf3d8de6b79290e2dcf57e71812f9db5cfe165936d3215",
"question": "Will the FDV of OpenSea's token be above $5b 1 week after launch?",
"slug": "will-the-fdv-of-openseas-token-be-above-5b-1-week-after-launch",
"status": "closed",
"openAt": 1677095132413,
"closeAt": 1703894400000,
"outcomes": [
{
"name": "Yes",
"tokenId": "100299615833860717861695156210002025817496421474264537699755386813000932190489"
},
{
"name": "No",
"tokenId": "9444964418353784846201878646812530954474648898197532093004406084519216761243"
}
]
}
],
"nextCursor": "AAAAAAADzBQ"
}
}{
"message": "limit must be between 1 and 1000",
"status_code": "0",
"data": null
}{
"message": "Missing or invalid API key",
"status_code": "0",
"data": null
}{
"message": "Rate limit exceeded",
"status_code": "0",
"data": null
}tag_id=21). Each market includes its conditionId and the tokenId for every outcome. Results are ordered by marketId in ascending order.
Take a tokenId from here and pass it to Get Order Book Events to fetch the book snapshots and price_change deltas for that outcome.
status is Orbscan’s availability status. active means Orbscan tracks the market as active. Otherwise, the value is closed. This differs from Gamma’s closed field.nextCursor, pass it back as the cursor query parameter. Reuse the cursor with the same filters.Authorizations
Paste your Orbscan API key here. The Bearer prefix is added automatically.
Query Parameters
Exact Gamma market ID.
"12345"
Exact condition ID. It must start with 0x followed by 64 hexadecimal characters. Input is case-insensitive and normalized to lowercase.
"0x0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
Return the market that contains this outcome token.
"123456789"
Orbscan availability status. active means Orbscan tracks the market as active. closed means it does not. This differs from the Gamma closed field. Input is case-insensitive.
active, closed "active"
Page size. Defaults to 100. Values outside 1 to 1,000 return 400.
1 <= x <= 1000Opaque cursor from the previous response's nextCursor. Reuse it with the same filters.