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 - TXID confirmed in N blocks 5 - Failed (addon field of callback will contain detailed error reason) 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 blocklist_tags - the tags of CYBAVO AML detection |
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 461 - FIL 714 - BNB |
token_address | string | The contract address of cryptocurrency |
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": "" }