curl --request POST \
--url https://api.riskportal.activeviam.com/api/Tradable/GetCashFlows \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"$type": "Derivitec.Web.Core.Tradables.ApiGetCashFlowsRequest, Derivitec.Web.Core",
"market_data_environment_name": "Example market data",
"provider_id": "<string>",
"contracts": [
{
"$type": "Derivitec.Web.Core.Tradables.Ascot, Derivitec.Web.Core",
"identifier": "<string>",
"currency": "<string>",
"expiration_date": "2023-11-07T05:31:56Z",
"asset_swap_spread": 123,
"bond_identifier": {
"$type": "Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core",
"code": "<string>",
"market_identification_code": "<string>"
},
"calendar_name": "<string>",
"coupon_rate": 123,
"end_to_end": true,
"notional": 123,
"payment_lag": 123,
"period_str": "<string>",
"rate_asset_name": "<string>",
"roll_date": "2023-11-07T05:31:56Z",
"start_date": "2023-11-07T05:31:56Z",
"initial_fx_rate": 123
}
],
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"mkt_data_date": "2023-11-07T05:31:56Z",
"pricing_date": "2023-11-07T05:31:56Z",
"include_projected": true
}
'import requests
url = "https://api.riskportal.activeviam.com/api/Tradable/GetCashFlows"
payload = {
"$type": "Derivitec.Web.Core.Tradables.ApiGetCashFlowsRequest, Derivitec.Web.Core",
"market_data_environment_name": "Example market data",
"provider_id": "<string>",
"contracts": [
{
"$type": "Derivitec.Web.Core.Tradables.Ascot, Derivitec.Web.Core",
"identifier": "<string>",
"currency": "<string>",
"expiration_date": "2023-11-07T05:31:56Z",
"asset_swap_spread": 123,
"bond_identifier": {
"$type": "Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core",
"code": "<string>",
"market_identification_code": "<string>"
},
"calendar_name": "<string>",
"coupon_rate": 123,
"end_to_end": True,
"notional": 123,
"payment_lag": 123,
"period_str": "<string>",
"rate_asset_name": "<string>",
"roll_date": "2023-11-07T05:31:56Z",
"start_date": "2023-11-07T05:31:56Z",
"initial_fx_rate": 123
}
],
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"mkt_data_date": "2023-11-07T05:31:56Z",
"pricing_date": "2023-11-07T05:31:56Z",
"include_projected": True
}
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.Tradables.ApiGetCashFlowsRequest, Derivitec.Web.Core',
market_data_environment_name: 'Example market data',
provider_id: '<string>',
contracts: [
{
$type: 'Derivitec.Web.Core.Tradables.Ascot, Derivitec.Web.Core',
identifier: '<string>',
currency: '<string>',
expiration_date: '2023-11-07T05:31:56Z',
asset_swap_spread: 123,
bond_identifier: {
$type: 'Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core',
code: '<string>',
market_identification_code: '<string>'
},
calendar_name: '<string>',
coupon_rate: 123,
end_to_end: true,
notional: 123,
payment_lag: 123,
period_str: '<string>',
rate_asset_name: '<string>',
roll_date: '2023-11-07T05:31:56Z',
start_date: '2023-11-07T05:31:56Z',
initial_fx_rate: 123
}
],
start_date: '2023-11-07T05:31:56Z',
end_date: '2023-11-07T05:31:56Z',
mkt_data_date: '2023-11-07T05:31:56Z',
pricing_date: '2023-11-07T05:31:56Z',
include_projected: true
})
};
fetch('https://api.riskportal.activeviam.com/api/Tradable/GetCashFlows', 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/Tradable/GetCashFlows",
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.Tradables.ApiGetCashFlowsRequest, Derivitec.Web.Core',
'market_data_environment_name' => 'Example market data',
'provider_id' => '<string>',
'contracts' => [
[
'$type' => 'Derivitec.Web.Core.Tradables.Ascot, Derivitec.Web.Core',
'identifier' => '<string>',
'currency' => '<string>',
'expiration_date' => '2023-11-07T05:31:56Z',
'asset_swap_spread' => 123,
'bond_identifier' => [
'$type' => 'Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core',
'code' => '<string>',
'market_identification_code' => '<string>'
],
'calendar_name' => '<string>',
'coupon_rate' => 123,
'end_to_end' => true,
'notional' => 123,
'payment_lag' => 123,
'period_str' => '<string>',
'rate_asset_name' => '<string>',
'roll_date' => '2023-11-07T05:31:56Z',
'start_date' => '2023-11-07T05:31:56Z',
'initial_fx_rate' => 123
]
],
'start_date' => '2023-11-07T05:31:56Z',
'end_date' => '2023-11-07T05:31:56Z',
'mkt_data_date' => '2023-11-07T05:31:56Z',
'pricing_date' => '2023-11-07T05:31:56Z',
'include_projected' => true
]),
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/Tradable/GetCashFlows"
payload := strings.NewReader("{\n \"$type\": \"Derivitec.Web.Core.Tradables.ApiGetCashFlowsRequest, Derivitec.Web.Core\",\n \"market_data_environment_name\": \"Example market data\",\n \"provider_id\": \"<string>\",\n \"contracts\": [\n {\n \"$type\": \"Derivitec.Web.Core.Tradables.Ascot, Derivitec.Web.Core\",\n \"identifier\": \"<string>\",\n \"currency\": \"<string>\",\n \"expiration_date\": \"2023-11-07T05:31:56Z\",\n \"asset_swap_spread\": 123,\n \"bond_identifier\": {\n \"$type\": \"Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core\",\n \"code\": \"<string>\",\n \"market_identification_code\": \"<string>\"\n },\n \"calendar_name\": \"<string>\",\n \"coupon_rate\": 123,\n \"end_to_end\": true,\n \"notional\": 123,\n \"payment_lag\": 123,\n \"period_str\": \"<string>\",\n \"rate_asset_name\": \"<string>\",\n \"roll_date\": \"2023-11-07T05:31:56Z\",\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"initial_fx_rate\": 123\n }\n ],\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"mkt_data_date\": \"2023-11-07T05:31:56Z\",\n \"pricing_date\": \"2023-11-07T05:31:56Z\",\n \"include_projected\": true\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/Tradable/GetCashFlows")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"$type\": \"Derivitec.Web.Core.Tradables.ApiGetCashFlowsRequest, Derivitec.Web.Core\",\n \"market_data_environment_name\": \"Example market data\",\n \"provider_id\": \"<string>\",\n \"contracts\": [\n {\n \"$type\": \"Derivitec.Web.Core.Tradables.Ascot, Derivitec.Web.Core\",\n \"identifier\": \"<string>\",\n \"currency\": \"<string>\",\n \"expiration_date\": \"2023-11-07T05:31:56Z\",\n \"asset_swap_spread\": 123,\n \"bond_identifier\": {\n \"$type\": \"Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core\",\n \"code\": \"<string>\",\n \"market_identification_code\": \"<string>\"\n },\n \"calendar_name\": \"<string>\",\n \"coupon_rate\": 123,\n \"end_to_end\": true,\n \"notional\": 123,\n \"payment_lag\": 123,\n \"period_str\": \"<string>\",\n \"rate_asset_name\": \"<string>\",\n \"roll_date\": \"2023-11-07T05:31:56Z\",\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"initial_fx_rate\": 123\n }\n ],\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"mkt_data_date\": \"2023-11-07T05:31:56Z\",\n \"pricing_date\": \"2023-11-07T05:31:56Z\",\n \"include_projected\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.riskportal.activeviam.com/api/Tradable/GetCashFlows")
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.Tradables.ApiGetCashFlowsRequest, Derivitec.Web.Core\",\n \"market_data_environment_name\": \"Example market data\",\n \"provider_id\": \"<string>\",\n \"contracts\": [\n {\n \"$type\": \"Derivitec.Web.Core.Tradables.Ascot, Derivitec.Web.Core\",\n \"identifier\": \"<string>\",\n \"currency\": \"<string>\",\n \"expiration_date\": \"2023-11-07T05:31:56Z\",\n \"asset_swap_spread\": 123,\n \"bond_identifier\": {\n \"$type\": \"Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core\",\n \"code\": \"<string>\",\n \"market_identification_code\": \"<string>\"\n },\n \"calendar_name\": \"<string>\",\n \"coupon_rate\": 123,\n \"end_to_end\": true,\n \"notional\": 123,\n \"payment_lag\": 123,\n \"period_str\": \"<string>\",\n \"rate_asset_name\": \"<string>\",\n \"roll_date\": \"2023-11-07T05:31:56Z\",\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"initial_fx_rate\": 123\n }\n ],\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"mkt_data_date\": \"2023-11-07T05:31:56Z\",\n \"pricing_date\": \"2023-11-07T05:31:56Z\",\n \"include_projected\": true\n}"
response = http.request(request)
puts response.read_body{
"$type": "Derivitec.Web.Core.Tradables.ApiGetCashFlowsResponse, Derivitec.Web.Core",
"is_success": true,
"error_messages": [
"<string>"
],
"cash_flows": [
{
"$type": "Derivitec.Web.Core.CashFlows.CashFlowData, Derivitec.Web.Core",
"contract": {
"$type": "Derivitec.Web.Core.Tradables.Ascot, Derivitec.Web.Core",
"identifier": "<string>",
"currency": "<string>",
"expiration_date": "2023-11-07T05:31:56Z",
"asset_swap_spread": 123,
"bond_identifier": {
"$type": "Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core",
"code": "<string>",
"identifier_type": "Derivitec",
"market_identification_code": "<string>"
},
"business_day_convention": "actual",
"calendar_name": "<string>",
"coupon_rate": 123,
"day_count_convention": "actual_actual_icma",
"end_stub": "none",
"end_to_end": true,
"notional": 123,
"payment_lag": 123,
"period_str": "<string>",
"rate_asset_name": "<string>",
"roll_date": "2023-11-07T05:31:56Z",
"start_date": "2023-11-07T05:31:56Z",
"start_stub": "none",
"initial_fx_rate": 123
},
"cash_flows": [
{
"$type": "Derivitec.Web.Core.CashFlows.CashFlow, Derivitec.Web.Core",
"amount": 123,
"currency": "<string>",
"description": "<string>",
"observation_date": "2023-11-07T05:31:56Z",
"payment_date": "2023-11-07T05:31:56Z"
}
]
}
]
}Retrieve cash flows for contracts.
Returns cash flows for cash-flow-capable contracts over the requested start and end window using supplied pricing and market-data dates. IncludeProjected defaults to true; set it to false to exclude projected flows. This is synchronous and read-only.
curl --request POST \
--url https://api.riskportal.activeviam.com/api/Tradable/GetCashFlows \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"$type": "Derivitec.Web.Core.Tradables.ApiGetCashFlowsRequest, Derivitec.Web.Core",
"market_data_environment_name": "Example market data",
"provider_id": "<string>",
"contracts": [
{
"$type": "Derivitec.Web.Core.Tradables.Ascot, Derivitec.Web.Core",
"identifier": "<string>",
"currency": "<string>",
"expiration_date": "2023-11-07T05:31:56Z",
"asset_swap_spread": 123,
"bond_identifier": {
"$type": "Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core",
"code": "<string>",
"market_identification_code": "<string>"
},
"calendar_name": "<string>",
"coupon_rate": 123,
"end_to_end": true,
"notional": 123,
"payment_lag": 123,
"period_str": "<string>",
"rate_asset_name": "<string>",
"roll_date": "2023-11-07T05:31:56Z",
"start_date": "2023-11-07T05:31:56Z",
"initial_fx_rate": 123
}
],
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"mkt_data_date": "2023-11-07T05:31:56Z",
"pricing_date": "2023-11-07T05:31:56Z",
"include_projected": true
}
'import requests
url = "https://api.riskportal.activeviam.com/api/Tradable/GetCashFlows"
payload = {
"$type": "Derivitec.Web.Core.Tradables.ApiGetCashFlowsRequest, Derivitec.Web.Core",
"market_data_environment_name": "Example market data",
"provider_id": "<string>",
"contracts": [
{
"$type": "Derivitec.Web.Core.Tradables.Ascot, Derivitec.Web.Core",
"identifier": "<string>",
"currency": "<string>",
"expiration_date": "2023-11-07T05:31:56Z",
"asset_swap_spread": 123,
"bond_identifier": {
"$type": "Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core",
"code": "<string>",
"market_identification_code": "<string>"
},
"calendar_name": "<string>",
"coupon_rate": 123,
"end_to_end": True,
"notional": 123,
"payment_lag": 123,
"period_str": "<string>",
"rate_asset_name": "<string>",
"roll_date": "2023-11-07T05:31:56Z",
"start_date": "2023-11-07T05:31:56Z",
"initial_fx_rate": 123
}
],
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"mkt_data_date": "2023-11-07T05:31:56Z",
"pricing_date": "2023-11-07T05:31:56Z",
"include_projected": True
}
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.Tradables.ApiGetCashFlowsRequest, Derivitec.Web.Core',
market_data_environment_name: 'Example market data',
provider_id: '<string>',
contracts: [
{
$type: 'Derivitec.Web.Core.Tradables.Ascot, Derivitec.Web.Core',
identifier: '<string>',
currency: '<string>',
expiration_date: '2023-11-07T05:31:56Z',
asset_swap_spread: 123,
bond_identifier: {
$type: 'Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core',
code: '<string>',
market_identification_code: '<string>'
},
calendar_name: '<string>',
coupon_rate: 123,
end_to_end: true,
notional: 123,
payment_lag: 123,
period_str: '<string>',
rate_asset_name: '<string>',
roll_date: '2023-11-07T05:31:56Z',
start_date: '2023-11-07T05:31:56Z',
initial_fx_rate: 123
}
],
start_date: '2023-11-07T05:31:56Z',
end_date: '2023-11-07T05:31:56Z',
mkt_data_date: '2023-11-07T05:31:56Z',
pricing_date: '2023-11-07T05:31:56Z',
include_projected: true
})
};
fetch('https://api.riskportal.activeviam.com/api/Tradable/GetCashFlows', 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/Tradable/GetCashFlows",
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.Tradables.ApiGetCashFlowsRequest, Derivitec.Web.Core',
'market_data_environment_name' => 'Example market data',
'provider_id' => '<string>',
'contracts' => [
[
'$type' => 'Derivitec.Web.Core.Tradables.Ascot, Derivitec.Web.Core',
'identifier' => '<string>',
'currency' => '<string>',
'expiration_date' => '2023-11-07T05:31:56Z',
'asset_swap_spread' => 123,
'bond_identifier' => [
'$type' => 'Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core',
'code' => '<string>',
'market_identification_code' => '<string>'
],
'calendar_name' => '<string>',
'coupon_rate' => 123,
'end_to_end' => true,
'notional' => 123,
'payment_lag' => 123,
'period_str' => '<string>',
'rate_asset_name' => '<string>',
'roll_date' => '2023-11-07T05:31:56Z',
'start_date' => '2023-11-07T05:31:56Z',
'initial_fx_rate' => 123
]
],
'start_date' => '2023-11-07T05:31:56Z',
'end_date' => '2023-11-07T05:31:56Z',
'mkt_data_date' => '2023-11-07T05:31:56Z',
'pricing_date' => '2023-11-07T05:31:56Z',
'include_projected' => true
]),
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/Tradable/GetCashFlows"
payload := strings.NewReader("{\n \"$type\": \"Derivitec.Web.Core.Tradables.ApiGetCashFlowsRequest, Derivitec.Web.Core\",\n \"market_data_environment_name\": \"Example market data\",\n \"provider_id\": \"<string>\",\n \"contracts\": [\n {\n \"$type\": \"Derivitec.Web.Core.Tradables.Ascot, Derivitec.Web.Core\",\n \"identifier\": \"<string>\",\n \"currency\": \"<string>\",\n \"expiration_date\": \"2023-11-07T05:31:56Z\",\n \"asset_swap_spread\": 123,\n \"bond_identifier\": {\n \"$type\": \"Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core\",\n \"code\": \"<string>\",\n \"market_identification_code\": \"<string>\"\n },\n \"calendar_name\": \"<string>\",\n \"coupon_rate\": 123,\n \"end_to_end\": true,\n \"notional\": 123,\n \"payment_lag\": 123,\n \"period_str\": \"<string>\",\n \"rate_asset_name\": \"<string>\",\n \"roll_date\": \"2023-11-07T05:31:56Z\",\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"initial_fx_rate\": 123\n }\n ],\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"mkt_data_date\": \"2023-11-07T05:31:56Z\",\n \"pricing_date\": \"2023-11-07T05:31:56Z\",\n \"include_projected\": true\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/Tradable/GetCashFlows")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"$type\": \"Derivitec.Web.Core.Tradables.ApiGetCashFlowsRequest, Derivitec.Web.Core\",\n \"market_data_environment_name\": \"Example market data\",\n \"provider_id\": \"<string>\",\n \"contracts\": [\n {\n \"$type\": \"Derivitec.Web.Core.Tradables.Ascot, Derivitec.Web.Core\",\n \"identifier\": \"<string>\",\n \"currency\": \"<string>\",\n \"expiration_date\": \"2023-11-07T05:31:56Z\",\n \"asset_swap_spread\": 123,\n \"bond_identifier\": {\n \"$type\": \"Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core\",\n \"code\": \"<string>\",\n \"market_identification_code\": \"<string>\"\n },\n \"calendar_name\": \"<string>\",\n \"coupon_rate\": 123,\n \"end_to_end\": true,\n \"notional\": 123,\n \"payment_lag\": 123,\n \"period_str\": \"<string>\",\n \"rate_asset_name\": \"<string>\",\n \"roll_date\": \"2023-11-07T05:31:56Z\",\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"initial_fx_rate\": 123\n }\n ],\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"mkt_data_date\": \"2023-11-07T05:31:56Z\",\n \"pricing_date\": \"2023-11-07T05:31:56Z\",\n \"include_projected\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.riskportal.activeviam.com/api/Tradable/GetCashFlows")
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.Tradables.ApiGetCashFlowsRequest, Derivitec.Web.Core\",\n \"market_data_environment_name\": \"Example market data\",\n \"provider_id\": \"<string>\",\n \"contracts\": [\n {\n \"$type\": \"Derivitec.Web.Core.Tradables.Ascot, Derivitec.Web.Core\",\n \"identifier\": \"<string>\",\n \"currency\": \"<string>\",\n \"expiration_date\": \"2023-11-07T05:31:56Z\",\n \"asset_swap_spread\": 123,\n \"bond_identifier\": {\n \"$type\": \"Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core\",\n \"code\": \"<string>\",\n \"market_identification_code\": \"<string>\"\n },\n \"calendar_name\": \"<string>\",\n \"coupon_rate\": 123,\n \"end_to_end\": true,\n \"notional\": 123,\n \"payment_lag\": 123,\n \"period_str\": \"<string>\",\n \"rate_asset_name\": \"<string>\",\n \"roll_date\": \"2023-11-07T05:31:56Z\",\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"initial_fx_rate\": 123\n }\n ],\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"mkt_data_date\": \"2023-11-07T05:31:56Z\",\n \"pricing_date\": \"2023-11-07T05:31:56Z\",\n \"include_projected\": true\n}"
response = http.request(request)
puts response.read_body{
"$type": "Derivitec.Web.Core.Tradables.ApiGetCashFlowsResponse, Derivitec.Web.Core",
"is_success": true,
"error_messages": [
"<string>"
],
"cash_flows": [
{
"$type": "Derivitec.Web.Core.CashFlows.CashFlowData, Derivitec.Web.Core",
"contract": {
"$type": "Derivitec.Web.Core.Tradables.Ascot, Derivitec.Web.Core",
"identifier": "<string>",
"currency": "<string>",
"expiration_date": "2023-11-07T05:31:56Z",
"asset_swap_spread": 123,
"bond_identifier": {
"$type": "Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core",
"code": "<string>",
"identifier_type": "Derivitec",
"market_identification_code": "<string>"
},
"business_day_convention": "actual",
"calendar_name": "<string>",
"coupon_rate": 123,
"day_count_convention": "actual_actual_icma",
"end_stub": "none",
"end_to_end": true,
"notional": 123,
"payment_lag": 123,
"period_str": "<string>",
"rate_asset_name": "<string>",
"roll_date": "2023-11-07T05:31:56Z",
"start_date": "2023-11-07T05:31:56Z",
"start_stub": "none",
"initial_fx_rate": 123
},
"cash_flows": [
{
"$type": "Derivitec.Web.Core.CashFlows.CashFlow, Derivitec.Web.Core",
"amount": 123,
"currency": "<string>",
"description": "<string>",
"observation_date": "2023-11-07T05:31:56Z",
"payment_date": "2023-11-07T05:31:56Z"
}
]
}
]
}Authorizations
OAuth2 access-token requested from AWS Cognito and provided as a Auth Bearer header
Body
JSON request with non-empty Contracts, StartDate, EndDate, PricingDate, MktDataDate, optional IncludeProjected, and at most one accessible market-data environment. Date ordering is not explicitly constrained.
Contracts, valuation dates, and date interval used to retrieve contract cash flows.
Derivitec.Web.Core.Tradables.ApiGetCashFlowsRequest, Derivitec.Web.Core Name of the market-data environment to use. Supply either this name or provider_id, not both.
"Example market data"
Opaque identifier of the market-data provider to use. Supply either this identifier or market_data_environment_name, not both.
Cash-flow-capable contracts whose cash flows are requested.
Polymorphic contract role for instruments capable of producing cash flows.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
- Option 10
- Option 11
- Option 12
- Option 13
- Option 14
- Option 15
- Option 16
- Option 17
- Option 18
- Option 19
- Option 20
- Option 21
- Option 22
- Option 23
- Option 24
- Option 25
- Option 26
- Option 27
- Option 28
- Option 29
- Option 30
- Option 31
- Option 32
- Option 33
- Option 34
- Option 35
- Option 36
- Option 37
Show child attributes
Show child attributes
Lower date bound of the requested cash-flow interval; inclusivity is not defined here.
Upper date bound of the requested cash-flow interval; inclusivity is not defined here.
Date of market data used to derive the cash flows.
Date on which the contracts are evaluated for cash-flow generation.
Whether projected cash flows are included; defaults to true.
Response
Returns contract cash flows and errors.
Cash-flow collections returned for the requested contracts.
Derivitec.Web.Core.Tradables.ApiGetCashFlowsResponse, Derivitec.Web.Core Whether the operation completed successfully. The default is true; error outcomes set it to false.
true
Messages explaining operation-level failures. The collection is empty by default.
Requested contracts paired with their returned cash-flow collections.
Show child attributes
Show child attributes
Was this page helpful?