Crypitor Webhook Notification

Ethereum

Description: with Ethereum transaction type, we supported [1, 6, 12] block confirmations. That mean with every transaction we will send 3 webhooks corespond with 3 confirmation type.

Transfer Ethereum Webhook:

Call method: POST

Url: Registered url

Header:

content-type: application/json
authorization: sha1:SHA1hashOfRegisteredAuthorization
user-agent: Crypitor-HTTP-Client/1.0.0

Data:

Name Type Description
hook_id String id of webhook
transaction_hash String transaction hash received
block_number long block number contain transaction
block_hash String block hash contain transaction
address String registered webhook address
transaction_index String position of transaction in block in hexadecimal
erc20 boolean is erc20 or not
token_address String address of erc20 token, null with transfer ETH
confirmations int number of block confirmation, [1, 6, 12]
currency String Currency type (currently is only ETH)
in_value BigInteger total value received in transaction
out_value BigInteger total value sent in transaction
total_value BigInteger total value = in_value - out_value
trace_actions List advance data, list trace action in transaction
trace_actions[i].from String sender address in trace action
trace_actions[i].to String receiver address in trace action
trace_actions[i].value String value transfer in trace action
trace_actions[i].type String trace action type
trace_actions[i].trace String trace position of action with Etherscan format (Ex: call_0_0_0_1)
trace_actions[i].trace_address List list integer define action position (Ex: [ 0, 0, 0, 1 ])

Example transfer ETH webhook data:

{
	"hook_id": "0d794b912fd682e5c9644292d5a6149a",
	"transaction_hash": "0x8cdf0e880008f073a07a88e54efa39cc3f9377b41f1a48f1c81e035b1c6ce9a0",
	"block_number": 8232285,
	"block_hash": "0xbbfd22616cca4c3aeea831348b5ebf9735a52b19de141a9392b8160acb9f4cfd",
	"address": "0x3f5ce5fbfe3e9af3971dd833d26ba9b5c936f0be",
	"transaction_index": "0x3f",
	"erc20": false,
	"token_address": null,
	"confirmations": 6,
	"currency": "ETH",
	"in_value": 256769350000000000,
	"out_value": 0,
	"total_value": 256769350000000000,
	"trace_actions": [{
		"from": "0x6827c00758c100a54a8b11d7b0aa967a702e8d44",
		"to": "0x3f5ce5fbfe3e9af3971dd833d26ba9b5c936f0be",
		"value": 256769350000000000,
		"type": "call",
		"trace": "call",
		"trace_address": []
	}]
}

Transfer Erc20 Webhook:

Call method: POST

Url: Registered url

Header:

content-type: application/json
authorization: sha1:SHA1hashOfRegisteredAuthorization
user-agent: Crypitor-HTTP-Client/1.0.0

Data:

Name Type Description
hook_id String id of webhook
transaction_hash String transaction hash received
block_number long block number contain transaction
block_hash String block hash contain transaction
address String registered webhook address
transaction_index String position of transaction in block in hexadecimal
erc20 boolean is erc20 or not
token_address String address of erc20 token, null with transfer ETH
confirmations int number of block confirmation, [1, 6, 12]
currency String Currency type (currently is only ETH)
in_value BigInteger total value received in transaction
out_value BigInteger total value sent in transaction
total_value BigInteger total value = in_value - out_value
trace_actions List advance data, list trace event in transaction
trace_actions[i].from String sender address in trace event
trace_actions[i].to String receiver address in trace event
trace_actions[i].value String value transfer in trace event
trace_actions[i].type String trace event type
trace_actions[i].trace String trace position of event with Etherscan format (Ex: log_1)
trace_actions[i].trace_address List list integer define event position (Ex: [ 1 ])

Example transfer ERC20 webhook data:

{
	"hook_id": "a148ca96fdaea6c17f61991c3096df3d",
	"transaction_hash": "0xf992fda530592e363a32d4cc106daa0d152c83aae8033d035dcb8abf27838d00",
	"block_number": 8232280,
	"block_hash": "0x7555dda4fd49a4f075c2233dcfc13565aa274316177e97284c4d63f64e5e86c1",
	"address": "0x3f5ce5fbfe3e9af3971dd833d26ba9b5c936f0be",
	"transaction_index": "0x38",
	"erc20": true,
	"token_address": "0x983f6d60db79ea8ca4eb9968c6aff8cfa04b3c63",
	"confirmations": 12,
	"currency": "ETH",
	"in_value": 8519233300000000000000,
	"out_value": 0,
	"total_value": 8519233300000000000000,
	"trace_actions": [{
		"from": "0xb8fd709baf693780b6fc25ba083dd83fdc9a6643",
		"to": "0x3f5ce5fbfe3e9af3971dd833d26ba9b5c936f0be",
		"value": 8519233300000000000000,
		"type": "log",
		"trace": "log_72",
		"trace_address": [72]
	}]
}