Getting started with OANDA

Autoview

By the end of this guide your OANDA forex account is connected to Autoview, the credentials test green, and you've watched a single test order go out and come back cancelled. That last part matters more than it sounds. A connection that tests fine but never places an order isn't really proven. We're going to prove it.

OANDA works the same way on both Autoview surfaces. You'll do the credential setup once, then send commands from wherever your alerts come from.

First, pick where your alerts run from

Autoview gives you two places to execute the same OANDA commands, and the choice changes nothing about how you set up OANDA itself.

  • The Chrome extension runs in your browser and reads alerts straight out of TradingView. Your machine has to be on and the tab open for an order to fire.
  • The webhook platform runs server-side. Your computer can be asleep. It takes a POST from anything that can send one: TradingView, TrendSpider, a Python script, a cron job. It isn't tied to one charting tool.

Not sure which fits you? The platforms comparison lays them side by side. The OANDA steps below are identical either way.

Step 1: Find your OANDA account ID

You need two things from OANDA: the account ID and an access token. Start with the ID. Sign in to your OANDA account, open the dashboard, and the account number sits with each account listed there. A practice account and a live account each have their own ID, so grab the one you actually want to trade.

Copy it somewhere for a minute. You'll paste it into Autoview shortly.

Step 2: Generate an OANDA access token

The token is what lets Autoview place orders for you. You generate it inside OANDA, never inside Autoview, and OANDA's own profile area is where it lives. On the fxTrade site this is under your account profile, in the area for managing API access. OANDA's own documentation is the authority on the exact menu path, since they move it around occasionally.

A few things worth knowing before you click generate:

  • The token is shown once. Copy it the moment it appears and keep it somewhere safe. Lose it and you regenerate, which invalidates the old one.
  • OANDA lets you whitelist IP addresses so the token only works from approved sources. It's optional, but it's a real security upgrade and we recommend turning it on.
  • Practice and live are separate environments in Autoview. You target them by exchange name in your commands: e=oandapractice for the practice endpoint, e=oanda for live. Generate the token from the environment you intend to trade, and check OANDA's docs on whether it spans both.

Step 3: Add OANDA to Autoview

Now bring both values across.

  • On the extension: open the extension options, grant permission for OANDA if it asks, then open the OANDA settings and add your account ID and token.
  • On the webhook platform: log in, open the OANDA exchange configuration, and enter the same account ID and token there.

If you run more than one OANDA account, name each set of credentials. That name is how you'll point a specific command or webhook at a specific account later, with the a= parameter. With a single account you can skip the naming.

Either way, click Test Credentials. A successful test confirms Autoview can actually reach OANDA with what you entered. Then save.

Step 4: Place a real test order, then cancel it

A green test means the credentials are valid. It does not mean an order will go through. So we send one.

These commands hit your real OANDA account, practice or live. To keep it harmless, use e=oandapractice on a practice account for your first run.

The syntax that trips people up

OANDA's API wants the underscore symbol format: EUR_USD, not EURUSD and not the slash form. TradingView shows the pair one way, OANDA expects another. Get this wrong and Autoview rejects the command with Unknown market symbol before anything reaches OANDA. Use the underscore.

Two safety habits first:

  • Add d=1 to do a dry run. Autoview parses the command and shows you what it would have done without sending it to OANDA. Run your syntax dry until it reads correctly.
  • Use a quantity at or above OANDA's minimum trade size, and set the limit price well away from the market so it rests instead of filling instantly.

When your dry run looks right, drop the d=1 and fire it for real. A limit buy parked 5% below market:

e=oandapractice s=EUR_USD b=buy t=limit p=-5% q=1

On the webhook platform you omit the exchange selector, since the webhook already knows its destination:

s=EUR_USD b=buy t=limit p=-5% q=1

Send it. Check the Autoview log and your OANDA account. You should see a resting limit order.

The p=-5% above is a fixed offset, fine for a test. A live strategy usually wants a price pulled from the alert itself, like p={{close}}. One thing to be clear on: {{close}} is a TradingView placeholder, not Autoview syntax. TradingView swaps in the real price when the alert fires. The alert sender supplies that value. A Python script or another platform does the same job its own way, just with whatever variable it uses. Autoview only sees the number that lands in the command.

Now cancel it:

e=oandapractice s=EUR_USD c=order

Webhook version:

s=EUR_USD c=order

Confirm the order disappears from OANDA and the log shows the cancel. That round trip, placed then cancelled, is your end-to-end proof.

If something doesn't work

  • Unknown market symbol. Almost always the symbol format. Switch to underscores: EUR_USD, USD_CAD, GBP_JPY.
  • Order rejected on size. Your quantity is under OANDA's minimum. Bump it up.
  • Test Credentials fails. Re-check the account ID and token for a stray space, and confirm you're not pointing a practice token at a live environment. If you whitelisted IPs, make sure the source you're sending from is on the list.
  • Nothing in the log at all. The alert never reached Autoview. On the extension, confirm the tab is open and OANDA permission is granted. On the webhook platform, confirm the alert is POSTing to your correct webhook URL.

Where to go next

You've got a connected account and a proven path to the exchange. From here you can attach a take-profit, stop-loss, or trailing-stop at entry with tp=, sl=, and ts=. You can also add those to a position you already hold. Build them the same way you built the test: dry-run with d=1 first, then send.

Set up your OANDA connection