Author

Topic: Crypto X Change: "payload invalid" (Read 1421 times)

donator
Activity: 980
Merit: 1004
felonious vagrancy, personified
January 02, 2012, 03:55:55 PM
#8
Oh, that's assuming you did calculate the headers right of course - test with a balance query first.

As you can see in my original posting, I tested that.
donator
Activity: 980
Merit: 1004
felonious vagrancy, personified
January 02, 2012, 03:01:51 PM
#7
Have you tried emailing their support and asking instead of just posting here?

Yes, often.  I get much faster replies here.
donator
Activity: 980
Merit: 1004
felonious vagrancy, personified
January 02, 2012, 03:00:03 PM
#6
It's the order of parameters - it needs to be precisely the right order
well that's stupid

Yes, it is.  I'm using Apache HttpClient, which doesn't let me change the order of the parameters (since their order isn't supposed to matter, I'm guessing it stores them internally in an unsorted data structure like a hash table).

What am I supposed to do, roll my own HTTP implementation just so I can trade on CryptoXChange?

Not likely.
hero member
Activity: 560
Merit: 501
January 01, 2012, 12:09:41 PM
#5
It's the order of parameters - it needs to be precisely the right order
well that's stupid
sr. member
Activity: 243
Merit: 250
January 01, 2012, 12:02:12 PM
#4
The order of the POST parameters should not matter. Have you tried emailing their support and asking instead of just posting here?
hero member
Activity: 721
Merit: 503
January 01, 2012, 05:08:05 AM
#3
Oh, that's assuming you did calculate the headers right of course - test with a balance query first.
hero member
Activity: 721
Merit: 503
January 01, 2012, 05:07:09 AM
#2
It's the order of parameters - it needs to be precisely the right order
donator
Activity: 980
Merit: 1004
felonious vagrancy, personified
January 01, 2012, 12:37:25 AM
#1
Per the documentation here, I am sending:


  POST https://cryptoxchange.com/api/v0/account/placebid/
  amount=0.1&price=5.5&market=BTCUSD&stamp=1325395860020


I get back:


{
  "oid":"0",
  "bids":[],
  "ReturnCodes":3,
  "err":"payload invalid ",
  "stamp":""
}


I know I'm computing the cryptokey/cryptopayload headers and "stamp" properly because I can check my balance via the API.

The message "payload invalid" is pretty unhelpful.  CryptoXChange, please give more helpful error messages.

Curiously, if I omit any of the "amount", "price" or "market" fields it will complain that that field is missing instead of "payload invalid".
Jump to: