Torus Digital Open API
  • Introduction
  • Get Started
  • Authentication
    • Login
    • Session Token
  • SDK
    • Self Generated SDK'S
  • Orders
    • Order Entry
    • Order Modify
    • Order Cancel
    • Order Convert To delivery
    • Order Margin
    • Order Book
    • Order Details
  • Holdings and Portfolio
    • Portfolio
    • Holding
    • Holding Details
    • Net Positions
  • Market
    • Market Status
  • Trade
    • Trade Book
    • Trade Details
  • Funds
    • Fund limits
    • Fund limits details
  • Historical Data
    • Search Stock
    • Company Basic Detail
    • Indices List
    • Monthly/Yearly Returns
    • Share Holding Pattern
    • Balance Sheet
    • Cash Flow
    • Profit and Loss
Powered by GitBook
On this page
  1. Market

Market Status

The Market Status API endpoint retrieves the current status of various market types and segments for specified exchanges, providing detailed information about their operational state. This ensures clients can track and respond to market conditions in real-time.

Endpoint

Base URL
https://connects.torusdigital.com/api/v1/market/status

Header Parameters

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Request Parameter

Name
Value
Mandatory
Description

source

N

Y

Source of the request (e.g., "N")

Request

cURL
curl --location 'https://connects.torusdigital.com/api/v1/market/status' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json' \
--data '{
    "source": "N"
}'
Java-Unirest
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("https://connects.torusdigital.com/api/v1/market/status")
  .header("Authorization", "Bearer {{token}}")
  .header("Content-Type", "application/json")
  .body("{\n    \"source\": \"N\"\n}")
  .asString();
Go-Native
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://connects.torusdigital.com/api/v1/market/status"
  method := "POST"
  payload := strings.NewReader(`{
    "source": "N"
  }`)

  client := &http.Client{}
  req, err := http.NewRequest(method, url, payload)
  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Authorization", "Bearer {{token}}")
  req.Header.Add("Content-Type", "application/json")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
JavaScript-jQuery
var settings = {
  "url": "https://connects.torusdigital.com/api/v1/market/status",
  "method": "POST",
  "timeout": 0,
  "headers": {
    "Authorization": "Bearer {{token}}",
    "Content-Type": "application/json"
  },
  "data": JSON.stringify({
    "source": "N"
  }),
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Response

{
    "status": "success",
    "message": "Success",
    "data": [
        {
            "EMM_MKT_TYPE_NO": "2",
            "EMM_STATUS": "OPEN",
            "EMM_EXM_EXCH_ID": "BSE",
            "MARKET_TYPE": "OL",
            "EMM_MKT_DESCRIPTION": "AUCTION",
            "EMM_EXCH_SEG": "C"
        },
        {
            "EMM_MKT_TYPE_NO": "3",
            "EMM_STATUS": "CLOSE",
            "EMM_EXM_EXCH_ID": "NSE",
            "MARKET_TYPE": "SP",
            "EMM_MKT_DESCRIPTION": "SPOT",
            "EMM_EXCH_SEG": "E"
        }
    ]
}

Response Parameter

Parameter
Description

MARKET_TYPE

Market type, which can be NL (Normal), OL (Odd Lot), SP (Spot), AU (Auction), A1 (Auction 1), A2 (Auction 2), MS (Morning Session), ES (Evening Session), or SS (Special Session)

EMM_MARKET_TYPE_NO

Corresponding code for Market_type.

EMM_EXM_EXCH_ID

Exchange ID where the market operates (NSE, BSE,)

EMM_EXCH_SEG

Segment of the exchange (Equity, Currency, Mutual Funds, Derivatives)

EMM_STATUS

Current status of the market, which can be OPEN, CLOSE, PREOPEN, or POSTCLOSE

PreviousMarketNextTrade

Last updated 11 months ago