Getting started with Capital.com on Autoview
By the end of this guide your Capital.com account is connected to Autoview, your API credentials carry the right permissions, and you've fired one test order and cancelled it. That last part matters. A dry run tells you your syntax parses. Only a real order tells you the whole chain works, and Capital.com gives you a demo account to run that real order on without risking a cent.
Capital.com trades CFDs, not the underlying asset, across forex, indices, commodities, shares, and crypto. The setup below works the same regardless of which market you're automating.
Step 0: Pick your platform
Autoview comes in two forms, and Capital.com works with both.
- The Chrome extension runs in your browser. It connects directly to TradingView alerts, and it only executes while your computer and Chrome are on.
- The webhook platform runs on our servers. It accepts a POST from anywhere: TradingView, TrendSpider, a Python script, your own cron job. It executes whether or not any browser is open.
If you want trades to fire while your laptop is closed, use the webhook platform. If you're tied to the extension's live TradingView link, use the extension. The setup below covers both; the command syntax differs by a single parameter, and I'll flag it where it does. Compare them side by side on the platforms page.
Step 1: Create API credentials on Capital.com
Capital.com asks for three pieces, not two, and one of them isn't your account login. You generate the API key inside Capital.com, not inside Autoview, and you set a separate Custom Password there at the same time, distinct from the password you use to log into Capital.com itself. Capital.com keeps its own walkthrough current, so follow theirs for the exact clicks.
When you create the key, keep in mind:
- Autoview needs trading access. It has to place and cancel orders, and read your balances and open positions, or nothing executes.
- The Custom Password is not your login password. Set one specifically for API access when Capital.com prompts you, and treat it with the same care as the key itself.
Copy your Email Address, API Key, and Custom Password somewhere safe. If you lose the Custom Password, you'll need to set a new one on Capital.com's side.
Step 2: Add the credentials to Autoview
Same credentials, slightly different door depending on your platform.
On the extension
Open the extension options, find Capital.com in the left menu, and click Add account. Enter your Email Address, API Key, and Custom Password. Leave the key unnamed unless you plan to run more than one Capital.com key. Naming it means every command has to address it with a=, so skip the name if you only have one.
On the webhook platform
Log in, open the Capital.com configuration, and enter your Email Address, API Key, and Custom Password there. Here, naming the key is what lets you wire it to a specific webhook later, so a clear name is worth it. Save, and watch for the confirmation that the account connected.
If you'd rather test first, Capital.com offers a Demo account, and Autoview connects to it as its own separate connection, alongside your live one. Set it up the same way, with a Demo account's own Email, API Key, and Custom Password.
Step 3: Fire a test order, then cancel it
This is the step people skip, and then they wonder why a live signal did nothing. Don't skip it, and if you're on the Demo account there's no reason not to run it exactly like a live order.
A note if you're on the live account: place a limit order far enough from the market that it won't fill while you're testing.
Start with a dry run. Add d=1 to any command and Autoview parses it, shows you exactly what it would have done, and sends nothing to Capital.com. Get a clean dry run before you send a live one.
Then send the real thing. The cleanest trigger is a single-fire TradingView alert on an active market; a condition like "price greater than 0" fires it almost instantly. Capital.com identifies each market by its own code, called an epic (something like CS.D.GBPUSD.SPOT.IP), not the everyday ticker. Find the exact epic on Capital.com before you send. A limit buy 5% under the market looks like this:
- Extension:
e=capital s=<CAPITAL_EPIC> b=buy p=-5% q=1 - Webhook:
s=<CAPITAL_EPIC> b=buy p=-5% q=1
The only difference is e=capital, which tells the extension which exchange to route to. On the webhook platform the webhook already knows its exchange, so you leave it out.
The example above hard-codes a price offset and a quantity, which is what you want for a controlled test. In real use you'll often want a live value instead. A TradingView alert can write one in: p={{close}} tells TradingView to substitute the candle's close at fire time, and Autoview just receives the number. The {{close}} token is TradingView's, not Autoview's. The point is that the alert sender supplies the value, so a Python script or another platform builds the same command its own way and posts a plain number where {{close}} would sit.
Fire it, then open the Autoview log and your Capital.com orders. You should see the resting limit order in both. Now cancel it:
- Extension:
e=capital s=<CAPITAL_EPIC> c=order - Webhook:
s=<CAPITAL_EPIC> c=order
Order placed, order cancelled, both confirmed in the log and on Capital.com. That's the full round trip. Your setup works.
One Capital.com strength worth knowing before you build a real strategy
Capital.com carries an entry, its stop-loss, its take-profit, and a trailing stop in one order, all placed together. You don't need to split them into separate alerts the way some exchanges make you. Capital.com also supports guaranteed stops, a stop that's protected against slippage even in a fast market. If you want one, that's a Capital.com account setting to check on their side; Autoview passes it through when you attach a stop.
Step 4: Troubleshoot the usual snags
Most first-run problems are one of three things.
- Invalid API credentials. Autoview rejects the key. Almost always a typo on paste, a mismatched Custom Password, or a key created without trading permission. Re-check all three pieces and confirm the permission on Capital.com's side.
- Account shows disconnected. Nothing executes while it does. Re-check the Email Address, API Key, and Custom Password, and confirm you're using the Demo credentials on the Demo connection, not mixed with live.
- Capital.com rejects the order. The error in your log comes straight from Capital.com, often because the epic was wrong or the size sat below the market's minimum. Recheck the epic and the size, then resend.
When a command behaves oddly, put d=1 back on it. The dry-run output is the fastest way to see what Autoview thinks you asked for versus what you meant.
Connected and tested? Good. Next you'll want stop-loss, take-profit, and trailing parameters layered onto the same entry command, all in one alert. That's where the automation gets interesting.