Callback Definition

Definition of callback data structure.

Field Type Description
type int
ID Type
1 Deposit Callback
2 Withdraw Callback
3 Collect Callback
4 Airdrop Callback
serial int The unique serial of callback
order_id string The unique order ID of withdrawal request
currency string Cryptocurrency of the callback This field is for human reading only and may change in the future. Do not use this string as currency definition, use the fields currency_bip44 and token_address as currency definition.
txid string Transaction identifier
block_height int64 The block height show the transaction was packed in which block
tindex int The index of transaction in its block
vout_index int The index of vout in its transaction
amount string Transaction amount denominated in the smallest cryptocurrency unit
fees string Mining fee denominated in the smallest cryptocurrency unit
broadcast_at int64 When to broadcast the transaction in UTC time
chain_at int64 When was the transaction packed into block (in chain) in UTC time
from_address string The source address of the transaction
to_address string The destination address of the transaction
wallet_id int64 The wallet ID of the callback
state int Possible states (listed in the Transaction State Definition table)
ID Description
1 Processing
2 TXID in pool
3 TXID in chain
5 Failed (the err_reason of addon field will contain detailed error reason)
8 Cancelled
10 Dropped
11 Transaction Failed
confirm_blocks int64 Number of confirmations
processing_state int
ID Description
-1 If the state is 5(failed), 8(cacelled), 10(dropped) or 11(transaction failed)
0 In fullnode mempool
1 In chain (the transaction is already on the blockchain but the confirmations have not been met)
2 Done (the transaction is already on the blockchain and satisfy confirmations)
addon key-value pairs The extra information of this callback
Key Value (Description)
err_reason Will contain detail error reason if state is 5(Failed)
fee_decimal The decimal of cryptocurrency miner fee
blocklist_tags The tags of CYBAVO AML detection
address_label The label of the deposit address
contract_abi The contract ABI of the withdrawal request
token_id Transferred token ID
aml_tags Detailed CYBAVO AML detection information includes score, tags and blocked flag
aml_screen_pass Pass or fail CYBAVO AML screening
decimal int The decimal of cryptocurrency
currency_bip44 int64 Refer to Currency Definition table
token_address string The contract address of cryptocurrency
memo string The memo/destination tag of the transaction
If the state of callback is 5 (Failed), the detailed failure reason will put in addon field (key is err_reason). See the callback sample bellow.
Callback sample:
{
  "type": 1,
  "serial": 90000000619,
  "order_id": "",
  "currency": "ETH",
  "txid": "0xc99a4941f87364c9679fe834f99bc12cbacfc577dedf4f34c4fd8833a68a0b00",
  "block_height": 8336269,
  "tindex": 43,
  "vout_index": 0,
  "amount": "500000000000000000",
  "fees": "945000000000000",
  "memo": "",
  "broadcast_at": 1595296751,
  "chain_at": 1595296751,
  "from_address": "0x8382Cc1B05649AfBe179e341179fa869C2A9862b",
  "to_address": "0x32d638773cB85965422b3B98e9312Fc9392307BC",
  "wallet_id": 5,
  "state": 3,
  "confirm_blocks": 2,
  "processing_state": 2,
  "addon": {
    "fee_decimal": 18
  },
  "decimal": 18,
  "currency_bip44": 60,
  "token_address": ""
}
Callback with state 5 (Failed) sample:
{
  "type": 2,
  "serial": 20000000155,
  "order_id": "1_69",
  "currency": "ETH",
  "txid": "",
  "block_height": 0,
  "tindex": 0,
  "vout_index": 0,
  "amount": "1000000000000000",
  "fees": "",
  "memo": "",
  "broadcast_at": 0,
  "chain_at": 0,
  "from_address": "",
  "to_address": "0x60589A749AAC632e9A830c8aBE041899d8Dd15",
  "wallet_id": 2,
  "state": 5,
  "confirm_blocks": 0,
  "processing_state": 0,
  "addon": {
    "err_reason": "Illegal Transaction Format: To 0x60589A749AAC632e9A830c8aBE041899d8Dd15"
  },
  "decimal": 18,
  "currency_bip44": 60,
  "token_address": ""
}
Deposit callback with blocklist_tags sample:
{
  "type": 4,
  "serial": 90000009949,
  "order_id": "",
  "currency": "ETH",
  "txid": "0xb74bb5cccf7c024b1b86ded449a7f40e01a2a81dc2298af1eee452de64a7bd15",
  "block_height": 8771833,
  "tindex": 1,
  "vout_index": 0,
  "amount": "88800000000000",
  "fees": "2142000000000000",
  "memo": "",
  "broadcast_at": 1601287122,
  "chain_at": 1601287122,
  "from_address": "0xf6DabB290FCE73f5617ED381ca90dBb7af0E8295",
  "to_address": "0x42214E5c0eb0960f14AEd3623c172986d5c24A0D",
  "wallet_id": 2,
  "state": 3,
  "confirm_blocks": 2,
  "processing_state": 2,
  "addon": {
    "blocklist_tags": [
      "Involve phishing activity",
      "Involve cybercrime related"
    ],
    "fee_decimal": 18
  },
  "decimal": 18,
  "currency_bip44": 60,
  "token_address": ""
}