pmxt-core 2.27.2 → 2.27.5

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.
@@ -77,13 +77,14 @@ paths:
77
77
  name: limit
78
78
  required: false
79
79
  schema:
80
- type: integer
81
- default: 10000
80
+ type: number
81
+ description: Maximum number of results to return
82
82
  - in: query
83
83
  name: offset
84
84
  required: false
85
85
  schema:
86
- type: integer
86
+ type: number
87
+ description: Pagination offset — number of results to skip
87
88
  - in: query
88
89
  name: sort
89
90
  required: false
@@ -93,6 +94,7 @@ paths:
93
94
  - volume
94
95
  - liquidity
95
96
  - newest
97
+ description: Sort order for results
96
98
  - in: query
97
99
  name: status
98
100
  required: false
@@ -100,10 +102,10 @@ paths:
100
102
  type: string
101
103
  enum:
102
104
  - active
105
+ - inactive
103
106
  - closed
104
107
  - all
105
- description: 'Filter by market status (default: active)'
106
- description: 'Filter by market status (default: active)'
108
+ description: 'Filter by market status (default: ''active'', ''inactive'' and ''closed'' are interchangeable)'
107
109
  - in: query
108
110
  name: searchIn
109
111
  required: false
@@ -113,47 +115,49 @@ paths:
113
115
  - title
114
116
  - description
115
117
  - both
118
+ description: 'Where to search (default: ''title'')'
116
119
  - in: query
117
120
  name: query
118
121
  required: false
119
122
  schema:
120
123
  type: string
124
+ description: For keyword search
121
125
  - in: query
122
126
  name: slug
123
127
  required: false
124
128
  schema:
125
129
  type: string
130
+ description: For slug/ticker lookup
126
131
  - in: query
127
132
  name: marketId
128
133
  required: false
129
134
  schema:
130
135
  type: string
131
- description: Direct lookup by market ID
132
136
  description: Direct lookup by market ID
133
137
  - in: query
134
138
  name: outcomeId
135
139
  required: false
136
140
  schema:
137
141
  type: string
138
- description: Reverse lookup -- find market containing this outcome
139
142
  description: Reverse lookup -- find market containing this outcome
140
143
  - in: query
141
144
  name: eventId
142
145
  required: false
143
146
  schema:
144
147
  type: string
145
- description: Find markets belonging to an event
146
148
  description: Find markets belonging to an event
147
149
  - in: query
148
150
  name: page
149
151
  required: false
150
152
  schema:
151
- type: integer
153
+ type: number
154
+ description: For pagination (used by Limitless)
152
155
  - in: query
153
156
  name: similarityThreshold
154
157
  required: false
155
158
  schema:
156
159
  type: number
160
+ description: For semantic search (used by Limitless)
157
161
  responses:
158
162
  '200':
159
163
  description: Fetch Markets response
@@ -216,26 +220,29 @@ paths:
216
220
  required: false
217
221
  schema:
218
222
  type: string
223
+ description: For keyword search
219
224
  - in: query
220
- name: sort
225
+ name: limit
221
226
  required: false
222
227
  schema:
223
- type: string
224
- enum:
225
- - volume
226
- - liquidity
227
- - newest
228
+ type: number
229
+ description: Maximum number of results to return
228
230
  - in: query
229
- name: limit
231
+ name: offset
230
232
  required: false
231
233
  schema:
232
- type: integer
233
- default: 10000
234
+ type: number
235
+ description: Pagination offset — number of results to skip
234
236
  - in: query
235
- name: offset
237
+ name: sort
236
238
  required: false
237
239
  schema:
238
- type: integer
240
+ type: string
241
+ enum:
242
+ - volume
243
+ - liquidity
244
+ - newest
245
+ description: Sort order for results
239
246
  - in: query
240
247
  name: status
241
248
  required: false
@@ -243,10 +250,10 @@ paths:
243
250
  type: string
244
251
  enum:
245
252
  - active
253
+ - inactive
246
254
  - closed
247
255
  - all
248
- description: 'Filter by event status (default: active)'
249
- description: 'Filter by event status (default: active)'
256
+ description: 'Filter by event status (default: ''active'', ''inactive'' and ''closed'' are interchangeable)'
250
257
  - in: query
251
258
  name: searchIn
252
259
  required: false
@@ -256,19 +263,18 @@ paths:
256
263
  - title
257
264
  - description
258
265
  - both
266
+ description: 'Where to search (default: ''title'')'
259
267
  - in: query
260
268
  name: eventId
261
269
  required: false
262
270
  schema:
263
271
  type: string
264
- description: Direct lookup by event ID
265
272
  description: Direct lookup by event ID
266
273
  - in: query
267
274
  name: slug
268
275
  required: false
269
276
  schema:
270
277
  type: string
271
- description: Lookup by event slug
272
278
  description: Lookup by event slug
273
279
  responses:
274
280
  '200':
@@ -297,13 +303,14 @@ paths:
297
303
  name: limit
298
304
  required: false
299
305
  schema:
300
- type: integer
301
- default: 10000
306
+ type: number
307
+ description: Maximum number of results to return
302
308
  - in: query
303
309
  name: offset
304
310
  required: false
305
311
  schema:
306
- type: integer
312
+ type: number
313
+ description: Pagination offset — number of results to skip
307
314
  - in: query
308
315
  name: sort
309
316
  required: false
@@ -313,6 +320,7 @@ paths:
313
320
  - volume
314
321
  - liquidity
315
322
  - newest
323
+ description: Sort order for results
316
324
  - in: query
317
325
  name: status
318
326
  required: false
@@ -320,10 +328,10 @@ paths:
320
328
  type: string
321
329
  enum:
322
330
  - active
331
+ - inactive
323
332
  - closed
324
333
  - all
