Skip to content
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
Polymarket:mainfrom
skyc1e:docs/fee-rate-section
Open

docs(readme): add per-market fee rate section#332
skyc1e wants to merge 1 commit into
Polymarket:mainfrom
skyc1e:docs/fee-rate-section

Conversation

@skyc1e
Copy link
Copy Markdown

@skyc1e skyc1e commented Apr 16, 2026

Refs #326.

What changed

Adds a short Fee rates (per market) section to README.md showing how to query the live fee rate for a given token via the existing get_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-rate actually returns different values per market (e.g. 0 for some NHL markets, 1000 bps for NBA/MLB).

This PR stays strictly within what the code and endpoint already do:

  • Documents the public get_fee_rate_bps method.
  • States the unit (basis points) and shows how to call it.
  • Notes that the client will raise if a user-supplied fee_rate_bps conflicts with the resolved market rate — this matches the behavior in __resolve_fee_rate.
  • Points readers to CalculatorHelper.sol for the authoritative on-chain fee calculation.

Scope


Note

Low Risk
Documentation-only change with no runtime or API behavior modifications.

Overview
Adds a new “Fee rates (per market)” section to README.md documenting that fees vary by market and can change over time, and showing how to query the live rate via client.get_fee_rate_bps(token_id).

Clarifies units (basis points), notes order creation will validate any user-supplied fee_rate_bps against 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.

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.
@skyc1e skyc1e requested a review from a team as a code owner April 16, 2026 20:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant