Skip to main content
GET
/
v1
/
orderbook
/
{symbol}
Get order book
curl --request GET \
  --url https://api.prod.polymarketexchange.com/v1/orderbook/{symbol}
import requests

url = "https://api.prod.polymarketexchange.com/v1/orderbook/{symbol}"

response = requests.get(url)

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

fetch('https://api.prod.polymarketexchange.com/v1/orderbook/{symbol}', 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.prod.polymarketexchange.com/v1/orderbook/{symbol}",
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://api.prod.polymarketexchange.com/v1/orderbook/{symbol}"

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://api.prod.polymarketexchange.com/v1/orderbook/{symbol}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.prod.polymarketexchange.com/v1/orderbook/{symbol}")

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
{
  "symbol": "<string>",
  "bids": [
    {
      "px": "<string>",
      "qty": "<string>"
    }
  ],
  "offers": [
    {
      "px": "<string>",
      "qty": "<string>"
    }
  ],
  "stats": {
    "openPx": "<string>",
    "closePx": "<string>",
    "lowPx": "<string>",
    "highPx": "<string>",
    "lastTradePx": "<string>",
    "lastTradeQty": "<string>",
    "indicativeOpenPx": "<string>",
    "settlementPx": "<string>",
    "settlementSetTime": "2023-11-07T05:31:56Z",
    "settlementPreliminary": true,
    "settlementPriceCalculationMethod": "<string>",
    "settlementPriceCalculationText": "<string>",
    "sharesTraded": "<string>",
    "notionalTraded": "<string>",
    "openInterest": "<string>"
  },
  "transactTime": "2023-11-07T05:31:56Z"
}

Path Parameters

symbol
string
required

Instrument symbol (e.g., "BTC-USD")

Query Parameters

depth
integer<int32>

Number of price levels to return (default 3, max 10)

Response

200 - application/json

A successful response.

Response containing the order book snapshot.

symbol
string
bids
Bid side of order book (sorted by price descending) · object[]
offers
Offer/ask side of order book (sorted by price ascending) · object[]
state
enum<string>

InstrumentState represents the state of an instrument.

Available options:
INSTRUMENT_STATE_CLOSED,
INSTRUMENT_STATE_OPEN,
INSTRUMENT_STATE_PREOPEN,
INSTRUMENT_STATE_SUSPENDED,
INSTRUMENT_STATE_EXPIRED,
INSTRUMENT_STATE_TERMINATED,
INSTRUMENT_STATE_HALTED,
INSTRUMENT_STATE_MATCH_AND_CLOSE_AUCTION,
INSTRUMENT_STATE_PENDING
stats
Market statistics (last trade, open/high/low/close, etc.) · object

InstrumentStats contains statistics about an instrument.

transactTime
string<date-time>