datapoint.market_ ALPHA v0.0.1

Programmatic API

Everything you can do in the dashboard, you can also do from code — over a plain REST API or over MCP. Both are the control plane (manage your endpoints), authenticated by an automation key. This is separate from the paid x402 relay your buyers call.

Your key is for you — not your buyers. An empk_… automation key authenticates you managing your account here. Your buyers never use a key at all — they pay per call with x402. See buyer docs for that side.

1 · Mint an automation key

A provider-admin key is a secret string prefixed empk_. It's shown once at creation and only its hash is stored — copy it immediately. Mint as many as you like (one per script/CI job is good practice) and revoke any of them independently.

From the dashboard

DashboardAutomation keys → give it a label → Create key. Copy the empk_… value shown.

Or over REST

You can also mint from an existing session cookie or another key:

curl -X POST https://api.datapoint.market/dashboard/automation-keys \ -H "Authorization: Bearer empk_existingkey…" \ -H "Content-Type: application/json" \ -d '{"name": "ci-deploy"}' → { "id": "…", "key": "empk_live_9f3c…", "note": "store this now; not shown again" }

List your keys (prefix + lifecycle only, never the secret) with GET /dashboard/automation-keys; revoke one with DELETE /dashboard/automation-keys/<id>. Revoked keys stop authenticating immediately.

Agents: join with only a wallet (no email)

