CPlugin

MT5 v2 :: Market Data

API v2 (current) · MT5 · 13 operations · base URL https://cloud.mywebapi.com · OpenAPI v2 (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

Get the last quote of a symbol

GET /api/v2/MT5/{tradePlatform}/TickLast/{symbol}

Returns the latest quote of the symbol as the trade server currently holds it, with the spread difference of the manager's group already applied — the same figure the terminals of that group see. Use TickLastRaw for the quote exactly as the data provider sent it.

The call only reads and changes nothing. It requires a connection to the trade platform; without one the call is answered with a "not connected" error. The symbol must be part of the quotes the connection receives, otherwise the trade server answers with an error.

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 identifier (GUID).
symbol path string yes Symbol name, e.g. "EURUSD".
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/v2/MT5/$TRADE_PLATFORM_ID/TickLast/$SYMBOL" \
  -H "Authorization: Bearer $TOKEN"

Get the last raw quote of a symbol

GET /api/v2/MT5/{tradePlatform}/TickLastRaw/{symbol}

Returns the latest quote of the symbol exactly as the history server received it from the data provider: no spread difference of any group is applied, unlike TickLast.

The call only reads and changes nothing. It requires a connection to the trade platform and the right to read raw quotes; without the right the trade server answers with a permission error. The symbol must be part of the quotes the connection receives.

Timeout: 10 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 identifier (GUID).
symbol path string yes Symbol name, e.g. "EURUSD".
X-Request-Timeout header number (double) no How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). 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/v2/MT5/$TRADE_PLATFORM_ID/TickLastRaw/$SYMBOL" \
  -H "Authorization: Bearer $TOKEN"

Get statistical information about the quotes of a symbol

GET /api/v2/MT5/{tradePlatform}/TickStat/{symbol}

Returns the session figures of the symbol: the extremes of the bid, the ask and the last deal price, the extremes of the deal volume, and the totals of the session — the number of deals, their volume and turnover, and the buy and sell orders received. Fields the trade server does not fill are returned as zero.

The call only reads and changes nothing. It requires a connection to the trade platform, and the symbol must be part of the quotes the connection receives.

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 identifier (GUID).
symbol path string yes Symbol name, e.g. "EURUSD".
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/v2/MT5/$TRADE_PLATFORM_ID/TickStat/$SYMBOL" \
  -H "Authorization: Bearer $TOKEN"

Get the raw tick stream of a symbol

GET /api/v2/MT5/{tradePlatform}/TickHistoryRequestRaw/{symbol}

Returns the stored quotes of the symbol for a time window, both the raw ones and the processed ones the symbol configuration produces, ordered by time ascending. When the symbol stores raw quotes, the stream is denser than the one TicksHistory returns.

Times are the trading times of the trade server, not UTC. from is required — a window without a start would scan the whole stored history. to is optional and defaults to the current server time. limit is 0 by default and returns the whole window; a positive value caps the returned ticks and sets truncated. There is no pagination: to read further, repeat the request with from moved past the last returned tick.

The call only reads and changes nothing. When the platform has not received the requested history yet, the call fails with the platform code MT_RET_OK_NONE and a message saying the history is not synchronized — such a request may be repeated later.

The window is limited to one day and the answer to one million ticks, because the whole history of that window is materialised by the trade server interface before the limit is applied. Ask for a day at a time and continue from the last tick returned; a longer window is refused rather than served at the risk of the service's memory.

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 identifier (GUID).
symbol path string yes Symbol name the quotes are requested for.
from query string (date-time) yes Window start, as a trading time of the trade server. Required.
to query string (date-time) no Window end, as a trading time of the trade server. Optional — the current server time when omitted.
limit query integer (int32) no Maximum number of ticks returned; 0 means no limit within the window. Defaults to 0.
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/v2/MT5/$TRADE_PLATFORM_ID/TickHistoryRequestRaw/$SYMBOL?from=$FROM" \
  -H "Authorization: Bearer $TOKEN"

Add a quote into the price stream

POST /api/v2/MT5/{tradePlatform}/TickAdd

Publishes a quote into the live price stream of the trade server, where terminals and subscribers receive it like a quote from a data provider. The quote is not written into the stored tick history — use TickHistoryAdd for that.

The symbol is part of the body: the route carries none, and a body without a symbol is rejected. Times left out are filled by the server with its current trading time; when both the second and the millisecond time are given, the millisecond one wins.

The call changes the stream other participants see. It is not reversible: a quote cannot be withdrawn once published, and a wrong price reaches every connected terminal at once. The response confirms the trade server accepted the quote; it does not mean a terminal has already received it.

Timeout: 15 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: The operation may still be completed by the server (X-Request-Outcome: unknown): check its result before repeating it.

Parameters

NameInTypeRequiredDescription
tradePlatform path string (uuid) yes Trade platform identifier (GUID).
X-Request-Timeout header number (double) no How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). 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.

Request body

MT5MarketTick (application/json) — The quote to publish; its symbol is mandatory.

Responses

Example

curl -X POST "https://cloud.mywebapi.com/api/v2/MT5/$TRADE_PLATFORM_ID/TickAdd" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "symbol": "", "bank": "", "time": 0, "timeMsc": 0, "bid": 0, "ask": 0 }'

Add several quotes into the price stream

POST /api/v2/MT5/{tradePlatform}/TickAddBatch

Publishes a batch of quotes into the live price stream of the trade server in one call. Each record carries its own symbol, so one batch may feed several instruments. Records are published in the order they are sent, and no sorting or window check is performed by the service.

The call changes the stream other participants see and is not reversible — a wrong price reaches every connected terminal at once. The trade server applies the batch as a whole: the response reports the outcome of the call, and a platform error code means the batch was refused, not partially applied.

Timeout: 15 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: The operation may still be completed by the server (X-Request-Outcome: unknown): check its result before repeating it.

Parameters

NameInTypeRequiredDescription
tradePlatform path string (uuid) yes Trade platform identifier (GUID).
X-Request-Timeout header number (double) no How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). 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.

Request body

MT5MarketTickAddBatchRequest (application/json) — Quotes to publish; every record must carry its symbol.

Responses

Example

curl -X POST "https://cloud.mywebapi.com/api/v2/MT5/$TRADE_PLATFORM_ID/TickAddBatch" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "ticks": [{}] }'

Publish statistical information about the price

POST /api/v2/MT5/{tradePlatform}/TickAddStat

Publishes session statistics for the symbol of the given quote: the extremes of the bid, the ask and the last deal price, the extremes of the deal volume and the session totals. The figures replace the ones the trade server currently holds for the symbol, so send the complete set — a field left out is published as zero.

The call changes the figures terminals and subscribers display and is not reversible: the previous statistics are not kept anywhere and cannot be restored through the API.

Timeout: 15 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: The operation may still be completed by the server (X-Request-Outcome: unknown): check its result before repeating it.

Parameters

NameInTypeRequiredDescription
tradePlatform path string (uuid) yes Trade platform identifier (GUID).
X-Request-Timeout header number (double) no How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). 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.

Request body

MT5MarketTickAddStatRequest (application/json) — The quote and the statistics to publish.

Responses

Example

curl -X POST "https://cloud.mywebapi.com/api/v2/MT5/$TRADE_PLATFORM_ID/TickAddStat" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "tick": { "symbol": {}, "bank": {}, "time": {}, "timeMsc": {}, "bid": {}, "ask": {} }, "stat": { "symbol": {}, "time": {}, "timeMsc": {}, "dateTime": {}, "bidHigh": {}, "bidLow": {} } }'

Add ticks into the stored tick history

POST /api/v2/MT5/{tradePlatform}/TickHistoryAdd/{symbol}

Writes quotes directly into the tick history of the symbol, where they become part of the stored history terminals load. Unlike TickAdd, the quotes are not published into the live stream. The symbol comes from the route; the records carry no symbol of their own, and they are written in the order they are sent — the service neither sorts them nor checks them against the stored window.

The call changes the history of the trade server and is not reversible: an added tick can be removed only by replacing the whole window with TickHistoryReplace, so keep a backup of the trade server before writing. The response confirms the trade server accepted the records, not that terminals have already reloaded the history.

Timeout: 15 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: The operation may still be completed by the server (X-Request-Outcome: unknown): check its result before repeating it.

Parameters

NameInTypeRequiredDescription
tradePlatform path string (uuid) yes Trade platform identifier (GUID).
symbol path string yes Symbol name whose history is written, e.g. "EURUSD".
X-Request-Timeout header number (double) no How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). 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.

Request body

