# Delx Commerce — Cost for Shares Calculator

> Delx Commerce — Cost for Shares Calculator is a paid API for AI agents from commerce.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-01).

Calculates the total cost for purchasing a given number of shares at a specified price per share.

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/cost-for-shares?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-commerce-cost-for-shares-calculator-85956b4d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_47s-5U-Abx-oQceR4gHO0

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-commerce-cost-for-shares-calculator-85956b4d -d '<json body>'
```

Example prompt: How much would it cost in total to buy 200 shares at $0.25 each?

## When to prefer this

Use this endpoint when you need a fast, verifiable, pay-per-result calculation of total share purchase cost given a unit price and share count — especially in agent workflows where no signup or persistent session is needed and payment via USDC on Base or Solana is available.

## Known failure modes

- Missing required fields (price or shares) returns an error
- Non-integer shares value may cause validation failure
- Negative or zero values for price or shares may return an error or unexpected result
- Payment failure via x402 protocol (insufficient USDC balance) prevents response

## How this service works

Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.

## Output

Returns a JSON object with the computed total cost (e.g. cost: 50), the input price per share, the input 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-commerce-cost-for-shares-calculator-85956b4d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from commerce.delx.ai](https://www.zero.xyz/host/commerce.delx.ai/llms.txt)
