Calculate a date after adding or subtracting business days.
curl --request POST \
--url https://api.riskportal.activeviam.com/api/MarketData/AddBusinessDays \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"$type": "Derivitec.Web.Core.MarketData.ApiAddBusinessDaysRequest, Derivitec.Web.Core",
"calendar": {
"$type": "Derivitec.Web.Core.StaticData.Calendar, Derivitec.Web.Core",
"holidays": [
"2023-11-07T05:31:56Z"
],
"include_weekends": true,
"name": "<string>"
},
"date": "2023-11-07T05:31:56Z",
"days": 123
}
'import requests
url = "https://api.riskportal.activeviam.com/api/MarketData/AddBusinessDays"
payload = {
"$type": "Derivitec.Web.Core.MarketData.ApiAddBusinessDaysRequest, Derivitec.Web.Core",
"calendar": {
"$type": "Derivitec.Web.Core.StaticData.Calendar, Derivitec.Web.Core",
"holidays": ["2023-11-07T05:31:56Z"],
"include_weekends": True,
"name": "<string>"
},
"date": "2023-11-07T05:31:56Z",
"days": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json-patch+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
$type: 'Derivitec.Web.Core.MarketData.ApiAddBusinessDaysRequest, Derivitec.Web.Core',
calendar: {
$type: 'Derivitec.Web.Core.StaticData.Calendar, Derivitec.Web.Core',
holidays: ['2023-11-07T05:31:56Z'],
include_weekends: true,
name: '<string>'
},
date: '2023-11-07T05:31:56Z',
days: 123
})
};
fetch('https://api.riskportal.activeviam.com/api/MarketData/AddBusinessDays', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.riskportal.activeviam.com/api/MarketData/AddBusinessDays",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'$type' => 'Derivitec.Web.Core.MarketData.ApiAddBusinessDaysRequest, Derivitec.Web.Core',
'calendar' => [
'$type' => 'Derivitec.Web.Core.StaticData.Calendar, Derivitec.Web.Core',
'holidays' => [
'2023-11-07T05:31:56Z'
],
'include_weekends' => true,
'name' => '<string>'
],
'date' => '2023-11-07T05:31:56Z',
'days' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json-patch+json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.riskportal.activeviam.com/api/MarketData/AddBusinessDays"
payload := strings.NewReader("{\n \"$type\": \"Derivitec.Web.Core.MarketData.ApiAddBusinessDaysRequest, Derivitec.Web.Core\",\n \"calendar\": {\n \"$type\": \"Derivitec.Web.Core.StaticData.Calendar, Derivitec.Web.Core\",\n \"holidays\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"include_weekends\": true,\n \"name\": \"<string>\"\n },\n \"date\": \"2023-11-07T05:31:56Z\",\n \"days\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json-patch+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.riskportal.activeviam.com/api/MarketData/AddBusinessDays")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"$type\": \"Derivitec.Web.Core.MarketData.ApiAddBusinessDaysRequest, Derivitec.Web.Core\",\n \"calendar\": {\n \"$type\": \"Derivitec.Web.Core.StaticData.Calendar, Derivitec.Web.Core\",\n \"holidays\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"include_weekends\": true,\n \"name\": \"<string>\"\n },\n \"date\": \"2023-11-07T05:31:56Z\",\n \"days\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.riskportal.activeviam.com/api/MarketData/AddBusinessDays")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"$type\": \"Derivitec.Web.Core.MarketData.ApiAddBusinessDaysRequest, Derivitec.Web.Core\",\n \"calendar\": {\n \"$type\": \"Derivitec.Web.Core.StaticData.Calendar, Derivitec.Web.Core\",\n \"holidays\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"include_weekends\": true,\n \"name\": \"<string>\"\n },\n \"date\": \"2023-11-07T05:31:56Z\",\n \"days\": 123\n}"
response = http.request(request)
puts response.read_body{
"$type": "Derivitec.Web.Core.MarketData.ApiAddBusinessDaysResponse, Derivitec.Web.Core",
"is_success": true,
"error_messages": [
"<string>"
],
"date": "2023-11-07T05:31:56Z"
}Calculate a date after adding or subtracting business days.
Use this operation to offset a date while skipping non-business days defined by the supplied calendar.
Positive Days values move forward and negative values move backward. The current validator rejects
zero, and the calculation does not modify the calendar or persisted market data.
POST
/
api
/
MarketData
/
AddBusinessDays
Calculate a date after adding or subtracting business days.
curl --request POST \
--url https://api.riskportal.activeviam.com/api/MarketData/AddBusinessDays \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"$type": "Derivitec.Web.Core.MarketData.ApiAddBusinessDaysRequest, Derivitec.Web.Core",
"calendar": {
"$type": "Derivitec.Web.Core.StaticData.Calendar, Derivitec.Web.Core",
"holidays": [
"2023-11-07T05:31:56Z"
],
"include_weekends": true,
"name": "<string>"
},
"date": "2023-11-07T05:31:56Z",
"days": 123
}
'import requests
url = "https://api.riskportal.activeviam.com/api/MarketData/AddBusinessDays"
payload = {
"$type": "Derivitec.Web.Core.MarketData.ApiAddBusinessDaysRequest, Derivitec.Web.Core",
"calendar": {
"$type": "Derivitec.Web.Core.StaticData.Calendar, Derivitec.Web.Core",
"holidays": ["2023-11-07T05:31:56Z"],
"include_weekends": True,
"name": "<string>"
},
"date": "2023-11-07T05:31:56Z",
"days": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json-patch+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
$type: 'Derivitec.Web.Core.MarketData.ApiAddBusinessDaysRequest, Derivitec.Web.Core',
calendar: {
$type: 'Derivitec.Web.Core.StaticData.Calendar, Derivitec.Web.Core',
holidays: ['2023-11-07T05:31:56Z'],
include_weekends: true,
name: '<string>'
},
date: '2023-11-07T05:31:56Z',
days: 123
})
};
fetch('https://api.riskportal.activeviam.com/api/MarketData/AddBusinessDays', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.riskportal.activeviam.com/api/MarketData/AddBusinessDays",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'$type' => 'Derivitec.Web.Core.MarketData.ApiAddBusinessDaysRequest, Derivitec.Web.Core',
'calendar' => [
'$type' => 'Derivitec.Web.Core.StaticData.Calendar, Derivitec.Web.Core',
'holidays' => [
'2023-11-07T05:31:56Z'
],
'include_weekends' => true,
'name' => '<string>'
],
'date' => '2023-11-07T05:31:56Z',
'days' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json-patch+json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.riskportal.activeviam.com/api/MarketData/AddBusinessDays"
payload := strings.NewReader("{\n \"$type\": \"Derivitec.Web.Core.MarketData.ApiAddBusinessDaysRequest, Derivitec.Web.Core\",\n \"calendar\": {\n \"$type\": \"Derivitec.Web.Core.StaticData.Calendar, Derivitec.Web.Core\",\n \"holidays\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"include_weekends\": true,\n \"name\": \"<string>\"\n },\n \"date\": \"2023-11-07T05:31:56Z\",\n \"days\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json-patch+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.riskportal.activeviam.com/api/MarketData/AddBusinessDays")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"$type\": \"Derivitec.Web.Core.MarketData.ApiAddBusinessDaysRequest, Derivitec.Web.Core\",\n \"calendar\": {\n \"$type\": \"Derivitec.Web.Core.StaticData.Calendar, Derivitec.Web.Core\",\n \"holidays\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"include_weekends\": true,\n \"name\": \"<string>\"\n },\n \"date\": \"2023-11-07T05:31:56Z\",\n \"days\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.riskportal.activeviam.com/api/MarketData/AddBusinessDays")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"$type\": \"Derivitec.Web.Core.MarketData.ApiAddBusinessDaysRequest, Derivitec.Web.Core\",\n \"calendar\": {\n \"$type\": \"Derivitec.Web.Core.StaticData.Calendar, Derivitec.Web.Core\",\n \"holidays\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"include_weekends\": true,\n \"name\": \"<string>\"\n },\n \"date\": \"2023-11-07T05:31:56Z\",\n \"days\": 123\n}"
response = http.request(request)
puts response.read_body{
"$type": "Derivitec.Web.Core.MarketData.ApiAddBusinessDaysResponse, Derivitec.Web.Core",
"is_success": true,
"error_messages": [
"<string>"
],
"date": "2023-11-07T05:31:56Z"
}Authorizations
oauth2apikey
Body
application/json-patch+jsonapplication/jsontext/jsonapplication/*+json
The calculation payload containing a calendar, the starting date as an ISO 8601 date/time value, and a non-zero signed count of business days.
Selects a calendar, starting date, and business-day offset for calendar arithmetic.
Response
Returns the resulting date as a UTC date/time value.
Returns the calendar date reached after applying the requested business-day offset.
Was this page helpful?