MT5MarketTickWriteRequest (application/json) — Ticks to add.

Responses

Example

curl -X POST "https://cloud.mywebapi.com/api/v2/MT5/$TRADE_PLATFORM_ID/TickHistoryAdd/$SYMBOL" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "ticks": [{}] }'

Replace the stored ticks of a period

POST /api/v2/MT5/{tradePlatform}/TickHistoryReplace/{symbol}

Replaces the whole tick history of the symbol inside the given window with the records sent: every stored tick whose time falls into the window is removed, and the sent ones are written instead. A window left out is rejected — an empty body of records would otherwise erase the whole history of the symbol.

The window is given in the trading time of the trade server and is inclusive of its bounds. At least one record is required: the call replaces the window with what it is given, so an empty list would only erase the period.

The call changes the history of the trade server and is not reversible: the removed ticks are not kept anywhere, so keep a backup of the trade server before writing. The response confirms the trade server accepted the call, not that terminals have already reloaded the history.

Timeout: 15 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: The operation may still be completed by the server (X-Request-Outcome: unknown): check its result before repeating it.

Parameters

NameInTypeRequiredDescription
tradePlatform path string (uuid) yes Trade platform identifier (GUID).
symbol path string yes Symbol name whose history is replaced, e.g. "EURUSD".
from query string (date-time) yes Window start, as a trading time of the trade server. Required.
to query string (date-time) yes Window end, as a trading time of the trade server. Required.
X-Request-Timeout header number (double) no How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). 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.

Request body

MT5MarketTickWriteRequest (application/json) — Ticks to write into the window.

Responses

Example

curl -X POST "https://cloud.mywebapi.com/api/v2/MT5/$TRADE_PLATFORM_ID/TickHistoryReplace/$SYMBOL?from=$FROM&to=$TO" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "ticks": [{}] }'

Change the stored minute bars of a symbol

POST /api/v2/MT5/{tradePlatform}/ChartUpdate/{symbol}

Writes the sent minute bars over the stored ones: a bar with the same opening time is replaced, a bar with a new time is added. The symbol comes from the route. Bars are applied in the order they are sent; the service neither sorts them nor checks them against the stored range.

A bar whose opening price is zero deletes the stored bar with the same time. That is the only way to remove a bar through this call — use ChartDelete to delete bars by time without sending prices.

The call changes the history of the trade server and is not reversible: a replaced bar is not kept anywhere, so keep a backup of the trade server before writing. The response confirms the trade server accepted the bars, not that terminals have already reloaded them.

Timeout: 15 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: The operation may still be completed by the server (X-Request-Outcome: unknown): check its result before repeating it.

Parameters

NameInTypeRequiredDescription
tradePlatform path string (uuid) yes Trade platform identifier (GUID).
symbol path string yes Symbol name whose bars are changed, e.g. "EURUSD".
X-Request-Timeout header number (double) no How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). 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.

Request body

MT5MarketChartWriteRequest (application/json) — Bars to write; each must carry its opening time.

Responses

Example

curl -X POST "https://cloud.mywebapi.com/api/v2/MT5/$TRADE_PLATFORM_ID/ChartUpdate/$SYMBOL" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "bars": [{}] }'

Replace the stored minute bars of a period

POST /api/v2/MT5/{tradePlatform}/ChartReplace/{symbol}

Replaces the whole chart history of the symbol inside the given window with the bars sent: every stored bar whose time falls into the window is removed, and the sent ones are written instead. A bar of the window left out is therefore lost, which is what makes the call different from ChartUpdate.

The window is given in the trading time of the trade server and is inclusive of its bounds. Both bounds and at least one bar are required: without a window the call would erase the whole chart history of the symbol, and an empty list would only erase the period. Use ChartDelete to remove bars without sending replacements.

The call changes the history of the trade server and is not reversible: removed bars are not kept anywhere, so keep a backup of the trade server before writing. The response confirms the trade server accepted the call, not that terminals have already reloaded the history.

Timeout: 15 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: The operation may still be completed by the server (X-Request-Outcome: unknown): check its result before repeating it.

Parameters

NameInTypeRequiredDescription
tradePlatform path string (uuid) yes Trade platform identifier (GUID).
symbol path string yes Symbol name whose bars are replaced, e.g. "EURUSD".
from query string (date-time) yes Window start, as a trading time of the trade server. Required.
to query string (date-time) yes Window end, as a trading time of the trade server. Required.
X-Request-Timeout header number (double) no How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). 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.

