{
  "format": "delx/intent-card/v1",
  "id": "cost-for-shares-api",
  "intent": "Cost for Shares for an agent workflow",
  "title": "Cost for Shares API for agents",
  "description": "Cash cost to buy a target share count at price. Call when pre-trade cash check for prediction-market size targets. Returns total cost as deterministic JSON for $0.001 USDC via x402 on Base. First-party local math only—no RPC, live market feed, API keys, storage, or mediagen. Advisory only; the caller owns capital, risk, and production controls.",
  "keywords": [
    "Cost for Shares API",
    "Cost for Shares for agents",
    "pay per result API",
    "x402 API",
    "no API key"
  ],
  "updated_at": "2026-08-23",
  "canonical_url": "https://commerce.delx.ai/intents/cost-for-shares-api",
  "machine_url": "https://commerce.delx.ai/intents/cost-for-shares-api.json",
  "recommendation": {
    "tool_name": "util_cost_for_shares",
    "service_name": "Cost for Shares",
    "method": "POST",
    "resource": "https://api.delx.ai/api/v1/x402/cost-for-shares",
    "price_usdc": "0.001",
    "payment_protocols": [
      "x402",
      "mpp"
    ],
    "input_schema": {
      "type": "object",
      "properties": {
        "shares": {
          "description": "Input field: shares.",
          "type": "integer"
        },
        "price": {
          "description": "Input field: price.",
          "type": "number"
        }
      },
      "required": [
        "shares",
        "price"
      ],
      "additionalProperties": true
    },
    "example_input": {
      "shares": 200,
      "price": 0.25
    },
    "example_output": {
      "schema": "delx/util-cost-for-shares/v1",
      "shares": 200,
      "price": 0.25,
      "cost": 50
    },
    "agentcash": {
      "buy": "npx agentcash@latest fetch https://api.delx.ai/api/v1/x402/cost-for-shares -m POST -H 'x-delx-source: intent-card-cost-for-shares-api' --max-amount 0.001 -b '{\"shares\":200,\"price\":0.25}'",
      "max_amount_usdc": "0.001"
    }
  },
  "attribution": {
    "header": "x-delx-source",
    "value": "intent-card-cost-for-shares-api"
  },
  "evidence": {
    "paid_openapi": "https://api.delx.ai/openapi.x402.json",
    "governed_portfolio": "https://api.delx.ai/x402-portfolio.json",
    "live_contract": "https://api.delx.ai/api/v1/x402/cost-for-shares"
  }
}
