@0xinsider/mcp 3.4.0 → 3.5.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 +26 -5
- package/dist/catalog.generated.d.ts +40 -1
- package/dist/catalog.generated.d.ts.map +1 -1
- package/dist/catalog.generated.js +50 -1
- package/dist/catalog.generated.js.map +1 -1
- package/dist/cli-lib.d.ts +0 -1
- package/dist/cli-lib.d.ts.map +1 -1
- package/dist/cli-lib.js +0 -3
- package/dist/cli-lib.js.map +1 -1
- package/dist/client.d.ts +35 -12
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +37 -133
- package/dist/client.js.map +1 -1
- package/dist/constants.d.ts +1 -2
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +1 -2
- package/dist/constants.js.map +1 -1
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +2 -1
- package/dist/resources/index.js.map +1 -1
- package/dist/sdk/client.d.ts +7 -0
- package/dist/sdk/client.d.ts.map +1 -1
- package/dist/sdk/client.js +7 -1
- package/dist/sdk/client.js.map +1 -1
- package/dist/sdk/index.d.ts +5 -5
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +4 -3
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/retry.d.ts +19 -0
- package/dist/sdk/retry.d.ts.map +1 -1
- package/dist/sdk/retry.js +111 -0
- package/dist/sdk/retry.js.map +1 -1
- package/dist/sdk/schema.d.ts +299 -40
- package/dist/sdk/schema.d.ts.map +1 -1
- package/dist/sdk/webhooks.d.ts +93 -174
- package/dist/sdk/webhooks.d.ts.map +1 -1
- package/dist/sdk/webhooks.js +22 -6
- package/dist/sdk/webhooks.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +14 -0
- 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/get-trader.d.ts.map +1 -1
- package/dist/tools/get-trader.js +7 -2
- package/dist/tools/get-trader.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.js +1 -1
- package/dist/tools/read-parity.d.ts.map +1 -1
- package/dist/tools/read-parity.js +8 -4
- package/dist/tools/read-parity.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 +1 -1
package/dist/sdk/webhooks.d.ts
CHANGED
|
@@ -41,6 +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 { LargeTradesInsertedData, SharpMoneyFlowDetectedData, SuspiciousTradeFlaggedData, TraderSyncedData, WebhookEventData, WebhookEventType as ContractWebhookEventType } from "./schema.js";
|
|
44
45
|
/** Default replay tolerance; the published contract is 300 seconds. */
|
|
45
46
|
export declare const SIGNATURE_TOLERANCE_SECONDS = 300;
|
|
46
47
|
/** Header carrying the `v1=<hex>` signature. */
|
|
@@ -88,12 +89,14 @@ export declare function computeSignature(secret: string, timestamp: number | str
|
|
|
88
89
|
*/
|
|
89
90
|
export declare function verifySignature(input: VerifySignatureInput): boolean;
|
|
90
91
|
/**
|
|
91
|
-
* Webhook event types. Source of truth:
|
|
92
|
-
* `web/public/api/v1/openapi.json` -> components.schemas.WebhookEventType.enum
|
|
93
|
-
* `
|
|
94
|
-
* `
|
|
95
|
-
* `
|
|
96
|
-
*
|
|
92
|
+
* Webhook event types, as a runtime list. Source of truth:
|
|
93
|
+
* `web/public/api/v1/openapi.json` -> components.schemas.WebhookEventType.enum,
|
|
94
|
+
* which `schema.ts` carries as the generated `WebhookEventType` union.
|
|
95
|
+
* `large_trade_inserted_v2`, `large_trades_inserted`, `whale_trades_inserted`,
|
|
96
|
+
* `wallet_grade_changed`, `suspicious_trade_flagged`,
|
|
97
|
+
* `insider_radar_flag_raised`, `sharp_money_flow_detected`, and
|
|
98
|
+
* `smart_money_flow_detected` are Pro and Max: they deliver only to API keys
|
|
99
|
+
* on an active Pro or Max subscription.
|
|
97
100
|
*
|
|
98
101
|
* Some entries are two spellings of ONE event, not two events: either one
|
|
99
102
|
* subscribes, and an endpoint receives its deliveries under the spelling it
|
|
@@ -103,182 +106,98 @@ export declare function verifySignature(input: VerifySignatureInput): boolean;
|
|
|
103
106
|
* `insider_radar_flag_raised` (#16301), and `sharp_money_flow_detected` over
|
|
104
107
|
* `smart_money_flow_detected` (#16308). No deprecated spelling is ever
|
|
105
108
|
* removed.
|
|
109
|
+
*
|
|
110
|
+
* This list, the generated union and the typed envelopes in `WebhookEvent`
|
|
111
|
+
* are one set, and the compiler holds them equal (#24603). Each is checked as
|
|
112
|
+
* a subset of the next: `satisfies` below refuses a name with no typed
|
|
113
|
+
* envelope, the `WebhookEventEnvelope` constraint refuses an envelope for a
|
|
114
|
+
* name the contract does not have, and `WebhookEventType` refuses a contract
|
|
115
|
+
* name this list lacks. A new event type therefore fails the SDK build until
|
|
116
|
+
* it is listed here and typed below. Before that check, the list missed
|
|
117
|
+
* `large_trade_inserted_v2` for three weeks after the API began offering it.
|
|
118
|
+
*
|
|
119
|
+
* A new name goes at the end, so the index of every earlier name is unchanged.
|
|
120
|
+
*/
|
|
121
|
+
export declare const WEBHOOK_EVENT_TYPES: readonly ["large_trades_inserted", "whale_trades_inserted", "live_sports_updated", "trader_synced", "whale_trader_synced", "large_positions_updated", "wallet_grade_changed", "suspicious_trade_flagged", "insider_radar_flag_raised", "sharp_money_flow_detected", "smart_money_flow_detected", "export_job_ready", "export_job_failed", "export_job_expired", "export_job_cancelled", "large_trade_inserted_v2"];
|
|
122
|
+
/**
|
|
123
|
+
* `T`, unchanged, when `Missing` is `never`. Any other `Missing` fails its
|
|
124
|
+
* constraint, so the compile error names what is missing.
|
|
125
|
+
*/
|
|
126
|
+
type Complete<T, Missing extends never> = T | Missing;
|
|
127
|
+
/**
|
|
128
|
+
* Every webhook event type: the generated contract union. It compiles only
|
|
129
|
+
* while `WEBHOOK_EVENT_TYPES` lists every name in the contract, and the error
|
|
130
|
+
* names the one the list lacks.
|
|
106
131
|
*/
|
|
107
|
-
export
|
|
108
|
-
export type WebhookEventType = (typeof WEBHOOK_EVENT_TYPES)[number];
|
|
132
|
+
export type WebhookEventType = Complete<ContractWebhookEventType, Exclude<ContractWebhookEventType, (typeof WEBHOOK_EVENT_TYPES)[number]>>;
|
|
109
133
|
/**
|
|
110
134
|
* Common delivery envelope every webhook POST body carries. Source of truth:
|
|
111
|
-
*
|
|
112
|
-
*
|
|
135
|
+
* `WebhookEnvelope` in `backend/crates/core/src/webhook_payloads.rs`, which
|
|
136
|
+
* every entry of the OpenAPI document's `webhooks` map describes.
|
|
113
137
|
*/
|
|
114
138
|
export interface WebhookEventEnvelope<TType extends WebhookEventType = WebhookEventType, TData = unknown> {
|
|
115
139
|
/** Stable event id; identical across retries of the same logical event. */
|
|
116
140
|
id: string;
|
|
117
141
|
type: TType;
|
|
118
|
-
/** ISO-8601 timestamp of when the event was enqueued. */
|
|
119
|
-
created_at: string;
|
|
120
|
-
data: TData;
|
|
121
|
-
}
|
|
122
|
-
/** `whale_trades_inserted` data (Pro and Max): a batch of new whale trades was ingested. */
|
|
123
|
-
export interface WhaleTradesInsertedData {
|
|
124
|
-
count: number;
|
|
125
|
-
}
|
|
126
|
-
/** One side's score line inside a `live_sports_updated` pulse. */
|
|
127
|
-
export interface LiveSportsScoreEntry {
|
|
128
|
-
team: string;
|
|
129
|
-
score: string;
|
|
130
|
-
/** Esports series only: this side's current-map score. Absent on other sports. */
|
|
131
|
-
map_score?: string;
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* `live_sports_updated` data: one bounded pulse for one live game.
|
|
135
|
-
*
|
|
136
|
-
* A pulse fires when a material field moved since this game's previous
|
|
137
|
-
* delivered pulse (`scores`, `status`, `period`, `live`, `ended`), at most once
|
|
138
|
-
* per game per 20 seconds. A `live` or `ended` transition is exempt from that
|
|
139
|
-
* interval, so a game going live or final is never coalesced away; the game
|
|
140
|
-
* clock alone never fires a pulse. Suppressed frames are folded into the next
|
|
141
|
-
* pulse's `changed` and its body carries the current state, so you see every
|
|
142
|
-
* field that moved but not every intermediate value.
|
|
143
|
-
*/
|
|
144
|
-
export interface LiveSportsUpdatedData {
|
|
145
|
-
/** The Polymarket event slug this game trades under. */
|
|
146
|
-
event_slug: string;
|
|
147
|
-
/** Provider game id, or `null` when the frame carried none. */
|
|
148
|
-
game_id: string | null;
|
|
149
|
-
/** League abbreviation, or `null`. */
|
|
150
|
-
league: string | null;
|
|
151
142
|
/**
|
|
152
|
-
*
|
|
153
|
-
*
|
|
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.
|
|
154
146
|
*/
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
changed: Array<"scores" | "status" | "period" | "live" | "ended">;
|
|
158
|
-
/** Provider frame time (ISO 8601), or `null` when the frame carried none. */
|
|
159
|
-
observed_at: string | null;
|
|
160
|
-
/** When the pulse was admitted (ISO 8601). */
|
|
161
|
-
published_at: string;
|
|
162
|
-
status: string | null;
|
|
163
|
-
period: string | null;
|
|
164
|
-
/** Game clock. Not a material field: it never fires a pulse on its own. */
|
|
165
|
-
clock: string | null;
|
|
166
|
-
live: boolean | null;
|
|
167
|
-
ended: boolean;
|
|
168
|
-
scores: LiveSportsScoreEntry[];
|
|
169
|
-
/** Esports `BoN` series token, or `null` on every other sport. */
|
|
170
|
-
series_format: string | null;
|
|
171
|
-
/** Public game page; re-read it after a gap instead of replaying pulses. */
|
|
172
|
-
snapshot_url: string;
|
|
173
|
-
}
|
|
174
|
-
/** `whale_trader_synced` data: a tracked trader finished a sync pass. */
|
|
175
|
-
export interface WhaleTraderSyncedData {
|
|
176
|
-
trader_id: number;
|
|
177
|
-
wallet: string;
|
|
178
|
-
}
|
|
179
|
-
/** `large_positions_updated` data. */
|
|
180
|
-
export interface LargePositionsUpdatedData {
|
|
181
|
-
count: number;
|
|
147
|
+
created_at: string;
|
|
148
|
+
data: TData;
|
|
182
149
|
}
|
|
150
|
+
export type { ExportJobCancelledData, ExportJobExpiredData, ExportJobFailedData, ExportJobReadyData, LargePositionsUpdatedData, LargeTradeInsertedV2Data, LargeTradesInsertedData, LiveSportsScoreEntry, LiveSportsUpdatedData, SharpMoneyFlowDetectedData, SuspiciousTradeFlaggedData, TraderSyncedData, WalletGradeChangedData, } from "./schema.js";
|
|
183
151
|
/**
|
|
184
|
-
*
|
|
185
|
-
*
|
|
152
|
+
* @deprecated Use `LargeTradesInsertedData`; renamed in #16304. The two event
|
|
153
|
+
* spellings are one event with one payload, so this is an alias.
|
|
186
154
|
*/
|
|
187
|
-
export
|
|
188
|
-
wallet: string;
|
|
189
|
-
trader_id: number;
|
|
190
|
-
old_grade: string;
|
|
191
|
-
new_grade: string;
|
|
192
|
-
/** Direction of the grade move, e.g. "up" / "down". */
|
|
193
|
-
direction: string;
|
|
194
|
-
skill_index: number;
|
|
195
|
-
final_score: number;
|
|
196
|
-
date: string;
|
|
197
|
-
}
|
|
155
|
+
export type WhaleTradesInsertedData = LargeTradesInsertedData;
|
|
198
156
|
/**
|
|
199
|
-
*
|
|
200
|
-
*
|
|
201
|
-
*
|
|
202
|
-
* Delivered identically under the deprecated spelling
|
|
203
|
-
* `insider_radar_flag_raised` (#16301) to an endpoint that registered that
|
|
204
|
-
* spelling; the payload is the same.
|
|
157
|
+
* @deprecated Use `TraderSyncedData`; renamed in #16304. The two event
|
|
158
|
+
* spellings are one event with one payload, so this is an alias.
|
|
205
159
|
*/
|
|
206
|
-
export
|
|
207
|
-
trade_id: string;
|
|
208
|
-
wallet: string;
|
|
209
|
-
trader_id: number;
|
|
210
|
-
condition_id: string;
|
|
211
|
-
suspicion_score: number;
|
|
212
|
-
track: string;
|
|
213
|
-
/** Outcome side the flagged fill took. */
|
|
214
|
-
side: string;
|
|
215
|
-
size: number;
|
|
216
|
-
price: number;
|
|
217
|
-
}
|
|
160
|
+
export type WhaleTraderSyncedData = TraderSyncedData;
|
|
218
161
|
/**
|
|
219
162
|
* @deprecated Use `SuspiciousTradeFlaggedData`; renamed in #16301. The two
|
|
220
163
|
* event spellings are one event with one payload, so this is an alias.
|
|
221
164
|
*/
|
|
222
165
|
export type InsiderRadarFlagRaisedData = SuspiciousTradeFlaggedData;
|
|
223
166
|
/**
|
|
224
|
-
* `
|
|
225
|
-
*
|
|
226
|
-
*
|
|
227
|
-
* One payload for both spellings of the event: the deprecated
|
|
228
|
-
* `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.
|
|
229
169
|
*/
|
|
230
|
-
export
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
}
|
|
262
|
-
/** `export_job_expired` data: the owner's ready export passed retention. */
|
|
263
|
-
export interface ExportJobExpiredData {
|
|
264
|
-
job_id: number;
|
|
265
|
-
status: "expired";
|
|
266
|
-
format: string;
|
|
267
|
-
next_action: "resubmit";
|
|
268
|
-
}
|
|
269
|
-
/** `export_job_cancelled` data: the owner's export stopped because its owner cancelled it. */
|
|
270
|
-
export interface ExportJobCancelledData {
|
|
271
|
-
job_id: number;
|
|
272
|
-
status: "cancelled";
|
|
273
|
-
format: string;
|
|
274
|
-
next_action: "resubmit";
|
|
275
|
-
}
|
|
276
|
-
export type WhaleTradesInsertedEvent = WebhookEventEnvelope<"whale_trades_inserted", WhaleTradesInsertedData>;
|
|
277
|
-
export type LiveSportsUpdatedEvent = WebhookEventEnvelope<"live_sports_updated", LiveSportsUpdatedData>;
|
|
278
|
-
export type WhaleTraderSyncedEvent = WebhookEventEnvelope<"whale_trader_synced", WhaleTraderSyncedData>;
|
|
279
|
-
export type LargePositionsUpdatedEvent = WebhookEventEnvelope<"large_positions_updated", LargePositionsUpdatedData>;
|
|
280
|
-
export type WalletGradeChangedEvent = WebhookEventEnvelope<"wallet_grade_changed", WalletGradeChangedData>;
|
|
281
|
-
export type SuspiciousTradeFlaggedEvent = WebhookEventEnvelope<"suspicious_trade_flagged", SuspiciousTradeFlaggedData>;
|
|
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]>;
|
|
173
|
+
/**
|
|
174
|
+
* One large trade per delivery (Pro and Max, #16149). The envelope `id` equals
|
|
175
|
+
* `data.event_id`, and `created_at` is the trade's fill time
|
|
176
|
+
* (`data.traded_at`), not the time the delivery was queued.
|
|
177
|
+
*/
|
|
178
|
+
export type LargeTradeInsertedV2Event = EventFor<"large_trade_inserted_v2">;
|
|
179
|
+
export type LargeTradesInsertedEvent = EventFor<"large_trades_inserted">;
|
|
180
|
+
/**
|
|
181
|
+
* @deprecated Use `LargeTradesInsertedEvent`; renamed in #16304. This stays a
|
|
182
|
+
* distinct envelope rather than an alias of it because the delivered `type`
|
|
183
|
+
* discriminant is the spelling the endpoint registered: an endpoint subscribed
|
|
184
|
+
* to `whale_trades_inserted` keeps receiving that literal, so narrowing on it
|
|
185
|
+
* keeps working.
|
|
186
|
+
*/
|
|
187
|
+
export type WhaleTradesInsertedEvent = EventFor<"whale_trades_inserted">;
|
|
188
|
+
export type LiveSportsUpdatedEvent = EventFor<"live_sports_updated">;
|
|
189
|
+
export type TraderSyncedEvent = EventFor<"trader_synced">;
|
|
190
|
+
/**
|
|
191
|
+
* @deprecated Use `TraderSyncedEvent`; renamed in #16304. This stays a
|
|
192
|
+
* distinct envelope rather than an alias of it because the delivered `type`
|
|
193
|
+
* discriminant is the spelling the endpoint registered: an endpoint subscribed
|
|
194
|
+
* to `whale_trader_synced` keeps receiving that literal, so narrowing on it
|
|
195
|
+
* keeps working.
|
|
196
|
+
*/
|
|
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">;
|
|
282
201
|
/**
|
|
283
202
|
* @deprecated Use `SuspiciousTradeFlaggedEvent`; renamed in #16301. This stays
|
|
284
203
|
* a distinct envelope rather than an alias of it because the delivered `type`
|
|
@@ -286,13 +205,8 @@ export type SuspiciousTradeFlaggedEvent = WebhookEventEnvelope<"suspicious_trade
|
|
|
286
205
|
* to `insider_radar_flag_raised` keeps receiving that literal, so narrowing on
|
|
287
206
|
* it keeps working.
|
|
288
207
|
*/
|
|
289
|
-
export type InsiderRadarFlagRaisedEvent =
|
|
290
|
-
|
|
291
|
-
* @deprecated Use `SharpMoneyFlowDetectedData`; renamed in #16308. The two
|
|
292
|
-
* event spellings are one event with one payload, so this is an alias.
|
|
293
|
-
*/
|
|
294
|
-
export type SmartMoneyFlowDetectedData = SharpMoneyFlowDetectedData;
|
|
295
|
-
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">;
|
|
296
210
|
/**
|
|
297
211
|
* @deprecated Use `SharpMoneyFlowDetectedEvent`; renamed in #16308. This stays
|
|
298
212
|
* a distinct envelope rather than an alias of it because the delivered `type`
|
|
@@ -300,20 +214,25 @@ export type SharpMoneyFlowDetectedEvent = WebhookEventEnvelope<"sharp_money_flow
|
|
|
300
214
|
* to `smart_money_flow_detected` keeps receiving that literal, so narrowing on
|
|
301
215
|
* it keeps working.
|
|
302
216
|
*/
|
|
303
|
-
export type SmartMoneyFlowDetectedEvent =
|
|
304
|
-
export type ExportJobReadyEvent =
|
|
305
|
-
export type ExportJobFailedEvent =
|
|
306
|
-
export type ExportJobExpiredEvent =
|
|
307
|
-
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">;
|
|
308
222
|
/**
|
|
309
223
|
* Discriminated union over every typed webhook delivery payload.
|
|
310
224
|
*
|
|
311
225
|
* `SuspiciousTradeFlaggedEvent` and `InsiderRadarFlagRaisedEvent` are both
|
|
312
226
|
* members because the same event is delivered under whichever spelling the
|
|
313
227
|
* endpoint registered (#16301); the `data` shape is identical. So are
|
|
314
|
-
* `SharpMoneyFlowDetectedEvent` and `SmartMoneyFlowDetectedEvent` (#16308)
|
|
228
|
+
* `SharpMoneyFlowDetectedEvent` and `SmartMoneyFlowDetectedEvent` (#16308),
|
|
229
|
+
* `LargeTradesInsertedEvent` and `WhaleTradesInsertedEvent`, and
|
|
230
|
+
* `TraderSyncedEvent` and `WhaleTraderSyncedEvent` (#16304).
|
|
231
|
+
*
|
|
232
|
+
* One member for every name in `WEBHOOK_EVENT_TYPES`; the `satisfies` on that
|
|
233
|
+
* list fails to compile when a name has none.
|
|
315
234
|
*/
|
|
316
|
-
export type WebhookEvent = WhaleTradesInsertedEvent | LiveSportsUpdatedEvent | WhaleTraderSyncedEvent | LargePositionsUpdatedEvent | WalletGradeChangedEvent | SuspiciousTradeFlaggedEvent | InsiderRadarFlagRaisedEvent | SharpMoneyFlowDetectedEvent | SmartMoneyFlowDetectedEvent | ExportJobReadyEvent | ExportJobFailedEvent | ExportJobExpiredEvent | ExportJobCancelledEvent;
|
|
235
|
+
export type WebhookEvent = LargeTradeInsertedV2Event | LargeTradesInsertedEvent | WhaleTradesInsertedEvent | LiveSportsUpdatedEvent | TraderSyncedEvent | WhaleTraderSyncedEvent | LargePositionsUpdatedEvent | WalletGradeChangedEvent | SuspiciousTradeFlaggedEvent | InsiderRadarFlagRaisedEvent | SharpMoneyFlowDetectedEvent | SmartMoneyFlowDetectedEvent | ExportJobReadyEvent | ExportJobFailedEvent | ExportJobExpiredEvent | ExportJobCancelledEvent;
|
|
317
236
|
/**
|
|
318
237
|
* Parse a verified raw body into the typed delivery envelope. Call only AFTER
|
|
319
238
|
* `verifySignature` passes (parsing first would let an unverified payload in).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../../../sdk/src/webhooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAIH,uE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AA2B,GAAG,QAAQ,CAAC,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,2BAA2B,GAAG,QAAQ,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
CHANGED
|
@@ -114,12 +114,14 @@ function constantTimeEqual(candidate, expected) {
|
|
|
114
114
|
}
|
|
115
115
|
// --- Typed webhook payloads ---
|
|
116
116
|
/**
|
|
117
|
-
* Webhook event types. Source of truth:
|
|
118
|
-
* `web/public/api/v1/openapi.json` -> components.schemas.WebhookEventType.enum
|
|
119
|
-
* `
|
|
120
|
-
* `
|
|
121
|
-
* `
|
|
122
|
-
*
|
|
117
|
+
* Webhook event types, as a runtime list. Source of truth:
|
|
118
|
+
* `web/public/api/v1/openapi.json` -> components.schemas.WebhookEventType.enum,
|
|
119
|
+
* which `schema.ts` carries as the generated `WebhookEventType` union.
|
|
120
|
+
* `large_trade_inserted_v2`, `large_trades_inserted`, `whale_trades_inserted`,
|
|
121
|
+
* `wallet_grade_changed`, `suspicious_trade_flagged`,
|
|
122
|
+
* `insider_radar_flag_raised`, `sharp_money_flow_detected`, and
|
|
123
|
+
* `smart_money_flow_detected` are Pro and Max: they deliver only to API keys
|
|
124
|
+
* on an active Pro or Max subscription.
|
|
123
125
|
*
|
|
124
126
|
* Some entries are two spellings of ONE event, not two events: either one
|
|
125
127
|
* subscribes, and an endpoint receives its deliveries under the spelling it
|
|
@@ -129,6 +131,17 @@ function constantTimeEqual(candidate, expected) {
|
|
|
129
131
|
* `insider_radar_flag_raised` (#16301), and `sharp_money_flow_detected` over
|
|
130
132
|
* `smart_money_flow_detected` (#16308). No deprecated spelling is ever
|
|
131
133
|
* removed.
|
|
134
|
+
*
|
|
135
|
+
* This list, the generated union and the typed envelopes in `WebhookEvent`
|
|
136
|
+
* are one set, and the compiler holds them equal (#24603). Each is checked as
|
|
137
|
+
* a subset of the next: `satisfies` below refuses a name with no typed
|
|
138
|
+
* envelope, the `WebhookEventEnvelope` constraint refuses an envelope for a
|
|
139
|
+
* name the contract does not have, and `WebhookEventType` refuses a contract
|
|
140
|
+
* name this list lacks. A new event type therefore fails the SDK build until
|
|
141
|
+
* it is listed here and typed below. Before that check, the list missed
|
|
142
|
+
* `large_trade_inserted_v2` for three weeks after the API began offering it.
|
|
143
|
+
*
|
|
144
|
+
* A new name goes at the end, so the index of every earlier name is unchanged.
|
|
132
145
|
*/
|
|
133
146
|
export const WEBHOOK_EVENT_TYPES = [
|
|
134
147
|
"large_trades_inserted",
|
|
@@ -150,6 +163,9 @@ export const WEBHOOK_EVENT_TYPES = [
|
|
|
150
163
|
"export_job_failed",
|
|
151
164
|
"export_job_expired",
|
|
152
165
|
"export_job_cancelled",
|
|
166
|
+
// Pro and Max. One large trade per delivery, with the trade in `data`
|
|
167
|
+
// (#16149); `large_trades_inserted` and its twin carry only a count.
|
|
168
|
+
"large_trade_inserted_v2",
|
|
153
169
|
];
|
|
154
170
|
/**
|
|
155
171
|
* Parse a verified raw body into the typed delivery envelope. Call only AFTER
|
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;AACvE,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,CAAC;AAE/C,gDAAgD;AAChD,MAAM,CAAC,MAAM,gBAAgB,GAAG,uBAAuB,CAAC;AACxD,0DAA0D;AAC1D,MAAM,CAAC,MAAM,gBAAgB,GAAG,uBAAuB,CAAC;AA2BxD;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAC9B,MAAc,EACd,SAA0B,EAC1B,IAAyB;IAEzB,MAAM,IAAI,GAAG,UAAU,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC1C,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;IAC/B,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACjB,IAAI,CAAC,MAAM,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAC1E,OAAO,MAAM,IAAI,CA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ANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAuKpE,wBAAsB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAiBvF;AAED,wBAAsB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAY/C"}
|
package/dist/server.js
CHANGED
|
@@ -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) {
|
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,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EACL,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1,6 @@
|
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
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,yCAAyC,CAAC;AAEpE,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"}
|