325
- description: 'Filter by market status (default: active)'
326
- description: 'Filter by market status (default: active)'
334
+ description: 'Filter by market status (default: ''active'', ''inactive'' and ''closed'' are interchangeable)'
327
335
  - in: query
328
336
  name: searchIn
329
337
  required: false
@@ -333,47 +341,49 @@ paths:
333
341
  - title
334
342
  - description
335
343
  - both
344
+ description: 'Where to search (default: ''title'')'
336
345
  - in: query
337
346
  name: query
338
347
  required: false
339
348
  schema:
340
349
  type: string
350
+ description: For keyword search
341
351
  - in: query
342
352
  name: slug
343
353
  required: false
344
354
  schema:
345
355
  type: string
356
+ description: For slug/ticker lookup
346
357
  - in: query
347
358
  name: marketId
348
359
  required: false
349
360
  schema:
350
361
  type: string
351
- description: Direct lookup by market ID
352
362
  description: Direct lookup by market ID
353
363
  - in: query
354
364
  name: outcomeId
355
365
  required: false
356
366
  schema:
357
367
  type: string
358
- description: Reverse lookup -- find market containing this outcome
359
368
  description: Reverse lookup -- find market containing this outcome
360
369
  - in: query
361
370
  name: eventId
362
371
  required: false
363
372
  schema:
364
373
  type: string
365
- description: Find markets belonging to an event
366
374
  description: Find markets belonging to an event
367
375
  - in: query
368
376
  name: page
369
377
  required: false
370
378
  schema:
371
- type: integer
379
+ type: number
380
+ description: For pagination (used by Limitless)
372
381
  - in: query
373
382
  name: similarityThreshold
374
383
  required: false
375
384
  schema:
376
385
  type: number
386
+ description: For semantic search (used by Limitless)
377
387
  responses:
378
388
  '200':
379
389
  description: Fetch Market response
@@ -400,26 +410,29 @@ paths:
400
410
  required: false
401
411
  schema:
402
412
  type: string
413
+ description: For keyword search
403
414
  - in: query
404
- name: sort
415
+ name: limit
405
416
  required: false
406
417
  schema:
407
- type: string
408
- enum:
409
- - volume
410
- - liquidity
411
- - newest
418
+ type: number
419
+ description: Maximum number of results to return
412
420
  - in: query
413
- name: limit
421
+ name: offset
414
422
  required: false
415
423
  schema:
416
- type: integer
417
- default: 10000
424
+ type: number
425
+ description: Pagination offset — number of results to skip
418
426
  - in: query
419
- name: offset
427
+ name: sort
420
428
  required: false
421
429
  schema:
422
- type: integer
430
+ type: string
431
+ enum:
432
+ - volume
433
+ - liquidity
434
+ - newest
435
+ description: Sort order for results
423
436
  - in: query
424
437
  name: status
425
438
  required: false
@@ -427,10 +440,10 @@ paths:
427
440
  type: string
428
441
  enum:
429
442
  - active
443
+ - inactive
430
444
  - closed
431
445
  - all
432
- description: 'Filter by event status (default: active)'
433
- description: 'Filter by event status (default: active)'
446
+ description: 'Filter by event status (default: ''active'', ''inactive'' and ''closed'' are interchangeable)'
434
447
  - in: query
435
448
  name: searchIn
436
449
  required: false
@@ -440,19 +453,18 @@ paths:
440
453
  - title
441
454
  - description
442
455
  - both
456
+ description: 'Where to search (default: ''title'')'
443
457
  - in: query
444
458
  name: eventId
445
459
  required: false
446
460
  schema:
447
461
  type: string
448
- description: Direct lookup by event ID
449
462
  description: Direct lookup by event ID
450
463
  - in: query
451
464
  name: slug
452
465
  required: false
453
466
  schema:
454
467
  type: string
455
- description: Lookup by event slug
456
468
  description: Lookup by event slug
457
469
  responses:
458
470
  '200':
@@ -492,25 +504,27 @@ paths:
492
504
  - 1h
493
505
  - 6h
494
506
  - 1d
495
- description: Candle interval for aggregation
496
- description: Candle interval for aggregation
507
+ description: Required for candle aggregation
497
508
  - in: query
498
509
  name: start
499
510
  required: false
500
511
  schema:
501
512
  type: string
502
513
  format: date-time
514
+ description: Start of the time range
503
515
  - in: query
504
516
  name: end
505
517
  required: false
506
518
  schema:
507
519
  type: string
508
520
  format: date-time
521
+ description: End of the time range
509
522
  - in: query
510
523
  name: limit
511
524
  required: false
512
525
  schema:
513
- type: integer
526
+ type: number
527
+ description: Maximum number of results to return
514
528
  responses:
515
529
  '200':
516
530
  description: Fetch O H L C V response
@@ -569,17 +583,20 @@ paths:
569
583
  schema:
570
584
  type: string
571
585
  format: date-time
586
+ description: Start of the time range
572
587
  - in: query
573
588
  name: end
574
589
  required: false
575
590
  schema:
576
591
  type: string
577
592
  format: date-time
593
+ description: End of the time range
578
594
  - in: query
579
595
  name: limit
580
596
  required: false
581
597
  schema:
582
- type: integer
598
+ type: number
599
+ description: Maximum number of results to return
583
600
  responses:
584
601
  '200':
585
602
  description: Fetch Trades response
@@ -802,39 +819,39 @@ paths:
802
819
  required: false
803
820
  schema:
804
821
  type: string
805
- description: Filter to specific outcome/ticker
806
- description: Filter to specific outcome/ticker
822
+ description: filter to specific outcome/ticker
807
823
  - in: query
808
824
  name: marketId
809
825
  required: false
810
826
  schema:
811
827
  type: string
