Finance::Bitcoin::Feed::Site::Hitbtc -- the class that connect and fetch the bitcoin price data from site hitbtc
use Finance::Bitcoin::Feed::Site::Hitbtc; use AnyEvent; my $obj = Finance::Bitcoin::Feed::Site::BtcChina->new(); # listen on the event 'output' to get the adata $obj->on('output', sub { shift; say @_ }); $obj->go(); # dont forget this AnyEvent->condvar->recv;
Connect to site Hitbtc by protocol websocket and fetch the bitcoin price data.
This class inherits all events from Finance::Bitcoin::Feed::Site and add some new ones. The most important event is 'output'.
It will be emit by its parent class when print out the data. You can listen on this event to get the output.
Finance::Bitcoin::Feed::Site
Mojo::UserAgent
hitbtc
Chylli <chylli@binary.com>
<chylli@binary.com>
To install Finance::Bitcoin::Feed, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Finance::Bitcoin::Feed
CPAN shell
perl -MCPAN -e shell install Finance::Bitcoin::Feed
For more information on module installation, please visit the detailed CPAN module installation guide.