Skip to main content

ADDRESS TRACKING 🔥

tokenviewAbout 4 min

ADDRESS TRACKING 🔥

Address tracking APIs are used to monitor the real-time transactions of crypto holders. By providing the public chain name, address and token to be monitored, you can get the corresponding transfer in and transfer out information, pay attention to the fund flow of users, and help to understand the investment trend of rich users.

Supported chains: BTC, ETH (ERC20 token), TRX (TRC20 token, TRC10 token), LTC, BCH, DOGE, ETC, DASH, OMNI-USDT, RVN, BSC, ARB. Other public chain data can also be supported according to customer needs.

If the address balance changed, Tokenview will POST the transaction information to the Webhook URL you set through webhook.

Webhook signature & security

To make your webhooks secure, you can verify that they originated from Tokenview by generating a HMAC SHA-256 hash code using your unique webhook signing key.

Find your signing key

Navigate to the setting pageopen in new window in your dashboard. Next, Click "Get": the Signing key is displayed and can be copied for use.

Get SignKey
Get SignKey

Validate the signature received

Every outbound request contains a hashed authentication signature in the header. It's computed by concatenating your signing key and request body. Then generates a hash using the HMAC SHA256 hash algorithm.
To verify the signature came from Tokenview, you generate the HMAC SHA256 hash and compare it with the signature received.

Example request header
Content-Type: application/json;charset=UTF-8
X-Tokenview-Signature: your-hashed-signature

Example signature validation (python)
import hmac
import hashlib
# abcde is the content to be encrypted, which is the body of the webhook message
data=bytes('abcde','utf-8')
key=bytes('signkey string','utf-8')
# digest is signature, which is the value of X-Tokenview-Signature
digest=hmac.new(key,data,digestmod=hashlib.sha256).hexdigest()
print(digest) 

Set webhook URL

POST https://services.tokenview.io/vipapi/monitor/setwebhookurl?apikey={apikey}

Parameters

Anytime the balance changes, Tokenview will post the transaction info to your webhook URL. Your webhook's response code must be 200, and the the response body must be non-empty text, e.g "ok". For any failing post, Tokenview will retry 3 times.

Remark:

  1. Please obtain your own activated APIKEY in the API service system background, URL: https://services.tokenview.ioopen in new window.
  2. Different project with different APIKEYS.

Notification information will be posted by json as following:

{
    "address":"0xab5c66752a9e8167967685f1450532fb96d5d24f", // address being tracked
    "txid":"0xdf244cbc60f4220e5d90de0833b647bd7f376f5132314a1672dd9b5128302659", // transactionhash
    "time": 1592015420, // transaction time UTC
    "confirmations": 1, // confirmations when first post the info
    "value": "-0.002135942", // balance changes
    "coin": "ETH",  // network
    "height": 10254665, // block height of the transaction
    "tokenAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7", // token address
    "tokenSymbol": "USDT", // token symbol
    "tokenValue": "-159" // token changes
}

Request

curl --location 'https://services.tokenview.io/vipapi/monitor/setwebhookurl?apikey={apikey}' \
--header 'Content-Type: text/plain' \
--data 'https://9aa90255-9cde-45e-83a6-2916cd2c3725.mock.pstmn.io/webhook'

Response

{
    "code": 1,
    "msg": "success",
    "data": null
}

Get webhook URL

GET https://services.tokenview.io/vipapi/monitor/getwebhookurl?apikey={apikey}

Parameters

Remark:

  1. Please obtain your own activated APIKEY in the API service system background, URL: https://services.tokenview.ioopen in new window.
  2. Different project with different APIKEYS.

Request

curl --location https://services.tokenview.io/vipapi/monitor/getwebhookurl?apikey={apikey}

Response

{
    "code": 1,
    "msg": "success",
    "data": "https://9aa90255-9cde-453e-83a6-2916cd2c3725.mock.pstmn.io/webhook"
}

Add New address

GET https://services.tokenview.io/vipapi/monitor/address/add/{lowercase-coin-abbr}/{address-hash}?apikey={apikey}

Parameters

  • {lowercase-coin-abbr}: btc, eth, trx, ltc, bch, doge, etc, dash, usdt, rvn, bsc, arb, and other chains can be online upon the customers' requirements.
  • {address-hash}: onchain address hash
  • {apikey}: Get your activated apikey from the API system: https://services.tokenview.ioopen in new window
Specify the {lowercase-coin-abbr} and {address-hash}.
ETH address must be converted to lowercase.

Note:

  • Tracking the address of ERC20-USDT, the currency is ETH, not USDT;
  • Tracking the address of TRC20-USDT, the currency is TRX, not USDT;
  • Tracking the address of OMNI-USDT, the currency is usdt.

Request

curl --location https://services.tokenview.io/vipapi/monitor/address/add/eth/0x21c0afc5d6110323f04b369788e78fb60bfa02b8?apikey={apikey}

Response

{
    "code": 1,
    "msg": "success",
    "data": null
}

Delete Address

GET https://services.tokenview.io/vipapi/monitor/address/remove/{lowercase-coin-abbr}/{address-hash}?apikey={apikey}

Parameters

  • {lowercase-coin-abbr}: btc, eth, trx, ltc, bch, doge, etc, dash, usdt, rvn, bsc, arb, and other chains can be online upon the customers' requirements.
  • {address-hash}: onchain address hash
  • {apikey}: Get your activated apikey from the API system: https://services.tokenview.ioopen in new window
Note: Specify the {lowercase-coin-abbr} and {address-hash}.

