curl --request GET \
--url https://api.limitless.exchange/markets/{slug}/orderbookimport requests
url = "https://api.limitless.exchange/markets/{slug}/orderbook"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.limitless.exchange/markets/{slug}/orderbook', 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.limitless.exchange/markets/{slug}/orderbook",
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.limitless.exchange/markets/{slug}/orderbook"
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.limitless.exchange/markets/{slug}/orderbook")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.limitless.exchange/markets/{slug}/orderbook")
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{
"adjustedMidpoint": 0.75,
"asks": [
{
"price": 0.74,
"size": 150,
"side": "BUY"
}
],
"bids": [
{
"price": 0.74,
"size": 150,
"side": "BUY"
}
],
"lastTradePrice": 0.75,
"maxSpread": 0.05,
"midpoint": 0.75,
"minSize": 1,
"tokenId": "19633204485790857949828516737993423758628930235371629943999544859324645414627"
}{
"message": "Market is not active"
}{
"message": "Market not found"
}{
"message": "<string>"
}Get Orderbook
Retrieve the current LIVE GTC YES-side order book for one exact active CLOB market slug. The separately produced last mined trade price may be null without failing the request.
curl --request GET \
--url https://api.limitless.exchange/markets/{slug}/orderbookimport requests
url = "https://api.limitless.exchange/markets/{slug}/orderbook"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.limitless.exchange/markets/{slug}/orderbook', 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.limitless.exchange/markets/{slug}/orderbook",
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.limitless.exchange/markets/{slug}/orderbook"
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.limitless.exchange/markets/{slug}/orderbook")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.limitless.exchange/markets/{slug}/orderbook")
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{
"adjustedMidpoint": 0.75,
"asks": [
{
"price": 0.74,
"size": 150,
"side": "BUY"
}
],
"bids": [
{
"price": 0.74,
"size": 150,
"side": "BUY"
}
],
"lastTradePrice": 0.75,
"maxSpread": 0.05,
"midpoint": 0.75,
"minSize": 1,
"tokenId": "19633204485790857949828516737993423758628930235371629943999544859324645414627"
}{
"message": "Market is not active"
}{
"message": "Market not found"
}{
"message": "<string>"
}subscribe_market_prices with marketSlugs. Subscribing also pushes this book once per slug as an initial orderbookUpdate, so you do not need this endpoint to seed local state.CREATED or FUNDED.There is no historical orderbook endpoint. For past activity on a market, combine three sources:- Get Historical Prices for price series.
- Get Feed Events for trade events.
- Get History for your own CLOB fills (filter
strategyonLimit Buy/Limit Sell/Market Buy/Market Sell).
Snapshot and price freshness
lastTradePrice is a nullable YES-equivalent price and is not guaranteed to represent the same point in time as the order-book levels. No bound on response freshness is guaranteed.
midpoint uses the best displayed bid and ask. adjustedMidpoint excludes individual orders smaller than minSize before price-level aggregation and midpoint calculation. Every bid level has side: "BUY"; every ask level has side: "SELL".
Complementary token prices (deriving the NO book)
This endpoint returns a single, YES-side book. ThetokenId in the response is the market’s YES position ID, and bids/asks are quoted in YES-token terms. The two outcome tokens are complementary: a YES share and a NO share always redeem together for exactly $1. Their prices therefore satisfy:
price(YES) + price(NO) = 1
NO bid @ P ≡ YES ask @ (1 - P) (someone bidding for NO is offering YES)
NO ask @ P ≡ YES bid @ (1 - P) (someone offering NO is bidding for YES)
Deriving the NO orderbook
To quote or trade the NO token, mirror the returned YES book: flip bids ↔ asks and replace every pricep with 1 - p (sizes are unchanged).
| NO book | Derived from | Best level |
|---|---|---|
| NO bids (orders to buy NO) | YES asks | best NO bid = 1 - bestYesAsk |
| NO asks (orders to sell NO) | YES bids | best NO ask = 1 - bestYesBid |
noMidpoint = 1 - yesMidpoint, and the spread is identical.
type Level = { price: number; size: number; side: "BUY" | "SELL" };
type Book = { bids: Level[]; asks: Level[] };
// Mirror the YES-side book into the NO-side book.
function deriveNoBook(yes: Book): Book {
const invert = (l: Level): Level => ({
price: 1 - l.price,
size: l.size,
side: l.side === "BUY" ? "SELL" : "BUY",
});
return {
bids: yes.asks.map(invert).sort((a, b) => b.price - a.price), // best (highest) first
asks: yes.bids.map(invert).sort((a, b) => a.price - b.price), // best (lowest) first
};
}
// To SELL NO, hit the best NO bid: 1 - bestYesAsk
// To BUY NO, lift the best NO ask: 1 - bestYesBid
def derive_no_book(yes: dict) -> dict:
"""Mirror the YES-side book into the NO-side book."""
invert = lambda l: {
"price": 1 - l["price"],
"size": l["size"],
"side": "SELL" if l["side"] == "BUY" else "BUY",
}
return {
"bids": sorted((invert(a) for a in yes["asks"]), key=lambda l: -l["price"]), # best first
"asks": sorted((invert(b) for b in yes["bids"]), key=lambda l: l["price"]), # best first
}
# To SELL NO, hit the best NO bid: 1 - best_yes_ask
# To BUY NO, lift the best NO ask: 1 - best_yes_bid
tokenId (noPositionId from Get Market) at the derived price. The price inversion only affects how you read the book, not how the order is signed.
Multi-outcome (NegRisk) markets
In a NegRisk multi-outcome market, each outcome is its own market with its own slug, its own YES/NO tokens, and its own orderbook. Fetch each outcome’s book by its slug and derive that outcome’s NO book with the same inversion above. There is no single cross-outcome book to invert. What links the outcomes is a soft pricing constraint, not a shared book. Across the N outcomes, the YES prices tend toward summing to 1 (exactly one outcome resolves YES). All the NO contracts are linked for share conversion. To assemble a full picture of a multi-outcome market, request the orderbook for each outcome slug and mirror each one independently.Errors
| Status | Meaning |
|---|---|
400 | The exact market is an AMM (Market does not support orderbook (AMM market)) or its CLOB status is not CREATED or FUNDED (Market is not active). |
404 | No exact market has the slug (Market not found). A group slug also produces this response. |
500 | The orderbook could not be read unexpectedly. |
Path Parameters
Response
Current orderbook with bids and asks
Midpoint after excluding individual orders below minSize before price-level aggregation.
0.75
YES asks in ascending price order. Each level has side SELL.
Show child attributes
Show child attributes
YES bids in descending price order. Each level has side BUY.
Show child attributes
Show child attributes
Separately produced latest usable mined YES-equivalent trade price; null when no usable value is available, including when its lookup fails.
0.75
0.05
Midpoint from the best displayed bid and ask.
0.75
1
YES position token ID.
"19633204485790857949828516737993423758628930235371629943999544859324645414627"