Capovex Data CenterAPI documentation Status

Capovex Data Center API

Market data for Indian exchanges over one API: candles in ten timeframes, every stored tick with five levels of depth, live quotes, the instrument master and option chains.

5segments: nse · nfo · bse · bfo · mcx
10timeframes: 1m to 1M
20151-minute history starts (daily from 2003)
5 + 5depth levels on every full tick
09:15 ISTevery intraday bucket is counted from the open

Quick start

Step 1

Find the instrument

Every instrument is a segment and a number. Search once and keep the id.

GET /v1/instruments?q=SBIN&seg=nse
→ "seg":"nse","id":3045
Step 2

Load its candles

Ask for a timeframe; page back in time with nextCursor.

GET /v1/bars/nse/3045?tf=5m&limit=500
→ {"bars":[…],"nextCursor":1796120100}
Step 3

Receive live candles

Subscribe on the stream; a message arrives when each candle closes.

{"op":"sub","ids":["nse:3045"],"tf":["5m"]}
← {"e":"candle",…,"closed":true}

Keys and limits

Every request carries one header. A key looks like ccdc_<key id>_<secret>; the data center stores only a keyed hash of the secret, so a lost key is replaced, never recovered.

x-api-key: ccdc_app1_••••••••••••••••

Each key has its own request rate and a list of scopes. A call outside the key's scopes answers 403 forbidden; too many calls answer 429 with a Retry-After header in seconds.

ScopeOpens
any keyInstrument master, /v1/status (no key needed)
barsCandles, all timeframes
ticksStored ticks and live quotes
chainsOption chains
liveCandle stream (WebSocket)
LimitValueWhen you reach it
Requests per keySet per key when it is issued429 rate_limited with Retry-After
Candles per request5,000Page back with cursor
Ticks per request10,000Page back with cursor
Quotes per request200 instruments422
Stream subscriptions per connection5,000too_many_subscriptions, connection closes
Instruments per stream message500too_many_ids
Used only for requests you send from this page.

Request desk

Pick an endpoint, set the parameters, and send. The answer is shown as a table and as raw text; the code to make the same call is underneath.

GET
Not sent yet

      

Live candle stream

A WebSocket at wss://cdc.capovex.in/stream. Subscribe to instruments and timeframes; the forming candle arrives a few times a second, and a message with "closed":true arrives the moment a candle is final, so an application never has to poll.

segment:id, comma separated, up to 500 per message

      

Order of messages: auth within 5 seconds → {"op":"ready"} → sub → {"op":"subscribed","count":n} → candles. {"op":"ping"} answers {"op":"pong"}. A candle that had already begun when the service started is marked "partial":true.

Sample messages.

Endpoints

CallReturnsParametersScope
GET /v1/bars/{segment}/{id}Candles, oldest first, with nextCursor to page further backtf 1m 3m 5m 10m 15m 30m 1h 1d 1w 1M (default 1d) · limit 1–5000 (500) · cursor · from · to (unix seconds)bars
GET /v1/ticks/{segment}/{id}Every stored tick, newest page first, with depthlimit 1–10000 · cursor · from (unix nanoseconds)ticks
GET /v1/quotes?ids=Latest quote and depth for up to 200 instrumentsids = nse:3045,nfo:42730ticks
GET /v1/instrumentsSearch the instrument masterseg · q · type · underlying · limit · offsetany key
GET /v1/instruments/{segment}/{id}One instrumentnoneany key
GET /v1/chainsUnderlyings with their expiriesnonechains
GET /v1/chains/{underlying}Newest chain snapshot: bid, ask, IV, Greeks, opening OIexpiry YYYY-MM-DD (default: nearest)chains
GET /v1/statusHealth of the API and its databasenoneno key
WSS /streamForming and closed candles, 1m to 1hmessages auth · sub · unsub · pinglive

Fields

