Get Server Time
API Description
Retrieves the current server time from Bybit exchange. This endpoint is useful for synchronizing client applications with the exchange server time and can be used for timestamp validation.
HTTP Request
GET /v5/market/timeRequest Parameters
Parameter
Type
Required
Description
N/A
N/A
N/A
No parameters required
Response Parameters
Parameter
Type
Description
retCode
number
Return code
retMsg
string
Return message
result
object
Response data object
time
string
Server time in Unix timestamp format
Request Example
cURL
curl -X GET \
'https://api.synfutures.com/v5/market/time' \
-H 'Content-Type: application/json'JavaScript (Fetch)
const response = await fetch("https://api.synfutures.com/v5/market/time", {
method: "GET",
headers: {
"Content-Type": "application/json",
},
});
const data = await response.json();
console.log(data);Python (requests)
import requests
url = "https://api.synfutures.com/v5/market/time"
headers = {
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
result = response.json()
print(result)Response Example
Success Response
{
"retCode": 0,
"retMsg": "OK",
"result": {
"timeSecond": "1640995200",
"timeNano": "1640995200123456789"
},
"time": "1640995200123"
}Error Response
{
"retCode": 10001,
"retMsg": "Request parameter error",
"result": {},
"time": "1640995200123"
}Last updated