Logo

    TRACK_OHLC

    Description

    Provides streaming data containing the Open, High, Low, and Close (OHLC) of the specified currencies to the assigned stream data port (default: 8778)

    Important

    After sending the command to the assigned command port (default 8777), the streaming data will be sent to the incoming stream port (default 8778). You can use a secondary terminal (e.g. PuTTY Telnet port 8778) to receive streaming data.

    Example

    {"MSG": "TRACK_OHLC","OHLC":[{"TIMEFRAME": "PERIOD_M1","SYMBOL": "EURUSD"},{"TIMEFRAME": "PERIOD_M1","SYMBOL": "GBPUSD","DEPTH": 2}]}

    Reply

    {
    "MSG": "TRACK_OHLC",
    "SUCCESS": [
    "EURUSD",
    "GBPUSD"
    ],
    "ERROR_ID": 0,
    "ERROR_DESCRIPTION": "The operation completed successfully"
    }

    Stream Data

    {
    "MSG": "TRACK_OHLC",
    "SYMBOL": "EURUSD",
    "PERIOD": "PERIOD_M1",
    "OHLC": [
    {
    "TIME": "2025.09.19 07:00:00",
    "OPEN": 1.17814,
    "HIGH": 1.17816,
    "LOW": 1.17814,
    "CLOSE": 1.17815,
    "TICK_VOLUME": 10
    }
    ]
    }
    {
    "MSG": "TRACK_OHLC",
    "SYMBOL": "GBPUSD",
    "PERIOD": "PERIOD_M1",
    "OHLC": [
    {
    "TIME": "2025.09.04 09:37:00",
    "OPEN": 1.34306,
    "HIGH": 1.34308,
    "LOW": 1.34305,
    "CLOSE": 1.34306,
    "TICK_VOLUME": 9
    },
    {
    "TIME": "2025.09.04 09:36:00",
    "OPEN": 1.34305,
    "HIGH": 1.34309,
    "LOW": 1.34295,
    "CLOSE": 1.34306,
    "TICK_VOLUME": 53
    }
    ]
    }
    {
    "MSG": "TRACK_OHLC",
    "SYMBOL": "EURUSD",
    "PERIOD": "PERIOD_M1",
    "OHLC": [
    {
    "TIME": "2025.09.19 10:44:00",
    "OPEN": 1.17718,
    "HIGH": 1.17718,
    "LOW": 1.17718,
    "CLOSE": 1.17718,
    "TICK_VOLUME": 1
    }
    ]
    }
    {
    "MSG": "TRACK_OHLC",
    "SYMBOL": "GBPUSD",
    "PERIOD": "PERIOD_M1",
    "OHLC": [
    {
    "TIME": "2025.09.19 10:44:00",
    "OPEN": 1.35005,
    "HIGH": 1.35005,
    "LOW": 1.35005,
    "CLOSE": 1.35005,
    "TICK_VOLUME": 1
    },
    {
    "TIME": "2025.09.19 10:43:00",
    "OPEN": 1.35003,
    "HIGH": 1.3503,
    "LOW": 1.34989,
    "CLOSE": 1.35006,
    "TICK_VOLUME": 127
    }
    ]
    }
    Stopping the stream

    Send a simple command without any parameters.

    To Stop the Stream

    {"MSG": "TRACK_OHLC"}

    Reply

    {
    "MSG": "TRACK_OHLC",
    "SUCCESS": [],
    "ERROR_ID": 0,
    "ERROR_DESCRIPTION": "OHLC tracking stopped"
    }