Check transactions of a wallet address

I’m using “coinbase-accounts/${account_id}/addresses” API to create a wallet address. I’m building a service where I have to do callback when there is a token received in the created wallet. Is there any endpoint available to achieve this?

Hello @uvinodk, Thank you for taking an interest in trying out Coinbase APIs. For the details regarding your concern, we will check on this for you with our team to see how we can best assist. We will get back to you once we have more information. Keep in touch!

Hello @uvinodk. First of all, we really appreciate you for using our Coinbase APIs. Now onto your concern, before we can proceed, we need to clarify some things.

You are using /coinbase-accounts endpoint to create addresses for a coinbase account. This is different from the /accounts endpoint of Coinbase Exchange/Pro since /accounts endpoint returns crypto and fiat wallets that are in your Coinbase Exchange/Pro Portfolio while /coinbase-accounts returns the crypto and fiat wallets connected to your Coinbase Retail account (coinbase.com). When pushing for a POST request to /coinbase-accounts/{Account_ID}/addresses , you are essentially creating addresses for your Coinbase Retail accounts. This is important to note since these accounts are also accessible via another API, the Sign in With Coinbase (SIWC) API.

With this said, we are recommending you to make use of the Notifications endpoint of SIWC. Notifications allow you to subscribe to updates regarding your OAuth application or API key. Notifications are sent as HTTP POST requests (webhooks) to a notification endpoint, which you, as the developer, can set via your own OAuth application or API key settings.You may see the list of notification types and explore more details on the notifications endpoint by visiting these links:

Please kindly note that the type of notification for wallet:addresses:new-payment will only be triggered for On-Chain Transactions, and we’re currently working on updating our documentation to reflect this.

Note: Since SIWC API is a totally different API from Coinbase Exchange/Pro, this would entail different endpoints and API keys as well. This means that you would not be able to use SIWC endpoints with your Coinbase Exchange/Pro credentials. To create an API key for SIWC, you may visit https://www.coinbase.com/settings/api

If you wouldn’t like to utilize webhooks/notifications, another option with SIWC is to use the List Transactions endpoint to list all transactions associated with a wallet/account_id.

We hope this helps you with your use case. Should you have further questions, feel free to reach back to us. Thank you!

Hi @jonathan.ventura. Thanks for the explanation.

I’m using Coinbase exchange/pro since I have to convert ETH to USDC using order API after I receive ETH in my Coinbase wallet address.

Flow:

  1. 3P user sends ETH to Coinbase wallet address
  2. Check transaction of the wallet
  3. Convert ETH to USDC and keep it in Coinbase wallet

In this case, can I use Coinbase retail to achieve the above flow?

Hello @uvinodk. Thank you for providing your flow.

To answer your question, yes, you may use Coinbase Retail. However, Sign in with Coinbase alone will not suffice your use case. You will need to use both Sign in with Coinbase (SIWC) API and Coinbase Pro API to achieve your goal.

Also, to assist you on this, kindly see the suggested flow we created for you:

  1. [There’s no API integration involved in this step] 3P user sends ETH to Coinbase Retail wallet address.
  2. [via Sign in with Coinbase API] You may use the /transactions endpoint to check the transaction of the wallet.
  3. [via Coinbase Pro API] You may use the /deposits/coinbase-account endpoint to transfer funds from Coinbase Retail to Coinbase Pro.
  4. [via Coinbase Pro API] You may use the /orders endpoint to convert ETH to USDC.
  5. You can either [There’s no API integration involved in this step] keep it in Coinbase Pro Account; or
  6. [via Coinbase Pro API] You may use the /withdrawals/coinbase-account endpoint to transfer back to Coinbase Retail Account.

We hope this helps!

2 Likes

Perfect. Thank you very much for the flow with API endpoints. I have found sandbox environment for Coinbase Pro. Is there any environment available in Coinbase Retail for testing and development purpose?

1 Like

Hi @uvinodk! We’d like to inform you that, as of now, sandbox is only being offered to Coinbase Exchange/Pro. This means that we currently do not have a testing environment available for Coinbase Retail or SIWC.

We appreciate it if you can share this in our Feedback Section of the Forum as most new features and improvements to Coinbase come directly from feedback like yours, so it’s very valuable to us. Thank you!

1 Like