Metatrader 5 api
Quote History
OHLC history
Price history for 30 days
x-api-key<token>
Your API key
In: header
Query Parameters
idstring
Default
"{{id}}"symbolstring
Default
"EURUSD"yearinteger
Default
2022Format
int32monthinteger
Default
6Format
int32dayinteger
Default
1Format
int32timeFrameinteger
Default
240Format
int32Response Body
curl -X GET "https://api.metatraderapi.dev/PriceHistoryMonth?id=%7B%7Bid%7D%7D&symbol=EURUSD&year=2022&month=6&day=1&timeFrame=240"[
{
"time": "2019-08-24T14:15:22Z",
"openPrice": 0.1,
"highPrice": 0.1,
"lowPrice": 0.1,
"closePrice": 0.1,
"tickVolume": 0,
"spread": 0,
"volume": 0
}
]{
"message": "string",
"code": "DONE",
"stackTrace": "string"
}OHLC for 30 days for several symbols
x-api-key<token>
Your API key
In: header
Query Parameters
idstring
Default
"{{id}}"symbolsarray<string>
yearinteger
Default
2022Format
int32monthinteger
Default
6Format
int32dayinteger
Default
1Format
int32timeFrameinteger
Default
240Format
int32Response Body
curl -X GET "https://api.metatraderapi.dev/PriceHistoryMonthMany?id=%7B%7Bid%7D%7D&symbols=string&year=2022&month=6&day=1&timeFrame=240"[
{
"symbol": "string",
"bars": [
{
"time": "2019-08-24T14:15:22Z",
"openPrice": 0.1,
"highPrice": 0.1,
"lowPrice": 0.1,
"closePrice": 0.1,
"tickVolume": 0,
"spread": 0,
"volume": 0
}
]
}
]{
"message": "string",
"code": "DONE",
"stackTrace": "string"
}Price history for today
x-api-key<token>
Your API key
In: header
Query Parameters
idstring
Default
"{{id}}"symbolstring
Symbol
Default
"EURUSD"timeFrameinteger
Default
240Format
int32Response Body
curl -X GET "https://api.metatraderapi.dev/PriceHistoryToday?id=%7B%7Bid%7D%7D&symbol=EURUSD&timeFrame=240"[
{
"time": "2019-08-24T14:15:22Z",
"openPrice": 0.1,
"highPrice": 0.1,
"lowPrice": 0.1,
"closePrice": 0.1,
"tickVolume": 0,
"spread": 0,
"volume": 0
}
]{
"message": "string",
"code": "DONE",
"stackTrace": "string"
}Price history for today for several symbols
x-api-key<token>
Your API key
In: header
Query Parameters
idstring
Default
"{{id}}"symbolsarray<string>
Symbol
timeFrameinteger
Default
240Format
int32Response Body
curl -X GET "https://api.metatraderapi.dev/PriceHistoryTodayMany?id=%7B%7Bid%7D%7D&symbols=string&timeFrame=240"[
{
"symbol": "string",
"bars": [
{
"time": "2019-08-24T14:15:22Z",
"openPrice": 0.1,
"highPrice": 0.1,
"lowPrice": 0.1,
"closePrice": 0.1,
"tickVolume": 0,
"spread": 0,
"volume": 0
}
]
}
]{
"message": "string",
"code": "DONE",
"stackTrace": "string"
}Price history for range
x-api-key<token>
Your API key
In: header
Query Parameters
idstring
Default
"{{id}}"symbolstring
Default
"EURUSD"fromstring
Default
"2022-01-01T00:00:00"tostring
Default
"2022-03-01T00:00:00"timeFrameinteger
Default
240Format
int32Response Body
curl -X GET "https://api.metatraderapi.dev/PriceHistory?id=%7B%7Bid%7D%7D&symbol=EURUSD&from=2022-01-01T00%3A00%3A00&to=2022-03-01T00%3A00%3A00&timeFrame=240"[
{
"time": "2019-08-24T14:15:22Z",
"openPrice": 0.1,
"highPrice": 0.1,
"lowPrice": 0.1,
"closePrice": 0.1,
"tickVolume": 0,
"spread": 0,
"volume": 0
}
]{
"message": "string",
"code": "DONE",
"stackTrace": "string"
}Price history for several symbols
x-api-key<token>
Your API key
In: header
Query Parameters
idstring
Default
"{{id}}"symbolarray<string>
fromstring
Default
"2024-01-01T00:00:00"tostring
Default
"2024-03-01T00:00:00"timeFrameinteger
Default
240Format
int32Response Body
curl -X GET "https://api.metatraderapi.dev/PriceHistoryMany?id=%7B%7Bid%7D%7D&symbol=string&from=2024-01-01T00%3A00%3A00&to=2024-03-01T00%3A00%3A00&timeFrame=240"[
{
"symbol": "string",
"bars": [
{
"time": "2019-08-24T14:15:22Z",
"openPrice": 0.1,
"highPrice": 0.1,
"lowPrice": 0.1,
"closePrice": 0.1,
"tickVolume": 0,
"spread": 0,
"volume": 0
}
],
"exception": "string"
}
]{
"message": "string",
"code": "DONE",
"stackTrace": "string"
}Price history for range
x-api-key<token>
Your API key
In: header
Query Parameters
idstring
Default
"{{id}}"symbolstring
Default
"EURUSD"fromstring
Default
"2022-11-01T00:00:00"tostring
Default
"2022-11-02T00:00:00"timeFrameinteger
Default
60Format
int32Response Body
curl -X GET "https://api.metatraderapi.dev/PriceHistoryHighLow?id=%7B%7Bid%7D%7D&symbol=EURUSD&from=2022-11-01T00%3A00%3A00&to=2022-11-02T00%3A00%3A00&timeFrame=60"{
"time": "2019-08-24T14:15:22Z",
"openPrice": 0.1,
"highPrice": 0.1,
"lowPrice": 0.1,
"closePrice": 0.1,
"tickVolume": 0,
"spread": 0,
"volume": 0
}{
"message": "string",
"code": "DONE",
"stackTrace": "string"
}Request quote history from specified date for several bars back to the past
x-api-key<token>
Your API key
In: header
Query Parameters
idstring
Your Account UUID which you connected via the Dashboard
Default
"demo-token-mt5"symbolstring
Default
"EURUSD"fromstring
Default
"2022-03-01T00:00:00"numBarsinteger
Default
10Format
int32timeFrameinteger
Default
240Format
int32Response Body
curl -X GET "https://api.metatraderapi.dev/PriceHistoryEx?id=demo-token-mt5&symbol=EURUSD&from=2022-03-01T00%3A00%3A00&numBars=10&timeFrame=240"[
{
"time": "2019-08-24T14:15:22Z",
"openPrice": 0.1,
"highPrice": 0.1,
"lowPrice": 0.1,
"closePrice": 0.1,
"tickVolume": 0,
"spread": 0,
"volume": 0
}
]{
"message": "string",
"code": "DONE",
"stackTrace": "string"
}Request quote history from specified date for several bars back to the past
x-api-key<token>
Your API key
In: header
Query Parameters
idstring
Your Account UUID which you connected via the Dashboard
Default
"demo-token-mt5"symbolarray<string>
fromstring
Default
"2022-03-01T00:00:00"numBarsinteger
Default
10Format
int32timeFrameinteger
Default
240Format
int32Response Body
curl -X GET "https://api.metatraderapi.dev/PriceHistoryExMany?id=demo-token-mt5&symbol=string&from=2022-03-01T00%3A00%3A00&numBars=10&timeFrame=240"[
{
"symbol": "string",
"bars": [
{
"time": "2019-08-24T14:15:22Z",
"openPrice": 0.1,
"highPrice": 0.1,
"lowPrice": 0.1,
"closePrice": 0.1,
"tickVolume": 0,
"spread": 0,
"volume": 0
}
],
"exception": "string"
}
]{
"message": "string",
"code": "DONE",
"stackTrace": "string"
}