Bitstamp API methods that require POST parameters are broken
andygrove opened this issue · 2 comments
andygrove commented
I tried placing an order with this code:
api.buy_market(Pair::BTC_USD, BigDecimal::from_str("0.001")
I get this error back from Bitstamp:
{"reason": String("Missing amount POST parameter"), "status": String("error")}
I looked at the code and I can see that buy_market
calls private_query
passing a params
map containing the amount
but the amount is not propagated in the actual HTTP request. It needs to be sent as a POST parameter.
andygrove commented
I was able to work around the issue by adding this in private_query
but this is a bit of a hack.
params.iter().for_each(|(k,v)| {
post_params.insert(k,v);
});