App Logo
polymarket.com

Get Polymarket order book

Automatically get Polymarket order book on polymarket.com. Order book of one outcome of a Polymarket event: best bid and ask, spread, midpoint, and the resting bids and asks (price from 0 to 1, size in shares) nearest the spread, with total shares and USD on each side. Takes the event URL or slug, the outcome name for multi-outcome events, Yes or No, and how many price levels to return. A market with no orders returns empty sides and null best prices. Throws if the event or outcome is not found.

Input

url required

Event URL (https://polymarket.com/event/<slug>) or bare slug.

side optional
Default: "Yes"
levels optional

Price levels to return on each side, nearest the spread first.

Default: 10
outcome optional

Outcome in a multi-outcome event, matched case-insensitively against its name. Omit for single-question events.

Output

asks required
bids required
side required
event required
outcome required
spread optional
best_ask optional
best_bid optional
midpoint optional
tick_size optional
timestamp optional
ask_depth_usd optional
bid_depth_usd optional
ask_depth_shares optional
ask_levels_total optional
bid_depth_shares optional
bid_levels_total optional

FAQ

Order book of one outcome of a Polymarket event: best bid and ask, spread, midpoint, and the resting bids and asks (price from 0 to 1, size in shares) nearest the spread, with total shares and USD on each side. Takes the event URL or slug, the outcome name for multi-outcome events, Yes or No, and how many price levels to return. A market with no orders returns empty sides and null best prices. Throws if the event or outcome is not found.
Ask an AI agent connected to Reduck to run reduck/polymarket.com/get_order_book, or run it from a terminal with the Reduck CLI: npx @reduck-ai/cli@latest run --script reduck/polymarket.com/get_order_book
You do not need one. "Get Polymarket order book" drives the real polymarket.com pages in a browser, so it works whether or not polymarket.com offers an API for this.
Required: url. Optional: side, levels, outcome.
It returns asks, bids, side, event, spread, outcome, best_ask, best_bid, midpoint, tick_size, timestamp, ask_depth_usd, bid_depth_usd, ask_depth_shares, ask_levels_total, bid_depth_shares, bid_levels_total.
No. It only uses pages of polymarket.com that are reachable without signing in.
It only reads. It looks things up on polymarket.com and changes nothing there.
Ask an AI agent connected to Reduck to run reduck/polymarket.com/get_order_book, or run it from a terminal with the Reduck CLI: npx @reduck-ai/cli@latest run --script reduck/polymarket.com/get_order_book
It is part of Reduck's official curated catalogue.

Start building not clicking