Skip to content

Get AML History ​

Retrieve a paginated list of AML checks created by the authenticated user. Use filters to narrow down by status.

POST /v1/aml-checks/history

Request ​

Request Parameters ​

FieldTypeRequiredDescription
pageintegerNoPage number to load (default: 1, minimum: 1)
per_pageintegerNoItems per page (default: 10, range: 1-50)
statusstringNoFilter by AML check status (see table below)

Status Filter Values ​

ValueDescription
pendingCheck created and waiting to be processed
processingCheck is in progress
completedCheck finished successfully
failedCheck failed due to provider or validation errors
expiredCheck expired before a result was received
skippedCheck was not run and nothing was charged (for example, an address with no on-chain activity); it carries no risk verdict

processing and expired are accepted by the filter, but checks are currently recorded only as pending, completed, skipped or failed.

bash
#!/bin/bash
API_TOKEN="your_api_token"
API_SECRET="your_api_secret"
REQUEST_BODY='{
  "page": 1,
  "per_page": 10,
  "status": "completed"
}'

# 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/history" \
  -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({
  page: 1,
  per_page: 10,
  status: 'completed'
});

// 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/history',
  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([
  'page' => 1,
  'per_page' => 10,
  'status' => 'completed'
]);

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

// Make API request
$ch = curl_init('https://api.trxup.com/v1/aml-checks/history');
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({
  'page': 1,
  'per_page': 10,
  'status': 'completed'
})

# 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/history',
  headers=headers,
  data=request_body
)

print(response.json())

Response ​

The response provides pagination metadata together with an array of AML checks formatted identically to the single-check endpoints.

Response Fields ​

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

The full list of category keys, with their labels and groups, is in Risk Factor Categories.

Example Response ​

json
{
  "code": 0,
  "request_id": "bbf74bcd-fb36-4df8-adc8-25f2bacd087b",
  "result": {
    "page": 1,
    "per_page": 2,
    "total": 5,
    "items": [
      {
        "id": "1042",
        "type": "hash",
        "address": "TPY1Kb8cKAZQfm95gXQQs2Mh8Uygtos21D",
        "network": "TRX",
        "status": "completed",
        "risk_score": "64.30",
        "risk_level": "high",
        "blacklist": true,
        "risk_factors": [],
        "checked_at": "2024-03-25T11:14:48+00:00",
        "hash": "E3F2A1B66DBB9F0B24C4125229163944A7D91EB3F1AC5E409FFCEE0C81A913F2",
        "direction": "withdrawal"
      },
      {
        "id": "1041",
        "type": "address",
        "address": "TPY1Kb8cKAZQfm95gXQQs2Mh8Uygtos21D",
        "network": "TRX",
        "status": "pending",
        "risk_score": null,
        "risk_level": null,
        "blacklist": false,
        "risk_factors": [],
        "checked_at": "2024-03-25T11:12:03+00:00"
      }
    ]
  }
}

Possible Errors ​

Error CodeKeyDescription
1authAuthentication error (incorrect token or signature)
2invalid_service_or_paramsInvalid pagination or status parameters
500internal_server_errorInternal server error

Tron Energy API Documentation