@rackspay/wallet-mcp 1.0.4 → 1.0.5
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/build/index.js +17 -5
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -440,12 +440,13 @@ server.tool("racks_cancel_order", "Cancel an open order on Hyperliquid by order
|
|
|
440
440
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
441
441
|
server.tool("racks_get_markets", "Browse active Polymarket prediction markets. Returns market questions, outcomes, " +
|
|
442
442
|
"current prices (0–1 scale = probability), and token IDs needed for placing bets. " +
|
|
443
|
-
"Use
|
|
443
|
+
"Use keyword to search by topic (e.g. 'bitcoin', 'election'). " +
|
|
444
|
+
"Use next_cursor to paginate through more markets.", {
|
|
444
445
|
next_cursor: z
|
|
445
446
|
.string()
|
|
446
447
|
.optional()
|
|
447
448
|
.default("MA==")
|
|
448
|
-
.describe(
|
|
449
|
+
.describe("Pagination cursor (use the next_cursor from a previous call, or omit for the first page)"),
|
|
449
450
|
limit: z
|
|
450
451
|
.number()
|
|
451
452
|
.int()
|
|
@@ -454,18 +455,29 @@ server.tool("racks_get_markets", "Browse active Polymarket prediction markets. R
|
|
|
454
455
|
.optional()
|
|
455
456
|
.default(10)
|
|
456
457
|
.describe("Number of markets to return (default 10, max 50)"),
|
|
457
|
-
|
|
458
|
-
|
|
458
|
+
keyword: z
|
|
459
|
+
.string()
|
|
460
|
+
.optional()
|
|
461
|
+
.describe("Optional keyword to filter markets by question text (e.g. 'bitcoin', 'election', 'fed rate')"),
|
|
462
|
+
}, async ({ next_cursor, limit, keyword }) => {
|
|
463
|
+
const qs = new URLSearchParams({
|
|
464
|
+
next_cursor: next_cursor ?? "MA==",
|
|
465
|
+
limit: String(limit),
|
|
466
|
+
...(keyword ? { keyword } : {}),
|
|
467
|
+
});
|
|
468
|
+
const res = await request("GET", `/api/v1/agent/predict/markets?${qs.toString()}`);
|
|
459
469
|
if (!res.ok)
|
|
460
470
|
return apiError(res, "Failed to fetch Polymarket markets");
|
|
461
471
|
const d = res.data;
|
|
472
|
+
const markets = d.data;
|
|
462
473
|
return {
|
|
463
474
|
content: [
|
|
464
475
|
{
|
|
465
476
|
type: "text",
|
|
466
477
|
text: JSON.stringify({
|
|
467
478
|
success: true,
|
|
468
|
-
|
|
479
|
+
count: d.count ?? (Array.isArray(markets) ? markets.length : 0),
|
|
480
|
+
markets,
|
|
469
481
|
next_cursor: d.next_cursor,
|
|
470
482
|
note: "Prices are probabilities on a 0–1 scale. Use token_id when placing bets.",
|
|
471
483
|
}, null, 2),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rackspay/wallet-mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "RACKS Wallet MCP — crypto trading and betting infrastructure for AI agents. Trade perps on Hyperliquid, bet on Polymarket, and check on-chain balances via Claude Desktop or any MCP client.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|