Barfinex
All exchanges
OANDA

OANDA

Coming SoonForex Brokers
connectorType: "oanda"

Leading forex and CFD broker

Connection Architecture

OANDA
WebSocket / REST
Connector
libs/exchange-oanda
Provider
:8081/api
Detector
Advisor
Studio

The connector receives data from the exchange and feeds it to Provider (port 8081). From there — to Detector, Advisor, and Studio.

Technologies

Transport
SSEREST
Authentication
Bearer Token
Data Format
JSON
Features
Server-Sent Events

Best for

  • Forex algo traders requiring a well-documented REST API with consistent historical data going back decades.
  • Strategies needing real-time bid/ask streaming across 70+ major, minor, and exotic FX pairs.
  • Risk-managed CFD portfolios covering indices, commodities, and metals alongside FX.

Connect via code

1Environment variables (.env)

OANDA_API_KEY=your_key_here
OANDA_ACCOUNT_ID=your_account_id_here

2Connector configuration

// config/config.provider.json
{
  "provider": {
    "connectors": [
      {
        "connectorType": "oanda",
        "enabled": true,
        "key": "${OANDA_API_KEY}",
        "markets": [
          { "marketType": "spot", "symbols": [{ "name": "BTCUSDT" }] }
        ],
        "subscriptions": [
          { "type": "PROVIDER_MARKETDATA_CANDLE", "symbols": ["BTCUSDT"], "intervals": ["min1", "h1"], "active": true },
          { "type": "PROVIDER_MARKETDATA_TRADE", "symbols": ["BTCUSDT"], "active": true },
          { "type": "PROVIDER_MARKETDATA_ORDERBOOK", "symbols": ["BTCUSDT"], "active": true }
        ]
      }
    ]
  }
}

3Verify and query data

# Verify connection
curl -H "Authorization: Bearer $PROVIDER_API_TOKEN" \
  https://localhost:8081/api/exchanges/runtime-proof

# Candles (last 7 days)
curl -H "Authorization: Bearer $PROVIDER_API_TOKEN" \
  "https://localhost:8081/api/candles/oanda/spot/BTCUSDT/h1?days=7"

Available via Barfinex API

/api/candles/oanda/...
/api/trades/oanda/...
/api/orderbook/oanda/...
/api/account/oanda/...
/api/symbols/oanda/...
/api/assets/oanda/...

Studio graphical setup — in development, coming in the next release.

Important

Price streaming uses SSE (Server-Sent Events), not WebSocket — ensure your infrastructure handles persistent HTTP connections correctly.
Separate practice (fxTrade Practice) and live API base URLs must be configured explicitly.
Supported Markets
SpotMargin
Founded1996
HeadquartersNew York, USA
Connect in Studio(soon)
Exchange Website

Let’s Get in Touch

Have questions or want to explore Barfinex? Send us a message.