Position Size
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.
POST https://x402-weblens-api-production.up.railway.app/v1/position-size
0.002 USDC on Base · payTo 0x02DDECd0378e8d08f4f5D019AB27f752B2b2dD6a
Status: verified · payable
Operator badge: embed this endpoint's live status badge — it reads "Verified Payable" only while the probe record backs it.
Settlement: direct to the seller's payTo — 0% HIVE402 take
Payment routes
{
"accountSize": 10000,
"atr": 2.5,
"entry": 100,
"multiplier": 2,
"riskPct": 1,
"side": "long"
}{
"atr": 2.5,
"entry": 100,
"leverageNeeded": 0.2,
"multiplier": 2,
"positionUnits": 20,
"positionValue": 2000,
"riskAmount": 100,
"side": "long",
"stop": 95,
"stopDistance": 5,
"stopDistancePct": 5
}Script Master Labs LLC · SDVOSB · Kinston, NC · Terms · Refunds · Privacy · Contact
SML network: ScriptMasterLabs — the main site · SML Dual Market — the human storefront · VA Ratings — VA disability ratings, free for veterans
Agent intel 
| Trust score | 71 / 100 · breakdown |
|---|---|
| Probe uptime (30d) | 100.0% over 1 probes · daily |
| Avg 402 latency | 693 ms |
| Paid calls (30d, on-chain) | 6 calls · 5 buyers · shared price cohort of 8 |
| Facilitator-reported (30d) | 1 calls · 1 payers (CDP Bazaar) |
How to call
POST https://x402-weblens-api-production.up.railway.app/v1/position-size · input in body · spec from live-challenge
Input schema
{
"type": "object",
"properties": {
"bars": {
"type": "array",
"maxItems": 5000,
"items": {
"type": "object",
"properties": {
"high": {
"type": "number"
},
"low": {
"type": "number"
},
"close": {
"type": "number"
}
},
"required": [
"high",
"low",
"close"
]
},
"description": "Price bars, oldest first (or send atr + entry)"
},
"atr": {
"type": "number",
"description": "ATR if you already have it"
},
"entry": {
"type": "number",
"description": "Entry price (default: last close)"
},
"period": {
"type": "integer",
"default": 14,
"description": "ATR period"
},
"multiplier": {
"type": "number",
"default": 2,
"description": "Stop distance in ATRs"
},
"side": {
"type": "string",
"enum": [
"long",
"short"
],
"default": "long",
"description": "Trade direction"
},
"accountSize": {
"type": "number",
"description": "Account size in your currency"
},
"riskPct": {
"type": "number",
"description": "Percent of account to risk, e.g. 1"
}
},
"required": [
"accountSize",
"riskPct"
]
}Output schema
{
"type": "object",
"properties": {
"stop": {
"type": "number"
},
"atr": {
"type": "number"
},
"positionUnits": {
"type": "number"
},
"positionValue": {
"type": "number"
},
"riskAmount": {
"type": "number"
}
},
"required": [
"stop",
"positionUnits"
]
}curl -i -X POST 'https://x402-weblens-api-production.up.railway.app/v1/position-size' \
-H 'content-type: application/json' -d '{"atr":2.5,"entry":100,"multiplier":2,"accountSize":10000,"riskPct":1,"side":"long"}'
Agents: POST https://hive402.scriptmasterlabs.com/mcp → route_task / proxy_call · SDK /sdk/hive402.mjs