Skip to main content

Transaction Tracking APIs

tokenviewAbout 5 min

Transaction Tracking APIs

Message Body

Tokenview Developer Platform will POST the transaction message in Json format to the Webhook URL you set. After your server receives the notification, the response code must be 200, and non-empty text information must be returned in the response body, such as ok. If sending fails, it will automatically retry 3 times.

The message body is json text with the following format

Token Create message format is as follows:

{
    "coin": "ETH",
    "confirmations": 1, // confirmations
    "creator": "0x8d47eaac5f9ccbe55de70801439fdd4613d74289", // creator address
    "height": 19481566, // block height
    "network": "ETH",   // The chain where the transaction occurs
    "time": 1711006247, // UTC timestamp
    "tokenAddress": "0xadff34ea821f1be68a610f9266733302c07c5d57",  // token address
    "tokenCategory": "RC20",    // token type
    "tokenDecimal": "9",        // token decimal
    "tokenName": "Chain AI",    // token name
    "tokenSymbol": "CAI",       // token symbol
    "totalSupply": "100000000", // token total supply
    "txChangeType": "tokencreate", // message type
    "txid": "0xa6be4a5781cd7ff649b6191352c39f522bbdcfeb400506873b8336bbd9a74be8" // transaction hash
}

Token Transfer Volume message format is as follows:

{
	"coin": "ETH",
	"confirmations": 1, // confirmations
	"fromAddr": "0x918c4602d9f1768b4c6e16b0e4ae3ac55f0a4dd9", // from address
	"height": 19482378, // block height
	"network": "ETH",   // The chain where the transaction occurs
	"time": 1711016075, // UTC timestamp
	"toAddr": "0x23878914efe38d27c4d67ab83ed1b93a74d4086a",   // to address
	"tokenAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7", // token address
	"tokenCategory": "RC20",  // token type
	"tokenDecimal": "6",      // token decimal
	"tokenName": "Tether USD",// token name
	"tokenSymbol": "USDT",    // token symbol
	"totalSupply": "32313908246",// token total supply
	"txChangeType": "tokentransfervolume", // message type
	"txid": "0xdb3d74cc9759ca1e47cb4f52523925e28892b96758583ad33b0c11d2b35e18f7", // transaction hash
	"value": "17996180000"  // transfer value
}

Web3 Event message format is as follows:

{
	"coin": "ETH",
	"confirmations": 1,  // confirmations
	"address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",  // monitored address
	"event": "{\"address\":\"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2\",\"logIndex\":\"0x6f\",\"data\":\"0x1737f321dc32ec09\",\"removed\":false,\"topics\":[\"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\",\"0x69c66beafb06674db41b22cfc50c34a93b8d82a2\",\"0xf3de3c0d654fda23dad170f0f320a92172509127\"],\"transactionIndex\":\"0x6d\"}",
	"height": 19487178,  // block height
	"network": "ETH",    // The chain where the transaction occurs
	"time": 1711074347,  // UTC timestamp
	"topic": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", // monitored topic
	"txChangeType": "event", // message type
	"txid": "0x94d7a6786b5f3da48c7c4e4bd3bb99c72804645eec416c7ba851b895a10b0faa" // transaction hash
}

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/txmonitor/setwebhookurl?apikey={apikey}'

Parameters

Request

curl -X POST -H 'content-type:text/plain' -d '{your_webhook_url}' 'https://services.tokenview.io/vipapi/txmonitor/setwebhookurl?apikey={apikey}'

Response

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

Get Webhook URL

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

Parameters

Request

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

Response

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

Token Create Subscribe

Add A Tracking Condition

POST https://services.tokenview.io/vipapi/txmonitor/addTrackingItem?apikey={apikey}

Parameters

Body
{
    "currency": "ETH",
    "trackType": "tokencreate"
}

Request

curl --location 'https://services.tokenview.io/vipapi/txmonitor/addTrackingItem?apikey={apikey}' \
--header 'Content-Type: application/json' \
--data '{
    "currency": "ETH",
    "trackType": "tokencreate"
}'

Response

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

Query Tracking Condition

GET https://services.tokenview.io/vipapi/txmonitor/getTrackingItems?apikey={apikey}

Parameters

Request

