Retrieve marginal VaR charts grouped by report or requested fields.
curl --request POST \
--url https://api.riskportal.activeviam.com/api/VarReportQuery/MarginalVarByGroup \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"$type": "Derivitec.Web.Core.VarReportQuery.ApiVarReportQueryMarginalVarByGroupRequest, Derivitec.Web.Core",
"confidence_level": 0.99,
"row_query": {
"$type": "Derivitec.Web.Core.Filters.Filter, Derivitec.Web.Core",
"field": "<string>",
"type": "<string>"
},
"row_restriction_filter": {
"$type": "Derivitec.Web.Core.Filters.Filter, Derivitec.Web.Core",
"field": "<string>",
"type": "<string>"
},
"report_id": "<string>",
"custom_bar_chart_definitions": [
{
"$type": "Derivitec.Web.Core.VarReportQuery.CustomBarChartDefinition, Derivitec.Web.Core",
"id": "chart-1",
"title": "<string>",
"group_property": "<string>",
"statistic_property": "<string>"
}
]
}
'import requests
url = "https://api.riskportal.activeviam.com/api/VarReportQuery/MarginalVarByGroup"
payload = {
"$type": "Derivitec.Web.Core.VarReportQuery.ApiVarReportQueryMarginalVarByGroupRequest, Derivitec.Web.Core",
"confidence_level": 0.99,
"row_query": {
"$type": "Derivitec.Web.Core.Filters.Filter, Derivitec.Web.Core",
"field": "<string>",
"type": "<string>"
},
"row_restriction_filter": {
"$type": "Derivitec.Web.Core.Filters.Filter, Derivitec.Web.Core",
"field": "<string>",
"type": "<string>"
},
"report_id": "<string>",
"custom_bar_chart_definitions": [
{
"$type": "Derivitec.Web.Core.VarReportQuery.CustomBarChartDefinition, Derivitec.Web.Core",
"id": "chart-1",
"title": "<string>",
"group_property": "<string>",
"statistic_property": "<string>"
}
]
}
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.VarReportQuery.ApiVarReportQueryMarginalVarByGroupRequest, Derivitec.Web.Core',
confidence_level: 0.99,
row_query: {
$type: 'Derivitec.Web.Core.Filters.Filter, Derivitec.Web.Core',
field: '<string>',
type: '<string>'
},
row_restriction_filter: {
$type: 'Derivitec.Web.Core.Filters.Filter, Derivitec.Web.Core',
field: '<string>',
type: '<string>'
},
report_id: '<string>',
custom_bar_chart_definitions: [
{
$type: 'Derivitec.Web.Core.VarReportQuery.CustomBarChartDefinition, Derivitec.Web.Core',
id: 'chart-1',
title: '<string>',
group_property: '<string>',
statistic_property: '<string>'
}
]
})
};
fetch('https://api.riskportal.activeviam.com/api/VarReportQuery/MarginalVarByGroup', 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/VarReportQuery/MarginalVarByGroup",
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.VarReportQuery.ApiVarReportQueryMarginalVarByGroupRequest, Derivitec.Web.Core',
'confidence_level' => 0.99,
'row_query' => [
'$type' => 'Derivitec.Web.Core.Filters.Filter, Derivitec.Web.Core',
'field' => '<string>',
'type' => '<string>'
],
'row_restriction_filter' => [
'$type' => 'Derivitec.Web.Core.Filters.Filter, Derivitec.Web.Core',
'field' => '<string>',
'type' => '<string>'
],
'report_id' => '<string>',
'custom_bar_chart_definitions' => [
[
'$type' => 'Derivitec.Web.Core.VarReportQuery.CustomBarChartDefinition, Derivitec.Web.Core',
'id' => 'chart-1',
'title' => '<string>',
'group_property' => '<string>',
'statistic_property' => '<string>'
]
]
]),
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/VarReportQuery/MarginalVarByGroup"
payload := strings.NewReader("{\n \"$type\": \"Derivitec.Web.Core.VarReportQuery.ApiVarReportQueryMarginalVarByGroupRequest, Derivitec.Web.Core\",\n \"confidence_level\": 0.99,\n \"row_query\": {\n \"$type\": \"Derivitec.Web.Core.Filters.Filter, Derivitec.Web.Core\",\n \"field\": \"<string>\",\n \"type\": \"<string>\"\n },\n \"row_restriction_filter\": {\n \"$type\": \"Derivitec.Web.Core.Filters.Filter, Derivitec.Web.Core\",\n \"field\": \"<string>\",\n \"type\": \"<string>\"\n },\n \"report_id\": \"<string>\",\n \"custom_bar_chart_definitions\": [\n {\n \"$type\": \"Derivitec.Web.Core.VarReportQuery.CustomBarChartDefinition, Derivitec.Web.Core\",\n \"id\": \"chart-1\",\n \"title\": \"<string>\",\n \"group_property\": \"<string>\",\n \"statistic_property\": \"<string>\"\n }\n ]\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/VarReportQuery/MarginalVarByGroup")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"$type\": \"Derivitec.Web.Core.VarReportQuery.ApiVarReportQueryMarginalVarByGroupRequest, Derivitec.Web.Core\",\n \"confidence_level\": 0.99,\n \"row_query\": {\n \"$type\": \"Derivitec.Web.Core.Filters.Filter, Derivitec.Web.Core\",\n \"field\": \"<string>\",\n \"type\": \"<string>\"\n },\n \"row_restriction_filter\": {\n \"$type\": \"Derivitec.Web.Core.Filters.Filter, Derivitec.Web.Core\",\n \"field\": \"<string>\",\n \"type\": \"<string>\"\n },\n \"report_id\": \"<string>\",\n \"custom_bar_chart_definitions\": [\n {\n \"$type\": \"Derivitec.Web.Core.VarReportQuery.CustomBarChartDefinition, Derivitec.Web.Core\",\n \"id\": \"chart-1\",\n \"title\": \"<string>\",\n \"group_property\": \"<string>\",\n \"statistic_property\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.riskportal.activeviam.com/api/VarReportQuery/MarginalVarByGroup")
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.VarReportQuery.ApiVarReportQueryMarginalVarByGroupRequest, Derivitec.Web.Core\",\n \"confidence_level\": 0.99,\n \"row_query\": {\n \"$type\": \"Derivitec.Web.Core.Filters.Filter, Derivitec.Web.Core\",\n \"field\": \"<string>\",\n \"type\": \"<string>\"\n },\n \"row_restriction_filter\": {\n \"$type\": \"Derivitec.Web.Core.Filters.Filter, Derivitec.Web.Core\",\n \"field\": \"<string>\",\n \"type\": \"<string>\"\n },\n \"report_id\": \"<string>\",\n \"custom_bar_chart_definitions\": [\n {\n \"$type\": \"Derivitec.Web.Core.VarReportQuery.CustomBarChartDefinition, Derivitec.Web.Core\",\n \"id\": \"chart-1\",\n \"title\": \"<string>\",\n \"group_property\": \"<string>\",\n \"statistic_property\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"$type": "Derivitec.Web.Core.VarReportQuery.ApiVarReportQueryMarginalVarByGroupResponse, Derivitec.Web.Core",
"is_success": true,
"error_messages": [
"<string>"
],
"price_histories_count": 123,
"bar_charts": [
{
"$type": "Derivitec.Web.Core.VarReportQuery.BarChart, Derivitec.Web.Core",
"categories": [
"<string>"
],
"id": "<string>",
"statistic_property": "<string>",
"format": "<string>",
"title": "<string>",
"values": [
123
],
"group_name_property": "<string>",
"take_n": 123
}
]
}Retrieve marginal VaR charts grouped by report or requested fields.
Returns the report-defined charts and any supplied custom bar-chart selections. No fixed catalog of accepted grouping or statistic property names is declared by this action.
POST
/
api
/
VarReportQuery
/
MarginalVarByGroup
Retrieve marginal VaR charts grouped by report or requested fields.
curl --request POST \
--url https://api.riskportal.activeviam.com/api/VarReportQuery/MarginalVarByGroup \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"$type": "Derivitec.Web.Core.VarReportQuery.ApiVarReportQueryMarginalVarByGroupRequest, Derivitec.Web.Core",
"confidence_level": 0.99,
"row_query": {
"$type": "Derivitec.Web.Core.Filters.Filter, Derivitec.Web.Core",
"field": "<string>",
"type": "<string>"
},
"row_restriction_filter": {
"$type": "Derivitec.Web.Core.Filters.Filter, Derivitec.Web.Core",
"field": "<string>",
"type": "<string>"
},
"report_id": "<string>",
"custom_bar_chart_definitions": [
{
"$type": "Derivitec.Web.Core.VarReportQuery.CustomBarChartDefinition, Derivitec.Web.Core",
"id": "chart-1",
"title": "<string>",
"group_property": "<string>",
"statistic_property": "<string>"
}
]
}
'import requests
url = "https://api.riskportal.activeviam.com/api/VarReportQuery/MarginalVarByGroup"
payload = {
"$type": "Derivitec.Web.Core.VarReportQuery.ApiVarReportQueryMarginalVarByGroupRequest, Derivitec.Web.Core",
"confidence_level": 0.99,
"row_query": {
"$type": "Derivitec.Web.Core.Filters.Filter, Derivitec.Web.Core",
"field": "<string>",
"type": "<string>"
},
"row_restriction_filter": {
"$type": "Derivitec.Web.Core.Filters.Filter, Derivitec.Web.Core",
"field": "<string>",
"type": "<string>"
},
"report_id": "<string>",
"custom_bar_chart_definitions": [
{
"$type": "Derivitec.Web.Core.VarReportQuery.CustomBarChartDefinition, Derivitec.Web.Core",
"id": "chart-1",
"title": "<string>",
"group_property": "<string>",
"statistic_property": "<string>"
}
]
}
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.VarReportQuery.ApiVarReportQueryMarginalVarByGroupRequest, Derivitec.Web.Core',
confidence_level: 0.99,
row_query: {
$type: 'Derivitec.Web.Core.Filters.Filter, Derivitec.Web.Core',
field: '<string>',
type: '<string>'
},
row_restriction_filter: {
$type: 'Derivitec.Web.Core.Filters.Filter, Derivitec.Web.Core',
field: '<string>',
type: '<string>'
},
report_id: '<string>',
custom_bar_chart_definitions: [
{
$type: 'Derivitec.Web.Core.VarReportQuery.CustomBarChartDefinition, Derivitec.Web.Core',
id: 'chart-1',
title: '<string>',
group_property: '<string>',
statistic_property: '<string>'
}
]
})
};
fetch('https://api.riskportal.activeviam.com/api/VarReportQuery/MarginalVarByGroup', 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/VarReportQuery/MarginalVarByGroup",
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.VarReportQuery.ApiVarReportQueryMarginalVarByGroupRequest, Derivitec.Web.Core',
'confidence_level' => 0.99,
'row_query' => [
'$type' => 'Derivitec.Web.Core.Filters.Filter, Derivitec.Web.Core',
'field' => '<string>',
'type' => '<string>'
],
'row_restriction_filter' => [
'$type' => 'Derivitec.Web.Core.Filters.Filter, Derivitec.Web.Core',
'field' => '<string>',
'type' => '<string>'
],
'report_id' => '<string>',
'custom_bar_chart_definitions' => [
[
'$type' => 'Derivitec.Web.Core.VarReportQuery.CustomBarChartDefinition, Derivitec.Web.Core',
'id' => 'chart-1',
'title' => '<string>',
'group_property' => '<string>',
'statistic_property' => '<string>'
]
]
]),
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/VarReportQuery/MarginalVarByGroup"
payload := strings.NewReader("{\n \"$type\": \"Derivitec.Web.Core.VarReportQuery.ApiVarReportQueryMarginalVarByGroupRequest, Derivitec.Web.Core\",\n \"confidence_level\": 0.99,\n \"row_query\": {\n \"$type\": \"Derivitec.Web.Core.Filters.Filter, Derivitec.Web.Core\",\n \"field\": \"<string>\",\n \"type\": \"<string>\"\n },\n \"row_restriction_filter\": {\n \"$type\": \"Derivitec.Web.Core.Filters.Filter, Derivitec.Web.Core\",\n \"field\": \"<string>\",\n \"type\": \"<string>\"\n },\n \"report_id\": \"<string>\",\n \"custom_bar_chart_definitions\": [\n {\n \"$type\": \"Derivitec.Web.Core.VarReportQuery.CustomBarChartDefinition, Derivitec.Web.Core\",\n \"id\": \"chart-1\",\n \"title\": \"<string>\",\n \"group_property\": \"<string>\",\n \"statistic_property\": \"<string>\"\n }\n ]\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/VarReportQuery/MarginalVarByGroup")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"$type\": \"Derivitec.Web.Core.VarReportQuery.ApiVarReportQueryMarginalVarByGroupRequest, Derivitec.Web.Core\",\n \"confidence_level\": 0.99,\n \"row_query\": {\n \"$type\": \"Derivitec.Web.Core.Filters.Filter, Derivitec.Web.Core\",\n \"field\": \"<string>\",\n \"type\": \"<string>\"\n },\n \"row_restriction_filter\": {\n \"$type\": \"Derivitec.Web.Core.Filters.Filter, Derivitec.Web.Core\",\n \"field\": \"<string>\",\n \"type\": \"<string>\"\n },\n \"report_id\": \"<string>\",\n \"custom_bar_chart_definitions\": [\n {\n \"$type\": \"Derivitec.Web.Core.VarReportQuery.CustomBarChartDefinition, Derivitec.Web.Core\",\n \"id\": \"chart-1\",\n \"title\": \"<string>\",\n \"group_property\": \"<string>\",\n \"statistic_property\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.riskportal.activeviam.com/api/VarReportQuery/MarginalVarByGroup")
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.VarReportQuery.ApiVarReportQueryMarginalVarByGroupRequest, Derivitec.Web.Core\",\n \"confidence_level\": 0.99,\n \"row_query\": {\n \"$type\": \"Derivitec.Web.Core.Filters.Filter, Derivitec.Web.Core\",\n \"field\": \"<string>\",\n \"type\": \"<string>\"\n },\n \"row_restriction_filter\": {\n \"$type\": \"Derivitec.Web.Core.Filters.Filter, Derivitec.Web.Core\",\n \"field\": \"<string>\",\n \"type\": \"<string>\"\n },\n \"report_id\": \"<string>\",\n \"custom_bar_chart_definitions\": [\n {\n \"$type\": \"Derivitec.Web.Core.VarReportQuery.CustomBarChartDefinition, Derivitec.Web.Core\",\n \"id\": \"chart-1\",\n \"title\": \"<string>\",\n \"group_property\": \"<string>\",\n \"statistic_property\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"$type": "Derivitec.Web.Core.VarReportQuery.ApiVarReportQueryMarginalVarByGroupResponse, Derivitec.Web.Core",
"is_success": true,
"error_messages": [
"<string>"
],
"price_histories_count": 123,
"bar_charts": [
{
"$type": "Derivitec.Web.Core.VarReportQuery.BarChart, Derivitec.Web.Core",
"categories": [
"<string>"
],
"id": "<string>",
"statistic_property": "<string>",
"format": "<string>",
"title": "<string>",
"values": [
123
],
"group_name_property": "<string>",
"take_n": 123
}
]
}Authorizations
oauth2apikey
Body
application/json-patch+jsonapplication/jsontext/jsonapplication/*+json
The body containing the opaque ReportId, optional VaR selection fields, and optional CustomBarChartDefinitions; each definition can supply Id, Title, GroupProperty, and StatisticProperty.
Requests marginal-VaR bar charts using saved and optional custom grouping definitions.
Response
Returns marginal VaR bar charts for the report-defined and requested groupings.
Returns marginal-VaR values grouped into bar charts.
Was this page helpful?