sdk.lusid.api.calendars_api.CalendarsApi

class CalendarsApi(api_client=None)[source]

NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech

Do not edit the class manually.

Methods

add_business_days_to_date

[EARLY ACCESS] AddBusinessDaysToDate: Adds the requested number of Business Days to the provided date.

add_business_days_to_date_with_http_info

[EARLY ACCESS] AddBusinessDaysToDate: Adds the requested number of Business Days to the provided date.

add_date_to_calendar

[EARLY ACCESS] AddDateToCalendar: Add a date to a calendar # noqa: E501

add_date_to_calendar_with_http_info

[EARLY ACCESS] AddDateToCalendar: Add a date to a calendar # noqa: E501

create_calendar

[EARLY ACCESS] CreateCalendar: Create a calendar in its generic form # noqa: E501

create_calendar_with_http_info

[EARLY ACCESS] CreateCalendar: Create a calendar in its generic form # noqa: E501

delete_calendar

[EARLY ACCESS] DeleteCalendar: Delete a calendar # noqa: E501

delete_calendar_with_http_info

[EARLY ACCESS] DeleteCalendar: Delete a calendar # noqa: E501

delete_date_from_calendar

[EARLY ACCESS] DeleteDateFromCalendar: Remove a date from a calendar # noqa: E501

delete_date_from_calendar_with_http_info

[EARLY ACCESS] DeleteDateFromCalendar: Remove a date from a calendar # noqa: E501

generate_schedule

[EARLY ACCESS] GenerateSchedule: Generate an ordered schedule of dates.

generate_schedule_with_http_info

[EARLY ACCESS] GenerateSchedule: Generate an ordered schedule of dates.

get_calendar

[EARLY ACCESS] GetCalendar: Get a calendar in its generic form # noqa: E501

get_calendar_with_http_info

[EARLY ACCESS] GetCalendar: Get a calendar in its generic form # noqa: E501

get_dates

[EARLY ACCESS] GetDates: Get dates for a specific calendar # noqa: E501

get_dates_with_http_info

[EARLY ACCESS] GetDates: Get dates for a specific calendar # noqa: E501

is_business_date_time

[EARLY ACCESS] IsBusinessDateTime: Check whether a DateTime is a "Business DateTime" # noqa: E501

is_business_date_time_with_http_info

[EARLY ACCESS] IsBusinessDateTime: Check whether a DateTime is a "Business DateTime" # noqa: E501

list_calendars

[EARLY ACCESS] ListCalendars: List Calendars # noqa: E501

list_calendars_in_scope

[EARLY ACCESS] ListCalendarsInScope: List all calenders in a specified scope # noqa: E501

list_calendars_in_scope_with_http_info

[EARLY ACCESS] ListCalendarsInScope: List all calenders in a specified scope # noqa: E501

list_calendars_with_http_info

[EARLY ACCESS] ListCalendars: List Calendars # noqa: E501

update_calendar

[EARLY ACCESS] UpdateCalendar: Update a calendar # noqa: E501

update_calendar_with_http_info

[EARLY ACCESS] UpdateCalendar: Update a calendar # noqa: E501

add_business_days_to_date(scope, add_business_days_to_date_request, async_req=None, **kwargs)[source]

[EARLY ACCESS] AddBusinessDaysToDate: Adds the requested number of Business Days to the provided date. # noqa: E501

