API Reference
Web3 API
- Basic API
- Balance API
- Token API
- NFT API
- Domain API
SQL API
- Alpha
- Classic(Deprecated)
Webhook API
Create Webhook
Create webhook to receive message.
POST
/
webhooks
curl --request POST \
--url https://api.chainbase.online/v1/webhooks \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '{
"webhook_name": "<string>",
"webhook_url": "<string>",
"data_source": "<string>",
"filters": [
{
"field": "<string>",
"values": []
}
],
"additional_headers": [
{
"name": "<string>",
"value": "<string>"
}
]
}'
"{\"code\":0,\"msg\":\"create job success\",\"data\":{\"webhook_id\":\"460009d1-f7ce-43a9-9747-681054ffb462\",\"filters\":[{\"field\":\"contract_address\",\"values\":[\"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\",\"0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599\",\"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\"0xdAC17F958D2ee523a2206206994597C13D831ec7\"]}],\"webhook_name\":\"massive-erc20-transfer\",\"webhook_url\":\"https://gtsfh5g3c4.hk.aircode.run/erc20transfer\",\"data_source\":\"ethereum_erc20_transfer\",\"additional_headers\":[{\"name\":\"Authorization\",\"value\":\"Bearer xyz\"}],\"created_at\":\"2023-08-23T03:27:28.281175Z\",\"updated_at\":\"2023-08-23T03:27:28.281175Z\",\"status\":0}}"
Headers
YOUR-API-KEY
Body
application/json
Name of the webhook
URL of the webhook
Data source the webhook subscribe to
Response
200
application/json
200
curl --request POST \
--url https://api.chainbase.online/v1/webhooks \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '{
"webhook_name": "<string>",
"webhook_url": "<string>",
"data_source": "<string>",
"filters": [
{
"field": "<string>",
"values": []
}
],
"additional_headers": [
{
"name": "<string>",
"value": "<string>"
}
]
}'
"{\"code\":0,\"msg\":\"create job success\",\"data\":{\"webhook_id\":\"460009d1-f7ce-43a9-9747-681054ffb462\",\"filters\":[{\"field\":\"contract_address\",\"values\":[\"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\",\"0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599\",\"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\"0xdAC17F958D2ee523a2206206994597C13D831ec7\"]}],\"webhook_name\":\"massive-erc20-transfer\",\"webhook_url\":\"https://gtsfh5g3c4.hk.aircode.run/erc20transfer\",\"data_source\":\"ethereum_erc20_transfer\",\"additional_headers\":[{\"name\":\"Authorization\",\"value\":\"Bearer xyz\"}],\"created_at\":\"2023-08-23T03:27:28.281175Z\",\"updated_at\":\"2023-08-23T03:27:28.281175Z\",\"status\":0}}"