@blockrun/clawrouter 0.12.88 → 0.12.89
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/cli.js +189 -0
- package/dist/cli.js.map +1 -1
- package/dist/index.js +209 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/predexon/SKILL.md +1 -1
package/dist/index.js
CHANGED
|
@@ -54630,6 +54630,195 @@ var PARTNER_SERVICES = [
|
|
|
54630
54630
|
input: { usernames: ["elonmusk", "naval", "balaboris"] },
|
|
54631
54631
|
description: "Look up 3 Twitter/X user profiles"
|
|
54632
54632
|
}
|
|
54633
|
+
},
|
|
54634
|
+
// ---------------------------------------------------------------------------
|
|
54635
|
+
// Predexon — Prediction Market Data
|
|
54636
|
+
// ---------------------------------------------------------------------------
|
|
54637
|
+
{
|
|
54638
|
+
id: "predexon_events",
|
|
54639
|
+
name: "Polymarket Events",
|
|
54640
|
+
partner: "Predexon",
|
|
54641
|
+
description: "Get live Polymarket prediction market events with current odds, volume, and liquidity. Call this for ANY request about prediction markets, Polymarket markets, current odds, what people are betting on, or market sentiment. Do NOT use browser or web scraping \u2014 this returns structured real-time data directly. Returns: event title, YES/NO prices (implied probability), volume, liquidity, end date.",
|
|
54642
|
+
proxyPath: "/pm/polymarket/events",
|
|
54643
|
+
method: "GET",
|
|
54644
|
+
params: [
|
|
54645
|
+
{
|
|
54646
|
+
name: "limit",
|
|
54647
|
+
type: "number",
|
|
54648
|
+
description: "Number of events to return (default: 20, max: 100)",
|
|
54649
|
+
required: false
|
|
54650
|
+
},
|
|
54651
|
+
{
|
|
54652
|
+
name: "tag",
|
|
54653
|
+
type: "string",
|
|
54654
|
+
description: "Filter by category: crypto, politics, sports, science, economics, etc.",
|
|
54655
|
+
required: false
|
|
54656
|
+
}
|
|
54657
|
+
],
|
|
54658
|
+
pricing: { perUnit: "$0.001", unit: "request", minimum: "$0.001", maximum: "$0.001" },
|
|
54659
|
+
example: {
|
|
54660
|
+
input: { limit: 20 },
|
|
54661
|
+
description: "Get top 20 live Polymarket events"
|
|
54662
|
+
}
|
|
54663
|
+
},
|
|
54664
|
+
{
|
|
54665
|
+
id: "predexon_leaderboard",
|
|
54666
|
+
name: "Polymarket Leaderboard",
|
|
54667
|
+
partner: "Predexon",
|
|
54668
|
+
description: "Get the Polymarket leaderboard of top traders ranked by profit. Call this for ANY request about top Polymarket traders, whale wallets, best performers, richest traders, or who is making the most money on Polymarket. Do NOT use browser or web scraping \u2014 this returns structured data directly. Returns: wallet address/username, total profit, total volume, win rate.",
|
|
54669
|
+
proxyPath: "/pm/polymarket/leaderboard",
|
|
54670
|
+
method: "GET",
|
|
54671
|
+
params: [
|
|
54672
|
+
{
|
|
54673
|
+
name: "limit",
|
|
54674
|
+
type: "number",
|
|
54675
|
+
description: "Number of wallets to return (default: 20, max: 100)",
|
|
54676
|
+
required: false
|
|
54677
|
+
}
|
|
54678
|
+
],
|
|
54679
|
+
pricing: { perUnit: "$0.001", unit: "request", minimum: "$0.001", maximum: "$0.001" },
|
|
54680
|
+
example: {
|
|
54681
|
+
input: { limit: 20 },
|
|
54682
|
+
description: "Get top 20 Polymarket whale wallets by profit"
|
|
54683
|
+
}
|
|
54684
|
+
},
|
|
54685
|
+
{
|
|
54686
|
+
id: "predexon_markets",
|
|
54687
|
+
name: "Polymarket Markets Search",
|
|
54688
|
+
partner: "Predexon",
|
|
54689
|
+
description: "Search and filter Polymarket markets. Use this to find a market by keyword and get its conditionId for follow-up calls (smart money, top holders, etc.). Returns: question, conditionId, YES/NO prices, volume.",
|
|
54690
|
+
proxyPath: "/pm/polymarket/markets",
|
|
54691
|
+
method: "GET",
|
|
54692
|
+
params: [
|
|
54693
|
+
{
|
|
54694
|
+
name: "search",
|
|
54695
|
+
type: "string",
|
|
54696
|
+
description: "Keyword to search for (e.g. 'bitcoin', 'election', 'fed rate')",
|
|
54697
|
+
required: false
|
|
54698
|
+
},
|
|
54699
|
+
{
|
|
54700
|
+
name: "limit",
|
|
54701
|
+
type: "number",
|
|
54702
|
+
description: "Number of markets to return (default: 20)",
|
|
54703
|
+
required: false
|
|
54704
|
+
}
|
|
54705
|
+
],
|
|
54706
|
+
pricing: { perUnit: "$0.001", unit: "request", minimum: "$0.001", maximum: "$0.001" },
|
|
54707
|
+
example: {
|
|
54708
|
+
input: { search: "bitcoin", limit: 10 },
|
|
54709
|
+
description: "Search for Bitcoin-related prediction markets"
|
|
54710
|
+
}
|
|
54711
|
+
},
|
|
54712
|
+
{
|
|
54713
|
+
id: "predexon_smart_money",
|
|
54714
|
+
name: "Polymarket Smart Money",
|
|
54715
|
+
partner: "Predexon",
|
|
54716
|
+
description: "See how high-performing wallets are positioned on a specific Polymarket market. Use this after finding a market's conditionId via predexon_markets or predexon_events. Returns: wallet addresses, their YES/NO positions, size, P&L, win rate.",
|
|
54717
|
+
proxyPath: "/pm/polymarket/market/:condition_id/smart-money",
|
|
54718
|
+
method: "GET",
|
|
54719
|
+
params: [
|
|
54720
|
+
{
|
|
54721
|
+
name: "condition_id",
|
|
54722
|
+
type: "string",
|
|
54723
|
+
description: "The market's conditionId (get this from predexon_markets or predexon_events)",
|
|
54724
|
+
required: true
|
|
54725
|
+
},
|
|
54726
|
+
{
|
|
54727
|
+
name: "limit",
|
|
54728
|
+
type: "number",
|
|
54729
|
+
description: "Number of positions to return (default: 20)",
|
|
54730
|
+
required: false
|
|
54731
|
+
}
|
|
54732
|
+
],
|
|
54733
|
+
pricing: { perUnit: "$0.005", unit: "request", minimum: "$0.005", maximum: "$0.005" },
|
|
54734
|
+
example: {
|
|
54735
|
+
input: { condition_id: "0xabc123...", limit: 10 },
|
|
54736
|
+
description: "See smart money positioning on a specific market"
|
|
54737
|
+
}
|
|
54738
|
+
},
|
|
54739
|
+
{
|
|
54740
|
+
id: "predexon_smart_activity",
|
|
54741
|
+
name: "Polymarket Smart Activity",
|
|
54742
|
+
partner: "Predexon",
|
|
54743
|
+
description: "Discover which Polymarket markets high-performing wallets are currently active in. Use this to find where smart money is flowing right now. Returns: market titles, smart money volume, number of smart wallets active.",
|
|
54744
|
+
proxyPath: "/pm/polymarket/markets/smart-activity",
|
|
54745
|
+
method: "GET",
|
|
54746
|
+
params: [
|
|
54747
|
+
{
|
|
54748
|
+
name: "limit",
|
|
54749
|
+
type: "number",
|
|
54750
|
+
description: "Number of markets to return (default: 20)",
|
|
54751
|
+
required: false
|
|
54752
|
+
}
|
|
54753
|
+
],
|
|
54754
|
+
pricing: { perUnit: "$0.005", unit: "request", minimum: "$0.005", maximum: "$0.005" },
|
|
54755
|
+
example: {
|
|
54756
|
+
input: { limit: 10 },
|
|
54757
|
+
description: "Find markets where smart money is most active"
|
|
54758
|
+
}
|
|
54759
|
+
},
|
|
54760
|
+
{
|
|
54761
|
+
id: "predexon_wallet",
|
|
54762
|
+
name: "Polymarket Wallet Profile",
|
|
54763
|
+
partner: "Predexon",
|
|
54764
|
+
description: "Get a complete profile for a Polymarket wallet address: profit, volume, win rate, markets traded, open positions. Use this when the user asks to analyze or look up a specific wallet address.",
|
|
54765
|
+
proxyPath: "/pm/polymarket/wallet/:wallet",
|
|
54766
|
+
method: "GET",
|
|
54767
|
+
params: [
|
|
54768
|
+
{
|
|
54769
|
+
name: "wallet",
|
|
54770
|
+
type: "string",
|
|
54771
|
+
description: "Ethereum wallet address (0x...)",
|
|
54772
|
+
required: true
|
|
54773
|
+
}
|
|
54774
|
+
],
|
|
54775
|
+
pricing: { perUnit: "$0.005", unit: "request", minimum: "$0.005", maximum: "$0.005" },
|
|
54776
|
+
example: {
|
|
54777
|
+
input: { wallet: "0x1234...abcd" },
|
|
54778
|
+
description: "Get complete profile for a Polymarket wallet"
|
|
54779
|
+
}
|
|
54780
|
+
},
|
|
54781
|
+
{
|
|
54782
|
+
id: "predexon_wallet_pnl",
|
|
54783
|
+
name: "Polymarket Wallet P&L",
|
|
54784
|
+
partner: "Predexon",
|
|
54785
|
+
description: "Get P&L history and realized profit/loss time series for a Polymarket wallet. Use this when the user wants to see how a wallet has performed over time.",
|
|
54786
|
+
proxyPath: "/pm/polymarket/wallet/pnl/:wallet",
|
|
54787
|
+
method: "GET",
|
|
54788
|
+
params: [
|
|
54789
|
+
{
|
|
54790
|
+
name: "wallet",
|
|
54791
|
+
type: "string",
|
|
54792
|
+
description: "Ethereum wallet address (0x...)",
|
|
54793
|
+
required: true
|
|
54794
|
+
}
|
|
54795
|
+
],
|
|
54796
|
+
pricing: { perUnit: "$0.005", unit: "request", minimum: "$0.005", maximum: "$0.005" },
|
|
54797
|
+
example: {
|
|
54798
|
+
input: { wallet: "0x1234...abcd" },
|
|
54799
|
+
description: "Get P&L history for a Polymarket wallet"
|
|
54800
|
+
}
|
|
54801
|
+
},
|
|
54802
|
+
{
|
|
54803
|
+
id: "predexon_matching_markets",
|
|
54804
|
+
name: "Cross-Market Matching (Polymarket vs Kalshi)",
|
|
54805
|
+
partner: "Predexon",
|
|
54806
|
+
description: "Find equivalent markets across Polymarket and Kalshi to compare odds and spot arbitrage. Use this when the user wants to compare prediction market prices across platforms.",
|
|
54807
|
+
proxyPath: "/pm/matching-markets",
|
|
54808
|
+
method: "GET",
|
|
54809
|
+
params: [
|
|
54810
|
+
{
|
|
54811
|
+
name: "limit",
|
|
54812
|
+
type: "number",
|
|
54813
|
+
description: "Number of matched pairs to return (default: 20)",
|
|
54814
|
+
required: false
|
|
54815
|
+
}
|
|
54816
|
+
],
|
|
54817
|
+
pricing: { perUnit: "$0.005", unit: "request", minimum: "$0.005", maximum: "$0.005" },
|
|
54818
|
+
example: {
|
|
54819
|
+
input: { limit: 10 },
|
|
54820
|
+
description: "Compare equivalent markets on Polymarket vs Kalshi"
|
|
54821
|
+
}
|
|
54633
54822
|
}
|
|
54634
54823
|
];
|
|
54635
54824
|
function getPartnerService(id) {
|
|
@@ -54669,11 +54858,29 @@ function buildTool(service, proxyBaseUrl) {
|
|
|
54669
54858
|
required
|
|
54670
54859
|
},
|
|
54671
54860
|
execute: async (_toolCallId, params) => {
|
|
54672
|
-
|
|
54861
|
+
let path2 = `/v1${service.proxyPath}`;
|
|
54862
|
+
const leftoverParams = {};
|
|
54863
|
+
for (const [key, value] of Object.entries(params)) {
|
|
54864
|
+
if (value === void 0 || value === null) continue;
|
|
54865
|
+
const placeholder = `:${key}`;
|
|
54866
|
+
if (path2.includes(placeholder)) {
|
|
54867
|
+
path2 = path2.replace(placeholder, encodeURIComponent(String(value)));
|
|
54868
|
+
} else {
|
|
54869
|
+
leftoverParams[key] = value;
|
|
54870
|
+
}
|
|
54871
|
+
}
|
|
54872
|
+
let url = `${proxyBaseUrl}${path2}`;
|
|
54873
|
+
if (service.method === "GET" && Object.keys(leftoverParams).length > 0) {
|
|
54874
|
+
const qs = new URLSearchParams();
|
|
54875
|
+
for (const [key, value] of Object.entries(leftoverParams)) {
|
|
54876
|
+
qs.set(key, Array.isArray(value) ? value.join(",") : String(value));
|
|
54877
|
+
}
|
|
54878
|
+
url += `?${qs.toString()}`;
|
|
54879
|
+
}
|
|
54673
54880
|
const response = await fetch(url, {
|
|
54674
54881
|
method: service.method,
|
|
54675
54882
|
headers: { "Content-Type": "application/json" },
|
|
54676
|
-
body: JSON.stringify(params)
|
|
54883
|
+
body: service.method === "POST" ? JSON.stringify(params) : void 0
|
|
54677
54884
|
});
|
|
54678
54885
|
if (!response.ok) {
|
|
54679
54886
|
const errText = await response.text().catch(() => "");
|