I'm trying to place an order using the GDAX api endpoints but keep getting a status 400 code with the only description "BadRequest".
parameters are below:
httpMethod is: "POST"
endpoint is: https://api.gdax.com/orders
JSON body is: { "product_id": BTC-USD, "stp": cn, "cancel_after": min, "post_only": 1, "time_in_force": GTC, "size": 1e-06, "side": buy, "type": limit, "price": 1000.01, "client_oid": e7CS7ju58TyH83HScLZnX+wdm8dMAMvZ93bGIlkP1Y= }
I've verified auth is working and the api is correctly handling other private requests such as returning account information but both market and limit orders are returning the 400 "BadRequest" error. Has anyone encountered this before? I've checked and double checked all the account information is correct and returning the proper information but still don't know what else could be causing this.
I ran into this earlier today and I think it's that GDAX is picky about the
client_oid
field (conveniently, poorly documented). To test, you can just leave it off and see if that works, but for me, I ended up having to use exactly UUID.randomUUID() (Java) without prefixing it or anything. It generates a random hexadecimal string containing a few-
s.I don't know what programming language you're using, but hopefully this is at least a pointer in the right direction.