4.8 Heartbeats Requests
These API calls allow the user to create a heartbeat, which is a timer that helps the user to manage their orders in case of connectivity issues.
If a heartbeat refresh request is not received within a set time period, we will attempt to close all of user's open orders.
Available calls:
4.8.1 Open a new heartbeat
Method and URL:
POST /v1/heartbeats/
Request Parameters:
timeout [ int ] (min: 10, max: 300):
The maximum number of seconds that may elapse before the heartbeat expires.
Return Data: A structure containing details of the heartbeat opened.
Output Format:
heartbeat_id [ string ]
The unique ID of the heartbeat.
expiry_time [ ISO 8601 date string ]
The date and time at which the heartbeat expires.
Example:
Example request:
{
"timeout": 10,
}
Example return data:
{
"heartbeat_id": "14eebd7d05624dac9d9f31b3868f3d7d",
"expiry_time": "2022-11-24T16:16:37.521116Z"
}
4.8.2 List the currently open heartbeats
Method and URL:
GET /v1/heartbeats/
Return Data: A list of objects with the same format of the Open a new heartbeat output.
Example return data:
{
"heartbeats": [
{
"heartbeat_id": "5d19811d40d0422fb7b98440535d475b",
"expiry_time": "2022-11-24T16:28:20.954091Z"
},
{
"heartbeat_id": "5b40247505234be9b8ce7043524bdc78",
"expiry_time": "2022-11-24T16:28:21.694246Z"
},
{
"heartbeat_id": "bdabe83d2862426392dbf11f550c2daa",
"expiry_time": "2022-11-24T16:28:22.649865Z"
}
]
}
4.8.3 Return information about a single heartbeat
Method and URL:
GET /v1/heartbeats/<heartbeat_id>/
Return Data: A structure with the same format of the Open a new heartbeat output.
4.8.4 Extend the heartbeat expiration timeout
Method and URL:
POST /v1/heartbeats/<heartbeat_id>/refresh/
Return Data: A structure with the same format of the Open a new heartbeat output.
4.8.5 Cancel a heartbeat
Method and URL:
DELETE /v1/heartbeats/<heartbeat_id>/
Return Data: None