@wahoopredict/trading-sdk 0.2.0 → 0.3.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.
- package/dist/types/schema.d.ts +1219 -0
- package/package.json +2 -2
|
@@ -0,0 +1,1219 @@
|
|
|
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
|
+
"/event/events-list": {
|
|
8
|
+
parameters: {
|
|
9
|
+
query?: never;
|
|
10
|
+
header?: never;
|
|
11
|
+
path?: never;
|
|
12
|
+
cookie?: never;
|
|
13
|
+
};
|
|
14
|
+
get?: never;
|
|
15
|
+
put?: never;
|
|
16
|
+
/** Get a list of events */
|
|
17
|
+
post: operations["getEventsList"];
|
|
18
|
+
delete?: never;
|
|
19
|
+
options?: never;
|
|
20
|
+
head?: never;
|
|
21
|
+
patch?: never;
|
|
22
|
+
trace?: never;
|
|
23
|
+
};
|
|
24
|
+
"/event/event-details/{eventId}": {
|
|
25
|
+
parameters: {
|
|
26
|
+
query?: never;
|
|
27
|
+
header?: never;
|
|
28
|
+
path?: never;
|
|
29
|
+
cookie?: never;
|
|
30
|
+
};
|
|
31
|
+
/** Get detailed information for a specific event */
|
|
32
|
+
get: operations["getEventDetails"];
|
|
33
|
+
put?: never;
|
|
34
|
+
post?: never;
|
|
35
|
+
delete?: never;
|
|
36
|
+
options?: never;
|
|
37
|
+
head?: never;
|
|
38
|
+
patch?: never;
|
|
39
|
+
trace?: never;
|
|
40
|
+
};
|
|
41
|
+
"/event/orderbook": {
|
|
42
|
+
parameters: {
|
|
43
|
+
query?: never;
|
|
44
|
+
header?: never;
|
|
45
|
+
path?: never;
|
|
46
|
+
cookie?: never;
|
|
47
|
+
};
|
|
48
|
+
/** Retrieve the order book for a specific outcome option. */
|
|
49
|
+
get: operations["getOrderbook"];
|
|
50
|
+
put?: never;
|
|
51
|
+
post?: never;
|
|
52
|
+
delete?: never;
|
|
53
|
+
options?: never;
|
|
54
|
+
head?: never;
|
|
55
|
+
patch?: never;
|
|
56
|
+
trace?: never;
|
|
57
|
+
};
|
|
58
|
+
"/event/test-order": {
|
|
59
|
+
parameters: {
|
|
60
|
+
query?: never;
|
|
61
|
+
header?: never;
|
|
62
|
+
path?: never;
|
|
63
|
+
cookie?: never;
|
|
64
|
+
};
|
|
65
|
+
get?: never;
|
|
66
|
+
put?: never;
|
|
67
|
+
/** @description Get estimation of the order */
|
|
68
|
+
post: {
|
|
69
|
+
parameters: {
|
|
70
|
+
query?: never;
|
|
71
|
+
header?: never;
|
|
72
|
+
path?: never;
|
|
73
|
+
cookie?: never;
|
|
74
|
+
};
|
|
75
|
+
requestBody: {
|
|
76
|
+
content: {
|
|
77
|
+
"application/json": components["schemas"]["placeOrderRequestBody"];
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
responses: {
|
|
81
|
+
/** @description Order tested successfully */
|
|
82
|
+
200: {
|
|
83
|
+
headers: {
|
|
84
|
+
[name: string]: unknown;
|
|
85
|
+
};
|
|
86
|
+
content: {
|
|
87
|
+
"application/json": {
|
|
88
|
+
/**
|
|
89
|
+
* @description Operation status
|
|
90
|
+
* @enum {string}
|
|
91
|
+
*/
|
|
92
|
+
result: "success";
|
|
93
|
+
/** @description Player’s estimated win after the order is placed */
|
|
94
|
+
potentialReturn: string;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
400: {
|
|
99
|
+
headers: {
|
|
100
|
+
[name: string]: unknown;
|
|
101
|
+
};
|
|
102
|
+
content: {
|
|
103
|
+
"application/json": components["schemas"]["ApiError"];
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
403: {
|
|
107
|
+
headers: {
|
|
108
|
+
[name: string]: unknown;
|
|
109
|
+
};
|
|
110
|
+
content: {
|
|
111
|
+
"application/json": components["schemas"]["ApiError"];
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
delete?: never;
|
|
117
|
+
options?: never;
|
|
118
|
+
head?: never;
|
|
119
|
+
patch?: never;
|
|
120
|
+
trace?: never;
|
|
121
|
+
};
|
|
122
|
+
"/event/place-order": {
|
|
123
|
+
parameters: {
|
|
124
|
+
query?: never;
|
|
125
|
+
header?: never;
|
|
126
|
+
path?: never;
|
|
127
|
+
cookie?: never;
|
|
128
|
+
};
|
|
129
|
+
get?: never;
|
|
130
|
+
put?: never;
|
|
131
|
+
/** @description Create an order on an outcome option */
|
|
132
|
+
post: {
|
|
133
|
+
parameters: {
|
|
134
|
+
query?: never;
|
|
135
|
+
header?: never;
|
|
136
|
+
path?: never;
|
|
137
|
+
cookie?: never;
|
|
138
|
+
};
|
|
139
|
+
requestBody: {
|
|
140
|
+
content: {
|
|
141
|
+
"application/json": components["schemas"]["placeOrderRequestBody"];
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
responses: {
|
|
145
|
+
/** @description Order created successfully */
|
|
146
|
+
200: {
|
|
147
|
+
headers: {
|
|
148
|
+
[name: string]: unknown;
|
|
149
|
+
};
|
|
150
|
+
content: {
|
|
151
|
+
"application/json": {
|
|
152
|
+
/**
|
|
153
|
+
* @description Operation status
|
|
154
|
+
* @enum {string}
|
|
155
|
+
*/
|
|
156
|
+
result: "success";
|
|
157
|
+
/** @description Player’s balance after the order is placed */
|
|
158
|
+
newBalance: string;
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
400: {
|
|
163
|
+
headers: {
|
|
164
|
+
[name: string]: unknown;
|
|
165
|
+
};
|
|
166
|
+
content: {
|
|
167
|
+
"application/json": components["schemas"]["ApiError"];
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
403: {
|
|
171
|
+
headers: {
|
|
172
|
+
[name: string]: unknown;
|
|
173
|
+
};
|
|
174
|
+
content: {
|
|
175
|
+
"application/json": components["schemas"]["ApiError"];
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
delete?: never;
|
|
181
|
+
options?: never;
|
|
182
|
+
head?: never;
|
|
183
|
+
patch?: never;
|
|
184
|
+
trace?: never;
|
|
185
|
+
};
|
|
186
|
+
"/event/cancel-order": {
|
|
187
|
+
parameters: {
|
|
188
|
+
query?: never;
|
|
189
|
+
header?: never;
|
|
190
|
+
path?: never;
|
|
191
|
+
cookie?: never;
|
|
192
|
+
};
|
|
193
|
+
get?: never;
|
|
194
|
+
put?: never;
|
|
195
|
+
post?: never;
|
|
196
|
+
delete: {
|
|
197
|
+
parameters: {
|
|
198
|
+
query: {
|
|
199
|
+
orderId: string;
|
|
200
|
+
};
|
|
201
|
+
header?: never;
|
|
202
|
+
path?: never;
|
|
203
|
+
cookie?: never;
|
|
204
|
+
};
|
|
205
|
+
requestBody?: never;
|
|
206
|
+
responses: {
|
|
207
|
+
/** @description Order cancelled successfully */
|
|
208
|
+
200: {
|
|
209
|
+
headers: {
|
|
210
|
+
[name: string]: unknown;
|
|
211
|
+
};
|
|
212
|
+
content: {
|
|
213
|
+
"application/json": {
|
|
214
|
+
/**
|
|
215
|
+
* @description Operation status
|
|
216
|
+
* @enum {string}
|
|
217
|
+
*/
|
|
218
|
+
result: "success";
|
|
219
|
+
newBalance?: number;
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
/** @description Order is not found or already cancelled */
|
|
224
|
+
404: {
|
|
225
|
+
headers: {
|
|
226
|
+
[name: string]: unknown;
|
|
227
|
+
};
|
|
228
|
+
content: {
|
|
229
|
+
"application/json": components["schemas"]["ApiError"];
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
options?: never;
|
|
235
|
+
head?: never;
|
|
236
|
+
patch?: never;
|
|
237
|
+
trace?: never;
|
|
238
|
+
};
|
|
239
|
+
"/event/collect-position": {
|
|
240
|
+
parameters: {
|
|
241
|
+
query?: never;
|
|
242
|
+
header?: never;
|
|
243
|
+
path?: never;
|
|
244
|
+
cookie?: never;
|
|
245
|
+
};
|
|
246
|
+
get?: never;
|
|
247
|
+
put?: never;
|
|
248
|
+
/** @description Collect win or loss when event is resolved */
|
|
249
|
+
post: {
|
|
250
|
+
parameters: {
|
|
251
|
+
query?: never;
|
|
252
|
+
header?: never;
|
|
253
|
+
path?: never;
|
|
254
|
+
cookie?: never;
|
|
255
|
+
};
|
|
256
|
+
requestBody: {
|
|
257
|
+
content: {
|
|
258
|
+
"application/json": {
|
|
259
|
+
positionId?: string;
|
|
260
|
+
};
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
responses: {
|
|
264
|
+
/** @description Position collected successfully */
|
|
265
|
+
200: {
|
|
266
|
+
headers: {
|
|
267
|
+
[name: string]: unknown;
|
|
268
|
+
};
|
|
269
|
+
content: {
|
|
270
|
+
"application/json": {
|
|
271
|
+
/** @enum {string} */
|
|
272
|
+
result?: "success";
|
|
273
|
+
newBalance?: number;
|
|
274
|
+
};
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
|
+
/** @description Position is not found or not collectable yet */
|
|
278
|
+
404: {
|
|
279
|
+
headers: {
|
|
280
|
+
[name: string]: unknown;
|
|
281
|
+
};
|
|
282
|
+
content: {
|
|
283
|
+
"application/json": components["schemas"]["ApiError"];
|
|
284
|
+
};
|
|
285
|
+
};
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
delete?: never;
|
|
289
|
+
options?: never;
|
|
290
|
+
head?: never;
|
|
291
|
+
patch?: never;
|
|
292
|
+
trace?: never;
|
|
293
|
+
};
|
|
294
|
+
"/event/orders": {
|
|
295
|
+
parameters: {
|
|
296
|
+
query?: never;
|
|
297
|
+
header?: never;
|
|
298
|
+
path?: never;
|
|
299
|
+
cookie?: never;
|
|
300
|
+
};
|
|
301
|
+
get?: never;
|
|
302
|
+
put?: never;
|
|
303
|
+
/** @description Get list of user's orders */
|
|
304
|
+
post: {
|
|
305
|
+
parameters: {
|
|
306
|
+
query?: never;
|
|
307
|
+
header?: never;
|
|
308
|
+
path?: never;
|
|
309
|
+
cookie?: never;
|
|
310
|
+
};
|
|
311
|
+
requestBody: {
|
|
312
|
+
content: {
|
|
313
|
+
"application/json": {
|
|
314
|
+
page?: number;
|
|
315
|
+
limit?: number;
|
|
316
|
+
filter?: {
|
|
317
|
+
isOpen?: boolean;
|
|
318
|
+
search?: string;
|
|
319
|
+
userId?: string;
|
|
320
|
+
};
|
|
321
|
+
};
|
|
322
|
+
};
|
|
323
|
+
};
|
|
324
|
+
responses: {
|
|
325
|
+
/** @description OK */
|
|
326
|
+
200: {
|
|
327
|
+
headers: {
|
|
328
|
+
[name: string]: unknown;
|
|
329
|
+
};
|
|
330
|
+
content: {
|
|
331
|
+
/**
|
|
332
|
+
* @example {
|
|
333
|
+
* "data": [
|
|
334
|
+
* {
|
|
335
|
+
* "id": "cmbt9kftk0001lf01fg093ut3",
|
|
336
|
+
* "userId": "6751d122e7ac1b342423b97f",
|
|
337
|
+
* "outcomeOptionId": "cma1kkyus0055nq01u3xs12n0",
|
|
338
|
+
* "size": "5.00",
|
|
339
|
+
* "price": "0.500",
|
|
340
|
+
* "filled": "0.00",
|
|
341
|
+
* "side": "BUY",
|
|
342
|
+
* "type": "LIMIT",
|
|
343
|
+
* "status": "OPEN",
|
|
344
|
+
* "createdAt": "2025-06-12T10:56:45.081Z",
|
|
345
|
+
* "outcomeOption": {
|
|
346
|
+
* "option": "Yes",
|
|
347
|
+
* "outcome": {
|
|
348
|
+
* "description": "Will Ivanka, Gisele, or Karlie Post a Group Selfie on Instagram?",
|
|
349
|
+
* "imageUrl": "https://wahoo-events.s3.us-east-1.amazonaws.com/j1fL5hwGMZfz_oGf8ug81",
|
|
350
|
+
* "event": {
|
|
351
|
+
* "id": "cmbt9kftk0001lf01fg093ut3"
|
|
352
|
+
* }
|
|
353
|
+
* }
|
|
354
|
+
* }
|
|
355
|
+
* }
|
|
356
|
+
* ],
|
|
357
|
+
* "totalPages": 1,
|
|
358
|
+
* "hasNextPage": false,
|
|
359
|
+
* "hasPreviousPage": false,
|
|
360
|
+
* "totalItems": 1
|
|
361
|
+
* }
|
|
362
|
+
*/
|
|
363
|
+
"application/json": {
|
|
364
|
+
totalPages: number;
|
|
365
|
+
hasNextPage: boolean;
|
|
366
|
+
hasPreviousPage: boolean;
|
|
367
|
+
totalItems: number;
|
|
368
|
+
data: components["schemas"]["Order"][];
|
|
369
|
+
};
|
|
370
|
+
};
|
|
371
|
+
};
|
|
372
|
+
};
|
|
373
|
+
};
|
|
374
|
+
delete?: never;
|
|
375
|
+
options?: never;
|
|
376
|
+
head?: never;
|
|
377
|
+
patch?: never;
|
|
378
|
+
trace?: never;
|
|
379
|
+
};
|
|
380
|
+
"/event/positions": {
|
|
381
|
+
parameters: {
|
|
382
|
+
query?: never;
|
|
383
|
+
header?: never;
|
|
384
|
+
path?: never;
|
|
385
|
+
cookie?: never;
|
|
386
|
+
};
|
|
387
|
+
get?: never;
|
|
388
|
+
put?: never;
|
|
389
|
+
/** @description Get list of user's positions */
|
|
390
|
+
post: {
|
|
391
|
+
parameters: {
|
|
392
|
+
query?: never;
|
|
393
|
+
header?: never;
|
|
394
|
+
path?: never;
|
|
395
|
+
cookie?: never;
|
|
396
|
+
};
|
|
397
|
+
requestBody: {
|
|
398
|
+
content: {
|
|
399
|
+
"application/json": {
|
|
400
|
+
page?: number;
|
|
401
|
+
limit?: number;
|
|
402
|
+
filter?: {
|
|
403
|
+
search?: string;
|
|
404
|
+
userId?: string;
|
|
405
|
+
};
|
|
406
|
+
};
|
|
407
|
+
};
|
|
408
|
+
};
|
|
409
|
+
responses: {
|
|
410
|
+
/** @description OK */
|
|
411
|
+
200: {
|
|
412
|
+
headers: {
|
|
413
|
+
[name: string]: unknown;
|
|
414
|
+
};
|
|
415
|
+
content: {
|
|
416
|
+
/**
|
|
417
|
+
* @example {
|
|
418
|
+
* "data": [
|
|
419
|
+
* {
|
|
420
|
+
* "id": "cmbtcquc0000ppf01l9bx03tc",
|
|
421
|
+
* "userId": "6751d122e7ac1b342423b97f",
|
|
422
|
+
* "outcomeOptionId": "cma1kkyus0055nq01u3xs12n0",
|
|
423
|
+
* "avgPrice": "0.500",
|
|
424
|
+
* "part": "5.00",
|
|
425
|
+
* "createdAt": "2025-06-12T10:56:45.081Z",
|
|
426
|
+
* "outcomeOption": {
|
|
427
|
+
* "option": "Yes",
|
|
428
|
+
* "probability": 0.6,
|
|
429
|
+
* "outcome": {
|
|
430
|
+
* "description": "Will Ivanka, Gisele, or Karlie Post a Group Selfie on Instagram?",
|
|
431
|
+
* "imageUrl": "https://wahoo-events.s3.us-east-1.amazonaws.com/j1fL5hwGMZfz_oGf8ug81",
|
|
432
|
+
* "event": {
|
|
433
|
+
* "id": "cmbt9kftk0001lf01fg093ut3"
|
|
434
|
+
* }
|
|
435
|
+
* }
|
|
436
|
+
* }
|
|
437
|
+
* }
|
|
438
|
+
* ],
|
|
439
|
+
* "totalPages": 1,
|
|
440
|
+
* "hasNextPage": false,
|
|
441
|
+
* "hasPreviousPage": false,
|
|
442
|
+
* "totalItems": 1
|
|
443
|
+
* }
|
|
444
|
+
*/
|
|
445
|
+
"application/json": {
|
|
446
|
+
totalPages: number;
|
|
447
|
+
hasNextPage: boolean;
|
|
448
|
+
hasPreviousPage: boolean;
|
|
449
|
+
totalItems: number;
|
|
450
|
+
data: components["schemas"]["Position"][];
|
|
451
|
+
};
|
|
452
|
+
};
|
|
453
|
+
};
|
|
454
|
+
};
|
|
455
|
+
};
|
|
456
|
+
delete?: never;
|
|
457
|
+
options?: never;
|
|
458
|
+
head?: never;
|
|
459
|
+
patch?: never;
|
|
460
|
+
trace?: never;
|
|
461
|
+
};
|
|
462
|
+
"/user/profile": {
|
|
463
|
+
parameters: {
|
|
464
|
+
query?: never;
|
|
465
|
+
header?: never;
|
|
466
|
+
path?: never;
|
|
467
|
+
cookie?: never;
|
|
468
|
+
};
|
|
469
|
+
/** @description Get user profile */
|
|
470
|
+
get: {
|
|
471
|
+
parameters: {
|
|
472
|
+
query?: {
|
|
473
|
+
/**
|
|
474
|
+
* @description Comma-separated list of fields to include in the response.
|
|
475
|
+
* If omitted, a default set of public fields will be returned (e.g., id, username, email).
|
|
476
|
+
*/
|
|
477
|
+
fields?: ("id" | "username" | "role" | "firstName" | "lastName" | "email" | "photo" | "phone" | "verifications" | "permissions" | "transactionsLimit" | "hasPassword" | "OTPEnabled" | "balance" | "bonusBalance" | "totalBalance" | "unsubscribed_mails" | "payId" | "referralProfit")[];
|
|
478
|
+
};
|
|
479
|
+
header?: never;
|
|
480
|
+
path?: never;
|
|
481
|
+
cookie?: never;
|
|
482
|
+
};
|
|
483
|
+
requestBody?: never;
|
|
484
|
+
responses: {
|
|
485
|
+
/** @description User data successfully retrieved. */
|
|
486
|
+
200: {
|
|
487
|
+
headers: {
|
|
488
|
+
[name: string]: unknown;
|
|
489
|
+
};
|
|
490
|
+
content: {
|
|
491
|
+
"application/json": {
|
|
492
|
+
user?: {
|
|
493
|
+
/** @description Unique identifier for the user. */
|
|
494
|
+
id?: number;
|
|
495
|
+
/** @description User's chosen username. */
|
|
496
|
+
username?: string;
|
|
497
|
+
/** @enum {string} */
|
|
498
|
+
role?: "admin" | "user" | "manager";
|
|
499
|
+
firstName?: string;
|
|
500
|
+
lastName?: string;
|
|
501
|
+
/** Format: email */
|
|
502
|
+
email?: string;
|
|
503
|
+
/**
|
|
504
|
+
* Format: uri
|
|
505
|
+
* @description URL to the user's profile picture.
|
|
506
|
+
*/
|
|
507
|
+
photo?: string;
|
|
508
|
+
phone?: string;
|
|
509
|
+
verifications?: Record<string, never>;
|
|
510
|
+
permissions?: Record<string, never>;
|
|
511
|
+
transactionsLimit?: number;
|
|
512
|
+
/** @description Indicates if the user has a password set. */
|
|
513
|
+
hasPassword?: boolean;
|
|
514
|
+
/** @description Indicates if two-factor authentication is enabled. */
|
|
515
|
+
OTPEnabled?: boolean;
|
|
516
|
+
/**
|
|
517
|
+
* Format: float
|
|
518
|
+
* @description Current account balance.
|
|
519
|
+
*/
|
|
520
|
+
balance?: number;
|
|
521
|
+
/**
|
|
522
|
+
* Format: float
|
|
523
|
+
* @description Current bonus balance.
|
|
524
|
+
*/
|
|
525
|
+
bonusBalance?: number;
|
|
526
|
+
/**
|
|
527
|
+
* Format: float
|
|
528
|
+
* @description Sum of balance and bonusBalance.
|
|
529
|
+
*/
|
|
530
|
+
totalBalance?: number;
|
|
531
|
+
/** @description Array indicating if the user is unsubscribed from marketing emails. */
|
|
532
|
+
unsubscribed_mails?: unknown[];
|
|
533
|
+
/** @description Unique payment identifier. */
|
|
534
|
+
payId?: string;
|
|
535
|
+
/**
|
|
536
|
+
* Format: float
|
|
537
|
+
* @description Total profit earned from referrals.
|
|
538
|
+
*/
|
|
539
|
+
referralProfit?: number;
|
|
540
|
+
};
|
|
541
|
+
};
|
|
542
|
+
};
|
|
543
|
+
};
|
|
544
|
+
};
|
|
545
|
+
};
|
|
546
|
+
put?: never;
|
|
547
|
+
post?: never;
|
|
548
|
+
delete?: never;
|
|
549
|
+
options?: never;
|
|
550
|
+
head?: never;
|
|
551
|
+
patch?: never;
|
|
552
|
+
trace?: never;
|
|
553
|
+
};
|
|
554
|
+
}
|
|
555
|
+
export type webhooks = Record<string, never>;
|
|
556
|
+
export interface components {
|
|
557
|
+
schemas: {
|
|
558
|
+
/**
|
|
559
|
+
* @description The status of the event.
|
|
560
|
+
* @enum {string}
|
|
561
|
+
*/
|
|
562
|
+
EventStatus: "LIVE" | "ENDED" | "SETTLED" | "ARCHIVED";
|
|
563
|
+
OutcomeOption: {
|
|
564
|
+
/** @description The unique ID of the outcome option. */
|
|
565
|
+
id: string;
|
|
566
|
+
/** @description The ID of the parent outcome. */
|
|
567
|
+
outcomeId: string;
|
|
568
|
+
/** @description The name of the option (e.g., "Yes", "No"). */
|
|
569
|
+
option: string;
|
|
570
|
+
/**
|
|
571
|
+
* Format: double
|
|
572
|
+
* @description The current probability/price of the option.
|
|
573
|
+
*/
|
|
574
|
+
probability: number;
|
|
575
|
+
/** @description A history of prices/probabilities. */
|
|
576
|
+
pricesHistory?: number[];
|
|
577
|
+
/**
|
|
578
|
+
* Format: double
|
|
579
|
+
* @description The total volume traded for this option.
|
|
580
|
+
*/
|
|
581
|
+
totalVolume: number;
|
|
582
|
+
slug: string;
|
|
583
|
+
/** Format: double */
|
|
584
|
+
totalPart: number;
|
|
585
|
+
/** Format: integer */
|
|
586
|
+
order: number;
|
|
587
|
+
marketId: string;
|
|
588
|
+
liquidityStatus: string;
|
|
589
|
+
position?: components["schemas"]["Position"][];
|
|
590
|
+
/** Format: double */
|
|
591
|
+
buyPrice: number;
|
|
592
|
+
/** Format: double */
|
|
593
|
+
sellPrice: number;
|
|
594
|
+
/** Format: double */
|
|
595
|
+
potentialWin: number;
|
|
596
|
+
};
|
|
597
|
+
Outcome: {
|
|
598
|
+
id: string;
|
|
599
|
+
title: string;
|
|
600
|
+
description?: string;
|
|
601
|
+
resolution?: string;
|
|
602
|
+
rules?: string;
|
|
603
|
+
slug: string;
|
|
604
|
+
eventId: string;
|
|
605
|
+
/** Format: date-time */
|
|
606
|
+
estimatedEnd?: string | null;
|
|
607
|
+
/** Format: date-time */
|
|
608
|
+
endDate?: string | null;
|
|
609
|
+
imageUrl?: string | null;
|
|
610
|
+
/** Format: integer */
|
|
611
|
+
volume: number;
|
|
612
|
+
status: components["schemas"]["EventStatus"];
|
|
613
|
+
externalId?: string | null;
|
|
614
|
+
OutcomeOption: components["schemas"]["OutcomeOption"][];
|
|
615
|
+
};
|
|
616
|
+
Event: {
|
|
617
|
+
/** @description The unique ID of the event. */
|
|
618
|
+
id: string;
|
|
619
|
+
title: string;
|
|
620
|
+
description: string;
|
|
621
|
+
metaDescription?: string;
|
|
622
|
+
newsSource?: string | null;
|
|
623
|
+
slug: string;
|
|
624
|
+
imageUrl: string;
|
|
625
|
+
status: components["schemas"]["EventStatus"];
|
|
626
|
+
/** @enum {string} */
|
|
627
|
+
type: "COLLECTION";
|
|
628
|
+
/** Format: date-time */
|
|
629
|
+
estimatedEnd?: string | null;
|
|
630
|
+
/** Format: date-time */
|
|
631
|
+
endDate?: string | null;
|
|
632
|
+
/** Format: date-time */
|
|
633
|
+
updatedAt: string;
|
|
634
|
+
/** Format: date-time */
|
|
635
|
+
createdAt: string;
|
|
636
|
+
/** Format: integer */
|
|
637
|
+
volume: number;
|
|
638
|
+
externalId?: string | null;
|
|
639
|
+
/** @enum {string|null} */
|
|
640
|
+
feature?: "FEATURED" | null;
|
|
641
|
+
outcomes: components["schemas"]["Outcome"][];
|
|
642
|
+
tags?: components["schemas"]["Tag"][];
|
|
643
|
+
/** @description Details on the best available offer/option. */
|
|
644
|
+
bestOffer?: {
|
|
645
|
+
outcomeId: string;
|
|
646
|
+
optionId: string;
|
|
647
|
+
} | null;
|
|
648
|
+
};
|
|
649
|
+
OrderbookEntry: {
|
|
650
|
+
/**
|
|
651
|
+
* @description The price of the order (as a string to handle high precision).
|
|
652
|
+
* @example 0.100
|
|
653
|
+
*/
|
|
654
|
+
price: string;
|
|
655
|
+
/**
|
|
656
|
+
* @description The size/amount of the order (as a string to handle high precision).
|
|
657
|
+
* @example 1.00
|
|
658
|
+
*/
|
|
659
|
+
size: string;
|
|
660
|
+
};
|
|
661
|
+
Orderbook: {
|
|
662
|
+
/** @description A list of buy orders, typically sorted by price descending. */
|
|
663
|
+
bids: components["schemas"]["OrderbookEntry"][];
|
|
664
|
+
/** @description A list of sell orders, typically sorted by price ascending. */
|
|
665
|
+
asks: components["schemas"]["OrderbookEntry"][];
|
|
666
|
+
};
|
|
667
|
+
Tag: {
|
|
668
|
+
label: string;
|
|
669
|
+
slug: string;
|
|
670
|
+
};
|
|
671
|
+
Position: {
|
|
672
|
+
id?: string;
|
|
673
|
+
userId?: string;
|
|
674
|
+
outcomeOptionId?: string;
|
|
675
|
+
avgPrice?: string;
|
|
676
|
+
part?: string;
|
|
677
|
+
createdAt?: string;
|
|
678
|
+
outcomeOption?: {
|
|
679
|
+
option?: string;
|
|
680
|
+
probability?: number;
|
|
681
|
+
outcome?: {
|
|
682
|
+
description?: string;
|
|
683
|
+
imageUrl?: string;
|
|
684
|
+
event?: {
|
|
685
|
+
id?: string;
|
|
686
|
+
};
|
|
687
|
+
};
|
|
688
|
+
};
|
|
689
|
+
};
|
|
690
|
+
Order: {
|
|
691
|
+
id?: string;
|
|
692
|
+
userId?: string;
|
|
693
|
+
outcomeOptionId?: string;
|
|
694
|
+
size?: string;
|
|
695
|
+
price?: string;
|
|
696
|
+
filled?: string;
|
|
697
|
+
/** @enum {string} */
|
|
698
|
+
side?: "BUY" | "SELL";
|
|
699
|
+
/** @enum {string} */
|
|
700
|
+
type?: "MARKET" | "LIMIT";
|
|
701
|
+
/** @enum {string} */
|
|
702
|
+
status?: "OPEN" | "PART_FILLED" | "FULFILLED" | "CLOSED";
|
|
703
|
+
createdAt?: string;
|
|
704
|
+
outcomeOption?: {
|
|
705
|
+
option?: string;
|
|
706
|
+
outcome?: {
|
|
707
|
+
description?: string;
|
|
708
|
+
imageUrl?: string;
|
|
709
|
+
event?: {
|
|
710
|
+
id?: string;
|
|
711
|
+
};
|
|
712
|
+
};
|
|
713
|
+
};
|
|
714
|
+
};
|
|
715
|
+
Trade: {
|
|
716
|
+
id?: string;
|
|
717
|
+
size?: string;
|
|
718
|
+
price?: string;
|
|
719
|
+
createdAt?: string;
|
|
720
|
+
takerOrderId?: string;
|
|
721
|
+
makerOrderId?: string;
|
|
722
|
+
takerFee?: string;
|
|
723
|
+
makerFee?: string;
|
|
724
|
+
makerOrder?: {
|
|
725
|
+
userId?: string;
|
|
726
|
+
/** @enum {string} */
|
|
727
|
+
side?: "BUY" | "SELL";
|
|
728
|
+
};
|
|
729
|
+
takerOrder?: {
|
|
730
|
+
userId?: string;
|
|
731
|
+
/** @enum {string} */
|
|
732
|
+
side?: "BUY" | "SELL";
|
|
733
|
+
};
|
|
734
|
+
};
|
|
735
|
+
/**
|
|
736
|
+
* @example {
|
|
737
|
+
* "eventId": "cma1kj99c0050nq01v9zaypq5",
|
|
738
|
+
* "outcomeOptionId": "cma1kkyus0055nq01u3xs12n0",
|
|
739
|
+
* "side": "BUY",
|
|
740
|
+
* "size": "5",
|
|
741
|
+
* "price": "0.5",
|
|
742
|
+
* "type": "LIMIT"
|
|
743
|
+
* }
|
|
744
|
+
*/
|
|
745
|
+
placeOrderRequestBody: {
|
|
746
|
+
/** @description ID of the event the order is placed on */
|
|
747
|
+
eventId: string;
|
|
748
|
+
/** @description ID of the specific outcome option */
|
|
749
|
+
outcomeOptionId: string;
|
|
750
|
+
/**
|
|
751
|
+
* @description Side of the order
|
|
752
|
+
* @enum {string}
|
|
753
|
+
*/
|
|
754
|
+
side: "BUY" | "SELL";
|
|
755
|
+
/** @description Amount in dollars. Required for MARKET BUY order */
|
|
756
|
+
amount?: string;
|
|
757
|
+
/** @description Size in parts. Required for all types except MARKET BUY */
|
|
758
|
+
size?: string;
|
|
759
|
+
/** @description Price of part in dollars. Required for LIMIT orders */
|
|
760
|
+
price?: string;
|
|
761
|
+
/**
|
|
762
|
+
* @description Type of the order
|
|
763
|
+
* @enum {string}
|
|
764
|
+
*/
|
|
765
|
+
type: "LIMIT" | "MARKET";
|
|
766
|
+
};
|
|
767
|
+
ApiError: {
|
|
768
|
+
/**
|
|
769
|
+
* @description error or success
|
|
770
|
+
* @enum {string}
|
|
771
|
+
*/
|
|
772
|
+
result: "error" | "success";
|
|
773
|
+
/** @description Type of the error */
|
|
774
|
+
error: string;
|
|
775
|
+
/** @description Human-readable description of the error */
|
|
776
|
+
message: string;
|
|
777
|
+
/** @description Optional details about the error */
|
|
778
|
+
details?: {
|
|
779
|
+
record?: string;
|
|
780
|
+
field?: string;
|
|
781
|
+
};
|
|
782
|
+
};
|
|
783
|
+
};
|
|
784
|
+
responses: {
|
|
785
|
+
/** @description Authentication required or invalid token. */
|
|
786
|
+
UnauthorizedError: {
|
|
787
|
+
headers: {
|
|
788
|
+
[name: string]: unknown;
|
|
789
|
+
};
|
|
790
|
+
content: {
|
|
791
|
+
"application/json": components["schemas"]["ApiError"];
|
|
792
|
+
};
|
|
793
|
+
};
|
|
794
|
+
};
|
|
795
|
+
parameters: never;
|
|
796
|
+
requestBodies: never;
|
|
797
|
+
headers: never;
|
|
798
|
+
pathItems: never;
|
|
799
|
+
}
|
|
800
|
+
export type $defs = Record<string, never>;
|
|
801
|
+
export interface operations {
|
|
802
|
+
getEventsList: {
|
|
803
|
+
parameters: {
|
|
804
|
+
query?: never;
|
|
805
|
+
header?: never;
|
|
806
|
+
path?: never;
|
|
807
|
+
cookie?: never;
|
|
808
|
+
};
|
|
809
|
+
requestBody: {
|
|
810
|
+
content: {
|
|
811
|
+
"application/json": {
|
|
812
|
+
/**
|
|
813
|
+
* Format: integer
|
|
814
|
+
* @description The page number for pagination.
|
|
815
|
+
* @default 1
|
|
816
|
+
*/
|
|
817
|
+
page: number;
|
|
818
|
+
/**
|
|
819
|
+
* Format: integer
|
|
820
|
+
* @description The number of items per page.
|
|
821
|
+
* @default 20
|
|
822
|
+
*/
|
|
823
|
+
limit: number;
|
|
824
|
+
/** @description Sorting criteria for the list. */
|
|
825
|
+
sort?: {
|
|
826
|
+
/**
|
|
827
|
+
* @default estimatedEnd
|
|
828
|
+
* @enum {string}
|
|
829
|
+
*/
|
|
830
|
+
sortBy?: "id" | "title" | "status" | "estimatedEnd" | "endDate" | "createdAt" | "volume" | "priceUpdate" | "feature";
|
|
831
|
+
/**
|
|
832
|
+
* @default desc
|
|
833
|
+
* @enum {string}
|
|
834
|
+
*/
|
|
835
|
+
sortOrder?: "desc" | "asc";
|
|
836
|
+
} | null;
|
|
837
|
+
/**
|
|
838
|
+
* @description Filtering criteria for the list.
|
|
839
|
+
* @default {
|
|
840
|
+
* "status": [
|
|
841
|
+
* "LIVE",
|
|
842
|
+
* "PENDING"
|
|
843
|
+
* ]
|
|
844
|
+
* }
|
|
845
|
+
*/
|
|
846
|
+
filter: {
|
|
847
|
+
/** @description Filter by one or more event statuses. */
|
|
848
|
+
status?: components["schemas"]["EventStatus"][];
|
|
849
|
+
/** @description A search string to filter events by title/description. The `transform` logic is not directly expressible in OpenAPI but is noted here. */
|
|
850
|
+
search?: string | null;
|
|
851
|
+
/** @description Filter by one or more tags. */
|
|
852
|
+
tags?: string[] | null;
|
|
853
|
+
};
|
|
854
|
+
};
|
|
855
|
+
};
|
|
856
|
+
};
|
|
857
|
+
responses: {
|
|
858
|
+
/** @description A paginated list of events */
|
|
859
|
+
200: {
|
|
860
|
+
headers: {
|
|
861
|
+
[name: string]: unknown;
|
|
862
|
+
};
|
|
863
|
+
content: {
|
|
864
|
+
/**
|
|
865
|
+
* @example {
|
|
866
|
+
* "data": [
|
|
867
|
+
* {
|
|
868
|
+
* "id": "cm60tbc8b0005qt015r1lv4og",
|
|
869
|
+
* "title": "Trump will announce planning for a bust of himself on Mount Rushmore?",
|
|
870
|
+
* "description": "Will President Trump make history by adding his likeness to the iconic Mount Rushmore? Imagine the controversy and the headlines—bet on whether Trump will announce plans to carve his bust into the mountain before the Event Date Close. Make a Prediction Now! This Event Outcome will Settle to \"Yes\" if a credible reporting source confirms that President Donald Trump has announced plans to carve his bust into Mount Rushmore before the Event Date Close. If it becomes impossible for this Event Outcome to Settle to \"Yes\", the Event Outcome may Settle immediately to \"No\". The primary source for this Event Outcome will be official statements from President Trump or his representatives, however a consensus of credible reporting sources may also be used. The Event Outcome is a Prediction on an Announcement from a credible reporting source.",
|
|
871
|
+
* "metaDescription": "Will Trump etch his legacy in stone? Bet on Mount Rushmore's next face! Make a Prediction Now!",
|
|
872
|
+
* "newsSource": null,
|
|
873
|
+
* "slug": "president-donald-trump-will-announce-planning-for-a-bust-of-himself-on-mount-rushmore",
|
|
874
|
+
* "imageUrl": "https://wahoo-events.s3.us-east-1.amazonaws.com/2Iag9S762_b0YmIacrV_u_dvjh",
|
|
875
|
+
* "status": "LIVE",
|
|
876
|
+
* "type": "COLLECTION",
|
|
877
|
+
* "estimatedEnd": "2028-01-01T04:59:00.000Z",
|
|
878
|
+
* "endDate": null,
|
|
879
|
+
* "updatedAt": "2025-09-30T05:41:02.191Z",
|
|
880
|
+
* "createdAt": "2025-01-17T17:32:05.234Z",
|
|
881
|
+
* "volume": 25266,
|
|
882
|
+
* "externalId": null,
|
|
883
|
+
* "favorites": [],
|
|
884
|
+
* "feature": "FEATURED",
|
|
885
|
+
* "outcomes": [
|
|
886
|
+
* {
|
|
887
|
+
* "id": "cm60tcr8q0007qt01y74j0uc3",
|
|
888
|
+
* "title": "Trump will announce planning for a bust of himself on Mount Rushmore?",
|
|
889
|
+
* "description": "Trump will announce planning for a bust of himself on Mount Rushmore?",
|
|
890
|
+
* "resolution": "Resolution ID: cm60tcr8q0007qt01y74j0uc3",
|
|
891
|
+
* "rules": "You can dispute the decision within 7 days after the settlement; to do so, write to our technical support by email and telegram.",
|
|
892
|
+
* "slug": "trump-will-announce-planning-for-a-bust-of-himself-on-mount-rushmore",
|
|
893
|
+
* "eventId": "cm60tbc8b0005qt015r1lv4og",
|
|
894
|
+
* "estimatedEnd": "2028-01-01T04:59:00.000Z",
|
|
895
|
+
* "endDate": null,
|
|
896
|
+
* "imageUrl": "https://wahoo-events.s3.us-east-1.amazonaws.com/3ak9b8GPxQ4YtAtiO0iqq_dvjh",
|
|
897
|
+
* "volume": 25266,
|
|
898
|
+
* "status": "LIVE",
|
|
899
|
+
* "externalId": null,
|
|
900
|
+
* "OutcomeOption": [
|
|
901
|
+
* {
|
|
902
|
+
* "id": "cm60tcr8q0008qt01gi5d7qb9",
|
|
903
|
+
* "outcomeId": "cm60tcr8q0007qt01y74j0uc3",
|
|
904
|
+
* "option": "Yes",
|
|
905
|
+
* "probability": 0.075,
|
|
906
|
+
* "pricesHistory": [
|
|
907
|
+
* 0.15,
|
|
908
|
+
* 0.05,
|
|
909
|
+
* 0.05,
|
|
910
|
+
* 0.05
|
|
911
|
+
* ],
|
|
912
|
+
* "totalVolume": 541.9420969262309,
|
|
913
|
+
* "slug": "yes",
|
|
914
|
+
* "totalPart": 12150.69525869904,
|
|
915
|
+
* "order": 0,
|
|
916
|
+
* "marketId": "cmbscqa7a007jo2014lgh3pt3",
|
|
917
|
+
* "liquidityStatus": "LOW",
|
|
918
|
+
* "orders": [
|
|
919
|
+
* {
|
|
920
|
+
* "id": "cmetqh82i00itqv010z4rkeqf"
|
|
921
|
+
* },
|
|
922
|
+
* {
|
|
923
|
+
* "id": "cmetqh82e00irqv01kt1bx7y0"
|
|
924
|
+
* },
|
|
925
|
+
* {
|
|
926
|
+
* "id": "cmf9u9p0h008coa01u1gq7z80"
|
|
927
|
+
* },
|
|
928
|
+
* {
|
|
929
|
+
* "id": "cmf9ub1mp008ioa01d4s3j1nm"
|
|
930
|
+
* },
|
|
931
|
+
* {
|
|
932
|
+
* "id": "cmf9ub1mn008goa01g440lajo"
|
|
933
|
+
* },
|
|
934
|
+
* {
|
|
935
|
+
* "id": "cmf9ub6sw008ooa013984yl5g"
|
|
936
|
+
* },
|
|
937
|
+
* {
|
|
938
|
+
* "id": "cmf9u3v04008aoa01sktgryj2"
|
|
939
|
+
* },
|
|
940
|
+
* {
|
|
941
|
+
* "id": "cmf9ubg2n008uoa01heb9708h"
|
|
942
|
+
* },
|
|
943
|
+
* {
|
|
944
|
+
* "id": "cmf9ubg2l008soa01gerce4u2"
|
|
945
|
+
* },
|
|
946
|
+
* {
|
|
947
|
+
* "id": "cmf9ubyn1008yoa01e0t5bvua"
|
|
948
|
+
* },
|
|
949
|
+
* {
|
|
950
|
+
* "id": "cmflfmbto005yl501qciay559"
|
|
951
|
+
* },
|
|
952
|
+
* {
|
|
953
|
+
* "id": "cmflfmbtm005wl501c77btyw6"
|
|
954
|
+
* },
|
|
955
|
+
* {
|
|
956
|
+
* "id": "cmflfoh0p0068l501d38y20og"
|
|
957
|
+
* },
|
|
958
|
+
* {
|
|
959
|
+
* "id": "cmflfoh0l0066l501usqqtye0"
|
|
960
|
+
* },
|
|
961
|
+
* {
|
|
962
|
+
* "id": "cmfy1vpjg001ymv01emdrgc12"
|
|
963
|
+
* },
|
|
964
|
+
* {
|
|
965
|
+
* "id": "cmfld3lif01pkl501tkmfgfcw"
|
|
966
|
+
* },
|
|
967
|
+
* {
|
|
968
|
+
* "id": "cmfld3lid01pil501eg96ypaa"
|
|
969
|
+
* }
|
|
970
|
+
* ],
|
|
971
|
+
* "buyPrice": 0.08415841584158412,
|
|
972
|
+
* "sellPrice": 0.07425742574257425,
|
|
973
|
+
* "potentialWin": 444.44444
|
|
974
|
+
* },
|
|
975
|
+
* {
|
|
976
|
+
* "id": "cm60tcr8q0009qt01gom1jytx",
|
|
977
|
+
* "outcomeId": "cm60tcr8q0007qt01y74j0uc3",
|
|
978
|
+
* "option": "No",
|
|
979
|
+
* "probability": 0.925,
|
|
980
|
+
* "pricesHistory": [
|
|
981
|
+
* 0.85,
|
|
982
|
+
* 0.95,
|
|
983
|
+
* 0.95,
|
|
984
|
+
* 0.95
|
|
985
|
+
* ],
|
|
986
|
+
* "totalVolume": 4053.950169881916,
|
|
987
|
+
* "slug": "no",
|
|
988
|
+
* "totalPart": 4210.806263227002,
|
|
989
|
+
* "order": 1,
|
|
990
|
+
* "marketId": "cmbscqa7a007jo2014lgh3pt3",
|
|
991
|
+
* "liquidityStatus": "LOW",
|
|
992
|
+
* "orders": [],
|
|
993
|
+
* "buyPrice": 0.9257425742574258,
|
|
994
|
+
* "sellPrice": 0.9158415841584159,
|
|
995
|
+
* "potentialWin": 101.9368
|
|
996
|
+
* }
|
|
997
|
+
* ]
|
|
998
|
+
* }
|
|
999
|
+
* ],
|
|
1000
|
+
* "tags": [
|
|
1001
|
+
* {
|
|
1002
|
+
* "slug": "politics",
|
|
1003
|
+
* "label": "Politics"
|
|
1004
|
+
* },
|
|
1005
|
+
* {
|
|
1006
|
+
* "slug": "america",
|
|
1007
|
+
* "label": "America"
|
|
1008
|
+
* },
|
|
1009
|
+
* {
|
|
1010
|
+
* "slug": "trump",
|
|
1011
|
+
* "label": "Trump"
|
|
1012
|
+
* },
|
|
1013
|
+
* {
|
|
1014
|
+
* "slug": "consumer",
|
|
1015
|
+
* "label": "Consumer"
|
|
1016
|
+
* }
|
|
1017
|
+
* ]
|
|
1018
|
+
* }
|
|
1019
|
+
* ],
|
|
1020
|
+
* "suggestions": [],
|
|
1021
|
+
* "totalPages": 14,
|
|
1022
|
+
* "hasNextPage": true,
|
|
1023
|
+
* "hasPreviousPage": false,
|
|
1024
|
+
* "totalItems": 280
|
|
1025
|
+
* }
|
|
1026
|
+
*/
|
|
1027
|
+
"application/json": {
|
|
1028
|
+
/** @description The list of events. */
|
|
1029
|
+
data: components["schemas"]["Event"][];
|
|
1030
|
+
/** @description List of suggestions (if any). */
|
|
1031
|
+
suggestions?: Record<string, never>[];
|
|
1032
|
+
/**
|
|
1033
|
+
* Format: integer
|
|
1034
|
+
* @description Total number of pages available.
|
|
1035
|
+
*/
|
|
1036
|
+
totalPages: number;
|
|
1037
|
+
/** @description Indicates if there is a next page. */
|
|
1038
|
+
hasNextPage: boolean;
|
|
1039
|
+
/** @description Indicates if there is a previous page. */
|
|
1040
|
+
hasPreviousPage: boolean;
|
|
1041
|
+
/**
|
|
1042
|
+
* Format: integer
|
|
1043
|
+
* @description Total number of items across all pages.
|
|
1044
|
+
*/
|
|
1045
|
+
totalItems: number;
|
|
1046
|
+
};
|
|
1047
|
+
};
|
|
1048
|
+
};
|
|
1049
|
+
};
|
|
1050
|
+
};
|
|
1051
|
+
getEventDetails: {
|
|
1052
|
+
parameters: {
|
|
1053
|
+
query?: never;
|
|
1054
|
+
header?: never;
|
|
1055
|
+
path: {
|
|
1056
|
+
/** @description The unique identifier of the event. */
|
|
1057
|
+
eventId: string;
|
|
1058
|
+
};
|
|
1059
|
+
cookie?: never;
|
|
1060
|
+
};
|
|
1061
|
+
requestBody?: never;
|
|
1062
|
+
responses: {
|
|
1063
|
+
/** @description Successfully retrieved event details. */
|
|
1064
|
+
200: {
|
|
1065
|
+
headers: {
|
|
1066
|
+
[name: string]: unknown;
|
|
1067
|
+
};
|
|
1068
|
+
content: {
|
|
1069
|
+
/**
|
|
1070
|
+
* @example {
|
|
1071
|
+
* "id": "cm60tbc8b0005qt015r1lv4og",
|
|
1072
|
+
* "title": "Trump will announce planning for a bust of himself on Mount Rushmore?",
|
|
1073
|
+
* "description": "Will President Trump make history by adding his likeness to the iconic Mount Rushmore? Imagine the controversy and the headlines—bet on whether Trump will announce plans to carve his bust into the mountain before the Event Date Close. Make a Prediction Now! This Event Outcome will Settle to \"Yes\" if a credible reporting source confirms that President Donald Trump has announced plans to carve his bust into Mount Rushmore before the Event Date Close. If it becomes impossible for this Event Outcome to Settle to \"Yes\", the Event Outcome may Settle immediately to \"No\". The primary source for this Event Outcome will be official statements from President Trump or his representatives, however a consensus of credible reporting sources may also be used. The Event Outcome is a Prediction on an Announcement from a credible reporting source.",
|
|
1074
|
+
* "metaDescription": "Will Trump etch his legacy in stone? Bet on Mount Rushmore's next face! Make a Prediction Now!",
|
|
1075
|
+
* "newsSource": null,
|
|
1076
|
+
* "slug": "president-donald-trump-will-announce-planning-for-a-bust-of-himself-on-mount-rushmore",
|
|
1077
|
+
* "imageUrl": "https://wahoo-events.s3.us-east-1.amazonaws.com/2Iag9S762_b0YmIacrV_u_dvjh",
|
|
1078
|
+
* "status": "LIVE",
|
|
1079
|
+
* "type": "COLLECTION",
|
|
1080
|
+
* "estimatedEnd": "2028-01-01T04:59:00.000Z",
|
|
1081
|
+
* "endDate": null,
|
|
1082
|
+
* "updatedAt": "2025-09-30T05:41:02.191Z",
|
|
1083
|
+
* "createdAt": "2025-01-17T17:32:05.234Z",
|
|
1084
|
+
* "volume": 25266,
|
|
1085
|
+
* "externalId": null,
|
|
1086
|
+
* "favorites": [],
|
|
1087
|
+
* "feature": "FEATURED",
|
|
1088
|
+
* "outcomes": [
|
|
1089
|
+
* {
|
|
1090
|
+
* "id": "cm60tcr8q0007qt01y74j0uc3",
|
|
1091
|
+
* "title": "Trump will announce planning for a bust of himself on Mount Rushmore?",
|
|
1092
|
+
* "description": "Trump will announce planning for a bust of himself on Mount Rushmore?",
|
|
1093
|
+
* "resolution": "Resolution ID: cm60tcr8q0007qt01y74j0uc3",
|
|
1094
|
+
* "rules": "You can dispute the decision within 7 days after the settlement; to do so, write to our technical support by email and telegram.",
|
|
1095
|
+
* "slug": "trump-will-announce-planning-for-a-bust-of-himself-on-mount-rushmore",
|
|
1096
|
+
* "eventId": "cm60tbc8b0005qt015r1lv4og",
|
|
1097
|
+
* "estimatedEnd": "2028-01-01T04:59:00.000Z",
|
|
1098
|
+
* "endDate": null,
|
|
1099
|
+
* "imageUrl": "https://wahoo-events.s3.us-east-1.amazonaws.com/3ak9b8GPxQ4YtAtiO0iqq_dvjh",
|
|
1100
|
+
* "volume": 25266,
|
|
1101
|
+
* "status": "LIVE",
|
|
1102
|
+
* "externalId": null,
|
|
1103
|
+
* "OutcomeOption": [
|
|
1104
|
+
* {
|
|
1105
|
+
* "id": "cm60tcr8q0008qt01gi5d7qb9",
|
|
1106
|
+
* "outcomeId": "cm60tcr8q0007qt01y74j0uc3",
|
|
1107
|
+
* "option": "Yes",
|
|
1108
|
+
* "probability": 0.075,
|
|
1109
|
+
* "pricesHistory": [
|
|
1110
|
+
* 0.15,
|
|
1111
|
+
* 0.05,
|
|
1112
|
+
* 0.05,
|
|
1113
|
+
* 0.05
|
|
1114
|
+
* ],
|
|
1115
|
+
* "totalVolume": 541.9420969262309,
|
|
1116
|
+
* "slug": "yes",
|
|
1117
|
+
* "totalPart": 12150.69525869904,
|
|
1118
|
+
* "order": 0,
|
|
1119
|
+
* "marketId": "cmbscqa7a007jo2014lgh3pt3",
|
|
1120
|
+
* "liquidityStatus": "LOW",
|
|
1121
|
+
* "position": [],
|
|
1122
|
+
* "buyPrice": 0.08415841584158412,
|
|
1123
|
+
* "sellPrice": 0.07425742574257425,
|
|
1124
|
+
* "potentialWin": 444.44444
|
|
1125
|
+
* },
|
|
1126
|
+
* {
|
|
1127
|
+
* "id": "cm60tcr8q0009qt01gom1jytx",
|
|
1128
|
+
* "outcomeId": "cm60tcr8q0007qt01y74j0uc3",
|
|
1129
|
+
* "option": "No",
|
|
1130
|
+
* "probability": 0.925,
|
|
1131
|
+
* "pricesHistory": [
|
|
1132
|
+
* 0.85,
|
|
1133
|
+
* 0.95,
|
|
1134
|
+
* 0.95,
|
|
1135
|
+
* 0.95
|
|
1136
|
+
* ],
|
|
1137
|
+
* "totalVolume": 4053.950169881916,
|
|
1138
|
+
* "slug": "no",
|
|
1139
|
+
* "totalPart": 4210.806263227002,
|
|
1140
|
+
* "order": 1,
|
|
1141
|
+
* "marketId": "cmbscqa7a007jo2014lgh3pt3",
|
|
1142
|
+
* "liquidityStatus": "LOW",
|
|
1143
|
+
* "position": [],
|
|
1144
|
+
* "buyPrice": 0.9257425742574258,
|
|
1145
|
+
* "sellPrice": 0.9158415841584159,
|
|
1146
|
+
* "potentialWin": 101.9368
|
|
1147
|
+
* }
|
|
1148
|
+
* ]
|
|
1149
|
+
* }
|
|
1150
|
+
* ],
|
|
1151
|
+
* "tags": [
|
|
1152
|
+
* {
|
|
1153
|
+
* "label": "Politics",
|
|
1154
|
+
* "slug": "politics"
|
|
1155
|
+
* },
|
|
1156
|
+
* {
|
|
1157
|
+
* "label": "America",
|
|
1158
|
+
* "slug": "america"
|
|
1159
|
+
* },
|
|
1160
|
+
* {
|
|
1161
|
+
* "label": "Trump",
|
|
1162
|
+
* "slug": "trump"
|
|
1163
|
+
* },
|
|
1164
|
+
* {
|
|
1165
|
+
* "label": "Consumer",
|
|
1166
|
+
* "slug": "consumer"
|
|
1167
|
+
* }
|
|
1168
|
+
* ],
|
|
1169
|
+
* "bestOffer": {
|
|
1170
|
+
* "outcomeId": "cm60tcr8q0007qt01y74j0uc3",
|
|
1171
|
+
* "optionId": "cm60tcr8q0008qt01gi5d7qb9"
|
|
1172
|
+
* }
|
|
1173
|
+
* }
|
|
1174
|
+
*/
|
|
1175
|
+
"application/json": components["schemas"]["Event"];
|
|
1176
|
+
};
|
|
1177
|
+
};
|
|
1178
|
+
};
|
|
1179
|
+
};
|
|
1180
|
+
getOrderbook: {
|
|
1181
|
+
parameters: {
|
|
1182
|
+
query: {
|
|
1183
|
+
/** @description The ID of the outcome option to retrieve the order book for. */
|
|
1184
|
+
outcomeOptionId: string;
|
|
1185
|
+
};
|
|
1186
|
+
header?: never;
|
|
1187
|
+
path?: never;
|
|
1188
|
+
cookie?: never;
|
|
1189
|
+
};
|
|
1190
|
+
requestBody?: never;
|
|
1191
|
+
responses: {
|
|
1192
|
+
/** @description Successful retrieval of the order book. */
|
|
1193
|
+
200: {
|
|
1194
|
+
headers: {
|
|
1195
|
+
[name: string]: unknown;
|
|
1196
|
+
};
|
|
1197
|
+
content: {
|
|
1198
|
+
/**
|
|
1199
|
+
* @example {
|
|
1200
|
+
* "bids": [
|
|
1201
|
+
* {
|
|
1202
|
+
* "price": "0.100",
|
|
1203
|
+
* "size": "1.00"
|
|
1204
|
+
* }
|
|
1205
|
+
* ],
|
|
1206
|
+
* "asks": [
|
|
1207
|
+
* {
|
|
1208
|
+
* "price": "0.200",
|
|
1209
|
+
* "size": "1.00"
|
|
1210
|
+
* }
|
|
1211
|
+
* ]
|
|
1212
|
+
* }
|
|
1213
|
+
*/
|
|
1214
|
+
"application/json": components["schemas"]["Orderbook"];
|
|
1215
|
+
};
|
|
1216
|
+
};
|
|
1217
|
+
};
|
|
1218
|
+
};
|
|
1219
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wahoopredict/trading-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "TypeScript SDK for the WahooPredict trading API",
|
|
5
5
|
"author": "WahooPredict",
|
|
6
6
|
"license": "MIT",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"build": "npm run build:esm && npm run build:cjs && npm run build:types",
|
|
28
28
|
"build:esm": "swc --config-file esm.swcrc ./src -d dist/esm --strip-leading-paths && node -e \"require('fs').writeFileSync('dist/esm/package.json', JSON.stringify({type: 'module'}))\"",
|
|
29
29
|
"build:cjs": "swc --config-file cjs.swcrc ./src -d dist/cjs --strip-leading-paths",
|
|
30
|
-
"build:types": "tsc --project tsconfig.types.json",
|
|
30
|
+
"build:types": "tsc --project tsconfig.types.json && cp src/schema.d.ts dist/types/schema.d.ts",
|
|
31
31
|
"lint": "eslint src/",
|
|
32
32
|
"lint:types": "tsc --noEmit",
|
|
33
33
|
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
|