Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/types/clob.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,11 @@ export interface PriceHistoryFilterParams {
interval?: PriceHistoryInterval;
}

// https://docs.polymarket.com/api-reference/markets/get-prices-history#parameter-interval
export enum PriceHistoryInterval {
MAX = "max",
ALL = "all",
ONE_MONTH = "1m",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enum name ONE_MONTH is wrong for "1m" value

High Severity

The ONE_MONTH enum member maps to "1m", but according to the Polymarket API documentation, "1m" represents 1 minute, not 1 month. The available intervals are 1m (1 minute), 1h (1 hour), 6h (6 hours), 1d (1 day), 1w (1 week), all, and max. The enum name will mislead consumers into thinking they're requesting one month of data when they're actually requesting one-minute granularity.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7f823af. Configure here.

ONE_WEEK = "1w",
ONE_DAY = "1d",
SIX_HOURS = "6h",
Expand Down