812
- description: Filter to specific market
813
- description: Filter to specific market
828
+ description: filter to specific market
814
829
  - in: query
815
830
  name: since
816
831
  required: false
817
832
  schema:
818
833
  type: string
819
834
  format: date-time
835
+ description: Only return records after this date
820
836
  - in: query
821
837
  name: until
822
838
  required: false
823
839
  schema:
824
840
  type: string
825
841
  format: date-time
842
+ description: Only return records before this date
826
843
  - in: query
827
844
  name: limit
828
845
  required: false
829
846
  schema:
830
- type: integer
847
+ type: number
848
+ description: Maximum number of results to return
831
849
  - in: query
832
850
  name: cursor
833
851
  required: false
834
852
  schema:
835
853
  type: string
836
- description: For Kalshi cursor pagination
837
- description: For Kalshi cursor pagination
854
+ description: for Kalshi cursor pagination
838
855
  responses:
839
856
  '200':
840
857
  description: Fetch My Trades response
@@ -860,30 +877,33 @@ paths:
860
877
  required: false
861
878
  schema:
862
879
  type: string
863
- description: Required for Limitless (slug)
864
- description: Required for Limitless (slug)
880
+ description: required for Limitless (slug)
865
881
  - in: query
866
882
  name: since
867
883
  required: false
868
884
  schema:
869
885
  type: string
870
886
  format: date-time
887
+ description: Only return records after this date
871
888
  - in: query
872
889
  name: until
873
890
  required: false
874
891
  schema:
875
892
  type: string
876
893
  format: date-time
894
+ description: Only return records before this date
877
895
  - in: query
878
896
  name: limit
879
897
  required: false
880
898
  schema:
881
- type: integer
899
+ type: number
900
+ description: Maximum number of results to return
882
901
  - in: query
883
902
  name: cursor
884
903
  required: false
885
904
  schema:
886
905
  type: string
906
+ description: Opaque pagination cursor from a previous response
887
907
  responses:
888
908
  '200':
889
909
  description: Fetch Closed Orders response
@@ -909,30 +929,33 @@ paths:
909
929
  required: false
910
930
  schema:
911
931
  type: string
912
- description: Required for Limitless (slug)
913
- description: Required for Limitless (slug)
932
+ description: required for Limitless (slug)
914
933
  - in: query
915
934
  name: since
916
935
  required: false
917
936
  schema:
918
937
  type: string
919
938
  format: date-time
939
+ description: Only return records after this date
920
940
  - in: query
921
941
  name: until
922
942
  required: false
923
943
  schema:
924
944
  type: string
925
945
  format: date-time
946
+ description: Only return records before this date
926
947
  - in: query
927
948
  name: limit
928
949
  required: false
929
950
  schema:
930
- type: integer
951
+ type: number
952
+ description: Maximum number of results to return
931
953
  - in: query
932
954
  name: cursor
933
955
  required: false
934
956
  schema:
935
957
  type: string
958
+ description: Opaque pagination cursor from a previous response
936
959
  responses:
937
960
  '200':
938
961
  description: Fetch All Orders response
@@ -1107,10 +1130,97 @@ paths:
1107
1130
  - type: array
1108
1131
  items:
1109
1132
  $ref: '#/components/schemas/UnifiedMarket'
1110
- - oneOf:
1111
- - type: string
1112
- - type: object
1113
- - type: object
1133
+ - type: string
1134
+ - type: object
1135
+ properties:
1136
+ text:
1137
+ type: string
1138
+ searchIn:
1139
+ type: array
1140
+ items:
1141
+ type: string
1142
+ enum:
1143
+ - title
1144
+ - description
1145
+ - category
1146
+ - tags
1147
+ - outcomes
1148
+ volume24h:
1149
+ type: object
1150
+ properties:
1151
+ min:
1152
+ type: number
1153
+ max:
1154
+ type: number
1155
+ volume:
1156
+ type: object
1157
+ properties:
1158
+ min:
1159
+ type: number
1160
+ max:
1161
+ type: number
1162
+ liquidity:
1163
+ type: object
1164
+ properties:
1165
+ min:
1166
+ type: number
1167
+ max:
1168
+ type: number
1169
+ openInterest:
1170
+ type: object
1171
+ properties:
1172
+ min:
1173
+ type: number
1174
+ max:
1175
+ type: number
1176
+ resolutionDate:
1177
+ type: object
1178
+ properties:
1179
+ before:
1180
+ type: string
1181
+ format: date-time
1182
+ after:
1183
+ type: string
1184
+ format: date-time
1185
+ category:
1186
+ type: string
1187
+ tags:
1188
+ type: array
1189
+ items:
1190
+ type: string
1191
+ price:
1192
+ type: object
1193
+ properties:
1194
+ outcome:
1195
+ type: string
1196
+ enum:
1197
+ - 'yes'
1198
+ - 'no'
1199
+ - up
1200
+ - down
1201
+ min:
1202
+ type: number
1203
+ max:
1204
+ type: number
1205
+ required:
1206
+ - outcome
1207
+ priceChange24h:
1208
+ type: object
1209
+ properties:
1210
+ outcome:
1211
+ type: string
1212
+ enum:
1213
+ - 'yes'
1214
+ - 'no'
1215
+ - up
1216
+ - down
1217
+ min:
1218
+ type: number
1219
+ max:
1220
+ type: number
1221
+ required:
1222
+ - outcome
1223
+ - type: object
1114
1224
  credentials:
1115
1225
  $ref: '#/components/schemas/ExchangeCredentials'
1116
1226
  required:
@@ -1154,10 +1264,41 @@ paths:
1154
1264
  - type: array
1155
1265
  items:
1156
1266
  $ref: '#/components/schemas/UnifiedEvent'