curl --location 'https://services.tokenview.io/vipapi/txmonitor/getTrackingItems?apikey={apikey}'

Response

{
    "code": 1,
    "msg": "success",
    "data": [
        {
            "apiKey": "apikey",
            "currency": "eth", // tracking chain
            "token": null,
            "min": null,
            "max": null,
            "trackType": "tokencreate", // tracking type
            "address": null,
            "topic": null
        }
    ]
}

Query Tracking Condition-By Chain

POST https://services.tokenview.io/vipapi/txmonitor/getTrackingItemsByNetwork?apikey={apikey}

Parameters

Body
{
    "currency": "ETH"
}

Request

curl --location 'https://services.tokenview.io/vipapi/txmonitor/getTrackingItemsByNetwork?apikey={apikey}' \
--header 'Content-Type: application/json' \
--data '{
    "currency": "ETH"
}'

Response

{
    "code": 1,
    "msg": "success",
    "data": [
        {
            "apiKey": "apikey",
            "currency": "eth", // tracking chain
            "token": null,
            "min": null,
            "max": null,
            "trackType": "tokencreate", //  tracking type
            "address": null,
            "topic": null
        }
    ]
}

Delete Tracking Condition

POST https://services.tokenview.io/vipapi/txmonitor/delTrackingItem?apikey={apikey}

Parameters

Body
{
    "currency": "ETH",
    "trackType": "tokencreate"
}

Request

curl --location 'https://services.tokenview.io/vipapi/txmonitor/delTrackingItem?apikey={apikey}' \
--header 'Content-Type: application/json' \
--data '{
    "currency": "ETH",
    "trackType": "tokencreate"
}'

Response

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

Token Transfer Volume Subscribe

Add A Tracking Condition

POST https://services.tokenview.io/vipapi/txmonitor/addTrackingItem?apikey={apikey}

Parameters

  • {currency}: ETH,BSC
  • {trackType}: tokentransfervolume
  • {token}: You can input [native token] or [RC20 token hash address]
    • native token: ETH for Ethereum, BNB for BSC
    • RC20 token: RC20 token hash address
  • {min}: Minimum threshold for monitoring
    • native token: min >= 1000
    • RC20 token: min >= 10000
  • {max}: Maximum threshold for monitoring
    • native token: max <= 2 * min
    • RC20 token: max <= 2 * min
  • {apikey}: Get your activated apikey from the API system: https://services.tokenview.ioopen in new window
Body
{
    "currency": "BSC", // tracking chain
    "trackType": "tokentransfervolume", // tracking type
    "token": "0x52242cbab41e290e9e17ccc50cc437bb60020a9d", // You can input native token or RC20 token hash address
    "min": 10000, // Minimum threshold for monitoring
    "max": 20000  // Maximum threshold for monitoring
}

Request

curl --location 'https://services.tokenview.io/vipapi/txmonitor/addTrackingItem?apikey={apikey}' \
--header 'Content-Type: application/json' \
--data '{
    "currency": "BSC",
    "trackType": "tokentransfervolume",
    "token": "0x52242cbab41e290e9e17ccc50cc437bb60020a9d",
    "min": 10000,
    "max": 20000
}'

Response

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

Query Tracking Condition

GET https://services.tokenview.io/vipapi/txmonitor/getTrackingItems?apikey={apikey}

Parameters

Request

curl --location 'https://services.tokenview.io/vipapi/txmonitor/getTrackingItems?apikey={apikey}'

Response

{
    "code": 1,
    "msg": "success",
    "data": [
        {
            "apiKey": "your-apikey",
            "currency": "bsc",  // tracking chain
            "token": "0x52242cbab41e290e9e17ccc50cc437bb60020a9d", // Tracking Condition
            "min": 10000, // Minimum threshold for monitoring
            "max": 20000, // Maximum threshold for monitoring
            "trackType": "tokentransfervolume",  // tracking type
            "address": null,
            "topic": null
        }
    ]
}

Query Tracking Condition-By Chain

POST https://services.tokenview.io/vipapi/txmonitor/getTrackingItemsByNetwork?apikey={apikey}

Parameters

Body
{
    "currency": "BSC"
}

Request

