Skip to content
Get started

Get Clock

CalendarGetClockResponse v1().calendar().getClock(CalendarGetClockParamsparams = CalendarGetClockParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/v1/clock

Returns the current server time in UTC.

ParametersExpand Collapse
CalendarGetClockParams params
ReturnsExpand Collapse
class CalendarGetClockResponse:

Current server time and market clock information

LocalDateTime clock

Current server time in UTC

formatdate-time

Get Clock

package com.clear_street.api.example;

import com.clear_street.api.client.ClearStreetClient;
import com.clear_street.api.client.okhttp.ClearStreetOkHttpClient;
import com.clear_street.api.models.v1.calendar.CalendarGetClockParams;
import com.clear_street.api.models.v1.calendar.CalendarGetClockResponse;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        ClearStreetClient client = ClearStreetOkHttpClient.builder()
            .fromEnv()
            .apiKey("My API Key")
            .build();

        CalendarGetClockResponse response = client.v1().calendar().getClock();
    }
}
{
  "data": {
    "clock": "2025-03-01T03:35:00.000000000Z"
  },
  "error": null,
  "metadata": {
    "request_id": "1b2c3d4e-5f6a-7b8c-9d0e-1f2a3b4c5d6e"
  }
}
Returns Examples
{
  "data": {
    "clock": "2025-03-01T03:35:00.000000000Z"
  },
  "error": null,
  "metadata": {
    "request_id": "1b2c3d4e-5f6a-7b8c-9d0e-1f2a3b4c5d6e"
  }
}