Skip to main content

Get Market Session

Query the current trading session state of the stock market and the list of non-tradable periods (early close and holidays).

info

This endpoint is only available for Market Maker.

HTTP Request

GET/v5/rwa/stocks/market/session

Request Parameters

ParameterRequiredTypeComments
symbolfalsestringStock symbol, e.g. AAPL-US

Response Parameters

ParameterTypeComments
symbolTypestringStock type. US_STOCK
statusCodeintegerCurrent session state. 1: pre-market, 2: regular hours, 3: post-market, 4: overnight, 5: closed
serverTimelongServer UTC epoch ms. Used to eliminate client local time drift
currentPhaseEndTimelongCurrent phase end time (epoch ms)
nextMarketOpenTimelongNext main-market open time (epoch ms)
stocksTradingHolidayarray<object>All non-tradable periods
> typestringType. EARLY_CLOSE, HOLIDAY
> startTimelongStart time (epoch ms)
> endTimelongEnd time (epoch ms)

Request Example

GET /v5/rwa/stocks/market/session?symbol=TSLA-US HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx
X-BAPI-TIMESTAMP: 1787662431425
X-BAPI-RECV-WINDOW: 5000
X-BAPI-SIGN: XXXXX

Response Example

{
"retCode": 0,
"retMsg": "ok",
"result": {
"symbolType": "US_STOCK",
"statusCode": 4,
"serverTime": 1787662431425,
"currentPhaseEndTime": 1787299200000,
"nextMarketOpenTime": 1787319000000,
"stocksTradingHoliday": [
{ "type": "HOLIDAY", "startTime": 1756684800000, "endTime": 1756771200000 }
]
},
"time": 1787662431500
}