Skip to main content
POST
/
user
/
ordersHeartbeat
Send orders heartbeat
curl --request POST \
  --url https://api.4casters.io/user/ordersHeartbeat \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "timeout": 30
}'

Documentation Index

Fetch the complete documentation index at: https://docs.4casters.io/llms.txt

Use this file to discover all available pages before exploring further.

A safety mechanism: send a heartbeat with a timeout (in seconds). If the next heartbeat is not received within timeout seconds, all of your open orders are cancelled. Use this endpoint in any client that places resting orders — if your process crashes or loses connectivity, the heartbeat ensures stale orders get pulled instead of staying on the book.

Request

POST /user/ordersHeartbeat
timeout
integer
required
Cancel-after timeout, in seconds. Must be greater than 5.
curl -X POST https://api.4casters.io/user/ordersHeartbeat \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"timeout": 30}'

Response

The response is forwarded from the orders service:
{ "data": { /* heartbeat ack payload */ } }

Errors

StatusMeaning
400timeout missing, not a number, or <= 5.
503Orders service unreachable.

Authorizations

Authorization
string
header
required

Pass your auth token in the Authorization header. The Bearer prefix is optional; the server also accepts a signed auth cookie or a token field in the request body.

Body

application/json
timeout
integer
required

Cancel-after timeout, in seconds.

Required range: x >= 6

Response

Heartbeat acknowledged. The response shape is forwarded from the orders service.