REST API

Trading Data API for Crypto, Stocks, Forex & Futures

Access historical OHLCV candle data, financial news with sentiment analysis, and economic calendar events for 300+ instruments via a simple REST API. Bitcoin, Ethereum, Solana, Apple, Tesla, EUR/USD, S&P 500 futures, and hundreds more all with 1-minute to daily resolution.

300+
Instruments
227M+
Historical Candles
7
Timeframes
4
Markets

What Market Data Is Available?

The Backtestic API gives you programmatic access to historical market data across four major asset classes. Whether you're building a trading bot, performing quantitative research, or integrating market data into your application, our API provides everything you need.

Cryptocurrency Data API

Historical OHLCV candle data for 100+ cryptocurrencies from Binance. 1-minute resolution dating back to 2020. Includes all major coins and popular altcoins.

BTCETHSOLBNBXRPADADOGEDOTAVAXLINKMATICUNIARBOPSUIAPTNEARATOMFTMAAVE+80 more

Source: Binance · 1m candles from 2020 · USDT pairs

US Stock Market Data API

Historical price data for 200+ US stocks from NASDAQ and NYSE. Includes all major tech, finance, healthcare, consumer, and industrial stocks with daily and intraday candles.

AAPLMSFTGOOGLAMZNNVDAMETATSLAJPMVJNJWMTNFLXAMDCRMPYPLDISINTCBAGSCOIN+180 more

Sources: Yahoo Finance, Polygon · NASDAQ & NYSE

Forex Data API

Historical candle data for major and minor forex pairs plus precious metals from Dukascopy. Includes hourly and daily candles for all popular currency pairs.

EUR/USDGBP/USDUSD/JPYAUD/USDXAU/USDXAG/USDEUR/GBPGBP/JPYUSD/CHFNZD/USDUSD/CADEUR/JPY+more pairs

Source: Dukascopy · Major & minor pairs · Gold & silver

Futures Data API

Historical candle data for popular futures contracts including indices, commodities, currencies, and micro contracts. E-mini and micro E-mini S&P 500, NASDAQ, and more.

ESNQYMGCCLSINGZBMESMNQ6E6BVXHGZC

S&P 500, NASDAQ 100, Dow, gold, oil, bonds, VIX & more

Financial News API

Get market news articles per instrument or symbol with sentiment analysis. Historical news data covering crypto markets, stock earnings, forex events, and commodity reports. Filter by date range, instrument, or symbol. Ideal for sentiment analysis, NLP research, and building news-driven trading strategies.

PER INSTRUMENTSENTIMENTHISTORICALCRYPTO NEWSSTOCK NEWSFOREX NEWS

Economic Calendar API

Access economic calendar events with actual, forecast, and previous values. FOMC interest rate decisions, CPI inflation data, Non-Farm Payrolls (NFP), GDP releases, retail sales, PMI data, and dozens more macro indicators. Filter by date range and impact level (low, medium, high).

FOMCCPINFPGDPRETAIL SALESPMIACTUAL VS FORECASTIMPACT FILTER

Authentication

All API requests require an API key. Generate one from your Backtestic dashboard (Elite plan required). Send your key via the X-API-Key header or as a Bearer token.

cURL - X-API-Key Header
curl -H "X-API-Key: btk_your_key_here" \
  "https://backtestic.com/api/v1/instruments"
cURL - Bearer Token
curl -H "Authorization: Bearer btk_your_key_here" \
  "https://backtestic.com/api/v1/instruments"
100
Requests per minute
5
API keys per account
SHA-256
Keys hashed at rest

Base URL

https://backtestic.com/api/v1

API Endpoints

All endpoints return JSON. Requires Elite plan API key.

GET/instruments

List all 300+ available trading instruments across crypto, stocks, forex, and futures markets. Returns symbol, name, market type, exchange, data availability range, and active status for every instrument in the Backtestic database.

