Getting 400 error in "Conversion" coinbase pro api

Hi I am trying to hit POST request on https://api.exchange.coinbase.com/conversions API but getting Cannot convert ETH to BTC.
I wanted to know if there is something I have done wrong or does the API doesn’t support it.
It would be really helpful if somebody guide me in this regard

Hello @salman116. Welcome to Coinbase Cloud Developer Forum! We appreciate your interest in our Coinbase APIs.

We understand that you are receiving a 400 status code error whenever you try to convert ETH to BTC. This is because the /conversions endpoint only works for scenarios wherein you want to convert crypto to fiat or vice versa. Hence, this endpoint is not applicable for crypto to crypto conversions. However, as of now, this API endpoint only supports the USDC <-> USD pair.

On the other hand, if you want to convert crypto to crypto, we believe you can utilize the /orders endpoint since it supports the ETH-BTC pair. You may confirm this by pushing a GET request to https://api.exchange.coinbase.com/products/ETH-BTC.

We hope we were able to help you with your concern. Thank you!

2 Likes

Hello @LaRisa so what will be the flow
if we want to convert SHIBA INU into ETH and then withdraw on ETH network, what will be the step by step process then

1 Like

Hello @salman116! For the step by step process of converting SHIB into ETH and withdrawing it on an ETH wallet (“ETH network”), I have enumerated the process below:

  1. To convert SHIB to ETH, you may utilize the /orders endpoint we mentioned since it supports crypto to crypto transactions.
  1. Once SHIB is converted to ETH, you may now use the /withdrawals/crypto endpoint to withdraw it to an ETH wallet (“ETH network”) through a crypto address.

Additionally, you may also use the /withdrawals/coinbase-account endpoint to withdraw ETH to a Coinbase account by sending a POST request https://api.exchange.coinbase.com/withdrawals/coinbase-account.

We hope we were able to help you with your concern. Please feel free to reach us again if you have further questions. Thank you!

2 Likes