curl --request POST \
--url https://api.riskportal.activeviam.com/api/TradeBooking/GetContractTemplate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"$type": "Derivitec.Web.Core.TradeBooking.ApiGetTemplateContractRequest, Derivitec.Web.Core"
}
'import requests
url = "https://api.riskportal.activeviam.com/api/TradeBooking/GetContractTemplate"
payload = { "$type": "Derivitec.Web.Core.TradeBooking.ApiGetTemplateContractRequest, Derivitec.Web.Core" }
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.TradeBooking.ApiGetTemplateContractRequest, Derivitec.Web.Core'
})
};
fetch('https://api.riskportal.activeviam.com/api/TradeBooking/GetContractTemplate', 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/TradeBooking/GetContractTemplate",
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.TradeBooking.ApiGetTemplateContractRequest, Derivitec.Web.Core'
]),
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/TradeBooking/GetContractTemplate"
payload := strings.NewReader("{\n \"$type\": \"Derivitec.Web.Core.TradeBooking.ApiGetTemplateContractRequest, Derivitec.Web.Core\"\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/TradeBooking/GetContractTemplate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"$type\": \"Derivitec.Web.Core.TradeBooking.ApiGetTemplateContractRequest, Derivitec.Web.Core\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.riskportal.activeviam.com/api/TradeBooking/GetContractTemplate")
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.TradeBooking.ApiGetTemplateContractRequest, Derivitec.Web.Core\"\n}"
response = http.request(request)
puts response.read_body{
"$type": "Derivitec.Web.Core.TradeBooking.ApiGetTemplateContractResponse, Derivitec.Web.Core",
"is_success": true,
"error_messages": [
"<string>"
],
"contract": {
"$type": "Derivitec.Web.Core.Tradables.TradableViewModel, Derivitec.Web.Core",
"contract_type": "<string>",
"currency": "<string>",
"display_name": "<string>",
"error_message": "<string>",
"id": 123,
"identifier": "",
"market_date": "2023-11-07T05:31:56Z",
"pricing_details_model": {
"$type": "Derivitec.Web.Core.PricingDetailsModel, Derivitec.Web.Core",
"data": [
{
"$type": "Derivitec.Web.Core.KeyValuePairViewModel, Derivitec.Web.Core",
"error_message": "<string>",
"format_string": "<string>",
"key": "<string>",
"scales_by_qty": false,
"value": "<string>",
"currency": "<string>"
}
],
"error_message": "<string>"
},
"quantity": 123,
"quantity_round_to_nearest": 123,
"results": [
{}
],
"tradable_risk_data": {
"$type": "Derivitec.Web.Core.Tradables.TradableRiskDataModel, Derivitec.Web.Core",
"error_message": "<string>",
"unit_risks": [
{
"$type": "Derivitec.Web.Core.KeyValuePairViewModel, Derivitec.Web.Core",
"error_message": "<string>",
"format_string": "<string>",
"key": "<string>",
"scales_by_qty": false,
"value": "<string>",
"currency": "<string>"
}
]
},
"client_security_id": "<string>",
"show_live_data_refresh": true,
"live_data_snapshot_time": "2023-11-07T05:31:56Z"
}
}Retrieve the supplied contract payload.
Returns the submitted TradableViewModel unchanged in a successful response. It does not populate server defaults or produce a new contract. This synchronous operation is read-only.
curl --request POST \
--url https://api.riskportal.activeviam.com/api/TradeBooking/GetContractTemplate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"$type": "Derivitec.Web.Core.TradeBooking.ApiGetTemplateContractRequest, Derivitec.Web.Core"
}
'import requests
url = "https://api.riskportal.activeviam.com/api/TradeBooking/GetContractTemplate"
payload = { "$type": "Derivitec.Web.Core.TradeBooking.ApiGetTemplateContractRequest, Derivitec.Web.Core" }
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.TradeBooking.ApiGetTemplateContractRequest, Derivitec.Web.Core'
})
};
fetch('https://api.riskportal.activeviam.com/api/TradeBooking/GetContractTemplate', 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/TradeBooking/GetContractTemplate",
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.TradeBooking.ApiGetTemplateContractRequest, Derivitec.Web.Core'
]),
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/TradeBooking/GetContractTemplate"
payload := strings.NewReader("{\n \"$type\": \"Derivitec.Web.Core.TradeBooking.ApiGetTemplateContractRequest, Derivitec.Web.Core\"\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/TradeBooking/GetContractTemplate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"$type\": \"Derivitec.Web.Core.TradeBooking.ApiGetTemplateContractRequest, Derivitec.Web.Core\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.riskportal.activeviam.com/api/TradeBooking/GetContractTemplate")
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.TradeBooking.ApiGetTemplateContractRequest, Derivitec.Web.Core\"\n}"
response = http.request(request)
puts response.read_body{
"$type": "Derivitec.Web.Core.TradeBooking.ApiGetTemplateContractResponse, Derivitec.Web.Core",
"is_success": true,
"error_messages": [
"<string>"
],
"contract": {
"$type": "Derivitec.Web.Core.Tradables.TradableViewModel, Derivitec.Web.Core",
"contract_type": "<string>",
"currency": "<string>",
"display_name": "<string>",
"error_message": "<string>",
"id": 123,
"identifier": "",
"market_date": "2023-11-07T05:31:56Z",
"pricing_details_model": {
"$type": "Derivitec.Web.Core.PricingDetailsModel, Derivitec.Web.Core",
"data": [
{
"$type": "Derivitec.Web.Core.KeyValuePairViewModel, Derivitec.Web.Core",
"error_message": "<string>",
"format_string": "<string>",
"key": "<string>",
"scales_by_qty": false,
"value": "<string>",
"currency": "<string>"
}
],
"error_message": "<string>"
},
"quantity": 123,
"quantity_round_to_nearest": 123,
"results": [
{}
],
"tradable_risk_data": {
"$type": "Derivitec.Web.Core.Tradables.TradableRiskDataModel, Derivitec.Web.Core",
"error_message": "<string>",
"unit_risks": [
{
"$type": "Derivitec.Web.Core.KeyValuePairViewModel, Derivitec.Web.Core",
"error_message": "<string>",
"format_string": "<string>",
"key": "<string>",
"scales_by_qty": false,
"value": "<string>",
"currency": "<string>"
}
]
},
"client_security_id": "<string>",
"show_live_data_refresh": true,
"live_data_snapshot_time": "2023-11-07T05:31:56Z"
}
}Authorizations
OAuth2 access-token requested from AWS Cognito and provided as a Auth Bearer header
Body
JSON request with Contract, the tradable model to return.
Tradable contract submitted for round-trip template retrieval.
Response
Returns the supplied contract with IsSuccess = true.
Successful template response containing the supplied tradable contract.
Derivitec.Web.Core.TradeBooking.ApiGetTemplateContractResponse, 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.
Abstract presentation shape combining a tradable's identity, quantity, valuation dates, pricing details, results, and risk data.
Show child attributes
Show child attributes
Was this page helpful?