Response Example
{
  "instruments": [
    { "id": 1, "symbol": "BTCUSDT", "name": "Bitcoin", "market": "crypto",
      "exchange": "Binance", "data_start": "2020-01-01", "data_end": "2025-12-31", "is_active": true },
    { "id": 2, "symbol": "ETHUSDT", "name": "Ethereum", "market": "crypto", ... },
    { "id": 150, "symbol": "AAPL", "name": "Apple Inc", "market": "stocks", ... },
    { "id": 450, "symbol": "EURUSD", "name": "EUR/USD", "market": "forex", ... },
    { "id": 550, "symbol": "ES", "name": "E-mini S&P 500", "market": "futures", ... }
  ],
  "total": 312
}
GET/candles/:instrumentId

Fetch historical OHLCV (Open, High, Low, Close, Volume) candle data for any instrument. Supports 7 timeframes from 1-minute to daily. Crypto data has 1-minute resolution from 2020. Returns up to 5,000 candles per request. Perfect for backtesting algorithms, building trading bots, charting applications, and quantitative analysis.

Query Parameters
timeframe(string) 1m, 5m, 15m, 30m, 1h, 4h, 1D (default: 1h)
from(ISO date) Start time (e.g. 2025-01-01T00:00:00Z)
to(ISO date) End time (e.g. 2025-01-31T23:59:59Z)
limit(number) Max candles returned (default: 1000, max: 5000)
Response Example
{
  "candles": [
    { "time": "2025-01-01T00:00:00Z", "open": 42150.00, "high": 42300.00,
      "low": 42100.00, "close": 42250.00, "volume": 1234.56 },
    { "time": "2025-01-01T01:00:00Z", "open": 42250.00, "high": 42400.00,
      "low": 42200.00, "close": 42380.00, "volume": 987.32 }
  ],
  "count": 1000
}
GET/news

Get financial news articles for a specific instrument or trading symbol. Returns article title, source, URL, publication time, and sentiment data. Use this endpoint to build news-driven trading strategies, perform sentiment analysis, or integrate market news into your application. Supports all 300+ instruments.

Query Parameters
instrumentId(number) Filter by instrument ID (from /instruments)
symbol(string) Filter by symbol (e.g. BTCUSDT, AAPL) - use instrumentId or symbol
from(ISO date) Start time (required)
to(ISO date) End time (required)
limit(number) Max articles (default: 50, max: 200)
Response Example
{
  "news": [
    { "id": "uuid", "title": "Bitcoin Surges Past $70K as ETF Inflows Hit Record",
      "source": "CoinDesk", "url": "https://...",
      "published_at": "2025-01-15T14:30:00Z", "sentiment": "bullish" },
    { "id": "uuid", "title": "Ethereum Layer 2 Activity Reaches All-Time High",
      "source": "The Block", "url": "https://...",
      "published_at": "2025-01-15T12:00:00Z", "sentiment": "bullish" }
  ],
  "count": 42
}
GET/economic-calendar

Get economic calendar events including FOMC interest rate decisions, CPI inflation data, Non-Farm Payrolls (NFP), GDP releases, retail sales, PMI, and dozens more macro indicators. Each event includes actual, forecast, and previous values with impact rating. Essential for fundamental analysis and macro-driven trading strategies.

Query Parameters
from(ISO date) Start time (required)
to(ISO date) End time (required)
minImpact(number) Minimum impact level: 1 (low), 2 (medium), 3 (high). Default: 1
Response Example
{
  "events": [
    { "id": "uuid", "title": "FOMC Interest Rate Decision", "country": "US",
      "impact": 3, "actual": "5.50%", "forecast": "5.50%", "previous": "5.25%",
      "event_time": "2025-01-29T19:00:00Z" },
    { "id": "uuid", "title": "Non-Farm Payrolls", "country": "US",
      "impact": 3, "actual": "256K", "forecast": "164K", "previous": "212K",
      "event_time": "2025-02-07T13:30:00Z" }
  ],
  "count": 15
}
GET/sessions

