@0xinsider/mcp 2.8.0 → 2.9.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.
@@ -2,7 +2,7 @@ export declare const API_BASE_URL = "https://api.0xinsider.com";
2
2
  export declare const SITE_URL = "https://0xinsider.com";
3
3
  export declare const DEVELOPERS_URL = "https://0xinsider.com/developers";
4
4
  export declare const PRICING_URL = "https://0xinsider.com/pricing";
5
- export declare const VERSION = "2.8.0";
5
+ export declare const VERSION = "2.9.0";
6
6
  export declare const PACKAGE_NAME = "@0xinsider/mcp";
7
7
  export declare const SERVER_NAME = "0xinsider";
8
8
  export declare const API_KEY_ENV_VAR = "OXINSIDER_API_KEY";
package/dist/constants.js CHANGED
@@ -15,7 +15,7 @@ export const PRICING_URL = `${SITE_URL}/pricing`;
15
15
  // flow runs `cd mcp && npm ci` from a clean checkout, where `web/node_modules` need not
16
16
  // exist.
17
17
  // generated-package-version:start
18
- export const VERSION = "2.8.0";
18
+ export const VERSION = "2.9.0";
19
19
  // generated-package-version:end
20
20
  export const PACKAGE_NAME = "@0xinsider/mcp";
21
21
  export const SERVER_NAME = "0xinsider";
