Skip to main content
GET
/
tools
/
alpaca
/
get_clock
{
  "provider": "<string>",
  "timestamp": "2023-11-07T05:31:56Z",
  "is_open": true,
  "next_open": "2023-11-07T05:31:56Z",
  "next_close": "2023-11-07T05:31:56Z",
  "provider_fields": {}
}

alpaca_get_clock

tools = trading.alpaca(
    api_key=os.environ["ALPACA_KEY"],
    api_secret=os.environ["ALPACA_SECRET"],
    model="openai",
    paper=True,
    minimal=True,
    include=["alpaca_get_clock"],
)
Options
  • include / exclude: filter which tools are exposed (use full names like alpaca_get_clock).
  • minimal: omit provider and provider_fields when True.
  • paper: use Alpaca paper trading instead of live trading.

Body

application/json

This is a request to obtain information. Your API keys are required.

Response

Clock (OpenTools trading schema).

provider
string | null

Trading provider identifier. Omitted when minimal=True.

timestamp
string<date-time> | null

Current provider timestamp at the time the clock was queried.

is_open
boolean | null

Whether the market is currently open.

next_open
string<date-time> | null

Timestamp of the next market open.

next_close
string<date-time> | null

Timestamp of the next market close.

provider_fields
object

Additional provider-specific fields. Omitted when minimal=True.