What section in the API should I use to do withdrawals and currency conversions, from what I saw i can use the exchange / pro api, but is that the API which was shutting down soon?
Hi @Shinyzack123 ! We appreciate your interest in utilizing Coinbase Cloud products and services, and we’re glad to help!
We understand that you are looking for an API section that could be utilized to do withdrawals and currency conversions. But before we relay the relevant information that may suit your needs, we would like to first provide you with a clearer context of the new Advanced Trade APIs. Advanced Trade on Coinbase is our advanced trading platform, intended for a more experienced trader. It offers a secure and easy way to buy, sell, and trade digital assets online across various trading pairs. And even though Advanced Trade API and Sign in with Coinbase is under coinbase.com, Advanced Trade API v3 endpoints do not duplicate core Sign in with Coinbase functions for account deposits, withdrawals, and transactions. Hence, we would like to let you note that Advanced Trade only lets you manage orders, products, and fees with its v3 endpoints. While Sign in with Coinbase lets users easily and securely sign in to your product or service, and lets you integrate Coinbase supported cryptocurrencies into your applications through its v2 endpoints.
So, with the above-stated information, we now would like to refer you to the following v2 and v3 API endpoints that could cater to your intended use cases:
- For this use case, we suggest you utilize the Withdraw Funds endpoint in Sign in with Coinbase.
- This endpoint allows you to withdraw a user-defined amount of funds from a fiat account.
- This is a private API endpoint that utilizes the withdrawal resource which represents a withdrawal of funds using a payment method (e.g., a bank).
- For this use case, we regret to inform you that conversion of one currency to another is not yet a supported feature either with Sign in with Coinbase or the new Advanced Trade APIs.
- As a workaround, we recommend that you use both the sell and buy endpoint of Sign in with Coinbase. However, please take note that there are fees in line with these features.
- Using the Place Sell Order endpoint, a user may sell a user-defined amount of any Coinbase supported asset by pushing a POST request to https://api.coinbase.com/v2/accounts/:account_id/sells and specifying the amount and currency, to sell your crypto in exchange for a fiat.
- Once done, you can now place your Buy order by pushing a POST request to https://api.coinbase.com/v2/accounts/:account_id/buys. The account_id to place the buy order must be the account_id associated with the cryptocurrency you would like to buy. To check for the account_id, you may utilize the List Accounts endpoint by pushing a GET request to https://api.coinbase.com/v2/accounts.
- You may also opt to utilize the Create Order endpoint of Advanced Trade, in order to have your asset traded to your preferred currency. But in order to ensure that you will arrive with your desired currency, you may first check the available trading pairs by calling for the List Products endpoint.
- Nonetheless, we would like to inform you that we have logged your concern about an API section with Advanced Trade that could do currency conversions, similar to that of the /conversions endpoint in Coinbase Exchange/Pro, as a feature request with our internal teams so we can continue improving our user experience. Most new features and improvements to our products come directly from feedback like yours, so it’s very valuable to us. While we can’t offer any specific timeline for adding features and improvements, we are constantly working to build products our customers will love.
Lastly, with regard to your statement “from what I saw i can use the exchange / pro api, but is that the API which was shutting down soon”, we would like to confirm that yes, as announced here, Coinbase Pro (including Pro APIs) will be fully sunsetted in 2023 after all customers have migrated to the new Advanced Trade. On the other hand, please note that Coinbase Exchange will not be affected by this migration and will continue to operate for our Institutional clients.
We hope we are able to provide clarity with your concerns. Please do not hesitate to reply back to this thread should you have other inquiries in mind.
Thank you and have a great day!