Skip to content

AML-Prüfung erstellen ​

Erstellt eine neue AML-Prüfung für eine Wallet-Adresse oder einen bestimmten Transaktionshash. Die Anfrage reserviert sofort die benötigten Mittel und liefert den aktuellen Prüfstatus zurück.

POST /v1/aml-checks/new

Anfrage ​

Parameter ​

FeldTypErforderlichBeschreibung
typestringJaAML-Servicetyp: address oder hash
networkstringJaBlockchain-Netzwerkcode (siehe Tabelle unten)
addressstringJaGültige Adresse für das ausgewählte Netzwerk. Bei type = hash ist dies die Empfängeradresse.
hashstringBedingt*Gültiger Hash für das ausgewählte Netzwerk. Erforderlich, wenn type = hash
directionstringBedingt**Transaktionsrichtung (deposit oder withdrawal). Erforderlich, wenn type = hash. Wenn Gelder an Ihre Adresse gehen, ist es ein Deposit (Sie empfangen). Wenn Gelder an eine externe Adresse gehen, ist es ein Withdrawal (Sie senden). Das Risiko wird für die Gegenpartei bewertet: bei deposit für den Absender, bei withdrawal für den Empfänger.

* Nur für Transaktionshash-Prüfungen.
** Nur für Transaktionshash-Prüfungen.

Verfügbare Servicetypen ​

TypBeschreibung
addressPrüft eine Wallet-Adresse und berechnet ihr Risikoprofil
hashPrüft einen einzelnen Transaktionshash einschließlich Ein-/Ausgangsrichtung

Unterstützte Netzwerke ​

CodeNetzwerk
TRXTRON
BTCBitcoin
ETHEthereum
LTCLitecoin
BSCBNB Chain
XRPRipple
MATICPolygon
ADACardano
XLMStellar
bash
#!/bin/bash
API_TOKEN="your_api_token"
API_SECRET="your_api_secret"
REQUEST_BODY='{
  "type": "address",
  "network": "ETH",
  "address": "0x6Dc1f03B1d2c27D6c741832F4AA83322D41De7Ea"
}'

# Signatur berechnen
SIGNATURE=$(echo -n "${REQUEST_BODY}${API_SECRET}" | sha256sum | cut -d' ' -f1)

# API-Anfrage senden
curl -X POST "https://api.tronzap.com/v1/aml-checks/new" \
  -H "Authorization: Bearer ${API_TOKEN}" \
  -H "X-Signature: ${SIGNATURE}" \
  -H "Content-Type: application/json" \
  -d "${REQUEST_BODY}"
javascript
const crypto = require('crypto');
const axios = require('axios');

const apiToken = 'your_api_token';
const apiSecret = 'your_api_secret';
const requestBody = JSON.stringify({
  type: 'address',
  network: 'ETH',
  address: '0x6Dc1f03B1d2c27D6c741832F4AA83322D41De7Ea'
});

// Signatur berechnen
const signature = crypto
  .createHash('sha256')
  .update(requestBody + apiSecret)
  .digest('hex');

// API-Anfrage senden
axios({
  method: 'post',
  url: 'https://api.tronzap.com/v1/aml-checks/new',
  headers: {
    'Authorization': `Bearer ${apiToken}`,
    'X-Signature': signature,
    'Content-Type': 'application/json'
  },
  data: requestBody
})
.then(response => console.log(response.data))
.catch(error => console.error(error));
php
<?php
$apiToken = 'your_api_token';
$apiSecret = 'your_api_secret';
$requestBody = json_encode([
  'type' => 'address',
  'network' => 'ETH',
  'address' => '0x6Dc1f03B1d2c27D6c741832F4AA83322D41De7Ea',
], JSON_UNESCAPED_SLASHES);

// Signatur berechnen
$signature = hash('sha256', $requestBody . $apiSecret);

// API-Anfrage senden
$ch = curl_init('https://api.tronzap.com/v1/aml-checks/new');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $requestBody);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  'Authorization: Bearer ' . $apiToken,
  'X-Signature: ' . $signature,
  'Content-Type: application/json'
]);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>
python
import hashlib
import json
import requests

api_token = 'your_api_token'
api_secret = 'your_api_secret'
request_body = json.dumps({
  'type': 'address',
  'network': 'ETH',
  'address': '0x6Dc1f03B1d2c27D6c741832F4AA83322D41De7Ea'
})

# Signatur berechnen
signature = hashlib.sha256((request_body + api_secret).encode()).hexdigest()

# API-Anfrage senden
headers = {
  'Authorization': f'Bearer {api_token}',
  'X-Signature': signature,
  'Content-Type': 'application/json'
}

response = requests.post(
  'https://api.tronzap.com/v1/aml-checks/new',
  headers=headers,
  data=request_body
)

print(response.json())

Beispielanfrage für Hash-Prüfung ​

bash
#!/bin/bash
API_TOKEN="your_api_token"
API_SECRET="your_api_secret"
REQUEST_BODY='{
  "type": "hash",
  "network": "BTC",
  "address": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
  "hash": "E3F2A1B66DBB9F0B24C4125229163944A7D91EB3F1AC5E409FFCEE0C81A913F2",
  "direction": "withdrawal"
}'

# Signatur berechnen
SIGNATURE=$(echo -n "${REQUEST_BODY}${API_SECRET}" | sha256sum | cut -d' ' -f1)

