NAME
Finance::Alpaca::Struct::Clock - A Single Clock Object
SYNOPSIS
use Finance::Alpaca;
my $clock = Finance::Alpaca->new( ... )->clock;
say sprintf $clock->timestamp->strftime('It is %l:%M:%S %p on a %A and the market is %%sopen!'),
$clock->is_open ? '' : 'not ';
DESCRIPTION
The clock endpoint serves the current market timestamp, whether or not the market is currently open, as well as the times of the next market open and close.
Properties
The following properties are contained in the object.
$clock->is_open( );
timestamp
- Current timestampis_open
- Boolean value indicating whether or not the market is opennext_open
- Next market open timestampnext_close
- Next market close timestamp
LICENSE
Copyright (C) Sanko Robinson.
This library is free software; you can redistribute it and/or modify it under the terms found in the Artistic License 2. Other copyrights, terms, and conditions may apply to data transmitted through this module.
AUTHOR
Sanko Robinson <sanko@cpan.org>