1157
- - oneOf:
1158
- - type: string
1159
- - type: object
1160
- - type: object
1267
+ - type: string
1268
+ - type: object
1269
+ properties:
1270
+ text:
1271
+ type: string
1272
+ searchIn:
1273
+ type: array
1274
+ items:
1275
+ type: string
1276
+ enum:
1277
+ - title
1278
+ - description
1279
+ - category
1280
+ - tags
1281
+ category:
1282
+ type: string
1283
+ tags:
1284
+ type: array
1285
+ items:
1286
+ type: string
1287
+ marketCount:
1288
+ type: object
1289
+ properties:
1290
+ min:
1291
+ type: number
1292
+ max:
1293
+ type: number
1294
+ totalVolume:
1295
+ type: object
1296
+ properties:
1297
+ min:
1298
+ type: number
1299
+ max:
1300
+ type: number
1301
+ - type: object
1161
1302
  credentials:
1162
1303
  $ref: '#/components/schemas/ExchangeCredentials'
1163
1304
  required:
@@ -1420,40 +1561,53 @@ components:
1420
1561
  marketId:
1421
1562
  type: string
1422
1563
  description: The unique identifier for this market
1564
+ eventId:
1565
+ type: string
1566
+ description: Link to parent event
1423
1567
  title:
1424
1568
  type: string
1569
+ description: 'The market title (e.g., "Will BTC close above $100k on Dec 31?").'
1425
1570
  description:
1426
1571
  type: string
1572
+ description: Long-form market description or resolution criteria.
1427
1573
  slug:
1428
1574
  type: string
1575
+ description: URL-friendly slug for the market.
1429
1576
  outcomes:
1430
1577
  type: array
1431
1578
  items:
1432
1579
  $ref: '#/components/schemas/MarketOutcome'
1433
- eventId:
1434
- type: string
1435
- description: Link to parent event
1580
+ description: The possible outcomes for this market.
1436
1581
  resolutionDate:
1437
1582
  type: string
1438
1583
  format: date-time
1584
+ description: When the market is scheduled to resolve.
1439
1585
  volume24h:
1440
1586
  type: number
1587
+ description: Trading volume over the past 24 hours (USD).
1441
1588
  volume:
1442
1589
  type: number
1590
+ description: Total / Lifetime volume
1443
1591
  liquidity:
1444
1592
  type: number
1593
+ description: Current market liquidity (USD).
1445
1594
  openInterest:
1446
1595
  type: number
1596
+ description: Total value of outstanding contracts (USD).
1447
1597
  url:
1448
1598
  type: string
1599
+ description: Canonical URL to view the market on the venue.
1449
1600
  image:
1450
1601
  type: string
1602
+ description: Optional image URL for the market.
1451
1603
  category:
1452
1604
  type: string
1605
+ description: 'Optional category label (e.g., "Politics", "Crypto").'
1453
1606
  tags:
1454
1607
  type: array
1455
1608
  items:
1456
1609
  type: string
1610
+ description: Optional list of tags associated with the market.
1457
1611
  tickSize:
1458
1612
  type: number
1459
1613
  description: 'Minimum price increment (e.g., 0.01, 0.001)'
@@ -1464,13 +1618,30 @@ components:
1464
1618
  type: string
1465
1619
  description: 'On-chain contract / condition identifier where applicable (Polymarket conditionId, etc.).'
1466
1620
  'yes':
1467
- $ref: '#/components/schemas/MarketOutcome'
1621
+ allOf:
1622
+ - $ref: '#/components/schemas/MarketOutcome'
1623
+ description: Convenience accessor for the YES outcome on a binary market.
1468
1624
  'no':
1469
- $ref: '#/components/schemas/MarketOutcome'
1625
+ allOf:
1626
+ - $ref: '#/components/schemas/MarketOutcome'
1627
+ description: Convenience accessor for the NO outcome on a binary market.
1470
1628
  up:
1471
- $ref: '#/components/schemas/MarketOutcome'
1629
+ allOf:
1630
+ - $ref: '#/components/schemas/MarketOutcome'
1631
+ description: Convenience accessor for the UP outcome on a binary market.
1472
1632
  down:
1473
- $ref: '#/components/schemas/MarketOutcome'
1633
+ allOf:
1634
+ - $ref: '#/components/schemas/MarketOutcome'
1635
+ description: Convenience accessor for the DOWN outcome on a binary market.
1636
+ required:
1637
+ - marketId
1638
+ - title
1639
+ - description
1640
+ - outcomes
1641
+ - resolutionDate
1642
+ - volume24h
1643
+ - liquidity
1644
+ - url
1474
1645
  MarketOutcome:
1475
1646
  type: object
1476
1647
  properties:
@@ -1479,63 +1650,100 @@ components:
1479
1650
  description: 'Outcome ID for trading operations (CLOB Token ID for Polymarket, Market Ticker for Kalshi)'
1480
1651
  marketId:
1481
1652
  type: string
1482
- description: The market this outcome belongs to (set automatically)
1653
+ description: The market this outcome belongs to (set automatically when outcomes are built)
1483
1654
  label:
1484
1655
  type: string
1656
+ description: 'Human-readable outcome label (e.g., "Yes", "No", candidate name).'
1485
1657
  price:
1486
1658
  type: number
1659
+ description: Probability between 0.0 and 1.0.
1487
1660
  priceChange24h:
1488
1661
  type: number
1662
+ description: 'Change in price over the past 24 hours, as an absolute probability delta.'
1489
1663
  metadata:
1490
1664
  type: object
1491
- additionalProperties: true
1665
+ additionalProperties: {}
1492
1666
  description: 'Exchange-specific metadata (e.g., clobTokenId for Polymarket)'
