Skip to content
Get started

Get Clock

client.V1.Calendar.GetClock(ctx) (*V1CalendarGetClockResponse, error)
GET/v1/clock

Returns the current server time in UTC.

ReturnsExpand Collapse
type V1CalendarGetClockResponse struct{…}

Current server time and market clock information

Clock Time

Current server time in UTC

formatdate-time

Get Clock

package main

import (
  "context"
  "fmt"

  "github.com/clear-street/clear-street-go"
  "github.com/clear-street/clear-street-go/option"
)

func main() {
  client := clearstreet.NewClient(
    option.WithAPIKey("My API Key"),
  )
  response, err := client.V1.Calendar.GetClock(context.TODO())
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response)
}
{
  "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"
  }
}