coinbase-api

Coinbase API - Conversion Endpoint /conversions


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:

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


Solution

  • "You can’t do a conversion unless their values are linked, such as USDC-USD. What you are looking to do is a market buy of some type, I would suggest a limit order as you can specify price options."

    https://forums.coinbasecloud.dev/t/unable-to-successfully-convert-crypto-to-another-crypto/289