Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openbb_polymarket-0.1.0.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

openbb_polymarket-0.1.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

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

Hashes for openbb_polymarket-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9d5663bbe7020d856a67329a1b4b6ea66f020d788f320cc941218eedd8f76990
MD5 0b2753e3bb6dda32b78f6d12ee9806cd
BLAKE2b-256 8c8e8ad4b04afd4541a5bb561887abe561787804b61045d70a5d4b0606431054

See more details on using hashes here.

File details

Details for the file openbb_polymarket-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for openbb_polymarket-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ffde2b7c24f867f31d160054d75fa3077aa8a454e194f657d1589971eebc9b18
MD5 e40ee706ee1bb7bf12cd585934f573d7
BLAKE2b-256 7f83cbd24797648e65084f17c7a1f79fe2b7a0b420a2a302e6c81bafa97625dc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page