@0xinsider/mcp 2.10.0 → 2.11.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/sdk/client.d.ts +10 -5
- package/dist/sdk/client.d.ts.map +1 -1
- package/dist/sdk/client.js +9 -4
- package/dist/sdk/client.js.map +1 -1
- package/dist/sdk/schema.d.ts +87 -61
- package/dist/sdk/schema.d.ts.map +1 -1
- package/dist/tools/explore-markets.d.ts +2 -1
- package/dist/tools/explore-markets.d.ts.map +1 -1
- package/dist/tools/explore-markets.js +6 -6
- package/dist/tools/explore-markets.js.map +1 -1
- package/dist/tools/games.d.ts.map +1 -1
- package/dist/tools/games.js +8 -6
- package/dist/tools/games.js.map +1 -1
- package/dist/tools/get-large-positions.d.ts.map +1 -1
- package/dist/tools/get-large-positions.js +10 -8
- package/dist/tools/get-large-positions.js.map +1 -1
- package/dist/tools/get-market-flow.d.ts.map +1 -1
- package/dist/tools/get-market-flow.js +21 -12
- package/dist/tools/get-market-flow.js.map +1 -1
- package/dist/tools/get-position-timeline.js +4 -4
- 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 +6 -3
- package/dist/tools/get-positions.js.map +1 -1
- package/dist/tools/get-suspicious-trades.d.ts +8 -2
- package/dist/tools/get-suspicious-trades.d.ts.map +1 -1
- package/dist/tools/get-suspicious-trades.js +16 -3
- package/dist/tools/get-suspicious-trades.js.map +1 -1
- package/dist/tools/get-trader-pnl.d.ts.map +1 -1
- package/dist/tools/get-trader-pnl.js +6 -4
- package/dist/tools/get-trader-pnl.js.map +1 -1
- package/dist/tools/get-trader.js +2 -2
- package/dist/tools/get-trending-wallets.d.ts.map +1 -1
- package/dist/tools/get-trending-wallets.js +9 -7
- package/dist/tools/get-trending-wallets.js.map +1 -1
- package/dist/tools/get-whale-trades.d.ts.map +1 -1
- package/dist/tools/get-whale-trades.js +37 -18
- package/dist/tools/get-whale-trades.js.map +1 -1
- 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 +158 -84
- package/dist/tools/read-parity.js.map +1 -1
- package/dist/tools/search-markets.js +1 -1
- package/dist/tools/search-markets.js.map +1 -1
- package/package.json +1 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"games.d.ts","sourceRoot":"","sources":["../../src/tools/games.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAUzC,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"games.d.ts","sourceRoot":"","sources":["../../src/tools/games.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAUzC,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CAoE5E;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CA6B1E"}
|
package/dist/tools/games.js
CHANGED
|
@@ -16,7 +16,7 @@ const readAnnotations = {
|
|
|
16
16
|
export function registerListGames(server, client) {
|
|
17
17
|
server.registerTool("list_games", {
|
|
18
18
|
title: "List covered games",
|
|
19
|
-
description: `The fixture list: one coherent game per row, so
|
|
19
|
+
description: `The fixture list: one coherent game per row, so an agent never has to assemble a game from market searches and team-name matching. Each row carries both sides with their provider ids and live scores, the UTC kickoff, the provider's own status, the esports series format, and every linked Polymarket market with its condition_id and outcome token ids. Ordered by kickoff, then event_slug; games whose kickoff the provider has not published sort last.
|
|
20
20
|
|
|
21
21
|
Args:
|
|
22
22
|
- sport (string, optional): canonical bucket, case-insensitive, with - and _ read as a space (table-tennis and Table Tennis are one bucket). Omitted means every covered sport
|
|
@@ -29,9 +29,9 @@ Args:
|
|
|
29
29
|
Returns: data, has_more, next_cursor, as_of, coverage and meta. Read coverage before reading an empty page: it names the sports and leagues this deployment serves and any scope whose source was unavailable for this read, so an unserved sport is never confused with a quiet night. A sport or status this deployment does not serve returns an empty page, not an error. status.state keeps postponed, cancelled, suspended and delayed distinct from a plain 'not live', and a kickoff in the past is never read as live on its own. Scores are the provider's own strings, because a set score and a run total are not both integers. Carries no price, no sharp-money split and no holder identity; those stay on get_market_snapshot, get_sharp_money_flows and get_pre_game_sides.`,
|
|
30
30
|
inputSchema: {
|
|
31
31
|
sport: z.string().optional()
|
|
32
|
-
.describe("Canonical sport bucket, case-insensitive; omitted means every covered sport"),
|
|
32
|
+
.describe("Canonical sport bucket, case-insensitive, with - and _ read as a space; omitted means every covered sport. A bucket this deployment does not serve returns an empty page"),
|
|
33
33
|
league: z.string().optional()
|
|
34
|
-
.describe("League tag as coverage.leagues spells it: nfl, epl, cs2"),
|
|
34
|
+
.describe("League tag as coverage.leagues spells it: nfl, epl, cs2. Case-insensitive"),
|
|
35
35
|
status: z
|
|
36
36
|
.enum([
|
|
37
37
|
"scheduled",
|
|
@@ -49,11 +49,13 @@ Returns: data, has_more, next_cursor, as_of, coverage and meta. Read coverage be
|
|
|
49
49
|
starts_after: z.string().optional()
|
|
50
50
|
.describe("RFC 3339 instant; keep only games whose kickoff is at or after it"),
|
|
51
51
|
starts_before: z.string().optional()
|
|
52
|
-
.describe("RFC 3339 instant; keep only games whose kickoff is at or before it"),
|
|
52
|
+
.describe("RFC 3339 instant; keep only games whose kickoff is at or before it. Must be at or after starts_after"),
|
|
53
|
+
// `list_games_schema` in `backend/src/mcp/tools/schema.rs` describes
|
|
54
|
+
// `limit` too (#18083); the two sides must read the same.
|
|
53
55
|
limit: z.number().int().min(1).max(100).default(20)
|
|
54
56
|
.describe("Max results (1-100, default 20)"),
|
|
55
57
|
cursor: z.string().optional()
|
|
56
|
-
.describe("Opaque gms_v1_ cursor from next_cursor; it pins the page position, not a snapshot"),
|
|
58
|
+
.describe("Opaque gms_v1_ cursor from next_cursor; it pins the page position (kickoff and event_slug), not a snapshot"),
|
|
57
59
|
},
|
|
58
60
|
annotations: readAnnotations,
|
|
59
61
|
}, async (args) => {
|
|
@@ -87,7 +89,7 @@ Args:
|
|
|
87
89
|
Returns: the game object with the envelope's meta. status.state keeps postponed, cancelled, suspended and delayed distinct from a plain 'not live'. Each game's own coverage reports whether scores, competitor provider ids and the schedule were available: when competitors reads labels, do not join on names. A slug outside the published coverage answers 404, including a real Polymarket event in a sport this deployment does not serve; list_games names what is covered. Carries no price, no sharp-money split and no holder identity.`,
|
|
88
90
|
inputSchema: {
|
|
89
91
|
event_slug: z.string().trim().min(1)
|
|
90
|
-
.describe("The game's event slug, for example nfl-buf-nyj-2026-09-22"),
|
|
92
|
+
.describe("The game's event slug, for example nfl-buf-nyj-2026-09-22; matched case-insensitively"),
|
|
91
93
|
},
|
|
92
94
|
annotations: readAnnotations,
|
|
93
95
|
}, async ({ event_slug }) => {
|
package/dist/tools/games.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"games.js","sourceRoot":"","sources":["../../src/tools/games.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,0EAA0E;AAC1E,sEAAsE;AACtE,EAAE;AACF,0EAA0E;AAC1E,2EAA2E;AAC3E,sDAAsD;AAGtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,eAAe,GAAG;IACtB,YAAY,EAAE,IAAI;IAClB,eAAe,EAAE,KAAK;IACtB,cAAc,EAAE,IAAI;IACpB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AAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;IAC9C,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,CAS9C;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CA2CpF"}
|
|
@@ -4,15 +4,15 @@ export const largePositionsParamsSchema = {
|
|
|
4
4
|
limit: z.number().int().min(1).max(100).default(20)
|
|
5
5
|
.describe("Max results (1-100, default 20)"),
|
|
6
6
|
cursor: z.string().optional()
|
|
7
|
-
.describe("
|
|
7
|
+
.describe("Opaque pagination cursor from previous response"),
|
|
8
8
|
min_size: z.number().min(0).optional()
|
|
9
|
-
.describe("Minimum
|
|
9
|
+
.describe("Minimum position value in USD"),
|
|
10
10
|
category: z.string().optional()
|
|
11
11
|
.describe("Filter by provider-backed market category"),
|
|
12
12
|
min_grade: z.enum(["S", "A", "B", "C", "D", "F"]).optional()
|
|
13
13
|
.describe("Minimum trader grade"),
|
|
14
14
|
condition_id: z.string().optional()
|
|
15
|
-
.describe("Scope to one market
|
|
15
|
+
.describe("Scope to one market (raw provider condition_id or mkt_-prefixed). Polymarket-only; an unknown id returns an empty list."),
|
|
16
16
|
};
|
|
17
17
|
export function buildLargePositionsParams(args) {
|
|
18
18
|
return {
|
|
@@ -27,17 +27,19 @@ export function buildLargePositionsParams(args) {
|
|
|
27
27
|
export function registerGetLargePositions(server, client) {
|
|
28
28
|
server.registerTool("get_large_positions", {
|
|
29
29
|
title: "List Large Positions",
|
|
30
|
-
description: `List the largest current open positions from graded traders
|
|
30
|
+
description: `List the largest current open positions from graded traders (Polymarket-only). Each row carries position value, open (unrealized) P&L, share count, entry/current price, outcome label, and trader/market context. Cursor-paginated by position value descending.
|
|
31
|
+
|
|
32
|
+
Polymarket-only: the scanner filters platform = 'polymarket', so an unknown condition_id matches nothing and returns an empty list (never fabricated rows).
|
|
31
33
|
|
|
32
34
|
Args:
|
|
33
35
|
- limit (number, 1-100, default 20): Max results per page
|
|
34
|
-
- cursor (string, optional):
|
|
35
|
-
- min_size (number, optional): Minimum
|
|
36
|
+
- cursor (string, optional): Opaque pagination cursor from previous response
|
|
37
|
+
- min_size (number, optional): Minimum position value in USD
|
|
36
38
|
- category (string, optional): Filter by provider-backed market category
|
|
37
39
|
- min_grade (string, optional): Minimum trader grade (S, A, B, C, D, F)
|
|
38
|
-
- condition_id (string, optional): Scope to one market
|
|
40
|
+
- condition_id (string, optional): Scope to one market (raw provider id or mkt_-prefixed)
|
|
39
41
|
|
|
40
|
-
Returns: List of large positions with trader, market, value, P&L, and
|
|
42
|
+
Returns: List of large positions with trader, market, value, P&L, and pagination metadata.`,
|
|
41
43
|
inputSchema: largePositionsParamsSchema,
|
|
42
44
|
annotations: {
|
|
43
45
|
readOnlyHint: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-large-positions.js","sourceRoot":"","sources":["../../src/tools/get-large-positions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;SAChD,QAAQ,CAAC,iCAAiC,CAAC;IAC9C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;SAC1B,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"get-large-positions.js","sourceRoot":"","sources":["../../src/tools/get-large-positions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC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E,MAAiB;IAC5E,MAAM,CAAC,YAAY,CACjB,qBAAqB,EACrB;QACE,KAAK,EAAE,sBAAsB;QAC7B,WAAW,EAAE;;;;;;;;;;;;2FAYwE;QACrF,WAAW,EAAE,0BAA0B;QACvC,WAAW,EAAE;YACX,YAAY,EAAE,IAAI;YAClB,eAAe,EAAE,KAAK;YACtB,cAAc,EAAE,IAAI;YACpB,aAAa,EAAE,KAAK;SACrB;KACF,EACD,KAAK,EAAE,IAAI,EAAE,EAAE;QACb,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,OAAO,CACnC,yBAAyB,EACzB,yBAAyB,CAAC,IAAI,CAAC,CAChC,CAAC;YAEF,MAAM,MAAM,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;YAEpC,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;aAC5E,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-market-flow.d.ts","sourceRoot":"","sources":["../../src/tools/get-market-flow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"get-market-flow.d.ts","sourceRoot":"","sources":["../../src/tools/get-market-flow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AA+DzC,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CAOhF;AAED,uDAAuD;AACvD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CAOjF"}
|
|
@@ -3,15 +3,7 @@ import { fail, withMeta } from "./result.js";
|
|
|
3
3
|
function registerMarketFlow(server, client, tool) {
|
|
4
4
|
server.registerTool(tool.name, {
|
|
5
5
|
title: tool.title,
|
|
6
|
-
description:
|
|
7
|
-
|
|
8
|
-
Use search_markets first to find the condition_id for a market.
|
|
9
|
-
|
|
10
|
-
Args:
|
|
11
|
-
- condition_id (string, required): Market condition ID (from search_markets results)
|
|
12
|
-
- timeframe (string, optional): Lookback window: "1h", "4h", "24h", "7d" (default "24h")
|
|
13
|
-
|
|
14
|
-
Returns: Market info, the flow under sharp_money (net_flow_usd, direction YES/NO, large_trade_count, volumes) with smart_money as its deprecated byte-identical alias, and the top 5 graded trader positions.`,
|
|
6
|
+
description: tool.description,
|
|
15
7
|
inputSchema: {
|
|
16
8
|
condition_id: z.string()
|
|
17
9
|
.describe("Market condition ID"),
|
|
@@ -36,13 +28,30 @@ Returns: Market info, the flow under sharp_money (net_flow_usd, direction YES/NO
|
|
|
36
28
|
}
|
|
37
29
|
});
|
|
38
30
|
}
|
|
39
|
-
const
|
|
31
|
+
const MARKET_FLOW_DESCRIPTION = `One market's flow and top positions: the signed flow of every tracked large trade in the window (net_flow_usd and its direction, YES or NO), the large-trade count, gross buy and sell volumes, and the top five graded trader positions. The envelope object is market_flow.
|
|
32
|
+
|
|
33
|
+
Use search_markets first to find the condition_id for a market.
|
|
34
|
+
|
|
35
|
+
Args:
|
|
36
|
+
- condition_id (string, required): Market condition ID (from search_markets results)
|
|
37
|
+
- timeframe (string, optional): Lookback window: "1h", "4h", "24h", "7d" (default "24h")
|
|
38
|
+
|
|
39
|
+
Returns: Market info, the flow under sharp_money (net_flow_usd, direction YES/NO, large_trade_count, volumes) with smart_money as its deprecated byte-identical alias, and the top 5 graded trader positions.`;
|
|
40
|
+
const MARKET_INTEL_DESCRIPTION = `Deprecated alias of get_market_flow (#16312), kept live; it calls the deprecated /api/v1/market/{condition_id}/intel path, whose envelope keeps object: market_intel. Sharp money flow analysis for a specific prediction market. Shows net flow direction, whale trade count, buy/sell volumes, and top graded trader positions.
|
|
41
|
+
|
|
42
|
+
Use search_markets first to find the condition_id for a market.
|
|
43
|
+
|
|
44
|
+
Args:
|
|
45
|
+
- condition_id (string, required): Market condition ID (from search_markets results)
|
|
46
|
+
- timeframe (string, optional): Lookback window: "1h", "4h", "24h", "7d" (default "24h")
|
|
47
|
+
|
|
48
|
+
Returns: Market info, sharp_money flow (net_flow_usd, direction YES/NO, volumes) with smart_money as its deprecated byte-identical alias, and top 5 trader positions.`;
|
|
40
49
|
export function registerGetMarketFlow(server, client) {
|
|
41
50
|
registerMarketFlow(server, client, {
|
|
42
51
|
name: "get_market_flow",
|
|
43
52
|
title: "Get market flow",
|
|
44
53
|
segment: "flow",
|
|
45
|
-
|
|
54
|
+
description: MARKET_FLOW_DESCRIPTION,
|
|
46
55
|
});
|
|
47
56
|
}
|
|
48
57
|
/** Deprecated spelling of get_market_flow (#16312). */
|
|
@@ -51,7 +60,7 @@ export function registerGetMarketIntel(server, client) {
|
|
|
51
60
|
name: "get_market_intel",
|
|
52
61
|
title: "Get Market Intelligence",
|
|
53
62
|
segment: "intel",
|
|
54
|
-
|
|
63
|
+
description: MARKET_INTEL_DESCRIPTION,
|
|
55
64
|
});
|
|
56
65
|
}
|
|
57
66
|
//# sourceMappingURL=get-market-flow.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-market-flow.js","sourceRoot":"","sources":["../../src/tools/get-market-flow.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE7C,SAAS,kBAAkB,CACzB,MA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AC;aAC5G,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC;AAED,MAAM,uBAAuB,GAAG;;;;;;;;8MAQ8K,CAAC;AAE/M,MAAM,wBAAwB,GAAG;;;;;;;;sKAQqI,CAAC;AAEvK,MAAM,UAAU,qBAAqB,CAAC,MAAiB,EAAE,MAAiB;IACxE,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE;QACjC,IAAI,EAAE,iBAAiB;QACvB,KAAK,EAAE,iBAAiB;QACxB,OAAO,EAAE,MAAM;QACf,WAAW,EAAE,uBAAuB;KACrC,CAAC,CAAC;AACL,CAAC;AAED,uDAAuD;AACvD,MAAM,UAAU,sBAAsB,CAAC,MAAiB,EAAE,MAAiB;IACzE,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE;QACjC,IAAI,EAAE,kBAAkB;QACxB,KAAK,EAAE,yBAAyB;QAChC,OAAO,EAAE,OAAO;QAChB,WAAW,EAAE,wBAAwB;KACtC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -4,7 +4,7 @@ export const positionTimelineParamsSchema = {
|
|
|
4
4
|
condition_id: z.string().trim().min(1)
|
|
5
5
|
.describe("Market condition ID"),
|
|
6
6
|
address: z.string().trim().min(1).max(100).optional()
|
|
7
|
-
.describe("Trader identity: 0x
|
|
7
|
+
.describe("Trader identity: 0x wallet, username, trd_-prefixed traders.id, or bare integer traders.id"),
|
|
8
8
|
trader_id: z.number().int().positive().optional()
|
|
9
9
|
.describe("Internal traders.id alias"),
|
|
10
10
|
limit: z.number().int().min(1).max(100).default(20)
|
|
@@ -38,12 +38,12 @@ export function buildPositionTimelineRequest(args) {
|
|
|
38
38
|
export function registerGetPositionTimeline(server, client) {
|
|
39
39
|
server.registerTool("get_position_timeline", {
|
|
40
40
|
title: "Get Position Timeline",
|
|
41
|
-
description: `Get stored Polymarket fills available for one tracked trader in one market, newest first, with server-computed running_amount and running_avg_price. Only HOT and WARM tier traders are tracked.
|
|
41
|
+
description: `Get stored Polymarket fills available for one tracked trader in one market, newest first, with server-computed running_amount and running_avg_price. The REST identity accepts a 0x wallet, username, trd_-prefixed trader id, or bare integer traders.id with precedence wallet, trd_, integer, then username. Only HOT and WARM tier traders are tracked.
|
|
42
42
|
|
|
43
43
|
Args:
|
|
44
44
|
- condition_id (string, required): Market condition ID
|
|
45
|
-
- address (string, optional):
|
|
46
|
-
- trader_id (number, optional):
|
|
45
|
+
- address (string, optional): Any supported REST trader identity, including a bare integer traders.id
|
|
46
|
+
- trader_id (number, optional): Convenience alias for a bare integer traders.id; provide exactly one of address or trader_id
|
|
47
47
|
- limit (number, 1-100, default 20): Max events per page
|
|
48
48
|
- cursor (string, optional): Pagination cursor from previous response
|
|
49
49
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-position-timeline.js","sourceRoot":"","sources":["../../src/tools/get-position-timeline.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAU/C,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;SACnC,QAAQ,CAAC,qBAAqB,CAAC;IAClC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;SAClD,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"get-position-timeline.js","sourceRoot":"","sources":["../../src/tools/get-position-timeline.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,I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,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-positions.d.ts","sourceRoot":"","sources":["../../src/tools/get-positions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,eAAO,MAAM,qBAAqB;IAChC,KAAK;IAEL,MAAM;IAON,QAAQ;IAER,QAAQ;IAER,YAAY;IAEZ,MAAM;IAEN,SAAS;;;;;;;;IAET,IAAI;;;;
|
|
1
|
+
{"version":3,"file":"get-positions.d.ts","sourceRoot":"","sources":["../../src/tools/get-positions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,eAAO,MAAM,qBAAqB;IAChC,KAAK;IAEL,MAAM;IAON,QAAQ;IAER,QAAQ;IAER,YAAY;IAEZ,MAAM;IAEN,SAAS;;;;;;;;IAET,IAAI;;;;IAKJ,WAAW;;;;CAEZ,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,IAAI,EAAE;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;IAC9C,IAAI,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;CACnC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,CAW9C;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CAiD/E"}
|
|
@@ -17,13 +17,16 @@ export const positionsParamsSchema = {
|
|
|
17
17
|
condition_id: z.string().optional()
|
|
18
18
|
.describe("Scope to one market: raw provider condition_id or mkt_-prefixed market id"),
|
|
19
19
|
wallet: z.array(z.string()).max(25).optional()
|
|
20
|
-
.describe("Scope to one wallet or a book of wallets (up to 25)
|
|
20
|
+
.describe("Scope to one wallet or a book of wallets (up to 25). Each value is a wallet address, a known username, or a trd_-prefixed trader id, resolved like get_trader"),
|
|
21
21
|
min_grade: z.enum(["S", "A", "B", "C", "D", "F"]).optional()
|
|
22
22
|
.describe("Minimum trader grade"),
|
|
23
23
|
side: z.enum(["yes", "no"]).optional()
|
|
24
24
|
.describe("Filter by binary outcome side"),
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
// The route's own default, advertised here so the stdio catalog matches
|
|
26
|
+
// the served one; a zod default fills the value in before the handler
|
|
27
|
+
// runs and buildPositionsParams forwards it unchanged.
|
|
28
|
+
consistency: z.enum(["live", "snapshot"]).default("live")
|
|
29
|
+
.describe("live (default) reads the current value-ordered board. snapshot requires wallet and freezes up to 500 matching rows and 2 MB for up to five minutes; repeat the same filters and consistency on every page. A new first page from the same API key replaces its prior snapshot; a changed filter returns an error, and an expired or replaced cursor returns cursor_expired"),
|
|
27
30
|
};
|
|
28
31
|
export function buildPositionsParams(args) {
|
|
29
32
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-positions.js","sourceRoot":"","sources":["../../src/tools/get-positions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,aAAa,CA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,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -10,12 +10,18 @@ export declare const suspiciousTradesInputSchema: {
|
|
|
10
10
|
flag: "flag";
|
|
11
11
|
watch: "watch";
|
|
12
12
|
}>>;
|
|
13
|
-
readonly mode: z.
|
|
13
|
+
readonly mode: z.ZodDefault<z.ZodEnum<{
|
|
14
14
|
live: "live";
|
|
15
15
|
stable: "stable";
|
|
16
16
|
}>>;
|
|
17
17
|
};
|
|
18
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* Shared by the canonical by-ID tool and its deprecated alias.
|
|
20
|
+
*
|
|
21
|
+
* The served side names the prefix too, from `get_suspicious_trade_id_schema`
|
|
22
|
+
* in `backend/src/mcp/tools/schema.rs` (#18083): a client that renders only the
|
|
23
|
+
* JSON Schema never reads the `Args:` block below.
|
|
24
|
+
*/
|
|
19
25
|
export declare const suspiciousTradeInputSchema: {
|
|
20
26
|
readonly id: z.ZodString;
|
|
21
27
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-suspicious-trades.d.ts","sourceRoot":"","sources":["../../src/tools/get-suspicious-trades.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAUzC,kEAAkE;AAClE,eAAO,MAAM,2BAA2B;aACtC,KAAK;aAEL,MAAM;
|
|
1
|
+
{"version":3,"file":"get-suspicious-trades.d.ts","sourceRoot":"","sources":["../../src/tools/get-suspicious-trades.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAUzC,kEAAkE;AAClE,eAAO,MAAM,2BAA2B;aACtC,KAAK;aAEL,MAAM;aASN,aAAa;aAEb,QAAQ;;;;aAER,IAAI;;;;CAEI,CAAC;AAEX;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B;aACrC,EAAE;CACM,CAAC;AAEX,eAAO,MAAM,6BAA6B,mhCAeoC,CAAC;AAE/E,eAAO,MAAM,4BAA4B,4RAK0C,CAAC;AAEpF,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CAwBtF;AAED,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CAoBrF"}
|
|
@@ -17,14 +17,27 @@ export const suspiciousTradesInputSchema = {
|
|
|
17
17
|
.describe("Max results (1-100, default 20)"),
|
|
18
18
|
cursor: z.string().optional()
|
|
19
19
|
.describe("Pagination cursor from previous response"),
|
|
20
|
+
// These two sentences are the SERVED contract: the same words sit on
|
|
21
|
+
// `get_insider_radar_schema` in `backend/src/mcp/tools/schema.rs` (#18083),
|
|
22
|
+
// and `scripts/check-mcp-stdio-contract-parity.mjs` compares them. They state
|
|
23
|
+
// behavior the bounds cannot: `effective_min_score` in
|
|
24
|
+
// `backend/crates/flagged-trades/src/read.rs` is `requested.max(60.0)`, and
|
|
25
|
+
// every score scan carries `($2::text IS NULL OR $2 = 'flag')`. Do not
|
|
26
|
+
// shorten either one on one side alone.
|
|
20
27
|
min_suspicion: z.number().min(0).max(100).default(0)
|
|
21
28
|
.describe("Minimum suspicion score (0-100); the live floor of 60 also applies"),
|
|
22
29
|
severity: z.enum(["flag", "watch"]).optional()
|
|
23
30
|
.describe('"flag" selects live rows; "watch" returns none because no live watch policy exists'),
|
|
24
|
-
mode: z.enum(["live", "stable"]).
|
|
25
|
-
.describe(
|
|
31
|
+
mode: z.enum(["live", "stable"]).default("live")
|
|
32
|
+
.describe("live uses the fresh response cache; stable pins pagination to one published scoring generation"),
|
|
26
33
|
};
|
|
27
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* Shared by the canonical by-ID tool and its deprecated alias.
|
|
36
|
+
*
|
|
37
|
+
* The served side names the prefix too, from `get_suspicious_trade_id_schema`
|
|
38
|
+
* in `backend/src/mcp/tools/schema.rs` (#18083): a client that renders only the
|
|
39
|
+
* JSON Schema never reads the `Args:` block below.
|
|
40
|
+
*/
|
|
28
41
|
export const suspiciousTradeInputSchema = {
|
|
29
42
|
id: z.string().trim().min(1).describe("Suspicious trade ID such as rf_123 or 123"),
|
|
30
43
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-suspicious-trades.js","sourceRoot":"","sources":["../../src/tools/get-suspicious-trades.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,8EAA8E;AAC9E,sEAAsE;AACtE,sEAAsE;AACtE,oEAAoE;AAGpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE7D,MAAM,eAAe,GAAG;IACtB,YAAY,EAAE,IAAI;IAClB,eAAe,EAAE,KAAK;IACtB,cAAc,EAAE,IAAI;IACpB,aAAa,EAAE,KAAK;CACZ,CAAC;AAEX,kEAAkE;AAClE,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;SAChD,QAAQ,CAAC,iCAAiC,CAAC;IAC9C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;SAC1B,QAAQ,CAAC,0CAA0C,CAAC;IACvD,aAAa,EAAE,CAAC,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AAC;AAEhG,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"get-trader-pnl.d.ts","sourceRoot":"","sources":["../../src/tools/get-trader-pnl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,eAAO,MAAM,qBAAqB,aAAoC,CAAC;AAEvE,iGAAiG;AACjG,eAAO,MAAM,YAAY,YAAI,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,CAAU,CAAC;AAEhG,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CA0D/E"}
|
|
@@ -6,17 +6,19 @@ export const PNL_SECTIONS = ["entries", "stats", "monthly", "year_totals", "draw
|
|
|
6
6
|
export function registerGetTraderPnl(server, client) {
|
|
7
7
|
server.registerTool("get_trader_pnl", {
|
|
8
8
|
title: "Get Trader P&L Time Series",
|
|
9
|
-
description: `Get a trader's daily P&L time series and pre-derived stats from the precomputed daily_pnl read model
|
|
9
|
+
description: `Get a trader's daily P&L time series and pre-derived stats from the precomputed daily_pnl read model. Returns entries (daily cumulative P&L), period stats (all/90d/30d/7d), monthly aggregation, per-year totals, and the drawdown series.
|
|
10
|
+
|
|
11
|
+
Reads the refreshed read model, not a per-request equity replay. A resolved trader with no daily P&L returns an empty structured object (HTTP 200); an unknown address returns not found.
|
|
10
12
|
|
|
11
13
|
Args:
|
|
12
|
-
- address (string, required):
|
|
14
|
+
- address (string, required): Wallet address (0x...), username, or trd_-prefixed trader id
|
|
13
15
|
- from / to (string, optional): Inclusive UTC calendar dates (YYYY-MM-DD) bounding the daily series (entries and drawdown); stats, monthly and year_totals stay defined over the full history
|
|
14
16
|
- sections (string[], optional): Which sections to return: "entries", "stats", "monthly", "year_totals", "drawdown"; omit for all five. A section left out is absent, and an unrecognized name is an error, never ignored
|
|
15
17
|
|
|
16
|
-
Returns:
|
|
18
|
+
Returns: Structured trader P&L object (entries, stats, monthly, year_totals, drawdown). A request that sent from, to or sections also carries view: the bounds applied, the sections present, entries_total, entries_in_window and the pre-window anchor.`,
|
|
17
19
|
inputSchema: {
|
|
18
20
|
address: traderPnlLookupSchema
|
|
19
|
-
.describe("
|
|
21
|
+
.describe("Wallet address (0x...), username, or trd_-prefixed trader id"),
|
|
20
22
|
// The three view parameters the route takes (#16158), missing from
|
|
21
23
|
// this tool until #17326. The date pattern matches the route's own
|
|
22
24
|
// YYYY-MM-DD parse and the enum its section list, so a typo is
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-trader-pnl.js","sourceRoot":"","sources":["../../src/tools/get-trader-pnl.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAEvE,iGAAiG;AACjG,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,CAAU,CAAC;AAEhG,MAAM,UAAU,oBAAoB,CAAC,MAAiB,EAAE,MAAiB;IACvE,MAAM,CAAC,YAAY,CACjB,gBAAgB,EAChB;QACE,KAAK,EAAE,4BAA4B;QACnC,WAAW,EAAE
|
|
1
|
+
{"version":3,"file":"get-trader-pnl.js","sourceRoot":"","sources":["../../src/tools/get-trader-pnl.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE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,EAAE,QAAQ,EAAE,EAAE,EAAE;QACxC,IAAI,CAAC;YACH,MAAM,YAAY,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;YACpC,oEAAoE;YACpE,8DAA8D;YAC9D,MAAM,cAAc,GAAG,QAAQ,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC;gBACpD,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,GAAG,QAAQ,CAAC,EAAE;gBAC7B,CAAC,CAAC,SAAS,CAAC;YACd,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,OAAO,CACnC,kBAAkB,kBAAkB,CAAC,YAAY,CAAC,MAAM,EACxD,EAAE,IAAI,EAAE,EAAE,EAAE,EACZ,cAAc,CACf,CAAC;YAEF,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;aAC5G,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
package/dist/tools/get-trader.js
CHANGED
|
@@ -9,10 +9,10 @@ export function registerGetTrader(server, client) {
|
|
|
9
9
|
Optional expand fields for heavier data:
|
|
10
10
|
- strategy: Trading strategy classification
|
|
11
11
|
- categories: Per-category performance breakdown
|
|
12
|
-
- quant_metrics: curated advanced metrics (copy_score and smart_score 0-100, sharpe_30d, sharpe_7d, profit_factor, edge_consistency, sharpe_percentile, pf_percentile, consistency_percentile); each value is a number or null
|
|
12
|
+
- quant_metrics: curated advanced metrics (copy_score and smart_score 0-100, sharpe_30d, sharpe_7d, profit_factor, edge_consistency, sharpe_percentile, pf_percentile, consistency_percentile); emitted only for a computed row strictly under six hours old, otherwise omitted; each present value is a number or null
|
|
13
13
|
- trust: Per-field provenance (source, freshness, reconciliation, completeness) for grade, P&L, and stats
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
A wallet address with no trader yet returns sync_status "unknown" (not an error). A username or trader id that matches no trader is a not_found error.
|
|
16
16
|
|
|
17
17
|
Args:
|
|
18
18
|
- address (string, required): Ethereum wallet address (0x...) or trader username
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-trending-wallets.d.ts","sourceRoot":"","sources":["../../src/tools/get-trending-wallets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,eAAO,MAAM,2BAA2B;IACtC,KAAK;IAEL,MAAM;IAEN,MAAM;;;;CAEP,CAAC;AAEF,wBAAgB,0BAA0B,CAAC,IAAI,EAAE;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,IAAI,GAAG,KAAK,CAAC;CACvB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,CAM9C;AAED,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"get-trending-wallets.d.ts","sourceRoot":"","sources":["../../src/tools/get-trending-wallets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,eAAO,MAAM,2BAA2B;IACtC,KAAK;IAEL,MAAM;IAEN,MAAM;;;;CAEP,CAAC;AAEF,wBAAgB,0BAA0B,CAAC,IAAI,EAAE;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,IAAI,GAAG,KAAK,CAAC;CACvB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,CAM9C;AAED,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CAwCrF"}
|
|
@@ -2,11 +2,11 @@ import { z } from "zod";
|
|
|
2
2
|
import { fail, listResult } from "./result.js";
|
|
3
3
|
export const trendingWalletsParamsSchema = {
|
|
4
4
|
limit: z.number().int().min(1).max(50).default(20)
|
|
5
|
-
.describe("Max results (1-50, default 20)"),
|
|
5
|
+
.describe("Max results (1-50, default 20; the provider board caps the ranked set at 50)"),
|
|
6
6
|
cursor: z.string().optional()
|
|
7
|
-
.describe("
|
|
7
|
+
.describe("Opaque pagination cursor from previous response"),
|
|
8
8
|
window: z.enum(["7d", "30d"]).default("7d")
|
|
9
|
-
.describe("Trailing
|
|
9
|
+
.describe("Trailing window (default 7d)"),
|
|
10
10
|
};
|
|
11
11
|
export function buildTrendingWalletsParams(args) {
|
|
12
12
|
return {
|
|
@@ -18,14 +18,16 @@ export function buildTrendingWalletsParams(args) {
|
|
|
18
18
|
export function registerGetTrendingWallets(server, client) {
|
|
19
19
|
server.registerTool("get_trending_wallets", {
|
|
20
20
|
title: "List Trending Wallets",
|
|
21
|
-
description: `List wallets ranked by trailing-window realized P&L (Polymarket-only discovery)
|
|
21
|
+
description: `List wallets ranked by trailing-window realized P&L (Polymarket-only discovery). Each row carries the window P&L, volume, distinct markets, grade, hot-streak tier, and a shape-only daily P&L series (per-day deltas from the provider curve; dates ascending, gaps are gaps — NOT zero-filled, and not guaranteed to sum to the window P&L). Cursor-paginated by window P&L descending.
|
|
22
|
+
|
|
23
|
+
A cold read model returns a 503 retry-after (warming), never a 500 or fabricated ranking.
|
|
22
24
|
|
|
23
25
|
Args:
|
|
24
26
|
- limit (number, 1-50, default 20): Max results per page
|
|
25
|
-
- cursor (string, optional):
|
|
26
|
-
- window (string, optional): Trailing
|
|
27
|
+
- cursor (string, optional): Opaque pagination cursor from previous response
|
|
28
|
+
- window (string, optional): Trailing window: "7d" (default) or "30d"
|
|
27
29
|
|
|
28
|
-
Returns: Ranked
|
|
30
|
+
Returns: Ranked trending wallets with window stats and pagination metadata.`,
|
|
29
31
|
inputSchema: trendingWalletsParamsSchema,
|
|
30
32
|
annotations: {
|
|
31
33
|
readOnlyHint: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-trending-wallets.js","sourceRoot":"","sources":["../../src/tools/get-trending-wallets.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;SAC/C,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"get-trending-wallets.js","sourceRoot":"","sources":["../../src/tools/get-trending-wallets.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;SAC/C,QAAQ,CAAC,8E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IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-whale-trades.d.ts","sourceRoot":"","sources":["../../src/tools/get-whale-trades.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"get-whale-trades.d.ts","sourceRoot":"","sources":["../../src/tools/get-whale-trades.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AA2FzC,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CAOjF;AAED,wDAAwD;AACxD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CAOjF"}
|