The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.


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


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

  use BitStamp::Socket;

  ... 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);
  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 ... #


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.


AnyEvent::Socket, AnyEvent::Handle


Jeff Anderson, <>


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.