API Documentation

Welcome to the FXStream developer documentation. Integrate real-time forex rates, historical data, and currency conversions into your applications using our high-performance REST and WebSocket APIs.

key

Authentication

To authenticate your requests, you must include your unique API key as a query parameter in every request. API keys are managed in your account dashboard.

info

Keep your API key secret. Do not share it in client-side code or public repositories.

GET https://api.fxdata.dev/v1/price?symbol=EURUSD&apikey={YOUR_API_KEY}

REST API Reference

GET

/time_series

Get historical OHLC (Open, High, Low, Close) price data for any currency pair over a specific interval.

Parameters

Name Type Description
symbol string Currency pair symbol (e.g., EURUSD)
interval string Interval (1m, 5m, 1h, 1d)
GET

/price

Fetch the latest real-time mid-price for a specific currency pair or multiple pairs.

GET

/convert

Convert any amount from one currency to another using real-time market rates.

GET

/assets

Retrieve a list of all supported currency pairs and financial instruments available on the platform.

WebSocket API

Connection URL

Establish a persistent connection to stream real-time price updates.

wss://ws.fxdata.dev/v1?apikey={apikey}

JSON Message Formats

Subscribe

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

Heartbeat (Server-sent)

{
  "type": "heartbeat",
  "timestamp": 1679934000
}