Check AML Status
Fetch the latest status and risk assessment for an existing AML check. Data is refreshed when new information becomes available.
POST /v1/aml-checks/check
Request
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | AML check identifier |
bash
#!/bin/bash
API_TOKEN="your_api_token"
API_SECRET="your_api_secret"
REQUEST_BODY='{
"id": "1042"
}'
# Calculate signature
SIGNATURE=$(echo -n "${REQUEST_BODY}${API_SECRET}" | sha256sum | cut -d' ' -f1)
# Make API request
curl -X POST "https://api.trxup.com/v1/aml-checks/check" \
-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({
id: '1042'
});
// Calculate signature
const signature = crypto
.createHash('sha256')
.update(requestBody + apiSecret)
.digest('hex');
// Make API request
axios({
method: 'post',
url: 'https://api.trxup.com/v1/aml-checks/check',
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([
'id' => '1042'
]);
// Calculate signature
$signature = hash('sha256', $requestBody . $apiSecret);
// Make API request
$ch = curl_init('https://api.trxup.com/v1/aml-checks/check');
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({
'id': '1042'
})
# 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.trxup.com/v1/aml-checks/check',
headers=headers,
data=request_body
)
print(response.json())Response
Returns the AML check details with the most recent risk data. If the check is still pending, the server asks for the result again before answering, so each call returns the newest state; keep polling until the status changes.
Response Fields
| Field | Type | Description |
|---|---|---|
| code | integer | Response code (0 = success) |
| request_id | string | Unique request identifier |
| result | object | AML check data |
| result.id | string | AML check identifier |
| result.type | string | AML service type (address or hash) |
| result.address | string | Screened address |
| result.network | string | Blockchain network code as written in the list of supported networks (e.g. TRX, TetherOMNI) |
| result.status | string | Current AML check status (pending, processing, completed, failed, expired, skipped) |
| result.risk_score | string|null | Risk score as a string with two decimals (e.g. "12.50"), or null when there is no score yet |
| result.risk_level | string|null | Textual risk level (low, medium, high) |
| result.blacklist | boolean | Indicates if a blacklist match was detected |
| result.risk_factors | array | Risk categories the funds are linked to, largest score first, one entry per category; empty [] when no categories were reported (for example, while the check has not completed) |
| result.risk_factors[].name | string | Category key, one of the keys listed in Risk Factor Categories; a category outside that list is reported as other |
| result.risk_factors[].label | string | English label of the category (not translated) |
| result.risk_factors[].group | string | Risk group of the category: low, medium or high |
| result.risk_factors[].score | number | Share of the funds linked to this category, from 0 to 1, rounded to 3 decimals |
| result.checked_at | string | Timestamp when the check was created (ISO 8601) |
| result.hash | string | Screened transaction hash (hash checks only) |
| result.direction | string | Screened side of the transaction, deposit or withdrawal (hash checks only) |
Risk Factor Categories
risk_factors[].name is always one of these keys. A category outside this list is reported as other. The label is always in English: it is part of the response, not a translation.
| name | label | group |
|---|---|---|
enforcement_action | Enforcement Action | high |
ransom | Ransom | high |
dark_market | Dark Market | high |
dark_service | Dark Service | high |
illegal_service | Illegal Service | high |
mixer | Mixer | high |
scam | Scam | high |
gambling | Gambling | high |
stolen_coins | Stolen Coins | high |
exchange_fraudulent | Fraudulent Exchange | high |
child_exploitation | Child Exploitation | high |
sanctions | Sanctions | high |
terrorism_financing | Terrorism Financing | high |
malware | Malware | high |
infrastructure_as_a_service | Infrastructure-as-a-Service | medium |
decentralized_exchange_contract | Decentralized Exchange Contract | medium |
unnamed_service | Unnamed Service | medium |
atm | ATM | medium |
risky_exchange | Risky Exchange | medium |
p2p_exchange_mlrisk_high | P2P Exchange (High Risk) | medium |
liquidity_pools | Liquidity Pools | medium |
exchange | Exchange | low |
merchant_services | Merchant Services | low |
wallet | Wallet | low |
miner | Miner | low |
payment | Payment | low |
marketplace | Marketplace | low |
p2p_exchange | P2P Exchange | low |
seized_assets | Seized Assets | low |
other | Other | low |
Example Response
json
{
"code": 0,
"request_id": "bbf74bcd-fb36-4df8-adc8-25f2bacd087b",
"result": {
"id": "1042",
"type": "address",
"address": "TPY1Kb8cKAZQfm95gXQQs2Mh8Uygtos21D",
"network": "TRX",
"status": "completed",
"risk_score": "12.50",
"risk_level": "medium",
"blacklist": false,
"risk_factors": [
{
"name": "exchange",
"label": "Exchange",
"group": "low",
"score": 0.9
},
{
"name": "p2p_exchange_mlrisk_high",
"label": "P2P Exchange (High Risk)",
"group": "medium",
"score": 0.1
}
],
"checked_at": "2024-03-25T10:42:12+00:00"
}
}For a hash check, hash and direction follow checked_at:
json
{
"code": 0,
"request_id": "bbf74bcd-fb36-4df8-adc8-25f2bacd087b",
"result": {
"id": "1043",
"type": "hash",
"address": "TPY1Kb8cKAZQfm95gXQQs2Mh8Uygtos21D",
"network": "TRX",
"status": "completed",
"risk_score": "3.20",
"risk_level": "low",
"blacklist": false,
"risk_factors": [],
"checked_at": "2024-03-25T10:44:31+00:00",
"hash": "E3F2A1B66DBB9F0B24C4125229163944A7D91EB3F1AC5E409FFCEE0C81A913F2",
"direction": "deposit"
}
}Possible Errors
| Error Code | Key | Description |
|---|---|---|
| 1 | auth | Authentication error (incorrect token or signature) |
| 2 | invalid_service_or_params | Invalid request parameters (id is missing or blank) |
| 30 | aml_check_not_found | AML check not found, or it belongs to another account |
| 500 | internal_server_error | Internal server error |