skewtape 0.0.1 → 0.1.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.
Files changed (95) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +182 -0
  3. package/dist/cjs/backtest.d.ts +146 -0
  4. package/dist/cjs/backtest.js +410 -0
  5. package/dist/cjs/client.d.ts +255 -0
  6. package/dist/cjs/client.js +447 -0
  7. package/dist/cjs/download.d.ts +33 -0
  8. package/dist/cjs/download.js +160 -0
  9. package/dist/cjs/errors.d.ts +76 -0
  10. package/dist/cjs/errors.js +159 -0
  11. package/dist/cjs/exact.d.ts +36 -0
  12. package/dist/cjs/exact.js +168 -0
  13. package/dist/cjs/fees.d.ts +68 -0
  14. package/dist/cjs/fees.js +196 -0
  15. package/dist/cjs/geoblock.d.ts +48 -0
  16. package/dist/cjs/geoblock.js +78 -0
  17. package/dist/cjs/index.d.ts +31 -0
  18. package/dist/cjs/index.js +98 -0
  19. package/dist/cjs/kalshi.d.ts +261 -0
  20. package/dist/cjs/kalshi.js +416 -0
  21. package/dist/cjs/keccak.d.ts +10 -0
  22. package/dist/cjs/keccak.js +84 -0
  23. package/dist/cjs/msgpack.d.ts +15 -0
  24. package/dist/cjs/msgpack.js +112 -0
  25. package/dist/cjs/package.json +1 -0
  26. package/dist/cjs/paginated.d.ts +26 -0
  27. package/dist/cjs/paginated.js +51 -0
  28. package/dist/cjs/quote-math.d.ts +146 -0
  29. package/dist/cjs/quote-math.js +446 -0
  30. package/dist/cjs/quote.d.ts +108 -0
  31. package/dist/cjs/quote.js +307 -0
  32. package/dist/cjs/route-hyperliquid.d.ts +228 -0
  33. package/dist/cjs/route-hyperliquid.js +387 -0
  34. package/dist/cjs/route.d.ts +297 -0
  35. package/dist/cjs/route.js +516 -0
  36. package/dist/cjs/stream.d.ts +99 -0
  37. package/dist/cjs/stream.js +529 -0
  38. package/dist/cjs/version.d.ts +6 -0
  39. package/dist/cjs/version.js +9 -0
  40. package/dist/esm/backtest.d.ts +146 -0
  41. package/dist/esm/backtest.js +403 -0
  42. package/dist/esm/client.d.ts +255 -0
  43. package/dist/esm/client.js +441 -0
  44. package/dist/esm/download.d.ts +33 -0
  45. package/dist/esm/download.js +155 -0
  46. package/dist/esm/errors.d.ts +76 -0
  47. package/dist/esm/errors.js +142 -0
  48. package/dist/esm/exact.d.ts +36 -0
  49. package/dist/esm/exact.js +158 -0
  50. package/dist/esm/fees.d.ts +68 -0
  51. package/dist/esm/fees.js +185 -0
  52. package/dist/esm/geoblock.d.ts +48 -0
  53. package/dist/esm/geoblock.js +74 -0
  54. package/dist/esm/index.d.ts +31 -0
  55. package/dist/esm/index.js +30 -0
  56. package/dist/esm/kalshi.d.ts +261 -0
  57. package/dist/esm/kalshi.js +404 -0
  58. package/dist/esm/keccak.d.ts +10 -0
  59. package/dist/esm/keccak.js +80 -0
  60. package/dist/esm/msgpack.d.ts +15 -0
  61. package/dist/esm/msgpack.js +109 -0
  62. package/dist/esm/paginated.d.ts +26 -0
  63. package/dist/esm/paginated.js +47 -0
  64. package/dist/esm/quote-math.d.ts +146 -0
  65. package/dist/esm/quote-math.js +437 -0
  66. package/dist/esm/quote.d.ts +108 -0
  67. package/dist/esm/quote.js +297 -0
  68. package/dist/esm/route-hyperliquid.d.ts +228 -0
  69. package/dist/esm/route-hyperliquid.js +376 -0
  70. package/dist/esm/route.d.ts +297 -0
  71. package/dist/esm/route.js +507 -0
  72. package/dist/esm/stream.d.ts +99 -0
  73. package/dist/esm/stream.js +524 -0
  74. package/dist/esm/version.d.ts +6 -0
  75. package/dist/esm/version.js +6 -0
  76. package/package.json +48 -1
  77. package/src/backtest.ts +490 -0
  78. package/src/client.ts +595 -0
  79. package/src/download.ts +161 -0
  80. package/src/errors.ts +143 -0
  81. package/src/exact.ts +159 -0
  82. package/src/fees.ts +189 -0
  83. package/src/generated/schema.d.ts +2500 -0
  84. package/src/geoblock.ts +90 -0
  85. package/src/index.ts +146 -0
  86. package/src/kalshi.ts +563 -0
  87. package/src/keccak.ts +82 -0
  88. package/src/msgpack.ts +83 -0
  89. package/src/paginated.ts +51 -0
  90. package/src/quote-math.ts +555 -0
  91. package/src/quote.ts +324 -0
  92. package/src/route-hyperliquid.ts +457 -0
  93. package/src/route.ts +631 -0
  94. package/src/stream.ts +539 -0
  95. package/src/version.ts +6 -0
@@ -0,0 +1,2500 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+
6
+ export interface paths {
7
+ "/v1/bundles": {
8
+ parameters: {
9
+ query?: never;
10
+ header?: never;
11
+ path?: never;
12
+ cookie?: never;
13
+ };
14
+ /**
15
+ * Bundles visible to the account
16
+ * @description The published bundles your account may download, each with its
17
+ * files as the bundle's manifest lists them:
18
+ * - each History snapshot a History purchase includes
19
+ * (skewtape-history-YYYY-MM), for a year from the purchase; a
20
+ * purchase refunded, or whose payment is disputed, includes none;
21
+ * - on Builder and Pro, every published monthly delta
22
+ * (skewtape-delta-YYYY-MM).
23
+ * locked_bundles lists what a higher plan unlocks.
24
+ *
25
+ * Call it with an API key on the Builder or Pro plan, or from the
26
+ * dashboard. A key on Free or History is 403 forbidden_plan, with
27
+ * error.plan builder: a History purchase downloads from the
28
+ * dashboard. Calls count toward your rate limit and monthly quota as
29
+ * any data call does.
30
+ */
31
+ get: operations["listBundles"];
32
+ put?: never;
33
+ post?: never;
34
+ delete?: never;
35
+ options?: never;
36
+ head?: never;
37
+ patch?: never;
38
+ trace?: never;
39
+ };
40
+ "/v1/candles": {
41
+ parameters: {
42
+ query?: never;
43
+ header?: never;
44
+ path?: never;
45
+ cookie?: never;
46
+ };
47
+ /**
48
+ * List candles
49
+ * @description Candles in (market_id, token_id, ts) order. With
50
+ * event_id, active members are read in (venue, market_id) order, each
51
+ * in that table order. With venue alone, the same key across the
52
+ * venue's markets. Exactly one selector: venue with market_id, event_id
53
+ * alone, or venue alone. from is inclusive and clamped to the plan's
54
+ * history; to is exclusive and must be after from. With venue alone,
55
+ * from and to are at most 7 days apart. Candles count each trade once
56
+ * (an order book match's maker legs, a market maker trade's one row)
57
+ * and arrive within an hour. event_id resolves an approved matched event
58
+ * the caller can see and reads its active members only; members outside
59
+ * the plan's candle venues are left out, and members whose venue the
60
+ * data policy blocks for the request contribute no rows. A missing or
61
+ * hidden event_id is 404. Free and History plans get Polymarket daily
62
+ * candles (res=1d) only; other venues, and the 1m and 1h sizes, need
63
+ * Builder or above.
64
+ */
65
+ get: operations["listCandles"];
66
+ put?: never;
67
+ post?: never;
68
+ delete?: never;
69
+ options?: never;
70
+ head?: never;
71
+ patch?: never;
72
+ trace?: never;
73
+ };
74
+ "/v1/downloads/{bundle}/url": {
75
+ parameters: {
76
+ query?: never;
77
+ header?: never;
78
+ path?: never;
79
+ cookie?: never;
80
+ };
81
+ get?: never;
82
+ put?: never;
83
+ /**
84
+ * Presigned download URL
85
+ * @description Returns a link to one file of a bundle GET /v1/bundles lists, valid
86
+ * for an hour. The path goes in the body, so a path with slashes
87
+ * (fills/polymarket/2026-10.parquet) needs no percent-encoding. Each
88
+ * link given is logged against your account. The link carries no key:
89
+ * fetch it with a plain HTTP client.
90
+ *
91
+ * A bundle your plan or purchases do not include is 403
92
+ * forbidden_plan, with error.plan naming the plan that unlocks it; an
93
+ * unknown bundle, or a path its manifest does not list, is 404. A
94
+ * bundle the data policy now withholds more of than when it was
95
+ * published is 403 blocked, with error.block_reason_code.
96
+ *
97
+ * Call it with an API key on the Builder or Pro plan, or from the
98
+ * dashboard. A key on Free or History is 403 forbidden_plan, with
99
+ * error.plan builder. Calls count toward your rate limit and monthly
100
+ * quota as any data call does.
101
+ */
102
+ post: operations["postDownloadURL"];
103
+ delete?: never;
104
+ options?: never;
105
+ head?: never;
106
+ patch?: never;
107
+ trace?: never;
108
+ };
109
+ "/v1/feed": {
110
+ parameters: {
111
+ query?: never;
112
+ header?: never;
113
+ path?: never;
114
+ cookie?: never;
115
+ };
116
+ /**
117
+ * Live feed (WebSocket)
118
+ * @description The live feed, over a WebSocket. Builder and Pro plans: Builder holds
119
+ * up to 3 open connections and Pro up to 10, counted across all of an
120
+ * account's keys. The live feed guide, https://docs.skewtape.com/feed,
121
+ * has the whole protocol with examples; this is its summary.
122
+ *
123
+ * Authentication: the X-API-Key header on the upgrade request, or the
124
+ * first message {"op":"auth","key":"st_live_..."} within 10 seconds.
125
+ *
126
+ * Topics: markets, resolutions, trades and matched_events on Builder
127
+ * and Pro; event_spread on Pro only. A subscribe that names a topic
128
+ * outside the plan is refused with error topic_not_in_plan and an
129
+ * upgrade_url, and nothing of that subscribe applies: the previous
130
+ * subscription stays, and on a first subscribe there is none. Send it
131
+ * again without the topic. A topic the feed does not have is refused
132
+ * with error invalid_subscription. A plan that loses a topic during a
133
+ * connection is told the same way and keeps its other topics.
134
+ *
135
+ * From the client:
136
+ * {"op":"subscribe","topics":["markets","trades","event_spread"],
137
+ * "venues":["kalshi"],"markets":[{"venue":"polymarket","market_id":"0x..."}],
138
+ * "events":["st_evt_00412"],"resume_from":123} replaces the
139
+ * subscription. topics is required; venues, markets and events are
140
+ * optional filters, ORed. events, matched event ids, narrows
141
+ * event_spread and matched_events, whose events belong to a matched
142
+ * event rather than a venue, so the venue and market filters do not
143
+ * narrow them; it needs one of those two topics, and leaves the other
144
+ * topics to the venue and market filters, whole when there are none.
145
+ * A market filter cuts a trades_batch down to its markets' fills.
146
+ * {"op":"ping"} is answered {"op":"pong"} at once, even during a
147
+ * replay.
148
+ *
149
+ * matched_events carries the changes to what /v1/matched_events
150
+ * returns, within five minutes: an event published (kind
151
+ * matched_event_published), changed (matched_event_changed: any field
152
+ * but updated_at, reviewer_notes included, so a Builder key can get a
153
+ * change it cannot see) or retired (matched_event_retired: no longer
154
+ * returned, whatever the reason; its payload is the event_id and the
155
+ * status alone). A published or changed event's payload is the event as
156
+ * /v1/matched_events returns it. The topic has no snapshot: read
157
+ * /v1/matched_events once for the current set, then follow the changes.
158
+ *
159
+ * From the server, each message with an op: hello (connection id, plan,
160
+ * current seq, replay window and reconnect schedule), subscribed (what
161
+ * was accepted, replay_to and masked_venues), snapshot (the latest
162
+ * spread of each matched event the subscription names, sent right
163
+ * after subscribed; it has no seq), event (seq, topic, kind, venue,
164
+ * market_id, at, payload), resync (resume_from is older than the replay
165
+ * window: read the REST API for what you missed), reconnect (at 55
166
+ * minutes, with resume_from; the connection closes at 59) and error
167
+ * (code, message, and upgrade_url on a plan refusal).
168
+ *
169
+ * Trades: one event per fill, up to 400 a second per venue, the rest of
170
+ * that second in one trades_batch. A fill can arrive twice: dedupe by
171
+ * (venue, tx_hash, log_index). A trade_withdrawn names a streamed trade
172
+ * (limitless, myriad, predictfun) whose block a chain reorganisation
173
+ * replaced without it: drop the trade with that identity. If its transaction is mined again, it
174
+ * arrives as a new trade under its new identity. event_spread: a matched event's
175
+ * fee-adjusted spread, at most one event per matched event every five
176
+ * seconds.
177
+ *
178
+ * Resume: keep the last seq you saw and send it as resume_from. The feed
179
+ * replays the stored events after it that match the subscription, then
180
+ * goes on live with no gap and no duplicate. A gap notice (topic feed,
181
+ * kind gap) means a venue stream reconnected: read the REST API for that
182
+ * window.
183
+ *
184
+ * Data policy: a subscription naming a venue or a market of a venue the
185
+ * policy blocks for live data is refused (error venue_blocked). A masked
186
+ * venue's events arrive with the withheld fields null and blocked true.
187
+ * A matched event the feed serves arrives whole: a member of a blocked venue keeps its
188
+ * ids, its side labels are null, its outcome_map is empty and blocked
189
+ * is true.
190
+ *
191
+ * Close codes: 4000 reconnect (connect again with resume_from), 4001
192
+ * unauthorized (also when the key is revoked: keys are checked again
193
+ * every few minutes), 4003 plan (no feed, or a plan change left no
194
+ * topic of the subscription), 4008 connection limit, 4009 slow consumer (resume from the
195
+ * seq in the close reason), 4029 too many failed key lookups, 4400 bad
196
+ * message, 1001 server restarting, 1011 server error (connect again
197
+ * with resume_from).
198
+ */
199
+ get: operations["connectFeed"];
200
+ put?: never;
201
+ post?: never;
202
+ delete?: never;
203
+ options?: never;
204
+ head?: never;
205
+ patch?: never;
206
+ trace?: never;
207
+ };
208
+ "/v1/fees": {
209
+ parameters: {
210
+ query?: never;
211
+ header?: never;
212
+ path?: never;
213
+ cookie?: never;
214
+ };
215
+ /**
216
+ * List fee schedules
217
+ * @description Fee schedule rows in (venue, category, effective_from) order. Open to
218
+ * every plan. Optional venue filter.
219
+ */
220
+ get: operations["listFees"];
221
+ put?: never;
222
+ post?: never;
223
+ delete?: never;
224
+ options?: never;
225
+ head?: never;
226
+ patch?: never;
227
+ trace?: never;
228
+ };
229
+ "/v1/fills": {
230
+ parameters: {
231
+ query?: never;
232
+ header?: never;
233
+ path?: never;
234
+ cookie?: never;
235
+ };
236
+ /**
237
+ * List fills
238
+ * @description Fills in (market_id, ts, log_index, tx_hash)
239
+ * order. With event_id, active members are read in (venue, market_id)
240
+ * order, each in that table order. With venue alone, the same key across
241
+ * the venue's markets. Exactly one selector: venue with market_id,
242
+ * event_id alone, or venue alone. from is inclusive and clamped to the
243
+ * plan's history; to is exclusive and must be after from. With venue
244
+ * alone, from and to are at most 7 days apart. Fills arrive within a day.
245
+ * event_id resolves an approved matched event the caller can see and
246
+ * reads its active members only; members whose venue the data policy
247
+ * blocks for the request contribute no rows. A missing or hidden
248
+ * event_id is 404. Free and History plans do not include fills.
249
+ */
250
+ get: operations["listFills"];
251
+ put?: never;
252
+ post?: never;
253
+ delete?: never;
254
+ options?: never;
255
+ head?: never;
256
+ patch?: never;
257
+ trace?: never;
258
+ };
259
+ "/v1/markets": {
260
+ parameters: {
261
+ query?: never;
262
+ header?: never;
263
+ path?: never;
264
+ cookie?: never;
265
+ };
266
+ /**
267
+ * List markets
268
+ * @description Markets in (venue, market_id) order. Filter by venue, up to 100
269
+ * market_id values, and updated_since. A field the data policy withholds
270
+ * for this request is null, with blocked true and block_reason_code
271
+ * saying why.
272
+ */
273
+ get: operations["listMarkets"];
274
+ put?: never;
275
+ post?: never;
276
+ delete?: never;
277
+ options?: never;
278
+ head?: never;
279
+ patch?: never;
280
+ trace?: never;
281
+ };
282
+ "/v1/markets/{venue}/{market_id}": {
283
+ parameters: {
284
+ query?: never;
285
+ header?: never;
286
+ path?: never;
287
+ cookie?: never;
288
+ };
289
+ /**
290
+ * Get one market
291
+ * @description One market by venue and market_id. Missing or hidden from the plan is
292
+ * 404; the response never says which. A venue the data policy blocks is
293
+ * 403 blocked, whether or not the market exists.
294
+ */
295
+ get: operations["getMarket"];
296
+ put?: never;
297
+ post?: never;
298
+ delete?: never;
299
+ options?: never;
300
+ head?: never;
301
+ patch?: never;
302
+ trace?: never;
303
+ };
304
+ "/v1/matched_events": {
305
+ parameters: {
306
+ query?: never;
307
+ header?: never;
308
+ path?: never;
309
+ cookie?: never;
310
+ };
311
+ /**
312
+ * List matched events
313
+ * @description Matched events in event_id order. Filters: min_confidence,
314
+ * resolution_equal, venue (any active member), status. Free and History
315
+ * keep events whose resolves_at is null or at most 30 days in the past.
316
+ * Plans see status approved only.
317
+ */
318
+ get: operations["listMatchedEvents"];
319
+ put?: never;
320
+ post?: never;
321
+ delete?: never;
322
+ options?: never;
323
+ head?: never;
324
+ patch?: never;
325
+ trace?: never;
326
+ };
327
+ "/v1/matched_events/{event_id}": {
328
+ parameters: {
329
+ query?: never;
330
+ header?: never;
331
+ path?: never;
332
+ cookie?: never;
333
+ };
334
+ /**
335
+ * Get one matched event
336
+ * @description One matched event by event_id. Missing or hidden from the plan is 404;
337
+ * the response never says which.
338
+ */
339
+ get: operations["getMatchedEvent"];
340
+ put?: never;
341
+ post?: never;
342
+ delete?: never;
343
+ options?: never;
344
+ head?: never;
345
+ patch?: never;
346
+ trace?: never;
347
+ };
348
+ "/v1/pairs": {
349
+ parameters: {
350
+ query?: never;
351
+ header?: never;
352
+ path?: never;
353
+ cookie?: never;
354
+ };
355
+ /**
356
+ * List two-member matched events
357
+ * @description Matched events with exactly two active members, in the pair shape.
358
+ * The same filters and the same data as /v1/matched_events.
359
+ */
360
+ get: operations["listPairs"];
361
+ put?: never;
362
+ post?: never;
363
+ delete?: never;
364
+ options?: never;
365
+ head?: never;
366
+ patch?: never;
367
+ trace?: never;
368
+ };
369
+ "/v1/pairs/{pair_id}": {
370
+ parameters: {
371
+ query?: never;
372
+ header?: never;
373
+ path?: never;
374
+ cookie?: never;
375
+ };
376
+ /**
377
+ * Get one two-member matched event
378
+ * @description One matched event with exactly two active members, in the pair
379
+ * shape. pair_id is the event's event_id. An event that is missing,
380
+ * outside your plan, or not a two-member event is 404.
381
+ */
382
+ get: operations["getPair"];
383
+ put?: never;
384
+ post?: never;
385
+ delete?: never;
386
+ options?: never;
387
+ head?: never;
388
+ patch?: never;
389
+ trace?: never;
390
+ };
391
+ "/v1/quote-context/{event_id}": {
392
+ parameters: {
393
+ query?: never;
394
+ header?: never;
395
+ path?: never;
396
+ cookie?: never;
397
+ };
398
+ /**
399
+ * Get the context of a quote on one matched event
400
+ * @description The one Skewtape call in sk.quote: one matched event's
401
+ * active members, each with the tokens of its outcomes, its outcome
402
+ * map, its market's fee category and the fee row that prices it at
403
+ * as_of, and the event's resolution_equal and rule_note. It carries no
404
+ * book, price or probability: the SDK reads each member's book from its
405
+ * venue, from the caller's machine, computes the quote there and places
406
+ * nothing. Every keyed plan; each call is metered as any data call.
407
+ * Missing or hidden from the plan is 404; the response never says
408
+ * which.
409
+ */
410
+ get: operations["getQuoteContext"];
411
+ put?: never;
412
+ post?: never;
413
+ delete?: never;
414
+ options?: never;
415
+ head?: never;
416
+ patch?: never;
417
+ trace?: never;
418
+ };
419
+ "/v1/resolutions": {
420
+ parameters: {
421
+ query?: never;
422
+ header?: never;
423
+ path?: never;
424
+ cookie?: never;
425
+ };
426
+ /**
427
+ * List resolution events
428
+ * @description Resolution events in (venue, market_id, seq) order. Filter by venue,
429
+ * up to 100 market_id values, and created_since.
430
+ */
431
+ get: operations["listResolutions"];
432
+ put?: never;
433
+ post?: never;
434
+ delete?: never;
435
+ options?: never;
436
+ head?: never;
437
+ patch?: never;
438
+ trace?: never;
439
+ };
440
+ "/v1/venues": {
441
+ parameters: {
442
+ query?: never;
443
+ header?: never;
444
+ path?: never;
445
+ cookie?: never;
446
+ };
447
+ /**
448
+ * List enabled venues
449
+ * @description Every venue Skewtape serves: its key, whether it is in beta, notices
450
+ * about its data (flags), the rights and earliest history of each kind
451
+ * of data, and how many of its closed markets have a final resolution.
452
+ * Not paged.
453
+ */
454
+ get: operations["listVenues"];
455
+ put?: never;
456
+ post?: never;
457
+ delete?: never;
458
+ options?: never;
459
+ head?: never;
460
+ patch?: never;
461
+ trace?: never;
462
+ };
463
+ }
464
+ export type webhooks = Record<string, never>;
465
+ export interface components {
466
+ schemas: {
467
+ Bundle: {
468
+ description: string;
469
+ /** @description Files inside the bundle; path is passed to POST /v1/downloads/{bundle}/url. */
470
+ files: components["schemas"]["BundleFile"][];
471
+ id: string;
472
+ name: string;
473
+ };
474
+ BundleFile: {
475
+ /**
476
+ * Format: int64
477
+ * @description File size in bytes.
478
+ */
479
+ bytes: number;
480
+ /** @description Path inside the bundle (may contain slashes, e.g. fills/2026-11/...). */
481
+ path: string;
482
+ /** @description Hex-encoded SHA-256 of the file contents. */
483
+ sha256: string;
484
+ };
485
+ BundleList: {
486
+ /** @description Bundles the account can download. */
487
+ bundles: components["schemas"]["Bundle"][];
488
+ /**
489
+ * @description Bundles locked behind a higher plan, for the upgrade prompt.
490
+ * Free always receives History and Builder entries here.
491
+ */
492
+ locked_bundles: components["schemas"]["LockedBundle"][];
493
+ };
494
+ Candle: {
495
+ /**
496
+ * Format: double
497
+ * @description Price of the last trade in the bucket.
498
+ * @example 0.58
499
+ */
500
+ close: number;
501
+ /**
502
+ * Format: int32
503
+ * @description Scale of volume_raw in venue units.
504
+ * @example 6
505
+ */
506
+ decimals: number;
507
+ /**
508
+ * Format: double
509
+ * @description Highest trade price in the bucket.
510
+ * @example 0.59
511
+ */
512
+ high: number;
513
+ /**
514
+ * Format: double
515
+ * @description Lowest trade price in the bucket.
516
+ * @example 0.56
517
+ */
518
+ low: number;
519
+ /**
520
+ * @description Venue-native market identifier.
521
+ * @example 0x8b2e5f0c4d7a19e3b6f2c8a0d4e7b1f39c5a2d8e6b0f4c7a1d9e3b5f8c2a6d40
522
+ */
523
+ market_id: string;
524
+ /**
525
+ * Format: double
526
+ * @description Price of the first trade in the bucket.
527
+ * @example 0.57
528
+ */
529
+ open: number;
530
+ /**
531
+ * @description Candle bucket size: 1m, 1h or 1d.
532
+ * @example 1h
533
+ * @enum {string}
534
+ */
535
+ res: "1m" | "1h" | "1d";
536
+ /**
537
+ * @description Data schema version for this row.
538
+ * @example 1.2.0
539
+ */
540
+ schema_version: string;
541
+ /**
542
+ * @description Token or outcome identifier for this series.
543
+ * @example 48331043336612883890938759509493159234755048973500640148014422747788308965732
544
+ */
545
+ token_id: string;
546
+ /**
547
+ * Format: int64
548
+ * @description Number of trades in the bucket.
549
+ * @example 37
550
+ */
551
+ trades: number;
552
+ /**
553
+ * Format: date-time
554
+ * @description Bucket start time, UTC.
555
+ * @example 2026-11-02T14:00:00Z
556
+ */
557
+ ts: string;
558
+ /**
559
+ * @description Venue key that owns this market.
560
+ * @example polymarket
561
+ */
562
+ venue: string;
563
+ /**
564
+ * Format: double
565
+ * @description Sum of trade size in the bucket, in units (volume_raw scaled by decimals).
566
+ * @example 1840.5
567
+ */
568
+ volume: number;
569
+ /**
570
+ * Format: int64
571
+ * @description Exact sum of size_raw in the bucket.
572
+ * @example 1840500000
573
+ */
574
+ volume_raw: number;
575
+ };
576
+ CandleList: {
577
+ data: components["schemas"]["Candle"][];
578
+ next_cursor: components["schemas"]["NextCursor"];
579
+ };
580
+ DownloadURL: {
581
+ /** Format: date-time */
582
+ expires_at: string;
583
+ /**
584
+ * Format: uri
585
+ * @description Presigned https URL for one file. It is signed with
586
+ * response-content-disposition=attachment and the file's base name,
587
+ * so every file (Parquet, README.md, manifest.json, CHECKSUMS.sha256,
588
+ * LICENSE files) downloads instead of opening in the browser tab.
589
+ */
590
+ url: string;
591
+ };
592
+ DownloadURLRequest: {
593
+ /** @description Path inside the bundle (may contain slashes). */
594
+ path: string;
595
+ };
596
+ ErrorBody: {
597
+ /**
598
+ * @description Set on blocked: why the data policy withholds this venue's data
599
+ * (licence_undecided, licence_derived_only or geo_policy). Null
600
+ * otherwise.
601
+ */
602
+ block_reason_code?: string | null;
603
+ code: components["schemas"]["ErrorCode"];
604
+ /**
605
+ * Format: uri
606
+ * @description The section of the docs errors page for this code, https://docs.skewtape.com/errors#<code>.
607
+ * @example https://docs.skewtape.com/errors#forbidden_plan
608
+ */
609
+ docs_url: string;
610
+ /**
611
+ * @description Plain sentence saying what to do.
612
+ * @example This requires the builder plan.
613
+ */
614
+ message: string;
615
+ /**
616
+ * @description Set on forbidden_plan: the plan that unlocks the request. Null
617
+ * otherwise.
618
+ * @example builder
619
+ */
620
+ plan?: components["schemas"]["PlanId"] | null;
621
+ /**
622
+ * @description Same value as the X-Request-Id response header.
623
+ * @example kq3ZcW7nB0pXv5RtLm9YhJ2sDf8GaQ1e
624
+ */
625
+ request_id: string;
626
+ /**
627
+ * Format: date-time
628
+ * @description Set on quota_exceeded: UTC time when the monthly quota resets.
629
+ * Null otherwise.
630
+ */
631
+ resets_at?: string | null;
632
+ /**
633
+ * Format: uri
634
+ * @description Set on quota_exceeded: URL for upgrading the plan. Null otherwise.
635
+ */
636
+ upgrade_url?: string | null;
637
+ };
638
+ /**
639
+ * @description Machine-readable error code. docs_url links to its section of
640
+ * https://docs.skewtape.com/errors. docs_unavailable comes only from the
641
+ * MCP docs tools, when the server holds no docs index; the REST API
642
+ * never returns it. lookup_rate_limited (429) is the per-address limit
643
+ * on invalid API keys, apart from rate_limited so that a client does
644
+ * not retry a bad key: fix the key first.
645
+ * @enum {string}
646
+ */
647
+ ErrorCode: "unauthorized" | "forbidden_plan" | "blocked" | "not_found" | "invalid_request" | "rate_limited" | "lookup_rate_limited" | "quota_exceeded" | "internal" | "docs_unavailable";
648
+ ErrorEnvelope: {
649
+ error: components["schemas"]["ErrorBody"];
650
+ };
651
+ Fee: {
652
+ /**
653
+ * @description Category this schedule covers, or * for every category.
654
+ * @example crypto
655
+ */
656
+ category: string;
657
+ /**
658
+ * Format: date-time
659
+ * @description Start of the period this schedule is in force, UTC.
660
+ * @example 2026-10-28T00:00:00Z
661
+ */
662
+ effective_from: string;
663
+ /**
664
+ * Format: date-time
665
+ * @description End of the period this schedule is in force, UTC. Null means open-ended.
666
+ */
667
+ effective_to?: string | null;
668
+ /**
669
+ * @description Fee formula.
670
+ * @example quadratic
671
+ * @enum {string}
672
+ */
673
+ formula: "quadratic" | "complement" | "flat_bps" | "zero";
674
+ /**
675
+ * @description Maker rebate parameters in micro-units keyed by name.
676
+ * @example {
677
+ * "rebate_share_micros": 200000
678
+ * }
679
+ */
680
+ maker_rebate_params: {
681
+ [key: string]: number;
682
+ };
683
+ /**
684
+ * Format: int64
685
+ * @description Minimum fee in micro-units when the venue sets one.
686
+ */
687
+ min_fee_micros?: number | null;
688
+ /**
689
+ * @description Rounding mode.
690
+ * @example down
691
+ * @enum {string}
692
+ */
693
+ rounding: "none" | "up" | "down" | "nearest";
694
+ /**
695
+ * @description Data schema version for this row.
696
+ * @example 1.0.0
697
+ */
698
+ schema_version: string;
699
+ /**
700
+ * @description Public URL of the fee schedule this row was taken from.
701
+ * @example https://docs.polymarket.com/trading/fees
702
+ */
703
+ source_url: string;
704
+ /**
705
+ * @description Taker fee parameters in micro-units keyed by name.
706
+ * @example {
707
+ * "rate_micros": 70000,
708
+ * "round_step_micros": 10
709
+ * }
710
+ */
711
+ taker_params: {
712
+ [key: string]: number;
713
+ };
714
+ /**
715
+ * @description Venue key this fee schedule applies to.
716
+ * @example polymarket
717
+ */
718
+ venue: string;
719
+ };
720
+ FeeList: {
721
+ data: components["schemas"]["Fee"][];
722
+ next_cursor: components["schemas"]["NextCursor"];
723
+ };
724
+ Fill: {
725
+ /**
726
+ * Format: int64
727
+ * @description Block number when known. Null when the venue has no blocks.
728
+ * @example 87998415
729
+ */
730
+ block_number?: number | null;
731
+ /**
732
+ * @description Why fields are withheld: licence_undecided, licence_derived_only or
733
+ * geo_policy. Null when blocked is false.
734
+ */
735
+ block_reason_code: string | null;
736
+ /**
737
+ * @description True when the data policy withholds some of this row's fields for
738
+ * this request. Those fields are null and block_reason_code says why.
739
+ * @example false
740
+ */
741
+ blocked: boolean;
742
+ /**
743
+ * @description Venue contract version such as v1, v2 or v3; for polymarket the V1 exchanges, the CTF V2 exchanges and ExchangeV3.
744
+ * @example v2
745
+ */
746
+ contract_version: string;
747
+ /**
748
+ * Format: int32
749
+ * @description Scale of the raw size and notional columns.
750
+ * @example 6
751
+ */
752
+ decimals: number;
753
+ /**
754
+ * Format: int64
755
+ * @description Exact fee in venue raw units when known.
756
+ * @example 0
757
+ */
758
+ fee_raw?: number | null;
759
+ /**
760
+ * @description Match leg: maker or taker.
761
+ * @example maker
762
+ * @enum {string}
763
+ */
764
+ leg: "maker" | "taker";
765
+ /**
766
+ * Format: int64
767
+ * @description Log index of the fill's event on chain. 0 on Kalshi, which has no chain log.
768
+ * @example 41
769
+ */
770
+ log_index: number;
771
+ /**
772
+ * @description Maker address when published.
773
+ * @example 0x3e9d1c7a5b2f8e4d6c0a9b1f7e3d5c2a8b4f6e01
774
+ */
775
+ maker: string;
776
+ /**
777
+ * @description Venue-native market identifier.
778
+ * @example 0x8b2e5f0c4d7a19e3b6f2c8a0d4e7b1f39c5a2d8e6b0f4c7a1d9e3b5f8c2a6d40
779
+ */
780
+ market_id: string;
781
+ /**
782
+ * @description How the trade was matched: clob for an order book match, amm for a trade against an automated market maker pool, where the row is the whole trade with the pool as maker. Rows written before 1.2.0 are clob.
783
+ * @example clob
784
+ * @enum {string}
785
+ */
786
+ match_model: "amm" | "clob";
787
+ /**
788
+ * Format: int64
789
+ * @description Exact notional in venue raw units.
790
+ * @example 14500000
791
+ */
792
+ notional_raw: number;
793
+ /**
794
+ * Format: double
795
+ * @description Derived convenience price equal to notional_raw divided by size_raw.
796
+ * The REST API does not withhold it today. It is nullable so that a
797
+ * data policy rule can withhold it later, with blocked true.
798
+ * @example 0.58
799
+ */
800
+ price: number | null;
801
+ /**
802
+ * @description Data schema version for this row.
803
+ * @example 1.2.0
804
+ */
805
+ schema_version: string;
806
+ /**
807
+ * @description Buy or sell from the taker view.
808
+ * @example buy
809
+ * @enum {string}
810
+ */
811
+ side: "buy" | "sell";
812
+ /**
813
+ * Format: int64
814
+ * @description Exact size in venue raw units.
815
+ * @example 25000000
816
+ */
817
+ size_raw: number;
818
+ /**
819
+ * @description Taker address when published.
820
+ * @example 0x7a2c9e4b1d6f3a8c5e0b2d7f9a4c6e1b3d8f5a20
821
+ */
822
+ taker: string;
823
+ /**
824
+ * @description Token or outcome identifier for this fill.
825
+ * @example 48331043336612883890938759509493159234755048973500640148014422747788308965732
826
+ */
827
+ token_id: string;
828
+ /**
829
+ * Format: date-time
830
+ * @description Fill time from the block or venue clock, UTC.
831
+ * @example 2026-11-02T14:03:27Z
832
+ */
833
+ ts: string;
834
+ /**
835
+ * @description Transaction hash of the fill on chain. On Kalshi, which has no chain, the venue's trade id. Part of the fill's identity with venue and log_index.
836
+ * @example 0x5c1e7a9d3f2b8e4c6a0d1f7b9e3c5a2d8f4b6e0c9a1d3f5b7e2c4a6d8f0b1e3c
837
+ */
838
+ tx_hash: string;
839
+ /**
840
+ * @description Venue key that owns this market.
841
+ * @example polymarket
842
+ */
843
+ venue: string;
844
+ };
845
+ FillList: {
846
+ data: components["schemas"]["Fill"][];
847
+ next_cursor: components["schemas"]["NextCursor"];
848
+ };
849
+ LockedBundle: {
850
+ /** @description Short description for the upgrade prompt. */
851
+ description: string;
852
+ name: string;
853
+ plan: components["schemas"]["PlanId"];
854
+ };
855
+ Market: {
856
+ /**
857
+ * @description Why fields are withheld: licence_undecided, licence_derived_only or
858
+ * geo_policy. Null when blocked is false.
859
+ */
860
+ block_reason_code: string | null;
861
+ /**
862
+ * @description True when the data policy withholds some of this row's fields for
863
+ * this request. Those fields are null and block_reason_code says why.
864
+ * @example false
865
+ */
866
+ blocked: boolean;
867
+ /**
868
+ * @description Venue category label when present.
869
+ * @example Sports
870
+ */
871
+ category?: string | null;
872
+ /**
873
+ * Format: date-time
874
+ * @description Time the market closed for trading, UTC.
875
+ * @example 2026-11-03T10:00:16Z
876
+ */
877
+ close_at?: string | null;
878
+ /**
879
+ * @description The fees.category row that prices this market's taker fee (schema
880
+ * 1.3.0), in force while the market was open: for Polymarket the fee
881
+ * schedule category derived from the market's category label as the
882
+ * venue publishes it (other when the label is unknown; null when the
883
+ * label could name more than one row, such as Sports), for Kalshi
884
+ * the series' fee_type and fee_multiplier as fee_type:multiplier
885
+ * (quadratic:1), moved by a scheduled change only on the markets
886
+ * open at its time. Null until the venue has told us, and null when
887
+ * the data policy withholds it (it is derived from the market text).
888
+ * @example quadratic:1
889
+ */
890
+ fee_category?: string | null;
891
+ /**
892
+ * Format: date-time
893
+ * @description Time of the first known trade, UTC.
894
+ * @example 2026-11-01T09:14:52Z
895
+ */
896
+ first_trade_at?: string | null;
897
+ /**
898
+ * Format: date-time
899
+ * @description Time of the latest known trade, UTC.
900
+ * @example 2026-11-03T09:58:41Z
901
+ */
902
+ last_trade_at?: string | null;
903
+ /**
904
+ * @description Venue-native market identifier.
905
+ * @example KXKBORFI-26NOV030430SAMKTW-Y
906
+ */
907
+ market_id: string;
908
+ /**
909
+ * Format: date-time
910
+ * @description Time the market opened for trading, UTC.
911
+ * @example 2026-11-01T09:11:00Z
912
+ */
913
+ open_at?: string | null;
914
+ /** @description Selectable outcomes with labels and token ids. */
915
+ outcomes: components["schemas"]["Outcome"][];
916
+ /**
917
+ * @description Markers Skewtape sets on a market to treat with care, such as oracle_unlisted (a Polymarket condition prepared by an oracle outside the listed set) or migration (a Polymarket Protocol V2 market that stands for an older one). Empty when there are none.
918
+ * @example []
919
+ */
920
+ quality_flags: string[];
921
+ /**
922
+ * @description Market question text as published by the venue.
923
+ * @example Samsung Lions vs KT Wiz: First Inning Run?
924
+ */
925
+ question?: string | null;
926
+ /**
927
+ * @description Hash of rules_text used to detect rule changes. Null when the data
928
+ * policy withholds rules_text.
929
+ * @example ed2d48f5d923eb398397163541b39374ee483fa8109964a99d80aff8643e0758
930
+ */
931
+ rules_hash?: string | null;
932
+ /**
933
+ * @description Full resolution rules text when available.
934
+ * @example If either team scores a run in the first inning of the Samsung Lions vs KT Wiz professional Korea KBO baseball game originally scheduled for Nov 3, 2026 at 4:30 AM EST, then the market resolves to Yes.
935
+ *
936
+ * Kalshi is not affiliated, associated, authorized, endorsed by, or in any way officially connected with the Governing League. All trademarks, logos, and brand names are the property of their respective owners.
937
+ */
938
+ rules_text?: string | null;
939
+ /**
940
+ * @description Data schema version for this row.
941
+ * @example 1.2.0
942
+ */
943
+ schema_version: string;
944
+ /** @description Short public slug when the venue publishes one. */
945
+ slug?: string | null;
946
+ /**
947
+ * @description Source that supplied the market text.
948
+ * @example venue_api
949
+ * @enum {string}
950
+ */
951
+ source_kind: "chain" | "venue_api" | "bulk_dataset";
952
+ /**
953
+ * @description Life-cycle status of the market.
954
+ * @example resolved
955
+ * @enum {string}
956
+ */
957
+ status: "open" | "closed" | "resolved" | "voided";
958
+ /**
959
+ * Format: date-time
960
+ * @description Time this row was last updated, UTC.
961
+ * @example 2026-11-03T10:06:17.403377Z
962
+ */
963
+ updated_at: string;
964
+ /**
965
+ * @description Venue key that owns this market.
966
+ * @example kalshi
967
+ */
968
+ venue: string;
969
+ /**
970
+ * @description The venue's own grouping key for sibling markets, when it
971
+ * publishes one: for Polymarket, the id of the event or of the
972
+ * neg-risk group the market belongs to. Not a Skewtape matched
973
+ * event id.
974
+ */
975
+ venue_event_id?: string | null;
976
+ };
977
+ MarketList: {
978
+ data: components["schemas"]["Market"][];
979
+ next_cursor: components["schemas"]["NextCursor"];
980
+ };
981
+ MatchedEvent: {
982
+ /**
983
+ * @description Category of the event, from the same member as question_canonical. Null when question_canonical reads as a member's ids.
984
+ * @example Sports
985
+ */
986
+ category?: string | null;
987
+ /**
988
+ * Format: double
989
+ * @description Overall confidence, the minimum pairwise_confidence of active members.
990
+ * @example 0.96
991
+ */
992
+ confidence: number;
993
+ /**
994
+ * @description Stable matched event identifier.
995
+ * @example st_evt_00412
996
+ */
997
+ event_id: string;
998
+ /** @description Member markets, at least two. */
999
+ members: components["schemas"]["MatchedEventMember"][];
1000
+ /**
1001
+ * @description Version of the matching method used for this matched event.
1002
+ * @example judge_v1/policy_1
1003
+ */
1004
+ method_version: string;
1005
+ /**
1006
+ * @description Canonical question this matched event stands for, in the words of a member whose text the data policy ships for this request. With no such member it reads as the first active member's venue:market_id, for example polymarket:0xabc.
1007
+ * @example Samsung Lions vs KT Wiz: First Inning Run?
1008
+ */
1009
+ question_canonical: string;
1010
+ /**
1011
+ * @description True only if all active members resolve identically.
1012
+ * @example true
1013
+ */
1014
+ resolution_equal: boolean;
1015
+ /** @description Source text the event resolves on. */
1016
+ resolution_source?: string | null;
1017
+ /**
1018
+ * Format: date-time
1019
+ * @description Expected resolution time, UTC.
1020
+ * @example 2026-11-03T10:00:16Z
1021
+ */
1022
+ resolves_at?: string | null;
1023
+ /**
1024
+ * Format: date-time
1025
+ * @description Time of the review decision, UTC.
1026
+ * @example 2026-11-02T03:12:44Z
1027
+ */
1028
+ reviewed_at: string;
1029
+ /**
1030
+ * @description Name or id of the reviewer who approved this matched event.
1031
+ * @example auto:1
1032
+ */
1033
+ reviewer: string;
1034
+ /** @description Full reviewer notes, on the Pro plan; null on the others. */
1035
+ reviewer_notes?: string | null;
1036
+ /**
1037
+ * @description Plain-words note on rule differences. Required when resolution_equal is false.
1038
+ * @example Both settle Yes if either team scores in the first inning of the game scheduled for 3 Nov 2026.
1039
+ */
1040
+ rule_note: string;
1041
+ /**
1042
+ * @description Data schema version for this row.
1043
+ * @example 1.2.0
1044
+ */
1045
+ schema_version: string;
1046
+ /**
1047
+ * @description Review status of the matched event.
1048
+ * @example approved
1049
+ * @enum {string}
1050
+ */
1051
+ status: "approved" | "needs_rereview" | "retired";
1052
+ /**
1053
+ * Format: date-time
1054
+ * @description Time this matched event row was last updated, UTC.
1055
+ * @example 2026-11-02T03:12:44Z
1056
+ */
1057
+ updated_at: string;
1058
+ };
1059
+ MatchedEventList: {
1060
+ data: components["schemas"]["MatchedEvent"][];
1061
+ next_cursor: components["schemas"]["NextCursor"];
1062
+ };
1063
+ MatchedEventMember: {
1064
+ /**
1065
+ * @description Why this member's data is withheld: licence_undecided,
1066
+ * licence_derived_only or geo_policy. Null when blocked is false.
1067
+ */
1068
+ block_reason_code: string | null;
1069
+ /**
1070
+ * @description True when the data policy withholds this member venue's data for
1071
+ * this request. The member ids stay, its venue labels are null, its
1072
+ * outcome_map is empty and block_reason_code says why. Event-level
1073
+ * fields are never withheld.
1074
+ * @example false
1075
+ */
1076
+ blocked: boolean;
1077
+ /**
1078
+ * @description Venue-native market identifier of this member.
1079
+ * @example KXKBORFI-26NOV030430SAMKTW-Y
1080
+ */
1081
+ market_id: string;
1082
+ /**
1083
+ * @description Map from this member outcome to the matching outcome on other members.
1084
+ * @example {
1085
+ * "no": "no",
1086
+ * "yes": "yes"
1087
+ * }
1088
+ */
1089
+ outcome_map: {
1090
+ [key: string]: string;
1091
+ };
1092
+ /**
1093
+ * Format: double
1094
+ * @description The lowest confidence between this member and any other active member.
1095
+ * @example 0.96
1096
+ */
1097
+ pairwise_confidence: number;
1098
+ /**
1099
+ * @description Keys (venue:market_id) of members that resolve the same as this one.
1100
+ * @example [
1101
+ * "polymarket:0x8b2e5f0c4d7a19e3b6f2c8a0d4e7b1f39c5a2d8e6b0f4c7a1d9e3b5f8c2a6d40"
1102
+ * ]
1103
+ */
1104
+ resolution_equal_with: string[];
1105
+ /** @description How this member's rules differ from the others. */
1106
+ rule_variant_notes?: string | null;
1107
+ /**
1108
+ * @description Venue label for the no side. Binary markets only.
1109
+ * @example Yes
1110
+ */
1111
+ side_no_label?: string | null;
1112
+ /**
1113
+ * @description Venue label for the yes side. Binary markets only.
1114
+ * @example Yes
1115
+ */
1116
+ side_yes_label?: string | null;
1117
+ /**
1118
+ * @description Whether this member participates in confidence and resolution_equal.
1119
+ * @example active
1120
+ * @enum {string}
1121
+ */
1122
+ status: "active" | "inactive";
1123
+ /**
1124
+ * @description Venue key of this member market.
1125
+ * @example kalshi
1126
+ */
1127
+ venue: string;
1128
+ };
1129
+ /**
1130
+ * @description Opaque cursor for the next page, or null when there is no further
1131
+ * page. Pass it as the cursor query parameter.
1132
+ */
1133
+ NextCursor: string | null;
1134
+ Outcome: {
1135
+ /**
1136
+ * @description Outcome label as shown by the venue.
1137
+ * @example Yes
1138
+ */
1139
+ label: string;
1140
+ /**
1141
+ * @description Venue token or outcome identifier.
1142
+ * @example yes
1143
+ */
1144
+ token_id: string;
1145
+ };
1146
+ Pair: {
1147
+ /**
1148
+ * Format: double
1149
+ * @description Match confidence from 0 to 1.
1150
+ * @example 0.96
1151
+ */
1152
+ confidence: number;
1153
+ /** @description The two active member markets. */
1154
+ members: components["schemas"]["PairMember"][];
1155
+ /**
1156
+ * @description Version of the matching method used for this pair.
1157
+ * @example judge_v1/policy_1
1158
+ */
1159
+ method_version: string;
1160
+ /**
1161
+ * @description Identifier of the two-member matched event: the same value as its
1162
+ * event_id (st_evt_...).
1163
+ * @example st_evt_00412
1164
+ */
1165
+ pair_id: string;
1166
+ /**
1167
+ * @description True when member venues would settle the same question the same way.
1168
+ * @example true
1169
+ */
1170
+ resolution_equal: boolean;
1171
+ /**
1172
+ * Format: date-time
1173
+ * @description Time of the review decision, UTC.
1174
+ * @example 2026-11-02T03:12:44Z
1175
+ */
1176
+ reviewed_at: string;
1177
+ /**
1178
+ * @description Name or id of the reviewer who approved this pair.
1179
+ * @example auto:1
1180
+ */
1181
+ reviewer: string;
1182
+ /** @description Full reviewer notes, on the Pro plan; null on the others. */
1183
+ reviewer_notes?: string | null;
1184
+ /**
1185
+ * @description Plain-words note on rule differences. Required when resolution_equal is false.
1186
+ * @example Both settle Yes if either team scores in the first inning of the game scheduled for 3 Nov 2026.
1187
+ */
1188
+ rule_note: string;
1189
+ /**
1190
+ * @description Data schema version for this row.
1191
+ * @example 1.2.0
1192
+ */
1193
+ schema_version: string;
1194
+ /**
1195
+ * @description Pair status.
1196
+ * @example approved
1197
+ * @enum {string}
1198
+ */
1199
+ status: "approved" | "needs_rereview" | "retired";
1200
+ /**
1201
+ * Format: date-time
1202
+ * @description Time this pair row was last updated, UTC.
1203
+ * @example 2026-11-02T03:12:44Z
1204
+ */
1205
+ updated_at: string;
1206
+ };
1207
+ PairList: {
1208
+ data: components["schemas"]["Pair"][];
1209
+ next_cursor: components["schemas"]["NextCursor"];
1210
+ };
1211
+ PairMember: {
1212
+ /**
1213
+ * @description Why this member's data is withheld: licence_undecided,
1214
+ * licence_derived_only or geo_policy. Null when blocked is false.
1215
+ */
1216
+ block_reason_code: string | null;
1217
+ /**
1218
+ * @description True when the data policy withholds this member venue's data for
1219
+ * this request. The member ids stay, its outcome_map is empty and
1220
+ * block_reason_code says why.
1221
+ * @example false
1222
+ */
1223
+ blocked: boolean;
1224
+ /**
1225
+ * @description Venue-native market identifier of this member.
1226
+ * @example KXKBORFI-26NOV030430SAMKTW-Y
1227
+ */
1228
+ market_id: string;
1229
+ /**
1230
+ * @description Map from this member outcome to the matching outcome on the other side.
1231
+ * @example {
1232
+ * "no": "no",
1233
+ * "yes": "yes"
1234
+ * }
1235
+ */
1236
+ outcome_map: {
1237
+ [key: string]: string;
1238
+ };
1239
+ /**
1240
+ * @description Venue key of this member market.
1241
+ * @example kalshi
1242
+ */
1243
+ venue: string;
1244
+ };
1245
+ /**
1246
+ * @description Plan id: free, history, builder or pro. The dashboard shows each
1247
+ * plan's name and what it includes.
1248
+ * @enum {string}
1249
+ */
1250
+ PlanId: "free" | "history" | "builder" | "pro";
1251
+ QuoteContext: {
1252
+ /**
1253
+ * Format: date-time
1254
+ * @description When the context was built, UTC. Each member's fee row is the one in force then.
1255
+ * @example 2026-11-14T15:00:00Z
1256
+ */
1257
+ as_of: string;
1258
+ /**
1259
+ * @description The matched event this context is for.
1260
+ * @example st_evt_00412
1261
+ */
1262
+ event_id: string;
1263
+ /** @description The event's active members, in the event's order. */
1264
+ members: components["schemas"]["QuoteContextMember"][];
1265
+ /**
1266
+ * @description Canonical question the event stands for, as on the matched event. It is a member's words, or the first active member's venue:market_id (for example polymarket:0xabc) when the data policy ships no member's text for this request.
1267
+ * @example Samsung Lions vs KT Wiz: First Inning Run?
1268
+ */
1269
+ question_canonical: string;
1270
+ /**
1271
+ * @description True only if all active members resolve identically. sk.quote
1272
+ * refuses a quote when it is false unless the caller allows it
1273
+ * (allow_rule_mismatch), and then shows rule_note.
1274
+ * @example true
1275
+ */
1276
+ resolution_equal: boolean;
1277
+ /**
1278
+ * @description Plain-words note on rule differences.
1279
+ * @example Both settle Yes if either team scores in the first inning of the game scheduled for 3 Nov 2026.
1280
+ */
1281
+ rule_note: string;
1282
+ };
1283
+ QuoteContextMember: {
1284
+ /**
1285
+ * @description Why this member's data is withheld: licence_undecided,
1286
+ * licence_derived_only or geo_policy. Null when blocked is false.
1287
+ */
1288
+ block_reason_code: string | null;
1289
+ /**
1290
+ * @description True when the data policy withholds some of this member venue's
1291
+ * data for this request: the whole venue (fee_status blocked: the
1292
+ * ids stay; labels, outcome map, tokens and fee do not) or its fee
1293
+ * category (fee_status masked: the tokens and outcome map stay, the
1294
+ * fee does not). sk.quote leaves out a member whose fee_status is
1295
+ * blocked and quotes a masked one with its fee unknown.
1296
+ * @example false
1297
+ */
1298
+ blocked: boolean;
1299
+ /** @description The fee row that prices the member's market at as_of; null unless fee_status is ok. */
1300
+ fee: components["schemas"]["Fee"] | null;
1301
+ /**
1302
+ * @description The fee category that prices the member's market (markets.fee_category);
1303
+ * null when the market has none or the data policy withholds it.
1304
+ * @example quadratic:1
1305
+ */
1306
+ fee_category: string | null;
1307
+ /**
1308
+ * @description How the venue charges a taker order that crosses several price
1309
+ * levels: on the order's totals (order: Polymarket's taker fill
1310
+ * carries the whole order) or on each level's fill, rounded each
1311
+ * (level: Kalshi rounds each trade).
1312
+ * @example level
1313
+ * @enum {string}
1314
+ */
1315
+ fee_per: "order" | "level";
1316
+ /**
1317
+ * @description ok: fee is the row in force for the market's fee category at as_of.
1318
+ * no_row: no row is in force (or the market has no fee category).
1319
+ * masked: the data policy withholds the fee category, which a fee
1320
+ * row would give back. blocked: the member is blocked. Only ok
1321
+ * carries a fee; sk.quote counts no fee for the others and says so.
1322
+ * @example ok
1323
+ * @enum {string}
1324
+ */
1325
+ fee_status: "ok" | "no_row" | "masked" | "blocked";
1326
+ /**
1327
+ * @description Venue-native market identifier of this member.
1328
+ * @example KXKBORFI-26NOV030430SAMKTW-Y
1329
+ */
1330
+ market_id: string;
1331
+ /**
1332
+ * @description Map from this member's outcome to the event's outcome; empty when the member's venue is blocked (fee_status blocked).
1333
+ * @example {
1334
+ * "no": "no",
1335
+ * "yes": "yes"
1336
+ * }
1337
+ */
1338
+ outcome_map: {
1339
+ [key: string]: string;
1340
+ };
1341
+ /**
1342
+ * @description Venue label for the no side. Binary markets only.
1343
+ * @example No
1344
+ */
1345
+ side_no_label?: string | null;
1346
+ /**
1347
+ * @description Venue label for the yes side. Binary markets only.
1348
+ * @example Yes
1349
+ */
1350
+ side_yes_label?: string | null;
1351
+ /**
1352
+ * @description The member market's outcomes with their venue token ids, whose
1353
+ * books sk.quote reads. An outcome's name in outcome_map is its
1354
+ * label, or its token_id when the market gives two outcomes the
1355
+ * same label. Empty when the member's venue is blocked (fee_status
1356
+ * blocked).
1357
+ */
1358
+ tokens: components["schemas"]["Outcome"][];
1359
+ /**
1360
+ * @description Venue key of this member market.
1361
+ * @example kalshi
1362
+ */
1363
+ venue: string;
1364
+ };
1365
+ Resolution: {
1366
+ /**
1367
+ * Format: date-time
1368
+ * @description Time this event row was recorded, UTC.
1369
+ * @example 2026-11-03T10:06:17.403377Z
1370
+ */
1371
+ created_at: string;
1372
+ /**
1373
+ * @description Resolution step.
1374
+ * @example resolved
1375
+ * @enum {string}
1376
+ */
1377
+ event_type: "pending" | "proposed" | "disputed" | "reset" | "resolved" | "reversed" | "voided";
1378
+ /**
1379
+ * @description True when this event is the current state of the market.
1380
+ * @example true
1381
+ */
1382
+ is_current: boolean;
1383
+ /**
1384
+ * @description Venue-native market identifier.
1385
+ * @example KXKBORFI-26NOV030430SAMKTW-Y
1386
+ */
1387
+ market_id: string;
1388
+ /**
1389
+ * @description The outcome this event sets or proposes, when it sets one. The outcome's label on Polymarket (1 or 2), and its token_id on Kalshi (yes or no), where both outcomes can carry one label.
1390
+ * @example yes
1391
+ */
1392
+ outcome?: string | null;
1393
+ /**
1394
+ * Format: date-time
1395
+ * @description Time associated with this resolution step, UTC.
1396
+ * @example 2026-11-03T10:06:17.298554Z
1397
+ */
1398
+ resolved_at?: string | null;
1399
+ /**
1400
+ * @description Data schema version for this row.
1401
+ * @example 1.2.0
1402
+ */
1403
+ schema_version: string;
1404
+ /**
1405
+ * Format: int32
1406
+ * @description Order of events for this market.
1407
+ * @example 1
1408
+ */
1409
+ seq: number;
1410
+ /**
1411
+ * @description Source of this event.
1412
+ * @example venue_api
1413
+ * @enum {string}
1414
+ */
1415
+ source_kind: "chain" | "venue_api" | "bulk_dataset";
1416
+ /**
1417
+ * @description Transaction hash or API reference for this event.
1418
+ * @example KXKBORFI-26NOV030430SAMKTW-Y
1419
+ */
1420
+ source_ref?: string | null;
1421
+ /**
1422
+ * @description Source text that explains the resolution step.
1423
+ * @example If either team scores a run in the first inning of the Samsung Lions vs KT Wiz professional Korea KBO baseball game originally scheduled for Nov 3, 2026 at 4:30 AM EST, then the market resolves to Yes.
1424
+ *
1425
+ * Kalshi is not affiliated, associated, authorized, endorsed by, or in any way officially connected with the Governing League. All trademarks, logos, and brand names are the property of their respective owners.
1426
+ */
1427
+ source_text?: string | null;
1428
+ /**
1429
+ * @description Venue key that owns this market.
1430
+ * @example kalshi
1431
+ */
1432
+ venue: string;
1433
+ };
1434
+ ResolutionList: {
1435
+ data: components["schemas"]["Resolution"][];
1436
+ next_cursor: components["schemas"]["NextCursor"];
1437
+ };
1438
+ Venue: {
1439
+ /**
1440
+ * @description True when the venue is still in beta.
1441
+ * @example false
1442
+ */
1443
+ beta: boolean;
1444
+ coverage?: components["schemas"]["VenueCoverage"];
1445
+ /**
1446
+ * @description Notices about this venue's data, such as volume_quality_flagged. Empty when there are none.
1447
+ * @example []
1448
+ */
1449
+ flags: string[];
1450
+ /**
1451
+ * @description Venue key, as the venue query parameters take it.
1452
+ * @example polymarket
1453
+ */
1454
+ key: string;
1455
+ /** @description The rights and earliest history of each kind of data. */
1456
+ rights: components["schemas"]["VenueKindRights"][];
1457
+ };
1458
+ /** @description How many of the venue's closed markets carry a final resolution, and when that was last counted. Absent until it has been counted. */
1459
+ VenueCoverage: {
1460
+ /**
1461
+ * Format: int32
1462
+ * @description Closed markets counted for resolution coverage.
1463
+ * @example 41230
1464
+ */
1465
+ closed_markets: number | null;
1466
+ /**
1467
+ * Format: date-time
1468
+ * @description When this coverage snapshot was written, UTC.
1469
+ * @example 2026-11-13T06:00:00Z
1470
+ */
1471
+ computed_at: string | null;
1472
+ /**
1473
+ * Format: double
1474
+ * @description Share of closed markets with a final resolution, in percent. Null when there are no closed markets.
1475
+ * @example 99.69
1476
+ */
1477
+ coverage_percent: number | null;
1478
+ /**
1479
+ * Format: int32
1480
+ * @description Closed markets that have a final resolution label.
1481
+ * @example 41102
1482
+ */
1483
+ with_final_resolution: number | null;
1484
+ };
1485
+ VenueKindRights: {
1486
+ /**
1487
+ * Format: date-time
1488
+ * @description Earliest time Skewtape holds this kind from, or null when unknown.
1489
+ * @example 2020-09-01T00:00:00Z
1490
+ */
1491
+ history_from?: string | null;
1492
+ /**
1493
+ * @description Data kind.
1494
+ * @example trades
1495
+ * @enum {string}
1496
+ */
1497
+ kind: "markets" | "trades" | "resolutions";
1498
+ /**
1499
+ * @description What the source's recorded terms allow for this kind: raw,
1500
+ * derived_only (only derived use, such as matching) or none. With
1501
+ * derived_only or none the rows are not served. With raw they are
1502
+ * served where the data policy allows: the policy decides what each
1503
+ * request gets, and a response says so through blocked and
1504
+ * block_reason_code, or by leaving the venue's rows out. A venue can
1505
+ * show raw here and be blocked for every request. See
1506
+ * https://docs.skewtape.com/rights.
1507
+ * @example raw
1508
+ * @enum {string}
1509
+ */
1510
+ rights: "raw" | "derived_only" | "none";
1511
+ };
1512
+ VenueList: {
1513
+ data: components["schemas"]["Venue"][];
1514
+ /**
1515
+ * @description The name of the data policy in force for every request:
1516
+ * embedded is the one the data rights page describes.
1517
+ * @example embedded
1518
+ */
1519
+ geoblock_policy: string;
1520
+ };
1521
+ };
1522
+ responses: {
1523
+ /**
1524
+ * @description forbidden_plan: the plan does not allow this request, and error.plan
1525
+ * names the unlocking plan. blocked: the data policy withholds this
1526
+ * venue's data, and error.block_reason_code says why.
1527
+ */
1528
+ Forbidden: {
1529
+ headers: {
1530
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
1531
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
1532
+ "X-Request-Id": components["headers"]["X-Request-Id"];
1533
+ [name: string]: unknown;
1534
+ };
1535
+ content: {
1536
+ "application/json": components["schemas"]["ErrorEnvelope"];
1537
+ };
1538
+ };
1539
+ /** @description Plan does not allow this request; error.plan names the unlocking plan */
1540
+ ForbiddenPlan: {
1541
+ headers: {
1542
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
1543
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
1544
+ "X-Request-Id": components["headers"]["X-Request-Id"];
1545
+ [name: string]: unknown;
1546
+ };
1547
+ content: {
1548
+ "application/json": components["schemas"]["ErrorEnvelope"];
1549
+ };
1550
+ };
1551
+ /**
1552
+ * @description Server error. Try again later; error.request_id lets support find the
1553
+ * request.
1554
+ */
1555
+ Internal: {
1556
+ headers: {
1557
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
1558
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
1559
+ "X-Request-Id": components["headers"]["X-Request-Id"];
1560
+ [name: string]: unknown;
1561
+ };
1562
+ content: {
1563
+ "application/json": components["schemas"]["ErrorEnvelope"];
1564
+ };
1565
+ };
1566
+ /**
1567
+ * @description Bad request: a parameter is missing, malformed or out of range, or the
1568
+ * combination is not allowed. error.message says what to change.
1569
+ */
1570
+ InvalidRequest: {
1571
+ headers: {
1572
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
1573
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
1574
+ "X-Request-Id": components["headers"]["X-Request-Id"];
1575
+ [name: string]: unknown;
1576
+ };
1577
+ content: {
1578
+ "application/json": components["schemas"]["ErrorEnvelope"];
1579
+ };
1580
+ };
1581
+ /** @description Resource not found */
1582
+ NotFound: {
1583
+ headers: {
1584
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
1585
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
1586
+ "X-Request-Id": components["headers"]["X-Request-Id"];
1587
+ [name: string]: unknown;
1588
+ };
1589
+ content: {
1590
+ "application/json": components["schemas"]["ErrorEnvelope"];
1591
+ };
1592
+ };
1593
+ /**
1594
+ * @description Rate limited; Retry-After set. The per-second limit applies per server
1595
+ * instance, so occasional bursts above the stated rate are possible.
1596
+ * Monthly limits are strict.
1597
+ */
1598
+ RateLimited: {
1599
+ headers: {
1600
+ "Retry-After": components["headers"]["Retry-After"];
1601
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
1602
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
1603
+ "X-Request-Id": components["headers"]["X-Request-Id"];
1604
+ [name: string]: unknown;
1605
+ };
1606
+ content: {
1607
+ "application/json": components["schemas"]["ErrorEnvelope"];
1608
+ };
1609
+ };
1610
+ /**
1611
+ * @description No valid credentials. On the data API: the X-API-Key header is
1612
+ * missing or malformed, or names an unknown or revoked key.
1613
+ */
1614
+ Unauthorized: {
1615
+ headers: {
1616
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
1617
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
1618
+ "X-Request-Id": components["headers"]["X-Request-Id"];
1619
+ [name: string]: unknown;
1620
+ };
1621
+ content: {
1622
+ "application/json": components["schemas"]["ErrorEnvelope"];
1623
+ };
1624
+ };
1625
+ };
1626
+ parameters: {
1627
+ /**
1628
+ * @description Opaque pagination cursor from a previous next_cursor. Bound to the
1629
+ * operation and its query filters (not limit). Tampered, malformed,
1630
+ * foreign-route or foreign-query cursors are 400 invalid_request with
1631
+ * no detail.
1632
+ */
1633
+ Cursor: string;
1634
+ /**
1635
+ * @description Page size. Default 100, maximum 1,000. It may change from one page
1636
+ * to the next; the cursor does not depend on it.
1637
+ */
1638
+ Limit: number;
1639
+ };
1640
+ requestBodies: never;
1641
+ headers: {
1642
+ /** @description Seconds to wait before retrying (429 responses). */
1643
+ "Retry-After": number;
1644
+ /** @description Requests allowed in the current window for this caller. */
1645
+ "X-RateLimit-Limit": number;
1646
+ /** @description Requests remaining in the current window for this caller. */
1647
+ "X-RateLimit-Remaining": number;
1648
+ /** @description Unique id for this request; echoed in error.request_id. */
1649
+ "X-Request-Id": string;
1650
+ };
1651
+ pathItems: never;
1652
+ }
1653
+ export type $defs = Record<string, never>;
1654
+ export interface operations {
1655
+ listBundles: {
1656
+ parameters: {
1657
+ query?: never;
1658
+ header?: never;
1659
+ path?: never;
1660
+ cookie?: never;
1661
+ };
1662
+ requestBody?: never;
1663
+ responses: {
1664
+ /** @description Bundles */
1665
+ 200: {
1666
+ headers: {
1667
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
1668
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
1669
+ "X-Request-Id": components["headers"]["X-Request-Id"];
1670
+ [name: string]: unknown;
1671
+ };
1672
+ content: {
1673
+ "application/json": components["schemas"]["BundleList"];
1674
+ };
1675
+ };
1676
+ 401: components["responses"]["Unauthorized"];
1677
+ 403: components["responses"]["ForbiddenPlan"];
1678
+ 404: components["responses"]["NotFound"];
1679
+ 429: components["responses"]["RateLimited"];
1680
+ 500: components["responses"]["Internal"];
1681
+ };
1682
+ };
1683
+ listCandles: {
1684
+ parameters: {
1685
+ query: {
1686
+ /**
1687
+ * @description Venue key. Required with market_id, or alone for a venue-wide
1688
+ * range of at most 7 days. Must not be set with event_id.
1689
+ */
1690
+ venue?: string;
1691
+ /**
1692
+ * @description One market. Requires venue. Must not be set with event_id or with
1693
+ * venue alone.
1694
+ */
1695
+ market_id?: string;
1696
+ /**
1697
+ * @description Matched event id. Reads active members only, in (venue, market_id)
1698
+ * order. Members outside the plan's candle venues are omitted. Must
1699
+ * not be set with venue or market_id.
1700
+ */
1701
+ event_id?: string;
1702
+ /** @description Inclusive start of the time range, UTC. Clamped to the plan's history. */
1703
+ from: string;
1704
+ /**
1705
+ * @description Exclusive end of the time range, UTC. Must be after from. With
1706
+ * venue alone, at most 7 days after from.
1707
+ */
1708
+ to: string;
1709
+ /** @description Candle bucket size. */
1710
+ res: "1m" | "1h" | "1d";
1711
+ /**
1712
+ * @description Page size. Default 100, maximum 1,000. It may change from one page
1713
+ * to the next; the cursor does not depend on it.
1714
+ */
1715
+ limit?: components["parameters"]["Limit"];
1716
+ /**
1717
+ * @description Opaque pagination cursor from a previous next_cursor. Bound to the
1718
+ * operation and its query filters (not limit). Tampered, malformed,
1719
+ * foreign-route or foreign-query cursors are 400 invalid_request with
1720
+ * no detail.
1721
+ */
1722
+ cursor?: components["parameters"]["Cursor"];
1723
+ };
1724
+ header?: never;
1725
+ path?: never;
1726
+ cookie?: never;
1727
+ };
1728
+ requestBody?: never;
1729
+ responses: {
1730
+ /** @description Candles page */
1731
+ 200: {
1732
+ headers: {
1733
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
1734
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
1735
+ "X-Request-Id": components["headers"]["X-Request-Id"];
1736
+ [name: string]: unknown;
1737
+ };
1738
+ content: {
1739
+ "application/json": components["schemas"]["CandleList"];
1740
+ };
1741
+ };
1742
+ 400: components["responses"]["InvalidRequest"];
1743
+ 401: components["responses"]["Unauthorized"];
1744
+ 403: components["responses"]["ForbiddenPlan"];
1745
+ 404: components["responses"]["NotFound"];
1746
+ /**
1747
+ * @description rate_limited: wait the Retry-After seconds, then send again.
1748
+ * quota_exceeded: the month's calls are used; error.resets_at says
1749
+ * when the quota resets and error.upgrade_url where to raise it.
1750
+ * lookup_rate_limited: too many invalid API keys came from this
1751
+ * address; fix the key rather than retry, since every retry with a
1752
+ * bad key counts against the address again.
1753
+ */
1754
+ 429: {
1755
+ headers: {
1756
+ "Retry-After": components["headers"]["Retry-After"];
1757
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
1758
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
1759
+ "X-Request-Id": components["headers"]["X-Request-Id"];
1760
+ [name: string]: unknown;
1761
+ };
1762
+ content: {
1763
+ "application/json": components["schemas"]["ErrorEnvelope"];
1764
+ };
1765
+ };
1766
+ 500: components["responses"]["Internal"];
1767
+ };
1768
+ };
1769
+ postDownloadURL: {
1770
+ parameters: {
1771
+ query?: never;
1772
+ header?: never;
1773
+ path: {
1774
+ /** @description Bundle id or slug. */
1775
+ bundle: string;
1776
+ };
1777
+ cookie?: never;
1778
+ };
1779
+ requestBody: {
1780
+ content: {
1781
+ "application/json": components["schemas"]["DownloadURLRequest"];
1782
+ };
1783
+ };
1784
+ responses: {
1785
+ /** @description Download URL */
1786
+ 200: {
1787
+ headers: {
1788
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
1789
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
1790
+ "X-Request-Id": components["headers"]["X-Request-Id"];
1791
+ [name: string]: unknown;
1792
+ };
1793
+ content: {
1794
+ "application/json": components["schemas"]["DownloadURL"];
1795
+ };
1796
+ };
1797
+ 400: components["responses"]["InvalidRequest"];
1798
+ 401: components["responses"]["Unauthorized"];
1799
+ 403: components["responses"]["Forbidden"];
1800
+ 404: components["responses"]["NotFound"];
1801
+ 429: components["responses"]["RateLimited"];
1802
+ 500: components["responses"]["Internal"];
1803
+ };
1804
+ };
1805
+ connectFeed: {
1806
+ parameters: {
1807
+ query?: never;
1808
+ header?: {
1809
+ /** @description The API key; or send the auth message first. */
1810
+ "X-API-Key"?: string;
1811
+ };
1812
+ path?: never;
1813
+ cookie?: never;
1814
+ };
1815
+ requestBody?: never;
1816
+ responses: {
1817
+ /** @description Switching Protocols. The WebSocket carries the messages described above. */
1818
+ 101: {
1819
+ headers: {
1820
+ [name: string]: unknown;
1821
+ };
1822
+ content?: never;
1823
+ };
1824
+ 401: components["responses"]["Unauthorized"];
1825
+ /**
1826
+ * @description The server is restarting; connect again. The body is the error
1827
+ * envelope, code internal, as for every error the server answers.
1828
+ */
1829
+ 503: {
1830
+ headers: {
1831
+ [name: string]: unknown;
1832
+ };
1833
+ content: {
1834
+ "application/json": components["schemas"]["ErrorEnvelope"];
1835
+ };
1836
+ };
1837
+ };
1838
+ };
1839
+ listFees: {
1840
+ parameters: {
1841
+ query?: {
1842
+ /** @description Restrict to one venue, by its key. */
1843
+ venue?: string;
1844
+ /**
1845
+ * @description Page size. Default 100, maximum 1,000. It may change from one page
1846
+ * to the next; the cursor does not depend on it.
1847
+ */
1848
+ limit?: components["parameters"]["Limit"];
1849
+ /**
1850
+ * @description Opaque pagination cursor from a previous next_cursor. Bound to the
1851
+ * operation and its query filters (not limit). Tampered, malformed,
1852
+ * foreign-route or foreign-query cursors are 400 invalid_request with
1853
+ * no detail.
1854
+ */
1855
+ cursor?: components["parameters"]["Cursor"];
1856
+ };
1857
+ header?: never;
1858
+ path?: never;
1859
+ cookie?: never;
1860
+ };
1861
+ requestBody?: never;
1862
+ responses: {
1863
+ /** @description Fees page */
1864
+ 200: {
1865
+ headers: {
1866
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
1867
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
1868
+ "X-Request-Id": components["headers"]["X-Request-Id"];
1869
+ [name: string]: unknown;
1870
+ };
1871
+ content: {
1872
+ "application/json": components["schemas"]["FeeList"];
1873
+ };
1874
+ };
1875
+ 400: components["responses"]["InvalidRequest"];
1876
+ 401: components["responses"]["Unauthorized"];
1877
+ 403: components["responses"]["ForbiddenPlan"];
1878
+ /**
1879
+ * @description rate_limited: wait the Retry-After seconds, then send again.
1880
+ * quota_exceeded: the month's calls are used; error.resets_at says
1881
+ * when the quota resets and error.upgrade_url where to raise it.
1882
+ * lookup_rate_limited: too many invalid API keys came from this
1883
+ * address; fix the key rather than retry, since every retry with a
1884
+ * bad key counts against the address again.
1885
+ */
1886
+ 429: {
1887
+ headers: {
1888
+ "Retry-After": components["headers"]["Retry-After"];
1889
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
1890
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
1891
+ "X-Request-Id": components["headers"]["X-Request-Id"];
1892
+ [name: string]: unknown;
1893
+ };
1894
+ content: {
1895
+ "application/json": components["schemas"]["ErrorEnvelope"];
1896
+ };
1897
+ };
1898
+ 500: components["responses"]["Internal"];
1899
+ };
1900
+ };
1901
+ listFills: {
1902
+ parameters: {
1903
+ query: {
1904
+ /**
1905
+ * @description Venue key. Required with market_id, or alone for a venue-wide
1906
+ * range of at most 7 days. Must not be set with event_id.
1907
+ */
1908
+ venue?: string;
1909
+ /**
1910
+ * @description One market. Requires venue. Must not be set with event_id or with
1911
+ * venue alone.
1912
+ */
1913
+ market_id?: string;
1914
+ /**
1915
+ * @description Matched event id. Reads active members only, in (venue, market_id)
1916
+ * order. Must not be set with venue or market_id.
1917
+ */
1918
+ event_id?: string;
1919
+ /** @description Inclusive start of the time range, UTC. Clamped to the plan's history. */
1920
+ from: string;
1921
+ /**
1922
+ * @description Exclusive end of the time range, UTC. Must be after from. With
1923
+ * venue alone, at most 7 days after from.
1924
+ */
1925
+ to: string;
1926
+ /**
1927
+ * @description Match leg to return. Default maker. Kalshi publishes maker rows
1928
+ * only, so maker and all return the same rows there.
1929
+ */
1930
+ leg?: "maker" | "taker" | "all";
1931
+ /**
1932
+ * @description Page size. Default 100, maximum 1,000. It may change from one page
1933
+ * to the next; the cursor does not depend on it.
1934
+ */
1935
+ limit?: components["parameters"]["Limit"];
1936
+ /**
1937
+ * @description Opaque pagination cursor from a previous next_cursor. Bound to the
1938
+ * operation and its query filters (not limit). Tampered, malformed,
1939
+ * foreign-route or foreign-query cursors are 400 invalid_request with
1940
+ * no detail.
1941
+ */
1942
+ cursor?: components["parameters"]["Cursor"];
1943
+ };
1944
+ header?: never;
1945
+ path?: never;
1946
+ cookie?: never;
1947
+ };
1948
+ requestBody?: never;
1949
+ responses: {
1950
+ /** @description Fills page */
1951
+ 200: {
1952
+ headers: {
1953
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
1954
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
1955
+ "X-Request-Id": components["headers"]["X-Request-Id"];
1956
+ [name: string]: unknown;
1957
+ };
1958
+ content: {
1959
+ "application/json": components["schemas"]["FillList"];
1960
+ };
1961
+ };
1962
+ 400: components["responses"]["InvalidRequest"];
1963
+ 401: components["responses"]["Unauthorized"];
1964
+ 403: components["responses"]["ForbiddenPlan"];
1965
+ 404: components["responses"]["NotFound"];
1966
+ /**
1967
+ * @description rate_limited: wait the Retry-After seconds, then send again.
1968
+ * quota_exceeded: the month's calls are used; error.resets_at says
1969
+ * when the quota resets and error.upgrade_url where to raise it.
1970
+ * lookup_rate_limited: too many invalid API keys came from this
1971
+ * address; fix the key rather than retry, since every retry with a
1972
+ * bad key counts against the address again.
1973
+ */
1974
+ 429: {
1975
+ headers: {
1976
+ "Retry-After": components["headers"]["Retry-After"];
1977
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
1978
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
1979
+ "X-Request-Id": components["headers"]["X-Request-Id"];
1980
+ [name: string]: unknown;
1981
+ };
1982
+ content: {
1983
+ "application/json": components["schemas"]["ErrorEnvelope"];
1984
+ };
1985
+ };
1986
+ 500: components["responses"]["Internal"];
1987
+ };
1988
+ };
1989
+ listMarkets: {
1990
+ parameters: {
1991
+ query?: {
1992
+ /** @description Restrict to one venue key. */
1993
+ venue?: string;
1994
+ /** @description Restrict to these market ids (at most 100). */
1995
+ market_id?: string[];
1996
+ /** @description Only markets updated at or after this UTC time. */
1997
+ updated_since?: string;
1998
+ /**
1999
+ * @description Page size. Default 100, maximum 1,000. It may change from one page
2000
+ * to the next; the cursor does not depend on it.
2001
+ */
2002
+ limit?: components["parameters"]["Limit"];
2003
+ /**
2004
+ * @description Opaque pagination cursor from a previous next_cursor. Bound to the
2005
+ * operation and its query filters (not limit). Tampered, malformed,
2006
+ * foreign-route or foreign-query cursors are 400 invalid_request with
2007
+ * no detail.
2008
+ */
2009
+ cursor?: components["parameters"]["Cursor"];
2010
+ };
2011
+ header?: never;
2012
+ path?: never;
2013
+ cookie?: never;
2014
+ };
2015
+ requestBody?: never;
2016
+ responses: {
2017
+ /** @description Markets page */
2018
+ 200: {
2019
+ headers: {
2020
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
2021
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
2022
+ "X-Request-Id": components["headers"]["X-Request-Id"];
2023
+ [name: string]: unknown;
2024
+ };
2025
+ content: {
2026
+ "application/json": components["schemas"]["MarketList"];
2027
+ };
2028
+ };
2029
+ 400: components["responses"]["InvalidRequest"];
2030
+ 401: components["responses"]["Unauthorized"];
2031
+ 403: components["responses"]["ForbiddenPlan"];
2032
+ /**
2033
+ * @description rate_limited: wait the Retry-After seconds, then send again.
2034
+ * quota_exceeded: the month's calls are used; error.resets_at says
2035
+ * when the quota resets and error.upgrade_url where to raise it.
2036
+ * lookup_rate_limited: too many invalid API keys came from this
2037
+ * address; fix the key rather than retry, since every retry with a
2038
+ * bad key counts against the address again.
2039
+ */
2040
+ 429: {
2041
+ headers: {
2042
+ "Retry-After": components["headers"]["Retry-After"];
2043
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
2044
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
2045
+ "X-Request-Id": components["headers"]["X-Request-Id"];
2046
+ [name: string]: unknown;
2047
+ };
2048
+ content: {
2049
+ "application/json": components["schemas"]["ErrorEnvelope"];
2050
+ };
2051
+ };
2052
+ 500: components["responses"]["Internal"];
2053
+ };
2054
+ };
2055
+ getMarket: {
2056
+ parameters: {
2057
+ query?: never;
2058
+ header?: never;
2059
+ path: {
2060
+ venue: string;
2061
+ market_id: string;
2062
+ };
2063
+ cookie?: never;
2064
+ };
2065
+ requestBody?: never;
2066
+ responses: {
2067
+ /** @description Market */
2068
+ 200: {
2069
+ headers: {
2070
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
2071
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
2072
+ "X-Request-Id": components["headers"]["X-Request-Id"];
2073
+ [name: string]: unknown;
2074
+ };
2075
+ content: {
2076
+ "application/json": components["schemas"]["Market"];
2077
+ };
2078
+ };
2079
+ 400: components["responses"]["InvalidRequest"];
2080
+ 401: components["responses"]["Unauthorized"];
2081
+ 403: components["responses"]["Forbidden"];
2082
+ 404: components["responses"]["NotFound"];
2083
+ /**
2084
+ * @description rate_limited: wait the Retry-After seconds, then send again.
2085
+ * quota_exceeded: the month's calls are used; error.resets_at says
2086
+ * when the quota resets and error.upgrade_url where to raise it.
2087
+ * lookup_rate_limited: too many invalid API keys came from this
2088
+ * address; fix the key rather than retry, since every retry with a
2089
+ * bad key counts against the address again.
2090
+ */
2091
+ 429: {
2092
+ headers: {
2093
+ "Retry-After": components["headers"]["Retry-After"];
2094
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
2095
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
2096
+ "X-Request-Id": components["headers"]["X-Request-Id"];
2097
+ [name: string]: unknown;
2098
+ };
2099
+ content: {
2100
+ "application/json": components["schemas"]["ErrorEnvelope"];
2101
+ };
2102
+ };
2103
+ 500: components["responses"]["Internal"];
2104
+ };
2105
+ };
2106
+ listMatchedEvents: {
2107
+ parameters: {
2108
+ query?: {
2109
+ /** @description Minimum overall confidence (inclusive). */
2110
+ min_confidence?: number;
2111
+ /** @description Keep only events whose members all settle the same way (true), or only those that do not (false). */
2112
+ resolution_equal?: boolean;
2113
+ /** @description Restrict to events with an active member on this venue. */
2114
+ venue?: string;
2115
+ status?: "approved" | "needs_rereview" | "retired";
2116
+ /**
2117
+ * @description Page size. Default 100, maximum 1,000. It may change from one page
2118
+ * to the next; the cursor does not depend on it.
2119
+ */
2120
+ limit?: components["parameters"]["Limit"];
2121
+ /**
2122
+ * @description Opaque pagination cursor from a previous next_cursor. Bound to the
2123
+ * operation and its query filters (not limit). Tampered, malformed,
2124
+ * foreign-route or foreign-query cursors are 400 invalid_request with
2125
+ * no detail.
2126
+ */
2127
+ cursor?: components["parameters"]["Cursor"];
2128
+ };
2129
+ header?: never;
2130
+ path?: never;
2131
+ cookie?: never;
2132
+ };
2133
+ requestBody?: never;
2134
+ responses: {
2135
+ /** @description Matched events page */
2136
+ 200: {
2137
+ headers: {
2138
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
2139
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
2140
+ "X-Request-Id": components["headers"]["X-Request-Id"];
2141
+ [name: string]: unknown;
2142
+ };
2143
+ content: {
2144
+ "application/json": components["schemas"]["MatchedEventList"];
2145
+ };
2146
+ };
2147
+ 400: components["responses"]["InvalidRequest"];
2148
+ 401: components["responses"]["Unauthorized"];
2149
+ 403: components["responses"]["ForbiddenPlan"];
2150
+ /**
2151
+ * @description rate_limited: wait the Retry-After seconds, then send again.
2152
+ * quota_exceeded: the month's calls are used; error.resets_at says
2153
+ * when the quota resets and error.upgrade_url where to raise it.
2154
+ * lookup_rate_limited: too many invalid API keys came from this
2155
+ * address; fix the key rather than retry, since every retry with a
2156
+ * bad key counts against the address again.
2157
+ */
2158
+ 429: {
2159
+ headers: {
2160
+ "Retry-After": components["headers"]["Retry-After"];
2161
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
2162
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
2163
+ "X-Request-Id": components["headers"]["X-Request-Id"];
2164
+ [name: string]: unknown;
2165
+ };
2166
+ content: {
2167
+ "application/json": components["schemas"]["ErrorEnvelope"];
2168
+ };
2169
+ };
2170
+ 500: components["responses"]["Internal"];
2171
+ };
2172
+ };
2173
+ getMatchedEvent: {
2174
+ parameters: {
2175
+ query?: never;
2176
+ header?: never;
2177
+ path: {
2178
+ event_id: string;
2179
+ };
2180
+ cookie?: never;
2181
+ };
2182
+ requestBody?: never;
2183
+ responses: {
2184
+ /** @description Matched event */
2185
+ 200: {
2186
+ headers: {
2187
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
2188
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
2189
+ "X-Request-Id": components["headers"]["X-Request-Id"];
2190
+ [name: string]: unknown;
2191
+ };
2192
+ content: {
2193
+ "application/json": components["schemas"]["MatchedEvent"];
2194
+ };
2195
+ };
2196
+ 400: components["responses"]["InvalidRequest"];
2197
+ 401: components["responses"]["Unauthorized"];
2198
+ 403: components["responses"]["ForbiddenPlan"];
2199
+ 404: components["responses"]["NotFound"];
2200
+ /**
2201
+ * @description rate_limited: wait the Retry-After seconds, then send again.
2202
+ * quota_exceeded: the month's calls are used; error.resets_at says
2203
+ * when the quota resets and error.upgrade_url where to raise it.
2204
+ * lookup_rate_limited: too many invalid API keys came from this
2205
+ * address; fix the key rather than retry, since every retry with a
2206
+ * bad key counts against the address again.
2207
+ */
2208
+ 429: {
2209
+ headers: {
2210
+ "Retry-After": components["headers"]["Retry-After"];
2211
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
2212
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
2213
+ "X-Request-Id": components["headers"]["X-Request-Id"];
2214
+ [name: string]: unknown;
2215
+ };
2216
+ content: {
2217
+ "application/json": components["schemas"]["ErrorEnvelope"];
2218
+ };
2219
+ };
2220
+ 500: components["responses"]["Internal"];
2221
+ };
2222
+ };
2223
+ listPairs: {
2224
+ parameters: {
2225
+ query?: {
2226
+ min_confidence?: number;
2227
+ resolution_equal?: boolean;
2228
+ venue?: string;
2229
+ status?: "approved" | "needs_rereview" | "retired";
2230
+ /**
2231
+ * @description Page size. Default 100, maximum 1,000. It may change from one page
2232
+ * to the next; the cursor does not depend on it.
2233
+ */
2234
+ limit?: components["parameters"]["Limit"];
2235
+ /**
2236
+ * @description Opaque pagination cursor from a previous next_cursor. Bound to the
2237
+ * operation and its query filters (not limit). Tampered, malformed,
2238
+ * foreign-route or foreign-query cursors are 400 invalid_request with
2239
+ * no detail.
2240
+ */
2241
+ cursor?: components["parameters"]["Cursor"];
2242
+ };
2243
+ header?: never;
2244
+ path?: never;
2245
+ cookie?: never;
2246
+ };
2247
+ requestBody?: never;
2248
+ responses: {
2249
+ /** @description Pairs page */
2250
+ 200: {
2251
+ headers: {
2252
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
2253
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
2254
+ "X-Request-Id": components["headers"]["X-Request-Id"];
2255
+ [name: string]: unknown;
2256
+ };
2257
+ content: {
2258
+ "application/json": components["schemas"]["PairList"];
2259
+ };
2260
+ };
2261
+ 400: components["responses"]["InvalidRequest"];
2262
+ 401: components["responses"]["Unauthorized"];
2263
+ 403: components["responses"]["ForbiddenPlan"];
2264
+ /**
2265
+ * @description rate_limited: wait the Retry-After seconds, then send again.
2266
+ * quota_exceeded: the month's calls are used; error.resets_at says
2267
+ * when the quota resets and error.upgrade_url where to raise it.
2268
+ * lookup_rate_limited: too many invalid API keys came from this
2269
+ * address; fix the key rather than retry, since every retry with a
2270
+ * bad key counts against the address again.
2271
+ */
2272
+ 429: {
2273
+ headers: {
2274
+ "Retry-After": components["headers"]["Retry-After"];
2275
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
2276
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
2277
+ "X-Request-Id": components["headers"]["X-Request-Id"];
2278
+ [name: string]: unknown;
2279
+ };
2280
+ content: {
2281
+ "application/json": components["schemas"]["ErrorEnvelope"];
2282
+ };
2283
+ };
2284
+ 500: components["responses"]["Internal"];
2285
+ };
2286
+ };
2287
+ getPair: {
2288
+ parameters: {
2289
+ query?: never;
2290
+ header?: never;
2291
+ path: {
2292
+ pair_id: string;
2293
+ };
2294
+ cookie?: never;
2295
+ };
2296
+ requestBody?: never;
2297
+ responses: {
2298
+ /** @description Pair */
2299
+ 200: {
2300
+ headers: {
2301
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
2302
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
2303
+ "X-Request-Id": components["headers"]["X-Request-Id"];
2304
+ [name: string]: unknown;
2305
+ };
2306
+ content: {
2307
+ "application/json": components["schemas"]["Pair"];
2308
+ };
2309
+ };
2310
+ 400: components["responses"]["InvalidRequest"];
2311
+ 401: components["responses"]["Unauthorized"];
2312
+ 403: components["responses"]["ForbiddenPlan"];
2313
+ 404: components["responses"]["NotFound"];
2314
+ /**
2315
+ * @description rate_limited: wait the Retry-After seconds, then send again.
2316
+ * quota_exceeded: the month's calls are used; error.resets_at says
2317
+ * when the quota resets and error.upgrade_url where to raise it.
2318
+ * lookup_rate_limited: too many invalid API keys came from this
2319
+ * address; fix the key rather than retry, since every retry with a
2320
+ * bad key counts against the address again.
2321
+ */
2322
+ 429: {
2323
+ headers: {
2324
+ "Retry-After": components["headers"]["Retry-After"];
2325
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
2326
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
2327
+ "X-Request-Id": components["headers"]["X-Request-Id"];
2328
+ [name: string]: unknown;
2329
+ };
2330
+ content: {
2331
+ "application/json": components["schemas"]["ErrorEnvelope"];
2332
+ };
2333
+ };
2334
+ 500: components["responses"]["Internal"];
2335
+ };
2336
+ };
2337
+ getQuoteContext: {
2338
+ parameters: {
2339
+ query?: never;
2340
+ header?: never;
2341
+ path: {
2342
+ event_id: string;
2343
+ };
2344
+ cookie?: never;
2345
+ };
2346
+ requestBody?: never;
2347
+ responses: {
2348
+ /** @description Quote context */
2349
+ 200: {
2350
+ headers: {
2351
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
2352
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
2353
+ "X-Request-Id": components["headers"]["X-Request-Id"];
2354
+ [name: string]: unknown;
2355
+ };
2356
+ content: {
2357
+ "application/json": components["schemas"]["QuoteContext"];
2358
+ };
2359
+ };
2360
+ 400: components["responses"]["InvalidRequest"];
2361
+ 401: components["responses"]["Unauthorized"];
2362
+ 403: components["responses"]["ForbiddenPlan"];
2363
+ 404: components["responses"]["NotFound"];
2364
+ /**
2365
+ * @description rate_limited: wait the Retry-After seconds, then send again.
2366
+ * quota_exceeded: the month's calls are used; error.resets_at says
2367
+ * when the quota resets and error.upgrade_url where to raise it.
2368
+ * lookup_rate_limited: too many invalid API keys came from this
2369
+ * address; fix the key rather than retry, since every retry with a
2370
+ * bad key counts against the address again.
2371
+ */
2372
+ 429: {
2373
+ headers: {
2374
+ "Retry-After": components["headers"]["Retry-After"];
2375
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
2376
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
2377
+ "X-Request-Id": components["headers"]["X-Request-Id"];
2378
+ [name: string]: unknown;
2379
+ };
2380
+ content: {
2381
+ "application/json": components["schemas"]["ErrorEnvelope"];
2382
+ };
2383
+ };
2384
+ 500: components["responses"]["Internal"];
2385
+ };
2386
+ };
2387
+ listResolutions: {
2388
+ parameters: {
2389
+ query?: {
2390
+ /** @description Restrict to one venue, by its key. */
2391
+ venue?: string;
2392
+ /** @description Restrict to these market ids (at most 100). */
2393
+ market_id?: string[];
2394
+ /** @description Only events created at or after this UTC time. */
2395
+ created_since?: string;
2396
+ /**
2397
+ * @description Page size. Default 100, maximum 1,000. It may change from one page
2398
+ * to the next; the cursor does not depend on it.
2399
+ */
2400
+ limit?: components["parameters"]["Limit"];
2401
+ /**
2402
+ * @description Opaque pagination cursor from a previous next_cursor. Bound to the
2403
+ * operation and its query filters (not limit). Tampered, malformed,
2404
+ * foreign-route or foreign-query cursors are 400 invalid_request with
2405
+ * no detail.
2406
+ */
2407
+ cursor?: components["parameters"]["Cursor"];
2408
+ };
2409
+ header?: never;
2410
+ path?: never;
2411
+ cookie?: never;
2412
+ };
2413
+ requestBody?: never;
2414
+ responses: {
2415
+ /** @description Resolutions page */
2416
+ 200: {
2417
+ headers: {
2418
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
2419
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
2420
+ "X-Request-Id": components["headers"]["X-Request-Id"];
2421
+ [name: string]: unknown;
2422
+ };
2423
+ content: {
2424
+ "application/json": components["schemas"]["ResolutionList"];
2425
+ };
2426
+ };
2427
+ 400: components["responses"]["InvalidRequest"];
2428
+ 401: components["responses"]["Unauthorized"];
2429
+ 403: components["responses"]["ForbiddenPlan"];
2430
+ /**
2431
+ * @description rate_limited: wait the Retry-After seconds, then send again.
2432
+ * quota_exceeded: the month's calls are used; error.resets_at says
2433
+ * when the quota resets and error.upgrade_url where to raise it.
2434
+ * lookup_rate_limited: too many invalid API keys came from this
2435
+ * address; fix the key rather than retry, since every retry with a
2436
+ * bad key counts against the address again.
2437
+ */
2438
+ 429: {
2439
+ headers: {
2440
+ "Retry-After": components["headers"]["Retry-After"];
2441
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
2442
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
2443
+ "X-Request-Id": components["headers"]["X-Request-Id"];
2444
+ [name: string]: unknown;
2445
+ };
2446
+ content: {
2447
+ "application/json": components["schemas"]["ErrorEnvelope"];
2448
+ };
2449
+ };
2450
+ 500: components["responses"]["Internal"];
2451
+ };
2452
+ };
2453
+ listVenues: {
2454
+ parameters: {
2455
+ query?: never;
2456
+ header?: never;
2457
+ path?: never;
2458
+ cookie?: never;
2459
+ };
2460
+ requestBody?: never;
2461
+ responses: {
2462
+ /** @description Enabled venues */
2463
+ 200: {
2464
+ headers: {
2465
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
2466
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
2467
+ "X-Request-Id": components["headers"]["X-Request-Id"];
2468
+ [name: string]: unknown;
2469
+ };
2470
+ content: {
2471
+ "application/json": components["schemas"]["VenueList"];
2472
+ };
2473
+ };
2474
+ 400: components["responses"]["InvalidRequest"];
2475
+ 401: components["responses"]["Unauthorized"];
2476
+ 403: components["responses"]["ForbiddenPlan"];
2477
+ /**
2478
+ * @description rate_limited: wait the Retry-After seconds, then send again.
2479
+ * quota_exceeded: the month's calls are used; error.resets_at says
2480
+ * when the quota resets and error.upgrade_url where to raise it.
2481
+ * lookup_rate_limited: too many invalid API keys came from this
2482
+ * address; fix the key rather than retry, since every retry with a
2483
+ * bad key counts against the address again.
2484
+ */
2485
+ 429: {
2486
+ headers: {
2487
+ "Retry-After": components["headers"]["Retry-After"];
2488
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
2489
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
2490
+ "X-Request-Id": components["headers"]["X-Request-Id"];
2491
+ [name: string]: unknown;
2492
+ };
2493
+ content: {
2494
+ "application/json": components["schemas"]["ErrorEnvelope"];
2495
+ };
2496
+ };
2497
+ 500: components["responses"]["Internal"];
2498
+ };
2499
+ };
2500
+ }