@0xinsider/mcp 3.4.1 → 3.6.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/README.md +27 -4
- package/dist/catalog.generated.d.ts +40 -0
- package/dist/catalog.generated.d.ts.map +1 -1
- package/dist/catalog.generated.js +50 -0
- package/dist/catalog.generated.js.map +1 -1
- package/dist/client.d.ts +7 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js.map +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/prompts/index.d.ts +1 -1
- package/dist/prompts/index.d.ts.map +1 -1
- package/dist/prompts/index.js +6 -6
- package/dist/prompts/index.js.map +1 -1
- package/dist/resources/index.d.ts +1 -1
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +10 -10
- package/dist/resources/index.js.map +1 -1
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/schema.d.ts +226 -27
- package/dist/sdk/schema.d.ts.map +1 -1
- package/dist/sdk/webhooks.d.ts +30 -226
- package/dist/sdk/webhooks.d.ts.map +1 -1
- package/dist/sdk/webhooks.js.map +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +32 -7
- package/dist/server.js.map +1 -1
- package/dist/tools/combos.d.ts +6 -0
- package/dist/tools/combos.d.ts.map +1 -0
- package/dist/tools/combos.js +133 -0
- package/dist/tools/combos.js.map +1 -0
- package/dist/tools/explore-markets.d.ts +1 -1
- package/dist/tools/explore-markets.d.ts.map +1 -1
- package/dist/tools/explore-markets.js +3 -3
- package/dist/tools/explore-markets.js.map +1 -1
- package/dist/tools/games.d.ts +1 -1
- package/dist/tools/games.d.ts.map +1 -1
- package/dist/tools/games.js +8 -8
- package/dist/tools/games.js.map +1 -1
- package/dist/tools/get-insider-radar.d.ts +1 -1
- package/dist/tools/get-insider-radar.d.ts.map +1 -1
- package/dist/tools/get-insider-radar.js +4 -3
- package/dist/tools/get-insider-radar.js.map +1 -1
- package/dist/tools/get-large-positions.d.ts +1 -1
- package/dist/tools/get-large-positions.d.ts.map +1 -1
- package/dist/tools/get-large-positions.js +3 -3
- package/dist/tools/get-large-positions.js.map +1 -1
- package/dist/tools/get-leaderboard.d.ts +1 -1
- package/dist/tools/get-leaderboard.d.ts.map +1 -1
- package/dist/tools/get-leaderboard.js +4 -4
- package/dist/tools/get-leaderboard.js.map +1 -1
- package/dist/tools/get-market-flow.d.ts +1 -1
- package/dist/tools/get-market-flow.d.ts.map +1 -1
- package/dist/tools/get-market-flow.js +4 -4
- package/dist/tools/get-market-flow.js.map +1 -1
- package/dist/tools/get-position-timeline.d.ts +1 -1
- package/dist/tools/get-position-timeline.d.ts.map +1 -1
- package/dist/tools/get-position-timeline.js +3 -3
- package/dist/tools/get-position-timeline.js.map +1 -1
- package/dist/tools/get-positions.d.ts +1 -1
- package/dist/tools/get-positions.d.ts.map +1 -1
- package/dist/tools/get-positions.js +3 -3
- package/dist/tools/get-positions.js.map +1 -1
- package/dist/tools/get-suspicious-trades.d.ts +1 -1
- package/dist/tools/get-suspicious-trades.d.ts.map +1 -1
- package/dist/tools/get-suspicious-trades.js +6 -6
- package/dist/tools/get-suspicious-trades.js.map +1 -1
- package/dist/tools/get-trader-pnl.d.ts +1 -1
- package/dist/tools/get-trader-pnl.d.ts.map +1 -1
- package/dist/tools/get-trader-pnl.js +4 -4
- package/dist/tools/get-trader-pnl.js.map +1 -1
- package/dist/tools/get-trader.d.ts +1 -1
- package/dist/tools/get-trader.d.ts.map +1 -1
- package/dist/tools/get-trader.js +9 -4
- package/dist/tools/get-trader.js.map +1 -1
- package/dist/tools/get-trending-wallets.d.ts +1 -1
- package/dist/tools/get-trending-wallets.d.ts.map +1 -1
- package/dist/tools/get-trending-wallets.js +3 -3
- package/dist/tools/get-trending-wallets.js.map +1 -1
- package/dist/tools/get-whale-trades.d.ts +1 -1
- package/dist/tools/get-whale-trades.d.ts.map +1 -1
- package/dist/tools/get-whale-trades.js +4 -4
- package/dist/tools/get-whale-trades.js.map +1 -1
- package/dist/tools/large-trade-counterparties.d.ts +5 -0
- package/dist/tools/large-trade-counterparties.d.ts.map +1 -0
- package/dist/tools/large-trade-counterparties.js +91 -0
- package/dist/tools/large-trade-counterparties.js.map +1 -0
- package/dist/tools/market-reads.d.ts +5 -0
- package/dist/tools/market-reads.d.ts.map +1 -0
- package/dist/tools/market-reads.js +100 -0
- package/dist/tools/market-reads.js.map +1 -0
- package/dist/tools/pick-of-the-day.d.ts +1 -1
- package/dist/tools/pick-of-the-day.d.ts.map +1 -1
- package/dist/tools/pick-of-the-day.js +10 -10
- package/dist/tools/pick-of-the-day.js.map +1 -1
- package/dist/tools/read-parity.d.ts +1 -1
- package/dist/tools/read-parity.d.ts.map +1 -1
- package/dist/tools/read-parity.js +85 -81
- package/dist/tools/read-parity.js.map +1 -1
- package/dist/tools/search-markets.d.ts +1 -1
- package/dist/tools/search-markets.d.ts.map +1 -1
- package/dist/tools/search-markets.js +4 -4
- package/dist/tools/search-markets.js.map +1 -1
- package/dist/tools/trader-reads.d.ts +6 -0
- package/dist/tools/trader-reads.d.ts.map +1 -0
- package/dist/tools/trader-reads.js +99 -0
- package/dist/tools/trader-reads.js.map +1 -0
- package/package.json +2 -2
package/dist/sdk/webhooks.d.ts
CHANGED
|
@@ -41,8 +41,7 @@
|
|
|
41
41
|
* across at-least-once retries. Terminal states never restart on polling or
|
|
42
42
|
* replay. The legacy synchronous method and its retry restriction remain.
|
|
43
43
|
*/
|
|
44
|
-
import type {
|
|
45
|
-
import type { WebhookEventType as ContractWebhookEventType } from "./schema.js";
|
|
44
|
+
import type { LargeTradesInsertedData, SharpMoneyFlowDetectedData, SuspiciousTradeFlaggedData, TraderSyncedData, WebhookEventData, WebhookEventType as ContractWebhookEventType } from "./schema.js";
|
|
46
45
|
/** Default replay tolerance; the published contract is 300 seconds. */
|
|
47
46
|
export declare const SIGNATURE_TOLERANCE_SECONDS = 300;
|
|
48
47
|
/** Header carrying the `v1=<hex>` signature. */
|
|
@@ -133,240 +132,51 @@ type Complete<T, Missing extends never> = T | Missing;
|
|
|
133
132
|
export type WebhookEventType = Complete<ContractWebhookEventType, Exclude<ContractWebhookEventType, (typeof WEBHOOK_EVENT_TYPES)[number]>>;
|
|
134
133
|
/**
|
|
135
134
|
* Common delivery envelope every webhook POST body carries. Source of truth:
|
|
136
|
-
*
|
|
137
|
-
*
|
|
135
|
+
* `WebhookEnvelope` in `backend/crates/core/src/webhook_payloads.rs`, which
|
|
136
|
+
* every entry of the OpenAPI document's `webhooks` map describes.
|
|
138
137
|
*/
|
|
139
138
|
export interface WebhookEventEnvelope<TType extends WebhookEventType = WebhookEventType, TData = unknown> {
|
|
140
139
|
/** Stable event id; identical across retries of the same logical event. */
|
|
141
140
|
id: string;
|
|
142
141
|
type: TType;
|
|
143
|
-
/** ISO-8601 timestamp of when the event was enqueued. */
|
|
144
|
-
created_at: string;
|
|
145
|
-
data: TData;
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* `large_trade_inserted_v2` data (Pro and Max): one large trade, with the
|
|
149
|
-
* trade itself. Source: `LargeTradeInsertedV2` in
|
|
150
|
-
* `backend/crates/core/src/feed_event.rs`.
|
|
151
|
-
*
|
|
152
|
-
* The three amounts are decimal strings that keep the stored precision. Parse
|
|
153
|
-
* them with a decimal library when the exact value matters; `Number` rounds.
|
|
154
|
-
* The endpoint's `trade_filters` decide which trades it receives.
|
|
155
|
-
*/
|
|
156
|
-
export interface LargeTradeInsertedV2Data {
|
|
157
142
|
/**
|
|
158
|
-
*
|
|
159
|
-
*
|
|
143
|
+
* When the producer recorded the event (ISO 8601); for a trade event, the
|
|
144
|
+
* fill time. Retries resend the same body, so it is not the time of the
|
|
145
|
+
* attempt.
|
|
160
146
|
*/
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
whale_alert_id: number;
|
|
164
|
-
/** Polymarket condition id of the market. */
|
|
165
|
-
condition_id: string;
|
|
166
|
-
/** 0xinsider's numeric id for the wallet. */
|
|
167
|
-
trader_id: number;
|
|
168
|
-
/** Address of the wallet that made the trade. */
|
|
169
|
-
wallet: string;
|
|
170
|
-
/** The wallet's grade when the event was published; `null` when it has none. */
|
|
171
|
-
grade: Grade | null;
|
|
172
|
-
/** USD notional of the trade; decimal string. */
|
|
173
|
-
size_usd: string;
|
|
174
|
-
/** Shares traded; decimal string. */
|
|
175
|
-
shares: string;
|
|
176
|
-
/** Price paid per share; decimal string. */
|
|
177
|
-
price: string;
|
|
178
|
-
side: "BUY" | "SELL";
|
|
179
|
-
/** Polymarket's index of the outcome traded. */
|
|
180
|
-
outcome_index: number;
|
|
181
|
-
/** When the trade filled on Polymarket (ISO 8601). */
|
|
182
|
-
traded_at: string;
|
|
183
|
-
platform: "polymarket";
|
|
184
|
-
}
|
|
185
|
-
/**
|
|
186
|
-
* `large_trades_inserted` data (Pro and Max): new large trades were ingested.
|
|
187
|
-
* It carries a count and no trade; subscribe to `large_trade_inserted_v2` for
|
|
188
|
-
* the trade itself.
|
|
189
|
-
*
|
|
190
|
-
* Delivered identically under the deprecated spelling `whale_trades_inserted`
|
|
191
|
-
* (#16304) to an endpoint that registered that spelling; the payload is the
|
|
192
|
-
* same.
|
|
193
|
-
*/
|
|
194
|
-
export interface LargeTradesInsertedData {
|
|
195
|
-
count: number;
|
|
147
|
+
created_at: string;
|
|
148
|
+
data: TData;
|
|
196
149
|
}
|
|
150
|
+
export type { ExportJobCancelledData, ExportJobExpiredData, ExportJobFailedData, ExportJobReadyData, LargePositionsUpdatedData, LargeTradeInsertedV2Data, LargeTradesInsertedData, LiveSportsScoreEntry, LiveSportsUpdatedData, SharpMoneyFlowDetectedData, SuspiciousTradeFlaggedData, TraderSyncedData, WalletGradeChangedData, } from "./schema.js";
|
|
197
151
|
/**
|
|
198
152
|
* @deprecated Use `LargeTradesInsertedData`; renamed in #16304. The two event
|
|
199
153
|
* spellings are one event with one payload, so this is an alias.
|
|
200
154
|
*/
|
|
201
155
|
export type WhaleTradesInsertedData = LargeTradesInsertedData;
|
|
202
|
-
/** One side's score line inside a `live_sports_updated` pulse. */
|
|
203
|
-
export interface LiveSportsScoreEntry {
|
|
204
|
-
team: string;
|
|
205
|
-
score: string;
|
|
206
|
-
/** Esports series only: this side's current-map score. Absent on other sports. */
|
|
207
|
-
map_score?: string;
|
|
208
|
-
}
|
|
209
|
-
/**
|
|
210
|
-
* `live_sports_updated` data: one bounded pulse for one live game.
|
|
211
|
-
*
|
|
212
|
-
* A pulse fires when a material field moved since this game's previous
|
|
213
|
-
* delivered pulse (`scores`, `status`, `period`, `live`, `ended`), at most once
|
|
214
|
-
* per game per 20 seconds. A `live` or `ended` transition is exempt from that
|
|
215
|
-
* interval, so a game going live or final is never coalesced away; the game
|
|
216
|
-
* clock alone never fires a pulse. Suppressed frames are folded into the next
|
|
217
|
-
* pulse's `changed` and its body carries the current state, so you see every
|
|
218
|
-
* field that moved but not every intermediate value.
|
|
219
|
-
*/
|
|
220
|
-
export interface LiveSportsUpdatedData {
|
|
221
|
-
/** The Polymarket event slug this game trades under. */
|
|
222
|
-
event_slug: string;
|
|
223
|
-
/** Provider game id, or `null` when the frame carried none. */
|
|
224
|
-
game_id: string | null;
|
|
225
|
-
/** League abbreviation, or `null`. */
|
|
226
|
-
league: string | null;
|
|
227
|
-
/**
|
|
228
|
-
* Durable per-game pulse ordinal, increasing by one per delivered pulse.
|
|
229
|
-
* Deliveries are not ordered, so drop a pulse whose version you already saw.
|
|
230
|
-
*/
|
|
231
|
-
version: number;
|
|
232
|
-
/** Material fields that moved since this game's previous delivered pulse. */
|
|
233
|
-
changed: Array<"scores" | "status" | "period" | "live" | "ended">;
|
|
234
|
-
/** Provider frame time (ISO 8601), or `null` when the frame carried none. */
|
|
235
|
-
observed_at: string | null;
|
|
236
|
-
/** When the pulse was admitted (ISO 8601). */
|
|
237
|
-
published_at: string;
|
|
238
|
-
status: string | null;
|
|
239
|
-
period: string | null;
|
|
240
|
-
/** Game clock. Not a material field: it never fires a pulse on its own. */
|
|
241
|
-
clock: string | null;
|
|
242
|
-
live: boolean | null;
|
|
243
|
-
ended: boolean;
|
|
244
|
-
scores: LiveSportsScoreEntry[];
|
|
245
|
-
/** Esports `BoN` series token, or `null` on every other sport. */
|
|
246
|
-
series_format: string | null;
|
|
247
|
-
/** Public game page; re-read it after a gap instead of replaying pulses. */
|
|
248
|
-
snapshot_url: string;
|
|
249
|
-
}
|
|
250
|
-
/**
|
|
251
|
-
* `trader_synced` data: a tracked trader finished a sync pass.
|
|
252
|
-
*
|
|
253
|
-
* Delivered identically under the deprecated spelling `whale_trader_synced`
|
|
254
|
-
* (#16304) to an endpoint that registered that spelling; the payload is the
|
|
255
|
-
* same.
|
|
256
|
-
*/
|
|
257
|
-
export interface TraderSyncedData {
|
|
258
|
-
trader_id: number;
|
|
259
|
-
wallet: string;
|
|
260
|
-
}
|
|
261
156
|
/**
|
|
262
157
|
* @deprecated Use `TraderSyncedData`; renamed in #16304. The two event
|
|
263
158
|
* spellings are one event with one payload, so this is an alias.
|
|
264
159
|
*/
|
|
265
160
|
export type WhaleTraderSyncedData = TraderSyncedData;
|
|
266
|
-
/** `large_positions_updated` data. */
|
|
267
|
-
export interface LargePositionsUpdatedData {
|
|
268
|
-
count: number;
|
|
269
|
-
}
|
|
270
|
-
/**
|
|
271
|
-
* `wallet_grade_changed` data (Pro and Max): a tracked wallet's grade moved.
|
|
272
|
-
* Source: `backend/crates/sync/src/periodic/heavy_pipeline.rs`.
|
|
273
|
-
*/
|
|
274
|
-
export interface WalletGradeChangedData {
|
|
275
|
-
wallet: string;
|
|
276
|
-
trader_id: number;
|
|
277
|
-
old_grade: string;
|
|
278
|
-
new_grade: string;
|
|
279
|
-
/** Direction of the grade move, e.g. "up" / "down". */
|
|
280
|
-
direction: string;
|
|
281
|
-
skill_index: number;
|
|
282
|
-
final_score: number;
|
|
283
|
-
date: string;
|
|
284
|
-
}
|
|
285
|
-
/**
|
|
286
|
-
* `suspicious_trade_flagged` data (Pro and Max): a suspicion threshold was
|
|
287
|
-
* crossed on a fresh fill. Source: `backend/src/polymarket_rtds_ingest/flushing.rs`.
|
|
288
|
-
*
|
|
289
|
-
* Delivered identically under the deprecated spelling
|
|
290
|
-
* `insider_radar_flag_raised` (#16301) to an endpoint that registered that
|
|
291
|
-
* spelling; the payload is the same.
|
|
292
|
-
*/
|
|
293
|
-
export interface SuspiciousTradeFlaggedData {
|
|
294
|
-
trade_id: string;
|
|
295
|
-
wallet: string;
|
|
296
|
-
trader_id: number;
|
|
297
|
-
condition_id: string;
|
|
298
|
-
suspicion_score: number;
|
|
299
|
-
track: string;
|
|
300
|
-
/** Outcome side the flagged fill took. */
|
|
301
|
-
side: string;
|
|
302
|
-
size: number;
|
|
303
|
-
price: number;
|
|
304
|
-
}
|
|
305
161
|
/**
|
|
306
162
|
* @deprecated Use `SuspiciousTradeFlaggedData`; renamed in #16301. The two
|
|
307
163
|
* event spellings are one event with one payload, so this is an alias.
|
|
308
164
|
*/
|
|
309
165
|
export type InsiderRadarFlagRaisedData = SuspiciousTradeFlaggedData;
|
|
310
166
|
/**
|
|
311
|
-
* `
|
|
312
|
-
*
|
|
313
|
-
*
|
|
314
|
-
* One payload for both spellings of the event: the deprecated
|
|
315
|
-
* `smart_money_flow_detected` delivers the same object (#16308).
|
|
167
|
+
* @deprecated Use `SharpMoneyFlowDetectedData`; renamed in #16308. The two
|
|
168
|
+
* event spellings are one event with one payload, so this is an alias.
|
|
316
169
|
*/
|
|
317
|
-
export
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
net_flow_usd: number;
|
|
321
|
-
abs_net_flow_usd: number;
|
|
322
|
-
/** Side the net flow leans: "yes" or "no". */
|
|
323
|
-
dominant_side: string;
|
|
324
|
-
/** Minimum trader grade included: "S", "A", "B", "C", "D", or "F". */
|
|
325
|
-
grade_floor: string;
|
|
326
|
-
whale_trade_count: number;
|
|
327
|
-
/** Detection window, e.g. "24h". */
|
|
328
|
-
window: string;
|
|
329
|
-
}
|
|
330
|
-
/** `export_job_ready` data: the owner's async export can be downloaded. */
|
|
331
|
-
export interface ExportJobReadyData {
|
|
332
|
-
job_id: number;
|
|
333
|
-
status: "ready";
|
|
334
|
-
format: string;
|
|
335
|
-
next_action: "download";
|
|
336
|
-
total_trades: number | null;
|
|
337
|
-
processed_trades: number | null;
|
|
338
|
-
file_size: number | null;
|
|
339
|
-
data_as_of: string | null;
|
|
340
|
-
}
|
|
341
|
-
/** `export_job_failed` data: the owner's async export reached a terminal failure. */
|
|
342
|
-
export interface ExportJobFailedData {
|
|
343
|
-
job_id: number;
|
|
344
|
-
status: "failed";
|
|
345
|
-
format: string;
|
|
346
|
-
next_action: "resubmit";
|
|
347
|
-
failure_reason: string;
|
|
348
|
-
}
|
|
349
|
-
/** `export_job_expired` data: the owner's ready export passed retention. */
|
|
350
|
-
export interface ExportJobExpiredData {
|
|
351
|
-
job_id: number;
|
|
352
|
-
status: "expired";
|
|
353
|
-
format: string;
|
|
354
|
-
next_action: "resubmit";
|
|
355
|
-
}
|
|
356
|
-
/** `export_job_cancelled` data: the owner's export stopped because its owner cancelled it. */
|
|
357
|
-
export interface ExportJobCancelledData {
|
|
358
|
-
job_id: number;
|
|
359
|
-
status: "cancelled";
|
|
360
|
-
format: string;
|
|
361
|
-
next_action: "resubmit";
|
|
362
|
-
}
|
|
170
|
+
export type SmartMoneyFlowDetectedData = SharpMoneyFlowDetectedData;
|
|
171
|
+
/** One event type's delivery: the envelope around the payload the document declares for it. */
|
|
172
|
+
type EventFor<TType extends WebhookEventType> = WebhookEventEnvelope<TType, WebhookEventData[TType]>;
|
|
363
173
|
/**
|
|
364
174
|
* One large trade per delivery (Pro and Max, #16149). The envelope `id` equals
|
|
365
175
|
* `data.event_id`, and `created_at` is the trade's fill time
|
|
366
176
|
* (`data.traded_at`), not the time the delivery was queued.
|
|
367
177
|
*/
|
|
368
|
-
export type LargeTradeInsertedV2Event =
|
|
369
|
-
export type LargeTradesInsertedEvent =
|
|
178
|
+
export type LargeTradeInsertedV2Event = EventFor<"large_trade_inserted_v2">;
|
|
179
|
+
export type LargeTradesInsertedEvent = EventFor<"large_trades_inserted">;
|
|
370
180
|
/**
|
|
371
181
|
* @deprecated Use `LargeTradesInsertedEvent`; renamed in #16304. This stays a
|
|
372
182
|
* distinct envelope rather than an alias of it because the delivered `type`
|
|
@@ -374,9 +184,9 @@ export type LargeTradesInsertedEvent = WebhookEventEnvelope<"large_trades_insert
|
|
|
374
184
|
* to `whale_trades_inserted` keeps receiving that literal, so narrowing on it
|
|
375
185
|
* keeps working.
|
|
376
186
|
*/
|
|
377
|
-
export type WhaleTradesInsertedEvent =
|
|
378
|
-
export type LiveSportsUpdatedEvent =
|
|
379
|
-
export type TraderSyncedEvent =
|
|
187
|
+
export type WhaleTradesInsertedEvent = EventFor<"whale_trades_inserted">;
|
|
188
|
+
export type LiveSportsUpdatedEvent = EventFor<"live_sports_updated">;
|
|
189
|
+
export type TraderSyncedEvent = EventFor<"trader_synced">;
|
|
380
190
|
/**
|
|
381
191
|
* @deprecated Use `TraderSyncedEvent`; renamed in #16304. This stays a
|
|
382
192
|
* distinct envelope rather than an alias of it because the delivered `type`
|
|
@@ -384,10 +194,10 @@ export type TraderSyncedEvent = WebhookEventEnvelope<"trader_synced", TraderSync
|
|
|
384
194
|
* to `whale_trader_synced` keeps receiving that literal, so narrowing on it
|
|
385
195
|
* keeps working.
|
|
386
196
|
*/
|
|
387
|
-
export type WhaleTraderSyncedEvent =
|
|
388
|
-
export type LargePositionsUpdatedEvent =
|
|
389
|
-
export type WalletGradeChangedEvent =
|
|
390
|
-
export type SuspiciousTradeFlaggedEvent =
|
|
197
|
+
export type WhaleTraderSyncedEvent = EventFor<"whale_trader_synced">;
|
|
198
|
+
export type LargePositionsUpdatedEvent = EventFor<"large_positions_updated">;
|
|
199
|
+
export type WalletGradeChangedEvent = EventFor<"wallet_grade_changed">;
|
|
200
|
+
export type SuspiciousTradeFlaggedEvent = EventFor<"suspicious_trade_flagged">;
|
|
391
201
|
/**
|
|
392
202
|
* @deprecated Use `SuspiciousTradeFlaggedEvent`; renamed in #16301. This stays
|
|
393
203
|
* a distinct envelope rather than an alias of it because the delivered `type`
|
|
@@ -395,13 +205,8 @@ export type SuspiciousTradeFlaggedEvent = WebhookEventEnvelope<"suspicious_trade
|
|
|
395
205
|
* to `insider_radar_flag_raised` keeps receiving that literal, so narrowing on
|
|
396
206
|
* it keeps working.
|
|
397
207
|
*/
|
|
398
|
-
export type InsiderRadarFlagRaisedEvent =
|
|
399
|
-
|
|
400
|
-
* @deprecated Use `SharpMoneyFlowDetectedData`; renamed in #16308. The two
|
|
401
|
-
* event spellings are one event with one payload, so this is an alias.
|
|
402
|
-
*/
|
|
403
|
-
export type SmartMoneyFlowDetectedData = SharpMoneyFlowDetectedData;
|
|
404
|
-
export type SharpMoneyFlowDetectedEvent = WebhookEventEnvelope<"sharp_money_flow_detected", SharpMoneyFlowDetectedData>;
|
|
208
|
+
export type InsiderRadarFlagRaisedEvent = EventFor<"insider_radar_flag_raised">;
|
|
209
|
+
export type SharpMoneyFlowDetectedEvent = EventFor<"sharp_money_flow_detected">;
|
|
405
210
|
/**
|
|
406
211
|
* @deprecated Use `SharpMoneyFlowDetectedEvent`; renamed in #16308. This stays
|
|
407
212
|
* a distinct envelope rather than an alias of it because the delivered `type`
|
|
@@ -409,11 +214,11 @@ export type SharpMoneyFlowDetectedEvent = WebhookEventEnvelope<"sharp_money_flow
|
|
|
409
214
|
* to `smart_money_flow_detected` keeps receiving that literal, so narrowing on
|
|
410
215
|
* it keeps working.
|
|
411
216
|
*/
|
|
412
|
-
export type SmartMoneyFlowDetectedEvent =
|
|
413
|
-
export type ExportJobReadyEvent =
|
|
414
|
-
export type ExportJobFailedEvent =
|
|
415
|
-
export type ExportJobExpiredEvent =
|
|
416
|
-
export type ExportJobCancelledEvent =
|
|
217
|
+
export type SmartMoneyFlowDetectedEvent = EventFor<"smart_money_flow_detected">;
|
|
218
|
+
export type ExportJobReadyEvent = EventFor<"export_job_ready">;
|
|
219
|
+
export type ExportJobFailedEvent = EventFor<"export_job_failed">;
|
|
220
|
+
export type ExportJobExpiredEvent = EventFor<"export_job_expired">;
|
|
221
|
+
export type ExportJobCancelledEvent = EventFor<"export_job_cancelled">;
|
|
417
222
|
/**
|
|
418
223
|
* Discriminated union over every typed webhook delivery payload.
|
|
419
224
|
*
|
|
@@ -433,5 +238,4 @@ export type WebhookEvent = LargeTradeInsertedV2Event | LargeTradesInsertedEvent
|
|
|
433
238
|
* `verifySignature` passes (parsing first would let an unverified payload in).
|
|
434
239
|
*/
|
|
435
240
|
export declare function parseWebhookEvent(body: string): WebhookEvent;
|
|
436
|
-
export {};
|
|
437
241
|
//# sourceMappingURL=webhooks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../../../sdk/src/webhooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAIH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../../../sdk/src/webhooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAIH,OAAO,KAAK,EACV,uBAAuB,EACvB,0BAA0B,EAC1B,0BAA0B,EAC1B,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,IAAI,wBAAwB,EAC7C,MAAM,aAAa,CAAC;AAErB,uEAAuE;AACvE,eAAO,MAAM,2BAA2B,MAAM,CAAC;AAE/C,gDAAgD;AAChD,eAAO,MAAM,gBAAgB,0BAA0B,CAAC;AACxD,0DAA0D;AAC1D,eAAO,MAAM,gBAAgB,0BAA0B,CAAC;AAExD,MAAM,WAAW,oBAAoB;IACnC,2GAA2G;IAC3G,MAAM,EAAE,MAAM,CAAC;IACf,0EAA0E;IAC1E,SAAS,EAA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,CAAC,2BAA2B,CAAC,CAAC;AAChF;;;;;;GAMG;AACH,MAAM,MAAM,2BAA2B,GAAG,QAAQ,CAAC,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC,kBAAkB,CAAC,CAAC;AAC/D,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC,mBAAmB,CAAC,CAAC;AACjE,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC,oBAAoB,CAAC,CAAC;AACnE,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC,sBAAsB,CAAC,CAAC;AAEvE;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,YAAY,GACpB,yBAAyB,GACzB,wBAAwB,GACxB,wBAAwB,GACxB,sBAAsB,GACtB,iBAAiB,GACjB,sBAAsB,GACtB,0BAA0B,GAC1B,uBAAuB,GACvB,2BAA2B,GAC3B,2BAA2B,GAC3B,2BAA2B,GAC3B,2BAA2B,GAC3B,mBAAmB,GACnB,oBAAoB,GACpB,qBAAqB,GACrB,uBAAuB,CAAC;AAE5B;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAE5D"}
|
package/dist/sdk/webhooks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../../../sdk/src/webhooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../../../sdk/src/webhooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAW1D,uEAAuE;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AAO,eAAe,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;AACjD,CAAC;AAED,iCAAiC;AAEjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,uBAAuB;IACvB,uBAAuB;IACvB,qBAAqB;IACrB,eAAe;IACf,qBAAqB;IACrB,yBAAyB;IACzB,sBAAsB;IACtB,0BAA0B;IAC1B,2BAA2B;IAC3B,2EAA2E;IAC3E,qDAAqD;IACrD,2EAA2E;IAC3E,sDAAsD;IACtD,2BAA2B;IAC3B,2BAA2B;IAC3B,kBAAkB;IAClB,mBAAmB;IACnB,oBAAoB;IACpB,sBAAsB;IACtB,sEAAsE;IACtE,qEAAqE;IACrE,yBAAyB;CACyB,CAAC;AA2KrD;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAY;IAC5C,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAiB,CAAC;AAC1C,CAAC"}
|
package/dist/server.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { McpServer } from "@modelcontextprotocol/
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/server";
|
|
2
2
|
export declare function createServer(apiKey: string, baseUrl?: string): Promise<McpServer>;
|
|
3
3
|
export declare function runServer(): Promise<void>;
|
|
4
4
|
//# sourceMappingURL=server.d.ts.map
|
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAkMzD,wBAAsB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAEvF;AAED,wBAAsB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAkB/C"}
|
package/dist/server.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { McpServer } from "@modelcontextprotocol/
|
|
2
|
-
import {
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/server";
|
|
2
|
+
import { serveStdio } from "@modelcontextprotocol/server/stdio";
|
|
3
3
|
import { ApiClient } from "./client.js";
|
|
4
4
|
import { MCP_TOOL_CATALOG, } from "./catalog.generated.js";
|
|
5
5
|
import { registerGetTrader } from "./tools/get-trader.js";
|
|
@@ -18,6 +18,10 @@ import { registerExploreMarkets } from "./tools/explore-markets.js";
|
|
|
18
18
|
import { registerGetGame, registerListGames } from "./tools/games.js";
|
|
19
19
|
import { registerGetPickOfTheDay, registerGetPickOfTheDayArchive, registerGetPickOfTheDayLedgerEntry, } from "./tools/pick-of-the-day.js";
|
|
20
20
|
import { registerBatchGetMarketFlow, registerBatchGetMarketIntel, registerBatchGetTraders, registerGetDailyReportSnapshot, registerGetEventReplaySince, registerGetInsiderRadarFlag, registerGetMarketSnapshot, registerGetEdgeHunter, registerGetMonthlyReportSnapshot, registerGetCoverage, registerGetPlatforms, registerGetPositionTimelineById, registerGetSharpMoneyFlows, registerGetReport, registerSearchContent, registerGetSmartMoneyFlows, registerGetTraderExportSnapshot, registerGetWebhook, registerGetWeeklyReportSnapshot, registerGetLargeTrade, registerGetLargeTradesHistory, registerGetWhaleTrade, registerGetWhaleTradesHistory, registerListWebhooks, } from "./tools/read-parity.js";
|
|
21
|
+
import { registerGetTraderCategories, registerGetTraderContext, registerGetTraderGradeAt, } from "./tools/trader-reads.js";
|
|
22
|
+
import { registerGetMarketCandles, registerGetMarketHolders } from "./tools/market-reads.js";
|
|
23
|
+
import { registerGetCombo, registerGetComboFills, registerGetCombosSummary } from "./tools/combos.js";
|
|
24
|
+
import { registerGetLargeTradeCounterpartyExecutions, registerGetLargeTradeCounterpartyMakers, } from "./tools/large-trade-counterparties.js";
|
|
21
25
|
import { registerResources } from "./resources/index.js";
|
|
22
26
|
import { registerPrompts } from "./prompts/index.js";
|
|
23
27
|
import { API_KEY_ENV_VAR, API_URL_ENV_VAR, DEVELOPERS_URL, SERVER_NAME, SITE_URL, VERSION, } from "./constants.js";
|
|
@@ -70,6 +74,16 @@ const TOOL_REGISTRATIONS = {
|
|
|
70
74
|
get_pick_of_the_day: registerGetPickOfTheDay,
|
|
71
75
|
get_pick_of_the_day_archive: registerGetPickOfTheDayArchive,
|
|
72
76
|
get_pick_of_the_day_ledger_entry: registerGetPickOfTheDayLedgerEntry,
|
|
77
|
+
get_trader_context: registerGetTraderContext,
|
|
78
|
+
get_trader_categories: registerGetTraderCategories,
|
|
79
|
+
get_trader_grade_at: registerGetTraderGradeAt,
|
|
80
|
+
get_market_holders: registerGetMarketHolders,
|
|
81
|
+
get_market_candles: registerGetMarketCandles,
|
|
82
|
+
get_combo_fills: registerGetComboFills,
|
|
83
|
+
get_combos_summary: registerGetCombosSummary,
|
|
84
|
+
get_combo: registerGetCombo,
|
|
85
|
+
get_large_trade_counterparty_executions: registerGetLargeTradeCounterpartyExecutions,
|
|
86
|
+
get_large_trade_counterparty_makers: registerGetLargeTradeCounterpartyMakers,
|
|
73
87
|
};
|
|
74
88
|
function registerCatalogTools(server, client) {
|
|
75
89
|
for (const tool of MCP_TOOL_CATALOG) {
|
|
@@ -96,26 +110,37 @@ async function fetchInstructions() {
|
|
|
96
110
|
return undefined;
|
|
97
111
|
}
|
|
98
112
|
}
|
|
99
|
-
|
|
113
|
+
async function prepareServer(apiKey, baseUrl) {
|
|
100
114
|
// Throws before any request when the base is not https (loopback excepted),
|
|
101
115
|
// so the key never leaves the process toward an untrusted origin (#11115).
|
|
102
116
|
const client = new ApiClient(apiKey, baseUrl);
|
|
103
117
|
console.error(`${SERVER_NAME}: API base ${client.origin}`);
|
|
104
|
-
|
|
118
|
+
return { client, instructions: await fetchInstructions() };
|
|
119
|
+
}
|
|
120
|
+
function buildServer({ client, instructions }) {
|
|
105
121
|
const server = new McpServer({ name: SERVER_NAME, version: VERSION }, instructions === undefined ? {} : { instructions });
|
|
106
122
|
registerCatalogTools(server, client);
|
|
107
123
|
registerResources(server, client);
|
|
108
124
|
registerPrompts(server);
|
|
109
125
|
return server;
|
|
110
126
|
}
|
|
127
|
+
export async function createServer(apiKey, baseUrl) {
|
|
128
|
+
return buildServer(await prepareServer(apiKey, baseUrl));
|
|
129
|
+
}
|
|
111
130
|
export async function runServer() {
|
|
112
131
|
const apiKey = process.env[API_KEY_ENV_VAR];
|
|
113
132
|
if (!apiKey) {
|
|
114
133
|
throw new Error(`${API_KEY_ENV_VAR} environment variable is required. Get your API key at ${DEVELOPERS_URL}`);
|
|
115
134
|
}
|
|
116
|
-
|
|
117
|
-
const
|
|
118
|
-
|
|
135
|
+
// A bad base or a missing key still fails here, before stdio opens.
|
|
136
|
+
const setup = await prepareServer(apiKey, process.env[API_URL_ENV_VAR]);
|
|
137
|
+
// serveStdio owns the stdio transport and the protocol era (#24727): an
|
|
138
|
+
// `initialize` at any revision from 2024-10-07 to 2025-11-25 is served as
|
|
139
|
+
// before, and a 2026-07-28 opening gets the modern revision, each from one
|
|
140
|
+
// instance this factory builds.
|
|
141
|
+
serveStdio(() => buildServer(setup), {
|
|
142
|
+
onerror: (error) => console.error(`${SERVER_NAME}: stdio error:`, error),
|
|
143
|
+
});
|
|
119
144
|
console.error(`${SERVER_NAME} MCP server running via stdio`);
|
|
120
145
|
}
|
|
121
146
|
//# sourceMappingURL=server.js.map
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM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C,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,CACnD,CAAC;IAEF,oBAAoB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,eAAe,CAAC,MAAM,CAAC,CAAC;IAExB,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,MAAc,EAAE,OAAgB;IACjE,OAAO,WAAW,CAAC,MAAM,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAC3D,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,SAAS;IAC7B,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IAC5C,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CACb,GAAG,eAAe,0DAA0D,cAAc,EAAE,CAC7F,CAAC;IACJ,CAAC;IAED,oEAAoE;IACpE,MAAM,KAAK,GAAG,MAAM,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC;IACxE,wEAAwE;IACxE,0EAA0E;IAC1E,2EAA2E;IAC3E,gCAAgC;IAChC,UAAU,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE;QACnC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,WAAW,gBAAgB,EAAE,KAAK,CAAC;KACzE,CAAC,CAAC;IACH,OAAO,CAAC,KAAK,CAAC,GAAG,WAAW,+BAA+B,CAAC,CAAC;AAC/D,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/server";
|
|
2
|
+
import { ApiClient } from "../client.js";
|
|
3
|
+
export declare function registerGetComboFills(server: McpServer, client: ApiClient): void;
|
|
4
|
+
export declare function registerGetCombosSummary(server: McpServer, client: ApiClient): void;
|
|
5
|
+
export declare function registerGetCombo(server: McpServer, client: ApiClient): void;
|
|
6
|
+
//# sourceMappingURL=combos.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combos.d.ts","sourceRoot":"","sources":["../../src/tools/combos.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAEzD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAUzC,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CA8EhF;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CAoBnF;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CA4B3E"}
|