← 返回
未分类 中文

BaoziClaw

Complete Solana prediction markets skill for Baozi — list markets, get odds, place bets, claim winnings
完整的 Solana 预测市场技能,供 Baozi 使用 — 列出市场、获取赔率、下注、领取奖金
marcusfranca12
未分类 clawhub v1.0.0 1 版本 99598.4 Key: 无需
★ 0
Stars
📥 248
下载
💾 0
安装
1
版本
#crypto#defi#latest#prediction-market#solana

概述

BaoziClaw

BaoziClaw is a comprehensive OpenClaw skill that provides full access to Baozi prediction markets on Solana. Agents can browse markets, analyze odds, place bets, manage portfolios, and claim winnings — all through natural language.

Features

  • Market Discovery: List active markets with filters (hot, new, trending)
  • Odds Analysis: Get real-time probabilities and pool sizes
  • Betting: Place SOL bets on boolean or race outcomes
  • Portfolio Management: Check positions for any wallet
  • Winnings Claim: Auto-claim resolved market payouts
  • Market Creation: Create new Lab markets (creator profile required)

Tools

ToolDescription
-------------------
list-marketsBrowse active prediction markets
get-oddsGet odds, pools, and implied probabilities
place-betPlace a bet on any market outcome
get-portfolioView positions for a wallet
claim-winningsClaim from resolved markets
create-marketCreate a new Lab market

Installation

clawhub install baozi-claw

---

## 🔨 Agora recrie o index.ts com mais tools:

cat > index.ts << 'EOF'

import { exec } from 'child_process';

import { promisify } from 'util';

const execAsync = promisify(exec);

async function callBaoziMCP(toolName: string, args: any = {}) {

const command = npx -y @baozi.bet/mcp-server --tool ${toolName} --args '${JSON.stringify(args)}';

try {

const { stdout, stderr } = await execAsync(command);

if (stderr) console.error('Stderr:', stderr);

return JSON.parse(stdout);

} catch (error) {

console.error(Error calling ${toolName}:, error);

throw error;

}

}

export const tools = [

{

name: 'list-markets',

description: 'List active prediction markets on Baozi with optional filters (layer, status, query)',

parameters: { type: 'object', properties: { layer: { type: 'string' }, status: { type: 'string' }, query: { type: 'string' } } },

handler: async (args: any) => callBaoziMCP('list_markets', args)

},

{

name: 'get-odds',

description: 'Get odds, implied probabilities, and pool sizes for a specific market',

parameters: { type: 'object', properties: { marketId: { type: 'string' } }, required: ['marketId'] },

handler: async (args: any) => callBaoziMCP('get_quote', { market: args.marketId })

},

{

name: 'place-bet',

description: 'Place a bet on a market outcome using SOL',

parameters: { type: 'object', properties: { marketId: { type: 'string' }, outcome: { type: 'boolean' }, amount: { type: 'number' } }, required: ['marketId', 'outcome', 'amount'] },

handler: async (args: any) => callBaoziMCP('build_bet_transaction', args)

},

{

name: 'get-portfolio',

description: 'View all positions and bets for a wallet address',

parameters: { type: 'object', properties: { wallet: { type: 'string' } }, required: ['wallet'] },

handler: async (args: any) => callBaoziMCP('get_portfolio', { wallet: args.wallet })

},

{

name: 'claim-winnings',

description: 'Claim SOL winnings from resolved markets',

parameters: { type: 'object', properties: { marketId: { type: 'string' } }, required: ['marketId'] },

handler: async (args: any) => callBaoziMCP('build_claim_transaction', { market: args.marketId })

}

];

console.log('✅ BaoziClaw:', tools.length, 'prediction market tools loaded');

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-11 05:09 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

APEX IA Pro

marcusfranca12
APEX IA - Binance Futures 多时间框架专业扫描器,检测 SMA 8x21 交叉,结合 Pivot、SuperTrend、RSI、成交量及共振确认。
★ 0 📥 268

APEX IA Scanner

marcusfranca12
APEX IA - Binance Futures 多时间框架专业扫描器,检测 SMA 8x21 交叉,结合 Pivot、SuperTrend、RSI、成交量及共振确认。
★ 0 📥 305

APEX IA Scanner

marcusfranca12
APEX IA - Binance Futures 多时间框架专业扫描器,检测 SMA 8x21 交叉,结合 Pivot、SuperTrend、RSI、成交量及共振确认。
★ 0 📥 273