API & MCP
Everything a person can do on RavingDesk Position Size & Risk Planner, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://ravingdeskpositionsize.usefulweb.site/api/v1/calculate– run RavingDesk Position Size & Risk PlannerGET https://ravingdeskpositionsize.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
RavingDesk Position Size & Risk Planner
Calculates how many units fit a fixed risk budget (account × risk %) between entry and stop, including an estimated round-trip fee, plus the loss at the stop, the profit at the target, reward/risk and a price-move map. It is the risk planner of the RavingDesk paper-trading workspace; it does not place orders.
| Field | Type | Default | Description |
|---|---|---|---|
side | select (long, short) | "long" | Direction |
account (required) | number | 10000 | Account size. Paper account value in your account currency. |
riskPercent (required) | number | 1 | Risk per trade |
entry (required) | number | 100 | Entry price |
stop (required) | number | 95 | Stop price. Below entry for a long, above entry for a short. |
target (required) | number | 110 | Target price. Above entry for a long, below entry for a short. |
fee | number | 0 | Estimated round-trip fee. Entry plus exit fee in account currency; it is taken out of the risk budget. |
Example request
Long: 10,000 account, 1 % risk, entry 100, stop 95, target 110, fee 4
curl -X POST https://ravingdeskpositionsize.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"side":"long","account":10000,"riskPercent":1,"entry":100,"stop":95,"target":110,"fee":4}'
Every result contains
inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.
MCP (Model Context Protocol)
- Streamable HTTP endpoint:
https://ravingdeskpositionsize.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
ravingdesk_position_size - Local stdio connector:
node src/mcp-stdio.ts --tool=ravingdesk-position-size
{
"mcpServers": {
"ravingdesk-position-size": { "type": "http", "url": "https://ravingdeskpositionsize.usefulweb.site/mcp" }
}
}