List your backtest and prop firm sessions. Returns session metadata including instrument, timeframe, status, balances, and performance summary.

Query Parameters
status(string) Filter by: active, completed, abandoned
Response Example
{
  "sessions": [
    { "id": "uuid", "instrument_id": 1, "timeframe": "1h",
      "status": "completed", "initial_balance": 10000, "current_balance": 11234 }
  ],
  "total": 15
}
GET/trades

List your trades with pagination. Includes entry/exit prices, P&L, side, symbol, and timestamps. Filter by backtest or live source.

Query Parameters
source(string) backtest or live (default: backtest)
sessionId(uuid) Filter by session
status(string) open or closed
page(number) Page number (default: 1)
limit(number) Per page (default: 50, max: 100)
Response Example
{
  "trades": [
    { "id": "uuid", "side": "long", "entry_price": 42150, "exit_price": 42500,
      "pnl": 350, "pnl_percent": 0.83, "symbol": "BTCUSDT" }
  ],
  "total": 120, "page": 1, "limit": 50, "totalPages": 3
}
GET/analytics

Get performance analytics summary including win rate, average P&L, max drawdown, profit factor, Sharpe ratio, and more.

Query Parameters
source(string) backtest or live
sessionId(uuid) Analytics for a specific session
Response Example
{
  "totalTrades": 120, "winRate": 0.65, "avgPnl": 42.5,
  "maxDrawdown": -1250, "profitFactor": 2.1, "sharpeRatio": 1.8
}
GET/analytics/monte-carlo

Run Monte Carlo simulation on your trade history. Randomly reorders trades thousands of times to show the range of possible outcomes and validate statistical significance of your edge.

Query Parameters
source(string) backtest or live
simulations(number) Number of simulations (default: 1000, max: 10000)
sessionId(uuid) Simulate for a specific session
Response Example
{
  "simulations": 1000,
  "percentiles": { "p5": 8500, "p25": 9800, "p50": 11200, "p75": 12800, "p95": 15400 },
  "maxDrawdown": { "p5": -3200, "p50": -1800, "p95": -650 }
}
GET/strategies

List your saved trading strategies with names, descriptions, and creation dates.

Response Example
{
  "strategies": [
    { "id": "uuid", "name": "Breakout Strategy", "description": "...", "created_at": "..." }
  ],
  "total": 3
}

Error Codes

401 Invalid or missing API key
403 API access requires Elite plan
404 Resource not found
429 Rate limit exceeded (100 req/min) check Retry-After header
500 Internal server error

Code Examples

Python - Fetch Bitcoin Historical Candle Data
import requests

API_KEY = "btk_your_key_here"
BASE = "https://backtestic.com/api/v1"
headers = {"X-API-Key": API_KEY}

# Get all available instruments (crypto, stocks, forex, futures)
instruments = requests.get(f"{BASE}/instruments", headers=headers).json()
print(f"Available instruments: {instruments['total']}")

# Get Bitcoin 1-hour candles for January 2025
btc_candles = requests.get(
    f"{BASE}/candles/1?timeframe=1h&from=2025-01-01&to=2025-01-31&limit=5000",
    headers=headers
).json()
print(f"Got {btc_candles['count']} BTC candles")

for candle in btc_candles["candles"][:5]:
    print(f"  {candle['time']} O:{candle['open']} H:{candle['high']} L:{candle['low']} C:{candle['close']} V:{candle['volume']}")
Python - Financial News & Economic Calendar
# Get crypto news for Bitcoin
btc_news = requests.get(
    f"{BASE}/news?symbol=BTCUSDT&from=2025-01-01&to=2025-01-31&limit=100",
    headers=headers
).json()
print(f"Found {btc_news['count']} Bitcoin news articles")
for article in btc_news["news"][:3]:
    print(f"  [{article['sentiment']}] {article['title']}")

