Skip to content

spec-drift: probable — 7 spec endpoints have no response schema + new /leaderboard endpoint missing #2008

Description

@realfishsam

Exchange

probable (core/src/exchanges/probable/)

Spec file

core/specs/probable/probable.yaml

Summary

Seven endpoints present in the cached spec have no response schema defined. Live API shapes have now been observed and are documented below. Additionally one new endpoint was discovered on the live API that is absent from the spec entirely.

New endpoint not in spec

  • GET /public/api/v1/leaderboard — returns { rankings: [{ rank: integer, userAddress: string, username: string, pnl: string }], lastUpdateTs: number, pagination: { page, limit, totalResults, totalPages, hasMore, hasPrevPage } }. ~9,300 entries in the live dataset.

Endpoints in spec with no response schema (live shapes now known)

Endpoint Live response shape
GET /public/api/v1/prices-history { history: [{ t: integer (Unix seconds), p: number }] } — wrapped in history key, NOT a bare array
GET /public/api/v1/pnl [{ t: number (Unix milliseconds), p: number }] — bare array; note t is milliseconds here vs. seconds in prices-history despite identical field names
GET /public/api/v1/price { price: string } — field is a string, not a number
GET /public/api/v1/midpoint { mid: string } — field name is mid (not midpoint); string type
GET /public/api/v1/tags/ { tags: [{ id: number, label: string, slug: string, event_count: number, closed_count: number, total_count: number }], pagination: { page, limit, totalResults, totalPages, hasMore, hasPrevPage } }
GET /public/api/v1/public-search/ { events: [...], tags: [...], profiles: [...], pagination: { hasMore: boolean, totalResults: number } } — different pagination shape from /tags/ (only hasMore + totalResults)
GET /public/api/v1/trades Flat array of trade objects: { proxyWallet, side, asset, conditionId, size: number, price: number, timestamp: number (ms), title, slug, icon, eventSlug, outcome, outcomeIndex, name, pseudonym, bio, profileImage, profileImageOptimized, transactionHash } — note trade token field is asset not token_id

Noteworthy inconsistencies

  • prices-history vs pnl timestamp units: both use field name t but prices-history.t is Unix seconds, pnl.t is Unix milliseconds. The normalizer (normalizer.ts:76) multiplies p.t * 1000 (assumes seconds) — this would produce correct candle timestamps for prices-history but 1000× wrong timestamps if the same code path were applied to pnl data.
  • midpoint field name: the spec endpoint is named /midpoint but the response field is mid. utils.ts:126 already reads response?.mid — correctly adapted — but spec documentation says nothing.
  • trades.asset vs token_id: filtering calls that pass token_id as a query parameter to /trades need verification; the response uses asset to identify the token, not token_id.

Action needed

  • Add response schemas for all 7 endpoints to probable.yaml
  • Add GET /public/api/v1/leaderboard to the spec
  • Regenerate api.ts
  • Flag pnl timestamp units (milliseconds) for the team — likely intentional but inconsistent with prices-history

Metadata

Metadata

Assignees

No one assigned

    Labels

    spec-driftCached OpenAPI spec out of date vs venue's live docs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions