BitBank
BitBank > Docs > Trading Bot API

BitBank API

Use REST endpoints for forecasts, bot signals, account data, and credit-backed custom forecasts. Use the WebSocket endpoint for live subscriber updates.

Base URL: https://bitbank.nz

Replace YOUR_API_KEY with the key from your account.

Authentication

Premium endpoints require an active subscription. Use one of the following:

  • Authorization: Bearer YOUR_API_KEY
  • session_token cookie (from /api/login)
Authenticated request
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://bitbank.nz/api/trading-bot/signals?pair=BTC_USDT"

Buy/Sell Signals

Public (no auth):

  • GET /api/trading-bot/public-signals-latest
  • GET /api/trading-bot/public-signals-history?pair=BTC_USDT&hours=168
  • GET /api/trading-bot/fast-forecasts (ultra-low-latency cached signals)

Subscriber endpoints:

  • GET /api/trading-bot/signals?pair=BTC_USDT&timeframe=hourly&limit=20
  • GET /api/trading-bot/signals/BTC_USDT
  • GET /api/trading-bot/trades?pair=BTC_USDT&limit=100
  • GET /api/trading-bot/equity-curve?days=30

Hourly & Daily Forecasts (1H/7H and 1D/7D)

Subscriber access required.

Forecast endpoints provide hourly and daily horizons. The 1st bar is 1H/1D, the 7th bar is 7H/7D.

  • GET /api/coins/forecasts/hourly/BTC_USDT?limit=48&interval=HOUR_1
  • GET /api/forecast/daily/BTC_USDT?days=7&include_hourly=true&hourly_steps=24
  • GET /api/forecasts/BTC_USDT/bars?steps=7&interval=HOUR_1
Forecast response shape
{
  "currency_pair": "BTC_USDT",
  "daily_forecast": [{"timestamp": 1700000000, "close": 45000.5, "is_forecast": true}],
  "hourly_forecast": [{"timestamp": 1700003600, "close": 45120.2, "is_forecast": true}],
  "current_day": "2026-01-16"
}

Custom Line Forecast

This endpoint charges API credits: $0.02 per request.

POST /api/forecast/line
curl -X POST "https://bitbank.nz/api/forecast/line" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"series":[1.0,1.2,1.15,1.3,1.4,1.35,1.5,1.6,1.55,1.7,1.75,1.8],"prediction_length":7,"interval":"HOUR_1"}'
Custom forecast response shape
{
  "series_length": 12,
  "prediction_length": 7,
  "interval_minutes": 60,
  "forecast": {
    "low": [1.73, 1.72, 1.70],
    "median": [1.80, 1.82, 1.84],
    "high": [1.89, 1.92, 1.95]
  },
  "credits_used": 0.02
}

WebSocket Streaming

Use wss://bitbank.nz/ws for live subscriber streams. Send subscribe_live with your API key and the market pairs you want.

Subscribe message
{"event":"subscribe_live","secret":"YOUR_API_KEY","currency_pairs":["BTC_USDT","ETH_USDT"]}

Need help? Email support and include your API key prefix and the endpoint you are calling.