List Webhooks
curl --request GET \
--url https://api.pro.daya.co/public/v1/webhooks \
--header 'X-Api-Key: <x-api-key>'import requests
url = "https://api.pro.daya.co/public/v1/webhooks"
headers = {"X-Api-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<x-api-key>'}};
fetch('https://api.pro.daya.co/public/v1/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pro.daya.co/public/v1/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pro.daya.co/public/v1/webhooks"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.pro.daya.co/public/v1/webhooks")
.header("X-Api-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pro.daya.co/public/v1/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Webhooks retrieved successfully",
"data": [
{
"id": "770e8400-e29b-41d4-a716-446655440000",
"url": "https://example.com/webhooks/daya",
"description": "Order notifications",
"events": ["order.filled", "order.cancelled"],
"status": "active",
"failure_count": 0,
"last_success_at": "2024-01-15T10:30:00Z",
"last_failure_at": null,
"last_failure_reason": null,
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-15T10:30:00Z"
},
{
"id": "770e8400-e29b-41d4-a716-446655440001",
"url": "https://example.com/webhooks/daya-trades",
"description": "Trade notifications",
"events": ["trade.executed"],
"status": "paused",
"failure_count": 3,
"last_success_at": "2024-01-10T15:00:00Z",
"last_failure_at": "2024-01-15T08:00:00Z",
"last_failure_reason": "Connection timeout",
"created_at": "2024-01-05T00:00:00Z",
"updated_at": "2024-01-15T08:00:00Z"
}
],
"timestamp": "2024-01-15T10:30:00Z"
}
Webhooks API
List Webhooks
List all webhooks for the authenticated user
GET
/
public
/
v1
/
webhooks
List Webhooks
curl --request GET \
--url https://api.pro.daya.co/public/v1/webhooks \
--header 'X-Api-Key: <x-api-key>'import requests
url = "https://api.pro.daya.co/public/v1/webhooks"
headers = {"X-Api-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<x-api-key>'}};
fetch('https://api.pro.daya.co/public/v1/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pro.daya.co/public/v1/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pro.daya.co/public/v1/webhooks"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.pro.daya.co/public/v1/webhooks")
.header("X-Api-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pro.daya.co/public/v1/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Webhooks retrieved successfully",
"data": [
{
"id": "770e8400-e29b-41d4-a716-446655440000",
"url": "https://example.com/webhooks/daya",
"description": "Order notifications",
"events": ["order.filled", "order.cancelled"],
"status": "active",
"failure_count": 0,
"last_success_at": "2024-01-15T10:30:00Z",
"last_failure_at": null,
"last_failure_reason": null,
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-15T10:30:00Z"
},
{
"id": "770e8400-e29b-41d4-a716-446655440001",
"url": "https://example.com/webhooks/daya-trades",
"description": "Trade notifications",
"events": ["trade.executed"],
"status": "paused",
"failure_count": 3,
"last_success_at": "2024-01-10T15:00:00Z",
"last_failure_at": "2024-01-15T08:00:00Z",
"last_failure_reason": "Connection timeout",
"created_at": "2024-01-05T00:00:00Z",
"updated_at": "2024-01-15T08:00:00Z"
}
],
"timestamp": "2024-01-15T10:30:00Z"
}
Overview
Retrieve all webhook endpoints configured for the authenticated user. Use this to view your webhook configurations and their status.Pro webhook setup is support-managed. Contact support@daya.co to configure webhook endpoints for your Pro account.
Authentication
Your API key with Write scope
X-Api-Key: daya_sk_YOUR_API_KEY
Request Examples
curl --request GET \
--url 'https://api.pro.daya.co/public/v1/webhooks' \
--header 'X-Api-Key: daya_sk_YOUR_API_KEY'
const response = await fetch(
'https://api.pro.daya.co/public/v1/webhooks',
{
headers: { 'X-Api-Key': 'daya_sk_YOUR_API_KEY' }
}
);
const data = await response.json();
console.log('Webhooks:', data.data);
import requests
headers = {'X-Api-Key': 'daya_sk_YOUR_API_KEY'}
response = requests.get(
'https://api.pro.daya.co/public/v1/webhooks',
headers=headers
)
webhooks = response.json()
print(f"Webhooks: {webhooks['data']}")
package main
import (
"encoding/json"
"fmt"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://api.pro.daya.co/public/v1/webhooks", nil)
req.Header.Set("X-Api-Key", "daya_sk_YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
fmt.Println("Webhooks:", result["data"])
}
Response
Indicates if the request was successful
Human-readable response message
Array of webhook objects
Show webhook properties
Show webhook properties
Unique webhook identifier (UUID)
Webhook endpoint URL
Webhook description
Events this webhook is subscribed toValues:
order.created, order.filled, order.partially_filled, order.cancelled, order.rejected, trade.executed, deposit.completed, crypto.deposit.completedWebhook statusValues:
active, paused, disabledNumber of consecutive delivery failures
Last successful delivery timestamp (ISO 8601)
Last failed delivery timestamp (ISO 8601)
Reason for last delivery failure
ISO 8601 creation timestamp
ISO 8601 last update timestamp
Success Response
{
"success": true,
"message": "Webhooks retrieved successfully",
"data": [
{
"id": "770e8400-e29b-41d4-a716-446655440000",
"url": "https://example.com/webhooks/daya",
"description": "Order notifications",
"events": ["order.filled", "order.cancelled"],
"status": "active",
"failure_count": 0,
"last_success_at": "2024-01-15T10:30:00Z",
"last_failure_at": null,
"last_failure_reason": null,
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-15T10:30:00Z"
},
{
"id": "770e8400-e29b-41d4-a716-446655440001",
"url": "https://example.com/webhooks/daya-trades",
"description": "Trade notifications",
"events": ["trade.executed"],
"status": "paused",
"failure_count": 3,
"last_success_at": "2024-01-10T15:00:00Z",
"last_failure_at": "2024-01-15T08:00:00Z",
"last_failure_reason": "Connection timeout",
"created_at": "2024-01-05T00:00:00Z",
"updated_at": "2024-01-15T08:00:00Z"
}
],
"timestamp": "2024-01-15T10:30:00Z"
}
Error Responses
{
"success": false,
"message": "Unauthorized",
"error": {
"code": "API_KEY_INVALID",
"message": "The provided API key is invalid"
}
}
{
"success": false,
"message": "Forbidden",
"error": {
"code": "API_KEY_INVALID_SCOPE",
"message": "Insufficient scope for this operation"
}
}
Webhook Status
| Status | Description |
|---|---|
active | Webhook is enabled and receiving events |
paused | Webhook is temporarily disabled by user |
disabled | Webhook was auto-disabled due to repeated failures |
Rate Limits
- 100 requests per minute per API key
Next Steps
Create Webhook
Create a new webhook endpoint
Webhook Overview
Learn about webhook events and payloads
⌘I