30 Apr 2021 22:56:50 UTC
- Distribution: Finance-Alpaca
- Module version: 0.9902
- Source (raw)
- Browse (raw)
- How to Contribute
- Testers (44 / 57 / 10)
- KwaliteeBus factor: 1
- 80.44% Coverage
- License: artistic_2
- Perl: v5.22.0
- Activity24 month
- Download (39.39KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionSANKO Sanko Robinson
Finance::Alpaca::Struct::Clock - A Single Clock Object
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 ';
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.
The following properties are contained in the object.
timestamp- Current timestamp
is_open- Boolean value indicating whether or not the market is open
next_open- Next market open timestamp
next_close- Next market close timestamp
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.
Sanko Robinson <email@example.com>
Module Install Instructions
To install Finance::Alpaca, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Finance::Alpaca
For more information on module installation, please visit the detailed CPAN module installation guide.