# Delx Commerce Risk-Reward Calculator

> Delx Commerce Risk-Reward 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).

Computes the risk, reward, and risk/reward ratio for a trade given entry, stop-loss, and take-profit price levels

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/risk-reward?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-risk-reward-calculator-c0a085ae
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_x8mKSnne7YYjTWVVkF7_A

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-risk-reward-calculator-c0a085ae -d '<json body>'
```

Example prompt: Calculate the risk-reward ratio for a trade where my entry is 100, my stop-loss is 95, and my take-profit target is 115.

## When to prefer this

Choose this endpoint when you need a quick, verifiable, pay-per-use computation of trade risk-reward metrics without setting up an account or managing subscriptions. It is ideal for AI agents operating in trading workflows that need lightweight, on-demand calculation with micropayment billing in USDC via the x402 protocol.

## Known failure modes

- Missing required fields (entry, stop, take) returns a 4xx error
- Non-integer values for price fields may cause validation errors
- Stop price equal to entry price causes division-by-zero or invalid ratio
- Payment not provided or insufficient USDC causes 402 Payment Required
- Inverted stop/take values (stop above entry for a long) may produce negative or unexpected results

## 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 absolute risk value, absolute reward value, the risk-reward ratio (reward divided by risk), and a schema identifier string ('delx/util-risk-reward/v1'). Example: {risk: 5, reward: 15, risk_reward: 3, schema: 'delx/util-risk-reward/v1'}.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "stop": {
   "type": "integer",
   "description": "Input field: stop."
  },
  "take": {
   "type": "integer",
   "description": "Input field: take."
  },
  "entry": {
   "type": "integer",
   "description": "Input field: entry."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "risk": 5,
  "reward": 15,
  "schema": "delx/util-risk-reward/v1",
  "risk_reward": 3
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-risk-reward-calculator-c0a085ae/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)
