Get AML Services
List AML screening services that are currently active for your project along with their pricing.
POST /v1/aml-checks
Request
No parameters are required for this request.
bash
#!/bin/bash
API_TOKEN="your_api_token"
API_SECRET="your_api_secret"
REQUEST_BODY='{}'
# 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" \
-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({});
// 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',
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([]);
// Calculate signature
$signature = hash('sha256', $requestBody . $apiSecret);
// Make API request
$ch = curl_init('https://api.tronzap.com/v1/aml-checks');
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({})
# 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',
headers=headers,
data=request_body
)
print(response.json())Response
The response returns active AML services that you can use. Each service includes a public identifier, type, and the price that will be charged per check.
Response Fields
| Field | Type | Description |
|---|---|---|
| code | integer | Response code (0 = success) |
| result | array | List of available AML services |
| result[].id | string | Public ULID of the AML service |
| result[].type | string | AML service type (address or hash) |
| result[].price | float | Price per check |
Example Response
json
{
"code": 0,
"result": [
{
"id": "01K834XCB4S535MAS78SDDD16W",
"type": "address",
"price": 2.5
},
{
"id": "01K83530PY02QZ2D9VWG8KNK8H",
"type": "hash",
"price": 3.75
}
]
}Possible Errors
| Error Code | Description |
|---|---|
| 1 | Authentication error (incorrect token or signature) |
| 500 | Internal server error |
