Polymarket provider + router extension for the OpenBB Platform
Project description
OpenBB Polymarket Extension
This package adds Polymarket as an OpenBB provider + a small router that exposes Polymarket endpoints via the OpenBB REST API.
Install (editable)
pip install -e ./openbb_polymarket
Run OpenBB API
uvicorn openbb_core.api.rest_api:app --host 0.0.0.0 --port 8000
Then open:
http://127.0.0.1:8000/docs
You should see Polymarket endpoints under:
/api/v1/polymarket/events/api/v1/polymarket/markets/api/v1/polymarket/orderbook/api/v1/polymarket/prices_history
Example:
curl -s 'http://127.0.0.1:8000/api/v1/polymarket/events?provider=polymarket&limit=5'
Event -> markets -> token -> orderbook + price history (official CLOB public API):
EVENT_ID='45883'
curl -s \"http://127.0.0.1:8000/api/v1/polymarket/markets?provider=polymarket&event_id=${EVENT_ID}\"
TOKEN_ID='11862165566757345985240476164489718219056735011698825377388402888080786399275'
curl -s \"http://127.0.0.1:8000/api/v1/polymarket/orderbook?provider=polymarket&token_id=${TOKEN_ID}\"
curl -s \"http://127.0.0.1:8000/api/v1/polymarket/prices_history?provider=polymarket&token_id=${TOKEN_ID}&interval=1d&fidelity=60\"
Fetch a single market by id:
curl -s 'http://127.0.0.1:8000/api/v1/polymarket/markets?provider=polymarket&market_id=601697'
Proxy
HTTP(S) proxy works via standard environment variables (e.g. http_proxy / https_proxy).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file openbb_polymarket-0.1.0.tar.gz.
File metadata
- Download URL: openbb_polymarket-0.1.0.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d5663bbe7020d856a67329a1b4b6ea66f020d788f320cc941218eedd8f76990
|
|
| MD5 |
0b2753e3bb6dda32b78f6d12ee9806cd
|
|
| BLAKE2b-256 |
8c8e8ad4b04afd4541a5bb561887abe561787804b61045d70a5d4b0606431054
|
File details
Details for the file openbb_polymarket-0.1.0-py3-none-any.whl.
File metadata
- Download URL: openbb_polymarket-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffde2b7c24f867f31d160054d75fa3077aa8a454e194f657d1589971eebc9b18
|
|
| MD5 |
e40ee706ee1bb7bf12cd585934f573d7
|
|
| BLAKE2b-256 |
7f83cbd24797648e65084f17c7a1f79fe2b7a0b420a2a302e6c81bafa97625dc
|