API Documentation Center

ATG World Trading API

Real-time quotes for Forex and Precious Metals, supporting HTTP REST API and WebSocket streaming

Real-time Quotes

Get real-time bid/ask quotes for all trading instruments or specific symbols

GET /api/quotes

Historical Data

Query historical quote records with custom time range and record count

GET /api/quotes/history

WebSocket Streaming

Establish WebSocket connection to receive real-time quote updates without polling

ws://localhost:5001

Cache Status

View current cached symbol list and total count

GET /api/quotes/status

HTTP REST API

GET /api/quotes Get latest quotes for all symbols
{
  "time": "2026-01-15 09:30:00",
  "count": 8,
  "quotes": [
    {"symbol": "EURUSD", "bid": "1.08915", "ask": "1.08920"},
    {"symbol": "XAUUSD", "bid": "2034.00", "ask": "2034.50"}
  ]
}
GET /api/quotes/{symbols} Query quotes for specific symbols

Supports comma-separated multi-symbol queries

// Single symbolGET /api/quotes/EURUSD

// Multiple symbolsGET /api/quotes/EURUSD,GBPJPY,XAUUSD
GET /api/quotes/history Get historical quotes for all symbols

Use count parameter to limit records per symbol (max 100)

GET /api/quotes/history?count=50
GET /api/quotes/status Get current cache status

Returns the current list of cached symbols and total count

WebSocket Real-time Streaming

WS ws://localhost:5001 Establish WebSocket connection

Subscription Message Format

{
  "action": "subscribe",
  "symbols": ["EURUSD", "XAUUSD"]
}

// Response{
  "type": "subscribed",
  "symbols": ["EURUSD", "XAUUSD"]
}

Server Push Example

{
  "type": "quote",
  "data": {
    "symbol": "EURUSD",
    "bid": "1.08915",
    "ask": "1.08920",
    "digits": "5",
    "time": "2026-01-15T09:30:00"
  }
}

Supported Trading Instruments

Symbol Name Type Digits
EURUSD Euro / US Dollar Forex 5
GBPJPY British Pound / Japanese Yen Forex 3
USDJPY US Dollar / Japanese Yen Forex 3
AUDUSD Australian Dollar / US Dollar Forex 5
USDCAD US Dollar / Canadian Dollar Forex 5
USDCHF US Dollar / Swiss Franc Forex 5
NZDUSD New Zealand Dollar / US Dollar Forex 5
XAUUSD Gold / US Dollar Metals 2