Skip to content

feat(agentkit): add Curade action provider for x402-paid prediction-market and funding data - #1622

Open
sryantrabot wants to merge 13 commits into
coinbase:mainfrom
sryantrabot:curade-provider
Open

sryantrabot wants to merge 13 commits into
coinbase:mainfrom
sryantrabot:curade-provider

Conversation

@sryantrabot

Copy link
Copy Markdown

Adds a curade action provider under typescript/agentkit/src/action-providers/curade/, following the existing provider layout (modeled on the defillama/dtelecom providers).

What it does

  • Four tools that call the Curade API (https://api.curade.xyz), an x402-paid market-data API serving derived, venue-attributed analytics over Polymarket, Kalshi, and Hyperliquid data (its prediction-market coverage also spans Limitless):
    • curade_polymarket_odds — GET /v1/polymarket/odds (limit/q params), $0.005/call
    • curade_polymarket_disagreement — GET /v1/polymarket/disagreement, $0.02/call
    • curade_polymarket_package — GET /v1/polymarket/package (market param), $2.00 one-time purchase
    • curade_hyperliquid_funding — GET /v1/funding/current, $0.001/call
  • Unpaid calls return HTTP 402; per x402 v2 the challenge arrives base64-encoded in the Payment-Required response header (the body is empty), and the tools decode and surface it verbatim instead of throwing. The provider never signs payments — pair it with AgentKit's x402ActionProvider (or any x402 client), then retry the identical request with the payment header named by the challenge's error field (our challenge reads Payment-Signature header is required). If agents should buy the $2.00 package, raise x402ActionProvider's maxPaymentUsdc above its 1.0 USDC default.

Files

  • curadeActionProvider.ts / schemas.ts / index.ts / README.md — the provider (fetch-only; no wallet params, mirroring the defillama provider shape)
  • curadeActionProvider.test.ts — colocated jest tests with mocked global.fetch (402 challenge decoded from the Payment-Required header, 200 passthrough, HTTP-error and fetch-failure strings, query-param building)
  • .changeset/curade-action-provider.md — patch bump per CONTRIBUTING-TYPESCRIPT (new action provider)
  • one export line added to typescript/agentkit/src/action-providers/index.ts (alphabetical: between compound and defillama)

No new dependencies (uses global fetch + existing zod).

@cb-heimdall

Copy link
Copy Markdown

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/2
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
1 if authored by an app that is not allowlisted and lacks verified human attribution 0
Sum 2

@github-actions github-actions Bot added documentation Improvements or additions to documentation action provider New action provider typescript labels Nov 4, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action provider New action provider documentation Improvements or additions to documentation typescript

Development

Successfully merging this pull request may close these issues.

2 participants