Skip to content

Releases

v0.2.1

Choose a tag to compare

@rustyconover rustyconover released this 29 Nov 20:31

Container image for Orchard hosted mode.

  • ghcr.io/query-farm/vgi-polymarket:0.2.1 (also :0.2, :latest), multi-arch (amd64 + arm64), published by .github/workflows/docker-publish.yml after CI passes.
  • One image, two transports: HTTP on $PORT (default 8000) by default, stdio for on-host use. Runs as a non-root user with a writable home; HEALTHCHECK uses HEAD /health.
  • Hosted mode (VGI_ORCHARD_HOSTED=1) is built into vgi-python 0.55 (VGI protocol 3.4). Credentials come from DuckDB secrets.
docker run --rm -p 8000:8000 ghcr.io/query-farm/vgi-polymarket:0.2.1

v0.2.0

Choose a tag to compare

@rustyconover rustyconover released this 25 Nov 18:31

Full Changelog: v0.1.3...v0.2.0

v0.1.3

Choose a tag to compare

@rustyconover rustyconover released this 17 Nov 00:50

Full Changelog: v0.1.2...v0.1.3

v0.1.1

Choose a tag to compare

@rustyconover rustyconover released this 15 Nov 05:36

Fixed

  • market(condition_id) returned no row for any resolved market. Gamma's
    /markets/keyset applies closed=false when the parameter is omitted, even
    to an explicit condition_ids filter, so a market that had closed was
    invisible to its own id. Ids the open pass misses are now looked up again
    with closed=true (one extra request, only when something is missing). The
    same lookup backs every correlated LATERAL polymarket.main.market(...).
  • The first orderbook() example took the single busiest open market's first
    outcome, which is often a game that has just ended with an empty book. It
    now takes one outcome among the ten busiest that has resting orders, so the
    example shows real depth.

Documentation

  • markets() and events() documented closed as if omitting it always
    returned open and settled rows together. Checked against the live API, that
    holds only for events(): /markets/keyset treats a missing closed as
    false, so markets() without it returns open markets only, including a
    slug or condition_id lookup for a resolved market. The argument docs,
    the markets() agent and catalog docs, and the README now say so, and point
    at closed => 'true' or market() for resolved markets.

  • The catalog docs link to the upstream service and its API documentation
    (VGI183): polymarket.com, the Polymarket API reference, the Gamma and CLOB
    OpenAPI specs, the Data API v2 docs and the market-data overview, and state
    the Polymarket Terms of Use (also linked from the README).

  • Per-function detail in the catalog overview (the spread check behind
    quote(), order-book batching costs) is shortened to a pointer; those
    functions' own docs already carry it. This also keeps vgi.doc_md inside the
    4,000-character agent context limit (VGI417).

  • vgi-lint.toml waives VGI417 for the 33-column market row's
    vgi.result_columns_schema on markets, market and event_markets, as
    the Kalshi worker does for its market row.

  • vgi-lint.toml raises the slow-example warning bar to 10 s: the live
    examples run concurrently under --execute and land at 5-8 s together
    against 1-2.5 s alone.

  • README's pinned-install example now pins v0.1.1.

v0.1.0

Choose a tag to compare

@rustyconover rustyconover released this 14 Nov 16:35

First release of vgi-polymarket, a read-only VGI worker that brings Polymarket prediction-market data into DuckDB/Haybarn SQL: markets, outcomes, order books, quotes, price history and trades. Polymarket settles on a public chain, so it also covers who holds each position and what else they hold. It needs no credentials and accepts none.

Install

-- uvx haybarn-cli
ATTACH 'polymarket' (TYPE vgi, LOCATION 'uvx --from git+https://github.com/Query-farm/vgi-polymarket@v0.1.0 vgi-polymarket');
SELECT count(*) FROM polymarket.tags;

This is a source-only release. Nothing is published to PyPI.

Surface

  • Tables: tags (about 7,300 topics) and series (about 2,400 recurring question series). Both are paged and stop early under LIMIT.
  • Paged scans: search(query), markets(...) and events(...), all filterable by tag, slug, status and ordering.
  • Per-key functions that also work under LATERAL: market, event, event_markets, orderbook, quote, fill_price(token_id, side, size), price_history(token_id, period, fidelity), trades, holders, positions and activity.

Composed examples

  • Holders marked to market: takes the busiest open market, then its top holders per outcome via holders(), then each outcome's live midpoint via quote(), and computes amount * midpoint.
  • Weekly movers: for each outcome of the five busiest open markets, compares the first point of its one-week hourly price_history() with its live quote() midpoint, ranked by the absolute change.

The agent tasks in vgi.agent_test_tasks are graded with check_sql invariants, because the data is live.

Known limits

  • Live, unauthenticated public API: results move between runs and are subject to Polymarket's rate limits. Order placement is not supported, by design.
  • markets and events are paged scans, so they cannot be the inner side of a correlated LATERAL. Drive joins from them instead.
  • The entry-point scripts' PEP 723 headers point at sibling ../vgi-python and ../vgi-rpc checkouts for development. Installed packages use the published versions.
  • vgi-lint reports 3 VGI417 warnings: the result_columns_schema metadata on markets, market and event_markets is oversized.