CPlugin

MT5 :: History Data

API v1 (stable) · MT5 · 1 operation · base URL https://cloud.mywebapi.com · OpenAPI v1 (JSON) · Redoc

Every call needs Authorization: Bearer $TOKEN — an OAuth 2.0 client-credentials token from https://auth.cplugin.net/connect/token (scope webapi). $TRADE_PLATFORM_ID is the id of a trade platform registered in Toolbox.

Operations

Minute bars for a symbol.

GET /api/MT5/{tradePlatform}/ChartRequest/{symbol}/{fromTime}/{toTime}

Timeout: 30 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.

Parameters

NameInTypeRequiredDescription
tradePlatform path string (uuid) yes Trade platform id
symbol path string yes The name of the symbol the data is requested for
fromTime path string (date-time) no Default: 0.ToUnixTime64() (01.01.1970) will be used
toTime path string (date-time) no Default: UInt64.MaxValue.ToUnixTime64() will be used
X-Request-Timeout header number (double) no How long to wait for the trade server, in seconds (1–300). Default for this operation: 30 s (history or report). The query parameter requestTimeout does the same for clients that cannot set headers. The applied value is returned in the X-Request-Timeout-Applied response header.

Responses

Example

curl "https://cloud.mywebapi.com/api/MT5/$TRADE_PLATFORM_ID/ChartRequest/$SYMBOL/$FROM_TIME/$TO_TIME" \
  -H "Authorization: Bearer $TOKEN"

Schemas

Types the operations above take and return, with their first-level properties; * marks a required one. The full graph is in the OpenAPI specification.

MT5ChartBar

PropertyTypeDescription
dateTime string (date-time), nullable
open number (double), nullable Bar open price — price at the beginning of bar formation (beginning of a minute).
high number (double), nullable The highest price inside the bar.
low number (double), nullable The lowest price inside the bar.
close number (double), nullable Bar close price — price at the end of bar formation (end of the minute)
tickVolume integer (int64), nullable Tick volume — number of ticks received during bar formation. The variable only counts the ticks that change the price based on which the bar is constructed (Bid or Last, depending on symbol settings). Several ticks in a row with the same price will be counted as one.
spread integer (int32), nullable The lowest symbol spread recorded during the bar formation time.
volume integer (int64), nullable The real volume of trades executed during bar formation.