Bitcoin Forum
December 10, 2016, 08:54:53 PM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Mt. Gox API problems  (Read 953 times)
de_bert
Jr. Member
*
Offline Offline

Activity: 42


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

Posts: 1481403293

View Profile Personal Message (Offline)

Ignore
1481403293
Reply with quote  #2

1481403293
Report to moderator
1481403293
Hero Member
*
Offline Offline

Posts: 1481403293

View Profile Personal Message (Offline)

Ignore
1481403293
Reply with quote  #2

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

Posts: 1481403293

View Profile Personal Message (Offline)

Ignore
1481403293
Reply with quote  #2

1481403293
Report to moderator
you2
Newbie
*
Offline Offline

Activity: 12


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.

How to access ALL file hoster with just one account? With the file hoster proxy leech.io! (http://www.leech.io/) -- Accepting bitcoins!
de_bert
Jr. Member
*
Offline Offline

Activity: 42


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



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

Activity: 42


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:  

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!