DEV Community

Cover image for 2026 Global Forex Free Real-Time Quotes and Exchange Rates Data API Interface Guide
San Si wu
San Si wu

Posted on

2026 Global Forex Free Real-Time Quotes and Exchange Rates Data API Interface Guide

In 2026, amid the ongoing digital transformation of global financial markets, the demand for foreign exchange (forex) trading data has surged. Forex API interfaces have become indispensable tools for traders, developers, and financial analysts. These interfaces deliver real-time quotes, exchange rates, historical candlestick (K-line) data, and order book depth, enabling algorithmic trading, risk management, and market surveillance. This comprehensive guide compiles a catalog of global forex real-time quotes and exchange rates data API interfaces. I will provide a concise overview of each interface's usage and select three representative interfaces to illustrate with Python code examples.

This article explores how to leverage the iTick API for retrieving forex market data. The interfaces are primarily categorized into RESTful HTTP GET requests and WebSocket real-time streaming. REST APIs are ideal for batch querying historical data or one-off real-time quotes, while WebSockets suit low-latency real-time data subscriptions.

Interface Catalog and Usage Overview

Prior to usage, users must register on the official website to obtain an API token. The following sections summarize the interfaces by module, emphasizing request endpoints and parameters rather than exhaustive code samples. Three typical interfaces will feature detailed Python examples for clarity.
Note: The base URL is https://api.itick.org. Data covers major currency pairs such as EUR/USD and GBP/USD, with the uniform market code "GB". Refer to the official documentation for the latest updates.

1. Real-Time Tick Data (/forex/tick)

  • Description: Retrieves real-time tick data for a single forex currency pair, including the latest price, timestamp, and trading volume.
  • Usage: GET request with parameters region (market code, e.g., "GB") and code (currency pair, e.g., "EURUSD"). The response includes the product code, last price, and more.
  • Applicable Scenarios: Monitoring instantaneous trades for a specific currency pair.

2. Batch Real-Time Order Book Depth (/forex/depths)

  • Description: Fetches batch real-time order book depth data for multiple forex currency pairs, encompassing multi-level bid/ask prices and order quantities.
  • Usage: GET request with parameters region and codes (comma-separated currency pairs, e.g., "EURUSD,GBPUSD"). The response is a dictionary format containing bid/ask data for each pair.
  • Applicable Scenarios: High-frequency trading (HFT) or bulk market depth surveillance.

3. Batch Real-Time Quotes (/forex/quotes)

  • Description: Obtains batch real-time quotes for multiple forex currency pairs, including last price, open price, high/low prices, and percentage change.
  • Usage: GET request with parameters region and codes (comma-separated currency pairs). The response details quote information for each pair.
  • Applicable Scenarios: Real-time portfolio monitoring.

4. Batch Real-Time Tick Data (/forex/ticks)

  • Description: Retrieves batch real-time tick data for multiple forex currency pairs, including last price, timestamp, and trading volume.
  • Usage: GET request with parameters region and codes (comma-separated currency pairs). The response is a dictionary format with tick details for each pair.
  • Applicable Scenarios: Multi-pair trade flow analysis.

5. Real-Time Quote (/forex/quote)

  • Description: Fetches a real-time quote for a single forex currency pair, including last price, open price, high/low prices, and percentage change.
  • Usage: GET request with parameters region and code. The response includes comprehensive quote fields.
  • Applicable Scenarios: Instantaneous market quote queries for a single currency pair.

6. Batch Historical Candlestick Data (/forex/klines)

  • Description: Queries batch historical candlestick (K-line) data for multiple forex currency pairs, supporting various timeframes (from minute to monthly charts).
  • Usage: GET request with parameters region, codes, kType (candlestick type, e.g., 1 for minute bars), limit (number of bars), and optional et (end timestamp). The response is a dictionary with candlestick arrays for each pair.
  • Applicable Scenarios: Historical data analysis or backtesting.

7. Real-Time Order Book Depth (/forex/depth)

  • Description: Retrieves real-time order book depth for a single forex currency pair, including multi-level bid/ask prices and order quantities.
  • Usage: GET request with parameters region and code. The response includes bid/ask arrays.
  • Applicable Scenarios: Assessing market depth for a specific currency pair.

8. Historical Candlestick Data (/forex/kline)

  • Description: Queries historical candlestick (K-line) data for a single forex currency pair, supporting various timeframes.
  • Usage: GET request with parameters region, code, kType, limit, and optional et. The response is a candlestick array.
  • Applicable Scenarios: Trend analysis for a single currency pair.

