Issue
Sorry for the newbie style Q, but curl isn't a strong point. Tradeogre's API docs say to use curl -u '{public}:{private}' But it always returns a 405
curl -u <key>:<secret> https://tradeogre.com/api/v1/account/balance
Is the public the key and the private the secret from my API keys?
Is the quotes or curly brackets needed?
I've tried with, without, double quotes, swapped keys around. Nothing seems to work. Just trying to get it working in bash for now.
Now I have gotten the non authenticated stuff to work just peachy.
Solution
405
means Method not allowed
means you're sending the wrong type of request - in your case you're sending a GET
request, where it should be a POST
request according to the documentation.
In your POST body, a field named currency
with an example value of BTC
is required.
Therefore your post request would look like:
curl -u <key>:<secret> -d "currency=BTC" -X POST https://tradeogre.com/api/v1/account/balance
The GET
endpoint is called /account/balances
;)
Answered By - maio290