Skip to content

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 ​

FieldTypeRequiredDescription
idstringYesAML 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 ​

FieldTypeDescription
codeintegerResponse code (0 = success)
request_idstringUnique request identifier
resultobjectAML check data
result.idstringAML check identifier
result.typestringAML service type (address or hash)
result.addressstringScreened address
result.networkstringBlockchain network code as written in the list of supported networks (e.g. TRX, TetherOMNI)
result.statusstringCurrent AML check status (pending, processing, completed, failed, expired, skipped)
result.risk_scorestring|nullRisk score as a string with two decimals (e.g. "12.50"), or null when there is no score yet
result.risk_levelstring|nullTextual risk level (low, medium, high)
result.blacklistbooleanIndicates if a blacklist match was detected
result.risk_factorsarrayRisk 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[].namestringCategory key, one of the keys listed in Risk Factor Categories; a category outside that list is reported as other
result.risk_factors[].labelstringEnglish label of the category (not translated)
result.risk_factors[].groupstringRisk group of the category: low, medium or high
result.risk_factors[].scorenumberShare of the funds linked to this category, from 0 to 1, rounded to 3 decimals
result.checked_atstringTimestamp when the check was created (ISO 8601)
result.hashstringScreened transaction hash (hash checks only)
result.directionstringScreened 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.

namelabelgroup
enforcement_actionEnforcement Actionhigh
ransomRansomhigh
dark_marketDark Markethigh
dark_serviceDark Servicehigh
illegal_serviceIllegal Servicehigh
mixerMixerhigh
scamScamhigh
gamblingGamblinghigh
stolen_coinsStolen Coinshigh
exchange_fraudulentFraudulent Exchangehigh
child_exploitationChild Exploitationhigh
sanctionsSanctionshigh
terrorism_financingTerrorism Financinghigh
malwareMalwarehigh
infrastructure_as_a_serviceInfrastructure-as-a-Servicemedium
decentralized_exchange_contractDecentralized Exchange Contractmedium
unnamed_serviceUnnamed Servicemedium
atmATMmedium
risky_exchangeRisky Exchangemedium
p2p_exchange_mlrisk_highP2P Exchange (High Risk)medium
liquidity_poolsLiquidity Poolsmedium
exchangeExchangelow
merchant_servicesMerchant Serviceslow
walletWalletlow
minerMinerlow
paymentPaymentlow
marketplaceMarketplacelow
p2p_exchangeP2P Exchangelow
seized_assetsSeized Assetslow
otherOtherlow

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 CodeKeyDescription
1authAuthentication error (incorrect token or signature)
2invalid_service_or_paramsInvalid request parameters (id is missing or blank)
30aml_check_not_foundAML check not found, or it belongs to another account
500internal_server_errorInternal server error

Tron Energy API Documentation