line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Finance::Robinhood::Forex::Halt; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=encoding utf-8 |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=for stopwords watchlist watchlists untradable urls |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 NAME |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
Finance::Robinhood::Forex::Halt - Represents a Single Forex/Crypto Trade Halt |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 SYNOPSIS |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
use Finance::Robinhood; |
14
|
|
|
|
|
|
|
my $rh = Finance::Robinhood->new; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
# TODO |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=cut |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
our $VERSION = '0.92_003'; |
21
|
1
|
|
|
1
|
|
4216
|
use Mojo::Base-base, -signatures; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
13
|
|
22
|
1
|
|
|
1
|
|
303
|
use Mojo::URL; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
9
|
|
23
|
1
|
|
|
1
|
|
30
|
use Time::Moment; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
154
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub _test__init { |
26
|
1
|
|
|
1
|
|
8386
|
my $rh = t::Utility::rh_instance(1); |
27
|
0
|
|
|
|
|
0
|
my $halt = $rh->forex_halts->current; |
28
|
0
|
|
|
|
|
0
|
isa_ok($halt, __PACKAGE__); |
29
|
0
|
|
|
|
|
0
|
t::Utility::stash('HALT', $halt); # Store it for later |
30
|
|
|
|
|
|
|
} |
31
|
1
|
|
|
1
|
|
20
|
use overload '""' => sub ($s, @) { $s->{id} }, fallback => 1; |
|
1
|
|
|
0
|
|
7
|
|
|
1
|
|
|
|
|
11
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub _test_stringify { |
34
|
1
|
|
50
|
1
|
|
1864
|
t::Utility::stash('HALT') // skip_all(); |
35
|
0
|
|
|
|
|
0
|
like(+t::Utility::stash('HALT'), |
36
|
|
|
|
|
|
|
qr'^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$'i |
37
|
|
|
|
|
|
|
); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
# |
40
|
|
|
|
|
|
|
has _rh => undef => weak => 1; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 METHODS |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head2 C |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Returns a boolean value which indicates whether or not this halt is currently |
47
|
|
|
|
|
|
|
active. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head2 C |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head2 C |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
Returns a Time::Moment object if defined. |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head2 C |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
Returns a UUID. |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head2 C |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
If defined, this returns a text string suited for display. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head2 C |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
One of the following: C, C, or C. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head2 C |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
Returns a Time::Moment object. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head2 C |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
One of the following: C, C, C, and C. |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=cut |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
has ['active', 'pair_id', 'id', 'reason', 'reason_code', 'state']; |
79
|
|
|
|
|
|
|
|
80
|
0
|
|
|
0
|
1
|
0
|
sub start_at ($s) { |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
81
|
0
|
|
|
|
|
0
|
Time::Moment->from_string($s->{start_at}); |
82
|
|
|
|
|
|
|
} |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
sub _test_start_at { |
85
|
1
|
|
50
|
1
|
|
1835
|
t::Utility::stash('HALT') // skip_all(); |
86
|
0
|
|
|
|
|
0
|
isa_ok(t::Utility::stash('HALT')->start_at, 'Time::Moment'); |
87
|
|
|
|
|
|
|
} |
88
|
|
|
|
|
|
|
|
89
|
0
|
|
|
0
|
1
|
0
|
sub end_at ($s) { |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
90
|
0
|
|
0
|
|
|
0
|
$s->{end_at} // return (); |
91
|
0
|
|
|
|
|
0
|
Time::Moment->from_string($s->{end_at}); |
92
|
|
|
|
|
|
|
} |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
sub _test_end_at { |
95
|
1
|
|
50
|
1
|
|
2183
|
t::Utility::stash('HALT') // skip_all(); |
96
|
0
|
|
|
|
|
|
isa_ok(t::Utility::stash('HALT')->end_at, 'Time::Moment'); |
97
|
|
|
|
|
|
|
} |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head1 LEGAL |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
This is a simple wrapper around the API used in the official apps. The author |
102
|
|
|
|
|
|
|
provides no investment, legal, or tax advice and is not responsible for any |
103
|
|
|
|
|
|
|
damages incurred while using this software. This software is not affiliated |
104
|
|
|
|
|
|
|
with Robinhood Financial LLC in any way. |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
For Robinhood's terms and disclosures, please see their website at |
107
|
|
|
|
|
|
|
https://robinhood.com/legal/ |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=head1 LICENSE |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
Copyright (C) Sanko Robinson. |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify it under |
114
|
|
|
|
|
|
|
the terms found in the Artistic License 2. Other copyrights, terms, and |
115
|
|
|
|
|
|
|
conditions may apply to data transmitted through this module. Please refer to |
116
|
|
|
|
|
|
|
the L section. |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=head1 AUTHOR |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
Sanko Robinson Esanko@cpan.orgE |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=cut |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
1; |