Skip to content

fix: add ALL , ONE_MONTH intervals to PriceHistoryInterval#58

Open
arpitBhalla wants to merge 1 commit intoPolymarket:mainfrom
arpitBhalla:patch-1
Open

fix: add ALL , ONE_MONTH intervals to PriceHistoryInterval#58
arpitBhalla wants to merge 1 commit intoPolymarket:mainfrom
arpitBhalla:patch-1

Conversation

@arpitBhalla
Copy link
Copy Markdown

@arpitBhalla arpitBhalla commented May 4, 2026

Added missing intervals for price history.


Note

Low Risk
Low risk type-only change that expands PriceHistoryInterval; main impact is downstream code may start sending/handling the new interval values.

Overview
Updates PriceHistoryInterval in src/types/clob.ts to include the missing ALL ("all") and ONE_MONTH ("1m") options, with a reference link to the API docs.

Reviewed by Cursor Bugbot for commit 7f823af. Bugbot is set up for automated code reviews on this repo. Configure here.

Added new intervals for price history.
@arpitBhalla arpitBhalla requested a review from a team as a code owner May 4, 2026 17:41
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

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

Comment thread src/types/clob.ts
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant