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
Exchange
probable (
core/src/exchanges/probable/)Spec file
core/specs/probable/probable.yamlSummary
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)
GET /public/api/v1/prices-history{ history: [{ t: integer (Unix seconds), p: number }] }— wrapped inhistorykey, NOT a bare arrayGET /public/api/v1/pnl[{ t: number (Unix milliseconds), p: number }]— bare array; notetis milliseconds here vs. seconds inprices-historydespite identical field namesGET /public/api/v1/price{ price: string }— field is a string, not a numberGET /public/api/v1/midpoint{ mid: string }— field name ismid(notmidpoint); string typeGET /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/(onlyhasMore+totalResults)GET /public/api/v1/trades{ 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 isassetnottoken_idNoteworthy inconsistencies
prices-historyvspnltimestamp units: both use field nametbutprices-history.tis Unix seconds,pnl.tis Unix milliseconds. The normalizer (normalizer.ts:76) multipliesp.t * 1000(assumes seconds) — this would produce correct candle timestamps forprices-historybut 1000× wrong timestamps if the same code path were applied topnldata.midpointfield name: the spec endpoint is named/midpointbut the response field ismid.utils.ts:126already readsresponse?.mid— correctly adapted — but spec documentation says nothing.trades.assetvstoken_id: filtering calls that passtoken_idas a query parameter to/tradesneed verification; the response usesassetto identify the token, nottoken_id.Action needed
probable.yamlGET /public/api/v1/leaderboardto the specapi.tspnltimestamp units (milliseconds) for the team — likely intentional but inconsistent withprices-history