Polymarket multi-market scanner (Telegram digest + optional execute)
Recurring workflow that scans multiple Polymarket markets each run for arbitrage (Yes + No best ask < 1) and wide bid-ask spread, sends one Telegram message per run with a digest of findings; optionally places Yes and No market orders on the first arbitrage opportunity and then stops.
Config
- Market slugs (one per line or comma-separated) (required): List of Polymarket market slugs to scan. Each slug is fetched and its order book is checked for arbitrage and spread.
- Poll interval (seconds) (optional, default 60): How often to run the scan. Clamped between 15 and 3600. Example: 60.
- Spread threshold (0–1) (optional, default 0.08): A market is reported as "wide spread" when the Yes-token bid-ask spread is at or above this value. Example: 0.08.
- On arbitrage (required): "Notify only" sends the digest and keeps running; "Execute" places a Yes and a No market order on the first market where arbitrage is detected, then the workflow stops. Default: notify only.
- Order amount (USD per side) (optional, default 10): Used only when On arbitrage is Execute. Dollar size for each of the Yes and No market orders.
- Polymarket credentials (required): API keys, wallet address, and proxy wallet used when On arbitrage is Execute (to place orders and sign). The proxy wallet is part of the credential; execution uses it directly. When Notify only, credentials are still required by the form but orders are never placed.
- Telegram (chat ID) (required): Where to send the digest or the execution notification.
Logic
- The workflow parses the market slugs (split by newlines or commas), then runs a scan at the configured interval.
- For each slug it fetches the market and the Yes/No order books. It computes the sum of the best Yes ask and best No ask (arbitrage if the sum is less than 1) and the Yes-token bid-ask spread (wide if at or above the spread threshold). It collects all markets that show arbitrage and all that show wide spread.
- If On arbitrage is set to Execute and at least one arbitrage opportunity was found: the workflow takes the first such market, uses the proxy wallet from your Polymarket credential, then requests two signatures from you (one for the Yes order, one for the No order) and places both market orders with the configured order amount. It sends a Telegram message with the market and result, then stops.
- Otherwise (Notify only, or no arbitrage found): if there is at least one finding (arbitrage or wide spread), the workflow builds a single digest message listing them and sends it to Telegram. It then schedules the next run after the poll interval and does not stop.
- On any error during a run, the workflow logs the error and schedules the next run after the poll interval.
When it stops: If you chose Execute and an arbitrage was found and both orders were placed, the workflow stops after sending the Telegram notification. If you chose Notify only, or no arbitrage was found, it does not stop by itself and keeps running every poll interval until you stop it.
If something fails: Errors (e.g. missing market, API failure, or failed order) are logged and the workflow schedules the next run after the poll interval instead of exiting.