coinbase / coinbase-java

Coinbase API v1 library for Java
Apache License 2.0
149 stars 98 forks source link

get[Sell|Buy]Quote commit not set #16

Closed vitchyr closed 9 years ago

vitchyr commented 9 years ago

I looked at the implementation of getSellQuote and getBuyQuote. I noticed that the commit parameter is not set. Is this done on purpose?

The server API reference for sell says, "Defaults to true. If set to false, this buy will not be immediately completed. Use the POST /transfers/:id/commit call to complete it"

I'm guessing right now it works because it's doing a GET rather than a POST. If that's the case, could the documentation be changed? At the moment, it just seems odd, or maybe I'm missing something. Thanks!

aianus commented 9 years ago

The commit parameter is part of the Transfer buy(Money amount, String paymentMethodId, Boolean commit) and Transfer sell(Money amount, String paymentMethodId, Boolean commit) methods.

getSellQuote and getBuyQuote are GET methods and don't support this parameter because they do not create a pending Transfer.

vitchyr commented 9 years ago

Ah, I see. I was confusing sell with sells. Thanks!