1667
+ required:
1668
+ - outcomeId
1669
+ - label
1670
+ - price
1493
1671
  UnifiedEvent:
1494
1672
  type: object
1495
- description: 'A grouped collection of related markets (e.g., "Who will be Fed Chair?" contains multiple candidate markets)'
1673
+ description: 'A grouped collection of related markets (e.g., "Who will be Fed Chair?" contains multiple candidate markets).'
1496
1674
  properties:
1497
1675
  id:
1498
1676
  type: string
1677
+ description: The unique identifier for this event.
1499
1678
  title:
1500
1679
  type: string
1680
+ description: 'The event title (e.g., "Who will be Fed Chair?").'
1501
1681
  description:
1502
1682
  type: string
1683
+ description: Long-form event description.
1503
1684
  slug:
1504
1685
  type: string
1686
+ description: URL-friendly slug for the event.
1505
1687
  markets:
1506
1688
  type: array
1507
1689
  items:
1508
1690
  $ref: '#/components/schemas/UnifiedMarket'
1691
+ description: Markets grouped under this event.
1509
1692
  volume24h:
1510
1693
  type: number
1694
+ description: Trading volume over the past 24 hours (USD).
1511
1695
  volume:
1512
1696
  type: number
1513
1697
  description: Total / Lifetime volume (sum across markets; undefined if no market provides it)
1514
1698
  url:
1515
1699
  type: string
1700
+ description: Canonical URL to view the event on the venue.
1516
1701
  image:
1517
1702
  type: string
1703
+ description: Optional image URL for the event.
1518
1704
  category:
1519
1705
  type: string
1706
+ description: 'Optional category label (e.g., "Politics", "Sports").'
1520
1707
  tags:
1521
1708
  type: array
1522
1709
  items:
1523
1710
  type: string
1711
+ description: Optional list of tags associated with the event.
1712
+ required:
1713
+ - id
1714
+ - title
1715
+ - description
1716
+ - slug
1717
+ - markets
1718
+ - volume24h
1719
+ - url
1524
1720
  PriceCandle:
1525
1721
  type: object
1526
1722
  properties:
1527
1723
  timestamp:
1528
- type: integer
1724
+ type: number
1725
+ description: Unix timestamp in milliseconds marking the start of the candle.
1529
1726
  open:
1530
1727
  type: number
1728
+ description: Opening price for the interval (probability between 0.0 and 1.0).
1531
1729
  high:
1532
1730
  type: number
1731
+ description: Highest price during the interval (probability between 0.0 and 1.0).
1533
1732
  low:
1534
1733
  type: number
1734
+ description: Lowest price during the interval (probability between 0.0 and 1.0).
1535
1735
  close:
1536
1736
  type: number
1737
+ description: Closing price for the interval (probability between 0.0 and 1.0).
1537
1738
  volume:
1538
1739
  type: number
1740
+ description: Trading volume during the interval.
1741
+ required:
1742
+ - timestamp
1743
+ - open
1744
+ - high
1745
+ - low
1746
+ - close
1539
1747
  OrderBook:
1540
1748
  type: object
1541
1749
  properties:
@@ -1543,82 +1751,125 @@ components:
1543
1751
  type: array
1544
1752
  items:
1545
1753
  $ref: '#/components/schemas/OrderLevel'
1754
+ description: 'Order book bid levels, sorted by price descending.'
1546
1755
  asks:
1547
1756
  type: array
1548
1757
  items:
1549
1758
  $ref: '#/components/schemas/OrderLevel'
1759
+ description: 'Order book ask levels, sorted by price ascending.'
1550
1760
  timestamp:
1551
- type: integer
1761
+ type: number
1762
+ description: Unix timestamp in milliseconds when the snapshot was taken.
1763
+ required:
1764
+ - bids
1765
+ - asks
1552
1766
  OrderLevel:
1553
1767
  type: object
1554
1768
  properties:
1555
1769
  price:
1556
1770
  type: number
1771
+ description: 0.0 to 1.0 (probability)
1557
1772
  size:
1558
1773
  type: number
1774
+ description: contracts/shares
1775
+ required:
1776
+ - price
1777
+ - size
1559
1778
  Trade:
1560
1779
  type: object
1561
1780
  properties:
1562
1781
  id:
1563
1782
  type: string
1783
+ description: The unique identifier for this trade.
1784
+ timestamp:
1785
+ type: number
1786
+ description: Unix timestamp in milliseconds when the trade executed.
1564
1787
  price:
1565
1788
  type: number
1789
+ description: Probability between 0.0 and 1.0.
1566
1790
  amount:
1567
1791
  type: number
1792
+ description: Size of the trade in contracts/shares.
1568
1793
  side:
1569
1794
  type: string
1570
1795
  enum:
1571
1796
  - buy
1572
1797
  - sell
1573
1798
  - unknown
1574
- timestamp:
1575
- type: integer
1799
+ description: Trade side from the taker's perspective.
1800
+ outcomeId:
1801
+ type: string
1802
+ description: The outcome this trade is for (if known).
1803
+ required:
1804
+ - id
1805
+ - timestamp
1806
+ - price
1807
+ - amount
1808
+ - side
1576
1809
  UserTrade:
1577
1810
  type: object
1578
1811
  properties:
1579
1812
  id:
1580
1813
  type: string
1814
+ description: The unique identifier for this trade.
1815
+ timestamp:
1816
+ type: number
1817
+ description: Unix timestamp in milliseconds when the trade executed.
1581
1818
  price:
1582
1819
  type: number
1820
+ description: Probability between 0.0 and 1.0.
1583
1821
  amount:
1584
1822
  type: number
1823
+ description: Size of the trade in contracts/shares.
1585
1824
  side:
1586
1825
  type: string
1587
1826
  enum:
1588
1827
  - buy
