Pages:
Author

Topic: mtgox API - page 2. (Read 5946 times)

newbie
Activity: 29
Merit: 0
April 08, 2011, 04:48:41 AM
#6
www.mtgox.com gives the same error  Huh

Code:
* About to connect() to www.mtgox.com port 443 (#0)
*   Trying 69.64.54.59... connected
* Connected to www.mtgox.com (69.64.54.59) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: none
  CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* Unknown SSL protocol error in connection to www.mtgox.com:443
* Closing connection #0
curl: (35) Unknown SSL protocol error in connection to www.mtgox.com:443
legendary
Activity: 1288
Merit: 1080
April 07, 2011, 05:28:27 PM
#5
It should be a post.
I used to have a script mtgox.sh for that:
curl -d `cat credentials` https://mtgox.com/code/${1}.php

where the file credentials would contain:
name=username&pass=password

so you could do:
mtgox.sh getFunds

But lately, my script stopped working with:
curl: (35) Unknown SSL protocol error in connection to mtgox.com:443

I tried looking into it, but it didn't seem to work,
no matter if i change protocol version --sslv2 or use the --no-sessionid option,
which people suggested when this error occurs.

I guess mtgox SSL requirements changed somehow...

HAve you tried with www.mtgox.com instead of just mtgox.com?  I think there is an issue about that.
legendary
Activity: 1288
Merit: 1080
April 07, 2011, 05:23:12 PM
#4

Indeed, I could connect with a command like:

$ read -s passwd ; wget -q --no-check-certificate --no-proxy -O - "https://www.mtgox.com/code/getFunds.php" --post-data="name=grondilu&pass=$passwd"

And I had my JSON string:

{"usds":0,"btcs":0}

This is pretty cool.
newbie
Activity: 29
Merit: 0
April 07, 2011, 05:21:08 PM
#3
It should be a post.
I used to have a script mtgox.sh for that:
curl -d `cat credentials` https://mtgox.com/code/${1}.php

where the file credentials would contain:
name=username&pass=password

so you could do:
mtgox.sh getFunds

But lately, my script stopped working with:
curl: (35) Unknown SSL protocol error in connection to mtgox.com:443

I tried looking into it, but it didn't seem to work,
no matter if i change protocol version --sslv2 or use the --no-sessionid option,
which people suggested when this error occurs.

I guess mtgox SSL requirements changed somehow...
vip
Activity: 447
Merit: 258
April 07, 2011, 05:14:01 PM
#2
I'm guessing they show URL parameters as shorthand notation, since POST was specified elsewhere in the documentation.
legendary
Activity: 1288
Merit: 1080
April 07, 2011, 05:06:53 PM
#1

MtGox API is weird.

They say we should authenticate by sending or login and password via POST method, but they give an example where they are in URL:

https://mtgox.com/code/getFunds.php?name=blah&pass=blah

I don't get it.  It data is in URL, isn't that GET method?
Pages:
Jump to: