Skip to content

Latest REST API V3 Updates

This page summarizes the latest REST API V3 updates for market-data and account-event integrations.

Indicative Close Price

The optional indicative_close_price field is available for applicable NSE and BSE instruments when provided by the exchange.

REST API

GET /optionchains/{asset}/price

The field is included in the response only when an indicative close price is available.

Market-Data WebSocket

The field is available in applicable market-data WebSocket messages as protocol field 12, named indicative_close_price:

message WebSocketMsgIndex {
  // other index fields...
  int64 indicative_close_price = 12;
}

It may be omitted during regular market updates or outside the applicable exchange session. See Realtime Market Data for connection, subscription, and payload details.

The complete endpoint documentation is available in Current Price.

Response Structure

When an indicative close price is available, the response includes the additional indicative_close_price field:

{
  "message": "current price",
  "price": 245050,
  "change": 1.25,
  "prev_close": 242000,
  "exchange": "NSE",
  "indicative_close_price": 244800
}

When no indicative close price is available, the same response omits that field:

{
  "message": "current price",
  "price": 245050,
  "change": 1.25,
  "prev_close": 242000,
  "exchange": "NSE"
}

Response Fields

Field Type Description
message string Response description.
price integer Current price in exchange-defined price units.
change number Percentage change from the previous close.
prev_close integer Previous closing price in exchange-defined price units.
exchange string Exchange for the requested instrument or index.
indicative_close_price integer, optional Indicative closing price, returned when provided by the exchange for an applicable CAS-enabled instrument.

indicative_close_price is returned during the applicable exchange session and may be omitted at all other times.

Order and Portfolio WebSockets

The connection flow for order and portfolio updates has changed. REST API clients should use the WebSocket URL returned for the active session instead of hardcoding an older URL. See Realtime Order Updates for the complete order-update protocol.

1. Fetch the session WebSocket URL

After authentication, call:

GET /userinfo

Use the authenticated request:

curl --location 'https://api.nubra.io/userinfo' \
  --header 'Authorization: Bearer <session_token>' \
  --header 'x-device-id: <device_id>'

Read env_info.order_service_ws_url from the response.

2. Add the session token to the WebSocket URL

Append the session token as the token query parameter:

wss://api.nubra.io/oms-socket-latest/ws?token=<session_token>

3. Subscribe after connecting

For order updates, send:

subscribe <session_token> direct_intent notification

For portfolio updates, send:

subscribe <session_token> direct_portfolio NOTIFICATION_DIRECT_PORTFOLIO_UPDATE

The WebSocket payloads are binary protobuf messages. Decode the order updates as NubraToClientIntentUpdate and portfolio updates as PortfolioResponse. See Realtime Order Updates for the complete order-update protocol.

See Portfolio Updates for the complete portfolio-update protocol.

The older user_ws_url connection flow will be deprecated. Update integrations at your convenience, preferably at the earliest.

NEO Assistant