SYSTEM R AI

Forex

OANDA: forex and CFD trading with practice and live modes.

OANDA

ID: oanda | Markets: Forex, CFDs | API: v20 REST API

OANDA provides institutional-grade forex execution with tight spreads. The v20 API supports both practice and live accounts.

Connection parameters

ParameterTypeDefaultDescription
api_tokenstringRequiredOANDA API access token.
account_idstringRequiredOANDA account ID (e.g. "101-001-12345678-001").
practicestring"true""true" for practice (fxTrade Practice), "false" for live (fxTrade).

Practice mode

curl -X POST https://agents.systemr.ai/v1/broker/connect \
  -H "X-API-Key: sr_agent_..." \
  -H "Content-Type: application/json" \
  -d '{
    "broker_type": "oanda",
    "connection_params": {
      "api_token": "YOUR_PRACTICE_API_TOKEN",
      "account_id": "101-001-12345678-001",
      "practice": "true"
    }
  }'

Live mode

curl -X POST https://agents.systemr.ai/v1/broker/connect \
  -H "X-API-Key: sr_agent_..." \
  -H "Content-Type: application/json" \
  -d '{
    "broker_type": "oanda",
    "connection_params": {
      "api_token": "YOUR_LIVE_API_TOKEN",
      "account_id": "101-001-12345678-001",
      "practice": "false"
    }
  }'

Instrument format

OANDA uses underscore-separated instrument names:

OANDA formatMeaning
EUR_USDEuro / US Dollar
GBP_JPYBritish Pound / Japanese Yen
USD_CHFUS Dollar / Swiss Franc
XAU_USDGold / US Dollar
US30_USDDow Jones Index CFD
SPX500_USDS&P 500 Index CFD

Placing a forex order

curl -X POST https://agents.systemr.ai/v1/broker/order \
  -H "X-API-Key: sr_agent_..." \
  -H "Content-Type: application/json" \
  -d '{
    "symbol": "EUR_USD",
    "side": "buy",
    "quantity": "10000",
    "order_type": "market"
  }'

In forex, quantity represents units of the base currency. 10,000 units of EUR_USD is a mini lot.

Practice vs live

FeaturePracticeLive
Base URLapi-fxpractice.oanda.comapi-fxtrade.oanda.com
Real moneyNoYes
Market dataDelayedReal-time
Token formatSameSame

Start with a practice account to test your agent's strategy before going live.

Getting API tokens

  1. Log in to your OANDA account at fxtrade.oanda.com.
  2. Go to Manage API Access under your account settings.
  3. Generate a personal access token.
  4. Copy the token and your account ID.
System R AI
Python SDKpip install systemr
MCP Serveragents.systemr.ai/mcp/sse
OpenAPI Specagents.systemr.ai/openapi.json
Machine Docsagents.systemr.ai/llms.txt
GitHubSystem-R-AI
X@Systemrai
YouTube@systemr_ai
Emailhello@systemr.ai
Phone628 333 6693
Address7901 4TH ST N, STE 28529, ST PETERSBURG, FL 33702
TermsTerms of Service
PrivacyPrivacy Policy
SecuritySecurity Policy
© 2026 System R AI. Software platform. Not financial advice.

On this page