line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Finance::Alpaca::Struct::Position 0.9902 { |
2
|
17
|
|
|
17
|
|
138
|
use strictures 2; |
|
17
|
|
|
|
|
157
|
|
|
17
|
|
|
|
|
784
|
|
3
|
17
|
|
|
17
|
|
4147
|
use feature 'signatures'; |
|
17
|
|
|
|
|
38
|
|
|
17
|
|
|
|
|
1521
|
|
4
|
17
|
|
|
17
|
|
107
|
no warnings 'experimental::signatures'; |
|
17
|
|
|
|
|
37
|
|
|
17
|
|
|
|
|
794
|
|
5
|
|
|
|
|
|
|
# |
6
|
17
|
|
|
17
|
|
124
|
use Type::Library 0.008 -base, -declare => qw[Position]; |
|
17
|
|
|
|
|
320
|
|
|
17
|
|
|
|
|
110
|
|
7
|
17
|
|
|
17
|
|
7950
|
use Type::Utils; |
|
17
|
|
|
|
|
37
|
|
|
17
|
|
|
|
|
110
|
|
8
|
17
|
|
|
17
|
|
26650
|
use Types::Standard qw[Bool Enum Int Num Ref Str]; |
|
17
|
|
|
|
|
41
|
|
|
17
|
|
|
|
|
145
|
|
9
|
17
|
|
|
17
|
|
24565
|
use Types::TypeTiny 0.004 StringLike => { -as => "Stringable" }; |
|
17
|
|
|
|
|
336
|
|
|
17
|
|
|
|
|
122
|
|
10
|
|
|
|
|
|
|
class_type Position, { class => __PACKAGE__ }; |
11
|
|
|
|
|
|
|
coerce( Position, from Ref() => __PACKAGE__ . q[->new($_)] ); |
12
|
|
|
|
|
|
|
# |
13
|
17
|
|
|
17
|
|
6229
|
use Moo; |
|
17
|
|
|
|
|
41
|
|
|
17
|
|
|
|
|
139
|
|
14
|
17
|
|
|
17
|
|
6637
|
use Types::UUID; |
|
17
|
|
|
|
|
40
|
|
|
17
|
|
|
|
|
163
|
|
15
|
17
|
|
|
17
|
|
6073
|
use lib './lib'; |
|
17
|
|
|
|
|
42
|
|
|
17
|
|
|
|
|
141
|
|
16
|
17
|
|
|
17
|
|
3048
|
use Finance::Alpaca::Types; |
|
17
|
|
|
|
|
41
|
|
|
17
|
|
|
|
|
150
|
|
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__ |