Finance::GDAX::API::Quote - Get a quote from the GDAX
use Finanace::GDAX::API::Quote; my $quote = Finance::GDAX::API::Quote->new(product => 'BTC-USD')->get; say $$quote{price}; say $$quote{bid}; say $$quote{ask};
Gets a quote from the GDAX for the specified "product". These quotes do not require GDAX API keys, but they suggesting keeping traffic low.
More detailed information can be retrieve about products and history using API keys with other classes like Finance::GDAX::API::Product
Currently, the supported products are:
BTC-USD BTC-GBP BTC-EUR ETH-BTC ETH-USD LTC-BTC LTC-USD ETH-EUR
These are not hard-coded, but the default is BTC-USD, so if any are added by GDAX in the future, it should work find if you can find the product code.
Quote is returned as a hashref with the (currently) following keys:
trade_id price size bid ask volume time
debug
Bool that sets debug mode (will use sandbox). Defaults to true (1). Debug mode does not seem to give real quotes.
product
The product code for which to return the quote.
get
Returns a quote for the desired product.
Mark Rushing <mark@orbislumen.net>
This software is copyright (c) 2017 by Home Grown Systems, SPC.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Finance::GDAX::API, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Finance::GDAX::API
CPAN shell
perl -MCPAN -e shell install Finance::GDAX::API
For more information on module installation, please visit the detailed CPAN module installation guide.