A Business day is defined as a point in time that: * Does not represent a day in the calendar’s weekend * Does not represent a day in the calendar’s list of holidays (e.g. Christmas Day in the UK) All dates specified must be UTC and the upper bound of a calendar is not inclusive e.g. From: 2020-12-24-00-00-00: Adding 3 business days returns 2020-12-30, assuming Saturday and Sunday are weekends, and the 25th and 28th are holidays. Adding -2 business days returns 2020-12-22 under the same assumptions. If the provided number of days to add is zero, returns a failure. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.add_business_days_to_date(scope, add_business_days_to_date_request, async_req=True)
>>> result = thread.get()
Parameters:
  • scope (str) – Scope within which to search for the calendars (required)

  • add_business_days_to_date_request (AddBusinessDaysToDateRequest) – Request Details: start date, number of days to add (which can be negative, but not zero), calendar codes and optionally an AsAt date for searching the calendar store (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

AddBusinessDaysToDateResponse

add_business_days_to_date_with_http_info(scope, add_business_days_to_date_request, **kwargs)[source]

[EARLY ACCESS] AddBusinessDaysToDate: Adds the requested number of Business Days to the provided date. # noqa: E501

A Business day is defined as a point in time that: * Does not represent a day in the calendar’s weekend * Does not represent a day in the calendar’s list of holidays (e.g. Christmas Day in the UK) All dates specified must be UTC and the upper bound of a calendar is not inclusive e.g. From: 2020-12-24-00-00-00: Adding 3 business days returns 2020-12-30, assuming Saturday and Sunday are weekends, and the 25th and 28th are holidays. Adding -2 business days returns 2020-12-22 under the same assumptions. If the provided number of days to add is zero, returns a failure. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.add_business_days_to_date_with_http_info(scope, add_business_days_to_date_request, async_req=True)
>>> result = thread.get()
Parameters:
  • scope (str) – Scope within which to search for the calendars (required)

  • add_business_days_to_date_request (AddBusinessDaysToDateRequest) – Request Details: start date, number of days to add (which can be negative, but not zero), calendar codes and optionally an AsAt date for searching the calendar store (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. Default is True.

  • _return_http_data_only (bool, optional) – response data instead of ApiResponse object with status code, headers, etc

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

tuple(AddBusinessDaysToDateResponse, status_code(int), headers(HTTPHeaderDict))

add_date_to_calendar(scope, code, create_date_request, async_req=None, **kwargs)[source]

[EARLY ACCESS] AddDateToCalendar: Add a date to a calendar # noqa: E501

Add an event to the calendar. These Events can be a maximum of 24 hours and must be specified in UTC. A local date will be calculated by the system and applied to the calendar before processing. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.add_date_to_calendar(scope, code, create_date_request, async_req=True)
>>> result = thread.get()
Parameters:
  • scope (str) – Scope of the calendar (required)

  • code (str) – Code of the calendar (required)

  • create_date_request (CreateDateRequest) – Add date to calendar request (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

CalendarDate

add_date_to_calendar_with_http_info(scope, code, create_date_request, **kwargs)[source]

[EARLY ACCESS] AddDateToCalendar: Add a date to a calendar # noqa: E501

Add an event to the calendar. These Events can be a maximum of 24 hours and must be specified in UTC. A local date will be calculated by the system and applied to the calendar before processing. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.add_date_to_calendar_with_http_info(scope, code, create_date_request, async_req=True)
>>> result = thread.get()
Parameters:
  • scope (str) – Scope of the calendar (required)

  • code (str) – Code of the calendar (required)

  • create_date_request (CreateDateRequest) – Add date to calendar request (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. Default is True.

  • _return_http_data_only (bool, optional) – response data instead of ApiResponse object with status code, headers, etc

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

tuple(CalendarDate, status_code(int), headers(HTTPHeaderDict))

create_calendar(create_calendar_request, async_req=None, **kwargs)[source]

[EARLY ACCESS] CreateCalendar: Create a calendar in its generic form # noqa: E501

Create a calendar in a generic form which can be used to store date events. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.create_calendar(create_calendar_request, async_req=True)
>>> result = thread.get()
Parameters:
  • create_calendar_request (CreateCalendarRequest) – A request to create the calendar (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

Calendar

create_calendar_with_http_info(create_calendar_request, **kwargs)[source]

[EARLY ACCESS] CreateCalendar: Create a calendar in its generic form # noqa: E501

Create a calendar in a generic form which can be used to store date events. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.create_calendar_with_http_info(create_calendar_request, async_req=True)
>>> result = thread.get()
Parameters:
  • create_calendar_request (CreateCalendarRequest) – A request to create the calendar (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. Default is True.

  • _return_http_data_only (bool, optional) – response data instead of ApiResponse object with status code, headers, etc

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

tuple(Calendar, status_code(int), headers(HTTPHeaderDict))

delete_calendar(scope, code, async_req=None, **kwargs)[source]

[EARLY ACCESS] DeleteCalendar: Delete a calendar # noqa: E501

Delete a calendar and all of its respective dates # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.delete_calendar(scope, code, async_req=True)
>>> result = thread.get()
Parameters:
  • scope (str) – Scope of the calendar (required)

  • code (str) – Code of the calendar (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

Calendar

delete_calendar_with_http_info(scope, code, **kwargs)[source]

[EARLY ACCESS] DeleteCalendar: Delete a calendar # noqa: E501

Delete a calendar and all of its respective dates # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.delete_calendar_with_http_info(scope, code, async_req=True)
>>> result = thread.get()
Parameters:
  • scope (str) – Scope of the calendar (required)

  • code (str) – Code of the calendar (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. Default is True.

  • _return_http_data_only (bool, optional) – response data instead of ApiResponse object with status code, headers, etc

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

tuple(Calendar, status_code(int), headers(HTTPHeaderDict))

delete_date_from_calendar(scope, code, date_id, async_req=None, **kwargs)[source]

[EARLY ACCESS] DeleteDateFromCalendar: Remove a date from a calendar # noqa: E501

Remove a date from a calendar. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.delete_date_from_calendar(scope, code, date_id, async_req=True)
>>> result = thread.get()
Parameters:
  • scope (str) – Scope of the calendar (required)

  • code (str) – Code of the calendar (required)

  • date_id (str) – Identifier of the date to be removed (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

CalendarDate

delete_date_from_calendar_with_http_info(scope, code, date_id, **kwargs)[source]

[EARLY ACCESS] DeleteDateFromCalendar: Remove a date from a calendar # noqa: E501

Remove a date from a calendar. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.delete_date_from_calendar_with_http_info(scope, code, date_id, async_req=True)
>>> result = thread.get()
Parameters:
  • scope (str) – Scope of the calendar (required)

  • code (str) – Code of the calendar (required)

  • date_id (str) – Identifier of the date to be removed (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. Default is True.

  • _return_http_data_only (bool, optional) – response data instead of ApiResponse object with status code, headers, etc

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

tuple(CalendarDate, status_code(int), headers(HTTPHeaderDict))

generate_schedule(scope, valuation_schedule, as_at=None, async_req=None, **kwargs)[source]

[EARLY ACCESS] GenerateSchedule: Generate an ordered schedule of dates. # noqa: E501

Returns an ordered array of dates. The dates will only fall on business days as defined by the scope and calendar codes in the valuation schedule. Valuations are made at a frequency defined by the valuation schedule’s tenor, e.g. every day (“1D”), every other week (“2W”) etc. These dates will be adjusted onto business days as defined by the schedule’s rollConvention. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.generate_schedule(scope, valuation_schedule, as_at, async_req=True)
>>> result = thread.get()
Parameters:
  • scope (str) – Scope of the calendars to use (required)

  • valuation_schedule (ValuationSchedule) – The ValuationSchedule to generate schedule dates from (required)

  • as_at (datetime) – Optional AsAt for searching the calendar store. Defaults to Latest.

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

List[datetime]

generate_schedule_with_http_info(scope, valuation_schedule, as_at=None, **kwargs)[source]

[EARLY ACCESS] GenerateSchedule: Generate an ordered schedule of dates. # noqa: E501

Returns an ordered array of dates. The dates will only fall on business days as defined by the scope and calendar codes in the valuation schedule. Valuations are made at a frequency defined by the valuation schedule’s tenor, e.g. every day (“1D”), every other week (“2W”) etc. These dates will be adjusted onto business days as defined by the schedule’s rollConvention. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.generate_schedule_with_http_info(scope, valuation_schedule, as_at, async_req=True)
>>> result = thread.get()
Parameters:
  • scope (str) – Scope of the calendars to use (required)

  • valuation_schedule (ValuationSchedule) – The ValuationSchedule to generate schedule dates from (required)

  • as_at (datetime) – Optional AsAt for searching the calendar store. Defaults to Latest.

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. Default is True.

  • _return_http_data_only (bool, optional) – response data instead of ApiResponse object with status code, headers, etc

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

tuple(List[datetime], status_code(int), headers(HTTPHeaderDict))

get_calendar(scope, code, property_keys=None, as_at=None, async_req=None, **kwargs)[source]

[EARLY ACCESS] GetCalendar: Get a calendar in its generic form # noqa: E501

Retrieve a generic calendar by a specific ID at a point in AsAt time # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.get_calendar(scope, code, property_keys, as_at, async_req=True)
>>> result = thread.get()
Parameters:
  • scope (str) – Scope of the calendar identifier (required)

  • code (str) – Code of the calendar identifier (required)

  • property_keys (List[str]) – A list of property keys from the “Calendar” domain to decorate onto the calendar, These take the format {domain}/{scope}/{code} e.g. “Calendar/System/Name”.

  • as_at (datetime) – The AsAt datetime at which to retrieve the calendar

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

Calendar

get_calendar_with_http_info(scope, code, property_keys=None, as_at=None, **kwargs)[source]

[EARLY ACCESS] GetCalendar: Get a calendar in its generic form # noqa: E501

Retrieve a generic calendar by a specific ID at a point in AsAt time # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.get_calendar_with_http_info(scope, code, property_keys, as_at, async_req=True)
>>> result = thread.get()
Parameters:
  • scope (str) – Scope of the calendar identifier (required)

  • code (str) – Code of the calendar identifier (required)

  • property_keys (List[str]) – A list of property keys from the “Calendar” domain to decorate onto the calendar, These take the format {domain}/{scope}/{code} e.g. “Calendar/System/Name”.

  • as_at (datetime) – The AsAt datetime at which to retrieve the calendar

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. Default is True.

  • _return_http_data_only (bool, optional) – response data instead of ApiResponse object with status code, headers, etc

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

tuple(Calendar, status_code(int), headers(HTTPHeaderDict))

get_dates(scope, code, from_effective_at=None, to_effective_at=None, as_at=None, id_filter=None, async_req=None, **kwargs)[source]

[EARLY ACCESS] GetDates: Get dates for a specific calendar # noqa: E501

Get dates from a specific calendar within a specific window of effective time, at a point in AsAt time. Providing an id filter can further refine the results. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.get_dates(scope, code, from_effective_at, to_effective_at, as_at, id_filter, async_req=True)
>>> result = thread.get()
Parameters:
  • scope (str) – Scope of the calendar (required)

  • code (str) – Code of the calendar (required)

  • from_effective_at (str) – Where the effective window of dates should begin from

  • to_effective_at (str) – Where the effective window of dates should end

  • as_at (datetime) – AsAt the dates should be retrieved at

  • id_filter (List[str]) – An additional filter that will filter dates based on their identifer

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

ResourceListOfCalendarDate

get_dates_with_http_info(scope, code, from_effective_at=None, to_effective_at=None, as_at=None, id_filter=None, **kwargs)[source]

[EARLY ACCESS] GetDates: Get dates for a specific calendar # noqa: E501

Get dates from a specific calendar within a specific window of effective time, at a point in AsAt time. Providing an id filter can further refine the results. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.get_dates_with_http_info(scope, code, from_effective_at, to_effective_at, as_at, id_filter, async_req=True)
>>> result = thread.get()
Parameters:
  • scope (str) – Scope of the calendar (required)

  • code (str) – Code of the calendar (required)

  • from_effective_at (str) – Where the effective window of dates should begin from

  • to_effective_at (str) – Where the effective window of dates should end

  • as_at (datetime) – AsAt the dates should be retrieved at

  • id_filter (List[str]) – An additional filter that will filter dates based on their identifer

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. Default is True.

  • _return_http_data_only (bool, optional) – response data instead of ApiResponse object with status code, headers, etc

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

tuple(ResourceListOfCalendarDate, status_code(int), headers(HTTPHeaderDict))

is_business_date_time(date_time, scope, code, as_at=None, async_req=None, **kwargs)[source]

[EARLY ACCESS] IsBusinessDateTime: Check whether a DateTime is a “Business DateTime” # noqa: E501

A Business DateTime is defined as a point in time that: * Does not represent a day that overlaps with the calendars WeekendMask * If the calendar is a “Holiday Calendar” Does not overlap with any dates in the calendar * If the calendar is a “TradingHours Calendar” Does overlap with a date in the calendar All dates specified must be UTC and the upper bound of a calendar is not inclusive e.g. From: 2020-12-25-00-00-00 To: 2020-12-26-00-00-00 IsBusinessDay(2020-12-26-00-00-00) == false # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.is_business_date_time(date_time, scope, code, as_at, async_req=True)
>>> result = thread.get()
Parameters:
  • date_time (datetime) – DateTime to check - This DateTime must be UTC (required)

  • scope (str) – Scope of the calendar (required)

  • code (str) – Code of the calendar (required)

  • as_at (datetime) – AsAt for the request

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

IsBusinessDayResponse

is_business_date_time_with_http_info(date_time, scope, code, as_at=None, **kwargs)[source]

[EARLY ACCESS] IsBusinessDateTime: Check whether a DateTime is a “Business DateTime” # noqa: E501

A Business DateTime is defined as a point in time that: * Does not represent a day that overlaps with the calendars WeekendMask * If the calendar is a “Holiday Calendar” Does not overlap with any dates in the calendar * If the calendar is a “TradingHours Calendar” Does overlap with a date in the calendar All dates specified must be UTC and the upper bound of a calendar is not inclusive e.g. From: 2020-12-25-00-00-00 To: 2020-12-26-00-00-00 IsBusinessDay(2020-12-26-00-00-00) == false # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.is_business_date_time_with_http_info(date_time, scope, code, as_at, async_req=True)
>>> result = thread.get()
Parameters:
  • date_time (datetime) – DateTime to check - This DateTime must be UTC (required)

  • scope (str) – Scope of the calendar (required)

  • code (str) – Code of the calendar (required)

  • as_at (datetime) – AsAt for the request

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. Default is True.

  • _return_http_data_only (bool, optional) – response data instead of ApiResponse object with status code, headers, etc

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

tuple(IsBusinessDayResponse, status_code(int), headers(HTTPHeaderDict))

list_calendars(as_at=None, page=None, limit=None, property_keys=None, filter=None, async_req=None, **kwargs)[source]

[EARLY ACCESS] ListCalendars: List Calendars # noqa: E501

List calendars at a point in AsAt time. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.list_calendars(as_at, page, limit, property_keys, filter, async_req=True)
>>> result = thread.get()
Parameters:
  • as_at (datetime) – The AsAt datetime at which to retrieve the calendars

  • page (str) – The pagination token to use to continue listing calendars from a previous call to list calendars. This value is returned from the previous call. If a pagination token is provided the sortBy, filter, and asAt fields must not have changed since the original request.

  • limit (int) – When paginating, limit the number of returned results to this many.

  • property_keys (List[str]) – A list of property keys from the “Calendar” domain to decorate onto the calendar, These take the format {domain}/{scope}/{code} e.g. “Calendar/System/Name”.

  • filter (str) – Expression to filter the result set. Read more about filtering results from LUSID here https://support.lusid.com/filtering-results-from-lusid.

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

PagedResourceListOfCalendar

list_calendars_in_scope(scope, as_at=None, page=None, limit=None, property_keys=None, filter=None, async_req=None, **kwargs)[source]

[EARLY ACCESS] ListCalendarsInScope: List all calenders in a specified scope # noqa: E501

List calendars in a Scope at a point in AsAt time. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.list_calendars_in_scope(scope, as_at, page, limit, property_keys, filter, async_req=True)
>>> result = thread.get()
Parameters:
  • scope (str) – Scope of the calendars (required)

  • as_at (datetime) – The AsAt datetime at which to retrieve the calendars

  • page (str) – The pagination token to use to continue listing calendars from a previous call to list calendars. This value is returned from the previous call. If a pagination token is provided the sortBy, filter, and asAt fields must not have changed since the original request.

  • limit (int) – When paginating, limit the number of returned results to this many.

  • property_keys (List[str]) – A list of property keys from the “Calendar” domain to decorate onto the calendar, These take the format {domain}/{scope}/{code} e.g. “Calendar/System/Name”.

  • filter (str) – Expression to filter the result set. Read more about filtering results from LUSID here https://support.lusid.com/filtering-results-from-lusid.

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

PagedResourceListOfCalendar

list_calendars_in_scope_with_http_info(scope, as_at=None, page=None, limit=None, property_keys=None, filter=None, **kwargs)[source]

[EARLY ACCESS] ListCalendarsInScope: List all calenders in a specified scope # noqa: E501

List calendars in a Scope at a point in AsAt time. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.list_calendars_in_scope_with_http_info(scope, as_at, page, limit, property_keys, filter, async_req=True)
>>> result = thread.get()
Parameters:
  • scope (str) – Scope of the calendars (required)

  • as_at (datetime) – The AsAt datetime at which to retrieve the calendars

  • page (str) – The pagination token to use to continue listing calendars from a previous call to list calendars. This value is returned from the previous call. If a pagination token is provided the sortBy, filter, and asAt fields must not have changed since the original request.

  • limit (int) – When paginating, limit the number of returned results to this many.

  • property_keys (List[str]) – A list of property keys from the “Calendar” domain to decorate onto the calendar, These take the format {domain}/{scope}/{code} e.g. “Calendar/System/Name”.

  • filter (str) – Expression to filter the result set. Read more about filtering results from LUSID here https://support.lusid.com/filtering-results-from-lusid.

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. Default is True.

  • _return_http_data_only (bool, optional) – response data instead of ApiResponse object with status code, headers, etc

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

tuple(PagedResourceListOfCalendar, status_code(int), headers(HTTPHeaderDict))

list_calendars_with_http_info(as_at=None, page=None, limit=None, property_keys=None, filter=None, **kwargs)[source]

[EARLY ACCESS] ListCalendars: List Calendars # noqa: E501

List calendars at a point in AsAt time. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.list_calendars_with_http_info(as_at, page, limit, property_keys, filter, async_req=True)
>>> result = thread.get()
Parameters:
  • as_at (datetime) – The AsAt datetime at which to retrieve the calendars

  • page (str) – The pagination token to use to continue listing calendars from a previous call to list calendars. This value is returned from the previous call. If a pagination token is provided the sortBy, filter, and asAt fields must not have changed since the original request.

  • limit (int) – When paginating, limit the number of returned results to this many.

  • property_keys (List[str]) – A list of property keys from the “Calendar” domain to decorate onto the calendar, These take the format {domain}/{scope}/{code} e.g. “Calendar/System/Name”.

  • filter (str) – Expression to filter the result set. Read more about filtering results from LUSID here https://support.lusid.com/filtering-results-from-lusid.

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. Default is True.

  • _return_http_data_only (bool, optional) – response data instead of ApiResponse object with status code, headers, etc

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

tuple(PagedResourceListOfCalendar, status_code(int), headers(HTTPHeaderDict))

update_calendar(scope, code, update_calendar_request, async_req=None, **kwargs)[source]

[EARLY ACCESS] UpdateCalendar: Update a calendar # noqa: E501

Update the calendars WeekendMask, SourceProvider or Properties # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.update_calendar(scope, code, update_calendar_request, async_req=True)
>>> result = thread.get()
Parameters:
  • scope (str) – Scope of the request (required)

  • code (str) – Code of the request (required)

  • update_calendar_request (UpdateCalendarRequest) – The new state of the calendar (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

Calendar

update_calendar_with_http_info(scope, code, update_calendar_request, **kwargs)[source]

[EARLY ACCESS] UpdateCalendar: Update a calendar # noqa: E501

Update the calendars WeekendMask, SourceProvider or Properties # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.update_calendar_with_http_info(scope, code, update_calendar_request, async_req=True)
>>> result = thread.get()
Parameters:
  • scope (str) – Scope of the request (required)

  • code (str) – Code of the request (required)

  • update_calendar_request (UpdateCalendarRequest) – The new state of the calendar (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. Default is True.

  • _return_http_data_only (bool, optional) – response data instead of ApiResponse object with status code, headers, etc

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

tuple(Calendar, status_code(int), headers(HTTPHeaderDict))