Request

curl --location https://services.tokenview.io/vipapi/monitor/address/remove/eth/0x21c0afc5d6110323f04b369788e78fb60bfa02b8?apikey={apikey}

Response

{
    "code": 1,
    "msg": "success",
    "data": null
}

Tracked Address List

GET https://services.tokenview.io/vipapi/monitor/address/list/{lowercase-coin-abbr}?page={page}apikey={apikey}

Parameters

  • {lowercase-coin-abbr}: btc, eth, trx, ltc, bch, doge, etc, dash, usdt, rvn, bsc, arb, and other chains can be online upon the customers' requirements.
  • {page}: page number;
  • {apikey}: Get your activated apikey from the API system: https://services.tokenview.ioopen in new window
Note:Specify the {lowercase-coin-abbr} and {page}.

Request

curl --location https://services.tokenview.io/vipapi/monitor/address/list/eth?page=0&apikey={apikey}

Response

{
    "code": 1,
    "msg": "success",
    "data": {
        "page": 1,
        "size": 3,
        "total": 3,
        "list": [
            "0x5a0b54d5dc17e0aadc383d2db43b0a0d3e029c4c",
            "0xab5c66752a9e8167967685f1450532fb96d5d24f",
            "0xea674fdde714fd979de3edf0f56aa9716b898ec8"
        ]
    }
}

Webhook History

GET https://services.tokenview.io/vipapi/monitor/webhookhistory/{lowercase-coin-abbr}?page={page}apikey={apikey}

Parameters

  • {lowercase-coin-abbr}: btc, eth, trx, ltc, bch, doge, etc, dash, usdt, rvn, bsc, arb, and other chains can be online upon the customers' requirements.
  • {page}: page number;
  • {apikey}: Get your activated apikey from the API system: https://services.tokenview.ioopen in new window

Note:

  • Specify the {lowercase-coin-abbr} and {page}.
  • Return all the historical notifications for all addresses of one blockchain
  • 100 records for per page.

Request

curl --location https://services.tokenview.io/vipapi/monitor/webhookhistory/eth?page=1&apikey={apikey}

Response

{
    "code": 1,
    "msg": "success",
    "data": {
        "page": 1,
        "size": 2,
        "total": 2,
        "list": [
            {
                "coin": "ETH",
                "url": "https://8c986322-5e36-4169-b05e-3b40a04e5a.mock.pstmn.io",
                "txid": "0xad0fe776f17f4e217af51661dd2cb5d8bfb7b5eddd1a6356c3ba2cf07ea937a5",
                "response": "ok",
                "request": "{\"address\":\"0x2eaa82538bc040e2df9196208d23b87958a99bb6\",\"coin\":\"ETH\",\"confirmations\":1,\"height\":16502465,\"time\":1674874571,\"txid\":\"0xad0fe776f17f4e217af51661dd2cb5d8bfb7b5eddd1a6356c3ba2cf07ea937a5\",\"value\":\"-0.00585248433044248\"}",
                "amount": null,
                "time": 1674874571,
                "address": "0x2eaa82538bc040e2df9196208d23b87958a99bb6",
                "confirmations": 0,
                "tryTimes": 0,
                "height": 16502465,
                "statusCode": 200
            },
            {
                "coin": "ETH",
                "url": "https://8c986322-5e36-4169-b05e-3b40a04e5a.mock.pstmn.io",
                "txid": "0xad0fe776f17f4e217af51661dd2cb5d8bfb7b5eddd1a6356c3ba2cf07ea937a5",
                "response": "ok",
                "request": "{\"address\":\"0x2eaa82538bc040e2df9196208d23b87958a99bb6\",\"coin\":\"ETH\",\"confirmations\":1,\"height\":16502465,\"time\":1674874571,\"txid\":\"0xad0fe776f17f4e217af51661dd2cb5d8bfb7b5eddd1a6356c3ba2cf07ea937a5\",\"value\":\"-0.00585248433044248\"}",
                "amount": null,
                "time": 1674874571,
                "address": "0x2eaa82538bc040e2df9196208d23b87958a99bb6",
                "confirmations": 0,
                "tryTimes": 3,
                "height": 16502465,
                "statusCode": 200
            }
        ]
    }
}

Response Description

{
    "coin": "ETH",  // Network
    "url": "https://8c986322-5e36-4169-b05e-3b40a04e5a.mock.pstmn.io", // webhook URL
    "txid": "0xad0fe776f17f4e217af51661dd2cb5d8bfb7b5eddd1a6356c3ba2cf07ea937a5", // transaction hash
    "response": "ok", // After calling webhook, the response content returned to tokenview
    "request": "{\"address\":\"0x2eaa82538bc040e2df9196208d23b87958a99bb6\",\"coin\":\"ETH\",\"confirmations\":1,\"height\":16502465,\"time\":1674874571,\"txid\":\"0xad0fe776f17f4e217af51661dd2cb5d8bfb7b5eddd1a6356c3ba2cf07ea937a5\",\"value\":\"-0.00585248433044248\"}", // webhook message content
    "amount": null,  // The field has been deprecated
    "time": 1674874571,  // timestamp when transaction occurred
    "address": "0x2eaa82538bc040e2df9196208d23b87958a99bb6", // address hash
    "confirmations": 0, // confirmations
    "tryTimes": 3,  // A value of 0 indicates that the first time a notification is sent, your server has returned 200 OK. A value greater than 0 indicates the number of retries.
    "height": 16502465, // block height
    "statusCode": 200   // response code of your server
}

Last update: