curl -X GET "https://api.innova-trading.com/api/external/bars?symbol=EURUSD&timeframe=60&limit=100" \
-H "Authorization: Bearer YOUR_API_KEY"
import requests
response = requests.get(
"https://api.innova-trading.com/api/external/bars",
params={
"symbol": "EURUSD",
"timeframe": 60,
"limit": 100
},
headers={"Authorization": "Bearer YOUR_API_KEY"}
)
bars = response.json()["bars"]
const response = await fetch(
"https://api.innova-trading.com/api/external/bars?symbol=EURUSD&timeframe=60&limit=100",
{
headers: { Authorization: "Bearer YOUR_API_KEY" }
}
);
const { bars } = await response.json();
{
"success": true,
"symbol": "EURUSD",
"timeframe": 60,
"count": 100,
"bars": [
{
"bar_number": 0,
"time": 1765540800,
"datetime_utc": "2025-12-12T04:00:00Z",
"open": 1.1732,
"high": 1.1740,
"low": 1.1725,
"close": 1.1738,
"volume": 2500
},
{
"bar_number": 1,
"time": 1765544400,
"datetime_utc": "2025-12-12T05:00:00Z",
"open": 1.1738,
"high": 1.1745,
"low": 1.1730,
"close": 1.1742,
"volume": 1800
}
],
"pagination": {
"has_more": true,
"oldest_time": 1765540800,
"next_before_time": 1765540800
}
}
{
"error": "forbidden",
"message": "Symbol XAUUSD not allowed for your API key",
"allowed_symbols": ["EURUSD", "GBPUSD", "USDJPY"]
}
{
"error": "no_data",
"message": "No bar data available. VPS/MT5 may be offline.",
"symbol": "EURUSD",
"timeframe": 60
}
Market Data
Get OHLC Bars
Fetch historical OHLC candlestick data for a trading symbol
GET
/
api
/
external
/
bars
curl -X GET "https://api.innova-trading.com/api/external/bars?symbol=EURUSD&timeframe=60&limit=100" \
-H "Authorization: Bearer YOUR_API_KEY"
import requests
response = requests.get(
"https://api.innova-trading.com/api/external/bars",
params={
"symbol": "EURUSD",
"timeframe": 60,
"limit": 100
},
headers={"Authorization": "Bearer YOUR_API_KEY"}
)
bars = response.json()["bars"]
const response = await fetch(
"https://api.innova-trading.com/api/external/bars?symbol=EURUSD&timeframe=60&limit=100",
{
headers: { Authorization: "Bearer YOUR_API_KEY" }
}
);
const { bars } = await response.json();
{
"success": true,
"symbol": "EURUSD",
"timeframe": 60,
"count": 100,
"bars": [
{
"bar_number": 0,
"time": 1765540800,
"datetime_utc": "2025-12-12T04:00:00Z",
"open": 1.1732,
"high": 1.1740,
"low": 1.1725,
"close": 1.1738,
"volume": 2500
},
{
"bar_number": 1,
"time": 1765544400,
"datetime_utc": "2025-12-12T05:00:00Z",
"open": 1.1738,
"high": 1.1745,
"low": 1.1730,
"close": 1.1742,
"volume": 1800
}
],
"pagination": {
"has_more": true,
"oldest_time": 1765540800,
"next_before_time": 1765540800
}
}
{
"error": "forbidden",
"message": "Symbol XAUUSD not allowed for your API key",
"allowed_symbols": ["EURUSD", "GBPUSD", "USDJPY"]
}
{
"error": "no_data",
"message": "No bar data available. VPS/MT5 may be offline.",
"symbol": "EURUSD",
"timeframe": 60
}
Request
string
required
Trading symbol (e.g.,
EURUSD, GBPUSD, XAUUSD)integer
required
Timeframe in minutes:
1- M1 (1 minute)5- M5 (5 minutes)15- M15 (15 minutes)60- H1 (1 hour)240- H4 (4 hours)1440- D1 (1 day)
integer
default:"500"
Number of bars to return. Maximum:
5000integer
Unix timestamp (UTC seconds). Only bars with
time < before_time are returned (strict: a bar whose
time equals the cursor is excluded). Must be a positive integer and not in the future, otherwise the
API answers 422. Omit it to get the latest bars (unchanged behavior). Page backwards by sending
pagination.next_before_time of the previous response.With before_time the last (still forming) bar is never returned; without it the latest bar may
still be forming, as before.Response
boolean
Indicates if the request was successful
string
The requested symbol
integer
The requested timeframe in minutes
integer
Number of bars returned
array
object
Pagination information
Show Pagination Object
Show Pagination Object
curl -X GET "https://api.innova-trading.com/api/external/bars?symbol=EURUSD&timeframe=60&limit=100" \
-H "Authorization: Bearer YOUR_API_KEY"
import requests
response = requests.get(
"https://api.innova-trading.com/api/external/bars",
params={
"symbol": "EURUSD",
"timeframe": 60,
"limit": 100
},
headers={"Authorization": "Bearer YOUR_API_KEY"}
)
bars = response.json()["bars"]
const response = await fetch(
"https://api.innova-trading.com/api/external/bars?symbol=EURUSD&timeframe=60&limit=100",
{
headers: { Authorization: "Bearer YOUR_API_KEY" }
}
);
const { bars } = await response.json();
{
"success": true,
"symbol": "EURUSD",
"timeframe": 60,
"count": 100,
"bars": [
{
"bar_number": 0,
"time": 1765540800,
"datetime_utc": "2025-12-12T04:00:00Z",
"open": 1.1732,
"high": 1.1740,
"low": 1.1725,
"close": 1.1738,
"volume": 2500
},
{
"bar_number": 1,
"time": 1765544400,
"datetime_utc": "2025-12-12T05:00:00Z",
"open": 1.1738,
"high": 1.1745,
"low": 1.1730,
"close": 1.1742,
"volume": 1800
}
],
"pagination": {
"has_more": true,
"oldest_time": 1765540800,
"next_before_time": 1765540800
}
}
{
"error": "forbidden",
"message": "Symbol XAUUSD not allowed for your API key",
"allowed_symbols": ["EURUSD", "GBPUSD", "USDJPY"]
}
{
"error": "no_data",
"message": "No bar data available. VPS/MT5 may be offline.",
"symbol": "EURUSD",
"timeframe": 60
}
Pagination Example
To fetch more historical data:all_bars = []
before_time = None
while True:
params = {"symbol": "EURUSD", "timeframe": 60, "limit": 1000}
if before_time:
params["before_time"] = before_time
response = requests.get(url, params=params, headers=headers)
data = response.json()
all_bars.extend(data["bars"])
if not data["pagination"]["has_more"]:
break
before_time = data["pagination"]["next_before_time"]
print(f"Fetched {len(all_bars)} total bars")
Availability and limits of history mode
History mode (before_time) is gated by the server flag EXTERNAL_BARS_HISTORY_ENABLED (default off).
While it is off, before_time is accepted and ignored and pagination.history_enabled is false
(next_before_time is not sent): do not loop on has_more in that case. When on,
pagination.history_enabled is true. Requests with before_time are limited per token (default 60
pages per hour; 429 with a Retry-After header) and to 2 concurrent requests per token (429); a
slow upstream answers 504, and a failed upstream request answers 503 (upstream_error): this is NOT the
end of history, retry the same before_time. Only an empty 200 page means there is no older history. Requests without before_time are not affected by these limits.
How far back can you go
has_more is true when the page came back full, so the last page of a series can be empty (count: 0,
has_more: false, HTTP 200). Beyond the history ceiling below the server also answers an empty page.
Without before_time an empty result keeps answering 503 no_data.
The ceiling depends on the timeframe (estimated by calculation, not measured):
| Timeframe | Approximate history |
|---|---|
| M1 | ~34 days |
| M5 | ~6 months |
| M15 | ~17 months |
| H1 | ~5 years |
| H4 | 20+ years |
bar_number is the index inside each response (0 = oldest of that page), not a global index: use time
as the key when stitching pages together.
The
time field is the real Unix timestamp from the market data source.
Always use this value when submitting signals to ensure correct positioning on the chart.