InfernoDocs

Documentation

Leverage API

List markets, open and close longs, and read position state through the Hono API.

Call Inferno's Hono API directly. Do not send a private key. Inferno returns an unsigned transaction — you sign and broadcast it from your wallet on Robinhood Chain (4663). Collateral is native ETH.

List leverage markets

GEThttps://inferno.trade/v1/markets

Public. No auth. Returns every listed market, long-route readiness, and network metadata. Same payload is available at /api/leverage/markets from this origin.

curl -s https://inferno.trade/v1/markets

Use these fields when you open a long:

  • id — pass as marketId
  • symbol, name, tokenAddress
  • maxLeverage, limits.minCollateralWeth, limits.maxCollateralWeth
  • listingStatus — tradeable when active or limited
  • routes.long.executable must be true

Quote a long

POSThttps://inferno.trade/v1/leverage/quote

Optional. Direction is always long. collateral and leverage are decimal strings.

{
  "wallet": "0xYourWallet",
  "marketId": "market-id-from-list",
  "collateral": "0.05",
  "leverage": "5"
}

Open a long

Two steps. Inferno prepares the trade; you broadcast the returned transaction yourself.

1. Challenge

POSThttps://inferno.trade/v1/leverage/challenge
{
  "wallet": "0xYourWallet",
  "marketId": "market-id-from-list",
  "collateral": "0.05",
  "leverage": "5"
}

Response includes challenge.message. Sign that exact string with EIP-191 personal_sign.

2. Prepare

POSThttps://inferno.trade/v1/leverage/open
{
  "wallet": "0xYourWallet",
  "marketId": "market-id-from-list",
  "collateral": "0.05",
  "leverage": "5",
  "challengeId": "<id from challenge>",
  "challengeExpiresAt": "<expiresAt from challenge>",
  "signature": "0x…"
}

The response includes quote and preparation.transaction (from, to, data, value in wei). Send that transaction from wallet on chain 4663. Inferno does not submit it for you.

curl -s -X POST https://inferno.trade/v1/leverage/open \
  -H "content-type: application/json" \
  -d '{
    "wallet": "0xYourWallet",
    "marketId": "market-id-from-list",
    "collateral": "0.05",
    "leverage": "5",
    "challengeId": "<id>",
    "challengeExpiresAt": "<expiresAt>",
    "signature": "0x…"
  }'

Read positions

GEThttps://inferno.trade/v1/positions?wallet=0xYourWallet

Public. No Inferno login. Returns live positions for that wallet plus settled rows (closes and liquidations).

curl -s "https://inferno.trade/v1/positions?wallet=0xYourWallet"

Useful fields on each open position:

  • id — pass as positionId when closing or splitting
  • unrealizedPnlEth, unrealizedPnlUsd, unrealizedPnlPercent
  • liquidationPriceEth, currentPriceEth
  • healthPct — percent of mark remaining above (long) or below (short) liquidation. 0 or negative means at/through liq
  • liquidatedtrue when Inferno marked it liquidated or health is gone
  • statusopen, closing, closed, or liquidated

settled[] is exit history Inferno reports (reason: "closed" | "liquidated").

Close a long

Full exit. Same challenge → prepare pattern as open. You broadcast the returned transaction.

Close challenge

POSThttps://inferno.trade/v1/leverage/close/challenge
{
  "wallet": "0xYourWallet",
  "positionId": "position-id-from-list"
}

Close prepare

POSThttps://inferno.trade/v1/leverage/close
{
  "wallet": "0xYourWallet",
  "positionId": "position-id-from-list",
  "challengeId": "<id from challenge>",
  "challengeExpiresAt": "<expiresAt from challenge>",
  "signature": "0x…"
}

Response includes preparation.transaction. Send it from wallet on chain 4663.

Partial reduce (split)

Partial split will be enabled soon. The routes below are the contract to build against. Until they are live, close the full position with the close routes above.

Split carves sizeEth off an open long and leaves the rest. Same challenge → prepare pattern as close. You broadcast the returned transaction. sizeEth is notional ETH to reduce, not collateral.

Split challenge

POSThttps://inferno.trade/v1/leverage/split/challenge
{
  "wallet": "0xYourWallet",
  "positionId": "position-id-from-list",
  "sizeEth": "0.05"
}

Split prepare

POSThttps://inferno.trade/v1/leverage/split
{
  "wallet": "0xYourWallet",
  "positionId": "position-id-from-list",
  "sizeEth": "0.05",
  "challengeId": "<id from challenge>",
  "challengeExpiresAt": "<expiresAt from challenge>",
  "signature": "0x…"
}

Response includes preparation.transaction. Send it from wallet on chain 4663.

App session routes

Logged-in Inferno users on the website use cookie session routes and the embedded wallet instead of /v1. Developers with their own key should use the endpoints above. See Getting Started for the UI flow.

  • GET /api/leverage/markets
  • POST /api/leverage/quote
  • POST /api/leverage/prepare then POST /api/leverage/broadcast
  • GET /api/leverage/positions
  • POST /api/leverage/close/prepare then POST /api/leverage/close/broadcast
  • POST /api/leverage/split/prepare then POST /api/leverage/split/broadcast