# Live AML API

## Create Live AML

You can create live anti money laundering tracking with this service. Just add **address** and **webhook** data then we will send notification to your webhook. Also if you want set your streaming webhook you can set with this request (this is optional).

<mark style="color:orange;">`POST`</mark> `https://api.getdefy.co/v2/liveaml/create`

#### Header Parameters

| Name                                     | Type   | Description    |
| ---------------------------------------- | ------ | -------------- |
| apikey<mark style="color:red;">\*</mark> | String | Service Apikey |

#### Body Parameters

| Name                                      | Type   | Description           |
| ----------------------------------------- | ------ | --------------------- |
| address<mark style="color:red;">\*</mark> | String | Wallet Address        |
| webhook<mark style="color:red;">\*</mark> | String | Webhook URL           |
| stream\_webhook                           | String | Streaming Webhook URL |

{% tabs %}
{% tab title="200: OK " %}
{% code lineNumbers="true" %}

```json
{
    "code": 0,
    "message": "OK",
    "data": null
}
```

{% endcode %}
{% endtab %}

{% tab title="400: Bad Request " %}
{% code lineNumbers="true" %}

```json
{
    "message": "Error Message",
    "code": 5004
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Delete Live AML

You can stop your live anti money laundering tracking with this request. Just enter which address you want to stop.&#x20;

<mark style="color:blue;">`DELETE`</mark> `https://api.getdefy.co/v2/liveaml/delete`

#### Header Parameters

| Name                                     | Type   | Description    |
| ---------------------------------------- | ------ | -------------- |
| apikey<mark style="color:red;">\*</mark> | String | Service Apikey |

#### Query Parameters

| Name                                      | Type   | Description    |
| ----------------------------------------- | ------ | -------------- |
| address<mark style="color:red;">\*</mark> | String | Wallet Address |

{% tabs %}
{% tab title="200: OK " %}

```json
{
    "code": 0,
    "message": "OK",
    "data": null
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```json
{
    "message": "Error Message",
    "code": 5004
}
```

{% endtab %}
{% endtabs %}

## List Tracked Live AML Addresses

You can list your live anti money laundering tracking addresses with this request.

<mark style="color:blue;">`GET`</mark> `https://api.getdefy.co/v2/liveaml/list`

#### Header Parameters

| Name                                     | Type   | Description |
| ---------------------------------------- | ------ | ----------- |
| apikey<mark style="color:red;">\*</mark> | string | API\_KEY    |

#### Query Parameters

| Name    | Type    | Description                 |
| ------- | ------- | --------------------------- |
| page\*  | integer | Value has to be minimum 1   |
| limit\* | integer | Value has to be maximum 100 |

{% tabs %}
{% tab title="200: OK " %}

```json
{
    "code": 0,
    "message": "OK",
    "data": [
        {
            "address": "0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae",
            "aml_webhook": "https://www.getdefy.co/amlwebhook",
            "created_at": "2024-07-25T13:57:09.644Z",
            "has_stream": true
        }
    ],
    "page_count": 275
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```json
{
    "message": "Error Message",
    "code": 5004
}
```

{% endtab %}
{% endtabs %}

## Addresses Actions

You can list your tracked accounts notification with this request. Also you can paginate it.

<mark style="color:blue;">`GET`</mark> `https://api.getdefy.co/v2/liveaml/events`

#### Header Parameters

| Name     | Type   | Description |
| -------- | ------ | ----------- |
| apikey\* | String | API\_KEY    |

#### Query Parameters

| Name    | Type    | Description              |
| ------- | ------- | ------------------------ |
| page\*  | Integer | Page Value (Minimum 1)   |
| limit\* | Integer | Page Limit (Maximum 100) |

{% tabs %}
{% tab title="200: OK " %}

```json
{
    "code": 0,
    "message": "OK",
    "data": [
        {
            "id": "18944185",
            "address": "0x388c818ca8b9251b393131c08a736a67ccb19297",
            "event": {
                "hash": "0x42bdfa13f78624505f2fa727749b2a2b01add52910bf3688126d553d4b217f54",
                "tags": {
                    "mixer": false,
                    "fake_kyc": false,
                    "cybercrime": false,
                    "new_wallet": false,
                    "sanctioned": false,
                    "indirect_mixer": false,
                    "invalid_tokens": false,
                    "financial_crime": false,
                    "stealing_attack": false,
                    "money_laundering": false,
                    "gambling_accounts": false,
                    "indirect_fake_kyc": false,
                    "blacklisted_tokens": false,
                    "indirect_cybercrime": false,
                    "indirect_sanctioned": false,
                    "phishing_activities": false,
                    "blacklisted_accounts": false,
                    "blackmail_activities": false,
                    "darkweb_transactions": false,
                    "indirect_financial_crime": false,
                    "indirect_stealing_attack": false,
                    "indirect_money_laundering": false,
                    "indirect_gambling_accounts": true,
                    "indirect_blacklisted_tokens": true,
                    "indirect_phishing_activities": false,
                    "indirect_blacklisted_accounts": true,
                    "indirect_blackmail_activities": false,
                    "indirect_darkweb_transactions": false,
                    "number_of_malicious_contracts_created": false,
                    "indirect_number_of_malicious_contracts_created": false
                },
                "score": 59,
                "hash_tags": {
                    "indirect_gambling_accounts": true,
                    "indirect_blacklisted_tokens": true,
                    "indirect_blacklisted_accounts": true
                },
                "block_number": 541168421
            },
            "created_at": "2024-07-30T12:20:01.211Z"
        }
    ],
    "page_count": 6656
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```json
{
    "message": "Error Message",
    "code": 5004
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.getdefy.co/live-aml/live-aml-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
