Getting started with Alpaca

Autoview

By the end of this guide your Alpaca account will be wired to Autoview, and you will have placed a real order from an alert and cancelled it again. We do that final test on a paper account, so nothing you do here risks live money. Plan on ten minutes.

Autoview turns an incoming alert into an order on your broker. Most people fire those alerts from TradingView, but the webhook platform does not care where the POST comes from. TrendSpider, a Python script, your own backend, anything that can hit a URL works the same way. The browser extension is the piece that reads TradingView directly. Pick whichever fits how you trade.

Step 1: pick how Autoview runs

Autoview executes through two surfaces, and your Alpaca keys live on whichever one you choose.

  • Chrome extension. Runs in your browser. Your computer and Chrome have to stay open for an order to go through. It reads TradingView alerts directly, no webhook URL involved.
  • Webhook platform. Runs server-side. Your machine can be asleep and orders still fill. It accepts a POST from any source, TradingView included.

If you are not sure, start with the webhook platform. It is less fragile, and you are not tying your fills to whether a laptop lid is open. Compare both on the platforms page.

Step 2: create API keys on Alpaca

Autoview needs API keys to act on your behalf. A key pair is a credential that grants an outside app permission to read your account and place orders. You generate it inside Alpaca, never inside Autoview.

  1. Sign in to your Alpaca account and open the dashboard.
  2. Find the API Keys panel and generate a new key pair.
  3. Copy both halves immediately. Alpaca shows you the secret once. If you navigate away without saving it, you regenerate and start over.

Alpaca calls the two values the API Key ID and the Secret Key. That is the exact wording Autoview's form uses, so the mapping is one to one. Alpaca's own getting-started docs walk through key creation with current screenshots if you want the step pictured.

Doing this test on paper money? Generate the keys from your Alpaca paper-trading dashboard instead of the live one. Paper and live use separate key pairs.

Step 3: add the keys to Autoview

Now hand those keys to whichever surface you picked in Step 1.

On the Chrome extension

Open the extension options and select Alpaca in the left menu. Click Add Account. Paste the API Key ID and Secret Key into their fields. Leave the account name blank unless you intend to run more than one Alpaca key. Naming matters only when you have several, because you then select one per command with a=.

On the webhook platform

Log in, open the Alpaca configuration, and paste the same two values. Here a name is worth setting even with one key, because it is how you bind a key to a specific webhook later.

Step 4: place a test order, then cancel it

Time to prove the whole chain works end to end. We use alpaca-paper, the free paper-trading connection, so this costs nothing and risks nothing. The exact same commands work against your live Alpaca connection once you are confident.

One habit first. Add d=1 to any command to run it as a dry run. Autoview parses the command and logs exactly what it would have sent, but nothing reaches the exchange. Use it whenever you are unsure of your syntax.

Place a limit buy

Send this as an alert (extension) or as a webhook body (platform):

  • Extension: e=alpaca-paper s=tsla b=buy p=-5% q=1
  • Webhook: s=tsla b=buy p=-5% q=1

Reading it left to right: trade on the Alpaca paper account, symbol TSLA, buy side, limit price five percent below the current price, quantity one share. The p=-5% offset is deliberate. It parks the order well under market so it sits open instead of filling instantly, which is exactly what you want for a test. Alpaca stock symbols are plain tickers like tsla or aapl, with no separator. That is different from forex on OANDA, where a pair needs the underscore form EUR_USD.

Check the Autoview log and your Alpaca orders. You should see one open limit order for a single TSLA share.

Cancel it

Now clear it back out:

  • Extension: e=alpaca-paper s=tsla c=order
  • Webhook: s=tsla c=order

That cancels the open TSLA order. Confirm it disappears from both the Autoview log and your Alpaca account. If the buy placed and the cancel cleared it, the connection is sound.

If something goes wrong

  • Order rejected on syntax. Re-run the command with d=1 and read the log. The dry run tells you how Autoview interpreted every parameter.
  • Unknown symbol. Confirm the ticker is plain and lowercase or uppercase with no slash or dash. tsla, not TSLA/USD.
  • Nothing happens at all. On the extension, the browser has to be open and the alert has to reach Autoview. On the platform, confirm the webhook is pointed at your private Autoview URL and, if you named your key, that the webhook references it.
  • Auth errors. You almost certainly pasted live keys into a paper connection or the reverse. They are not interchangeable.

Next steps

You now have a working Alpaca pipeline. From here you can layer on the order types that make automation worth it: bracket orders, stop-loss and take-profit legs, trailing stops, and time-in-force control, all of which Alpaca supports through Autoview. Build those commands the same way you built the test: write it, dry-run it with d=1, then let it fire.

Set up Autoview