Zum Inhalt springen
GET /v1/profit-loss

Trade profit/loss

Live testen

10 freie Calls pro Tag — keine Anmeldung, kein API-Key. Geht durchs oanor-Gateway.

Eigene Header (optional)
api.oanor.com/fxcalculator-api

Funktioniert. Hol dir einen API-Key und nutze sie in deinem Projekt.

API-Key holen

Code-Snippets

curl "https://api.oanor.com/fxcalculator-api/v1/profit-loss" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/fxcalculator-api/v1/profit-loss", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/fxcalculator-api/v1/profit-loss");
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/fxcalculator-api/v1/profit-loss",
    headers={"x-oanor-key": "oanor_test_..."}
)

Beispiel-Response

Echte Antwort dieses Endpoints, erfasst beim letzten Health-Check.

{
    "data": {
        "exit": 1.09,
        "pair": "EUR/USD",
        "pips": 50,
        "entry": 1.085,
        "source": "ECB (Frankfurter)",
        "lot_size": 1,
        "direction": "buy",
        "rates_date": "2026-06-10",
        "profit_loss": 500,
        "account_currency": "USD",
        "profit_loss_quote": 500
    },
    "meta": {
        "timestamp": "2026-06-10T22:56:38.571Z",
        "request_id": "30744f47-f893-494c-89ad-eb70176b62ed"
    },
    "status": "ok",
    "message": "Profit/loss computed",
    "success": true
}