Skip to main content
Skip to main content

Finage Connector

Building forex charts (EURUSD, GBPUSD) with a UK-based market data vendor? The Finage connector wraps the Finage API and implements the same DataAdapter contract as Twelve Data and Binance.

Loading chart…

Use the controls above to switch forex pair and timeframe. This docs demo routes requests through /api/finage so your API key stays on the server.

Standalone demo

Full-page version with sample code: Finage live demo.

API key required

Finage requires a REST API key in production. Store it in FINAGE_API_KEY and run the adapter on your server or behind a proxy — never ship the key in a browser bundle. For local docs demos, add the key to apps/docs/.env.local.

What you get

FeatureDetails
ForexMajors and minors (EURUSD, USDJPY, …)
HistoryOHLCV via /agg/forex/{symbol}/{multiply}/{time}/{from}/{to}
Live ticksWebSocket (with socket key) or REST polling fallback
SymbolsCompact EURUSD; also accepts EUR/USD, EUR-USD

Perfect for forex dashboards and UK/EU fintech prototypes.

Finage vs Twelve Data

FinageTwelve Data
Symbol formatEURUSDEUR/USD
History APIDate-range aggregatesoutputsize time series
WebSocket URLPer-account from dashboardSingle public endpoint
Demo keyNo — free signupdemo key available
Best forFinage customers, UK vendorQuick multi-asset demo

Both fit forex + multi-asset backends. Pick the vendor your license covers.

Licensing

TierTypical use
FreeDevelopment, personal testing
PaidProduction apps with external display

Check Finage pricing before shipping to end users.

Install

npm install @efixdata/exeria-chart @efixdata/connector-finage

Minimal example (Node.js)

import { createChart } from "@efixdata/exeria-chart";
import { FinageAdapter } from "@efixdata/connector-finage";

const connector = new FinageAdapter({
apiKey: process.env.FINAGE_API_KEY!,
});

const chart = createChart({
container,
dataAdapter: connector,
});

chart.init();

await chart.loadData("EURUSD", {
interval: "1h",
limit: 500,
});

chart.subscribeToUpdates("EURUSD", (tick) => {
console.log("Last price:", tick.price ?? tick.c);
});

Step by step

1 — Get an API key

Sign up at finage.co.uk, generate a REST API key, and store it securely:

export FINAGE_API_KEY=your_key_here

For WebSocket streaming, copy your socket key and WebSocket URL from the Finage dashboard into FINAGE_WS_URL.

2 — Create the connector

const connector = new FinageAdapter({
apiKey: process.env.FINAGE_API_KEY!,
});

3 — Attach to the chart

const chart = createChart({ container, dataAdapter: connector });
chart.init();

4 — Load history

await chart.loadData("EURUSD", {
interval: "1h",
limit: 500,
});
OptionMeaning
interval"1m", "1h", "1d", "1w", "1M" (mapped to Finage multiply + time)
limitRecent N candles (max 5000)
from / toOptional date range (YYYY-MM-DD)

5 — Go live

chart.subscribeToUpdates("EURUSD");

With wsUrl configured, uses Finage WebSocket. Otherwise polls /last/forex/{symbol}.

6 — Clean up

chart.unsubscribeFromUpdates();
await connector.disconnect();
SymbolMarket
EURUSDEuro / US Dollar
GBPUSDBritish Pound / US Dollar
USDJPYUS Dollar / Japanese Yen
USDCHFUS Dollar / Swiss Franc
AUDUSDAustralian Dollar / US Dollar

Slash and dash forms are normalized to compact Finage symbols.

Next.js API route (browser-safe pattern)

// app/api/forex/ohlcv/route.ts
import { FinageAdapter } from "@efixdata/connector-finage";
import { NextResponse } from "next/server";

const connector = new FinageAdapter({
apiKey: process.env.FINAGE_API_KEY!,
});

export async function GET(request: Request) {
const { searchParams } = new URL(request.url);
const symbol = searchParams.get("symbol") ?? "EURUSD";
const interval = searchParams.get("interval") ?? "1h";
const limit = Number(searchParams.get("limit") ?? "500");

await connector.initialize({});
const candles = await connector.getHistoricalData(symbol, { interval, limit });

return NextResponse.json({ candles });
}

Configuration

const connector = new FinageAdapter({
apiKey: process.env.FINAGE_API_KEY!,
baseUrl: "https://api.finage.co.uk",
wsUrl: process.env.FINAGE_WS_URL,
pollIntervalMs: 3000,
requestTimeout: 10000,
maxRetries: 3,
onError: (error) => console.error("Finage error:", error),
});

Limits to know

TopicLimit
Rate limitsPlan-specific; cache history server-side
Forex hoursMarket trades 24/5; weekend shows last available quote
BrowserUse a backend proxy; do not expose apiKey client-side
WebSocketRequires separate socket key from dashboard

What is next?