Callback Definition

Definition of callback data structure.

Field Type Description
type int 1  -  Deposit Callback
2  -  Withdraw Callback
3  -  Collect Callback
4  -  Airdrop Callback
-1  -  All callbacks (for inquiry)
serial int The unique serial of callback
order_id string The unique order ID of withdrawal request
currency string Cryptocurrency of the callback
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 0  -  Enqueue
1  -  Processing batch in KMS
2  -  TXID in pool
3  -  TXID in chain
4 (DEPRECATED)  -  TXID confirmed in N blocks
5  -  Failed
6  -  Resent
7  -  Blocked due to risk controlled
8  -  Cancelled
confirm_blocks int64 Number of confirmations
processing_state int 0  -  in pool (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
Callback sample:
  "type": 1,
  "serial": 90000000001,
  "order_id": "",
  "currency": "ETH",
  "txid": "0x100e84230923124582b7feb5daf638df79616fb3dea37fc2ea80659f5de3472e",
  "block_height": 5905092,
  "tindex": 11,
  "vout_index": 0,
  "amount": "500000000000000000",
  "fees": "210000000000000",
  "broadcast_at": 1562057483,
  "chain_at": 1562057483,
  "from_address": "0x8382Cc1B05649AfBe179e341179fa869C2A9862b",
  "to_address": "0x87F907C868D92a5d97E59CD1E9383a2E51dC4778",
  "wallet_id": 21,
  "state": 3,
  "confirm_blocks": 1,
  "processing_state": 1,
  "addon": {}