Create AML Check
Create a new AML screening for a wallet address or a specific transaction hash. The request immediately reserves the funds required to run the check and returns the current screening status.
POST /v1/aml-checks/new
Request
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | AML service type: address or hash |
| network | string | Yes | Blockchain network code (see list below) |
| address | string | Yes | Valid address for the selected network. For type = hash, this is the recipient address. |
| hash | string | Conditional* | Valid hash for the selected network. Required when type = hash |
| direction | string | Conditional** | Transaction direction (deposit or withdrawal). Required when type = hash. If funds go to your address, it's a deposit (you receive). If funds go to an external address, it's a withdrawal (you send). |
* Only for transaction hash checks.
** Only for transaction hash checks. Defaults to deposit when omitted.
Supported Service Types
| Type | Description |
|---|---|
| address | Screen a wallet address and calculate its risk profile |
| hash | Screen a single transaction hash, including inbound/outbound direction |
Supported Networks
| Code | Network |
|---|---|
| TRX | TRON |
| BTC | Bitcoin |
| ETC | Ethereum Classic |
| LTC | Litecoin |
| BSC | BNB Chain |
| XRP | Ripple |
| MATIC | Polygon |
| ADA | Cardano |
| XLM | Stellar |
bash
#!/bin/bash
API_TOKEN="your_api_token"
API_SECRET="your_api_secret"
REQUEST_BODY='{
"type": "address",
"network": "ETH",
"address": "0x6Dc1f03B1d2c27D6c741832F4AA83322D41De7Ea"
}'
# Calculate signature
SIGNATURE=$(echo -n "${REQUEST_BODY}${API_SECRET}" | sha256sum | cut -d' ' -f1)
# Make API request
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'
});
// Calculate signature
const signature = crypto
.createHash('sha256')
.update(requestBody + apiSecret)
.digest('hex');
// Make API request
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);
// Calculate signature
$signature = hash('sha256', $requestBody . $apiSecret);
// Make API request
$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'
})
# Calculate signature
signature = hashlib.sha256((request_body + api_secret).encode()).hexdigest()
# Make API request
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())Example Request for Hash Screening
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"
}'
# Calculate signature
SIGNATURE=$(echo -n "${REQUEST_BODY}${API_SECRET}" | sha256sum | cut -d' ' -f1)
# Make API request
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'
});
// Calculate signature
const signature = crypto
.createHash('sha256')
.update(requestBody + apiSecret)
.digest('hex');
// Make API request
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);
// Calculate signature
$signature = hash('sha256', $requestBody . $apiSecret);
// Make API request
$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'
})
# Calculate signature
signature = hashlib.sha256((request_body + api_secret).encode()).hexdigest()
# Make API request
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())Response
The response returns the AML check identifier and the latest screening result. If the check is still in progress, the status will be pending or processing and you can poll the status endpoint for updates.
Response Fields
| Field | Type | Description |
|---|---|---|
| code | integer | Response code (0 = success) |
| result | object | Screened AML check data |
| result.id | string | AML check identifier |
| result.type | string | AML service type (address or hash) |
| result.address | string | Screened address |
| result.hash | string | Screened transaction hash (only for hash checks) |
| result.direction | string | Transaction direction (deposit or withdrawal) when applicable |
| result.network | string | Blockchain network code |
| result.status | string | AML check status (pending, processing, completed, failed) |
| result.risk_score | float | Risk score |
| result.risk_level | string | Textual risk level (low, medium, high) |
| result.blacklist | boolean | true if the address or hash appears on a blacklist |
| result.risk_factors | array | Array of risk factors |
| result.checked_at | string | Timestamp when the check was created (ISO 8601) |
Example Response
json
{
"code": 0,
"result": {
"id": "01jq7h6bvf6p5t1amnz6y3n8c4",
"type": "address",
"address": "0x6Dc1f03B1d2c27D6c741832F4AA83322D41De7Ea",
"network": "ETH",
"status": "completed",
"risk_score": 12.5,
"risk_level": "medium",
"blacklist": false,
"risk_factors": [
{
"name": "p2p_exchange_mlrisk_high",
"label": "P2P Exchange (High Risk)",
"group": "medium",
"score": 0.796
},
{
"name": "exchange",
"label": "Exchange",
"group": "low",
"score": 0.203
}
],
"checked_at": "2024-03-25T10:42:12Z"
}
}Possible Errors
| Error Code | Description |
|---|---|
| 1 | Authentication error (incorrect token or signature) |
| 2 | Invalid service or parameters |
| 5 | Wallet not found |
| 6 | Insufficient funds to run the check |
| 35 | Service not available for your project |
| 500 | Internal server error |
