Skip to content
Profit and Loss Analysis

Get Profit and Loss Calendar Market Closures

Returns the closure status of each market for each day in the range. Use it to mark holiday or weekend closures on the day cells of the profit and loss calendar; when all markets are closed, you can mark the day as fully closed. It affects only the closure marks and does not affect profit and loss figures. Request it again for the new range when the Client changes the month.

WhaleCore portfolioService() already wraps this capability through getPLCalendar(currency:period:markets:). When you use WhaleCore, prefer the WhaleCore capability over calling this operation directly.

GEThttps://api.lbkrs.com/portfolio/pnl/calendar

Parameters

start_timestringquery

Range start as a Unix timestamp in seconds

end_timestringquery

Range end as a Unix timestamp in seconds

marketsstringquery

Markets that need closure marks. Separate multiple values with commas, such as HK,US,CN

Responses

HTTP 200The request succeeded. The response body contains the result of the “Get profit and loss calendar market closures” operation.
Standard response envelopecodemessagedata
dataobjectdata structure
pl_calendararray<object>

Closure status by date

Child attributes
calendar_datestring

Date in YYYY-MM-DD format

calendar_timestring

Unix timestamp in seconds for the date

market_typeobject

Status of each market on the day, keyed by market code such as HK, US, or CN. HOLIDAY means a holiday closure and WEEKEND means a weekend closure

Whale Docs