Thanks for considering a contribution to polymarket-execution.
All changes — features, fixes, docs, chores — go through pull requests. Direct pushes to main are blocked by branch protection.
Use a descriptive prefix:
| Prefix | Use for |
|---|---|
feat/<name> |
New feature or module |
fix/<name> |
Bug fix |
docs/<name> |
Documentation only |
refactor/<name> |
Refactor without behavior change |
test/<name> |
Tests only |
chore/<name> |
Tooling, deps, CI, release prep |
Example: feat/redeem-v01, fix/recovery-status-timeout, docs/markets-quickstart.
Follow Conventional Commits:
feat: implement RedeemClient.auto_redeem_all
fix: handle 1-2s lag in get_trades after fill
docs: add example for take-profit with PnL target
chore: bump py-clob-client-v2 to 1.1.0
Single-line subject preferred. Add a body separated by a blank line for the why when non-obvious.
git push -u origin feat/<name>
gh pr create --fillCI runs:
ruff check .andruff format --check .mypy --strict src/pyteston Python 3.10, 3.11, and 3.12
All four must pass before the PR can merge.
PRs are squash-merged: the PR title becomes the commit subject on main, and the PR body becomes the commit body. The feature branch is auto-deleted on merge.
For solo work you can self-merge once CI is green:
gh pr merge --squash --auto--auto waits for CI and merges as soon as the checks pass.
git clone https://github.com/eduardodoege/polymarket-execution.git
cd polymarket-execution
pip install -e ".[dev]"
# Run the same checks CI runs
ruff check .
ruff format --check .
mypy src/
pytestpyproject.toml sets pythonpath = ["src"] for pytest so tests work without installing the package, but pip install -e . is needed for mypy and the CLI entry point.
In scope: execution primitives that wrap raw Polymarket CLOB v2 calls — stop-loss, take-profit, redeem, position sync, order lifecycle, market discovery, recovery layers.
Out of scope: trading strategy (when to enter, what to bet, how much). This library is a strategy-agnostic execution layer.
See RELEASING.md. Maintainer-only.