Wrong Command Returns 404
Problem: You get a 404 error when looking up an event or market. Cause: Using the wrong command namespace for the resource type. Solution: The URL path tells you which command to use:- URL contains
/event/→ usepolymarket events get <slug> - URL contains
/market/→ usepolymarket markets get <slug>
events get first. If that returns a 404, fall back to markets get.
outcomePrices is a JSON String
Problem: Trying to access price data from event output fails or shows garbled text. Cause: TheoutcomePrices field in event data is a JSON-encoded string, not a parsed object.
Solution: Parse it with json.loads() in Python or equivalent in other languages.
Example:
Token IDs Must Be Decimal
Problem: CLOB commands fail or return no data when using token IDs. Cause: You’re using hex format (0x...) instead of decimal integers.
Solution: Always get token IDs from polymarket clob market <CONDITION_ID>, which returns decimal values.
Correct workflow:
token_id from clob market rather than converting manually.
Order Parameter Uses camelCase
Problem: Getting 422 errors when searching markets with--order.
Cause: Using snake_case instead of camelCase for the order parameter.
Solution: Use camelCase for all order values.
Examples:
volumeNum- Sort by trading volumeliquidityNum- Sort by liquidityendDate- Sort by market end date
Open Interest ≠ Face Value
Problem: Open interest calculations don’t match expectations. Cause: In neg-risk markets, open interest is weighted by current value, not face value. Explanation: You might expect:Open Interest = YES_tokens × $1.00
But in neg-risk markets: Open Interest = YES_tokens × current_YES_price + NO_tokens × current_NO_price
Example:
This is not an error in the CLI or API—it’s how neg-risk markets calculate open interest.
markets list Sorts Ascending
Problem: Can’t find high-volume markets usingmarkets list.
Cause: The markets list command always sorts in ascending order, putting lowest-volume markets first.
Solution: Use markets search instead, which supports --order to sort by volume descending.
Comparison:
"" with markets search to effectively list all markets with custom ordering.
Sum of YES Prices ≈ 1.01
Problem: Outcome prices sum to slightly more than $1.00. Cause: This is normal—it’s the 1% house vig (vigorish/fee). Example:No Top-Level get Command
Problem: Runningpolymarket get <slug> fails.
Cause: There is no top-level get command.
Solution: Always use namespaced commands:
events, markets, clob, or data.
Summary Table
| Gotcha | Detail |
|---|---|
| Wrong command → 404 | URL path is the signal: /event/ vs /market/ |
outcomePrices is a JSON string | Must json.loads() to parse prices from event data |
| Token IDs must be decimal | NOT hex 0x.... Use polymarket clob market <CONDITION_ID> |
--order is camelCase | volumeNum works; volume_num causes 422 error |
| Open Interest ≠ face value | In neg-risk markets, OI is current-value-weighted, not YES_tokens × $1 |
markets list is ascending | Use markets search to get high-volume markets first |
| Sum of YES prices ≈ 1.01 | Normal—1% house vig. Not an error. |
No top-level get | Always namespaced: markets get, events get, etc. |