# API-Anfrage senden
curl -X POST "https://api.tronzap.com/v1/aml-checks/new" \
  -H "Authorization: Bearer ${API_TOKEN}" \
  -H "X-Signature: ${SIGNATURE}" \
  -H "Content-Type: application/json" \
  -d "${REQUEST_BODY}"
javascript
const crypto = require('crypto');
const axios = require('axios');

const apiToken = 'your_api_token';
const apiSecret = 'your_api_secret';
const requestBody = JSON.stringify({
  type: 'hash',
  network: 'BTC',
  address: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
  hash: 'E3F2A1B66DBB9F0B24C4125229163944A7D91EB3F1AC5E409FFCEE0C81A913F2',
  direction: 'withdrawal'
});

// Signatur berechnen
const signature = crypto
  .createHash('sha256')
  .update(requestBody + apiSecret)
  .digest('hex');

// API-Anfrage senden
axios({
  method: 'post',
  url: 'https://api.tronzap.com/v1/aml-checks/new',
  headers: {
    'Authorization': `Bearer ${apiToken}`,
    'X-Signature': signature,
    'Content-Type': 'application/json'
  },
  data: requestBody
})
.then(response => console.log(response.data))
.catch(error => console.error(error));
php
<?php
$apiToken = 'your_api_token';
$apiSecret = 'your_api_secret';
$requestBody = json_encode([
  'type' => 'hash',
  'network' => 'BTC',
  'address' => 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
  'hash' => 'E3F2A1B66DBB9F0B24C4125229163944A7D91EB3F1AC5E409FFCEE0C81A913F2',
  'direction' => 'withdrawal'
], JSON_UNESCAPED_SLASHES);

// Signatur berechnen
$signature = hash('sha256', $requestBody . $apiSecret);

// API-Anfrage senden
$ch = curl_init('https://api.tronzap.com/v1/aml-checks/new');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $requestBody);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  'Authorization: Bearer ' . $apiToken,
  'X-Signature: ' . $signature,
  'Content-Type: application/json'
]);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>
python
import hashlib
import json
import requests

api_token = 'your_api_token'
api_secret = 'your_api_secret'
request_body = json.dumps({
  'type': 'hash',
  'network': 'BTC',
  'address': 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
  'hash': 'E3F2A1B66DBB9F0B24C4125229163944A7D91EB3F1AC5E409FFCEE0C81A913F2',
  'direction': 'withdrawal'
})

# Signatur berechnen
signature = hashlib.sha256((request_body + api_secret).encode()).hexdigest()

# API-Anfrage senden
headers = {
  'Authorization': f'Bearer {api_token}',
  'X-Signature': signature,
  'Content-Type': 'application/json'
}

response = requests.post(
  'https://api.tronzap.com/v1/aml-checks/new',
  headers=headers,
  data=request_body
)

print(response.json())

Antwort ​

Die Antwort enthält die Kennung der AML-Prüfung sowie die aktuell bekannten Risikodaten. Befindet sich die Prüfung noch in Bearbeitung, bleibt der Status pending oder processing, bis ein Endergebnis vorliegt.

Antwortfelder ​

FeldTypBeschreibung
codeintegerAntwortcode (0 = Erfolg)
request_idstringEindeutiger Anfrage-Bezeichner
resultobjectDaten der AML-Prüfung
result.idstringKennung der AML-Prüfung
result.typestringAML-Servicetyp (address oder hash)
result.addressstringGeprüfte Adresse
result.hashstringGeprüfter Transaktionshash (nur bei Hash-Prüfungen)
result.directionstring|nullTransaktionsrichtung (deposit oder withdrawal), falls zutreffend
result.networkstringBlockchain-Netzwerkcode
result.statusstringStatus der AML-Prüfung (pending, processing, completed, failed)
result.risk_scorestring|nullRisikowert
result.risk_levelstring|nullTextuelle Risikostufe (low, medium, high)
result.blacklistbooleantrue, wenn ein Blacklist-Treffer vorliegt
result.risk_factorsarrayArray von Risikofaktoren
result.checked_atstringZeitpunkt der Erstellung der Prüfung (ISO 8601)

Beispielantwort ​

json
{
  "code": 0,
  "request_id": "bbf74bcd-fb36-4df8-adc8-25f2bacd087b",
  "result": {
    "id": "01jq7h6bvf6p5t1amnz6y3n8c4",
    "type": "hash",
    "address": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
    "hash": "E3F2A1B66DBB9F0B24C4125229163944A7D91EB3F1AC5E409FFCEE0C81A913F2",
    "direction": "withdrawal",
    "network": "BTC",
    "status": "processing",
    "risk_score": null,
    "risk_level": null,
    "blacklist": false,
    "risk_factors": [],
    "checked_at": "2024-03-25T10:42:12Z"
  }
}

Mögliche Fehler ​

FehlercodeKeyBeschreibung
1authAuthentifizierungsfehler (falsches Token oder Signatur)
2invalid_service_or_paramsUngültiger Service oder ungültige Parameter
5wallet_not_foundWallet nicht gefunden
6insufficient_fundsUnzureichendes Guthaben für die Prüfung
35service_unavailableService für Ihr Projekt nicht verfügbar
500internal_server_errorInterner Serverfehler

Tron Energy API Documentation