Thanks for contributing! This project is a Rust SDK for Polymarket APIs, and we welcome bug fixes, docs improvements, and new endpoint coverage.
- Bugs / feature requests: Issues
- PRs: Pull Requests
- Rust (stable toolchain)
git
- Fork the repo and clone your fork.
- Create a branch for your change:
git checkout -b feat/short-descriptioncargo test --allCI runs cargo fmt --all -- --check and cargo test --all.
cargo fmt --allcargo clippy --all-targets --all-features -- -D warningsSome tests and examples can hit Polymarket services and may place real orders. These are opt-in via environment variables.
- Copy the example env file:
cp .env.example .env-
Fill in values in
.env(never commit this file; it is git-ignored). -
Run the live order placement test (WARNING: places a tiny real order when enabled):
RUN_PLACE_ORDER_TEST=1 cargo test place_order -- --nocaptureIf a test is skipped, check the test output for which env vars are required (for example POLY_PRIVATE_KEY, POLY_FUNDER, and/or API creds).
cargo run --example order
cargo run --example wss_marketExamples use the same environment variables described in .env.example.
- Keep changes focused (one fix/feature per PR where possible).
- Add or update tests when changing behavior.
- Update docs/comments when adding new public API surface.
- Ensure
cargo fmt --allandcargo test --allpass locally. - Avoid committing secrets (private keys, API keys,
.env, etc.).
When filing an issue, please include:
- What you expected to happen vs. what happened
- Repro steps or a small code snippet
- Your Rust version (
rustc --version) - Any relevant logs (redact secrets)
If you believe you have found a security issue, please avoid filing a public issue. Prefer using GitHub’s private security advisory / reporting flow for the repository.
By contributing, you agree that your contributions will be licensed under the project’s license terms (see Cargo.toml and LICENSE).