Naar de inhoud
GET /v1/position-size

Position size & risk-reward

Probeer het live

10 gratis calls per dag — geen registratie, geen API-key. Loopt via de oanor-gateway.

Aangepaste headers (optioneel)
api.oanor.com/trading-api

Het werkt. Haal een API-key op en gebruik hem in je project.

Verkrijg een API-sleutel

Codefragmenten

curl "https://api.oanor.com/trading-api/v1/position-size" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/trading-api/v1/position-size", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/trading-api/v1/position-size");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/trading-api/v1/position-size",
    headers={"x-oanor-key": "oanor_test_..."}
)

Voorbeeldrespons

Een echte respons van dit endpoint, vastgelegd bij de laatste health check.

{
    "data": {
        "note": "Units = (account × risk%) / |entry − stop|. The most you lose if the stop hits is the risk amount, whatever the instrument.",
        "inputs": {
            "entry": 1.2,
            "stop_loss": 1.195,
            "risk_percent": 1,
            "account_balance": 10000
        },
        "target": 1.21,
        "risk_amount": 100,
        "risk_per_unit": 0.005,
        "position_units": 20000,
        "position_value": 24000,
        "reward_per_unit": 0.01,
        "potential_reward": 200,
        "risk_reward_ratio": 2
    },
    "meta": {
        "timestamp": "2026-06-05T21:48:46.717Z",
        "request_id": "46dcc8a7-2771-4ced-9c68-27738bffa1f5"
    },
    "status": "ok",
    "message": "Position size",
    "success": true
}