{
  "format": "delx/intent-card/v1",
  "id": "avg-entry-api",
  "intent": "Average Entry Price for an agent workflow",
  "title": "Average Entry Price API for agents",
  "description": "Volume-weighted average entry across fill price/size pairs. Call when averaging multiple fills into one book cost basis. Returns average entry and total size 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": [
    "Average Entry Price API",
    "Average Entry Price for agents",
    "pay per result API",
    "x402 API",
    "no API key"
  ],
  "updated_at": "2026-08-23",
  "canonical_url": "https://commerce.delx.ai/intents/avg-entry-api",
  "machine_url": "https://commerce.delx.ai/intents/avg-entry-api.json",
  "recommendation": {
    "tool_name": "util_avg_entry",
    "service_name": "Average Entry Price",
    "method": "POST",
    "resource": "https://api.delx.ai/api/v1/x402/avg-entry",
    "price_usdc": "0.001",
    "payment_protocols": [
      "x402",
      "mpp"
    ],
    "input_schema": {
      "type": "object",
      "properties": {
        "fills": {
          "description": "Input field: fills.",
          "type": "array"
        }
      },
      "required": [
        "fills"
      ],
      "additionalProperties": true
    },
    "example_input": {
      "fills": [
        {
          "price": 10,
          "size": 1
        },
        {
          "price": 12,
          "size": 3
        }
      ]
    },
    "example_output": {
      "schema": "delx/util-avg-entry/v1",
      "avg_entry": 11.5,
      "total_size": 4,
      "fills": 2
    },
    "agentcash": {
      "buy": "npx agentcash@latest fetch https://api.delx.ai/api/v1/x402/avg-entry -m POST -H 'x-delx-source: intent-card-avg-entry-api' --max-amount 0.001 -b '{\"fills\":[{\"price\":10,\"size\":1},{\"price\":12,\"size\":3}]}'",
      "max_amount_usdc": "0.001"
    }
  },
  "attribution": {
    "header": "x-delx-source",
    "value": "intent-card-avg-entry-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/avg-entry"
  }
}