curl --location 'https://services.tokenview.io/vipapi/txmonitor/getTrackingItemsByNetwork?apikey={apikey}' \
--header 'Content-Type: application/json' \
--data '{
    "currency": "BSC"
}'

Response

{
    "code": 1,
    "msg": "success",
    "data": [
        {
            "apiKey": "your-apikey",
            "currency": "bsc",  // tracking chain
            "token": "0x52242cbab41e290e9e17ccc50cc437bb60020a9d", // Tracking Condition
            "min": 10000, // Minimum threshold for monitoring
            "max": 20000, // Maximum threshold for monitoring
            "trackType": "tokentransfervolume",  // tracking type
            "address": null,
            "topic": null
        }
    ]
}

Delete Tracking Condition

POST https://services.tokenview.io/vipapi/txmonitor/delTrackingItem?apikey={apikey}

Parameters

  • {currency}: Currency when adding monitoring.ETH,BSC
  • {trackType}: tokentransfervolume
  • {token}: Token when adding monitoring.
  • {min}: Minimum threshold when adding monitoring
  • {max}: Maximum threshold when adding monitoring
  • {apikey}: Get your activated apikey from the API system: https://services.tokenview.ioopen in new window
Body
{
    "currency": "BSC",
    "trackType": "tokentransfervolume",
    "token": "0x52242cbab41e290e9e17ccc50cc437bb60020a9d",
    "min": 10000,
    "max": 20000
}

Request

curl --location 'https://services.tokenview.io/vipapi/txmonitor/delTrackingItem?apikey={apikey}' \
--header 'Content-Type: application/json' \
--data '{
    "currency": "BSC",
    "trackType": "tokentransfervolume",
    "token": "0x52242cbab41e290e9e17ccc50cc437bb60020a9d",
    "min": 10000,
    "max": 20000
}'

Response

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

Event Subscribe

Add A Tracking Condition

POST https://services.tokenview.io/vipapi/txmonitor/addTrackingItem?apikey={apikey}

Parameters

Body
{
    "currency": "ETH",
    "trackType": "event",
    "address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
    "topic": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
}

Request

curl --location 'https://services.tokenview.io/vipapi/txmonitor/addTrackingItem?apikey={apikey}' \
--header 'Content-Type: application/json' \
--data '{
    "currency": "ETH",
    "trackType": "event",
    "address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
    "topic": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
}'

Response

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

Query Tracking Condition

GET https://services.tokenview.io/vipapi/txmonitor/getTrackingItems?apikey={apikey}

Parameters

Request

curl --location 'https://services.tokenview.io/vipapi/txmonitor/getTrackingItems?apikey={apikey}'

Response

{
    "code": 1,
    "msg": "success",
    "data": [
        {
            "apiKey": "QoaG1XCpsvW7On40Fzte",
            "currency": "eth", // tracking chain
            "token": null,
            "min": null,
            "max": null,
            "trackType": "event", // tracking type
            "address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
            "topic": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
        }
    ]
}

Query Tracking Condition-By Chain

POST https://services.tokenview.io/vipapi/txmonitor/getTrackingItemsByNetwork?apikey={apikey}

Parameters

Body
{
    "currency": "ETH"
}

Request

curl --location 'https://services.tokenview.io/vipapi/txmonitor/getTrackingItemsByNetwork?apikey={apikey}' \
--header 'Content-Type: application/json' \
--data '{
    "currency": "ETH"
}'

Response

{
    "code": 1,
    "msg": "success",
    "data": [
        {
            "apiKey": "QoaG1XCpsvW7On40Fzte",
            "currency": "eth", // tracking chain
            "token": null, 
            "min": null,
            "max": null,
            "trackType": "event", // tracking type
            "address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
            "topic": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
        }
    ]
}

Delete Tracking Condition

POST https://services.tokenview.io/vipapi/txmonitor/delTrackingItem?apikey={apikey}

Parameters

Body
{
    "currency": "ETH",
    "trackType": "event",
    "address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
    "topic": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
}

Request

curl --location 'https://services.tokenview.io/vipapi/txmonitor/delTrackingItem?apikey={apikey}' \
--header 'Content-Type: application/json' \
--data '{
    "currency": "ETH",
    "trackType": "event",
    "address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
    "topic": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
}'

Response

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