How to Start Paper Trading at Alpaca?

In this tutorial series, we will learn about how to place a market order to buy, sell a stock. We will move forward assuming that you’ve registered with Alpaca . If you haven’t please visit Alpaca and sign up. Feel free to check out the other tutorials in this series at Alpaca Resources. We will use an Alpaca paper trading account demonstrate how to buy and sell a stock, via the API

Step 1:
Log in to your Alpaca account and click on “Paper Overview”. That should lead to an overview similar to the one shown in the picture below.
As we can see, a new paper trading account has a starting equity of $100,000 and a buying power of $400,000. These can be reset at any time during your usage by clicking the “Reset” button and they will return back to their original equity of $100,000 and a buying power of $400,000 respectively.
Step 2:
Sign into your account at Alpaca and go to your trading account. We will use a paper trading account for this tutorial. In order to connect your trading strategy to the Alpaca trading account, you will need API keys. Each account is issued its own API keys and these can be viewed in your overview page, as shown in the gif below.

Step 3:
Let’s create a function to sell a stock, or in this case one stock of Tesla. Similar code can be found on the Alpaca Docs under the orders section.
After placing a market order to buy and/or sell, your order history will look like the following (prices will vary)
Step 4:
Next, you can find the documentation on the different types of market data, order types, etc. by following the next couple of tutorials. More documentation can be found on the Alpaca Docs.

Thank you for using Alpaca. Here are a couple more links that you might be interested in.



Sign up for the weekly newsletter to keep up with the API updates and upcoming competitions, job opportunities by clicking here.

You can also follow Alpaca and our weekly updates on our LinkedIn, Alpaca Community Slack and @AlpacaHQ on Twitter!
Commission-Free trading means that there are no commission charges for Alpaca self-directed individual cash brokerage accounts that trade U.S. listed securities through an API. Relevant SEC and FINRA fees may apply.
Brokerage services are provided by Alpaca Securities LLC ("Alpaca"), memberFINRA/SIPC, a wholly-owned subsidiary of AlpacaDB, Inc. Technology and services are offered by AlpacaDB, Inc.