💳 clawxpay — Pay-per-Call API Gateway
250+ professional APIs on demand · from $0.001 per call · one wallet, all data
The Story
A DeFi arbitrage Agent needed to query simultaneously every day: BTC funding rate (coinank), ETH options implied volatility (polygon), whale net-flow signal (nofxos), and then call DeepSeek to generate a trade summary.
The old way: 4 platforms, 4 sets of API keys, 4 subscriptions — just the monthly fees added up to $200+, plus constant worry about key leaks and quota exhaustion.
Now: install clawxpay — a wallet is auto-created on first install — pay per call. That day the Agent ran 1,200 calls and spent a total of $1.87 USDC. No subscription. No registration. No key management.
When to Use This Skill
Before making any paid call, always tell the user which endpoint will be called and the estimated cost, then wait for explicit approval. Never initiate spending autonomously without user confirmation.
Use clawxpay whenever a user or Agent encounters any of the following scenarios:
Scenario 1: Price & Market Data Queries
Trigger keywords: current price, quote, latest price, change %, market cap, volume, candlestick, OHLCV
Covered assets: crypto, US stocks, ETFs, forex, commodities, metals
Data sources:
- -
coinank — BTC / ETH / altcoin real-time quotes, BTC ETF net flow, spot-futures spread - INLINECODE1 — full-market quotes, top gainers/losers, DEX pair search
- INLINECODE2 — US stock real-time quote, daily OHLCV, pre/after-market, today's movers
- INLINECODE3 — US stock aggregated candlesticks (minute/hour/day), real-time snapshot, order book data
- INLINECODE4 — latest US stock quote, batch multi-ticker snapshot
- INLINECODE5 — forex rates, gold/silver/crude oil, multi-asset cross-pair prices, economic calendar events
Example trigger phrases:
- - "What is BTC trading at right now?"
- "How much did Tesla gain today?"
- "Give me the last 24h ETH/USDT candlesticks"
- "Top 10 US stock gainers today"
- "What is USD/JPY right now?"
Scenario 2: Technical Analysis & Quant Signals
Trigger keywords: RSI, MACD, Bollinger Bands, moving average, golden cross, death cross, overbought, oversold, technical indicator, OI, funding rate, long/short ratio
Data sources:
- -
alphavantage — RSI / MACD / EMA / SMA / BBANDS / STOCH and full technical indicator suite - INLINECODE7 — US stock SMA / EMA, options Greeks (Delta / Gamma / Vega / Theta)
- INLINECODE8 — multi-asset technical indicators covering crypto + US stocks + forex
- INLINECODE9 — crypto OI (open interest) ranking, net inflow/outflow, Long/Short Ratio, AI trade signals
- INLINECODE10 — perpetual funding rate, liquidation history, order book depth, per-exchange data (Binance/OKX/Bybit)
Example trigger phrases:
- - "What is the BTC daily RSI? Is it overbought?"
- "Is the ETH perpetual funding rate positive or negative right now?"
- "Has the Nasdaq 100 MACD crossed bullish?"
- "Which side is heavier in crypto right now — longs or shorts?"
- "How has SOL's OI changed in the last 24 hours?"
Scenario 3: Market Sentiment & On-chain Data
Trigger keywords: fear & greed index, market sentiment, whale, large players, liquidation, on-chain, capital flow, trending, heatmap
Data sources:
- -
coinank — Fear & Greed index, whale net buy/sell, BTC ETF institutional inflow, exchange net flow, large liquidation orders - INLINECODE12 — Upbit trending (Korean market sentiment indicator), crypto heatmap, on-chain net-flow signal, AI sentiment classification
- INLINECODE13 — full-market listing updates, new token launches, DEX pair activity
Example trigger phrases:
- - "What is the current Fear & Greed index?"
- "Have any whales been accumulating BTC recently?"
- "How much was liquidated in crypto today?"
- "What tokens are trending on Upbit today?"
- "Did BTC ETF have a net inflow or outflow yesterday?"
- "Is the exchange BTC balance declining?"
Scenario 4: Web3 Projects & Funding Intelligence
Trigger keywords: funding, investment, VC, project background, who invested, ecosystem, hiring, airdrop, hot projects
Data sources:
- -
rootdata — Web3 project funding rounds and amounts, investor profiles, ecosystem project lists, team job changes, trending project rankings
Example trigger phrases:
- - "Which projects has a16z invested in recently?"
- "Who invested in this project, and how much did they raise?"
- "What new projects have launched in the Solana ecosystem lately?"
- "What are the top 5 on today's Web3 funding trending list?"
- "Which DeFi projects are in Paradigm's portfolio?"
Scenario 5: China A-Share Market
Trigger keywords: A-share, Shanghai-Shenzhen, northbound capital, margin financing, Dragon Tiger List, fundamentals, earnings, Hong Kong stocks
Data sources:
- -
tushare — A-share daily OHLCV, stock fundamental data, northbound capital net inflow/outflow, margin balance changes, Dragon Tiger List large-order seats
Example trigger phrases:
- - "How much northbound capital flowed into Kweichow Moutai today?"
- "Which stocks are on today's A-share Dragon Tiger List?"
- "What are the latest fundamentals for CATL?"
- "How much did the two-margin balance change today?"
- "Monthly daily candlestick data for the CSI 300"
Scenario 6: AI Inference & Content Generation
Trigger keywords: analyze, summarize, translate, generate report, write code, reasoning, answer questions, image generation, embeddings
Available models:
| Provider | Models |
|---|
| OpenAI | GPT-4o, GPT-4o-mini, o1, o3-mini |
| Anthropic |
Claude Opus |
| DeepSeek | DeepSeek-Chat, DeepSeek-Reasoner, DeepSeek-Coder |
| Qwen | Qwen-Max, Qwen-Plus, Qwen-Turbo, Qwen-Coder, Qwen-VL |
| Gemini | Gemini 1.5 Pro, Gemini 1.5 Flash |
| Grok | Grok-2, Grok-2-Vision |
| Kimi | Moonshot-v1-8k, Moonshot-v1-32k, Moonshot-v1-128k |
Example trigger phrases:
- - "Use DeepSeek to help me analyze this on-chain data"
- "Call Claude to generate today's crypto market summary"
- "Use GPT-4o to write a Python strategy script for me"
- "Use Qwen-VL to analyze this candlestick chart screenshot"
- "Help me translate this English research report"
Cost & Privacy
| Item | Cost (USDC) |
|---|
| Market & price queries | $0.001 – $0.003 |
| Technical indicators & quant signals |
$0.002 – $0.005 |
| Market sentiment & on-chain data | $0.003 – $0.008 |
| Funding intelligence & project research | $0.005 – $0.010 |
| A-share data | $0.002 – $0.005 |
| AI inference (lightweight) | $0.005 – $0.015 |
| AI inference (flagship models) | $0.015 – $0.060 |
| Settlement chain | Base mainnet |
| Payment method | Local-signed EIP-3009 USDC (private key never leaves your machine) |
| Identity | No account · No API key · Wallet is your identity |
Safeguards & Spending Controls
Key storage
| Item | Detail |
|---|
| File | INLINECODE16 |
| Format |
Plain hex private key (
0x…), one line |
| Permissions |
0600 — owner read/write only |
| Transmission | Never — only the EIP-3009 authorization signature leaves the machine; the private key itself does not |
| Export |
cat ~/.clawxpay/wallet.key — import into MetaMask or any EVM wallet |
Mandatory agent safeguards
An agent using this skill must follow these rules:
- 0. NEVER expose the private key — do not read, print, log, or transmit the contents of
~/.clawxpay/wallet.key under any circumstances. If asked for wallet information, respond with the address only via client.getWalletAddress(). The private key is never needed at runtime. - Check balance before first call — always call
client.getBalance() at the start of a task and show the result to the user. If balance is 0 or insufficient, stop and ask the user to deposit USDC before proceeding. - Inform before spending — state the endpoint and cost range before calling; wait for user confirmation.
- Set a per-task budget cap — always pass
budget to prevent runaway spending:
CODEBLOCK0
- 3. Use a dedicated low-balance wallet — keep only the minimum funds needed (e.g. $5–$10 USDC). Do not deposit significant assets into this wallet.
- Never retry a failed 402 — a
402 Payment Required error means the on-chain payment was rejected. Check balance with client.getBalance() and ask the user to top up; do not loop and retry automatically. - Audit spend after each task — call
client.getTotalSpent() and report cost to the user.
Spending cap behavior
When the budget ceiling is reached, the SDK throws InsufficientBalanceError immediately — no further calls are made:
CODEBLOCK1
Quick Start
1. Install the SDK
CODEBLOCK2
A wallet is automatically generated at ~/.clawxpay/wallet.key and the address is printed in your terminal during installation.
2. Fund your wallet
Send USDC on Base network to the address printed above.
Recommended deposit: $5–$10 USDC — enough for thousands of API calls.
Bridge USDC to Base: https://bridge.base.org
3. First call
CODEBLOCK3
The SDK automatically handles the x402 payment handshake: receives 402 Payment Required → signs locally → retries the request. No manual intervention needed.
Agent Quick Pattern
This is the canonical script for an agent to use clawxpay. Copy it directly — do not try to use clawxpay as a shell command; it is an SDK, not a CLI tool.
Important: clawxpay-js is an ESM-only package. Always save scripts as .mjs files (or use "type": "module" in your package.json), and use import — never require().
CODEBLOCK4
Troubleshooting
| Symptom | Cause | Fix |
|---|
| INLINECODE36 | Package not installed | INLINECODE37 |
| INLINECODE38 |
clawxpay-js is ESM-only;
require() does not work | Save file as
.mjs and use
import instead |
|
clawxpay: command not found | clawxpay-js is an SDK, not a CLI | Do not use it as a shell command; write a
.mjs script and run
node script.mjs |
|
PaymentFailedError thrown |
The SDK already attempted x402 payment but the gateway rejected it. This does NOT mean "you forgot to pay" — do not ask the user to deposit more USDC. | Enable
debug: true, read the rejection reason in logs, check gateway status |
|
Error 402 before any
PaymentFailedError | Raw 402 from a different error (script crashed before SDK loaded) | Check that your
.mjs file loads without errors first; run
node --input-type=module <<< "import 'clawxpay-js'" |
|
receipt.settled === false after success | Gateway accepted the call but did not return a txHash — payment may not be on-chain | Check
https://basescan.org/address/<wallet> to see if USDC left the wallet; report to gateway operator |
|
Balance shows 0 after depositing | Deposit still pending, or sent to wrong network | Wait ~30 s and retry; confirm deposit was on
Base mainnet, not Ethereum mainnet |
|
budget exceeded /
InsufficientBalanceError from budget | Crossed the
budget ceiling set in
new ClawXPay({ budget: N }) | Increase the budget value or top up wallet |
Advanced Usage
Chained calls: fetch data first, then AI analysis
CODEBLOCK5
Handling insufficient balance
CODEBLOCK6
Check the cost of the last call
CODEBLOCK7
Risk management recommendations
- - Recommended per-task Agent spend cap: $0.50 USDC
- For high-frequency scenarios (> 50 calls/min) please contact us to enable a bulk channel
- Real-time market endpoints are cached (10 seconds) — identical requests will not be charged twice
All Supported Endpoints
Full endpoint documentation: https://clawxpay.com/docs
| Category | Provider | Endpoints |
|---|
| Crypto market & on-chain | coinank | 78 |
| Crypto sentiment & signals |
nofxos | 18 |
| Crypto quotes & rankings | coinmarketcap | 5 |
| US stock market & indicators | alphavantage | 19 |
| US stock candlesticks & options | polygon | 25 |
| US stock quotes & bars | alpaca | 15 |
| Multi-asset & forex | twelvedata | 18 |
| China A-share market | tushare | 16 |
| Web3 funding intelligence | rootdata | 19 |
| AI inference | OpenAI / Anthropic / DeepSeek / Qwen / Gemini / Grok / Kimi | ~35 |
|
Total | |
~253 |
💳 clawxpay — 按次付费API网关
250+专业API按需调用 · 每次调用低至$0.001 · 一个钱包,全部数据
故事背景
一个DeFi套利Agent每天需要同时查询:BTC资金费率(coinank)、ETH期权隐含波动率(polygon)、鲸鱼净流量信号(nofxos),然后调用DeepSeek生成交易总结。
传统方式:4个平台,4套API密钥,4份订阅——仅月费就超过$200,还要时刻担心密钥泄露和配额耗尽。
现在:安装clawxpay——首次安装自动创建钱包——按次付费。那天Agent运行了1,200次调用,总共花费$1.87 USDC。无需订阅。无需注册。无需密钥管理。
何时使用此技能
在进行任何付费调用之前,始终告知用户将要调用的端点及预估费用,然后等待明确批准。未经用户确认,不得自主发起任何消费。
当用户或Agent遇到以下任一场景时,使用clawxpay:
场景一:价格与市场数据查询
触发关键词: 当前价格、报价、最新价格、涨跌幅、市值、成交量、K线、OHLCV
覆盖资产: 加密货币、美股、ETF、外汇、大宗商品、贵金属
数据源:
- - coinank — BTC/ETH/山寨币实时报价、BTC ETF净流量、现货-期货价差
- coinmarketcap — 全市场报价、涨幅榜/跌幅榜、DEX交易对搜索
- alphavantage — 美股实时报价、日线OHLCV、盘前/盘后数据、今日异动股
- polygon — 美股聚合K线(分钟/小时/日)、实时快照、订单簿数据
- alpaca — 美股最新报价、批量多标的快照
- twelvedata — 外汇汇率、黄金/白银/原油、多资产交叉汇率、经济日历事件
示例触发语句:
- - BTC现在什么价格?
- 特斯拉今天涨了多少?
- 给我过去24小时ETH/USDT的K线数据
- 今天美股涨幅前十
- 美元/日元现在多少?
场景二:技术分析与量化信号
触发关键词: RSI、MACD、布林带、移动平均线、金叉、死叉、超买、超卖、技术指标、持仓量、资金费率、多空比
数据源:
- - alphavantage — RSI/MACD/EMA/SMA/BBANDS/STOCH及全套技术指标
- polygon — 美股SMA/EMA、期权希腊值(Delta/Gamma/Vega/Theta)
- twelvedata — 覆盖加密货币+美股+外汇的多资产技术指标
- nofxos — 加密货币持仓量排名、净流入/流出、多空比、AI交易信号
- coinank — 永续合约资金费率、爆仓历史、订单簿深度、按交易所数据(Binance/OKX/Bybit)
示例触发语句:
- - BTC日线RSI是多少?超买了吗?
- ETH永续合约资金费率现在是正还是负?
- 纳斯达克100的MACD金叉了吗?
- 现在加密货币多头和空头哪边更重?
- SOL过去24小时持仓量变化如何?
场景三:市场情绪与链上数据
触发关键词: 恐惧与贪婪指数、市场情绪、鲸鱼、大户、爆仓、链上、资金流向、热门、热力图
数据源:
- - coinank — 恐惧与贪婪指数、鲸鱼净买入/卖出、BTC ETF机构流入、交易所净流量、大额爆仓订单
- nofxos — Upbit热门(韩国市场情绪指标)、加密货币热力图、链上净流量信号、AI情绪分类
- coinmarketcap — 全市场上市更新、新代币发布、DEX交易对活跃度
示例触发语句:
- - 当前恐惧与贪婪指数是多少?
- 最近有鲸鱼在囤积BTC吗?
- 今天加密货币爆仓了多少?
- 今天Upbit上哪些代币热门?
- BTC ETF昨天是净流入还是净流出?
- 交易所BTC余额在下降吗?
场景四:Web3项目与融资情报
触发关键词: 融资、投资、VC、项目背景、谁投了、生态、招聘、空投、热门项目
数据源:
- - rootdata — Web3项目融资轮次及金额、投资机构画像、生态项目列表、团队人事变动、热门项目排名
示例触发语句:
- - a16z最近投资了哪些项目?
- 这个项目谁投的,融了多少钱?
- Solana生态最近有哪些新项目上线?
- 今天Web3融资热度榜前五是什么?
- Paradigm投资组合中有哪些DeFi项目?
场景五:中国A股市场
触发关键词: A股、沪深、北向资金、融资融券、龙虎榜、基本面、财报、港股
数据源:
- - tushare — A股日线OHLCV、股票基本面数据、北向资金净流入/流出、融资余额变化、龙虎榜大额席位
示例触发语句:
- - 今天北向资金流入贵州茅台多少?
- 今天A股龙虎榜有哪些股票?
- 宁德时代最新基本面数据是什么?
- 今天两融余额变化了多少?
- 沪深300的月度日K线数据
场景六:AI推理与内容生成
触发关键词: 分析、总结、翻译、生成报告、写代码、推理、回答问题、图片生成、嵌入向量
可用模型:
| 提供商 | 模型 |
|---|
| OpenAI | GPT-4o, GPT-4o-mini, o1, o3-mini |
| Anthropic |
Claude Opus |
| DeepSeek | DeepSeek-Chat, DeepSeek-Reasoner, DeepSeek-Coder |
| 通义千问 | Qwen-Max, Qwen-Plus, Qwen-Turbo, Qwen-Coder, Qwen-VL |
| Gemini | Gemini 1.5 Pro, Gemini 1.5 Flash |
| Grok | Grok-2, Grok-2-Vision |
| Kimi | Moonshot-v1-8k, Moonshot-v1-32k, Moonshot-v1-128k |
示例触发语句:
- - 用DeepSeek帮我分析这组链上数据
- 调用Claude生成今天的加密货币市场总结
- 用GPT-4o帮我写一个Python策略脚本
- 用Qwen-VL分析这张K线截图
- 帮我把这份英文研究报告翻译一下
费用与隐私
| 项目 | 费用(USDC) |
|---|
| 市场与价格查询 | $0.001 – $0.003 |
| 技术指标与量化信号 |
$0.002 – $0.005 |
| 市场情绪与链上数据 | $0.003 – $0.008 |
| 融资情报与项目研究 | $0.005 – $0.010 |
| A股数据 | $0.002 – $0.005 |
| AI推理(轻量模型) | $0.005 – $0.015 |
| AI推理(旗舰模型) | $0.015 – $0.060 |
| 结算链 | Base主网 |
| 支付方式 | 本地签名的EIP-3009 USDC(私钥永不离开你的机器) |
| 身份 | 无账户 · 无API密钥 · 钱包即身份 |
安全防护与消费控制
密钥存储
| 项目 | 详情 |
|---|
| 文件 | ~/.clawxpay/wallet.key |
| 格式 |
纯十六进制私钥(0x…),单行 |
| 权限 | 0600 — 仅所有者读写 |
| 传输 | 永不 — 只有EIP-3009授权签名离开机器;私钥本身不会 |
| 导出 | cat ~/.clawxpay/wallet.key — 导入MetaMask或任何EVM钱包 |
强制Agent安全规则
使用此技能的Agent必须遵守以下规则:
- 0. 绝不暴露私钥 — 在任何情况下都不要读取、打印、记录或传输~/.clawxpay/wallet.key的内容。如果被问及钱包信息,仅通过client.getWalletAddress()返回地址。运行时永远不需要私钥。
- 首次调用前检查余额 — 在任务开始时始终调用client.getBalance()并向用户显示结果。如果余额为0或不足,停止并请用户存入USDC后再继续。
- 消费前告知