Skip to main content

Endpoint

POST /v1/batch
Content-Type: application/json

Authentication

Authorization: Bearer <api_key>

Request body

{
  "requests": [
    { "indicator": "rsi",  "symbol": "BTC-USD", "tf": "5m", "period": 14 },
    { "indicator": "macd", "symbol": "BTC-USD", "tf": "5m" },
    { "indicator": "bb",   "symbol": "BTC-USD", "tf": "5m", "period": 20, "multiplier": 2.0 }
  ]
}
Maximum 50 items per batch.

Request item fields

FieldRequiredDefaultDescription
indicatorYesIndicator name (same as path param on single endpoint)
symbolNoBTC-USDCanonical symbol
exchangeNobinanceExchange
tfNo5mTimeframe
formatNoverboseverbose or compact
periodNoindicator defaultPeriod for period-based indicators
fast, slow, signalNoMACD defaultsMACD-specific
multiplierNoindicator defaultBB / Supertrend
k_period, d_periodNoStochastic defaultsStochastic
lookbackNo100Fibonacci
num_binsNo50Volume Profile

Response

{
  "results": [
    {
      "indicator": "rsi",
      "symbol": "BTC-USD",
      "tf": "5m",
      "result": { ... },   // full IndicatorResponse
      "error": null
    },
    {
      "indicator": "macd",
      "symbol": "BTC-USD",
      "tf": "5m",
      "result": { ... },
      "error": null
    }
  ]
}
Individual items that fail (e.g. warming up) return "result": null and "error": "..." without failing the whole batch.

Example

curl -s -X POST \
  -H "Authorization: Bearer tranc_live_sk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "requests": [
      {"indicator": "rsi", "symbol": "BTC-USD", "tf": "5m"},
      {"indicator": "macd", "symbol": "BTC-USD", "tf": "5m"},
      {"indicator": "vwap", "symbol": "BTC-USD", "tf": "5m"}
    ]
  }' \
  https://api.tranc.ai/v1/batch