Image for post
Image for post

GET Requests are limited to receiving information from a server—they’re unable to change anything on the server side. That means you can do things like query positions, check individual stock information, and see how much money your account has, but it’s not possible to place trades. To make changes on the server side — and therefore place orders into the system — you’ll need to use POST requests. Another function that asks the server to do something (other than return info) is a DELETE request. This tutorial is focused on getting you up and running with POST and DELETE requests.

If you want to focus on GET requests (or just want a refresher), you can go back to the GET tutorial…


GET Tutorial to Get Your Account Related Information

This Part 1 tutorial will focus on GET requests, which simply ask the endpoint for some information (like current market positions for an account) of your Alpaca account by using VBA and Excel. The next one (Part 2) will focus on POST requests, which include some extra information for the API server to process (such as entering trades).

In my last article (“For Excel Persons — How to Pull Market Data with VBA”), I wrote about making HTTP requests to Alpaca’s open, public-facing API. …


Image for post
Image for post

Writer’s Update: the original post used MSXML2.XMLHTTP60 to send the requests. However, this implementation may cause static cached data to be returned, which is unacceptable in dynamic environments like stock trading. Therefore, I suggest using MSXML2.ServerXMLHTTP60, which should solve the caching issue. I updated this article to reflect that minor but important change.

We already looked at what types of data are available through Alpaca’s API. Here, let’s walk through an example using real code of VBA. (This is 12/21 post for Trading API Advent Calendar 2018)

Know Nothing about Coding? Use VBA!

If you know nothing about coding but have used Excel all your academic and professional life (I think most of us, yes), the VBA solution is a good way to dive into automated trading on a familiar platform without learning different development environments and software. …


Image for post
Image for post
Photo by Elisa Michelet on Unsplash

Data is a critical component of any trading or investing strategy, and that holds true for the casual, once-a-quarter investor to the professional day trader. The Internet affords anyone with a connection the capability to access such data, often in real-time, via visually-appealing GUIs on websites or as raw text data from APIs. This article will concern itself with the latter option, APIs. (This is 12/19 post for Trading API Advent Calendar 2018)

I am going to use API offered by Alpaca to show you how we can obtain various types of market data. Part of Alpaca’s solution set for customers is data services through IEX’s or Polygon’s data platform, allowing one to retrieve all sorts of information on companies and the markets. …


A Budding Developer’s Perspective (This is 12/3 post for Trading API Advent Calendar 2018)

Image for post
Image for post
Photo by Matt Lamers on Unsplash

Software-Driven Automation is Everywhere

Software-driven automation is rapidly transforming the social and economic landscape, with some of the most prominent examples being autonomous vehicles and home assistants. All aspects of society and the economy are experiencing automation, though, and finance will not be left untouched.

The retail investor tasted automation from the home with the advent of online brokers that could accept trades through a web interface. For the most part, these online brokers, or the online segments of traditional brokers, also employed human brokers. …

Cory Sarver

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