For the complete documentation index, see llms.txt. This page is also available as Markdown.

Timings

Get market trading timings for a specific date across all exchanges.

Endpoint URL

Local Host   :  POST http://127.0.0.1:5000/api/v1/market/timings
Ngrok Domain :  POST https://<your-ngrok-domain>.ngrok-free.app/api/v1/market/timings
Custom Domain:  POST https://<your-custom-domain>/api/v1/market/timings

Sample API Request

{
  "apikey": "<your_app_apikey>",
  "date": "2025-12-19"
}

Sample cURL Request

curl -X POST http://127.0.0.1:5000/api/v1/market/timings \
  -H 'Content-Type: application/json' \
  -d '{
  "apikey": "<your_app_apikey>",
  "date": "2025-12-19"
}'

Sample API Response

Request Body

Parameter
Description
Mandatory/Optional
Default Value

apikey

Your OpenAlgo API key

Mandatory

-

date

Date in YYYY-MM-DD format

Mandatory

-

Response Fields

Field
Type
Description

status

string

"success" or "error"

data

array

Array of timing objects

Timing Object Fields

Field
Type
Description

exchange

string

Exchange code

start_time

number

Market open time (epoch milliseconds)

end_time

number

Market close time (epoch milliseconds)

Standard Trading Hours (IST)

Exchange
Open
Close

NSE

09:15

15:30

BSE

09:15

15:30

NFO

09:15

15:30

BFO

09:15

15:30

CDS

09:00

17:00

BCD

09:00

17:00

MCX

09:00

23:30

Notes

  • Date must be between 2020-01-01 and 2050-12-31

  • Times are returned as epoch milliseconds

  • Returns empty array for weekends and full holidays

  • For special sessions (e.g., Muhurat trading), returns only the special session timings

  • MCX has extended trading hours into the night

Converting Epoch to Readable Time

JavaScript:

Python:


Back to: API Documentation

Last updated