> ## Documentation Index
> Fetch the complete documentation index at: https://docs.didit.me/llms.txt
> Use this file to discover all available pages before exploring further.

# लेन-देन निगरानी नियम बैकटेस्ट API

> सक्रिय करने से पहले Didit के साथ KYT नियम को अपने लेन-देन इतिहास पर परखें: मिलान, मूल्यांकन संख्या और प्रभावित विषय। केवल-पठन और निःशुल्क।



बैकटेस्ट नियम API प्रॉम्प्ट
        प्रॉम्प्ट को क्लिपबोर्ड पर कॉपी करें



      
      

\<pre>

\`Backtest a hypothetical rule configuration against my recent transactions.

Endpoint:
POST https://verification.didit.me/v3/transactions/rules/backtest/

Authentication:
Use the x-api-key header with my Didit API key.

Request body (application/json):
\{
"conditions": [{"field": "currency", "operator": "eq", "value": "EUR"},
\{"field": "amount", "operator": "lt", "value": 10000}],
"aggregation": [{"metric": "count", "operator": "gte", "value": 20, "window": "30d",
               "filters": {"direction": "INBOUND", "transaction_type": "finance", "currency": "EUR", "subject_vendor_data": "__current__"}},
              \{"metric": "max", "field": "amount", "operator": "lt", "value": 10000, "window": "30d",
               "filters": {"direction": "INBOUND", "transaction_type": "finance", "currency": "EUR", "subject_vendor_data": "__current__"}}],
"evaluation_mode": "ALL",
"scope": {"transaction_types": ["finance"], "directions": ["INBOUND"]},
"period_days": 90          // 1-365, default 90
}

Response:
\{ "evaluated": 4820, "matched": 12, "affected_entities": 4, "period_days": 90 }

Behavior:
\- Read-only and free: no rule is created, no transaction is modified, no rule runs are recorded.
\- Evaluates the most recent transactions in the period, up to the backtest cap.
\- affected_entities counts distinct subjects (by vendor_data) among the matches.
\- Use it before switching a rule to ACTIVE; a surprising match count means the thresholds need tuning.
\- Copy the candidate rule EXACTLY: same conditions, aggregation, evaluation_mode and scope. Omitted conditions, aggregation and scope add no constraints of their own; dropping scope can include directions or transaction types the saved rule skips. Omitted evaluation_mode defaults to ALL (which can reduce matches for an ANY rule), and omitted period_days defaults to 90 days, not unlimited history.

Sandbox fixtures for this example: at least 20 inbound EUR finance transactions for the same subject within 30 days, each with raw amount below 10000. No normalized amount is required. Sandbox ingestion does not evaluate rules; call backtest explicitly.

Failure modes:
\- 400 - same condition/aggregation/scope validation as rule create.`

\</pre>



      
      

यहाँ पेस्ट करें



## OpenAPI

````yaml hi/openapi-25.json POST /v3/transactions/rules/backtest/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: पहचान सत्यापन API। x-api-key हेडर के साथ प्रमाणीकृत करें।
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/transactions/rules/backtest/:
    post:
      tags:
        - Transactions
      summary: बैकटेस्ट नियम कॉन्फ़िगरेशन
      description: >-
        कोई नियम बनाए बिना या किसी लेन-देन को प्रभावित किए बिना अपने हाल के
        लेन-देनों (सबसे हाल के पहले, बैकटेस्ट सीमा तक) के विरुद्ध एक काल्पनिक
        नियम कॉन्फ़िगरेशन का मूल्यांकन करें। किसी नियम को सक्रिय करने से पहले यह
        देखने के लिए इसका उपयोग करें कि यह कितनी बार मेल खाया होता और इससे कितने
        संबंधित पक्ष प्रभावित हुए होते।
      operationId: backtestTransactionRules
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransactionRuleBacktestRequest'
            example:
              conditions:
                - field: currency
                  operator: eq
                  value: EUR
                - field: amount
                  operator: lt
                  value: 10000
              aggregation:
                - metric: count
                  operator: gte
                  value: 20
                  window: 30d
                  filters:
                    direction: INBOUND
                    transaction_type: finance
                    subject_vendor_data: __current__
                    currency: EUR
                - metric: max
                  field: amount
                  operator: lt
                  value: 10000
                  window: 30d
                  filters:
                    direction: INBOUND
                    transaction_type: finance
                    subject_vendor_data: __current__
                    currency: EUR
              evaluation_mode: ALL
              scope:
                transaction_types:
                  - finance
                directions:
                  - INBOUND
              period_days: 90
      responses:
        '200':
          description: बैकटेस्ट आँकड़े।
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionRuleBacktestResult'
              example:
                evaluated: 4820
                matched: 12
                affected_entities: 4
                period_days: 90
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X POST
            'https://verification.didit.me/v3/transactions/rules/backtest/' \
              -H 'x-api-key: YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"conditions": [{"field": "currency", "operator": "eq", "value": "EUR"}, {"field": "amount", "operator": "lt", "value": 10000}], "aggregation": [{"metric": "count", "operator": "gte", "value": 20, "window": "30d", "filters": {"direction": "INBOUND", "transaction_type": "finance", "subject_vendor_data": "__current__", "currency": "EUR"}}, {"metric": "max", "field": "amount", "operator": "lt", "value": 10000, "window": "30d", "filters": {"direction": "INBOUND", "transaction_type": "finance", "subject_vendor_data": "__current__", "currency": "EUR"}}], "evaluation_mode": "ALL", "scope": {"transaction_types": ["finance"], "directions": ["INBOUND"]}, "period_days": 90}'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.transactions.rules.backtest(
                conditions=[{
                    "field": "currency",
                    "operator": "eq",
                    "value": "EUR",
                }, {
                    "field": "amount",
                    "operator": "lt",
                    "value": 10000,
                }],
                aggregation=[{
                    "metric": "count",
                    "operator": "gte",
                    "value": 20.0,
                    "window": "30d",
                    "filters": {"direction": "INBOUND", "transaction_type": "finance", "subject_vendor_data": "__current__", "currency": "EUR"},
                }, {
                    "metric": "max",
                    "field": "amount",
                    "operator": "lt",
                    "value": 10000.0,
                    "window": "30d",
                    "filters": {"direction": "INBOUND", "transaction_type": "finance", "subject_vendor_data": "__current__", "currency": "EUR"},
                }],
                evaluation_mode="ALL",
                scope={
                    "transaction_types": ["finance"],
                    "directions": ["INBOUND"],
                },
                period_days=90,
            )
            print(result)
        - lang: javascript
          label: Node.js
          source: |-
            import Didit from "@didit-protocol/sdk-node";

            // Reads DIDIT_API_KEY.
            const didit = new Didit();

            const result = await didit.transactions.rules.backtest({
              conditions: [{
                field: "currency",
                operator: "eq",
                value: "EUR",
              }, {
                field: "amount",
                operator: "lt",
                value: 10000,
              }],
              aggregation: [{
                metric: "count",
                operator: "gte",
                value: 20.0,
                window: "30d",
                filters: { direction: "INBOUND", transaction_type: "finance", subject_vendor_data: "__current__", currency: "EUR" },
              }, {
                metric: "max",
                field: "amount",
                operator: "lt",
                value: 10000.0,
                window: "30d",
                filters: { direction: "INBOUND", transaction_type: "finance", subject_vendor_data: "__current__", currency: "EUR" },
              }],
              evaluation_mode: "ALL",
              scope: {
                transaction_types: ["finance"],
                directions: ["INBOUND"],
              },
              period_days: 90,
            });
            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.Rules.Backtest(ctx, didit.TransactionRuleBacktestRequest{\n\tConditions: didit.Some([]didit.TransactionRuleConditionParam{{\n\t\tField:    \"currency\",\n\t\tOperator: \"eq\",\n\t\tValue:    didit.Some[any](\"EUR\"),\n\t}, {\n\t\tField:    \"amount\",\n\t\tOperator: \"lt\",\n\t\tValue:    didit.Some[any](10000),\n\t}}),\n\tAggregation: didit.Some([]didit.TransactionRuleAggregationParam{{\n\t\tMetric:   didit.Some(didit.TransactionRuleAggregationMetric(\"count\")),\n\t\tOperator: didit.Some(didit.TransactionRuleAggregationOperator(\"gte\")),\n\t\tValue:    20.0,\n\t\tWindow:   didit.String(\"30d\"),\n\t\tFilters:  didit.Some(map[string]any{\"direction\": \"INBOUND\", \"transaction_type\": \"finance\", \"subject_vendor_data\": \"__current__\", \"currency\": \"EUR\"}),\n\t}, {\n\t\tMetric:   didit.Some(didit.TransactionRuleAggregationMetric(\"max\")),\n\t\tField:    didit.String(\"amount\"),\n\t\tOperator: didit.Some(didit.TransactionRuleAggregationOperator(\"lt\")),\n\t\tValue:    10000.0,\n\t\tWindow:   didit.String(\"30d\"),\n\t\tFilters:  didit.Some(map[string]any{\"direction\": \"INBOUND\", \"transaction_type\": \"finance\", \"subject_vendor_data\": \"__current__\", \"currency\": \"EUR\"}),\n\t}}),\n\tEvaluationMode: didit.Some(didit.TransactionRuleBacktestRequestEvaluationMode(\"ALL\")),\n\tScope: didit.Some(didit.TransactionRuleScopeParam{\n\t\tTransactionTypes: didit.Some([]string{\"finance\"}),\n\t\tDirections:       didit.Some([]didit.TransactionRuleScopeDirections{\"INBOUND\"}),\n\t}),\n\tPeriodDays: didit.Int(90),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: >-
            import java.util.List;

            import java.util.Map;

            import me.didit.Didit;

            import me.didit.types.TransactionRuleAggregation;

            import me.didit.types.TransactionRuleBacktestRequest;

            import me.didit.types.TransactionRuleCondition;

            import me.didit.types.TransactionRuleScope;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.transactions().rules().backtest(TransactionRuleBacktestRequest.builder()
                    .conditions(List.of(
                            TransactionRuleCondition.builder()
                                    .field("currency")
                                    .operator(TransactionRuleCondition.Operator.of("eq"))
                                    .value("EUR")
                                    .build(),
                            TransactionRuleCondition.builder()
                                    .field("amount")
                                    .operator(TransactionRuleCondition.Operator.of("lt"))
                                    .value(10000)
                                    .build()))
                    .aggregation(List.of(
                            TransactionRuleAggregation.builder()
                                    .metric(TransactionRuleAggregation.Metric.of("count"))
                                    .operator(TransactionRuleAggregation.Operator.of("gte"))
                                    .value(20.0)
                                    .window("30d")
                                    .filters(Map.of("direction", "INBOUND", "transaction_type", "finance", "subject_vendor_data", "__current__", "currency", "EUR"))
                                    .build(),
                            TransactionRuleAggregation.builder()
                                    .metric(TransactionRuleAggregation.Metric.of("max"))
                                    .field("amount")
                                    .operator(TransactionRuleAggregation.Operator.of("lt"))
                                    .value(10000.0)
                                    .window("30d")
                                    .filters(Map.of("direction", "INBOUND", "transaction_type", "finance", "subject_vendor_data", "__current__", "currency", "EUR"))
                                    .build()))
                    .evaluationMode(TransactionRuleBacktestRequest.EvaluationMode.of("ALL"))
                    .scope(TransactionRuleScope.builder()
                            .transactionTypes(List.of("finance"))
                            .directions(List.of(TransactionRuleScope.Directions.of("INBOUND")))
                            .build())
                    .periodDays(90L)
                    .build());
            System.out.println(result);
        - lang: php
          label: PHP
          source: |-
            <?php

            require 'vendor/autoload.php';

            use Didit\DiditClient;

            // Reads DIDIT_API_KEY.
            $didit = new DiditClient();

            $result = $didit->transactions->rules->backtest([
                'conditions' => [[
                    'field' => 'currency',
                    'operator' => 'eq',
                    'value' => 'EUR',
                ], [
                    'field' => 'amount',
                    'operator' => 'lt',
                    'value' => 10000,
                ]],
                'aggregation' => [[
                    'metric' => 'count',
                    'operator' => 'gte',
                    'value' => 20.0,
                    'window' => '30d',
                    'filters' => ['direction' => 'INBOUND', 'transaction_type' => 'finance', 'subject_vendor_data' => '__current__', 'currency' => 'EUR'],
                ], [
                    'metric' => 'max',
                    'field' => 'amount',
                    'operator' => 'lt',
                    'value' => 10000.0,
                    'window' => '30d',
                    'filters' => ['direction' => 'INBOUND', 'transaction_type' => 'finance', 'subject_vendor_data' => '__current__', 'currency' => 'EUR'],
                ]],
                'evaluation_mode' => 'ALL',
                'scope' => [
                    'transaction_types' => ['finance'],
                    'directions' => ['INBOUND'],
                ],
                'period_days' => 90,
            ]);
            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

            # Reads DIDIT_API_KEY.
            didit = Didit::Client.new

            result = didit.transactions.rules.backtest(
              conditions: [{
                field: "currency",
                operator: "eq",
                value: "EUR",
              }, {
                field: "amount",
                operator: "lt",
                value: 10000,
              }],
              aggregation: [{
                metric: "count",
                operator: "gte",
                value: 20.0,
                window: "30d",
                filters: { direction: "INBOUND", transaction_type: "finance", subject_vendor_data: "__current__", currency: "EUR" },
              }, {
                metric: "max",
                field: "amount",
                operator: "lt",
                value: 10000.0,
                window: "30d",
                filters: { direction: "INBOUND", transaction_type: "finance", subject_vendor_data: "__current__", currency: "EUR" },
              }],
              evaluation_mode: "ALL",
              scope: {
                transaction_types: ["finance"],
                directions: ["INBOUND"],
              },
              period_days: 90
            )
            puts result.to_h
        - lang: csharp
          label: .NET
          source: >-
            using System;

            using System.Collections.Generic;

            using System.Text.Json;

            using Didit;


            // Reads DIDIT_API_KEY.

            using var client = new DiditClient();


            var result = await client.Transactions.Rules.BacktestAsync(new
            TransactionRuleBacktestRequest

            {
                Conditions = new TransactionRuleCondition[]
                {
                    new()
                    {
                        Field = "currency",
                        Operator = "eq",
                        Value = "EUR",
                    },
                    new()
                    {
                        Field = "amount",
                        Operator = "lt",
                        Value = 10000,
                    },
                },
                Aggregation = new TransactionRuleAggregation[]
                {
                    new()
                    {
                        Metric = new TransactionRuleAggregationMetric("count"),
                        Operator = new TransactionRuleAggregationOperator("gte"),
                        Value = 20.0,
                        Window = "30d",
                        Filters = new Dictionary<string, object> { ["direction"] = "INBOUND", ["transaction_type"] = "finance", ["subject_vendor_data"] = "__current__", ["currency"] = "EUR" },
                    },
                    new()
                    {
                        Metric = new TransactionRuleAggregationMetric("max"),
                        Field = "amount",
                        Operator = new TransactionRuleAggregationOperator("lt"),
                        Value = 10000.0,
                        Window = "30d",
                        Filters = new Dictionary<string, object> { ["direction"] = "INBOUND", ["transaction_type"] = "finance", ["subject_vendor_data"] = "__current__", ["currency"] = "EUR" },
                    },
                },
                EvaluationMode = new TransactionRuleBacktestRequestEvaluationMode("ALL"),
                Scope = new TransactionRuleScope
                {
                    TransactionTypes = new string[] { "finance" },
                    Directions = new TransactionRuleScopeDirections[] { "INBOUND" },
                },
                PeriodDays = 90,
            });

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    TransactionRuleBacktestRequest:
      type: object
      properties:
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/TransactionRuleCondition'
          default: []
        aggregation:
          type: array
          items:
            $ref: '#/components/schemas/TransactionRuleAggregation'
          default: []
        evaluation_mode:
          type: string
          enum:
            - ALL
            - ANY
          default: ALL
        scope:
          $ref: '#/components/schemas/TransactionRuleScope'
        period_days:
          type: integer
          minimum: 1
          maximum: 365
          default: 90
      description: >-
        हाल के लेन-देन के विरुद्ध मूल्यांकन करने के लिए काल्पनिक नियम
        कॉन्फ़िगरेशन। केवल-पठनीय और निःशुल्क: कुछ भी बनाया या संशोधित नहीं किया
        जाता है। वही conditions, aggregation, evaluation_mode और scope भेजें जो
        उस नियम के हैं जिसे आप सक्रिय करना चाहते हैं। छोड़े गए conditions,
        aggregation और scope अपनी ओर से कोई बाधा नहीं जोड़ते; scope छोड़ने पर वे
        दिशाएँ या लेन-देन प्रकार शामिल हो सकते हैं जिन्हें सहेजा गया नियम छोड़
        देता है। छोड़े गए evaluation_mode का डिफ़ॉल्ट ALL होता है (जो ANY नियम
        के लिए मिलानों को कम कर सकता है), और छोड़े गए period_days का डिफ़ॉल्ट 90
        दिन होता है, असीमित इतिहास नहीं।
    TransactionRuleBacktestResult:
      type: object
      properties:
        evaluated:
          type: integer
          description: मूल्यांकन किए गए लेन-देन (सबसे हाल के पहले, सीमित)।
        matched:
          type: integer
          description: वे लेन-देन जिनसे कॉन्फ़िगरेशन का मिलान हो जाता।
        affected_entities:
          type: integer
          description: मिलानों के बीच विशिष्ट विषय (vendor_data द्वारा)।
        period_days:
          type: integer
    TransactionRuleCondition:
      type: object
      required:
        - field
        - operator
      properties:
        field:
          type: string
          description: >-
            मूल्यांकन करने के लिए लेन-देन फ़ील्ड पाथ। मुख्य फ़ील्ड: amount,
            currency, direction, action_type, score, severity, transaction_type,
            payment_details, preferred_currency_amount
            (amount_in_default_currency पर फ़ॉलबैक करता है),
            default_currency_code, subject_country, counterparty_country,
            subject_vendor_data, counterparty_vendor_data,
            subject_device_fingerprint, counterparty_device_fingerprint,
            subject_browser_family, subject_browser_version, subject_platform,
            subject_accept_language, subject_session_age_ms, subject_ip_country,
            counterparty_ip_country, subject_ip_address,
            counterparty_ip_address, subject_payment_method_type,
            subject_payment_method_country, subject_payment_method_fingerprint,
            subject_payment_method_account_id (और counterparty_payment_method_*
            समकक्ष), travel_rule_status, travel_rule_required,
            travel_rule_obligations_count, counterparty_dd_status (Travel Rule
            प्रतिपक्ष पर आपका निर्णय: APPROVED, RESTRICTED या BLOCKED, अपने
            ब्रांड का अनुसरण करने वाली एक इकाई), counterparty_risk_level (LOW,
            MEDIUM या HIGH; HIGH जब आपकी अपनी प्रतिपक्ष स्क्रीनिंग फ़्लैग की गई
            हो), counterparty_jurisdiction (प्रतिपक्ष VASP का देश),
            counterparty_responsiveness (RESPONSIVE, UNRESPONSIVE या UNKNOWN),
            subject_days_since_previous_transaction, tags, और लेन-देन निर्माण पर
            custom_properties में सबमिट की गई किसी भी कुंजी के लिए
            custom_values.<key>। देश-कोड फ़ील्ड ISO-2 या ISO-3 स्वीकार करते हैं;
            तुलना से पहले दोनों पक्षों को ISO-3 में सामान्यीकृत किया जाता है।
        operator:
          type: string
          enum:
            - eq
            - ne
            - gt
            - gte
            - lt
            - lte
            - in
            - not_in
            - contains
            - not_contains
            - contains_any
            - regex
            - fuzzy_match
            - exists
            - is_not_empty
            - is_not_null
            - not_exists
            - is_empty
            - is_null
          description: >-
            तुलना ऑपरेटर। in/not_in सदस्यता का परीक्षण करते हैं (मान एक सूची या
            एकल स्केलर हो सकता है)। contains/not_contains स्ट्रिंग मान के
            विरुद्ध केस-असंवेदनशील सबस्ट्रिंग जाँच हैं। contains_any स्ट्रिंग्स
            की एक सूची लेता है और तब मेल खाता है जब कोई भी फ़ील्ड मान का
            केस-असंवेदनशील सबस्ट्रिंग हो। regex फ़ील्ड के विरुद्ध मान पैटर्न से
            मेल खाता है। fuzzy_match आवश्यक `score` थ्रेशोल्ड (0-100) के साथ मान
            स्ट्रिंग के विरुद्ध तुलना करता है। gt/gte/lt/lte कभी भी मेल नहीं
            खाते हैं जब कोई भी पक्ष अनुपलब्ध हो। exists/is_not_empty/is_not_null
            (उपनाम) और not_exists/is_empty/is_null (उपनाम) उपस्थिति जाँच हैं जो
            `value` को अनदेखा करती हैं।
        value:
          description: >-
            तुलना मान। इसका स्वरूप ऑपरेटर और value_type पर निर्भर करता है;
            उपस्थिति-जाँच ऑपरेटरों के लिए इसे छोड़ दें। हर दूसरे ऑपरेटर को एक
            ऐसे मान की आवश्यकता होती है जो `null` या खाली सूची न हो, अन्यथा नियम
            को `400` के साथ अस्वीकार कर दिया जाता है। `contains_any` को
            स्ट्रिंग्स की एक सूची की आवश्यकता होती है, और `contains`,
            `not_contains` और `regex` को एकल स्ट्रिंग की आवश्यकता होती है।
        value_type:
          type: string
          enum:
            - list
            - field
            - relative_date
          description: >-
            वैकल्पिक मान व्याख्या। `list`: मान एक List UUID है और सूची की
            प्रविष्टियां तुलना मान बन जाती हैं। `field`: मान एक अन्य फ़ील्ड पथ
            है, जिसकी तुलना फ़ील्ड-दर-फ़ील्ड की जाती है। `relative_date`: मान एक
            सापेक्ष-तिथि ऑब्जेक्ट है, उदाहरण के लिए {"direction": "past",
            "unit": "days", "amount": 30}।
        score:
          type: number
          minimum: 0
          maximum: 100
          description: 'जब ऑपरेटर fuzzy_match हो तब आवश्यक: 0-100 का समानता थ्रेशोल्ड।'
        group_index:
          type: integer
          description: >-
            वैकल्पिक समूहीकृत लॉजिक। जब किसी भी शर्त में group_index शामिल होता
            है, तो एक ही इंडेक्स वाली शर्तें एक समूह बनाती हैं और समूहीकृत
            मूल्यांकन evaluation_mode को प्रतिस्थापित करता है।
        group_logic:
          type: string
          enum:
            - AND
            - OR
          default: AND
          description: एक समूह के भीतर स्थितियां कैसे संयोजित होती हैं।
        groups_logic:
          type: string
          enum:
            - AND
            - OR
          default: OR
          description: >-
            समूहों के बीच समूह परिणाम कैसे संयोजित होते हैं। पहली स्थिति से पढ़ा
            जाता है।
      description: >-
        एक शर्त केवल मूल्यांकित किए जा रहे लेन-देन को पढ़ती है - यह कभी भी
        एकत्रीकरण विंडो को फ़िल्टर नहीं करती है।
    TransactionRuleAggregation:
      type: object
      required:
        - value
      properties:
        metric:
          type: string
          enum:
            - count
            - sum
            - max
            - min
            - avg
            - distinct_count
          default: count
          description: >-
            मिलान वाले ऐतिहासिक लेन-देन को कैसे एकत्रित किया जाता है।
            unique_count को distinct_count के उपनाम के रूप में स्वीकार किया जाता
            है।
        field:
          type: string
          default: amount
          description: >-
            sum/max/min/avg/distinct_count द्वारा एग्रीगेट किया गया फ़ील्ड।
            count के लिए अनदेखा किया गया।
        operator:
          type: string
          enum:
            - eq
            - ne
            - gt
            - gte
            - lt
            - lte
          default: eq
          description: गणना किए गए मीट्रिक पर लागू की गई तुलना।
        value:
          type: number
          description: थ्रेशोल्ड जिसके विरुद्ध गणना किए गए मीट्रिक की तुलना की जाती है।
        window:
          type: string
          pattern: ^\d+(m|h|d)$
          default: 1d
          description: >-
            लेन-देन की txn_date पर समाप्त होने वाली लुक-बैक विंडो: <N>m (मिनट,
            महीने नहीं), <N>h (घंटे) या <N>d (दिन), उदा. 30m, 24h, 7d, 30d।
        filters:
          type: object
          additionalProperties: true
          description: >-
            यह सीमित करता है कि किन ऐतिहासिक लेन-देनों को समूहीकृत किया जाए।
            कुंजियाँ कंडीशन फ़ील्ड कैटलॉग से फ़ील्ड पाथ हैं; "__current__" का
            मान मूल्यांकित किए जा रहे लेन-देन पर उसी फ़ील्ड के मान पर रिज़ॉल्व
            होता है (उदा. {"subject_vendor_data": "__current__"} विंडो को उसी
            विषय तक सीमित करता है), और सूची मान का अर्थ सदस्यता होता है।
            समूहीकृत मान के बिना रिकॉर्ड कभी भी एक साथ समूहीकृत नहीं किए जाते
            हैं: जब मूल्यांकित किए जा रहे लेन-देन में किसी "__current__" फ़ील्ड
            के लिए कोई मान नहीं होता है (कोई प्रतिपक्ष नहीं, कोई डिवाइस
            फ़िंगरप्रिंट नहीं), तो एग्रीगेशन मेल नहीं खाता है, चाहे इसका ऑपरेटर
            कुछ भी हो। फ़िल्टर केवल समानता या सदस्यता द्वारा तुलना करते हैं -
            कोई lt/gte फ़िल्टर नहीं है, इसलिए "10,000 से कम के ऐतिहासिक लेन-देन"
            जैसी सीमा यहाँ व्यक्त नहीं की जा सकती है। इसके बजाय सीमा को मीट्रिक
            पर रखें (lt ऑपरेटर के साथ मीट्रिक max विंडो के प्रत्येक लेन-देन को
            थ्रेशोल्ड से नीचे रखता है)।
      description: >-
        विंडो के भीतर एप्लिकेशन के ऐतिहासिक लेन-देन पर वेलोसिटी जांच।
        evaluation_mode की परवाह किए बिना, नियम से मेल खाने के लिए प्रत्येक
        एग्रीगेशन प्रविष्टि का मेल खाना आवश्यक है। एक एग्रीगेशन केवल विंडो को
        बाधित करता है; मूल्यांकित किए जा रहे लेन-देन को स्कोप और शर्तों द्वारा
        बाधित किया जाता है, इसलिए जब नियम उन्हें निर्दिष्ट करता है तो दोनों
        हिस्सों पर direction, currency या transaction_type दोहराएं।
    TransactionRuleScope:
      type: object
      properties:
        transaction_types:
          type: array
          items:
            type: string
          description: >-
            लेन-देन के प्रकारों तक सीमित करें, उदा. finance, kyc, travel_rule,
            user_event। खाली या अनुपस्थित = कोई प्रतिबंध नहीं।
        directions:
          type: array
          items:
            type: string
            enum:
              - INBOUND
              - OUTBOUND
          description: लेन-देन की दिशाओं तक सीमित करें (लिखते समय केस-इनसेंसिटिव)।
        action_types:
          type: array
          items:
            type: string
          description: अपने action_type मानों तक सीमित करें, उदा. withdrawal, deposit।
      description: >-
        नियम किन लेन-देन पर लागू होता है। केवल ये तीन कुंजियाँ स्वीकार की जाती
        हैं।
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        आपकी एप्लिकेशन की API कुंजी, Business Console में Developers -> API keys
        से। प्राथमिक कुंजी के पास पूर्ण एक्सेस होता है। एक नामित कुंजी को स्कोप
        किया जा सकता है: प्रति संसाधन none, read या write, कुछ वर्कफ़्लो या
        स्वीकृत सत्रों तक सीमित, IP पतों की सूची तक सीमित, और समाप्ति तिथि तक
        सीमित। 401 का अर्थ है कि कुंजी गलत है, निरस्त कर दी गई है या उसकी
        समय-सीमा समाप्त हो गई है; 403 का अर्थ है कि कोई कुंजी नहीं भेजी गई थी,
        कुंजी के पास इस संसाधन या कार्रवाई का एक्सेस नहीं है, या अनुरोध उसकी IP
        सूची से बाहर के पते से आया था; सत्र रूट पर 404 का अर्थ है कि सत्र कुंजी
        के वर्कफ़्लो या स्थितियों से बाहर है। मीडिया एक्सेस के बिना एक कुंजी को
        छवि, वीडियो और PDF URL null के रूप में प्राप्त होते हैं, और सत्र write
        के बिना एक कुंजी को सत्र लिंक और token null के रूप में प्राप्त होते हैं।
        देखें https://docs.didit.me/console/api-keys।

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.