line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Finance::Alpaca::Struct::Position 0.9902 { |
2
|
1
|
|
|
1
|
|
7
|
use strictures 2; |
|
1
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
43
|
|
3
|
1
|
|
|
1
|
|
225
|
use feature 'signatures'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
80
|
|
4
|
1
|
|
|
1
|
|
5
|
no warnings 'experimental::signatures'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
43
|
|
5
|
|
|
|
|
|
|
# |
6
|
1
|
|
|
1
|
|
6
|
use Type::Library 0.008 -base, -declare => qw[Position]; |
|
1
|
|
|
|
|
15
|
|
|
1
|
|
|
|
|
7
|
|
7
|
1
|
|
|
1
|
|
444
|
use Type::Utils; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
7
|
|
8
|
1
|
|
|
1
|
|
1593
|
use Types::Standard qw[Bool Enum Int Num Ref Str]; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
9
|
1
|
|
|
1
|
|
1361
|
use Types::TypeTiny 0.004 StringLike => { -as => "Stringable" }; |
|
1
|
|
|
|
|
16
|
|
|
1
|
|
|
|
|
8
|
|
10
|
|
|
|
|
|
|
class_type Position, { class => __PACKAGE__ }; |
11
|
|
|
|
|
|
|
coerce( Position, from Ref() => __PACKAGE__ . q[->new($_)] ); |
12
|
|
|
|
|
|
|
# |
13
|
1
|
|
|
1
|
|
391
|
use Moo; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
5
|
|
14
|
1
|
|
|
1
|
|
359
|
use Types::UUID; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
8
|
|
15
|
1
|
|
|
1
|
|
379
|
use lib './lib'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
16
|
1
|
|
|
1
|
|
149
|
use Finance::Alpaca::Types; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
17
|
|
|
|
|
|
|
has asset_id => ( is => 'ro', isa => Uuid, required => 1 ); |
18
|
|
|
|
|
|
|
has [qw[asset_class symbol]] => ( is => 'ro', isa => Str, required => 1 ); |
19
|
|
|
|
|
|
|
has exchange => |
20
|
|
|
|
|
|
|
( is => 'ro', isa => Enum [qw[AMEX ARCA BATS NYSE NASDAQ NYSEARCA OTC]], required => 1 ); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
has [ |
23
|
|
|
|
|
|
|
qw[avg_entry_price change_today cost_basis current_price lastday_price market_value qty unrealized_intraday_pl unrealized_intraday_plpc unrealized_pl unrealized_plpc] |
24
|
|
|
|
|
|
|
] => ( is => 'ro', isa => Num, required => 1 ); |
25
|
|
|
|
|
|
|
has side => ( is => 'ro', isa => Enum [qw[long short]], required => 1 ); |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
1; |
29
|
|
|
|
|
|
|
__END__ |