Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 26 additions & 26 deletions core/api-doc-config.generated.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"_generated": "Auto-generated by extract-jsdoc.js on 2026-04-18T08:57:36.940Z. Do not edit manually.",
"_generated": "Auto-generated by extract-jsdoc.js on 2026-04-21T22:21:45.494Z. Do not edit manually.",
"methods": {
"has": {
"summary": "HTTP verb for the endpoint (e.g. GET, POST). */",
Expand Down Expand Up @@ -110,7 +110,7 @@
"type": "PaginatedMarketsResult",
"description": "PaginatedMarketsResult with data, total, and optional nextCursor"
},
"source": "BaseExchange.ts:531"
"source": "BaseExchange.ts:533"
},
"fetchEvents": {
"summary": "Fetch events with optional keyword search.",
Expand Down Expand Up @@ -148,7 +148,7 @@
"notes": [
"Some exchanges (like Limitless) may only support status 'active' for search results."
],
"source": "BaseExchange.ts:600"
"source": "BaseExchange.ts:602"
},
"fetchMarket": {
"summary": "Fetch a single market by lookup parameters.",
Expand All @@ -165,7 +165,7 @@
"type": "UnifiedMarket",
"description": "A single unified market"
},
"source": "BaseExchange.ts:633"
"source": "BaseExchange.ts:637"
},
"fetchEvent": {
"summary": "Fetch a single event by lookup parameters.",
Expand All @@ -182,7 +182,7 @@
"type": "UnifiedEvent",
"description": "A single unified event"
},
"source": "BaseExchange.ts:664"
"source": "BaseExchange.ts:668"
},
"fetchOHLCV": {
"summary": "Fetch historical OHLCV (candlestick) price data for a specific market outcome.",
Expand Down Expand Up @@ -210,7 +210,7 @@
"Polymarket: outcomeId is the CLOB Token ID. Kalshi: outcomeId is the Market Ticker.",
"Resolution options: '1m' | '5m' | '15m' | '1h' | '6h' | '1d'"
],
"source": "BaseExchange.ts:681"
"source": "BaseExchange.ts:685"
},
"fetchOrderBook": {
"summary": "Fetch the current order book (bids/asks) for a specific outcome.",
Expand All @@ -227,7 +227,7 @@
"type": "OrderBook",
"description": "Current order book with bids and asks"
},
"source": "BaseExchange.ts:696"
"source": "BaseExchange.ts:700"
},
"fetchTrades": {
"summary": "Fetch raw trade history for a specific outcome.",
Expand All @@ -253,7 +253,7 @@
"notes": [
"Polymarket requires an API key for trade history. Use fetchOHLCV for public historical data."
],
"source": "BaseExchange.ts:707"
"source": "BaseExchange.ts:711"
},
"createOrder": {
"summary": "Place a new order on the exchange.",
Expand All @@ -270,7 +270,7 @@
"type": "Order",
"description": "The created order"
},
"source": "BaseExchange.ts:727"
"source": "BaseExchange.ts:731"
},
"buildOrder": {
"summary": "Build an order payload without submitting it to the exchange.",
Expand All @@ -287,7 +287,7 @@
"type": "BuiltOrder",
"description": "A BuiltOrder containing the exchange-native payload"
},
"source": "BaseExchange.ts:741"
"source": "BaseExchange.ts:745"
},
"submitOrder": {
"summary": "Submit a pre-built order returned by buildOrder().",
Expand All @@ -304,7 +304,7 @@
"type": "Order",
"description": "The submitted order"
},
"source": "BaseExchange.ts:753"
"source": "BaseExchange.ts:757"
},
"cancelOrder": {
"summary": "Cancel an existing open order.",
Expand All @@ -321,7 +321,7 @@
"type": "Order",
"description": "The cancelled order"
},
"source": "BaseExchange.ts:763"
"source": "BaseExchange.ts:767"
},
"fetchOrder": {
"summary": "Fetch a specific order by ID.",
Expand All @@ -338,7 +338,7 @@
"type": "Order",
"description": "The order details"
},
"source": "BaseExchange.ts:773"
"source": "BaseExchange.ts:777"
},
"fetchOpenOrders": {
"summary": "Fetch all open orders, optionally filtered by market.",
Expand All @@ -355,7 +355,7 @@
"type": "Order[]",
"description": "Array of open orders"
},
"source": "BaseExchange.ts:783"
"source": "BaseExchange.ts:787"
},
"fetchPositions": {
"summary": "Fetch current user positions across all markets.",
Expand All @@ -372,7 +372,7 @@
"type": "Position[]",
"description": "Array of user positions"
},
"source": "BaseExchange.ts:805"
"source": "BaseExchange.ts:809"
},
"fetchBalance": {
"summary": "Fetch account balances.",
Expand All @@ -389,7 +389,7 @@
"type": "Balance[]",
"description": "Array of account balances"
},
"source": "BaseExchange.ts:815"
"source": "BaseExchange.ts:819"
},
"getExecutionPrice": {
"summary": "Calculate the volume-weighted average execution price for a given order size.",
Expand Down Expand Up @@ -418,7 +418,7 @@
"type": "number",
"description": "Average execution price, or 0 if insufficient liquidity"
},
"source": "BaseExchange.ts:825"
"source": "BaseExchange.ts:829"
},
"getExecutionPriceDetailed": {
"summary": "Calculate detailed execution price information including partial fill data.",
Expand Down Expand Up @@ -447,7 +447,7 @@
"type": "ExecutionPriceResult",
"description": "Detailed execution result with price, filled amount, and fill status"
},
"source": "BaseExchange.ts:838"
"source": "BaseExchange.ts:842"
},
"filterMarkets": {
"summary": "Filter a list of markets by criteria.",
Expand All @@ -470,7 +470,7 @@
"type": "UnifiedMarket[]",
"description": "Filtered array of markets"
},
"source": "BaseExchange.ts:854"
"source": "BaseExchange.ts:858"
},
"filterEvents": {
"summary": "Filter a list of events by criteria.",
Expand All @@ -493,7 +493,7 @@
"type": "UnifiedEvent[]",
"description": "Filtered array of events"
},
"source": "BaseExchange.ts:1013"
"source": "BaseExchange.ts:1017"
},
"watchOrderBook": {
"summary": "Watch order book updates in real-time via WebSocket.",
Expand All @@ -516,7 +516,7 @@
"type": "OrderBook",
"description": "Promise that resolves with the current orderbook state"
},
"source": "BaseExchange.ts:1109"
"source": "BaseExchange.ts:1113"
},
"unwatchOrderBook": {
"summary": "Unsubscribe from a previously watched order book stream.",
Expand All @@ -533,7 +533,7 @@
"type": "void",
"description": "Result"
},
"source": "BaseExchange.ts:1121"
"source": "BaseExchange.ts:1125"
},
"watchTrades": {
"summary": "Watch trade executions in real-time via WebSocket.",
Expand Down Expand Up @@ -568,7 +568,7 @@
"type": "Trade[]",
"description": "Promise that resolves with recent trades"
},
"source": "BaseExchange.ts:1134"
"source": "BaseExchange.ts:1138"
},
"watchAddress": {
"summary": "Stream activity for a public wallet address",
Expand All @@ -591,7 +591,7 @@
"type": "SubscribedAddressSnapshot",
"description": "Promise that resolves with the latest SubscribedAddressSnapshot snapshot"
},
"source": "BaseExchange.ts:1148"
"source": "BaseExchange.ts:1152"
},
"unwatchAddress": {
"summary": "Stop watching a previously registered wallet address and release its resource updates.",
Expand All @@ -608,7 +608,7 @@
"type": "void",
"description": "Result"
},
"source": "BaseExchange.ts:1161"
"source": "BaseExchange.ts:1165"
},
"close": {
"summary": "Close all WebSocket connections and clean up resources.",
Expand All @@ -618,7 +618,7 @@
"type": "void",
"description": "Result"
},
"source": "BaseExchange.ts:1170"
"source": "BaseExchange.ts:1174"
},
"watchPrices": {
"summary": "Watch AMM price updates for a market address (Limitless only).",
Expand Down
40 changes: 40 additions & 0 deletions core/specs/polymarket/PolymarketClobAPI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,25 @@ components:
type: string
description: Map of token_id to spread value

# --- Markets Schemas ---
MarketsByTokenResponse:
type: object
required:
- condition_id
- primary_token_id
- secondary_token_id
properties:
condition_id:
type: string
description: The condition ID of the market
primary_token_id:
type: string
description: The primary (Yes) token ID
secondary_token_id:
type: string
description: The secondary (No) token ID
description: Condition ID and both token IDs in the market

# --- Auth Schemas ---
ApiKeyCreds:
type: object
Expand Down Expand Up @@ -616,6 +635,27 @@ paths:
schema:
$ref: '#/components/schemas/PriceHistoryResponse'

# ----------------------------------------------------------------------------
# Markets
# ----------------------------------------------------------------------------
/markets-by-token/{token_id}:
get:
tags: [Markets]
summary: Get market by token
parameters:
- name: token_id
in: path
required: true
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/MarketsByTokenResponse'

# ----------------------------------------------------------------------------
# L1 Auth Methods (From "L1 Authentication" text)
# ----------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions core/src/exchanges/kalshi/api.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Auto-generated from /Users/samueltinnerholm/Documents/GitHub/pmxt/core/specs/kalshi/Kalshi.yaml
* Generated at: 2026-03-21T08:02:59.422Z
* Auto-generated from /Users/ndmeiri/Developer/pmxt/core/specs/kalshi/Kalshi.yaml
* Generated at: 2026-04-21T22:01:26.550Z
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
*/
export const kalshiApiSpec = {
Expand Down
4 changes: 2 additions & 2 deletions core/src/exchanges/limitless/api.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Auto-generated from /Users/samueltinnerholm/Documents/GitHub/pmxt/core/specs/limitless/Limitless.yaml
* Generated at: 2026-03-21T08:02:59.451Z
* Auto-generated from /Users/ndmeiri/Developer/pmxt/core/specs/limitless/Limitless.yaml
* Generated at: 2026-04-21T22:01:26.562Z
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
*/
export const limitlessApiSpec = {
Expand Down
4 changes: 2 additions & 2 deletions core/src/exchanges/myriad/api.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Auto-generated from /Users/samueltinnerholm/Documents/GitHub/pmxt/core/specs/myriad/myriad.yaml
* Generated at: 2026-03-21T08:02:59.457Z
* Auto-generated from /Users/ndmeiri/Developer/pmxt/core/specs/myriad/myriad.yaml
* Generated at: 2026-04-21T22:01:26.565Z
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
*/
export const myriadApiSpec = {
Expand Down
4 changes: 2 additions & 2 deletions core/src/exchanges/opinion/api.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Auto-generated from /Users/samueltinnerholm/Documents/GitHub/pmxt/core/specs/opinion/opinion-openapi.yaml
* Generated at: 2026-03-21T08:02:59.460Z
* Auto-generated from /Users/ndmeiri/Developer/pmxt/core/specs/opinion/opinion-openapi.yaml
* Generated at: 2026-04-21T22:01:26.567Z
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
*/
export const opinionApiSpec = {
Expand Down
22 changes: 20 additions & 2 deletions core/src/exchanges/polymarket/api-clob.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Auto-generated from /Users/samueltinnerholm/Documents/GitHub/pmxt/core/specs/polymarket/PolymarketClobAPI.yaml
* Generated at: 2026-03-21T08:02:59.429Z
* Auto-generated from /Users/ndmeiri/Developer/pmxt/core/specs/polymarket/PolymarketClobAPI.yaml
* Generated at: 2026-04-21T22:01:26.553Z
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
*/
export const polymarketClobSpec = {
Expand Down Expand Up @@ -188,6 +188,24 @@ export const polymarketClobSpec = {
]
}
},
"/markets-by-token/{token_id}": {
"get": {
"tags": [
"Markets"
],
"summary": "Get market by token",
"parameters": [
{
"name": "token_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
]
}
},
"/auth/api-key": {
"post": {
"summary": "Create API Key",
Expand Down
4 changes: 2 additions & 2 deletions core/src/exchanges/polymarket/api-data.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Auto-generated from /Users/samueltinnerholm/Documents/GitHub/pmxt/core/specs/polymarket/Polymarket_Data_API.yaml
* Generated at: 2026-03-21T08:02:59.438Z
* Auto-generated from /Users/ndmeiri/Developer/pmxt/core/specs/polymarket/Polymarket_Data_API.yaml
* Generated at: 2026-04-21T22:01:26.557Z
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
*/
export const polymarketDataSpec = {
Expand Down
4 changes: 2 additions & 2 deletions core/src/exchanges/polymarket/api-gamma.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Auto-generated from /Users/samueltinnerholm/Documents/GitHub/pmxt/core/specs/polymarket/PolymarketGammaAPI.yaml
* Generated at: 2026-03-21T08:02:59.435Z
* Auto-generated from /Users/ndmeiri/Developer/pmxt/core/specs/polymarket/PolymarketGammaAPI.yaml
* Generated at: 2026-04-21T22:01:26.556Z
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
*/
export const polymarketGammaSpec = {
Expand Down
4 changes: 2 additions & 2 deletions core/src/exchanges/probable/api.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Auto-generated from /Users/samueltinnerholm/Documents/GitHub/pmxt/core/specs/probable/probable.yaml
* Generated at: 2026-03-21T08:02:59.454Z
* Auto-generated from /Users/ndmeiri/Developer/pmxt/core/specs/probable/probable.yaml
* Generated at: 2026-04-21T22:01:26.564Z
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
*/
export const probableApiSpec = {
Expand Down
Loading
Loading