Author

Topic: Mt. Gox API problems (Read 1165 times)

newbie
Activity: 42
Merit: 0
June 19, 2011, 03:31:39 AM
#5
I finally found the solution, described here:
http://forum.bitcoin.org/index.php?topic=19077.msg242110#msg242110
full member
Activity: 140
Merit: 101
June 19, 2011, 02:02:28 AM
#4
I'm having the same problem, except that I get
Code:
{"error":"Not logged in. Log in<\/a>"}
which is a bit less reasonable than what you're getting.
newbie
Activity: 42
Merit: 0
June 18, 2011, 07:38:03 AM
#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 :-)
newbie
Activity: 11
Merit: 0
June 18, 2011, 07:34:12 AM
#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.
newbie
Activity: 42
Merit: 0
June 18, 2011, 07:27:48 AM
#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. Log in"}".
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.
Jump to: