@totalis/hip4-client 0.0.0-stage → 0.73.0

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 (74) hide show
  1. package/CHANGELOG.md +1903 -0
  2. package/LICENSE +202 -0
  3. package/README.md +143 -2
  4. package/dist/api-keys.d.ts +118 -0
  5. package/dist/api-keys.js +104 -0
  6. package/dist/audience-contract.d.ts +52 -0
  7. package/dist/audience-contract.js +1 -0
  8. package/dist/base.d.ts +41 -0
  9. package/dist/base.js +60 -0
  10. package/dist/client.d.ts +16 -0
  11. package/dist/client.js +15 -0
  12. package/dist/controller.d.ts +53 -0
  13. package/dist/controller.js +63 -0
  14. package/dist/errors.d.ts +3 -0
  15. package/dist/errors.js +3 -0
  16. package/dist/flow-errors.d.ts +62 -0
  17. package/dist/flow-errors.js +70 -0
  18. package/dist/generated/account-read.d.ts +2015 -0
  19. package/dist/generated/account-read.js +1 -0
  20. package/dist/generated/api-keys.d.ts +1303 -0
  21. package/dist/generated/api-keys.js +1 -0
  22. package/dist/generated/browse.d.ts +965 -0
  23. package/dist/generated/browse.js +1 -0
  24. package/dist/generated/client.d.ts +104 -0
  25. package/dist/generated/client.js +1 -0
  26. package/dist/generated/errors.d.ts +467 -0
  27. package/dist/generated/errors.js +1792 -0
  28. package/dist/generated/maker.d.ts +47 -0
  29. package/dist/generated/maker.js +1 -0
  30. package/dist/generated/openapi.d.ts +10867 -0
  31. package/dist/generated/openapi.js +1 -0
  32. package/dist/generated/operator.d.ts +7 -0
  33. package/dist/generated/operator.js +1 -0
  34. package/dist/generated/realtime.d.ts +1486 -0
  35. package/dist/generated/realtime.js +1 -0
  36. package/dist/generated/vault-abi.d.ts +49 -0
  37. package/dist/generated/vault-abi.js +70 -0
  38. package/dist/generated/version.d.ts +24 -0
  39. package/dist/generated/version.js +183 -0
  40. package/dist/hypercore.d.ts +111 -0
  41. package/dist/hypercore.js +132 -0
  42. package/dist/maker.d.ts +206 -0
  43. package/dist/maker.js +608 -0
  44. package/dist/money.d.ts +59 -0
  45. package/dist/money.js +66 -0
  46. package/dist/operator.d.ts +4 -0
  47. package/dist/operator.js +4 -0
  48. package/dist/pagination.d.ts +20 -0
  49. package/dist/pagination.js +27 -0
  50. package/dist/partner.d.ts +71 -0
  51. package/dist/partner.js +66 -0
  52. package/dist/realtime.d.ts +19 -0
  53. package/dist/realtime.js +10 -0
  54. package/dist/request.d.ts +115 -0
  55. package/dist/request.js +190 -0
  56. package/dist/signer.d.ts +51 -0
  57. package/dist/signer.js +90 -0
  58. package/dist/stream.d.ts +142 -0
  59. package/dist/stream.js +331 -0
  60. package/dist/totalis.d.ts +719 -0
  61. package/dist/totalis.js +1251 -0
  62. package/dist/typed-data.d.ts +330 -0
  63. package/dist/typed-data.js +340 -0
  64. package/dist/ui.d.ts +54 -0
  65. package/dist/ui.js +77 -0
  66. package/dist/wallet-session.d.ts +52 -0
  67. package/dist/wallet-session.js +63 -0
  68. package/examples/browser-wallet.html +69 -0
  69. package/examples/browser-wallet.mjs +57 -0
  70. package/examples/node-bot.mjs +57 -0
  71. package/examples/onboard.mjs +132 -0
  72. package/examples/partner-frontend.mjs +44 -0
  73. package/examples/partner-server.mjs +22 -0
  74. package/package.json +105 -4
@@ -0,0 +1,965 @@
1
+ export type paths = {
2
+ readonly "/v1/discovery": {
3
+ readonly parameters: {
4
+ readonly query?: never;
5
+ readonly header?: never;
6
+ readonly path?: never;
7
+ readonly cookie?: never;
8
+ };
9
+ readonly get: operations["listPublishedDiscovery"];
10
+ readonly put?: never;
11
+ readonly post?: never;
12
+ readonly delete?: never;
13
+ readonly options?: never;
14
+ readonly head?: never;
15
+ readonly patch?: never;
16
+ readonly trace?: never;
17
+ };
18
+ readonly "/v1/search": {
19
+ readonly parameters: {
20
+ readonly query?: never;
21
+ readonly header?: never;
22
+ readonly path?: never;
23
+ readonly cookie?: never;
24
+ };
25
+ readonly get: operations["searchPublishedCatalog"];
26
+ readonly put?: never;
27
+ readonly post?: never;
28
+ readonly delete?: never;
29
+ readonly options?: never;
30
+ readonly head?: never;
31
+ readonly patch?: never;
32
+ readonly trace?: never;
33
+ };
34
+ readonly "/v1/taxonomy": {
35
+ readonly parameters: {
36
+ readonly query?: never;
37
+ readonly header?: never;
38
+ readonly path?: never;
39
+ readonly cookie?: never;
40
+ };
41
+ readonly get: operations["getPublishedTaxonomy"];
42
+ readonly put?: never;
43
+ readonly post?: never;
44
+ readonly delete?: never;
45
+ readonly options?: never;
46
+ readonly head?: never;
47
+ readonly patch?: never;
48
+ readonly trace?: never;
49
+ };
50
+ };
51
+ export type webhooks = Record<string, never>;
52
+ export type components = {
53
+ schemas: {
54
+ readonly BrowseQuery: {
55
+ readonly category?: components["schemas"]["CategorySlug"];
56
+ readonly subcategory?: components["schemas"]["Slug"];
57
+ readonly frequency?: components["schemas"]["Frequency"];
58
+ readonly date_filter?: components["schemas"]["DateFilter"];
59
+ readonly sort?: components["schemas"]["BrowseSort"];
60
+ readonly limit?: components["schemas"]["PageLimit"];
61
+ readonly cursor?: components["schemas"]["PageCursor"];
62
+ /**
63
+ * @description Only cards in play at publication, inside their estimated live window, in the default or closing_soon order. Send it only as true, beside at most category, sort, limit and cursor (date_filter only as all); any other combination returns 400 INVALID_QUERY.
64
+ * @constant
65
+ */
66
+ readonly live?: true;
67
+ } & ({
68
+ readonly category: components["schemas"]["CategorySlug"];
69
+ } | {
70
+ readonly subcategory?: never;
71
+ }) & ({
72
+ readonly live?: never;
73
+ } | {
74
+ readonly subcategory?: never;
75
+ readonly frequency?: never;
76
+ /** @constant */
77
+ readonly date_filter?: "all";
78
+ });
79
+ readonly SearchQuery: {
80
+ readonly category?: components["schemas"]["CategorySlug"];
81
+ readonly subcategory?: components["schemas"]["Slug"];
82
+ readonly frequency?: components["schemas"]["Frequency"];
83
+ readonly date_filter?: components["schemas"]["DateFilter"];
84
+ readonly sort?: components["schemas"]["Sort"];
85
+ /** @description Raw input is limited to 1024 code points. The mandatory semantic query validator trims, applies NFC, full case-folding, NFC again, and enforces NormalizedSearchText before execution. */
86
+ readonly q: string;
87
+ readonly limit?: components["schemas"]["PageLimit"];
88
+ readonly cursor?: components["schemas"]["PageCursor"];
89
+ } & ({
90
+ readonly category: components["schemas"]["CategorySlug"];
91
+ } | {
92
+ readonly subcategory?: never;
93
+ });
94
+ readonly Result: {
95
+ readonly publication: components["schemas"]["Publication"];
96
+ readonly filters: components["schemas"]["Filters"];
97
+ readonly items: readonly components["schemas"]["Card"][];
98
+ readonly facets: components["schemas"]["Facets"];
99
+ readonly next_cursor: components["schemas"]["NextCursor"];
100
+ readonly has_more: boolean;
101
+ readonly total: components["schemas"]["Count"];
102
+ /** @enum {string} */
103
+ readonly completeness: "COMPLETE" | "PARTIAL";
104
+ readonly partial_reason: ("CANDIDATE_LIMIT" | "VISIBILITY_CHANGED") | null;
105
+ readonly live: components["schemas"]["LiveCounts"];
106
+ } & (unknown & unknown & unknown & unknown);
107
+ readonly Taxonomy: {
108
+ readonly publication: components["schemas"]["Publication"];
109
+ readonly categories: readonly components["schemas"]["$defs-Category"][];
110
+ readonly date_filters: readonly [
111
+ ] | readonly [
112
+ components["schemas"]["DateFilter"]
113
+ ] | readonly [
114
+ components["schemas"]["DateFilter"],
115
+ components["schemas"]["DateFilter"]
116
+ ] | readonly [
117
+ components["schemas"]["DateFilter"],
118
+ components["schemas"]["DateFilter"],
119
+ components["schemas"]["DateFilter"]
120
+ ] | readonly [
121
+ components["schemas"]["DateFilter"],
122
+ components["schemas"]["DateFilter"],
123
+ components["schemas"]["DateFilter"],
124
+ components["schemas"]["DateFilter"]
125
+ ];
126
+ readonly browse_sorts: readonly [
127
+ ] | readonly [
128
+ components["schemas"]["BrowseSort"]
129
+ ] | readonly [
130
+ components["schemas"]["BrowseSort"],
131
+ components["schemas"]["BrowseSort"]
132
+ ];
133
+ readonly search_sorts: readonly [
134
+ ] | readonly [
135
+ components["schemas"]["Sort"]
136
+ ] | readonly [
137
+ components["schemas"]["Sort"],
138
+ components["schemas"]["Sort"]
139
+ ] | readonly [
140
+ components["schemas"]["Sort"],
141
+ components["schemas"]["Sort"],
142
+ components["schemas"]["Sort"]
143
+ ];
144
+ };
145
+ readonly BrowseUpdate: {
146
+ /** @constant */
147
+ readonly type: "browse.update";
148
+ /** @enum {string} */
149
+ readonly contract_version: "2" | "3" | "4";
150
+ /** @enum {string} */
151
+ readonly network: "HYPEREVM_MAINNET" | "HYPEREVM_TESTNET";
152
+ readonly browse_version: components["schemas"]["PositiveInt64String"];
153
+ readonly previous_browse_version: components["schemas"]["PositiveInt64String"] | null;
154
+ readonly visibility_version: components["schemas"]["PositiveInt64String"];
155
+ readonly published_at: components["schemas"]["Timestamp"];
156
+ /** @enum {string} */
157
+ readonly reason: "CATALOG" | "CONFIG" | "DEADLINE" | "RANKING" | "RECOVERY";
158
+ readonly changed_item_ids: readonly components["schemas"]["ItemId"][];
159
+ readonly removed_outcome_ids: readonly components["schemas"]["UInt32String"][];
160
+ readonly resync_required: boolean;
161
+ } & (unknown & unknown);
162
+ readonly BrowseHello: {
163
+ /**
164
+ * @description Frame discriminator, always session.hello. The client sends it first.
165
+ * @constant
166
+ */
167
+ readonly type: "session.hello";
168
+ /**
169
+ * @description Protocol schema version, always 1.
170
+ * @constant
171
+ */
172
+ readonly schema_version: 1;
173
+ /**
174
+ * Format: uuid
175
+ * @description Client-generated UUIDv7 identifying this client instance.
176
+ */
177
+ readonly client_instance_id: string;
178
+ readonly subscriptions: readonly [
179
+ ] | readonly [
180
+ {
181
+ /**
182
+ * @description Always MARKET.
183
+ * @constant
184
+ */
185
+ readonly topic: "MARKET";
186
+ /** @description 1 to 256 unique outcome IDs (decimal strings) to follow. The snapshot and deltas cover only these outcomes. */
187
+ readonly outcome_ids: readonly components["schemas"]["UInt32String"][];
188
+ }
189
+ ];
190
+ readonly browse: {
191
+ /** @enum {string} */
192
+ readonly contract_version: "2" | "3" | "4";
193
+ readonly last_browse_version: components["schemas"]["PositiveInt64String"] | null;
194
+ };
195
+ };
196
+ readonly BrowseResult: components["schemas"]["Result"] & {
197
+ readonly filters?: {
198
+ readonly q?: null;
199
+ readonly sort?: components["schemas"]["BrowseSort"];
200
+ };
201
+ readonly items?: readonly {
202
+ readonly matched_outcome_ids?: readonly [
203
+ ];
204
+ }[];
205
+ readonly facets?: {
206
+ readonly sorts?: readonly {
207
+ readonly value?: components["schemas"]["BrowseSort"];
208
+ }[];
209
+ };
210
+ /** @enum {unknown} */
211
+ readonly partial_reason?: null | "VISIBILITY_CHANGED";
212
+ };
213
+ readonly SearchResult: components["schemas"]["Result"] & {
214
+ readonly filters?: {
215
+ readonly q?: components["schemas"]["NormalizedSearchText"];
216
+ /** @constant */
217
+ readonly live?: false;
218
+ };
219
+ readonly publication?: {
220
+ readonly search_index_version?: components["schemas"]["PositiveInt64String"];
221
+ };
222
+ };
223
+ /** @enum {string} */
224
+ readonly CategorySlug: "crypto" | "economics" | "entertainment" | "esports" | "finance" | "politics" | "sports" | "tech" | "weather";
225
+ readonly Subcategory: string | null;
226
+ /** @enum {string} */
227
+ readonly schema: "nba" | "ncaa" | "nfl" | "nhl" | "mlb" | "ufc" | "lol" | "epl" | "ucl" | "uel" | "efl" | "la_liga" | "world_cup" | "bundesliga" | "liga_portugal" | "ligue_1" | "f1" | "ipl" | "cricket" | "transfers" | "btc" | "eth" | "sol" | "hype" | "up_down" | "stocks" | "indices" | "etfs" | "earnings" | "rates" | "inflation" | "commodities" | "fx" | "usa" | "global" | "other";
228
+ readonly Slug: components["schemas"]["Subcategory"] & string & components["schemas"]["schema"];
229
+ /** @enum {string} */
230
+ readonly Frequency: "5m" | "15m" | "hourly" | "daily" | "weekly" | "monthly";
231
+ /** @enum {string} */
232
+ readonly DateFilter: "all" | "1h" | "1h-1d" | "1d-7d";
233
+ /** @enum {string} */
234
+ readonly BrowseSort: "default" | "closing_soon";
235
+ /**
236
+ * @description Maximum items in one page. A page may hold fewer, even none, while has_more is true.
237
+ * @default 50
238
+ */
239
+ readonly PageLimit: number;
240
+ /** @description Opaque list cursor. Send a previous response's next_cursor back unchanged; never build or parse one. */
241
+ readonly PageCursor: string;
242
+ /** @enum {string} */
243
+ readonly MarketState: "ACTIVE" | "CLOSED" | "UNSUPPORTED";
244
+ readonly Category: ("Crypto" | "Economics" | "Entertainment" | "Esports" | "Finance" | "Politics" | "Sports" | "Tech" | "Weather") | null;
245
+ readonly DiscoveryDisplay: {
246
+ /** @description Display title of the question, standalone market or price series. */
247
+ readonly title: string;
248
+ /** @description Lifecycle of the item: ACTIVE, CLOSED or UNSUPPORTED; for a question or price series, ACTIVE when any of its markets is active. */
249
+ readonly state: components["schemas"]["MarketState"];
250
+ /** @description Display category, or null when the item is not mapped to one. */
251
+ readonly category: components["schemas"]["Category"];
252
+ /** @description Display subcategory slug within the category; null when unmapped or not subdivided. */
253
+ readonly subcategory: components["schemas"]["Subcategory"];
254
+ };
255
+ readonly UInt32String: string;
256
+ /** @description A real native question identifier; the standalone NO_QUESTION sentinel is excluded. */
257
+ readonly RealQuestionId: components["schemas"]["UInt32String"] & unknown;
258
+ readonly ResultUnresolved: {
259
+ /**
260
+ * @description AVAILABLE: the native result was read successfully.
261
+ * @constant
262
+ */
263
+ readonly availability: "AVAILABLE";
264
+ /**
265
+ * @description UNRESOLVED: the native market has not recorded a result.
266
+ * @constant
267
+ */
268
+ readonly result_state: "UNRESOLVED";
269
+ };
270
+ /** @description Native result numerator in the inclusive range zero through Q = 100000000. */
271
+ readonly FactorNumerator: string;
272
+ /**
273
+ * Format: positive-int64-decimal
274
+ * @description Positive generation or version bounded by signed int64 storage.
275
+ */
276
+ readonly PositiveInt64: string;
277
+ readonly Bytes32: string;
278
+ readonly NonZeroBytes32: components["schemas"]["Bytes32"] & unknown;
279
+ readonly ResultNumeric: {
280
+ /**
281
+ * @description AVAILABLE: the native result was read successfully.
282
+ * @constant
283
+ */
284
+ readonly availability: "AVAILABLE";
285
+ /**
286
+ * @description NUMERIC_RECORDED: the native market recorded a numeric payout for the YES side.
287
+ * @constant
288
+ */
289
+ readonly result_state: "NUMERIC_RECORDED";
290
+ /** @description YES payout as a fraction of factor_scale; 100000000 pays YES in full, 0 pays NO in full. */
291
+ readonly yes_factor_numerator: components["schemas"]["FactorNumerator"];
292
+ /**
293
+ * @description Denominator for yes_factor_numerator; always 100000000.
294
+ * @constant
295
+ */
296
+ readonly factor_scale: "100000000";
297
+ /** @description HyperEVM block number of the native read that observed this result. */
298
+ readonly recorded_at_block: components["schemas"]["PositiveInt64"];
299
+ /** @description SHA-256 over the chain, contracts, block number and hash, outcome and result of the native read that observed this result. */
300
+ readonly evidence_digest: components["schemas"]["NonZeroBytes32"];
301
+ };
302
+ readonly ResultNonnumeric: {
303
+ /**
304
+ * @description AVAILABLE: the native result was read successfully.
305
+ * @constant
306
+ */
307
+ readonly availability: "AVAILABLE";
308
+ /**
309
+ * @description RECOGNIZED_NONNUMERIC_OBSERVED: the native market recorded a recognized result that carries no numeric payout factor.
310
+ * @constant
311
+ */
312
+ readonly result_state: "RECOGNIZED_NONNUMERIC_OBSERVED";
313
+ /** @description HyperEVM block number of the native read that observed this result. */
314
+ readonly recorded_at_block: components["schemas"]["PositiveInt64"];
315
+ /** @description SHA-256 over the chain, contracts, block number and hash, outcome and result of the native read that observed this result. */
316
+ readonly evidence_digest: components["schemas"]["NonZeroBytes32"];
317
+ };
318
+ readonly ResultUnavailable: {
319
+ /**
320
+ * @description UNAVAILABLE: the native result could not be read; reason says why.
321
+ * @constant
322
+ */
323
+ readonly availability: "UNAVAILABLE";
324
+ /**
325
+ * @description NOT_QUERIED: not read yet; NATIVE_READ_FAILED: the on-chain read failed; RPC_UNAVAILABLE: no RPC provider answered; MALFORMED_RETURN: the contract returned an unexpected shape; PROVIDER_DISAGREEMENT: providers returned different results; UNSUPPORTED_PROTOCOL_VERSION: the outcome uses an unsupported protocol version.
326
+ * @enum {string}
327
+ */
328
+ readonly reason: "NOT_QUERIED" | "NATIVE_READ_FAILED" | "RPC_UNAVAILABLE" | "MALFORMED_RETURN" | "PROVIDER_DISAGREEMENT" | "UNSUPPORTED_PROTOCOL_VERSION";
329
+ };
330
+ readonly "$defs-Result": components["schemas"]["ResultUnresolved"] | components["schemas"]["ResultNumeric"] | components["schemas"]["ResultNonnumeric"] | components["schemas"]["ResultUnavailable"];
331
+ readonly EligibilityEnabled: {
332
+ /**
333
+ * @description ENABLED: Totalis currently accepts new positions on this market.
334
+ * @constant
335
+ */
336
+ readonly state: "ENABLED";
337
+ };
338
+ readonly EligibilityDisabled: {
339
+ /**
340
+ * @description DISABLED: Totalis does not currently accept new positions on this market; reason says why.
341
+ * @constant
342
+ */
343
+ readonly state: "DISABLED";
344
+ /**
345
+ * @description Why new positions are refused. UNSUPPORTED_PROTOCOL_VERSION, UNSUPPORTED_QUOTE_ASSET and IDENTITY_CONFLICT are permanent support failures; MARKET_NOT_ACTIVE means the native market is no longer live; NATIVE_STATE_UNAVAILABLE, NATIVE_STATE_STALE, REFERENCE_UNAVAILABLE, REFERENCE_STALE and SOURCE_GENERATION_MISMATCH are temporary data outages; FINANCIAL_PROFILE_DISABLED means trading is switched off in this environment; SOURCE_UNQUALIFIED marks cached catalog copies that carry no live eligibility.
346
+ * @enum {string}
347
+ */
348
+ readonly reason: "UNSUPPORTED_PROTOCOL_VERSION" | "UNSUPPORTED_QUOTE_ASSET" | "IDENTITY_CONFLICT" | "DEADLINE_UNAVAILABLE" | "SOURCE_UNQUALIFIED" | "FINANCIAL_PROFILE_DISABLED" | "MARKET_NOT_ACTIVE" | "NATIVE_STATE_UNAVAILABLE" | "NATIVE_STATE_STALE" | "DEADLINE_BUFFER_ENTERED" | "REFERENCE_UNAVAILABLE" | "REFERENCE_STALE" | "SOURCE_GENERATION_MISMATCH";
349
+ };
350
+ readonly Eligibility: components["schemas"]["EligibilityEnabled"] | components["schemas"]["EligibilityDisabled"];
351
+ readonly Combo: {
352
+ /**
353
+ * @description OPEN: an RFQ may include this market as a leg.
354
+ * @constant
355
+ */
356
+ readonly state: "OPEN";
357
+ } | {
358
+ /**
359
+ * @description CLOSED: an RFQ that includes this market is refused; reason says why.
360
+ * @constant
361
+ */
362
+ readonly state: "CLOSED";
363
+ /**
364
+ * @description EXCLUDED: Totalis keeps this market out of Combos. UNLISTED_DEPLOYER: its deployer is not one Totalis lists. OUTSIDE_WINDOW: its event is unknown or more than 7 days away, or the time its result can be known is unknown or has passed (a price market's observation time, a policy rate's scheduled decision; a sports game closes at its resolution backstop, so Combos take it in play).
365
+ * @enum {string}
366
+ */
367
+ readonly reason: "EXCLUDED" | "UNLISTED_DEPLOYER" | "OUTSIDE_WINDOW";
368
+ /** @description When the market enters the 7-day window, in Unix seconds: its best-known event time minus 7 days. Set only for OUTSIDE_WINDOW with a known event time before the window opens; approximate. */
369
+ readonly opens_at: components["schemas"]["PositiveInt64"] | null;
370
+ };
371
+ readonly Deployer: {
372
+ /** @description Display name: Hyperliquid for its own markets, the listed deployer's name, or null for a deployer Totalis does not list. */
373
+ readonly name: string | null;
374
+ /** @description Deployer address, lowercase hex; null for Hyperliquid's own markets. */
375
+ readonly address: string | null;
376
+ };
377
+ /** @enum {string} */
378
+ readonly Side: "YES" | "NO";
379
+ /** @enum {string} */
380
+ readonly Quality: "BOOK_MID" | "MARK_PRICE" | "ALL_MIDS_FALLBACK" | "TRADE";
381
+ /**
382
+ * Format: uint256-decimal
383
+ * @description Nonnegative integer value paired with an explicit positive scale.
384
+ */
385
+ readonly IntegerValue: string;
386
+ /** Format: date-time */
387
+ readonly Timestamp: string;
388
+ /**
389
+ * Format: uint256-decimal
390
+ * @description Positive base-10 scale for an integer value.
391
+ */
392
+ readonly Scale: string;
393
+ readonly ReferenceAvailable: {
394
+ /**
395
+ * @description AVAILABLE: a qualified reference price has been observed for this side.
396
+ * @constant
397
+ */
398
+ readonly availability: "AVAILABLE";
399
+ /** @description How the reference price was derived: BOOK_MID from the order book or best bid and offer (the midpoint, or the mark when best_bid or best_ask is null), MARK_PRICE from the mark price, ALL_MIDS_FALLBACK from the all-mids fallback, TRADE from executed trades. */
400
+ readonly quality: components["schemas"]["Quality"];
401
+ /** @description Reference price of this side as an integer: the book midpoint, or mark when the book is one-sided or empty, which is published only while mark is known. Divide by scale for the probability price between 0 and 1. */
402
+ readonly value: components["schemas"]["IntegerValue"];
403
+ /** @description Best bid at scale when the book has bids, otherwise null. */
404
+ readonly best_bid?: components["schemas"]["IntegerValue"] | null;
405
+ /** @description Best ask at scale when the book has asks, otherwise null. */
406
+ readonly best_ask?: components["schemas"]["IntegerValue"] | null;
407
+ /** @description Price of the latest book execution on this side at scale, kept across restarts; a fill prints on both sides at prices summing to scale. Null when no trade is known. */
408
+ readonly last_trade?: components["schemas"]["IntegerValue"] | null;
409
+ /** @description Hyperliquid time of last_trade, RFC 3339 UTC; null exactly when last_trade is null. */
410
+ readonly last_trade_at?: components["schemas"]["Timestamp"] | null;
411
+ /** @description Crowd probability at scale: the newest evidence (an execution, or the book midpoint while best_ask - best_bid is at most 10% of scale) kept within [best_bid, best_ask]. On a book wider than 50% of scale, one-sided or empty, it is null once that evidence is more than 20 minutes old. Null before any evidence. The midpoint rounds half to even, so YES and NO chances sum to scale. chance_basis says which applied. */
412
+ readonly chance?: components["schemas"]["IntegerValue"] | null;
413
+ /** @description Where chance comes from: MID, the current book midpoint; LAST_TRADE, last_trade inside the current book; HELD, earlier evidence kept within the current book (a midpoint the book no longer supports, or evidence clamped to best_bid or best_ask). Null exactly when chance is null. */
414
+ readonly chance_basis?: ("MID" | "LAST_TRADE" | "HELD") | null;
415
+ /** @description Value of one held share at scale: chance when known, else best_bid, else 0 when only asks exist; null when no book is known. Not a price a trade receives. */
416
+ readonly mark?: components["schemas"]["IntegerValue"] | null;
417
+ /** @description Divisor for value, best_bid, best_ask, last_trade, chance and mark; currently 1000000000000000000 (18 decimals). */
418
+ readonly scale: components["schemas"]["Scale"];
419
+ /**
420
+ * @description FRESH when received within the last 15 seconds, otherwise STALE.
421
+ * @enum {string}
422
+ */
423
+ readonly freshness: "FRESH" | "STALE";
424
+ /** @description When Totalis received the observation, RFC 3339 UTC. */
425
+ readonly received_at: components["schemas"]["Timestamp"];
426
+ };
427
+ readonly ReferenceUnavailable: {
428
+ /**
429
+ * @description UNAVAILABLE: no qualified reference price exists for this side; reason says why.
430
+ * @constant
431
+ */
432
+ readonly availability: "UNAVAILABLE";
433
+ /**
434
+ * @description NOT_OBSERVED: no price seen yet; AMBIGUOUS_SOURCE: the source gave conflicting values; STALE_GENERATION: the last price belongs to an older feed generation; UNSUPPORTED_MARKET: the market is not supported; SOURCE_UNQUALIFIED: the copy carries no live price, as in cached catalog pages and finished markets that left the catalog.
435
+ * @enum {string}
436
+ */
437
+ readonly reason: "NOT_OBSERVED" | "AMBIGUOUS_SOURCE" | "STALE_GENERATION" | "UNSUPPORTED_MARKET" | "SOURCE_UNQUALIFIED";
438
+ /**
439
+ * @description Always UNKNOWN while no price is available.
440
+ * @constant
441
+ */
442
+ readonly freshness: "UNKNOWN";
443
+ /** @description Last update time of the market record this state was derived from, RFC 3339 UTC; 1970-01-01T00:00:00Z in cached catalog copies. */
444
+ readonly received_at: components["schemas"]["Timestamp"];
445
+ };
446
+ readonly Reference: components["schemas"]["ReferenceAvailable"] | components["schemas"]["ReferenceUnavailable"];
447
+ readonly MarketSide: {
448
+ /** @description Which side of the binary market this entry describes, YES or NO. */
449
+ readonly side: components["schemas"]["Side"];
450
+ /** @description Hyperliquid coin name of this side, # followed by outcome_id times 10 plus the side index (0 for YES, 1 for NO). */
451
+ readonly coin: string;
452
+ /** @description Current reference price of this side, or why none is available. */
453
+ readonly reference: components["schemas"]["Reference"];
454
+ };
455
+ readonly DateEvent: {
456
+ /**
457
+ * @description Scheduled start, scheduled decision, or deadline named by the source rules.
458
+ * @enum {unknown}
459
+ */
460
+ readonly kind: "START" | "DECISION" | "DEADLINE";
461
+ /** @description When the event happens, in Unix seconds. */
462
+ readonly at: components["schemas"]["PositiveInt64"];
463
+ };
464
+ /** @description UTC instants from typed Hyperliquid template keywords, and the reviewed market class. event, result_by and resolves_after are display-only, null when already interpolated into the title. scheduled_event_at and observation_ends_at are always given when known; outside sports games, the earlier of them is when Combos close to the market. A market with neither (a deadline-only award or IPO market) closes at its resolution backstop, which the venue enforces at RFQ entry; it is not exposed here. */
465
+ readonly MarketDates: {
466
+ /** @description The scheduled event the market is about; null when unknown or already in the title. */
467
+ readonly event: components["schemas"]["DateEvent"] | null;
468
+ /** @description Latest instant at which the source rules fix the result, in Unix seconds; null when unknown or already in the title. */
469
+ readonly result_by: components["schemas"]["PositiveInt64"] | null;
470
+ /** @description Resolution cannot occur before this instant, in Unix seconds; not a settlement promise. Null when unknown or already in the title. */
471
+ readonly resolves_after: components["schemas"]["PositiveInt64"] | null;
472
+ /** @description Scheduled start or decision named by the source rules, in Unix seconds; null when the market has none. */
473
+ readonly scheduled_event_at: components["schemas"]["PositiveInt64"] | null;
474
+ /** @description End of the observation window named by the source rules, in Unix seconds; null when the market has none. */
475
+ readonly observation_ends_at: components["schemas"]["PositiveInt64"] | null;
476
+ /** @description Reviewed market class, for example PRICE_BINARY, PRICE_TOUCH or SPORTS_TOURNAMENT; null when no reviewed rule classifies the market. */
477
+ readonly market_class: string | null;
478
+ };
479
+ readonly Market: {
480
+ /** @description Hyperliquid outcome ID of the market. */
481
+ readonly outcome_id: components["schemas"]["UInt32String"];
482
+ /** @description Hyperliquid question this market belongs to; null for a standalone market. */
483
+ readonly native_question_id: components["schemas"]["RealQuestionId"] | null;
484
+ /** @description Display title derived from the market definition. */
485
+ readonly title: string;
486
+ /** @description Native lifecycle: ACTIVE while the market is live on Hyperliquid, CLOSED once it is no longer live, UNSUPPORTED when Totalis does not support it. */
487
+ readonly state: components["schemas"]["MarketState"];
488
+ /** @description Native result as last read from HyperEVM. */
489
+ readonly result: components["schemas"]["$defs-Result"];
490
+ /** @description Revision of this market's catalog metadata; it increases when the metadata changes. */
491
+ readonly metadata_revision: components["schemas"]["PositiveInt64"];
492
+ /** @description Whether Totalis currently accepts new positions on this market, with the reason when it does not. */
493
+ readonly eligibility: components["schemas"]["Eligibility"];
494
+ /** @description Whether a Combo may take this market as a leg, decided at read time. Independent of eligibility: a market can trade alone while Combos are closed to it. */
495
+ readonly combo: components["schemas"]["Combo"];
496
+ /** @description Who deployed the market on Hyperliquid. */
497
+ readonly deployer: components["schemas"]["Deployer"];
498
+ /** @description Display category, or null when the market is not mapped to one. */
499
+ readonly category: components["schemas"]["Category"];
500
+ /** @description Display subcategory slug within the category, for example btc; null when unmapped or not subdivided. */
501
+ readonly subcategory: components["schemas"]["Subcategory"];
502
+ /** @description The YES and NO sides, in that order. */
503
+ readonly sides: readonly [
504
+ components["schemas"]["MarketSide"],
505
+ components["schemas"]["MarketSide"]
506
+ ];
507
+ /** @description Display dates and the market class; null when the market has neither reviewed timing nor a market class. Never controls availability or settlement. */
508
+ readonly dates: components["schemas"]["MarketDates"] | null;
509
+ };
510
+ readonly DiscoveryQuestionItem: components["schemas"]["DiscoveryDisplay"] & {
511
+ /** @description Item ID, question: followed by the native question ID. */
512
+ readonly id: string;
513
+ /**
514
+ * @description QUESTION: a multi-outcome question.
515
+ * @constant
516
+ */
517
+ readonly kind: "QUESTION";
518
+ /** @description Hyperliquid question ID. */
519
+ readonly native_question_id: components["schemas"]["RealQuestionId"];
520
+ /** @description The question's markets in the current catalog. */
521
+ readonly markets: readonly components["schemas"]["Market"][];
522
+ };
523
+ readonly DiscoveryStandaloneItem: components["schemas"]["DiscoveryDisplay"] & {
524
+ /** @description Item ID, market: followed by the outcome ID. */
525
+ readonly id: string;
526
+ /**
527
+ * @description STANDALONE: a single binary market with no question.
528
+ * @constant
529
+ */
530
+ readonly kind: "STANDALONE";
531
+ /** @description Always null for a standalone market. */
532
+ readonly native_question_id: null;
533
+ /** @description The single standalone market. */
534
+ readonly markets: readonly [
535
+ components["schemas"]["Market"]
536
+ ];
537
+ };
538
+ readonly DiscoveryItem: components["schemas"]["DiscoveryQuestionItem"] | components["schemas"]["DiscoveryStandaloneItem"];
539
+ readonly PriceSeries: {
540
+ /**
541
+ * @description BINARY_PRICE: each member asks whether the price is above its threshold at expiry. PRICE_TOUCH: each member asks whether the price touches its target by expiry.
542
+ * @enum {string}
543
+ */
544
+ readonly template: "BINARY_PRICE" | "PRICE_TOUCH";
545
+ /** @description Hyperliquid perp the members price, with its builder-dex prefix when it has one, for example BTC or xyz:CL. */
546
+ readonly underlying: string;
547
+ /** @description Expiry every member shares, RFC 3339 UTC. */
548
+ readonly expiry: components["schemas"]["Timestamp"];
549
+ };
550
+ /** @description Positive signed 64-bit decimal integer, at most 9223372036854775807. */
551
+ readonly PositiveInt64String: string;
552
+ readonly Publication: {
553
+ /** @enum {string} */
554
+ readonly contract_version: "2" | "3" | "4";
555
+ /** @enum {string} */
556
+ readonly network: "HYPEREVM_MAINNET" | "HYPEREVM_TESTNET";
557
+ readonly browse_version: components["schemas"]["PositiveInt64String"];
558
+ readonly catalog_generation: components["schemas"]["PositiveInt64String"];
559
+ readonly config_version: string;
560
+ readonly published_at: components["schemas"]["Timestamp"];
561
+ readonly valid_until: components["schemas"]["Timestamp"];
562
+ readonly visibility_version: components["schemas"]["PositiveInt64String"];
563
+ readonly visibility_checked_at: components["schemas"]["Timestamp"];
564
+ readonly search_index_version: components["schemas"]["PositiveInt64String"] | null;
565
+ };
566
+ /** @enum {string} */
567
+ readonly Sort: "default" | "closing_soon" | "relevance";
568
+ readonly NormalizedSearchText: string;
569
+ readonly Filters: {
570
+ readonly category: components["schemas"]["CategorySlug"] | null;
571
+ readonly subcategory: components["schemas"]["Slug"] | null;
572
+ readonly frequency: components["schemas"]["Frequency"] | null;
573
+ readonly date_filter: components["schemas"]["DateFilter"];
574
+ readonly sort: components["schemas"]["Sort"];
575
+ readonly q: components["schemas"]["NormalizedSearchText"] | null;
576
+ /** @description Only cards in play at publication: published_at inside [date_at, estimated_live_until). */
577
+ readonly live: boolean;
578
+ } & ({
579
+ readonly category: components["schemas"]["CategorySlug"];
580
+ } | {
581
+ readonly subcategory: null;
582
+ });
583
+ readonly IpoMarketCapSeries: {
584
+ /**
585
+ * @description Each member asks whether the company's first-day closing market cap exceeds its own threshold, in billions of US dollars, and resolves independently.
586
+ * @constant
587
+ */
588
+ readonly template: "COMPANY_IPO_MARKET_CAP";
589
+ /** @description Company every member names, trimmed. */
590
+ readonly company: string;
591
+ /** @description Listing deadline every member shares, RFC 3339 UTC. */
592
+ readonly listing_deadline: components["schemas"]["Timestamp"];
593
+ };
594
+ /** @description What the members of a series share, discriminated by template. Browse contract 3 publishes only PriceSeries. */
595
+ readonly SeriesDescriptor: components["schemas"]["PriceSeries"] | components["schemas"]["IpoMarketCapSeries"];
596
+ /** @description A series or game member: a standalone market with no Hyperliquid question. */
597
+ readonly SeriesMarket: components["schemas"]["Market"] & {
598
+ /** @description Always null: a member has no Hyperliquid question. */
599
+ readonly native_question_id?: null;
600
+ };
601
+ readonly DiscoverySeriesItem: components["schemas"]["DiscoveryDisplay"] & {
602
+ /** @description Item ID, series: followed by the series key. */
603
+ readonly id: string;
604
+ /**
605
+ * @description SERIES: standalone threshold markets on one underlying and expiry, or one company and listing deadline, grouped for display. Members are separate markets, not outcomes of one question; their results are independent.
606
+ * @constant
607
+ */
608
+ readonly kind: "SERIES";
609
+ /** @description Always null: a series is not a Hyperliquid question. */
610
+ readonly native_question_id: null;
611
+ /** @description What the members share. */
612
+ readonly series: components["schemas"]["SeriesDescriptor"];
613
+ /** @description The member markets, by threshold, target or market-cap threshold ascending, then outcome ID. */
614
+ readonly markets: readonly components["schemas"]["SeriesMarket"][];
615
+ };
616
+ readonly Game: {
617
+ /** @description Sport as the first member names it, trimmed. */
618
+ readonly sport: string;
619
+ /** @description Scheduled start every member shares, RFC 3339 UTC. */
620
+ readonly scheduled_start: components["schemas"]["Timestamp"];
621
+ /** @description The two participants in the first member's order, trimmed. Other members may list them the other way round; each keeps its own orientation and sides. */
622
+ readonly participants: readonly [
623
+ string,
624
+ string
625
+ ];
626
+ /** @description Members that pick the contest winner (sportsContestWinner), in market order. */
627
+ readonly winner_outcome_ids: readonly components["schemas"]["UInt32String"][];
628
+ /** @description Members on participantA's points spread (sportsSpread), in market order. */
629
+ readonly spread_outcome_ids: readonly components["schemas"]["UInt32String"][];
630
+ /** @description Members on the combined total (sportsTotal), in market order. */
631
+ readonly total_outcome_ids: readonly components["schemas"]["UInt32String"][];
632
+ };
633
+ readonly DiscoveryGameItem: components["schemas"]["DiscoveryDisplay"] & {
634
+ /** @description Item ID, game: followed by the game key. */
635
+ readonly id: string;
636
+ /**
637
+ * @description GAME: the standalone winner, spread and total markets of one scheduled sports contest, grouped for display. Browse contract 4 only. Members are separate markets with their own sides and rules; never combine their prices or results.
638
+ * @constant
639
+ */
640
+ readonly kind: "GAME";
641
+ /** @description Always null: a game is not a Hyperliquid question. */
642
+ readonly native_question_id: null;
643
+ /** @description What the members share and their roles. */
644
+ readonly game: components["schemas"]["Game"];
645
+ /** @description The member markets: winners, then spreads, then totals, each by outcome ID. */
646
+ readonly markets: readonly components["schemas"]["SeriesMarket"][];
647
+ };
648
+ /**
649
+ * Format: canonical-market-item-id
650
+ * @description question:<RealQuestionId>, market:<UInt32String>, series:<SeriesId> or game:<GameId>. The canonical item ID format checker validates the suffix using the existing native ID schemas, excluding leading zeros, overflow and the question sentinel. Contract 2 never carries series or game IDs; contract 3 never carries game IDs.
651
+ */
652
+ readonly ItemId: string;
653
+ readonly Card: {
654
+ readonly item: (components["schemas"]["DiscoveryItem"] | components["schemas"]["DiscoverySeriesItem"] | components["schemas"]["DiscoveryGameItem"]) & {
655
+ readonly id?: components["schemas"]["ItemId"];
656
+ };
657
+ readonly frequency: components["schemas"]["Frequency"] | null;
658
+ /** @description Verified native trading-close time, if supplied. Currently null: supported metadata contains observation and settlement dates, not an authoritative trading-close timestamp. */
659
+ readonly closes_at: components["schemas"]["Timestamp"] | null;
660
+ readonly matched_outcome_ids: readonly components["schemas"]["UInt32String"][];
661
+ /**
662
+ * Format: date-time
663
+ * @description Sort and date-bucket key only: scheduled event/decision or observation time; legacy records retain their source date. Display each market's dates instead. Never trading closure or settlement.
664
+ */
665
+ readonly date_at: string | null;
666
+ /** @description End of a scheduled single contest's in-play window [date_at, estimated_live_until): its scheduled start plus its league's reviewed usual game length, unless the live game feed shows the game in play (then at least 15 minutes past publication, republished before it closes, until the game ends) or over (then the moment it was first seen over, or date_at if that was earlier). Never a trading cutoff, closure or settlement. Present before the contest starts. Null for anything else: tournaments, series, leagues without a reviewed length, or markets that disagree on the start. */
667
+ readonly estimated_live_until: components["schemas"]["Timestamp"] | null;
668
+ };
669
+ readonly Count: {
670
+ readonly value: number | null;
671
+ /** @enum {string} */
672
+ readonly relation: "EXACT" | "LOWER_BOUND" | "UNAVAILABLE";
673
+ } & unknown;
674
+ readonly FacetOption: {
675
+ readonly value: string;
676
+ readonly label: string;
677
+ readonly count: components["schemas"]["Count"];
678
+ };
679
+ readonly CategoryFacetOption: components["schemas"]["FacetOption"] & {
680
+ readonly value?: components["schemas"]["CategorySlug"];
681
+ };
682
+ readonly SubcategoryFacetOption: components["schemas"]["FacetOption"] & {
683
+ readonly value?: components["schemas"]["Slug"];
684
+ };
685
+ readonly FrequencyFacetOption: components["schemas"]["FacetOption"] & {
686
+ readonly value?: components["schemas"]["Frequency"];
687
+ };
688
+ readonly DateFilterFacetOption: components["schemas"]["FacetOption"] & {
689
+ readonly value?: components["schemas"]["DateFilter"];
690
+ };
691
+ readonly SortFacetOption: components["schemas"]["FacetOption"] & {
692
+ readonly value?: components["schemas"]["Sort"];
693
+ };
694
+ readonly Facets: {
695
+ readonly categories: readonly components["schemas"]["CategoryFacetOption"][];
696
+ readonly subcategories: readonly components["schemas"]["SubcategoryFacetOption"][];
697
+ readonly frequencies: readonly components["schemas"]["FrequencyFacetOption"][];
698
+ readonly date_filters: readonly components["schemas"]["DateFilterFacetOption"][];
699
+ readonly sorts: readonly components["schemas"]["SortFacetOption"][];
700
+ };
701
+ /** @description Opaque cursor for the next page, or null when has_more is false. */
702
+ readonly NextCursor: string | null;
703
+ /** @description Cards in play at the current publication, inside [date_at, estimated_live_until): the live=true page count of All and of every configured category, in navigation order. They change only when a publication does. UNAVAILABLE whenever the publication's other counts are, never a guess. */
704
+ readonly LiveCounts: {
705
+ readonly total: components["schemas"]["Count"];
706
+ readonly categories: readonly {
707
+ readonly value: components["schemas"]["CategorySlug"];
708
+ readonly count: components["schemas"]["Count"];
709
+ }[];
710
+ };
711
+ /**
712
+ * @description Stable HTTP error code. Each code has one HTTP status and one retry value.
713
+ * @enum {string}
714
+ */
715
+ readonly ErrorCode: "INVALID_REQUEST" | "INVALID_QUERY" | "INVALID_CURSOR" | "INVALID_IDEMPOTENCY_KEY" | "ORIGIN_REQUIRED" | "SUBPROTOCOL_REQUIRED" | "UNSUPPORTED_BROWSE_CONTRACT" | "UNAUTHENTICATED" | "FORBIDDEN" | "ORIGIN_NOT_ALLOWED" | "ACCESS_REQUIRED" | "SIGN_IN_REQUIRED" | "NOT_FOUND" | "IDENTITY_NOT_FOUND" | "QUOTE_NOT_FOUND" | "INVITE_CODE_NOT_FOUND" | "IDEMPOTENCY_KEY_REUSED" | "STATE_CONFLICT" | "INVITE_CODE_EXHAUSTED" | "STALE_CURSOR" | "CURSOR_EXPIRED" | "CURSOR_RESET" | "RECURRING_DEFINITION_CONFLICT" | "EMBEDDED_WALLET_CONFLICT" | "SECRET_UNAVAILABLE" | "ROTATION_IN_PROGRESS" | "TELEMETRY_CONFLICT" | "RFQ_NOT_CANCELLABLE" | "RFQ_NOT_OPEN" | "RFQ_GENERATION_STALE" | "RFQ_GENERATION_IN_FLIGHT" | "QUOTE_EXPIRED" | "QUOTE_CANCELLED" | "QUOTE_REPLACED" | "QUOTE_SIGNER_CHANGED" | "QUOTE_CAPACITY_EXCEEDED" | "CORE_ACCOUNT_NOT_READY" | "CORE_ACCOUNT_ACTIVATION_REQUIRED" | "CORE_EXIT_ABANDONED" | "CORE_MOVE_IN_FLIGHT" | "ACCEPTANCE_IN_FLIGHT" | "USERNAME_TAKEN" | "USERNAME_ALREADY_SET" | "USERNAME_REQUIRED" | "INVALID_SIGNATURE" | "WALLET_CONTRACT_UNSUPPORTED" | "WRONG_AUTHORITY" | "KEY_LIMIT_REACHED" | "USERNAME_NOT_ALLOWED" | "FOLLOW_SELF" | "FOLLOW_LIMIT_REACHED" | "RATE_LIMITED" | "CONNECTION_LIMIT" | "RFQ_INTENT_LIMIT" | "QUOTE_EXPOSURE_LIMIT" | "DEPENDENCY_STALE" | "AUTHORIZATION_UNAVAILABLE" | "SOURCE_UNAVAILABLE" | "CONTRACT_UNAVAILABLE" | "MARKET_DATA_UNAVAILABLE" | "BROWSE_UNAVAILABLE" | "FINANCIAL_ACTIONS_DISABLED" | "CORE_EXIT_UNAVAILABLE" | "COLLATERAL_REDUCTION_UNAVAILABLE" | "SPONSORSHIP_UNAVAILABLE" | "CONTRACT_SIGNATURE_OVERLOADED" | "QUOTE_EXPOSURE_STALE" | "COMBO_AUTOMATIC_DISABLED" | "GAS_PRICE_ABOVE_CEILING" | "EMBEDDED_WALLET_UNAVAILABLE" | "CONNECTION_DRAIN";
716
+ readonly FieldViolation: {
717
+ /**
718
+ * @description REQUIRED: the input is missing. INVALID: it is present but malformed or out of range. UNEXPECTED: the input is not accepted here.
719
+ * @enum {string}
720
+ */
721
+ readonly code: "REQUIRED" | "INVALID" | "UNEXPECTED";
722
+ /** @description JSON pointer into the body, or into the query parameters as one flat object for requests without a body, for example /legs/0/stake or /limit. */
723
+ readonly field: string;
724
+ };
725
+ /**
726
+ * @description NEVER: stop. BACKOFF: resend the same request with the same Idempotency-Key after Retry-After. REFRESH: re-read state, then send a new request with a new Idempotency-Key.
727
+ * @enum {string}
728
+ */
729
+ readonly Retry: "NEVER" | "BACKOFF" | "REFRESH";
730
+ readonly ErrorDetail: {
731
+ /** @description Stable registered code; branch on this, not on message or status. */
732
+ readonly code: components["schemas"]["ErrorCode"];
733
+ /** @description Each invalid input by JSON pointer; empty when the error is not about a specific input. */
734
+ readonly field_violations: readonly components["schemas"]["FieldViolation"][];
735
+ /** @description Human-readable; may change without notice. */
736
+ readonly message: string;
737
+ /**
738
+ * Format: uuid
739
+ * @description UUIDv7 of this request, also returned in the X-Request-ID header. Quote it when reporting a problem.
740
+ */
741
+ readonly request_id: string;
742
+ /** @description What the caller should do next; fixed by the registry for each code. */
743
+ readonly retry: components["schemas"]["Retry"];
744
+ };
745
+ readonly Error: {
746
+ /** @description The one error this request failed with. */
747
+ readonly error: components["schemas"]["ErrorDetail"];
748
+ };
749
+ readonly NamedOption: {
750
+ readonly value: components["schemas"]["Slug"];
751
+ readonly label: string;
752
+ };
753
+ readonly FrequencyOption: {
754
+ readonly value: components["schemas"]["Frequency"];
755
+ readonly label: string;
756
+ };
757
+ readonly "$defs-Category": {
758
+ readonly value: components["schemas"]["CategorySlug"];
759
+ readonly label: string;
760
+ readonly available: boolean;
761
+ readonly count: components["schemas"]["Count"];
762
+ readonly subcategories: readonly components["schemas"]["NamedOption"][];
763
+ readonly frequencies: readonly [
764
+ ] | readonly [
765
+ components["schemas"]["FrequencyOption"]
766
+ ] | readonly [
767
+ components["schemas"]["FrequencyOption"],
768
+ components["schemas"]["FrequencyOption"]
769
+ ] | readonly [
770
+ components["schemas"]["FrequencyOption"],
771
+ components["schemas"]["FrequencyOption"],
772
+ components["schemas"]["FrequencyOption"]
773
+ ] | readonly [
774
+ components["schemas"]["FrequencyOption"],
775
+ components["schemas"]["FrequencyOption"],
776
+ components["schemas"]["FrequencyOption"],
777
+ components["schemas"]["FrequencyOption"]
778
+ ] | readonly [
779
+ components["schemas"]["FrequencyOption"],
780
+ components["schemas"]["FrequencyOption"],
781
+ components["schemas"]["FrequencyOption"],
782
+ components["schemas"]["FrequencyOption"],
783
+ components["schemas"]["FrequencyOption"]
784
+ ] | readonly [
785
+ components["schemas"]["FrequencyOption"],
786
+ components["schemas"]["FrequencyOption"],
787
+ components["schemas"]["FrequencyOption"],
788
+ components["schemas"]["FrequencyOption"],
789
+ components["schemas"]["FrequencyOption"],
790
+ components["schemas"]["FrequencyOption"]
791
+ ];
792
+ readonly default_sort: components["schemas"]["BrowseSort"];
793
+ };
794
+ };
795
+ responses: {
796
+ /** @description INVALID_QUERY, INVALID_CURSOR or UNSUPPORTED_BROWSE_CONTRACT */
797
+ readonly Error400: {
798
+ headers: {
799
+ readonly [name: string]: unknown;
800
+ };
801
+ content: {
802
+ readonly "application/json": components["schemas"]["Error"];
803
+ };
804
+ };
805
+ /** @description STALE_CURSOR: restart the query; never mix versions */
806
+ readonly Error409: {
807
+ headers: {
808
+ readonly [name: string]: unknown;
809
+ };
810
+ content: {
811
+ readonly "application/json": components["schemas"]["Error"];
812
+ };
813
+ };
814
+ readonly Error429: {
815
+ headers: {
816
+ readonly [name: string]: unknown;
817
+ };
818
+ content?: never;
819
+ };
820
+ readonly Error503: {
821
+ headers: {
822
+ readonly [name: string]: unknown;
823
+ };
824
+ content?: never;
825
+ };
826
+ /** @description Quota or capacity limit; resend after Retry-After */
827
+ readonly RateLimited: {
828
+ headers: {
829
+ readonly "Retry-After": components["headers"]["RetryAfter"];
830
+ readonly [name: string]: unknown;
831
+ };
832
+ content: {
833
+ readonly "application/json": components["schemas"]["Error"];
834
+ };
835
+ };
836
+ /** @description A required authority or dependency is unavailable; resend after Retry-After */
837
+ readonly Unavailable: {
838
+ headers: {
839
+ readonly "Retry-After": components["headers"]["RetryAfter"];
840
+ readonly [name: string]: unknown;
841
+ };
842
+ content: {
843
+ readonly "application/json": components["schemas"]["Error"];
844
+ };
845
+ };
846
+ };
847
+ parameters: {
848
+ /** @description Contract 3 groups standalone price-threshold markets on one underlying and expiry into SERIES cards; contract 2 returns them as STANDALONE cards. Contract 4 is contract 3 plus IPO market-cap ladders as SERIES cards (template COMPANY_IPO_MARKET_CAP) and GAME cards grouping the winner, spread and total markets of one sports contest. All are published from the same catalog, but versions, cursors and updates of one contract never apply to the other. The server negotiates on this header alone too, but this document requires the contract query parameter so every typed request negotiates; send the header only beside a matching parameter here. Unsupported versions, or a header and parameter that disagree, return 400 UNSUPPORTED_BROWSE_CONTRACT. */
849
+ readonly BrowseContract: "2" | "3" | "4";
850
+ /** @description The browse contract as a query parameter, the same values as X-Totalis-Browse-Contract. A GET carrying it needs no custom header, so browsers skip the CORS preflight. Required here: without it or the header the routes keep their unnegotiated responses, which this document does not describe. Give it once; empty, repeated, malformed or unsupported values, or a value that disagrees with the header, return 400 UNSUPPORTED_BROWSE_CONTRACT. Cursors are bound to the contract, not to how it was sent. */
851
+ readonly BrowseContractQuery: "2" | "3" | "4";
852
+ };
853
+ requestBodies: never;
854
+ headers: {
855
+ /** @description Seconds to wait before resending the same request */
856
+ readonly RetryAfter: number;
857
+ };
858
+ pathItems: never;
859
+ };
860
+ export type $defs = Record<string, never>;
861
+ export interface operations {
862
+ readonly listPublishedDiscovery: {
863
+ readonly parameters: {
864
+ readonly query: {
865
+ /** @description The browse contract as a query parameter, the same values as X-Totalis-Browse-Contract. A GET carrying it needs no custom header, so browsers skip the CORS preflight. Required here: without it or the header the routes keep their unnegotiated responses, which this document does not describe. Give it once; empty, repeated, malformed or unsupported values, or a value that disagrees with the header, return 400 UNSUPPORTED_BROWSE_CONTRACT. Cursors are bound to the contract, not to how it was sent. */
866
+ readonly contract: components["parameters"]["BrowseContractQuery"];
867
+ /** @description Form-exploded query object: its fields appear as top-level query parameters (category=crypto&subcategory=btc), not a JSON filters parameter. This preserves the category/subcategory dependency in operation schemas. */
868
+ readonly filters?: components["schemas"]["BrowseQuery"];
869
+ };
870
+ readonly header?: {
871
+ /** @description Contract 3 groups standalone price-threshold markets on one underlying and expiry into SERIES cards; contract 2 returns them as STANDALONE cards. Contract 4 is contract 3 plus IPO market-cap ladders as SERIES cards (template COMPANY_IPO_MARKET_CAP) and GAME cards grouping the winner, spread and total markets of one sports contest. All are published from the same catalog, but versions, cursors and updates of one contract never apply to the other. The server negotiates on this header alone too, but this document requires the contract query parameter so every typed request negotiates; send the header only beside a matching parameter here. Unsupported versions, or a header and parameter that disagree, return 400 UNSUPPORTED_BROWSE_CONTRACT. */
872
+ readonly "X-Totalis-Browse-Contract"?: components["parameters"]["BrowseContract"];
873
+ };
874
+ readonly path?: never;
875
+ readonly cookie?: never;
876
+ };
877
+ readonly requestBody?: never;
878
+ readonly responses: {
879
+ /** @description Published browse response with current visibility applied; Cache-Control: no-store. */
880
+ readonly 200: {
881
+ headers: {
882
+ readonly "Cache-Control"?: "no-store";
883
+ /** @description Includes X-Totalis-Browse-Contract. */
884
+ readonly Vary?: string;
885
+ readonly [name: string]: unknown;
886
+ };
887
+ content: {
888
+ readonly "application/json": components["schemas"]["BrowseResult"];
889
+ };
890
+ };
891
+ readonly 400: components["responses"]["Error400"];
892
+ readonly 409: components["responses"]["Error409"];
893
+ readonly 429: components["responses"]["RateLimited"];
894
+ readonly 503: components["responses"]["Unavailable"];
895
+ };
896
+ };
897
+ readonly searchPublishedCatalog: {
898
+ readonly parameters: {
899
+ readonly query: {
900
+ /** @description The browse contract as a query parameter, the same values as X-Totalis-Browse-Contract. A GET carrying it needs no custom header, so browsers skip the CORS preflight. Required here: without it or the header the routes keep their unnegotiated responses, which this document does not describe. Give it once; empty, repeated, malformed or unsupported values, or a value that disagrees with the header, return 400 UNSUPPORTED_BROWSE_CONTRACT. Cursors are bound to the contract, not to how it was sent. */
901
+ readonly contract: components["parameters"]["BrowseContractQuery"];
902
+ /** @description Form-exploded query object: its fields appear as top-level query parameters (category=crypto&subcategory=btc), not a JSON filters parameter. This preserves the category/subcategory dependency in operation schemas. */
903
+ readonly filters: components["schemas"]["SearchQuery"];
904
+ };
905
+ readonly header?: {
906
+ /** @description Contract 3 groups standalone price-threshold markets on one underlying and expiry into SERIES cards; contract 2 returns them as STANDALONE cards. Contract 4 is contract 3 plus IPO market-cap ladders as SERIES cards (template COMPANY_IPO_MARKET_CAP) and GAME cards grouping the winner, spread and total markets of one sports contest. All are published from the same catalog, but versions, cursors and updates of one contract never apply to the other. The server negotiates on this header alone too, but this document requires the contract query parameter so every typed request negotiates; send the header only beside a matching parameter here. Unsupported versions, or a header and parameter that disagree, return 400 UNSUPPORTED_BROWSE_CONTRACT. */
907
+ readonly "X-Totalis-Browse-Contract"?: components["parameters"]["BrowseContract"];
908
+ };
909
+ readonly path?: never;
910
+ readonly cookie?: never;
911
+ };
912
+ readonly requestBody?: never;
913
+ readonly responses: {
914
+ /** @description Published browse response with current visibility applied; Cache-Control: no-store. */
915
+ readonly 200: {
916
+ headers: {
917
+ readonly "Cache-Control"?: "no-store";
918
+ /** @description Includes X-Totalis-Browse-Contract. */
919
+ readonly Vary?: string;
920
+ readonly [name: string]: unknown;
921
+ };
922
+ content: {
923
+ readonly "application/json": components["schemas"]["SearchResult"];
924
+ };
925
+ };
926
+ readonly 400: components["responses"]["Error400"];
927
+ readonly 409: components["responses"]["Error409"];
928
+ readonly 429: components["responses"]["RateLimited"];
929
+ readonly 503: components["responses"]["Unavailable"];
930
+ };
931
+ };
932
+ readonly getPublishedTaxonomy: {
933
+ readonly parameters: {
934
+ readonly query: {
935
+ /** @description The browse contract as a query parameter, the same values as X-Totalis-Browse-Contract. A GET carrying it needs no custom header, so browsers skip the CORS preflight. Required here: without it or the header the routes keep their unnegotiated responses, which this document does not describe. Give it once; empty, repeated, malformed or unsupported values, or a value that disagrees with the header, return 400 UNSUPPORTED_BROWSE_CONTRACT. Cursors are bound to the contract, not to how it was sent. */
936
+ readonly contract: components["parameters"]["BrowseContractQuery"];
937
+ };
938
+ readonly header?: {
939
+ /** @description Contract 3 groups standalone price-threshold markets on one underlying and expiry into SERIES cards; contract 2 returns them as STANDALONE cards. Contract 4 is contract 3 plus IPO market-cap ladders as SERIES cards (template COMPANY_IPO_MARKET_CAP) and GAME cards grouping the winner, spread and total markets of one sports contest. All are published from the same catalog, but versions, cursors and updates of one contract never apply to the other. The server negotiates on this header alone too, but this document requires the contract query parameter so every typed request negotiates; send the header only beside a matching parameter here. Unsupported versions, or a header and parameter that disagree, return 400 UNSUPPORTED_BROWSE_CONTRACT. */
940
+ readonly "X-Totalis-Browse-Contract"?: components["parameters"]["BrowseContract"];
941
+ };
942
+ readonly path?: never;
943
+ readonly cookie?: never;
944
+ };
945
+ readonly requestBody?: never;
946
+ readonly responses: {
947
+ /** @description Published browse response with current visibility applied; Cache-Control: no-store. */
948
+ readonly 200: {
949
+ headers: {
950
+ readonly "Cache-Control"?: "no-store";
951
+ /** @description Includes X-Totalis-Browse-Contract. */
952
+ readonly Vary?: string;
953
+ readonly [name: string]: unknown;
954
+ };
955
+ content: {
956
+ readonly "application/json": components["schemas"]["Taxonomy"];
957
+ };
958
+ };
959
+ readonly 400: components["responses"]["Error400"];
960
+ readonly 409: components["responses"]["Error409"];
961
+ readonly 429: components["responses"]["RateLimited"];
962
+ readonly 503: components["responses"]["Unavailable"];
963
+ };
964
+ };
965
+ }