From 64ef8fd2b55dfb8db86ba05eb1e8fc4fbb539ee8 Mon Sep 17 00:00:00 2001 From: Samuel Tinnerholm Date: Fri, 5 Jun 2026 12:41:29 +0000 Subject: [PATCH 1/2] fix: align cached exchange specs with live APIs --- core/specs/kalshi/Kalshi.yaml | 2 +- core/specs/metaculus/Metaculus.yaml | 9 ++-- core/specs/myriad/myriad.yaml | 12 ++++- core/specs/opinion/opinion-openapi.yaml | 28 ++++++++++ core/specs/polymarket/PolymarketClobAPI.yaml | 55 +++++++++++++++++--- core/specs/probable/probable.yaml | 26 +++++---- core/src/exchanges/kalshi/api.ts | 6 +-- core/src/exchanges/kalshi/config.ts | 16 +++--- core/src/exchanges/metaculus/utils.ts | 1 - core/src/exchanges/myriad/api.ts | 21 ++++++-- core/src/exchanges/myriad/utils.ts | 2 + core/src/exchanges/opinion/api.ts | 23 +++++++- core/src/exchanges/polymarket/api-clob.ts | 29 ++++++++++- core/src/exchanges/probable/api.ts | 4 +- 14 files changed, 191 insertions(+), 43 deletions(-) diff --git a/core/specs/kalshi/Kalshi.yaml b/core/specs/kalshi/Kalshi.yaml index 36086514..2fc91f66 100644 --- a/core/specs/kalshi/Kalshi.yaml +++ b/core/specs/kalshi/Kalshi.yaml @@ -5,7 +5,7 @@ info: description: Manually defined OpenAPI spec for endpoints being migrated to spec-first approach servers: - - url: https://{env}.elections.kalshi.com/trade-api/v2 + - url: https://{env}.external-api.kalshi.com/trade-api/v2 description: Kalshi Trade API variables: env: diff --git a/core/specs/metaculus/Metaculus.yaml b/core/specs/metaculus/Metaculus.yaml index a1ce9d67..a0eb3738 100644 --- a/core/specs/metaculus/Metaculus.yaml +++ b/core/specs/metaculus/Metaculus.yaml @@ -431,11 +431,12 @@ components: must be 1.0, otherwise no more than 0.999 - meaning at least 0.1% of the probability mass must be assigned above the upper bound.

