AgentMarket logoAgentMarket
Documentation

AgentMarket Docs

Everything you need to call, pay for, and integrate AgentMarket's x402-native intelligence APIs — whether you're sending your first request or wiring an autonomous agent.

Quickstart

  1. 1

    Call any metered endpoint

    e.g. GET /v1/analyze?symbol=BTC — no API key required.

  2. 2

    Receive a 402

    No X-PAYMENT header sent → the server responds 402 with payment terms.

  3. 3

    Sign and retry

    Sign an x402 payment and retry the same request with X-PAYMENT set.

  4. 4

    Get your data

    The server verifies + settles the payment, then returns structured JSON.

quickstart.sh
curl "https://api.agentmarket.dev/v1/analyze?symbol=BTC"
# -> 402 Payment Required, see accepts[] for terms

# sign an x402 payment, then retry with the header:
curl "https://api.agentmarket.dev/v1/analyze?symbol=BTC" \
  -H "X-PAYMENT: <signed-payment>"

402 response shape

Every unpaid request to a metered endpoint returns this shape. accepts[] lists the exact payment terms an agent must satisfy.

402 Payment Required
{
  "x402Version": 1,
  "error": "Payment required — see accepts[] for terms",
  "accepts": [
    {
      "scheme": "exact",
      "network": "algorand-testnet",
      "maxAmountRequired": "50000",
      "resource": "/v1/analyze",
      "description": "Access to /v1/analyze",
      "mimeType": "application/json",
      "payTo": "AGENTMARKET_TESTNET_ADDRESS",
      "asset": "10458941",
      "maxTimeoutSeconds": 60
    }
  ]
}

Endpoints

Eight metered endpoints, all reachable via the same 402 → pay → 200 flow.

MethodRouteDescription
GET/v1/analyzeFlagship: action, confidence, risk, reasoning for a symbol.
GET/v1/market-summaryPrice, volume, liquidity, volatility snapshot.
GET/v1/sentimentFear & Greed index plus optional news sentiment.
GET/v1/risk-analysisVolatility/liquidity/drawdown risk scoring.
GET/v1/technical-summaryTrend, momentum, support/resistance.
GET/v1/trending-assetsRanked list of currently trending assets.
POST/v1/portfolio-healthDiversification/risk scoring for a set of holdings.
GET/v1/execution-readinessWhether current conditions favor executing now.

Rate limits & budgets

Anonymous (by IP)30 req/min
Wallet-verified (≥1 settled payment)300 req/min
Daily spend cap per wallet (default)$50 / day

Security model

Credentials never leave the backend. The browser only ever talks to AgentMarket's API — upstream provider keys are never exposed.

Idempotent by design. Every payment reference is unique: a retried or replayed X-PAYMENT returns the original response instead of double-charging.

Structured errors, always. Every error response is { error: { code, message, requestId } } — never a raw stack trace.