Request body

MT5MarketChartWriteRequest (application/json) — Bars to write into the window.

Responses

Example

curl -X POST "https://cloud.mywebapi.com/api/v2/MT5/$TRADE_PLATFORM_ID/ChartReplace/$SYMBOL?from=$FROM&to=$TO" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "bars": [{}] }'

Delete minute bars of a symbol

POST /api/v2/MT5/{tradePlatform}/ChartDelete/{symbol}

Removes the stored minute bars with the given opening times from the chart history of the symbol. Times are the trading times of the trade server, in seconds since 01.01.1970 — the same values the chart read returns.

The call changes the history of the trade server and is not reversible: a deleted bar is not kept anywhere, so keep a backup of the trade server before writing. A time that has no stored bar is ignored, so repeating the call with the same times is harmless. The response confirms the trade server accepted the times, not that terminals have already reloaded the history.

Timeout: 15 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: The operation may still be completed by the server (X-Request-Outcome: unknown): check its result before repeating it.

Parameters

NameInTypeRequiredDescription
tradePlatform path string (uuid) yes Trade platform identifier (GUID).
symbol path string yes Symbol name whose bars are deleted, e.g. "EURUSD".
X-Request-Timeout header number (double) no How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). 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.

Request body

MT5MarketChartDeleteRequest (application/json) — Opening times of the bars to delete.

Responses

Example

curl -X POST "https://cloud.mywebapi.com/api/v2/MT5/$TRADE_PLATFORM_ID/ChartDelete/$SYMBOL" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "times": [0] }'

Split the price history of a symbol

POST /api/v2/MT5/{tradePlatform}/ChartSplit/{symbol}

Converts the stored bars and ticks of the symbol by the ratio of the new shares to the old ones — a split when there are more new shares, a consolidation when there are fewer — and rounds the converted prices by the chosen rule to the number of digits the symbol allows. The optional window limits the conversion to a period; without it the whole stored history of the symbol is converted.

The call changes both the bar history and the tick history of the trade server and is not reversible: the original prices are not kept anywhere, so keep a backup of the trade server before writing. The operation runs on the server in the background: the response confirms the command was accepted, not that the split has finished, and a split already running for the symbol is neither interrupted nor started again.

Timeout: 5 s by default, adjustable per request with the X-Request-Timeout header. When the trade server does not answer in time: The operation may still be completed by the server (X-Request-Outcome: unknown): check its result before repeating it.

Parameters

NameInTypeRequiredDescription
tradePlatform path string (uuid) yes Trade platform identifier (GUID).
symbol path string yes Symbol name whose history is split, e.g. "EURUSD".
newShares query integer (int32) no Number of shares after the split; must be positive.
oldShares query integer (int32) no Number of shares before the split; must be positive.
roundingRule query MT5ChartRoundingRule no How converted prices are rounded to the digits of the symbol.
from query string (date-time) no Window start, as a trading time of the trade server. Optional — the whole history when omitted.
to query string (date-time) no Window end, as a trading time of the trade server. Optional — the whole history when omitted.
X-Request-Timeout header number (double) no How long to wait for the trade server, in seconds (1–300). Default for this operation: 5 s (trade operation). 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 -X POST "https://cloud.mywebapi.com/api/v2/MT5/$TRADE_PLATFORM_ID/ChartSplit/$SYMBOL" \
  -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.

MT5MarketTickShortApiResponse

Unified v2 response envelope: data is the payload (null on error); error is the error object (null on success, always serialised); meta contains response metadata (activityId and optional paging). HTTP status is always 200.

PropertyTypeDescription
data MT5MarketTickShort A summary quote record of a symbol.
error ApiError v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4 ResultCode (serialized as a string for a known enum member, or as a number for an unrecognised value returned by MT4); Message is a human-readable description.
meta ApiMeta Response metadata. ActivityId identifies the request — quote it when you contact support. Paging is present only on paginated list responses; otherwise it is omitted.

MT5MarketTickStatApiResponse

Unified v2 response envelope: data is the payload (null on error); error is the error object (null on success, always serialised); meta contains response metadata (activityId and optional paging). HTTP status is always 200.

PropertyTypeDescription
data MT5MarketTickStat Statistical information about the quotes of a symbol.
error ApiError v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4 ResultCode (serialized as a string for a known enum member, or as a number for an unrecognised value returned by MT4); Message is a human-readable description.
meta ApiMeta Response metadata. ActivityId identifies the request — quote it when you contact support. Paging is present only on paginated list responses; otherwise it is omitted.

MT5TickPageApiResponse

Unified v2 response envelope: data is the payload (null on error); error is the error object (null on success, always serialised); meta contains response metadata (activityId and optional paging). HTTP status is always 200.

PropertyTypeDescription
data MT5TickPage Ticks of one history request, v2 read DTO.
error ApiError v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4 ResultCode (serialized as a string for a known enum member, or as a number for an unrecognised value returned by MT4); Message is a human-readable description.
meta ApiMeta Response metadata. ActivityId identifies the request — quote it when you contact support. Paging is present only on paginated list responses; otherwise it is omitted.

MT5MarketTick

A full quote record of a symbol.

PropertyTypeDescription
symbol string, nullable Name of the trading instrument the quote belongs to. Mandatory.
bank string, nullable Name of the price source (liquidity provider) as the sender reports it.
time integer (int64), nullable Quote time — seconds since 01.01.1970 in the trading time of the trade server.
timeMsc integer (int64), nullable Quote time — milliseconds since 01.01.1970 in the trading time of the trade server.
bid number (double), nullable Bid price.
ask number (double), nullable Ask price.
last number (double), nullable Price of the last committed deal.
volume integer (int64), nullable Volume of the last deal, as the data provider passed it.
volumeExt integer (int64), nullable Volume of the last deal with extended accuracy; wins over volume when both are given.
flags MT5TickDealFlags Direction of the last deal: None, Buy or Sell.

BooleanApiResponse

Unified v2 response envelope: data is the payload (null on error); error is the error object (null on success, always serialised); meta contains response metadata (activityId and optional paging). HTTP status is always 200.

PropertyTypeDescription
data boolean
error ApiError v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4 ResultCode (serialized as a string for a known enum member, or as a number for an unrecognised value returned by MT4); Message is a human-readable description.
meta ApiMeta Response metadata. ActivityId identifies the request — quote it when you contact support. Paging is present only on paginated list responses; otherwise it is omitted.

MT5MarketTickAddBatchRequest

Quotes to add into the price stream in one call.

PropertyTypeDescription
ticks MT5MarketTick[] Quotes to add. Must be non-empty.

MT5MarketTickAddStatRequest

A quote together with the statistical information to publish with it.

PropertyTypeDescription
tick MT5MarketTick The quote the statistics belong to. Mandatory.
stat MT5MarketTickStat The statistical information to publish. Mandatory.

MT5MarketTickWriteRequest

Ticks to write into the tick history of a symbol.

PropertyTypeDescription
ticks MT5MarketTickShort[] Ticks to write. Must be non-empty.

MT5MarketChartWriteRequest

Minute bars to write into the chart history of a symbol.

PropertyTypeDescription
bars MT5MarketChartBar[] Bars to write. Must be non-empty.

MT5MarketChartDeleteRequest

Bars to delete from the chart history of a symbol.

PropertyTypeDescription
times integer (int64)[] Opening times of the bars to delete, in seconds since 01.01.1970. Must be non-empty.

MT5ChartRoundingRule

Rounding rule applied to prices converted by a split.

Values: Standard, Down, Up

MT5MarketTickShort

A summary quote record of a symbol.

PropertyTypeDescription
time integer (int64) Quote time — seconds since 01.01.1970 in the trading time of the trade server.
timeMsc integer (int64) Quote time — milliseconds since 01.01.1970 in the trading time of the trade server.
dateTime string (date-time) The same quote time as a date-time without offset, for direct reading.
bid number (double) Bid price.
ask number (double) Ask price.
last number (double) Price of the last committed deal.
volume integer (int64) Volume of the last deal, as the data provider passed it.
volumeExt integer (int64) Volume of the last deal with extended accuracy.
flags string, nullable Kind of the tick as the names of the set flags, for example "Bid, Volume".

ApiError

v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4 ResultCode (serialized as a string for a known enum member, or as a number for an unrecognised value returned by MT4); Message is a human-readable description.

