Catalog/trade-futures-margin

Calculators

Futures margin requirement API

Futures notional and initial margin: notional = price·contracts·contractSize, margin = notional·marginRate (or notional/leverage). Deterministic contract math. Answers 'margin to open 2 BTC contracts','notional value of my futures position','required margin at 10x'.

Price$0.03per request
MethodPOST
Route/v1/calc/trade-futures-margin
StatusLive
MIME typeapplication/json
Rate limit120/minute
CacheNo cache
calctradingfuturesmarginnotionalleveragecontractsderivatives
API URLhttps://x402.hexl.dev/v1/calc/trade-futures-margin
Integration docs
Example request
{
  "price": 50000,
  "contracts": 2,
  "contractSize": 1,
  "leverage": 10
}
Example response
{
  "price": 50000,
  "contracts": 2,
  "contractSize": 1,
  "notional": 100000,
  "marginRate": 0.1,
  "initialMargin": 10000,
  "effectiveLeverage": 10,
  "formula": "margin = (price · contracts · contractSize) · marginRate"
}
Input schema
{
  "type": "object",
  "required": [
    "price",
    "contracts"
  ],
  "properties": {
    "price": {
      "type": "number",
      "examples": [
        50000
      ]
    },
    "contracts": {
      "type": "number",
      "examples": [
        2
      ]
    },
    "contractSize": {
      "type": "number",
      "default": 1,
      "examples": [
        1
      ]
    },
    "leverage": {
      "type": "number",
      "examples": [
        10
      ]
    },
    "marginRate": {
      "type": "number",
      "description": "Margin rate (decimal) — overrides leverage.",
      "examples": [
        0.1
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}