# Get high-impact economic events (FOMC, CPI, NFP)
calendar = requests.get(
    f"{BASE}/economic-calendar?from=2025-01-01&to=2025-03-31&minImpact=3",
    headers=headers
).json()
print(f"Found {calendar['count']} high-impact events")
for event in calendar["events"][:3]:
    print(f"  {event['event_time']} - {event['title']} (actual: {event.get('actual', 'pending')})")
Python - Trading Analytics & Performance
# Get your trading performance analytics
analytics = requests.get(f"{BASE}/analytics?source=backtest", headers=headers).json()
print(f"Win rate: {analytics['winRate']:.1%}")
print(f"Profit factor: {analytics['profitFactor']:.2f}")
print(f"Max drawdown: ${analytics['maxDrawdown']:.0f}")

# Run Monte Carlo simulation (1000 simulations)
monte_carlo = requests.get(
    f"{BASE}/analytics/monte-carlo?simulations=1000",
    headers=headers
).json()
print(f"Monte Carlo median outcome: ${monte_carlo['percentiles']['p50']:.0f}")
print(f"95th percentile: ${monte_carlo['percentiles']['p95']:.0f}")
JavaScript / Node.js - Fetch Stock & Forex Data
const API_KEY = "btk_your_key_here";
const BASE = "https://backtestic.com/api/v1";
const headers = { "X-API-Key": API_KEY };

// Fetch Apple (AAPL) daily candles
const aapl = await fetch(
  `${BASE}/candles/150?timeframe=1D&from=2025-01-01&to=2025-06-30`,
  { headers }
).then(r => r.json());
console.log(`Got ${aapl.count} AAPL daily candles`);

// Fetch EUR/USD hourly candles
const eurusd = await fetch(
  `${BASE}/candles/450?timeframe=1h&limit=2000`,
  { headers }
).then(r => r.json());
console.log(`Got ${eurusd.count} EUR/USD candles`);

// Get all instruments
const { instruments, total } = await fetch(
  `${BASE}/instruments`, { headers }
).then(r => r.json());
console.log(`Total instruments available: ${total}`);

Use Cases

The Backtestic Trading Data API is built for developers, quantitative analysts, and algorithmic traders who need reliable historical market data.

Algorithmic Trading & Bots

Build and backtest trading algorithms using historical OHLCV candle data for crypto, stocks, forex, and futures. Test your strategies on real market data before deploying with real capital.

Quantitative Research

Analyze market microstructure, price patterns, and statistical relationships across 300+ instruments. 1-minute resolution for crypto allows tick-level analysis of volatility and volume dynamics.

Sentiment Analysis & NLP

Use the financial news API to build sentiment models, analyze market-moving headlines, and correlate news events with price movements across multiple asset classes.

Portfolio Analytics

Track your trading performance programmatically. Pull your trades, compute analytics, run Monte Carlo simulations, and build custom reporting dashboards with your own tools.

Market Data Integration

Integrate historical candle data, news, and economic calendar events into your existing trading platform, spreadsheet, or data pipeline. Simple JSON responses work with any language.

Macro & Fundamental Analysis

Use the economic calendar API to study the impact of FOMC decisions, CPI releases, NFP reports, and GDP data on asset prices across crypto, forex, and equity markets.

Frequently Asked Questions

What data does the Backtestic Trading API provide?+

Historical OHLCV candle data (open, high, low, close, volume) for 300+ instruments across crypto, stocks, forex, and futures. Financial news articles per instrument with sentiment analysis. An economic calendar with FOMC decisions, CPI releases, NFP reports, GDP data, and other macro events with actual/forecast/previous values. Plus your personal trading sessions, trades, analytics, and Monte Carlo simulation results.

What cryptocurrencies are supported?+

All major cryptocurrencies from Binance including Bitcoin (BTC), Ethereum (ETH), Solana (SOL), BNB, XRP, Cardano (ADA), Dogecoin (DOGE), Polkadot (DOT), Avalanche (AVAX), Chainlink (LINK), Polygon (MATIC), Uniswap (UNI), Arbitrum (ARB), Optimism (OP), Sui (SUI), Aptos (APT), NEAR, Cosmos (ATOM), Fantom (FTM), and 80+ more altcoins with 1-minute candle data going back to 2020.

