The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

BitStamp::Socket - Perl extension for connecting to the BitStamp exchange socket through the Pusher service.

SYNOPSIS

  # this will dump the socket messages to the terminal...

  use BitStamp::Socket;
  BitStamp::Socket->new->go;

  ... or just type this at the command prompt:

  $ perl -e 'use base qw(BitStamp::Socket); main->new->go'

  =======================
  But instead do this:
  =======================

  use base qw(BitStamp::Socket);
  main->new->go;
  
  sub order_book {
      my $self = shift;
      my $data = shift;
      # I just got new order book socket data
      # ... your code goes here ... #
  }

  sub trade {
      my $self = shift;
      my $data = shift;
      # I just got new trade socket data
      # ... your code goes here ... #
  }

DESCRIPTION

The BitStamp socket is the fastest any most bandwidth efficient way to maintain your own up to date tracking of all trades and market changes.

This module will save you some time since the connection and communication negotiations are done for you. All you need to do is write the code to handle the messages. For example: to store into a database.

SEE ALSO

AnyEvent::Socket, AnyEvent::Handle

AUTHOR

Jeff Anderson, <peawormsworth@gmail.com>

COPYRIGHT AND LICENSE

Copyright (C) 2014 by Jeff Anderson

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.2 or, at your option, any later version of Perl 5 you may have available.