These interfaces address a spectrum of forex data needs, from real-time to historical and single to batch queries. Developers can select RESTful APIs or WebSockets based on their use case.

Retrieving Real-Time Exchange Rate Quotes

This interface is suited for swiftly obtaining the latest market quotes for a single currency pair. Below is a Python example using the requests library.

import requests

# API Parameters
url = "https://api.itick.org/forex/quote?region=GB&code=EURUSD"
headers = {
    "accept": "application/json",
    "token": "your_token"  # Replace with your API Token
}

# Send Request
response = requests.get(url, headers=headers)

# Process Response
if response.status_code == 200:
    data = response.json()
    if data["code"] == 0:
        quote = data["data"]
        print(f"Currency Pair: {quote['s']}")
        print(f"Last Price: {quote['ld']}")
        print(f"Percentage Change: {quote['chp']}%")
    else:
        print("API Error:", data["msg"])
else:
    print("HTTP Error:", response.status_code)
Enter fullscreen mode Exit fullscreen mode

Upon execution, this will display the real-time quote details for EUR/USD.

Historical Candlestick Data Query

This interface facilitates retrieving historical data for trend analysis. The example queries the most recent 10 bars of 5-minute candlesticks for EUR/USD.

import requests

# API Parameters
url = "https://api.itick.org/forex/kline?region=GB&code=EURUSD&kType=2&limit=10"
headers = {
    "accept": "application/json",
    "token": "your_token"  # Replace with your API Token
}

# Send Request
response = requests.get(url, headers=headers)

# Process Response
if response.status_code == 200:
    data = response.json()
    if data["code"] == 0:
        klines = data["data"]
        for kline in klines[:3]:  # Print only the first 3 for brevity
            print(f"Timestamp: {kline['t']}, Open: {kline['o']}, Close: {kline['c']}, Volume: {kline['v']}")
    else:
        print("API Error:", data["msg"])
else:
    print("HTTP Error:", response.status_code)
Enter fullscreen mode Exit fullscreen mode

This code outputs the initial entries of the candlestick data array, aiding in historical price examination.

WebSocket Real-Time Market Data Streaming

WebSocket provides real-time streaming of forex data, including quotes, ticks, order book depth, and candlesticks. It supports subscriptions to multiple currency pairs via the endpoint wss://api.itick.org/forex. Authenticate with a token and send subscription messages (e.g., {"ac": "subscribe", "params": "EURUSD$GB", "types": "quote"}). Handle heartbeats (ping/pong) to maintain the connection.

The example uses the websocket library to subscribe to EUR/USD quote data and manage heartbeats.

import websocket
import json
import threading
import time

# WebSocket Parameters
WS_URL = "wss://api.itick.org/forex"
API_TOKEN = "your_token"  # Replace with your API Token

def on_message(ws, message):
    data = json.loads(message)
    if data.get("data"):
        market_data = data["data"]
        if market_data.get("type") == "quote":
            print(f"Real-Time Quote: {market_data['s']} - Last Price: {market_data['ld']}")

def on_open(ws):
    print("Connection Established")
    # Subscribe
    subscribe_msg = json.dumps({"ac": "subscribe", "params": "EURUSD$GB", "types": "quote"})
    ws.send(subscribe_msg)

def send_heartbeat(ws):
    while True:
        time.sleep(30)
        ping_msg = json.dumps({"ac": "ping", "params": str(int(time.time() * 1000))})
        ws.send(ping_msg)

# Create Connection
ws = websocket.WebSocketApp(WS_URL,
                            header={"token": API_TOKEN},
                            on_message=on_message,
                            on_open=on_open)

# Start Heartbeat Thread
threading.Thread(target=send_heartbeat, args=(ws,)).start()

# Run WebSocket
ws.run_forever()
Enter fullscreen mode Exit fullscreen mode

Executing this code establishes a WebSocket connection, subscribes to data, and prints real-time quote updates.

Conclusion

These API interfaces equip forex developers in 2026 with a robust toolkit. Whether through RESTful invocations or WebSocket streaming, they cater to diverse requirements. It is recommended to obtain a token from the official documentation and adhere to rate limits. Beginners should start with real-time quote interfaces, while advanced users can harness WebSockets for low-latency applications.

Disclaimer: This article is for code reference only and does not constitute investment advice. Markets involve risks; invest prudently.

Reference Documentation: https://docs.itick.org

GitHub: https://github.com/itick-org/

Top comments (0)