What US stocks can I get data for?+

Over 200 US stocks from NASDAQ and NYSE including Apple (AAPL), Microsoft (MSFT), Google (GOOGL), Amazon (AMZN), Nvidia (NVDA), Tesla (TSLA), Meta (META), JPMorgan (JPM), Visa (V), Netflix (NFLX), AMD, Salesforce (CRM), PayPal (PYPL), Walmart (WMT), Disney (DIS), Intel (INTC), Boeing (BA), Goldman Sachs (GS), Coinbase (COIN), and many more.

What forex pairs and futures contracts are available?+

Forex: EUR/USD, GBP/USD, USD/JPY, AUD/USD, XAU/USD (gold), XAG/USD (silver), EUR/GBP, GBP/JPY, USD/CHF, NZD/USD, USD/CAD, EUR/JPY from Dukascopy. Futures: ES (S&P 500 E-mini), NQ (NASDAQ 100), YM (Dow Jones), GC (gold), CL (crude oil), SI (silver), NG (natural gas), ZB (bonds), MES and MNQ (micro contracts), 6E, 6B (currency futures), VX (VIX), HG (copper), ZC (corn).

What timeframes are available?+

Seven timeframes: 1-minute (1m), 5-minute (5m), 15-minute (15m), 30-minute (30m), 1-hour (1h), 4-hour (4h), and daily (1D). Crypto data has full 1-minute resolution from 2020. You can request up to 5,000 candles per API call.

How much does the API cost?+

The API is included with the Backtestic Elite plan at $39/month. New users get a 3-day free trial on Stripe. The Elite plan includes full API access with 100 requests/minute, plus the complete backtesting platform with battle mode, live trade journal, time-synced news, multi-timeframe replay, and priority support.

What is the rate limit?+

Each API key is rate-limited to 100 requests per minute. Rate limit headers (X-RateLimit-Limit, X-RateLimit-Remaining, Retry-After) are included in every response. Exceeding the limit returns a 429 status code. You can create up to 5 API keys per account.

Historical Market Data API for Algorithmic Trading

The Backtestic trading data API provides developers and quantitative analysts with reliable access to historical OHLCV candle data across four major asset classes. Whether you're building a crypto trading bot, backtesting a forex strategy, or analyzing stock market patterns, our REST API delivers the data you need in clean JSON format.

With 300+ instruments covering Bitcoin, Ethereum, Solana, and 100+ altcoins from Binance, 200+ US stocks from NASDAQ and NYSE, major forex pairs including EUR/USD, GBP/USD, and USD/JPY, plus futures contracts like ES, NQ, GC, and CL you get comprehensive market coverage through a single API.

Candle data is available in 7 timeframes: 1-minute, 5-minute, 15-minute, 30-minute, 1-hour, 4-hour, and daily. Crypto assets have 1-minute resolution from 2020, giving you granular data for high-frequency strategy research and intraday pattern analysis.

Financial News & Economic Calendar API

Beyond candle data, the Backtestic API provides a financial news API with per-instrument news articles and sentiment data. Build sentiment analysis models, correlate headlines with price movements, or integrate real-time market news into your trading dashboard.

The economic calendar API covers all major macro events: FOMC interest rate decisions, CPI inflation reports, Non-Farm Payrolls (NFP), GDP releases, retail sales, PMI, and more. Each event includes actual, forecast, and previous values essential for fundamental analysis and macro-driven strategies.

All API responses are JSON-formatted, authenticated via API key, and rate-limited at 100 requests per minute. Ideal for Python, JavaScript, Go, Rust, or any language that can make HTTP requests. Get started with a 3-day free trial on the Elite plan.

Start Building with the Backtestic API

Get historical candle data, financial news, and economic calendar events for 300+ instruments. Start your 3-day free trial today.

Get API Access Free Trial

Elite plan $39/mo after trial · Cancel anytime