Yesterday I open-sourced polymarket-sdk for
@Polymarket
github.com/cyl19970726/poly-…
Thanks for the support — the repo already has 223 stars and 63 forks ❤️
Today, we shipped a major update.
The SDK now covers almost everything you need to build on Polymarket:
🔄 Real-time arbitrage detection (WebSocket-based)
📊 Smart money analysis — track top traders and strategies
💱 Trading integration (GTC / GTD / FOK / FAK)
🔐 On-chain ops: split, merge, redeem CTF tokens
🌉 Cross-chain deposits from Ethereum, Solana, Bitcoin
💰 DEX swaps on Polygon (QuickSwap V3)
📈 Market analytics: K-lines, signals, volume
Today’s highlight: ArbitrageService 👀
We now officially support Polymarket arbitrage.
The idea is simple:
- If buying a YES NO pair costs < 1 USDC, buy both and redeem on-chain
- If selling a YES NO pair yields > 1 USDC, mint a pair for 1 USDC and sell
The hard part is execution.
In real markets, arbitrage windows are short —
there’s often no time to do on-chain actions when profit appears.
So the ArbitrageService uses dynamic position management:
- Maintain USDC ↔ YES/NO positions
- Keep USDC ratio between 20%–80%
- Always ready to buy or sell immediately when opportunities show up
Handling partial fills
Partial fills are inevitable and can leave you with unbalanced YES/NO positions.
The service automatically:
- Sells the excess side
- Keeps YES and NO close to 1:1
- Exposes a settlePosition helper to clean up exposure anytime
Full arbitrage theory implementation details are documented in the repo.
GitHub:
github.com/cyl19970726/poly-…
Arbitrage docs:
github.com/cyl19970726/poly-…
Our Project:
@catalystdotfun
Open-source, and happy hacking