curl --request POST \
--url https://api.riskportal.activeviam.com/api/MarketData/UploadBorrowCurves \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"$type": "Derivitec.Web.Core.MarketData.ApiUploadBorrowCurvesRequest, Derivitec.Web.Core",
"market_data_environment_name": "Example market data",
"provider_id": "<string>",
"borrow_curves": [
{
"$type": "Derivitec.Web.Core.MarketData.BorrowCurveData, Derivitec.Web.Core",
"provider_id": "<string>",
"derivitec_created": "<string>",
"derivitec_modified": "<string>",
"uploaded_date_time": "<string>",
"derivitec_modified_by": "<string>",
"uploaded_by": "<string>",
"rolled": false,
"identifier": {
"$type": "Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core",
"code": "<string>",
"market_identification_code": "<string>"
},
"maturities": [
123
],
"tenors": [
"<string>"
],
"discount_factors": [
123
],
"rates": [
123
],
"use_zero_rates": true,
"value_date": "2023-11-07T05:31:56Z"
}
],
"borrow_rates_by_identifiers": [
{
"key": {
"$type": "Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core",
"code": "<string>",
"market_identification_code": "<string>"
},
"value": [
{
"key": "<string>",
"value": 123
}
]
}
],
"market_date": "2023-11-07T05:31:56Z",
"upload_zero_rates": true
}
'import requests
url = "https://api.riskportal.activeviam.com/api/MarketData/UploadBorrowCurves"
payload = {
"$type": "Derivitec.Web.Core.MarketData.ApiUploadBorrowCurvesRequest, Derivitec.Web.Core",
"market_data_environment_name": "Example market data",
"provider_id": "<string>",
"borrow_curves": [
{
"$type": "Derivitec.Web.Core.MarketData.BorrowCurveData, Derivitec.Web.Core",
"provider_id": "<string>",
"derivitec_created": "<string>",
"derivitec_modified": "<string>",
"uploaded_date_time": "<string>",
"derivitec_modified_by": "<string>",
"uploaded_by": "<string>",
"rolled": False,
"identifier": {
"$type": "Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core",
"code": "<string>",
"market_identification_code": "<string>"
},
"maturities": [123],
"tenors": ["<string>"],
"discount_factors": [123],
"rates": [123],
"use_zero_rates": True,
"value_date": "2023-11-07T05:31:56Z"
}
],
"borrow_rates_by_identifiers": [
{
"key": {
"$type": "Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core",
"code": "<string>",
"market_identification_code": "<string>"
},
"value": [
{
"key": "<string>",
"value": 123
}
]
}
],
"market_date": "2023-11-07T05:31:56Z",
"upload_zero_rates": 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.MarketData.ApiUploadBorrowCurvesRequest, Derivitec.Web.Core',
market_data_environment_name: 'Example market data',
provider_id: '<string>',
borrow_curves: [
{
$type: 'Derivitec.Web.Core.MarketData.BorrowCurveData, Derivitec.Web.Core',
provider_id: '<string>',
derivitec_created: '<string>',
derivitec_modified: '<string>',
uploaded_date_time: '<string>',
derivitec_modified_by: '<string>',
uploaded_by: '<string>',
rolled: false,
identifier: {
$type: 'Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core',
code: '<string>',
market_identification_code: '<string>'
},
maturities: [123],
tenors: ['<string>'],
discount_factors: [123],
rates: [123],
use_zero_rates: true,
value_date: '2023-11-07T05:31:56Z'
}
],
borrow_rates_by_identifiers: [
{
key: {
$type: 'Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core',
code: '<string>',
market_identification_code: '<string>'
},
value: [{key: '<string>', value: 123}]
}
],
market_date: '2023-11-07T05:31:56Z',
upload_zero_rates: true
})
};
fetch('https://api.riskportal.activeviam.com/api/MarketData/UploadBorrowCurves', 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/UploadBorrowCurves",
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.ApiUploadBorrowCurvesRequest, Derivitec.Web.Core',
'market_data_environment_name' => 'Example market data',
'provider_id' => '<string>',
'borrow_curves' => [
[
'$type' => 'Derivitec.Web.Core.MarketData.BorrowCurveData, Derivitec.Web.Core',
'provider_id' => '<string>',
'derivitec_created' => '<string>',
'derivitec_modified' => '<string>',
'uploaded_date_time' => '<string>',
'derivitec_modified_by' => '<string>',
'uploaded_by' => '<string>',
'rolled' => false,
'identifier' => [
'$type' => 'Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core',
'code' => '<string>',
'market_identification_code' => '<string>'
],
'maturities' => [
123
],
'tenors' => [
'<string>'
],
'discount_factors' => [
123
],
'rates' => [
123
],
'use_zero_rates' => true,
'value_date' => '2023-11-07T05:31:56Z'
]
],
'borrow_rates_by_identifiers' => [
[
'key' => [
'$type' => 'Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core',
'code' => '<string>',
'market_identification_code' => '<string>'
],
'value' => [
[
'key' => '<string>',
'value' => 123
]
]
]
],
'market_date' => '2023-11-07T05:31:56Z',
'upload_zero_rates' => 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/MarketData/UploadBorrowCurves"
payload := strings.NewReader("{\n \"$type\": \"Derivitec.Web.Core.MarketData.ApiUploadBorrowCurvesRequest, Derivitec.Web.Core\",\n \"market_data_environment_name\": \"Example market data\",\n \"provider_id\": \"<string>\",\n \"borrow_curves\": [\n {\n \"$type\": \"Derivitec.Web.Core.MarketData.BorrowCurveData, Derivitec.Web.Core\",\n \"provider_id\": \"<string>\",\n \"derivitec_created\": \"<string>\",\n \"derivitec_modified\": \"<string>\",\n \"uploaded_date_time\": \"<string>\",\n \"derivitec_modified_by\": \"<string>\",\n \"uploaded_by\": \"<string>\",\n \"rolled\": false,\n \"identifier\": {\n \"$type\": \"Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core\",\n \"code\": \"<string>\",\n \"market_identification_code\": \"<string>\"\n },\n \"maturities\": [\n 123\n ],\n \"tenors\": [\n \"<string>\"\n ],\n \"discount_factors\": [\n 123\n ],\n \"rates\": [\n 123\n ],\n \"use_zero_rates\": true,\n \"value_date\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"borrow_rates_by_identifiers\": [\n {\n \"key\": {\n \"$type\": \"Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core\",\n \"code\": \"<string>\",\n \"market_identification_code\": \"<string>\"\n },\n \"value\": [\n {\n \"key\": \"<string>\",\n \"value\": 123\n }\n ]\n }\n ],\n \"market_date\": \"2023-11-07T05:31:56Z\",\n \"upload_zero_rates\": 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/MarketData/UploadBorrowCurves")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"$type\": \"Derivitec.Web.Core.MarketData.ApiUploadBorrowCurvesRequest, Derivitec.Web.Core\",\n \"market_data_environment_name\": \"Example market data\",\n \"provider_id\": \"<string>\",\n \"borrow_curves\": [\n {\n \"$type\": \"Derivitec.Web.Core.MarketData.BorrowCurveData, Derivitec.Web.Core\",\n \"provider_id\": \"<string>\",\n \"derivitec_created\": \"<string>\",\n \"derivitec_modified\": \"<string>\",\n \"uploaded_date_time\": \"<string>\",\n \"derivitec_modified_by\": \"<string>\",\n \"uploaded_by\": \"<string>\",\n \"rolled\": false,\n \"identifier\": {\n \"$type\": \"Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core\",\n \"code\": \"<string>\",\n \"market_identification_code\": \"<string>\"\n },\n \"maturities\": [\n 123\n ],\n \"tenors\": [\n \"<string>\"\n ],\n \"discount_factors\": [\n 123\n ],\n \"rates\": [\n 123\n ],\n \"use_zero_rates\": true,\n \"value_date\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"borrow_rates_by_identifiers\": [\n {\n \"key\": {\n \"$type\": \"Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core\",\n \"code\": \"<string>\",\n \"market_identification_code\": \"<string>\"\n },\n \"value\": [\n {\n \"key\": \"<string>\",\n \"value\": 123\n }\n ]\n }\n ],\n \"market_date\": \"2023-11-07T05:31:56Z\",\n \"upload_zero_rates\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.riskportal.activeviam.com/api/MarketData/UploadBorrowCurves")
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.ApiUploadBorrowCurvesRequest, Derivitec.Web.Core\",\n \"market_data_environment_name\": \"Example market data\",\n \"provider_id\": \"<string>\",\n \"borrow_curves\": [\n {\n \"$type\": \"Derivitec.Web.Core.MarketData.BorrowCurveData, Derivitec.Web.Core\",\n \"provider_id\": \"<string>\",\n \"derivitec_created\": \"<string>\",\n \"derivitec_modified\": \"<string>\",\n \"uploaded_date_time\": \"<string>\",\n \"derivitec_modified_by\": \"<string>\",\n \"uploaded_by\": \"<string>\",\n \"rolled\": false,\n \"identifier\": {\n \"$type\": \"Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core\",\n \"code\": \"<string>\",\n \"market_identification_code\": \"<string>\"\n },\n \"maturities\": [\n 123\n ],\n \"tenors\": [\n \"<string>\"\n ],\n \"discount_factors\": [\n 123\n ],\n \"rates\": [\n 123\n ],\n \"use_zero_rates\": true,\n \"value_date\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"borrow_rates_by_identifiers\": [\n {\n \"key\": {\n \"$type\": \"Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core\",\n \"code\": \"<string>\",\n \"market_identification_code\": \"<string>\"\n },\n \"value\": [\n {\n \"key\": \"<string>\",\n \"value\": 123\n }\n ]\n }\n ],\n \"market_date\": \"2023-11-07T05:31:56Z\",\n \"upload_zero_rates\": true\n}"
response = http.request(request)
puts response.read_body{
"$type": "Derivitec.Web.Core.MarketData.ApiUploadBorrowCurvesResponse, Derivitec.Web.Core",
"is_success": true,
"error_messages": [
"<string>"
]
}Store borrow curves for equities.
Use this operation to publish borrow curves to a non-default provider that the caller may edit. Each curve
identifies an equity and value date and supplies positive day maturities or valid tenor strings, together
with either positive discount factors or annualised decimal rates. UseZeroRates selects zero rates;
otherwise rates are forward rates. Invalid curves are reported while other valid curves can be stored, and
an accepted curve replaces the contribution for the same provider, equity, and value date before the response returns.
curl --request POST \
--url https://api.riskportal.activeviam.com/api/MarketData/UploadBorrowCurves \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"$type": "Derivitec.Web.Core.MarketData.ApiUploadBorrowCurvesRequest, Derivitec.Web.Core",
"market_data_environment_name": "Example market data",
"provider_id": "<string>",
"borrow_curves": [
{
"$type": "Derivitec.Web.Core.MarketData.BorrowCurveData, Derivitec.Web.Core",
"provider_id": "<string>",
"derivitec_created": "<string>",
"derivitec_modified": "<string>",
"uploaded_date_time": "<string>",
"derivitec_modified_by": "<string>",
"uploaded_by": "<string>",
"rolled": false,
"identifier": {
"$type": "Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core",
"code": "<string>",
"market_identification_code": "<string>"
},
"maturities": [
123
],
"tenors": [
"<string>"
],
"discount_factors": [
123
],
"rates": [
123
],
"use_zero_rates": true,
"value_date": "2023-11-07T05:31:56Z"
}
],
"borrow_rates_by_identifiers": [
{
"key": {
"$type": "Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core",
"code": "<string>",
"market_identification_code": "<string>"
},
"value": [
{
"key": "<string>",
"value": 123
}
]
}
],
"market_date": "2023-11-07T05:31:56Z",
"upload_zero_rates": true
}
'import requests
url = "https://api.riskportal.activeviam.com/api/MarketData/UploadBorrowCurves"
payload = {
"$type": "Derivitec.Web.Core.MarketData.ApiUploadBorrowCurvesRequest, Derivitec.Web.Core",
"market_data_environment_name": "Example market data",
"provider_id": "<string>",
"borrow_curves": [
{
"$type": "Derivitec.Web.Core.MarketData.BorrowCurveData, Derivitec.Web.Core",
"provider_id": "<string>",
"derivitec_created": "<string>",
"derivitec_modified": "<string>",
"uploaded_date_time": "<string>",
"derivitec_modified_by": "<string>",
"uploaded_by": "<string>",
"rolled": False,
"identifier": {
"$type": "Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core",
"code": "<string>",
"market_identification_code": "<string>"
},
"maturities": [123],
"tenors": ["<string>"],
"discount_factors": [123],
"rates": [123],
"use_zero_rates": True,
"value_date": "2023-11-07T05:31:56Z"
}
],
"borrow_rates_by_identifiers": [
{
"key": {
"$type": "Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core",
"code": "<string>",
"market_identification_code": "<string>"
},
"value": [
{
"key": "<string>",
"value": 123
}
]
}
],
"market_date": "2023-11-07T05:31:56Z",
"upload_zero_rates": 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.MarketData.ApiUploadBorrowCurvesRequest, Derivitec.Web.Core',
market_data_environment_name: 'Example market data',
provider_id: '<string>',
borrow_curves: [
{
$type: 'Derivitec.Web.Core.MarketData.BorrowCurveData, Derivitec.Web.Core',
provider_id: '<string>',
derivitec_created: '<string>',
derivitec_modified: '<string>',
uploaded_date_time: '<string>',
derivitec_modified_by: '<string>',
uploaded_by: '<string>',
rolled: false,
identifier: {
$type: 'Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core',
code: '<string>',
market_identification_code: '<string>'
},
maturities: [123],
tenors: ['<string>'],
discount_factors: [123],
rates: [123],
use_zero_rates: true,
value_date: '2023-11-07T05:31:56Z'
}
],
borrow_rates_by_identifiers: [
{
key: {
$type: 'Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core',
code: '<string>',
market_identification_code: '<string>'
},
value: [{key: '<string>', value: 123}]
}
],
market_date: '2023-11-07T05:31:56Z',
upload_zero_rates: true
})
};
fetch('https://api.riskportal.activeviam.com/api/MarketData/UploadBorrowCurves', 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/UploadBorrowCurves",
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.ApiUploadBorrowCurvesRequest, Derivitec.Web.Core',
'market_data_environment_name' => 'Example market data',
'provider_id' => '<string>',
'borrow_curves' => [
[
'$type' => 'Derivitec.Web.Core.MarketData.BorrowCurveData, Derivitec.Web.Core',
'provider_id' => '<string>',
'derivitec_created' => '<string>',
'derivitec_modified' => '<string>',
'uploaded_date_time' => '<string>',
'derivitec_modified_by' => '<string>',
'uploaded_by' => '<string>',
'rolled' => false,
'identifier' => [
'$type' => 'Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core',
'code' => '<string>',
'market_identification_code' => '<string>'
],
'maturities' => [
123
],
'tenors' => [
'<string>'
],
'discount_factors' => [
123
],
'rates' => [
123
],
'use_zero_rates' => true,
'value_date' => '2023-11-07T05:31:56Z'
]
],
'borrow_rates_by_identifiers' => [
[
'key' => [
'$type' => 'Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core',
'code' => '<string>',
'market_identification_code' => '<string>'
],
'value' => [
[
'key' => '<string>',
'value' => 123
]
]
]
],
'market_date' => '2023-11-07T05:31:56Z',
'upload_zero_rates' => 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/MarketData/UploadBorrowCurves"
payload := strings.NewReader("{\n \"$type\": \"Derivitec.Web.Core.MarketData.ApiUploadBorrowCurvesRequest, Derivitec.Web.Core\",\n \"market_data_environment_name\": \"Example market data\",\n \"provider_id\": \"<string>\",\n \"borrow_curves\": [\n {\n \"$type\": \"Derivitec.Web.Core.MarketData.BorrowCurveData, Derivitec.Web.Core\",\n \"provider_id\": \"<string>\",\n \"derivitec_created\": \"<string>\",\n \"derivitec_modified\": \"<string>\",\n \"uploaded_date_time\": \"<string>\",\n \"derivitec_modified_by\": \"<string>\",\n \"uploaded_by\": \"<string>\",\n \"rolled\": false,\n \"identifier\": {\n \"$type\": \"Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core\",\n \"code\": \"<string>\",\n \"market_identification_code\": \"<string>\"\n },\n \"maturities\": [\n 123\n ],\n \"tenors\": [\n \"<string>\"\n ],\n \"discount_factors\": [\n 123\n ],\n \"rates\": [\n 123\n ],\n \"use_zero_rates\": true,\n \"value_date\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"borrow_rates_by_identifiers\": [\n {\n \"key\": {\n \"$type\": \"Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core\",\n \"code\": \"<string>\",\n \"market_identification_code\": \"<string>\"\n },\n \"value\": [\n {\n \"key\": \"<string>\",\n \"value\": 123\n }\n ]\n }\n ],\n \"market_date\": \"2023-11-07T05:31:56Z\",\n \"upload_zero_rates\": 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/MarketData/UploadBorrowCurves")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"$type\": \"Derivitec.Web.Core.MarketData.ApiUploadBorrowCurvesRequest, Derivitec.Web.Core\",\n \"market_data_environment_name\": \"Example market data\",\n \"provider_id\": \"<string>\",\n \"borrow_curves\": [\n {\n \"$type\": \"Derivitec.Web.Core.MarketData.BorrowCurveData, Derivitec.Web.Core\",\n \"provider_id\": \"<string>\",\n \"derivitec_created\": \"<string>\",\n \"derivitec_modified\": \"<string>\",\n \"uploaded_date_time\": \"<string>\",\n \"derivitec_modified_by\": \"<string>\",\n \"uploaded_by\": \"<string>\",\n \"rolled\": false,\n \"identifier\": {\n \"$type\": \"Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core\",\n \"code\": \"<string>\",\n \"market_identification_code\": \"<string>\"\n },\n \"maturities\": [\n 123\n ],\n \"tenors\": [\n \"<string>\"\n ],\n \"discount_factors\": [\n 123\n ],\n \"rates\": [\n 123\n ],\n \"use_zero_rates\": true,\n \"value_date\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"borrow_rates_by_identifiers\": [\n {\n \"key\": {\n \"$type\": \"Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core\",\n \"code\": \"<string>\",\n \"market_identification_code\": \"<string>\"\n },\n \"value\": [\n {\n \"key\": \"<string>\",\n \"value\": 123\n }\n ]\n }\n ],\n \"market_date\": \"2023-11-07T05:31:56Z\",\n \"upload_zero_rates\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.riskportal.activeviam.com/api/MarketData/UploadBorrowCurves")
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.ApiUploadBorrowCurvesRequest, Derivitec.Web.Core\",\n \"market_data_environment_name\": \"Example market data\",\n \"provider_id\": \"<string>\",\n \"borrow_curves\": [\n {\n \"$type\": \"Derivitec.Web.Core.MarketData.BorrowCurveData, Derivitec.Web.Core\",\n \"provider_id\": \"<string>\",\n \"derivitec_created\": \"<string>\",\n \"derivitec_modified\": \"<string>\",\n \"uploaded_date_time\": \"<string>\",\n \"derivitec_modified_by\": \"<string>\",\n \"uploaded_by\": \"<string>\",\n \"rolled\": false,\n \"identifier\": {\n \"$type\": \"Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core\",\n \"code\": \"<string>\",\n \"market_identification_code\": \"<string>\"\n },\n \"maturities\": [\n 123\n ],\n \"tenors\": [\n \"<string>\"\n ],\n \"discount_factors\": [\n 123\n ],\n \"rates\": [\n 123\n ],\n \"use_zero_rates\": true,\n \"value_date\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"borrow_rates_by_identifiers\": [\n {\n \"key\": {\n \"$type\": \"Derivitec.Web.Core.MarketData.InstrumentIdentifier, Derivitec.Web.Core\",\n \"code\": \"<string>\",\n \"market_identification_code\": \"<string>\"\n },\n \"value\": [\n {\n \"key\": \"<string>\",\n \"value\": 123\n }\n ]\n }\n ],\n \"market_date\": \"2023-11-07T05:31:56Z\",\n \"upload_zero_rates\": true\n}"
response = http.request(request)
puts response.read_body{
"$type": "Derivitec.Web.Core.MarketData.ApiUploadBorrowCurvesResponse, Derivitec.Web.Core",
"is_success": true,
"error_messages": [
"<string>"
]
}Authorizations
OAuth2 access-token requested from AWS Cognito and provided as a Auth Bearer header
Body
The upload payload. Provide either ProviderId or MarketDataEnvironmentName, not both; omitting both selects the caller's organisation scope. BorrowCurves must be non-empty. The legacy BorrowRatesByIdentifiers form is also accepted and treats its rate values as percentages, using MarketDate and UploadZeroRates.
Accepts typed equity borrow curves with per-row value dates, or legacy keyed percentage rates sharing MarketDate.
Derivitec.Web.Core.MarketData.ApiUploadBorrowCurvesRequest, 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.
Preferred typed equity borrow-curve rows; nonempty typed rows take precedence over the legacy map.
Show child attributes
Show child attributes
Legacy map from asset selector to tenor/rate entries expressed as percentages; values are converted to decimals.
Show child attributes
Show child attributes
Date-only value date shared by legacy keyed borrow rates when typed rows are absent or empty.
Whether legacy rate inputs are interpreted as zero rather than forward rates; defaults to false.
Response
Returns whether any borrow curves were stored and errors for invalid providers, identifiers, tenors, maturities, factors, or rate vectors.
Returns the success flag and error messages from a borrow-curve upload.
Derivitec.Web.Core.MarketData.ApiUploadBorrowCurvesResponse, 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.
Was this page helpful?