Welcome to part three of my tutorials on using JavaScript and Node.js with Alpaca to do algorithmic trading. If you have not read part one or part two yet be sure to check those out. By the end of this, you should be able to backtest your Alpaca trading algorithm using my new backtesting package. For the full code of this part of the tutorial, check out this branch on my GitHub repository. This tutorial will assume that you already have some sort of algorithm using Node.js and Alpaca which you want to backtest. …


Welcome to part two of my tutorial on using JavaScript and Node.js with Alpaca to do algo-trading. If you did not read part one yet, be sure to check that out here. By the end of this part, you should be able to write a very simple algorithm that will create buy and sell orders in Alpaca based on two simple moving averages. For the full code for this part of the tutorial, check out index.js on my GitHub repository. If you would prefer a video-based version of this tutorial, feel free to check out my video on YouTube.

Background on Simple Moving Averages

If…


By the end of this tutorial, you should know how to make a simple request to the Alpaca API to retrieve your account information. I will be doing all of this with JavaScript and Node.js. Feel free to check out my repository on GitHub and the pull request associated with this tutorial. Also, if you are interested in a video version of this tutorial, feel free to check out my video on YouTube.

Install Node.js and npm

If you already have Node.js and npm feel free to skip this section. …

Kendel Chopp

Software Engineer trying my hand at writing things down

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store