AlpacaElixir v0.1.4 Alpaca.Clock View Source

A resource that allows us to perform operations on an clock

An clock has the following methods we can call on it

get/0

The get/0 method allows us to serve the current market timestamp, whether or not the market is currently open, as well as the times of the next market open and close.

You can call it like so Alpaca.Clock.get()

Link to this section Summary

Functions

Retrieve the clock information now

Link to this section Functions

Specs

get() :: {:ok, map()} | {:error, map()}

Retrieve the clock information now

Example

iex> {:ok, %{timestamp: timestamp, is_open: is_open, next_open: next_open, next_close: next_close} = clock} = Alpaca.Clock.get()

Allows us to serve the current market timestamp, whether or not the market is currently open, as well as the times of the next market open and close.