Skip to content

AML kontrolü oluştur ​

Bir cüzdan adresi veya belirli bir işlem hash'i için yeni bir AML taraması oluşturur. İstek gerekli bakiyeyi anında ayırır ve mevcut kontrol durumunu döndürür.

POST /v1/aml-checks/new

İstek ​

Parametreler ​

AlanTürZorunluAçıklama
typestringEvetAML servis türü: address veya hash
networkstringEvetBlockchain ağ kodu (aşağıdaki tablo)
addressstringEvetSeçilen ağ için geçerli adres. type = hash için alıcı adresidir.
hashstringKoşullu*Seçilen ağ için geçerli hash. type = hash olduğunda zorunlu
directionstringKoşullu**İşlem yönü (deposit veya withdrawal). type = hash olduğunda zorunlu. Fonlar adresinize geliyorsa deposit (alım), dışarı gidiyorsa withdrawal (gönderim). Risk karşı taraf için hesaplanır: deposit için gönderen, withdrawal için alıcı.

* Yalnızca hash kontrolleri için.
** Yalnızca hash kontrolleri için.

Desteklenen servis türleri ​

TürAçıklama
addressCüzdan adresini tarar ve risk profilini hesaplar
hashTek bir işlem hash'ini tarar ve giriş/çıkış yönünü inceler

Desteklenen ağlar ​

KodAğ
TRXTRON
BTCBitcoin
ETHEthereum
LTCLitecoin
BSCBNB Chain
XRPRipple
MATICPolygon
ADACardano
XLMStellar
bash
#!/bin/bash
API_TOKEN="your_api_token"
API_SECRET="your_api_secret"
REQUEST_BODY='{
  "type": "address",
  "network": "ETH",
  "address": "0x6Dc1f03B1d2c27D6c741832F4AA83322D41De7Ea"
}'

# İmzayı hesapla
SIGNATURE=$(echo -n "${REQUEST_BODY}${API_SECRET}" | sha256sum | cut -d' ' -f1)

# API isteği gönder
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'
});

// İmzayı hesapla
const signature = crypto
  .createHash('sha256')
  .update(requestBody + apiSecret)
  .digest('hex');

// API isteği gönder
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);

// İmzayı hesapla
$signature = hash('sha256', $requestBody . $apiSecret);

// API isteği gönder
$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'
})

# İmzayı hesapla
signature = hashlib.sha256((request_body + api_secret).encode()).hexdigest()

# API isteği gönder
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())

Hash için örnek istek ​

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"
}'

# İmzayı hesapla
SIGNATURE=$(echo -n "${REQUEST_BODY}${API_SECRET}" | sha256sum | cut -d' ' -f1)

# API isteği gönder
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'
});

// İmzayı hesapla
const signature = crypto
  .createHash('sha256')
  .update(requestBody + apiSecret)
  .digest('hex');

// API isteği gönder
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);

// İmzayı hesapla
$signature = hash('sha256', $requestBody . $apiSecret);

// API isteği gönder
$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'
})

# İmzayı hesapla
signature = hashlib.sha256((request_body + api_secret).encode()).hexdigest()

# API isteği gönder
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())

Yanıt ​

Yanıt AML kontrol kimliğini ve en güncel risk verilerini döndürür. Kontrol devam ediyorsa durum pending veya processing olarak kalır.

Yanıt alanları ​

AlanTürAçıklama
codeintegerYanıt kodu (0 = başarı)
request_idstringBenzersiz istek tanımlayıcısı
resultobjectAML kontrol verileri
result.idstringAML kontrol kimliği
result.typestringAML servis türü (address veya hash)
result.addressstringİncelenen adres
result.hashstringİncelenen hash (yalnızca hash için)
result.directionstring|nullİşlem yönü (deposit veya withdrawal) gerektiğinde
result.networkstringBlockchain ağ kodu
result.statusstringKontrol durumu (pending, processing, completed, failed)
result.risk_scorestring|nullRisk skoru
result.risk_levelstring|nullRisk seviyesi (low, medium, high)
result.blacklistbooleanKara listede eşleşme olup olmadığını gösterir
result.risk_factorsarrayRisk faktörlerinin listesi
result.checked_atstringKontrolün oluşturulma zamanı (ISO 8601)

Yanıt örneği ​

json
{
  "code": 0,
  "request_id": "bbf74bcd-fb36-4df8-adc8-25f2bacd087b",
  "result": {
    "id": "01jq7h6bvf6p5t1amnz6y3n8c4",
    "type": "hash",
    "address": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
    "hash": "E3F2A1B66DBB9F0B24C4125229163944A7D91EB3F1AC5E409FFCEE0C81A913F2",
    "direction": "withdrawal",
    "network": "BTC",
    "status": "processing",
    "risk_score": null,
    "risk_level": null,
    "blacklist": false,
    "risk_factors": [],
    "checked_at": "2024-03-25T10:42:12Z"
  }
}

Olası hatalar ​

Hata koduKeyAçıklama
1authKimlik doğrulama hatası (geçersiz token veya imza)
2invalid_service_or_paramsGeçersiz servis veya parametreler
5wallet_not_foundCüzdan bulunamadı
6insufficient_fundsKontrol için bakiye yetersiz
35service_unavailableServis projeniz için kullanılamıyor
500internal_server_errorSunucu hatası

Tron Energy API Documentation