NAV
cURL NodeJS Python Go PHP Ruby

Introduction

Welcome to the Detrust API! You can use our API to access Detrust AML API endpoints, which comprise a comprehensive suite of blockchain and crypto compliance tools to help you equip you with real-time risk detection capabilities, enabling scrutiny of crypto transactions, wallet addresses, and crypto tokens with precision and efficiency.

Quickstart Guide

Getting Started

  1. Sign in to the Detrust Website.
  2. Click the menu API > Settings, it will require to verify your identigy by email at first time.
  3. If an API Key is present, copy it. Alternatively, click Generate API Key and copy it. Use the API Key to authenticate the Entities endpoints
  4. Configure the IP whitelist before access APIs

Base URL

The base URL of the API is:
https://detrust-api.bitrace.io

Authentication

# With shell, you can just pass the correct header with each request
curl -X GET ${API_URL} \
  --header "X-Access-Key: ${YOUR_API_KEY}" \
  --header "Accept: application/json" \
    --header "Content-Type: application/json"
import axios from 'axios';

const response = await axios.get('${API_URL}', {
  headers: {
    'X-Access-Key': '${YOUR_API_KEY}',
    'Accept': 'application/json',
    'Content-Type': 'application/json'
  }
});
import requests

url = "${API_URL}"

headers = {
  'X-Access-Key': '${YOUR_API_KEY}',
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers)

print(response.text)
package main

import (
    "fmt"
    "io"
    "log"
    "net/http"
)

func main() {
    client := &http.Client{}
    req, err := http.NewRequest("GET", "${API_URL}", nil)
    if err != nil {
        log.Fatal(err)
    }
    req.Header.Set("X-Access-Key", "${YOUR_API_KEY}")
    req.Header.Set("Accept", "application/json")
    req.Header.Set("Content-Type", "application/json")
    resp, err := client.Do(req)
    if err != nil {
        log.Fatal(err)
    }
    defer resp.Body.Close()
    bodyText, err := io.ReadAll(resp.Body)
    if err != nil {
        log.Fatal(err)
    }
    fmt.Printf("%s\n", bodyText)
}
<?php
require 'vendor/autoload.php';

use GuzzleHttp\Client;

$client = new Client();

$response = $client->get('${API_URL}', [
    'headers' => [
        'X-Access-Key' => '${YOUR_API_KEY}',
        'Accept'         => 'application/json',
        'Content-Type' => 'application/json'
    ]
]);
require 'net/http'

uri = URI('${API_URL}')
req = Net::HTTP::Get.new(uri)
req['X-Access-Key'] = '${YOUR_API_KEY}'
req['Accept'] = 'application/json'
req['Content-Type'] = 'application/json'

req_options = {
  use_ssl: uri.scheme == 'https'
}
res = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
  http.request(req)
end

Your API key is the unique identifier used for accessing Detrust AML API endpoints.

Detrust expects for the API key to be included in all API requests to the server in a header that looks like the following:

X-Access-Key: ${YOUR_API_KEY}

Rate Limit

We have implemented rate limits on API calls to prevent overloading. This is to ensure the best possible processing speed, response time, and provide additional security to Detrust APIs products and the fetched data.

Different access limits apply to users:

Playground

You can access the APIs via Postman Collection

Know Your Address(KYA)

KYA Quickstart

The KYA (Know Your Address) API is a risk assessment tool that allows crypto businesses and financial institutions to comprehensively assess risks associated with on-chain all addresses - wallets, tokens, smart contracts and more.

KYA Supported Chains

Chain Full Name Chain Short Name Chain ID Code
Ethereum ETH 1 ethereum
TRON TRON N/A tron

KYA Risk Detection Model

Detrust leverages advanced machine learning and multi-model algorithms to precisely detect different address labels. This enables a thorough scanning of on-chain EOA addresses across five key dimensions, namely suspicious transactions, blocklist addresses, associated blocklist entities, high-risk identities, and entity risks.

How risk is determined

Risk assessments are categorized as Severe, High, Medium, or Low scores. The scoring process for an address involves two factors:

Each entity category has an initial risk assessment and an initial exposure threshold expressed as a percentage of total exposure to that category. If an address meets two or more criteria, the score assigned to the address is determined by the higher of the two scores.

For example, address 0x123abc may have an entity category of Darknet Market (constituting a score of High) and have 20% direct exposure to a sanctioned entity (constituting a risk score of Severe). Since the exposure score is the greater of the two, the address 0x123abc will have a Severe score. We calculate exposure values using both directions (sent and received).

KYA API

Retrieve Entity

getAddressEntity - This endpoint retrieves entity by given address.

HTTP Request

# API_BASE_URL = https://detrust-api.bitrace.io
curl -X GET '${API_BASE_URL}/api/v1/tracker/kya/entities?address=TZ1noC2vbh8HRjt2icUbM1E6pKbSZ83Lfc&network=tron' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'X-Access-Key: ${YOUR_API_KEY}'
import axios from 'axios';

axios.defaults.baseURL = 'https://detrust-api.bitrace.io';

const response = await axios.get('/api/v1/tracker/kya/entities', {
  params: {
    'address': 'TZ1noC2vbh8HRjt2icUbM1E6pKbSZ83Lfc',
    'network': 'tron'
  },
  headers: {
    'X-Access-Key': '${YOUR_API_KEY}',
    'Accept': 'application/json',
    'Content-Type': 'application/json'
  }
});
import requests

url = "${API_BASE_URL}/api/v1/tracker/kya/entities"

headers = {
  'X-Access-Key': '${YOUR_API_KEY}',
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

params = {
    'address': 'TZ1noC2vbh8HRjt2icUbM1E6pKbSZ83Lfc',
    'network': 'tron',
}

response = requests.get(url, params=params, headers=headers)

print(response.text)
package main

import (
    "fmt"
    "io"
    "log"
    "net/http"
)

func main() {
    client := &http.Client{}
    req, err := http.NewRequest("GET", "${API_BASE_URL}/api/v1/tracker/kya/entities?address=TZ1noC2vbh8HRjt2icUbM1E6pKbSZ83Lfc&network=tron", nil)
    if err != nil {
        log.Fatal(err)
    }
    req.Header.Set("X-Access-Key", "${YOUR_API_KEY}")
    req.Header.Set("Accept", "application/json")
    req.Header.Set("Content-Type", "application/json")
    resp, err := client.Do(req)
    if err != nil {
        log.Fatal(err)
    }
    defer resp.Body.Close()
    bodyText, err := io.ReadAll(resp.Body)
    if err != nil {
        log.Fatal(err)
    }
    fmt.Printf("%s\n", bodyText)
}
<?php
require 'vendor/autoload.php';

use GuzzleHttp\Client;

$client = new Client();

$response = $client->get('${API_BASE_URL}' . '/api/v1/tracker/kya/entities', [
    'query' => [
        'address' => 'TZ1noC2vbh8HRjt2icUbM1E6pKbSZ83Lfc',
        'network' => 'tron'
    ],
    'headers' => [
        'X-Access-Key'  => '${YOUR_API_KEY}',
        'Accept'        => 'application/json',
        'Content-Type'  => 'application/json'
    ]
]);
require 'net/http'

uri = URI('${API_BASE_URL}' + '/api/v1/tracker/kya/entities')
params = {
  :address => 'TZ1noC2vbh8HRjt2icUbM1E6pKbSZ83Lfc',
  :network => 'tron',
}
uri.query = URI.encode_www_form(params)

req = Net::HTTP::Get.new(uri)
req['X-Access-Key'] = '${YOUR_API_KEY}'
req['Accept'] = 'application/json'
req['Content-Type'] = 'application/json'

req_options = {
  use_ssl: uri.scheme == 'https'
}
res = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
  http.request(req)
end

GET /api/v1/tracker/kya/entities

Query Parameters
Parameter Type Required Description
address string true The address that you want to retrieve a entity for.
network string true The supported chainns short name,
  • ethereum
  • tron

HTTP Response Schema

Response example

{
  "success":true,
  "code":1,
  "msg":"SUCCESS",
  "data":{
    "time":1714052957650,
    "address":"TZ1noC2vbh8HRjt2icUbM1E6pKbSZ83Lfc",
    "network":"tron",
    "entity":{
      "entityName":"Bybit User",
      "entityCode":"bybit-user",
      "entityCategory":"Exchange",
      "entityCategoryCode":"exchange"
    }
  }
}
{
  "success":true,
  "code":1,
  "msg":"SUCCESS",
  "data":[
    {
      "time":1714047880052,
      "address":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "network":"ethereum",
      "entity":null
    }
  ]
}
Property Type Description
time number the response timestamp from server
address string The address that you want to retrieve a entity for.
network string The supported chainns short name. Values can be,
  • ethereum
  • tron
entity object An object that contains any available entity information for the provided address. If the object returns null, the address has not any entity information. More detail at Schema - Entity
entity.entityName string The name of the identified entity.
entity.entityCode string The code of the identified entity.
entity.entityCategory string The category of the identified entity
entity.entityCategoryCode string The category code of the identified entity

Retrieve Bulk Entities

listAddressEntities - This endpoint retrieves bulk entities by given addresses.

HTTP Request

# API_BASE_URL = https://detrust-api.bitrace.io
curl -X POST "${API_BASE_URL}/api/v1/tracker/kya/entities" \
  --header "X-Access-Key: ${YOUR_API_KEY}" \
  --header "Accept: application/json" \
  --header "Content-Type: application/json" \
  --data '{
      "addresses": [
          "TZ1noC2vbh8HRjt2icUbM1E6pKbSZ83Lfc"
      ],
      "network": "tron"
  }'
import axios from 'axios';

axios.defaults.baseURL = 'https://detrust-api.bitrace.io';

var payload = {
  "addresses": [
    "TZ1noC2vbh8HRjt2icUbM1E6pKbSZ83Lfc"
  ],
  "network": "tron"
}

const response = await axios.post('/api/v1/tracker/kya/entities', {
  headers: {
    'X-Access-Key': '${YOUR_API_KEY}',
    'Accept': 'application/json',
    'Content-Type': 'application/json'
  },
  data: payload
});
import os
import json
import requests

baseUrl = os.getenv('API_BASE_URL', 'https://detrust-api.bitrace.io')
url = baseUrl + "/api/v1/tracker/kya/entities"

