polyox-nba

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).

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 "polyox-nba" with this command: npx skills add coinbase/agentic-wallet-skills

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

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

MethodPathDescription
GET/nba/teamsList all teams
GET/nba/teams/{id}Get one team
GET/nba/gamesList games (filter: date, from, to, status, season, teamId)
GET/nba/games/{id}Get one game
GET/nba/games/{id}/marketsPolymarket markets for a game
GET/nba/games/contextFull matchup context — requires date, home, away
GET/nba/playersList players (filter: search, isActive, teamId)
GET/nba/players/{id}Get one player
GET/nba/team-statsTeam game stats (filter: gameId, teamId)
GET/nba/player-statsPlayer game stats (filter: gameId, playerId, teamId)
GET/nba/injury-reportsList injury reports
GET/nba/injury-reports/latestLatest entries (filter: team, status, date)

Polymarket

MethodPathDescription
GET/polymarket/eventsList events (filter: date, search)
GET/polymarket/marketsList markets (filter: eventId, search)
GET/polymarket/priceLive CLOB prices (tokenId or marketIds)
GET/polymarket/orderbookLive CLOB orderbook (tokenId or marketIds)

All list endpoints support page and pageSize query params.


Paid endpoint — x402 protocol

POST /nba/analysis

AI-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"
}

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"

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:

FlagDescription
-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)
--jsonOutput 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)

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.

Research

Tradealpha Realtime News

Fetch realtime TradeAlpha news across Reuters, Bloomberg, Truth Social, research alerts, and domestic news sources via `POST /api/v1/news/realtime_news`. Use...

Registry SourceRecently Updated
Research

Max-Self-Improvement

MiniMax Agent self-evolution system with 5-layer memory for continuous learning, error analysis, and persistent personalized context management.

Registry SourceRecently Updated
Research

AI Lead Magnet

Researches your audience’s exact needs, builds a high-converting lead magnet with full copy, automated delivery, promo video, and distribution plan to gain 5...

Registry SourceRecently Updated
Research

Gougoubi Arena Trade

Trade in the Gougoubi AI Trading Arena — a $10,000 simulated-USDT paper trading leaderboard fulfilled against real Binance / OKX / HTX / Hyperliquid order bo...

Registry SourceRecently Updated