Repository navigation
feat(models): add taker delay in milliseconds - #397
Merged
Merged
Conversation
cesarenaldi
marked this pull request as draft
October 29, 2026 10:05
cesarenaldi
marked this pull request as ready for review
October 29, 2026 10:32
kartojal
approved these changes
Oct 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add optional
trading.taker_delay_msfrom thetakerDelayMsresponse field, representing the taker delay in milliseconds. Deprecatetrading.seconds_delaywith guidance to use the new field.Keep
seconds_delaytyped asint | None. Add regression coverage for parsing the new field, preserving the old field, and the deprecation warning.Validation: Ruff lint and format checks, Pyright,
uv build, and all 3,520 non-integration tests pass. The full test suite ran outside the sandbox to allow network and local WebSocket access.Context: https://polymarket.slack.com/archives/C0CC6E66P0F/p1793265583940099
Note
Low Risk
Additive model and parsing changes with backward-compatible deprecation; no trading or auth logic touched.
Overview
Adds
trading.taker_delay_mson the gammaMarketmodel, mapped from the API’stakerDelayMsfield (including flat payload normalization inparse_response).trading.seconds_delayremains available but is marked deprecated with guidance to usetaker_delay_msinstead; accessing it emits a Pydantic deprecation warning. The new field is not backfilled fromsecondsDelaywhentakerDelayMsis absent.Unit tests cover parsing
taker_delay_ms(including0andNone), coexistence withsecondsDelay, and the deprecation warning onseconds_delay.Reviewed by Cursor Bugbot for commit 76cd286. Bugbot is set up for automated code reviews on this repo. Configure here.