1589
1828
  - sell
1590
1829
  - unknown
1591
- timestamp:
1592
- type: integer
1593
- orderId:
1594
- type: string
1830
+ description: Trade side from the taker's perspective.
1595
1831
  outcomeId:
1596
1832
  type: string
1597
- marketId:
1833
+ description: The outcome this trade is for (if known).
1834
+ orderId:
1598
1835
  type: string
1836
+ description: 'The order that produced this trade, if known.'
1837
+ required:
1838
+ - id
1839
+ - timestamp
1840
+ - price
1841
+ - amount
1842
+ - side
1599
1843
  Order:
1600
1844
  type: object
1601
1845
  properties:
1602
1846
  id:
1603
1847
  type: string
1848
+ description: The exchange-assigned order identifier.
1604
1849
  marketId:
1605
1850
  type: string
1851
+ description: The market this order was placed on.
1606
1852
  outcomeId:
1607
1853
  type: string
1854
+ description: The outcome this order was placed on.
1608
1855
  side:
1609
1856
  type: string
1610
1857
  enum:
1611
1858
  - buy
1612
1859
  - sell
1860
+ description: 'Order side: buy or sell.'
1613
1861
  type:
1614
1862
  type: string
1615
1863
  enum:
1616
- - limit
1617
1864
  - market
1865
+ - limit
1866
+ description: 'Order type: market (execute immediately) or limit (resting at a price).'
1618
1867
  price:
1619
1868
  type: number
1869
+ description: For limit orders
1620
1870
  amount:
1621
1871
  type: number
1872
+ description: Size in contracts/shares
1622
1873
  status:
1623
1874
  type: string
1624
1875
  enum:
@@ -1627,44 +1878,85 @@ components:
1627
1878
  - filled
1628
1879
  - cancelled
1629
1880
  - rejected
1881
+ description: Lifecycle status of the order.
1630
1882
  filled:
1631
1883
  type: number
1884
+ description: Amount filled
1632
1885
  remaining:
1633
1886
  type: number
1887
+ description: Amount remaining
1634
1888
  timestamp:
1635
- type: integer
1889
+ type: number
1890
+ description: Unix timestamp in milliseconds when the order was created.
1636
1891
  fee:
1637
1892
  type: number
1893
+ description: 'Fee paid for this order, if known.'
1894
+ required:
1895
+ - id
1896
+ - marketId
1897
+ - outcomeId
1898
+ - side
1899
+ - type
1900
+ - amount
1901
+ - status
1902
+ - filled
1903
+ - remaining
1904
+ - timestamp
1638
1905
  Position:
1639
1906
  type: object
1640
1907
  properties:
1641
1908
  marketId:
1642
1909
  type: string
1910
+ description: The market this position is held in.
1643
1911
  outcomeId:
1644
1912
  type: string
1913
+ description: The outcome this position is held in.
1645
1914
  outcomeLabel:
1646
1915
  type: string
1916
+ description: Human-readable label for the outcome held.
1647
1917
  size:
1648
1918
  type: number
1919
+ description: 'Positive for long, negative for short'
1649
1920
  entryPrice:
1650
1921
  type: number
1922
+ description: Average entry price for the position (probability between 0.0 and 1.0).
1651
1923
  currentPrice:
1652
1924
  type: number
1925
+ description: Current mark price for the position (probability between 0.0 and 1.0).
1653
1926
  unrealizedPnL:
1654
1927
  type: number
1928
+ description: Unrealized profit or loss at the current price (USD).
1655
1929
  realizedPnL:
1656
1930
  type: number
1931
+ description: Realized profit or loss booked so far (USD).
1932
+ required:
1933
+ - marketId
1934
+ - outcomeId
1935
+ - outcomeLabel
1936
+ - size
1937
+ - entryPrice
1938
+ - currentPrice
1939
+ - unrealizedPnL
1657
1940
  Balance:
1658
1941
  type: object
1659
1942
  properties:
1660
1943
  currency:
1661
1944
  type: string
1945
+ description: 'e.g., ''USDC'''
1662
1946
  total:
1663
1947
  type: number
1948
+ description: Total balance including funds locked in open orders.
1664
1949
  available:
1665
1950
  type: number
1951
+ description: Balance available to trade (excludes locked funds).
1666
1952
  locked:
1667
1953
  type: number
1954
+ description: In open orders
1955
+ required:
1956
+ - currency
1957
+ - total
1958
+ - available
1959
+ - locked
1668
1960
  ExecutionPriceResult:
1669
1961
  type: object
1670
1962
  properties:
@@ -1674,48 +1966,65 @@ components:
1674
1966
  type: number
1675
1967
  fullyFilled:
1676
1968
  type: boolean
1969
+ required:
1970
+ - price
1971
+ - filledAmount
1972
+ - fullyFilled
1677
1973
  PaginatedMarketsResult:
1678
1974
  type: object
1975
+ description: Shape returned by fetchMarketsPaginated
1679
1976
  properties:
1680
1977
  data:
1681
1978
  type: array
1682
1979
  items:
1683
1980
  $ref: '#/components/schemas/UnifiedMarket'
1981
+ description: The page of unified markets
1684
1982
  total:
1685
- type: integer
1983
+ type: number
1984
+ description: Total number of markets in the snapshot
1686
1985
  nextCursor:
1687
1986
  type: string
1987
+ description: 'Cursor to pass to the next call, or undefined if this is the last page'
1988
+ required:
1989
+ - data
1990
+ - total
1688
1991
  MarketFilterParams:
1689
1992
  type: object
1690
1993
  properties:
1691
1994
  limit:
1692
- type: integer
1693
- default: 10000
1995
+ type: number
1996
+ description: Maximum number of results to return
1694
1997
  offset:
