curl --request GET \
--url https://api.itoflow.ai/risk/measure/{measure_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.itoflow.ai/risk/measure/{measure_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.itoflow.ai/risk/measure/{measure_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "running",
"progress": {
"dates_done": 4503599627370495,
"dates_total": 30
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}Read a risk measure
Read a measure until its status is not running. running gives progress: dates_done of dates_total. ok gives the answer: model (the version, its publications and base currency), units, factors (every factor any date has; each per-factor array follows this order, null where a date’s publication lacks one), dates (one per date: ok with publication_date, the benchmark and each book, or missing with nearest_before and nearest_after), and warnings. Volatility and tracking error are annual decimals; shares are percent of variance; modelled_share_of_gross is a share of the book’s gross weight, not of net assets. failed gives failure_code and reason: model_version_not_found (leave model.version out), answer_too_large or timed_out (split the books or the range), cancelled, or engine_fault (start again with a new request_key; if it fails again, the measure cannot run). Answers stay 24 hours after the measure ends. Names the model lacks stay out of this result. To add them, run the risk engine on the book: it adds each name it can score to the model’s publications from the last two years. Then call this again. A name the run could not add comes back with its reason; not_added_in_time means the run stopped waiting first, so run it again later.
Operation ID: getRiskMeasure.
curl --request GET \
--url https://api.itoflow.ai/risk/measure/{measure_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.itoflow.ai/risk/measure/{measure_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.itoflow.ai/risk/measure/{measure_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "running",
"progress": {
"dates_done": 4503599627370495,
"dates_total": 30
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}