Candle
tStart of the bucket, unix seconds. Daily candles are stamped 00:00 IST.
o h l cOpen, high, low, close in rupees
vTraded quantity in the bucket
nextCursorPass as cursor for the page before this one; absent at the start of history
Quote
t · lttReceive time (ms) · last trade time (s)
ltp ltq avgLast price, last quantity, average price (rupees)
o h l pc chg chg_pctDay open, high, low, previous close, change
v oi tbq tsqVolume, open interest, total buy and sell quantity
lc ucLower and upper circuit
bid askFive levels each: [price, quantity, orders]
Tick (stored exactly as received)
r · sReceive time in nanoseconds · sequence number
et lttExchange time, last trade time (unix seconds)
ltp avg o h l pc lc ucIntegers in paise (111470 = ₹1,114.70), so nothing is rounded
bp bq bo · ap aq aoBid and ask price (paise), quantity, orders: five levels each
feed mode flagsSource feed, packet mode (3 = full), validation flags
Option contract
expiry strike typeExpiry date, strike, CE or PE
seg id symbol lot_sizeWhere the contract trades; use seg:id with the other calls
bid bid_qty ask ask_qtyBest bid and offer at the snapshot
iv delta gamma theta vegaImplied volatility (0.15 = 15%) and Greeks
opening_oi · ltp v oiOpening open interest · last price, volume and OI from the live feed (0 for a contract that is not on the live feed)

Formats

FormatWhereUse it for
JSONEvery endpoint (default)Applications and services
CSVCandles: add format=csv. Columns t,o,h,l,c,v, oldest first; the first row's t is the cursor for the page before.Spreadsheets, pandas, R, back-tests
WebSocket JSONCandle stream, /streamLive applications
OpenAPI 3.1/openapi.jsonImport into Postman or Insomnia, or generate a client in any language
import pandas as pd
df = pd.read_csv("https://cdc.capovex.in/v1/bars/nse/3045?tf=1d&limit=5000&format=csv",
                 storage_options={"x-api-key": "ccdc_<id>_<secret>"})
df["t"] = pd.to_datetime(df["t"], unit="s", utc=True).dt.tz_convert("Asia/Kolkata")

Market rules

RuleWhat it means for you
Session onlyCandles count the regular session: NSE and BSE cash and F&O 09:15–15:30 IST, MCX 09:00–23:55 IST. Packets before the open and after the close are stored as ticks but never bend a candle.
Buckets from the openA 15-minute candle runs 09:15–09:30, a 1-hour candle 09:15–10:15. The last candle of the day is shorter.
Exchange history winsToday's candles are built from live ticks. When the exchange's own candle for the same minute or day arrives, it replaces ours.
Today is includedDaily, weekly and monthly candles include the day in progress; that candle keeps changing until the close.
Nothing is deletedExpired contracts and renamed symbols stay on record. An instrument is always segment:id.

Errors

Every error has the same body, with a code that never changes and a short explanation.

{"error":{"code":"bad_timeframe","detail":"tf must be 1m 3m 5m 10m 15m 30m 1h 1d 1w or 1M"}}
StatusCodesWhat to do
401unauthorizedSend a valid key in x-api-key.
403forbiddenThe key lacks the scope for this call. Ask for the scope to be added.
404not_foundUnknown path, or no option chain for that underlying and expiry.
422bad_segment bad_instrument bad_timeframe bad_limit bad_cursor bad_from bad_to bad_range bad_expiry bad_underlying unknown_parameter bad_queryFix the request; detail says which value and what is allowed.
429rate_limitedWait the number of seconds in Retry-After, then continue.
503unavailableThe database is busy or restarting. Retry after a second or two.
WSauth_first auth_timeout unauthorized too_many_subscriptions bad_json bad_op bad_ids bad_tf too_many_ids too_large unknown_fieldSent as {"op":"error","code":"…"}, then the connection closes. A client that reads too slowly is also disconnected; reconnect and subscribe again.

Service status

Read from the data center's own monitor, which checks every service several times a minute and records each incident. One bar is one day (IST); grey means the monitor had not started recording yet.

The same data for your own dashboards: GET /v1/status/services (no key).

Changelog

DateChange
3 Dec 2026Candles as CSV (format=csv). /v1/status/services and this page. OpenAPI description at /openapi.json. Daily, weekly and monthly candles include the day in progress.
3 Dec 2026Instruments, quotes and option chains. Candle stream with a closed-candle message on port 7200.
2 Dec 2026API v1: candles in ten timeframes and stored ticks with five levels of depth.

v1 is in every path. A change that could break a client will arrive as v2 beside it, never inside v1.