curl --request POST \
--url https://api.riskportal.activeviam.com/api/MarketData/GetCommodities \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"$type": "Derivitec.Web.Core.MarketData.ApiGetCommoditiesRequest, Derivitec.Web.Core",
"market_data_environment_name": "Example market data",
"provider_id": "<string>",
"commodity_ids": [
{
"$type": "Derivitec.Web.Core.MarketData.CommodityId, Derivitec.Web.Core",
"name": "<string>",
"exchange": "<string>"
}
],
"market_dates": [
"2023-11-07T05:31:56Z"
],
"descriptors": [
{}
]
}
'import requests
url = "https://api.riskportal.activeviam.com/api/MarketData/GetCommodities"
payload = {
"$type": "Derivitec.Web.Core.MarketData.ApiGetCommoditiesRequest, Derivitec.Web.Core",
"market_data_environment_name": "Example market data",
"provider_id": "<string>",
"commodity_ids": [
{
"$type": "Derivitec.Web.Core.MarketData.CommodityId, Derivitec.Web.Core",
"name": "<string>",
"exchange": "<string>"
}
],
"market_dates": ["2023-11-07T05:31:56Z"],
"descriptors": [{}]
}
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.ApiGetCommoditiesRequest, Derivitec.Web.Core',
market_data_environment_name: 'Example market data',
provider_id: '<string>',
commodity_ids: [
{
$type: 'Derivitec.Web.Core.MarketData.CommodityId, Derivitec.Web.Core',
name: '<string>',
exchange: '<string>'
}
],
market_dates: ['2023-11-07T05:31:56Z'],
descriptors: [{}]
})
};
fetch('https://api.riskportal.activeviam.com/api/MarketData/GetCommodities', 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/GetCommodities",
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.ApiGetCommoditiesRequest, Derivitec.Web.Core',
'market_data_environment_name' => 'Example market data',
'provider_id' => '<string>',
'commodity_ids' => [
[
'$type' => 'Derivitec.Web.Core.MarketData.CommodityId, Derivitec.Web.Core',
'name' => '<string>',
'exchange' => '<string>'
]
],
'market_dates' => [
'2023-11-07T05:31:56Z'
],
'descriptors' => [
[
]
]
]),
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/GetCommodities"
payload := strings.NewReader("{\n \"$type\": \"Derivitec.Web.Core.MarketData.ApiGetCommoditiesRequest, Derivitec.Web.Core\",\n \"market_data_environment_name\": \"Example market data\",\n \"provider_id\": \"<string>\",\n \"commodity_ids\": [\n {\n \"$type\": \"Derivitec.Web.Core.MarketData.CommodityId, Derivitec.Web.Core\",\n \"name\": \"<string>\",\n \"exchange\": \"<string>\"\n }\n ],\n \"market_dates\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"descriptors\": [\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/MarketData/GetCommodities")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"$type\": \"Derivitec.Web.Core.MarketData.ApiGetCommoditiesRequest, Derivitec.Web.Core\",\n \"market_data_environment_name\": \"Example market data\",\n \"provider_id\": \"<string>\",\n \"commodity_ids\": [\n {\n \"$type\": \"Derivitec.Web.Core.MarketData.CommodityId, Derivitec.Web.Core\",\n \"name\": \"<string>\",\n \"exchange\": \"<string>\"\n }\n ],\n \"market_dates\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"descriptors\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.riskportal.activeviam.com/api/MarketData/GetCommodities")
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.ApiGetCommoditiesRequest, Derivitec.Web.Core\",\n \"market_data_environment_name\": \"Example market data\",\n \"provider_id\": \"<string>\",\n \"commodity_ids\": [\n {\n \"$type\": \"Derivitec.Web.Core.MarketData.CommodityId, Derivitec.Web.Core\",\n \"name\": \"<string>\",\n \"exchange\": \"<string>\"\n }\n ],\n \"market_dates\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"descriptors\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"$type": "Derivitec.Web.Core.MarketData.ApiGetCommoditiesResponse, Derivitec.Web.Core",
"is_success": true,
"error_messages": [
"<string>"
],
"commodities": [
{
"$type": "Derivitec.Web.Core.MarketData.Commodity, 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,
"reference_date": "2023-11-07T05:31:56Z",
"commodity_id": {
"$type": "Derivitec.Web.Core.MarketData.CommodityId, Derivitec.Web.Core",
"name": "<string>",
"exchange": "<string>"
},
"convenience_yield_curve": {
"$type": "Derivitec.Web.Core.MarketData.ConvenienceYieldCurve, 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,
"commodity_id": {
"$type": "Derivitec.Web.Core.MarketData.CommodityId, Derivitec.Web.Core",
"name": "<string>",
"exchange": "<string>"
},
"discount_factors": [
123
],
"extrapolate": true,
"maturities": [
123
],
"value_date": "2023-11-07T05:31:56Z"
},
"discount_curve": {
"$type": "Derivitec.Web.Core.MarketData.DiscountCurve, 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,
"currency": "<string>",
"curve_name": "<string>",
"discount_factors": [
123
],
"extrapolate": true,
"maturities": [
123
],
"value_date": "2023-11-07T05:31:56Z"
},
"fixings": {
"$type": "Derivitec.Web.Core.MarketData.Fixings, Derivitec.Web.Core",
"asset_id": "<string>",
"dates": [
"<string>"
],
"values": [
123
]
},
"futures_date": "2023-11-07T05:31:56Z",
"futures_price": 123,
"roll_fixing": 123,
"settlement_calendar": {
"$type": "Derivitec.Web.Core.StaticData.Calendar, Derivitec.Web.Core",
"holidays": [
"2023-11-07T05:31:56Z"
],
"include_weekends": true,
"name": "<string>"
},
"settlement_lag": 123,
"fixings_by_futures_code": [
{
"key": "<string>",
"value": {
"$type": "Derivitec.Web.Core.MarketData.Fixings, Derivitec.Web.Core",
"asset_id": "<string>",
"dates": [
"<string>"
],
"values": [
123
]
}
}
]
}
]
}Retrieve commodity market data.
Use this operation to retrieve fully described commodity data for requested name/exchange identifiers and market dates. Each commodity requires a matching descriptor that can request spot and per-contract futures fixing windows; the descriptor defaults span all dates when its bounds are omitted. Results use the selected provider and caller organisation scopes, and the operation is read-only.
curl --request POST \
--url https://api.riskportal.activeviam.com/api/MarketData/GetCommodities \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"$type": "Derivitec.Web.Core.MarketData.ApiGetCommoditiesRequest, Derivitec.Web.Core",
"market_data_environment_name": "Example market data",
"provider_id": "<string>",
"commodity_ids": [
{
"$type": "Derivitec.Web.Core.MarketData.CommodityId, Derivitec.Web.Core",
"name": "<string>",
"exchange": "<string>"
}
],
"market_dates": [
"2023-11-07T05:31:56Z"
],
"descriptors": [
{}
]
}
'import requests
url = "https://api.riskportal.activeviam.com/api/MarketData/GetCommodities"
payload = {
"$type": "Derivitec.Web.Core.MarketData.ApiGetCommoditiesRequest, Derivitec.Web.Core",
"market_data_environment_name": "Example market data",
"provider_id": "<string>",
"commodity_ids": [
{
"$type": "Derivitec.Web.Core.MarketData.CommodityId, Derivitec.Web.Core",
"name": "<string>",
"exchange": "<string>"
}
],
"market_dates": ["2023-11-07T05:31:56Z"],
"descriptors": [{}]
}
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.ApiGetCommoditiesRequest, Derivitec.Web.Core',
market_data_environment_name: 'Example market data',
provider_id: '<string>',
commodity_ids: [
{
$type: 'Derivitec.Web.Core.MarketData.CommodityId, Derivitec.Web.Core',
name: '<string>',
exchange: '<string>'
}
],
market_dates: ['2023-11-07T05:31:56Z'],
descriptors: [{}]
})
};
fetch('https://api.riskportal.activeviam.com/api/MarketData/GetCommodities', 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/GetCommodities",
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.ApiGetCommoditiesRequest, Derivitec.Web.Core',
'market_data_environment_name' => 'Example market data',
'provider_id' => '<string>',
'commodity_ids' => [
[
'$type' => 'Derivitec.Web.Core.MarketData.CommodityId, Derivitec.Web.Core',
'name' => '<string>',
'exchange' => '<string>'
]
],
'market_dates' => [
'2023-11-07T05:31:56Z'
],
'descriptors' => [
[
]
]
]),
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/GetCommodities"
payload := strings.NewReader("{\n \"$type\": \"Derivitec.Web.Core.MarketData.ApiGetCommoditiesRequest, Derivitec.Web.Core\",\n \"market_data_environment_name\": \"Example market data\",\n \"provider_id\": \"<string>\",\n \"commodity_ids\": [\n {\n \"$type\": \"Derivitec.Web.Core.MarketData.CommodityId, Derivitec.Web.Core\",\n \"name\": \"<string>\",\n \"exchange\": \"<string>\"\n }\n ],\n \"market_dates\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"descriptors\": [\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/MarketData/GetCommodities")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"$type\": \"Derivitec.Web.Core.MarketData.ApiGetCommoditiesRequest, Derivitec.Web.Core\",\n \"market_data_environment_name\": \"Example market data\",\n \"provider_id\": \"<string>\",\n \"commodity_ids\": [\n {\n \"$type\": \"Derivitec.Web.Core.MarketData.CommodityId, Derivitec.Web.Core\",\n \"name\": \"<string>\",\n \"exchange\": \"<string>\"\n }\n ],\n \"market_dates\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"descriptors\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.riskportal.activeviam.com/api/MarketData/GetCommodities")
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.ApiGetCommoditiesRequest, Derivitec.Web.Core\",\n \"market_data_environment_name\": \"Example market data\",\n \"provider_id\": \"<string>\",\n \"commodity_ids\": [\n {\n \"$type\": \"Derivitec.Web.Core.MarketData.CommodityId, Derivitec.Web.Core\",\n \"name\": \"<string>\",\n \"exchange\": \"<string>\"\n }\n ],\n \"market_dates\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"descriptors\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"$type": "Derivitec.Web.Core.MarketData.ApiGetCommoditiesResponse, Derivitec.Web.Core",
"is_success": true,
"error_messages": [
"<string>"
],
"commodities": [
{
"$type": "Derivitec.Web.Core.MarketData.Commodity, 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,
"reference_date": "2023-11-07T05:31:56Z",
"commodity_id": {
"$type": "Derivitec.Web.Core.MarketData.CommodityId, Derivitec.Web.Core",
"name": "<string>",
"exchange": "<string>"
},
"convenience_yield_curve": {
"$type": "Derivitec.Web.Core.MarketData.ConvenienceYieldCurve, 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,
"commodity_id": {
"$type": "Derivitec.Web.Core.MarketData.CommodityId, Derivitec.Web.Core",
"name": "<string>",
"exchange": "<string>"
},
"discount_factors": [
123
],
"extrapolate": true,
"maturities": [
123
],
"value_date": "2023-11-07T05:31:56Z"
},
"discount_curve": {
"$type": "Derivitec.Web.Core.MarketData.DiscountCurve, 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,
"currency": "<string>",
"curve_name": "<string>",
"discount_factors": [
123
],
"extrapolate": true,
"maturities": [
123
],
"value_date": "2023-11-07T05:31:56Z"
},
"fixings": {
"$type": "Derivitec.Web.Core.MarketData.Fixings, Derivitec.Web.Core",
"asset_id": "<string>",
"dates": [
"<string>"
],
"values": [
123
]
},
"futures_date": "2023-11-07T05:31:56Z",
"futures_price": 123,
"roll_fixing": 123,
"settlement_calendar": {
"$type": "Derivitec.Web.Core.StaticData.Calendar, Derivitec.Web.Core",
"holidays": [
"2023-11-07T05:31:56Z"
],
"include_weekends": true,
"name": "<string>"
},
"settlement_lag": 123,
"fixings_by_futures_code": [
{
"key": "<string>",
"value": {
"$type": "Derivitec.Web.Core.MarketData.Fixings, Derivitec.Web.Core",
"asset_id": "<string>",
"dates": [
"<string>"
],
"values": [
123
]
}
}
]
}
]
}Authorizations
Body
The query payload. CommodityIds, date-only MarketDates, and identifier-to-Descriptor pairs must be non-empty, with one descriptor for every requested commodity. Provider or environment fields optionally select an authorised source.
Queries commodity market data by identifier or descriptor across market dates.
Response
Returns available commodity assets with requested spot and futures history, or validation and unavailable-data errors.
Returns commodity market-data records and query errors.
Was this page helpful?