BLACK FRIDAY IS BACKNov 24 to 30. Join the list and get in a day early.Join the list

Getting started with OANDA

Autoview · Guide · Updated October 19, 2026

Getting your key? → OANDA API key guide

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.

Prefer to watch it first? Our OANDA Practice video connects a Practice account to Autoview, writes a market buy on EUR_USD, dry-runs it with d=1, and checks the result in webhook history. It runs about eight minutes: watch the OANDA Practice walkthrough on YouTube.

Step 1: Find your OANDA account ID

No OANDA Practice account yet? Create one first. The OANDA Practice account guide shows how to register. Practice trades demo funds, not real money, which makes it the right place for the test order in Step 4.

You need two things from OANDA: the account ID and an access token. Start with the ID. Sign in to the OANDA Hub, click Accounts in the left menu, then the account you want. The number next to v20 Account Number is your account ID. A practice account and a live account each have their own ID, so grab the one you actually want to trade.

OANDA's account ID isn't a plain number. It's four hyphen-separated groups, shaped like 001-011-5838423-001, per OANDA's own v20 API documentation. If what you copied doesn't look like that, you likely grabbed the wrong field, not the account ID.

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. OANDA's help center puts it in the Hub: click Tools at the top, then API, then Generate. If OANDA has moved the menu, the OANDA API key guide has the other paths OANDA documents.

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.
  • Treat the token like a password. OANDA says one token grants access to all of your sub-accounts. OANDA's token docs describe no IP restriction for it, so there is no IP step here. If a token leaks, revoke it in the Hub and generate a new one.
  • OANDA's docs describe no permission boxes for a personal token, so there is nothing to tick or untick. What the token can and can't do, including why it can't move money out, is in the permissions section of the OANDA API key guide. On the webhook platform, Autoview stores the token encrypted at rest. Are my API keys safe? explains how.
  • Practice and live are separate connections in Autoview. On the webhook platform, the webhook trades whichever one it is linked to. On the Chrome extension, you pick one by name in the command: e=oandapractice for practice, e=oanda for live. Generate the token while signed in to the environment you intend to trade. A practice token goes with a practice account ID, and a live token with a live one. Mix them and the connection fails.

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. On the extension, that name is how you point a command at a specific account, with a=. On the webhook platform, you choose the account by linking it to the webhook. With a single account you can skip the naming.

On the extension, click Test Credentials, then save. On the webhook platform, click Add API Keys to save. Saving doesn't check the values with OANDA. The setup wizard then has you link a webhook, and its last step has a Test connection (read-only) button. That test reads your account summary from OANDA and places no order. If it passes, your account ID and token work.

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, run your first test on a practice account: link the webhook to your OANDA Practice connection, or use e=oandapractice on the extension.

Never sent an alert to Autoview before? Send your first alert shows where to copy your webhook URL and where the command text goes in your alert source.

The syntax that trips people up

OANDA's API names pairs with an underscore: EUR_USD. Autoview also accepts OANDA's slash form, EUR/USD, and matches it to the same pair. What it rejects is the run-together EURUSD that TradingView shows on its OANDA charts. Send that and Autoview stops the command with Unknown market symbol before anything reaches OANDA. The underscore is the safe choice.

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

Read left to right, each part does one job:

  • e=oandapractice is the exchange: your OANDA Practice connection.
  • s=EUR_USD is the symbol: the pair to trade.
  • b=buy is the side: buy or sell.
  • t=limit is the order type: a limit order waits at your price instead of filling at market.
  • p=-5% is the price: 5% below the current market price.
  • q=1 is the quantity: how much to buy, explained just below.
  • d=1, when you add it, makes the whole command a dry run.

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

On OANDA, q= counts units of the base currency, so q=1 on EUR_USD is one euro and q=1000 is 1,000 euros.

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 fp={{close}}. p= moves the price away from the market (like p=-1%); fp= sets the exact price. 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.
  • 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 by adding tp=, sl=, and ts= to the same command. No & separator is needed for that. 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. See the full OANDA command reference for every parameter, including two behaviors worth knowing about before you rely on them live.

The setup page behind the button below needs you signed in to Autoview. No Autoview account yet? Register free first, then come back to it.

Set up OANDA Practice first

Ready for real money? The live OANDA setup page takes the same two values from your live account.