This repository was archived by the owner on May 25, 2026. It is now read-only.
docs(readme): add per-market fee rate section#332
Open
skyc1e wants to merge 1 commit into
Open
Conversation
Documents get_fee_rate_bps() and points integrators to the live /fee-rate endpoint + on-chain CalculatorHelper as sources of truth, since fee rates vary per market. Refs Polymarket#326.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Refs #326.
What changed
Adds a short Fee rates (per market) section to
README.mdshowing how to query the live fee rate for a given token via the existingget_fee_rate_bps(token_id)method.Why
The library already calls
GET /fee-rate?token_id=...under the hood when creating orders, but the README never mentions the method or the fact that fees are market-specific. Issue #326 reports that the public fee docs imply a single static rate per category, while/fee-rateactually returns different values per market (e.g.0for some NHL markets,1000bps for NBA/MLB).This PR stays strictly within what the code and endpoint already do:
get_fee_rate_bpsmethod.fee_rate_bpsconflicts with the resolved market rate — this matches the behavior in__resolve_fee_rate.CalculatorHelper.solfor the authoritative on-chain fee calculation.Scope
README.md), additive section only.Note
Low Risk
Documentation-only change with no runtime or API behavior modifications.
Overview
Adds a new “Fee rates (per market)” section to
README.mddocumenting that fees vary by market and can change over time, and showing how to query the live rate viaclient.get_fee_rate_bps(token_id).Clarifies units (basis points), notes order creation will validate any user-supplied
fee_rate_bpsagainst the market’s resolved rate, and links to the on-chain fee calculation source (CalculatorHelper.sol).Reviewed by Cursor Bugbot for commit e935523. Bugbot is set up for automated code reviews on this repo. Configure here.