Explore crypto like Bitcoin, Ethereum, and Dogecoin. Simply and securely buy, sell, and manage hundreds of cryptocurrencies.
Go to siteThe Coinbase API on Pipedream allows you to craft automated workflows that can manage your cryptocurrency assets efficiently. Through the API, you can get real-time information about exchange rates, your transaction history, and account balances. Automate buying and selling decisions based on set criteria, receive notifications for price changes, and synchronize your Coinbase data with other financial tracking tools.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
coinbase: {
type: "app",
app: "coinbase",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.coinbase.com/v2/user`,
headers: {
Authorization: `Bearer ${this.coinbase.$auth.oauth_access_token}`,
"CB-VERSION": "2021-11-16",
},
})
},
})
Automated Trading Bot: Create a workflow that triggers a buy or sell order based on specific market conditions. For example, if Bitcoin drops to a certain price, the workflow could automatically purchase a predefined amount of Bitcoin.
Real-time Alerts: Set up a workflow that monitors the prices of your favorite cryptocurrencies and sends you real-time alerts through email, SMS, or Slack when certain price thresholds are crossed.
Portfolio Synchronization: Build a workflow that periodically fetches your transaction history and balance from Coinbase and updates a Google Sheet, allowing you to maintain an up-to-date view of your portfolio alongside other investments.
Coinbase uses OAuth authentication. When you connect your Coinbase account, Pipedream will open a popup window where you can sign into Coinbase and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Coinbase API.
Pipedream requests the following authorization scopes when you connect your account:
wallet:accounts:read
wallet:user:read
wallet:buys:create
wallet:sells:create
wallet:withdrawals:create
wallet:transactions:read
GET
https://www.coinbase.com/oauth/authorize
?
client_id={{oauth.client_id}}
&
state={{oauth.state}}
&
redirect_uri={{oauth.redirect_uri}}
&
response_type=code
&
scope={{oauth.space_separated_scopes}}
&
account=all
POST
https://www.coinbase.com/oauth/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{oauth.client_id}}
&
client_secret={{oauth.client_secret}}
&
grant_type=authorization_code
&
code={{oauth.code}}
&
redirect_uri={{oauth.redirect_uri}}
POST
https://www.coinbase.com/oauth/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{oauth.client_id}}
&
client_secret={{oauth.client_secret}}
&
grant_type=refresh_token
&
refresh_token={{oauth.refresh_token}}