Earlier this year, Alpaca released OAuth support. We are seeing an increase of services looking to integrate via OAuth and wanted to shed some light on what OAuth is and what it means for application builders.
What Can You Do with Alpaca OAuth?
To simply put it, you could add Alpaca's commission-free trading capability inside of your app with the minimum effort through a commonly used integration method of OAuth.
Once your application is integrated with Alpaca via OAuth, after your users login to both your app and Alpaca, s/he can access the capabilities of Alpaca API directly inside from your application without him/her having to go out from your application experience.
We are excited that many developers have built various applications using Alpaca API with Alpaca OAuth. You can check out TradingView, where TradingView users can now buy and sell US stocks with commission-free directly from TradingView's powerful web-based charting interface.
What is OAuth?
Too good to be true?! OAuth is a standard protocol that allows access to an API on behalf of the end user, without giving away their information, such as password, API key ID.
Each app (OAuth client) gets a token with access scope—end users will also be able to see what information the app is accessing for transparency and security.
Why Would You Want to Use Alpaca OAuth?
Any developers can integrate their applications with Alpaca API via Alpaca OAuth. Once an application has been approved by Alpaca for third-party live trading, you will be able to offer commission-free trading inside your application.
The OAuth integration is the easiest way for you to test if your users are interested in the stock trading capability as a part of your application.
FAQ on Alpaca OAuth
(Q) Any example to see how it would work?
Our documentation on the TradingView OAuth integration shows screenshots of how your end users would experience the OAuth flow to connect to his/her Alpaca account.
(Q) Can Non-US developers integrate with OAuth?
Yes! You can be from anywhere to build an application to integrate with Alpaca API via OAuth.
However, your end users' eligibilities are the same as Alpaca Brokerage Account where we support brokerage accounts for qualified U.S. residents and are currently running an invite-only beta program for non-U.S. residents and business entities globally. Please see the detail account plan information here in our Doc
(Q) As an integrated partner, can I charge my users for accessing Alpaca API via OAuth?
OAuth integration works as an authentication to allow your end users to login to his/her Alpaca account inside of your application. Therefore, you do not have control over the business model and pricing model of how Alpaca Brokerage Account works.
If you are looking to become an introducing broker with Alpaca, please fill out this form and our team will contact you.
(Q) How can I get started
- Head to your Alpaca Dashboard.
- On the left side, click “OAuth Apps” on the Menu.
- E-Sign the agreement to create an OAuth client.
- Fill out all the information requested (name, picture, callback URLs, etc). Should your OAuth App offer services for live trading of your end users except yourself, your App is subject to the review prior to client use.
- Whenever authorization is needed, send the end user to the OAuth Authorization page. Use your Client ID and Secret as the Query String Parameter.
- Alpaca will display the app information and prompt you/your user to authorize API access.
- Your end user will be redirected to your service/app. When this happens, you’ll be sent the access token for the user as a part of the URL.
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.
Technology and services are offered by AlpacaDB, Inc. Brokerage services are provided by Alpaca Securities LLC (alpaca.markets), member FINRA/SIPC. Alpaca Securities LLC is a wholly-owned subsidiary of AlpacaDB, Inc.
You can find us @AlpacaHQ, if you use twitter.
Alpaca Learn | Developer-First API for Crypto and Stocks Newsletter
Join the newsletter to receive the latest updates in your inbox.