Polymarket LP Tool (polymarket_lp_tool)
Re-prices your hand-placed Polymarket orders to keep them inside the reward band.
by lihanyu81
Last updated
What it is
A tool for one narrow job on Polymarket: keeping limit orders you placed by hand inside the band that earns liquidity rewards. It is published on GitHub by the account lihanyu81, whose README signs it as @臭臭Panda, and it says in plain words that it is not a fully automated market-making bot. It creates no initial orders. It watches the open orders under your account and, for each one, keeps it, cancels it, or cancels and re-posts it at a new price with the same size.
How it chooses, from the README:
- Coarse-tick markets (one-cent ticks). It collects the price levels inside the reward half-band that already have resting depth on your side of the book. With two or fewer, it cancels and does not re-post. With three it takes the middle one by distance from the midpoint, and with four or more the second-farthest - which places your order behind other resting orders rather than at the front of the queue.
- Fine-tick markets (tenth-of-a-cent ticks). It measures how far your price sits from the midpoint as a share of the reward half-width, leaves it alone between 0.4 and 0.6 of the band, and moves it back toward the middle of the band otherwise.
- Custom rules per token and side override both, set through Telegram commands, the web panel, or environment variables.
There are two implementations in one repository. The Python version is the original and is kept
"for learning reference"; the Rust rewrite in rust_mm_bot/ is announced as "Polymarket LP Tool
2.0" and the main line for future work. The README's own comparison table then marks the Python
version production-ready and the Rust one experimental, to be validated with small size first.
The Rust version streams the market and user WebSocket channels and adds filters meant to stop it
chasing a jumping midpoint.
Availability
It runs on any machine that has Python or a Rust toolchain; the README is written for an Ubuntu
cloud server under tmux. The venue it trades on is international Polymarket, which bars US
persons and a long list of other places by physical location - the polymarket
card has the detail. The flags on this card are that venue's reach, because a tool that re-prices
live orders is only any use where you may hold them.
The repository ships a proxy set-up note. readme_ip.md, in Chinese, walks through installing
the x-ui proxy panel on a cloud server, adding a SOCKS inbound, and pointing a browser at it with a
proxy extension. The README's disclaimer asks users to respect Polymarket's geographic
restrictions; Polymarket's own terms prohibit using a VPN to get around them and give the
consequence as a wallet put into close-only mode. Read why a venue is unavailable where you
are before routing an account through anything.
Pricing
No price and nothing to buy. Resting orders that fill pay no Polymarket fee; any exit you take with a marketable order pays the taker fee on the polymarket schedule. What the tool is for - the rewards themselves - is Polymarket's programme, paid on Polymarket's terms, and the README's disclaimer says it gives no assurance about reward scoring or profit.
The README and the Rust dashboard carry the author's Polymarket invite link, and the dashboard also prints the author's X, WeChat and Telegram contacts "for strategy customization". The invite link is optional.
Markets & resolution
The tool resolves nothing and chooses no markets: it manages whichever orders you placed, in any category. Resolution on international Polymarket runs through the UMA optimistic oracle. A resting order is a standing offer to take on inventory, and inventory still held at resolution is a directional position in the outcome.
Integrations
The Python version depends on four packages - Polymarket's py-clob-client-v2, websockets,
python-dotenv and Flask for the optional web panel. The Rust version signs V2 orders itself,
with its own EIP-712 implementation over the k256 curve, rather than through a Polymarket SDK.
Telegram is the remote control: fill alerts, half-hourly account summaries, and commands such as
/status, /orders, /pnl and /set_rule. The Python web panel listens on 127.0.0.1:8765
behind a token you set; the Rust dashboard listens on 127.0.0.1:8787 and exposes /api/state
and a /api/set_rule endpoint that accepts changes. Both are local panels served by the process on
your own machine, not a hosted site; that is all web means in the platforms above.
No HTTP API for other programs, no MCP server, no second venue.
Limitations
Not open source. There is no LICENSE file anywhere in the repository and no licence named in either README. Reading it on GitHub is permitted; copying, modifying and running it has not been licensed to anyone. 551 stars and 107 forks, counted on 30 September 2026, do not change that.
A fill ends the tool's involvement. The Python loop skips any token in which you hold inventory, so the moment an order fills that market is yours to manage by hand. The tool is built to earn rewards on orders that ideally never fill; it has no exit logic for the ones that do.
Your private key sits in a plain .env file and, in the Rust version, is used by a signer
written for this project rather than a vendor SDK. The Rust dashboard's rule endpoint checks no
token in the code we read, so keep it bound to localhost. Where your key
lives covers what the file exposes.
Quiet since May. Twenty commits between 1 April and 6 May 2026; the last two migrated the Python version to CLOB V2 on 29 April and released the Rust version on 6 May. Nothing since, no releases or tags, and no issues have ever been filed. The two headline messages in the README - Rust is the future, Rust is experimental - were written in the same commit and have not been reconciled.
Much of the documentation is in Chinese. The English README is a full translation; the proxy note, commit messages and several configuration comments are not.
Nothing here has been run by us - no order was placed, re-priced or scored.
Alternatives
poly-maker is the fully automated version of the same idea: it chooses political markets, posts both sides itself, manages inventory and exits, and is MIT-licensed.
To do this job yourself, polymarket-cli exposes Polymarket's reward endpoints from a terminal, and polymarket-client is the vendor's own library to build a loop on. Where the liquidity comes from explains what a resting order is standing in front of, and what a bot cannot fix what happens to it when a market pauses or resolves.
Specs
- Interfaces
- Python
- Export
- None
- Available in
- Asia, Latam
- KYC required
- No
- Market subjects
- —
- Resolved by
- Resolves nothing
- Maker fee
- None
- Platforms
- CLI, Web
- AI features
- None
- Capabilities
- Order book, Automation, Live trading, Portfolio tracking, Alerts
- Pricing verified
- Availability verified
- Capabilities verified
Background
How this part of the sector works, rather than which product to pick.
- What running a bot does not solve — A bot fixes speed and consistency. Rate limits, a missing rehearsal, a field that stops arriving, a partial fill and a paused market are not coding problems.
- Why your bot gets throttled, and what the limit is counted against — Kalshi meters tokens per account tier; Polymarket's order book meters requests per IP and queues the excess. What each counts, and what the libraries assume.
- Where your key lives when software trades for you — Four different credentials are all called a key, and they differ in what a copy permits. What the clients in this catalogue ask for, and what to ask them back.
Also worth comparing
- Kreo — Telegram copy-trading bot for Polymarket whose own fee follows the venue's midpoint curve.
- poly-maker — Open-source maker-only quoting bot for Polymarket political markets, rebuilt for V2.
- PolyBot — Telegram bot for Polymarket - copy trading and your own Auto Trader rules, from a Safe.
- PolyCop — Telegram copy-trading bot for Polymarket that holds your key and charges on every fill.
- Alphapoly (polymarket-alpha-bot) — Self-hosted scanner for covering portfolios across correlated Polymarket contracts.
- Betmoar — A Polymarket terminal and Discord bot, with a dashboard for UMA disputes nobody else has.
FAQ
Does polymarket_lp_tool place orders for me?
Not the first ones. You place limit orders by hand on Polymarket with the same account; the tool polls or streams your open orders and either keeps each one, cancels it, or cancels and re-posts it at a new price with the same size. With no open orders it sits idle.
Is polymarket_lp_tool open source?
No, in the legal sense. The repository has no LICENSE file and its README names no licence, so the code is publicly readable but nobody has been granted the right to copy, modify or run it. That is a default of copyright law, not a statement about the author's intentions.
What happens when one of my orders fills?
The Python main loop skips any token in which you hold inventory, so after a fill that token is no longer managed and the exit is yours to handle. The Rust version adds a cool-down after fills before it re-prices.
What keys does it need?
A wallet private key and the Polymarket funder address in a local .env file, plus a signature type; the Rust version can also take CLOB API key, secret and passphrase. Optional Telegram bot credentials turn on alerts and remote commands, and a web-panel token protects the Python panel.