Skip to main content

Export Violations

API URL: POST https://userapi-demo.s2f.projectx.com/Violations/export

API Reference: /Violations/export

info
Documentation on this page is applicable to platforms that have Account Templates enabled. If you are unsure whether you have Account Templates enabled, please contact your account manager.

Description


Exports violation data.

Account Templates allow organizations to customize their trading accounts. For accounts utilizing these templates, a violation with Violation Type = 6 indicates a rule breach related to both Maximum Loss Limit and Daily Loss Limit violations.

Important: To differentiate between a Daily Loss Limit violation and a Maximum Loss Limit violation, refer to the Get Rule Configuration section.

Parameters


NameTypeDescriptionRequiredNullable
startTimedatetimeStart time of the violation data export.falsefalse
endTimedatetimeEnd time of the violation data export.falsetrue

Example Usage


Example Request

  {
"startTime": "2024-11-20T15:19:30.658Z",
"endTime": "2024-11-21T15:19:30.658Z"
}

Example Response

{
"violations": [
{
"id": 140,
"accountId": 130,
"type": 6, // Violation Type 6 = Rule Break
"duration": 2, // Duration Type 2 = Temporary Violation
"createdAt": "2024-10-23T19:14:29.367645+00:00",
"triggeredAt": "2024-10-23T19:14:29.283301+00:00",
"expiresAt": "2024-10-23T21:50:00+00:00",
"balance": 49879.0000,
"realizedPnl": -121.0000,
"unrealizedPnl": 0,
"violationBalance": 49679.0000,
"violationTotalDayPnl": -321.0000,
"minimumBalance": 0,
"dailyLossLimit": -200.0000,
"personalDailyLossLimit": null,
"personalDailyProfitTarget": null,
"voided": false,
"accountName": "U7A130",
"accountType": 1,
"ruleId": 1, // Rule Id of the Rule Break
"customViolation": null
}
],
"success": true,
"errorMessage": null
}