| 1 | package Finance::GDAX::API::Currency; | ||
| 2 | 1 | our $VERSION = '0.01'; | |
| 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 list { | ||
| 12 | 0 | ▶ | my $self = shift; |
|
Subroutine
list: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 13 | 0 | $self->method('GET'); | |
| 14 | 0 | $self->path('/currencies'); | |
| 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::Currency - Currencies | ||
| 24 | |||
| 25 | =head1 SYNOPSIS | ||
| 26 | |||
| 27 | use Finance::GDAX::API::Currency; | ||
| 28 | |||
| 29 | $currency = Finance::GDAX::API::Currency->new; | ||
| 30 | |||
| 31 | # List all currencies | ||
| 32 | $currencies = $currency->list; | ||
| 33 | |||
| 34 | =head2 DESCRIPTION | ||
| 35 | |||
| 36 | Work with GDAX currencies. | ||
| 37 | |||
| 38 | =head1 METHODS | ||
| 39 | |||
| 40 | =head2 C<list> | ||
| 41 | |||
| 42 | From the GDAX API: | ||
| 43 | |||
| 44 | Returns an array of hashes of known currencies. | ||
| 45 | |||
| 46 | Currency Codes | ||
| 47 | |||
| 48 | Currency codes will conform to the ISO 4217 standard where | ||
| 49 | possible. Currencies which have or had no representation in ISO 4217 | ||
| 50 | may use a custom code. | ||
| 51 | |||
| 52 | [{ | ||
| 53 | "id": "BTC", | ||
| 54 | "name": "Bitcoin", | ||
| 55 | "min_size": "0.00000001" | ||
| 56 | }, { | ||
| 57 | "id": "USD", | ||
| 58 | "name": "United States Dollar", | ||
| 59 | "min_size": "0.01000000" | ||
| 60 | }] | ||
| 61 | |||
| 62 | =cut | ||
| 63 | |||
| 64 | |||
| 65 | =head1 AUTHOR | ||
| 66 | |||
| 67 | Mark Rushing <mark@orbislumen.net> | ||
| 68 | |||
| 69 | =head1 COPYRIGHT AND LICENSE | ||
| 70 | |||
| 71 | This software is copyright (c) 2017 by Home Grown Systems, SPC. | ||
| 72 | |||
| 73 | This is free software; you can redistribute it and/or modify it under | ||
| 74 | the same terms as the Perl 5 programming language system itself. | ||
| 75 | |||
| 76 | =cut | ||
| 77 | |||