# Delx Market ROI Calculator

> Delx Market ROI Calculator is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-16).

Calculates return on investment (ROI) for a prediction market position given an entry price and resolution outcome.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/market-roi?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-market-roi-calculator-b7ffdd65
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_WqkQVxyAXAJOS69ZojF3_

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-market-roi-calculator-b7ffdd65 -d '<json body>'
```

Example prompt: What's the ROI on a prediction market position I entered at 0.4 if it resolved yes?

## When to prefer this

Use this endpoint when you need a fast, deterministic computation of ROI for a binary prediction market position and already have the entry price and resolution outcome. Prefer it over manual calculation when operating inside an agent workflow that needs consistent schema output (delx/util-market-roi/v1) for downstream processing.

## Known failure modes

- Missing required 'entry' field returns a validation error
- Entry price outside valid range (e.g. negative or >1) may produce undefined results
- Invalid type for resolved_yes (non-boolean) causes schema rejection
- Network or payment failure returns 402 or 5xx

## How this service works

ROI from entry price and resolution payout on a binary share. Call when post-resolution performance of a prediction-market fill. Returns roi and profit 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 ROI as a decimal (e.g. 1.5), the echoed entry price, the resolution flag (resolved_yes), and a schema identifier string (delx/util-market-roi/v1).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "entry": {
   "type": "number",
   "description": "Input field: entry."
  },
  "resolved_yes": {
   "type": "boolean",
   "description": "Input field: resolved yes."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "roi": 1.5,
  "entry": 0.4,
  "schema": "delx/util-market-roi/v1",
  "resolved_yes": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-market-roi-calculator-b7ffdd65/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)
