Coinbase API - Conversion Endpoint /conversions

Viewed 179

After plenty of late nights and head scratching I have navigated the murky world of the 'Coinbase Pro API' and integrated it with a new trading app I have made. I have hit a snag however and am baffled as to why. Had a snoop around all the usual 'Google' hotspots and I can find similar questions but no answers. I hope someone can help?!

Simply put I want to do a conversion, see the seemingly simple endpoint to do so:

https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postconversion https://api.exchange.coinbase.com/conversions

Now; it's not an authentication issue etc. As mentioned, I have the API fully working in my app, accounts, orders, ticker etc, all no problem. Just conversions I have an issue with. I am posting the relevant variables as suggested:

Example:

{"to":"ETH","amount":"50.00","from":"BTC","profile_id":"my_profile_id"}

No matter what currencies I try, the response is always the same:

{"message":"Cannot convert BTC to ETH"}

With different coin ID's of course.

Full on drawing a blank here! Kind of a useless output from Coinbase?

I'd love to know if anyone has cracked this?

Thanks

Pete

3 Answers

Understood and thank you. After some back and forth with Coinbase support I found while conversion is possible in app, fee free, in API it’s an order with the relevant fees. A little frustrating but hopefully they will allow API conversion fee free soon

"You can’t do a conversion unless their values are linked, such as USDC-USD. How to determine if a conversion is linked, I'm not following this answer.

Is this what you mean?

{"to":"ETH-USD","amount":"50.00","from":"BTC-USD","profile_id":"my_profile_id"}

Related