D
DGuardAPI Documentation

Fraud Detection

The Fraud Detection module uses Machine Learning models (GBDT - Gradient Boosting Decision Trees) to analyze transactions in real-time and detect fraudulent patterns with 96% accuracy.

Features

Real-time Scoring

Analysis in less than 500ms

40+ Features Analyzed

Comprehensive behavioral analysis

Probabilistic Calibration

Scores from 0 to 1

Configurable Thresholds

By category

Analyze Transactions

POST /fraud/score

Request Example

{
  "filters": {
    "user_id": "usr_123456",
    "account_ids": ["acc_789012"],
    "transaction_ids": ["txn_abc123", "txn_def456"],
    "date_from": "2025-01-01T00:00:00Z",
    "date_to": "2025-01-31T23:59:59Z",
    "operation_types": ["transfer", "payment", "withdrawal"]
  },
  "options": {
    "alert_threshold": 0.005,
    "threshold_policy": "per_category",
    "include_reasons": true,
    "limit": 1000
  }
}

Response Example

{
  "summary": {
    "total": 1500,
    "alerts": 8,
    "alert_rate": 0.0053,
    "processing_time_ms": 342,
    "model_version": "v2.4.1"
  },
  "transactions": [
    {
      "transaction_id": "txn_abc123",
      "fraud_score": 0.87,
      "fraud_level": "high",
      "is_alert": true,
      "threshold_applied": 0.156,
      "risk_factors": [
        "High amount >= 99.5 percentile (€5,234.00)",
        "New merchant + high amount",
        "Unusual transaction velocity (8 in last hour)"
      ]
    }
  ]
}

Fraud Levels

low0.0 - 0.3
Approve automatically
medium0.3 - 0.6
Monitor
high0.6 - 0.85
Requires manual review
critical0.85 - 1.0
Block and notify

Real-time Transaction Analysis

Optimized endpoint for real-time analysis of a single transaction.

POST /fraud/score/realtime

Real-time Response

{
  "transaction_id": "txn_new_001",
  "fraud_score": 0.23,
  "fraud_level": "low",
  "is_alert": false,
  "recommendation": "approve",
  "confidence": 0.94,
  "processing_time_ms": 45,
  "velocity_check": {
    "transactions_1h": 2,
    "transactions_24h": 5,
    "amount_24h": 3200.00,
    "is_unusual": false
  }
}