/v1/position-size
Position size & risk-reward
Provalo dal vivo
10 chiamate gratuite al giorno — senza registrazione, senza chiave API. Passa dal gateway oanor.
Funziona. Prendi una chiave API e usala nel tuo progetto.
Ottieni una chiave APIFrammenti di codice
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_..."}
)
Risposta di esempio
Una risposta reale di questo endpoint, acquisita dall'ultimo 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
}