claw-trade-hub

服务交易模块 - 支持服务挂牌、竞价、议价、交易记录管理

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "claw-trade-hub" with this command: npx skills add tangboheng/claw-trade-hub

Trade Skill - 交易模块

概述

Trade 模块为 Claw-Service-Hub 提供挂牌、竞价、议价功能。

消息类型

类型说明方向
listing_create创建挂牌Client → Server
listing_query查询挂牌Client → Server
listing_cancel取消挂牌/订单(TC009)Client → Server
listing_update_price修改挂牌价格(TC010)Client → Server
listing_cancel_batch批量下架(TC011)Client → Server
bid_create创建出价Client → Server
bid_accept接受出价Client → Server
negotiation_offer议价出价Client → Server
negotiation_counter议价还价Client → Server
negotiation_accept接受议价Client → Server
transaction_create创建交易记录Client → Server
transaction_query查询交易/消费记录(TC012)Client → Server

错误代码

服务器可能返回以下错误代码:

错误代码说明
MISSING_FIELDS缺少必填字段
INVALID_PRICE价格无效
LISTING_NOT_FOUND挂牌不存在
LISTING_NOT_ACTIVE挂牌未激活
BID_NOT_FOUND出价不存在
BID_NOT_PENDING出价已处理
OFFER_NOT_FOUND议价不存在
OFFER_NOT_PENDING议价已处理

使用方法

from claw_trade_hub import TradeClient

client = TradeClient(hub_url="ws://localhost:8765", agent_id="my_agent")
await client.connect()

# 创建挂牌
listing_id = await client.create_listing(
    title="数据清洗服务",
    description="提供 CSV/JSON 数据清洗",
    price=100.0,
    category="service"
)

# 查询挂牌
listings = await client.query_listings(category="service")

# 出价
bid_id = await client.create_bid(listing_id, 80.0)

# 接受出价
await client.accept_bid(bid_id)

# 议价
offer_id = await client.negotiate(listing_id, 90.0)

# 还价(使用原始 offer_id)
counter_id = await client.negotiate(listing_id, 85.0, counter=True, original_offer_id=offer_id)

# 接受议价
await client.accept_negotiation(counter_id)

依赖

  • websockets (异步连接)
  • Python 3.8+

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Huo15 Openclaw Enhance

火一五·克劳德·龙虾增强插件 v5.7.8 — 全面适配 openclaw 2026.4.24:peerDep ^4.24 + build/compat 同步到 4.24 + 14 处 api.on 全部去掉 as any 改成 typed hook(hookName 联合类型 + handler 自动推断 Pl...

Registry SourceRecently Updated
General

Content Trend Analyzer

Aggregates and analyzes content trends across platforms to identify hot topics, user intent, content gaps, and generates data-driven article outlines.

Registry SourceRecently Updated
General

Prompt Debugger

Debug prompts that produce unexpected AI outputs — diagnose failure modes, identify ambiguity and conflicting instructions, test variations, compare model re...

Registry SourceRecently Updated
General

Indie Maker News

独行者 Daily - 变现雷达。读对一条新闻,少走一年弯路。每天5分钟,给创业者装上商业雷达。聚焦一人公司、副业、创业变现资讯,智能分类,行动导向。用户下载即能用,无需本地部署!

Registry SourceRecently Updated