https://github.com/ellache/pm_py
Flask server abstracting engagement with the polygon mainnet; specifically polymarket smart contracts. Supports buy, sell, redeem, listing positions etc. Built on top of existing code from PolyTrader, see README.
https://github.com/ellache/pm_py
flask polygon python
Last synced: about 2 months ago
JSON representation
Flask server abstracting engagement with the polygon mainnet; specifically polymarket smart contracts. Supports buy, sell, redeem, listing positions etc. Built on top of existing code from PolyTrader, see README.
- Host: GitHub
- URL: https://github.com/ellache/pm_py
- Owner: EllAchE
- Created: 2021-09-01T04:12:43.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2022-05-19T18:05:50.000Z (about 4 years ago)
- Last Synced: 2025-02-23T09:29:43.300Z (over 1 year ago)
- Topics: flask, polygon, python
- Language: Python
- Homepage:
- Size: 1.48 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Polymarket Flask API
This project was built on top of PolyTrader's https://github.com/PolyTrader/polymarket CLI tool; this just replaces the argparse/cli methods with a local flask server. README for that CLI tool is below.
Run the api locally and send trades via localhost.
# trade-cli
Simple cli tool for trading on PolyMarket
### Installation on Windows
- Install [Python](https://www.microsoft.com/en-us/p/python-39/9p7qfqmjrfp7?activetab=pivot:overviewtab) from Microsoft
* or download the [Python installer](https://www.python.org/ftp/python/3.9.6/python-3.9.6-amd64.exe) directly
- Install [Visual Studio](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=16) C++ Build Tools
- Open a terminal
- Run `pip install polymarket-trading`
- Run `pm-trade -h` to display help
### Trading Setup
- Create a new wallet on the matic chain
- Create your matic RPC endpoint on https://rpc.maticvigil.com/ (or other RPC provider)
- Set env variables
- POLYGON_PRIVATE_KEY
- MATIC_VIGIL_RPC_KEY or RPC_URI
- Fund your trading wallet with matic and usdc
#### Made some money from this tool and want to contribute? Donate to these charities.
* [Planned Parenthood](https://www.weareplannedparenthood.org/onlineactions/2U7UN1iNhESWUfDs4gDPNg2)
* [Fair Fight](https://secure.actblue.com/donate/fair-fight-action--inc--1)
* [Brady Center to Prevent Gun Violence](https://www.bradyunited.org/donate/tax)
* [The Marshall Project](https://www.themarshallproject.org/donate)