Access the API
Generate an API key, make your first authenticated request, understand rate limits, and start using the 60+ available endpoints.
BitPredict provides a REST API with 60+ endpoints across 8 domains. You can fetch market data, retrieve strategy performance, submit backtests, manage alerts, and interact with virtual accounts programmatically. This guide gets you from zero to your first authenticated API call.
Generate an API key
Read the authentication docs
X-API-Key request header on every request.Make your first request
curl -X GET "https://api.bitpredict.ai/v1/market-data/ohlcv?symbol=BTCUSDT&bar_type=time&timeframe=1h&limit=100" \
-H "X-API-Key: your_api_key_here"You should receive a JSON array of OHLCV bars with regime metadata.Handle rate limits
X-RateLimit-Limit— requests per minute allowedX-RateLimit-Remaining— requests remaining in the current windowX-RateLimit-Reset— Unix timestamp when the window resets
Explore the 8 API domains
- Market Data (OHLCV, regimes, on-chain)
- Strategies (list, detail, signals)
- Backtests (submit, status, results)
- Optimization (submit, trials)
- Strategy Builder (save, activate)
- Alerts (subscriptions, history)
- Virtual Accounts (create, assign, P&L)
- Demo Trading (accounts, assignments, ledger)
Install an SDK (optional)
- Python:
pip install bitpredict-python - JavaScript:
npm install @bitpredict/sdk
from bitpredict import Client
client = Client(api_key="your_api_key_here")
bars = client.market_data.get_ohlcv(
symbol="BTCUSDT",
bar_type="time",
timeframe="1h",
limit=100
)Review the changelog
Start with read-only Market Data and Strategy endpoints before adding write permissions. Build confidence in the API's behaviour with safe, idempotent requests before submitting backtests or modifying account state.
Never commit your API key to version control. Use environment variables: BITPREDICT_API_KEY=your_key_here and load with os.environ.get("BITPREDICT_API_KEY") in Python or process.env.BITPREDICT_API_KEY in Node.js.
What's Next