{"slug":"x402-weblens-api-production-up-railway-app-v1-position-size-ad429a","title":"Position size and stop-loss from account risk","host":"x402-weblens-api-production.up.railway.app","method":"POST","resource":"https://x402-weblens-api-production.up.railway.app/v1/position-size","category":"market","description":"Position size and stop-loss from account risk: send price bars (high/low/close) or an ATR, account size and risk %, get Wilder ATR, stop price, units and position value. Long or short. Pure math, no data feed.","price_listed":0.002,"price_asked":null,"state":"effects","state_label":"Not tested: has real-world effects","checks_7d":0,"answered_7d":0,"latency_ms_median":null,"reported_calls_30d":1,"reported_payers_30d":1,"networks":["eip155:8453"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"accountSize":10000,"atr":2.5,"entry":100,"multiplier":2,"riskPct":1,"side":"long"},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"properties":{"accountSize":{"description":"Account size in your currency","type":"number"},"atr":{"description":"ATR if you already have it","type":"number"},"bars":{"description":"Price bars, oldest first (or send atr + entry)","items":{"properties":{"close":{"type":"number"},"high":{"type":"number"},"low":{"type":"number"}},"required":["high","low","close"],"type":"object"},"maxItems":5000,"type":"array"},"entry":{"description":"Entry price (default: last close)","type":"number"},"multiplier":{"default":2,"description":"Stop distance in ATRs","type":"number"},"period":{"default":14,"description":"ATR period","type":"integer"},"riskPct":{"description":"Percent of account to risk, e.g. 1","type":"number"},"side":{"default":"long","description":"Trade direction","enum":["long","short"],"type":"string"}},"required":["accountSize","riskPct"],"type":"object"},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"method":{"enum":["POST"],"type":"string"},"type":{"const":"http","type":"string"}},"required":["type","method","bodyType","body"],"type":"object"},"output":{"properties":{"example":{"properties":{"atr":{"type":"number"},"positionUnits":{"type":"number"},"positionValue":{"type":"number"},"riskAmount":{"type":"number"},"stop":{"type":"number"}},"required":["stop","positionUnits"],"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[],"description_full":"Position size and stop-loss from account risk: send price bars (high/low/close) or an ATR, account size and risk %, get Wilder ATR, stop price, units and position value. Long or short. Pure math, no data feed.","last_updated":"2026-11-12T20:04:50.627Z","schemes":["exact"]}