1695
- type: integer
1998
+ type: number
1999
+ description: Pagination offset — number of results to skip
1696
2000
  sort:
1697
2001
  type: string
1698
2002
  enum:
1699
2003
  - volume
1700
2004
  - liquidity
1701
2005
  - newest
2006
+ description: Sort order for results
1702
2007
  status:
1703
2008
  type: string
1704
2009
  enum:
1705
2010
  - active
2011
+ - inactive
1706
2012
  - closed
1707
2013
  - all
1708
- description: 'Filter by market status (default: active)'
2014
+ description: 'Filter by market status (default: ''active'', ''inactive'' and ''closed'' are interchangeable)'
1709
2015
  searchIn:
1710
2016
  type: string
1711
2017
  enum:
1712
2018
  - title
1713
2019
  - description
1714
2020
  - both
2021
+ description: 'Where to search (default: ''title'')'
1715
2022
  query:
1716
2023
  type: string
2024
+ description: For keyword search
1717
2025
  slug:
1718
2026
  type: string
2027
+ description: For slug/ticker lookup
1719
2028
  marketId:
1720
2029
  type: string
1721
2030
  description: Direct lookup by market ID
@@ -1726,38 +2035,45 @@ components:
1726
2035
  type: string
1727
2036
  description: Find markets belonging to an event
1728
2037
  page:
1729
- type: integer
2038
+ type: number
2039
+ description: For pagination (used by Limitless)
1730
2040
  similarityThreshold:
1731
2041
  type: number
2042
+ description: For semantic search (used by Limitless)
1732
2043
  EventFetchParams:
1733
2044
  type: object
1734
2045
  properties:
1735
2046
  query:
1736
2047
  type: string
2048
+ description: For keyword search
2049
+ limit:
2050
+ type: number
2051
+ description: Maximum number of results to return
2052
+ offset:
2053
+ type: number
2054
+ description: Pagination offset — number of results to skip
1737
2055
  sort:
1738
2056
  type: string
1739
2057
  enum:
1740
2058
  - volume
1741
2059
  - liquidity
1742
2060
  - newest
1743
- limit:
1744
- type: integer
1745
- default: 10000
1746
- offset:
1747
- type: integer
2061
+ description: Sort order for results
1748
2062
  status:
1749
2063
  type: string
1750
2064
  enum:
1751
2065
  - active
2066
+ - inactive
1752
2067
  - closed
1753
2068
  - all
1754
- description: 'Filter by event status (default: active)'
2069
+ description: 'Filter by event status (default: ''active'', ''inactive'' and ''closed'' are interchangeable)'
1755
2070
  searchIn:
1756
2071
  type: string
1757
2072
  enum:
1758
2073
  - title
1759
2074
  - description
1760
2075
  - both
2076
+ description: 'Where to search (default: ''title'')'
1761
2077
  eventId:
1762
2078
  type: string
1763
2079
  description: Direct lookup by event ID
@@ -1777,18 +2093,20 @@ components:
1777
2093
  - 1h
1778
2094
  - 6h
1779
2095
  - 1d
2096
+ description: Optional for backward compatibility
1780
2097
  start:
1781
2098
  type: string
1782
2099
  format: date-time
2100
+ description: Start of the time range
1783
2101
  end:
1784
2102
  type: string
1785
2103
  format: date-time
2104
+ description: End of the time range
1786
2105
  limit:
1787
- type: integer
2106
+ type: number
2107
+ description: Maximum number of results to return
1788
2108
  OHLCVParams:
1789
2109
  type: object
1790
- required:
1791
- - resolution
1792
2110
  properties:
1793
2111
  resolution:
1794
2112
  type: string
@@ -1799,15 +2117,20 @@ components:
1799
2117
  - 1h
1800
2118
  - 6h
1801
2119
  - 1d
1802
- description: Candle interval for aggregation
2120
+ description: Required for candle aggregation
1803
2121
  start:
1804
2122
  type: string
1805
2123
  format: date-time
2124
+ description: Start of the time range
1806
2125
  end:
1807
2126
  type: string
1808
2127
  format: date-time
2128
+ description: End of the time range
1809
2129
  limit:
1810
- type: integer
2130
+ type: number
2131
+ description: Maximum number of results to return
2132
+ required:
2133
+ - resolution
1811
2134
  TradesParams:
1812
2135
  type: object
1813
2136
  description: Parameters for fetching trade history. No resolution parameter - trades are discrete events.
@@ -1815,62 +2138,72 @@ components:
1815
2138
  start:
1816
2139
  type: string
1817
2140
  format: date-time
2141
+ description: Start of the time range
1818
2142
  end:
1819
2143
  type: string
1820
2144
  format: date-time
2145
+ description: End of the time range
1821
2146
  limit:
1822
- type: integer
2147
+ type: number
2148
+ description: Maximum number of results to return
1823
2149
  CreateOrderParams:
1824
2150
  type: object
1825
- required:
1826
- - marketId
1827
- - outcomeId
1828
- - side
1829
- - type
1830
- - amount
1831
2151
  properties:
1832
2152
  marketId:
1833
2153
  type: string
2154
+ description: The market to trade on.
1834
2155
  outcomeId:
1835
2156
  type: string
2157
+ description: The outcome to trade.
1836
2158
  side:
1837
2159
  type: string
1838
2160
  enum:
1839
2161
  - buy
1840
2162
  - sell
2163
+ description: 'Order side: buy or sell.'
1841
2164
  type:
1842
2165
  type: string
1843
2166
  enum:
1844
- - limit
1845
2167
  - market
2168
+ - limit
2169
+ description: 'Order type: market (execute immediately) or limit (resting at a price).'
1846
2170
  amount:
1847
2171
  type: number
2172
+ description: Size of the order in contracts/shares.
1848
2173
  price:
