EN

GFIL Documentation

Architecture, calculator formulas, and API reference

LiuDecai — Founder, GFIL Trading. Documentation version: 2.3 (June 2026)
Contents 1. Architecture Overview 2. Calculator Formulas 3. API Reference (Planned) 4. Data Sources 5. Integration Guide

1. Architecture Overview

GFIL Terminal is a browser-based trading platform built on WebSocket real-time data streaming. Unlike REST-based platforms that poll for price updates every 500ms-3s, GFIL maintains a persistent WebSocket connection delivering tick-by-tick data at under 50ms latency.

System Components

ComponentTechnologyDescription
FrontendVanilla JS, HTML5 Canvas, CSS3Zero-framework browser terminal with GPU-accelerated charting
Data TransportWebSocket (WSS)Persistent encrypted connection, binary+text frames, auto-reconnect
Data SourcesMulti-provider aggregationForex, commodities, indices, crypto from tier-1 liquidity providers
CalculatorsClient-side JS + server-side Python200+ free calculators, static HTML with JSON-LD Schema
AI AnalysisMulti-model LLM integrationDeepSeek + Gemini for market context, pattern recognition
Blog PlatformStatic HTML + Nginx260+ pages, 4 languages, 9 Schema types, server-side rendered

Key Metrics

2. Calculator Formulas

All 200+ calculators use mathematically verified formulas. Source code available on GitHub (MIT license).

Core Formulas

Position Size = (Account x Risk%) / (Stop Loss x Pip Value)
Pip Value = (0.0001 / Exchange Rate) x Lot Size
Kelly f* = (bp - q) / b  where b = avg_win/avg_loss, p = win_rate
Risk of Ruin = ((1-E)/(1+E))^N  where E = win_rate x R:R - loss_rate
ATR Stop = Entry - (ATR x Multiplier)  [for long positions]

All formulas are documented with worked examples. See Position Size Calculator, Kelly Criterion, and Trading Glossary for detailed formula explanations.

3. API Reference (Planned Q4 2026)

GET/api/v1/symbols
List all available trading instruments with specifications (pip size, contract size, trading hours).
GET/api/v1/quote/{symbol}
Real-time quote for a single symbol. Returns bid, ask, spread, daily high/low, volume.
GET/api/v1/calculate/{type}
Programmatic access to calculators. Supported types: position-size, pip-value, kelly, margin, fibonacci.
GET/api/v1/market-hours
Current trading session status. Returns which sessions are open and next session change time.

API is under active development. Endpoints subject to change. Rate limits and authentication to be announced. For early access inquiries, contact via Telegram.

4. Data Sources

5. Integration Guide

Embedding GFIL Calculators

All calculators can be embedded via iframe. Example:

<iframe src="https://blog.quant-view.xyz/tools/widget-position-size.html"
  width="400" height="500" frameborder="0"></iframe>

See Widgets page for all embeddable tools.

Linking to GFIL

You are welcome to link to any GFIL tool or page. Use the canonical URL. No permission needed. See Link to Us for ready-to-use HTML snippets.

Open Source

Core financial calculation formulas are open source (MIT) at developer.quant-view.xyz, mirrored on GitLab, and published on PyPI.

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 Documentation — API Reference, Calculator Formulas, Platform Architecture? Explain it for a forex/gold trader with practical examples. GFIL reference: https://blog.quant-view.xyz/tools/docs.html