Finance::Bitcoin::Feed::Site::BtcChina -- the class that connect and fetch the bitcoin price data from site btcchina
use Finance::Bitcoin::Feed::Site::BtcChina; 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 BitStamp by protocol socket.io v2.2.2 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.
It will subscribe channel from the source site. You can subscribe more channels in the method "configure"
Finance::Bitcoin::Feed::Site
btcchina api
socket.io-parse
Mojo::UserAgent
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.