← All tool references

Finance · not_available

Position Size Calculator

Position Size with transparent inputs and reviewable results.

Open public tool

Overview

Category
Finance
API mode
not_available
Processing
client-side
Privacy
no-data-stored

Public descriptor

The descriptor is available without an API key and supplies this tool’s metadata, schemas, modes, and examples.

GET /api/v1/tools/position-size-calculator

View this descriptor as JSON

Execute availability

This tool is documented as a browser capability. Its execute route does not produce a server-side result; when execution is enabled, it responds with browser_interaction_required and points callers to the public tool page.

POST /api/v1/tools/position-size-calculator/execute

Authentication is not issued during the preview. A bearer API key is planned for execution after launch.

Input schema

object object; additional properties are not accepted.

account_size · number · required
Enter account size.
risk_percent · number · required
Enter risk per trade.
entry_price · number · required
Enter entry price.
stop_price · number · required
Enter stop price.
{
    "type": "object",
    "properties": {
        "account_size": {
            "type": "number",
            "description": "Enter account size."
        },
        "risk_percent": {
            "type": "number",
            "description": "Enter risk per trade."
        },
        "entry_price": {
            "type": "number",
            "description": "Enter entry price."
        },
        "stop_price": {
            "type": "number",
            "description": "Enter stop price."
        }
    },
    "required": [
        "account_size",
        "risk_percent",
        "entry_price",
        "stop_price"
    ],
    "additionalProperties": false
}

Output schema

On a successful execution, schema values appear in data.result.values.

position_units · number
Position units produced by the tool.
capital_at_risk · number
Capital at risk produced by the tool.
position_value · number
Position value produced by the tool.
risk_per_unit · number
Risk per unit produced by the tool.
{
    "type": "object",
    "properties": {
        "position_units": {
            "type": "number",
            "description": "Position units produced by the tool."
        },
        "capital_at_risk": {
            "type": "number",
            "description": "Capital at risk produced by the tool."
        },
        "position_value": {
            "type": "number",
            "description": "Position value produced by the tool."
        },
        "risk_per_unit": {
            "type": "number",
            "description": "Risk per unit produced by the tool."
        }
    },
    "additionalProperties": false
}

Position Size Calculator worked example

The request body follows the published input schema. The response below shows the success-envelope shape returned after execution is available.

curl -X POST "https://utilitypages.org/api/v1/tools/position-size-calculator/execute" \
  -H "Content-Type: application/json" \
  -d '{
    "account_size": 25000,
    "risk_percent": 1,
    "entry_price": 50,
    "stop_price": 47.5
}'
{
    "ok": true,
    "data": {
        "slug": "position-size-calculator",
        "result": {
            "values": {
                "position_units": 100,
                "capital_at_risk": 250,
                "position_value": 5000,
                "risk_per_unit": 2.5
            },
            "display": {
                "display": "100"
            },
            "warnings": [],
            "assumptions": [],
            "steps": []
        }
    },
    "meta": [],
    "request_id": "req_example_123"
}

Errors

api_not_launched · 503
Returned by the current launch gate for every execute request.
invalid_json · 400
Returned when an enabled execute request does not contain valid JSON.
validation_failed · 422
Returned when a request does not satisfy the input schema.
browser_interaction_required · 422
Returned for browser capability tools instead of inventing a server-side result.
tool_not_found · 404
Returned when a requested descriptor slug does not exist.
execution_failed · 503
Returned when an enabled server-side execution cannot complete.