lib/Finance/GDAX/API/UserAccount.pm

filter: Statementstmt 81.8% 18 / 22 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 5 / 6 Podpod 100% 1 / 1 totaltotal 82.7% 24 / 29 CC 1 SCAR 1.5
CC
1
Cov
82%
trailing_volume
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« lib/Finance/GDAX/API/PaymentMethod.pm ↑ Summary lib/Finance/GDAX/API/Quote.pm »
1 package Finance::GDAX::API::UserAccount;
2 1 our $VERSION = '0.02';
3 1 ▶use 5.20.0;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use Finance::GDAX::API;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 extends 'Finance::GDAX::API';
10  
11 sub trailing_volume {
12 0 ▶ my $self = shift;
Subroutine trailing_volume: not called CC=1 SCAR=6.9
Pod documented
13 0 $self->method('GET');
14 0 $self->path('/users/self/trailing-volume');
15 0 return $self->send;
16 }
17  
18 1 __PACKAGE__->meta->make_immutable;
19 1 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  
« lib/Finance/GDAX/API/PaymentMethod.pm ↑ Summary lib/Finance/GDAX/API/Quote.pm »