« blib/lib/Finance/GDAX/API/CoinbaseAccount.pm
↑ Summary
blib/lib/Finance/GDAX/API/PaymentMethod.pm »
| 1 | package Finance::GDAX::API::Currency; | ||
| 2 | our $VERSION = '0.01'; | ||
| 3 | use 5.20.0; | ||
| 4 | use warnings; | ||
| 5 | use Moose; | ||
| 6 | use Finance::GDAX::API; | ||
| 7 | use namespace::autoclean; | ||
| 8 | |||
| 9 | extends 'Finance::GDAX::API'; | ||
| 10 | |||
| 11 | sub list { | ||
| 12 | my $self = shift; | ||
| 13 | $self->method('GET'); | ||
| 14 | $self->path('/currencies'); | ||
| 15 | return $self->send; | ||
| 16 | } | ||
| 17 | |||
| 18 | __PACKAGE__->meta->make_immutable; | ||
| 19 | 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 |