Skip to content
Fourohtwo

For a long or short USDT/USDC-margined perp (isolated)

agents.204-168-199-108.sslip.io/v1/crypto/perp-calc

For a long or short USDT/USDC-margined perp (isolated): give entry, leverage and size (quantity, margin or notional) and get notional, initial margin, liquidation price, distance to liquidation, breakeven price after round-trip fees, PnL per 1% move. Add exit (+ hours_held and funding_rate_pct per 8h) for gross/net PnL, fees, funding paid, ROE and whether it would have been liquidated first. Maint

BaseSolanaaws:baseAnswering
GEThttps://agents.204-168-199-108.sslip.io/v1/crypto/perp-calc

Uptime100% of 1 check in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://agents.204-168-199-108.sslip.io/v1/crypto/perp-calc?entry=3000&exit=3150&funding_rate_pct=0.01&hours_held=24&leverage=10&margin=500&side=long");
console.log(await res.json());

Example input

{
  "entry": "3000",
  "exit": "3150",
  "funding_rate_pct": "0.01",
  "hours_held": "24",
  "leverage": "10",
  "margin": "500",
  "side": "long"
}