Webhooks
Webhooks allow you to set up a notification system that can be used to receive updates on certain requests made to the Blockradar API.
Introduction
Generally, when you make a request to an API endpoint, you expect to get a near-immediate response. However, some requests may take a long time to process, which can lead to timeout errors. In order to prevent a timeout error, a pending response is returned. Since your records need to be updated with the final state of the request, you need to either:
- Make a request for an update (popularly known as polling) or,
- Listen to events by using a webhook URL.
Helpful Tip
We recommend that you use webhook to provide value to your customers over using callbacks or polling. With callbacks, we don’t have control over what happens on the customer’s end. Neither do you. Callbacks can fail if the network connection on a customer’s device fails or is weak or if the device goes off after a transaction.
Polling vs Webhooks
Polling requires making a GET
request at regular intervals to get the final status of a request. For example, when you issue an address to a customer for deposits, you keep making a request for transactions linked to the address until you find one.
With webhooks, the resource server, Blockradar in this case, sends updates to your server when the status of your request changes. The change in status of a request is known as an event. You’ll typically listen to these events on a POST endpoint called your webhook URL.
The table below highlights some differences between polling and webhooks:
Polling | Webhooks | |
---|---|---|
Mode of update | Manual | Automatic |
Rate limiting | Yes | No |
Impacted by scaling | Yes | No |
Create a webhook URL
A webhook URL is simply a POST endpoint that a resource server sends updates to. The URL needs to parse a JSON request and return a 200 OK
:
// Using Express
app.post("/my/webhook/url", function(req, res) {
// Retrieve the request's body
const event = req.body;
// Do something with event
res.send(200);
});
When your webhook URL receives an event, it needs to parse and acknowledge the event. Acknowledging an event means returning a 200 OK
in the HTTP header. Without a 200 OK
in the response header, we’ll keep sending events for the next 2 hours and 35 minutes:
- We’ll attempt to send webhooks 5 times with an increasing delay between each attempt, starting with 5 minutes and increasing exponentially up to 80 minutes. The total duration for these 5 attempts will span approximately 2 hours and 35 minutes.
Avoid long-running tasks
If you have long-running tasks in your webhook function, you should acknowledge the event before executing the long-running tasks. Long-running tasks will lead to a request timeout and an automatic error response from your server. Without a 200 OK response, we retry as described in the paragraph above.
Testing Webhooks Locally
During development, you can configure your webhook URL in your TEST master wallet environment to a local address, such as http://localhost
or 127.0.0.1
.
To expose your local server to the internet for testing purposes, consider using a tool like ngrok or webhook.site. These tools allow you to see what the webhook payload looks like and simulate webhook events locally before deploying your application to a live environment.
Using these tools, you can ensure that your webhook integration is functioning correctly and handle any issues in a controlled, local environment before moving to production.
Resend Transaction Webhook
Incase where for some reasons you don’t receive transaction webhook and the backoff time is elapse, we’ve provided an API you can use to resend a transaction webhook
Use with caution!
As this can lead to processing already completed transactions, make sure you have proper validation in place while using this endpoint.
curl --request POST \
--url https://api.blockradar.co/v1/wallets/{walletId}/transactions/webhooks/resend \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"id": "TRANSACTION_ID"
}'
Verify event origin
Since your webhook URL is publicly available, you need to verify that events originate from Blockradar and not a bad actor. There are two ways to ensure events to your webhook URL are from Blockradar:
- Signature validation (recommended)
Signature validation
Events sent from Blockradar carry the x-blockradar-signature header. The value of this header is a HMAC SHA512 signature of the event payload signed using your secret key. Verifying the header signature should be done before processing the event:
const crypto = require('crypto');
const apiKey = process.env.WALLET_API_KEY;
// Using Express
app.post("/my/webhook/url", function(req, res) {
//validate event
const hash = crypto.createHmac('sha512', apiKey).update(JSON.stringify(req.body)).digest('hex');
if (hash == req.headers['x-blockradar-signature']) {
// Retrieve the request's body
const event = req.body;
// Do something with event
}
res.send(200);
});
Go Live Checklist
Now that you’ve successfully created your webhook URL, here are some ways to ensure you get a delightful experience:
- Add the webhook URL on your Master wallets on the Blockradar dashboard
- Ensure your webhook URL is publicly available (localhost URLs cannot receive events)
- If using
.htaccess
, kindly remember to add the trailing/
to the URL - Test your webhook to ensure you’re getting the JSON body and returning a
200 OK
HTTP response - If your webhook function has long-running tasks, you should first acknowledge receiving the webhook by returning a
200 OK
before proceeding with the long-running tasks - If we don’t get a
200 OK
HTTP response from your webhooks, we flag it as a failed attempt - We’ll attempt to send webhooks 5 times with an increasing delay between each attempt, starting with 5 minutes and increasing exponentially up to 80 minutes. The total duration for these 5 attempts will span approximately 2 hours and 35 minutes.
Supported events
{
"event": "deposit.success",
"data": {
"id": "6d2f9646-cae4-48a5-8bfe-1f9379868d4f",
"reference": "LSk5RLfSrR",
"senderAddress": "0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22",
"recipientAddress": "0xe1037B45b48390285e5067424053fa35c478296b",
"amount": "10.0",
"amountPaid": "10.0",
"fee": null,
"currency": "USD",
"blockNumber": 6928760,
"blockHash": "0x5f2e0ed782752b9559e7a3d89c0fb9f6706e4866e74ba7a434cf933bb3f02a2b",
"hash": "0x94c733496df59c15e5a489f20374096bba31166a8e149ceea4d410e3e5821357",
"confirmations": 6,
"confirmed": true,
"gasPrice": "1201381238",
"gasUsed": "62159",
"gasFee": "0.000074676656372842",
"status": "SUCCESS",
"type": "DEPOSIT",
"note": null,
"amlScreening": {
"provider": "ofac",
"status": "success",
"message": "Address is not sanctioned"
},
"assetSwept": null,
"assetSweptAt": null,
"assetSweptGasFee": null,
"assetSweptHash": null,
"assetSweptSenderAddress": null,
"assetSweptRecipientAddress": null,
"assetSweptAmount": null,
"reason": null,
"network": "testnet",
"chainId": 11155111,
"metadata": {
"user_id": 1
},
"createdAt": "2024-10-23T11:19:58.451Z",
"updatedAt": "2024-10-23T11:19:58.451Z",
"asset": {
"id": "fe04a28c-c615-4e41-8eda-f84c862864f5",
"name": "USDC Coin",
"symbol": "USDC",
"decimals": 6,
"address": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",
"standard": "ERC20",
"isActive": true,
"logoUrl": "https://res.cloudinary.com/blockradar/image/upload/v1716800083/crypto-assets/usd-coin-usdc-logo_fs9mhv.png",
"network": "testnet",
"createdAt": "2024-05-14T11:53:33.682Z",
"updatedAt": "2024-06-14T22:32:12.589Z"
},
"address": {
"id": "0a69c48a-6c6f-422c-bd6a-70de3306a3ac",
"address": "0xe1037B45b48390285e5067424053fa35c478296b",
"name": "Customer 1",
"isActive": true,
"type": "INTERNAL",
"derivationPath": "m/44'/60'/0'/0/87",
"metadata": {
"user_id": 1
},
"configurations": {
"aml": {
"status": "success",
"message": "Address is not sanctioned",
"provider": "ofac"
},
"showPrivateKey": false,
"disableAutoSweep": false,
"enableGaslessWithdraw": false
},
"network": "testnet",
"createdAt": "2024-10-23T11:13:40.446Z",
"updatedAt": "2024-10-23T11:13:40.446Z"
},
"blockchain": {
"id": "85ffc132-3972-4c9e-99a5-5cf0ccb688bf",
"name": "ethereum",
"symbol": "eth",
"slug": "ethereum",
"derivationPath": "m/44'/60'/0'/0",
"isEvmCompatible": true,
"logoUrl": "https://res.cloudinary.com/blockradar/image/upload/v1716800081/crypto-assets/ethereum-eth-logo_idraq2.png",
"isActive": true,
"tokenStandard": "ERC20",
"createdAt": "2024-05-14T11:53:33.095Z",
"updatedAt": "2024-06-14T22:32:11.983Z"
},
"wallet": {
"id": "d236a191-c1d4-423c-a439-54ce6542ca41",
"name": "Ethereum Master Wallet",
"description": "This is ethereum testnet master wallet",
"address": "0x947514e4B803e312C312da0F1B41fEDdbe15ae7a",
"derivationPath": "m/44'/60'/0'/0/0",
"isActive": true,
"status": "ACTIVE",
"network": "testnet",
"createdAt": "2024-08-22T09:48:56.322Z",
"updatedAt": "2024-10-23T10:52:34.332Z",
"business": {
"id": "4b96c271-35eb-45e8-b558-6a53f95df601",
"name": "Test One Inc",
"sector": "Fintech",
"status": "ACTIVE",
"createdAt": "2024-08-22T09:28:37.522Z",
"updatedAt": "2024-08-22T09:28:37.522Z"
}
},
"beneficiary": null
}
}
{
"event": "deposit.success",
"data": {
"id": "6d2f9646-cae4-48a5-8bfe-1f9379868d4f",
"reference": "LSk5RLfSrR",
"senderAddress": "0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22",
"recipientAddress": "0xe1037B45b48390285e5067424053fa35c478296b",
"amount": "10.0",
"amountPaid": "10.0",
"fee": null,
"currency": "USD",
"blockNumber": 6928760,
"blockHash": "0x5f2e0ed782752b9559e7a3d89c0fb9f6706e4866e74ba7a434cf933bb3f02a2b",
"hash": "0x94c733496df59c15e5a489f20374096bba31166a8e149ceea4d410e3e5821357",
"confirmations": 6,
"confirmed": true,
"gasPrice": "1201381238",
"gasUsed": "62159",
"gasFee": "0.000074676656372842",
"status": "SUCCESS",
"type": "DEPOSIT",
"note": null,
"amlScreening": {
"provider": "ofac",
"status": "success",
"message": "Address is not sanctioned"
},
"assetSwept": null,
"assetSweptAt": null,
"assetSweptGasFee": null,
"assetSweptHash": null,
"assetSweptSenderAddress": null,
"assetSweptRecipientAddress": null,
"assetSweptAmount": null,
"reason": null,
"network": "testnet",
"chainId": 11155111,
"metadata": {
"user_id": 1
},
"createdAt": "2024-10-23T11:19:58.451Z",
"updatedAt": "2024-10-23T11:19:58.451Z",
"asset": {
"id": "fe04a28c-c615-4e41-8eda-f84c862864f5",
"name": "USDC Coin",
"symbol": "USDC",
"decimals": 6,
"address": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",
"standard": "ERC20",
"isActive": true,
"logoUrl": "https://res.cloudinary.com/blockradar/image/upload/v1716800083/crypto-assets/usd-coin-usdc-logo_fs9mhv.png",
"network": "testnet",
"createdAt": "2024-05-14T11:53:33.682Z",
"updatedAt": "2024-06-14T22:32:12.589Z"
},
"address": {
"id": "0a69c48a-6c6f-422c-bd6a-70de3306a3ac",
"address": "0xe1037B45b48390285e5067424053fa35c478296b",
"name": "Customer 1",
"isActive": true,
"type": "INTERNAL",
"derivationPath": "m/44'/60'/0'/0/87",
"metadata": {
"user_id": 1
},
"configurations": {
"aml": {
"status": "success",
"message": "Address is not sanctioned",
"provider": "ofac"
},
"showPrivateKey": false,
"disableAutoSweep": false,
"enableGaslessWithdraw": false
},
"network": "testnet",
"createdAt": "2024-10-23T11:13:40.446Z",
"updatedAt": "2024-10-23T11:13:40.446Z"
},
"blockchain": {
"id": "85ffc132-3972-4c9e-99a5-5cf0ccb688bf",
"name": "ethereum",
"symbol": "eth",
"slug": "ethereum",
"derivationPath": "m/44'/60'/0'/0",
"isEvmCompatible": true,
"logoUrl": "https://res.cloudinary.com/blockradar/image/upload/v1716800081/crypto-assets/ethereum-eth-logo_idraq2.png",
"isActive": true,
"tokenStandard": "ERC20",
"createdAt": "2024-05-14T11:53:33.095Z",
"updatedAt": "2024-06-14T22:32:11.983Z"
},
"wallet": {
"id": "d236a191-c1d4-423c-a439-54ce6542ca41",
"name": "Ethereum Master Wallet",
"description": "This is ethereum testnet master wallet",
"address": "0x947514e4B803e312C312da0F1B41fEDdbe15ae7a",
"derivationPath": "m/44'/60'/0'/0/0",
"isActive": true,
"status": "ACTIVE",
"network": "testnet",
"createdAt": "2024-08-22T09:48:56.322Z",
"updatedAt": "2024-10-23T10:52:34.332Z",
"business": {
"id": "4b96c271-35eb-45e8-b558-6a53f95df601",
"name": "Test One Inc",
"sector": "Fintech",
"status": "ACTIVE",
"createdAt": "2024-08-22T09:28:37.522Z",
"updatedAt": "2024-08-22T09:28:37.522Z"
}
},
"beneficiary": null
}
}
{
"event": "deposit.swept.success",
"data": {
"id": "6d2f9646-cae4-48a5-8bfe-1f9379868d4f",
"reference": "LSk5RLfSrR",
"senderAddress": "0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22",
"recipientAddress": "0xe1037B45b48390285e5067424053fa35c478296b",
"amount": "10.0",
"amountPaid": "10.0",
"fee": null,
"currency": "USD",
"blockNumber": 6928760,
"blockHash": "0x5f2e0ed782752b9559e7a3d89c0fb9f6706e4866e74ba7a434cf933bb3f02a2b",
"hash": "0x94c733496df59c15e5a489f20374096bba31166a8e149ceea4d410e3e5821357",
"confirmations": 6,
"confirmed": true,
"gasPrice": "1201381238",
"gasUsed": "62159",
"gasFee": "0.000074676656372842",
"status": "SUCCESS",
"type": "DEPOSIT",
"note": null,
"amlScreening": {
"provider": "ofac",
"status": "success",
"message": "Address is not sanctioned"
},
"assetSwept": true,
"assetSweptAt": "2024-10-23T11:28:52.848Z",
"assetSweptGasFee": "0.000074597672027028",
"assetSweptHash": "0xe5ae1c025b81ff83a03189fad1c0f5bd502cd0b394bed6765603f9ba05bfe147",
"assetSweptSenderAddress": "0xe1037B45b48390285e5067424053fa35c478296b",
"assetSweptRecipientAddress": "0x947514e4B803e312C312da0F1B41fEDdbe15ae7a",
"assetSweptAmount": "10.0",
"reason": "Funds swept successfully",
"network": "testnet",
"chainId": 11155111,
"metadata": {
"user_id": 1
},
"createdAt": "2024-10-23T11:19:58.451Z",
"updatedAt": "2024-10-23T11:28:52.889Z",
"asset": {
"id": "fe04a28c-c615-4e41-8eda-f84c862864f5",
"name": "USDC Coin",
"symbol": "USDC",
"decimals": 6,
"address": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",
"standard": "ERC20",
"isActive": true,
"logoUrl": "https://res.cloudinary.com/blockradar/image/upload/v1716800083/crypto-assets/usd-coin-usdc-logo_fs9mhv.png",
"network": "testnet",
"createdAt": "2024-05-14T11:53:33.682Z",
"updatedAt": "2024-06-14T22:32:12.589Z"
},
"address": {
"id": "0a69c48a-6c6f-422c-bd6a-70de3306a3ac",
"address": "0xe1037B45b48390285e5067424053fa35c478296b",
"name": "Customer 1",
"isActive": true,
"type": "INTERNAL",
"derivationPath": "m/44'/60'/0'/0/87",
"metadata": {
"user_id": 1
},
"configurations": {
"aml": {
"status": "success",
"message": "Address is not sanctioned",
"provider": "ofac"
},
"showPrivateKey": false,
"disableAutoSweep": false,
"enableGaslessWithdraw": false
},
"network": "testnet",
"createdAt": "2024-10-23T11:13:40.446Z",
"updatedAt": "2024-10-23T11:13:40.446Z"
},
"blockchain": {
"id": "85ffc132-3972-4c9e-99a5-5cf0ccb688bf",
"name": "ethereum",
"symbol": "eth",
"slug": "ethereum",
"derivationPath": "m/44'/60'/0'/0",
"isEvmCompatible": true,
"logoUrl": "https://res.cloudinary.com/blockradar/image/upload/v1716800081/crypto-assets/ethereum-eth-logo_idraq2.png",
"isActive": true,
"tokenStandard": "ERC20",
"createdAt": "2024-05-14T11:53:33.095Z",
"updatedAt": "2024-06-14T22:32:11.983Z"
},
"wallet": {
"id": "d236a191-c1d4-423c-a439-54ce6542ca41",
"name": "Ethereum Master Wallet",
"description": "This is ethereum testnet master wallet",
"address": "0x947514e4B803e312C312da0F1B41fEDdbe15ae7a",
"derivationPath": "m/44'/60'/0'/0/0",
"isActive": true,
"status": "ACTIVE",
"network": "testnet",
"createdAt": "2024-08-22T09:48:56.322Z",
"updatedAt": "2024-10-23T10:52:34.332Z",
"business": {
"id": "4b96c271-35eb-45e8-b558-6a53f95df601",
"name": "Test One Inc",
"sector": "Fintech",
"status": "ACTIVE",
"createdAt": "2024-08-22T09:28:37.522Z",
"updatedAt": "2024-08-22T09:28:37.522Z"
}
},
"beneficiary": null
}
}
{
"event": "deposit.swept.failed",
"data": {
"id": "6d2f9646-cae4-48a5-8bfe-1f9379868d4f",
"reference": "LSk5RLfSrR",
"senderAddress": "0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22",
"recipientAddress": "0xe1037B45b48390285e5067424053fa35c478296b",
"amount": "10.0",
"amountPaid": "10.0",
"fee": null,
"currency": "USD",
"blockNumber": 6928760,
"blockHash": "0x5f2e0ed782752b9559e7a3d89c0fb9f6706e4866e74ba7a434cf933bb3f02a2b",
"hash": "0x94c733496df59c15e5a489f20374096bba31166a8e149ceea4d410e3e5821357",
"confirmations": 6,
"confirmed": true,
"gasPrice": "1201381238",
"gasUsed": "62159",
"gasFee": "0.000074676656372842",
"status": "SUCCESS",
"type": "DEPOSIT",
"note": null,
"amlScreening": {
"provider": "ofac",
"status": "success",
"message": "Address is not sanctioned"
},
"assetSwept": false,
"assetSweptAt": null,
"assetSweptGasFee": "0.000074597672027028",
"assetSweptHash": "0xe5ae1c025b81ff83a03189fad1c0f5bd502cd0b394bed6765603f9ba05bfe147",
"assetSweptSenderAddress": "0xe1037B45b48390285e5067424053fa35c478296b",
"assetSweptRecipientAddress": "0x947514e4B803e312C312da0F1B41fEDdbe15ae7a",
"assetSweptAmount": "10.0",
"reason": "Insufficient funds to pay for network fee sweeping assets",
"network": "testnet",
"chainId": 11155111,
"metadata": {
"user_id": 1
},
"createdAt": "2024-10-23T11:19:58.451Z",
"updatedAt": "2024-10-23T11:28:52.889Z",
"asset": {
"id": "fe04a28c-c615-4e41-8eda-f84c862864f5",
"name": "USDC Coin",
"symbol": "USDC",
"decimals": 6,
"address": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",
"standard": "ERC20",
"isActive": true,
"logoUrl": "https://res.cloudinary.com/blockradar/image/upload/v1716800083/crypto-assets/usd-coin-usdc-logo_fs9mhv.png",
"network": "testnet",
"createdAt": "2024-05-14T11:53:33.682Z",
"updatedAt": "2024-06-14T22:32:12.589Z"
},
"address": {
"id": "0a69c48a-6c6f-422c-bd6a-70de3306a3ac",
"address": "0xe1037B45b48390285e5067424053fa35c478296b",
"name": "Customer 1",
"isActive": true,
"type": "INTERNAL",
"derivationPath": "m/44'/60'/0'/0/87",
"metadata": {
"user_id": 1
},
"configurations": {
"aml": {
"status": "success",
"message": "Address is not sanctioned",
"provider": "ofac"
},
"showPrivateKey": false,
"disableAutoSweep": false,
"enableGaslessWithdraw": false
},
"network": "testnet",
"createdAt": "2024-10-23T11:13:40.446Z",
"updatedAt": "2024-10-23T11:13:40.446Z"
},
"blockchain": {
"id": "85ffc132-3972-4c9e-99a5-5cf0ccb688bf",
"name": "ethereum",
"symbol": "eth",
"slug": "ethereum",
"derivationPath": "m/44'/60'/0'/0",
"isEvmCompatible": true,
"logoUrl": "https://res.cloudinary.com/blockradar/image/upload/v1716800081/crypto-assets/ethereum-eth-logo_idraq2.png",
"isActive": true,
"tokenStandard": "ERC20",
"createdAt": "2024-05-14T11:53:33.095Z",
"updatedAt": "2024-06-14T22:32:11.983Z"
},
"wallet": {
"id": "d236a191-c1d4-423c-a439-54ce6542ca41",
"name": "Ethereum Master Wallet",
"description": "This is ethereum testnet master wallet",
"address": "0x947514e4B803e312C312da0F1B41fEDdbe15ae7a",
"derivationPath": "m/44'/60'/0'/0/0",
"isActive": true,
"status": "ACTIVE",
"network": "testnet",
"createdAt": "2024-08-22T09:48:56.322Z",
"updatedAt": "2024-10-23T10:52:34.332Z",
"business": {
"id": "4b96c271-35eb-45e8-b558-6a53f95df601",
"name": "Test One Inc",
"sector": "Fintech",
"status": "ACTIVE",
"createdAt": "2024-08-22T09:28:37.522Z",
"updatedAt": "2024-08-22T09:28:37.522Z"
}
},
"beneficiary": null
}
}
{
"event": "withdraw.success",
"data": {
"id": "081d6315-159f-4c38-b02a-c4708836c5bd",
"reference": "y8lvy55cK",
"senderAddress": "0x947514e4B803e312C312da0F1B41fEDdbe15ae7a",
"recipientAddress": "0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22",
"amount": "10",
"amountPaid": "10",
"fee": null,
"currency": "USD",
"blockNumber": 6928833,
"blockHash": "0x0a3ff5314f333ae0b48a66f96c58731c434af5d8a26b107103b15d0b9d6f817d",
"hash": "0xded90bc7f3d98f5ff0c3a97f711717192e83e01d89ac1ff4483ae6fd9d229e6d",
"confirmations": 6,
"confirmed": true,
"gasPrice": "2166177614",
"gasUsed": "45047",
"gasFee": "0.000097579802977858",
"status": "SUCCESS",
"type": "WITHDRAW",
"note": null,
"amlScreening": {
"provider": "ofac",
"status": "success",
"message": "Address is not sanctioned"
},
"assetSwept": null,
"assetSweptAt": null,
"assetSweptGasFee": null,
"assetSweptHash": null,
"assetSweptSenderAddress": null,
"assetSweptRecipientAddress": null,
"assetSweptAmount": null,
"reason": null,
"network": "testnet",
"chainId": 11155111,
"metadata": null,
"createdAt": "2024-10-23T11:33:58.765Z",
"updatedAt": "2024-10-23T11:35:16.015Z",
"asset": {
"id": "fe04a28c-c615-4e41-8eda-f84c862864f5",
"name": "USDC Coin",
"symbol": "USDC",
"decimals": 6,
"address": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",
"standard": "ERC20",
"isActive": true,
"logoUrl": "https://res.cloudinary.com/blockradar/image/upload/v1716800083/crypto-assets/usd-coin-usdc-logo_fs9mhv.png",
"network": "testnet",
"createdAt": "2024-05-14T11:53:33.682Z",
"updatedAt": "2024-06-14T22:32:12.589Z"
},
"address": null,
"blockchain": {
"id": "85ffc132-3972-4c9e-99a5-5cf0ccb688bf",
"name": "ethereum",
"symbol": "eth",
"slug": "ethereum",
"derivationPath": "m/44'/60'/0'/0",
"isEvmCompatible": true,
"logoUrl": "https://res.cloudinary.com/blockradar/image/upload/v1716800081/crypto-assets/ethereum-eth-logo_idraq2.png",
"isActive": true,
"tokenStandard": "ERC20",
"createdAt": "2024-05-14T11:53:33.095Z",
"updatedAt": "2024-06-14T22:32:11.983Z"
},
"wallet": {
"id": "d236a191-c1d4-423c-a439-54ce6542ca41",
"name": "Ethereum Master Wallet",
"description": "This is ethereum testnet master wallet",
"address": "0x947514e4B803e312C312da0F1B41fEDdbe15ae7a",
"derivationPath": "m/44'/60'/0'/0/0",
"isActive": true,
"status": "ACTIVE",
"network": "testnet",
"createdAt": "2024-08-22T09:48:56.322Z",
"updatedAt": "2024-10-23T10:52:34.332Z",
"business": {
"id": "4b96c271-35eb-45e8-b558-6a53f95df601",
"name": "Test One Inc",
"sector": "Fintech",
"status": "ACTIVE",
"createdAt": "2024-08-22T09:28:37.522Z",
"updatedAt": "2024-08-22T09:28:37.522Z"
}
},
"beneficiary": null
}
}
{
"event": "withdraw.failed",
"data": {
"id": "081d6315-159f-4c38-b02a-c4708836c5bd",
"reference": "y8lvy55cK",
"senderAddress": "0x947514e4B803e312C312da0F1B41fEDdbe15ae7a",
"recipientAddress": "0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22",
"amount": "10",
"amountPaid": "10",
"fee": null,
"currency": "USD",
"blockNumber": 6928833,
"blockHash": "0x0a3ff5314f333ae0b48a66f96c58731c434af5d8a26b107103b15d0b9d6f817d",
"hash": "0xded90bc7f3d98f5ff0c3a97f711717192e83e01d89ac1ff4483ae6fd9d229e6d",
"confirmations": 6,
"confirmed": true,
"gasPrice": "2166177614",
"gasUsed": "45047",
"gasFee": "0.000097579802977858",
"status": "SUCCESS",
"type": "WITHDRAW",
"note": null,
"amlScreening": {
"provider": "ofac",
"status": "success",
"message": "Address is not sanctioned"
},
"assetSwept": null,
"assetSweptAt": null,
"assetSweptGasFee": null,
"assetSweptHash": null,
"assetSweptSenderAddress": null,
"assetSweptRecipientAddress": null,
"assetSweptAmount": null,
"reason": "Insufficient funds to pay for network fee sweeping assets",
"network": "testnet",
"chainId": 11155111,
"metadata": null,
"createdAt": "2024-10-23T11:33:58.765Z",
"updatedAt": "2024-10-23T11:35:16.015Z",
"asset": {
"id": "fe04a28c-c615-4e41-8eda-f84c862864f5",
"name": "USDC Coin",
"symbol": "USDC",
"decimals": 6,
"address": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",
"standard": "ERC20",
"isActive": true,
"logoUrl": "https://res.cloudinary.com/blockradar/image/upload/v1716800083/crypto-assets/usd-coin-usdc-logo_fs9mhv.png",
"network": "testnet",
"createdAt": "2024-05-14T11:53:33.682Z",
"updatedAt": "2024-06-14T22:32:12.589Z"
},
"address": null,
"blockchain": {
"id": "85ffc132-3972-4c9e-99a5-5cf0ccb688bf",
"name": "ethereum",
"symbol": "eth",
"slug": "ethereum",
"derivationPath": "m/44'/60'/0'/0",
"isEvmCompatible": true,
"logoUrl": "https://res.cloudinary.com/blockradar/image/upload/v1716800081/crypto-assets/ethereum-eth-logo_idraq2.png",
"isActive": true,
"tokenStandard": "ERC20",
"createdAt": "2024-05-14T11:53:33.095Z",
"updatedAt": "2024-06-14T22:32:11.983Z"
},
"wallet": {
"id": "d236a191-c1d4-423c-a439-54ce6542ca41",
"name": "Ethereum Master Wallet",
"description": "This is ethereum testnet master wallet",
"address": "0x947514e4B803e312C312da0F1B41fEDdbe15ae7a",
"derivationPath": "m/44'/60'/0'/0/0",
"isActive": true,
"status": "ACTIVE",
"network": "testnet",
"createdAt": "2024-08-22T09:48:56.322Z",
"updatedAt": "2024-10-23T10:52:34.332Z",
"business": {
"id": "4b96c271-35eb-45e8-b558-6a53f95df601",
"name": "Test One Inc",
"sector": "Fintech",
"status": "ACTIVE",
"createdAt": "2024-08-22T09:28:37.522Z",
"updatedAt": "2024-08-22T09:28:37.522Z"
}
},
"beneficiary": null
}
}
{
"event": "swap.success",
"data": {
"id": "99a2b490-0798-460b-9265-4d99f182fe52",
"reference": "ZMxcorDGtf",
"senderAddress": "0xAA2d5fd5e7bE97E214f8565DCf3a4862719960b5",
"recipientAddress": "0xb55c054D8eE75224E1033e6eC775B4F62D942b43",
"tokenAddress": null,
"amount": "5",
"amountPaid": null,
"fee": null,
"currency": null,
"blockNumber": 28888586,
"blockHash": null,
"hash": "0x4cfaf5b9526d2ef7df576844e8ea8739f523e9166c9e0a73a574e663270cd750",
"confirmations": null,
"confirmed": true,
"gasPrice": null,
"gasUsed": null,
"gasFee": "0.000000183414563983",
"status": "SUCCESS",
"type": "SWAP",
"note": null,
"amlScreening": {
"provider": "ofac, fbi, tether, circle",
"status": "success",
"message": "Address is not sanctioned"
},
"assetSwept": true,
"assetSweptAt": "2025-04-13T17:48:58.610Z",
"assetSweptGasFee": "0.000000223941716904",
"assetSweptHash": "0xaf92bb24dc9d3bd6c2ec6245a41c2461291513fdc7f748c843c6576e484522eb",
"assetSweptSenderAddress": "0xeeeeee9eC4769A09a76A83C7bC42b185872860eE",
"assetSweptRecipientAddress": "0xb55c054D8eE75224E1033e6eC775B4F62D942b43",
"assetSweptAmount": "4.965214",
"reason": null,
"network": "mainnet",
"chainId": null,
"metadata": null,
"toAmount": "4.965398",
"rate": "0.9930796000000001",
"createdAt": "2025-04-13T17:48:36.689Z",
"updatedAt": "2025-04-13T17:48:58.611Z",
"asset": {
"id": "3a18a31a-86ad-44a0-9b9c-cdb69d535c64",
"name": "USD Coin",
"symbol": "USDC",
"decimals": 6,
"address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"standard": null,
"isActive": true,
"logoUrl": "https://res.cloudinary.com/blockradar/image/upload/v1716800083/crypto-assets/usd-coin-usdc-logo_fs9mhv.png",
"network": "mainnet",
"isNative": false,
"createdAt": "2024-06-08T12:59:11.303Z",
"updatedAt": "2024-06-09T10:39:24.429Z"
},
"address": null,
"blockchain": {
"id": "28a730d3-211b-40f7-bb8f-dd589dcc738e",
"name": "base",
"symbol": "eth",
"slug": "base",
"derivationPath": "m/44'/60'/0'/0",
"isEvmCompatible": true,
"isL2": true,
"logoUrl": "https://res.cloudinary.com/blockradar/image/upload/v1716800080/crypto-assets/Base_Network_Logo_vqyh7r.png",
"isActive": true,
"tokenStandard": null,
"createdAt": "2024-06-07T11:09:56.586Z",
"updatedAt": "2024-11-26T15:26:21.825Z"
},
"wallet": {
"id": "6b741fbc-8a9c-48a1-92b0-ae7b52de8b9e",
"name": "Base Mainnet Wallet",
"description": "This is base mainnet wallet",
"address": "0xAA2d5fd5e7bE97E214f8565DCf3a4862719960b5",
"derivationPath": "m/44'/60'/0'/0/41",
"isActive": true,
"status": "ACTIVE",
"network": "mainnet",
"configurations": {
"withdrawal": {
"gasless": {
"isActive": true
}
},
"autoSweeping": {
"isActive": true
}
},
"createdAt": "2024-06-15T02:53:23.409Z",
"updatedAt": "2025-04-01T21:27:57.022Z",
"business": {
"id": "a109729b-3b97-4fb3-a90a-769a0cbf6a25",
"name": "Blockradar",
"sector": "infrastructure",
"status": "ACTIVE",
"createdAt": "2023-04-28T17:40:18.541Z",
"updatedAt": "2024-06-13T19:57:03.064Z"
}
},
"beneficiary": null,
"paymentLink": null,
"toAsset": {
"id": "065ff109-9d31-4c7d-bd0e-13314d2ed5f6",
"name": "Tether USD",
"symbol": "USDT",
"decimals": 6,
"address": "0x94b008aA00579c1307B0EF2c499aD98a8ce58e58",
"standard": null,
"isActive": true,
"logoUrl": "https://res.cloudinary.com/blockradar/image/upload/v1716800082/crypto-assets/tether-usdt-logo_wx7rwh.png",
"network": "mainnet",
"isNative": false,
"createdAt": "2024-10-08T13:22:13.802Z",
"updatedAt": "2024-10-08T13:22:13.802Z"
},
"toBlockchain": {
"id": "a5e8779c-9f8d-4a67-839d-c278eebf87f1",
"name": "optimism",
"symbol": "eth",
"slug": "optimism",
"derivationPath": "m/44'/60'/0'/0",
"isEvmCompatible": true,
"isL2": true,
"logoUrl": "https://res.cloudinary.com/blockradar/image/upload/v1728312943/crypto-assets/optimism-ethereum-op-logo_h62d1i.png",
"isActive": true,
"tokenStandard": null,
"createdAt": "2024-10-08T13:04:21.649Z",
"updatedAt": "2024-11-26T15:26:23.105Z"
},
"toWallet": {
"id": "d2f9a93c-e8d6-4768-bc09-be4750e7eacb",
"name": "Optimism Mainnet Wallet",
"description": "This is optimism mainnet master wallet",
"address": "0xb55c054D8eE75224E1033e6eC775B4F62D942b43",
"derivationPath": "m/44'/60'/0'/0/0",
"isActive": true,
"status": "ACTIVE",
"network": "mainnet",
"configurations": null,
"createdAt": "2024-11-23T07:31:57.897Z",
"updatedAt": "2024-11-24T05:40:46.225Z"
}
}
}
{
"event": "swap.failed",
"data": {
"id": "99a2b490-0798-460b-9265-4d99f182fe52",
"reference": "ZMxcorDGtf",
"senderAddress": "0xAA2d5fd5e7bE97E214f8565DCf3a4862719960b5",
"recipientAddress": "0xb55c054D8eE75224E1033e6eC775B4F62D942b43",
"tokenAddress": null,
"amount": "5",
"amountPaid": null,
"fee": null,
"currency": null,
"blockNumber": 28888586,
"blockHash": null,
"hash": "0x4cfaf5b9526d2ef7df576844e8ea8739f523e9166c9e0a73a574e663270cd750",
"confirmations": null,
"confirmed": true,
"gasPrice": null,
"gasUsed": null,
"gasFee": "0.000000183414563983",
"status": "FAILED",
"type": "SWAP",
"note": null,
"amlScreening": {
"provider": "ofac, fbi, tether, circle",
"status": "success",
"message": "Address is not sanctioned"
},
"assetSwept": true,
"assetSweptAt": "2025-04-13T17:48:58.610Z",
"assetSweptGasFee": "0.000000223941716904",
"assetSweptHash": "0xaf92bb24dc9d3bd6c2ec6245a41c2461291513fdc7f748c843c6576e484522eb",
"assetSweptSenderAddress": "0xeeeeee9eC4769A09a76A83C7bC42b185872860eE",
"assetSweptRecipientAddress": "0xb55c054D8eE75224E1033e6eC775B4F62D942b43",
"assetSweptAmount": "4.965214",
"reason": null,
"network": "mainnet",
"chainId": null,
"metadata": null,
"toAmount": "4.965398",
"rate": "0.9930796000000001",
"createdAt": "2025-04-13T17:48:36.689Z",
"updatedAt": "2025-04-13T17:48:58.611Z",
"asset": {
"id": "3a18a31a-86ad-44a0-9b9c-cdb69d535c64",
"name": "USD Coin",
"symbol": "USDC",
"decimals": 6,
"address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"standard": null,
"isActive": true,
"logoUrl": "https://res.cloudinary.com/blockradar/image/upload/v1716800083/crypto-assets/usd-coin-usdc-logo_fs9mhv.png",
"network": "mainnet",
"isNative": false,
"createdAt": "2024-06-08T12:59:11.303Z",
"updatedAt": "2024-06-09T10:39:24.429Z"
},
"address": null,
"blockchain": {
"id": "28a730d3-211b-40f7-bb8f-dd589dcc738e",
"name": "base",
"symbol": "eth",
"slug": "base",
"derivationPath": "m/44'/60'/0'/0",
"isEvmCompatible": true,
"isL2": true,
"logoUrl": "https://res.cloudinary.com/blockradar/image/upload/v1716800080/crypto-assets/Base_Network_Logo_vqyh7r.png",
"isActive": true,
"tokenStandard": null,
"createdAt": "2024-06-07T11:09:56.586Z",
"updatedAt": "2024-11-26T15:26:21.825Z"
},
"wallet": {
"id": "6b741fbc-8a9c-48a1-92b0-ae7b52de8b9e",
"name": "Base Mainnet Wallet",
"description": "This is base mainnet wallet",
"address": "0xAA2d5fd5e7bE97E214f8565DCf3a4862719960b5",
"derivationPath": "m/44'/60'/0'/0/41",
"isActive": true,
"status": "ACTIVE",
"network": "mainnet",
"configurations": {
"withdrawal": {
"gasless": {
"isActive": true
}
},
"autoSweeping": {
"isActive": true
}
},
"createdAt": "2024-06-15T02:53:23.409Z",
"updatedAt": "2025-04-01T21:27:57.022Z",
"business": {
"id": "a109729b-3b97-4fb3-a90a-769a0cbf6a25",
"name": "Blockradar",
"sector": "infrastructure",
"status": "ACTIVE",
"createdAt": "2023-04-28T17:40:18.541Z",
"updatedAt": "2024-06-13T19:57:03.064Z"
}
},
"beneficiary": null,
"paymentLink": null,
"toAsset": {
"id": "065ff109-9d31-4c7d-bd0e-13314d2ed5f6",
"name": "Tether USD",
"symbol": "USDT",
"decimals": 6,
"address": "0x94b008aA00579c1307B0EF2c499aD98a8ce58e58",
"standard": null,
"isActive": true,
"logoUrl": "https://res.cloudinary.com/blockradar/image/upload/v1716800082/crypto-assets/tether-usdt-logo_wx7rwh.png",
"network": "mainnet",
"isNative": false,
"createdAt": "2024-10-08T13:22:13.802Z",
"updatedAt": "2024-10-08T13:22:13.802Z"
},
"toBlockchain": {
"id": "a5e8779c-9f8d-4a67-839d-c278eebf87f1",
"name": "optimism",
"symbol": "eth",
"slug": "optimism",
"derivationPath": "m/44'/60'/0'/0",
"isEvmCompatible": true,
"isL2": true,
"logoUrl": "https://res.cloudinary.com/blockradar/image/upload/v1728312943/crypto-assets/optimism-ethereum-op-logo_h62d1i.png",
"isActive": true,
"tokenStandard": null,
"createdAt": "2024-10-08T13:04:21.649Z",
"updatedAt": "2024-11-26T15:26:23.105Z"
},
"toWallet": {
"id": "d2f9a93c-e8d6-4768-bc09-be4750e7eacb",
"name": "Optimism Mainnet Wallet",
"description": "This is optimism mainnet master wallet",
"address": "0xb55c054D8eE75224E1033e6eC775B4F62D942b43",
"derivationPath": "m/44'/60'/0'/0/0",
"isActive": true,
"status": "ACTIVE",
"network": "mainnet",
"configurations": null,
"createdAt": "2024-11-23T07:31:57.897Z",
"updatedAt": "2024-11-24T05:40:46.225Z"
}
}
}
Types of events
Here are the events we currently raise. We would add more to this list as we hook into more actions in the future.
Event | Description |
---|---|
deposit.success | Triggered when funds are successfully deposited into a wallet address. |
deposit.swept.success | Triggered when funds are successfully swept (transferred) from a deposit wallet to the master wallet. |
withdraw.success | Triggered when a withdrawal request is successfully processed and funds are sent to the specified destination address. |
withdraw.failed | Triggered when a withdrawal attempt fails. Contains error details, reason for failure (e.g., insufficient funds, invalid address, network issues), transaction attempt details, and any relevant error messages. |
deposit.swept.failed | Triggered when an attempt to sweep funds from a deposit wallet to the master wallet fails. Includes error information, attempted transaction details, and failure reason. |
swap.success | Triggered when an asset swap is successfully executed. Contains details about the swap including input/output asset, amounts, exchange rate |
swap.failed | Triggered when a swap transaction fails to execute. This can occur due to various reasons such as insufficient funds, network congestion, or smart contract errors. |
Happy hacking! ❤️