Calculators
Trailing-stop level API
Trailing-stop price: long stop = highPrice·(1 − trailPct), short stop = lowPrice·(1 + trailPct), plus locked-in profit vs entry. Deterministic level math. Answers 'where's my trailing stop','locked profit on a 10% trail','trailing stop from the high'.
Price$0.01per request
MethodPOST
Route/v1/calc/trade-trailing-stop
StatusLive
MIME typeapplication/json
Rate limit120/minute
CacheNo cache
calctradingtrailing-stopstop-lossexitprofit-locklevelsrisk
API URL
Integration docshttps://x402.hexl.dev/v1/calc/trade-trailing-stopExample request
{
"entry": 100,
"extreme": 120,
"trailPct": 10,
"direction": "long"
}Example response
{
"entry": 100,
"extreme": 120,
"trailPct": 10,
"direction": "long",
"trailingStop": 108,
"lockedProfit": 8,
"lockedProfitPct": 8,
"triggered": "in-profit",
"formula": "stop = highPrice · (1 − trailPct)"
}Input schema
{
"type": "object",
"required": [
"entry",
"extreme",
"trailPct"
],
"properties": {
"entry": {
"type": "number",
"examples": [
100
]
},
"extreme": {
"type": "number",
"description": "Highest price (long) or lowest (short) since entry.",
"examples": [
120
]
},
"trailPct": {
"type": "number",
"examples": [
10
]
},
"direction": {
"type": "string",
"enum": [
"long",
"short"
],
"default": "long"
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}