pmxt-core 2.26.1 → 2.27.1
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/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/app.d.ts +57 -0
- package/dist/server/app.js +207 -28
- package/dist/server/method-verbs.json +351 -0
- package/dist/server/openapi.yaml +1906 -0
- package/package.json +4 -4
|
@@ -0,0 +1,1906 @@
|
|
|
1
|
+
openapi: 3.0.0
|
|
2
|
+
info:
|
|
3
|
+
title: PMXT Sidecar API
|
|
4
|
+
description: >-
|
|
5
|
+
A unified local sidecar API for prediction markets (Polymarket, Kalshi, Limitless). This API acts as a
|
|
6
|
+
JSON-RPC-style gateway. Each endpoint corresponds to a specific method on the generic exchange implementation.
|
|
7
|
+
version: 0.4.4
|
|
8
|
+
servers:
|
|
9
|
+
- url: 'http://localhost:3847'
|
|
10
|
+
description: Local development server
|
|
11
|
+
paths:
|
|
12
|
+
/health:
|
|
13
|
+
get:
|
|
14
|
+
summary: Server Health Check
|
|
15
|
+
operationId: healthCheck
|
|
16
|
+
responses:
|
|
17
|
+
'200':
|
|
18
|
+
description: Server is consistent and running.
|
|
19
|
+
content:
|
|
20
|
+
application/json:
|
|
21
|
+
schema:
|
|
22
|
+
type: object
|
|
23
|
+
properties:
|
|
24
|
+
status:
|
|
25
|
+
type: string
|
|
26
|
+
example: ok
|
|
27
|
+
timestamp:
|
|
28
|
+
type: integer
|
|
29
|
+
format: int64
|
|
30
|
+
'/api/{exchange}/loadMarkets':
|
|
31
|
+
post:
|
|
32
|
+
summary: Load Markets
|
|
33
|
+
operationId: loadMarkets
|
|
34
|
+
parameters:
|
|
35
|
+
- $ref: '#/components/parameters/ExchangeParam'
|
|
36
|
+
requestBody:
|
|
37
|
+
content:
|
|
38
|
+
application/json:
|
|
39
|
+
schema:
|
|
40
|
+
title: LoadMarketsRequest
|
|
41
|
+
type: object
|
|
42
|
+
properties:
|
|
43
|
+
args:
|
|
44
|
+
type: array
|
|
45
|
+
maxItems: 1
|
|
46
|
+
items:
|
|
47
|
+
type: boolean
|
|
48
|
+
credentials:
|
|
49
|
+
$ref: '#/components/schemas/ExchangeCredentials'
|
|
50
|
+
responses:
|
|
51
|
+
'200':
|
|
52
|
+
description: Load Markets response
|
|
53
|
+
content:
|
|
54
|
+
application/json:
|
|
55
|
+
schema:
|
|
56
|
+
allOf:
|
|
57
|
+
- $ref: '#/components/schemas/BaseResponse'
|
|
58
|
+
- type: object
|
|
59
|
+
properties:
|
|
60
|
+
data:
|
|
61
|
+
type: object
|
|
62
|
+
additionalProperties:
|
|
63
|
+
$ref: '#/components/schemas/UnifiedMarket'
|
|
64
|
+
description: >-
|
|
65
|
+
Load and cache all markets from the exchange into `this.markets` and `this.marketsBySlug`. Subsequent calls
|
|
66
|
+
return the cached result without hitting the API again. This is the correct way to paginate or iterate over
|
|
67
|
+
markets without drift. Because `fetchMarkets()` always hits the API, repeated calls with different `offset`
|
|
68
|
+
values may return inconsistent results if the exchange reorders or adds markets between requests. Use
|
|
69
|
+
`loadMarkets()` once to get a stable snapshot, then paginate over `Object.values(exchange.markets)` locally.
|
|
70
|
+
'/api/{exchange}/fetchMarkets':
|
|
71
|
+
get:
|
|
72
|
+
summary: Fetch Markets
|
|
73
|
+
operationId: fetchMarkets
|
|
74
|
+
parameters:
|
|
75
|
+
- $ref: '#/components/parameters/ExchangeParam'
|
|
76
|
+
- in: query
|
|
77
|
+
name: limit
|
|
78
|
+
required: false
|
|
79
|
+
schema:
|
|
80
|
+
type: integer
|
|
81
|
+
default: 10000
|
|
82
|
+
- in: query
|
|
83
|
+
name: offset
|
|
84
|
+
required: false
|
|
85
|
+
schema:
|
|
86
|
+
type: integer
|
|
87
|
+
- in: query
|
|
88
|
+
name: sort
|
|
89
|
+
required: false
|
|
90
|
+
schema:
|
|
91
|
+
type: string
|
|
92
|
+
enum:
|
|
93
|
+
- volume
|
|
94
|
+
- liquidity
|
|
95
|
+
- newest
|
|
96
|
+
- in: query
|
|
97
|
+
name: status
|
|
98
|
+
required: false
|
|
99
|
+
schema:
|
|
100
|
+
type: string
|
|
101
|
+
enum:
|
|
102
|
+
- active
|
|
103
|
+
- closed
|
|
104
|
+
- all
|
|
105
|
+
description: 'Filter by market status (default: active)'
|
|
106
|
+
description: 'Filter by market status (default: active)'
|
|
107
|
+
- in: query
|
|
108
|
+
name: searchIn
|
|
109
|
+
required: false
|
|
110
|
+
schema:
|
|
111
|
+
type: string
|
|
112
|
+
enum:
|
|
113
|
+
- title
|
|
114
|
+
- description
|
|
115
|
+
- both
|
|
116
|
+
- in: query
|
|
117
|
+
name: query
|
|
118
|
+
required: false
|
|
119
|
+
schema:
|
|
120
|
+
type: string
|
|
121
|
+
- in: query
|
|
122
|
+
name: slug
|
|
123
|
+
required: false
|
|
124
|
+
schema:
|
|
125
|
+
type: string
|
|
126
|
+
- in: query
|
|
127
|
+
name: marketId
|
|
128
|
+
required: false
|
|
129
|
+
schema:
|
|
130
|
+
type: string
|
|
131
|
+
description: Direct lookup by market ID
|
|
132
|
+
description: Direct lookup by market ID
|
|
133
|
+
- in: query
|
|
134
|
+
name: outcomeId
|
|
135
|
+
required: false
|
|
136
|
+
schema:
|
|
137
|
+
type: string
|
|
138
|
+
description: Reverse lookup -- find market containing this outcome
|
|
139
|
+
description: Reverse lookup -- find market containing this outcome
|
|
140
|
+
- in: query
|
|
141
|
+
name: eventId
|
|
142
|
+
required: false
|
|
143
|
+
schema:
|
|
144
|
+
type: string
|
|
145
|
+
description: Find markets belonging to an event
|
|
146
|
+
description: Find markets belonging to an event
|
|
147
|
+
- in: query
|
|
148
|
+
name: page
|
|
149
|
+
required: false
|
|
150
|
+
schema:
|
|
151
|
+
type: integer
|
|
152
|
+
- in: query
|
|
153
|
+
name: similarityThreshold
|
|
154
|
+
required: false
|
|
155
|
+
schema:
|
|
156
|
+
type: number
|
|
157
|
+
responses:
|
|
158
|
+
'200':
|
|
159
|
+
description: Fetch Markets response
|
|
160
|
+
content:
|
|
161
|
+
application/json:
|
|
162
|
+
schema:
|
|
163
|
+
allOf:
|
|
164
|
+
- $ref: '#/components/schemas/BaseResponse'
|
|
165
|
+
- type: object
|
|
166
|
+
properties:
|
|
167
|
+
data:
|
|
168
|
+
type: array
|
|
169
|
+
items:
|
|
170
|
+
$ref: '#/components/schemas/UnifiedMarket'
|
|
171
|
+
description: >-
|
|
172
|
+
Fetch markets with optional filtering, search, or slug lookup. Always hits the exchange API — results reflect
|
|
173
|
+
the live state at the time of the call.
|
|
174
|
+
'/api/{exchange}/fetchMarketsPaginated':
|
|
175
|
+
get:
|
|
176
|
+
summary: Fetch Markets Paginated
|
|
177
|
+
operationId: fetchMarketsPaginated
|
|
178
|
+
parameters:
|
|
179
|
+
- $ref: '#/components/parameters/ExchangeParam'
|
|
180
|
+
- in: query
|
|
181
|
+
name: limit
|
|
182
|
+
required: false
|
|
183
|
+
schema:
|
|
184
|
+
type: number
|
|
185
|
+
- in: query
|
|
186
|
+
name: cursor
|
|
187
|
+
required: false
|
|
188
|
+
schema:
|
|
189
|
+
type: string
|
|
190
|
+
responses:
|
|
191
|
+
'200':
|
|
192
|
+
description: Fetch Markets Paginated response
|
|
193
|
+
content:
|
|
194
|
+
application/json:
|
|
195
|
+
schema:
|
|
196
|
+
allOf:
|
|
197
|
+
- $ref: '#/components/schemas/BaseResponse'
|
|
198
|
+
- type: object
|
|
199
|
+
properties:
|
|
200
|
+
data:
|
|
201
|
+
$ref: '#/components/schemas/PaginatedMarketsResult'
|
|
202
|
+
description: >-
|
|
203
|
+
Fetch markets with cursor-based pagination backed by a stable in-memory snapshot. On the first call (or when no
|
|
204
|
+
cursor is supplied), fetches all markets once and caches them. Subsequent calls with a cursor returned from a
|
|
205
|
+
previous call slice directly from the cached snapshot — no additional API calls are made. The snapshot is
|
|
206
|
+
invalidated after `snapshotTTL` ms (configured via `ExchangeOptions` in the constructor). A request using a
|
|
207
|
+
cursor from an expired snapshot throws `'Cursor has expired'`.
|
|
208
|
+
'/api/{exchange}/fetchEvents':
|
|
209
|
+
get:
|
|
210
|
+
summary: Fetch Events
|
|
211
|
+
operationId: fetchEvents
|
|
212
|
+
parameters:
|
|
213
|
+
- $ref: '#/components/parameters/ExchangeParam'
|
|
214
|
+
- in: query
|
|
215
|
+
name: query
|
|
216
|
+
required: false
|
|
217
|
+
schema:
|
|
218
|
+
type: string
|
|
219
|
+
- in: query
|
|
220
|
+
name: sort
|
|
221
|
+
required: false
|
|
222
|
+
schema:
|
|
223
|
+
type: string
|
|
224
|
+
enum:
|
|
225
|
+
- volume
|
|
226
|
+
- liquidity
|
|
227
|
+
- newest
|
|
228
|
+
- in: query
|
|
229
|
+
name: limit
|
|
230
|
+
required: false
|
|
231
|
+
schema:
|
|
232
|
+
type: integer
|
|
233
|
+
default: 10000
|
|
234
|
+
- in: query
|
|
235
|
+
name: offset
|
|
236
|
+
required: false
|
|
237
|
+
schema:
|
|
238
|
+
type: integer
|
|
239
|
+
- in: query
|
|
240
|
+
name: status
|
|
241
|
+
required: false
|
|
242
|
+
schema:
|
|
243
|
+
type: string
|
|
244
|
+
enum:
|
|
245
|
+
- active
|
|
246
|
+
- closed
|
|
247
|
+
- all
|
|
248
|
+
description: 'Filter by event status (default: active)'
|
|
249
|
+
description: 'Filter by event status (default: active)'
|
|
250
|
+
- in: query
|
|
251
|
+
name: searchIn
|
|
252
|
+
required: false
|
|
253
|
+
schema:
|
|
254
|
+
type: string
|
|
255
|
+
enum:
|
|
256
|
+
- title
|
|
257
|
+
- description
|
|
258
|
+
- both
|
|
259
|
+
- in: query
|
|
260
|
+
name: eventId
|
|
261
|
+
required: false
|
|
262
|
+
schema:
|
|
263
|
+
type: string
|
|
264
|
+
description: Direct lookup by event ID
|
|
265
|
+
description: Direct lookup by event ID
|
|
266
|
+
- in: query
|
|
267
|
+
name: slug
|
|
268
|
+
required: false
|
|
269
|
+
schema:
|
|
270
|
+
type: string
|
|
271
|
+
description: Lookup by event slug
|
|
272
|
+
description: Lookup by event slug
|
|
273
|
+
responses:
|
|
274
|
+
'200':
|
|
275
|
+
description: Fetch Events response
|
|
276
|
+
content:
|
|
277
|
+
application/json:
|
|
278
|
+
schema:
|
|
279
|
+
allOf:
|
|
280
|
+
- $ref: '#/components/schemas/BaseResponse'
|
|
281
|
+
- type: object
|
|
282
|
+
properties:
|
|
283
|
+
data:
|
|
284
|
+
type: array
|
|
285
|
+
items:
|
|
286
|
+
$ref: '#/components/schemas/UnifiedEvent'
|
|
287
|
+
description: >-
|
|
288
|
+
Fetch events with optional keyword search. Events group related markets together (e.g., "Who will be Fed Chair?"
|
|
289
|
+
contains multiple candidate markets).
|
|
290
|
+
'/api/{exchange}/fetchMarket':
|
|
291
|
+
get:
|
|
292
|
+
summary: Fetch Market
|
|
293
|
+
operationId: fetchMarket
|
|
294
|
+
parameters:
|
|
295
|
+
- $ref: '#/components/parameters/ExchangeParam'
|
|
296
|
+
- in: query
|
|
297
|
+
name: limit
|
|
298
|
+
required: false
|
|
299
|
+
schema:
|
|
300
|
+
type: integer
|
|
301
|
+
default: 10000
|
|
302
|
+
- in: query
|
|
303
|
+
name: offset
|
|
304
|
+
required: false
|
|
305
|
+
schema:
|
|
306
|
+
type: integer
|
|
307
|
+
- in: query
|
|
308
|
+
name: sort
|
|
309
|
+
required: false
|
|
310
|
+
schema:
|
|
311
|
+
type: string
|
|
312
|
+
enum:
|
|
313
|
+
- volume
|
|
314
|
+
- liquidity
|
|
315
|
+
- newest
|
|
316
|
+
- in: query
|
|
317
|
+
name: status
|
|
318
|
+
required: false
|
|
319
|
+
schema:
|
|
320
|
+
type: string
|
|
321
|
+
enum:
|
|
322
|
+
- active
|
|
323
|
+
- closed
|
|
324
|
+
- all
|
|
325
|
+
description: 'Filter by market status (default: active)'
|
|
326
|
+
description: 'Filter by market status (default: active)'
|
|
327
|
+
- in: query
|
|
328
|
+
name: searchIn
|
|
329
|
+
required: false
|
|
330
|
+
schema:
|
|
331
|
+
type: string
|
|
332
|
+
enum:
|
|
333
|
+
- title
|
|
334
|
+
- description
|
|
335
|
+
- both
|
|
336
|
+
- in: query
|
|
337
|
+
name: query
|
|
338
|
+
required: false
|
|
339
|
+
schema:
|
|
340
|
+
type: string
|
|
341
|
+
- in: query
|
|
342
|
+
name: slug
|
|
343
|
+
required: false
|
|
344
|
+
schema:
|
|
345
|
+
type: string
|
|
346
|
+
- in: query
|
|
347
|
+
name: marketId
|
|
348
|
+
required: false
|
|
349
|
+
schema:
|
|
350
|
+
type: string
|
|
351
|
+
description: Direct lookup by market ID
|
|
352
|
+
description: Direct lookup by market ID
|
|
353
|
+
- in: query
|
|
354
|
+
name: outcomeId
|
|
355
|
+
required: false
|
|
356
|
+
schema:
|
|
357
|
+
type: string
|
|
358
|
+
description: Reverse lookup -- find market containing this outcome
|
|
359
|
+
description: Reverse lookup -- find market containing this outcome
|
|
360
|
+
- in: query
|
|
361
|
+
name: eventId
|
|
362
|
+
required: false
|
|
363
|
+
schema:
|
|
364
|
+
type: string
|
|
365
|
+
description: Find markets belonging to an event
|
|
366
|
+
description: Find markets belonging to an event
|
|
367
|
+
- in: query
|
|
368
|
+
name: page
|
|
369
|
+
required: false
|
|
370
|
+
schema:
|
|
371
|
+
type: integer
|
|
372
|
+
- in: query
|
|
373
|
+
name: similarityThreshold
|
|
374
|
+
required: false
|
|
375
|
+
schema:
|
|
376
|
+
type: number
|
|
377
|
+
responses:
|
|
378
|
+
'200':
|
|
379
|
+
description: Fetch Market response
|
|
380
|
+
content:
|
|
381
|
+
application/json:
|
|
382
|
+
schema:
|
|
383
|
+
allOf:
|
|
384
|
+
- $ref: '#/components/schemas/BaseResponse'
|
|
385
|
+
- type: object
|
|
386
|
+
properties:
|
|
387
|
+
data:
|
|
388
|
+
$ref: '#/components/schemas/UnifiedMarket'
|
|
389
|
+
description: >-
|
|
390
|
+
Fetch a single market by lookup parameters. Convenience wrapper around fetchMarkets() that returns a single
|
|
391
|
+
result or throws MarketNotFound.
|
|
392
|
+
'/api/{exchange}/fetchEvent':
|
|
393
|
+
get:
|
|
394
|
+
summary: Fetch Event
|
|
395
|
+
operationId: fetchEvent
|
|
396
|
+
parameters:
|
|
397
|
+
- $ref: '#/components/parameters/ExchangeParam'
|
|
398
|
+
- in: query
|
|
399
|
+
name: query
|
|
400
|
+
required: false
|
|
401
|
+
schema:
|
|
402
|
+
type: string
|
|
403
|
+
- in: query
|
|
404
|
+
name: sort
|
|
405
|
+
required: false
|
|
406
|
+
schema:
|
|
407
|
+
type: string
|
|
408
|
+
enum:
|
|
409
|
+
- volume
|
|
410
|
+
- liquidity
|
|
411
|
+
- newest
|
|
412
|
+
- in: query
|
|
413
|
+
name: limit
|
|
414
|
+
required: false
|
|
415
|
+
schema:
|
|
416
|
+
type: integer
|
|
417
|
+
default: 10000
|
|
418
|
+
- in: query
|
|
419
|
+
name: offset
|
|
420
|
+
required: false
|
|
421
|
+
schema:
|
|
422
|
+
type: integer
|
|
423
|
+
- in: query
|
|
424
|
+
name: status
|
|
425
|
+
required: false
|
|
426
|
+
schema:
|
|
427
|
+
type: string
|
|
428
|
+
enum:
|
|
429
|
+
- active
|
|
430
|
+
- closed
|
|
431
|
+
- all
|
|
432
|
+
description: 'Filter by event status (default: active)'
|
|
433
|
+
description: 'Filter by event status (default: active)'
|
|
434
|
+
- in: query
|
|
435
|
+
name: searchIn
|
|
436
|
+
required: false
|
|
437
|
+
schema:
|
|
438
|
+
type: string
|
|
439
|
+
enum:
|
|
440
|
+
- title
|
|
441
|
+
- description
|
|
442
|
+
- both
|
|
443
|
+
- in: query
|
|
444
|
+
name: eventId
|
|
445
|
+
required: false
|
|
446
|
+
schema:
|
|
447
|
+
type: string
|
|
448
|
+
description: Direct lookup by event ID
|
|
449
|
+
description: Direct lookup by event ID
|
|
450
|
+
- in: query
|
|
451
|
+
name: slug
|
|
452
|
+
required: false
|
|
453
|
+
schema:
|
|
454
|
+
type: string
|
|
455
|
+
description: Lookup by event slug
|
|
456
|
+
description: Lookup by event slug
|
|
457
|
+
responses:
|
|
458
|
+
'200':
|
|
459
|
+
description: Fetch Event response
|
|
460
|
+
content:
|
|
461
|
+
application/json:
|
|
462
|
+
schema:
|
|
463
|
+
allOf:
|
|
464
|
+
- $ref: '#/components/schemas/BaseResponse'
|
|
465
|
+
- type: object
|
|
466
|
+
properties:
|
|
467
|
+
data:
|
|
468
|
+
$ref: '#/components/schemas/UnifiedEvent'
|
|
469
|
+
description: >-
|
|
470
|
+
Fetch a single event by lookup parameters. Convenience wrapper around fetchEvents() that returns a single result
|
|
471
|
+
or throws EventNotFound.
|
|
472
|
+
'/api/{exchange}/fetchOHLCV':
|
|
473
|
+
get:
|
|
474
|
+
summary: Fetch O H L C V
|
|
475
|
+
operationId: fetchOHLCV
|
|
476
|
+
parameters:
|
|
477
|
+
- $ref: '#/components/parameters/ExchangeParam'
|
|
478
|
+
- in: query
|
|
479
|
+
name: id
|
|
480
|
+
required: true
|
|
481
|
+
schema:
|
|
482
|
+
type: string
|
|
483
|
+
- in: query
|
|
484
|
+
name: params
|
|
485
|
+
required: true
|
|
486
|
+
schema:
|
|
487
|
+
type: string
|
|
488
|
+
responses:
|
|
489
|
+
'200':
|
|
490
|
+
description: Fetch O H L C V response
|
|
491
|
+
content:
|
|
492
|
+
application/json:
|
|
493
|
+
schema:
|
|
494
|
+
allOf:
|
|
495
|
+
- $ref: '#/components/schemas/BaseResponse'
|
|
496
|
+
- type: object
|
|
497
|
+
properties:
|
|
498
|
+
data:
|
|
499
|
+
type: array
|
|
500
|
+
items:
|
|
501
|
+
$ref: '#/components/schemas/PriceCandle'
|
|
502
|
+
description: Fetch historical OHLCV (candlestick) price data for a specific market outcome.
|
|
503
|
+
'/api/{exchange}/fetchOrderBook':
|
|
504
|
+
get:
|
|
505
|
+
summary: Fetch Order Book
|
|
506
|
+
operationId: fetchOrderBook
|
|
507
|
+
parameters:
|
|
508
|
+
- $ref: '#/components/parameters/ExchangeParam'
|
|
509
|
+
- in: query
|
|
510
|
+
name: id
|
|
511
|
+
required: true
|
|
512
|
+
schema:
|
|
513
|
+
type: string
|
|
514
|
+
responses:
|
|
515
|
+
'200':
|
|
516
|
+
description: Fetch Order Book response
|
|
517
|
+
content:
|
|
518
|
+
application/json:
|
|
519
|
+
schema:
|
|
520
|
+
allOf:
|
|
521
|
+
- $ref: '#/components/schemas/BaseResponse'
|
|
522
|
+
- type: object
|
|
523
|
+
properties:
|
|
524
|
+
data:
|
|
525
|
+
$ref: '#/components/schemas/OrderBook'
|
|
526
|
+
description: >-
|
|
527
|
+
Fetch the current order book (bids/asks) for a specific outcome. Essential for calculating spread, depth, and
|
|
528
|
+
execution prices.
|
|
529
|
+
'/api/{exchange}/fetchTrades':
|
|
530
|
+
get:
|
|
531
|
+
summary: Fetch Trades
|
|
532
|
+
operationId: fetchTrades
|
|
533
|
+
parameters:
|
|
534
|
+
- $ref: '#/components/parameters/ExchangeParam'
|
|
535
|
+
- in: query
|
|
536
|
+
name: id
|
|
537
|
+
required: true
|
|
538
|
+
schema:
|
|
539
|
+
type: string
|
|
540
|
+
- in: query
|
|
541
|
+
name: params
|
|
542
|
+
required: true
|
|
543
|
+
schema:
|
|
544
|
+
type: string
|
|
545
|
+
responses:
|
|
546
|
+
'200':
|
|
547
|
+
description: Fetch Trades response
|
|
548
|
+
content:
|
|
549
|
+
application/json:
|
|
550
|
+
schema:
|
|
551
|
+
allOf:
|
|
552
|
+
- $ref: '#/components/schemas/BaseResponse'
|
|
553
|
+
- type: object
|
|
554
|
+
properties:
|
|
555
|
+
data:
|
|
556
|
+
type: array
|
|
557
|
+
items:
|
|
558
|
+
$ref: '#/components/schemas/Trade'
|
|
559
|
+
description: Fetch raw trade history for a specific outcome.
|
|
560
|
+
'/api/{exchange}/createOrder':
|
|
561
|
+
post:
|
|
562
|
+
summary: Create Order
|
|
563
|
+
operationId: createOrder
|
|
564
|
+
parameters:
|
|
565
|
+
- $ref: '#/components/parameters/ExchangeParam'
|
|
566
|
+
requestBody:
|
|
567
|
+
content:
|
|
568
|
+
application/json:
|
|
569
|
+
schema:
|
|
570
|
+
title: CreateOrderRequest
|
|
571
|
+
type: object
|
|
572
|
+
properties:
|
|
573
|
+
args:
|
|
574
|
+
type: array
|
|
575
|
+
maxItems: 1
|
|
576
|
+
items:
|
|
577
|
+
$ref: '#/components/schemas/CreateOrderParams'
|
|
578
|
+
minItems: 1
|
|
579
|
+
credentials:
|
|
580
|
+
$ref: '#/components/schemas/ExchangeCredentials'
|
|
581
|
+
required:
|
|
582
|
+
- args
|
|
583
|
+
responses:
|
|
584
|
+
'200':
|
|
585
|
+
description: Create Order response
|
|
586
|
+
content:
|
|
587
|
+
application/json:
|
|
588
|
+
schema:
|
|
589
|
+
allOf:
|
|
590
|
+
- $ref: '#/components/schemas/BaseResponse'
|
|
591
|
+
- type: object
|
|
592
|
+
properties:
|
|
593
|
+
data:
|
|
594
|
+
$ref: '#/components/schemas/Order'
|
|
595
|
+
description: Place a new order on the exchange.
|
|
596
|
+
'/api/{exchange}/buildOrder':
|
|
597
|
+
post:
|
|
598
|
+
summary: Build Order
|
|
599
|
+
operationId: buildOrder
|
|
600
|
+
parameters:
|
|
601
|
+
- $ref: '#/components/parameters/ExchangeParam'
|
|
602
|
+
requestBody:
|
|
603
|
+
content:
|
|
604
|
+
application/json:
|
|
605
|
+
schema:
|
|
606
|
+
title: BuildOrderRequest
|
|
607
|
+
type: object
|
|
608
|
+
properties:
|
|
609
|
+
args:
|
|
610
|
+
type: array
|
|
611
|
+
maxItems: 1
|
|
612
|
+
items:
|
|
613
|
+
$ref: '#/components/schemas/CreateOrderParams'
|
|
614
|
+
minItems: 1
|
|
615
|
+
credentials:
|
|
616
|
+
$ref: '#/components/schemas/ExchangeCredentials'
|
|
617
|
+
required:
|
|
618
|
+
- args
|
|
619
|
+
responses:
|
|
620
|
+
'200':
|
|
621
|
+
description: Build Order response
|
|
622
|
+
content:
|
|
623
|
+
application/json:
|
|
624
|
+
schema:
|
|
625
|
+
allOf:
|
|
626
|
+
- $ref: '#/components/schemas/BaseResponse'
|
|
627
|
+
- type: object
|
|
628
|
+
properties:
|
|
629
|
+
data:
|
|
630
|
+
$ref: '#/components/schemas/BuiltOrder'
|
|
631
|
+
description: >-
|
|
632
|
+
Build an order payload without submitting it to the exchange. Returns the exchange-native signed order or
|
|
633
|
+
request body for inspection, forwarding through a middleware layer, or deferred submission via submitOrder().
|
|
634
|
+
'/api/{exchange}/submitOrder':
|
|
635
|
+
post:
|
|
636
|
+
summary: Submit Order
|
|
637
|
+
operationId: submitOrder
|
|
638
|
+
parameters:
|
|
639
|
+
- $ref: '#/components/parameters/ExchangeParam'
|
|
640
|
+
requestBody:
|
|
641
|
+
content:
|
|
642
|
+
application/json:
|
|
643
|
+
schema:
|
|
644
|
+
title: SubmitOrderRequest
|
|
645
|
+
type: object
|
|
646
|
+
properties:
|
|
647
|
+
args:
|
|
648
|
+
type: array
|
|
649
|
+
maxItems: 1
|
|
650
|
+
items:
|
|
651
|
+
$ref: '#/components/schemas/BuiltOrder'
|
|
652
|
+
minItems: 1
|
|
653
|
+
credentials:
|
|
654
|
+
$ref: '#/components/schemas/ExchangeCredentials'
|
|
655
|
+
required:
|
|
656
|
+
- args
|
|
657
|
+
responses:
|
|
658
|
+
'200':
|
|
659
|
+
description: Submit Order response
|
|
660
|
+
content:
|
|
661
|
+
application/json:
|
|
662
|
+
schema:
|
|
663
|
+
allOf:
|
|
664
|
+
- $ref: '#/components/schemas/BaseResponse'
|
|
665
|
+
- type: object
|
|
666
|
+
properties:
|
|
667
|
+
data:
|
|
668
|
+
$ref: '#/components/schemas/Order'
|
|
669
|
+
description: Submit a pre-built order returned by buildOrder().
|
|
670
|
+
'/api/{exchange}/cancelOrder':
|
|
671
|
+
post:
|
|
672
|
+
summary: Cancel Order
|
|
673
|
+
operationId: cancelOrder
|
|
674
|
+
parameters:
|
|
675
|
+
- $ref: '#/components/parameters/ExchangeParam'
|
|
676
|
+
requestBody:
|
|
677
|
+
content:
|
|
678
|
+
application/json:
|
|
679
|
+
schema:
|
|
680
|
+
title: CancelOrderRequest
|
|
681
|
+
type: object
|
|
682
|
+
properties:
|
|
683
|
+
args:
|
|
684
|
+
type: array
|
|
685
|
+
maxItems: 1
|
|
686
|
+
items:
|
|
687
|
+
type: string
|
|
688
|
+
minItems: 1
|
|
689
|
+
credentials:
|
|
690
|
+
$ref: '#/components/schemas/ExchangeCredentials'
|
|
691
|
+
required:
|
|
692
|
+
- args
|
|
693
|
+
responses:
|
|
694
|
+
'200':
|
|
695
|
+
description: Cancel Order response
|
|
696
|
+
content:
|
|
697
|
+
application/json:
|
|
698
|
+
schema:
|
|
699
|
+
allOf:
|
|
700
|
+
- $ref: '#/components/schemas/BaseResponse'
|
|
701
|
+
- type: object
|
|
702
|
+
properties:
|
|
703
|
+
data:
|
|
704
|
+
$ref: '#/components/schemas/Order'
|
|
705
|
+
description: Cancel an existing open order.
|
|
706
|
+
'/api/{exchange}/fetchOrder':
|
|
707
|
+
get:
|
|
708
|
+
summary: Fetch Order
|
|
709
|
+
operationId: fetchOrder
|
|
710
|
+
parameters:
|
|
711
|
+
- $ref: '#/components/parameters/ExchangeParam'
|
|
712
|
+
- in: query
|
|
713
|
+
name: orderId
|
|
714
|
+
required: true
|
|
715
|
+
schema:
|
|
716
|
+
type: string
|
|
717
|
+
responses:
|
|
718
|
+
'200':
|
|
719
|
+
description: Fetch Order response
|
|
720
|
+
content:
|
|
721
|
+
application/json:
|
|
722
|
+
schema:
|
|
723
|
+
allOf:
|
|
724
|
+
- $ref: '#/components/schemas/BaseResponse'
|
|
725
|
+
- type: object
|
|
726
|
+
properties:
|
|
727
|
+
data:
|
|
728
|
+
$ref: '#/components/schemas/Order'
|
|
729
|
+
description: Fetch a specific order by ID.
|
|
730
|
+
'/api/{exchange}/fetchOpenOrders':
|
|
731
|
+
get:
|
|
732
|
+
summary: Fetch Open Orders
|
|
733
|
+
operationId: fetchOpenOrders
|
|
734
|
+
parameters:
|
|
735
|
+
- $ref: '#/components/parameters/ExchangeParam'
|
|
736
|
+
- in: query
|
|
737
|
+
name: marketId
|
|
738
|
+
required: false
|
|
739
|
+
schema:
|
|
740
|
+
type: string
|
|
741
|
+
responses:
|
|
742
|
+
'200':
|
|
743
|
+
description: Fetch Open Orders response
|
|
744
|
+
content:
|
|
745
|
+
application/json:
|
|
746
|
+
schema:
|
|
747
|
+
allOf:
|
|
748
|
+
- $ref: '#/components/schemas/BaseResponse'
|
|
749
|
+
- type: object
|
|
750
|
+
properties:
|
|
751
|
+
data:
|
|
752
|
+
type: array
|
|
753
|
+
items:
|
|
754
|
+
$ref: '#/components/schemas/Order'
|
|
755
|
+
description: 'Fetch all open orders, optionally filtered by market.'
|
|
756
|
+
'/api/{exchange}/fetchMyTrades':
|
|
757
|
+
get:
|
|
758
|
+
summary: Fetch My Trades
|
|
759
|
+
operationId: fetchMyTrades
|
|
760
|
+
parameters:
|
|
761
|
+
- $ref: '#/components/parameters/ExchangeParam'
|
|
762
|
+
- in: query
|
|
763
|
+
name: outcomeId
|
|
764
|
+
required: false
|
|
765
|
+
schema:
|
|
766
|
+
type: string
|
|
767
|
+
description: Filter to specific outcome/ticker
|
|
768
|
+
description: Filter to specific outcome/ticker
|
|
769
|
+
- in: query
|
|
770
|
+
name: marketId
|
|
771
|
+
required: false
|
|
772
|
+
schema:
|
|
773
|
+
type: string
|
|
774
|
+
description: Filter to specific market
|
|
775
|
+
description: Filter to specific market
|
|
776
|
+
- in: query
|
|
777
|
+
name: since
|
|
778
|
+
required: false
|
|
779
|
+
schema:
|
|
780
|
+
type: string
|
|
781
|
+
format: date-time
|
|
782
|
+
- in: query
|
|
783
|
+
name: until
|
|
784
|
+
required: false
|
|
785
|
+
schema:
|
|
786
|
+
type: string
|
|
787
|
+
format: date-time
|
|
788
|
+
- in: query
|
|
789
|
+
name: limit
|
|
790
|
+
required: false
|
|
791
|
+
schema:
|
|
792
|
+
type: integer
|
|
793
|
+
- in: query
|
|
794
|
+
name: cursor
|
|
795
|
+
required: false
|
|
796
|
+
schema:
|
|
797
|
+
type: string
|
|
798
|
+
description: For Kalshi cursor pagination
|
|
799
|
+
description: For Kalshi cursor pagination
|
|
800
|
+
responses:
|
|
801
|
+
'200':
|
|
802
|
+
description: Fetch My Trades response
|
|
803
|
+
content:
|
|
804
|
+
application/json:
|
|
805
|
+
schema:
|
|
806
|
+
allOf:
|
|
807
|
+
- $ref: '#/components/schemas/BaseResponse'
|
|
808
|
+
- type: object
|
|
809
|
+
properties:
|
|
810
|
+
data:
|
|
811
|
+
type: array
|
|
812
|
+
items:
|
|
813
|
+
$ref: '#/components/schemas/UserTrade'
|
|
814
|
+
'/api/{exchange}/fetchClosedOrders':
|
|
815
|
+
get:
|
|
816
|
+
summary: Fetch Closed Orders
|
|
817
|
+
operationId: fetchClosedOrders
|
|
818
|
+
parameters:
|
|
819
|
+
- $ref: '#/components/parameters/ExchangeParam'
|
|
820
|
+
- in: query
|
|
821
|
+
name: marketId
|
|
822
|
+
required: false
|
|
823
|
+
schema:
|
|
824
|
+
type: string
|
|
825
|
+
description: Required for Limitless (slug)
|
|
826
|
+
description: Required for Limitless (slug)
|
|
827
|
+
- in: query
|
|
828
|
+
name: since
|
|
829
|
+
required: false
|
|
830
|
+
schema:
|
|
831
|
+
type: string
|
|
832
|
+
format: date-time
|
|
833
|
+
- in: query
|
|
834
|
+
name: until
|
|
835
|
+
required: false
|
|
836
|
+
schema:
|
|
837
|
+
type: string
|
|
838
|
+
format: date-time
|
|
839
|
+
- in: query
|
|
840
|
+
name: limit
|
|
841
|
+
required: false
|
|
842
|
+
schema:
|
|
843
|
+
type: integer
|
|
844
|
+
- in: query
|
|
845
|
+
name: cursor
|
|
846
|
+
required: false
|
|
847
|
+
schema:
|
|
848
|
+
type: string
|
|
849
|
+
responses:
|
|
850
|
+
'200':
|
|
851
|
+
description: Fetch Closed Orders response
|
|
852
|
+
content:
|
|
853
|
+
application/json:
|
|
854
|
+
schema:
|
|
855
|
+
allOf:
|
|
856
|
+
- $ref: '#/components/schemas/BaseResponse'
|
|
857
|
+
- type: object
|
|
858
|
+
properties:
|
|
859
|
+
data:
|
|
860
|
+
type: array
|
|
861
|
+
items:
|
|
862
|
+
$ref: '#/components/schemas/Order'
|
|
863
|
+
'/api/{exchange}/fetchAllOrders':
|
|
864
|
+
get:
|
|
865
|
+
summary: Fetch All Orders
|
|
866
|
+
operationId: fetchAllOrders
|
|
867
|
+
parameters:
|
|
868
|
+
- $ref: '#/components/parameters/ExchangeParam'
|
|
869
|
+
- in: query
|
|
870
|
+
name: marketId
|
|
871
|
+
required: false
|
|
872
|
+
schema:
|
|
873
|
+
type: string
|
|
874
|
+
description: Required for Limitless (slug)
|
|
875
|
+
description: Required for Limitless (slug)
|
|
876
|
+
- in: query
|
|
877
|
+
name: since
|
|
878
|
+
required: false
|
|
879
|
+
schema:
|
|
880
|
+
type: string
|
|
881
|
+
format: date-time
|
|
882
|
+
- in: query
|
|
883
|
+
name: until
|
|
884
|
+
required: false
|
|
885
|
+
schema:
|
|
886
|
+
type: string
|
|
887
|
+
format: date-time
|
|
888
|
+
- in: query
|
|
889
|
+
name: limit
|
|
890
|
+
required: false
|
|
891
|
+
schema:
|
|
892
|
+
type: integer
|
|
893
|
+
- in: query
|
|
894
|
+
name: cursor
|
|
895
|
+
required: false
|
|
896
|
+
schema:
|
|
897
|
+
type: string
|
|
898
|
+
responses:
|
|
899
|
+
'200':
|
|
900
|
+
description: Fetch All Orders response
|
|
901
|
+
content:
|
|
902
|
+
application/json:
|
|
903
|
+
schema:
|
|
904
|
+
allOf:
|
|
905
|
+
- $ref: '#/components/schemas/BaseResponse'
|
|
906
|
+
- type: object
|
|
907
|
+
properties:
|
|
908
|
+
data:
|
|
909
|
+
type: array
|
|
910
|
+
items:
|
|
911
|
+
$ref: '#/components/schemas/Order'
|
|
912
|
+
'/api/{exchange}/fetchPositions':
|
|
913
|
+
get:
|
|
914
|
+
summary: Fetch Positions
|
|
915
|
+
operationId: fetchPositions
|
|
916
|
+
parameters:
|
|
917
|
+
- $ref: '#/components/parameters/ExchangeParam'
|
|
918
|
+
- in: query
|
|
919
|
+
name: address
|
|
920
|
+
required: false
|
|
921
|
+
schema:
|
|
922
|
+
type: string
|
|
923
|
+
responses:
|
|
924
|
+
'200':
|
|
925
|
+
description: Fetch Positions response
|
|
926
|
+
content:
|
|
927
|
+
application/json:
|
|
928
|
+
schema:
|
|
929
|
+
allOf:
|
|
930
|
+
- $ref: '#/components/schemas/BaseResponse'
|
|
931
|
+
- type: object
|
|
932
|
+
properties:
|
|
933
|
+
data:
|
|
934
|
+
type: array
|
|
935
|
+
items:
|
|
936
|
+
$ref: '#/components/schemas/Position'
|
|
937
|
+
description: Fetch current user positions across all markets.
|
|
938
|
+
'/api/{exchange}/fetchBalance':
|
|
939
|
+
get:
|
|
940
|
+
summary: Fetch Balance
|
|
941
|
+
operationId: fetchBalance
|
|
942
|
+
parameters:
|
|
943
|
+
- $ref: '#/components/parameters/ExchangeParam'
|
|
944
|
+
- in: query
|
|
945
|
+
name: address
|
|
946
|
+
required: false
|
|
947
|
+
schema:
|
|
948
|
+
type: string
|
|
949
|
+
responses:
|
|
950
|
+
'200':
|
|
951
|
+
description: Fetch Balance response
|
|
952
|
+
content:
|
|
953
|
+
application/json:
|
|
954
|
+
schema:
|
|
955
|
+
allOf:
|
|
956
|
+
- $ref: '#/components/schemas/BaseResponse'
|
|
957
|
+
- type: object
|
|
958
|
+
properties:
|
|
959
|
+
data:
|
|
960
|
+
type: array
|
|
961
|
+
items:
|
|
962
|
+
$ref: '#/components/schemas/Balance'
|
|
963
|
+
description: Fetch account balances.
|
|
964
|
+
'/api/{exchange}/getExecutionPrice':
|
|
965
|
+
post:
|
|
966
|
+
summary: Get Execution Price
|
|
967
|
+
operationId: getExecutionPrice
|
|
968
|
+
parameters:
|
|
969
|
+
- $ref: '#/components/parameters/ExchangeParam'
|
|
970
|
+
requestBody:
|
|
971
|
+
content:
|
|
972
|
+
application/json:
|
|
973
|
+
schema:
|
|
974
|
+
title: GetExecutionPriceRequest
|
|
975
|
+
type: object
|
|
976
|
+
properties:
|
|
977
|
+
args:
|
|
978
|
+
type: array
|
|
979
|
+
minItems: 3
|
|
980
|
+
maxItems: 3
|
|
981
|
+
items:
|
|
982
|
+
oneOf:
|
|
983
|
+
- $ref: '#/components/schemas/OrderBook'
|
|
984
|
+
- type: string
|
|
985
|
+
enum:
|
|
986
|
+
- buy
|
|
987
|
+
- sell
|
|
988
|
+
- type: number
|
|
989
|
+
credentials:
|
|
990
|
+
$ref: '#/components/schemas/ExchangeCredentials'
|
|
991
|
+
required:
|
|
992
|
+
- args
|
|
993
|
+
responses:
|
|
994
|
+
'200':
|
|
995
|
+
description: Get Execution Price response
|
|
996
|
+
content:
|
|
997
|
+
application/json:
|
|
998
|
+
schema:
|
|
999
|
+
allOf:
|
|
1000
|
+
- $ref: '#/components/schemas/BaseResponse'
|
|
1001
|
+
- type: object
|
|
1002
|
+
properties:
|
|
1003
|
+
data:
|
|
1004
|
+
type: number
|
|
1005
|
+
description: >-
|
|
1006
|
+
Calculate the volume-weighted average execution price for a given order size. Returns 0 if the order cannot be
|
|
1007
|
+
fully filled.
|
|
1008
|
+
'/api/{exchange}/getExecutionPriceDetailed':
|
|
1009
|
+
post:
|
|
1010
|
+
summary: Get Execution Price Detailed
|
|
1011
|
+
operationId: getExecutionPriceDetailed
|
|
1012
|
+
parameters:
|
|
1013
|
+
- $ref: '#/components/parameters/ExchangeParam'
|
|
1014
|
+
requestBody:
|
|
1015
|
+
content:
|
|
1016
|
+
application/json:
|
|
1017
|
+
schema:
|
|
1018
|
+
title: GetExecutionPriceDetailedRequest
|
|
1019
|
+
type: object
|
|
1020
|
+
properties:
|
|
1021
|
+
args:
|
|
1022
|
+
type: array
|
|
1023
|
+
minItems: 3
|
|
1024
|
+
maxItems: 3
|
|
1025
|
+
items:
|
|
1026
|
+
oneOf:
|
|
1027
|
+
- $ref: '#/components/schemas/OrderBook'
|
|
1028
|
+
- type: string
|
|
1029
|
+
enum:
|
|
1030
|
+
- buy
|
|
1031
|
+
- sell
|
|
1032
|
+
- type: number
|
|
1033
|
+
credentials:
|
|
1034
|
+
$ref: '#/components/schemas/ExchangeCredentials'
|
|
1035
|
+
required:
|
|
1036
|
+
- args
|
|
1037
|
+
responses:
|
|
1038
|
+
'200':
|
|
1039
|
+
description: Get Execution Price Detailed response
|
|
1040
|
+
content:
|
|
1041
|
+
application/json:
|
|
1042
|
+
schema:
|
|
1043
|
+
allOf:
|
|
1044
|
+
- $ref: '#/components/schemas/BaseResponse'
|
|
1045
|
+
- type: object
|
|
1046
|
+
properties:
|
|
1047
|
+
data:
|
|
1048
|
+
$ref: '#/components/schemas/ExecutionPriceResult'
|
|
1049
|
+
description: Calculate detailed execution price information including partial fill data.
|
|
1050
|
+
'/api/{exchange}/filterMarkets':
|
|
1051
|
+
post:
|
|
1052
|
+
summary: Filter Markets
|
|
1053
|
+
operationId: filterMarkets
|
|
1054
|
+
parameters:
|
|
1055
|
+
- $ref: '#/components/parameters/ExchangeParam'
|
|
1056
|
+
requestBody:
|
|
1057
|
+
content:
|
|
1058
|
+
application/json:
|
|
1059
|
+
schema:
|
|
1060
|
+
title: FilterMarketsRequest
|
|
1061
|
+
type: object
|
|
1062
|
+
properties:
|
|
1063
|
+
args:
|
|
1064
|
+
type: array
|
|
1065
|
+
minItems: 2
|
|
1066
|
+
maxItems: 2
|
|
1067
|
+
items:
|
|
1068
|
+
oneOf:
|
|
1069
|
+
- type: array
|
|
1070
|
+
items:
|
|
1071
|
+
$ref: '#/components/schemas/UnifiedMarket'
|
|
1072
|
+
- oneOf:
|
|
1073
|
+
- type: string
|
|
1074
|
+
- type: object
|
|
1075
|
+
- type: object
|
|
1076
|
+
credentials:
|
|
1077
|
+
$ref: '#/components/schemas/ExchangeCredentials'
|
|
1078
|
+
required:
|
|
1079
|
+
- args
|
|
1080
|
+
responses:
|
|
1081
|
+
'200':
|
|
1082
|
+
description: Filter Markets response
|
|
1083
|
+
content:
|
|
1084
|
+
application/json:
|
|
1085
|
+
schema:
|
|
1086
|
+
allOf:
|
|
1087
|
+
- $ref: '#/components/schemas/BaseResponse'
|
|
1088
|
+
- type: object
|
|
1089
|
+
properties:
|
|
1090
|
+
data:
|
|
1091
|
+
type: array
|
|
1092
|
+
items:
|
|
1093
|
+
$ref: '#/components/schemas/UnifiedMarket'
|
|
1094
|
+
description: >-
|
|
1095
|
+
Filter a list of markets by criteria. Can filter by string query, structured criteria object, or custom filter
|
|
1096
|
+
function.
|
|
1097
|
+
'/api/{exchange}/filterEvents':
|
|
1098
|
+
post:
|
|
1099
|
+
summary: Filter Events
|
|
1100
|
+
operationId: filterEvents
|
|
1101
|
+
parameters:
|
|
1102
|
+
- $ref: '#/components/parameters/ExchangeParam'
|
|
1103
|
+
requestBody:
|
|
1104
|
+
content:
|
|
1105
|
+
application/json:
|
|
1106
|
+
schema:
|
|
1107
|
+
title: FilterEventsRequest
|
|
1108
|
+
type: object
|
|
1109
|
+
properties:
|
|
1110
|
+
args:
|
|
1111
|
+
type: array
|
|
1112
|
+
minItems: 2
|
|
1113
|
+
maxItems: 2
|
|
1114
|
+
items:
|
|
1115
|
+
oneOf:
|
|
1116
|
+
- type: array
|
|
1117
|
+
items:
|
|
1118
|
+
$ref: '#/components/schemas/UnifiedEvent'
|
|
1119
|
+
- oneOf:
|
|
1120
|
+
- type: string
|
|
1121
|
+
- type: object
|
|
1122
|
+
- type: object
|
|
1123
|
+
credentials:
|
|
1124
|
+
$ref: '#/components/schemas/ExchangeCredentials'
|
|
1125
|
+
required:
|
|
1126
|
+
- args
|
|
1127
|
+
responses:
|
|
1128
|
+
'200':
|
|
1129
|
+
description: Filter Events response
|
|
1130
|
+
content:
|
|
1131
|
+
application/json:
|
|
1132
|
+
schema:
|
|
1133
|
+
allOf:
|
|
1134
|
+
- $ref: '#/components/schemas/BaseResponse'
|
|
1135
|
+
- type: object
|
|
1136
|
+
properties:
|
|
1137
|
+
data:
|
|
1138
|
+
type: array
|
|
1139
|
+
items:
|
|
1140
|
+
$ref: '#/components/schemas/UnifiedEvent'
|
|
1141
|
+
description: >-
|
|
1142
|
+
Filter a list of events by criteria. Can filter by string query, structured criteria object, or custom filter
|
|
1143
|
+
function.
|
|
1144
|
+
'/api/{exchange}/watchOrderBook':
|
|
1145
|
+
post:
|
|
1146
|
+
summary: Watch Order Book
|
|
1147
|
+
operationId: watchOrderBook
|
|
1148
|
+
parameters:
|
|
1149
|
+
- $ref: '#/components/parameters/ExchangeParam'
|
|
1150
|
+
requestBody:
|
|
1151
|
+
content:
|
|
1152
|
+
application/json:
|
|
1153
|
+
schema:
|
|
1154
|
+
title: WatchOrderBookRequest
|
|
1155
|
+
type: object
|
|
1156
|
+
properties:
|
|
1157
|
+
args:
|
|
1158
|
+
type: array
|
|
1159
|
+
minItems: 1
|
|
1160
|
+
maxItems: 2
|
|
1161
|
+
items:
|
|
1162
|
+
oneOf:
|
|
1163
|
+
- type: string
|
|
1164
|
+
- type: number
|
|
1165
|
+
credentials:
|
|
1166
|
+
$ref: '#/components/schemas/ExchangeCredentials'
|
|
1167
|
+
required:
|
|
1168
|
+
- args
|
|
1169
|
+
responses:
|
|
1170
|
+
'200':
|
|
1171
|
+
description: Watch Order Book response
|
|
1172
|
+
content:
|
|
1173
|
+
application/json:
|
|
1174
|
+
schema:
|
|
1175
|
+
allOf:
|
|
1176
|
+
- $ref: '#/components/schemas/BaseResponse'
|
|
1177
|
+
- type: object
|
|
1178
|
+
properties:
|
|
1179
|
+
data:
|
|
1180
|
+
$ref: '#/components/schemas/OrderBook'
|
|
1181
|
+
description: >-
|
|
1182
|
+
Watch order book updates in real-time via WebSocket. Returns a promise that resolves with the next order book
|
|
1183
|
+
update. Call repeatedly in a loop to stream updates (CCXT Pro pattern).
|
|
1184
|
+
'/api/{exchange}/watchTrades':
|
|
1185
|
+
post:
|
|
1186
|
+
summary: Watch Trades
|
|
1187
|
+
operationId: watchTrades
|
|
1188
|
+
parameters:
|
|
1189
|
+
- $ref: '#/components/parameters/ExchangeParam'
|
|
1190
|
+
requestBody:
|
|
1191
|
+
content:
|
|
1192
|
+
application/json:
|
|
1193
|
+
schema:
|
|
1194
|
+
title: WatchTradesRequest
|
|
1195
|
+
type: object
|
|
1196
|
+
properties:
|
|
1197
|
+
args:
|
|
1198
|
+
type: array
|
|
1199
|
+
minItems: 1
|
|
1200
|
+
maxItems: 4
|
|
1201
|
+
items:
|
|
1202
|
+
oneOf:
|
|
1203
|
+
- type: string
|
|
1204
|
+
- type: string
|
|
1205
|
+
- type: number
|
|
1206
|
+
- type: number
|
|
1207
|
+
credentials:
|
|
1208
|
+
$ref: '#/components/schemas/ExchangeCredentials'
|
|
1209
|
+
required:
|
|
1210
|
+
- args
|
|
1211
|
+
responses:
|
|
1212
|
+
'200':
|
|
1213
|
+
description: Watch Trades response
|
|
1214
|
+
content:
|
|
1215
|
+
application/json:
|
|
1216
|
+
schema:
|
|
1217
|
+
allOf:
|
|
1218
|
+
- $ref: '#/components/schemas/BaseResponse'
|
|
1219
|
+
- type: object
|
|
1220
|
+
properties:
|
|
1221
|
+
data:
|
|
1222
|
+
type: array
|
|
1223
|
+
items:
|
|
1224
|
+
$ref: '#/components/schemas/Trade'
|
|
1225
|
+
description: >-
|
|
1226
|
+
Watch trade executions in real-time via WebSocket. Returns a promise that resolves with the next trade(s). Call
|
|
1227
|
+
repeatedly in a loop to stream updates (CCXT Pro pattern).
|
|
1228
|
+
'/api/{exchange}/watchAddress':
|
|
1229
|
+
post:
|
|
1230
|
+
summary: Watch Address
|
|
1231
|
+
operationId: watchAddress
|
|
1232
|
+
parameters:
|
|
1233
|
+
- $ref: '#/components/parameters/ExchangeParam'
|
|
1234
|
+
requestBody:
|
|
1235
|
+
content:
|
|
1236
|
+
application/json:
|
|
1237
|
+
schema:
|
|
1238
|
+
title: WatchAddressRequest
|
|
1239
|
+
type: object
|
|
1240
|
+
properties:
|
|
1241
|
+
args:
|
|
1242
|
+
type: array
|
|
1243
|
+
minItems: 1
|
|
1244
|
+
maxItems: 2
|
|
1245
|
+
items:
|
|
1246
|
+
oneOf:
|
|
1247
|
+
- type: string
|
|
1248
|
+
- type: array
|
|
1249
|
+
items:
|
|
1250
|
+
type: object
|
|
1251
|
+
credentials:
|
|
1252
|
+
$ref: '#/components/schemas/ExchangeCredentials'
|
|
1253
|
+
required:
|
|
1254
|
+
- args
|
|
1255
|
+
responses:
|
|
1256
|
+
'200':
|
|
1257
|
+
description: Watch Address response
|
|
1258
|
+
content:
|
|
1259
|
+
application/json:
|
|
1260
|
+
schema:
|
|
1261
|
+
allOf:
|
|
1262
|
+
- $ref: '#/components/schemas/BaseResponse'
|
|
1263
|
+
- type: object
|
|
1264
|
+
properties:
|
|
1265
|
+
data:
|
|
1266
|
+
type: object
|
|
1267
|
+
description: >-
|
|
1268
|
+
Stream activity for a public wallet address Returns a promise that resolves with the next activity snapshot
|
|
1269
|
+
whenever a change is detected. Call repeatedly in a loop to stream updates (CCXT Pro pattern).
|
|
1270
|
+
'/api/{exchange}/unwatchAddress':
|
|
1271
|
+
post:
|
|
1272
|
+
summary: Unwatch Address
|
|
1273
|
+
operationId: unwatchAddress
|
|
1274
|
+
parameters:
|
|
1275
|
+
- $ref: '#/components/parameters/ExchangeParam'
|
|
1276
|
+
requestBody:
|
|
1277
|
+
content:
|
|
1278
|
+
application/json:
|
|
1279
|
+
schema:
|
|
1280
|
+
title: UnwatchAddressRequest
|
|
1281
|
+
type: object
|
|
1282
|
+
properties:
|
|
1283
|
+
args:
|
|
1284
|
+
type: array
|
|
1285
|
+
maxItems: 1
|
|
1286
|
+
items:
|
|
1287
|
+
type: string
|
|
1288
|
+
minItems: 1
|
|
1289
|
+
credentials:
|
|
1290
|
+
$ref: '#/components/schemas/ExchangeCredentials'
|
|
1291
|
+
required:
|
|
1292
|
+
- args
|
|
1293
|
+
responses:
|
|
1294
|
+
'200':
|
|
1295
|
+
description: Unwatch Address response
|
|
1296
|
+
content:
|
|
1297
|
+
application/json:
|
|
1298
|
+
schema:
|
|
1299
|
+
$ref: '#/components/schemas/BaseResponse'
|
|
1300
|
+
description: Stop watching a previously registered wallet address and release its resource updates.
|
|
1301
|
+
'/api/{exchange}/close':
|
|
1302
|
+
post:
|
|
1303
|
+
summary: Close
|
|
1304
|
+
operationId: close
|
|
1305
|
+
parameters:
|
|
1306
|
+
- $ref: '#/components/parameters/ExchangeParam'
|
|
1307
|
+
requestBody:
|
|
1308
|
+
content:
|
|
1309
|
+
application/json:
|
|
1310
|
+
schema:
|
|
1311
|
+
title: CloseRequest
|
|
1312
|
+
type: object
|
|
1313
|
+
properties:
|
|
1314
|
+
args:
|
|
1315
|
+
type: array
|
|
1316
|
+
maxItems: 0
|
|
1317
|
+
items: {}
|
|
1318
|
+
credentials:
|
|
1319
|
+
$ref: '#/components/schemas/ExchangeCredentials'
|
|
1320
|
+
responses:
|
|
1321
|
+
'200':
|
|
1322
|
+
description: Close response
|
|
1323
|
+
content:
|
|
1324
|
+
application/json:
|
|
1325
|
+
schema:
|
|
1326
|
+
$ref: '#/components/schemas/BaseResponse'
|
|
1327
|
+
description: >-
|
|
1328
|
+
Close all WebSocket connections and clean up resources. Call this when you're done streaming to properly release
|
|
1329
|
+
connections.
|
|
1330
|
+
components:
|
|
1331
|
+
parameters:
|
|
1332
|
+
ExchangeParam:
|
|
1333
|
+
in: path
|
|
1334
|
+
name: exchange
|
|
1335
|
+
schema:
|
|
1336
|
+
type: string
|
|
1337
|
+
enum:
|
|
1338
|
+
- polymarket
|
|
1339
|
+
- kalshi
|
|
1340
|
+
- kalshi-demo
|
|
1341
|
+
- limitless
|
|
1342
|
+
- probable
|
|
1343
|
+
- baozi
|
|
1344
|
+
- myriad
|
|
1345
|
+
- opinion
|
|
1346
|
+
- metaculus
|
|
1347
|
+
- smarkets
|
|
1348
|
+
- polymarket_us
|
|
1349
|
+
required: true
|
|
1350
|
+
description: The prediction market exchange to target.
|
|
1351
|
+
schemas:
|
|
1352
|
+
BaseResponse:
|
|
1353
|
+
type: object
|
|
1354
|
+
properties:
|
|
1355
|
+
success:
|
|
1356
|
+
type: boolean
|
|
1357
|
+
example: true
|
|
1358
|
+
error:
|
|
1359
|
+
$ref: '#/components/schemas/ErrorDetail'
|
|
1360
|
+
ErrorDetail:
|
|
1361
|
+
type: object
|
|
1362
|
+
properties:
|
|
1363
|
+
message:
|
|
1364
|
+
type: string
|
|
1365
|
+
BaseRequest:
|
|
1366
|
+
type: object
|
|
1367
|
+
description: Base request structure with optional credentials
|
|
1368
|
+
properties:
|
|
1369
|
+
credentials:
|
|
1370
|
+
$ref: '#/components/schemas/ExchangeCredentials'
|
|
1371
|
+
ErrorResponse:
|
|
1372
|
+
type: object
|
|
1373
|
+
properties:
|
|
1374
|
+
success:
|
|
1375
|
+
type: boolean
|
|
1376
|
+
example: false
|
|
1377
|
+
error:
|
|
1378
|
+
$ref: '#/components/schemas/ErrorDetail'
|
|
1379
|
+
UnifiedMarket:
|
|
1380
|
+
type: object
|
|
1381
|
+
properties:
|
|
1382
|
+
marketId:
|
|
1383
|
+
type: string
|
|
1384
|
+
description: The unique identifier for this market
|
|
1385
|
+
title:
|
|
1386
|
+
type: string
|
|
1387
|
+
description:
|
|
1388
|
+
type: string
|
|
1389
|
+
slug:
|
|
1390
|
+
type: string
|
|
1391
|
+
outcomes:
|
|
1392
|
+
type: array
|
|
1393
|
+
items:
|
|
1394
|
+
$ref: '#/components/schemas/MarketOutcome'
|
|
1395
|
+
eventId:
|
|
1396
|
+
type: string
|
|
1397
|
+
description: Link to parent event
|
|
1398
|
+
resolutionDate:
|
|
1399
|
+
type: string
|
|
1400
|
+
format: date-time
|
|
1401
|
+
volume24h:
|
|
1402
|
+
type: number
|
|
1403
|
+
volume:
|
|
1404
|
+
type: number
|
|
1405
|
+
liquidity:
|
|
1406
|
+
type: number
|
|
1407
|
+
openInterest:
|
|
1408
|
+
type: number
|
|
1409
|
+
url:
|
|
1410
|
+
type: string
|
|
1411
|
+
image:
|
|
1412
|
+
type: string
|
|
1413
|
+
category:
|
|
1414
|
+
type: string
|
|
1415
|
+
tags:
|
|
1416
|
+
type: array
|
|
1417
|
+
items:
|
|
1418
|
+
type: string
|
|
1419
|
+
tickSize:
|
|
1420
|
+
type: number
|
|
1421
|
+
description: 'Minimum price increment (e.g., 0.01, 0.001)'
|
|
1422
|
+
status:
|
|
1423
|
+
type: string
|
|
1424
|
+
description: 'Venue-native lifecycle status (e.g. ''active'', ''closed'', ''archived'').'
|
|
1425
|
+
contractAddress:
|
|
1426
|
+
type: string
|
|
1427
|
+
description: 'On-chain contract / condition identifier where applicable (Polymarket conditionId, etc.).'
|
|
1428
|
+
'yes':
|
|
1429
|
+
$ref: '#/components/schemas/MarketOutcome'
|
|
1430
|
+
'no':
|
|
1431
|
+
$ref: '#/components/schemas/MarketOutcome'
|
|
1432
|
+
up:
|
|
1433
|
+
$ref: '#/components/schemas/MarketOutcome'
|
|
1434
|
+
down:
|
|
1435
|
+
$ref: '#/components/schemas/MarketOutcome'
|
|
1436
|
+
MarketOutcome:
|
|
1437
|
+
type: object
|
|
1438
|
+
properties:
|
|
1439
|
+
outcomeId:
|
|
1440
|
+
type: string
|
|
1441
|
+
description: 'Outcome ID for trading operations (CLOB Token ID for Polymarket, Market Ticker for Kalshi)'
|
|
1442
|
+
marketId:
|
|
1443
|
+
type: string
|
|
1444
|
+
description: The market this outcome belongs to (set automatically)
|
|
1445
|
+
label:
|
|
1446
|
+
type: string
|
|
1447
|
+
price:
|
|
1448
|
+
type: number
|
|
1449
|
+
priceChange24h:
|
|
1450
|
+
type: number
|
|
1451
|
+
metadata:
|
|
1452
|
+
type: object
|
|
1453
|
+
additionalProperties: true
|
|
1454
|
+
description: 'Exchange-specific metadata (e.g., clobTokenId for Polymarket)'
|
|
1455
|
+
UnifiedEvent:
|
|
1456
|
+
type: object
|
|
1457
|
+
description: 'A grouped collection of related markets (e.g., "Who will be Fed Chair?" contains multiple candidate markets)'
|
|
1458
|
+
properties:
|
|
1459
|
+
id:
|
|
1460
|
+
type: string
|
|
1461
|
+
title:
|
|
1462
|
+
type: string
|
|
1463
|
+
description:
|
|
1464
|
+
type: string
|
|
1465
|
+
slug:
|
|
1466
|
+
type: string
|
|
1467
|
+
markets:
|
|
1468
|
+
type: array
|
|
1469
|
+
items:
|
|
1470
|
+
$ref: '#/components/schemas/UnifiedMarket'
|
|
1471
|
+
volume24h:
|
|
1472
|
+
type: number
|
|
1473
|
+
volume:
|
|
1474
|
+
type: number
|
|
1475
|
+
description: Total / Lifetime volume (sum across markets; undefined if no market provides it)
|
|
1476
|
+
url:
|
|
1477
|
+
type: string
|
|
1478
|
+
image:
|
|
1479
|
+
type: string
|
|
1480
|
+
category:
|
|
1481
|
+
type: string
|
|
1482
|
+
tags:
|
|
1483
|
+
type: array
|
|
1484
|
+
items:
|
|
1485
|
+
type: string
|
|
1486
|
+
PriceCandle:
|
|
1487
|
+
type: object
|
|
1488
|
+
properties:
|
|
1489
|
+
timestamp:
|
|
1490
|
+
type: integer
|
|
1491
|
+
open:
|
|
1492
|
+
type: number
|
|
1493
|
+
high:
|
|
1494
|
+
type: number
|
|
1495
|
+
low:
|
|
1496
|
+
type: number
|
|
1497
|
+
close:
|
|
1498
|
+
type: number
|
|
1499
|
+
volume:
|
|
1500
|
+
type: number
|
|
1501
|
+
OrderBook:
|
|
1502
|
+
type: object
|
|
1503
|
+
properties:
|
|
1504
|
+
bids:
|
|
1505
|
+
type: array
|
|
1506
|
+
items:
|
|
1507
|
+
$ref: '#/components/schemas/OrderLevel'
|
|
1508
|
+
asks:
|
|
1509
|
+
type: array
|
|
1510
|
+
items:
|
|
1511
|
+
$ref: '#/components/schemas/OrderLevel'
|
|
1512
|
+
timestamp:
|
|
1513
|
+
type: integer
|
|
1514
|
+
OrderLevel:
|
|
1515
|
+
type: object
|
|
1516
|
+
properties:
|
|
1517
|
+
price:
|
|
1518
|
+
type: number
|
|
1519
|
+
size:
|
|
1520
|
+
type: number
|
|
1521
|
+
Trade:
|
|
1522
|
+
type: object
|
|
1523
|
+
properties:
|
|
1524
|
+
id:
|
|
1525
|
+
type: string
|
|
1526
|
+
price:
|
|
1527
|
+
type: number
|
|
1528
|
+
amount:
|
|
1529
|
+
type: number
|
|
1530
|
+
side:
|
|
1531
|
+
type: string
|
|
1532
|
+
enum:
|
|
1533
|
+
- buy
|
|
1534
|
+
- sell
|
|
1535
|
+
- unknown
|
|
1536
|
+
timestamp:
|
|
1537
|
+
type: integer
|
|
1538
|
+
UserTrade:
|
|
1539
|
+
type: object
|
|
1540
|
+
properties:
|
|
1541
|
+
id:
|
|
1542
|
+
type: string
|
|
1543
|
+
price:
|
|
1544
|
+
type: number
|
|
1545
|
+
amount:
|
|
1546
|
+
type: number
|
|
1547
|
+
side:
|
|
1548
|
+
type: string
|
|
1549
|
+
enum:
|
|
1550
|
+
- buy
|
|
1551
|
+
- sell
|
|
1552
|
+
- unknown
|
|
1553
|
+
timestamp:
|
|
1554
|
+
type: integer
|
|
1555
|
+
orderId:
|
|
1556
|
+
type: string
|
|
1557
|
+
outcomeId:
|
|
1558
|
+
type: string
|
|
1559
|
+
marketId:
|
|
1560
|
+
type: string
|
|
1561
|
+
Order:
|
|
1562
|
+
type: object
|
|
1563
|
+
properties:
|
|
1564
|
+
id:
|
|
1565
|
+
type: string
|
|
1566
|
+
marketId:
|
|
1567
|
+
type: string
|
|
1568
|
+
outcomeId:
|
|
1569
|
+
type: string
|
|
1570
|
+
side:
|
|
1571
|
+
type: string
|
|
1572
|
+
enum:
|
|
1573
|
+
- buy
|
|
1574
|
+
- sell
|
|
1575
|
+
type:
|
|
1576
|
+
type: string
|
|
1577
|
+
enum:
|
|
1578
|
+
- limit
|
|
1579
|
+
- market
|
|
1580
|
+
price:
|
|
1581
|
+
type: number
|
|
1582
|
+
amount:
|
|
1583
|
+
type: number
|
|
1584
|
+
status:
|
|
1585
|
+
type: string
|
|
1586
|
+
enum:
|
|
1587
|
+
- pending
|
|
1588
|
+
- open
|
|
1589
|
+
- filled
|
|
1590
|
+
- cancelled
|
|
1591
|
+
- rejected
|
|
1592
|
+
filled:
|
|
1593
|
+
type: number
|
|
1594
|
+
remaining:
|
|
1595
|
+
type: number
|
|
1596
|
+
timestamp:
|
|
1597
|
+
type: integer
|
|
1598
|
+
fee:
|
|
1599
|
+
type: number
|
|
1600
|
+
Position:
|
|
1601
|
+
type: object
|
|
1602
|
+
properties:
|
|
1603
|
+
marketId:
|
|
1604
|
+
type: string
|
|
1605
|
+
outcomeId:
|
|
1606
|
+
type: string
|
|
1607
|
+
outcomeLabel:
|
|
1608
|
+
type: string
|
|
1609
|
+
size:
|
|
1610
|
+
type: number
|
|
1611
|
+
entryPrice:
|
|
1612
|
+
type: number
|
|
1613
|
+
currentPrice:
|
|
1614
|
+
type: number
|
|
1615
|
+
unrealizedPnL:
|
|
1616
|
+
type: number
|
|
1617
|
+
realizedPnL:
|
|
1618
|
+
type: number
|
|
1619
|
+
Balance:
|
|
1620
|
+
type: object
|
|
1621
|
+
properties:
|
|
1622
|
+
currency:
|
|
1623
|
+
type: string
|
|
1624
|
+
total:
|
|
1625
|
+
type: number
|
|
1626
|
+
available:
|
|
1627
|
+
type: number
|
|
1628
|
+
locked:
|
|
1629
|
+
type: number
|
|
1630
|
+
ExecutionPriceResult:
|
|
1631
|
+
type: object
|
|
1632
|
+
properties:
|
|
1633
|
+
price:
|
|
1634
|
+
type: number
|
|
1635
|
+
filledAmount:
|
|
1636
|
+
type: number
|
|
1637
|
+
fullyFilled:
|
|
1638
|
+
type: boolean
|
|
1639
|
+
PaginatedMarketsResult:
|
|
1640
|
+
type: object
|
|
1641
|
+
properties:
|
|
1642
|
+
data:
|
|
1643
|
+
type: array
|
|
1644
|
+
items:
|
|
1645
|
+
$ref: '#/components/schemas/UnifiedMarket'
|
|
1646
|
+
total:
|
|
1647
|
+
type: integer
|
|
1648
|
+
nextCursor:
|
|
1649
|
+
type: string
|
|
1650
|
+
MarketFilterParams:
|
|
1651
|
+
type: object
|
|
1652
|
+
properties:
|
|
1653
|
+
limit:
|
|
1654
|
+
type: integer
|
|
1655
|
+
default: 10000
|
|
1656
|
+
offset:
|
|
1657
|
+
type: integer
|
|
1658
|
+
sort:
|
|
1659
|
+
type: string
|
|
1660
|
+
enum:
|
|
1661
|
+
- volume
|
|
1662
|
+
- liquidity
|
|
1663
|
+
- newest
|
|
1664
|
+
status:
|
|
1665
|
+
type: string
|
|
1666
|
+
enum:
|
|
1667
|
+
- active
|
|
1668
|
+
- closed
|
|
1669
|
+
- all
|
|
1670
|
+
description: 'Filter by market status (default: active)'
|
|
1671
|
+
searchIn:
|
|
1672
|
+
type: string
|
|
1673
|
+
enum:
|
|
1674
|
+
- title
|
|
1675
|
+
- description
|
|
1676
|
+
- both
|
|
1677
|
+
query:
|
|
1678
|
+
type: string
|
|
1679
|
+
slug:
|
|
1680
|
+
type: string
|
|
1681
|
+
marketId:
|
|
1682
|
+
type: string
|
|
1683
|
+
description: Direct lookup by market ID
|
|
1684
|
+
outcomeId:
|
|
1685
|
+
type: string
|
|
1686
|
+
description: Reverse lookup -- find market containing this outcome
|
|
1687
|
+
eventId:
|
|
1688
|
+
type: string
|
|
1689
|
+
description: Find markets belonging to an event
|
|
1690
|
+
page:
|
|
1691
|
+
type: integer
|
|
1692
|
+
similarityThreshold:
|
|
1693
|
+
type: number
|
|
1694
|
+
EventFetchParams:
|
|
1695
|
+
type: object
|
|
1696
|
+
properties:
|
|
1697
|
+
query:
|
|
1698
|
+
type: string
|
|
1699
|
+
sort:
|
|
1700
|
+
type: string
|
|
1701
|
+
enum:
|
|
1702
|
+
- volume
|
|
1703
|
+
- liquidity
|
|
1704
|
+
- newest
|
|
1705
|
+
limit:
|
|
1706
|
+
type: integer
|
|
1707
|
+
default: 10000
|
|
1708
|
+
offset:
|
|
1709
|
+
type: integer
|
|
1710
|
+
status:
|
|
1711
|
+
type: string
|
|
1712
|
+
enum:
|
|
1713
|
+
- active
|
|
1714
|
+
- closed
|
|
1715
|
+
- all
|
|
1716
|
+
description: 'Filter by event status (default: active)'
|
|
1717
|
+
searchIn:
|
|
1718
|
+
type: string
|
|
1719
|
+
enum:
|
|
1720
|
+
- title
|
|
1721
|
+
- description
|
|
1722
|
+
- both
|
|
1723
|
+
eventId:
|
|
1724
|
+
type: string
|
|
1725
|
+
description: Direct lookup by event ID
|
|
1726
|
+
slug:
|
|
1727
|
+
type: string
|
|
1728
|
+
description: Lookup by event slug
|
|
1729
|
+
HistoryFilterParams:
|
|
1730
|
+
type: object
|
|
1731
|
+
description: Deprecated - use OHLCVParams or TradesParams instead. Resolution is optional for backward compatibility.
|
|
1732
|
+
properties:
|
|
1733
|
+
resolution:
|
|
1734
|
+
type: string
|
|
1735
|
+
enum:
|
|
1736
|
+
- 1m
|
|
1737
|
+
- 5m
|
|
1738
|
+
- 15m
|
|
1739
|
+
- 1h
|
|
1740
|
+
- 6h
|
|
1741
|
+
- 1d
|
|
1742
|
+
start:
|
|
1743
|
+
type: string
|
|
1744
|
+
format: date-time
|
|
1745
|
+
end:
|
|
1746
|
+
type: string
|
|
1747
|
+
format: date-time
|
|
1748
|
+
limit:
|
|
1749
|
+
type: integer
|
|
1750
|
+
OHLCVParams:
|
|
1751
|
+
type: object
|
|
1752
|
+
required:
|
|
1753
|
+
- resolution
|
|
1754
|
+
properties:
|
|
1755
|
+
resolution:
|
|
1756
|
+
type: string
|
|
1757
|
+
enum:
|
|
1758
|
+
- 1m
|
|
1759
|
+
- 5m
|
|
1760
|
+
- 15m
|
|
1761
|
+
- 1h
|
|
1762
|
+
- 6h
|
|
1763
|
+
- 1d
|
|
1764
|
+
description: Candle interval for aggregation
|
|
1765
|
+
start:
|
|
1766
|
+
type: string
|
|
1767
|
+
format: date-time
|
|
1768
|
+
end:
|
|
1769
|
+
type: string
|
|
1770
|
+
format: date-time
|
|
1771
|
+
limit:
|
|
1772
|
+
type: integer
|
|
1773
|
+
TradesParams:
|
|
1774
|
+
type: object
|
|
1775
|
+
description: Parameters for fetching trade history. No resolution parameter - trades are discrete events.
|
|
1776
|
+
properties:
|
|
1777
|
+
start:
|
|
1778
|
+
type: string
|
|
1779
|
+
format: date-time
|
|
1780
|
+
end:
|
|
1781
|
+
type: string
|
|
1782
|
+
format: date-time
|
|
1783
|
+
limit:
|
|
1784
|
+
type: integer
|
|
1785
|
+
CreateOrderParams:
|
|
1786
|
+
type: object
|
|
1787
|
+
required:
|
|
1788
|
+
- marketId
|
|
1789
|
+
- outcomeId
|
|
1790
|
+
- side
|
|
1791
|
+
- type
|
|
1792
|
+
- amount
|
|
1793
|
+
properties:
|
|
1794
|
+
marketId:
|
|
1795
|
+
type: string
|
|
1796
|
+
outcomeId:
|
|
1797
|
+
type: string
|
|
1798
|
+
side:
|
|
1799
|
+
type: string
|
|
1800
|
+
enum:
|
|
1801
|
+
- buy
|
|
1802
|
+
- sell
|
|
1803
|
+
type:
|
|
1804
|
+
type: string
|
|
1805
|
+
enum:
|
|
1806
|
+
- limit
|
|
1807
|
+
- market
|
|
1808
|
+
amount:
|
|
1809
|
+
type: number
|
|
1810
|
+
price:
|
|
1811
|
+
type: number
|
|
1812
|
+
fee:
|
|
1813
|
+
type: number
|
|
1814
|
+
tickSize:
|
|
1815
|
+
type: number
|
|
1816
|
+
description: Optional override for Limitless/Polymarket
|
|
1817
|
+
negRisk:
|
|
1818
|
+
type: boolean
|
|
1819
|
+
description: Optional override to skip neg-risk lookup (Polymarket)
|
|
1820
|
+
BuiltOrder:
|
|
1821
|
+
type: object
|
|
1822
|
+
description: 'An order built but not yet submitted, ready for inspection or middleware forwarding'
|
|
1823
|
+
properties:
|
|
1824
|
+
exchange:
|
|
1825
|
+
type: string
|
|
1826
|
+
description: The exchange name this order was built for
|
|
1827
|
+
params:
|
|
1828
|
+
$ref: '#/components/schemas/CreateOrderParams'
|
|
1829
|
+
signedOrder:
|
|
1830
|
+
type: object
|
|
1831
|
+
additionalProperties: true
|
|
1832
|
+
description: 'For CLOB exchanges (Polymarket): the EIP-712 signed order ready to POST'
|
|
1833
|
+
tx:
|
|
1834
|
+
type: object
|
|
1835
|
+
description: 'For on-chain AMM exchanges: the EVM transaction payload (reserved for future use)'
|
|
1836
|
+
properties:
|
|
1837
|
+
to:
|
|
1838
|
+
type: string
|
|
1839
|
+
data:
|
|
1840
|
+
type: string
|
|
1841
|
+
value:
|
|
1842
|
+
type: string
|
|
1843
|
+
chainId:
|
|
1844
|
+
type: integer
|
|
1845
|
+
raw:
|
|
1846
|
+
description: 'The raw, exchange-native payload. Always present.'
|
|
1847
|
+
MyTradesParams:
|
|
1848
|
+
type: object
|
|
1849
|
+
properties:
|
|
1850
|
+
outcomeId:
|
|
1851
|
+
type: string
|
|
1852
|
+
description: Filter to specific outcome/ticker
|
|
1853
|
+
marketId:
|
|
1854
|
+
type: string
|
|
1855
|
+
description: Filter to specific market
|
|
1856
|
+
since:
|
|
1857
|
+
type: string
|
|
1858
|
+
format: date-time
|
|
1859
|
+
until:
|
|
1860
|
+
type: string
|
|
1861
|
+
format: date-time
|
|
1862
|
+
limit:
|
|
1863
|
+
type: integer
|
|
1864
|
+
cursor:
|
|
1865
|
+
type: string
|
|
1866
|
+
description: For Kalshi cursor pagination
|
|
1867
|
+
OrderHistoryParams:
|
|
1868
|
+
type: object
|
|
1869
|
+
properties:
|
|
1870
|
+
marketId:
|
|
1871
|
+
type: string
|
|
1872
|
+
description: Required for Limitless (slug)
|
|
1873
|
+
since:
|
|
1874
|
+
type: string
|
|
1875
|
+
format: date-time
|
|
1876
|
+
until:
|
|
1877
|
+
type: string
|
|
1878
|
+
format: date-time
|
|
1879
|
+
limit:
|
|
1880
|
+
type: integer
|
|
1881
|
+
cursor:
|
|
1882
|
+
type: string
|
|
1883
|
+
ExchangeCredentials:
|
|
1884
|
+
type: object
|
|
1885
|
+
description: Optional authentication credentials for exchange operations
|
|
1886
|
+
properties:
|
|
1887
|
+
apiKey:
|
|
1888
|
+
type: string
|
|
1889
|
+
description: API key for the exchange
|
|
1890
|
+
privateKey:
|
|
1891
|
+
type: string
|
|
1892
|
+
description: Private key for signing transactions
|
|
1893
|
+
apiSecret:
|
|
1894
|
+
type: string
|
|
1895
|
+
description: API secret (if required by exchange)
|
|
1896
|
+
passphrase:
|
|
1897
|
+
type: string
|
|
1898
|
+
description: Passphrase (if required by exchange)
|
|
1899
|
+
funderAddress:
|
|
1900
|
+
type: string
|
|
1901
|
+
description: The address funding the trades (Proxy address)
|
|
1902
|
+
signatureType:
|
|
1903
|
+
oneOf:
|
|
1904
|
+
- type: integer
|
|
1905
|
+
- type: string
|
|
1906
|
+
description: 'Signature type (0=EOA, 1=Poly Proxy, 2=Gnosis Safe, or names like ''gnosis_safe'')'
|