Skip to main content
GET
/
orderbook
/
{marketId}
cURL
curl --request GET \
  --url https://api.jup.ag/prediction/v1/orderbook/{marketId} \
  --header 'x-api-key: <api-key>'
import requests

url = "https://api.jup.ag/prediction/v1/orderbook/{marketId}"

headers = {"x-api-key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};

fetch('https://api.jup.ag/prediction/v1/orderbook/{marketId}', 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.jup.ag/prediction/v1/orderbook/{marketId}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "x-api-key: <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"
	"net/http"
	"io"
)

func main() {

	url := "https://api.jup.ag/prediction/v1/orderbook/{marketId}"

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

	req.Header.Add("x-api-key", "<api-key>")

	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.jup.ag/prediction/v1/orderbook/{marketId}")
  .header("x-api-key", "<api-key>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.jup.ag/prediction/v1/orderbook/{marketId}")

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

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "yes": [
    [
      123
    ]
  ],
  "no": [
    [
      123
    ]
  ],
  "yes_dollars": [
    "<array>"
  ],
  "no_dollars": [
    "<array>"
  ]
}
{
  "message": "<string>",
  "request_id": "<string>",
  "code": "<string>",
  "param": "<string>",
  "doc_url": "<string>"
}

Authorizations

x-api-key
string
header
required

Path Parameters

marketId
string
required

Kalshi or Polymarket market identifier

Minimum string length: 1
Example:

"KXF1-25-LN"

Response

object | null

Orderbook depth for the given market

yes
number[][]
required

YES-side levels sorted by price ascending. Each entry is a [price_cents, size] tuple. price_cents is rounded, so sub-cent levels show 0; size may be fractional.

Required array length: 2 elements
no
number[][]
required

NO-side levels sorted by price ascending. Each entry is a [price_cents, size] tuple. price_cents is rounded, so sub-cent levels show 0; size may be fractional.

Required array length: 2 elements
yes_dollars
array[]
required

YES-side levels with price as decimal dollar string. Each entry is a [price_string, size] tuple, e.g. ["0.0100", 346014].

Required array length: 2 elements
no_dollars
array[]
required

NO-side levels with price as decimal dollar string. Each entry is a [price_string, size] tuple, e.g. ["0.0100", 219].

Required array length: 2 elements