- At least 1% of the probability mass must be assigned uniformly within - bounds, which means that the CDF must be strictly increasing by at - least 0.01/200 = 0.0005 per step. No two adjacent values of the CDF - can differ by more than 0.59, which is the largest number obtainable + At least 1% of the probability mass must be assigned uniformly within + bounds, which means that the CDF must be strictly increasing by at + least 0.01/200 = 0.0005 per step. No two adjacent values of the CDF + can differ by more than 0.20, which is the largest number obtainable via the sliders. + type: array items: type: number diff --git a/core/specs/myriad/myriad.yaml b/core/specs/myriad/myriad.yaml index 8c44574a..8228d9b7 100644 --- a/core/specs/myriad/myriad.yaml +++ b/core/specs/myriad/myriad.yaml @@ -437,7 +437,12 @@ paths: in: query schema: type: string - enum: [open, closed, resolved] + enum: [open, closed, resolved, voided] + - name: trading_model + in: query + description: Filter markets by trading model (e.g. CLOB, AMM) + schema: + type: string - name: token_address in: query schema: @@ -1046,6 +1051,11 @@ paths: in: query schema: type: string + - name: trading_model + in: query + description: Filter portfolio results by trading model (e.g. CLOB, AMM) + schema: + type: string - name: token_address in: query schema: diff --git a/core/specs/opinion/opinion-openapi.yaml b/core/specs/opinion/opinion-openapi.yaml index b8c51fef..55e2f69b 100644 --- a/core/specs/opinion/opinion-openapi.yaml +++ b/core/specs/opinion/opinion-openapi.yaml @@ -822,6 +822,34 @@ paths: "400": $ref: "#/components/responses/BadRequestError" + /market/slug/{slug}: + get: + tags: [Market] + summary: Get market detail by slug + description: Get detailed information about a specific market using its slug + operationId: getMarketDetailBySlug + parameters: + - name: slug + in: path + required: true + description: Market slug + schema: + type: string + responses: + "200": + description: Successful response + content: + application/json: + schema: + allOf: + - $ref: "#/components/schemas/APIBaseResponse" + - type: object + properties: + result: + $ref: "#/components/schemas/MarketDetailResponse" + "400": + $ref: "#/components/responses/BadRequestError" + /market/categorical/{marketId}: get: tags: [Market] diff --git a/core/specs/polymarket/PolymarketClobAPI.yaml b/core/specs/polymarket/PolymarketClobAPI.yaml index 0a2f619e..311a3b36 100644 --- a/core/specs/polymarket/PolymarketClobAPI.yaml +++ b/core/specs/polymarket/PolymarketClobAPI.yaml @@ -133,6 +133,8 @@ components: type: string tick_size: type: string + last_trade_price: + type: string neg_risk: type: boolean @@ -331,14 +333,24 @@ components: properties: success: type: boolean - errorMsg: + orderID: + type: string + status: type: string - orderId: + makingAmount: type: string - orderHashes: + takingAmount: + type: string + transactionsHashes: + type: array + items: + type: string + tradeIDs: type: array items: type: string + errorMsg: + type: string CancelResponse: type: object @@ -838,6 +850,23 @@ paths: schema: $ref: '#/components/schemas/CancelResponse' + /v1/heartbeats: + post: + summary: Refresh authenticated session heartbeat + tags: [Orders] + description: Keep an authenticated Polymarket session or websocket subscription alive. + security: + - L2Auth: [] + parameters: + - $ref: '#/components/parameters/L2Headers' + responses: + '200': + description: Heartbeat acknowledged + content: + application/json: + schema: + type: object + /data/order/{id}: get: summary: Get Order @@ -881,15 +910,29 @@ paths: in: query schema: type: string + - name: next_cursor + in: query + description: Cursor for keyset pagination + schema: + type: string responses: '200': description: List of active orders content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/OpenOrder' + type: object + properties: + limit: + type: integer + next_cursor: + type: string + count: + type: integer + data: + type: array + items: + $ref: '#/components/schemas/OpenOrder' /data/trades: get: diff --git a/core/specs/probable/probable.yaml b/core/specs/probable/probable.yaml index 558bc16c..58ecda71 100644 --- a/core/specs/probable/probable.yaml +++ b/core/specs/probable/probable.yaml @@ -205,7 +205,7 @@ components: type: object properties: id: - type: integer + type: string slug: type: string title: @@ -223,7 +223,7 @@ components: type: object properties: id: - type: integer + type: string question: type: string market_slug: @@ -428,14 +428,9 @@ paths: content: application/json: schema: - type: object - properties: - events: - type: array - items: - $ref: '#/components/schemas/Event' - pagination: - type: object + type: array + items: + $ref: '#/components/schemas/Event' /public/api/v1/events/{id}: get: @@ -510,6 +505,17 @@ paths: responses: '200': description: List of markets + content: + application/json: + schema: + type: object + properties: + markets: + type: array + items: + $ref: '#/components/schemas/Market' + pagination: + type: object /public/api/v1/markets/{id}: get: diff --git a/core/src/exchanges/kalshi/api.ts b/core/src/exchanges/kalshi/api.ts index 4687bd60..4b45a1bc 100644 --- a/core/src/exchanges/kalshi/api.ts +++ b/core/src/exchanges/kalshi/api.ts @@ -1,6 +1,6 @@ /** - * Auto-generated from /Users/samueltinnerholm/Documents/GitHub/pmxt/.claude/worktrees/agent-a6e1b73d/core/specs/kalshi/Kalshi.yaml - * Generated at: 2026-05-24T14:48:08.117Z + * Auto-generated from /opt/data/repos/pmxt/.worktrees/hermes-42dac47d/core/specs/kalshi/Kalshi.yaml + * Generated at: 2026-06-05T12:40:10.068Z * Do not edit manually -- run "npm run fetch:openapi" to regenerate. */ export const kalshiApiSpec = { @@ -11,7 +11,7 @@ export const kalshiApiSpec = { }, "servers": [ { - "url": "https://{env}.elections.kalshi.com/trade-api/v2", + "url": "https://{env}.external-api.kalshi.com/trade-api/v2", "variables": { "env": { "default": "api", diff --git a/core/src/exchanges/kalshi/config.ts b/core/src/exchanges/kalshi/config.ts index 4c122bd8..7bde66b1 100644 --- a/core/src/exchanges/kalshi/config.ts +++ b/core/src/exchanges/kalshi/config.ts @@ -11,19 +11,19 @@ * Do NOT put runtime config into api.ts — it will be overwritten. * * Environment mapping (aligns with the `{env}` server variable in Kalshi.yaml): - * env = "api" → production: https://api.elections.kalshi.com - * env = "demo-api" → demo/paper: https://demo-api.elections.kalshi.com + * env = "api" → production: https://api.external-api.kalshi.com + * env = "demo-api" → demo/paper: https://demo-api.external-api.kalshi.com */ // ── Base URL constants ──────────────────────────────────────────────────────── -export const KALSHI_PROD_API_URL = process.env.KALSHI_BASE_URL || "https://api.elections.kalshi.com"; -export const KALSHI_DEMO_API_URL = process.env.KALSHI_DEMO_BASE_URL || "https://demo-api.kalshi.co"; +export const KALSHI_PROD_API_URL = process.env.KALSHI_BASE_URL || "https://api.external-api.kalshi.com"; +export const KALSHI_DEMO_API_URL = process.env.KALSHI_DEMO_BASE_URL || "https://demo-api.external-api.kalshi.com"; export const KALSHI_PROD_WS_URL = - "wss://api.elections.kalshi.com/trade-api/ws/v2"; + "wss://api.external-api.kalshi.com/trade-api/ws/v2"; export const KALSHI_DEMO_WS_URL = - "wss://demo-api.kalshi.co/trade-api/ws/v2"; + "wss://demo-api.external-api.kalshi.com/trade-api/ws/v2"; // ── Path constants ──────────────────────────────────────────────────────────── @@ -52,12 +52,12 @@ export interface KalshiApiConfig { /** * Return a typed config object for the requested environment. * - * @param demoMode - Pass `true` to target demo-api.elections.kalshi.com. + * @param demoMode - Pass `true` to target demo-api.external-api.kalshi.com. * * @example * ```typescript * const config = getKalshiConfig(true); - * // config.apiUrl === "https://demo-api.elections.kalshi.com" + * // config.apiUrl === "https://demo-api.external-api.kalshi.com" * ``` */ export function getKalshiConfig(demoMode = false, baseUrlOverride?: string): KalshiApiConfig { diff --git a/core/src/exchanges/metaculus/utils.ts b/core/src/exchanges/metaculus/utils.ts index 9cc8eab1..5360f613 100644 --- a/core/src/exchanges/metaculus/utils.ts +++ b/core/src/exchanges/metaculus/utils.ts @@ -142,7 +142,6 @@ function buildOutcomes(question: any, postId: string, medianProb: number): Marke aggregations: latest, resolution: question?.resolution ?? null, scaling: question?.scaling ?? null, - possibilities: question?.possibilities ?? null, }; // Multiple choice: one outcome per option, each independently forecastable diff --git a/core/src/exchanges/myriad/api.ts b/core/src/exchanges/myriad/api.ts index 7a99ed03..d1d81687 100644 --- a/core/src/exchanges/myriad/api.ts +++ b/core/src/exchanges/myriad/api.ts @@ -1,6 +1,6 @@ /** - * Auto-generated from /Users/ndmeiri/Developer/pmxt/core/specs/myriad/myriad.yaml - * Generated at: 2026-04-21T22:01:26.565Z + * Auto-generated from /opt/data/repos/pmxt/.worktrees/hermes-42dac47d/core/specs/myriad/myriad.yaml + * Generated at: 2026-06-05T12:40:10.188Z * Do not edit manually -- run "npm run fetch:openapi" to regenerate. */ export const myriadApiSpec = { @@ -163,10 +163,18 @@ export const myriadApiSpec = { "enum": [ "open", "closed", - "resolved" + "resolved", + "voided" ] } }, + { + "name": "trading_model", + "in": "query", + "schema": { + "type": "string" + } + }, { "name": "token_address", "in": "query", @@ -652,6 +660,13 @@ export const myriadApiSpec = { "type": "string" } }, + { + "name": "trading_model", + "in": "query", + "schema": { + "type": "string" + } + }, { "name": "token_address", "in": "query", diff --git a/core/src/exchanges/myriad/utils.ts b/core/src/exchanges/myriad/utils.ts index ff4a2456..965b3b9e 100644 --- a/core/src/exchanges/myriad/utils.ts +++ b/core/src/exchanges/myriad/utils.ts @@ -47,6 +47,8 @@ export function mapMarketState(state: string): 'active' | 'inactive' | 'closed' return 'inactive'; case 'resolved': return 'closed'; + case 'voided': + return 'closed'; default: return 'active'; } diff --git a/core/src/exchanges/opinion/api.ts b/core/src/exchanges/opinion/api.ts index 0b7b341b..c7b14a3e 100644 --- a/core/src/exchanges/opinion/api.ts +++ b/core/src/exchanges/opinion/api.ts @@ -1,6 +1,6 @@ /** - * Auto-generated from /Users/ndmeiri/Developer/pmxt/core/specs/opinion/opinion-openapi.yaml - * Generated at: 2026-04-21T22:01:26.567Z + * Auto-generated from /opt/data/repos/pmxt/.worktrees/hermes-42dac47d/core/specs/opinion/opinion-openapi.yaml + * Generated at: 2026-06-05T12:40:10.198Z * Do not edit manually -- run "npm run fetch:openapi" to regenerate. */ export const opinionApiSpec = { @@ -147,6 +147,25 @@ export const opinionApiSpec = { ] } }, + "/market/slug/{slug}": { + "get": { + "tags": [ + "Market" + ], + "summary": "Get market detail by slug", + "operationId": "getMarketDetailBySlug", + "parameters": [ + { + "name": "slug", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + } + }, "/market/categorical/{marketId}": { "get": { "tags": [ diff --git a/core/src/exchanges/polymarket/api-clob.ts b/core/src/exchanges/polymarket/api-clob.ts index 2ca68348..69d3427b 100644 --- a/core/src/exchanges/polymarket/api-clob.ts +++ b/core/src/exchanges/polymarket/api-clob.ts @@ -1,6 +1,6 @@ /** - * Auto-generated from /Users/samueltinnerholm/Documents/GitHub/pmxt/core/specs/polymarket/PolymarketClobAPI.yaml - * Generated at: 2026-05-22T18:49:00.795Z + * Auto-generated from /opt/data/repos/pmxt/.worktrees/hermes-42dac47d/core/specs/polymarket/PolymarketClobAPI.yaml + * Generated at: 2026-06-05T12:40:10.090Z * Do not edit manually -- run "npm run fetch:openapi" to regenerate. */ export const polymarketClobSpec = { @@ -346,6 +346,24 @@ export const polymarketClobSpec = { ] } }, + "/v1/heartbeats": { + "post": { + "summary": "Refresh authenticated session heartbeat", + "tags": [ + "Orders" + ], + "security": [ + { + "L2Auth": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/L2Headers" + } + ] + } + }, "/data/order/{id}": { "get": { "summary": "Get Order", @@ -407,6 +425,13 @@ export const polymarketClobSpec = { "schema": { "type": "string" } + }, + { + "name": "next_cursor", + "in": "query", + "schema": { + "type": "string" + } } ] } diff --git a/core/src/exchanges/probable/api.ts b/core/src/exchanges/probable/api.ts index aac43d6b..e97a7a45 100644 --- a/core/src/exchanges/probable/api.ts +++ b/core/src/exchanges/probable/api.ts @@ -1,6 +1,6 @@ /** - * Auto-generated from /Users/ndmeiri/Developer/pmxt/core/specs/probable/probable.yaml - * Generated at: 2026-04-21T22:01:26.564Z + * Auto-generated from /opt/data/repos/pmxt/.worktrees/hermes-42dac47d/core/specs/probable/probable.yaml + * Generated at: 2026-06-05T12:40:10.177Z * Do not edit manually -- run "npm run fetch:openapi" to regenerate. */ export const probableApiSpec = { From 9e9573a71e9c0d649923e5ccbbc04d20a4cefea5 Mon Sep 17 00:00:00 2001 From: Samuel Tinnerholm Date: Fri, 5 Jun 2026 12:47:42 +0000 Subject: [PATCH 2/2] docs: sync generated API references --- core/api-doc-config.generated.json | 36 +++++++++++++++--------------- sdks/python/API_REFERENCE.md | 18 +++++++++++++-- sdks/typescript/API_REFERENCE.md | 18 +++++++++++++-- 3 files changed, 50 insertions(+), 22 deletions(-) diff --git a/core/api-doc-config.generated.json b/core/api-doc-config.generated.json index 3e176c67..34eecd62 100644 --- a/core/api-doc-config.generated.json +++ b/core/api-doc-config.generated.json @@ -1,5 +1,5 @@ { - "_generated": "Auto-generated by extract-jsdoc.js on 2026-06-02T00:34:44.916Z. Do not edit manually.", + "_generated": "Auto-generated by extract-jsdoc.js on 2026-06-05T12:47:31.910Z. Do not edit manually.", "methods": { "has": { "summary": "HTTP verb for the endpoint (e.g. GET, POST). */", @@ -566,7 +566,7 @@ "type": "UnifiedEvent[]", "description": "Filtered array of events" }, - "source": "BaseExchange.ts:1317" + "source": "BaseExchange.ts:1318" }, "watchOrderBook": { "summary": "Watch order book updates in real-time via WebSocket.", @@ -595,7 +595,7 @@ "type": "OrderBook", "description": "Promise that resolves with the current orderbook state" }, - "source": "BaseExchange.ts:1413" + "source": "BaseExchange.ts:1414" }, "watchOrderBooks": { "summary": "Watch multiple order books simultaneously via WebSocket.", @@ -624,7 +624,7 @@ "type": "Record", "description": "Promise that resolves with order books keyed by ID" }, - "source": "BaseExchange.ts:1426" + "source": "BaseExchange.ts:1427" }, "unwatchOrderBook": { "summary": "Unsubscribe from a previously watched order book stream.", @@ -641,7 +641,7 @@ "type": "void", "description": "Result" }, - "source": "BaseExchange.ts:1454" + "source": "BaseExchange.ts:1455" }, "watchTrades": { "summary": "Watch trade executions in real-time via WebSocket.", @@ -676,7 +676,7 @@ "type": "Trade[]", "description": "Promise that resolves with recent trades" }, - "source": "BaseExchange.ts:1467" + "source": "BaseExchange.ts:1468" }, "watchAddress": { "summary": "Stream activity for a public wallet address", @@ -699,7 +699,7 @@ "type": "SubscribedAddressSnapshot", "description": "Promise that resolves with the latest SubscribedAddressSnapshot snapshot" }, - "source": "BaseExchange.ts:1481" + "source": "BaseExchange.ts:1482" }, "unwatchAddress": { "summary": "Stop watching a previously registered wallet address and release its resource updates.", @@ -716,7 +716,7 @@ "type": "void", "description": "Result" }, - "source": "BaseExchange.ts:1494" + "source": "BaseExchange.ts:1495" }, "close": { "summary": "Close all WebSocket connections and clean up resources.", @@ -726,7 +726,7 @@ "type": "void", "description": "Result" }, - "source": "BaseExchange.ts:1503" + "source": "BaseExchange.ts:1504" }, "fetchMarketMatches": { "summary": "Find the same or related market on other venues. Two modes:", @@ -743,7 +743,7 @@ "type": "MatchResult[]", "description": "Array of matched markets with relation and confidence" }, - "source": "BaseExchange.ts:1517" + "source": "BaseExchange.ts:1518" }, "fetchMatches": { "summary": "fetchMatches", @@ -760,7 +760,7 @@ "type": "MatchResult[]", "description": "Result" }, - "source": "BaseExchange.ts:1533" + "source": "BaseExchange.ts:1534" }, "fetchEventMatches": { "summary": "Find the same or related event on other venues. Two modes:", @@ -777,7 +777,7 @@ "type": "EventMatchResult[]", "description": "Array of matched events with market-level match details" }, - "source": "BaseExchange.ts:1541" + "source": "BaseExchange.ts:1542" }, "compareMarketPrices": { "summary": "Compare live prices for the same market across venues. Finds identity matches and returns side-by-side best bid/ask prices so you can spot price differences at a glance.", @@ -794,7 +794,7 @@ "type": "PriceComparison[]", "description": "Array of price comparisons across venues" }, - "source": "BaseExchange.ts:1557" + "source": "BaseExchange.ts:1558" }, "fetchRelatedMarkets": { "summary": "Find related markets across venues. Discovers subset/superset market relationships", @@ -811,7 +811,7 @@ "type": "PriceComparison[]", "description": "Array of subset/superset matches with live prices" }, - "source": "BaseExchange.ts:1567" + "source": "BaseExchange.ts:1568" }, "fetchMatchedMarkets": { "summary": "fetchMatchedMarkets", @@ -828,7 +828,7 @@ "type": "MatchedMarketPair[]", "description": "Result" }, - "source": "BaseExchange.ts:1578" + "source": "BaseExchange.ts:1579" }, "fetchMatchedPrices": { "summary": "fetchMatchedPrices", @@ -845,7 +845,7 @@ "type": "MatchedPricePair[]", "description": "Array of matched market pairs with prices from each venue" }, - "source": "BaseExchange.ts:1586" + "source": "BaseExchange.ts:1587" }, "fetchHedges": { "summary": "fetchHedges", @@ -862,7 +862,7 @@ "type": "PriceComparison[]", "description": "Array of subset/superset matches with live prices" }, - "source": "BaseExchange.ts:1597" + "source": "BaseExchange.ts:1598" }, "fetchArbitrage": { "summary": "fetchArbitrage", @@ -879,7 +879,7 @@ "type": "ArbitrageOpportunity[]", "description": "Array of arbitrage opportunities sorted by spread" }, - "source": "BaseExchange.ts:1607" + "source": "BaseExchange.ts:1608" }, "watchPrices": { "summary": "Watch AMM price updates for a market address (Limitless only).", diff --git a/sdks/python/API_REFERENCE.md b/sdks/python/API_REFERENCE.md index dac681ce..1d0e55cf 100644 --- a/sdks/python/API_REFERENCE.md +++ b/sdks/python/API_REFERENCE.md @@ -1456,7 +1456,7 @@ title: str # The market title (e.g., "Will BTC close above $100k on Dec 31?"). description: str # Long-form market description or resolution criteria. slug: str # URL-friendly slug for the market. outcomes: List[MarketOutcome] # The possible outcomes for this market. -resolution_date: str # When the market is scheduled to resolve. +resolution_date: str # When the market is scheduled to resolve. Optional because some venues do not publish a cutoff for every market (e.g. Opinion categorical children) — emit `undefined` rather than coercing to epoch. volume24h: float # Trading volume over the past 24 hours (USD). volume: float # Total / Lifetime volume liquidity: float # Current market liquidity (USD). @@ -2219,6 +2219,7 @@ result = exchange.call_api('operationName', {'param': 'value'}) | `deleteOrders` | `DELETE` | `/orders` | Cancel Multiple Orders | Required | | `deleteCancelAll` | `DELETE` | `/cancel-all` | Cancel All Orders | Required | | `deleteCancelMarketOrders` | `DELETE` | `/cancel-market-orders` | Cancel Market Orders | Required | +| `postV1Heartbeats` | `POST` | `/v1/heartbeats` | Refresh authenticated session heartbeat | Required | | `getDataOrder` | `GET` | `/data/order/{id}` | Get Order | Required | | `getDataOrders` | `GET` | `/data/orders` | Get Active Orders | Required | | `getDataTrades` | `GET` | `/data/trades` | Get Trades | Required | @@ -2751,6 +2752,16 @@ Cancel Market Orders *(Auth required)* **Parameters:** - `` (, string) +--- +##### `postV1Heartbeats` + +**POST** `/v1/heartbeats` + +Refresh authenticated session heartbeat *(Auth required)* + +**Parameters:** +- `` (, string) + --- ##### `getDataOrder` @@ -2774,6 +2785,7 @@ Get Active Orders *(Auth required)* - `id` (query, string) - `market` (query, string) - `asset_id` (query, string) +- `next_cursor` (query, string) — Cursor for keyset pagination --- ##### `getDataTrades` @@ -4829,7 +4841,8 @@ List Markets *(Auth required)* - `sort` (query, string) — enum: `volume,volume_24h,liquidity,expires_at,published_at,featured` - `order` (query, string) — enum: `asc,desc` - `network_id` (query, string) — Comma-separated list of network ids -- `state` (query, string) — enum: `open,closed,resolved` +- `state` (query, string) — enum: `open,closed,resolved,voided` +- `trading_model` (query, string) — Filter markets by trading model (e.g. CLOB, AMM) - `token_address` (query, string) - `topics` (query, string) — Comma-separated list of topics - `keyword` (query, string) — Full-text search across title, description, and outcome titles @@ -4984,6 +4997,7 @@ Get User Markets Portfolio *(Auth required)* - `min_shares` (query, number) - `network_id` (query, integer) - `state` (query, string) +- `trading_model` (query, string) — Filter portfolio results by trading model (e.g. CLOB, AMM) - `token_address` (query, string) - `topics` (query, string) - `keyword` (query, string) diff --git a/sdks/typescript/API_REFERENCE.md b/sdks/typescript/API_REFERENCE.md index f8504e0a..b7b82934 100644 --- a/sdks/typescript/API_REFERENCE.md +++ b/sdks/typescript/API_REFERENCE.md @@ -1456,7 +1456,7 @@ title: string; // The market title (e.g., "Will BTC close above $100k on Dec 31? description: string; // Long-form market description or resolution criteria. slug: string; // URL-friendly slug for the market. outcomes: MarketOutcome[]; // The possible outcomes for this market. -resolutionDate: string; // When the market is scheduled to resolve. +resolutionDate: string; // When the market is scheduled to resolve. Optional because some venues do not publish a cutoff for every market (e.g. Opinion categorical children) — emit `undefined` rather than coercing to epoch. volume24h: number; // Trading volume over the past 24 hours (USD). volume: number; // Total / Lifetime volume liquidity: number; // Current market liquidity (USD). @@ -2220,6 +2220,7 @@ const result = await exchange.callApi('operationName', { param: 'value' }); | `deleteOrders` | `DELETE` | `/orders` | Cancel Multiple Orders | Required | | `deleteCancelAll` | `DELETE` | `/cancel-all` | Cancel All Orders | Required | | `deleteCancelMarketOrders` | `DELETE` | `/cancel-market-orders` | Cancel Market Orders | Required | +| `postV1Heartbeats` | `POST` | `/v1/heartbeats` | Refresh authenticated session heartbeat | Required | | `getDataOrder` | `GET` | `/data/order/{id}` | Get Order | Required | | `getDataOrders` | `GET` | `/data/orders` | Get Active Orders | Required | | `getDataTrades` | `GET` | `/data/trades` | Get Trades | Required | @@ -2752,6 +2753,16 @@ Cancel Market Orders *(Auth required)* **Parameters:** - `` (, string) +--- +##### `postV1Heartbeats` + +**POST** `/v1/heartbeats` + +Refresh authenticated session heartbeat *(Auth required)* + +**Parameters:** +- `` (, string) + --- ##### `getDataOrder` @@ -2775,6 +2786,7 @@ Get Active Orders *(Auth required)* - `id` (query, string) - `market` (query, string) - `asset_id` (query, string) +- `next_cursor` (query, string) — Cursor for keyset pagination --- ##### `getDataTrades` @@ -4830,7 +4842,8 @@ List Markets *(Auth required)* - `sort` (query, string) — enum: `volume,volume_24h,liquidity,expires_at,published_at,featured` - `order` (query, string) — enum: `asc,desc` - `network_id` (query, string) — Comma-separated list of network ids -- `state` (query, string) — enum: `open,closed,resolved` +- `state` (query, string) — enum: `open,closed,resolved,voided` +- `trading_model` (query, string) — Filter markets by trading model (e.g. CLOB, AMM) - `token_address` (query, string) - `topics` (query, string) — Comma-separated list of topics - `keyword` (query, string) — Full-text search across title, description, and outcome titles @@ -4985,6 +4998,7 @@ Get User Markets Portfolio *(Auth required)* - `min_shares` (query, number) - `network_id` (query, integer) - `state` (query, string) +- `trading_model` (query, string) — Filter portfolio results by trading model (e.g. CLOB, AMM) - `token_address` (query, string) - `topics` (query, string) - `keyword` (query, string)