API Documentation

In order to start using Alpaca Web API, you will need to obtain your API key. An API key consists of two strings, one called Key ID which always appears in your dashboard, and Secret Key, which appears only once when generating it. Make sure you keep both in your hands.

Web API v1

Web API v1 is used by legacy Alpaca accounts at Apex Clearing. It describes how our API works in detail so you can prepare for your algorithm to interact with it.

Web API v2

API v2 is used by Alpaca accounts at ETC. The API has been updated to support our newest features, including margin, shorting, and extended hours.

Client SDK

Alpaca also provides software development kits (“SDKs”) here for Python, C#, Go, and Node to help interact with both v1 and v2 of the Alpaca Web API.

How-To Code Examples

Basic usage examples showing how to do specific tasks using the Alpaca API.

Suggestions or questions?
We're always happy to hear from you. You can contribute to these docs on GitHub, or you can join our Community Slack to get help from other community members and the Alpaca team.