{"uid":"cap_fa92AXZnzKtukbWUMi9zD","slug":"vextorium-perpetual-futures-position-calculator-53123f5b","name":"Vextorium Perpetual Futures Position Calculator","description":"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.","url":"https://api.vextorium.com/v1/perp-calculator?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"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)"}}},"responseSchema":{"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}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.004","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.004/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_zXwse54r6tTYE6D9HYtz0","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.004","costPer":"request","priority":0,"asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"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","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"Pre-trade risk check for a long position","prompt":"I'm thinking about going long on ETH at $3,200 with 20x leverage and $200 margin. My stop loss is at $3,100 and take profit at $3,600. Can you calculate my liquidation price, how much I'd lose at stop loss, and what my reward-risk ratio is?"},{"title":"Risk-based position sizing for a short trade","prompt":"I want to short BTC at $65,000 with 15x leverage and I only want to risk $75. My stop loss is at $66,500. Size my position based on that risk amount and tell me my liquidation price and distance."},{"title":"Liquidation distance check before placing trade","prompt":"If I go short at $3,500 with 50x leverage posting $50 in margin, what's my liquidation price and how far is it from my entry as a percentage? Maintenance margin is the default 0.5%."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-19T06:43:30.231Z","isFirstParty":false,"canonicalSlug":"vextorium-perpetual-futures-position-calculator-53123f5b"}