pmxt-core 2.26.0 → 2.26.2

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