@wahoopredict/trading-sdk 0.0.1
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/LICENSE +21 -0
- package/README.md +309 -0
- package/dist/cjs/client.js +129 -0
- package/dist/cjs/client.spec.js +153 -0
- package/dist/cjs/index.js +72 -0
- package/dist/cjs/schema.d.js +4 -0
- package/dist/esm/client.js +59 -0
- package/dist/esm/client.spec.js +108 -0
- package/dist/esm/index.js +6 -0
- package/dist/esm/package.json +1 -0
- package/dist/esm/schema.d.js +433 -0
- package/dist/types/client.d.ts +48 -0
- package/dist/types/client.d.ts.map +1 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/index.d.ts.map +1 -0
- package/package.json +66 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import createClient from "openapi-fetch";
|
|
2
|
+
import * as crypto from "node:crypto";
|
|
3
|
+
/**
|
|
4
|
+
* Default base URL for the WahooPredict API
|
|
5
|
+
*/ export const DEFAULT_BASE_URL = "https://api.wahoopredict.com/oapi/v2";
|
|
6
|
+
/**
|
|
7
|
+
* Configuration options for the WahooPredict client
|
|
8
|
+
*/ /** Your API key from WahooPredict */ /** Your secret key for signing requests */ /** Optional custom base URL (defaults to production API) */ /**
|
|
9
|
+
* Generates HMAC-SHA256 signature for API authentication
|
|
10
|
+
*/ export function generateSignature(apiKey, secretKey, timestamp, requestBody) {
|
|
11
|
+
const dataToSign = `${apiKey}${timestamp}${requestBody}`;
|
|
12
|
+
return crypto.createHmac("sha256", secretKey).update(dataToSign).digest("hex");
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Creates an authentication middleware for the WahooPredict API
|
|
16
|
+
*/ export function createAuthMiddleware(apiKey, secretKey) {
|
|
17
|
+
return {
|
|
18
|
+
async onRequest ({ request }) {
|
|
19
|
+
const timestamp = Math.round(Date.now() / 1000);
|
|
20
|
+
const urlParts = request.url.split("?");
|
|
21
|
+
const rawQuery = urlParts.length > 1 ? urlParts[1] : "";
|
|
22
|
+
const rawBody = await request.clone().text();
|
|
23
|
+
const requestBody = rawQuery && rawBody ? `${rawQuery}${rawBody}` : rawQuery || rawBody;
|
|
24
|
+
const signature = generateSignature(apiKey, secretKey, timestamp, requestBody);
|
|
25
|
+
request.headers.set("X-API-KEY", apiKey);
|
|
26
|
+
request.headers.set("X-TIMESTAMP", timestamp.toString());
|
|
27
|
+
request.headers.set("X-SIGNATURE", signature);
|
|
28
|
+
return request;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Creates a type-safe WahooPredict API client
|
|
34
|
+
*
|
|
35
|
+
* @param config - Configuration options including API credentials
|
|
36
|
+
* @returns A configured openapi-fetch client with authentication
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```typescript
|
|
40
|
+
* import { createWahooClient } from '@wahoopredict/trading-sdk';
|
|
41
|
+
*
|
|
42
|
+
* const client = createWahooClient({
|
|
43
|
+
* apiKey: 'your-api-key',
|
|
44
|
+
* secretKey: 'your-secret-key',
|
|
45
|
+
* });
|
|
46
|
+
*
|
|
47
|
+
* // Get user profile
|
|
48
|
+
* const { data, error } = await client.GET('/user/profile', {
|
|
49
|
+
* params: { query: { fields: ['balance'] } },
|
|
50
|
+
* });
|
|
51
|
+
* ```
|
|
52
|
+
*/ export default function createWahooClient(config) {
|
|
53
|
+
const { apiKey, secretKey, baseUrl = DEFAULT_BASE_URL } = config;
|
|
54
|
+
const client = createClient({
|
|
55
|
+
baseUrl
|
|
56
|
+
});
|
|
57
|
+
client.use(createAuthMiddleware(apiKey, secretKey));
|
|
58
|
+
return client;
|
|
59
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { describe, it, expect } from "@jest/globals";
|
|
2
|
+
import createWahooClient, { generateSignature, createAuthMiddleware, DEFAULT_BASE_URL } from "./client.js";
|
|
3
|
+
/**
|
|
4
|
+
* Creates mock middleware callback params for testing
|
|
5
|
+
*/ function createMockMiddlewareParams(request, schemaPath) {
|
|
6
|
+
return {
|
|
7
|
+
request,
|
|
8
|
+
params: {},
|
|
9
|
+
schemaPath,
|
|
10
|
+
id: "test-request-id",
|
|
11
|
+
options: {
|
|
12
|
+
baseUrl: "https://api.wahoopredict.com/oapi/v2",
|
|
13
|
+
parseAs: "json",
|
|
14
|
+
querySerializer: (query)=>new URLSearchParams(query).toString(),
|
|
15
|
+
bodySerializer: (body)=>JSON.stringify(body),
|
|
16
|
+
fetch: globalThis.fetch
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
describe("generateSignature", ()=>{
|
|
21
|
+
it("should generate consistent HMAC-SHA256 signature", ()=>{
|
|
22
|
+
const apiKey = "test-api-key";
|
|
23
|
+
const secretKey = "test-secret-key";
|
|
24
|
+
const timestamp = 1704067200;
|
|
25
|
+
// 2024-01-01 00:00:00 UTC
|
|
26
|
+
const requestBody = '{"test":"data"}';
|
|
27
|
+
const signature = generateSignature(apiKey, secretKey, timestamp, requestBody);
|
|
28
|
+
// Signature should be a hex string of 64 characters (256 bits = 32 bytes = 64 hex chars)
|
|
29
|
+
expect(signature).toMatch(/^[a-f0-9]{64}$/);
|
|
30
|
+
// Same inputs should produce same output
|
|
31
|
+
const signature2 = generateSignature(apiKey, secretKey, timestamp, requestBody);
|
|
32
|
+
expect(signature).toBe(signature2);
|
|
33
|
+
});
|
|
34
|
+
it("should produce different signatures for different inputs", ()=>{
|
|
35
|
+
const apiKey = "test-api-key";
|
|
36
|
+
const secretKey = "test-secret-key";
|
|
37
|
+
const timestamp = 1704067200;
|
|
38
|
+
const sig1 = generateSignature(apiKey, secretKey, timestamp, '{"a":"1"}');
|
|
39
|
+
const sig2 = generateSignature(apiKey, secretKey, timestamp, '{"a":"2"}');
|
|
40
|
+
expect(sig1).not.toBe(sig2);
|
|
41
|
+
});
|
|
42
|
+
it("should handle empty request body", ()=>{
|
|
43
|
+
const apiKey = "test-api-key";
|
|
44
|
+
const secretKey = "test-secret-key";
|
|
45
|
+
const timestamp = 1704067200;
|
|
46
|
+
const signature = generateSignature(apiKey, secretKey, timestamp, "");
|
|
47
|
+
expect(signature).toMatch(/^[a-f0-9]{64}$/);
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
describe("createAuthMiddleware", ()=>{
|
|
51
|
+
it("should create middleware that adds auth headers", async ()=>{
|
|
52
|
+
const apiKey = "test-api-key";
|
|
53
|
+
const secretKey = "test-secret-key";
|
|
54
|
+
const middleware = createAuthMiddleware(apiKey, secretKey);
|
|
55
|
+
// Create a mock request
|
|
56
|
+
const mockRequest = new Request("https://api.wahoopredict.com/oapi/v2/user/profile", {
|
|
57
|
+
method: "GET"
|
|
58
|
+
});
|
|
59
|
+
const result = await middleware.onRequest(createMockMiddlewareParams(mockRequest, "/user/profile"));
|
|
60
|
+
expect(result).toBeInstanceOf(Request);
|
|
61
|
+
const resultRequest = result;
|
|
62
|
+
expect(resultRequest.headers.get("X-API-KEY")).toBe(apiKey);
|
|
63
|
+
expect(resultRequest.headers.get("X-TIMESTAMP")).toMatch(/^\d+$/);
|
|
64
|
+
expect(resultRequest.headers.get("X-SIGNATURE")).toMatch(/^[a-f0-9]{64}$/);
|
|
65
|
+
});
|
|
66
|
+
it("should include request body in signature calculation", async ()=>{
|
|
67
|
+
const apiKey = "test-api-key";
|
|
68
|
+
const secretKey = "test-secret-key";
|
|
69
|
+
const middleware = createAuthMiddleware(apiKey, secretKey);
|
|
70
|
+
const body = JSON.stringify({
|
|
71
|
+
eventId: "test-event"
|
|
72
|
+
});
|
|
73
|
+
const mockRequest = new Request("https://api.wahoopredict.com/oapi/v2/event/place-order", {
|
|
74
|
+
method: "POST",
|
|
75
|
+
body,
|
|
76
|
+
headers: {
|
|
77
|
+
"Content-Type": "application/json"
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
const result = await middleware.onRequest(createMockMiddlewareParams(mockRequest, "/event/place-order"));
|
|
81
|
+
const resultRequest = result;
|
|
82
|
+
expect(resultRequest.headers.get("X-SIGNATURE")).toMatch(/^[a-f0-9]{64}$/);
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
describe("createWahooClient", ()=>{
|
|
86
|
+
it("should create client with default base URL", ()=>{
|
|
87
|
+
const client = createWahooClient({
|
|
88
|
+
apiKey: "test-api-key",
|
|
89
|
+
secretKey: "test-secret-key"
|
|
90
|
+
});
|
|
91
|
+
expect(client).toBeDefined();
|
|
92
|
+
expect(client.GET).toBeDefined();
|
|
93
|
+
expect(client.POST).toBeDefined();
|
|
94
|
+
expect(client.DELETE).toBeDefined();
|
|
95
|
+
});
|
|
96
|
+
it("should create client with custom base URL", ()=>{
|
|
97
|
+
const customUrl = "https://custom.api.com/v2";
|
|
98
|
+
const client = createWahooClient({
|
|
99
|
+
apiKey: "test-api-key",
|
|
100
|
+
secretKey: "test-secret-key",
|
|
101
|
+
baseUrl: customUrl
|
|
102
|
+
});
|
|
103
|
+
expect(client).toBeDefined();
|
|
104
|
+
});
|
|
105
|
+
it("should export DEFAULT_BASE_URL", ()=>{
|
|
106
|
+
expect(DEFAULT_BASE_URL).toBe("https://api.wahoopredict.com/oapi/v2");
|
|
107
|
+
});
|
|
108
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WahooPredict Trading SDK
|
|
3
|
+
*
|
|
4
|
+
* TypeScript SDK for the WahooPredict trading API.
|
|
5
|
+
* Built on top of openapi-fetch for type-safe API calls.
|
|
6
|
+
*/ export { default as createWahooClient, generateSignature, createAuthMiddleware, DEFAULT_BASE_URL } from "./client.js"; // Re-export useful types from openapi-fetch
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -0,0 +1,433 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by openapi-typescript.
|
|
3
|
+
* Do not make direct changes to the file.
|
|
4
|
+
*/ /** Get a list of events */ /** Get detailed information for a specific event */ /** Retrieve the order book for a specific outcome option. */ /** @description Get estimation of the order */ /** @description Order tested successfully */ /**
|
|
5
|
+
* @description Operation status
|
|
6
|
+
* @enum {string}
|
|
7
|
+
*/ /** @description Player’s estimated win after the order is placed */ /** @description Create an order on an outcome option */ /** @description Order created successfully */ /**
|
|
8
|
+
* @description Operation status
|
|
9
|
+
* @enum {string}
|
|
10
|
+
*/ /** @description Player’s balance after the order is placed */ /** @description Order cancelled successfully */ /**
|
|
11
|
+
* @description Operation status
|
|
12
|
+
* @enum {string}
|
|
13
|
+
*/ /** @description Order is not found or already cancelled */ /** @description Collect win or loss when event is resolved */ /** @description Position collected successfully */ /** @enum {string} */ /** @description Position is not found or not collectable yet */ /** @description Get list of user's orders */ /** @description OK */ /**
|
|
14
|
+
* @example {
|
|
15
|
+
* "data": [
|
|
16
|
+
* {
|
|
17
|
+
* "id": "cmbt9kftk0001lf01fg093ut3",
|
|
18
|
+
* "userId": "6751d122e7ac1b342423b97f",
|
|
19
|
+
* "outcomeOptionId": "cma1kkyus0055nq01u3xs12n0",
|
|
20
|
+
* "size": "5.00",
|
|
21
|
+
* "price": "0.500",
|
|
22
|
+
* "filled": "0.00",
|
|
23
|
+
* "side": "BUY",
|
|
24
|
+
* "type": "LIMIT",
|
|
25
|
+
* "status": "OPEN",
|
|
26
|
+
* "createdAt": "2025-06-12T10:56:45.081Z",
|
|
27
|
+
* "outcomeOption": {
|
|
28
|
+
* "option": "Yes",
|
|
29
|
+
* "outcome": {
|
|
30
|
+
* "description": "Will Ivanka, Gisele, or Karlie Post a Group Selfie on Instagram?",
|
|
31
|
+
* "imageUrl": "https://wahoo-events.s3.us-east-1.amazonaws.com/j1fL5hwGMZfz_oGf8ug81",
|
|
32
|
+
* "event": {
|
|
33
|
+
* "id": "cmbt9kftk0001lf01fg093ut3"
|
|
34
|
+
* }
|
|
35
|
+
* }
|
|
36
|
+
* }
|
|
37
|
+
* }
|
|
38
|
+
* ],
|
|
39
|
+
* "totalPages": 1,
|
|
40
|
+
* "hasNextPage": false,
|
|
41
|
+
* "hasPreviousPage": false,
|
|
42
|
+
* "totalItems": 1
|
|
43
|
+
* }
|
|
44
|
+
*/ /** @description Get list of user's positions */ /** @description OK */ /**
|
|
45
|
+
* @example {
|
|
46
|
+
* "data": [
|
|
47
|
+
* {
|
|
48
|
+
* "id": "cmbtcquc0000ppf01l9bx03tc",
|
|
49
|
+
* "userId": "6751d122e7ac1b342423b97f",
|
|
50
|
+
* "outcomeOptionId": "cma1kkyus0055nq01u3xs12n0",
|
|
51
|
+
* "avgPrice": "0.500",
|
|
52
|
+
* "part": "5.00",
|
|
53
|
+
* "createdAt": "2025-06-12T10:56:45.081Z",
|
|
54
|
+
* "outcomeOption": {
|
|
55
|
+
* "option": "Yes",
|
|
56
|
+
* "probability": 0.6,
|
|
57
|
+
* "outcome": {
|
|
58
|
+
* "description": "Will Ivanka, Gisele, or Karlie Post a Group Selfie on Instagram?",
|
|
59
|
+
* "imageUrl": "https://wahoo-events.s3.us-east-1.amazonaws.com/j1fL5hwGMZfz_oGf8ug81",
|
|
60
|
+
* "event": {
|
|
61
|
+
* "id": "cmbt9kftk0001lf01fg093ut3"
|
|
62
|
+
* }
|
|
63
|
+
* }
|
|
64
|
+
* }
|
|
65
|
+
* }
|
|
66
|
+
* ],
|
|
67
|
+
* "totalPages": 1,
|
|
68
|
+
* "hasNextPage": false,
|
|
69
|
+
* "hasPreviousPage": false,
|
|
70
|
+
* "totalItems": 1
|
|
71
|
+
* }
|
|
72
|
+
*/ /** @description Get user profile */ /**
|
|
73
|
+
* @description Comma-separated list of fields to include in the response.
|
|
74
|
+
* If omitted, a default set of public fields will be returned (e.g., id, username, email).
|
|
75
|
+
*/ /** @description User data successfully retrieved. */ /** @description Unique identifier for the user. */ /** @description User's chosen username. */ /** @enum {string} */ /** Format: email */ /**
|
|
76
|
+
* Format: uri
|
|
77
|
+
* @description URL to the user's profile picture.
|
|
78
|
+
*/ /** @description Indicates if the user has a password set. */ /** @description Indicates if two-factor authentication is enabled. */ /**
|
|
79
|
+
* Format: float
|
|
80
|
+
* @description Current account balance.
|
|
81
|
+
*/ /**
|
|
82
|
+
* Format: float
|
|
83
|
+
* @description Current bonus balance.
|
|
84
|
+
*/ /**
|
|
85
|
+
* Format: float
|
|
86
|
+
* @description Sum of balance and bonusBalance.
|
|
87
|
+
*/ /** @description Array indicating if the user is unsubscribed from marketing emails. */ /** @description Unique payment identifier. */ /**
|
|
88
|
+
* Format: float
|
|
89
|
+
* @description Total profit earned from referrals.
|
|
90
|
+
*/ /**
|
|
91
|
+
* @description The status of the event.
|
|
92
|
+
* @enum {string}
|
|
93
|
+
*/ /** @description The unique ID of the outcome option. */ /** @description The ID of the parent outcome. */ /** @description The name of the option (e.g., "Yes", "No"). */ /**
|
|
94
|
+
* Format: double
|
|
95
|
+
* @description The current probability/price of the option.
|
|
96
|
+
*/ /** @description A history of prices/probabilities. */ /**
|
|
97
|
+
* Format: double
|
|
98
|
+
* @description The total volume traded for this option.
|
|
99
|
+
*/ /** Format: double */ /** Format: integer */ /** Format: double */ /** Format: double */ /** Format: double */ /** Format: date-time */ /** Format: date-time */ /** Format: integer */ /** @description The unique ID of the event. */ /** @enum {string} */ /** Format: date-time */ /** Format: date-time */ /** Format: date-time */ /** Format: date-time */ /** Format: integer */ /** @enum {string|null} */ /** @description Details on the best available offer/option. */ /**
|
|
100
|
+
* @description The price of the order (as a string to handle high precision).
|
|
101
|
+
* @example 0.100
|
|
102
|
+
*/ /**
|
|
103
|
+
* @description The size/amount of the order (as a string to handle high precision).
|
|
104
|
+
* @example 1.00
|
|
105
|
+
*/ /** @description A list of buy orders, typically sorted by price descending. */ /** @description A list of sell orders, typically sorted by price ascending. */ /** @enum {string} */ /** @enum {string} */ /** @enum {string} */ /** @enum {string} */ /** @enum {string} */ /**
|
|
106
|
+
* @example {
|
|
107
|
+
* "eventId": "cma1kj99c0050nq01v9zaypq5",
|
|
108
|
+
* "outcomeOptionId": "cma1kkyus0055nq01u3xs12n0",
|
|
109
|
+
* "side": "BUY",
|
|
110
|
+
* "size": "5",
|
|
111
|
+
* "price": "0.5",
|
|
112
|
+
* "type": "LIMIT"
|
|
113
|
+
* }
|
|
114
|
+
*/ /** @description ID of the event the order is placed on */ /** @description ID of the specific outcome option */ /**
|
|
115
|
+
* @description Side of the order
|
|
116
|
+
* @enum {string}
|
|
117
|
+
*/ /** @description Amount in dollars. Required for MARKET BUY order */ /** @description Size in parts. Required for all types except MARKET BUY */ /** @description Price of part in dollars. Required for LIMIT orders */ /**
|
|
118
|
+
* @description Type of the order
|
|
119
|
+
* @enum {string}
|
|
120
|
+
*/ /**
|
|
121
|
+
* @description error or success
|
|
122
|
+
* @enum {string}
|
|
123
|
+
*/ /** @description Type of the error */ /** @description Human-readable description of the error */ /** @description Optional details about the error */ /** @description Authentication required or invalid token. */ export { }; /**
|
|
124
|
+
* Format: integer
|
|
125
|
+
* @description The page number for pagination.
|
|
126
|
+
* @default 1
|
|
127
|
+
*/ /**
|
|
128
|
+
* Format: integer
|
|
129
|
+
* @description The number of items per page.
|
|
130
|
+
* @default 20
|
|
131
|
+
*/ /** @description Sorting criteria for the list. */ /**
|
|
132
|
+
* @default estimatedEnd
|
|
133
|
+
* @enum {string}
|
|
134
|
+
*/ /**
|
|
135
|
+
* @default desc
|
|
136
|
+
* @enum {string}
|
|
137
|
+
*/ /**
|
|
138
|
+
* @description Filtering criteria for the list.
|
|
139
|
+
* @default {
|
|
140
|
+
* "status": [
|
|
141
|
+
* "LIVE",
|
|
142
|
+
* "PENDING"
|
|
143
|
+
* ]
|
|
144
|
+
* }
|
|
145
|
+
*/ /** @description Filter by one or more event statuses. */ /** @description A search string to filter events by title/description. The `transform` logic is not directly expressible in OpenAPI but is noted here. */ /** @description Filter by one or more tags. */ /** @description A paginated list of events */ /**
|
|
146
|
+
* @example {
|
|
147
|
+
* "data": [
|
|
148
|
+
* {
|
|
149
|
+
* "id": "cm60tbc8b0005qt015r1lv4og",
|
|
150
|
+
* "title": "Trump will announce planning for a bust of himself on Mount Rushmore?",
|
|
151
|
+
* "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.",
|
|
152
|
+
* "metaDescription": "Will Trump etch his legacy in stone? Bet on Mount Rushmore's next face! Make a Prediction Now!",
|
|
153
|
+
* "newsSource": null,
|
|
154
|
+
* "slug": "president-donald-trump-will-announce-planning-for-a-bust-of-himself-on-mount-rushmore",
|
|
155
|
+
* "imageUrl": "https://wahoo-events.s3.us-east-1.amazonaws.com/2Iag9S762_b0YmIacrV_u_dvjh",
|
|
156
|
+
* "status": "LIVE",
|
|
157
|
+
* "type": "COLLECTION",
|
|
158
|
+
* "estimatedEnd": "2028-01-01T04:59:00.000Z",
|
|
159
|
+
* "endDate": null,
|
|
160
|
+
* "updatedAt": "2025-09-30T05:41:02.191Z",
|
|
161
|
+
* "createdAt": "2025-01-17T17:32:05.234Z",
|
|
162
|
+
* "volume": 25266,
|
|
163
|
+
* "externalId": null,
|
|
164
|
+
* "favorites": [],
|
|
165
|
+
* "feature": "FEATURED",
|
|
166
|
+
* "outcomes": [
|
|
167
|
+
* {
|
|
168
|
+
* "id": "cm60tcr8q0007qt01y74j0uc3",
|
|
169
|
+
* "title": "Trump will announce planning for a bust of himself on Mount Rushmore?",
|
|
170
|
+
* "description": "Trump will announce planning for a bust of himself on Mount Rushmore?",
|
|
171
|
+
* "resolution": "Resolution ID: cm60tcr8q0007qt01y74j0uc3",
|
|
172
|
+
* "rules": "You can dispute the decision within 7 days after the settlement; to do so, write to our technical support by email and telegram.",
|
|
173
|
+
* "slug": "trump-will-announce-planning-for-a-bust-of-himself-on-mount-rushmore",
|
|
174
|
+
* "eventId": "cm60tbc8b0005qt015r1lv4og",
|
|
175
|
+
* "estimatedEnd": "2028-01-01T04:59:00.000Z",
|
|
176
|
+
* "endDate": null,
|
|
177
|
+
* "imageUrl": "https://wahoo-events.s3.us-east-1.amazonaws.com/3ak9b8GPxQ4YtAtiO0iqq_dvjh",
|
|
178
|
+
* "volume": 25266,
|
|
179
|
+
* "status": "LIVE",
|
|
180
|
+
* "externalId": null,
|
|
181
|
+
* "OutcomeOption": [
|
|
182
|
+
* {
|
|
183
|
+
* "id": "cm60tcr8q0008qt01gi5d7qb9",
|
|
184
|
+
* "outcomeId": "cm60tcr8q0007qt01y74j0uc3",
|
|
185
|
+
* "option": "Yes",
|
|
186
|
+
* "probability": 0.075,
|
|
187
|
+
* "pricesHistory": [
|
|
188
|
+
* 0.15,
|
|
189
|
+
* 0.05,
|
|
190
|
+
* 0.05,
|
|
191
|
+
* 0.05
|
|
192
|
+
* ],
|
|
193
|
+
* "totalVolume": 541.9420969262309,
|
|
194
|
+
* "slug": "yes",
|
|
195
|
+
* "totalPart": 12150.69525869904,
|
|
196
|
+
* "order": 0,
|
|
197
|
+
* "marketId": "cmbscqa7a007jo2014lgh3pt3",
|
|
198
|
+
* "liquidityStatus": "LOW",
|
|
199
|
+
* "orders": [
|
|
200
|
+
* {
|
|
201
|
+
* "id": "cmetqh82i00itqv010z4rkeqf"
|
|
202
|
+
* },
|
|
203
|
+
* {
|
|
204
|
+
* "id": "cmetqh82e00irqv01kt1bx7y0"
|
|
205
|
+
* },
|
|
206
|
+
* {
|
|
207
|
+
* "id": "cmf9u9p0h008coa01u1gq7z80"
|
|
208
|
+
* },
|
|
209
|
+
* {
|
|
210
|
+
* "id": "cmf9ub1mp008ioa01d4s3j1nm"
|
|
211
|
+
* },
|
|
212
|
+
* {
|
|
213
|
+
* "id": "cmf9ub1mn008goa01g440lajo"
|
|
214
|
+
* },
|
|
215
|
+
* {
|
|
216
|
+
* "id": "cmf9ub6sw008ooa013984yl5g"
|
|
217
|
+
* },
|
|
218
|
+
* {
|
|
219
|
+
* "id": "cmf9u3v04008aoa01sktgryj2"
|
|
220
|
+
* },
|
|
221
|
+
* {
|
|
222
|
+
* "id": "cmf9ubg2n008uoa01heb9708h"
|
|
223
|
+
* },
|
|
224
|
+
* {
|
|
225
|
+
* "id": "cmf9ubg2l008soa01gerce4u2"
|
|
226
|
+
* },
|
|
227
|
+
* {
|
|
228
|
+
* "id": "cmf9ubyn1008yoa01e0t5bvua"
|
|
229
|
+
* },
|
|
230
|
+
* {
|
|
231
|
+
* "id": "cmflfmbto005yl501qciay559"
|
|
232
|
+
* },
|
|
233
|
+
* {
|
|
234
|
+
* "id": "cmflfmbtm005wl501c77btyw6"
|
|
235
|
+
* },
|
|
236
|
+
* {
|
|
237
|
+
* "id": "cmflfoh0p0068l501d38y20og"
|
|
238
|
+
* },
|
|
239
|
+
* {
|
|
240
|
+
* "id": "cmflfoh0l0066l501usqqtye0"
|
|
241
|
+
* },
|
|
242
|
+
* {
|
|
243
|
+
* "id": "cmfy1vpjg001ymv01emdrgc12"
|
|
244
|
+
* },
|
|
245
|
+
* {
|
|
246
|
+
* "id": "cmfld3lif01pkl501tkmfgfcw"
|
|
247
|
+
* },
|
|
248
|
+
* {
|
|
249
|
+
* "id": "cmfld3lid01pil501eg96ypaa"
|
|
250
|
+
* }
|
|
251
|
+
* ],
|
|
252
|
+
* "buyPrice": 0.08415841584158412,
|
|
253
|
+
* "sellPrice": 0.07425742574257425,
|
|
254
|
+
* "potentialWin": 444.44444
|
|
255
|
+
* },
|
|
256
|
+
* {
|
|
257
|
+
* "id": "cm60tcr8q0009qt01gom1jytx",
|
|
258
|
+
* "outcomeId": "cm60tcr8q0007qt01y74j0uc3",
|
|
259
|
+
* "option": "No",
|
|
260
|
+
* "probability": 0.925,
|
|
261
|
+
* "pricesHistory": [
|
|
262
|
+
* 0.85,
|
|
263
|
+
* 0.95,
|
|
264
|
+
* 0.95,
|
|
265
|
+
* 0.95
|
|
266
|
+
* ],
|
|
267
|
+
* "totalVolume": 4053.950169881916,
|
|
268
|
+
* "slug": "no",
|
|
269
|
+
* "totalPart": 4210.806263227002,
|
|
270
|
+
* "order": 1,
|
|
271
|
+
* "marketId": "cmbscqa7a007jo2014lgh3pt3",
|
|
272
|
+
* "liquidityStatus": "LOW",
|
|
273
|
+
* "orders": [],
|
|
274
|
+
* "buyPrice": 0.9257425742574258,
|
|
275
|
+
* "sellPrice": 0.9158415841584159,
|
|
276
|
+
* "potentialWin": 101.9368
|
|
277
|
+
* }
|
|
278
|
+
* ]
|
|
279
|
+
* }
|
|
280
|
+
* ],
|
|
281
|
+
* "tags": [
|
|
282
|
+
* {
|
|
283
|
+
* "slug": "politics",
|
|
284
|
+
* "label": "Politics"
|
|
285
|
+
* },
|
|
286
|
+
* {
|
|
287
|
+
* "slug": "america",
|
|
288
|
+
* "label": "America"
|
|
289
|
+
* },
|
|
290
|
+
* {
|
|
291
|
+
* "slug": "trump",
|
|
292
|
+
* "label": "Trump"
|
|
293
|
+
* },
|
|
294
|
+
* {
|
|
295
|
+
* "slug": "consumer",
|
|
296
|
+
* "label": "Consumer"
|
|
297
|
+
* }
|
|
298
|
+
* ]
|
|
299
|
+
* }
|
|
300
|
+
* ],
|
|
301
|
+
* "suggestions": [],
|
|
302
|
+
* "totalPages": 14,
|
|
303
|
+
* "hasNextPage": true,
|
|
304
|
+
* "hasPreviousPage": false,
|
|
305
|
+
* "totalItems": 280
|
|
306
|
+
* }
|
|
307
|
+
*/ /** @description The list of events. */ /** @description List of suggestions (if any). */ /**
|
|
308
|
+
* Format: integer
|
|
309
|
+
* @description Total number of pages available.
|
|
310
|
+
*/ /** @description Indicates if there is a next page. */ /** @description Indicates if there is a previous page. */ /**
|
|
311
|
+
* Format: integer
|
|
312
|
+
* @description Total number of items across all pages.
|
|
313
|
+
*/ /** @description The unique identifier of the event. */ /** @description Successfully retrieved event details. */ /**
|
|
314
|
+
* @example {
|
|
315
|
+
* "id": "cm60tbc8b0005qt015r1lv4og",
|
|
316
|
+
* "title": "Trump will announce planning for a bust of himself on Mount Rushmore?",
|
|
317
|
+
* "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.",
|
|
318
|
+
* "metaDescription": "Will Trump etch his legacy in stone? Bet on Mount Rushmore's next face! Make a Prediction Now!",
|
|
319
|
+
* "newsSource": null,
|
|
320
|
+
* "slug": "president-donald-trump-will-announce-planning-for-a-bust-of-himself-on-mount-rushmore",
|
|
321
|
+
* "imageUrl": "https://wahoo-events.s3.us-east-1.amazonaws.com/2Iag9S762_b0YmIacrV_u_dvjh",
|
|
322
|
+
* "status": "LIVE",
|
|
323
|
+
* "type": "COLLECTION",
|
|
324
|
+
* "estimatedEnd": "2028-01-01T04:59:00.000Z",
|
|
325
|
+
* "endDate": null,
|
|
326
|
+
* "updatedAt": "2025-09-30T05:41:02.191Z",
|
|
327
|
+
* "createdAt": "2025-01-17T17:32:05.234Z",
|
|
328
|
+
* "volume": 25266,
|
|
329
|
+
* "externalId": null,
|
|
330
|
+
* "favorites": [],
|
|
331
|
+
* "feature": "FEATURED",
|
|
332
|
+
* "outcomes": [
|
|
333
|
+
* {
|
|
334
|
+
* "id": "cm60tcr8q0007qt01y74j0uc3",
|
|
335
|
+
* "title": "Trump will announce planning for a bust of himself on Mount Rushmore?",
|
|
336
|
+
* "description": "Trump will announce planning for a bust of himself on Mount Rushmore?",
|
|
337
|
+
* "resolution": "Resolution ID: cm60tcr8q0007qt01y74j0uc3",
|
|
338
|
+
* "rules": "You can dispute the decision within 7 days after the settlement; to do so, write to our technical support by email and telegram.",
|
|
339
|
+
* "slug": "trump-will-announce-planning-for-a-bust-of-himself-on-mount-rushmore",
|
|
340
|
+
* "eventId": "cm60tbc8b0005qt015r1lv4og",
|
|
341
|
+
* "estimatedEnd": "2028-01-01T04:59:00.000Z",
|
|
342
|
+
* "endDate": null,
|
|
343
|
+
* "imageUrl": "https://wahoo-events.s3.us-east-1.amazonaws.com/3ak9b8GPxQ4YtAtiO0iqq_dvjh",
|
|
344
|
+
* "volume": 25266,
|
|
345
|
+
* "status": "LIVE",
|
|
346
|
+
* "externalId": null,
|
|
347
|
+
* "OutcomeOption": [
|
|
348
|
+
* {
|
|
349
|
+
* "id": "cm60tcr8q0008qt01gi5d7qb9",
|
|
350
|
+
* "outcomeId": "cm60tcr8q0007qt01y74j0uc3",
|
|
351
|
+
* "option": "Yes",
|
|
352
|
+
* "probability": 0.075,
|
|
353
|
+
* "pricesHistory": [
|
|
354
|
+
* 0.15,
|
|
355
|
+
* 0.05,
|
|
356
|
+
* 0.05,
|
|
357
|
+
* 0.05
|
|
358
|
+
* ],
|
|
359
|
+
* "totalVolume": 541.9420969262309,
|
|
360
|
+
* "slug": "yes",
|
|
361
|
+
* "totalPart": 12150.69525869904,
|
|
362
|
+
* "order": 0,
|
|
363
|
+
* "marketId": "cmbscqa7a007jo2014lgh3pt3",
|
|
364
|
+
* "liquidityStatus": "LOW",
|
|
365
|
+
* "position": [],
|
|
366
|
+
* "buyPrice": 0.08415841584158412,
|
|
367
|
+
* "sellPrice": 0.07425742574257425,
|
|
368
|
+
* "potentialWin": 444.44444
|
|
369
|
+
* },
|
|
370
|
+
* {
|
|
371
|
+
* "id": "cm60tcr8q0009qt01gom1jytx",
|
|
372
|
+
* "outcomeId": "cm60tcr8q0007qt01y74j0uc3",
|
|
373
|
+
* "option": "No",
|
|
374
|
+
* "probability": 0.925,
|
|
375
|
+
* "pricesHistory": [
|
|
376
|
+
* 0.85,
|
|
377
|
+
* 0.95,
|
|
378
|
+
* 0.95,
|
|
379
|
+
* 0.95
|
|
380
|
+
* ],
|
|
381
|
+
* "totalVolume": 4053.950169881916,
|
|
382
|
+
* "slug": "no",
|
|
383
|
+
* "totalPart": 4210.806263227002,
|
|
384
|
+
* "order": 1,
|
|
385
|
+
* "marketId": "cmbscqa7a007jo2014lgh3pt3",
|
|
386
|
+
* "liquidityStatus": "LOW",
|
|
387
|
+
* "position": [],
|
|
388
|
+
* "buyPrice": 0.9257425742574258,
|
|
389
|
+
* "sellPrice": 0.9158415841584159,
|
|
390
|
+
* "potentialWin": 101.9368
|
|
391
|
+
* }
|
|
392
|
+
* ]
|
|
393
|
+
* }
|
|
394
|
+
* ],
|
|
395
|
+
* "tags": [
|
|
396
|
+
* {
|
|
397
|
+
* "label": "Politics",
|
|
398
|
+
* "slug": "politics"
|
|
399
|
+
* },
|
|
400
|
+
* {
|
|
401
|
+
* "label": "America",
|
|
402
|
+
* "slug": "america"
|
|
403
|
+
* },
|
|
404
|
+
* {
|
|
405
|
+
* "label": "Trump",
|
|
406
|
+
* "slug": "trump"
|
|
407
|
+
* },
|
|
408
|
+
* {
|
|
409
|
+
* "label": "Consumer",
|
|
410
|
+
* "slug": "consumer"
|
|
411
|
+
* }
|
|
412
|
+
* ],
|
|
413
|
+
* "bestOffer": {
|
|
414
|
+
* "outcomeId": "cm60tcr8q0007qt01y74j0uc3",
|
|
415
|
+
* "optionId": "cm60tcr8q0008qt01gi5d7qb9"
|
|
416
|
+
* }
|
|
417
|
+
* }
|
|
418
|
+
*/ /** @description The ID of the outcome option to retrieve the order book for. */ /** @description Successful retrieval of the order book. */ /**
|
|
419
|
+
* @example {
|
|
420
|
+
* "bids": [
|
|
421
|
+
* {
|
|
422
|
+
* "price": "0.100",
|
|
423
|
+
* "size": "1.00"
|
|
424
|
+
* }
|
|
425
|
+
* ],
|
|
426
|
+
* "asks": [
|
|
427
|
+
* {
|
|
428
|
+
* "price": "0.200",
|
|
429
|
+
* "size": "1.00"
|
|
430
|
+
* }
|
|
431
|
+
* ]
|
|
432
|
+
* }
|
|
433
|
+
*/
|