Start a risk run
curl --request POST \
--url https://api.itoflow.ai/risk/runs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"request": {
"benchmark": "<string>",
"portfolio": {
"portfolio_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"analyses": [],
"include_forecast_quality": true,
"peers": []
},
"request_key": "<string>"
}
'import requests
url = "https://api.itoflow.ai/risk/runs"
payload = {
"request": {
"benchmark": "<string>",
"portfolio": { "portfolio_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" },
"analyses": [],
"include_forecast_quality": True,
"peers": []
},
"request_key": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
request: {
benchmark: '<string>',
portfolio: {portfolio_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'},
analyses: [],
include_forecast_quality: true,
peers: []
},
request_key: '<string>'
})
};
fetch('https://api.itoflow.ai/risk/runs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"joined_existing_run": true,
"run_id": "<string>",
"status": "running"
}{
"error": {
"code": "<string>",
"message": "<string>",
"flag": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"flag": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"flag": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"flag": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"flag": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"flag": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"flag": "<string>"
}
}Risk runs
Runs
Measure a saved portfolio or a what-if book against a benchmark and peer funds. Keep the request_key: retrying the same request joins its run for 24 hours after it ends. Another request with that key returns 409. At most three runs may run at once; none runs past 60 minutes. A run whose books hold names the model has not scored first waits up to 10 more minutes while they are scored. Requires itoflow-engine-results.
Operation ID: startRiskRun.
POST
https://api.itoflow.ai
/
risk
/
runs
Start a risk run
curl --request POST \
--url https://api.itoflow.ai/risk/runs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"request": {
"benchmark": "<string>",
"portfolio": {
"portfolio_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"analyses": [],
"include_forecast_quality": true,
"peers": []
},
"request_key": "<string>"
}
'import requests
url = "https://api.itoflow.ai/risk/runs"
payload = {
"request": {
"benchmark": "<string>",
"portfolio": { "portfolio_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" },
"analyses": [],
"include_forecast_quality": True,
"peers": []
},
"request_key": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
request: {
benchmark: '<string>',
portfolio: {portfolio_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'},
analyses: [],
include_forecast_quality: true,
peers: []
},
request_key: '<string>'
})
};
fetch('https://api.itoflow.ai/risk/runs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"joined_existing_run": true,
"run_id": "<string>",
"status": "running"
}{
"error": {
"code": "<string>",
"message": "<string>",
"flag": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"flag": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"flag": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"flag": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"flag": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"flag": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"flag": "<string>"
}
}Body
application/json