Webhook
Webhook Concept
Octet offers webhooks that allow you to keep track of important events, like transactions, in real-time. Simply register a URL to receive data for a specific event, and as soon as that event occurs, Octet will immediately send the data to the URL.
- Protocol :
HTTP/1.1
POST
- Request body : JSON Array
- Port : 443(https), 80(http)
Supported Webhook Types
You will receive a webhook when a transaction is finalized, regardless of whether it succeeds or fails.
Event | When the webhooks are sent |
---|---|
Deposit Progress (UNFINALIZED_DEPOSIT ) | When the deposit transaction is unfinalized (UNFINALIZED ) |
Deposit Completed (DEPOSIT , DEPOSIT_TO_FEE_ADDRESS ) | When the deposit transaction is finalized (FINALIZED ) |
Gathering Completed (GATHERING ) | When the gathering transaction is finalized (FINALIZED ) |
Withdrawal Completed (WITHDRAWAL ) | When the withdrawal transaction is finalized (FINALIZED ) |
Withdrawal Request Failed (FAILED_WITHDRAWAL ) | When the withdrawal transaction is failed (FAILED ) |
NFT Deployment Completed (NFT_DEPLOYMENT ) | When the NFT contract deployment transaction is finalized (FINALIZED ) |
NFT Minting Completed (NFT_ITEM_CREATION ) | When the NFT item mint transaction is finalized (FINALIZED ) |
NFT Deposit Progress (UNFINALIZED_NFT_DEPOSIT ) | When the NFT deposit transaction is unfinalized (UNFINALIZED ) |
NFT Deposit Completed (DEPOSIT ) | When the NFT deposit transaction is finalized (FINALIZED ) |
NFT Withdrawal Completed (WITHDRAWAL ) | When the NFT withdrawal transaction is finalized (FINALIZED ) |
Data Types
For the efficiency of transmission, the body of the HTTP request takes the form of arrays. When multiple deposits are made within a short time frame, an array containing those several deposits will be sent.
When different webhooks are registered to the same URL, a single data with multiple webhooks will be transmitted.
Data Examples
1. Deposit, Withdrawal, Gathering
[
{
"webhookIdx": 75,
"webhookTargetIdx": 214224,
"webhookTargetDataScheme": "TRANSACTION_1",
"data": {
"memo": null,
"txid": "0x670d0c04ec2c11d6bc5800197e028b9196d256e132fcaee5b54fe20c55fa1c34",
"type": "DEPOSIT",
"uuid": "8d62e40a-6315-410b-a42e-a6b3061c661b",
"nonce": 53198,
"amount": "0.25000000000000000000",
"status": "FINALIZED",
"symbol": "ETH",
"usedFee": "0.00000424649261400000",
"toAddress": "0x71b5De2970A32eEf6362AE7Bc3B73103b4392bB0",
"failedDate": null,
"blockHeight": "7496435",
"createdDate": "2022-08-30T16:21:10",
"fromAddress": "0x2031832e54a2200bF678286f560F49A950DB2Ad5",
"outputIndex": 0,
"toAddresses": [
"0x71b5De2970A32eEf6362AE7Bc3B73103b4392bB0"
],
"modifiedDate": "2022-08-30T16:24:01",
"finalizedDate": "2022-08-30T16:24:02",
"fromAddresses": [
"0x2031832e54a2200bF678286f560F49A950DB2Ad5"
],
"contractAddress": null,
"feePayerAddress": null,
"unfinalizedDate": "2022-08-30T16:21:11",
"useFeeDelegation": false,
"transactionCurrency": {
"krw": null,
"usd": null
}
}
},
{
"webhookIdx": 77,
"webhookTargetIdx": 214743,
"webhookTargetDataScheme": "TRANSACTION_1",
"data": {
"memo": null,
"txid": "0xa582377ad2bf7ab8dd87d42ca71fe9632398c47fad967ee360c9c599147c0612",
"type": "WITHDRAWAL",
"uuid": "ce777d55-feb8-4f51-a092-278d67dea0fa",
"nonce": 113,
"amount": "0.00010000000000000000",
"status": "FINALIZED",
"symbol": "ETH",
"usedFee": "0.000021000133917",
"toAddress": "0x1D31aB94201b3a25557fdC6dc2E4c860199E32Da",
"failedDate": null,
"blockHeight": "8034466",
"createdDate": "2022-11-28T15:42:50",
"fromAddress": "0x71b5De2970A32eEf6362AE7Bc3B73103b4392bB0",
"outputIndex": 0,
"toAddresses": [
"0x1D31aB94201b3a25557fdC6dc2E4c860199E32Da"
],
"modifiedDate": "2022-11-28T15:42:50",
"finalizedDate": "2022-11-28T15:43:20",
"fromAddresses": [
"0x71b5De2970A32eEf6362AE7Bc3B73103b4392bB0"
],
"contractAddress": null,
"feePayerAddress": null,
"unfinalizedDate": "2022-11-28T15:43:20",
"useFeeDelegation": false,
"transactionCurrency": {
"krw": "1.00000000",
"usd": "1.00000000"
}
}
},
{
"webhookIdx": 637,
"webhookTargetIdx": 219563,
"webhookTargetDataScheme": "TRANSACTION_1",
"data": {
"memo": null,
"txid": "0xf4e7dbfc5a4a6082d81272d7b0d1c743f5dd9e88801a0c4018eed4c789066cfa",
"type": "GATHERING",
"uuid": "d50a18d4-31e6-4dc2-805c-df8c04232af1",
"nonce": 0,
"amount": "0.19995800000000000000",
"status": "FINALIZED",
"symbol": "ETH",
"usedFee": "0.00002100000021000000",
"toAddress": "0xD9a22a2627D5c1FfA0067A01f0333b18C697281b",
"failedDate": null,
"blockHeight": "8076445",
"createdDate": "2022-12-05T11:11:01",
"fromAddress": "0xe0b7103cba658BB3130577DE838C60F721ABA5d3",
"outputIndex": 0,
"toAddresses": [
"0xD9a22a2627D5c1FfA0067A01f0333b18C697281b"
],
"modifiedDate": "2022-12-05T11:12:01",
"finalizedDate": "2022-12-05T11:12:02",
"fromAddresses": [
"0xe0b7103cba658BB3130577DE838C60F721ABA5d3"
],
"contractAddress": null,
"feePayerAddress": null,
"unfinalizedDate": "2022-12-05T11:12:02",
"useFeeDelegation": false,
"transactionCurrency": {
"krw": null,
"usd": null
}
}
}
]
2. NFT Deployment, Minting, Deposit, Withdrawal
[
{
"webhookIdx": 161,
"webhookTargetIdx": 189585,
"webhookTargetDataScheme": "NFT_TRANSACTION_1",
"data": {
"memo": null,
"txid": "0x0e4f2d9962ba557ab2c02154c06f5fe2ef2801d503994c1671040cae1f044174",
"type": "NFT_ITEM_CREATION",
"uuid": "80c7de5d-86f1-4bb7-8de4-4690008a2f31",
"nonce": 15,
"amount": "0",
"status": "FINALIZED",
"symbol": "WBHK",
"tokenId": null,
"usedFee": null,
"tokenUri": null,
"toAddress": "0x98Dd58da2a23f333Ab515e59217eDD1A78617360",
"failedDate": null,
"blockHeight": null,
"createdDate": "2022-06-23T10:18:50",
"fromAddress": "0xE291f46cC312c930a63f75F59341345551262821",
"outputIndex": null,
"toAddresses": [
"0xE291f46cC312c930a63f75F59341345551262821"
],
"modifiedDate": "2022-06-23T10:18:50",
"finalizedDate": "2022-06-23T10:18:50",
"fromAddresses": [
"0xE291f46cC312c930a63f75F59341345551262821"
],
"contractAddress": "0x98Dd58da2a23f333Ab515e59217eDD1A78617360",
"feePayerAddress": null,
"unfinalizedDate": "2022-06-23T10:18:50",
"useFeeDelegation": false
}
},
{
"webhookIdx": 164,
"webhookTargetIdx": 189586,
"webhookTargetDataScheme": "NFT_TRANSACTION_1",
"data": {
"memo": null,
"txid": "0x0e4f2d9962ba557ab2c02154c06f5fe2ef2801d503994c1671040cae1f044174",
"type": "DEPOSIT",
"uuid": "92ca7afd-4477-4e55-9c3b-83c8b61fda05",
"nonce": 15,
"amount": "1",
"status": "FINALIZED",
"symbol": null,
"tokenId": null,
"usedFee": "0.00026079300182555100",
"tokenUri": null,
"toAddress": "0xE291f46cC312c930a63f75F59341345551262821",
"failedDate": null,
"blockHeight": "7105992",
"createdDate": "2022-06-23T10:19:20",
"fromAddress": "0x0000000000000000000000000000000000000000",
"outputIndex": null,
"toAddresses": [
"0x0000000000000000000000000000000000000000"
],
"modifiedDate": "2022-06-23T10:19:20",
"finalizedDate": "2022-06-23T10:19:21",
"fromAddresses": [
"0x0000000000000000000000000000000000000000"
],
"contractAddress": null,
"feePayerAddress": null,
"unfinalizedDate": "2022-06-23T10:19:21",
"useFeeDelegation": false
}
},
......
]
Registering Webhooks
- Access the Console - Select a wallet - [Wallet settings] - [Webhook].
- Select the event to get the webhook, then type the name of the webhook and the URL.
- When a certain event (deposit, withdrawal, etc.) happens, data will be sent to the registered URL.
Resending Webhooks
When you fail to receive a webhook, you may resend the webhook from the console.
Updated about 1 year ago