Set heartbeat
curl --request POST \
--url https://api.sx.bet/heartbeat/v3 \
--header 'Content-Type: application/json' \
--header 'x-sx-api-key: <api-key>' \
--data '
{
"timeoutSeconds": 300
}
'import requests
url = "https://api.sx.bet/heartbeat/v3"
payload = { "timeoutSeconds": 300 }
headers = {
"x-sx-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-sx-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({timeoutSeconds: 300})
};
fetch('https://api.sx.bet/heartbeat/v3', 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.sx.bet/heartbeat/v3",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'timeoutSeconds' => 300
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-sx-api-key: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sx.bet/heartbeat/v3"
payload := strings.NewReader("{\n \"timeoutSeconds\": 300\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-sx-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sx.bet/heartbeat/v3")
.header("x-sx-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"timeoutSeconds\": 300\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sx.bet/heartbeat/v3")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-sx-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"timeoutSeconds\": 300\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"proxyAddress": "0x4361123dbdc1D812fdf7D27045aF358C9C8AA70A",
"timeoutSeconds": 300,
"expiresAt": "2026-08-06T04:35:00.000Z"
}
}{
"message": "INVALID_PROXY",
"error": "Bad Request",
"statusCode": 400
}{
"message": "BAD_AUTH",
"error": "Unauthorized",
"statusCode": 401
}{
"message": "Service Unavailable",
"statusCode": 503
}Orders
Set heartbeat
Register or refresh a heartbeat timer for your proxy wallet.
POST
/
heartbeat
/
v3
Set heartbeat
curl --request POST \
--url https://api.sx.bet/heartbeat/v3 \
--header 'Content-Type: application/json' \
--header 'x-sx-api-key: <api-key>' \
--data '
{
"timeoutSeconds": 300
}
'import requests
url = "https://api.sx.bet/heartbeat/v3"
payload = { "timeoutSeconds": 300 }
headers = {
"x-sx-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-sx-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({timeoutSeconds: 300})
};
fetch('https://api.sx.bet/heartbeat/v3', 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.sx.bet/heartbeat/v3",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'timeoutSeconds' => 300
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-sx-api-key: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sx.bet/heartbeat/v3"
payload := strings.NewReader("{\n \"timeoutSeconds\": 300\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-sx-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sx.bet/heartbeat/v3")
.header("x-sx-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"timeoutSeconds\": 300\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sx.bet/heartbeat/v3")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-sx-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"timeoutSeconds\": 300\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"proxyAddress": "0x4361123dbdc1D812fdf7D27045aF358C9C8AA70A",
"timeoutSeconds": 300,
"expiresAt": "2026-08-06T04:35:00.000Z"
}
}{
"message": "INVALID_PROXY",
"error": "Bad Request",
"statusCode": 400
}{
"message": "BAD_AUTH",
"error": "Unauthorized",
"statusCode": 401
}{
"message": "Service Unavailable",
"statusCode": 503
}POST /heartbeat/v3 registers or refreshes a heartbeat timer for account.
| Auth | API key only (x-sx-api-key) |
| Scope | The proxy wallet owned by the key’s address |
| Refresh | Call again to push expiresAt forward |
Request
| Field | Type | Rule |
|---|---|---|
timeoutSeconds | integer | Required. 0–3600. 0 clears an armed timer |
Response
200 OK returns the armed heartbeat:
| Field | Meaning |
|---|---|
proxyAddress | The deployed proxy the heartbeat is armed for |
timeoutSeconds | The timeout that was registered |
expiresAt | When the timer lapses (now + timeoutSeconds) |
Errors
| Status | When |
|---|---|
400 | INVALID_PROXY — no deployed proxy for your address; or timeoutSeconds outside 0–3600 |
401 | Missing or invalid API key (BAD_AUTH) |
503 | OBv3 is unavailable on this environment |
You need a deployed proxy first. If your proxy is not yet deployed the call returns
400 INVALID_PROXY. Deploy it with POST /user/deploy-proxy.Authorizations
API key, sent as the x-sx-api-key header. Generate one from the API keys section of your account page on sx.bet.
Body
application/json
Seconds until the heartbeat expires. 0 clears an armed timer.
Required range:
0 <= x <= 3600Last modified on August 11, 2026
⌘I