This project demonstrates how to interact programmatically with Polymarket CLOB API. It includes step-by-step examples for:
- Generating a wallet.
- Setting allowances.
- Creating an API key.
- Retrieving market data.
- Trading on specific markets.
The project aims to help developers understand the basics of interacting with Polymarket, focusing on simplicity and practicality. Use this code at your own risk, this is just a showcase of possible functionality of said library and API.
- Install requirements, start main.py and generate a new wallet
- Fund wallet with Matic and USDC.e
- Find condition_id for market you need and update it in main.py
- Fill order data
- Done! If you followed all steps above you should have successfully made trade on Polymarket via CLOB
Python 3.9+
Dependencies listed in requirements.txt
- Yotube video with more explanation - https://www.youtube.com/watch?v=ZbFTmDgSe_4
- Polymarket CLOB API - https://docs.polymarket.com/
- Polymarket CLOB Python client - https://github.com/Polymarket/py-clob-client