Skip to main content

Polymarket connector for the parsimony framework

Project description

parsimony-polymarket

Polymarket source for parsimony: prediction-market discovery and prices via the public Gamma and CLOB HTTP APIs.

Part of the parsimony-connectors monorepo. Distributed standalone on PyPI as parsimony-polymarket.

Connectors

Name Kind Description
polymarket_markets enumerator Discover Polymarket markets via the Gamma API (id + question, with slug/active metadata). Takes limit (1-100) and active.
polymarket_events enumerator Discover Polymarket events via the Gamma API (id + title, with slug metadata). Takes limit (1-100).
polymarket_market_prices connector Fetch the current CLOB buy-side price for one outcome token (token_id). Returns a raw price dict, e.g. {"price": "0.5"}.

Install

pip install parsimony-polymarket

Pulls in a compatible parsimony-core automatically. Verify discovery:

python -c "from parsimony import discover; print([p.name for p in discover.iter_providers()])"

Configuration

No environment variables required — Polymarket's Gamma and CLOB read APIs are public. There is no API key, so this package declares no secrets and no load(*, api_key=...) convenience.

Quick start

from parsimony_polymarket import CONNECTORS

markets = CONNECTORS["polymarket_markets"](limit=5, active=True)
print(markets.data.head())

events = CONNECTORS["polymarket_events"](limit=5)
print(events.data.head())

# token_id comes from a market's `clobTokenIds` field on the Gamma API.
price = CONNECTORS["polymarket_market_prices"](token_id="<clob-token-id>")
print(price.data)

For multi-plugin composition:

from parsimony import discover
connectors = discover.load_all()

Provider

License

See LICENSE.

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

parsimony_polymarket-0.0.1.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

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

parsimony_polymarket-0.0.1-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file parsimony_polymarket-0.0.1.tar.gz.

File metadata

  • Download URL: parsimony_polymarket-0.0.1.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for parsimony_polymarket-0.0.1.tar.gz
Algorithm Hash digest
SHA256 45fec6b34ef0016f63819f473e051f7a560b56c68e77a289a2aaa5a0c5e8faa9
MD5 32894ec93940adc43b486ea7d9933f03
BLAKE2b-256 a38559635df60a54aee8244d707d7bc03e59abea0d54d5c6d2a2d54293254cad

See more details on using hashes here.

Provenance

The following attestation bundles were made for parsimony_polymarket-0.0.1.tar.gz:

Publisher: release.yml on ockham-sh/parsimony-connectors

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file parsimony_polymarket-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for parsimony_polymarket-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 702c5090a31b212c6a503583e5ebd4f7772d663d3ebff2847b2a0c7a0686ffff
MD5 84d850316664babb917f95c2dfbeaea8
BLAKE2b-256 071270a2a2ad3ca55e86c16566438761349cab25b7f97d018003a86ef9e9ba8b

See more details on using hashes here.

Provenance

The following attestation bundles were made for parsimony_polymarket-0.0.1-py3-none-any.whl:

Publisher: release.yml on ockham-sh/parsimony-connectors

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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