From Coinbase API can you convert from Bitcoin to, for example, USDC? I cannot see any reference but I have this feature on the app. I wonder if API supports (or expects support for) this operation, or it just that I'm missing something.
3 Answers
Looking at the Coinbase API PRO Documentation you can create a conversion by:
HTTP REQUEST
POST /conversions
API KEY PERMISSIONS
This endpoint requires the “trade” permission.
Request
{
"from": "USD",
"to": "USDC",
"amount": "10000.00"
}
PARAMETERS
from: A valid currency id
to: A valid currency id
amount: Amount of from to convert to to
Probably more of a question of what the valid currencies are

- 178
- 1
- 10
-
1Just to mention that this feature (stablecoins conversion) is not available on Coinbase API but included on Coinbase PRO API. – Pataquer May 31 '19 at 21:24
-
Are there any other _non_ PRO ways to transfer from one currency to another? – sam Sep 24 '19 at 06:31
-
Not that I know of sorry – McNline Sep 25 '19 at 07:31
-
Is there a way to *list* existing conversions? I'm trying to reconstruct a Coinbase Pro account's history and I can't figure out how to query stablecoin versions that have already happened. – HaPsantran Jun 22 '21 at 01:08
-
But that's just for Stable coins, not BTC to ETH etc no ? – daslicht Sep 25 '21 at 09:48
Without using CoinbasePro API but only Coinbase API from webapp that are the endpoints you need to call:
Have to know base_id of crypto that you want to sell and base_id of crypto want to buy. You can know it by call GET "https://api.coinbase.com/v2/ /assets/prices?base=USD&filter=holdable&resolution=latest" and get from response the "base_id" of your currencies.
Make an order by calling POST "https://api.coinbase.com/v2/trade" with a request body in json like this:
{ 'amount': [amount that you want to convert], 'amount_asset': [currency of amount that you want to convert], 'amount_from': 'input', 'source_asset': ["base_id" of crypto that you want to sell], 'target_asset': ["base_id" of crypto that you want to buy] }
If previous POST "/trade" response code is 201, you have to get the "id" value of response's json and do a commit of your order by calling POST "https://api.coinbase.com/v2/trades/[id of json response of previous https://api.coinbase.com/v2/trade POST"]/commit". If the response code of this POST commit is 201, your exchange is started and if there are not error in coinbase, your conversion is done!

- 21
- 2
There is a reference for this in the Coinbase API documentation: https://developers.coinbase.com/api/v2#transfer-money-between-accounts
But as I stated in my question, it unfortunately doesn't seem to work: Coinbase transfer between accounts returns "Not found"

- 21
- 2