PropertyTypeDescription
code WebApiErrorCode Stable transport-level error code.
managerCode ResultCode Raw MT4/MT5 manager result code, when the error came from the trading platform; otherwise null.
message string, nullable Human-readable error description.

ApiMeta

Response metadata. ActivityId identifies the request — quote it when you contact support. Paging is present only on paginated list responses; otherwise it is omitted.

PropertyTypeDescription
activityId string, nullable W3C trace id of the request. Quote it when you contact support: it finds this exact call in the server logs.
paging PagingMeta Pagination info; present only on list responses, omitted otherwise.

MT5MarketTickStat

Statistical information about the quotes of a symbol.

PropertyTypeDescription
symbol string, nullable Name of the trading instrument the statistics belong to.
time integer (int64) Time the statistics refer to — seconds since 01.01.1970 in the trading time of the trade server.
timeMsc integer (int64) The same time in milliseconds since 01.01.1970.
dateTime string (date-time) The same time as a date-time without offset, for direct reading.
bidHigh number (double) Highest bid of the session.
bidLow number (double) Lowest bid of the session.
askHigh number (double) Highest ask of the session.
askLow number (double) Lowest ask of the session.
lastHigh number (double) Highest last deal price of the session.
lastLow number (double) Lowest last deal price of the session.
volumeHigh integer (int64) Highest deal volume of the session.
volumeLow integer (int64) Lowest deal volume of the session.
volumeHighExt integer (int64) Highest deal volume of the session with extended accuracy.
volumeLowExt integer (int64) Lowest deal volume of the session with extended accuracy.
tradeDeals integer (int64) Number of deals of the session.
tradeVolume integer (int64) Volume of the deals of the session.
tradeTurnover integer (int64) Turnover of the session.
tradeInterest integer (int64) Volume of the effective contracts of the session.
tradeBuyOrders integer (int64) Number of buy orders received during the session.
tradeBuyVolume integer (int64) Volume of buy orders received during the session.
tradeSellOrders integer (int64) Number of sell orders received during the session.
tradeSellVolume integer (int64) Volume of sell orders received during the session.
tradeVolumeExt integer (int64) Volume of the deals of the session with extended accuracy.
tradeBuyVolumeExt integer (int64) Volume of buy orders of the session with extended accuracy.
tradeSellVolumeExt integer (int64) Volume of sell orders of the session with extended accuracy.
priceOpen number (double) Opening price of the session.
priceClose number (double) Closing price of the session.
priceAw number (double) Average weighted price of the session.
priceVolatility number (double) Price volatility of the session.
priceTheoretical number (double) Theoretical option price.
priceGreeksDelta number (double) Option delta — sensitivity of the theoretical price to the underlying price.
priceGreeksTheta number (double) Option theta — sensitivity of the theoretical price to the time to expiry.
priceGreeksGamma number (double) Option gamma — sensitivity of delta to the underlying price.
priceGreeksVega number (double) Option vega — sensitivity of the theoretical price to volatility.
priceGreeksRho number (double) Option rho — sensitivity of the theoretical price to the interest rate.
priceGreeksOmega number (double) Option omega — elasticity of the theoretical price to the underlying price.
priceSensitivity number (double) Sensitivity of the theoretical price used by the pricing model of the server.

MT5TickPage

Ticks of one history request, v2 read DTO.

PropertyTypeDescription
ticks MT5TickV2[] Ticks of this page, ordered by time ascending.
total integer (int32) Total number of ticks in the requested window.
truncated boolean True when Total exceeds the page and more ticks were available than returned.

MT5TickDealFlags

Direction of the last deal a quote reports, as a set of flags. Flags: names of the set bits joined by ", " ("Buy, Sell"), "None" when none is set; a set bit without a name is "Bit<n>" (bit number). Bits: Buy = 0x1, Sell = 0x2.

MT5MarketChartBar

One minute bar of a symbol, as sent for a history change.

PropertyTypeDescription
time string (date-time), nullable Bar opening time as a trading time of the trade server. Mandatory.
open number (double) Open price. A value of zero deletes the stored bar with the same time.
high number (double) Highest price of the minute.
low number (double) Lowest price of the minute.
close number (double) Close price of the minute.
tickVolume integer (int64) Tick volume — the number of incoming ticks that moved the quote during the minute.
spread integer (int32) Lowest spread, in points, recorded while the minute was forming.
volume integer (int64) Real traded volume executed during the minute.