Bitcoin Forum
July 29, 2024, 04:27:22 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Please help using Bitstamp APIs  (Read 1630 times)
withers (OP)
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
April 17, 2013, 07:07:24 PM
 #1

Hello,

Can someoone please help me get my account balance using the bitstamp api.

The apis are listed here https://www.bitstamp.net/api/

The account balance api is at this address https://www.bitstamp.net/api/balance/

But what is the url supposed to be? I think I can test the url in firefox.

So for example, in firefox i type https://www.bitstamp.net/api/ticker/ and it returns the correct results.

What is the address for my account balance? I've tried

https://www.bitstamp.net/api/balance/myUsername/myPassword

and

https://www.bitstamp.net/api/balance/?user=myUsername/?password=myPassword

but neither urls work.

Can anybody please shed some light? Many thanks in advance
wilfried
Sr. Member
****
Offline Offline

Activity: 288
Merit: 250


ManualMiner


View Profile
April 19, 2013, 10:09:04 PM
 #2

hy
bitstamp uses post, not get. you cant put post requests in ulr-field of a browser. either use a form or a script
url would be

https://www.bitstamp.net/api/balance?user:xxxx&password:xxxx
minzie
Member
**
Offline Offline

Activity: 110
Merit: 10



View Profile WWW
April 25, 2013, 10:56:36 PM
 #3

I was almost very happy... I have been trying a boilerplate jQuery ajax function that always works, and it is failing:
Code:
$.ajax ({
 type: "POST",
url: "https://www.bitstamp.net/api/balance/",
                                        data: { user:"999", password:"venomous_rat_regeneration" }
}).success( function(msg)
{
alert(msg);
}).error ( function( msg, e )
{
 var message;

for (property in msg) {
                                                           message += property + ":" + msg[property] + "\n";
                                                        }
 alert(message);
});

I also tried:
Code:
             $.post("https://www.bitstamp.net/api/balance", { user: "999", password: "venomous_rat_regeneration" })
             .done(function(msg) {
                     //alert("Data Loaded: " + data);
   var message;

   for (property in msg) {
                        message += property + ":" + msg[property] + "\n";
                     }

    alert(message);
             });

I expect to get a json object back that I can traverse like a normal javascript object, but I am getting an error object instead.

Professional Freelance Web Apps Engineer ° Portfolio °  ModoBot Automated Trading Platform ° BitThingy ° My Github  ° Skype: cclites_1
milo
Newbie
*
Offline Offline

Activity: 65
Merit: 0


View Profile
April 25, 2013, 11:02:58 PM
 #4

You can manually plink around with REST APIs in the Chrome browser using the Dev HTTP Client plugin for Chrome.  Highly recommended, great tool.  Get, Put, Post, content types, even automates creation of basic auth tokens.
minzie
Member
**
Offline Offline

Activity: 110
Merit: 10



View Profile WWW
April 26, 2013, 10:35:53 AM
 #5

I don't understand how that solves anything.

Professional Freelance Web Apps Engineer ° Portfolio °  ModoBot Automated Trading Platform ° BitThingy ° My Github  ° Skype: cclites_1
bitcoin-index
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
April 26, 2013, 12:16:32 PM
 #6

I wish I could figure out APIs.  They seem like they would be a lot of fun.
minzie
Member
**
Offline Offline

Activity: 110
Merit: 10



View Profile WWW
April 26, 2013, 06:31:44 PM
 #7

I can't get it to work using curl either, which is how I am retrieving the ticker. Weird.

Professional Freelance Web Apps Engineer ° Portfolio °  ModoBot Automated Trading Platform ° BitThingy ° My Github  ° Skype: cclites_1
minzie
Member
**
Offline Offline

Activity: 110
Merit: 10



View Profile WWW
April 27, 2013, 12:49:20 PM
 #8

Sorry for the double post, and I realize I am probably helping nobody, but I figured out my issue, and I didn't want to leave this thread incomplete. I did not have my account set to allow API access.  Undecided

Professional Freelance Web Apps Engineer ° Portfolio °  ModoBot Automated Trading Platform ° BitThingy ° My Github  ° Skype: cclites_1
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!