1849
2174
  type: number
2175
+ description: Required for limit orders
1850
2176
  fee:
1851
2177
  type: number
2178
+ description: 'Optional fee rate (e.g., 1000 for 0.1%)'
1852
2179
  tickSize:
1853
2180
  type: number
1854
2181
  description: Optional override for Limitless/Polymarket
1855
2182
  negRisk:
1856
2183
  type: boolean
1857
2184
  description: Optional override to skip neg-risk lookup (Polymarket)
2185
+ required:
2186
+ - marketId
2187
+ - outcomeId
2188
+ - side
2189
+ - type
2190
+ - amount
1858
2191
  BuiltOrder:
1859
2192
  type: object
1860
- description: 'An order built but not yet submitted, ready for inspection or middleware forwarding'
1861
2193
  properties:
1862
2194
  exchange:
1863
2195
  type: string
1864
- description: The exchange name this order was built for
2196
+ description: The exchange name this order was built for.
1865
2197
  params:
1866
- $ref: '#/components/schemas/CreateOrderParams'
2198
+ allOf:
2199
+ - $ref: '#/components/schemas/CreateOrderParams'
2200
+ description: The original params used to build this order.
1867
2201
  signedOrder:
1868
2202
  type: object
1869
- additionalProperties: true
1870
- description: 'For CLOB exchanges (Polymarket): the EIP-712 signed order ready to POST'
2203
+ additionalProperties: {}
2204
+ description: 'For CLOB exchanges (Polymarket): the EIP-712 signed order ready to POST to the exchange''s order endpoint.'
1871
2205
  tx:
1872
2206
  type: object
1873
- description: 'For on-chain AMM exchanges: the EVM transaction payload (reserved for future use)'
1874
2207
  properties:
1875
2208
  to:
1876
2209
  type: string
@@ -1879,66 +2212,87 @@ components:
1879
2212
  value:
1880
2213
  type: string
1881
2214
  chainId:
1882
- type: integer
2215
+ type: number
2216
+ required:
2217
+ - to
2218
+ - data
2219
+ - value
2220
+ - chainId
2221
+ description: >-
2222
+ For on-chain AMM exchanges: the EVM transaction payload. Reserved for future exchanges; no current exchange
2223
+ populates this.
1883
2224
  raw:
1884
2225
  description: 'The raw, exchange-native payload. Always present.'
2226
+ required:
2227
+ - exchange
2228
+ - params
2229
+ - raw
1885
2230
  MyTradesParams:
1886
2231
  type: object
1887
2232
  properties:
1888
2233
  outcomeId:
1889
2234
  type: string
1890
- description: Filter to specific outcome/ticker
2235
+ description: filter to specific outcome/ticker
1891
2236
  marketId:
1892
2237
  type: string
1893
- description: Filter to specific market
2238
+ description: filter to specific market
1894
2239
  since:
1895
2240
  type: string
1896
2241
  format: date-time
2242
+ description: Only return records after this date
1897
2243
  until:
1898
2244
  type: string
1899
2245
  format: date-time
2246
+ description: Only return records before this date
1900
2247
  limit:
1901
- type: integer
2248
+ type: number
2249
+ description: Maximum number of results to return
1902
2250
  cursor:
1903
2251
  type: string
1904
- description: For Kalshi cursor pagination
2252
+ description: for Kalshi cursor pagination
1905
2253
  OrderHistoryParams:
1906
2254
  type: object
1907
2255
  properties:
1908
2256
  marketId:
1909
2257
  type: string
1910
- description: Required for Limitless (slug)
2258
+ description: required for Limitless (slug)
1911
2259
  since:
1912
2260
  type: string
1913
2261
  format: date-time
2262
+ description: Only return records after this date
1914
2263
  until:
1915
2264
  type: string
1916
2265
  format: date-time
2266
+ description: Only return records before this date
1917
2267
  limit:
1918
- type: integer
2268
+ type: number
2269
+ description: Maximum number of results to return
1919
2270
  cursor:
1920
2271
  type: string
2272
+ description: Opaque pagination cursor from a previous response
1921
2273
  ExchangeCredentials:
1922
2274
  type: object
1923
- description: Optional authentication credentials for exchange operations
2275
+ description: Optional authentication credentials for exchange operations.
1924
2276
  properties:
1925
2277
  apiKey:
1926
2278
  type: string
1927
- description: API key for the exchange
1928
- privateKey:
1929
- type: string
1930
- description: Private key for signing transactions
1931
2279
  apiSecret:
1932
2280
  type: string
1933
- description: API secret (if required by exchange)
2281
+ description: Standard API secret for HMAC-authenticated exchanges
1934
2282
  passphrase:
1935
2283
  type: string
1936
- description: Passphrase (if required by exchange)
1937
- funderAddress:
2284
+ description: Standard API passphrase for HMAC-authenticated exchanges
2285
+ apiToken:
1938
2286
  type: string
1939
- description: The address funding the trades (Proxy address)
2287
+ description: 'Metaculus: `Authorization: Token <apiToken>` for higher rate limits'
2288
+ privateKey:
2289
+ type: string
2290
+ description: Required for Polymarket L1 auth
1940
2291
  signatureType:
1941
2292
  oneOf:
1942
- - type: integer
2293
+ - type: number
1943
2294
  - type: string
1944
- description: 'Signature type (0=EOA, 1=Poly Proxy, 2=Gnosis Safe, or names like ''gnosis_safe'')'
2295
+ description: '0 = EOA, 1 = Poly Proxy, 2 = Gnosis Safe (Can also use ''eoa'', ''polyproxy'', ''gnosis_safe'')'
2296
+ funderAddress:
2297
+ type: string
2298
+ description: The address funding the trades (defaults to signer address)