# Vextorium Perpetual Futures Position Calculator

> Vextorium Perpetual Futures Position Calculator is a paid API for AI agents from api.vextorium.com, paid per call via x402, $0.004/call, status unknown (last checked 2026-10-19).

Calculates perpetual futures position metrics including liquidation price, PnL at stop-loss/take-profit, notional value, and reward-risk ratio given entry price and leverage

## Facts

- Endpoint: POST https://api.vextorium.com/v1/perp-calculator?utm_source=zero.xyz
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/vextorium-perpetual-futures-position-calculator-53123f5b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fa92AXZnzKtukbWUMi9zD

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 vextorium-perpetual-futures-position-calculator-53123f5b -d '<json body>'
```

Example prompt: Calculate my perp position metrics for a long entry at $60,000 on BTC with 10x leverage, $100 margin, a stop loss at $57,000, and a take profit at $66,000.

## When to prefer this

Use this endpoint when an AI agent or trader needs to quickly compute perpetual futures position risk metrics — especially liquidation price, PnL scenarios, and reward-risk ratio — before placing a trade. Ideal for pre-trade analysis workflows, position sizing by risk amount, and sanity checks on leverage. Prefer this over manual calculation when the user specifies entry price, leverage, and optional stop/take-profit levels for isolated-margin perp trades.

## Known failure modes

- Missing required fields (entry price or leverage) returns a validation error
- Leverage outside the 1-200 range may return an error or unexpected results
- Inconsistent stop-loss/take-profit direction relative to side (e.g. stop-loss above entry for a long) may yield negative or nonsensical PnL values
- Neither margin nor risk_usd provided may result in incomplete sizing calculation

## How this service works

Perpetual futures calculator (isolated margin): liquidation price and distance, notional and size, PnL at stop-loss and take-profit, reward/risk ratio, and position sizing to risk a fixed USD amount.

## Output

Returns a JSON object with the computed position side, entry price, leveraged notional value, position size in base asset, margin posted, liquidation price, liquidation distance as a percentage, PnL and PnL-as-percentage-of-margin at stop-loss price, PnL and PnL-as-percentage-of-margin at take-profit price, and reward-risk ratio. Includes a disclaimer note that the calculation assumes isolated margin with no fees or funding and is an estimate.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "side": {
   "enum": [
    "long",
    "short"
   ],
   "type": "string"
  },
  "input": {
   "type": "number",
   "description": "Entry price"
  },
  "margin": {
   "type": "number",
   "description": "Margin posted in USD (optional)"
  },
  "leverage": {
   "type": "number",
   "description": "Leverage (1-200)"
  },
  "risk_usd": {
   "type": "number",
   "description": "USD to risk; with stop_loss, sizes the position"
  },
  "stop_loss": {
   "type": "number",
   "description": "Stop-loss price (optional)"
  },
  "take_profit": {
   "type": "number",
   "description": "Take-profit price (optional)"
  },
  "maintenance_margin_pct": {
   "type": "number",
   "description": "Maintenance margin % (default 0.5)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "note": "Isolated margin, no fees or funding. Each exchange rounds differently: use it as an estimate.",
  "side": "long",
  "input": 60000,
  "amount": 0.01666667,
  "margin": 100,
  "leverage": 10,
  "notional": 1000,
  "in_stop_loss": {
   "pnl": -50,
   "price": 57000,
   "pnl_pct_of_margin": -50
  },
  "in_take_profit": {
   "pnl": 100,
   "price": 66000,
   "pnl_pct_of_margin": 100
  },
  "liquidation_price": 54271.35678392,
  "reward_risk_ratio": 2,
  "liquidation_distance_pct": 9.5477
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/vextorium-perpetual-futures-position-calculator-53123f5b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.vextorium.com](https://www.zero.xyz/host/api.vextorium.com/llms.txt)