headers = {
  'X-Access-Key': '${YOUR_API_KEY}',
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

payload_data = json.dumps({
    'addresses': [
      'TZ1noC2vbh8HRjt2icUbM1E6pKbSZ83Lfc'
    ],
    'network': 'tron',
})

response = requests.post(url, headers=headers, json=payload_data)

print(response.text)
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  // API_BASE_URL = https://detrust-api.bitrace.io
  url := "${API_BASE_URL}/api/v1/tracker/kya/entities"
  method := "POST"

  payload := strings.NewReader(`{
    "addresses": [
        "TZ1noC2vbh8HRjt2icUbM1E6pKbSZ83Lfc"
    ],
    "network": "tron"
  }`)

  client := &http.Client {}
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("X-Access-Key", "${YOUR_API_KEY}")
  req.Header.Add("Accept", "application/json")
  req.Header.Add("Content-Type", "application/json")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
<?php
require 'vendor/autoload.php';

use GuzzleHttp\Client;

$client = new Client();

// API_BASE_URL = https://detrust-api.bitrace.io
$response = $client->post('${API_BASE_URL}' . '/api/v1/tracker/kya/entities', [
    'headers' => [
        'X-Access-Key' => '${YOUR_API_KEY}',
        'Accept'       => 'application/json',
        'Content-Type' => 'application/json'
    ],
    'json' => [
        'addresses' => [
            'TZ1noC2vbh8HRjt2icUbM1E6pKbSZ83Lfc'
        ],
        'network' => 'tron'
    ]
]);
require 'net/http'

# API_BASE_URL = https://detrust-api.bitrace.io
uri = URI('${API_BASE_URL}' + '/api/v1/tracker/kya/entities')
req = Net::HTTP::Get.new(uri)
req['X-Access-Key'] = '${YOUR_API_KEY}'
req['Accept'] = 'application/json'
req['Content-Type'] = 'application/json'

req.body = {
  'addresses' => [
    'TZ1noC2vbh8HRjt2icUbM1E6pKbSZ83Lfc'
  ],
  'network' => 'tron'
}.to_json

req_options = {
  use_ssl: uri.scheme == 'https'
}
res = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
  http.request(req)
end

POST /api/v1/tracker/kya/entities

Request Body Schame
Parameter Type Required Description
addresses string[] true The address array that you want to retrieve entities for.
And the array limit size is 100
network string true The supported chainns short name,
  • ethereum
  • tron

HTTP Response Schema

Response example

{
  "success":true,
  "code":1,
  "msg":"SUCCESS",
  "data":[
    {
      "time":1714053026890,
      "address":"TZ1noC2vbh8HRjt2icUbM1E6pKbSZ83Lfc",
      "network":"tron",
      "entity":{
        "entityName":"Bybit User",
        "entityCode":"bybit-user",
        "entityCategory":"Exchange",
        "entityCategoryCode":"exchange"
      }
    }
  ]
}
Property Type Description
time number the response timestamp from server
address string The address that you want to retrieve a entity for.
network string The supported chainns short name. Values can be,
  • ethereum
  • tron
entity object An object that contains any available entity information for the provided address. If the object returns null, the address has not any entity information. More detail at Schema - Entity
entity.entityName string The name of the identified entity.
entity.entityCode string The code of the identified entity.
entity.entityCategory string The category of the identified entity
entity.entityCategoryCode string The category code of the identified entity

Retrieve Risk Assessment

getAddressRisk - This endpoint retrieves risk by given address.

HTTP Request

# API_BASE_URL = https://detrust-api.bitrace.io
curl -X GET '${API_BASE_URL}/api/v1/tracker/kya/risks?address=TFaB5JCw9Gum2eufeE1Qmmw1uSZCoKXbJ5&network=tron' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'X-Access-Key: ${YOUR_API_KEY}'
import axios from 'axios';

axios.defaults.baseURL = 'https://detrust-api.bitrace.io';

const response = await axios.get('/api/v1/tracker/kya/risks', {
  params: {
    'address': 'TFaB5JCw9Gum2eufeE1Qmmw1uSZCoKXbJ5',
    'network': 'tron'
  },
  headers: {
    'X-Access-Key': '${YOUR_API_KEY}',
    'Accept': 'application/json',
    'Content-Type': 'application/json'
  }
});
import requests

url = "${API_BASE_URL}/api/v1/tracker/kya/risks"

headers = {
  'X-Access-Key': '${YOUR_API_KEY}',
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

params = {
    'address': 'TFaB5JCw9Gum2eufeE1Qmmw1uSZCoKXbJ5',
    'network': 'tron',
}

response = requests.get(url, params=params, headers=headers)

print(response.text)
package main

import (
    "fmt"
    "io"
    "log"
    "net/http"
)

func main() {
    client := &http.Client{}
    req, err := http.NewRequest("GET", "${API_BASE_URL}/api/v1/tracker/kya/risks?address=TFaB5JCw9Gum2eufeE1Qmmw1uSZCoKXbJ5&network=tron", nil)
    if err != nil {
        log.Fatal(err)
    }
    req.Header.Set("X-Access-Key", "${YOUR_API_KEY}")
    req.Header.Set("Accept", "application/json")
    req.Header.Set("Content-Type", "application/json")
    resp, err := client.Do(req)
    if err != nil {
        log.Fatal(err)
    }
    defer resp.Body.Close()
    bodyText, err := io.ReadAll(resp.Body)
    if err != nil {
        log.Fatal(err)
    }
    fmt.Printf("%s\n", bodyText)
}
<?php
require 'vendor/autoload.php';

use GuzzleHttp\Client;

$client = new Client();

$response = $client->get('${API_BASE_URL}' . '/api/v1/tracker/kya/risks', [
    'query' => [
        'address' => 'TFaB5JCw9Gum2eufeE1Qmmw1uSZCoKXbJ5',
        'network' => 'tron'
    ],
    'headers' => [
        'X-Access-Key'  => '${YOUR_API_KEY}',
        'Accept'        => 'application/json',
        'Content-Type'  => 'application/json'
    ]
]);
require 'net/http'

uri = URI('${API_BASE_URL}' + '/api/v1/tracker/kya/risks')
params = {
  :address => 'TFaB5JCw9Gum2eufeE1Qmmw1uSZCoKXbJ5',
  :network => 'tron',
}
uri.query = URI.encode_www_form(params)

req = Net::HTTP::Get.new(uri)
req['X-Access-Key'] = '${YOUR_API_KEY}'
req['Accept'] = 'application/json'
req['Content-Type'] = 'application/json'

req_options = {
  use_ssl: uri.scheme == 'https'
}
res = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
  http.request(req)
end

GET /api/v1/tracker/kya/risks

Query Parameters
Parameter Type Required Description
address string true The address that you want to retrieve a entity for.
network string false The supported chainns short name,
  • ethereum
  • tron

HTTP Response Schema

Response example

{
  "success":true,
  "code":1,
  "msg":"SUCCESS",
  "data":{
    "time":1714099360308,
    "address":"TFaB5JCw9Gum2eufeE1Qmmw1uSZCoKXbJ5",
    "network":"tron",
    "risks":[
      {
        "riskLevel":"high",
        "riskType":"online_gambling"
      }
    ]
  }
}
{
  "success":true,
  "code":1,
  "msg":"SUCCESS",
  "data":{
    "time":1714100534337,
    "address":"TZ1noC2vbh8HRjt2icUbM1E6pKbSZ83Lfc",
    "network":"tron",
    "risks":null
  }
}
Property Type Description
time number the response timestamp from server
address string The address that you want to retrieve a risk for.
network string The supported chainns short name. Values can be,
  • ethereum
  • tron
risks array or null An object array that contains any available risk information for the provided address. If the object returns null, the address has not any risk information.
risks[].riskLevel string The level of the risk.
risks[].riskType string The type of the risk.

Retrieve Bulk Risk Assessments

listAddressRisks - This endpoint retrieves bulk risks by given addresses.

HTTP Request

# API_BASE_URL = https://detrust-api.bitrace.io
curl -X POST "${API_BASE_URL}/api/v1/tracker/kya/risks" \
  --header "X-Access-Key: ${YOUR_API_KEY}" \
  --header "Accept: application/json" \
  --header "Content-Type: application/json" \
  --data '{
      "addresses": [
        "TFskN28dBDqv8tLKtM2GwroGx7bKDUSnBW",
        "THyRaxcBo38AfW9XrKYutgJgRaGygucgKJ",
        "TFaB5JCw9Gum2eufeE1Qmmw1uSZCoKXbJ5",
        "TERx4pYzjM9jrShuRhGXvqxoAdZ83VyvZo",
        "TQoYEabovCJaAaxt32m9khPbHJXRb8K6jk",
        "TQoYEabovCJaAaxt32m9khPbHJXRb8K6jk"
      ],
      "network": "tron"
  }'
import axios from 'axios';

axios.defaults.baseURL = 'https://detrust-api.bitrace.io';

var payload = {
  "addresses": [
    "TFskN28dBDqv8tLKtM2GwroGx7bKDUSnBW",
    "THyRaxcBo38AfW9XrKYutgJgRaGygucgKJ",
    "TFaB5JCw9Gum2eufeE1Qmmw1uSZCoKXbJ5",
    "TERx4pYzjM9jrShuRhGXvqxoAdZ83VyvZo",
    "TQoYEabovCJaAaxt32m9khPbHJXRb8K6jk",
    "TQoYEabovCJaAaxt32m9khPbHJXRb8K6jk"
  ],
  "network": "tron"
}

const response = await axios.post('/api/v1/tracker/kya/risks', {
  headers: {
    'X-Access-Key': '${YOUR_API_KEY}',
    'Accept': 'application/json',
    'Content-Type': 'application/json'
  },
  data: payload
});
import os
import json
import requests

baseUrl = os.getenv('API_BASE_URL', 'https://detrust-api.bitrace.io')
url = baseUrl + "/api/v1/tracker/kya/risks"

headers = {
  'X-Access-Key': '${YOUR_API_KEY}',
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

payload_data = json.dumps({
    'addresses': [
      'TFskN28dBDqv8tLKtM2GwroGx7bKDUSnBW',
      'THyRaxcBo38AfW9XrKYutgJgRaGygucgKJ',
      'TFaB5JCw9Gum2eufeE1Qmmw1uSZCoKXbJ5',
      'TERx4pYzjM9jrShuRhGXvqxoAdZ83VyvZo',
      'TQoYEabovCJaAaxt32m9khPbHJXRb8K6jk',
      'TQoYEabovCJaAaxt32m9khPbHJXRb8K6jk'
    ],
    'network': 'tron',
})

response = requests.post(url, headers=headers, json=payload_data)

print(response.text)
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  // API_BASE_URL = https://detrust-api.bitrace.io
  url := "${API_BASE_URL}/api/v1/tracker/kya/risks"
  method := "POST"

  payload := strings.NewReader(`{
    "addresses": [
        "TFskN28dBDqv8tLKtM2GwroGx7bKDUSnBW",
        "THyRaxcBo38AfW9XrKYutgJgRaGygucgKJ",
        "TFaB5JCw9Gum2eufeE1Qmmw1uSZCoKXbJ5",
        "TERx4pYzjM9jrShuRhGXvqxoAdZ83VyvZo",
        "TQoYEabovCJaAaxt32m9khPbHJXRb8K6jk",
        "TQoYEabovCJaAaxt32m9khPbHJXRb8K6jk"
    ],
    "network": "tron"
  }`)

  client := &http.Client {}
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("X-Access-Key", "${YOUR_API_KEY}")
  req.Header.Add("Accept", "application/json")
  req.Header.Add("Content-Type", "application/json")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
<?php
require 'vendor/autoload.php';

use GuzzleHttp\Client;

$client = new Client();

// API_BASE_URL = https://detrust-api.bitrace.io
$response = $client->post('${API_BASE_URL}' . '/api/v1/tracker/kya/risks', [
    'headers' => [
        'X-Access-Key' => '${YOUR_API_KEY}',
        'Accept'       => 'application/json',
        'Content-Type' => 'application/json'
    ],
    'json' => [
        'addresses' => [
            'TFskN28dBDqv8tLKtM2GwroGx7bKDUSnBW',
            'THyRaxcBo38AfW9XrKYutgJgRaGygucgKJ',
            'TFaB5JCw9Gum2eufeE1Qmmw1uSZCoKXbJ5',
            'TERx4pYzjM9jrShuRhGXvqxoAdZ83VyvZo',
            'TQoYEabovCJaAaxt32m9khPbHJXRb8K6jk',
            'TQoYEabovCJaAaxt32m9khPbHJXRb8K6jk'
        ],
        'network' => 'tron'
    ]
]);
require 'net/http'

# API_BASE_URL = https://detrust-api.bitrace.io
uri = URI('${API_BASE_URL}' + '/api/v1/tracker/kya/risks')
req = Net::HTTP::Get.new(uri)
req['X-Access-Key'] = '${YOUR_API_KEY}'
req['Accept'] = 'application/json'
req['Content-Type'] = 'application/json'

req.body = {
  'addresses' => [
    'TFskN28dBDqv8tLKtM2GwroGx7bKDUSnBW',
    'THyRaxcBo38AfW9XrKYutgJgRaGygucgKJ',
    'TFaB5JCw9Gum2eufeE1Qmmw1uSZCoKXbJ5',
    'TERx4pYzjM9jrShuRhGXvqxoAdZ83VyvZo',
    'TQoYEabovCJaAaxt32m9khPbHJXRb8K6jk',
    'TQoYEabovCJaAaxt32m9khPbHJXRb8K6jk'
  ],
  'network' => 'tron'
}.to_json

req_options = {
  use_ssl: uri.scheme == 'https'
}
res = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
  http.request(req)
end

POST /api/v1/tracker/kya/risks

Request Body Schame
Parameter Type Required Description
addresses string[] true The address array that you want to retrieve entities for.
And the array limit size is 100
network string true The supported chainns short name,
  • ethereum
  • tron

HTTP Response Schema

Response example

{
  "success":true,
  "code":1,
  "msg":"SUCCESS",
  "data":[
    {
      "time":1714107330783,
      "address":"TFskN28dBDqv8tLKtM2GwroGx7bKDUSnBW",
      "network":"tron",
      "risks":[
        {
          "riskLevel":"super-high",
          "riskType":"money_laundering"
        }
      ]
    },
    {
      "time":1714107330783,
      "address":"THyRaxcBo38AfW9XrKYutgJgRaGygucgKJ",
      "network":"tron",
      "risks":null
    },
    {
      "time":1714107330783,
      "address":"TFaB5JCw9Gum2eufeE1Qmmw1uSZCoKXbJ5",
      "network":"tron",
      "risks":[
        {
          "riskLevel":"high",
          "riskType":"online_gambling"
        }
      ]
    },
    {
      "time":1714107330783,
      "address":"TERx4pYzjM9jrShuRhGXvqxoAdZ83VyvZo",
      "network":"tron",
      "risks":[
        {
          "riskLevel":"high",
          "riskType":"money_laundering"
        }
      ]
    },
    {
      "time":1714107330783,
      "address":"TQoYEabovCJaAaxt32m9khPbHJXRb8K6jk",
      "network":"tron",
      "risks":[
        {
          "riskLevel":"high",
          "riskType":"money_laundering"
        }
      ]
    },
    {
      "time":1714107330783,
      "address":"TQoYEabovCJaAaxt32m9khPbHJXRb8K6jk",
      "network":"tron",
      "risks":[
        {
          "riskLevel":"high",
          "riskType":"money_laundering"
        }
      ]
    }
  ]
}
Property Type Description
time number the response timestamp from server
address string The address that you want to retrieve a entity for.
network string The supported chainns short name. Values can be,
  • ethereum
  • tron
risks array or null An object array that contains any available risk information for the provided address. If the object returns null, the address has not any risk information.
risks[].riskLevel string The level of the risk.
risks[].riskType string The type of the risk.

Retrieve Entity and Risk Assessment

getAddressEntityAndRisk - This endpoint retrieves entity and risk by given address.

HTTP Request

# API_BASE_URL = https://detrust-api.bitrace.io
curl -X GET '${API_BASE_URL}/api/v1/tracker/kya/entities-risks?address=TFskN28dBDqv8tLKtM2GwroGx7bKDUSnBW&network=tron' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'X-Access-Key: ${YOUR_API_KEY}'
import axios from 'axios';

axios.defaults.baseURL = 'https://detrust-api.bitrace.io';

const response = await axios.get('/api/v1/tracker/kya/entities-risks', {
  params: {
    'address': 'TFskN28dBDqv8tLKtM2GwroGx7bKDUSnBW',
    'network': 'tron'
  },
  headers: {
    'X-Access-Key': '${YOUR_API_KEY}',
    'Accept': 'application/json',
    'Content-Type': 'application/json'
  }
});
import requests

url = "${API_BASE_URL}/api/v1/tracker/kya/entities-risks"

headers = {
  'X-Access-Key': '${YOUR_API_KEY}',
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

params = {
    'address': 'TFskN28dBDqv8tLKtM2GwroGx7bKDUSnBW',
    'network': 'tron',
}

response = requests.get(url, params=params, headers=headers)

print(response.text)
package main

import (
    "fmt"
    "io"
    "log"
    "net/http"
)

func main() {
    client := &http.Client{}
    req, err := http.NewRequest("GET", "${API_BASE_URL}/api/v1/tracker/kya/entities-risks?address=TFskN28dBDqv8tLKtM2GwroGx7bKDUSnBW&network=tron", nil)
    if err != nil {
        log.Fatal(err)
    }
    req.Header.Set("X-Access-Key", "${YOUR_API_KEY}")
    req.Header.Set("Accept", "application/json")
    req.Header.Set("Content-Type", "application/json")
    resp, err := client.Do(req)
    if err != nil {
        log.Fatal(err)
    }
    defer resp.Body.Close()
    bodyText, err := io.ReadAll(resp.Body)
    if err != nil {
        log.Fatal(err)
    }
    fmt.Printf("%s\n", bodyText)
}
<?php
require 'vendor/autoload.php';

use GuzzleHttp\Client;

$client = new Client();

$response = $client->get('${API_BASE_URL}' . '/api/v1/tracker/kya/entities-risks', [
    'query' => [
        'address' => 'TFskN28dBDqv8tLKtM2GwroGx7bKDUSnBW',
        'network' => 'tron'
    ],
    'headers' => [
        'X-Access-Key'  => '${YOUR_API_KEY}',
        'Accept'        => 'application/json',
        'Content-Type'  => 'application/json'
    ]
]);
require 'net/http'

uri = URI('${API_BASE_URL}' + '/api/v1/tracker/kya/entities-risks')
params = {
  :address => 'TFskN28dBDqv8tLKtM2GwroGx7bKDUSnBW',
  :network => 'tron',
}
uri.query = URI.encode_www_form(params)

req = Net::HTTP::Get.new(uri)
req['X-Access-Key'] = '${YOUR_API_KEY}'
req['Accept'] = 'application/json'
req['Content-Type'] = 'application/json'

req_options = {
  use_ssl: uri.scheme == 'https'
}
res = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
  http.request(req)
end

GET /api/v1/tracker/kya/entities-risks

Query Parameters
Parameter Type Required Description
address string true The address that you want to retrieve a entity for.
network string true The supported chainns short name,
  • ethereum
  • tron

HTTP Response Schema

Response example

{
  "success":true,
  "code":1,
  "msg":"SUCCESS",
  "data":{
    "time":1714107768583,
    "address":"TFskN28dBDqv8tLKtM2GwroGx7bKDUSnBW",
    "network":"tron",
    "entity":{
      "entityName":"Money Laundering",
      "entityCode":"launder-money",
      "entityCategory":null,
      "entityCategoryCode":null
    },
    "risks":[
      {
        "riskLevel":"super-high",
        "riskType":"money_laundering"
      }
    ]
  }
}
Property Type Description
time number the response timestamp from server
address string The address that you want to retrieve a entity for.
network string The supported chainns short name. Values can be,
  • ethereum
  • tron
entity object An object that contains any available entity information for the provided address. If the object returns null, the address has not any entity information. More detail at Schema - Entity
entity.entityName string The name of the identified entity.
entity.entityCode string The code of the identified entity.
entity.entityCategory string The category of the identified entity
entity.entityCategoryCode string The category code of the identified entity
risks array or null An object array that contains any available risk information for the provided address. If the object returns null, the address has not any risk information.
risks[].riskLevel string The level of the risk.
risks[].riskType string The type of the risk.

Retrieve Bulk Entities and Risk Assessments

listAddressEntitiesAndRisks - This endpoint retrieves bulk entities and risks by given addresses.

HTTP Request

# API_BASE_URL = https://detrust-api.bitrace.io
curl -X POST "${API_BASE_URL}/api/v1/tracker/kya/entities-risks" \
  --header "X-Access-Key: ${YOUR_API_KEY}" \
  --header "Accept: application/json" \
  --header "Content-Type: application/json" \
  --data '{
      "addresses": [
        "TZ1noC2vbh8HRjt2icUbM1E6pKbSZ83Lfc",
        "TFskN28dBDqv8tLKtM2GwroGx7bKDUSnBW"
      ],
      "network": "tron"
  }'
import axios from 'axios';

axios.defaults.baseURL = 'https://detrust-api.bitrace.io';

var payload = {
  "addresses": [
      "TZ1noC2vbh8HRjt2icUbM1E6pKbSZ83Lfc",
      "TFskN28dBDqv8tLKtM2GwroGx7bKDUSnBW"
  ],
  "network": "tron"
}

const response = await axios.post('/api/v1/tracker/kya/entities-risks', {
  headers: {
    'X-Access-Key': '${YOUR_API_KEY}',
    'Accept': 'application/json',
    'Content-Type': 'application/json'
  },
  data: payload
});
import os
import json
import requests

baseUrl = os.getenv('API_BASE_URL', 'https://detrust-api.bitrace.io')
url = baseUrl + "/api/v1/tracker/kya/entities-risks"

headers = {
  'X-Access-Key': '${YOUR_API_KEY}',
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

payload_data = json.dumps({
    'addresses': [
      'TZ1noC2vbh8HRjt2icUbM1E6pKbSZ83Lfc',
      'TFskN28dBDqv8tLKtM2GwroGx7bKDUSnBW'
    ],
    'network': 'tron',
})

response = requests.post(url, headers=headers, json=payload_data)

print(response.text)
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  // API_BASE_URL = https://detrust-api.bitrace.io
  url := "${API_BASE_URL}/api/v1/tracker/kya/entities-risks"
  method := "POST"

  payload := strings.NewReader(`{
    "addresses": [
        "TZ1noC2vbh8HRjt2icUbM1E6pKbSZ83Lfc",
        "TFskN28dBDqv8tLKtM2GwroGx7bKDUSnBW"
    ],
    "network": "tron"
  }`)

  client := &http.Client {}
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("X-Access-Key", "${YOUR_API_KEY}")
  req.Header.Add("Accept", "application/json")
  req.Header.Add("Content-Type", "application/json")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
<?php
require 'vendor/autoload.php';

use GuzzleHttp\Client;

$client = new Client();

// API_BASE_URL = https://detrust-api.bitrace.io
$response = $client->post('${API_BASE_URL}' . '/api/v1/tracker/kya/entities-risks', [
    'headers' => [
        'X-Access-Key' => '${YOUR_API_KEY}',
        'Accept'       => 'application/json',
        'Content-Type' => 'application/json'
    ],
    'json' => [
        'addresses' => [
            'TZ1noC2vbh8HRjt2icUbM1E6pKbSZ83Lfc',
            'TFskN28dBDqv8tLKtM2GwroGx7bKDUSnBW'
        ],
        'network' => 'tron'
    ]
]);
require 'net/http'

# API_BASE_URL = https://detrust-api.bitrace.io
uri = URI('${API_BASE_URL}' + '/api/v1/tracker/kya/entities-risks')
req = Net::HTTP::Get.new(uri)
req['X-Access-Key'] = '${YOUR_API_KEY}'
req['Accept'] = 'application/json'
req['Content-Type'] = 'application/json'

req.body = {
  'addresses' => [
    'TZ1noC2vbh8HRjt2icUbM1E6pKbSZ83Lfc',
    'TFskN28dBDqv8tLKtM2GwroGx7bKDUSnBW'
  ],
  'network' => 'tron'
}.to_json

req_options = {
  use_ssl: uri.scheme == 'https'
}
res = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
  http.request(req)
end

POST /api/v1/tracker/kya/entities-risks

Request Body Schame
Parameter Type Required Description
addresses string[] true The address array that you want to retrieve entities for.
And the array limit size is 100
network string true The supported chainns short name,
  • ethereum
  • tron

HTTP Response Schema

Response example

{
  "success":true,
  "code":1,
  "msg":"SUCCESS",
  "data":[
    {
      "time":1714108038581,
      "address":"TZ1noC2vbh8HRjt2icUbM1E6pKbSZ83Lfc",
      "network":"tron",
      "entity":{
        "entityName":"Bybit User",
        "entityCode":"bybit-user",
        "entityCategory":"Exchange",
        "entityCategoryCode":"exchange"
      },
      "risks":null
    },
    {
      "time":1714108038581,
      "address":"TFskN28dBDqv8tLKtM2GwroGx7bKDUSnBW",
      "network":"tron",
      "entity":{
        "entityName":"Money Laundering",
        "entityCode":"launder-money",
        "entityCategory":null,
        "entityCategoryCode":null
      },
      "risks":[
        {
          "riskLevel":"super-high",
          "riskType":"money_laundering"
        }
      ]
    }
  ]
}
Property Type Description
time number the response timestamp from server
address string The address that you want to retrieve a entity for.
network string The supported chainns short name. Values can be,
  • ethereum
  • tron
entity object An object that contains any available entity information for the provided address. If the object returns null, the address has not any entity information. More detail at Schema - Entity
entity.entityName string The name of the identified entity.
entity.entityCode string The code of the identified entity.
entity.entityCategory string The category of the identified entity
entity.entityCategoryCode string The category code of the identified entity
risks array or null An object array that contains any available risk information for the provided address. If the object returns null, the address has not any risk information.
risks[].riskLevel string The level of the risk.
risks[].riskType string The type of the risk.

Identify Frozen Risk

identifyFrozenRisk - This endpoint identify frozen risk by given address.

HTTP Request

# API_BASE_URL = https://detrust-api.bitrace.io
curl -X GET '${API_BASE_URL}/api/v1/tracker/kya/frozen-risks?address=TDtTKTNbouFLKYu4jdrXhehXdqU4bAQXmP&network=tron' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'X-Access-Key: ${YOUR_API_KEY}'
import axios from 'axios';

axios.defaults.baseURL = 'https://detrust-api.bitrace.io';

const response = await axios.get('/api/v1/tracker/kya/frozen-risks', {
  params: {
    'address': 'TDtTKTNbouFLKYu4jdrXhehXdqU4bAQXmP',
    'network': 'tron'
  },
  headers: {
    'X-Access-Key': '${YOUR_API_KEY}',
    'Accept': 'application/json',
    'Content-Type': 'application/json'
  }
});
import requests

url = "${API_BASE_URL}/api/v1/tracker/kya/frozen-risks"

headers = {
  'X-Access-Key': '${YOUR_API_KEY}',
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

params = {
    'address': 'TDtTKTNbouFLKYu4jdrXhehXdqU4bAQXmP',
    'network': 'tron',
}

response = requests.get(url, params=params, headers=headers)

print(response.text)
package main

import (
    "fmt"
    "io"
    "log"
    "net/http"
)

func main() {
    client := &http.Client{}
    req, err := http.NewRequest("GET", "${API_BASE_URL}/api/v1/tracker/kya/frozen-risks?address=TDtTKTNbouFLKYu4jdrXhehXdqU4bAQXmP&network=tron", nil)
    if err != nil {
        log.Fatal(err)
    }
    req.Header.Set("X-Access-Key", "${YOUR_API_KEY}")
    req.Header.Set("Accept", "application/json")
    req.Header.Set("Content-Type", "application/json")
    resp, err := client.Do(req)
    if err != nil {
        log.Fatal(err)
    }
    defer resp.Body.Close()
    bodyText, err := io.ReadAll(resp.Body)
    if err != nil {
        log.Fatal(err)
    }
    fmt.Printf("%s\n", bodyText)
}
<?php
require 'vendor/autoload.php';

use GuzzleHttp\Client;

$client = new Client();

$response = $client->get('${API_BASE_URL}' . '/api/v1/tracker/kya/frozen-risks', [
    'query' => [
        'address' => 'TDtTKTNbouFLKYu4jdrXhehXdqU4bAQXmP',
        'network' => 'tron'
    ],
    'headers' => [
        'X-Access-Key'  => '${YOUR_API_KEY}',
        'Accept'        => 'application/json',
        'Content-Type'  => 'application/json'
    ]
]);
require 'net/http'

uri = URI('${API_BASE_URL}' + '/api/v1/tracker/kya/frozen-risks')
params = {
  :address => 'TDtTKTNbouFLKYu4jdrXhehXdqU4bAQXmP',
  :network => 'tron',
}
uri.query = URI.encode_www_form(params)

req = Net::HTTP::Get.new(uri)
req['X-Access-Key'] = '${YOUR_API_KEY}'
req['Accept'] = 'application/json'
req['Content-Type'] = 'application/json'

req_options = {
  use_ssl: uri.scheme == 'https'
}
res = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
  http.request(req)
end

GET /api/v1/tracker/kya/frozen-risks

Query Parameters
Parameter Type Required Description
address string true The address that you want to identify for frozen risk.
network string true The supported chainns short name,
  • ethereum
  • tron

HTTP Response Schema

Response example

{
  "success":true,
  "code":1,
  "msg":"SUCCESS",
  "data":{
    "freezeCard":"low",
    "freezeCoin":"low",
    "risk":[
      "money_laundering"
    ],
    "serviceAddress":true
  }
}
Property Type Description
freezeCard string the frozen card risk level, see Enumeration - Risk Level
freezeCoin string the frozen coin risk level, see Enumeration - Risk Level
serviceAddress boolean whether it could be the service address or not
risk string[] The risk array of hits. More detail at Enumeration - Risk Type

Know Your Transaction(KYT)

KYT Quickstart

The KYT (Know Your Transaction) API is an automated crypto asset transaction monitoring and compliance solution.

The KYT API provides real-time risk screening and compliance insights for your customer's deposit and withdrawal activities with continuous retrieve KYT-generated alerts, exposure information, or identifications to help you quickly make synchronous decisions about how to treat the transfer or withdrawal.

Create API Key

You can create KYT API Key from the "User Account Setttins" (on the top right of topbar).

  1. Sign in to the Detrust Website.
  2. Click the "User Setttins" (on the top right of topbar), and click "Create KEY", it will popup a model and require to verify your identigy by email at first time.
  3. If an API Key is present, just copy it. Use the API Key to authenticate the KYT API endpoints
  4. And the "User ID" would be used in transfer/withdrawal registration

KYT Supported Chains

Chain Full Name Chain Short Name Chain ID Code
Ethereum ETH 1 ethereum
TRON TRON N/A tron

KYT API

Register Transfer

registerTransfer - This endpoint registers a transfer. Once you make a request for a transfer, KYT stores it and begins processing.

HTTP Request

# API_BASE_URL = https://detrust-api.bitrace.io
# userId = 2716383794
curl -X POST '${API_BASE_URL}/api/v1/tracker/kyt/users/{userId}/transfers' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'X-Access-Key: ${YOUR_API_KEY}' \
  --data '{
    "network": "tron",
    "asset": "USDT",
    "transferReference": "16719388bb28553424920763fae51f341c65b315771c6a74d5a6161de7f08e0f:TFqXtjyGEi9FpTLCkzunEGkPzshcoL23Zq",
    "direction": "sent"
  }'
# API_BASE_URL = https://detrust-api.bitrace.io
# userId = 2716383794
curl -X POST '${API_BASE_URL}/api/v1/tracker/kyt/users/{userId}/transfers' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'X-Access-Key: ${YOUR_API_KEY}' \
  --data '{
    "network":"tron",
    "asset":"USDT",
    "transferReference":"bfb8853c4b34573db67608eea458ea709ae62dfa3ad80ebe8fcf345c30990d5d:TRdsxniZr8BHdTpG6VEVP1yBnSXPweQnzA",
    "direction":"sent",
    "transferTimestamp":1646944652000,
    "assetAmount":1347,
    "outputAddress":"TGMn5NyRo8eKFVMnZoZ39Uh3Fhu9BPPjpV"
  }'
import axios from 'axios';

axios.defaults.baseURL = 'https://detrust-api.bitrace.io';

const userId = 2716383794

const payload = {
  "network": "tron",
  "asset": "USDT",
  "transferReference": "16719388bb28553424920763fae51f341c65b315771c6a74d5a6161de7f08e0f:TFqXtjyGEi9FpTLCkzunEGkPzshcoL23Zq",
  "direction": "sent"
}

const response = await axios.post(`/api/v1/tracker/kyt/users/${userId}/transfers`, {
  headers: {
    'X-Access-Key': '${YOUR_API_KEY}',
    'Accept': 'application/json',
    'Content-Type': 'application/json'
  },
  data: payload
});
import os
import json
import requests

baseUrl = os.getenv('API_BASE_URL', 'https://detrust-api.bitrace.io')
url = "{baseUrl}/api/v1/tracker/kyt/users/{userId}/transfers".format(baseUrl = baseUrl, userId = 2716383794)

headers = {
  'X-Access-Key': '${YOUR_API_KEY}',
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

payload_data = json.dumps({
    'network': 'tron',
    'asset': 'USDT',
    'transferReference': '16719388bb28553424920763fae51f341c65b315771c6a74d5a6161de7f08e0f:TFqXtjyGEi9FpTLCkzunEGkPzshcoL23Zq',
    'direction': 'sent'
})

response = requests.post(url, headers=headers, json=payload_data)

print(response.text)
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  // API_BASE_URL = https://detrust-api.bitrace.io
  // userId = 2716383794
  url := "${API_BASE_URL}/api/v1/tracker/kyt/users/${userId}/transfers"
  method := "POST"

  payload := strings.NewReader(`{
    "network": "tron",
    "asset": "USDT",
    "transferReference": "16719388bb28553424920763fae51f341c65b315771c6a74d5a6161de7f08e0f:TFqXtjyGEi9FpTLCkzunEGkPzshcoL23Zq",
    "direction": "sent"
  }`)

  client := &http.Client {}
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("X-Access-Key", "${YOUR_API_KEY}")
  req.Header.Add("Accept", "application/json")
  req.Header.Add("Content-Type", "application/json")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
<?php
require 'vendor/autoload.php';

use GuzzleHttp\Client;

$client = new Client();

// API_BASE_URL = https://detrust-api.bitrace.io
// userId = 2716383794
$response = $client->post('${API_BASE_URL}' . '/api/v1/tracker/kyt/users/${userId}/transfers', [
    'headers' => [
        'X-Access-Key' => '${YOUR_API_KEY}',
        'Accept'       => 'application/json',
        'Content-Type' => 'application/json'
    ],
    'json' => [
        'network' => 'tron',
        'asset' => 'USDT',
        'transferReference' => '16719388bb28553424920763fae51f341c65b315771c6a74d5a6161de7f08e0f:TFqXtjyGEi9FpTLCkzunEGkPzshcoL23Zq',
        'direction' => 'sent'
    ]
]);
require 'net/http'

# API_BASE_URL = https://detrust-api.bitrace.io
# userId = 2716383794
uri = URI('${API_BASE_URL}' + '/api/v1/tracker/kyt/users/${userId}/transfers')
req = Net::HTTP::Get.new(uri)
req['X-Access-Key'] = '${YOUR_API_KEY}'
req['Accept'] = 'application/json'
req['Content-Type'] = 'application/json'

req.body = {
  'network' => 'tron',
  'asset' => 'USDT',
  'transferReference' => '16719388bb28553424920763fae51f341c65b315771c6a74d5a6161de7f08e0f:TFqXtjyGEi9FpTLCkzunEGkPzshcoL23Zq',
  'direction' => 'sent'
}.to_json

req_options = {
  use_ssl: uri.scheme == 'https'
}
res = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
  http.request(req)
end

POST /api/v1/tracker/kyt/users/{userId}/transfers

Path Variable
Parameter Type Required Description
userId string true The identifies that user associated with the trasfer.
Request Body Schame
Parameter Type Required Description
network string true The supported chainns short name. Values can be,
  • ethereum
  • tron
asset string true The cryptocurrency or token used in this transfer.
transferReference string true A unique identifier that represents a specific asset or token on a blockchain. For example,
  • {transaction_hash}:{output_address}
  • {transaction_hash}:{output_index}
direction string true This value defines whether the transfer is sent or received. This value is case insensitive.
transferTimestamp string false The timestamp when the transfer occurred, in the UTC ISO 8601 format. The timestamp should correspond to the timestamp of the block that included the transaction.
assetAmount number false The amount of cryptocurrency funds used in this transfer.
outputAddress string false The destination address for funds within the transaction.
inputAddresses string[] false A list of input addresses of the transfer. Note: This property is available only when registering transactions of pre-growth assets.
assetPrice number false The USD price of the asset at the time of the transfer.
assetDenomination string false The denomination of the assetPrice property. Available only as USD.

HTTP Response Schema

Response example 1

{
  "success": true,
  "code": 1,
  "msg": "SUCCESS",
  "data": {
    "updatedAt": null,
    "asset": "usdt",
    "network": "tron",
    "transferReference": "16719388bb28553424920763fae51f341c65b315771c6a74d5a6161de7f08e0f:TFqXtjyGEi9FpTLCkzunEGkPzshcoL23Zq",
    "tx": null,
    "idx": null,
    "usdAmount": null,
    "assetAmount": null,
    "timestamp": null,
    "outputAddress": null,
    "externalId": "70672866532"
  }
}

Response example 2

{
  "success":true,
  "code":1,
  "msg":"SUCCESS",
  "data":{
    "updatedAt":"2024-01-16T08:17:21.263",
    "asset":"usdt",
    "network":"tron",
    "transferReference":"bfb8853c4b34573db67608eea458ea709ae62dfa3ad80ebe8fcf345c30990d5d:TRdsxniZr8BHdTpG6VEVP1yBnSXPweQnzA",
    "tx":"bfb8853c4b34573db67608eea458ea709ae62dfa3ad80ebe8fcf345c30990d5d",
    "idx":null,
    "usdAmount":1347.000000000000000000000000000000000000,
    "assetAmount":1347.000000000000000000,
    "timestamp":"2024-01-15T09:33:03",
    "outputAddress":"TGMn5NyRo8eKFVMnZoZ39Uh3Fhu9BPPjpV",
    "externalId":"65391971770"
  }
}
Property Type Description
updatedAt string or null The timestamp when the transfer was last updated, in the UTC ISO 8601 format. Note: this value remains null following the initial POST request until KYT finishes processing the transfer. Poll the summary endpoint until updatedAt returns a value.
asset string An echo back of the cryptocurrency asset you defined in the request body. This is the asset's symbol, for example, BTC for Bitcoin, ETH for Ether or USDT for Tether USD.
network string The supported chainns short name. Values can be,
  • ethereum
  • tron
transferReference string or null An echo back of the transfer reference you defined in the request body.
tx string or null The transaction hash of the transfer. Note: this value remains null following the initial POST request until KYT finishes processing the transfer.
idx integer or null The transfer’s index. Note: this value remains null following the initial POST request until KYT finishes processing the transfer.
usdAmount number or null The US Dollar amount of funds used in this transfer. Note: this value remains null following the initial POST request until KYT finishes processing the transfer.
assetAmount number or null The amount of cryptocurrency funds used in this transfer. Note: this value remains null following the initial POST request until KYT finishes processing the transfer.
timestamp string or null The timestamp when the transfer occurred, in the UTC ISO 8601 format. Note: this value remains null following the initial POST request until KYT finishes processing the transfer.
outputAddress string or null The destination address for funds within the transaction. If not provided in the POST request, KYT infers this from the transferReference. Note: this value remains null following the initial POST request until KYT finishes processing the transfer.
externalId string A generated identifier of this transfer.

Get Transfer Summary

getTransferSummary - This endpoint returns the summary of the transfer you registered in your POST /kyt/users/{userId}/transfers request.

HTTP Request

# API_BASE_URL = https://detrust-api.bitrace.io
# externalId = 65391971770
curl -X GET '${API_BASE_URL}/api/v1/tracker/kyt/transfers/{externalId}' \
  --header 'Accept: application/json' \
  --header 'X-Access-Key: ${YOUR_API_KEY}'
import axios from 'axios';

axios.defaults.baseURL = 'https://detrust-api.bitrace.io';

const externalId = 65391971770;

const response = await axios.get('/api/v1/tracker/kyt/transfers/{externalId}', {
  headers: {
    'X-Access-Key': '${YOUR_API_KEY}',
    'Accept': 'application/json'
  }
});
import requests

url = "${API_BASE_URL}/api/v1/tracker/kyt/transfers/${externalId}"

headers = {
  'X-Access-Key': '${YOUR_API_KEY}',
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

response = requests.get(url, headers=headers)

print(response.text)
package main

import (
    "fmt"
    "io"
    "log"
    "net/http"
)

func main() {
    client := &http.Client{}
    req, err := http.NewRequest("GET", "${API_BASE_URL}/api/v1/tracker/kyt/transfers/{externalId}", nil)
    if err != nil {
        log.Fatal(err)
    }
    req.Header.Set("X-Access-Key", "${YOUR_API_KEY}")
    req.Header.Set("Accept", "application/json")
    resp, err := client.Do(req)
    if err != nil {
        log.Fatal(err)
    }
    defer resp.Body.Close()
    bodyText, err := io.ReadAll(resp.Body)
    if err != nil {
        log.Fatal(err)
    }
    fmt.Printf("%s\n", bodyText)
}
<?php
require 'vendor/autoload.php';

use GuzzleHttp\Client;

$client = new Client();

$response = $client->get('${API_BASE_URL}' . '/api/v1/tracker/kyt/transfers/${externalId}', [
    'headers' => [
        'X-Access-Key'  => '${YOUR_API_KEY}',
        'Accept'        => 'application/json'
    ]
]);
require 'net/http'

uri = URI('${API_BASE_URL}' + '/api/v1/tracker/kyt/transfers/${externalId}')
req = Net::HTTP::Get.new(uri)
req['X-Access-Key'] = '${YOUR_API_KEY}'
req['Accept'] = 'application/json'
req['Content-Type'] = 'application/json'

req_options = {
  use_ssl: uri.scheme == 'https'
}
res = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
  http.request(req)
end

GET /api/v1/tracker/kyt/transfers/{externalId}

Path Variable
Parameter Type Required Description
externalId string true The generated identifier that user associated with the trasfer.

HTTP Response Schema

Response example

{
  "success":true,
  "code":1,
  "msg":"SUCCESS",
  "data":{
    "updatedAt":"2024-01-16T08:17:21.263",
    "asset":"usdt",
    "network":"tron",
    "transferReference":"bfb8853c4b34573db67608eea458ea709ae62dfa3ad80ebe8fcf345c30990d5d:TRdsxniZr8BHdTpG6VEVP1yBnSXPweQnzA",
    "tx":"bfb8853c4b34573db67608eea458ea709ae62dfa3ad80ebe8fcf345c30990d5d",
    "idx":null,
    "usdAmount":1347.000000000000000000000000000000000000,
    "assetAmount":1347.000000000000000000,
    "timestamp":"2024-01-15T09:33:03",
    "outputAddress":"TGMn5NyRo8eKFVMnZoZ39Uh3Fhu9BPPjpV",
    "externalId":"65391971770"
  }
}
Property Type Description
updatedAt string or null The timestamp when the transfer was last updated, in the UTC ISO 8601 format. Note: this value remains null following the initial POST request until KYT finishes processing the transfer. Poll the summary endpoint until updatedAt returns a value.
asset string An echo back of the cryptocurrency asset you defined in the request body. This is the asset's symbol, for example, BTC for Bitcoin, ETH for Ether or USDT for Tether USD.
network string The supported chainns short name. Values can be,
  • ethereum
  • tron
transferReference string An echo back of the transfer reference you defined in the request body.
tx string or null The transaction hash of the transfer. Note: this value remains null following the initial POST request until KYT finishes processing the transfer.
idx integer or null The transfer’s index. Note: this value remains null following the initial POST request until KYT finishes processing the transfer.
usdAmount number or null The US Dollar amount of funds used in this transfer. Note: this value remains null following the initial POST request until KYT finishes processing the transfer.
assetAmount number or null The amount of cryptocurrency funds used in this transfer. Note: this value remains null following the initial POST request until KYT finishes processing the transfer.
timestamp string or null The timestamp when the transfer occurred, in the UTC ISO 8601 format. Note: this value remains null following the initial POST request until KYT finishes processing the transfer.
outputAddress string or null The destination address for funds within the transaction. If not provided in the POST request, KYT infers this from the transferReference. Note: this value remains null following the initial POST request until KYT finishes processing the transfer.
externalId string A generated identifier of this transfer.

Get Transfer Exposures

getTransferExposures - This endpoint registers a transfer. Once you make a request for a transfer, KYT stores it and begins processing.

HTTP Request

# API_BASE_URL = https://detrust-api.bitrace.io
# externalId = 65391971770
curl -X GET '${API_BASE_URL}/api/v1/tracker/kyt/transfers/{externalId}/exposures' \
  --header 'Accept: application/json' \
  --header 'X-Access-Key: ${YOUR_API_KEY}'
import axios from 'axios';

axios.defaults.baseURL = 'https://detrust-api.bitrace.io';

const externalId = 65391971770;

const response = await axios.get('/api/v1/tracker/kyt/transfers/{externalId}/exposures', {
  headers: {
    'X-Access-Key': '${YOUR_API_KEY}',
    'Accept': 'application/json'
  }
});
import requests

url = "${API_BASE_URL}/api/v1/tracker/kyt/transfers/${externalId}/exposures"

headers = {
  'X-Access-Key': '${YOUR_API_KEY}',
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

response = requests.get(url, headers=headers)

print(response.text)
package main

import (
    "fmt"
    "io"
    "log"
    "net/http"
)

func main() {
    client := &http.Client{}
    req, err := http.NewRequest("GET", "${API_BASE_URL}/api/v1/tracker/kyt/transfers/{externalId}/exposures", nil)
    if err != nil {
        log.Fatal(err)
    }
    req.Header.Set("X-Access-Key", "${YOUR_API_KEY}")
    req.Header.Set("Accept", "application/json")
    resp, err := client.Do(req)
    if err != nil {
        log.Fatal(err)
    }
    defer resp.Body.Close()
    bodyText, err := io.ReadAll(resp.Body)
    if err != nil {
        log.Fatal(err)
    }
    fmt.Printf("%s\n", bodyText)
}
<?php
require 'vendor/autoload.php';

use GuzzleHttp\Client;

$client = new Client();

$response = $client->get('${API_BASE_URL}' . '/api/v1/tracker/kyt/transfers/${externalId}/exposures', [
    'headers' => [
        'X-Access-Key'  => '${YOUR_API_KEY}',
        'Accept'        => 'application/json'
    ]
]);
require 'net/http'

uri = URI('${API_BASE_URL}' + '/api/v1/tracker/kyt/transfers/${externalId}/exposures')
req = Net::HTTP::Get.new(uri)
req['X-Access-Key'] = '${YOUR_API_KEY}'
req['Accept'] = 'application/json'
req['Content-Type'] = 'application/json'

req_options = {
  use_ssl: uri.scheme == 'https'
}
res = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
  http.request(req)
end

GET /api/v1/tracker/kyt/transfers/{externalId}/exposures

Path Variable
Parameter Type Required Description
externalId string true The generated identifier that user associated with the trasfer.

HTTP Response Schema

Response example

{
  "success":true,
  "code":1,
  "msg":"SUCCESS",
  "data":{
    "direct":[
      {
        "name":null,
        "category":null,
        "categoryId":"online_gambling"
      },
      {
        "name":null,
        "category":null,
        "categoryId":"other"
      }
    ]
  }
}
Property Type Description
direct object or null Contains information of a given cluster's direct exposure. If null, the entity has neither a name and category or Detrust has identified neither the name and category. More detail at Schema - Direct Exposure
direct.name string The name of a given cluster's counterparty as identified.
direct.category string The category of a given cluster's counterparty as identified.
direct.categoryId string The category ID of a given cluster's counterparty as identified. see Schema - Risk Category

Get Transfer Alerts

getTransferAlerts - This endpoint retrieves transfer alerts generated for a specified transfer, identified by its externalId. This endpoint does not retrieve behavioral alerts.

HTTP Request

# API_BASE_URL = https://detrust-api.bitrace.io
# externalId = 65391971770
curl -X GET '${API_BASE_URL}/api/v1/tracker/kyt/transfers/{externalId}/alerts' \
  --header 'Accept: application/json' \
  --header 'X-Access-Key: ${YOUR_API_KEY}'
import axios from 'axios';

axios.defaults.baseURL = 'https://detrust-api.bitrace.io';

const externalId = 65391971770;

const response = await axios.get('/api/v1/tracker/kyt/transfers/{externalId}/alerts', {
  headers: {
    'X-Access-Key': '${YOUR_API_KEY}',
    'Accept': 'application/json'
  }
});
import requests

url = "${API_BASE_URL}/api/v1/tracker/kyt/transfers/${externalId}/alerts"

headers = {
  'X-Access-Key': '${YOUR_API_KEY}',
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

response = requests.get(url, headers=headers)

print(response.text)
package main

import (
    "fmt"
    "io"
    "log"
    "net/http"
)

func main() {
    client := &http.Client{}
    req, err := http.NewRequest("GET", "${API_BASE_URL}/api/v1/tracker/kyt/transfers/{externalId}/alerts", nil)
    if err != nil {
        log.Fatal(err)
    }
    req.Header.Set("X-Access-Key", "${YOUR_API_KEY}")
    req.Header.Set("Accept", "application/json")
    resp, err := client.Do(req)
    if err != nil {
        log.Fatal(err)
    }
    defer resp.Body.Close()
    bodyText, err := io.ReadAll(resp.Body)
    if err != nil {
        log.Fatal(err)
    }
    fmt.Printf("%s\n", bodyText)
}
<?php
require 'vendor/autoload.php';

use GuzzleHttp\Client;

$client = new Client();

$response = $client->get('${API_BASE_URL}' . '/api/v1/tracker/kyt/transfers/${externalId}/alerts', [
    'headers' => [
        'X-Access-Key'  => '${YOUR_API_KEY}',
        'Accept'        => 'application/json'
    ]
]);
require 'net/http'

uri = URI('${API_BASE_URL}' + '/api/v1/tracker/kyt/transfers/${externalId}/alerts')
req = Net::HTTP::Get.new(uri)
req['X-Access-Key'] = '${YOUR_API_KEY}'
req['Accept'] = 'application/json'
req['Content-Type'] = 'application/json'

req_options = {
  use_ssl: uri.scheme == 'https'
}
res = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
  http.request(req)
end

GET /api/v1/tracker/kyt/transfers/{externalId}/alerts

Path Variable
Parameter Type Required Description
externalId string true The generated identifier that user associated with the trasfer.

HTTP Response Schema

Response example

{
  "success":true,
  "code":1,
  "msg":"SUCCESS",
  "data":{
    "alerts":[
      {
        "alertLevel":"high",
        "category":null,
        "service":null,
        "externalId":"65391971770",
        "alertAmount":1347.000000000000000000000000000000000000,
        "exposureType":"DIRECT",
        "categoryId":"online_gambling"
      },
      {
        "alertLevel":"low",
        "category":null,
        "service":null,
        "externalId":"65391971770",
        "alertAmount":1347.000000000000000000000000000000000000,
        "exposureType":"DIRECT",
        "categoryId":"other"
      }
    ],
    "strategy":null
  }
}
Property Type Description
alerts object[] An object array that contains any available alert information for the provided transfer. If no alerts have been generated, the array will be empty. More detail at Schema - Alert
alerts.alertLevel string Defines the alert's risk level, see Schema - Risk Level
alerts.category string The category of a given cluster's counterparty as identified.
alerts.categoryId string The category ID of a given cluster's counterparty as identified. see Schema - Risk Category
alerts.service string or null The name of the service as defined by Detrust.
alerts.externalId string A unique identify of the alert.
alerts.alertAmount number The USD amount that caused the alert to trigger.
alerts.exposureType string Defines the exposure direction as DIRECT or INDIRECT.
strategy object An object that contains any available strategy information for the provided transfer. More detail at Schema - Alert
strategy.strategy string or null The name of the strategy as defined by user.
strategy.rule string or null The rule of the strategy as defined by user.
strategy.level string Defines the alert's risk level, see Schema - Risk Level.
strategy.decisionCode string The decision code
strategy.decisionMarker string The decision marker

Register Withdrawal Attempt

registerWithdrawalAttempt - This endpoint registers a withdrawal attempt. Once you make a request for a withdrawal attempt, KYT stores it and begins processing.

HTTP Request

# API_BASE_URL = https://detrust-api.bitrace.io
# userId = 2716383794
curl -X POST '${API_BASE_URL}/api/v1/tracker/kyt/users/{userId}/withdrawal-attempts' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'X-Access-Key: ${YOUR_API_KEY}' \
  --data '{
    "network":"tron",
    "asset":"USDT",
    "address":"TFqXtjyGEi9FpTLCkzunEGkPzshcoL23Zq",
    "attemptIdentifier":"attempt_TFqX",
    "assetAmount":500,
    "attemptTimestamp":"1717065474000"
  }'
import axios from 'axios';

axios.defaults.baseURL = 'https://detrust-api.bitrace.io';

var userId = 2716383794

var payload = {
  "network": "tron",
  "asset": "USDT",
  "address": "TFqXtjyGEi9FpTLCkzunEGkPzshcoL23Zq",
  "attemptIdentifier": "attempt_TFqX",
  "assetAmount":500,
  "attemptTimestamp":"1717065474000"
}

const response = await axios.post(`/api/v1/tracker/kyt/users/${userId}/withdrawal-attempts`, {
  headers: {
    'X-Access-Key': '${YOUR_API_KEY}',
    'Accept': 'application/json',
    'Content-Type': 'application/json'
  },
  data: payload
});
import os
import json
import requests

baseUrl = os.getenv('API_BASE_URL', 'https://detrust-api.bitrace.io')
url = "{baseUrl}/api/v1/tracker/kyt/users/{userId}/withdrawal-attempts".format(baseUrl = baseUrl, userId = 2716383794)

headers = {
  'X-Access-Key': '${YOUR_API_KEY}',
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

payload_data = json.dumps({
  'network':'tron',
  'asset':'USDT',
  'address':'TFqXtjyGEi9FpTLCkzunEGkPzshcoL23Zq',
  'attemptIdentifier':'attempt_TFqX',
  'assetAmount':500,
  'attemptTimestamp':'1717065474000'
})

response = requests.post(url, headers=headers, json=payload_data)

print(response.text)
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  // API_BASE_URL = https://detrust-api.bitrace.io
  // userId = 2716383794
  url := "${API_BASE_URL}/api/v1/tracker/kyt/users/${userId}/withdrawal-attempts"
  method := "POST"

  payload := strings.NewReader(`{
    "network": "tron",
    "asset": "USDT",
    "address": "TFqXtjyGEi9FpTLCkzunEGkPzshcoL23Zq",
    "attemptIdentifier": "attempt_TFqX",
    "assetAmount":500,
    "attemptTimestamp":"1717065474000"
  }`)

  client := &http.Client {}
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("X-Access-Key", "${YOUR_API_KEY}")
  req.Header.Add("Accept", "application/json")
  req.Header.Add("Content-Type", "application/json")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
<?php
require 'vendor/autoload.php';

use GuzzleHttp\Client;

$client = new Client();

// API_BASE_URL = https://detrust-api.bitrace.io
// userId = 2716383794
$response = $client->post('${API_BASE_URL}' . '/api/v1/tracker/kyt/users/${userId}/withdrawal-attempts', [
    'headers' => [
        'X-Access-Key' => '${YOUR_API_KEY}',
        'Accept'       => 'application/json',
        'Content-Type' => 'application/json'
    ],
    'json' => [
        'network' => 'tron',
        'asset' => 'USDT',
        'address' => 'TFqXtjyGEi9FpTLCkzunEGkPzshcoL23Zq',
        'attemptIdentifier' => 'attempt_TFqX',
        'assetAmount' => 500,
        'attemptTimestamp' => '1717065474000'
    ]
]);
require 'net/http'

# API_BASE_URL = https://detrust-api.bitrace.io
# userId = 2716383794
uri = URI('${API_BASE_URL}' + '/api/v1/tracker/kyt/users/${userId}/withdrawal-attempts')
req = Net::HTTP::Get.new(uri)
req['X-Access-Key'] = '${YOUR_API_KEY}'
req['Accept'] = 'application/json'
req['Content-Type'] = 'application/json'

req.body = {
  'network' => 'tron',
  'asset' => 'USDT',
  'address' => 'TFqXtjyGEi9FpTLCkzunEGkPzshcoL23Zq',
  'attemptIdentifier' => 'attempt_TFqX',
  'assetAmount' => 500,
  'attemptTimestamp' => '1717065474000'
}.to_json

req_options = {
  use_ssl: uri.scheme == 'https'
}
res = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
  http.request(req)
end

POST /api/v1/tracker/kyt/users/{userId}/withdrawal-attempts

Path Variable
Parameter Type Required Description
userId string true The identifies that user associated with the trasfer.
Request Body Schame
Parameter Type Required Description
network string true The supported chainns short name. Values can be,
  • ethereum
  • tron
asset string true The cryptocurrency or token used in this transfer.
address stirng true The cryptocurrency address of the wallet to which the withdrawal attempt is being made.
attemptIdentifier string true A unique string that identifies this withdrawal attempt. Keys can be any valid string but must be unique for every distinct withdrawal attempt.
assetAmount number true The amount of cryptocurrency funds used in this withdrawal attempt.
assetPrice number false The USD price of the asset at the time of the transfer.
assetDenomination string false The denomination of the assetPrice property. Available only as USD.
attemptTimestamp string true The timestamp when the withdrawal attempt occurred, in the UTC format.

HTTP Response Schema

Response example

{
  "success":true,
  "code":1,
  "msg":"SUCCESS",
  "data":{
    "network":"tron",
    "asset":"usdt",
    "address":"TFqXtjyGEi9FpTLCkzunEGkPzshcoL23Zq",
    "attemptIdentifier":"attempt_TFqX",
    "assetAmount":500,
    "usdAmount":null,
    "updatedAt":null,
    "externalId":"75584140490"
  }
}
Property Type Description
network string The supported chainns short name. Values can be,
  • ethereum
  • tron
asset string An echo back of the cryptocurrency asset you defined in the request body. This is the asset's symbol, for example, BTC for Bitcoin, ETH for Ether or USDT for Tether USD.
address string An echo back of the address you defined in the request body.
attemptIdentifier string An echo back of the identifier you created in the request body.
assetAmount number An echo back of the asset amount defined in the request body.
usdAmount number or null The US Dollar amount of funds used in this transfer. Note: this value remains null following the initial POST request until KYT finishes processing the withdrawal attempt.
updatedAt string or null The timestamp when the withdrawal attempt was last updated, in the UTC ISO 8601 format. Note: this value remains null following the initial POST request until KYT finishes processing the withdrawal attempt. If null, poll the summary endpoint until updatedAt returns a value.
externalId string A generated identifier of the withdrawal attempt.

Get Withdrawal Summary

getWithdrawalSummary - This endpoint returns the summary of the withdrawal attempt you registered in your POST /kyt/users/{userId}/withdrawal-attempts request.

HTTP Request

# API_BASE_URL = https://detrust-api.bitrace.io
# externalId = 93211976690
curl -X GET '${API_BASE_URL}/api/v1/tracker/kyt/withdrawal-attempts/{externalId}' \
  --header 'Accept: application/json' \
  --header 'X-Access-Key: ${YOUR_API_KEY}'
import axios from 'axios';

axios.defaults.baseURL = 'https://detrust-api.bitrace.io';

const externalId = 93211976690;

const response = await axios.get('/api/v1/tracker/kyt/withdrawal-attempts/{externalId}', {
  headers: {
    'X-Access-Key': '${YOUR_API_KEY}',
    'Accept': 'application/json'
  }
});
import requests

url = "${API_BASE_URL}/api/v1/tracker/kyt/withdrawal-attempts/${externalId}"

headers = {
  'X-Access-Key': '${YOUR_API_KEY}',
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

response = requests.get(url, headers=headers)

print(response.text)
package main

import (
    "fmt"
    "io"
    "log"
    "net/http"
)

func main() {
    client := &http.Client{}
    req, err := http.NewRequest("GET", "${API_BASE_URL}/api/v1/tracker/kyt/withdrawal-attempts/{externalId}", nil)
    if err != nil {
        log.Fatal(err)
    }
    req.Header.Set("X-Access-Key", "${YOUR_API_KEY}")
    req.Header.Set("Accept", "application/json")
    resp, err := client.Do(req)
    if err != nil {
        log.Fatal(err)
    }
    defer resp.Body.Close()
    bodyText, err := io.ReadAll(resp.Body)
    if err != nil {
        log.Fatal(err)
    }
    fmt.Printf("%s\n", bodyText)
}
<?php
require 'vendor/autoload.php';

use GuzzleHttp\Client;

$client = new Client();

$response = $client->get('${API_BASE_URL}' . '/api/v1/tracker/kyt/withdrawal-attempts/${externalId}', [
    'headers' => [
        'X-Access-Key'  => '${YOUR_API_KEY}',
        'Accept'        => 'application/json'
    ]
]);
require 'net/http'

uri = URI('${API_BASE_URL}' + '/api/v1/tracker/kyt/withdrawal-attempts/${externalId}')
req = Net::HTTP::Get.new(uri)
req['X-Access-Key'] = '${YOUR_API_KEY}'
req['Accept'] = 'application/json'
req['Content-Type'] = 'application/json'

req_options = {
  use_ssl: uri.scheme == 'https'
}
res = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
  http.request(req)
end

GET /api/v1/tracker/kyt/withdrawal-attempts/{externalId}

Path Variable
Parameter Type Required Description
externalId string true The generated identifier that user associated with the trasfer.

HTTP Response Schema

Response example

{
  "success":true,
  "code":1,
  "msg":"SUCCESS",
  "data":{
    "network":"tron",
    "asset":"usdt",
    "address":"TNfdhREUrT3WZxRNKpPaoNmpvBFq8EFLjb",
    "attemptIdentifier":"attempt2",
    "assetAmount":998.180582000000000000,
    "usdAmount":998.180582000000000000000000000000000000,
    "updatedAt":"2023-10-30T03:10:14.127",
    "externalId":"93211976690"
  }
}
Property Type Description
network string The supported chainns short name. Values can be,
  • ethereum
  • tron
asset string or null The asset used in the withdrawal attempt.
address string or null The address where the withdrawal attempt is being made.
attemptIdentifier string or null An echo back of the attemptIdentifier.
assetAmount number or null The amount of cryptocurrency funds used in this withdrawal attempt.
usdAmount number or null The amount of US Dollars used in this withdrawal attempt.
updatedAt string or null The timestamp of when the withdrawal attempt was last processed, in the UTC ISO 8601 format.
externalId string The generated identifier of this withdrawal attempt.

Get Withdrawal Exposures

getWithdrawalExposures - This endpoint returns any available direct exposure information for a withdrawal attempt.

HTTP Request

# API_BASE_URL = https://detrust-api.bitrace.io
# externalId = 93211976690
curl -X GET '${API_BASE_URL}/api/v1/tracker/kyt/withdrawal-attempts/{externalId}/exposures' \
  --header 'Accept: application/json' \
  --header 'X-Access-Key: ${YOUR_API_KEY}'
import axios from 'axios';

axios.defaults.baseURL = 'https://detrust-api.bitrace.io';

const externalId = 93211976690;

const response = await axios.get('/api/v1/tracker/kyt/withdrawal-attempts/{externalId}/exposures', {
  headers: {
    'X-Access-Key': '${YOUR_API_KEY}',
    'Accept': 'application/json'
  }
});
import requests

url = "${API_BASE_URL}/api/v1/tracker/kyt/withdrawal-attempts/${externalId}/exposures"

headers = {
  'X-Access-Key': '${YOUR_API_KEY}',
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

response = requests.get(url, headers=headers)

print(response.text)
package main

import (
    "fmt"
    "io"
    "log"
    "net/http"
)

func main() {
    client := &http.Client{}
    req, err := http.NewRequest("GET", "${API_BASE_URL}/api/v1/tracker/kyt/withdrawal-attempts/{externalId}/exposures", nil)
    if err != nil {
        log.Fatal(err)
    }
    req.Header.Set("X-Access-Key", "${YOUR_API_KEY}")
    req.Header.Set("Accept", "application/json")
    resp, err := client.Do(req)
    if err != nil {
        log.Fatal(err)
    }
    defer resp.Body.Close()
    bodyText, err := io.ReadAll(resp.Body)
    if err != nil {
        log.Fatal(err)
    }
    fmt.Printf("%s\n", bodyText)
}
<?php
require 'vendor/autoload.php';

use GuzzleHttp\Client;

$client = new Client();

$response = $client->get('${API_BASE_URL}' . '/api/v1/tracker/kyt/withdrawal-attempts/${externalId}/exposures', [
    'headers' => [
        'X-Access-Key'  => '${YOUR_API_KEY}',
        'Accept'        => 'application/json'
    ]
]);
require 'net/http'

uri = URI('${API_BASE_URL}' + '/api/v1/tracker/kyt/withdrawal-attempts/${externalId}/exposures')
req = Net::HTTP::Get.new(uri)
req['X-Access-Key'] = '${YOUR_API_KEY}'
req['Accept'] = 'application/json'
req['Content-Type'] = 'application/json'

req_options = {
  use_ssl: uri.scheme == 'https'
}
res = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
  http.request(req)
end

GET /api/v1/tracker/kyt/withdrawal-attempts/{externalId}/exposures

Path Variable
Parameter Type Required Description
externalId string true The generated identifier that user associated with the trasfer.

HTTP Response Schema

Response example

{
  "success":true,
  "code":1,
  "msg":"SUCCESS",
  "data":{
    "direct":[
      {
        "name":null,
        "category":null,
        "categoryId":"exchange"
      }
    ]
  }
}
Property Type Description
direct object or null Contains information of a given cluster's direct exposure. If null, the entity has neither a name and category or Detrust has identified neither the name and category. More detail at Schema - Direct Exposure
direct.name string The name of a given cluster's counterparty as identified.
direct.category string The category of a given cluster's counterparty as identified.
direct.categoryId string The category ID of a given cluster's counterparty as identified. see Schema - Risk Category

Get Withdrawal Alerts

getWithdrawalAlerts - This endpoint returns a withdrawal attempt's alerts, if available.

HTTP Request

# API_BASE_URL = https://detrust-api.bitrace.io
# externalId = 93211976690
curl -X GET '${API_BASE_URL}/api/v1/tracker/kyt/withdrawal-attempts/{externalId}/alerts' \
  --header 'Accept: application/json' \
  --header 'X-Access-Key: ${YOUR_API_KEY}'
import axios from 'axios';

axios.defaults.baseURL = 'https://detrust-api.bitrace.io';

const externalId = 93211976690

const response = await axios.get('/api/v1/tracker/kyt/withdrawal-attempts/{externalId}/alerts', {
  headers: {
    'X-Access-Key': '${YOUR_API_KEY}',
    'Accept': 'application/json'
  }
});
import requests

url = "${API_BASE_URL}/api/v1/tracker/kyt/withdrawal-attempts/${externalId}/alerts"

headers = {
  'X-Access-Key': '${YOUR_API_KEY}',
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

response = requests.get(url, headers=headers)

print(response.text)
package main

import (
    "fmt"
    "io"
    "log"
    "net/http"
)

func main() {
    client := &http.Client{}
    req, err := http.NewRequest("GET", "${API_BASE_URL}/api/v1/tracker/kyt/withdrawal-attempts/{externalId}/alerts", nil)
    if err != nil {
        log.Fatal(err)
    }
    req.Header.Set("X-Access-Key", "${YOUR_API_KEY}")
    req.Header.Set("Accept", "application/json")
    resp, err := client.Do(req)
    if err != nil {
        log.Fatal(err)
    }
    defer resp.Body.Close()
    bodyText, err := io.ReadAll(resp.Body)
    if err != nil {
        log.Fatal(err)
    }
    fmt.Printf("%s\n", bodyText)
}
<?php
require 'vendor/autoload.php';

use GuzzleHttp\Client;

$client = new Client();

$response = $client->get('${API_BASE_URL}' . '/api/v1/tracker/kyt/withdrawal-attempts/${externalId}/alerts', [
    'headers' => [
        'X-Access-Key'  => '${YOUR_API_KEY}',
        'Accept'        => 'application/json'
    ]
]);
require 'net/http'

uri = URI('${API_BASE_URL}' + '/api/v1/tracker/kyt/withdrawal-attempts/${externalId}/alerts')
req = Net::HTTP::Get.new(uri)
req['X-Access-Key'] = '${YOUR_API_KEY}'
req['Accept'] = 'application/json'
req['Content-Type'] = 'application/json'

req_options = {
  use_ssl: uri.scheme == 'https'
}
res = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
  http.request(req)
end

GET /api/v1/tracker/kyt/withdrawal-attempts/{externalId}/alerts

Path Variable
Parameter Type Required Description
externalId string true The generated identifier that user associated with the trasfer.

HTTP Response Schema

Response example

{
  "success":true,
  "code":1,
  "msg":"SUCCESS",
  "data":{
    "alerts":[
      {
        "alertLevel":"medium",
        "category":null,
        "service":null,
        "externalId":"93211976690",
        "alertAmount":998.180582000000000000000000000000000000,
        "exposureType":"DIRECT",
        "categoryId":"exchange"
      }
    ],
    "strategy":{
      "strategy":"严格的提币策略",
      "rule":"大额提币到交易所",
      "level":"中风险",
      "decisionCode":"2002",
      "decisionMarker":"合规审核"
    }
  }
}
Property Type Description
alerts object[] An object array that contains any available alert information for the provided transfer. If no alerts have been generated, the array will be empty. More detail at Schema - Alert
alerts.alertLevel string Defines the alert's risk level, see Schema - Risk Level
alerts.category string The category of a given cluster's counterparty as identified
alerts.categoryId string The category ID of a given cluster's counterparty as identified. see Schema - Risk Category
alerts.service string or null The name of the service as defined by Detrust.
alerts.externalId string A unique identify of the alert.
alerts.alertAmount number The USD amount that caused the alert to trigger.
alerts.exposureType string Defines the exposure direction as DIRECT or INDIRECT.
strategy object An object that contains any available strategy information for the provided transfer. More detail at Schema - Alert
strategy.strategy string or null The name of the strategy as defined by user.
strategy.rule string or null The rule of the strategy as defined by user.
strategy.level string Defines the alert's risk level, see Schema - Risk Level.
strategy.decisionCode string The decision code
strategy.decisionMarker string The decision marker

Resources

Schema

API Reponse

Example (success),

{
  "success":true,
  "code":1,
  "msg":"SUCCESS",
  "data":{
    "time":1714052957650,
    "address":"TZ1noC2vbh8HRjt2icUbM1E6pKbSZ83Lfc",
    "network":"tron",
    "entity":{
      "entityName":"Bybit User",
      "entityCode":"bybit-user",
      "entityCategory":"Exchange",
      "entityCategoryCode":"exchange"
    }
  }
}

Example (error),

{
    "code": 429,
    "msg": "You exceeded your current quota, please check your plan and billing details.",
    "success": false
}
Name Type Description
success boolean Request success or not
code number
msg string SUCCESS or error message
data object array
error object the error object when response 4xx or 5xx

Entity

{
  "success":true,
  "code":1,
  "msg":"SUCCESS",
  "data":{
    "time":1714052957650,
    "address":"TZ1noC2vbh8HRjt2icUbM1E6pKbSZ83Lfc",
    "network":"tron",
    "entity":{
      "entityName":"Bybit User",
      "entityCode":"bybit-user",
      "entityCategory":"Exchange",
      "entityCategoryCode":"exchange"
    }
  }
}
Name Type Description
entityName string The name of the identified entity
entityCode string The code of the identified entity
entityCategory string The category of the identified entity
entityCategoryCode string The category code of the identified entity

Risk Assessment

{
  "success":true,
  "code":1,
  "msg":"SUCCESS",
  "data":{
    "time":1714099360308,
    "address":"TFaB5JCw9Gum2eufeE1Qmmw1uSZCoKXbJ5",
    "network":"tron",
    "risks":[
      {
        "riskLevel":"high",
        "riskType":"online_gambling"
      }
    ]
  }
}
Name Type Description
riskLevel string The level of the risk assessment, see in Enum - Risk Level
riskType string The type of the risk assessment, see in Enum - Risk Type

Transfer & Withdrawal

Direct Exposure

{
  "direct": {
    "name": "BitPay.com",
    "category": "merchant services",
    "categoryId": 17
  }
}
Name Type Description
name string The name of a given cluster's counterparty as identified. If null, the entity has no name or Detrust has not identified the entity.
category string The category of a given cluster's counterparty as identified. see Schema - Risk Level
categoryId string The unique identifie for category.

Alert

{
  "alertLevel": "Severe",
  "category": "sanctioned entity",
  "service": "OFAC SDN Blender.io 2022-05-06",
  "externalId": "906ff226-8b64-11eb-8e52-7b35a3dc1742",
  "alertAmount": 8868.24,
  "exposureType": "DIRECT",
  "categoryId": 3
}
Name Type Description
alertLevel string Defines the alert's risk level, see Schema - Risk Level
category string The category of a given cluster's counterparty as identified. see Schema - Risk Level
categoryId string The unique identifie for category.
service string or null The name of the service as defined by Detrust.
externalId string A unique identify of the alert.
alertAmount number The USD amount that caused the alert to trigger.
exposureType string Defines the exposure direction as DIRECT or INDIRECT.

Strategy

{
  "alertLevel": "Severe",
  "category": "sanctioned entity",
  "service": "OFAC SDN Blender.io 2022-05-06",
  "externalId": "906ff226-8b64-11eb-8e52-7b35a3dc1742",
  "alertAmount": 8868.24,
  "exposureType": "DIRECT",
  "categoryId": 3
}
Name Type Description
strategy string or null The name of the strategy as defined by user.
rule string or null The rule of the strategy as defined by user.
level string Defines the alert's risk level, see Schema - Risk Level.
decisionCode string The decision code
decisionMarker string The decision marker

Enumeration

Blockchain

Name Blockchain
ethereum Ethereum
tron Tron

Entity Category

Name Code
Game game
Lending loan
Wallet wallet
Community community
Pool pool
Exchange exchange
Mixer mix
Hacker hack
OTC otc
Payment payments
Fraud scam
Gambling gambling
Swap trade
Quant quantitative
Cross-Chain cross-chain
Defi defi
Individual owner
Institution unsort-organ
Money Laundering launder-money
Online Gambling online-gambling
Finance finance
Sanction sanction
Organization organization
Market market

Risk Level

Name ID Description
high 4 super high risk
generally-high 3 generally high risk
low 1 low risk
whitelist 0 whitelist

Risk Type/Category

Name Code
Scam scam
Black and Gray Market black-gray-goods
Money Laundering launder-money
Online Gambling online-gambling
Hack hack
Sensitive sensitive
Other other

Errors

Detrust API uses standard HTTP response codes to indicate the success or failure of an API request.

HTTP Status Codes

HTTP Status Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Incorrect API key provided.
403 Forbidden -- The source IP address is not whitelisted.
404 Not Found -- The specified resource could not be found.
405 Method Not Allowed -- You tried to access a resource with an invalid method.
406 Not Acceptable -- You requested a format that isn't json.
410 Gone -- The resource requested has been removed from our servers.
429 Too Many Requests --
1. Rate limit reached for requests.
2. You exceeded your current quota, please check your plan and billing details.
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.

API Error Codes

Error Code HTTP Status Code Error Message
400100 400 Invalid request parameters.
Invalid request payload
401100 401 Invalid request header X-Access-Key
60006 200 Invalid request header X-Access-Key