List heartbeats
curl --request GET \
--url https://magicmarkets.com/v2/heartbeats/ \
--header 'X-Api-Key: <api-key>'import requests
url = "https://magicmarkets.com/v2/heartbeats/"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://magicmarkets.com/v2/heartbeats/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://magicmarkets.com/v2/heartbeats/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"status": "ok",
"data": {
"heartbeats": [
{
"heartbeat_id": "hb-abc123",
"expiry_time": "2026-06-15T12:01:00+00:00"
}
]
}
}{
"status": "error",
"code": "auth_error",
"data": {
"detail": "Authentication credentials were not provided."
}
}{
"status": "error",
"code": "forbidden",
"data": null
}{
"status": "error",
"code": "throttled",
"data": {
"message": "Request was throttled. Expected available in 12 seconds.",
"retry_after": 12
}
}{
"status": "error",
"code": "server_error",
"data": [
"An error has occurred, token:",
"ABC123abc456DEF789gh"
]
}List heartbeats
Returns all currently open heartbeats. Note: unlike other list endpoints (/v2/orders/, /v2/betslips/) which return a flat array under data, this endpoint wraps the array under data.heartbeats for historical reasons. Clients must special-case this shape.
GET
/
v2
/
heartbeats
/
List heartbeats
curl --request GET \
--url https://magicmarkets.com/v2/heartbeats/ \
--header 'X-Api-Key: <api-key>'import requests
url = "https://magicmarkets.com/v2/heartbeats/"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://magicmarkets.com/v2/heartbeats/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://magicmarkets.com/v2/heartbeats/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"status": "ok",
"data": {
"heartbeats": [
{
"heartbeat_id": "hb-abc123",
"expiry_time": "2026-06-15T12:01:00+00:00"
}
]
}
}{
"status": "error",
"code": "auth_error",
"data": {
"detail": "Authentication credentials were not provided."
}
}{
"status": "error",
"code": "forbidden",
"data": null
}{
"status": "error",
"code": "throttled",
"data": {
"message": "Request was throttled. Expected available in 12 seconds.",
"retry_after": 12
}
}{
"status": "error",
"code": "server_error",
"data": [
"An error has occurred, token:",
"ABC123abc456DEF789gh"
]
}Authorizations
API key created from the magic-markets website

