Catalog/cryptocalc-position-size

Calculators

Risk-based position size calculator API

Size a trade by the fixed-fractional risk rule: units = (account·riskPct)/|entry−stop|, positionValue = units·entry, leverageRequired = positionValue/account. Deterministic risk-management math. Answers 'how big a position for 1% risk','position size from my stop','leverage needed for this trade'.

Price$0.01per request
MethodPOST
Route/v1/calc/cryptocalc-position-size
StatusLive
MIME typeapplication/json
Rate limit120/minute
CacheNo cache
calccryptotradingposition-sizeriskstop-lossleveragemoney-management
API URLhttps://x402.hexl.dev/v1/calc/cryptocalc-position-size
Integration docs
Example request
{
  "accountSize": 10000,
  "riskPct": 0.01,
  "entryPrice": 30000,
  "stopPrice": 28500
}
Example response
{
  "formula": "units = (account·riskPct)/|entry−stop|; positionValue = units·entry",
  "riskAmount": 100,
  "stopDistance": 1500,
  "positionUnits": 0.06666667,
  "positionValue": 2000,
  "leverageRequired": 0.2,
  "stopLossPct": 5
}
Input schema
{
  "type": "object",
  "required": [
    "accountSize",
    "riskPct",
    "entryPrice",
    "stopPrice"
  ],
  "properties": {
    "accountSize": {
      "type": "number",
      "examples": [
        10000
      ]
    },
    "riskPct": {
      "type": "number",
      "description": "fraction of account to risk (0-1)",
      "examples": [
        0.01
      ]
    },
    "entryPrice": {
      "type": "number",
      "examples": [
        30000
      ]
    },
    "stopPrice": {
      "type": "number",
      "examples": [
        28500
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}