pmxt-core 2.27.2 → 2.27.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BaseExchange.d.ts +9 -0
- package/dist/exchanges/kalshi/api.d.ts +1 -1
- package/dist/exchanges/kalshi/api.js +1 -1
- package/dist/exchanges/limitless/api.d.ts +1 -1
- package/dist/exchanges/limitless/api.js +1 -1
- package/dist/exchanges/myriad/api.d.ts +1 -1
- package/dist/exchanges/myriad/api.js +1 -1
- package/dist/exchanges/opinion/api.d.ts +1 -1
- package/dist/exchanges/opinion/api.js +1 -1
- package/dist/exchanges/polymarket/api-clob.d.ts +1 -1
- package/dist/exchanges/polymarket/api-clob.js +1 -1
- package/dist/exchanges/polymarket/api-data.d.ts +1 -1
- package/dist/exchanges/polymarket/api-data.js +1 -1
- package/dist/exchanges/polymarket/api-gamma.d.ts +1 -1
- package/dist/exchanges/polymarket/api-gamma.js +1 -1
- package/dist/exchanges/probable/api.d.ts +1 -1
- package/dist/exchanges/probable/api.js +1 -1
- package/dist/server/openapi.yaml +357 -139
- package/dist/types.d.ts +5 -0
- package/package.json +3 -3
package/dist/BaseExchange.d.ts
CHANGED
|
@@ -44,6 +44,9 @@ export interface EventFetchParams {
|
|
|
44
44
|
eventId?: string;
|
|
45
45
|
slug?: string;
|
|
46
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* Deprecated - use OHLCVParams or TradesParams instead. Resolution is optional for backward compatibility.
|
|
49
|
+
*/
|
|
47
50
|
export interface HistoryFilterParams {
|
|
48
51
|
resolution?: CandleInterval;
|
|
49
52
|
start?: Date;
|
|
@@ -56,6 +59,9 @@ export interface OHLCVParams {
|
|
|
56
59
|
end?: Date;
|
|
57
60
|
limit?: number;
|
|
58
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* Parameters for fetching trade history. No resolution parameter - trades are discrete events.
|
|
64
|
+
*/
|
|
59
65
|
export interface TradesParams {
|
|
60
66
|
start?: Date;
|
|
61
67
|
end?: Date;
|
|
@@ -151,6 +157,9 @@ export interface ExchangeHas {
|
|
|
151
157
|
buildOrder: ExchangeCapability;
|
|
152
158
|
submitOrder: ExchangeCapability;
|
|
153
159
|
}
|
|
160
|
+
/**
|
|
161
|
+
* Optional authentication credentials for exchange operations.
|
|
162
|
+
*/
|
|
154
163
|
export interface ExchangeCredentials {
|
|
155
164
|
apiKey?: string;
|
|
156
165
|
apiSecret?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/kalshi/Kalshi.yaml
|
|
3
|
-
* Generated at: 2026-04-
|
|
3
|
+
* Generated at: 2026-04-09T14:31:05.346Z
|
|
4
4
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
5
5
|
*/
|
|
6
6
|
export declare const kalshiApiSpec: {
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.kalshiApiSpec = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/kalshi/Kalshi.yaml
|
|
6
|
-
* Generated at: 2026-04-
|
|
6
|
+
* Generated at: 2026-04-09T14:31:05.346Z
|
|
7
7
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
8
8
|
*/
|
|
9
9
|
exports.kalshiApiSpec = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/limitless/Limitless.yaml
|
|
3
|
-
* Generated at: 2026-04-
|
|
3
|
+
* Generated at: 2026-04-09T14:31:05.395Z
|
|
4
4
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
5
5
|
*/
|
|
6
6
|
export declare const limitlessApiSpec: {
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.limitlessApiSpec = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/limitless/Limitless.yaml
|
|
6
|
-
* Generated at: 2026-04-
|
|
6
|
+
* Generated at: 2026-04-09T14:31:05.395Z
|
|
7
7
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
8
8
|
*/
|
|
9
9
|
exports.limitlessApiSpec = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/myriad/myriad.yaml
|
|
3
|
-
* Generated at: 2026-04-
|
|
3
|
+
* Generated at: 2026-04-09T14:31:05.411Z
|
|
4
4
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
5
5
|
*/
|
|
6
6
|
export declare const myriadApiSpec: {
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.myriadApiSpec = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/myriad/myriad.yaml
|
|
6
|
-
* Generated at: 2026-04-
|
|
6
|
+
* Generated at: 2026-04-09T14:31:05.411Z
|
|
7
7
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
8
8
|
*/
|
|
9
9
|
exports.myriadApiSpec = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/opinion/opinion-openapi.yaml
|
|
3
|
-
* Generated at: 2026-04-
|
|
3
|
+
* Generated at: 2026-04-09T14:31:05.416Z
|
|
4
4
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
5
5
|
*/
|
|
6
6
|
export declare const opinionApiSpec: {
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.opinionApiSpec = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/opinion/opinion-openapi.yaml
|
|
6
|
-
* Generated at: 2026-04-
|
|
6
|
+
* Generated at: 2026-04-09T14:31:05.416Z
|
|
7
7
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
8
8
|
*/
|
|
9
9
|
exports.opinionApiSpec = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/polymarket/PolymarketClobAPI.yaml
|
|
3
|
-
* Generated at: 2026-04-
|
|
3
|
+
* Generated at: 2026-04-09T14:31:05.354Z
|
|
4
4
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
5
5
|
*/
|
|
6
6
|
export declare const polymarketClobSpec: {
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.polymarketClobSpec = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/polymarket/PolymarketClobAPI.yaml
|
|
6
|
-
* Generated at: 2026-04-
|
|
6
|
+
* Generated at: 2026-04-09T14:31:05.354Z
|
|
7
7
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
8
8
|
*/
|
|
9
9
|
exports.polymarketClobSpec = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/polymarket/Polymarket_Data_API.yaml
|
|
3
|
-
* Generated at: 2026-04-
|
|
3
|
+
* Generated at: 2026-04-09T14:31:05.372Z
|
|
4
4
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
5
5
|
*/
|
|
6
6
|
export declare const polymarketDataSpec: {
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.polymarketDataSpec = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/polymarket/Polymarket_Data_API.yaml
|
|
6
|
-
* Generated at: 2026-04-
|
|
6
|
+
* Generated at: 2026-04-09T14:31:05.372Z
|
|
7
7
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
8
8
|
*/
|
|
9
9
|
exports.polymarketDataSpec = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/polymarket/PolymarketGammaAPI.yaml
|
|
3
|
-
* Generated at: 2026-04-
|
|
3
|
+
* Generated at: 2026-04-09T14:31:05.369Z
|
|
4
4
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
5
5
|
*/
|
|
6
6
|
export declare const polymarketGammaSpec: {
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.polymarketGammaSpec = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/polymarket/PolymarketGammaAPI.yaml
|
|
6
|
-
* Generated at: 2026-04-
|
|
6
|
+
* Generated at: 2026-04-09T14:31:05.369Z
|
|
7
7
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
8
8
|
*/
|
|
9
9
|
exports.polymarketGammaSpec = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/probable/probable.yaml
|
|
3
|
-
* Generated at: 2026-04-
|
|
3
|
+
* Generated at: 2026-04-09T14:31:05.402Z
|
|
4
4
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
5
5
|
*/
|
|
6
6
|
export declare const probableApiSpec: {
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.probableApiSpec = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Auto-generated from /home/runner/work/pmxt/pmxt/core/specs/probable/probable.yaml
|
|
6
|
-
* Generated at: 2026-04-
|
|
6
|
+
* Generated at: 2026-04-09T14:31:05.402Z
|
|
7
7
|
* Do not edit manually -- run "npm run fetch:openapi" to regenerate.
|
|
8
8
|
*/
|
|
9
9
|
exports.probableApiSpec = {
|
package/dist/server/openapi.yaml
CHANGED
|
@@ -77,13 +77,12 @@ paths:
|
|
|
77
77
|
name: limit
|
|
78
78
|
required: false
|
|
79
79
|
schema:
|
|
80
|
-
type:
|
|
81
|
-
default: 10000
|
|
80
|
+
type: number
|
|
82
81
|
- in: query
|
|
83
82
|
name: offset
|
|
84
83
|
required: false
|
|
85
84
|
schema:
|
|
86
|
-
type:
|
|
85
|
+
type: number
|
|
87
86
|
- in: query
|
|
88
87
|
name: sort
|
|
89
88
|
required: false
|
|
@@ -100,10 +99,10 @@ paths:
|
|
|
100
99
|
type: string
|
|
101
100
|
enum:
|
|
102
101
|
- active
|
|
102
|
+
- inactive
|
|
103
103
|
- closed
|
|
104
104
|
- all
|
|
105
|
-
|
|
106
|
-
description: 'Filter by market status (default: active)'
|
|
105
|
+
description: 'Filter by market status (default: ''active'', ''inactive'' and ''closed'' are interchangeable)'
|
|
107
106
|
- in: query
|
|
108
107
|
name: searchIn
|
|
109
108
|
required: false
|
|
@@ -113,47 +112,49 @@ paths:
|
|
|
113
112
|
- title
|
|
114
113
|
- description
|
|
115
114
|
- both
|
|
115
|
+
description: 'Where to search (default: ''title'')'
|
|
116
116
|
- in: query
|
|
117
117
|
name: query
|
|
118
118
|
required: false
|
|
119
119
|
schema:
|
|
120
120
|
type: string
|
|
121
|
+
description: For keyword search
|
|
121
122
|
- in: query
|
|
122
123
|
name: slug
|
|
123
124
|
required: false
|
|
124
125
|
schema:
|
|
125
126
|
type: string
|
|
127
|
+
description: For slug/ticker lookup
|
|
126
128
|
- in: query
|
|
127
129
|
name: marketId
|
|
128
130
|
required: false
|
|
129
131
|
schema:
|
|
130
132
|
type: string
|
|
131
|
-
description: Direct lookup by market ID
|
|
132
133
|
description: Direct lookup by market ID
|
|
133
134
|
- in: query
|
|
134
135
|
name: outcomeId
|
|
135
136
|
required: false
|
|
136
137
|
schema:
|
|
137
138
|
type: string
|
|
138
|
-
description: Reverse lookup -- find market containing this outcome
|
|
139
139
|
description: Reverse lookup -- find market containing this outcome
|
|
140
140
|
- in: query
|
|
141
141
|
name: eventId
|
|
142
142
|
required: false
|
|
143
143
|
schema:
|
|
144
144
|
type: string
|
|
145
|
-
description: Find markets belonging to an event
|
|
146
145
|
description: Find markets belonging to an event
|
|
147
146
|
- in: query
|
|
148
147
|
name: page
|
|
149
148
|
required: false
|
|
150
149
|
schema:
|
|
151
|
-
type:
|
|
150
|
+
type: number
|
|
151
|
+
description: For pagination (used by Limitless)
|
|
152
152
|
- in: query
|
|
153
153
|
name: similarityThreshold
|
|
154
154
|
required: false
|
|
155
155
|
schema:
|
|
156
156
|
type: number
|
|
157
|
+
description: For semantic search (used by Limitless)
|
|
157
158
|
responses:
|
|
158
159
|
'200':
|
|
159
160
|
description: Fetch Markets response
|
|
@@ -216,26 +217,26 @@ paths:
|
|
|
216
217
|
required: false
|
|
217
218
|
schema:
|
|
218
219
|
type: string
|
|
220
|
+
description: For keyword search
|
|
219
221
|
- in: query
|
|
220
|
-
name:
|
|
222
|
+
name: limit
|
|
221
223
|
required: false
|
|
222
224
|
schema:
|
|
223
|
-
type:
|
|
224
|
-
enum:
|
|
225
|
-
- volume
|
|
226
|
-
- liquidity
|
|
227
|
-
- newest
|
|
225
|
+
type: number
|
|
228
226
|
- in: query
|
|
229
|
-
name:
|
|
227
|
+
name: offset
|
|
230
228
|
required: false
|
|
231
229
|
schema:
|
|
232
|
-
type:
|
|
233
|
-
default: 10000
|
|
230
|
+
type: number
|
|
234
231
|
- in: query
|
|
235
|
-
name:
|
|
232
|
+
name: sort
|
|
236
233
|
required: false
|
|
237
234
|
schema:
|
|
238
|
-
type:
|
|
235
|
+
type: string
|
|
236
|
+
enum:
|
|
237
|
+
- volume
|
|
238
|
+
- liquidity
|
|
239
|
+
- newest
|
|
239
240
|
- in: query
|
|
240
241
|
name: status
|
|
241
242
|
required: false
|
|
@@ -243,10 +244,10 @@ paths:
|
|
|
243
244
|
type: string
|
|
244
245
|
enum:
|
|
245
246
|
- active
|
|
247
|
+
- inactive
|
|
246
248
|
- closed
|
|
247
249
|
- all
|
|
248
|
-
|
|
249
|
-
description: 'Filter by event status (default: active)'
|
|
250
|
+
description: 'Filter by event status (default: ''active'', ''inactive'' and ''closed'' are interchangeable)'
|
|
250
251
|
- in: query
|
|
251
252
|
name: searchIn
|
|
252
253
|
required: false
|
|
@@ -261,14 +262,12 @@ paths:
|
|
|
261
262
|
required: false
|
|
262
263
|
schema:
|
|
263
264
|
type: string
|
|
264
|
-
description: Direct lookup by event ID
|
|
265
265
|
description: Direct lookup by event ID
|
|
266
266
|
- in: query
|
|
267
267
|
name: slug
|
|
268
268
|
required: false
|
|
269
269
|
schema:
|
|
270
270
|
type: string
|
|
271
|
-
description: Lookup by event slug
|
|
272
271
|
description: Lookup by event slug
|
|
273
272
|
responses:
|
|
274
273
|
'200':
|
|
@@ -297,13 +296,12 @@ paths:
|
|
|
297
296
|
name: limit
|
|
298
297
|
required: false
|
|
299
298
|
schema:
|
|
300
|
-
type:
|
|
301
|
-
default: 10000
|
|
299
|
+
type: number
|
|
302
300
|
- in: query
|
|
303
301
|
name: offset
|
|
304
302
|
required: false
|
|
305
303
|
schema:
|
|
306
|
-
type:
|
|
304
|
+
type: number
|
|
307
305
|
- in: query
|
|
308
306
|
name: sort
|
|
309
307
|
required: false
|
|
@@ -320,10 +318,10 @@ paths:
|
|
|
320
318
|
type: string
|
|
321
319
|
enum:
|
|
322
320
|
- active
|
|
321
|
+
- inactive
|
|
323
322
|
- closed
|
|
324
323
|
- all
|
|
325
|
-
|
|
326
|
-
description: 'Filter by market status (default: active)'
|
|
324
|
+
description: 'Filter by market status (default: ''active'', ''inactive'' and ''closed'' are interchangeable)'
|
|
327
325
|
- in: query
|
|
328
326
|
name: searchIn
|
|
329
327
|
required: false
|
|
@@ -333,47 +331,49 @@ paths:
|
|
|
333
331
|
- title
|
|
334
332
|
- description
|
|
335
333
|
- both
|
|
334
|
+
description: 'Where to search (default: ''title'')'
|
|
336
335
|
- in: query
|
|
337
336
|
name: query
|
|
338
337
|
required: false
|
|
339
338
|
schema:
|
|
340
339
|
type: string
|
|
340
|
+
description: For keyword search
|
|
341
341
|
- in: query
|
|
342
342
|
name: slug
|
|
343
343
|
required: false
|
|
344
344
|
schema:
|
|
345
345
|
type: string
|
|
346
|
+
description: For slug/ticker lookup
|
|
346
347
|
- in: query
|
|
347
348
|
name: marketId
|
|
348
349
|
required: false
|
|
349
350
|
schema:
|
|
350
351
|
type: string
|
|
351
|
-
description: Direct lookup by market ID
|
|
352
352
|
description: Direct lookup by market ID
|
|
353
353
|
- in: query
|
|
354
354
|
name: outcomeId
|
|
355
355
|
required: false
|
|
356
356
|
schema:
|
|
357
357
|
type: string
|
|
358
|
-
description: Reverse lookup -- find market containing this outcome
|
|
359
358
|
description: Reverse lookup -- find market containing this outcome
|
|
360
359
|
- in: query
|
|
361
360
|
name: eventId
|
|
362
361
|
required: false
|
|
363
362
|
schema:
|
|
364
363
|
type: string
|
|
365
|
-
description: Find markets belonging to an event
|
|
366
364
|
description: Find markets belonging to an event
|
|
367
365
|
- in: query
|
|
368
366
|
name: page
|
|
369
367
|
required: false
|
|
370
368
|
schema:
|
|
371
|
-
type:
|
|
369
|
+
type: number
|
|
370
|
+
description: For pagination (used by Limitless)
|
|
372
371
|
- in: query
|
|
373
372
|
name: similarityThreshold
|
|
374
373
|
required: false
|
|
375
374
|
schema:
|
|
376
375
|
type: number
|
|
376
|
+
description: For semantic search (used by Limitless)
|
|
377
377
|
responses:
|
|
378
378
|
'200':
|
|
379
379
|
description: Fetch Market response
|
|
@@ -400,26 +400,26 @@ paths:
|
|
|
400
400
|
required: false
|
|
401
401
|
schema:
|
|
402
402
|
type: string
|
|
403
|
+
description: For keyword search
|
|
403
404
|
- in: query
|
|
404
|
-
name:
|
|
405
|
+
name: limit
|
|
405
406
|
required: false
|
|
406
407
|
schema:
|
|
407
|
-
type:
|
|
408
|
-
enum:
|
|
409
|
-
- volume
|
|
410
|
-
- liquidity
|
|
411
|
-
- newest
|
|
408
|
+
type: number
|
|
412
409
|
- in: query
|
|
413
|
-
name:
|
|
410
|
+
name: offset
|
|
414
411
|
required: false
|
|
415
412
|
schema:
|
|
416
|
-
type:
|
|
417
|
-
default: 10000
|
|
413
|
+
type: number
|
|
418
414
|
- in: query
|
|
419
|
-
name:
|
|
415
|
+
name: sort
|
|
420
416
|
required: false
|
|
421
417
|
schema:
|
|
422
|
-
type:
|
|
418
|
+
type: string
|
|
419
|
+
enum:
|
|
420
|
+
- volume
|
|
421
|
+
- liquidity
|
|
422
|
+
- newest
|
|
423
423
|
- in: query
|
|
424
424
|
name: status
|
|
425
425
|
required: false
|
|
@@ -427,10 +427,10 @@ paths:
|
|
|
427
427
|
type: string
|
|
428
428
|
enum:
|
|
429
429
|
- active
|
|
430
|
+
- inactive
|
|
430
431
|
- closed
|
|
431
432
|
- all
|
|
432
|
-
|
|
433
|
-
description: 'Filter by event status (default: active)'
|
|
433
|
+
description: 'Filter by event status (default: ''active'', ''inactive'' and ''closed'' are interchangeable)'
|
|
434
434
|
- in: query
|
|
435
435
|
name: searchIn
|
|
436
436
|
required: false
|
|
@@ -445,14 +445,12 @@ paths:
|
|
|
445
445
|
required: false
|
|
446
446
|
schema:
|
|
447
447
|
type: string
|
|
448
|
-
description: Direct lookup by event ID
|
|
449
448
|
description: Direct lookup by event ID
|
|
450
449
|
- in: query
|
|
451
450
|
name: slug
|
|
452
451
|
required: false
|
|
453
452
|
schema:
|
|
454
453
|
type: string
|
|
455
|
-
description: Lookup by event slug
|
|
456
454
|
description: Lookup by event slug
|
|
457
455
|
responses:
|
|
458
456
|
'200':
|
|
@@ -492,8 +490,7 @@ paths:
|
|
|
492
490
|
- 1h
|
|
493
491
|
- 6h
|
|
494
492
|
- 1d
|
|
495
|
-
|
|
496
|
-
description: Candle interval for aggregation
|
|
493
|
+
description: Required for candle aggregation
|
|
497
494
|
- in: query
|
|
498
495
|
name: start
|
|
499
496
|
required: false
|
|
@@ -510,7 +507,7 @@ paths:
|
|
|
510
507
|
name: limit
|
|
511
508
|
required: false
|
|
512
509
|
schema:
|
|
513
|
-
type:
|
|
510
|
+
type: number
|
|
514
511
|
responses:
|
|
515
512
|
'200':
|
|
516
513
|
description: Fetch O H L C V response
|
|
@@ -579,7 +576,7 @@ paths:
|
|
|
579
576
|
name: limit
|
|
580
577
|
required: false
|
|
581
578
|
schema:
|
|
582
|
-
type:
|
|
579
|
+
type: number
|
|
583
580
|
responses:
|
|
584
581
|
'200':
|
|
585
582
|
description: Fetch Trades response
|
|
@@ -802,15 +799,13 @@ paths:
|
|
|
802
799
|
required: false
|
|
803
800
|
schema:
|
|
804
801
|
type: string
|
|
805
|
-
|
|
806
|
-
description: Filter to specific outcome/ticker
|
|
802
|
+
description: filter to specific outcome/ticker
|
|
807
803
|
- in: query
|
|
808
804
|
name: marketId
|
|
809
805
|
required: false
|
|
810
806
|
schema:
|
|
811
807
|
type: string
|
|
812
|
-
|
|
813
|
-
description: Filter to specific market
|
|
808
|
+
description: filter to specific market
|
|
814
809
|
- in: query
|
|
815
810
|
name: since
|
|
816
811
|
required: false
|
|
@@ -827,14 +822,13 @@ paths:
|
|
|
827
822
|
name: limit
|
|
828
823
|
required: false
|
|
829
824
|
schema:
|
|
830
|
-
type:
|
|
825
|
+
type: number
|
|
831
826
|
- in: query
|
|
832
827
|
name: cursor
|
|
833
828
|
required: false
|
|
834
829
|
schema:
|
|
835
830
|
type: string
|
|
836
|
-
|
|
837
|
-
description: For Kalshi cursor pagination
|
|
831
|
+
description: for Kalshi cursor pagination
|
|
838
832
|
responses:
|
|
839
833
|
'200':
|
|
840
834
|
description: Fetch My Trades response
|
|
@@ -860,8 +854,7 @@ paths:
|
|
|
860
854
|
required: false
|
|
861
855
|
schema:
|
|
862
856
|
type: string
|
|
863
|
-
|
|
864
|
-
description: Required for Limitless (slug)
|
|
857
|
+
description: required for Limitless (slug)
|
|
865
858
|
- in: query
|
|
866
859
|
name: since
|
|
867
860
|
required: false
|
|
@@ -878,7 +871,7 @@ paths:
|
|
|
878
871
|
name: limit
|
|
879
872
|
required: false
|
|
880
873
|
schema:
|
|
881
|
-
type:
|
|
874
|
+
type: number
|
|
882
875
|
- in: query
|
|
883
876
|
name: cursor
|
|
884
877
|
required: false
|
|
@@ -909,8 +902,7 @@ paths:
|
|
|
909
902
|
required: false
|
|
910
903
|
schema:
|
|
911
904
|
type: string
|
|
912
|
-
|
|
913
|
-
description: Required for Limitless (slug)
|
|
905
|
+
description: required for Limitless (slug)
|
|
914
906
|
- in: query
|
|
915
907
|
name: since
|
|
916
908
|
required: false
|
|
@@ -927,7 +919,7 @@ paths:
|
|
|
927
919
|
name: limit
|
|
928
920
|
required: false
|
|
929
921
|
schema:
|
|
930
|
-
type:
|
|
922
|
+
type: number
|
|
931
923
|
- in: query
|
|
932
924
|
name: cursor
|
|
933
925
|
required: false
|
|
@@ -1107,10 +1099,97 @@ paths:
|
|
|
1107
1099
|
- type: array
|
|
1108
1100
|
items:
|
|
1109
1101
|
$ref: '#/components/schemas/UnifiedMarket'
|
|
1110
|
-
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1102
|
+
- type: string
|
|
1103
|
+
- type: object
|
|
1104
|
+
properties:
|
|
1105
|
+
text:
|
|
1106
|
+
type: string
|
|
1107
|
+
searchIn:
|
|
1108
|
+
type: array
|
|
1109
|
+
items:
|
|
1110
|
+
type: string
|
|
1111
|
+
enum:
|
|
1112
|
+
- title
|
|
1113
|
+
- description
|
|
1114
|
+
- category
|
|
1115
|
+
- tags
|
|
1116
|
+
- outcomes
|
|
1117
|
+
volume24h:
|
|
1118
|
+
type: object
|
|
1119
|
+
properties:
|
|
1120
|
+
min:
|
|
1121
|
+
type: number
|
|
1122
|
+
max:
|
|
1123
|
+
type: number
|
|
1124
|
+
volume:
|
|
1125
|
+
type: object
|
|
1126
|
+
properties:
|
|
1127
|
+
min:
|
|
1128
|
+
type: number
|
|
1129
|
+
max:
|
|
1130
|
+
type: number
|
|
1131
|
+
liquidity:
|
|
1132
|
+
type: object
|
|
1133
|
+
properties:
|
|
1134
|
+
min:
|
|
1135
|
+
type: number
|
|
1136
|
+
max:
|
|
1137
|
+
type: number
|
|
1138
|
+
openInterest:
|
|
1139
|
+
type: object
|
|
1140
|
+
properties:
|
|
1141
|
+
min:
|
|
1142
|
+
type: number
|
|
1143
|
+
max:
|
|
1144
|
+
type: number
|
|
1145
|
+
resolutionDate:
|
|
1146
|
+
type: object
|
|
1147
|
+
properties:
|
|
1148
|
+
before:
|
|
1149
|
+
type: string
|
|
1150
|
+
format: date-time
|
|
1151
|
+
after:
|
|
1152
|
+
type: string
|
|
1153
|
+
format: date-time
|
|
1154
|
+
category:
|
|
1155
|
+
type: string
|
|
1156
|
+
tags:
|
|
1157
|
+
type: array
|
|
1158
|
+
items:
|
|
1159
|
+
type: string
|
|
1160
|
+
price:
|
|
1161
|
+
type: object
|
|
1162
|
+
properties:
|
|
1163
|
+
outcome:
|
|
1164
|
+
type: string
|
|
1165
|
+
enum:
|
|
1166
|
+
- 'yes'
|
|
1167
|
+
- 'no'
|
|
1168
|
+
- up
|
|
1169
|
+
- down
|
|
1170
|
+
min:
|
|
1171
|
+
type: number
|
|
1172
|
+
max:
|
|
1173
|
+
type: number
|
|
1174
|
+
required:
|
|
1175
|
+
- outcome
|
|
1176
|
+
priceChange24h:
|
|
1177
|
+
type: object
|
|
1178
|
+
properties:
|
|
1179
|
+
outcome:
|
|
1180
|
+
type: string
|
|
1181
|
+
enum:
|
|
1182
|
+
- 'yes'
|
|
1183
|
+
- 'no'
|
|
1184
|
+
- up
|
|
1185
|
+
- down
|
|
1186
|
+
min:
|
|
1187
|
+
type: number
|
|
1188
|
+
max:
|
|
1189
|
+
type: number
|
|
1190
|
+
required:
|
|
1191
|
+
- outcome
|
|
1192
|
+
- type: object
|
|
1114
1193
|
credentials:
|
|
1115
1194
|
$ref: '#/components/schemas/ExchangeCredentials'
|
|
1116
1195
|
required:
|
|
@@ -1154,10 +1233,41 @@ paths:
|
|
|
1154
1233
|
- type: array
|
|
1155
1234
|
items:
|
|
1156
1235
|
$ref: '#/components/schemas/UnifiedEvent'
|
|
1157
|
-
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1236
|
+
- type: string
|
|
1237
|
+
- type: object
|
|
1238
|
+
properties:
|
|
1239
|
+
text:
|
|
1240
|
+
type: string
|
|
1241
|
+
searchIn:
|
|
1242
|
+
type: array
|
|
1243
|
+
items:
|
|
1244
|
+
type: string
|
|
1245
|
+
enum:
|
|
1246
|
+
- title
|
|
1247
|
+
- description
|
|
1248
|
+
- category
|
|
1249
|
+
- tags
|
|
1250
|
+
category:
|
|
1251
|
+
type: string
|
|
1252
|
+
tags:
|
|
1253
|
+
type: array
|
|
1254
|
+
items:
|
|
1255
|
+
type: string
|
|
1256
|
+
marketCount:
|
|
1257
|
+
type: object
|
|
1258
|
+
properties:
|
|
1259
|
+
min:
|
|
1260
|
+
type: number
|
|
1261
|
+
max:
|
|
1262
|
+
type: number
|
|
1263
|
+
totalVolume:
|
|
1264
|
+
type: object
|
|
1265
|
+
properties:
|
|
1266
|
+
min:
|
|
1267
|
+
type: number
|
|
1268
|
+
max:
|
|
1269
|
+
type: number
|
|
1270
|
+
- type: object
|
|
1161
1271
|
credentials:
|
|
1162
1272
|
$ref: '#/components/schemas/ExchangeCredentials'
|
|
1163
1273
|
required:
|
|
@@ -1420,6 +1530,9 @@ components:
|
|
|
1420
1530
|
marketId:
|
|
1421
1531
|
type: string
|
|
1422
1532
|
description: The unique identifier for this market
|
|
1533
|
+
eventId:
|
|
1534
|
+
type: string
|
|
1535
|
+
description: Link to parent event
|
|
1423
1536
|
title:
|
|
1424
1537
|
type: string
|
|
1425
1538
|
description:
|
|
@@ -1430,9 +1543,6 @@ components:
|
|
|
1430
1543
|
type: array
|
|
1431
1544
|
items:
|
|
1432
1545
|
$ref: '#/components/schemas/MarketOutcome'
|
|
1433
|
-
eventId:
|
|
1434
|
-
type: string
|
|
1435
|
-
description: Link to parent event
|
|
1436
1546
|
resolutionDate:
|
|
1437
1547
|
type: string
|
|
1438
1548
|
format: date-time
|
|
@@ -1440,6 +1550,7 @@ components:
|
|
|
1440
1550
|
type: number
|
|
1441
1551
|
volume:
|
|
1442
1552
|
type: number
|
|
1553
|
+
description: Total / Lifetime volume
|
|
1443
1554
|
liquidity:
|
|
1444
1555
|
type: number
|
|
1445
1556
|
openInterest:
|
|
@@ -1471,6 +1582,15 @@ components:
|
|
|
1471
1582
|
$ref: '#/components/schemas/MarketOutcome'
|
|
1472
1583
|
down:
|
|
1473
1584
|
$ref: '#/components/schemas/MarketOutcome'
|
|
1585
|
+
required:
|
|
1586
|
+
- marketId
|
|
1587
|
+
- title
|
|
1588
|
+
- description
|
|
1589
|
+
- outcomes
|
|
1590
|
+
- resolutionDate
|
|
1591
|
+
- volume24h
|
|
1592
|
+
- liquidity
|
|
1593
|
+
- url
|
|
1474
1594
|
MarketOutcome:
|
|
1475
1595
|
type: object
|
|
1476
1596
|
properties:
|
|
@@ -1479,7 +1599,7 @@ components:
|
|
|
1479
1599
|
description: 'Outcome ID for trading operations (CLOB Token ID for Polymarket, Market Ticker for Kalshi)'
|
|
1480
1600
|
marketId:
|
|
1481
1601
|
type: string
|
|
1482
|
-
description: The market this outcome belongs to (set automatically)
|
|
1602
|
+
description: The market this outcome belongs to (set automatically when outcomes are built)
|
|
1483
1603
|
label:
|
|
1484
1604
|
type: string
|
|
1485
1605
|
price:
|
|
@@ -1488,11 +1608,15 @@ components:
|
|
|
1488
1608
|
type: number
|
|
1489
1609
|
metadata:
|
|
1490
1610
|
type: object
|
|
1491
|
-
additionalProperties:
|
|
1611
|
+
additionalProperties: {}
|
|
1492
1612
|
description: 'Exchange-specific metadata (e.g., clobTokenId for Polymarket)'
|
|
1613
|
+
required:
|
|
1614
|
+
- outcomeId
|
|
1615
|
+
- label
|
|
1616
|
+
- price
|
|
1493
1617
|
UnifiedEvent:
|
|
1494
1618
|
type: object
|
|
1495
|
-
description: 'A grouped collection of related markets (e.g., "Who will be Fed Chair?" contains multiple candidate markets)'
|
|
1619
|
+
description: 'A grouped collection of related markets (e.g., "Who will be Fed Chair?" contains multiple candidate markets).'
|
|
1496
1620
|
properties:
|
|
1497
1621
|
id:
|
|
1498
1622
|
type: string
|
|
@@ -1521,11 +1645,19 @@ components:
|
|
|
1521
1645
|
type: array
|
|
1522
1646
|
items:
|
|
1523
1647
|
type: string
|
|
1648
|
+
required:
|
|
1649
|
+
- id
|
|
1650
|
+
- title
|
|
1651
|
+
- description
|
|
1652
|
+
- slug
|
|
1653
|
+
- markets
|
|
1654
|
+
- volume24h
|
|
1655
|
+
- url
|
|
1524
1656
|
PriceCandle:
|
|
1525
1657
|
type: object
|
|
1526
1658
|
properties:
|
|
1527
1659
|
timestamp:
|
|
1528
|
-
type:
|
|
1660
|
+
type: number
|
|
1529
1661
|
open:
|
|
1530
1662
|
type: number
|
|
1531
1663
|
high:
|
|
@@ -1536,6 +1668,12 @@ components:
|
|
|
1536
1668
|
type: number
|
|
1537
1669
|
volume:
|
|
1538
1670
|
type: number
|
|
1671
|
+
required:
|
|
1672
|
+
- timestamp
|
|
1673
|
+
- open
|
|
1674
|
+
- high
|
|
1675
|
+
- low
|
|
1676
|
+
- close
|
|
1539
1677
|
OrderBook:
|
|
1540
1678
|
type: object
|
|
1541
1679
|
properties:
|
|
@@ -1548,19 +1686,29 @@ components:
|
|
|
1548
1686
|
items:
|
|
1549
1687
|
$ref: '#/components/schemas/OrderLevel'
|
|
1550
1688
|
timestamp:
|
|
1551
|
-
type:
|
|
1689
|
+
type: number
|
|
1690
|
+
required:
|
|
1691
|
+
- bids
|
|
1692
|
+
- asks
|
|
1552
1693
|
OrderLevel:
|
|
1553
1694
|
type: object
|
|
1554
1695
|
properties:
|
|
1555
1696
|
price:
|
|
1556
1697
|
type: number
|
|
1698
|
+
description: 0.0 to 1.0 (probability)
|
|
1557
1699
|
size:
|
|
1558
1700
|
type: number
|
|
1701
|
+
description: contracts/shares
|
|
1702
|
+
required:
|
|
1703
|
+
- price
|
|
1704
|
+
- size
|
|
1559
1705
|
Trade:
|
|
1560
1706
|
type: object
|
|
1561
1707
|
properties:
|
|
1562
1708
|
id:
|
|
1563
1709
|
type: string
|
|
1710
|
+
timestamp:
|
|
1711
|
+
type: number
|
|
1564
1712
|
price:
|
|
1565
1713
|
type: number
|
|
1566
1714
|
amount:
|
|
@@ -1571,13 +1719,21 @@ components:
|
|
|
1571
1719
|
- buy
|
|
1572
1720
|
- sell
|
|
1573
1721
|
- unknown
|
|
1574
|
-
|
|
1575
|
-
type:
|
|
1722
|
+
outcomeId:
|
|
1723
|
+
type: string
|
|
1724
|
+
required:
|
|
1725
|
+
- id
|
|
1726
|
+
- timestamp
|
|
1727
|
+
- price
|
|
1728
|
+
- amount
|
|
1729
|
+
- side
|
|
1576
1730
|
UserTrade:
|
|
1577
1731
|
type: object
|
|
1578
1732
|
properties:
|
|
1579
1733
|
id:
|
|
1580
1734
|
type: string
|
|
1735
|
+
timestamp:
|
|
1736
|
+
type: number
|
|
1581
1737
|
price:
|
|
1582
1738
|
type: number
|
|
1583
1739
|
amount:
|
|
@@ -1588,14 +1744,16 @@ components:
|
|
|
1588
1744
|
- buy
|
|
1589
1745
|
- sell
|
|
1590
1746
|
- unknown
|
|
1591
|
-
timestamp:
|
|
1592
|
-
type: integer
|
|
1593
|
-
orderId:
|
|
1594
|
-
type: string
|
|
1595
1747
|
outcomeId:
|
|
1596
1748
|
type: string
|
|
1597
|
-
|
|
1749
|
+
orderId:
|
|
1598
1750
|
type: string
|
|
1751
|
+
required:
|
|
1752
|
+
- id
|
|
1753
|
+
- timestamp
|
|
1754
|
+
- price
|
|
1755
|
+
- amount
|
|
1756
|
+
- side
|
|
1599
1757
|
Order:
|
|
1600
1758
|
type: object
|
|
1601
1759
|
properties:
|
|
@@ -1613,12 +1771,14 @@ components:
|
|
|
1613
1771
|
type:
|
|
1614
1772
|
type: string
|
|
1615
1773
|
enum:
|
|
1616
|
-
- limit
|
|
1617
1774
|
- market
|
|
1775
|
+
- limit
|
|
1618
1776
|
price:
|
|
1619
1777
|
type: number
|
|
1778
|
+
description: For limit orders
|
|
1620
1779
|
amount:
|
|
1621
1780
|
type: number
|
|
1781
|
+
description: Size in contracts/shares
|
|
1622
1782
|
status:
|
|
1623
1783
|
type: string
|
|
1624
1784
|
enum:
|
|
@@ -1629,12 +1789,25 @@ components:
|
|
|
1629
1789
|
- rejected
|
|
1630
1790
|
filled:
|
|
1631
1791
|
type: number
|
|
1792
|
+
description: Amount filled
|
|
1632
1793
|
remaining:
|
|
1633
1794
|
type: number
|
|
1795
|
+
description: Amount remaining
|
|
1634
1796
|
timestamp:
|
|
1635
|
-
type:
|
|
1797
|
+
type: number
|
|
1636
1798
|
fee:
|
|
1637
1799
|
type: number
|
|
1800
|
+
required:
|
|
1801
|
+
- id
|
|
1802
|
+
- marketId
|
|
1803
|
+
- outcomeId
|
|
1804
|
+
- side
|
|
1805
|
+
- type
|
|
1806
|
+
- amount
|
|
1807
|
+
- status
|
|
1808
|
+
- filled
|
|
1809
|
+
- remaining
|
|
1810
|
+
- timestamp
|
|
1638
1811
|
Position:
|
|
1639
1812
|
type: object
|
|
1640
1813
|
properties:
|
|
@@ -1646,6 +1819,7 @@ components:
|
|
|
1646
1819
|
type: string
|
|
1647
1820
|
size:
|
|
1648
1821
|
type: number
|
|
1822
|
+
description: 'Positive for long, negative for short'
|
|
1649
1823
|
entryPrice:
|
|
1650
1824
|
type: number
|
|
1651
1825
|
currentPrice:
|
|
@@ -1654,17 +1828,32 @@ components:
|
|
|
1654
1828
|
type: number
|
|
1655
1829
|
realizedPnL:
|
|
1656
1830
|
type: number
|
|
1831
|
+
required:
|
|
1832
|
+
- marketId
|
|
1833
|
+
- outcomeId
|
|
1834
|
+
- outcomeLabel
|
|
1835
|
+
- size
|
|
1836
|
+
- entryPrice
|
|
1837
|
+
- currentPrice
|
|
1838
|
+
- unrealizedPnL
|
|
1657
1839
|
Balance:
|
|
1658
1840
|
type: object
|
|
1659
1841
|
properties:
|
|
1660
1842
|
currency:
|
|
1661
1843
|
type: string
|
|
1844
|
+
description: 'e.g., ''USDC'''
|
|
1662
1845
|
total:
|
|
1663
1846
|
type: number
|
|
1664
1847
|
available:
|
|
1665
1848
|
type: number
|
|
1666
1849
|
locked:
|
|
1667
1850
|
type: number
|
|
1851
|
+
description: In open orders
|
|
1852
|
+
required:
|
|
1853
|
+
- currency
|
|
1854
|
+
- total
|
|
1855
|
+
- available
|
|
1856
|
+
- locked
|
|
1668
1857
|
ExecutionPriceResult:
|
|
1669
1858
|
type: object
|
|
1670
1859
|
properties:
|
|
@@ -1674,25 +1863,32 @@ components:
|
|
|
1674
1863
|
type: number
|
|
1675
1864
|
fullyFilled:
|
|
1676
1865
|
type: boolean
|
|
1866
|
+
required:
|
|
1867
|
+
- price
|
|
1868
|
+
- filledAmount
|
|
1869
|
+
- fullyFilled
|
|
1677
1870
|
PaginatedMarketsResult:
|
|
1678
1871
|
type: object
|
|
1872
|
+
description: Shape returned by fetchMarketsPaginated
|
|
1679
1873
|
properties:
|
|
1680
1874
|
data:
|
|
1681
1875
|
type: array
|
|
1682
1876
|
items:
|
|
1683
1877
|
$ref: '#/components/schemas/UnifiedMarket'
|
|
1684
1878
|
total:
|
|
1685
|
-
type:
|
|
1879
|
+
type: number
|
|
1686
1880
|
nextCursor:
|
|
1687
1881
|
type: string
|
|
1882
|
+
required:
|
|
1883
|
+
- data
|
|
1884
|
+
- total
|
|
1688
1885
|
MarketFilterParams:
|
|
1689
1886
|
type: object
|
|
1690
1887
|
properties:
|
|
1691
1888
|
limit:
|
|
1692
|
-
type:
|
|
1693
|
-
default: 10000
|
|
1889
|
+
type: number
|
|
1694
1890
|
offset:
|
|
1695
|
-
type:
|
|
1891
|
+
type: number
|
|
1696
1892
|
sort:
|
|
1697
1893
|
type: string
|
|
1698
1894
|
enum:
|
|
@@ -1703,19 +1899,23 @@ components:
|
|
|
1703
1899
|
type: string
|
|
1704
1900
|
enum:
|
|
1705
1901
|
- active
|
|
1902
|
+
- inactive
|
|
1706
1903
|
- closed
|
|
1707
1904
|
- all
|
|
1708
|
-
description: 'Filter by market status (default: active)'
|
|
1905
|
+
description: 'Filter by market status (default: ''active'', ''inactive'' and ''closed'' are interchangeable)'
|
|
1709
1906
|
searchIn:
|
|
1710
1907
|
type: string
|
|
1711
1908
|
enum:
|
|
1712
1909
|
- title
|
|
1713
1910
|
- description
|
|
1714
1911
|
- both
|
|
1912
|
+
description: 'Where to search (default: ''title'')'
|
|
1715
1913
|
query:
|
|
1716
1914
|
type: string
|
|
1915
|
+
description: For keyword search
|
|
1717
1916
|
slug:
|
|
1718
1917
|
type: string
|
|
1918
|
+
description: For slug/ticker lookup
|
|
1719
1919
|
marketId:
|
|
1720
1920
|
type: string
|
|
1721
1921
|
description: Direct lookup by market ID
|
|
@@ -1726,32 +1926,35 @@ components:
|
|
|
1726
1926
|
type: string
|
|
1727
1927
|
description: Find markets belonging to an event
|
|
1728
1928
|
page:
|
|
1729
|
-
type:
|
|
1929
|
+
type: number
|
|
1930
|
+
description: For pagination (used by Limitless)
|
|
1730
1931
|
similarityThreshold:
|
|
1731
1932
|
type: number
|
|
1933
|
+
description: For semantic search (used by Limitless)
|
|
1732
1934
|
EventFetchParams:
|
|
1733
1935
|
type: object
|
|
1734
1936
|
properties:
|
|
1735
1937
|
query:
|
|
1736
1938
|
type: string
|
|
1939
|
+
description: For keyword search
|
|
1940
|
+
limit:
|
|
1941
|
+
type: number
|
|
1942
|
+
offset:
|
|
1943
|
+
type: number
|
|
1737
1944
|
sort:
|
|
1738
1945
|
type: string
|
|
1739
1946
|
enum:
|
|
1740
1947
|
- volume
|
|
1741
1948
|
- liquidity
|
|
1742
1949
|
- newest
|
|
1743
|
-
limit:
|
|
1744
|
-
type: integer
|
|
1745
|
-
default: 10000
|
|
1746
|
-
offset:
|
|
1747
|
-
type: integer
|
|
1748
1950
|
status:
|
|
1749
1951
|
type: string
|
|
1750
1952
|
enum:
|
|
1751
1953
|
- active
|
|
1954
|
+
- inactive
|
|
1752
1955
|
- closed
|
|
1753
1956
|
- all
|
|
1754
|
-
description: 'Filter by event status (default: active)'
|
|
1957
|
+
description: 'Filter by event status (default: ''active'', ''inactive'' and ''closed'' are interchangeable)'
|
|
1755
1958
|
searchIn:
|
|
1756
1959
|
type: string
|
|
1757
1960
|
enum:
|
|
@@ -1777,6 +1980,7 @@ components:
|
|
|
1777
1980
|
- 1h
|
|
1778
1981
|
- 6h
|
|
1779
1982
|
- 1d
|
|
1983
|
+
description: Optional for backward compatibility
|
|
1780
1984
|
start:
|
|
1781
1985
|
type: string
|
|
1782
1986
|
format: date-time
|
|
@@ -1784,11 +1988,9 @@ components:
|
|
|
1784
1988
|
type: string
|
|
1785
1989
|
format: date-time
|
|
1786
1990
|
limit:
|
|
1787
|
-
type:
|
|
1991
|
+
type: number
|
|
1788
1992
|
OHLCVParams:
|
|
1789
1993
|
type: object
|
|
1790
|
-
required:
|
|
1791
|
-
- resolution
|
|
1792
1994
|
properties:
|
|
1793
1995
|
resolution:
|
|
1794
1996
|
type: string
|
|
@@ -1799,7 +2001,7 @@ components:
|
|
|
1799
2001
|
- 1h
|
|
1800
2002
|
- 6h
|
|
1801
2003
|
- 1d
|
|
1802
|
-
description:
|
|
2004
|
+
description: Required for candle aggregation
|
|
1803
2005
|
start:
|
|
1804
2006
|
type: string
|
|
1805
2007
|
format: date-time
|
|
@@ -1807,7 +2009,9 @@ components:
|
|
|
1807
2009
|
type: string
|
|
1808
2010
|
format: date-time
|
|
1809
2011
|
limit:
|
|
1810
|
-
type:
|
|
2012
|
+
type: number
|
|
2013
|
+
required:
|
|
2014
|
+
- resolution
|
|
1811
2015
|
TradesParams:
|
|
1812
2016
|
type: object
|
|
1813
2017
|
description: Parameters for fetching trade history. No resolution parameter - trades are discrete events.
|
|
@@ -1819,15 +2023,9 @@ components:
|
|
|
1819
2023
|
type: string
|
|
1820
2024
|
format: date-time
|
|
1821
2025
|
limit:
|
|
1822
|
-
type:
|
|
2026
|
+
type: number
|
|
1823
2027
|
CreateOrderParams:
|
|
1824
2028
|
type: object
|
|
1825
|
-
required:
|
|
1826
|
-
- marketId
|
|
1827
|
-
- outcomeId
|
|
1828
|
-
- side
|
|
1829
|
-
- type
|
|
1830
|
-
- amount
|
|
1831
2029
|
properties:
|
|
1832
2030
|
marketId:
|
|
1833
2031
|
type: string
|
|
@@ -1841,36 +2039,44 @@ components:
|
|
|
1841
2039
|
type:
|
|
1842
2040
|
type: string
|
|
1843
2041
|
enum:
|
|
1844
|
-
- limit
|
|
1845
2042
|
- market
|
|
2043
|
+
- limit
|
|
1846
2044
|
amount:
|
|
1847
2045
|
type: number
|
|
1848
2046
|
price:
|
|
1849
2047
|
type: number
|
|
2048
|
+
description: Required for limit orders
|
|
1850
2049
|
fee:
|
|
1851
2050
|
type: number
|
|
2051
|
+
description: 'Optional fee rate (e.g., 1000 for 0.1%)'
|
|
1852
2052
|
tickSize:
|
|
1853
2053
|
type: number
|
|
1854
2054
|
description: Optional override for Limitless/Polymarket
|
|
1855
2055
|
negRisk:
|
|
1856
2056
|
type: boolean
|
|
1857
2057
|
description: Optional override to skip neg-risk lookup (Polymarket)
|
|
2058
|
+
required:
|
|
2059
|
+
- marketId
|
|
2060
|
+
- outcomeId
|
|
2061
|
+
- side
|
|
2062
|
+
- type
|
|
2063
|
+
- amount
|
|
1858
2064
|
BuiltOrder:
|
|
1859
2065
|
type: object
|
|
1860
|
-
description: 'An order built but not yet submitted, ready for inspection or middleware forwarding'
|
|
1861
2066
|
properties:
|
|
1862
2067
|
exchange:
|
|
1863
2068
|
type: string
|
|
1864
|
-
description: The exchange name this order was built for
|
|
2069
|
+
description: The exchange name this order was built for.
|
|
1865
2070
|
params:
|
|
1866
|
-
|
|
2071
|
+
allOf:
|
|
2072
|
+
- $ref: '#/components/schemas/CreateOrderParams'
|
|
2073
|
+
description: The original params used to build this order.
|
|
1867
2074
|
signedOrder:
|
|
1868
2075
|
type: object
|
|
1869
|
-
additionalProperties:
|
|
1870
|
-
description: 'For CLOB exchanges (Polymarket): the EIP-712 signed order ready to POST'
|
|
2076
|
+
additionalProperties: {}
|
|
2077
|
+
description: 'For CLOB exchanges (Polymarket): the EIP-712 signed order ready to POST to the exchange''s order endpoint.'
|
|
1871
2078
|
tx:
|
|
1872
2079
|
type: object
|
|
1873
|
-
description: 'For on-chain AMM exchanges: the EVM transaction payload (reserved for future use)'
|
|
1874
2080
|
properties:
|
|
1875
2081
|
to:
|
|
1876
2082
|
type: string
|
|
@@ -1879,18 +2085,30 @@ components:
|
|
|
1879
2085
|
value:
|
|
1880
2086
|
type: string
|
|
1881
2087
|
chainId:
|
|
1882
|
-
type:
|
|
2088
|
+
type: number
|
|
2089
|
+
required:
|
|
2090
|
+
- to
|
|
2091
|
+
- data
|
|
2092
|
+
- value
|
|
2093
|
+
- chainId
|
|
2094
|
+
description: >-
|
|
2095
|
+
For on-chain AMM exchanges: the EVM transaction payload. Reserved for future exchanges; no current exchange
|
|
2096
|
+
populates this.
|
|
1883
2097
|
raw:
|
|
1884
2098
|
description: 'The raw, exchange-native payload. Always present.'
|
|
2099
|
+
required:
|
|
2100
|
+
- exchange
|
|
2101
|
+
- params
|
|
2102
|
+
- raw
|
|
1885
2103
|
MyTradesParams:
|
|
1886
2104
|
type: object
|
|
1887
2105
|
properties:
|
|
1888
2106
|
outcomeId:
|
|
1889
2107
|
type: string
|
|
1890
|
-
description:
|
|
2108
|
+
description: filter to specific outcome/ticker
|
|
1891
2109
|
marketId:
|
|
1892
2110
|
type: string
|
|
1893
|
-
description:
|
|
2111
|
+
description: filter to specific market
|
|
1894
2112
|
since:
|
|
1895
2113
|
type: string
|
|
1896
2114
|
format: date-time
|
|
@@ -1898,16 +2116,16 @@ components:
|
|
|
1898
2116
|
type: string
|
|
1899
2117
|
format: date-time
|
|
1900
2118
|
limit:
|
|
1901
|
-
type:
|
|
2119
|
+
type: number
|
|
1902
2120
|
cursor:
|
|
1903
2121
|
type: string
|
|
1904
|
-
description:
|
|
2122
|
+
description: for Kalshi cursor pagination
|
|
1905
2123
|
OrderHistoryParams:
|
|
1906
2124
|
type: object
|
|
1907
2125
|
properties:
|
|
1908
2126
|
marketId:
|
|
1909
2127
|
type: string
|
|
1910
|
-
description:
|
|
2128
|
+
description: required for Limitless (slug)
|
|
1911
2129
|
since:
|
|
1912
2130
|
type: string
|
|
1913
2131
|
format: date-time
|
|
@@ -1915,30 +2133,30 @@ components:
|
|
|
1915
2133
|
type: string
|
|
1916
2134
|
format: date-time
|
|
1917
2135
|
limit:
|
|
1918
|
-
type:
|
|
2136
|
+
type: number
|
|
1919
2137
|
cursor:
|
|
1920
2138
|
type: string
|
|
1921
2139
|
ExchangeCredentials:
|
|
1922
2140
|
type: object
|
|
1923
|
-
description: Optional authentication credentials for exchange operations
|
|
2141
|
+
description: Optional authentication credentials for exchange operations.
|
|
1924
2142
|
properties:
|
|
1925
2143
|
apiKey:
|
|
1926
2144
|
type: string
|
|
1927
|
-
description: API key for the exchange
|
|
1928
|
-
privateKey:
|
|
1929
|
-
type: string
|
|
1930
|
-
description: Private key for signing transactions
|
|
1931
2145
|
apiSecret:
|
|
1932
2146
|
type: string
|
|
1933
|
-
description: API secret (if required by exchange)
|
|
1934
2147
|
passphrase:
|
|
1935
2148
|
type: string
|
|
1936
|
-
|
|
1937
|
-
funderAddress:
|
|
2149
|
+
apiToken:
|
|
1938
2150
|
type: string
|
|
1939
|
-
description:
|
|
2151
|
+
description: 'Metaculus: `Authorization: Token <apiToken>` for higher rate limits'
|
|
2152
|
+
privateKey:
|
|
2153
|
+
type: string
|
|
2154
|
+
description: Required for Polymarket L1 auth
|
|
1940
2155
|
signatureType:
|
|
1941
2156
|
oneOf:
|
|
1942
|
-
- type:
|
|
2157
|
+
- type: number
|
|
1943
2158
|
- type: string
|
|
1944
|
-
description: '
|
|
2159
|
+
description: '0 = EOA, 1 = Poly Proxy, 2 = Gnosis Safe (Can also use ''eoa'', ''polyproxy'', ''gnosis_safe'')'
|
|
2160
|
+
funderAddress:
|
|
2161
|
+
type: string
|
|
2162
|
+
description: The address funding the trades (defaults to signer address)
|
package/dist/types.d.ts
CHANGED
|
@@ -6,8 +6,12 @@ export interface MarketOutcome {
|
|
|
6
6
|
label: string;
|
|
7
7
|
price: number;
|
|
8
8
|
priceChange24h?: number;
|
|
9
|
+
/** Exchange-specific metadata (e.g., clobTokenId for Polymarket) */
|
|
9
10
|
metadata?: Record<string, any>;
|
|
10
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* A grouped collection of related markets (e.g., "Who will be Fed Chair?" contains multiple candidate markets).
|
|
14
|
+
*/
|
|
11
15
|
export interface UnifiedEvent {
|
|
12
16
|
id: string;
|
|
13
17
|
title: string;
|
|
@@ -24,6 +28,7 @@ export interface UnifiedEvent {
|
|
|
24
28
|
export interface UnifiedMarket {
|
|
25
29
|
/** The unique identifier for this market */
|
|
26
30
|
marketId: string;
|
|
31
|
+
/** Link to parent event */
|
|
27
32
|
eventId?: string;
|
|
28
33
|
title: string;
|
|
29
34
|
description: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmxt-core",
|
|
3
|
-
"version": "2.27.
|
|
3
|
+
"version": "2.27.4",
|
|
4
4
|
"description": "pmxt is a unified prediction market data API. The ccxt for prediction markets.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"test": "jest -c jest.config.js",
|
|
30
30
|
"server": "tsx watch src/server/index.ts",
|
|
31
31
|
"server:prod": "node dist/server/index.js",
|
|
32
|
-
"generate:sdk:python": "npx @openapitools/openapi-generator-cli generate -i src/server/openapi.yaml -g python -o ../sdks/python/generated --package-name pmxt_internal --additional-properties=projectName=pmxt-internal,packageVersion=2.27.
|
|
33
|
-
"generate:sdk:typescript": "npx @openapitools/openapi-generator-cli generate -i src/server/openapi.yaml -g typescript-fetch -o ../sdks/typescript/generated --additional-properties=npmName=pmxtjs,npmVersion=2.27.
|
|
32
|
+
"generate:sdk:python": "npx @openapitools/openapi-generator-cli generate -i src/server/openapi.yaml -g python -o ../sdks/python/generated --package-name pmxt_internal --additional-properties=projectName=pmxt-internal,packageVersion=2.27.4,library=urllib3",
|
|
33
|
+
"generate:sdk:typescript": "npx @openapitools/openapi-generator-cli generate -i src/server/openapi.yaml -g typescript-fetch -o ../sdks/typescript/generated --additional-properties=npmName=pmxtjs,npmVersion=2.27.4,supportsES6=true,typescriptThreePlus=true && node ../sdks/typescript/scripts/fix-generated.js",
|
|
34
34
|
"fetch:openapi": "node scripts/fetch-openapi-specs.js",
|
|
35
35
|
"extract:jsdoc": "node ../scripts/extract-jsdoc.js",
|
|
36
36
|
"generate:docs": "npm run extract:jsdoc && node ../scripts/generate-api-docs.js",
|