Skip to main content
GET
/
book
Get order book
curl --request GET \
  --url https://clob.polymarket.com/book
import requests

url = "https://clob.polymarket.com/book"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://clob.polymarket.com/book', 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://clob.polymarket.com/book",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$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://clob.polymarket.com/book"

req, _ := http.NewRequest("GET", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://clob.polymarket.com/book")
.asString();
require 'uri'
require 'net/http'

url = URI("https://clob.polymarket.com/book")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
{
  "market": "0x1234567890123456789012345678901234567890",
  "asset_id": "0xabc123def456...",
  "timestamp": "1234567890",
  "hash": "a1b2c3d4e5f6...",
  "bids": [
    {
      "price": "0.45",
      "size": "100"
    },
    {
      "price": "0.44",
      "size": "200"
    }
  ],
  "asks": [
    {
      "price": "0.46",
      "size": "150"
    },
    {
      "price": "0.47",
      "size": "250"
    }
  ],
  "min_order_size": "1",
  "tick_size": "0.01",
  "neg_risk": false,
  "last_trade_price": "0.45"
}
{
"error": "Invalid token id"
}
{
"error": "No orderbook exists for the requested token id"
}
{
"error": "error getting the orderbook"
}

Query Parameters

token_id
string
required

Token ID (asset ID)

Response

Successfully retrieved order book

market
string
required

Market condition ID

Example:

"0x1234567890123456789012345678901234567890"

asset_id
string
required

Token ID (asset ID)

Example:

"0xabc123def456..."

timestamp
string
required

Timestamp of the order book snapshot

Example:

"1234567890"

hash
string
required

Hash of the order book summary

Example:

"a1b2c3d4e5f6..."

bids
object[]
required

List of bid orders (sorted by price descending)

asks
object[]
required

List of ask orders (sorted by price ascending)

min_order_size
string
required

Minimum order size

Example:

"1"

tick_size
string
required

Minimum price increment (tick size)

Example:

"0.01"

neg_risk
boolean
required

Whether negative risk is enabled for this market

Example:

false

last_trade_price
string
required

Last trade price

Example:

"0.45"