Skip to content

handle empty fee_rate_bps in MakerOrder deserialization#24

Open
christian-git-md wants to merge 1 commit intoPolymarket:mainfrom
christian-git-md:fix/empty-fee-rate-bps-deserialization
Open

handle empty fee_rate_bps in MakerOrder deserialization#24
christian-git-md wants to merge 1 commit intoPolymarket:mainfrom
christian-git-md:fix/empty-fee-rate-bps-deserialization

Conversation

@christian-git-md
Copy link
Copy Markdown

@christian-git-md christian-git-md commented Apr 28, 2026

Fixes #23

Possibly there is an interpretation difference between "intentionally absent" and 0, but I suggest breaking the struct definition for the legacy feature is not worth it.


Note

Low Risk
Low risk: narrowly changes JSON deserialization for MakerOrder.fee_rate_bps to tolerate empty strings, plus a unit test; behavioral change could mask upstream API issues but is limited to one field.

Overview
Makes MakerOrder.fee_rate_bps robust to the API returning an empty string by deserializing it as 0 via empty_string_as_zero.

Adds a regression unit test ensuring MakerOrder deserialization succeeds when fee_rate_bps is "".

Reviewed by Cursor Bugbot for commit 1171513. Bugbot is set up for automated code reviews on this repo. 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.

trades() fails to deserialize: MakerOrder.fee_rate_bps` receives empty string from API

1 participant