whatisgithub

What is trading-bot?

judithsulfan/trading-bot — explained in plain English

Analysis updated 2026-05-18

242TypeScriptAudience · developerComplexity · 4/5Setup · moderate

In one sentence

A TypeScript trading bot that automatically buys and sells Polymarket UP/DOWN crypto prediction markets using a Gnosis Safe proxy wallet.

Mindmap

mindmap
  root((repo))
    What it does
      Trades Polymarket UP DOWN markets
      Checks live prices every second
      Uses signer and proxy wallets
    Tech stack
      TypeScript
      Node.js
      Polygon
      Gnosis Safe
    Use cases
      Exit only strategy
      Full cycle entry and exit strategy
    Audience
      Developers
      Crypto traders
    Setup
      Signer private key
      USDC funded proxy wallet

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Automate an exit-only position strategy on Polymarket UP/DOWN markets.

USE CASE 2

Run a full entry-and-exit trading cycle using configurable price and timing conditions.

USE CASE 3

Track live order book prices, wallet balances, and order status from the terminal.

What is it built with?

TypeScriptNode.jsPolygonTOML

How does it compare?

judithsulfan/trading-botnkzw-tech/codifftexsellix/polymarket-trading-bot
Stars242243244
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderateeasymoderate
Complexity4/52/54/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 1h+

Requires a signer wallet, a Gnosis Safe proxy wallet, and USDC funded on Polygon.

The README does not state a license.

So what is it?

This is a TypeScript bot that trades automatically on Polymarket, a prediction market platform where users bet on whether prices will go up or down. Specifically, it targets the UP/DOWN crypto markets on Polymarket: short-window bets on whether Bitcoin, Ethereum, Solana, or XRP will be higher or lower at the end of a chosen time period (ranging from 5 minutes to 24 hours). The bot connects to Polymarket's order book, checks live prices every second, and places buy or sell orders when your configured rules say to. The bot works on the Polygon blockchain and requires two wallets: a signer wallet (an ordinary private key that signs the orders) and a proxy wallet (a Gnosis Safe wallet that actually holds the USDC funds). Both addresses need to be set in a .env file before the bot will run. You also need USDC on Polygon in the proxy wallet to fund trades. Strategy configuration lives in a trade.toml file. Two strategies are available. The first, called trade_1, is exit-only: it does not open new positions, but it will close an existing one if the market is running out of time or if the price has moved far enough from 50/50. The second, trade_2, handles the full cycle: it can open a position once during a market window when price and timing conditions are met, close it on exit conditions, and optionally swap immediately to the opposite side if the price is still moving after a sale. The project uses Node.js 20.6 or newer and is written in TypeScript. Running npm run dev starts the bot in development mode, npm run build and npm start compile and run the production version. During operation, the terminal prints a live status line every few seconds showing the current market state, your on-chain balances, and whether the bot is idle or has an order in flight. The README includes a security note recommending a dedicated signer key and only funding the proxy wallet with capital you can afford to lose. It also carries a disclaimer that automated trading carries financial and regulatory risk, and the software is provided for educational and research purposes only.

Copy-paste prompts

Prompt 1
Explain the difference between the trade_1 and trade_2 strategies in this bot.
Prompt 2
Walk me through configuring the signer and Gnosis Safe proxy wallets in the .env file.
Prompt 3
Help me adjust the trade.toml file to change how far price must move before closing a position.
Prompt 4
What security precautions should I take before funding a proxy wallet for automated trading?

Frequently asked questions

What is trading-bot?

A TypeScript trading bot that automatically buys and sells Polymarket UP/DOWN crypto prediction markets using a Gnosis Safe proxy wallet.

What language is trading-bot written in?

Mainly TypeScript. The stack also includes TypeScript, Node.js, Polygon.

What license does trading-bot use?

The README does not state a license.

How hard is trading-bot to set up?

Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.

Who is trading-bot for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.