I've released Finance::MtGox
which is a Perl interface for the MtGox API. It's available from the CPAN
and on GitHub
. It's basically the code I use in CoinPal
factored out to a module so that I can reuse it in some upcoming projects.
One of my favorite features is a method for finding the market clearing rate. A couple examples:
$rate = $mtgox->clearing_rate( 'asks', 20, 'BTC' ); # rate to buy 20 BTC
$rate = $mtgox->clearing_rate( 'bids', 42, 'USD' ); # rate to sell 42 USD worth of BTC
The code is licensed under the MIT license.