Guide: Buy and Sell Bitcoin
Prerequisites: Local development environment
If you are building a bitcoin application, chances are, you want your users to have some bitcoin to be able to use your app. You can use Coinbase API to help your users buy bitcoin.
In this short guide you’ll learn how to buy and sell bitcoin programmatically. We will set up very simple price thresholds to buy or sell bitcoin automatically.
First, you need to make sure you have a verified payment method associated with your Coinbase account.
Buy and Sell Bitcoin
Now that you’ve confirmed that you can buy and sell bitcoin, let’s go ahead and set up simple price checks that will trigger either a buy or a sell when the price of bitcoin crosses the corresponding threshold:
In this guide you learned how to set up very simple price monitoring to automate buying and selling bitcoin.
You can now come up with more sophisticated ways to track price changes and automate your trading.
Next: Integrate with Coinbase Connect (OAuth2) →