Bitcoin Forum
May 07, 2024, 11:43:04 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Mt. Gox API problems  (Read 1148 times)
de_bert (OP)
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile
June 18, 2011, 12:27:48 PM
 #1

Hi,

Unfortunately, I need to post this here as I'm considered a newbie.

I have a problem with the Mt. Gox trading API, namely with the buy and sell scripts:
Code:
https://www.mtgox.com/code/sellBTC.php?name=USERNAME&pass=PASS&amount=3&price=30
will give me "{"error": "Not logged in. <a href='/users/login'>Log in</a>"}".
A call to
Code:
https://mtgox.com/code/getOrders.php?name=USERNAME&pass=PASS
works, however.

It does not work in a browser, but it also does not work in JS:
Code:
$.ajax({
            type: 'POST',
            url: 'https://mtgox.com/code/sellBTC.php?name=USERNAME&pass=PASS&amount=' + numAmount + '&price=' + numPrice,
            dataType: 'json',
            data: {},
            success: this.onSellSuccess.bind(this, funCallback),
            error: this.onSellFailure.bind(this, funCallback)
        }); 
will not work either, yielding the same error.

As I found few people having the same problem and no answers, I'm wondering whether I'm doing something wrong....
Also Mt. Gox support did not answer my request for help.
1715082184
Hero Member
*
Offline Offline

Posts: 1715082184

View Profile Personal Message (Offline)

Ignore
1715082184
Reply with quote  #2

1715082184
Report to moderator
1715082184
Hero Member
*
Offline Offline

Posts: 1715082184

View Profile Personal Message (Offline)

Ignore
1715082184
Reply with quote  #2

1715082184
Report to moderator
1715082184
Hero Member
*
Offline Offline

Posts: 1715082184

View Profile Personal Message (Offline)

Ignore
1715082184
Reply with quote  #2

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

Posts: 1715082184

View Profile Personal Message (Offline)

Ignore
1715082184
Reply with quote  #2

1715082184
Report to moderator
you2
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile
June 18, 2011, 12:34:12 PM
 #2

Off Topic:
Are you sure you want to send the username and password not encrypted through an ajax request?
Anybody could read the source code in the browser.
de_bert (OP)
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile
June 18, 2011, 12:38:03 PM
 #3

Off Topic:
Are you sure you want to send the username and password not encrypted through an ajax request?
Anybody could read the source code in the browser.

It's just an example, it will of course support everyone's own login. It's still unencrypted, yes, but that's Mt. Gox's fault.
Also I would not give out a buy/sell interface to my account :-)
Ian Maxwell
Full Member
***
Offline Offline

Activity: 140
Merit: 100



View Profile WWW
June 19, 2011, 07:02:28 AM
 #4

I'm having the same problem, except that I get
Code:
{"error":"Not logged in. <a href='\/users\/login'>Log in<\/a>"}
which is a bit less reasonable than what you're getting.

Ian Maxwell
PGP key | WoT rating
de_bert (OP)
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile
June 19, 2011, 08:31:39 AM
 #5

I finally found the solution, described here:
http://forum.bitcoin.org/index.php?topic=19077.msg242110#msg242110
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!