Import candles data
ImportChartData
Description: Imports historical candlestick chart data for a specified symbol. Accepts an array of candles and optionally replaces existing data.
Request Parameters
| Name |
Type |
Required |
Description |
| candles |
array |
Yes |
Array of candlestick records (each item = [open, high, low, close, volume, time]) |
| flushData |
int |
Yes |
If 1, clears previous data before import; if 0, appends new candles |
| symbol |
string |
Yes |
Trading symbol to import data for (e.g., "EURUSD") |
Request Example
{
"symbol": "EURUSD",
"flushData": 1,
"candles": [
[1.1000, 1.1020, 1.0990, 1.1015, 1200, 1629980000],
[1.1015, 1.1050, 1.1000, 1.1045, 980, 1630066400]
]
}
Response Parameters
| Name |
Type |
Description |
| data |
string |
Returns "OK" if successful |
Response Example