Bitcoin Forum
December 03, 2016, 07:48:31 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: MtGox API Perl module  (Read 4751 times)
mndrix
Michael Hendricks
VIP
Sr. Member
*
Offline Offline

Activity: 447


View Profile
February 09, 2011, 10:44:19 PM
 #1

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.
1480794511
Hero Member
*
Offline Offline

Posts: 1480794511

View Profile Personal Message (Offline)

Ignore
1480794511
Reply with quote  #2

1480794511
Report to moderator
1480794511
Hero Member
*
Offline Offline

Posts: 1480794511

View Profile Personal Message (Offline)

Ignore
1480794511
Reply with quote  #2

1480794511
Report to moderator
1480794511
Hero Member
*
Offline Offline

Posts: 1480794511

View Profile Personal Message (Offline)

Ignore
1480794511
Reply with quote  #2

1480794511
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1480794511
Hero Member
*
Offline Offline

Posts: 1480794511

View Profile Personal Message (Offline)

Ignore
1480794511
Reply with quote  #2

1480794511
Report to moderator
1480794511
Hero Member
*
Offline Offline

Posts: 1480794511

View Profile Personal Message (Offline)

Ignore
1480794511
Reply with quote  #2

1480794511
Report to moderator
Cryptoman
Hero Member
*****
Offline Offline

Activity: 728



View Profile
February 09, 2011, 10:58:16 PM
 #2

Excellent.  Thanks for releasing this.  Are you going to put a mention in the wiki?

"A small body of determined spirits fired by an unquenchable faith in their mission can alter the course of history." --Gandhi
mndrix
Michael Hendricks
VIP
Sr. Member
*
Offline Offline

Activity: 447


View Profile
February 09, 2011, 11:31:09 PM
 #3

Excellent.  Thanks for releasing this.  Are you going to put a mention in the wiki?

Good idea.  I've mentioned it on the MtGox page on the wiki.
BioMike
Legendary
*
Offline Offline

Activity: 1256


View Profile
April 18, 2011, 05:30:32 AM
 #4

I'm building a similar lib in python (hope to release that soon), but I have a question about placing an order and seeing if it got filled when I have multiple orders in my order list. Do I need to iterate through the whole list to see which orders got filled and which didn't?

Wouldn't it be more nice to have a transaction history with timestamps?
seanadams
Newbie
*
Offline Offline

Activity: 4


View Profile
May 17, 2011, 10:05:13 PM
 #5

I got this error:
Code:
Error GETing https://mtgox.com/code/data/getDepth.php: read failed:  at /usr/local/share/perl/5.10.0/Finance/MtGox.pm line 74

Fixed by changing both URLs to https://www.mtgox.com/.....

I think the problem with using just mtgox.com is the certificate won't match the hostname.
beppu
Newbie
*
Offline Offline

Activity: 4


View Profile
May 30, 2011, 06:53:44 AM
 #6

Damn, I should have searched the forum (and CPAN) before I made WebService::MtGox.

http://forum.bitcoin.org/index.php?topic=10125.0

I actually did search for 'bitcoin' at http://search.cpan.org/ and nothing MtGox-related showed up, so that's why I coded WebService::MtGox.  Had I known you already had this covered, I wouldn't have done my version.

You really need to have the word "bitcoin" somewhere in your documentation.
mndrix
Michael Hendricks
VIP
Sr. Member
*
Offline Offline

Activity: 447


View Profile
October 07, 2011, 08:28:43 PM
 #7

I've updated Finance::MtGox to version 0.02.  This version supports MtGox's new authenticated API requests (the API known as "v0").  It doesn't yet support multiple currencies.

beppu, I've made a note for the next release to include the word "bitcoin" in the CPAN docs.

seanadams, I'm not able to reproduce the certificate problem you saw.  That might have been related to some DNS issues MtGox had around the time you posted.
mndrix
Michael Hendricks
VIP
Sr. Member
*
Offline Offline

Activity: 447


View Profile
November 11, 2011, 04:48:34 PM
 #8

I've released Finance::MtGox version 0.03.  The biggest change is a patch from shockdiode to reduce memory usage when using the module in a long-running process.  There are also some minor cosmetic clean ups.

It should hit your favorite CPAN mirror shortly.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!