EN

GFIL API Reference

REST & WebSocket API — Market Data, Signals, Instruments, AI Analysis

Base URL: https://gfil-intel.xyz  |  Format: JSON  |  Auth: X-API-Key header  |  Rate Limit: 60 req/min (free tier)

Authentication

All endpoints require an API key passed in the X-API-Key HTTP header. Keys are available from the GFIL Terminal settings panel.

# All requests must include: X-API-Key: your_api_key_here

REST API Endpoints

GET/api/symbols
Returns all available trading instruments with metadata: symbol code, name, type, pip size, contract specs.

Response 200 OK

{ "items": [ { "symbol": "XAUUSD", "name": "Gold vs US Dollar", "type": "commodity", "pip_size": 0.01, "contract_size": 100, "margin_rate": 0.01, "min_lot": 0.01, "max_lot": 50 } ], "count": 30 }
cURLPythonJavaScript
curl -H "X-API-Key: YOUR_KEY" "https://gfil-intel.xyz/api/symbols"
GET/api/market/{symbol}
Returns OHLCV data and real-time quote for a single instrument. Optional timeframe (1m,5m,15m,1h,4h,1d) and bars (max 500) query parameters.

Parameters

ParamTypeRequiredDescription
symbolstringYesTrading symbol (e.g. XAUUSD, EURUSD)
timeframestringNo1m, 5m, 15m, 1h, 4h, 1d (default: 1h)
barsintegerNoNumber of bars (default: 100, max: 500)

Response 200 OK

{ "symbol": "XAUUSD", "timeframe": "1h", "ohlcv": [ { "time": "2026-06-27T12:00:00Z", "open": 2341.25, "high": 2345.80, "low": 2339.10, "close": 2344.50, "volume": 1250 } ], "quote": { "bid": 2341.25, "ask": 2341.55, "spread": 0.30, "timestamp": "2026-06-27T12:15:30Z" } }
# Get 100 x 5-minute bars for gold curl -H "X-API-Key: YOUR_KEY" "https://gfil-intel.xyz/api/market/XAUUSD?timeframe=5m&bars=100"
GET/api/market/{symbol}/quote
Returns only the real-time bid/ask quote (no OHLCV history). Lightweight, suitable for polling dashboards.
{ "symbol": "EURUSD", "bid": 1.13852, "ask": 1.13858, "spread": 0.6, "timestamp": "2026-06-27T12:15:30Z" }
GET/api/signals
Returns the public signal battleground feed. Each signal includes entry, stop loss, take profit, direction, and verified P&L (if closed).

Parameters

ParamTypeDescription
statusstringactive, closed, all (default: active)
symbolstringFilter by symbol (e.g. XAUUSD)
limitintegerMax results (default: 50)
{ "items": [ { "id": "sig_abc123", "user": "TraderJoe", "symbol": "XAUUSD", "direction": "buy", "entry": 2341.25, "stop_loss": 2338.50, "take_profit": 2348.00, "status": "active", "timestamp": "2026-06-27T12:10:00Z" } ], "count": 1 }
GET/api/news
Curated financial news feed with AI-generated sentiment scores. Filterable by category.
ParamTypeDescription
categorystringforex, gold, crypto, macro (comma-separated)
limitintegerMax items (default: 20)
{ "items": [ { "title": "Fed Holds Rates Steady", "category": "macro", "sentiment": "neutral", "sentiment_score": 0.12, "timestamp": "2026-06-27T12:00:00Z" } ] }
GET/api/session
Current trading session statistics: active instruments, connected clients, signal count, AI analysis availability.
{ "instruments_active": 30, "clients_connected": 42, "signals_active": 15, "ai_models_available": ["deepseek", "claude", "gpt"], "server_time": "2026-06-27T12:15:30Z", "uptime_seconds": 86400 }

WebSocket API

WSS/ws/market
Real-time price stream. Subscribe to one or more instruments. Tick-level bid/ask updates with <50ms latency.

Subscribe

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

Message (push)

{ "symbol": "XAUUSD", "bid": 2341.25, "ask": 2341.55, "spread": 0.30, "time": 1719486000, "volume": 125 }
WSS/ws/orderflow
Real-time order flow tick data: cumulative delta, bid/ask volume imbalance, absorption signals.
{ "symbol": "XAUUSD", "bid_volume": 150, "ask_volume": 87, "delta": 63, "cumulative_delta": 12450, "price": 2341.25, "time": 1719486000 }
WSS/ws/signals
Live signal feed. New signals pushed in real-time as they are published to the battleground.
{ "id": "sig_xyz", "user": "TraderJoe", "symbol": "EURUSD", "direction": "sell", "entry": 1.13852, "stop_loss": 1.14100, "take_profit": 1.13300, "timestamp": "2026-06-27T12:15:30Z" }

Rate Limits

TierREST req/minWebSocket streamsAI calls/day
Free6025
Pro120520
Premium3001050

Error Codes

CodeMeaning
200Success
401Missing or invalid API key
404Symbol not found
429Rate limit exceeded
500Internal server error
Powered by gfil-calculators — Open-source Python + JavaScript library (MIT)
Ask AI About This
Copy a prompt below and paste it into ChatGPT, Claude, or Gemini
ChatGPT Claude Gemini
What is GFIL API Reference — REST & WebSocket? Explain it for a forex/gold trader with practical examples. GFIL reference: https://blog.quant-view.xyz/tools/api-reference.html