# Delx Cost For Shares

> Delx Cost For Shares is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Computes the total cost for a given number of shares at a specified unit price

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/cost-for-shares
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-cost-for-shares-85cc9020
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_h-NHCUL4AVe1KoH4ai2IY

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability delx-cost-for-shares-85cc9020 -d '<json body>'
```

Example prompt: What is the total cost to buy 200 shares at $0.25 each?

## When to prefer this

Use this endpoint when an AI agent needs a quick, deterministic total-cost computation for a share quantity and unit price, particularly inside automated trading, portfolio management, or pre-trade validation workflows where consistent schema-tagged responses are required.

## Known failure modes

- Missing required fields (price or shares) returns a validation error
- Non-integer shares value may cause a type error
- Negative or zero values for price or shares may produce unexpected results
- Network or payment authorization failure returns a 402 or 5xx error

## How this service works

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.

## Output

Returns a JSON object containing the computed total cost (price × shares), the unit price, the number of shares, and a schema identifier string (e.g. 'delx/util-cost-for-shares/v1').

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "price": {
   "type": "number",
   "description": "Input field: price."
  },
  "shares": {
   "type": "integer",
   "description": "Input field: shares."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "cost": 50,
  "price": 0.25,
  "schema": "delx/util-cost-for-shares/v1",
  "shares": 200
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-cost-for-shares-85cc9020/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