@@ -7,6 +7,7 @@ export declare const positionsParamsSchema: {
7
7
  min_size: z.ZodDefault<z.ZodNumber>;
8
8
  category: z.ZodOptional<z.ZodString>;
9
9
  condition_id: z.ZodOptional<z.ZodString>;
10
+ wallet: z.ZodOptional<z.ZodArray<z.ZodString>>;
10
11
  min_grade: z.ZodOptional<z.ZodEnum<{
11
12
  A: "A";
12
13
  B: "B";
@@ -19,6 +20,10 @@ export declare const positionsParamsSchema: {
19
20
  no: "no";
20
21
  yes: "yes";
21
22
  }>>;
23
+ consistency: z.ZodOptional<z.ZodEnum<{
24
+ live: "live";
25
+ snapshot: "snapshot";
26
+ }>>;
22
27
  };
23
28
  export declare function buildPositionsParams(args: {
24
29
  limit?: number;
@@ -28,6 +33,7 @@ export declare function buildPositionsParams(args: {
28
33
  condition_id?: string;
29
34
  min_grade?: "S" | "A" | "B" | "C" | "D" | "F";
30
35
  side?: "yes" | "no";
36
+ consistency?: "live" | "snapshot";
31
37
  }): Record<string, string | number | undefined>;
32
38
  export declare function registerGetPositions(server: McpServer, client: ApiClient): void;
33
39
  //# sourceMappingURL=get-positions.d.ts.map
@@ -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;IAEN,QAAQ;IAER,QAAQ;IAER,YAAY;IAEZ,SAAS;;;;;;;;IAET,IAAI;;;;CAEL,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;CACrB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,CAU9C;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CA0C/E"}
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;IAEN,QAAQ;IAER,QAAQ;IAER,YAAY;IAEZ,MAAM;IAEN,SAAS;;;;;;;;IAET,IAAI;;;;IAEJ,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"}
@@ -6,15 +6,19 @@ export const positionsParamsSchema = {
6
6
  cursor: z.string().optional()
7
7
  .describe("Pagination cursor from previous response"),
8
8
  min_size: z.number().min(0).default(100)
9
- .describe("Minimum current position value in USD"),
9
+ .describe("Minimum current position value in USD; defaults to 0 instead when wallet is present"),
10
10
  category: z.string().optional()
11
11
  .describe("Filter by provider-backed market category"),
12
12
  condition_id: z.string().optional()
13
13
  .describe("Scope to one market: raw provider condition_id or mkt_-prefixed market id"),
14
+ wallet: z.array(z.string()).max(25).optional()
15
+ .describe("Scope to one wallet or a book of wallets (up to 25): a wallet address, a known username, or a trd_-prefixed trader id"),
14
16
  min_grade: z.enum(["S", "A", "B", "C", "D", "F"]).optional()
15
17
  .describe("Minimum trader grade"),
16
18
  side: z.enum(["yes", "no"]).optional()
17
19
  .describe("Filter by binary outcome side"),
20
+ consistency: z.enum(["live", "snapshot"]).optional()
21
+ .describe("live (default) or snapshot. snapshot requires wallet and freezes up to 500 positions and 2 MB for up to five minutes; repeat the same filters and consistency on every page"),
18
22
  };
19
23
  export function buildPositionsParams(args) {
20
24
  return {
@@ -25,6 +29,7 @@ export function buildPositionsParams(args) {
25
29
  condition_id: args.condition_id,
26
30
  min_grade: args.min_grade,
27
31
  side: args.side,
32
+ consistency: args.consistency,
28
33
  };
29
34
  }
30
35
  export function registerGetPositions(server, client) {
@@ -35,13 +40,15 @@ export function registerGetPositions(server, client) {
35
40
  Args:
36
41
  - limit (number, 1-100, default 20): Max results per page
37
42
  - cursor (string, optional): Pagination cursor from previous response
38
- - min_size (number, default 100): Minimum current value in USD; send 0 for every reconciled position
43
+ - min_size (number, default 100): Minimum current value in USD; send 0 for every reconciled position; defaults to 0 instead when wallet is present
39
44
  - category (string, optional): Filter by provider-backed market category
40
45
  - condition_id (string, optional): Scope to one market: raw provider condition_id or mkt_-prefixed market id
46
+ - wallet (string[], optional): Scope to one wallet or a book of wallets (up to 25); each value is a wallet address, known username, or trd_-prefixed trader id
41
47
  - min_grade (string, optional): Minimum trader grade (S, A, B, C, D, F)
42
48
  - side (string, optional): Filter by binary side: "yes" or "no"
49
+ - consistency (string, optional): live (default) or snapshot. snapshot requires wallet and freezes up to 500 positions and 2 MB for up to five minutes; repeat the same filters and consistency on every page. A new first page replaces the API key's prior snapshot; a changed filter errors, and an expired or replaced cursor returns cursor_expired
43
50
 
44
- Returns: List of current positions with pagination metadata. The page carries data_quality beside data: status, as_of (the oldest clock the page rests on) and field_groups. fresh means tracked and clocked, not current: compare as_of with your own tolerance. unknown means this read cannot date that group, never that it is recent.`,
51
+ Returns: List of current positions with pagination metadata. The page carries data_quality beside data: status, as_of (the oldest clock the page rests on) and field_groups. fresh means tracked and clocked, not current: compare as_of with your own tolerance. unknown means this read cannot date that group, never that it is recent. With consistency=snapshot, the page also carries snapshot: as_of, expires_at, row_count.`,
45
52
  inputSchema: positionsParamsSchema,
46
53
  annotations: {
47
54
  readOnlyHint: true,
@@ -51,7 +58,10 @@ Returns: List of current positions with pagination metadata. The page carries da
51
58
  },
52
59
  }, async (args) => {
53
60
  try {
54
- const response = await client.request("/api/v1/positions", buildPositionsParams(args));
61
+ const repeatedParams = args.wallet && args.wallet.length > 0
62
+ ? { wallet: args.wallet }
63
+ : undefined;
64
+ const response = await client.request("/api/v1/positions", buildPositionsParams(args), repeatedParams);
55
65
  const result = listResult(response);
56
66
  return {
57
67
  content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
@@ -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,CAAC;AAE/C,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,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,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC;SACrC,QAAQ,CAAC,uCAAuC,CAAC;IACpD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;SAC5B,QAAQ,CAAC,2CAA2C,CA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F,EACD,KAAK,EAAE,IAAI,EAAE,EAAE;QACb,IAAI,CAAC;YACH,MAAM,cAAc,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC;gBAC1D,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE;gBACzB,CAAC,CAAC,SAAS,CAAC;YAEd,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,OAAO,CACnC,mBAAmB,EACnB,oBAAoB,CAAC,IAAI,CAAC,EAC1B,cAAc,CACf,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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xinsider/mcp",
3
- "version": "2.8.0",
3
+ "version": "2.9.0",
4
4
  "mcpName": "io.github.0xinsider/mcp",
5
5
  "description": "Official 0xinsider CLI and MCP server: advanced tools for sports and esports markets, powered by Polymarket",
6
6
  "type": "module",