line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Finance::GDAX::API::UserAccount; |
2
|
|
|
|
|
|
|
our $VERSION = '0.02'; |
3
|
1
|
|
|
1
|
|
18984
|
use 5.20.0; |
|
1
|
|
|
|
|
4
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
20
|
|
5
|
1
|
|
|
1
|
|
390
|
use Moose; |
|
1
|
|
|
|
|
426290
|
|
|
1
|
|
|
|
|
7
|
|
6
|
1
|
|
|
1
|
|
9947
|
use Finance::GDAX::API; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
39
|
|
7
|
1
|
|
|
1
|
|
7
|
use namespace::autoclean; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
extends 'Finance::GDAX::API'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub trailing_volume { |
12
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
13
|
0
|
|
|
|
|
|
$self->method('GET'); |
14
|
0
|
|
|
|
|
|
$self->path('/users/self/trailing-volume'); |
15
|
0
|
|
|
|
|
|
return $self->send; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
19
|
|
|
|
|
|
|
1; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 NAME |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
Finance::GDAX::API::UserAccount - Account Info |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 SYNOPSIS |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
use Finance::GDAX::API::UserAccount; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
$account = Finance::GDAX::API::UserAccount->new; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
# List of trailing volume |
32
|
|
|
|
|
|
|
$trailing = $account->trailing_volume; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head2 DESCRIPTION |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
Returns a list of hashes, representing the Trailing Volume on the account. |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 METHODS |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head2 C<trailing_volume> |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
From the GDAX API: |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
This request will return your 30-day trailing volume for all |
45
|
|
|
|
|
|
|
products. This is a cached value that's calculated every day at |
46
|
|
|
|
|
|
|
midnight UTC. |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
[ |
49
|
|
|
|
|
|
|
{ |
50
|
|
|
|
|
|
|
"product_id": "BTC-USD", |
51
|
|
|
|
|
|
|
"exchange_volume": "11800.00000000", |
52
|
|
|
|
|
|
|
"volume": "100.00000000", |
53
|
|
|
|
|
|
|
"recorded_at": "1973-11-29T00:05:01.123456Z" |
54
|
|
|
|
|
|
|
}, |
55
|
|
|
|
|
|
|
{ |
56
|
|
|
|
|
|
|
"product_id": "LTC-USD", |
57
|
|
|
|
|
|
|
"exchange_volume": "51010.04100000", |
58
|
|
|
|
|
|
|
"volume": "2010.04100000", |
59
|
|
|
|
|
|
|
"recorded_at": "1973-11-29T00:05:02.123456Z" |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
] |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=cut |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 AUTHOR |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Mark Rushing <mark@orbislumen.net> |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
This software is copyright (c) 2017 by Home Grown Systems, SPC. |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
75
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=cut |
78
|
|
|
|
|
|
|
|