NBA 数据 × Polymarket × AI 分析
简介
PolyOx NBA 聚合 API,融合实时赛事数据、Polymarket 预测市场赔率及 AI 对战分析,采用 x402 协议实现无需 Gas 的链下签名支付,适合量化交易与预测分析场景。
原始描述
Query the PolyOx API for NBA data, Polymarket predictions, and AI matchup analysis. The analysis endpoint uses the x402 payment protocol (USDC on Base Sepolia).
通过你的 Agent 添加
安装目录:polyox-nba/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心用法
PolyOx NBA API 是一个面向预测市场与体育数据分析的综合性数据服务,主要提供三大能力模块:
1. 免费数据层
- NBA 实时/历史赛事数据:球队、球员、比赛、伤病报告、技术统计
- Polymarket 预测市场数据:事件、市场、实时 CLOB 价格、订单簿深度
- 对战上下文聚合:单场比赛的伤病情况、近期状态、预测市场赔率综合视图
2. 付费 AI 分析层(x402 支付)
POST /nba/analysis提供 AI 驱动的 matchup 深度分析- 采用 x402 协议——HTTP 原生支付标准,用户收到 HTTP 402 后提交 EIP-712 签名授权 USDC 转账,无需链上 Gas
3. 集成方式
- 推荐路径:Coinbase Agentic Wallet(CLI 一键支付,无私钥管理)
- 开发者路径:Node.js/TypeScript SDK(
@x402/fetch等)
显著优点
- 预测市场原生整合:直接对接 Polymarket CLOB,获取真实资金流向的赔率信号,区别于传统体育数据 API
- AI + 数据融合:付费端点将结构化数据与生成式分析结合,降低用户自主建模门槛
- 无 Gas 支付体验:x402 的链下签名模式消除了小额支付的摩擦,适合高频 API 调用
- 多集成路径:从无代码 CLI 到全代码 SDK 覆盖不同技术栈用户
潜在局限与风险
维度
说明
网络限制
仅支持 Base Sepolia 测试网,主网迁移时间未定
资金门槛
需持有测试网 USDC, faucets 获取存在摩擦
签名复杂度
纯 curl 无法完成 EIP-712 签名,必须依赖 SDK 或 Agentic Wallet
数据权威性
赛事数据未注明官方来源,Polymarket 赔率反映市场预期而非真实概率
智能合约风险
x402 结算依赖链上合约,合约未审计信息未披露
适合人群
- 预测市场做市商与套利交易者
- 体育量化分析师(需融合赔率信号)
- AI Agent 开发者(需结构化体育数据 + 分析能力)
- 对链上支付实验感兴趣的开发者
常规风险
- 测试网资产归零风险:Sepolia USDC 无实际价值,主网迁移时可能需重新配置
- API 稳定性:服务处于早期版本(v0.2),端点行为可能变更
- x402 协议成熟度:作为新兴支付标准,客户端库和生态支持仍在完善
| 维度 | 说明 |
|---|---|
| 网络限制 | 仅支持 Base Sepolia 测试网,主网迁移时间未定 |
| 资金门槛 | 需持有测试网 USDC, faucets 获取存在摩擦 |
| 签名复杂度 | 纯 curl 无法完成 EIP-712 签名,必须依赖 SDK 或 Agentic Wallet |
| 数据权威性 | 赛事数据未注明官方来源,Polymarket 赔率反映市场预期而非真实概率 |
| 智能合约风险 | x402 结算依赖链上合约,合约未审计信息未披露 |
适合人群
- 预测市场做市商与套利交易者
- 体育量化分析师(需融合赔率信号)
- AI Agent 开发者(需结构化体育数据 + 分析能力)
- 对链上支付实验感兴趣的开发者
常规风险
- 测试网资产归零风险:Sepolia USDC 无实际价值,主网迁移时可能需重新配置
- API 稳定性:服务处于早期版本(v0.2),端点行为可能变更
- x402 协议成熟度:作为新兴支付标准,客户端库和生态支持仍在完善
- 测试网资产归零风险:Sepolia USDC 无实际价值,主网迁移时可能需重新配置
- API 稳定性:服务处于早期版本(v0.2),端点行为可能变更
- x402 协议成熟度:作为新兴支付标准,客户端库和生态支持仍在完善
技能正文
name: polyox-nba
description: >
Query the PolyOx API for NBA data, Polymarket predictions, and
AI matchup analysis. The analysis endpoint uses the x402 payment
protocol (USDC on Base Sepolia).
metadata:
author: polyox
version: "0.2"
PolyOx NBA API
Base URL: https://api-hoobs.polyox.io
All responses are JSON. Paginated endpoints return { data, page, pageSize, total }.
Step 0 — Check your wallet
Before calling any paid endpoint you need an EVM wallet with USDC on Base Sepolia.
Already have a wallet? Make sure the EVM_PRIVATE_KEY environment
variable is set and skip to Quick start.
Don't have a wallet? Set one up with Coinbase Agentic Wallet — a CLI wallet built for AI agents. No private key management required.
Set up Coinbase Agentic Wallet
Prerequisites: Node.js 24+ and an email address.
# Install the agentic-wallet skills (one-time)
npx skills add coinbase/agentic-wallet-skills
Authenticate
# 1. Start login — sends a 6-digit code to your email
npx awal@latest auth login agent@example.com
# 2. Verify with the code you received
npx awal@latest auth verify <flowId> <otp>
# 3. Confirm authentication
npx awal@latest status
Check address & balance
npx awal@latest address
npx awal@latest balance
Fund your wallet
# 1. Start login — sends a 6-digit code to your email
npx awal@latest auth login agent@example.com
# 2. Verify with the code you received
npx awal@latest auth verify <flowId> <otp>
# 3. Confirm authentication
npx awal@latest status
npx awal@latest address
npx awal@latest balance
Fund your wallet
Get testnet USDC from the Base Sepolia faucet, or ask another agent / user to send USDC to your wallet address.
Full Agentic Wallet docs: https://docs.cdp.coinbase.com/agentic-wallet/quickstart
Quick start
# Today's games
curl "https://api-hoobs.polyox.io/nba/games?date=2026-02-08"
# Matchup context (injuries, recent form, Polymarket odds)
curl "https://api-hoobs.polyox.io/nba/games/context?date=2026-02-08&home=MIN&away=LAC"
# Latest injury report
curl "https://api-hoobs.polyox.io/nba/injury-reports/latest"
Free endpoints
NBA
Method
Path
Description
GET
/nba/teams
List all teams
GET
/nba/teams/{id}
Get one team
GET
/nba/games
List games (filter: date, from, to, status, season, teamId)
GET
/nba/games/{id}
Get one game
GET
/nba/games/{id}/markets
Polymarket markets for a game
GET
/nba/games/context
Full matchup context — requires date, home, away
GET
/nba/players
List players (filter: search, isActive, teamId)
GET
/nba/players/{id}
Get one player
GET
/nba/team-stats
Team game stats (filter: gameId, teamId)
GET
/nba/player-stats
Player game stats (filter: gameId, playerId, teamId)
GET
/nba/injury-reports
List injury reports
GET
/nba/injury-reports/latest
Latest entries (filter: team, status, date)
Polymarket
# Today's games
curl "https://api-hoobs.polyox.io/nba/games?date=2026-02-08"
# Matchup context (injuries, recent form, Polymarket odds)
curl "https://api-hoobs.polyox.io/nba/games/context?date=2026-02-08&home=MIN&away=LAC"
# Latest injury report
curl "https://api-hoobs.polyox.io/nba/injury-reports/latest"
NBA
| Method | Path | Description |
|---|---|---|
| GET | /nba/teams |
List all teams |
| GET | /nba/teams/{id} |
Get one team |
| GET | /nba/games |
List games (filter: date, from, to, status, season, teamId) |
| GET | /nba/games/{id} |
Get one game |
| GET | /nba/games/{id}/markets |
Polymarket markets for a game |
| GET | /nba/games/context |
Full matchup context — requires date, home, away |
| GET | /nba/players |
List players (filter: search, isActive, teamId) |
| GET | /nba/players/{id} |
Get one player |
| GET | /nba/team-stats |
Team game stats (filter: gameId, teamId) |
| GET | /nba/player-stats |
Player game stats (filter: gameId, playerId, teamId) |
| GET | /nba/injury-reports |
List injury reports |
| GET | /nba/injury-reports/latest |
Latest entries (filter: team, status, date) |
| Method | Path | Description |
|---|---|---|
| GET | /polymarket/events |
List events (filter: date, search) |
| GET | /polymarket/markets |
List markets (filter: eventId, search) |
| GET | /polymarket/price |
Live CLOB prices (tokenId or marketIds) |
| GET | /polymarket/orderbook |
Live CLOB orderbook (tokenId or marketIds) |
All list endpoints support page and pageSize query params.
Paid endpoint — x402 protocol
POST /nba/analysis
POST /nba/analysisAI-powered matchup analysis. Payment via x402 — the HTTP-native payment standard.
- Network: Base Sepolia (chain ID
84532) - Token: USDC at
0x036CbD53842c5426634e7929541eC2318f3dCF7e - Protocol docs: https://docs.x402.org
Request body
{
"date": "2026-02-08",
"home": "MIN",
"away": "LAC"
}
{
"date": "2026-02-08",
"home": "MIN",
"away": "LAC"
}
All three fields required. date is YYYY-MM-DD, home/away are team abbreviations.
How x402 works (step by step)
Step 1 — Send the request
Make a normal HTTP request. The server will respond with HTTP 402.
curl -s -D - -X POST \
-H "Content-Type: application/json" \
-d '{"date":"2026-02-08","home":"MIN","away":"LAC"}' \
"https://api-hoobs.polyox.io/nba/analysis"
Step 2 — Parse the 402 response
The 402 response includes a PAYMENT-REQUIRED header. Decode it from base64 to get the payment requirements:
# Extract and decode the payment requirements
PAYMENT_REQUIRED=$(curl -s -D - -X POST \
-H "Content-Type: application/json" \
-d '{"date":"2026-02-08","home":"MIN","away":"LAC"}' \
"https://api-hoobs.polyox.io/nba/analysis" \
| grep -i "payment-required" | cut -d' ' -f2 | tr -d '\r')
echo "$PAYMENT_REQUIRED" | base64 -d | jq .
The decoded JSON contains:
{
"maxAmountRequired": "...",
"resource": "...",
"payTo": "0x...",
"asset": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
"network": "eip155:84532",
"expiresAt": "...",
"nonce": "...",
"paymentId": "...",
"accepts": [{ "scheme": "exact", "network": "eip155:84532" }]
}
Step 3 — Sign and construct the payment
Using the payment requirements, create an EIP-712 typed-data signature that authorises the USDC transfer. This is an off-chain signature — no gas spent.
The signature must be sent as a base64-encoded JSON payload in the
PAYMENT-SIGNATURE header when retrying the request.
Important: The EIP-712 signing step requires a crypto library. Pure curl
cannot sign. Use one of the approaches below.
Step 4 — Retry with payment
curl -X POST \
-H "Content-Type: application/json" \
-H "PAYMENT-SIGNATURE: <base64_encoded_signed_payload>" \
-d '{"date":"2026-02-08","home":"MIN","away":"LAC"}' \
"https://api-hoobs.polyox.io/nba/analysis"
curl -X POST \
-H "Content-Type: application/json" \
-H "PAYMENT-SIGNATURE: <base64_encoded_signed_payload>" \
-d '{"date":"2026-02-08","home":"MIN","away":"LAC"}' \
"https://api-hoobs.polyox.io/nba/analysis"
The server verifies the signature, settles the payment on-chain, and returns
the analysis. A PAYMENT-RESPONSE header is included with settlement proof.
Agent integration options
Choose the approach that matches your setup:
Option A — Coinbase Agentic Wallet (recommended)
The simplest path. If you set up your wallet via awal in Step 0, you can
pay for x402 endpoints in a single command — no code, no private key handling.
# Pay and call the analysis endpoint
npx awal@latest x402 pay \
"https://api-hoobs.polyox.io/nba/analysis" \
-X POST \
-d '{"date":"2026-02-08","home":"MIN","away":"LAC"}'
The awal x402 pay command handles the full 402 → sign → retry flow
automatically. Options:
| Flag | Description |
|---|---|
-X, --method <method> |
HTTP method (default: GET) |
-d, --data <json> |
JSON request body |
-q, --query <params> |
Query parameters |
--max-amount <amount> |
Max USDC to spend (in micro-units) |
--json |
Output raw JSON |
Agentic Wallet skills reference: https://docs.cdp.coinbase.com/agentic-wallet/skills/overview
Option B — Node.js / TypeScript
If you already have an EVM private key and prefer programmatic control:
npm install @x402/fetch @x402/core @x402/evm viem
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`);
const client = new x402Client();
registerExactEvmScheme(client, { signer });
const fetchWithPayment = wrapFetchWithPayment(fetch, client);
const res = await fetchWithPayment(
"https://api-hoobs.polyox.io/nba/analysis",
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ date: "2026-02-08", home: "MIN", away: "LAC" }),
},
);
console.log(await res.json());
Note for AI agents: Option A is the fastest way to get started — no private key required. Option B gives full programmatic control if you already manage your own wallet.
Reference
Team abbreviations: ATL, BOS, BKN, CHA, CHI, CLE, DAL, DEN, DET, GSW, HOU, IND, LAC, LAL, MEM, MIA, MIL, MIN, NOP, NYK, OKC, ORL, PHI, PHX, POR, SAC, SAS, TOR, UTA, WAS
Date format: YYYY-MM-DD
Pagination: page (1-indexed), pageSize (default 50)
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。