Skip to Content
Forex ExecutionGetting Started

Getting Started

Prerequisites: Node.js (for npm), an OANDA practice account ID and API token. Run Git commands from the parent trading-algos repository root — this package is not a nested Git repo.

Copy env and install

cd forex-execution cp .env.example .env npm install

Populate .env

At minimum set:

VariableNotes
OANDA_ACCOUNT_IDPractice account ID
OANDA_API_TOKENPractice API token
INTERNAL_API_KEYMin 16 characters; required on non-health routes
DATABASE_URLPostgreSQL connection string
REDIS_URLRedis connection string

Defaults keep you on practice: OANDA_ENV=practice. Live startup is rejected unless both OANDA_ENV=live and LIVE_TRADING_ENABLED=true are set — see Configuration.

Run the service

npm run dev

This runs with tsx watch and loads .env.

Docker setup is intentionally excluded. Run the service with pm2 in production.

Verify

  • GET /health/live — liveness
  • GET /health/ready — configuration, OANDA authentication, and instrument metadata smoke test

Account routes require X-Internal-API-Key. Full contract: API Reference.

Next steps

Last updated on