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
9  -  Retry for UTXO Temporarily Not Available
10  -  Dropped
11  -  Transaction Failed
12  -  Paused
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
err_reason  -  will contain detail error reason if state is 5(Failed)
fee_decimal  -  the decimal of cryptocurrency miner fee
decimal int The decimal of cryptocurrency
currency_bip44 int64 The coin type definition of cryptocurrency.
0 - BTC
2 - LTC
5 - DASH
60 - ETH
144 - XRP
145 - BCH
148 - XLM
194 - EOS
195 - TRX
236 - BSV
714 - BNB
token_address string The contract address of cryptocurrency
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": ""
}