An autonomous agent can create a provider account and mint its first key with nothing but the wallet it wants payouts to — sign a challenge, get a key. The signing wallet is registered as a verified default payout wallet, and re-signing later mints a fresh key (that's also your key recovery — no inbox needed). EVM signatures are EIP-191 personal_sign; Stellar signatures are ed25519 over the message, hex-encoded.

# 1) get a challenge (network: eip155:8453 | eip155:84532 | stellar:pubnet | stellar:testnet) curl -X POST https://api.datapoint.market/auth/wallet/challenge \ -H "Content-Type: application/json" \ -d '{"address": "0xYourWallet…", "network": "eip155:8453"}' → { "message": "datapoint.market wants you to sign in…", "expires_at": "…" } # 2) sign `message` with the wallet key (personal_sign / ed25519 — no gas) # 3) trade the signature for an account + your first automation key curl -X POST https://api.datapoint.market/auth/wallet/verify \ -H "Content-Type: application/json" \ -d '{"message": "…signed message…", "signature": "0x…"}' → { "provider": { "slug": "agent-ab12cd" }, "automation_key": { "key": "empk_…" } }

1b · Spending keys (let an agent pay from a managed wallet)

A spending key (spk_…) is a buyer-side credential: it lets your agent spend from a managed wallet — the small, capped wallet we hold on your behalf — without ever handling a private key or signing a transaction. You present the key; we sign and settle the x402 payment for you.

spk_ is not empk_. Never give an agent your automation key. An empk_ automation key is full account admin — it can create, edit, and delete every endpoint and mint more keys. A spk_ spending key can do exactly one thing: spend up to its caps, from one wallet, until it expires — and you can revoke it instantly. Hand agents spk_, keep empk_ for yourself.

Create one (dashboard)

DashboardAgent spending wallets → under a funded wallet → Spending keys → set an expiry (and optional budget / per-call caps) → Create key. The spk_… value is shown once.

Or over REST

# Mint a key scoped to your Base managed wallet (expiry required; caps optional) curl -X POST https://api.datapoint.market/dashboard/managed-wallet/base/keys \ -H "Authorization: Bearer empk_existingkey…" \ -H "Content-Type: application/json" \ -d '{"name": "research-agent", "ttl": "30d", "budget_usd": "5", "max_per_call_usd": "0.50"}' → 201 { "key": "spk_9f3c…", "prefix": "9f3c…", "expires_at": "…", "budget_usd": "5.000000", "max_per_call_usd": "0.500000", "active": true, "note": "store this now — it will not be shown again" }

ttl is 24h or 30d. Omit budget_usd / max_per_call_usd to rely on the wallet's $10 cap alone. List keys (prefix + caps + spend, never the secret) with GET /dashboard/managed-wallet/<chain>/keys; revoke one with DELETE /dashboard/managed-wallet/<chain>/keys/<id>. Revoking the wallet kills every key under it.

How the agent uses it

The agent calls any paid relay URL with an X-SPENDING-KEY header instead of signing an x402 payment itself — no wallet, no 402 round-trip. We resolve the key, sign the payment with the managed wallet on its behalf, settle, and return the result:

curl https://api.datapoint.market/r/<provider>/<endpoint> \ -H "X-SPENDING-KEY: spk_9f3c…" → 200 (origin response) + X-PAYMENT-RECEIPT: <base64 receipt>

Every spend is checked against the key's per-call ceiling, remaining budget, expiry, and the wallet's balance before we sign — a leaked or buggy agent can never exceed what you scoped — and the wallet is debited only after the payment settles on-chain. Keep the key in the agent's secret store; rotate by minting a new one and revoking the old.

Recommended path is still BYO wallet. Managed wallets + spending keys are training wheels for buyers who aren't crypto-native; for ongoing or higher-value use, point your agent at your own wallet (no cap, no custody). Custodial spend is live on Base and Solana.

2 · Use the REST API

Send the key as a bearer token on any /dashboard/* route. Base URL: https://api.datapoint.market (your deployment's API origin).

Method & pathWhat it does
GET /dashboard/endpointsList your endpoints (relays + MCP wrappers), status, relay URLs.
POST /dashboard/endpoints/apiCreate a paid API relay over an HTTP origin.
POST /dashboard/endpoints/mcpWrap an upstream MCP server, pricing each tool.
POST /dashboard/endpoints/<id>/publishPublish (status→active); with public listing, adds it to the marketplace.
GET /dashboard/walletsList payout wallets.
POST /dashboard/wallets/externalAdd a BYO payout wallet.
GET / POST / DELETE /dashboard/automation-keysList, mint, revoke automation keys.
GET / POST / DELETE /dashboard/managed-wallet/<chain>/keysList, mint, revoke spending keys for a managed wallet.

Create a paid API relay

curl -X POST https://api.datapoint.market/dashboard/endpoints/api \ -H "Authorization: Bearer empk_live_9f3c…" \ -H "Content-Type: application/json" \ -d '{ "name": "Weather API", "slug": "weather", "origin_url": "https://api.example.com/v1/weather", "method": "GET", "price_usd": "0.01", "networks": ["eip155:84532"], "pay_to": "0xYourPayoutWallet", "public_listing": true }' → 201 { "id": "…", "relay_url": "https://api.datapoint.market/r/acme/weather", "status": "draft", "environment": "test", … }

It's created as a draft. Publish it to mint the live URL:

curl -X POST https://api.datapoint.market/dashboard/endpoints/<id>/publish \ -H "Authorization: Bearer empk_live_9f3c…"

Wrap an MCP server

Point at an upstream MCP server and price each tool independently. Buyers call the wrapped server at /m/<provider>/<slug>; each tool invocation settles its own price_usd.

curl -X POST https://api.datapoint.market/dashboard/endpoints/mcp \ -H "Authorization: Bearer empk_live_9f3c…" \ -H "Content-Type: application/json" \ -d '{ "name": "Acme Tools", "slug": "acme-tools", "origin_url": "https://mcp.example.com", "networks": ["eip155:84532"], "pay_to": "0xYourPayoutWallet", "public_listing": true, "tools": [ { "name": "search", "description": "Full-text search over the corpus.", "input_schema": { "type": "object", "properties": { "q": { "type": "string" } } }, "price_usd": "0.02" }, { "name": "summarize", "price_usd": "0.05" } ] }' → 201 { "id": "…", "mcp_url": "https://api.datapoint.market/m/acme/acme-tools", "status": "draft", "environment": "test", … }

Like relays, it's a draft — publish it with the same /dashboard/endpoints/<id>/publish call.

Test vs live endpoints

environment is inferred from networks — all-testnet networks → test, all-mainnet → live (mixing the two is rejected). Deploy a testnet trial and a mainnet paid version as a linked pair, and rate-limit the trial:

  • environment"test" | "live" (optional; inferred from networks).
  • linked_endpoint_id — id of the sibling in the other environment (link is bidirectional; same-environment link is rejected).
  • trial_rate_limit — max settled calls per buyer wallet (falls back to client IP) per window. Test endpoints only.
  • trial_rate_window_seconds — rolling window for the limit (default 3600).

The trial still requires real testnet USDC payment — there's no free path; the limit just caps how often one wallet can call before settling on a paid mainnet endpoint. Exceeding it returns 429 with a Retry-After header (no gas spent).

3 · Use the management MCP

The same operations are exposed as MCP tools at POST /mcp (JSON-RPC 2.0) so you can drive datapoint.market straight from an MCP client or agent. initialize, ping, and tools/list are open; tools/call requires the bearer key.

Available tools

  • list_endpoints — your endpoints + status + relay URLs.
  • create_api_relay — same fields as the REST body above.
  • create_mcp_wrapper — wrap an MCP server, price each tool.
  • create_dataset — sell a file (CSV/Parquet/JSONL/ZIP) as a one-time paid download.
  • publish_endpoint{ "endpoint_id": "…" }.
  • list_automation_keys / revoke_automation_key.

Full tool catalog (buying included): MCP tools reference. Discovery is public — the machine-readable marketplace feed lives at https://api.datapoint.market/discover.json.

List the tool catalog (no auth)

curl -X POST https://api.datapoint.market/mcp \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Call a tool (authenticated)

curl -X POST https://api.datapoint.market/mcp \ -H "Authorization: Bearer empk_live_9f3c…" \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": { "name": "create_api_relay", "arguments": { "name": "Weather API", "slug": "weather", "origin_url": "https://api.example.com/v1/weather", "method": "GET", "price_usd": "0.01", "networks": ["eip155:84532"], "pay_to": "0xYourPayoutWallet", "public_listing": true } } }'

Add the management MCP to your client with URL https://api.datapoint.market/mcp and header Authorization: Bearer empk_…. This is the control plane — not the paid relay at /m/<you>/<server>.