This guide will walk you through the initial steps to connect your Alpaca account to Autoview and execute your first test commands. Autoview allows you to automate your trading based on alerts from platforms like TradingView.
1. Choose Your Autoview Platform
Autoview offers two main platforms for executing trades based on alerts:
- Autoview Chrome Extension: This is a browser extension that runs directly in your Chrome browser. It requires your computer and the Chrome browser to be running for trades to execute. Direct Tradingview alert connection, no webhooks.
- Autoview Webhook Platform: This platform runs server-side and does not require your computer to be on for trades to execute, accepts webhooks from anywhere, including Tradingview, Trendspider, Python.
Please choose the platform that best suits your needs and follow the relevant setup guide:
- Side by Side Comparison
- How to install the Trading Extension
- How to Set up the Autoview Web Platform
2. Creating API Keys on Alpaca
To allow Autoview to trade on your behalf, you need to create API (Application Programming Interface) keys on your Alpaca account. API keys are essentially credentials that grant external applications specific permissions.
- Go to the Alpaca dashboard and find the API Keys section on the right sidebar.
- Click on Generate New Keys and save the generated API credentials. If you have previously generated keys there and you lost the secret, you can also regenerate them here.
- You can review their official APi Documentation and guides here: https://docs.alpaca.markets/docs/getting-started-with-alpaca-market-data#generate-api-keys
3. Adding API Keys to Autoview
Once you have your API keys from Alpaca, you need to add them to your chosen Autoview platform.
- If using the Chrome Extension: Open the Autoview extension options, navigate to Alpaca in the left menu. Click the Add Account button in the top right corner. Input your API Key and API Secret into the designated fields. (Only name the keys if you plan on using multiple API keys, as you will need to call them in all of your commands using `a=` down the road)
- If using the Webhook Platform: Log in to the Web Platform and add your API Key and API Secret within the Alpaca exchange configuration. Naming your keys here is what allows you to link it to a specific webhook down the road.
4. Testing Your Connection
Now that your connection is verified, let's perform two small test commands on your live Alpaca account to ensure everything is working end-to-end.
Important: These commands will execute real trades whether you are in their sandbox or live account. Use a small quantity that is at or above the minimum allowed trade size on Alpaca to avoid errors like MIN_NOTIONAL. Consider placing the limit order at a price significantly away from the current market price so it doesn't fill immediately.
First, it is highly recommended to test your command syntax using the d=1 parameter in your alert message. This performs a "dry-run" where Autoview processes the command and shows you what it would have done, but doesn't send it to the exchange.
Once you are confident in your syntax, create an alert or send a webhook. In Tradingview we like to create single fire alerts on an active market like BTCUSD Futures. We set the trigger to be when the price is greater than 0. This will ensure it fires near instantly with the following command syntax (replace placeholders):
- Place a Limit Buy Order:
- Extension: e=alpaca-paper s=tsla b=buy p=-5% q=1
- Webhook: s=tsla p=-5% q=1
- Send this alert and check the Autoview log and your Alpaca account to confirm the limit order was placed successfully.
- Cancel the Order: After confirming the order was placed, trigger another alert with the command to cancel it:
- Extension: e=alpaca-paper s=tsla c=order
- Webhook: s=tsla c=order
- Send this alert and check the Autoview log and your Alpaca account to confirm the order was cancelled successfully. Successfully completing these two tests means Autoview is connected and ready to execute commands on your Alpaca account based on your alerts.
- Next Steps You've successfully set up Autoview with Alpaca! To explore more advanced order types, command parameters like stop-loss, take-profit, and trailing stops, risk management strategies, and other features, please refer to our comprehensive:
- Building Autoview commands: A comprehensive guide
Comments
0 comments
Please sign in to leave a comment.