Skip to content

Commit 3b834fe

Browse files
committed
chore(integrations): update Kalshi get_events and subblock migrations, regen docs
1 parent fd78508 commit 3b834fe

3 files changed

Lines changed: 43 additions & 16 deletions

File tree

apps/docs/content/docs/en/tools/kalshi.mdx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,16 @@ Retrieve a list of events from Kalshi with optional filtering (V2 - exact API re
177177
|`strike_date` | string | Strike/settlement date |
178178
|`status` | string | Event status |
179179
| `milestones` | array | Array of milestone objects \(if requested\) |
180-
|`event_ticker` | string | Event ticker |
181-
|`milestone_type` | string | Milestone type |
182-
|`milestone_date` | string | Milestone date |
183-
|`milestone_title` | string | Milestone title |
180+
|`id` | string | Milestone ID |
181+
|`category` | string | Milestone category |
182+
|`type` | string | Milestone type |
183+
|`title` | string | Milestone title |
184+
|`start_date` | string | Milestone start date \(ISO 8601\) |
185+
|`end_date` | string | Milestone end date \(ISO 8601\) |
186+
|`notification_message` | string | Notification message |
187+
|`primary_event_tickers` | array | Primary event tickers |
188+
|`related_event_tickers` | array | Related event tickers |
189+
|`last_updated_ts` | string | Last updated time \(ISO 8601\) |
184190
| `cursor` | string | Pagination cursor for fetching more results |
185191

186192
### `kalshi_get_event`

apps/sim/lib/workflows/migrations/subblock-migrations.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ export const SUBBLOCK_ID_MIGRATIONS: Record<string, Record<string, string>> = {
2626
knowledge: {
2727
knowledgeBaseId: 'knowledgeBaseSelector',
2828
},
29+
kalshi: {
30+
settlementStatus: '_removed_settlementStatus',
31+
},
2932
dynamodb: {
3033
key: 'getKey',
3134
filterExpression: 'queryFilterExpression',

apps/sim/tools/kalshi/get_events.ts

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,16 @@ export interface KalshiGetEventsV2Response {
147147
markets: Array<Record<string, unknown>> | null
148148
}>
149149
milestones: Array<{
150-
event_ticker: string
151-
milestone_type: string
152-
milestone_date: string
153-
milestone_title: string | null
150+
id: string | null
151+
category: string | null
152+
type: string | null
153+
title: string | null
154+
start_date: string | null
155+
end_date: string | null
156+
notification_message: string | null
157+
primary_event_tickers: string[] | null
158+
related_event_tickers: string[] | null
159+
last_updated_ts: string | null
154160
}> | null
155161
cursor: string | null
156162
}
@@ -256,10 +262,16 @@ export const kalshiGetEventsV2Tool: ToolConfig<KalshiGetEventsV2Params, KalshiGe
256262

257263
const milestones = data.milestones
258264
? (data.milestones as Array<Record<string, unknown>>).map((m) => ({
259-
event_ticker: (m.event_ticker as string) ?? '',
260-
milestone_type: (m.milestone_type as string) ?? '',
261-
milestone_date: (m.milestone_date as string) ?? '',
262-
milestone_title: (m.milestone_title as string | null) ?? null,
265+
id: (m.id as string) ?? null,
266+
category: (m.category as string) ?? null,
267+
type: (m.type as string) ?? null,
268+
title: (m.title as string | null) ?? null,
269+
start_date: (m.start_date as string) ?? null,
270+
end_date: (m.end_date as string) ?? null,
271+
notification_message: (m.notification_message as string | null) ?? null,
272+
primary_event_tickers: (m.primary_event_tickers as string[]) ?? null,
273+
related_event_tickers: (m.related_event_tickers as string[]) ?? null,
274+
last_updated_ts: (m.last_updated_ts as string) ?? null,
263275
}))
264276
: null
265277

@@ -288,10 +300,16 @@ export const kalshiGetEventsV2Tool: ToolConfig<KalshiGetEventsV2Params, KalshiGe
288300
items: {
289301
type: 'object',
290302
properties: {
291-
event_ticker: { type: 'string', description: 'Event ticker' },
292-
milestone_type: { type: 'string', description: 'Milestone type' },
293-
milestone_date: { type: 'string', description: 'Milestone date' },
294-
milestone_title: { type: 'string', description: 'Milestone title' },
303+
id: { type: 'string', description: 'Milestone ID' },
304+
category: { type: 'string', description: 'Milestone category' },
305+
type: { type: 'string', description: 'Milestone type' },
306+
title: { type: 'string', description: 'Milestone title' },
307+
start_date: { type: 'string', description: 'Milestone start date (ISO 8601)' },
308+
end_date: { type: 'string', description: 'Milestone end date (ISO 8601)' },
309+
notification_message: { type: 'string', description: 'Notification message' },
310+
primary_event_tickers: { type: 'array', description: 'Primary event tickers' },
311+
related_event_tickers: { type: 'array', description: 'Related event tickers' },
312+
last_updated_ts: { type: 'string', description: 'Last updated time (ISO 8601)' },
295313
},
296314
},
297315
},

0 commit comments

Comments
 (0)