Title: newbi mtgox API help, basic php Post by: BitvoinVender on April 15, 2013, 07:59:58 PM just started accepting btc donations on my site.
right now its just getting stored on mtgox so It can keep a portion in dollars. I want to set up a "getinfo" so I can see how much is in my account. And Eventually set up an automated monthly withdrawl of bitcoin to a offline wallet. I found a github of what looks like a simple php mtgox api class https://github.com/Someguy123/MtGOX-PHP-API here is my code so far Code: <?php for refece the function im trying to call too is Code: function getInfo() { thanks Title: Re: newbi mtgox API help, basic php Post by: cmp on April 15, 2013, 08:03:03 PM Look at the API code here: https://en.bitcoin.it/wiki/MtGox/API/HTTP#PHP
I think it's easier to understand. The Gox.class is using this code. Title: Re: newbi mtgox API help, basic php Post by: BitvoinVender on April 15, 2013, 08:07:28 PM ohh wow, yea that worked much better. just entered my API info and got my var_dump
Im going to be trying to set up a withdrawal now and see If I run into any trouble. Title: Re: newbi mtgox API help, basic php Post by: BitvoinVender on April 15, 2013, 09:24:55 PM im stuck!
I take it this is an old API Code: // old api (get funds) I found a new class for v1 https://github.com/daftspunk/php-mtgox-v1 this is what I got so far. Code: <?php http://25.media.tumblr.com/tumblr_lsxtglsUrC1qmhv2lo1_500.jpg Title: Re: newbi mtgox API help, basic php Post by: BitvoinVender on April 16, 2013, 03:54:44 AM bump :-[
Title: Re: newbi mtgox API help, basic php Post by: OdinHephaestus on April 16, 2013, 03:57:44 AM Code: <?php You need to include the file, before you can call the class. Title: Re: newbi mtgox API help, basic php Post by: BitvoinVender on April 16, 2013, 06:19:52 AM im useing the newer API v1 then that original post.
this is an example useing the class https://github.com/daftspunk/php-mtgox-v1/blob/master/examples/dirty_daytrader.php why I tried the 3 includes include '../mtgox_api_base.php'; include '../mtgox_private_api.php'; include '../mtgox_public_api.php'; not a withdrawl in their :/ simply trying to call to this function Code: // Send bitcoins from your account to a bitcoin address. Title: Re: newbi mtgox API help, basic php Post by: BitvoinVender on April 16, 2013, 07:31:09 AM I got it to connect;
Code: $history = $api->get_wallet_history('USD'); dumps my history yet, still trying to figure out withdrawls Code: include ("mtgox_api_base.php"); assume amount is in satoshi? Im not even getting an error or anything, just a white page with the "test" showing |