Skip to content

Diavel78/Poly-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Poly-API

Polymarket betting automation dashboard. Browse markets, place orders, and run automated strategies from a web UI.

Setup

# Install dependencies
pip install -r requirements.txt

# Configure your wallet
cp .env.example .env
# Edit .env with your Polygon wallet private key and funder address

Configuration

Variable Description
PRIVATE_KEY Your Polygon wallet private key (without 0x prefix)
FUNDER_ADDRESS Wallet address holding your USDC funds
SIGNATURE_TYPE 0 = EOA/MetaMask, 1 = Email/Magic, 2 = Proxy
CHAIN_ID 137 for Polygon mainnet

Run

python run.py

Open http://localhost:8000 in your browser.

Features

  • Markets — Browse and search Polymarket prediction markets with live prices
  • Trade — Place market and limit orders with a real-time order book view
  • Orders — View open orders, trade history, cancel orders
  • Automation — Create automated betting strategies:
    • Threshold — Auto-buy when a market price drops below your target
    • Dollar-Cost — Buy a fixed dollar amount on a recurring schedule

API Endpoints

Method Path Description
GET /api/markets List markets
GET /api/markets/{id} Market detail
GET /api/orderbook/{token_id} Order book
GET /api/price/{token_id} Current price
POST /api/order/market Place market order
POST /api/order/limit Place limit order
GET /api/orders Open orders
DELETE /api/orders/{id} Cancel order
GET/POST /api/strategies List/create strategies
POST /api/strategies/{id}/start Start strategy
POST /api/strategies/{id}/stop Stop strategy

Important

Polymarket trading is subject to their Terms of Service. Ensure you comply with applicable regulations in your jurisdiction.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors